@coorpacademy/components 11.4.5-alpha.37 → 11.4.5-alpha.38.37
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/atom/select/index.d.ts +2 -0
- package/es/atom/select/index.d.ts.map +1 -1
- package/es/atom/select/index.js +26 -10
- package/es/atom/select/index.js.map +1 -1
- package/es/atom/select/style.css +6 -6
- package/es/atom/select/test.html +44 -0
- 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/brand-form-group/index.d.ts +4 -0
- 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 +2 -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/molecule/setup-slide/index.d.ts +2 -0
- package/es/molecule/setup-slider/index.d.ts +2 -0
- package/es/organism/brand-form/index.d.ts +4 -0
- 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/organism/wizard-contents/index.d.ts +4 -0
- package/es/template/back-office/brand-update/index.d.ts +8 -0
- package/es/template/back-office/brand-update/style.css +2 -2
- package/es/template/common/search-page/index.d.ts +2 -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/atom/select/index.d.ts +2 -0
- package/lib/atom/select/index.d.ts.map +1 -1
- package/lib/atom/select/index.js +26 -10
- package/lib/atom/select/index.js.map +1 -1
- package/lib/atom/select/style.css +6 -6
- package/lib/atom/select/test.html +44 -0
- 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/brand-form-group/index.d.ts +4 -0
- 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 +2 -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/molecule/setup-slide/index.d.ts +2 -0
- package/lib/molecule/setup-slider/index.d.ts +2 -0
- package/lib/organism/brand-form/index.d.ts +4 -0
- 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/organism/wizard-contents/index.d.ts +4 -0
- package/lib/template/back-office/brand-update/index.d.ts +8 -0
- package/lib/template/back-office/brand-update/style.css +2 -2
- package/lib/template/common/search-page/index.d.ts +2 -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,5 +1,5 @@
|
|
|
1
1
|
import _getOr from "lodash/fp/getOr";
|
|
2
|
-
const _excluded = ["title", "minLabel", "maxLabel"
|
|
2
|
+
const _excluded = ["title", "minLabel", "maxLabel"];
|
|
3
3
|
|
|
4
4
|
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); }
|
|
5
5
|
|
|
@@ -16,8 +16,7 @@ const QuestionRange = (props, legacyContext) => {
|
|
|
16
16
|
const {
|
|
17
17
|
title,
|
|
18
18
|
minLabel,
|
|
19
|
-
maxLabel
|
|
20
|
-
groupAriaLabel
|
|
19
|
+
maxLabel
|
|
21
20
|
} = props,
|
|
22
21
|
rangeProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
23
22
|
|
|
@@ -28,10 +27,8 @@ const QuestionRange = (props, legacyContext) => {
|
|
|
28
27
|
const titleStyle = {
|
|
29
28
|
color: defaultColor
|
|
30
29
|
};
|
|
31
|
-
return /*#__PURE__*/React.createElement("
|
|
32
|
-
className: style.wrapper
|
|
33
|
-
role: "group",
|
|
34
|
-
"aria-label": groupAriaLabel
|
|
30
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
31
|
+
className: style.wrapper
|
|
35
32
|
}, /*#__PURE__*/React.createElement("span", {
|
|
36
33
|
style: titleStyle,
|
|
37
34
|
className: classnames(style.title, style.innerHTML) // eslint-disable-next-line react/no-danger
|
|
@@ -53,7 +50,7 @@ const QuestionRange = (props, legacyContext) => {
|
|
|
53
50
|
dangerouslySetInnerHTML: {
|
|
54
51
|
__html: maxLabel
|
|
55
52
|
}
|
|
56
|
-
})))
|
|
53
|
+
})));
|
|
57
54
|
};
|
|
58
55
|
|
|
59
56
|
QuestionRange.contextTypes = {
|
|
@@ -62,8 +59,7 @@ QuestionRange.contextTypes = {
|
|
|
62
59
|
QuestionRange.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, Range.propTypes, {
|
|
63
60
|
title: PropTypes.string,
|
|
64
61
|
minLabel: PropTypes.string,
|
|
65
|
-
maxLabel: PropTypes.string
|
|
66
|
-
groupAriaLabel: PropTypes.string
|
|
62
|
+
maxLabel: PropTypes.string
|
|
67
63
|
}) : {};
|
|
68
64
|
export default QuestionRange;
|
|
69
65
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","classnames","Provider","GetSkinFromContext","Range","style","QuestionRange","props","legacyContext","title","minLabel","maxLabel","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","classnames","Provider","GetSkinFromContext","Range","style","QuestionRange","props","legacyContext","title","minLabel","maxLabel","rangeProps","skin","defaultColor","titleStyle","color","wrapper","innerHTML","__html","labelWrapper","label","contextTypes","childContextTypes","propTypes","string"],"sources":["../../../../src/molecule/questions/question-range/index.js"],"sourcesContent":["import React from 'react';\nimport {getOr} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport Range from '../../../atom/range';\nimport style from './style.css';\n\nconst QuestionRange = (props, legacyContext) => {\n const {title, minLabel, maxLabel, ...rangeProps} = props;\n\n const skin = GetSkinFromContext(legacyContext);\n const defaultColor = getOr('#00B0FF', 'common.primary', skin);\n\n const titleStyle = {\n color: defaultColor\n };\n\n return (\n <div className={style.wrapper}>\n <span\n style={titleStyle}\n className={classnames(style.title, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n <Range {...rangeProps} />\n <div className={style.labelWrapper}>\n <span\n className={classnames(style.label, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: minLabel}}\n />\n <span\n className={classnames(style.label, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: maxLabel}}\n />\n </div>\n </div>\n );\n};\n\nQuestionRange.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nQuestionRange.propTypes = {\n ...Range.propTypes,\n title: PropTypes.string,\n minLabel: PropTypes.string,\n maxLabel: PropTypes.string\n};\n\nexport default QuestionRange;\n"],"mappings":";;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,QAAP,IAAkBC,kBAAlB,QAA2C,wBAA3C;AACA,OAAOC,KAAP,MAAkB,qBAAlB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,aAAa,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EAC9C,MAAM;IAACC,KAAD;IAAQC,QAAR;IAAkBC;EAAlB,IAA6CJ,KAAnD;EAAA,MAAqCK,UAArC,iCAAmDL,KAAnD;;EAEA,MAAMM,IAAI,GAAGV,kBAAkB,CAACK,aAAD,CAA/B;;EACA,MAAMM,YAAY,GAAG,OAAM,SAAN,EAAiB,gBAAjB,EAAmCD,IAAnC,CAArB;;EAEA,MAAME,UAAU,GAAG;IACjBC,KAAK,EAAEF;EADU,CAAnB;EAIA,oBACE;IAAK,SAAS,EAAET,KAAK,CAACY;EAAtB,gBACE;IACE,KAAK,EAAEF,UADT;IAEE,SAAS,EAAEd,UAAU,CAACI,KAAK,CAACI,KAAP,EAAcJ,KAAK,CAACa,SAApB,CAFvB,CAGE;IAHF;IAIE,uBAAuB,EAAE;MAACC,MAAM,EAAEV;IAAT;EAJ3B,EADF,eAOE,oBAAC,KAAD,EAAWG,UAAX,CAPF,eAQE;IAAK,SAAS,EAAEP,KAAK,CAACe;EAAtB,gBACE;IACE,SAAS,EAAEnB,UAAU,CAACI,KAAK,CAACgB,KAAP,EAAchB,KAAK,CAACa,SAApB,CADvB,CAEE;IAFF;IAGE,uBAAuB,EAAE;MAACC,MAAM,EAAET;IAAT;EAH3B,EADF,eAME;IACE,SAAS,EAAET,UAAU,CAACI,KAAK,CAACgB,KAAP,EAAchB,KAAK,CAACa,SAApB,CADvB,CAEE;IAFF;IAGE,uBAAuB,EAAE;MAACC,MAAM,EAAER;IAAT;EAH3B,EANF,CARF,CADF;AAuBD,CAjCD;;AAmCAL,aAAa,CAACgB,YAAd,GAA6B;EAC3BT,IAAI,EAAEX,QAAQ,CAACqB,iBAAT,CAA2BV;AADN,CAA7B;AAIAP,aAAa,CAACkB,SAAd,wDACKpB,KAAK,CAACoB,SADX;EAEEf,KAAK,EAAET,SAAS,CAACyB,MAFnB;EAGEf,QAAQ,EAAEV,SAAS,CAACyB,MAHtB;EAIEd,QAAQ,EAAEX,SAAS,CAACyB;AAJtB;AAOA,eAAenB,aAAf"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export default Template;
|
|
2
|
-
declare function Template({ template, answers
|
|
2
|
+
declare function Template({ template, answers }: {
|
|
3
3
|
template: any;
|
|
4
4
|
answers: any;
|
|
5
|
-
groupAriaLabel: any;
|
|
6
5
|
}): JSX.Element;
|
|
7
6
|
declare namespace Template {
|
|
8
7
|
namespace propTypes {
|
|
@@ -17,7 +16,6 @@ declare namespace Template {
|
|
|
17
16
|
}> | null | undefined)[]>;
|
|
18
17
|
theme: PropTypes.Requireable<string>;
|
|
19
18
|
'aria-label': PropTypes.Requireable<string>;
|
|
20
|
-
groupAriaLabel: PropTypes.Requireable<string>;
|
|
21
19
|
}, never>> & Partial<PropTypes.InferPropsInner<Pick<{
|
|
22
20
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
23
21
|
options: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
@@ -28,9 +26,7 @@ declare namespace Template {
|
|
|
28
26
|
}> | null | undefined)[]>;
|
|
29
27
|
theme: PropTypes.Requireable<string>;
|
|
30
28
|
'aria-label': PropTypes.Requireable<string>;
|
|
31
|
-
|
|
32
|
-
}, "aria-label" | "onChange" | "theme" | "options" | "groupAriaLabel">>>) | null | undefined)[]>;
|
|
33
|
-
const groupAriaLabel: PropTypes.Requireable<string>;
|
|
29
|
+
}, "aria-label" | "onChange" | "theme" | "options">>>) | null | undefined)[]>;
|
|
34
30
|
}
|
|
35
31
|
}
|
|
36
32
|
import PropTypes from "prop-types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/molecule/questions/template/index.js"],"names":[],"mappings":";AAQA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/molecule/questions/template/index.js"],"names":[],"mappings":";AAQA;;;gBAsCC"}
|
|
@@ -15,8 +15,7 @@ import style from './style.css';
|
|
|
15
15
|
|
|
16
16
|
const Template = ({
|
|
17
17
|
template,
|
|
18
|
-
answers
|
|
19
|
-
groupAriaLabel
|
|
18
|
+
answers
|
|
20
19
|
}) => {
|
|
21
20
|
const totalTemplate = parseTemplateString(template);
|
|
22
21
|
|
|
@@ -60,12 +59,10 @@ const Template = ({
|
|
|
60
59
|
}
|
|
61
60
|
}, totalTemplate);
|
|
62
61
|
|
|
63
|
-
return /*#__PURE__*/React.createElement("
|
|
62
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
64
63
|
"data-name": "template-wrapper",
|
|
65
|
-
className: style.wrapper
|
|
66
|
-
|
|
67
|
-
"aria-label": groupAriaLabel
|
|
68
|
-
}, templateCompose));
|
|
64
|
+
className: style.wrapper
|
|
65
|
+
}, templateCompose);
|
|
69
66
|
};
|
|
70
67
|
|
|
71
68
|
const TextPropTypes = process.env.NODE_ENV !== "production" ? _extends({}, DropDown.propTypes, {
|
|
@@ -73,8 +70,7 @@ const TextPropTypes = process.env.NODE_ENV !== "production" ? _extends({}, DropD
|
|
|
73
70
|
}) : {};
|
|
74
71
|
Template.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
75
72
|
template: PropTypes.string,
|
|
76
|
-
answers: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape(DropDown.propTypes), PropTypes.shape(TextPropTypes)]))
|
|
77
|
-
groupAriaLabel: PropTypes.string
|
|
73
|
+
answers: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape(DropDown.propTypes), PropTypes.shape(TextPropTypes)]))
|
|
78
74
|
} : {};
|
|
79
75
|
export default Template;
|
|
80
76
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","parseTemplateString","DropDown","FreeText","style","Template","template","answers","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","parseTemplateString","DropDown","FreeText","style","Template","template","answers","totalTemplate","templateCompose","convert","cap","part","key","type","textPart","__html","value","field","name","fieldType","fieldProps","fieldView","text","answerType","wrapper","TextPropTypes","propTypes","string","arrayOf","oneOfType","shape"],"sources":["../../../../src/molecule/questions/template/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map, find} from 'lodash/fp';\nimport parseTemplateString from '../../../util/parse-template-string';\nimport DropDown from '../drop-down';\nimport FreeText from '../free-text';\nimport style from './style.css';\n\nconst Template = ({template, answers}) => {\n const totalTemplate = parseTemplateString(template);\n const templateCompose = map.convert({cap: false})((part, key) => {\n const type = part.type;\n if (type === 'string') {\n return (\n <span\n key={key}\n className={style.textPart}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: part.value}}\n />\n );\n }\n if (type === 'answerField') {\n const field = find({name: part.value}, answers);\n if (!field) return null;\n const {type: fieldType, ...fieldProps} = field;\n const fieldView =\n fieldType === 'text' ? (\n <FreeText {...fieldProps} className={style.text} />\n ) : (\n <DropDown {...fieldProps} theme=\"player\" />\n );\n\n return (\n <div className={style.answerType} key={part.value}>\n {fieldView}\n </div>\n );\n }\n }, totalTemplate);\n\n return (\n <div data-name=\"template-wrapper\" className={style.wrapper}>\n {templateCompose}\n </div>\n );\n};\n\nconst TextPropTypes = {\n ...DropDown.propTypes,\n type: PropTypes.string\n};\n\nTemplate.propTypes = {\n template: PropTypes.string,\n answers: PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.shape(DropDown.propTypes), PropTypes.shape(TextPropTypes)])\n )\n};\n\nexport default Template;\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,mBAAP,MAAgC,qCAAhC;AACA,OAAOC,QAAP,MAAqB,cAArB;AACA,OAAOC,QAAP,MAAqB,cAArB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,QAAQ,GAAG,CAAC;EAACC,QAAD;EAAWC;AAAX,CAAD,KAAyB;EACxC,MAAMC,aAAa,GAAGP,mBAAmB,CAACK,QAAD,CAAzC;;EACA,MAAMG,eAAe,GAAG,KAAIC,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EAA0B,CAACC,IAAD,EAAOC,GAAP,KAAe;IAC/D,MAAMC,IAAI,GAAGF,IAAI,CAACE,IAAlB;;IACA,IAAIA,IAAI,KAAK,QAAb,EAAuB;MACrB,oBACE;QACE,GAAG,EAAED,GADP;QAEE,SAAS,EAAET,KAAK,CAACW,QAFnB,CAGE;QAHF;QAIE,uBAAuB,EAAE;UAACC,MAAM,EAAEJ,IAAI,CAACK;QAAd;MAJ3B,EADF;IAQD;;IACD,IAAIH,IAAI,KAAK,aAAb,EAA4B;MAC1B,MAAMI,KAAK,GAAG,MAAK;QAACC,IAAI,EAAEP,IAAI,CAACK;MAAZ,CAAL,EAAyBV,OAAzB,CAAd;;MACA,IAAI,CAACW,KAAL,EAAY,OAAO,IAAP;;MACZ,MAAM;QAACJ,IAAI,EAAEM;MAAP,IAAmCF,KAAzC;MAAA,MAA2BG,UAA3B,iCAAyCH,KAAzC;;MACA,MAAMI,SAAS,GACbF,SAAS,KAAK,MAAd,gBACE,oBAAC,QAAD,eAAcC,UAAd;QAA0B,SAAS,EAAEjB,KAAK,CAACmB;MAA3C,GADF,gBAGE,oBAAC,QAAD,eAAcF,UAAd;QAA0B,KAAK,EAAC;MAAhC,GAJJ;MAOA,oBACE;QAAK,SAAS,EAAEjB,KAAK,CAACoB,UAAtB;QAAkC,GAAG,EAAEZ,IAAI,CAACK;MAA5C,GACGK,SADH,CADF;IAKD;EACF,CA7BuB,EA6BrBd,aA7BqB,CAAxB;;EA+BA,oBACE;IAAK,aAAU,kBAAf;IAAkC,SAAS,EAAEJ,KAAK,CAACqB;EAAnD,GACGhB,eADH,CADF;AAKD,CAtCD;;AAwCA,MAAMiB,aAAN,wDACKxB,QAAQ,CAACyB,SADd;EAEEb,IAAI,EAAEd,SAAS,CAAC4B;AAFlB;AAKAvB,QAAQ,CAACsB,SAAT,2CAAqB;EACnBrB,QAAQ,EAAEN,SAAS,CAAC4B,MADD;EAEnBrB,OAAO,EAAEP,SAAS,CAAC6B,OAAV,CACP7B,SAAS,CAAC8B,SAAV,CAAoB,CAAC9B,SAAS,CAAC+B,KAAV,CAAgB7B,QAAQ,CAACyB,SAAzB,CAAD,EAAsC3B,SAAS,CAAC+B,KAAV,CAAgBL,aAAhB,CAAtC,CAApB,CADO;AAFU,CAArB;AAOA,eAAerB,QAAf"}
|
|
@@ -57,6 +57,8 @@ declare namespace SetupSlide {
|
|
|
57
57
|
modified: PropTypes.Requireable<boolean>;
|
|
58
58
|
error: PropTypes.Requireable<boolean>;
|
|
59
59
|
'aria-label': PropTypes.Requireable<string>;
|
|
60
|
+
selectId: PropTypes.Requireable<string>;
|
|
61
|
+
titleClassName: PropTypes.Requireable<string>;
|
|
60
62
|
}> | PropTypes.InferProps<{
|
|
61
63
|
type: PropTypes.Requireable<string>;
|
|
62
64
|
title: PropTypes.Validator<string>;
|
|
@@ -70,6 +70,8 @@ declare namespace SetupSlider {
|
|
|
70
70
|
modified: PropTypes.Requireable<boolean>;
|
|
71
71
|
error: PropTypes.Requireable<boolean>;
|
|
72
72
|
'aria-label': PropTypes.Requireable<string>;
|
|
73
|
+
selectId: PropTypes.Requireable<string>;
|
|
74
|
+
titleClassName: PropTypes.Requireable<string>;
|
|
73
75
|
}> | PropTypes.InferProps<{
|
|
74
76
|
type: PropTypes.Requireable<string>;
|
|
75
77
|
title: PropTypes.Validator<string>;
|
|
@@ -129,6 +129,8 @@ declare namespace BrandForm {
|
|
|
129
129
|
modified: PropTypes.Requireable<boolean>;
|
|
130
130
|
error: PropTypes.Requireable<boolean>;
|
|
131
131
|
'aria-label': PropTypes.Requireable<string>;
|
|
132
|
+
selectId: PropTypes.Requireable<string>;
|
|
133
|
+
titleClassName: PropTypes.Requireable<string>;
|
|
132
134
|
}> | PropTypes.InferProps<{
|
|
133
135
|
type: PropTypes.Requireable<string>;
|
|
134
136
|
title: PropTypes.Validator<string>;
|
|
@@ -233,6 +235,8 @@ declare namespace BrandForm {
|
|
|
233
235
|
modified: PropTypes.Requireable<boolean>;
|
|
234
236
|
error: PropTypes.Requireable<boolean>;
|
|
235
237
|
'aria-label': PropTypes.Requireable<string>;
|
|
238
|
+
selectId: PropTypes.Requireable<string>;
|
|
239
|
+
titleClassName: PropTypes.Requireable<string>;
|
|
236
240
|
}> | PropTypes.InferProps<{
|
|
237
241
|
type: PropTypes.Requireable<string>;
|
|
238
242
|
title: PropTypes.Validator<string>;
|
|
@@ -19,7 +19,6 @@ declare namespace UserPreferences {
|
|
|
19
19
|
requiredSelection: PropTypes.Requireable<boolean>;
|
|
20
20
|
}> | null | undefined)[]>;
|
|
21
21
|
const moreInfoAriaLabel: PropTypes.Requireable<string>;
|
|
22
|
-
const groupAriaLabel: PropTypes.Requireable<string>;
|
|
23
22
|
}
|
|
24
23
|
}
|
|
25
24
|
import PropTypes from "prop-types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/user-preferences/index.js"],"names":[],"mappings":";AAoCA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/user-preferences/index.js"],"names":[],"mappings":";AAoCA,0DAaC"}
|
|
@@ -46,23 +46,19 @@ Settings.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, InputS
|
|
|
46
46
|
const UserPreferences = props => {
|
|
47
47
|
const {
|
|
48
48
|
preferences = [],
|
|
49
|
-
moreInfoAriaLabel
|
|
50
|
-
groupAriaLabel
|
|
49
|
+
moreInfoAriaLabel
|
|
51
50
|
} = props;
|
|
52
|
-
return /*#__PURE__*/React.createElement("
|
|
53
|
-
className: style.preferences
|
|
54
|
-
role: "group",
|
|
55
|
-
"aria-label": groupAriaLabel
|
|
51
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
52
|
+
className: style.preferences
|
|
56
53
|
}, _map(settings => /*#__PURE__*/React.createElement(Settings, _extends({}, settings, {
|
|
57
54
|
key: settings.label,
|
|
58
55
|
moreInfoAriaLabel: moreInfoAriaLabel
|
|
59
|
-
})), preferences))
|
|
56
|
+
})), preferences));
|
|
60
57
|
};
|
|
61
58
|
|
|
62
59
|
UserPreferences.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
63
60
|
preferences: PropTypes.arrayOf(PropTypes.shape(Settings.propTypes)),
|
|
64
|
-
moreInfoAriaLabel: PropTypes.string
|
|
65
|
-
groupAriaLabel: PropTypes.string
|
|
61
|
+
moreInfoAriaLabel: PropTypes.string
|
|
66
62
|
} : {};
|
|
67
63
|
export default UserPreferences;
|
|
68
64
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","NovaCompositionCoorpacademyInformationIcon","InfoIcon","InputSwitch","style","Settings","props","label","description","moreInfoAriaLabel","settings","infoIconWrapper","infoIcon","showToolTip","descriptionLabel","propTypes","string","isRequired","UserPreferences","preferences","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","NovaCompositionCoorpacademyInformationIcon","InfoIcon","InputSwitch","style","Settings","props","label","description","moreInfoAriaLabel","settings","infoIconWrapper","infoIcon","showToolTip","descriptionLabel","propTypes","string","isRequired","UserPreferences","preferences","arrayOf","shape"],"sources":["../../../src/organism/user-preferences/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map, isEmpty} from 'lodash/fp';\nimport {NovaCompositionCoorpacademyInformationIcon as InfoIcon} from '@coorpacademy/nova-icons';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\n\nconst Settings = props => {\n const {label, description, moreInfoAriaLabel, ...settings} = props;\n return (\n <div className={style.settings}>\n <InputSwitch {...settings} />\n <span className={style.label}>{label}</span>\n {isEmpty(description) ? null : (\n <div className={style.infoIconWrapper}>\n <InfoIcon\n height={16}\n width={16}\n className={style.infoIcon}\n aria-label={moreInfoAriaLabel}\n />\n <div className={style.showToolTip}>\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n </div>\n )}\n </div>\n );\n};\n\nSettings.propTypes = {\n ...InputSwitch.propTypes,\n label: PropTypes.string.isRequired,\n description: PropTypes.string\n};\n\nconst UserPreferences = props => {\n const {preferences = [], moreInfoAriaLabel} = props;\n\n return (\n <div className={style.preferences}>\n {map(\n settings => (\n <Settings {...settings} key={settings.label} moreInfoAriaLabel={moreInfoAriaLabel} />\n ),\n preferences\n )}\n </div>\n );\n};\n\nUserPreferences.propTypes = {\n preferences: PropTypes.arrayOf(PropTypes.shape(Settings.propTypes)),\n moreInfoAriaLabel: PropTypes.string\n};\n\nexport default UserPreferences;\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,SAAQC,0CAA0C,IAAIC,QAAtD,QAAqE,0BAArE;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,QAAQ,GAAGC,KAAK,IAAI;EACxB,MAAM;IAACC,KAAD;IAAQC,WAAR;IAAqBC;EAArB,IAAuDH,KAA7D;EAAA,MAAiDI,QAAjD,iCAA6DJ,KAA7D;;EACA,oBACE;IAAK,SAAS,EAAEF,KAAK,CAACM;EAAtB,gBACE,oBAAC,WAAD,EAAiBA,QAAjB,CADF,eAEE;IAAM,SAAS,EAAEN,KAAK,CAACG;EAAvB,GAA+BA,KAA/B,CAFF,EAGG,SAAQC,WAAR,IAAuB,IAAvB,gBACC;IAAK,SAAS,EAAEJ,KAAK,CAACO;EAAtB,gBACE,oBAAC,QAAD;IACE,MAAM,EAAE,EADV;IAEE,KAAK,EAAE,EAFT;IAGE,SAAS,EAAEP,KAAK,CAACQ,QAHnB;IAIE,cAAYH;EAJd,EADF,eAOE;IAAK,SAAS,EAAEL,KAAK,CAACS;EAAtB,gBACE;IAAK,SAAS,EAAET,KAAK,CAACU;EAAtB,GAAyCN,WAAzC,CADF,CAPF,CAJJ,CADF;AAmBD,CArBD;;AAuBAH,QAAQ,CAACU,SAAT,wDACKZ,WAAW,CAACY,SADjB;EAEER,KAAK,EAAEP,SAAS,CAACgB,MAAV,CAAiBC,UAF1B;EAGET,WAAW,EAAER,SAAS,CAACgB;AAHzB;;AAMA,MAAME,eAAe,GAAGZ,KAAK,IAAI;EAC/B,MAAM;IAACa,WAAW,GAAG,EAAf;IAAmBV;EAAnB,IAAwCH,KAA9C;EAEA,oBACE;IAAK,SAAS,EAAEF,KAAK,CAACe;EAAtB,GACG,KACCT,QAAQ,iBACN,oBAAC,QAAD,eAAcA,QAAd;IAAwB,GAAG,EAAEA,QAAQ,CAACH,KAAtC;IAA6C,iBAAiB,EAAEE;EAAhE,GAFH,EAICU,WAJD,CADH,CADF;AAUD,CAbD;;AAeAD,eAAe,CAACH,SAAhB,2CAA4B;EAC1BI,WAAW,EAAEnB,SAAS,CAACoB,OAAV,CAAkBpB,SAAS,CAACqB,KAAV,CAAgBhB,QAAQ,CAACU,SAAzB,CAAlB,CADa;EAE1BN,iBAAiB,EAAET,SAAS,CAACgB;AAFH,CAA5B;AAKA,eAAeE,eAAf"}
|
|
@@ -146,6 +146,8 @@ declare namespace WizardContents {
|
|
|
146
146
|
modified: PropTypes.Requireable<boolean>;
|
|
147
147
|
error: PropTypes.Requireable<boolean>;
|
|
148
148
|
'aria-label': PropTypes.Requireable<string>;
|
|
149
|
+
selectId: PropTypes.Requireable<string>;
|
|
150
|
+
titleClassName: PropTypes.Requireable<string>;
|
|
149
151
|
}> | PropTypes.InferProps<{
|
|
150
152
|
type: PropTypes.Requireable<string>;
|
|
151
153
|
title: PropTypes.Validator<string>;
|
|
@@ -250,6 +252,8 @@ declare namespace WizardContents {
|
|
|
250
252
|
modified: PropTypes.Requireable<boolean>;
|
|
251
253
|
error: PropTypes.Requireable<boolean>;
|
|
252
254
|
'aria-label': PropTypes.Requireable<string>;
|
|
255
|
+
selectId: PropTypes.Requireable<string>;
|
|
256
|
+
titleClassName: PropTypes.Requireable<string>;
|
|
253
257
|
}> | PropTypes.InferProps<{
|
|
254
258
|
type: PropTypes.Requireable<string>;
|
|
255
259
|
title: PropTypes.Validator<string>;
|
|
@@ -231,6 +231,8 @@ declare namespace BrandUpdate {
|
|
|
231
231
|
modified: PropTypes.Requireable<boolean>;
|
|
232
232
|
error: PropTypes.Requireable<boolean>;
|
|
233
233
|
'aria-label': PropTypes.Requireable<string>;
|
|
234
|
+
selectId: PropTypes.Requireable<string>;
|
|
235
|
+
titleClassName: PropTypes.Requireable<string>;
|
|
234
236
|
}> | PropTypes.InferProps<{
|
|
235
237
|
type: PropTypes.Requireable<string>;
|
|
236
238
|
title: PropTypes.Validator<string>;
|
|
@@ -335,6 +337,8 @@ declare namespace BrandUpdate {
|
|
|
335
337
|
modified: PropTypes.Requireable<boolean>;
|
|
336
338
|
error: PropTypes.Requireable<boolean>;
|
|
337
339
|
'aria-label': PropTypes.Requireable<string>;
|
|
340
|
+
selectId: PropTypes.Requireable<string>;
|
|
341
|
+
titleClassName: PropTypes.Requireable<string>;
|
|
338
342
|
}> | PropTypes.InferProps<{
|
|
339
343
|
type: PropTypes.Requireable<string>;
|
|
340
344
|
title: PropTypes.Validator<string>;
|
|
@@ -854,6 +858,8 @@ declare namespace BrandUpdate {
|
|
|
854
858
|
modified: PropTypes.Requireable<boolean>;
|
|
855
859
|
error: PropTypes.Requireable<boolean>;
|
|
856
860
|
'aria-label': PropTypes.Requireable<string>;
|
|
861
|
+
selectId: PropTypes.Requireable<string>;
|
|
862
|
+
titleClassName: PropTypes.Requireable<string>;
|
|
857
863
|
}> | PropTypes.InferProps<{
|
|
858
864
|
type: PropTypes.Requireable<string>;
|
|
859
865
|
title: PropTypes.Validator<string>;
|
|
@@ -958,6 +964,8 @@ declare namespace BrandUpdate {
|
|
|
958
964
|
modified: PropTypes.Requireable<boolean>;
|
|
959
965
|
error: PropTypes.Requireable<boolean>;
|
|
960
966
|
'aria-label': PropTypes.Requireable<string>;
|
|
967
|
+
selectId: PropTypes.Requireable<string>;
|
|
968
|
+
titleClassName: PropTypes.Requireable<string>;
|
|
961
969
|
}> | PropTypes.InferProps<{
|
|
962
970
|
type: PropTypes.Requireable<string>;
|
|
963
971
|
title: PropTypes.Validator<string>;
|
|
@@ -58,13 +58,14 @@ declare namespace SearchPage {
|
|
|
58
58
|
modified: PropTypes.Requireable<boolean>;
|
|
59
59
|
error: PropTypes.Requireable<boolean>;
|
|
60
60
|
'aria-label': PropTypes.Requireable<string>;
|
|
61
|
+
selectId: PropTypes.Requireable<string>;
|
|
62
|
+
titleClassName: PropTypes.Requireable<string>;
|
|
61
63
|
}>>;
|
|
62
64
|
onSearch: PropTypes.Requireable<(...args: any[]) => any>;
|
|
63
65
|
onToggleFilters: PropTypes.Requireable<(...args: any[]) => any>;
|
|
64
66
|
onToggleSorts: PropTypes.Requireable<(...args: any[]) => any>;
|
|
65
67
|
moreSortAriaLabel: PropTypes.Requireable<string>;
|
|
66
68
|
moreFilterAriaLabel: PropTypes.Requireable<string>;
|
|
67
|
-
filterGroupAriaLabel: PropTypes.Requireable<string>;
|
|
68
69
|
}>>;
|
|
69
70
|
const cards: PropTypes.Requireable<PropTypes.InferProps<{
|
|
70
71
|
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
@@ -101,7 +102,6 @@ declare namespace SearchPage {
|
|
|
101
102
|
}>>;
|
|
102
103
|
const moreSortAriaLabel: PropTypes.Requireable<string>;
|
|
103
104
|
const moreFilterAriaLabel: PropTypes.Requireable<string>;
|
|
104
|
-
const filterGroupAriaLabel: PropTypes.Requireable<string>;
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
import PropTypes from "prop-types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/common/search-page/index.js"],"names":[],"mappings":";AAUA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/common/search-page/index.js"],"names":[],"mappings":";AAUA,mEAkDC"}
|
|
@@ -21,8 +21,7 @@ const SearchPage = (props, context) => {
|
|
|
21
21
|
clearFilters,
|
|
22
22
|
recommendations,
|
|
23
23
|
moreSortAriaLabel,
|
|
24
|
-
moreFilterAriaLabel
|
|
25
|
-
filterGroupAriaLabel
|
|
24
|
+
moreFilterAriaLabel
|
|
26
25
|
} = props;
|
|
27
26
|
const {
|
|
28
27
|
skin
|
|
@@ -45,8 +44,7 @@ const SearchPage = (props, context) => {
|
|
|
45
44
|
}))), recommendationsView) : /*#__PURE__*/React.createElement(CardsGrid, cards);
|
|
46
45
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Filters, _extends({}, searchFilters, {
|
|
47
46
|
moreSortAriaLabel: moreSortAriaLabel,
|
|
48
|
-
moreFilterAriaLabel: moreFilterAriaLabel
|
|
49
|
-
filterGroupAriaLabel: filterGroupAriaLabel
|
|
47
|
+
moreFilterAriaLabel: moreFilterAriaLabel
|
|
50
48
|
})), /*#__PURE__*/React.createElement("div", {
|
|
51
49
|
"data-name": "searchResult",
|
|
52
50
|
className: style.cardsWrapper
|
|
@@ -67,8 +65,7 @@ SearchPage.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
67
65
|
clearFilters: PropTypes.shape(Button.propTypes),
|
|
68
66
|
recommendations: PropTypes.shape(CardsList.propTypes),
|
|
69
67
|
moreSortAriaLabel: PropTypes.string,
|
|
70
|
-
moreFilterAriaLabel: PropTypes.string
|
|
71
|
-
filterGroupAriaLabel: PropTypes.string
|
|
68
|
+
moreFilterAriaLabel: PropTypes.string
|
|
72
69
|
} : {};
|
|
73
70
|
export default SearchPage;
|
|
74
71
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","Provider","Button","Filters","CardsGrid","CardsList","style","SearchPage","props","context","title","searchFilters","cards","noresultsfound","clearFilters","recommendations","moreSortAriaLabel","moreFilterAriaLabel","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","Provider","Button","Filters","CardsGrid","CardsList","style","SearchPage","props","context","title","searchFilters","cards","noresultsfound","clearFilters","recommendations","moreSortAriaLabel","moreFilterAriaLabel","skin","defaultColor","recommendationsView","cardsView","list","noresults","noresultstxt","clear","background","cardsWrapper","contextTypes","childContextTypes","propTypes","string","shape"],"sources":["../../../../src/template/common/search-page/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, isEmpty} from 'lodash/fp';\nimport Provider from '../../../atom/provider';\nimport Button from '../../../atom/button';\nimport Filters from '../../../molecule/filters';\nimport CardsGrid from '../../../organism/cards-grid';\nimport CardsList from '../../../molecule/dashboard/cards-list';\nimport style from './style.css';\n\nconst SearchPage = (props, context) => {\n const {\n title,\n searchFilters,\n cards,\n noresultsfound,\n clearFilters,\n recommendations,\n moreSortAriaLabel,\n moreFilterAriaLabel\n } = props;\n\n const {skin} = context;\n const defaultColor = getOr('#00B0FF', 'common.primary', skin);\n\n const recommendationsView = isEmpty(recommendations) ? null : <CardsList {...recommendations} />;\n\n const cardsView = isEmpty(cards.list) ? (\n <div>\n <div className={style.noresults}>\n <div className={style.noresultstxt}>{noresultsfound}</div>\n <Button\n {...clearFilters}\n data-name=\"searchPageClear\"\n className={style.clear}\n style={{background: defaultColor}}\n type=\"link\"\n />\n </div>\n {recommendationsView}\n </div>\n ) : (\n <CardsGrid {...cards} />\n );\n\n return (\n <div>\n <Filters\n {...searchFilters}\n moreSortAriaLabel={moreSortAriaLabel}\n moreFilterAriaLabel={moreFilterAriaLabel}\n />\n <div data-name=\"searchResult\" className={style.cardsWrapper}>\n <div className={style.title} role=\"status\">\n {title}\n </div>\n {cardsView}\n </div>\n </div>\n );\n};\n\nSearchPage.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSearchPage.propTypes = {\n noresultsfound: PropTypes.string,\n title: PropTypes.string,\n searchFilters: PropTypes.shape(Filters.propTypes),\n cards: PropTypes.shape(CardsGrid.propTypes),\n clearFilters: PropTypes.shape(Button.propTypes),\n recommendations: PropTypes.shape(CardsList.propTypes),\n moreSortAriaLabel: PropTypes.string,\n moreFilterAriaLabel: PropTypes.string\n};\n\nexport default SearchPage;\n"],"mappings":";;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,QAAP,MAAqB,wBAArB;AACA,OAAOC,MAAP,MAAmB,sBAAnB;AACA,OAAOC,OAAP,MAAoB,2BAApB;AACA,OAAOC,SAAP,MAAsB,8BAAtB;AACA,OAAOC,SAAP,MAAsB,wCAAtB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,UAAU,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACrC,MAAM;IACJC,KADI;IAEJC,aAFI;IAGJC,KAHI;IAIJC,cAJI;IAKJC,YALI;IAMJC,eANI;IAOJC,iBAPI;IAQJC;EARI,IASFT,KATJ;EAWA,MAAM;IAACU;EAAD,IAAST,OAAf;;EACA,MAAMU,YAAY,GAAG,OAAM,SAAN,EAAiB,gBAAjB,EAAmCD,IAAnC,CAArB;;EAEA,MAAME,mBAAmB,GAAG,SAAQL,eAAR,IAA2B,IAA3B,gBAAkC,oBAAC,SAAD,EAAeA,eAAf,CAA9D;EAEA,MAAMM,SAAS,GAAG,SAAQT,KAAK,CAACU,IAAd,iBAChB,8CACE;IAAK,SAAS,EAAEhB,KAAK,CAACiB;EAAtB,gBACE;IAAK,SAAS,EAAEjB,KAAK,CAACkB;EAAtB,GAAqCX,cAArC,CADF,eAEE,oBAAC,MAAD,eACMC,YADN;IAEE,aAAU,iBAFZ;IAGE,SAAS,EAAER,KAAK,CAACmB,KAHnB;IAIE,KAAK,EAAE;MAACC,UAAU,EAAEP;IAAb,CAJT;IAKE,IAAI,EAAC;EALP,GAFF,CADF,EAWGC,mBAXH,CADgB,gBAehB,oBAAC,SAAD,EAAeR,KAAf,CAfF;EAkBA,oBACE,8CACE,oBAAC,OAAD,eACMD,aADN;IAEE,iBAAiB,EAAEK,iBAFrB;IAGE,mBAAmB,EAAEC;EAHvB,GADF,eAME;IAAK,aAAU,cAAf;IAA8B,SAAS,EAAEX,KAAK,CAACqB;EAA/C,gBACE;IAAK,SAAS,EAAErB,KAAK,CAACI,KAAtB;IAA6B,IAAI,EAAC;EAAlC,GACGA,KADH,CADF,EAIGW,SAJH,CANF,CADF;AAeD,CAlDD;;AAoDAd,UAAU,CAACqB,YAAX,GAA0B;EACxBV,IAAI,EAAEjB,QAAQ,CAAC4B,iBAAT,CAA2BX;AADT,CAA1B;AAIAX,UAAU,CAACuB,SAAX,2CAAuB;EACrBjB,cAAc,EAAEb,SAAS,CAAC+B,MADL;EAErBrB,KAAK,EAAEV,SAAS,CAAC+B,MAFI;EAGrBpB,aAAa,EAAEX,SAAS,CAACgC,KAAV,CAAgB7B,OAAO,CAAC2B,SAAxB,CAHM;EAIrBlB,KAAK,EAAEZ,SAAS,CAACgC,KAAV,CAAgB5B,SAAS,CAAC0B,SAA1B,CAJc;EAKrBhB,YAAY,EAAEd,SAAS,CAACgC,KAAV,CAAgB9B,MAAM,CAAC4B,SAAvB,CALO;EAMrBf,eAAe,EAAEf,SAAS,CAACgC,KAAV,CAAgB3B,SAAS,CAACyB,SAA1B,CANI;EAOrBd,iBAAiB,EAAEhB,SAAS,CAAC+B,MAPR;EAQrBd,mBAAmB,EAAEjB,SAAS,CAAC+B;AARV,CAAvB;AAWA,eAAexB,UAAf"}
|
|
@@ -12,21 +12,25 @@ declare namespace ReviewDashboardSkills {
|
|
|
12
12
|
text: PropTypes.Requireable<string>;
|
|
13
13
|
tooltipText: PropTypes.Requireable<string>;
|
|
14
14
|
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
15
|
+
closeToolTipInformationTextAriaLabel: PropTypes.Requireable<string>;
|
|
15
16
|
}>>;
|
|
16
17
|
questions: PropTypes.Requireable<PropTypes.InferProps<{
|
|
17
18
|
text: PropTypes.Requireable<string>;
|
|
18
19
|
tooltipText: PropTypes.Requireable<string>;
|
|
19
20
|
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
21
|
+
closeToolTipInformationTextAriaLabel: PropTypes.Requireable<string>;
|
|
20
22
|
}>>;
|
|
21
23
|
lifes: PropTypes.Requireable<PropTypes.InferProps<{
|
|
22
24
|
text: PropTypes.Requireable<string>;
|
|
23
25
|
tooltipText: PropTypes.Requireable<string>;
|
|
24
26
|
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
27
|
+
closeToolTipInformationTextAriaLabel: PropTypes.Requireable<string>;
|
|
25
28
|
}>>;
|
|
26
29
|
allright: PropTypes.Requireable<PropTypes.InferProps<{
|
|
27
30
|
text: PropTypes.Requireable<string>;
|
|
28
31
|
tooltipText: PropTypes.Requireable<string>;
|
|
29
32
|
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
33
|
+
closeToolTipInformationTextAriaLabel: PropTypes.Requireable<string>;
|
|
30
34
|
}>>;
|
|
31
35
|
}>>;
|
|
32
36
|
}>>;
|
|
@@ -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"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
|
|
6
|
-
var _react =
|
|
6
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
7
7
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
|
|
@@ -19,6 +19,12 @@ var _propTypes2 = _interopRequireDefault(require("./prop-types"));
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
22
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
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); }
|
|
27
|
+
|
|
22
28
|
const ICONS = {
|
|
23
29
|
skills: _novaIcons.NovaLineSelectionCursorsCursorArrowTarget,
|
|
24
30
|
questions: _novaIcons.NovaSolidInterfaceFeedbackInterfaceQuestionMark,
|
|
@@ -26,7 +32,9 @@ const ICONS = {
|
|
|
26
32
|
allright: _novaIcons.NovaSolidStatusCheckCircle2
|
|
27
33
|
};
|
|
28
34
|
|
|
29
|
-
const
|
|
35
|
+
const ReviewIcon = ({
|
|
36
|
+
icon
|
|
37
|
+
}) => {
|
|
30
38
|
const Icon = (0, _getOr.default)(null, icon, ICONS);
|
|
31
39
|
/* istanbul ignore next */
|
|
32
40
|
|
|
@@ -43,22 +51,67 @@ const getIcon = icon => {
|
|
|
43
51
|
|
|
44
52
|
const ToolTip = ({
|
|
45
53
|
tooltipText,
|
|
46
|
-
'aria-label': moreDetailsAriaLabel
|
|
54
|
+
'aria-label': moreDetailsAriaLabel,
|
|
55
|
+
'data-testid': dataTestId,
|
|
56
|
+
closeToolTipInformationTextAriaLabel
|
|
47
57
|
}) => {
|
|
58
|
+
const [toolTipIsVisible, setToolTipIsVisible] = (0, _react.useState)(false);
|
|
59
|
+
const handleKeyPress = (0, _react.useCallback)(event => {
|
|
60
|
+
if (event.key === 'Enter') {
|
|
61
|
+
setToolTipIsVisible(!toolTipIsVisible);
|
|
62
|
+
} else if (event.key === 'Tab' || event.key === 'Escape') {
|
|
63
|
+
setToolTipIsVisible(false);
|
|
64
|
+
}
|
|
65
|
+
}, [setToolTipIsVisible, toolTipIsVisible]);
|
|
66
|
+
const handleMouseOver = (0, _react.useCallback)(() => {
|
|
67
|
+
setToolTipIsVisible(true);
|
|
68
|
+
}, [setToolTipIsVisible]);
|
|
69
|
+
const handleMouseLeave = (0, _react.useCallback)(() => {
|
|
70
|
+
setToolTipIsVisible(false);
|
|
71
|
+
}, [setToolTipIsVisible]);
|
|
48
72
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
49
|
-
className: _style.default.tooltipContainer
|
|
50
|
-
|
|
51
|
-
|
|
73
|
+
className: _style.default.tooltipContainer,
|
|
74
|
+
onMouseLeave: handleMouseLeave,
|
|
75
|
+
onMouseOver: handleMouseOver
|
|
76
|
+
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
77
|
+
type: "button",
|
|
78
|
+
className: _style.default.tooltipIconContainer,
|
|
79
|
+
"data-testid": dataTestId,
|
|
80
|
+
onKeyDown: handleKeyPress,
|
|
81
|
+
tabIndex: 0
|
|
52
82
|
}, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyInformationIcon, {
|
|
53
83
|
className: _style.default.informationIcon,
|
|
54
84
|
width: 12,
|
|
55
85
|
height: 12,
|
|
56
86
|
"aria-label": moreDetailsAriaLabel
|
|
57
|
-
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
58
|
-
className: _style.default.toolTip
|
|
87
|
+
})), toolTipIsVisible ? /*#__PURE__*/_react.default.createElement("div", {
|
|
88
|
+
className: _style.default.toolTip,
|
|
89
|
+
"data-testid": "review-presentation-tooltip",
|
|
90
|
+
"aria-label": closeToolTipInformationTextAriaLabel
|
|
59
91
|
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
60
92
|
className: _style.default.tooltipText
|
|
61
|
-
}, tooltipText)));
|
|
93
|
+
}, tooltipText)) : null);
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const ReviewListItemWrapper = ({
|
|
97
|
+
iconKey,
|
|
98
|
+
label
|
|
99
|
+
}) => {
|
|
100
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
101
|
+
className: _style.default.reviewListItemWrapper,
|
|
102
|
+
"data-tip": true,
|
|
103
|
+
"data-for": "reviewListItem",
|
|
104
|
+
tabIndex: 0
|
|
105
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
106
|
+
className: _style.default.reviewListText
|
|
107
|
+
}, /*#__PURE__*/_react.default.createElement(ReviewIcon, {
|
|
108
|
+
icon: iconKey
|
|
109
|
+
}), " ", label.text), /*#__PURE__*/_react.default.createElement(ToolTip, {
|
|
110
|
+
tooltipText: label.tooltipText,
|
|
111
|
+
"aria-label": label.moreDetailsAriaLabel,
|
|
112
|
+
closeToolTipInformationTextAriaLabel: label.closeToolTipInformationTextAriaLabel,
|
|
113
|
+
"data-testid": `review-list-item-tooltip-button-${iconKey}`
|
|
114
|
+
}));
|
|
62
115
|
};
|
|
63
116
|
|
|
64
117
|
const ReviewPresentation = props => {
|
|
@@ -91,23 +144,31 @@ const ReviewPresentation = props => {
|
|
|
91
144
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
92
145
|
key: `step-${key}`,
|
|
93
146
|
className: _style.default.reviewList
|
|
94
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
"data-for": "reviewListItem"
|
|
98
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
99
|
-
className: _style.default.reviewListText
|
|
100
|
-
}, getIcon(key), " ", label.text), /*#__PURE__*/_react.default.createElement(ToolTip, {
|
|
147
|
+
}, /*#__PURE__*/_react.default.createElement(ReviewListItemWrapper, {
|
|
148
|
+
iconKey: key,
|
|
149
|
+
label: label,
|
|
101
150
|
tooltipText: label.tooltipText,
|
|
102
151
|
"aria-label": label.moreDetailsAriaLabel
|
|
103
|
-
}))
|
|
152
|
+
}));
|
|
104
153
|
}, labelsList)));
|
|
105
154
|
};
|
|
106
155
|
|
|
107
156
|
ToolTip.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
108
157
|
tooltipText: _propTypes.default.string,
|
|
109
|
-
'aria-label': _propTypes.default.string
|
|
158
|
+
'aria-label': _propTypes.default.string,
|
|
159
|
+
'data-testid': _propTypes.default.string,
|
|
160
|
+
closeToolTipInformationTextAriaLabel: _propTypes.default.string
|
|
161
|
+
} : {};
|
|
162
|
+
ReviewIcon.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
163
|
+
icon: _propTypes.default.string
|
|
110
164
|
} : {};
|
|
165
|
+
ReviewListItemWrapper.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, ToolTip.propTypes, {
|
|
166
|
+
iconKey: _propTypes.default.string,
|
|
167
|
+
label: _propTypes.default.shape({
|
|
168
|
+
tooltipText: _propTypes.default.string,
|
|
169
|
+
moreDetailsAriaLabel: _propTypes.default.string
|
|
170
|
+
})
|
|
171
|
+
}) : {};
|
|
111
172
|
ReviewPresentation.propTypes = process.env.NODE_ENV !== "production" ? _propTypes2.default : {};
|
|
112
173
|
var _default = ReviewPresentation;
|
|
113
174
|
exports.default = _default;
|