@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
|
@@ -17,44 +17,30 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
17
|
|
|
18
18
|
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; }
|
|
19
19
|
|
|
20
|
-
const
|
|
20
|
+
const createSelectionStyle = theme => _reactNative.StyleSheet.create({
|
|
21
21
|
choice: {
|
|
22
22
|
margin: theme.spacing.micro
|
|
23
23
|
},
|
|
24
|
-
|
|
24
|
+
selectionArea: {
|
|
25
25
|
flexWrap: 'wrap',
|
|
26
|
-
flexDirection: 'row'
|
|
27
|
-
borderStyle: 'dashed',
|
|
28
|
-
borderWidth: 2,
|
|
29
|
-
padding: theme.spacing.micro,
|
|
30
|
-
borderColor: theme.colors.gray.light,
|
|
31
|
-
backgroundColor: theme.colors.gray.extra,
|
|
32
|
-
borderRadius: theme.radius.common,
|
|
33
|
-
marginBottom: theme.spacing.tiny
|
|
34
|
-
},
|
|
35
|
-
emptyContent: {
|
|
36
|
-
justifyContent: 'center',
|
|
37
|
-
alignContent: 'center',
|
|
38
|
-
alignItems: 'center',
|
|
39
|
-
height: 60
|
|
26
|
+
flexDirection: 'row'
|
|
40
27
|
},
|
|
41
28
|
text: {
|
|
42
29
|
color: theme.colors.gray.medium
|
|
43
30
|
}
|
|
44
31
|
});
|
|
45
32
|
|
|
46
|
-
const
|
|
33
|
+
const Selection = props => {
|
|
47
34
|
const templateContext = (0, _templateContext.useTemplateContext)();
|
|
48
35
|
const {
|
|
49
|
-
theme
|
|
50
|
-
translations
|
|
36
|
+
theme
|
|
51
37
|
} = templateContext;
|
|
52
38
|
const {
|
|
53
39
|
onPress
|
|
54
40
|
} = props;
|
|
55
41
|
const [styleSheet, setStylesheet] = (0, _react.useState)(null);
|
|
56
42
|
(0, _react.useEffect)(() => {
|
|
57
|
-
const _stylesheet =
|
|
43
|
+
const _stylesheet = createSelectionStyle(theme);
|
|
58
44
|
|
|
59
45
|
setStylesheet(_stylesheet);
|
|
60
46
|
}, [theme]);
|
|
@@ -75,21 +61,30 @@ const DropZone = props => {
|
|
|
75
61
|
onPress: onPress(item),
|
|
76
62
|
questionType: "qcmDrag"
|
|
77
63
|
}, item.label));
|
|
78
|
-
const hasNoSelectedChoices = mappedSortedChoices.length === 0;
|
|
79
64
|
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
80
|
-
style:
|
|
81
|
-
},
|
|
82
|
-
style: styleSheet.text
|
|
83
|
-
}, translations.selectSomethingBelow) : null, !hasNoSelectedChoices && mappedSortedChoices);
|
|
65
|
+
style: styleSheet.selectionArea
|
|
66
|
+
}, mappedSortedChoices);
|
|
84
67
|
};
|
|
85
68
|
|
|
86
69
|
const createStyleSheet = theme => _reactNative.StyleSheet.create({
|
|
70
|
+
container: {
|
|
71
|
+
flex: 1
|
|
72
|
+
},
|
|
87
73
|
pickableChoices: {
|
|
88
74
|
flexDirection: 'row',
|
|
89
75
|
flexWrap: 'wrap'
|
|
90
76
|
},
|
|
91
77
|
choice: {
|
|
92
78
|
margin: theme.spacing.micro
|
|
79
|
+
},
|
|
80
|
+
line: {
|
|
81
|
+
borderWidth: 1,
|
|
82
|
+
borderColor: '#E1E1E3',
|
|
83
|
+
borderRadius: 17,
|
|
84
|
+
marginHorizontal: 4,
|
|
85
|
+
marginBottom: 24,
|
|
86
|
+
marginTop: 16,
|
|
87
|
+
height: 2
|
|
93
88
|
}
|
|
94
89
|
});
|
|
95
90
|
|
|
@@ -124,10 +119,13 @@ const QuestionDraggable = props => {
|
|
|
124
119
|
questionType: "qcmDrag"
|
|
125
120
|
}, item.label));
|
|
126
121
|
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
127
|
-
testID: testID
|
|
128
|
-
|
|
122
|
+
testID: testID,
|
|
123
|
+
style: styleSheet.container
|
|
124
|
+
}, /*#__PURE__*/_react.default.createElement(Selection, {
|
|
129
125
|
choices: selectedChoices,
|
|
130
126
|
onPress: onPress
|
|
127
|
+
}), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
128
|
+
style: styleSheet.line
|
|
131
129
|
}), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
132
130
|
style: styleSheet.pickableChoices
|
|
133
131
|
}, pickableChoices));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["createSelectionStyle","theme","StyleSheet","create","choice","margin","spacing","micro","selectionArea","flexWrap","flexDirection","text","color","colors","gray","medium","Selection","props","templateContext","useTemplateContext","onPress","styleSheet","setStylesheet","useState","useEffect","_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 QuestionDragg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AI,CAACA,IAAI,CAACmB,QADA,EAErBpB,GAFqB,CAEhBC,IAAD,iBACH,6BAAC,cAAD;IACE,KAAK,EAAER,UAAU,CAACjB,MADpB;IAEE,GAAG,EAAEyB,IAAI,CAACC,GAFZ;IAGE,QAAQ,MAHV;IAIE,MAAM,EAAG,UAASD,IAAI,CAACC,GAAI,aAJ7B;IAKE,OAAO,EAAEV,OAAO,CAACS,IAAD,CALlB;IAME,YAAY,EAAC;EANf,GAQGA,IAAI,CAACE,KARR,CAHoB,CAAxB;EAeA,oBACE,6BAAC,iBAAD;IAAM,MAAM,EAAEc,MAAd;IAAsB,KAAK,EAAExB,UAAU,CAACY;EAAxC,gBACE,6BAAC,SAAD;IAAW,OAAO,EAAEa,eAApB;IAAqC,OAAO,EAAE1B;EAA9C,EADF,eAEE,6BAAC,iBAAD;IAAM,KAAK,EAAEC,UAAU,CAACe;EAAxB,EAFF,eAGE,6BAAC,iBAAD;IAAM,KAAK,EAAEf,UAAU,CAACc;EAAxB,GAA0CA,eAA1C,CAHF,CADF;AAOD,CAxCD;;eA0CeS,iB"}
|
|
@@ -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"}
|
|
@@ -23,7 +23,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
23
23
|
|
|
24
24
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
25
|
|
|
26
|
-
const createStyleSheet = theme => _reactNative.StyleSheet.create({
|
|
26
|
+
const createStyleSheet = (brandTheme, theme) => _reactNative.StyleSheet.create({
|
|
27
27
|
container: {
|
|
28
28
|
flex: 1,
|
|
29
29
|
paddingHorizontal: 20,
|
|
@@ -61,8 +61,9 @@ const createStyleSheet = theme => _reactNative.StyleSheet.create({
|
|
|
61
61
|
width: 30,
|
|
62
62
|
height: 30,
|
|
63
63
|
borderRadius: 30 / 2,
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
borderWidth: 5,
|
|
65
|
+
backgroundColor: brandTheme?.colors?.primary,
|
|
66
|
+
borderColor: 'white'
|
|
66
67
|
})
|
|
67
68
|
});
|
|
68
69
|
|
|
@@ -88,7 +89,7 @@ const QuestionSlider = props => {
|
|
|
88
89
|
onSlidingComplete(value);
|
|
89
90
|
}, [onSlidingComplete, value]);
|
|
90
91
|
(0, _react.useEffect)(() => {
|
|
91
|
-
const _stylesheet = createStyleSheet(theme);
|
|
92
|
+
const _stylesheet = createStyleSheet(brandTheme, theme);
|
|
92
93
|
|
|
93
94
|
setStylesheet(_stylesheet);
|
|
94
95
|
}, [theme]);
|
|
@@ -114,9 +115,7 @@ const QuestionSlider = props => {
|
|
|
114
115
|
onSlidingComplete: handleSlidingComplete,
|
|
115
116
|
minimumTrackTintColor: brandTheme?.colors?.primary,
|
|
116
117
|
trackStyle: styleSheet.track,
|
|
117
|
-
thumbStyle: [styleSheet.thumb,
|
|
118
|
-
borderColor: brandTheme?.colors?.primary
|
|
119
|
-
}],
|
|
118
|
+
thumbStyle: [styleSheet.thumb],
|
|
120
119
|
testID: "slider"
|
|
121
120
|
}), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
122
121
|
style: styleSheet.valuesContainer,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["createStyleSheet","theme","StyleSheet","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","BOX_STYLE","width","backgroundColor","
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["createStyleSheet","brandTheme","theme","StyleSheet","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","BOX_STYLE","width","borderWidth","backgroundColor","primary","borderColor","QuestionSlider","props","step","style","min","max","unit","value","storeValue","onSlidingComplete","testID","templateContext","useTemplateContext","styleSheet","setStylesheet","useState","setValue","handleSlidingComplete","useCallback","useEffect","_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;;AACA;;AACA;;AAGA;;AACA;;AACA;;;;;;;;;;AA2BA,MAAMA,gBAAgB,GAAG,CAACC,UAAD,EAAoBC,KAApB,KACvBC,uBAAA,CAAWC,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,EAAEV,KAAK,CAACU,UAAN,CAAiBC,IAFvB;IAGNC,SAAS,EAAE;EAHL,CAPQ;EAYhBC,SAAS,EAAE;IACTJ,QAAQ,EAAE,EADD;IAETK,KAAK,EAAEd,KAAK,CAACe,MAAN,CAAaC,KAFX;IAGTN,UAAU,EAAEV,KAAK,CAACU,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;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"}
|
|
@@ -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;
|
|
@@ -433,7 +433,7 @@ class MoocHeader extends _react.default.Component {
|
|
|
433
433
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
434
434
|
className: _style.default.label
|
|
435
435
|
}, title), /*#__PURE__*/_react.default.createElement(_select.default, _extends({}, selectProps, {
|
|
436
|
-
|
|
436
|
+
"aria-label": ariaLabel || title
|
|
437
437
|
})));
|
|
438
438
|
break;
|
|
439
439
|
}
|