@coorpacademy/components 11.4.5-alpha.37 → 11.4.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/review-presentation/index.d.ts.map +1 -1
- package/es/atom/review-presentation/index.js +75 -18
- package/es/atom/review-presentation/index.js.map +1 -1
- package/es/atom/review-presentation/prop-types.d.ts +4 -0
- package/es/atom/review-presentation/prop-types.d.ts.map +1 -1
- package/es/atom/review-presentation/prop-types.js +2 -1
- package/es/atom/review-presentation/prop-types.js.map +1 -1
- package/es/atom/review-presentation/style.css +5 -14
- package/es/molecule/answer/index.d.ts.map +1 -1
- package/es/molecule/answer/index.js +6 -16
- package/es/molecule/answer/index.js.map +1 -1
- package/es/molecule/cm-popin/index.native.d.ts.map +1 -1
- package/es/molecule/cm-popin/index.native.js +14 -15
- package/es/molecule/cm-popin/index.native.js.map +1 -1
- package/es/molecule/filters/filters-wrapper.d.ts +0 -1
- package/es/molecule/filters/filters-wrapper.d.ts.map +1 -1
- package/es/molecule/filters/filters-wrapper.js +5 -9
- package/es/molecule/filters/filters-wrapper.js.map +1 -1
- package/es/molecule/filters/index.d.ts +0 -1
- package/es/molecule/filters/index.d.ts.map +1 -1
- package/es/molecule/filters/index.js +3 -6
- package/es/molecule/filters/index.js.map +1 -1
- package/es/molecule/questions/drop-down/index.d.ts +0 -1
- package/es/molecule/questions/drop-down/index.d.ts.map +1 -1
- package/es/molecule/questions/drop-down/index.js +5 -9
- package/es/molecule/questions/drop-down/index.js.map +1 -1
- package/es/molecule/questions/qcm/index.d.ts +0 -1
- package/es/molecule/questions/qcm/index.d.ts.map +1 -1
- package/es/molecule/questions/qcm/index.js +5 -9
- package/es/molecule/questions/qcm/index.js.map +1 -1
- package/es/molecule/questions/qcm-drag/index.d.ts +1 -3
- package/es/molecule/questions/qcm-drag/index.d.ts.map +1 -1
- package/es/molecule/questions/qcm-drag/index.js +5 -9
- package/es/molecule/questions/qcm-drag/index.js.map +1 -1
- package/es/molecule/questions/qcm-graphic/index.d.ts +0 -1
- package/es/molecule/questions/qcm-graphic/index.d.ts.map +1 -1
- package/es/molecule/questions/qcm-graphic/index.js +5 -9
- package/es/molecule/questions/qcm-graphic/index.js.map +1 -1
- package/es/molecule/questions/question-range/index.d.ts +0 -1
- package/es/molecule/questions/question-range/index.d.ts.map +1 -1
- package/es/molecule/questions/question-range/index.js +6 -10
- package/es/molecule/questions/question-range/index.js.map +1 -1
- package/es/molecule/questions/template/index.d.ts +2 -6
- package/es/molecule/questions/template/index.d.ts.map +1 -1
- package/es/molecule/questions/template/index.js +5 -9
- package/es/molecule/questions/template/index.js.map +1 -1
- package/es/organism/user-preferences/index.d.ts +0 -1
- package/es/organism/user-preferences/index.d.ts.map +1 -1
- package/es/organism/user-preferences/index.js +5 -9
- package/es/organism/user-preferences/index.js.map +1 -1
- package/es/template/app-review/index.native.js +1 -1
- package/es/template/app-review/index.native.js.map +1 -1
- package/es/template/back-office/brand-update/style.css +2 -2
- package/es/template/common/search-page/index.d.ts +0 -2
- package/es/template/common/search-page/index.d.ts.map +1 -1
- package/es/template/common/search-page/index.js +3 -6
- package/es/template/common/search-page/index.js.map +1 -1
- package/es/template/review-dashboard-skills/index.d.ts +4 -0
- package/lib/atom/review-presentation/index.d.ts.map +1 -1
- package/lib/atom/review-presentation/index.js +79 -18
- package/lib/atom/review-presentation/index.js.map +1 -1
- package/lib/atom/review-presentation/prop-types.d.ts +4 -0
- package/lib/atom/review-presentation/prop-types.d.ts.map +1 -1
- package/lib/atom/review-presentation/prop-types.js +2 -1
- package/lib/atom/review-presentation/prop-types.js.map +1 -1
- package/lib/atom/review-presentation/style.css +5 -14
- package/lib/molecule/answer/index.d.ts.map +1 -1
- package/lib/molecule/answer/index.js +6 -16
- package/lib/molecule/answer/index.js.map +1 -1
- package/lib/molecule/cm-popin/index.native.d.ts.map +1 -1
- package/lib/molecule/cm-popin/index.native.js +14 -15
- package/lib/molecule/cm-popin/index.native.js.map +1 -1
- package/lib/molecule/filters/filters-wrapper.d.ts +0 -1
- package/lib/molecule/filters/filters-wrapper.d.ts.map +1 -1
- package/lib/molecule/filters/filters-wrapper.js +5 -9
- package/lib/molecule/filters/filters-wrapper.js.map +1 -1
- package/lib/molecule/filters/index.d.ts +0 -1
- package/lib/molecule/filters/index.d.ts.map +1 -1
- package/lib/molecule/filters/index.js +3 -6
- package/lib/molecule/filters/index.js.map +1 -1
- package/lib/molecule/questions/drop-down/index.d.ts +0 -1
- package/lib/molecule/questions/drop-down/index.d.ts.map +1 -1
- package/lib/molecule/questions/drop-down/index.js +5 -9
- package/lib/molecule/questions/drop-down/index.js.map +1 -1
- package/lib/molecule/questions/qcm/index.d.ts +0 -1
- package/lib/molecule/questions/qcm/index.d.ts.map +1 -1
- package/lib/molecule/questions/qcm/index.js +5 -9
- package/lib/molecule/questions/qcm/index.js.map +1 -1
- package/lib/molecule/questions/qcm-drag/index.d.ts +1 -3
- package/lib/molecule/questions/qcm-drag/index.d.ts.map +1 -1
- package/lib/molecule/questions/qcm-drag/index.js +5 -9
- package/lib/molecule/questions/qcm-drag/index.js.map +1 -1
- package/lib/molecule/questions/qcm-graphic/index.d.ts +0 -1
- package/lib/molecule/questions/qcm-graphic/index.d.ts.map +1 -1
- package/lib/molecule/questions/qcm-graphic/index.js +5 -9
- package/lib/molecule/questions/qcm-graphic/index.js.map +1 -1
- package/lib/molecule/questions/question-range/index.d.ts +0 -1
- package/lib/molecule/questions/question-range/index.d.ts.map +1 -1
- package/lib/molecule/questions/question-range/index.js +6 -10
- package/lib/molecule/questions/question-range/index.js.map +1 -1
- package/lib/molecule/questions/template/index.d.ts +2 -6
- package/lib/molecule/questions/template/index.d.ts.map +1 -1
- package/lib/molecule/questions/template/index.js +5 -9
- package/lib/molecule/questions/template/index.js.map +1 -1
- package/lib/organism/user-preferences/index.d.ts +0 -1
- package/lib/organism/user-preferences/index.d.ts.map +1 -1
- package/lib/organism/user-preferences/index.js +5 -9
- package/lib/organism/user-preferences/index.js.map +1 -1
- package/lib/template/app-review/index.native.js +1 -1
- package/lib/template/app-review/index.native.js.map +1 -1
- package/lib/template/back-office/brand-update/style.css +2 -2
- package/lib/template/common/search-page/index.d.ts +0 -2
- package/lib/template/common/search-page/index.d.ts.map +1 -1
- package/lib/template/common/search-page/index.js +3 -6
- package/lib/template/common/search-page/index.js.map +1 -1
- package/lib/template/review-dashboard-skills/index.d.ts +4 -0
- package/locales/en/global.json +0 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/review-presentation/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/review-presentation/index.js"],"names":[],"mappings":";AAyGA,6DA+BC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
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); }
|
|
2
|
+
|
|
3
|
+
import React, { useState, useCallback } from 'react';
|
|
2
4
|
import PropTypes from 'prop-types';
|
|
3
5
|
import getOr from 'lodash/fp/getOr';
|
|
4
6
|
import map from 'lodash/fp/map';
|
|
@@ -12,7 +14,9 @@ const ICONS = {
|
|
|
12
14
|
allright: CheckIcon
|
|
13
15
|
};
|
|
14
16
|
|
|
15
|
-
const
|
|
17
|
+
const ReviewIcon = ({
|
|
18
|
+
icon
|
|
19
|
+
}) => {
|
|
16
20
|
const Icon = getOr(null, icon, ICONS);
|
|
17
21
|
/* istanbul ignore next */
|
|
18
22
|
|
|
@@ -29,22 +33,67 @@ const getIcon = icon => {
|
|
|
29
33
|
|
|
30
34
|
const ToolTip = ({
|
|
31
35
|
tooltipText,
|
|
32
|
-
'aria-label': moreDetailsAriaLabel
|
|
36
|
+
'aria-label': moreDetailsAriaLabel,
|
|
37
|
+
'data-testid': dataTestId,
|
|
38
|
+
closeToolTipInformationTextAriaLabel
|
|
33
39
|
}) => {
|
|
40
|
+
const [toolTipIsVisible, setToolTipIsVisible] = useState(false);
|
|
41
|
+
const handleKeyPress = useCallback(event => {
|
|
42
|
+
if (event.key === 'Enter') {
|
|
43
|
+
setToolTipIsVisible(!toolTipIsVisible);
|
|
44
|
+
} else if (event.key === 'Tab' || event.key === 'Escape') {
|
|
45
|
+
setToolTipIsVisible(false);
|
|
46
|
+
}
|
|
47
|
+
}, [setToolTipIsVisible, toolTipIsVisible]);
|
|
48
|
+
const handleMouseOver = useCallback(() => {
|
|
49
|
+
setToolTipIsVisible(true);
|
|
50
|
+
}, [setToolTipIsVisible]);
|
|
51
|
+
const handleMouseLeave = useCallback(() => {
|
|
52
|
+
setToolTipIsVisible(false);
|
|
53
|
+
}, [setToolTipIsVisible]);
|
|
34
54
|
return /*#__PURE__*/React.createElement("div", {
|
|
35
|
-
className: style.tooltipContainer
|
|
36
|
-
|
|
37
|
-
|
|
55
|
+
className: style.tooltipContainer,
|
|
56
|
+
onMouseLeave: handleMouseLeave,
|
|
57
|
+
onMouseOver: handleMouseOver
|
|
58
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
59
|
+
type: "button",
|
|
60
|
+
className: style.tooltipIconContainer,
|
|
61
|
+
"data-testid": dataTestId,
|
|
62
|
+
onKeyDown: handleKeyPress,
|
|
63
|
+
tabIndex: 0
|
|
38
64
|
}, /*#__PURE__*/React.createElement(InformationIcon, {
|
|
39
65
|
className: style.informationIcon,
|
|
40
66
|
width: 12,
|
|
41
67
|
height: 12,
|
|
42
68
|
"aria-label": moreDetailsAriaLabel
|
|
43
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
44
|
-
className: style.toolTip
|
|
69
|
+
})), toolTipIsVisible ? /*#__PURE__*/React.createElement("div", {
|
|
70
|
+
className: style.toolTip,
|
|
71
|
+
"data-testid": "review-presentation-tooltip",
|
|
72
|
+
"aria-label": closeToolTipInformationTextAriaLabel
|
|
45
73
|
}, /*#__PURE__*/React.createElement("p", {
|
|
46
74
|
className: style.tooltipText
|
|
47
|
-
}, tooltipText)));
|
|
75
|
+
}, tooltipText)) : null);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const ReviewListItemWrapper = ({
|
|
79
|
+
iconKey,
|
|
80
|
+
label
|
|
81
|
+
}) => {
|
|
82
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
83
|
+
className: style.reviewListItemWrapper,
|
|
84
|
+
"data-tip": true,
|
|
85
|
+
"data-for": "reviewListItem",
|
|
86
|
+
tabIndex: 0
|
|
87
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
88
|
+
className: style.reviewListText
|
|
89
|
+
}, /*#__PURE__*/React.createElement(ReviewIcon, {
|
|
90
|
+
icon: iconKey
|
|
91
|
+
}), " ", label.text), /*#__PURE__*/React.createElement(ToolTip, {
|
|
92
|
+
tooltipText: label.tooltipText,
|
|
93
|
+
"aria-label": label.moreDetailsAriaLabel,
|
|
94
|
+
closeToolTipInformationTextAriaLabel: label.closeToolTipInformationTextAriaLabel,
|
|
95
|
+
"data-testid": `review-list-item-tooltip-button-${iconKey}`
|
|
96
|
+
}));
|
|
48
97
|
};
|
|
49
98
|
|
|
50
99
|
const ReviewPresentation = props => {
|
|
@@ -77,23 +126,31 @@ const ReviewPresentation = props => {
|
|
|
77
126
|
return /*#__PURE__*/React.createElement("li", {
|
|
78
127
|
key: `step-${key}`,
|
|
79
128
|
className: style.reviewList
|
|
80
|
-
}, /*#__PURE__*/React.createElement(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"data-for": "reviewListItem"
|
|
84
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
85
|
-
className: style.reviewListText
|
|
86
|
-
}, getIcon(key), " ", label.text), /*#__PURE__*/React.createElement(ToolTip, {
|
|
129
|
+
}, /*#__PURE__*/React.createElement(ReviewListItemWrapper, {
|
|
130
|
+
iconKey: key,
|
|
131
|
+
label: label,
|
|
87
132
|
tooltipText: label.tooltipText,
|
|
88
133
|
"aria-label": label.moreDetailsAriaLabel
|
|
89
|
-
}))
|
|
134
|
+
}));
|
|
90
135
|
}, labelsList)));
|
|
91
136
|
};
|
|
92
137
|
|
|
93
138
|
ToolTip.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
94
139
|
tooltipText: PropTypes.string,
|
|
95
|
-
'aria-label': PropTypes.string
|
|
140
|
+
'aria-label': PropTypes.string,
|
|
141
|
+
'data-testid': PropTypes.string,
|
|
142
|
+
closeToolTipInformationTextAriaLabel: PropTypes.string
|
|
143
|
+
} : {};
|
|
144
|
+
ReviewIcon.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
145
|
+
icon: PropTypes.string
|
|
96
146
|
} : {};
|
|
147
|
+
ReviewListItemWrapper.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, ToolTip.propTypes, {
|
|
148
|
+
iconKey: PropTypes.string,
|
|
149
|
+
label: PropTypes.shape({
|
|
150
|
+
tooltipText: PropTypes.string,
|
|
151
|
+
moreDetailsAriaLabel: PropTypes.string
|
|
152
|
+
})
|
|
153
|
+
}) : {};
|
|
97
154
|
ReviewPresentation.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
|
|
98
155
|
export default ReviewPresentation;
|
|
99
156
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","getOr","map","NovaSolidStatusCheckCircle2","CheckIcon","NovaSolidVoteRewardsVoteHeart","HeartIcon","NovaCompositionCoorpacademyInformationIcon","InformationIcon","NovaSolidInterfaceFeedbackInterfaceQuestionMark","QuestionIcon","NovaLineSelectionCursorsCursorArrowTarget","TargetIcon","style","propTypes","ICONS","skills","questions","lifes","allright","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useState","useCallback","PropTypes","getOr","map","NovaSolidStatusCheckCircle2","CheckIcon","NovaSolidVoteRewardsVoteHeart","HeartIcon","NovaCompositionCoorpacademyInformationIcon","InformationIcon","NovaSolidInterfaceFeedbackInterfaceQuestionMark","QuestionIcon","NovaLineSelectionCursorsCursorArrowTarget","TargetIcon","style","propTypes","ICONS","skills","questions","lifes","allright","ReviewIcon","icon","Icon","labelIcon","ToolTip","tooltipText","moreDetailsAriaLabel","dataTestId","closeToolTipInformationTextAriaLabel","toolTipIsVisible","setToolTipIsVisible","handleKeyPress","event","key","handleMouseOver","handleMouseLeave","tooltipContainer","tooltipIconContainer","informationIcon","toolTip","ReviewListItemWrapper","iconKey","label","reviewListItemWrapper","reviewListText","text","ReviewPresentation","props","ariaLabel","reviewTitle","reviewText","labelsList","reviewWrapper","__html","reviewListWrapper","convert","cap","reviewList","string","shape"],"sources":["../../../src/atom/review-presentation/index.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport getOr from 'lodash/fp/getOr';\nimport map from 'lodash/fp/map';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidVoteRewardsVoteHeart as HeartIcon,\n NovaCompositionCoorpacademyInformationIcon as InformationIcon,\n NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionIcon,\n NovaLineSelectionCursorsCursorArrowTarget as TargetIcon\n} from '@coorpacademy/nova-icons';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nconst ICONS = {\n skills: TargetIcon,\n questions: QuestionIcon,\n lifes: HeartIcon,\n allright: CheckIcon\n};\n\nconst ReviewIcon = ({icon}) => {\n const Icon = getOr(null, icon, ICONS);\n\n /* istanbul ignore next */\n if (!Icon) {\n return <div className={style.labelIcon} />;\n }\n return <Icon className={style.labelIcon} />;\n};\n\nconst ToolTip = ({\n tooltipText,\n 'aria-label': moreDetailsAriaLabel,\n 'data-testid': dataTestId,\n closeToolTipInformationTextAriaLabel\n}) => {\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n const handleKeyPress = useCallback(\n event => {\n if (event.key === 'Enter') {\n setToolTipIsVisible(!toolTipIsVisible);\n } else if (event.key === 'Tab' || event.key === 'Escape') {\n setToolTipIsVisible(false);\n }\n },\n [setToolTipIsVisible, toolTipIsVisible]\n );\n const handleMouseOver = useCallback(() => {\n setToolTipIsVisible(true);\n }, [setToolTipIsVisible]);\n\n const handleMouseLeave = useCallback(() => {\n setToolTipIsVisible(false);\n }, [setToolTipIsVisible]);\n\n return (\n <div\n className={style.tooltipContainer}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n >\n <button\n type=\"button\"\n className={style.tooltipIconContainer}\n data-testid={dataTestId}\n onKeyDown={handleKeyPress}\n tabIndex={0}\n >\n <InformationIcon\n className={style.informationIcon}\n width={12}\n height={12}\n aria-label={moreDetailsAriaLabel}\n />\n </button>\n {toolTipIsVisible ? (\n <div\n className={style.toolTip}\n data-testid=\"review-presentation-tooltip\"\n aria-label={closeToolTipInformationTextAriaLabel}\n >\n <p className={style.tooltipText}>{tooltipText}</p>\n </div>\n ) : null}\n </div>\n );\n};\n\nconst ReviewListItemWrapper = ({iconKey, label}) => {\n return (\n <div className={style.reviewListItemWrapper} data-tip data-for=\"reviewListItem\" tabIndex={0}>\n <div className={style.reviewListText}>\n <ReviewIcon icon={iconKey} /> {label.text}\n </div>\n <ToolTip\n tooltipText={label.tooltipText}\n aria-label={label.moreDetailsAriaLabel}\n closeToolTipInformationTextAriaLabel={label.closeToolTipInformationTextAriaLabel}\n data-testid={`review-list-item-tooltip-button-${iconKey}`}\n />\n </div>\n );\n};\n\nconst ReviewPresentation = props => {\n const {'aria-label': ariaLabel, reviewTitle, reviewText, labelsList} = props;\n\n return (\n <div className={style.reviewWrapper} aria-label={ariaLabel}>\n <div\n className={style.reviewTitle}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: reviewTitle}}\n />\n <div\n className={style.reviewText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: reviewText}}\n />\n <ul className={style.reviewListWrapper}>\n {map.convert({cap: false})((label, key) => {\n return (\n <li key={`step-${key}`} className={style.reviewList}>\n <ReviewListItemWrapper\n iconKey={key}\n label={label}\n tooltipText={label.tooltipText}\n aria-label={label.moreDetailsAriaLabel}\n />\n </li>\n );\n }, labelsList)}\n </ul>\n </div>\n );\n};\n\nToolTip.propTypes = {\n tooltipText: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-testid': PropTypes.string,\n closeToolTipInformationTextAriaLabel: PropTypes.string\n};\n\nReviewIcon.propTypes = {\n icon: PropTypes.string\n};\n\nReviewListItemWrapper.propTypes = {\n ...ToolTip.propTypes,\n iconKey: PropTypes.string,\n label: PropTypes.shape({\n tooltipText: PropTypes.string,\n moreDetailsAriaLabel: PropTypes.string\n })\n};\n\nReviewPresentation.propTypes = propTypes;\n\nexport default ReviewPresentation;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,WAAzB,QAA2C,OAA3C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,SACEC,2BAA2B,IAAIC,SADjC,EAEEC,6BAA6B,IAAIC,SAFnC,EAGEC,0CAA0C,IAAIC,eAHhD,EAIEC,+CAA+C,IAAIC,YAJrD,EAKEC,yCAAyC,IAAIC,UAL/C,QAMO,0BANP;AAOA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,SAAP,MAAsB,cAAtB;AAEA,MAAMC,KAAK,GAAG;EACZC,MAAM,EAAEJ,UADI;EAEZK,SAAS,EAAEP,YAFC;EAGZQ,KAAK,EAAEZ,SAHK;EAIZa,QAAQ,EAAEf;AAJE,CAAd;;AAOA,MAAMgB,UAAU,GAAG,CAAC;EAACC;AAAD,CAAD,KAAY;EAC7B,MAAMC,IAAI,GAAGrB,KAAK,CAAC,IAAD,EAAOoB,IAAP,EAAaN,KAAb,CAAlB;EAEA;;EACA,IAAI,CAACO,IAAL,E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H;IAAT;EAH3B,EANF,eAWE;IAAI,SAAS,EAAErC,KAAK,CAACyC;EAArB,GACGpD,GAAG,CAACqD,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EAA0B,CAACd,KAAD,EAAQT,GAAR,KAAgB;IACzC,oBACE;MAAI,GAAG,EAAG,QAAOA,GAAI,EAArB;MAAwB,SAAS,EAAEpB,KAAK,CAAC4C;IAAzC,gBACE,oBAAC,qBAAD;MACE,OAAO,EAAExB,GADX;MAEE,KAAK,EAAES,KAFT;MAGE,WAAW,EAAEA,KAAK,CAACjB,WAHrB;MAIE,cAAYiB,KAAK,CAAChB;IAJpB,EADF,CADF;EAUD,CAXA,EAWEyB,UAXF,CADH,CAXF,CADF;AA4BD,CA/BD;;AAiCA3B,OAAO,CAACV,SAAR,2CAAoB;EAClBW,WAAW,EAAEzB,SAAS,CAAC0D,MADL;EAElB,cAAc1D,SAAS,CAAC0D,MAFN;EAGlB,eAAe1D,SAAS,CAAC0D,MAHP;EAIlB9B,oCAAoC,EAAE5B,SAAS,CAAC0D;AAJ9B,CAApB;AAOAtC,UAAU,CAACN,SAAX,2CAAuB;EACrBO,IAAI,EAAErB,SAAS,CAAC0D;AADK,CAAvB;AAIAlB,qBAAqB,CAAC1B,SAAtB,wDACKU,OAAO,CAACV,SADb;EAEE2B,OAAO,EAAEzC,SAAS,CAAC0D,MAFrB;EAGEhB,KAAK,EAAE1C,SAAS,CAAC2D,KAAV,CAAgB;IACrBlC,WAAW,EAAEzB,SAAS,CAAC0D,MADF;IAErBhC,oBAAoB,EAAE1B,SAAS,CAAC0D;EAFX,CAAhB;AAHT;AASAZ,kBAAkB,CAAChC,SAAnB,2CAA+BA,SAA/B;AAEA,eAAegC,kBAAf"}
|
|
@@ -10,21 +10,25 @@ declare const propTypes: {
|
|
|
10
10
|
text: PropTypes.Requireable<string>;
|
|
11
11
|
tooltipText: PropTypes.Requireable<string>;
|
|
12
12
|
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
13
|
+
closeToolTipInformationTextAriaLabel: PropTypes.Requireable<string>;
|
|
13
14
|
}>>;
|
|
14
15
|
questions: PropTypes.Requireable<PropTypes.InferProps<{
|
|
15
16
|
text: PropTypes.Requireable<string>;
|
|
16
17
|
tooltipText: PropTypes.Requireable<string>;
|
|
17
18
|
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
19
|
+
closeToolTipInformationTextAriaLabel: PropTypes.Requireable<string>;
|
|
18
20
|
}>>;
|
|
19
21
|
lifes: PropTypes.Requireable<PropTypes.InferProps<{
|
|
20
22
|
text: PropTypes.Requireable<string>;
|
|
21
23
|
tooltipText: PropTypes.Requireable<string>;
|
|
22
24
|
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
25
|
+
closeToolTipInformationTextAriaLabel: PropTypes.Requireable<string>;
|
|
23
26
|
}>>;
|
|
24
27
|
allright: PropTypes.Requireable<PropTypes.InferProps<{
|
|
25
28
|
text: PropTypes.Requireable<string>;
|
|
26
29
|
tooltipText: PropTypes.Requireable<string>;
|
|
27
30
|
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
31
|
+
closeToolTipInformationTextAriaLabel: PropTypes.Requireable<string>;
|
|
28
32
|
}>>;
|
|
29
33
|
}>>;
|
|
30
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/atom/review-presentation/prop-types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,UAAU,EAAE,qBAAqB,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/atom/review-presentation/prop-types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,UAAU,EAAE,qBAAqB,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AAS1E,Q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I,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,SAAS,CAAC;QAAC,KAAK,EAAE,UAAU,CAAA;KAAC,CAAC,CAAC;CACtF,CAAC"}
|
|
@@ -2,7 +2,8 @@ import PropTypes from 'prop-types';
|
|
|
2
2
|
const levelItem = PropTypes.shape({
|
|
3
3
|
text: PropTypes.string,
|
|
4
4
|
tooltipText: PropTypes.string,
|
|
5
|
-
moreDetailsAreaLabel: PropTypes.string
|
|
5
|
+
moreDetailsAreaLabel: PropTypes.string,
|
|
6
|
+
closeToolTipInformationTextAriaLabel: PropTypes.string
|
|
6
7
|
});
|
|
7
8
|
const propTypes = {
|
|
8
9
|
'aria-label': PropTypes.string,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.js","names":["PropTypes","levelItem","shape","text","string","tooltipText","moreDetailsAreaLabel","propTypes","reviewTitle","reviewText","labelsList","skills","questions","lifes","allright","OnboardingPropsTypes","onPress","func","TipPropsTypes","Icon","any"],"sources":["../../../src/atom/review-presentation/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {ColorValue, GestureResponderEvent, ViewStyle} from 'react-native';\n\nconst levelItem = PropTypes.shape({\n text: PropTypes.string,\n tooltipText: PropTypes.string,\n moreDetailsAreaLabel: PropTypes.string\n});\n\nconst propTypes = {\n 'aria-label': PropTypes.string,\n reviewTitle: PropTypes.string,\n reviewText: PropTypes.string,\n labelsList: PropTypes.shape({\n skills: levelItem,\n questions: levelItem,\n lifes: levelItem,\n allright: levelItem\n })\n};\n\nexport default propTypes;\n\nexport const OnboardingPropsTypes = {\n onPress: PropTypes.func\n};\n\nexport const TipPropsTypes = {\n text: PropTypes.string,\n Icon: PropTypes.any\n};\n\nexport type OnboardingProps = {\n 'aria-label'?: string | undefined;\n reviewTitle?: string | undefined;\n reviewText?: string | undefined;\n labelsList?: {\n skills?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n }\n | undefined;\n questions?: {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n };\n lifes?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n }\n | undefined;\n allright?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n }\n | undefined;\n };\n onPress: (event: GestureResponderEvent) => void;\n};\n\nexport type TipProps = {\n text: string | undefined;\n Icon: React.FC<{height: number; width: number; style: ViewStyle; color: ColorValue}>;\n};\n"],"mappings":"AAAA,OAAOA,SAAP,MAAsB,YAAtB;AAGA,MAAMC,SAAS,GAAGD,SAAS,CAACE,KAAV,CAAgB;EAChCC,IAAI,EAAEH,SAAS,CAACI,MADgB;EAEhCC,WAAW,EAAEL,SAAS,CAACI,MAFS;EAGhCE,oBAAoB,EAAEN,SAAS,CAACI;
|
|
1
|
+
{"version":3,"file":"prop-types.js","names":["PropTypes","levelItem","shape","text","string","tooltipText","moreDetailsAreaLabel","closeToolTipInformationTextAriaLabel","propTypes","reviewTitle","reviewText","labelsList","skills","questions","lifes","allright","OnboardingPropsTypes","onPress","func","TipPropsTypes","Icon","any"],"sources":["../../../src/atom/review-presentation/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {ColorValue, GestureResponderEvent, ViewStyle} from 'react-native';\n\nconst levelItem = PropTypes.shape({\n text: PropTypes.string,\n tooltipText: PropTypes.string,\n moreDetailsAreaLabel: PropTypes.string,\n closeToolTipInformationTextAriaLabel: PropTypes.string\n});\n\nconst propTypes = {\n 'aria-label': PropTypes.string,\n reviewTitle: PropTypes.string,\n reviewText: PropTypes.string,\n labelsList: PropTypes.shape({\n skills: levelItem,\n questions: levelItem,\n lifes: levelItem,\n allright: levelItem\n })\n};\n\nexport default propTypes;\n\nexport const OnboardingPropsTypes = {\n onPress: PropTypes.func\n};\n\nexport const TipPropsTypes = {\n text: PropTypes.string,\n Icon: PropTypes.any\n};\n\nexport type OnboardingProps = {\n 'aria-label'?: string | undefined;\n reviewTitle?: string | undefined;\n reviewText?: string | undefined;\n labelsList?: {\n skills?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n }\n | undefined;\n questions?: {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n };\n lifes?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n }\n | undefined;\n allright?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n }\n | undefined;\n };\n onPress: (event: GestureResponderEvent) => void;\n};\n\nexport type TipProps = {\n text: string | undefined;\n Icon: React.FC<{height: number; width: number; style: ViewStyle; color: ColorValue}>;\n};\n"],"mappings":"AAAA,OAAOA,SAAP,MAAsB,YAAtB;AAGA,MAAMC,SAAS,GAAGD,SAAS,CAACE,KAAV,CAAgB;EAChCC,IAAI,EAAEH,SAAS,CAACI,MADgB;EAEhCC,WAAW,EAAEL,SAAS,CAACI,MAFS;EAGhCE,oBAAoB,EAAEN,SAAS,CAACI,MAHA;EAIhCG,oCAAoC,EAAEP,SAAS,CAACI;AAJhB,CAAhB,CAAlB;AAOA,MAAMI,SAAS,GAAG;EAChB,cAAcR,SAAS,CAACI,MADR;EAEhBK,WAAW,EAAET,SAAS,CAACI,MAFP;EAGhBM,UAAU,EAAEV,SAAS,CAACI,MAHN;EAIhBO,UAAU,EAAEX,SAAS,CAACE,KAAV,CAAgB;IAC1BU,MAAM,EAAEX,SADkB;IAE1BY,SAAS,EAAEZ,SAFe;IAG1Ba,KAAK,EAAEb,SAHmB;IAI1Bc,QAAQ,EAAEd;EAJgB,CAAhB;AAJI,CAAlB;AAYA,eAAeO,SAAf;AAEA,OAAO,MAAMQ,oBAAoB,GAAG;EAClCC,OAAO,EAAEjB,SAAS,CAACkB;AADe,CAA7B;AAIP,OAAO,MAAMC,aAAa,GAAG;EAC3BhB,IAAI,EAAEH,SAAS,CAACI,MADW;EAE3BgB,IAAI,EAAEpB,SAAS,CAACqB;AAFW,CAAtB"}
|
|
@@ -82,8 +82,6 @@
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
.toolTip {
|
|
85
|
-
visibility: hidden;
|
|
86
|
-
opacity: 0;
|
|
87
85
|
transition: opacity 0.8s;
|
|
88
86
|
position: absolute;
|
|
89
87
|
height: auto;
|
|
@@ -97,8 +95,8 @@
|
|
|
97
95
|
.toolTip::before {
|
|
98
96
|
content: '';
|
|
99
97
|
display: inline-block;
|
|
100
|
-
visibility:
|
|
101
|
-
opacity:
|
|
98
|
+
visibility: inherit;
|
|
99
|
+
opacity: inherit;
|
|
102
100
|
width: 15px;
|
|
103
101
|
height: 15px;
|
|
104
102
|
transform: rotate(-45deg);
|
|
@@ -126,19 +124,12 @@
|
|
|
126
124
|
position: relative;
|
|
127
125
|
}
|
|
128
126
|
|
|
129
|
-
.reviewListItemWrapper:hover .tooltipContainer .toolTip {
|
|
130
|
-
visibility: visible;
|
|
131
|
-
opacity: 1;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.reviewListItemWrapper:hover .tooltipContainer .toolTip::before {
|
|
135
|
-
visibility: visible;
|
|
136
|
-
opacity: 1;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
127
|
.tooltipIconContainer {
|
|
140
128
|
display: flex;
|
|
141
129
|
justify-content: flex-end;
|
|
130
|
+
border: none;
|
|
131
|
+
background: cm_grey_75;
|
|
132
|
+
height: 25px;
|
|
142
133
|
}
|
|
143
134
|
|
|
144
135
|
@media tablet {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/answer/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/answer/index.js"],"names":[],"mappings":";AA4EA,iDASC"}
|
|
@@ -74,38 +74,28 @@ const Switch = ({
|
|
|
74
74
|
switch (type) {
|
|
75
75
|
case 'qcmDrag':
|
|
76
76
|
return /*#__PURE__*/React.createElement(QcmDrag, _extends({}, model, {
|
|
77
|
-
help: help
|
|
78
|
-
groupAriaLabel: translate('answer_the_question')
|
|
77
|
+
help: help
|
|
79
78
|
}));
|
|
80
79
|
|
|
81
80
|
case 'qcm':
|
|
82
|
-
return /*#__PURE__*/React.createElement(Qcm,
|
|
83
|
-
groupAriaLabel: translate('answer_the_question')
|
|
84
|
-
}));
|
|
81
|
+
return /*#__PURE__*/React.createElement(Qcm, model);
|
|
85
82
|
|
|
86
83
|
case 'qcmGraphic':
|
|
87
|
-
return /*#__PURE__*/React.createElement(QcmGraphic,
|
|
88
|
-
groupAriaLabel: translate('answer_the_question')
|
|
89
|
-
}));
|
|
84
|
+
return /*#__PURE__*/React.createElement(QcmGraphic, model);
|
|
90
85
|
|
|
91
86
|
case 'freeText':
|
|
92
87
|
return /*#__PURE__*/React.createElement(FreeText, model);
|
|
93
88
|
|
|
94
89
|
case 'dropDown':
|
|
95
90
|
return /*#__PURE__*/React.createElement(DropDown, _extends({}, model, {
|
|
96
|
-
"aria-label": translate('drop_down_icon')
|
|
97
|
-
groupAriaLabel: translate('answer_the_question')
|
|
91
|
+
"aria-label": translate('drop_down_icon')
|
|
98
92
|
}));
|
|
99
93
|
|
|
100
94
|
case 'slider':
|
|
101
|
-
return /*#__PURE__*/React.createElement(QuestionRange,
|
|
102
|
-
groupAriaLabel: translate('answer_the_question')
|
|
103
|
-
}));
|
|
95
|
+
return /*#__PURE__*/React.createElement(QuestionRange, model);
|
|
104
96
|
|
|
105
97
|
case 'template':
|
|
106
|
-
return /*#__PURE__*/React.createElement(Template,
|
|
107
|
-
groupAriaLabel: translate('answer_the_question')
|
|
108
|
-
}));
|
|
98
|
+
return /*#__PURE__*/React.createElement(Template, model);
|
|
109
99
|
}
|
|
110
100
|
};
|
|
111
101
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","VideoPlayer","DropDown","FreeText","QcmDrag","Qcm","QcmGraphic","QuestionRange","Template","Provider","Audio","style","propTypes","MediaViewPropTypes","TYPE_AUDIO","TYPE_IMAGE","TYPE_VIDEO","MediaView","media","videoId","type","childProps","backgroundImage","url","video","audio","Switch","model","help","translate","contextTypes","childContextTypes","Answer","props","wrapper"],"sources":["../../../src/molecule/answer/index.js"],"sourcesContent":["import React from 'react';\nimport {omit} from 'lodash/fp';\nimport VideoPlayer from '../video-player';\nimport DropDown from '../questions/drop-down';\nimport FreeText from '../questions/free-text';\nimport QcmDrag from '../questions/qcm-drag';\nimport Qcm from '../questions/qcm';\nimport QcmGraphic from '../questions/qcm-graphic';\nimport QuestionRange from '../questions/question-range';\nimport Template from '../questions/template';\nimport Provider from '../../atom/provider';\nimport Audio from '../audio';\nimport style from './style.css';\nimport propTypes, {MediaViewPropTypes, TYPE_AUDIO, TYPE_IMAGE, TYPE_VIDEO} from './prop-types';\n\nconst MediaView = ({media}) => {\n const {videoId, type, ...childProps} = media;\n switch (type) {\n case TYPE_IMAGE:\n return (\n <div\n className={style.media}\n style={{\n backgroundImage: `url(${media.url})`\n }}\n />\n );\n case TYPE_VIDEO:\n return (\n <div className={style.video}>\n <VideoPlayer {...omit('id', childProps)} id={videoId} height=\"100%\" width=\"100%\" />\n </div>\n );\n case TYPE_AUDIO:\n return (\n <div className={style.audio}>\n <Audio {...omit('id', childProps)} height=\"100%\" width=\"100%\" />\n </div>\n );\n default:\n return null;\n }\n};\n\nMediaView.propTypes = MediaViewPropTypes;\n\nconst Switch = ({model, help}, {translate}) => {\n const {type} = model;\n\n switch (type) {\n case 'qcmDrag':\n return <QcmDrag {...model} help={help}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","VideoPlayer","DropDown","FreeText","QcmDrag","Qcm","QcmGraphic","QuestionRange","Template","Provider","Audio","style","propTypes","MediaViewPropTypes","TYPE_AUDIO","TYPE_IMAGE","TYPE_VIDEO","MediaView","media","videoId","type","childProps","backgroundImage","url","video","audio","Switch","model","help","translate","contextTypes","childContextTypes","Answer","props","wrapper"],"sources":["../../../src/molecule/answer/index.js"],"sourcesContent":["import React from 'react';\nimport {omit} from 'lodash/fp';\nimport VideoPlayer from '../video-player';\nimport DropDown from '../questions/drop-down';\nimport FreeText from '../questions/free-text';\nimport QcmDrag from '../questions/qcm-drag';\nimport Qcm from '../questions/qcm';\nimport QcmGraphic from '../questions/qcm-graphic';\nimport QuestionRange from '../questions/question-range';\nimport Template from '../questions/template';\nimport Provider from '../../atom/provider';\nimport Audio from '../audio';\nimport style from './style.css';\nimport propTypes, {MediaViewPropTypes, TYPE_AUDIO, TYPE_IMAGE, TYPE_VIDEO} from './prop-types';\n\nconst MediaView = ({media}) => {\n const {videoId, type, ...childProps} = media;\n switch (type) {\n case TYPE_IMAGE:\n return (\n <div\n className={style.media}\n style={{\n backgroundImage: `url(${media.url})`\n }}\n />\n );\n case TYPE_VIDEO:\n return (\n <div className={style.video}>\n <VideoPlayer {...omit('id', childProps)} id={videoId} height=\"100%\" width=\"100%\" />\n </div>\n );\n case TYPE_AUDIO:\n return (\n <div className={style.audio}>\n <Audio {...omit('id', childProps)} height=\"100%\" width=\"100%\" />\n </div>\n );\n default:\n return null;\n }\n};\n\nMediaView.propTypes = MediaViewPropTypes;\n\nconst Switch = ({model, help}, {translate}) => {\n const {type} = model;\n\n switch (type) {\n case 'qcmDrag':\n return <QcmDrag {...model} help={help} />;\n case 'qcm':\n return <Qcm {...model} />;\n case 'qcmGraphic':\n return <QcmGraphic {...model} />;\n case 'freeText':\n return <FreeText {...model} />;\n case 'dropDown':\n return <DropDown {...model} aria-label={translate('drop_down_icon')} />;\n case 'slider':\n return <QuestionRange {...model} />;\n case 'template':\n return <Template {...model} />;\n }\n};\n\nSwitch.propTypes = {\n model: propTypes.model,\n help: propTypes.help\n};\n\nSwitch.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nconst Answer = props => {\n const {model, media, help} = props;\n\n return (\n <div data-name=\"answer\" className={style.wrapper}>\n {media ? <MediaView media={media} /> : null}\n <Switch model={model} help={help} />\n </div>\n );\n};\n\nAnswer.propTypes = propTypes;\n\nexport default Answer;\n"],"mappings":";;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,QAAP,MAAqB,wBAArB;AACA,OAAOC,QAAP,MAAqB,wBAArB;AACA,OAAOC,OAAP,MAAoB,uBAApB;AACA,OAAOC,GAAP,MAAgB,kBAAhB;AACA,OAAOC,UAAP,MAAuB,0BAAvB;AACA,OAAOC,aAAP,MAA0B,6BAA1B;AACA,OAAOC,QAAP,MAAqB,uBAArB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,KAAP,MAAkB,UAAlB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,SAAP,IAAmBC,kBAAnB,EAAuCC,UAAvC,EAAmDC,UAAnD,EAA+DC,UAA/D,QAAgF,cAAhF;;AAEA,MAAMC,SAAS,GAAG,CAAC;EAACC;AAAD,CAAD,KAAa;EAC7B,MAAM;IAACC,OAAD;IAAUC;EAAV,IAAiCF,KAAvC;EAAA,MAAyBG,UAAzB,iCAAuCH,KAAvC;;EACA,QAAQE,IAAR;IACE,KAAKL,UAAL;MACE,oBACE;QACE,SAAS,EAAEJ,KAAK,CAACO,KADnB;QAEE,KAAK,EAAE;UACLI,eAAe,EAAG,OAAMJ,KAAK,CAACK,GAAI;QAD7B;MAFT,EADF;;IAQF,KAAKP,UAAL;MACE,oBACE;QAAK,SAAS,EAAEL,KAAK,CAACa;MAAtB,gBACE,oBAAC,WAAD,eAAiB,MAAK,IAAL,EAAWH,UAAX,CAAjB;QAAyC,EAAE,EAAEF,OAA7C;QAAsD,MAAM,EAAC,MAA7D;QAAoE,KAAK,EAAC;MAA1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AK,IAAI;EACtB,MAAM;IAACN,KAAD;IAAQT,KAAR;IAAeU;EAAf,IAAuBK,KAA7B;EAEA,oBACE;IAAK,aAAU,QAAf;IAAwB,SAAS,EAAEtB,KAAK,CAACuB;EAAzC,GACGhB,KAAK,gBAAG,oBAAC,SAAD;IAAW,KAAK,EAAEA;EAAlB,EAAH,GAAiC,IADzC,eAEE,oBAAC,MAAD;IAAQ,KAAK,EAAES,KAAf;IAAsB,IAAI,EAAEC;EAA5B,EAFF,CADF;AAMD,CATD;;AAWAI,MAAM,CAACpB,SAAP,2CAAmBA,SAAnB;AAEA,eAAeoB,MAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/index.native.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAC,YAAY,EAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/index.native.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAC,YAAY,EAAC,MAAM,SAAS,CAAC;AA0ErC,QAAA,MAAM,eAAe,UAAW,YAAY,uBAiD3C,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -6,14 +6,12 @@ import Touchable from '../../hoc/touchable/index.native';
|
|
|
6
6
|
import { useTemplateContext } from '../../template/app-review/template-context';
|
|
7
7
|
|
|
8
8
|
const createStyleSheet = theme => StyleSheet.create({
|
|
9
|
-
|
|
10
|
-
backgroundColor: '
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
maxHeight: '50%',
|
|
14
|
-
marginTop: '70%'
|
|
9
|
+
modalView: {
|
|
10
|
+
backgroundColor: '#fff',
|
|
11
|
+
margin: 5,
|
|
12
|
+
borderRadius: 20
|
|
15
13
|
},
|
|
16
|
-
|
|
14
|
+
textsContainer: {
|
|
17
15
|
display: 'flex',
|
|
18
16
|
alignItems: 'center',
|
|
19
17
|
marginVertical: theme.spacing.large,
|
|
@@ -23,7 +21,7 @@ const createStyleSheet = theme => StyleSheet.create({
|
|
|
23
21
|
width: 76,
|
|
24
22
|
height: 76
|
|
25
23
|
},
|
|
26
|
-
|
|
24
|
+
title: {
|
|
27
25
|
color: '#1D1D2B',
|
|
28
26
|
fontWeight: theme.fontWeight.bold,
|
|
29
27
|
fontSize: 20,
|
|
@@ -76,7 +74,6 @@ const QuitPopinReview = props => {
|
|
|
76
74
|
const {
|
|
77
75
|
theme
|
|
78
76
|
} = templateContext;
|
|
79
|
-
const isVisible = true;
|
|
80
77
|
useEffect(() => {
|
|
81
78
|
const _stylesheet = createStyleSheet(theme);
|
|
82
79
|
|
|
@@ -88,16 +85,18 @@ const QuitPopinReview = props => {
|
|
|
88
85
|
}
|
|
89
86
|
|
|
90
87
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
91
|
-
isVisible:
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
isVisible: true,
|
|
89
|
+
animationIn: "fadeIn",
|
|
90
|
+
animationOut: "fadeOut"
|
|
94
91
|
}, /*#__PURE__*/React.createElement(View, {
|
|
95
|
-
style: styleSheet.
|
|
92
|
+
style: styleSheet.modalView
|
|
93
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
94
|
+
style: styleSheet.textsContainer
|
|
96
95
|
}, /*#__PURE__*/React.createElement(MoonRocket, {
|
|
97
96
|
style: styleSheet.icon,
|
|
98
97
|
color: "#06265B"
|
|
99
98
|
}), /*#__PURE__*/React.createElement(Text, {
|
|
100
|
-
style: styleSheet.
|
|
99
|
+
style: styleSheet.title
|
|
101
100
|
}, content), /*#__PURE__*/React.createElement(Text, {
|
|
102
101
|
style: styleSheet.descriptionText
|
|
103
102
|
}, descriptionText)), /*#__PURE__*/React.createElement(View, {
|
|
@@ -117,7 +116,7 @@ const QuitPopinReview = props => {
|
|
|
117
116
|
testID: "first-button"
|
|
118
117
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
119
118
|
style: [styleSheet.buttonText, styleSheet.firstButtonText]
|
|
120
|
-
}, firstButton?.label))));
|
|
119
|
+
}, firstButton?.label)))));
|
|
121
120
|
};
|
|
122
121
|
|
|
123
122
|
export default QuitPopinReview;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["React","useEffect","useState","Text","StyleSheet","View","Modal","NovaSolidSpaceMoonRocket","MoonRocket","Touchable","useTemplateContext","createStyleSheet","theme","create","
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["React","useEffect","useState","Text","StyleSheet","View","Modal","NovaSolidSpaceMoonRocket","MoonRocket","Touchable","useTemplateContext","createStyleSheet","theme","create","modalView","backgroundColor","margin","borderRadius","textsContainer","display","alignItems","marginVertical","spacing","large","marginHorizontal","base","icon","width","height","title","color","fontWeight","bold","fontSize","lineHeight","small","descriptionText","semiBold","textAlign","buttonContainer","buttonText","secondButton","colors","cta","marginBottom","secondButtonText","white","firstButton","firstButtonText","QuitPopinReview","props","content","templateContext","styleSheet","setStylesheet","_stylesheet","handleOnclick","label"],"sources":["../../../src/molecule/cm-popin/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {Text, TextStyle, StyleSheet, View, ViewStyle} from 'react-native';\nimport Modal from 'react-native-modal';\nimport {NovaSolidSpaceMoonRocket as MoonRocket} from '@coorpacademy/nova-icons';\nimport {Theme} from '../../variables/theme.native';\nimport Touchable from '../../hoc/touchable/index.native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {CMPopinProps} from './types';\n\ninterface StyleSheetType {\n modalView: ViewStyle;\n textsContainer: ViewStyle;\n icon: ViewStyle;\n title: TextStyle;\n descriptionText: TextStyle;\n buttonContainer: ViewStyle;\n buttonText: TextStyle;\n firstButton: ViewStyle;\n firstButtonText: TextStyle;\n secondButton: ViewStyle;\n secondButtonText: TextStyle;\n}\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n modalView: {\n backgroundColor: '#fff',\n margin: 5,\n borderRadius: 20\n },\n textsContainer: {\n display: 'flex',\n alignItems: 'center',\n marginVertical: theme.spacing.large,\n marginHorizontal: theme.spacing.base\n },\n icon: {\n width: 76,\n height: 76\n },\n title: {\n color: '#1D1D2B',\n fontWeight: theme.fontWeight.bold,\n fontSize: 20,\n lineHeight: 28,\n marginVertical: theme.spacing.small\n },\n descriptionText: {\n color: '#515161',\n fontWeight: theme.fontWeight.semiBold,\n fontSize: 14,\n lineHeight: 20,\n textAlign: 'center'\n },\n buttonContainer: {\n marginHorizontal: theme.spacing.base\n },\n buttonText: {\n fontWeight: theme.fontWeight.bold,\n fontSize: 14,\n lineHeight: 20,\n marginVertical: 12,\n textAlign: 'center'\n },\n secondButton: {\n backgroundColor: theme.colors.cta,\n borderRadius: 7,\n marginBottom: theme.spacing.small\n },\n secondButtonText: {\n color: theme.colors.white\n },\n firstButton: {\n borderRadius: 7,\n marginBottom: theme.spacing.small\n },\n firstButtonText: {\n color: '#ED3436'\n }\n });\n\nconst QuitPopinReview = (props: CMPopinProps) => {\n const {content, descriptionText, firstButton, secondButton} = props;\n const templateContext = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const {theme} = templateContext;\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <Modal isVisible animationIn=\"fadeIn\" animationOut=\"fadeOut\">\n <View style={styleSheet.modalView}>\n <View style={styleSheet.textsContainer}>\n <MoonRocket style={styleSheet.icon} color=\"#06265B\" />\n <Text style={styleSheet.title}>{content}</Text>\n <Text style={styleSheet.descriptionText}>{descriptionText}</Text>\n </View>\n <View style={styleSheet.buttonContainer}>\n <Touchable\n style={styleSheet.secondButton}\n onPress={secondButton?.handleOnclick}\n accessibilityLabel={secondButton?.['aria-label']}\n testID=\"second-button\"\n >\n <Text style={[styleSheet.buttonText, styleSheet.secondButtonText]}>\n {secondButton?.label}\n </Text>\n </Touchable>\n <Touchable\n style={styleSheet.firstButton}\n isHighlight\n onPress={firstButton?.handleOnclick}\n accessibilityLabel={firstButton?.['aria-label']}\n testID=\"first-button\"\n >\n <Text style={[styleSheet.buttonText, styleSheet.firstButtonText]}>\n {firstButton?.label}\n </Text>\n </Touchable>\n </View>\n </View>\n </Modal>\n );\n};\n\nexport default QuitPopinReview;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,SAAf,EAA0BC,QAA1B,QAAyC,OAAzC;AACA,SAAQC,IAAR,EAAyBC,UAAzB,EAAqCC,IAArC,QAA2D,cAA3D;AACA,OAAOC,KAAP,MAAkB,oBAAlB;AACA,SAAQC,wBAAwB,IAAIC,UAApC,QAAqD,0BAArD;AAEA,OAAOC,SAAP,MAAsB,kCAAtB;AACA,SAAQC,kBAAR,QAAiC,4CAAjC;;AAiBA,MAAMC,gBAAgB,GAAIC,KAAD,IACvBR,UAAU,CAACS,MAAX,CAAkB;EAChBC,SAAS,EAAE;IACTC,eAAe,EAAE,MADR;IAETC,MAAM,EAAE,CAFC;IAGTC,YAAY,EAAE;EAHL,CADK;EAMhBC,cAAc,EAAE;IACdC,OAAO,EAAE,MADK;IAEdC,UAAU,EAAE,QAFE;IAGdC,cAAc,EAAET,KAAK,CAACU,OAAN,CAAcC,KAHhB;IAIdC,gBAAgB,EAAEZ,KAAK,CAACU,OAAN,CAAcG;EAJlB,CANA;EAYhBC,IAAI,EAAE;IACJC,KAAK,EAAE,EADH;IAEJC,MAAM,EAAE;EAFJ,CAZU;EAgBhBC,KAAK,EAAE;IACLC,KAAK,EAAE,SADF;IAELC,UAAU,EAAEnB,KAAK,CAACmB,UAAN,CAAiBC,IAFxB;IAGLC,QAAQ,EAAE,EAHL;IAILC,UAAU,EAAE,EAJP;IAKLb,cAAc,EAAET,KAAK,CAACU,OAAN,CAAca;EALzB,CAhBS;EAuBhBC,eAAe,EAAE;IACfN,KAAK,EAAE,SADQ;IAEfC,UAAU,EAAEnB,KAAK,CAACmB,UAAN,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D;;AAmDA,eAAeR,eAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters-wrapper.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/filters-wrapper.js"],"names":[],"mappings":";AAUA,
|
|
1
|
+
{"version":3,"file":"filters-wrapper.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/filters-wrapper.js"],"names":[],"mappings":";AAUA,sEAuDC"}
|
|
@@ -15,8 +15,7 @@ import style from './filters-wapper.css';
|
|
|
15
15
|
const FiltersWapper = (props, context) => {
|
|
16
16
|
const {
|
|
17
17
|
filters,
|
|
18
|
-
className
|
|
19
|
-
filterGroupAriaLabel
|
|
18
|
+
className
|
|
20
19
|
} = props;
|
|
21
20
|
|
|
22
21
|
const buildFilter = (filter, idx) => {
|
|
@@ -81,11 +80,9 @@ const FiltersWapper = (props, context) => {
|
|
|
81
80
|
|
|
82
81
|
const emptyFilters = _isEmpty(filters);
|
|
83
82
|
|
|
84
|
-
return /*#__PURE__*/React.createElement("
|
|
85
|
-
className: classnames(className, emptyFilters ? style.wrapperNone : style.wrapper)
|
|
86
|
-
|
|
87
|
-
"aria-label": filterGroupAriaLabel
|
|
88
|
-
}, filtersList));
|
|
83
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
84
|
+
className: classnames(className, emptyFilters ? style.wrapperNone : style.wrapper)
|
|
85
|
+
}, filtersList);
|
|
89
86
|
};
|
|
90
87
|
|
|
91
88
|
FiltersWapper.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -93,8 +90,7 @@ FiltersWapper.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
93
90
|
filters: PropTypes.arrayOf(PropTypes.shape({
|
|
94
91
|
type: PropTypes.oneOf(['select', 'range', 'radio', 'switch']).isRequired,
|
|
95
92
|
fieldName: PropTypes.string.isRequired
|
|
96
|
-
}))
|
|
97
|
-
filterGroupAriaLabel: PropTypes.string
|
|
93
|
+
}))
|
|
98
94
|
} : {};
|
|
99
95
|
export default FiltersWapper;
|
|
100
96
|
//# sourceMappingURL=filters-wrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters-wrapper.js","names":["React","PropTypes","classnames","Select","InputSwitch","RadioGroup","RangeSlider","style","FiltersWapper","props","context","filters","className","
|
|
1
|
+
{"version":3,"file":"filters-wrapper.js","names":["React","PropTypes","classnames","Select","InputSwitch","RadioGroup","RangeSlider","style","FiltersWapper","props","context","filters","className","buildFilter","filter","idx","type","fieldName","choice","title","radioGroup","timerWrapper","timerSubtitle","subtitle","toggle","display","filtersList","convert","cap","emptyFilters","wrapperNone","wrapper","propTypes","string","arrayOf","shape","oneOf","isRequired"],"sources":["../../../src/molecule/filters/filters-wrapper.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, map} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Select from '../../atom/select';\nimport InputSwitch from '../../atom/input-switch';\nimport RadioGroup from '../../atom/radio-group';\nimport RangeSlider from '../../atom/range';\nimport style from './filters-wapper.css';\n\nconst FiltersWapper = (props, context) => {\n const {filters, className} = props;\n\n const buildFilter = (filter, idx) => {\n const {type, fieldName} = filter;\n switch (type) {\n case 'select':\n return (\n <div data-name=\"choice\" data-filter-type={fieldName} className={style.choice} key={idx}>\n <Select {...filter} />\n </div>\n );\n case 'radio':\n return (\n <div data-name=\"choice\" data-filter-type={fieldName} className={style.choice} key={idx}>\n <p className={style.title}>{filter.title}</p>\n <RadioGroup {...filter} className={style.radioGroup} />\n </div>\n );\n case 'range':\n return (\n <div\n data-name=\"choice\"\n data-filter-type={fieldName}\n className={style.timerWrapper}\n key={idx}\n >\n <label>\n <span className={style.title}>{filter.title}</span>\n <p className={style.timerSubtitle}>{filter.subtitle}</p>\n <RangeSlider {...filter} />\n </label>\n </div>\n );\n case 'switch':\n return (\n <div data-name=\"choice\" data-filter-type={fieldName} className={style.choice} key={idx}>\n <p className={style.title}>{filter.title}</p>\n <div className={style.toggle}>\n <InputSwitch {...filter.display} />\n </div>\n </div>\n );\n default:\n return null;\n }\n };\n\n const filtersList = map.convert({cap: false})(buildFilter, filters);\n const emptyFilters = isEmpty(filters);\n return (\n <div className={classnames(className, emptyFilters ? style.wrapperNone : style.wrapper)}>\n {filtersList}\n </div>\n );\n};\n\nFiltersWapper.propTypes = {\n className: PropTypes.string,\n filters: PropTypes.arrayOf(\n PropTypes.shape({\n type: PropTypes.oneOf(['select', 'range', 'radio', 'switch']).isRequired,\n fieldName: PropTypes.string.isRequired\n })\n )\n};\nexport default FiltersWapper;\n"],"mappings":";;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,WAAP,MAAwB,kBAAxB;AACA,OAAOC,KAAP,MAAkB,sBAAlB;;AAEA,MAAMC,aAAa,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACxC,MAAM;IAACC,OAAD;IAAUC;EAAV,IAAuBH,KAA7B;;EAEA,MAAMI,WAAW,GAAG,CAACC,MAAD,EAASC,GAAT,KAAiB;IACnC,MAAM;MAACC,IAAD;MAAOC;IAAP,IAAoBH,MAA1B;;IACA,QAAQE,IAAR;MACE,KAAK,QAAL;QACE,oBACE;UAAK,aAAU,QAAf;UAAwB,oBAAkBC,SAA1C;UAAqD,SAAS,EAAEV,KAAK,CAACW,MAAtE;UAA8E,GAAG,EAAEH;QAAnF,gBACE,oBAAC,MAAD,EAAYD,MAAZ,CADF,CADF;;MAKF,KAAK,OAAL;QACE,oBACE;UAAK,aAAU,QAAf;UAAwB,oBAAkBG,SAA1C;UAAqD,SAAS,EAAEV,KAAK,CAACW,MAAtE;UAA8E,GAAG,EAAEH;QAAnF,gBACE;UAAG,SAAS,EAAER,KAAK,CA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gC,MADG;EAExBtB,OAAO,EAAEV,SAAS,CAACiC,OAAV,CACPjC,SAAS,CAACkC,KAAV,CAAgB;IACdnB,IAAI,EAAEf,SAAS,CAACmC,KAAV,CAAgB,CAAC,QAAD,EAAW,OAAX,EAAoB,OAApB,EAA6B,QAA7B,CAAhB,EAAwDC,UADhD;IAEdpB,SAAS,EAAEhB,SAAS,CAACgC,MAAV,CAAiBI;EAFd,CAAhB,CADO;AAFe,CAA1B;AASA,eAAe7B,aAAf"}
|
|
@@ -37,7 +37,6 @@ declare class Filters extends React.Component<any, any, any> {
|
|
|
37
37
|
onToggleSorts: PropTypes.Requireable<(...args: any[]) => any>;
|
|
38
38
|
moreSortAriaLabel: PropTypes.Requireable<string>;
|
|
39
39
|
moreFilterAriaLabel: PropTypes.Requireable<string>;
|
|
40
|
-
filterGroupAriaLabel: PropTypes.Requireable<string>;
|
|
41
40
|
};
|
|
42
41
|
static contextTypes: {
|
|
43
42
|
skin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/index.js"],"names":[],"mappings":";AASA;IACE
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/index.js"],"names":[],"mappings":";AASA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAcE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,wBASC;IAPC;;;MAGC;IAMH,yBAcC;IAED,uBAYC;IAED,qBAOC;IAED,sBAsFC;CACF"}
|