@coorpacademy/components 11.4.5-alpha.37 → 11.4.6-alpha.2
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 +76 -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 +80 -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.js","names":["QCMImage","props","legacyContext","answers","
|
|
1
|
+
{"version":3,"file":"index.js","names":["QCMImage","props","legacyContext","answers","skin","GetSkinFromContext","primarySkinColor","answersViews","map","answer","key","onClick","title","selected","image","ariaLabel","boxShadow","getShadowBoxColorFromPrimary","style","backgroundColor","background","content","imageWrapper","backgroundImage","titleWrapper","classnames","innerHTML","__html","wrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","arrayOf","shape","string","bool","func"],"sources":["../../../../src/molecule/questions/qcm-graphic/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport {getShadowBoxColorFromPrimary} from '../../../util/get-shadow-box-color-from-primary';\nimport style from './style.css';\n\nconst QCMImage = (props, legacyContext) => {\n const {answers} = props;\n const skin = GetSkinFromContext(legacyContext);\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n const answersViews = answers.map((answer, key) => {\n const {onClick, title, selected, image, ariaLabel} = answer;\n\n return (\n <div\n onClick={onClick}\n data-selected={selected}\n data-name=\"answerGraphic\"\n style={{\n ...(selected && {\n boxShadow: `0 4px 16px ${getShadowBoxColorFromPrimary(primarySkinColor)}`\n })\n }}\n className={selected ? style.selected : style.answer}\n key={key}\n >\n <div\n data-name=\"answerBackground\"\n style={{\n backgroundColor: selected ? primarySkinColor : '#F4F4F5'\n }}\n className={style.background}\n />\n <div data-name=\"answerContent\" className={style.content}>\n <div\n className={style.imageWrapper}\n data-name=\"answerImage\"\n aria-label={ariaLabel || title}\n style={{\n backgroundImage: `url(${image})`\n }}\n />\n <div data-name=\"answerText\" className={style.titleWrapper}>\n <div\n title={title}\n className={classnames(style.title, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n </div>\n </div>\n );\n });\n\n return (\n <div data-name=\"qcm-graphic-wrapper\" className={style.wrapper}>\n {answersViews}\n </div>\n );\n};\n\nQCMImage.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nQCMImage.propTypes = {\n answers: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n selected: PropTypes.bool,\n onClick: PropTypes.func,\n image: PropTypes.string,\n ariaLabel: PropTypes.string\n })\n )\n};\n\nexport default QCMImage;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,QAAQ,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EACzC,MAAM;IAACC;EAAD,IAAYF,KAAlB;EACA,MAAMG,IAAI,GAAG,IAAAC,4BAAA,EAAmBH,aAAnB,CAAb;EACA,MAAMI,gBAAgB,GAAG,qBAAM,SAAN,EAAiB,gBAAjB,EAAmCF,IAAnC,CAAzB;EAEA,MAAMG,YAAY,GAAGJ,OAAO,CAACK,GAAR,CAAY,CAACC,MAAD,EAASC,GAAT,KAAiB;IAChD,MAAM;MAACC,OAAD;MAAUC,KAAV;MAAiBC,QAAjB;MAA2BC,KAA3B;MAAkCC;IAAlC,IAA+CN,MAArD;IAEA,oBACE;MACE,OAAO,EAAEE,OADX;MAEE,iBAAeE,QAFjB;MAGE,aAAU,eAHZ;MAIE,KAAK,eACCA,QAAQ,IAAI;QACdG,SAAS,EAAG,cAAa,IAAAC,0DAAA,EAA6BX,gBAA7B,CAA+C;MAD1D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AUK,IAHL;IAIdxB,KAAK,EAAEmB,kBAAA,CAAUG,MAJH;IAKdrB,SAAS,EAAEkB,kBAAA,CAAUG;EALP,CAAhB,CADO;AADU,CAArB;eAYepC,Q"}
|
|
@@ -28,7 +28,6 @@ declare namespace QuestionRange {
|
|
|
28
28
|
title: PropTypes.Requireable<string>;
|
|
29
29
|
minLabel: PropTypes.Requireable<string>;
|
|
30
30
|
maxLabel: PropTypes.Requireable<string>;
|
|
31
|
-
groupAriaLabel: PropTypes.Requireable<string>;
|
|
32
31
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
33
32
|
onChangeEnd: PropTypes.Requireable<(...args: any[]) => any>;
|
|
34
33
|
multi: PropTypes.Requireable<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/molecule/questions/question-range/index.js"],"names":[],"mappings":";AAQA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/molecule/questions/question-range/index.js"],"names":[],"mappings":";AAQA,4EAiCC"}
|
|
@@ -17,7 +17,7 @@ var _range = _interopRequireDefault(require("../../../atom/range"));
|
|
|
17
17
|
|
|
18
18
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
19
19
|
|
|
20
|
-
const _excluded = ["title", "minLabel", "maxLabel"
|
|
20
|
+
const _excluded = ["title", "minLabel", "maxLabel"];
|
|
21
21
|
|
|
22
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
23
|
|
|
@@ -33,8 +33,7 @@ const QuestionRange = (props, legacyContext) => {
|
|
|
33
33
|
const {
|
|
34
34
|
title,
|
|
35
35
|
minLabel,
|
|
36
|
-
maxLabel
|
|
37
|
-
groupAriaLabel
|
|
36
|
+
maxLabel
|
|
38
37
|
} = props,
|
|
39
38
|
rangeProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
40
39
|
|
|
@@ -43,10 +42,8 @@ const QuestionRange = (props, legacyContext) => {
|
|
|
43
42
|
const titleStyle = {
|
|
44
43
|
color: defaultColor
|
|
45
44
|
};
|
|
46
|
-
return /*#__PURE__*/_react.default.createElement("
|
|
47
|
-
className: _style.default.wrapper
|
|
48
|
-
role: "group",
|
|
49
|
-
"aria-label": groupAriaLabel
|
|
45
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
46
|
+
className: _style.default.wrapper
|
|
50
47
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
51
48
|
style: titleStyle,
|
|
52
49
|
className: (0, _classnames.default)(_style.default.title, _style.default.innerHTML) // eslint-disable-next-line react/no-danger
|
|
@@ -68,7 +65,7 @@ const QuestionRange = (props, legacyContext) => {
|
|
|
68
65
|
dangerouslySetInnerHTML: {
|
|
69
66
|
__html: maxLabel
|
|
70
67
|
}
|
|
71
|
-
})))
|
|
68
|
+
})));
|
|
72
69
|
};
|
|
73
70
|
|
|
74
71
|
QuestionRange.contextTypes = {
|
|
@@ -77,8 +74,7 @@ QuestionRange.contextTypes = {
|
|
|
77
74
|
QuestionRange.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, _range.default.propTypes, {
|
|
78
75
|
title: _propTypes.default.string,
|
|
79
76
|
minLabel: _propTypes.default.string,
|
|
80
|
-
maxLabel: _propTypes.default.string
|
|
81
|
-
groupAriaLabel: _propTypes.default.string
|
|
77
|
+
maxLabel: _propTypes.default.string
|
|
82
78
|
}) : {};
|
|
83
79
|
var _default = QuestionRange;
|
|
84
80
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["QuestionRange","props","legacyContext","title","minLabel","maxLabel","
|
|
1
|
+
{"version":3,"file":"index.js","names":["QuestionRange","props","legacyContext","title","minLabel","maxLabel","rangeProps","skin","GetSkinFromContext","defaultColor","titleStyle","color","style","wrapper","classnames","innerHTML","__html","labelWrapper","label","contextTypes","Provider","childContextTypes","propTypes","Range","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;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEA,MAAMA,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,GAAG,IAAAC,4BAAA,EAAmB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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"}
|
|
@@ -29,8 +29,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
29
29
|
|
|
30
30
|
const Template = ({
|
|
31
31
|
template,
|
|
32
|
-
answers
|
|
33
|
-
groupAriaLabel
|
|
32
|
+
answers
|
|
34
33
|
}) => {
|
|
35
34
|
const totalTemplate = (0, _parseTemplateString.default)(template);
|
|
36
35
|
|
|
@@ -73,12 +72,10 @@ const Template = ({
|
|
|
73
72
|
}
|
|
74
73
|
}, totalTemplate);
|
|
75
74
|
|
|
76
|
-
return /*#__PURE__*/_react.default.createElement("
|
|
75
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
77
76
|
"data-name": "template-wrapper",
|
|
78
|
-
className: _style.default.wrapper
|
|
79
|
-
|
|
80
|
-
"aria-label": groupAriaLabel
|
|
81
|
-
}, templateCompose));
|
|
77
|
+
className: _style.default.wrapper
|
|
78
|
+
}, templateCompose);
|
|
82
79
|
};
|
|
83
80
|
|
|
84
81
|
const TextPropTypes = process.env.NODE_ENV !== "production" ? _extends({}, _dropDown.default.propTypes, {
|
|
@@ -86,8 +83,7 @@ const TextPropTypes = process.env.NODE_ENV !== "production" ? _extends({}, _drop
|
|
|
86
83
|
}) : {};
|
|
87
84
|
Template.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
88
85
|
template: _propTypes.default.string,
|
|
89
|
-
answers: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.shape(_dropDown.default.propTypes), _propTypes.default.shape(TextPropTypes)]))
|
|
90
|
-
groupAriaLabel: _propTypes.default.string
|
|
86
|
+
answers: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.shape(_dropDown.default.propTypes), _propTypes.default.shape(TextPropTypes)]))
|
|
91
87
|
} : {};
|
|
92
88
|
var _default = Template;
|
|
93
89
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Template","template","answers","
|
|
1
|
+
{"version":3,"file":"index.js","names":["Template","template","answers","totalTemplate","parseTemplateString","templateCompose","convert","cap","part","key","type","style","textPart","__html","value","field","name","fieldType","fieldProps","fieldView","text","answerType","wrapper","TextPropTypes","DropDown","propTypes","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;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,QAAQ,GAAG,CAAC;EAACC,QAAD;EAAWC;AAAX,CAAD,KAAyB;EACxC,MAAMC,aAAa,GAAG,IAAAC,4BAAA,EAAoBH,QAApB,CAAtB;;EACA,MAAMI,eAAe,GAAG,cAAIC,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,EAAu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gBP,aAAhB,CAAtC,CAApB,CADO;AAFU,CAArB;eAOevB,Q"}
|
|
@@ -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"}
|
|
@@ -59,23 +59,19 @@ Settings.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, _input
|
|
|
59
59
|
const UserPreferences = props => {
|
|
60
60
|
const {
|
|
61
61
|
preferences = [],
|
|
62
|
-
moreInfoAriaLabel
|
|
63
|
-
groupAriaLabel
|
|
62
|
+
moreInfoAriaLabel
|
|
64
63
|
} = props;
|
|
65
|
-
return /*#__PURE__*/_react.default.createElement("
|
|
66
|
-
className: _style.default.preferences
|
|
67
|
-
role: "group",
|
|
68
|
-
"aria-label": groupAriaLabel
|
|
64
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
65
|
+
className: _style.default.preferences
|
|
69
66
|
}, (0, _map2.default)(settings => /*#__PURE__*/_react.default.createElement(Settings, _extends({}, settings, {
|
|
70
67
|
key: settings.label,
|
|
71
68
|
moreInfoAriaLabel: moreInfoAriaLabel
|
|
72
|
-
})), preferences))
|
|
69
|
+
})), preferences));
|
|
73
70
|
};
|
|
74
71
|
|
|
75
72
|
UserPreferences.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
76
73
|
preferences: _propTypes.default.arrayOf(_propTypes.default.shape(Settings.propTypes)),
|
|
77
|
-
moreInfoAriaLabel: _propTypes.default.string
|
|
78
|
-
groupAriaLabel: _propTypes.default.string
|
|
74
|
+
moreInfoAriaLabel: _propTypes.default.string
|
|
79
75
|
} : {};
|
|
80
76
|
var _default = UserPreferences;
|
|
81
77
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Settings","props","label","description","moreInfoAriaLabel","settings","style","infoIconWrapper","infoIcon","showToolTip","descriptionLabel","propTypes","InputSwitch","PropTypes","string","isRequired","UserPreferences","preferences","
|
|
1
|
+
{"version":3,"file":"index.js","names":["Settings","props","label","description","moreInfoAriaLabel","settings","style","infoIconWrapper","infoIcon","showToolTip","descriptionLabel","propTypes","InputSwitch","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;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,QAAQ,GAAGC,KAAK,IAAI;EACxB,MAAM;IAACC,KAAD;IAAQC,WAAR;IAAqBC;EAArB,IAAuDH,KAA7D;EAAA,MAAiDI,QAAjD,iCAA6DJ,KAA7D;;EACA,oBACE;IAAK,SAAS,EAAEK,cAAA,CAAMD;EAAtB,gBACE,6BAAC,oBAAD,EAAiBA,QAAjB,CADF,eAEE;IAAM,SAAS,EAAEC,cAAA,CAAMJ;EAAvB,GAA+BA,KAA/B,CAFF,EAGG,uBAAQC,WAAR,IAAuB,IAAvB,gBACC;IAAK,SAAS,EAAEG,cAAA,CAAMC;EAAtB,gBACE,6BAAC,qDAAD;IACE,MAAM,EAAE,EADV;IAEE,KAAK,EAAE,EAFT;IAGE,SAAS,EAAED,cAAA,CAAME,QAHnB;IAIE,cAAYJ;EAJd,EADF,eAOE;IAAK,SAAS,EAAEE,cAAA,CAAMG;EAAtB,gBACE;IAAK,SAAS,EAAEH,cAAA,CAAMI;EAAtB,GAAyCP,WAAzC,CADF,CAPF,CAJJ,CADF;AAmBD,CArBD;;AAuBAH,QAAQ,CAACW,SAAT,wDACKC,oBAAA,CAAYD,SADjB;EAEET,KAAK,EAAEW,kBAAA,CAAUC,MAAV,CAAiBC,UAF1B;EAGEZ,WAAW,EAAEU,kBAAA,CAAUC;AAHzB;;AAMA,MAAME,eAAe,GAAGf,KAAK,IAAI;EAC/B,MAAM;IAACgB,WAAW,GAAG,EAAf;IAAmBb;EAAnB,IAAwCH,KAA9C;EAEA,oBACE;IAAK,SAAS,EAAEK,cAAA,CAAMW;EAAtB,GACG,mBACCZ,QAAQ,iBACN,6BAAC,QAAD,eAAcA,QAAd;IAAwB,GAAG,EAAEA,QAAQ,CAACH,KAAtC;IAA6C,iBAAiB,EAAEE;EAAhE,GAFH,EAICa,WAJD,CADH,CADF;AAUD,CAbD;;AAeAD,eAAe,CAACL,SAAhB,2CAA4B;EAC1BM,WAAW,EAAEJ,kBAAA,CAAUK,OAAV,CAAkBL,kBAAA,CAAUM,KAAV,CAAgBnB,QAAQ,CAACW,SAAzB,CAAlB,CADa;EAE1BP,iBAAiB,EAAES,kBAAA,CAAUC;AAFH,CAA5B;eAKeE,e"}
|
|
@@ -35,7 +35,7 @@ const Switch = ({
|
|
|
35
35
|
return /*#__PURE__*/_react.default.createElement(_reactNative.Text, null, "@todo loader");
|
|
36
36
|
|
|
37
37
|
default:
|
|
38
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.Text, null,
|
|
38
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.Text, null, `unknown viewName: "${viewName}"`);
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["styles","StyleSheet","create","rootView","flex","alignItems","justifyContent","Switch","viewName","slides","AppReview","props","navigateBack","useEffect","backAction","backHandler","BackHandler","addEventListener","remove"],"sources":["../../../src/template/app-review/index.native.tsx"],"sourcesContent":["import React, {useEffect} from 'react';\nimport {Text, StyleSheet, View, BackHandler} from 'react-native';\nimport {AppReviewProps} from './prop-types';\nimport Player from './player';\n\nconst styles = StyleSheet.create({\n rootView: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center'\n }\n});\n\nconst Switch = ({viewName, slides}: AppReviewProps) => {\n switch (viewName) {\n case 'slides':\n return <Player {...slides} />;\n case 'loader':\n return <Text>@todo loader</Text>;\n default:\n return <Text>unknown
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["styles","StyleSheet","create","rootView","flex","alignItems","justifyContent","Switch","viewName","slides","AppReview","props","navigateBack","useEffect","backAction","backHandler","BackHandler","addEventListener","remove"],"sources":["../../../src/template/app-review/index.native.tsx"],"sourcesContent":["import React, {useEffect} from 'react';\nimport {Text, StyleSheet, View, BackHandler} from 'react-native';\nimport {AppReviewProps} from './prop-types';\nimport Player from './player';\n\nconst styles = StyleSheet.create({\n rootView: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center'\n }\n});\n\nconst Switch = ({viewName, slides}: AppReviewProps) => {\n switch (viewName) {\n case 'slides':\n return <Player {...slides} />;\n case 'loader':\n return <Text>@todo loader</Text>;\n default:\n return <Text>{`unknown viewName: \"${viewName}\"`}</Text>;\n }\n};\n\nconst AppReview = (props: AppReviewProps) => {\n const {navigateBack} = props;\n\n useEffect(() => {\n const backAction = () => {\n if (navigateBack) {\n navigateBack();\n return true;\n }\n };\n\n // https://reactnative.dev/docs/backhandler\n const backHandler = BackHandler.addEventListener('hardwareBackPress', backAction);\n\n return () => backHandler.remove();\n }, [navigateBack]);\n\n return (\n <View style={styles.rootView}>\n <Switch {...props} />\n </View>\n );\n};\n\nexport default AppReview;\n"],"mappings":";;;;;AAAA;;AACA;;AAEA;;;;;;;;AAEA,MAAMA,MAAM,GAAGC,uBAAA,CAAWC,MAAX,CAAkB;EAC/BC,QAAQ,EAAE;IACRC,IAAI,EAAE,CADE;IAERC,UAAU,EAAE,QAFJ;IAGRC,cAAc,EAAE;EAHR;AADqB,CAAlB,CAAf;;AAQA,MAAMC,MAAM,GAAG,CAAC;EAACC,QAAD;EAAWC;AAAX,CAAD,KAAwC;EACrD,QAAQD,QAAR;IACE,KAAK,QAAL;MACE,oBAAO,6BAAC,eAAD,EAAYC,MAAZ,CAAP;;IACF,KAAK,QAAL;MACE,oBAAO,6BAAC,iBAAD,uBAAP;;IACF;MACE,oBAAO,6BAAC,iBAAD,QAAQ,sBAAqBD,QAAS,GAAtC,CAAP;EANJ;AAQD,CATD;;AAWA,MAAME,SAAS,GAAIC,KAAD,IAA2B;EAC3C,MAAM;IAACC;EAAD,IAAiBD,KAAvB;EAEA,IAAAE,gBAAA,EAAU,MAAM;IACd,MAAMC,UAAU,GAAG,MAAM;MACvB,IAAIF,YAAJ,EAAkB;QAChBA,YAAY;QACZ,OAAO,IAAP;MACD;IACF,CALD,CADc,CAQd;;;IACA,MAAMG,WAAW,GAAGC,wBAAA,CAAYC,gBAAZ,CAA6B,mBAA7B,EAAkDH,UAAlD,CAApB;;IAEA,OAAO,MAAMC,WAAW,CAACG,MAAZ,EAAb;EACD,CAZD,EAYG,CAACN,YAAD,CAZH;EAcA,oBACE,6BAAC,iBAAD;IAAM,KAAK,EAAEZ,MAAM,CAACG;EAApB,gBACE,6BAAC,MAAD,EAAYQ,KAAZ,CADF,CADF;AAKD,CAtBD;;eAwBeD,S"}
|
|
@@ -64,7 +64,6 @@ declare namespace SearchPage {
|
|
|
64
64
|
onToggleSorts: PropTypes.Requireable<(...args: any[]) => any>;
|
|
65
65
|
moreSortAriaLabel: PropTypes.Requireable<string>;
|
|
66
66
|
moreFilterAriaLabel: PropTypes.Requireable<string>;
|
|
67
|
-
filterGroupAriaLabel: PropTypes.Requireable<string>;
|
|
68
67
|
}>>;
|
|
69
68
|
const cards: PropTypes.Requireable<PropTypes.InferProps<{
|
|
70
69
|
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
@@ -101,7 +100,6 @@ declare namespace SearchPage {
|
|
|
101
100
|
}>>;
|
|
102
101
|
const moreSortAriaLabel: PropTypes.Requireable<string>;
|
|
103
102
|
const moreFilterAriaLabel: PropTypes.Requireable<string>;
|
|
104
|
-
const filterGroupAriaLabel: PropTypes.Requireable<string>;
|
|
105
103
|
}
|
|
106
104
|
}
|
|
107
105
|
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"}
|
|
@@ -36,8 +36,7 @@ const SearchPage = (props, context) => {
|
|
|
36
36
|
clearFilters,
|
|
37
37
|
recommendations,
|
|
38
38
|
moreSortAriaLabel,
|
|
39
|
-
moreFilterAriaLabel
|
|
40
|
-
filterGroupAriaLabel
|
|
39
|
+
moreFilterAriaLabel
|
|
41
40
|
} = props;
|
|
42
41
|
const {
|
|
43
42
|
skin
|
|
@@ -58,8 +57,7 @@ const SearchPage = (props, context) => {
|
|
|
58
57
|
}))), recommendationsView) : /*#__PURE__*/_react.default.createElement(_cardsGrid.default, cards);
|
|
59
58
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_filters.default, _extends({}, searchFilters, {
|
|
60
59
|
moreSortAriaLabel: moreSortAriaLabel,
|
|
61
|
-
moreFilterAriaLabel: moreFilterAriaLabel
|
|
62
|
-
filterGroupAriaLabel: filterGroupAriaLabel
|
|
60
|
+
moreFilterAriaLabel: moreFilterAriaLabel
|
|
63
61
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
64
62
|
"data-name": "searchResult",
|
|
65
63
|
className: _style.default.cardsWrapper
|
|
@@ -80,8 +78,7 @@ SearchPage.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
80
78
|
clearFilters: _propTypes.default.shape(_button.default.propTypes),
|
|
81
79
|
recommendations: _propTypes.default.shape(_cardsList.default.propTypes),
|
|
82
80
|
moreSortAriaLabel: _propTypes.default.string,
|
|
83
|
-
moreFilterAriaLabel: _propTypes.default.string
|
|
84
|
-
filterGroupAriaLabel: _propTypes.default.string
|
|
81
|
+
moreFilterAriaLabel: _propTypes.default.string
|
|
85
82
|
} : {};
|
|
86
83
|
var _default = SearchPage;
|
|
87
84
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["SearchPage","props","context","title","searchFilters","cards","noresultsfound","clearFilters","recommendations","moreSortAriaLabel","moreFilterAriaLabel","
|
|
1
|
+
{"version":3,"file":"index.js","names":["SearchPage","props","context","title","searchFilters","cards","noresultsfound","clearFilters","recommendations","moreSortAriaLabel","moreFilterAriaLabel","skin","defaultColor","recommendationsView","cardsView","list","style","noresults","noresultstxt","clear","background","cardsWrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","shape","Filters","CardsGrid","Button","CardsList"],"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;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,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,qBAAM,SAAN,EAAiB,gBAAjB,EAAmCD,IAAnC,CAArB;EAEA,MAAME,mBAAmB,GAAG,uBAAQL,eAAR,IAA2B,IAA3B,gBAAkC,6BAAC,kBAAD,EAAeA,eAAf,CAA9D;EAEA,MAAMM,SAAS,GAAG,uBAAQT,KAAK,CAACU,IAAd,iBAChB,uDACE;IAAK,SAAS,EAAEC,cAAA,CAAMC;EAAtB,gBACE;IAAK,SAAS,EAAED,cAAA,CAAME;EAAtB,GAAqCZ,cAArC,CADF,eAEE,6BAAC,eAAD,eACMC,YADN;IAEE,aAAU,iBAFZ;IAGE,SAAS,EAAES,cAAA,CAAMG,KAHnB;IAIE,KAAK,EAAE;MAACC,UAAU,EAAER;IAAb,CAJT;IAKE,IAAI,EAAC;EALP,GAFF,CADF,EAWGC,mBAXH,CADgB,gBAehB,6BAAC,kBAAD,EAAeR,KAAf,CAfF;EAkBA,oBACE,uDACE,6BAAC,gBAAD,eACMD,aADN;IAEE,iBAAiB,EAAEK,iBAFrB;IAGE,mBAAmB,EAAEC;EAHvB,GADF,eAME;IAAK,aAAU,cAAf;IAA8B,SAAS,EAAEM,cAAA,CAAMK;EAA/C,gBACE;IAAK,SAAS,EAAEL,cAAA,CAAMb,KAAtB;IAA6B,IAAI,EAAC;EAAlC,GACGA,KADH,CADF,EAIGW,SAJH,CANF,CADF;AAeD,CAlDD;;AAoDAd,UAAU,CAACsB,YAAX,GAA0B;EACxBX,IAAI,EAAEY,iBAAA,CAASC,iBAAT,CAA2Bb;AADT,CAA1B;AAIAX,UAAU,CAACyB,SAAX,2CAAuB;EACrBnB,cAAc,EAAEoB,kBAAA,CAAUC,MADL;EAErBxB,KAAK,EAAEuB,kBAAA,CAAUC,MAFI;EAGrBvB,aAAa,EAAEsB,kBAAA,CAAUE,KAAV,CAAgBC,gBAAA,CAAQJ,SAAxB,CAHM;EAIrBpB,KAAK,EAAEqB,kBAAA,CAAUE,KAAV,CAAgBE,kBAAA,CAAUL,SAA1B,CAJc;EAKrBlB,YAAY,EAAEmB,kBAAA,CAAUE,KAAV,CAAgBG,eAAA,CAAON,SAAvB,CALO;EAMrBjB,eAAe,EAAEkB,kBAAA,CAAUE,KAAV,CAAgBI,kBAAA,CAAUP,SAA1B,CANI;EAOrBhB,iBAAiB,EAAEiB,kBAAA,CAAUC,MAPR;EAQrBjB,mBAAmB,EAAEgB,kBAAA,CAAUC;AARV,CAAvB;eAWe3B,U"}
|
|
@@ -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
|
}>>;
|
package/locales/en/global.json
CHANGED
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
"Delete": "Delete",
|
|
22
22
|
"Draft": "Draft",
|
|
23
23
|
"drop_down_icon": "Dropdown to open the list of available answers",
|
|
24
|
-
"answer_the_question": "Answer the question",
|
|
25
24
|
"Edit": "Edit",
|
|
26
25
|
"external_content_article": "DOCUMENTS",
|
|
27
26
|
"external_content_scorm": "ANIMATED RESOURCES",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/components",
|
|
3
|
-
"version": "11.4.
|
|
3
|
+
"version": "11.4.6-alpha.2+26cd7c4bd",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -160,5 +160,5 @@
|
|
|
160
160
|
"last 2 versions",
|
|
161
161
|
"IE 11"
|
|
162
162
|
],
|
|
163
|
-
"gitHead": "
|
|
163
|
+
"gitHead": "26cd7c4bdcf51dbcf686e1092a7237f60f7e25c2"
|
|
164
164
|
}
|