@coorpacademy/components 11.2.8 → 11.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/clue/index.d.ts +1 -1
- package/es/atom/promo-code/index.d.ts +1 -1
- package/es/atom/provider/index.d.ts +1 -1
- package/es/atom/provider/index.js +1 -1
- package/es/atom/provider/index.js.map +1 -1
- package/es/atom/select/index.d.ts +16 -17
- package/es/atom/select/index.d.ts.map +1 -1
- package/es/atom/select/index.js +7 -6
- package/es/atom/select/index.js.map +1 -1
- package/es/atom/tab-content/index.d.ts +1 -1
- package/es/molecule/answer/index.d.ts.map +1 -1
- package/es/molecule/answer/index.js +9 -1
- package/es/molecule/answer/index.js.map +1 -1
- package/es/molecule/battle-request/index.d.ts +1 -1
- package/es/molecule/brand-create-form/index.d.ts +1 -1
- package/es/molecule/brand-form-group/index.d.ts +2 -2
- package/es/molecule/card-with-button/index.d.ts +1 -1
- package/es/molecule/cookie-banner/index.d.ts +1 -1
- package/es/molecule/dashboard/cards-list/index.d.ts +1 -1
- package/es/molecule/discipline-partners/index.d.ts +1 -1
- package/es/molecule/external-content-button/index.d.ts +1 -1
- package/es/molecule/filters/index.d.ts +1 -1
- package/es/molecule/forum/forum-comment/index.d.ts +1 -1
- package/es/molecule/forum/forum-post/index.d.ts +1 -1
- package/es/molecule/payment-form/index.d.ts +1 -1
- package/es/molecule/pdf/index.d.ts +1 -1
- package/es/molecule/product-card/index.d.ts +1 -1
- package/es/molecule/questions/drop-down/index.d.ts +6 -5
- package/es/molecule/questions/drop-down/index.js +5 -2
- package/es/molecule/questions/drop-down/index.js.map +1 -1
- package/es/molecule/questions/mobile/draggable/index.native.d.ts.map +1 -1
- package/es/molecule/questions/mobile/draggable/index.native.js +26 -28
- package/es/molecule/questions/mobile/draggable/index.native.js.map +1 -1
- package/es/molecule/questions/mobile/slider/index.native.d.ts.map +1 -1
- package/es/molecule/questions/mobile/slider/index.native.js +6 -7
- package/es/molecule/questions/mobile/slider/index.native.js.map +1 -1
- package/es/molecule/questions/template/index.d.ts +3 -1
- package/es/molecule/scope-content/index.d.ts +1 -1
- package/es/molecule/setup-section/index.d.ts +1 -1
- package/es/molecule/setup-slide/index.d.ts +1 -1
- package/es/molecule/setup-slider/index.d.ts +1 -1
- package/es/molecule/subscription-freemium/index.d.ts +1 -1
- package/es/molecule/subscription-premium/index.d.ts +1 -1
- package/es/molecule/table/index.d.ts +1 -1
- package/es/molecule/unsubscribe/index.d.ts +1 -1
- package/es/organism/brand-analytics/index.d.ts +1 -1
- package/es/organism/brand-form/index.d.ts +2 -2
- package/es/organism/cart/index.d.ts +1 -1
- package/es/organism/mooc-header/index.d.ts +1 -1
- package/es/organism/mooc-header/index.js +1 -1
- package/es/organism/mooc-header/index.js.map +1 -1
- package/es/organism/settings/index.d.ts +1 -1
- package/es/organism/wizard-contents/index.d.ts +2 -2
- package/es/template/app-player/player/slides/index.d.ts +2 -2
- package/es/template/app-player/player/slides/index.js +1 -1
- package/es/template/app-player/player/slides/index.js.map +1 -1
- package/es/template/app-review/template-context.d.ts +1 -0
- package/es/template/app-review/template-context.d.ts.map +1 -1
- package/es/template/app-review/template-context.js +2 -1
- package/es/template/app-review/template-context.js.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +4 -4
- package/es/template/battle-requests/index.d.ts +1 -1
- package/es/template/common/authors/index.d.ts +1 -1
- package/es/template/common/search-page/index.d.ts +1 -1
- package/es/util/render-with-context.d.ts +1 -4
- package/es/util/render-with-context.d.ts.map +1 -1
- package/es/util/render-with-context.js +6 -6
- package/es/util/render-with-context.js.map +1 -1
- package/lib/atom/clue/index.d.ts +1 -1
- package/lib/atom/promo-code/index.d.ts +1 -1
- package/lib/atom/provider/index.d.ts +1 -1
- package/lib/atom/provider/index.js +1 -1
- package/lib/atom/provider/index.js.map +1 -1
- package/lib/atom/select/index.d.ts +16 -17
- package/lib/atom/select/index.d.ts.map +1 -1
- package/lib/atom/select/index.js +7 -6
- package/lib/atom/select/index.js.map +1 -1
- package/lib/atom/tab-content/index.d.ts +1 -1
- package/lib/molecule/answer/index.d.ts.map +1 -1
- package/lib/molecule/answer/index.js +10 -1
- package/lib/molecule/answer/index.js.map +1 -1
- package/lib/molecule/battle-request/index.d.ts +1 -1
- package/lib/molecule/brand-create-form/index.d.ts +1 -1
- package/lib/molecule/brand-form-group/index.d.ts +2 -2
- package/lib/molecule/card-with-button/index.d.ts +1 -1
- package/lib/molecule/cookie-banner/index.d.ts +1 -1
- package/lib/molecule/dashboard/cards-list/index.d.ts +1 -1
- package/lib/molecule/discipline-partners/index.d.ts +1 -1
- package/lib/molecule/external-content-button/index.d.ts +1 -1
- package/lib/molecule/filters/index.d.ts +1 -1
- package/lib/molecule/forum/forum-comment/index.d.ts +1 -1
- package/lib/molecule/forum/forum-post/index.d.ts +1 -1
- package/lib/molecule/payment-form/index.d.ts +1 -1
- package/lib/molecule/pdf/index.d.ts +1 -1
- package/lib/molecule/product-card/index.d.ts +1 -1
- package/lib/molecule/questions/drop-down/index.d.ts +6 -5
- package/lib/molecule/questions/drop-down/index.js +5 -2
- package/lib/molecule/questions/drop-down/index.js.map +1 -1
- package/lib/molecule/questions/mobile/draggable/index.native.d.ts.map +1 -1
- package/lib/molecule/questions/mobile/draggable/index.native.js +25 -27
- package/lib/molecule/questions/mobile/draggable/index.native.js.map +1 -1
- package/lib/molecule/questions/mobile/slider/index.native.d.ts.map +1 -1
- package/lib/molecule/questions/mobile/slider/index.native.js +6 -7
- package/lib/molecule/questions/mobile/slider/index.native.js.map +1 -1
- package/lib/molecule/questions/template/index.d.ts +3 -1
- package/lib/molecule/scope-content/index.d.ts +1 -1
- package/lib/molecule/setup-section/index.d.ts +1 -1
- package/lib/molecule/setup-slide/index.d.ts +1 -1
- package/lib/molecule/setup-slider/index.d.ts +1 -1
- package/lib/molecule/subscription-freemium/index.d.ts +1 -1
- package/lib/molecule/subscription-premium/index.d.ts +1 -1
- package/lib/molecule/table/index.d.ts +1 -1
- package/lib/molecule/unsubscribe/index.d.ts +1 -1
- package/lib/organism/brand-analytics/index.d.ts +1 -1
- package/lib/organism/brand-form/index.d.ts +2 -2
- package/lib/organism/cart/index.d.ts +1 -1
- package/lib/organism/mooc-header/index.d.ts +1 -1
- package/lib/organism/mooc-header/index.js +1 -1
- package/lib/organism/mooc-header/index.js.map +1 -1
- package/lib/organism/settings/index.d.ts +1 -1
- package/lib/organism/wizard-contents/index.d.ts +2 -2
- package/lib/template/app-player/player/slides/index.d.ts +2 -2
- package/lib/template/app-player/player/slides/index.js +1 -1
- package/lib/template/app-player/player/slides/index.js.map +1 -1
- package/lib/template/app-review/template-context.d.ts +1 -0
- package/lib/template/app-review/template-context.d.ts.map +1 -1
- package/lib/template/app-review/template-context.js +2 -1
- package/lib/template/app-review/template-context.js.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +4 -4
- package/lib/template/battle-requests/index.d.ts +1 -1
- package/lib/template/common/authors/index.d.ts +1 -1
- package/lib/template/common/search-page/index.d.ts +1 -1
- package/lib/util/render-with-context.d.ts +1 -4
- package/lib/util/render-with-context.d.ts.map +1 -1
- package/lib/util/render-with-context.js +6 -6
- package/lib/util/render-with-context.js.map +1 -1
- package/locales/en/global.json +1 -0
- package/package.json +2 -2
- package/locales/.mtslconfig.json +0 -1
|
@@ -1,46 +1,32 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { View, StyleSheet
|
|
2
|
+
import { View, StyleSheet } from 'react-native';
|
|
3
3
|
import QuestionChoice from '../../../../atom/choice/index.native';
|
|
4
4
|
import { useTemplateContext } from '../../../../template/app-review/template-context';
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const createSelectionStyle = theme => StyleSheet.create({
|
|
7
7
|
choice: {
|
|
8
8
|
margin: theme.spacing.micro
|
|
9
9
|
},
|
|
10
|
-
|
|
10
|
+
selectionArea: {
|
|
11
11
|
flexWrap: 'wrap',
|
|
12
|
-
flexDirection: 'row'
|
|
13
|
-
borderStyle: 'dashed',
|
|
14
|
-
borderWidth: 2,
|
|
15
|
-
padding: theme.spacing.micro,
|
|
16
|
-
borderColor: theme.colors.gray.light,
|
|
17
|
-
backgroundColor: theme.colors.gray.extra,
|
|
18
|
-
borderRadius: theme.radius.common,
|
|
19
|
-
marginBottom: theme.spacing.tiny
|
|
20
|
-
},
|
|
21
|
-
emptyContent: {
|
|
22
|
-
justifyContent: 'center',
|
|
23
|
-
alignContent: 'center',
|
|
24
|
-
alignItems: 'center',
|
|
25
|
-
height: 60
|
|
12
|
+
flexDirection: 'row'
|
|
26
13
|
},
|
|
27
14
|
text: {
|
|
28
15
|
color: theme.colors.gray.medium
|
|
29
16
|
}
|
|
30
17
|
});
|
|
31
18
|
|
|
32
|
-
const
|
|
19
|
+
const Selection = props => {
|
|
33
20
|
const templateContext = useTemplateContext();
|
|
34
21
|
const {
|
|
35
|
-
theme
|
|
36
|
-
translations
|
|
22
|
+
theme
|
|
37
23
|
} = templateContext;
|
|
38
24
|
const {
|
|
39
25
|
onPress
|
|
40
26
|
} = props;
|
|
41
27
|
const [styleSheet, setStylesheet] = useState(null);
|
|
42
28
|
useEffect(() => {
|
|
43
|
-
const _stylesheet =
|
|
29
|
+
const _stylesheet = createSelectionStyle(theme);
|
|
44
30
|
|
|
45
31
|
setStylesheet(_stylesheet);
|
|
46
32
|
}, [theme]);
|
|
@@ -61,21 +47,30 @@ const DropZone = props => {
|
|
|
61
47
|
onPress: onPress(item),
|
|
62
48
|
questionType: "qcmDrag"
|
|
63
49
|
}, item.label));
|
|
64
|
-
const hasNoSelectedChoices = mappedSortedChoices.length === 0;
|
|
65
50
|
return /*#__PURE__*/React.createElement(View, {
|
|
66
|
-
style:
|
|
67
|
-
},
|
|
68
|
-
style: styleSheet.text
|
|
69
|
-
}, translations.selectSomethingBelow) : null, !hasNoSelectedChoices && mappedSortedChoices);
|
|
51
|
+
style: styleSheet.selectionArea
|
|
52
|
+
}, mappedSortedChoices);
|
|
70
53
|
};
|
|
71
54
|
|
|
72
55
|
const createStyleSheet = theme => StyleSheet.create({
|
|
56
|
+
container: {
|
|
57
|
+
flex: 1
|
|
58
|
+
},
|
|
73
59
|
pickableChoices: {
|
|
74
60
|
flexDirection: 'row',
|
|
75
61
|
flexWrap: 'wrap'
|
|
76
62
|
},
|
|
77
63
|
choice: {
|
|
78
64
|
margin: theme.spacing.micro
|
|
65
|
+
},
|
|
66
|
+
line: {
|
|
67
|
+
borderWidth: 1,
|
|
68
|
+
borderColor: '#E1E1E3',
|
|
69
|
+
borderRadius: 17,
|
|
70
|
+
marginHorizontal: 4,
|
|
71
|
+
marginBottom: 24,
|
|
72
|
+
marginTop: 16,
|
|
73
|
+
height: 2
|
|
79
74
|
}
|
|
80
75
|
});
|
|
81
76
|
|
|
@@ -110,10 +105,13 @@ const QuestionDraggable = props => {
|
|
|
110
105
|
questionType: "qcmDrag"
|
|
111
106
|
}, item.label));
|
|
112
107
|
return /*#__PURE__*/React.createElement(View, {
|
|
113
|
-
testID: testID
|
|
114
|
-
|
|
108
|
+
testID: testID,
|
|
109
|
+
style: styleSheet.container
|
|
110
|
+
}, /*#__PURE__*/React.createElement(Selection, {
|
|
115
111
|
choices: selectedChoices,
|
|
116
112
|
onPress: onPress
|
|
113
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
114
|
+
style: styleSheet.line
|
|
117
115
|
}), /*#__PURE__*/React.createElement(View, {
|
|
118
116
|
style: styleSheet.pickableChoices
|
|
119
117
|
}, pickableChoices));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["React","useEffect","useState","View","StyleSheet","
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["React","useEffect","useState","View","StyleSheet","QuestionChoice","useTemplateContext","createSelectionStyle","theme","create","choice","margin","spacing","micro","selectionArea","flexWrap","flexDirection","text","color","colors","gray","medium","Selection","props","templateContext","onPress","styleSheet","setStylesheet","_stylesheet","choices","mappedSortedChoices","map","item","_id","label","createStyleSheet","container","flex","pickableChoices","line","borderWidth","borderColor","borderRadius","marginHorizontal","marginBottom","marginTop","height","QuestionDraggable","testID","selectedChoices","filter","selected"],"sources":["../../../../../src/molecule/questions/mobile/draggable/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {View, StyleSheet, ViewStyle, TextStyle} from 'react-native';\nimport QuestionChoice from '../../../../atom/choice/index.native';\nimport {useTemplateContext} from '../../../../template/app-review/template-context';\nimport {Theme} from '../../../../variables/theme.native';\n\nimport type {SelectableChoice} from '../../types';\n\nexport interface DropZoneProps {\n choices: Array<SelectableChoice>;\n onPress: (item: SelectableChoice) => () => void;\n}\n\ntype DropZoneStyleSheet = {\n choice: ViewStyle;\n selectionArea: ViewStyle;\n text: TextStyle;\n};\n\nconst createSelectionStyle = (theme: Theme): DropZoneStyleSheet =>\n StyleSheet.create({\n choice: {\n margin: theme.spacing.micro\n },\n selectionArea: {\n flexWrap: 'wrap',\n flexDirection: 'row'\n },\n text: {\n color: theme.colors.gray.medium\n }\n });\n\nconst Selection = (props: DropZoneProps) => {\n const templateContext = useTemplateContext();\n const {theme} = templateContext;\n const {onPress} = props;\n\n const [styleSheet, setStylesheet] = useState<DropZoneStyleSheet | null>(null);\n\n useEffect(() => {\n const _stylesheet = createSelectionStyle(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n if (!styleSheet) {\n return null;\n }\n\n const {choices} = props;\n const mappedSortedChoices = choices.map(item => (\n <QuestionChoice\n style={styleSheet.choice}\n key={item._id}\n squeezed\n isSelected\n testID={`choice-${item._id}`}\n onPress={onPress(item)}\n questionType=\"qcmDrag\"\n >\n {item.label}\n </QuestionChoice>\n ));\n\n return <View style={styleSheet.selectionArea}>{mappedSortedChoices}</View>;\n};\n\nexport interface Props {\n choices: Array<SelectableChoice>;\n testID?: string;\n onPress: (item: SelectableChoice) => () => void;\n}\n\ntype QuestionDraggableStyleSheet = {\n container: ViewStyle;\n pickableChoices: ViewStyle;\n choice: ViewStyle;\n line: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme): QuestionDraggableStyleSheet =>\n StyleSheet.create({\n container: {\n flex: 1\n },\n pickableChoices: {\n flexDirection: 'row',\n flexWrap: 'wrap'\n },\n choice: {\n margin: theme.spacing.micro\n },\n line: {\n borderWidth: 1,\n borderColor: '#E1E1E3',\n borderRadius: 17,\n marginHorizontal: 4,\n marginBottom: 24,\n marginTop: 16,\n height: 2\n }\n });\n\nconst QuestionDraggable = (props: Props) => {\n const templateContext = useTemplateContext();\n const {theme} = templateContext;\n\n const [styleSheet, setStylesheet] = useState<QuestionDraggableStyleSheet | 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 const {choices, onPress, testID} = props;\n const selectedChoices = choices.filter(item => item.selected);\n\n const pickableChoices = choices\n .filter(item => !item.selected)\n .map((item: SelectableChoice) => (\n <QuestionChoice\n style={styleSheet.choice}\n key={item._id}\n squeezed\n testID={`choice-${item._id}-unselected`}\n onPress={onPress(item)}\n questionType=\"qcmDrag\"\n >\n {item.label}\n </QuestionChoice>\n ));\n\n return (\n <View testID={testID} style={styleSheet.container}>\n <Selection choices={selectedChoices} onPress={onPress} />\n <View style={styleSheet.line} />\n <View style={styleSheet.pickableChoices}>{pickableChoices}</View>\n </View>\n );\n};\n\nexport default QuestionDraggable;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,SAAf,EAA0BC,QAA1B,QAAyC,OAAzC;AACA,SAAQC,IAAR,EAAcC,UAAd,QAAqD,cAArD;AACA,OAAOC,cAAP,MAA2B,sCAA3B;AACA,SAAQC,kBAAR,QAAiC,kDAAjC;;AAgBA,MAAMC,oBAAoB,GAAIC,KAAD,IAC3BJ,UAAU,CAACK,MAAX,CAAkB;EAChBC,MAAM,EAAE;IACNC,MAAM,EAAEH,KAAK,CAACI,OAAN,CAAcC;EADhB,CADQ;EAIhBC,aAAa,EAAE;IACbC,QAAQ,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AACO,IAAD,CALlB;IAME,YAAY,EAAC;EANf,GAQGA,IAAI,CAACE,KARR,CAHoB,CAAxB;EAeA,oBACE,oBAAC,IAAD;IAAM,MAAM,EAAEc,MAAd;IAAsB,KAAK,EAAEtB,UAAU,CAACU;EAAxC,gBACE,oBAAC,SAAD;IAAW,OAAO,EAAEa,eAApB;IAAqC,OAAO,EAAExB;EAA9C,EADF,eAEE,oBAAC,IAAD;IAAM,KAAK,EAAEC,UAAU,CAACa;EAAxB,EAFF,eAGE,oBAAC,IAAD;IAAM,KAAK,EAAEb,UAAU,CAACY;EAAxB,GAA0CA,eAA1C,CAHF,CADF;AAOD,CAxCD;;AA0CA,eAAeS,iBAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../../src/molecule/questions/mobile/slider/index.native.tsx"],"names":[],"mappings":";AACA,OAAO,EAAmB,SAAS,EAAY,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../../src/molecule/questions/mobile/slider/index.native.tsx"],"names":[],"mappings":";AACA,OAAO,EAAmB,SAAS,EAAY,MAAM,cAAc,CAAC;AASpE,oBAAY,yBAAyB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;AAEhE,oBAAY,KAAK,GAAG;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,yBAAyB,CAAC;IAC7C,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AA2DF,QAAA,MAAM,cAAc,UAAW,KAAK,uBA4DnC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -7,7 +7,7 @@ import Text from '../../../../atom/text/index.native';
|
|
|
7
7
|
import { useTemplateContext } from '../../../../template/app-review/template-context';
|
|
8
8
|
import { BOX_STYLE } from '../../../../variables/shadow';
|
|
9
9
|
|
|
10
|
-
const createStyleSheet = theme => StyleSheet.create({
|
|
10
|
+
const createStyleSheet = (brandTheme, theme) => StyleSheet.create({
|
|
11
11
|
container: {
|
|
12
12
|
flex: 1,
|
|
13
13
|
paddingHorizontal: 20,
|
|
@@ -45,8 +45,9 @@ const createStyleSheet = theme => StyleSheet.create({
|
|
|
45
45
|
width: 30,
|
|
46
46
|
height: 30,
|
|
47
47
|
borderRadius: 30 / 2,
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
borderWidth: 5,
|
|
49
|
+
backgroundColor: brandTheme?.colors?.primary,
|
|
50
|
+
borderColor: 'white'
|
|
50
51
|
})
|
|
51
52
|
});
|
|
52
53
|
|
|
@@ -72,7 +73,7 @@ const QuestionSlider = props => {
|
|
|
72
73
|
onSlidingComplete(value);
|
|
73
74
|
}, [onSlidingComplete, value]);
|
|
74
75
|
useEffect(() => {
|
|
75
|
-
const _stylesheet = createStyleSheet(theme);
|
|
76
|
+
const _stylesheet = createStyleSheet(brandTheme, theme);
|
|
76
77
|
|
|
77
78
|
setStylesheet(_stylesheet);
|
|
78
79
|
}, [theme]);
|
|
@@ -98,9 +99,7 @@ const QuestionSlider = props => {
|
|
|
98
99
|
onSlidingComplete: handleSlidingComplete,
|
|
99
100
|
minimumTrackTintColor: brandTheme?.colors?.primary,
|
|
100
101
|
trackStyle: styleSheet.track,
|
|
101
|
-
thumbStyle: [styleSheet.thumb,
|
|
102
|
-
borderColor: brandTheme?.colors?.primary
|
|
103
|
-
}],
|
|
102
|
+
thumbStyle: [styleSheet.thumb],
|
|
104
103
|
testID: "slider"
|
|
105
104
|
}), /*#__PURE__*/React.createElement(View, {
|
|
106
105
|
style: styleSheet.valuesContainer,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["React","useState","useEffect","useCallback","View","StyleSheet","Slider","Text","useTemplateContext","BOX_STYLE","createStyleSheet","theme","create","container","flex","paddingHorizontal","flexDirection","justifyContent","header","fontSize","fontWeight","bold","textAlign","textValue","color","colors","black","valuesContainer","leftValue","alignItems","rightValue","track","height","borderRadius","radius","button","thumb","width","backgroundColor","
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["React","useState","useEffect","useCallback","View","StyleSheet","Slider","Text","useTemplateContext","BOX_STYLE","createStyleSheet","brandTheme","theme","create","container","flex","paddingHorizontal","flexDirection","justifyContent","header","fontSize","fontWeight","bold","textAlign","textValue","color","colors","black","valuesContainer","leftValue","alignItems","rightValue","track","height","borderRadius","radius","button","thumb","width","borderWidth","backgroundColor","primary","borderColor","QuestionSlider","props","step","style","min","max","unit","value","storeValue","onSlidingComplete","testID","templateContext","styleSheet","setStylesheet","setValue","handleSlidingComplete","_stylesheet"],"sources":["../../../../../src/molecule/questions/mobile/slider/index.native.tsx"],"sourcesContent":["import React, {useState, useEffect, useCallback} from 'react';\nimport {View, StyleSheet, ViewStyle, TextStyle} from 'react-native';\nimport Slider from '@coorpacademy/react-native-slider';\n\nimport {Theme} from '../../../../variables/theme.native';\nimport Text from '../../../../atom/text/index.native';\nimport {useTemplateContext} from '../../../../template/app-review/template-context';\nimport {BOX_STYLE} from '../../../../variables/shadow';\nimport {Brand} from '../../../../variables/brand.native';\n\nexport type OnSlidingCompleteFunction = (value: number) => void;\n\nexport type Props = {\n min: number;\n max: number;\n value?: number;\n unit?: string;\n onSlidingComplete: OnSlidingCompleteFunction;\n style?: ViewStyle;\n step?: number;\n testID?: string;\n};\n\ntype StyleSheetType = {\n container: ViewStyle;\n header: TextStyle;\n textValue: TextStyle;\n valuesContainer: ViewStyle;\n leftValue: ViewStyle;\n rightValue: ViewStyle;\n track: ViewStyle;\n thumb: ViewStyle;\n};\n\nconst createStyleSheet = (brandTheme: Brand, theme: Theme): StyleSheetType =>\n StyleSheet.create({\n container: {\n flex: 1,\n paddingHorizontal: 20,\n flexDirection: 'column',\n justifyContent: 'center'\n },\n header: {\n fontSize: 25,\n fontWeight: theme.fontWeight.bold,\n textAlign: 'center'\n },\n textValue: {\n fontSize: 15,\n color: theme.colors.black,\n fontWeight: theme.fontWeight.bold,\n textAlign: 'center'\n },\n valuesContainer: {\n flexDirection: 'row',\n justifyContent: 'space-around'\n },\n leftValue: {\n flex: 1,\n alignItems: 'flex-start'\n },\n rightValue: {\n flex: 1,\n alignItems: 'flex-end'\n },\n track: {\n height: 10,\n borderRadius: theme.radius.button\n },\n thumb: {\n ...BOX_STYLE,\n width: 30,\n height: 30,\n borderRadius: 30 / 2,\n borderWidth: 5,\n backgroundColor: brandTheme?.colors?.primary,\n borderColor: 'white'\n }\n });\n\nconst QuestionSlider = (props: Props) => {\n const {\n step,\n style,\n min,\n max,\n unit = '',\n value: storeValue = 0,\n onSlidingComplete,\n testID\n } = props;\n const templateContext = useTemplateContext();\n const {brandTheme, theme} = templateContext;\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const [value, setValue] = useState<number>(storeValue);\n\n const handleSlidingComplete = useCallback(() => {\n onSlidingComplete(value);\n }, [onSlidingComplete, value]);\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(brandTheme, theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <View style={[styleSheet.container, style]} testID={testID}>\n <Text style={[styleSheet.header, {color: brandTheme?.colors?.primary}]} testID=\"slider-value\">\n {value}\n </Text>\n <Slider\n step={step || 1}\n value={value}\n onValueChange={setValue}\n maximumValue={max}\n minimumValue={min}\n onSlidingComplete={handleSlidingComplete}\n minimumTrackTintColor={brandTheme?.colors?.primary}\n trackStyle={styleSheet.track}\n thumbStyle={[styleSheet.thumb]}\n testID=\"slider\"\n />\n <View style={styleSheet.valuesContainer} testID=\"slider-values-container\">\n <View style={styleSheet.leftValue}>\n <Text style={styleSheet.textValue} testID=\"slider-min-value\">\n {`${min} ${unit}`}\n </Text>\n </View>\n <View style={styleSheet.rightValue}>\n <Text style={styleSheet.textValue} testID=\"slider-max-value\">\n {`${max} ${unit}`}\n </Text>\n </View>\n </View>\n </View>\n );\n};\n\nexport default QuestionSlider;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,SAAzB,EAAoCC,WAApC,QAAsD,OAAtD;AACA,SAAQC,IAAR,EAAcC,UAAd,QAAqD,cAArD;AACA,OAAOC,MAAP,MAAmB,mCAAnB;AAGA,OAAOC,IAAP,MAAiB,oCAAjB;AACA,SAAQC,kBAAR,QAAiC,kDAAjC;AACA,SAAQC,SAAR,QAAwB,8BAAxB;;AA2BA,MAAMC,gBAAgB,GAAG,CAACC,UAAD,EAAoBC,KAApB,KACvBP,UAAU,CAACQ,MAAX,CAAkB;EAChBC,SAAS,EAAE;IACTC,IAAI,EAAE,CADG;IAETC,iBAAiB,EAAE,EAFV;IAGTC,aAAa,EAAE,QAHN;IAITC,cAAc,EAAE;EAJP,CADK;EAOhBC,MAAM,EAAE;IACNC,QAAQ,EAAE,EADJ;IAENC,UAAU,EAAET,KAAK,CAACS,UAAN,CAAiBC,IAFvB;IAGNC,SAAS,EAAE;EAHL,CAPQ;EAYhBC,SAAS,EAAE;IACTJ,QAAQ,EAAE,EADD;IAETK,KAAK,EAAEb,KAAK,CAACc,MAAN,CAAaC,KAFX;IAGTN,UAAU,EAAET,KAAK,CAACS,UAAN,CAAiBC,IAHpB;IAITC,SAAS,EAAE;EAJF,CAZK;EAkBhBK,eAAe,EAAE;IACfX,aAAa,EAAE,KADA;IAEfC,cAAc,EAAE;EAFD,CAlBD;EAsBhBW,SAAS,EAAE;IACTd,IAAI,EAAE,CADG;IAETe,UAAU,EAAE;EAFH,CAtBK;EA0BhBC,UAAU,EAAE;IACVhB,IAAI,EAAE,CADI;IAEVe,UAAU,EAAE;EAFF,CA1BI;EA8BhBE,KAAK,EAAE;IACLC,MAAM,EAAE,EADH;IAELC,YA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D,gBACE,oBAAC,IAAD;IAAM,KAAK,EAAE,CAACE,UAAU,CAACpC,MAAZ,EAAoB;MAACM,KAAK,EAAEd,UAAU,EAAEe,MAAZ,EAAoBe;IAA5B,CAApB,CAAb;IAAwE,MAAM,EAAC;EAA/E,GACGS,KADH,CADF,eAIE,oBAAC,MAAD;IACE,IAAI,EAAEL,IAAI,IAAI,CADhB;IAEE,KAAK,EAAEK,KAFT;IAGE,aAAa,EAAEO,QAHjB;IAIE,YAAY,EAAET,GAJhB;IAKE,YAAY,EAAED,GALhB;IAME,iBAAiB,EAAEW,qBANrB;IAOE,qBAAqB,EAAE/C,UAAU,EAAEe,MAAZ,EAAoBe,OAP7C;IAQE,UAAU,EAAEc,UAAU,CAACvB,KARzB;IASE,UAAU,EAAE,CAACuB,UAAU,CAAClB,KAAZ,CATd;IAUE,MAAM,EAAC;EAVT,EAJF,eAgBE,oBAAC,IAAD;IAAM,KAAK,EAAEkB,UAAU,CAAC3B,eAAxB;IAAyC,MAAM,EAAC;EAAhD,gBACE,oBAAC,IAAD;IAAM,KAAK,EAAE2B,UAAU,CAAC1B;EAAxB,gBACE,oBAAC,IAAD;IAAM,KAAK,EAAE0B,UAAU,CAAC/B,SAAxB;IAAmC,MAAM,EAAC;EAA1C,GACI,GAAEuB,GAAI,IAAGE,IAAK,EADlB,CADF,CADF,eAME,oBAAC,IAAD;IAAM,KAAK,EAAEM,UAAU,CAACxB;EAAxB,gBACE,oBAAC,IAAD;IAAM,KAAK,EAAEwB,UAAU,CAAC/B,SAAxB;IAAmC,MAAM,EAAC;EAA1C,GACI,GAAEwB,GAAI,IAAGC,IAAK,EADlB,CADF,CANF,CAhBF,CADF;AA+BD,CA5DD;;AA8DA,eAAeN,cAAf"}
|
|
@@ -15,6 +15,7 @@ declare namespace Template {
|
|
|
15
15
|
validOption: PropTypes.Requireable<boolean>;
|
|
16
16
|
}> | null | undefined)[]>;
|
|
17
17
|
theme: PropTypes.Requireable<string>;
|
|
18
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
18
19
|
}, never>> & Partial<PropTypes.InferPropsInner<Pick<{
|
|
19
20
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
21
|
options: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
@@ -24,7 +25,8 @@ declare namespace Template {
|
|
|
24
25
|
validOption: PropTypes.Requireable<boolean>;
|
|
25
26
|
}> | null | undefined)[]>;
|
|
26
27
|
theme: PropTypes.Requireable<string>;
|
|
27
|
-
|
|
28
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
29
|
+
}, "aria-label" | "onChange" | "theme" | "options">>>) | null | undefined)[]>;
|
|
28
30
|
}
|
|
29
31
|
}
|
|
30
32
|
import PropTypes from "prop-types";
|
|
@@ -23,7 +23,7 @@ declare namespace ScopeContent {
|
|
|
23
23
|
[x: string]: any;
|
|
24
24
|
}>;
|
|
25
25
|
}>>;
|
|
26
|
-
const translate: PropTypes.
|
|
26
|
+
const translate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
27
|
}
|
|
28
28
|
namespace propTypes {
|
|
29
29
|
const content: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -2,7 +2,7 @@ export default SetupSection;
|
|
|
2
2
|
declare function SetupSection(props: any, context: any): JSX.Element;
|
|
3
3
|
declare namespace SetupSection {
|
|
4
4
|
namespace contextTypes {
|
|
5
|
-
const translate: PropTypes.
|
|
5
|
+
const translate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
6
6
|
const skin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
7
7
|
common: PropTypes.Requireable<{
|
|
8
8
|
[x: string]: any;
|
|
@@ -39,7 +39,6 @@ declare namespace SetupSlide {
|
|
|
39
39
|
}> | PropTypes.InferProps<{
|
|
40
40
|
type: PropTypes.Requireable<string>;
|
|
41
41
|
title: PropTypes.Requireable<string>;
|
|
42
|
-
moreAriaLabel: PropTypes.Requireable<string>;
|
|
43
42
|
name: PropTypes.Requireable<string>;
|
|
44
43
|
className: PropTypes.Requireable<string>;
|
|
45
44
|
borderClassName: PropTypes.Requireable<string>;
|
|
@@ -57,6 +56,7 @@ declare namespace SetupSlide {
|
|
|
57
56
|
}> | null | undefined)[]>;
|
|
58
57
|
modified: PropTypes.Requireable<boolean>;
|
|
59
58
|
error: PropTypes.Requireable<boolean>;
|
|
59
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
60
60
|
}> | PropTypes.InferProps<{
|
|
61
61
|
type: PropTypes.Requireable<string>;
|
|
62
62
|
title: PropTypes.Validator<string>;
|
|
@@ -52,7 +52,6 @@ declare namespace SetupSlider {
|
|
|
52
52
|
}> | PropTypes.InferProps<{
|
|
53
53
|
type: PropTypes.Requireable<string>;
|
|
54
54
|
title: PropTypes.Requireable<string>;
|
|
55
|
-
moreAriaLabel: PropTypes.Requireable<string>;
|
|
56
55
|
name: PropTypes.Requireable<string>;
|
|
57
56
|
className: PropTypes.Requireable<string>;
|
|
58
57
|
borderClassName: PropTypes.Requireable<string>;
|
|
@@ -70,6 +69,7 @@ declare namespace SetupSlider {
|
|
|
70
69
|
}> | null | undefined)[]>;
|
|
71
70
|
modified: PropTypes.Requireable<boolean>;
|
|
72
71
|
error: PropTypes.Requireable<boolean>;
|
|
72
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
73
73
|
}> | PropTypes.InferProps<{
|
|
74
74
|
type: PropTypes.Requireable<string>;
|
|
75
75
|
title: PropTypes.Validator<string>;
|
|
@@ -2,7 +2,7 @@ export default SubscriptionFreemiumDetails;
|
|
|
2
2
|
declare function SubscriptionFreemiumDetails(props: any, context: any): JSX.Element;
|
|
3
3
|
declare namespace SubscriptionFreemiumDetails {
|
|
4
4
|
namespace contextTypes {
|
|
5
|
-
const translate: PropTypes.
|
|
5
|
+
const translate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
6
6
|
}
|
|
7
7
|
namespace propTypes {
|
|
8
8
|
const onSubscriptionFreemiumButtonClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -2,7 +2,7 @@ export default SubscriptionPremiumDetails;
|
|
|
2
2
|
declare function SubscriptionPremiumDetails(props: any, context: any): JSX.Element;
|
|
3
3
|
declare namespace SubscriptionPremiumDetails {
|
|
4
4
|
namespace contextTypes {
|
|
5
|
-
const translate: PropTypes.
|
|
5
|
+
const translate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
6
6
|
}
|
|
7
7
|
namespace propTypes {
|
|
8
8
|
const checkImage: PropTypes.Requireable<string>;
|
|
@@ -23,7 +23,7 @@ declare namespace Table {
|
|
|
23
23
|
[x: string]: any;
|
|
24
24
|
}>;
|
|
25
25
|
}>>;
|
|
26
|
-
const translate: PropTypes.
|
|
26
|
+
const translate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
27
|
}
|
|
28
28
|
namespace propTypes {
|
|
29
29
|
const editable: PropTypes.Requireable<boolean>;
|
|
@@ -2,7 +2,7 @@ export default Unsubscribe;
|
|
|
2
2
|
declare function Unsubscribe(props: any, context: any): JSX.Element;
|
|
3
3
|
declare namespace Unsubscribe {
|
|
4
4
|
namespace contextTypes {
|
|
5
|
-
const translate: PropTypes.
|
|
5
|
+
const translate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
6
6
|
}
|
|
7
7
|
namespace propTypes {
|
|
8
8
|
const moocUrl: PropTypes.Requireable<string>;
|
|
@@ -23,7 +23,7 @@ declare namespace BrandAnalytics {
|
|
|
23
23
|
[x: string]: any;
|
|
24
24
|
}>;
|
|
25
25
|
}>>;
|
|
26
|
-
const translate: PropTypes.
|
|
26
|
+
const translate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
27
|
}
|
|
28
28
|
namespace propTypes {
|
|
29
29
|
const dashboards: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
@@ -111,7 +111,6 @@ declare namespace BrandForm {
|
|
|
111
111
|
type: PropTypes.Requireable<string>;
|
|
112
112
|
size: PropTypes.Requireable<string>;
|
|
113
113
|
title: PropTypes.Requireable<string>;
|
|
114
|
-
moreAriaLabel: PropTypes.Requireable<string>;
|
|
115
114
|
name: PropTypes.Requireable<string>;
|
|
116
115
|
className: PropTypes.Requireable<string>;
|
|
117
116
|
borderClassName: PropTypes.Requireable<string>;
|
|
@@ -129,6 +128,7 @@ declare namespace BrandForm {
|
|
|
129
128
|
}> | null | undefined)[]>;
|
|
130
129
|
modified: PropTypes.Requireable<boolean>;
|
|
131
130
|
error: PropTypes.Requireable<boolean>;
|
|
131
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
132
132
|
}> | PropTypes.InferProps<{
|
|
133
133
|
type: PropTypes.Requireable<string>;
|
|
134
134
|
title: PropTypes.Validator<string>;
|
|
@@ -215,7 +215,6 @@ declare namespace BrandForm {
|
|
|
215
215
|
}> | PropTypes.InferProps<{
|
|
216
216
|
type: PropTypes.Requireable<string>;
|
|
217
217
|
title: PropTypes.Requireable<string>;
|
|
218
|
-
moreAriaLabel: PropTypes.Requireable<string>;
|
|
219
218
|
name: PropTypes.Requireable<string>;
|
|
220
219
|
className: PropTypes.Requireable<string>;
|
|
221
220
|
borderClassName: PropTypes.Requireable<string>;
|
|
@@ -233,6 +232,7 @@ declare namespace BrandForm {
|
|
|
233
232
|
}> | null | undefined)[]>;
|
|
234
233
|
modified: PropTypes.Requireable<boolean>;
|
|
235
234
|
error: PropTypes.Requireable<boolean>;
|
|
235
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
236
236
|
}> | PropTypes.InferProps<{
|
|
237
237
|
type: PropTypes.Requireable<string>;
|
|
238
238
|
title: PropTypes.Validator<string>;
|
|
@@ -2,7 +2,7 @@ export default Cart;
|
|
|
2
2
|
declare function Cart(props: any, context: any): JSX.Element;
|
|
3
3
|
declare namespace Cart {
|
|
4
4
|
namespace contextTypes {
|
|
5
|
-
const translate: PropTypes.
|
|
5
|
+
const translate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
6
6
|
}
|
|
7
7
|
namespace propTypes {
|
|
8
8
|
const productCardProps: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -108,7 +108,7 @@ declare class MoocHeader extends React.Component<any, any, any> {
|
|
|
108
108
|
onMenuClose: PropTypes.Requireable<(...args: any[]) => any>;
|
|
109
109
|
};
|
|
110
110
|
static contextTypes: {
|
|
111
|
-
translate: PropTypes.
|
|
111
|
+
translate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
112
112
|
skin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
113
113
|
common: PropTypes.Requireable<{
|
|
114
114
|
[x: string]: any;
|
|
@@ -420,7 +420,7 @@ class MoocHeader extends React.Component {
|
|
|
420
420
|
}, /*#__PURE__*/React.createElement("span", {
|
|
421
421
|
className: style.label
|
|
422
422
|
}, title), /*#__PURE__*/React.createElement(Select, _extends({}, selectProps, {
|
|
423
|
-
|
|
423
|
+
"aria-label": ariaLabel || title
|
|
424
424
|
})));
|
|
425
425
|
break;
|
|
426
426
|
}
|