@coorpacademy/components 11.4.5-alpha.37 → 11.4.6-alpha.0
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
|
@@ -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"}
|
|
@@ -21,7 +21,7 @@ const Switch = ({
|
|
|
21
21
|
return /*#__PURE__*/React.createElement(Text, null, "@todo loader");
|
|
22
22
|
|
|
23
23
|
default:
|
|
24
|
-
return /*#__PURE__*/React.createElement(Text, null,
|
|
24
|
+
return /*#__PURE__*/React.createElement(Text, null, `unknown viewName: "${viewName}"`);
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["React","useEffect","Text","StyleSheet","View","BackHandler","Player","styles","create","rootView","flex","alignItems","justifyContent","Switch","viewName","slides","AppReview","props","navigateBack","backAction","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":["React","useEffect","Text","StyleSheet","View","BackHandler","Player","styles","create","rootView","flex","alignItems","justifyContent","Switch","viewName","slides","AppReview","props","navigateBack","backAction","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,OAAOA,KAAP,IAAeC,SAAf,QAA+B,OAA/B;AACA,SAAQC,IAAR,EAAcC,UAAd,EAA0BC,IAA1B,EAAgCC,WAAhC,QAAkD,cAAlD;AAEA,OAAOC,MAAP,MAAmB,UAAnB;AAEA,MAAMC,MAAM,GAAGJ,UAAU,CAACK,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,oBAAC,MAAD,EAAYC,MAAZ,CAAP;;IACF,KAAK,QAAL;MACE,oBAAO,oBAAC,IAAD,uBAAP;;IACF;MACE,oBAAO,oBAAC,IAAD,QAAQ,sBAAqBD,QAAS,GAAtC,CAAP;EANJ;AAQD,CATD;;AAWA,MAAME,SAAS,GAAIC,KAAD,IAA2B;EAC3C,MAAM;IAACC;EAAD,IAAiBD,KAAvB;EAEAhB,SAAS,CAAC,MAAM;IACd,MAAMkB,UAAU,GAAG,MAAM;MACvB,IAAID,YAAJ,EAAkB;QAChBA,YAAY;QACZ,OAAO,IAAP;MACD;IACF,CALD,CADc,CAQd;;;IACA,MAAME,WAAW,GAAGf,WAAW,CAACgB,gBAAZ,CAA6B,mBAA7B,EAAkDF,UAAlD,CAApB;IAEA,OAAO,MAAMC,WAAW,CAACE,MAAZ,EAAb;EACD,CAZQ,EAYN,CAACJ,YAAD,CAZM,CAAT;EAcA,oBACE,oBAAC,IAAD;IAAM,KAAK,EAAEX,MAAM,CAACE;EAApB,gBACE,oBAAC,MAAD,EAAYQ,KAAZ,CADF,CADF;AAKD,CAtBD;;AAwBA,eAAeD,SAAf"}
|
|
@@ -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"}
|
|
@@ -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,M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AAvB,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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ICONS","skills","TargetIcon","questions","QuestionIcon","lifes","HeartIcon","allright","CheckIcon","
|
|
1
|
+
{"version":3,"file":"index.js","names":["ICONS","skills","TargetIcon","questions","QuestionIcon","lifes","HeartIcon","allright","CheckIcon","ReviewIcon","icon","Icon","getOr","style","labelIcon","ToolTip","tooltipText","moreDetailsAriaLabel","dataTestId","closeToolTipInformationTextAriaLabel","toolTipIsVisible","setToolTipIsVisible","useState","handleKeyPress","useCallback","event","key","handleMouseOver","handleMouseLeave","tooltipContainer","tooltipIconContainer","informationIcon","toolTip","ReviewListItemWrapper","iconKey","label","reviewListItemWrapper","reviewListText","text","ReviewPresentation","props","ariaLabel","reviewTitle","reviewText","labelsList","reviewWrapper","__html","reviewListWrapper","map","convert","cap","reviewList","propTypes","PropTypes","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;;AACA;;AACA;;AACA;;AACA;;AAOA;;AACA;;;;;;;;;;AAEA,MAAMA,KAAK,GAAG;EACZC,MAAM,EAAEC,oDADI;EAEZC,SAAS,EAAEC,0DAFC;EAGZC,KAAK,EAAEC,wCAHK;EAIZC,QAAQ,EAAEC;AAJE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,kBAAkB,CAACa,SAAnB,2CAA+BA,mBAA/B;eAEeb,kB"}
|
|
@@ -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;
|
|
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AG,SAAS,CAAC;YACjC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SACnC,GACD,SAAS,CAAC;KACf,CAAC;IACF,OAAO,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACjD,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB,IAAI,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"}
|
|
@@ -10,7 +10,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
10
10
|
const levelItem = _propTypes.default.shape({
|
|
11
11
|
text: _propTypes.default.string,
|
|
12
12
|
tooltipText: _propTypes.default.string,
|
|
13
|
-
moreDetailsAreaLabel: _propTypes.default.string
|
|
13
|
+
moreDetailsAreaLabel: _propTypes.default.string,
|
|
14
|
+
closeToolTipInformationTextAriaLabel: _propTypes.default.string
|
|
14
15
|
});
|
|
15
16
|
|
|
16
17
|
const propTypes = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.js","names":["levelItem","PropTypes","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;;;;AAGA,MAAMA,SAAS,GAAGC,kBAAA,CAAUC,KAAV,CAAgB;EAChCC,IAAI,EAAEF,kBAAA,CAAUG,MADgB;EAEhCC,WAAW,EAAEJ,kBAAA,CAAUG,MAFS;EAGhCE,oBAAoB,EAAEL,kBAAA,CAAUG;
|
|
1
|
+
{"version":3,"file":"prop-types.js","names":["levelItem","PropTypes","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;;;;AAGA,MAAMA,SAAS,GAAGC,kBAAA,CAAUC,KAAV,CAAgB;EAChCC,IAAI,EAAEF,kBAAA,CAAUG,MADgB;EAEhCC,WAAW,EAAEJ,kBAAA,CAAUG,MAFS;EAGhCE,oBAAoB,EAAEL,kBAAA,CAAUG,MAHA;EAIhCG,oCAAoC,EAAEN,kBAAA,CAAUG;AAJhB,CAAhB,CAAlB;;AAOA,MAAMI,SAAS,GAAG;EAChB,cAAcP,kBAAA,CAAUG,MADR;EAEhBK,WAAW,EAAER,kBAAA,CAAUG,MAFP;EAGhBM,UAAU,EAAET,kBAAA,CAAUG,MAHN;EAIhBO,UAAU,EAAEV,kBAAA,CAAUC,KAAV,CAAgB;IAC1BU,MAAM,EAAEZ,SADkB;IAE1Ba,SAAS,EAAEb,SAFe;IAG1Bc,KAAK,EAAEd,SAHmB;IAI1Be,QAAQ,EAAEf;EAJgB,CAAhB;AAJI,CAAlB;eAYeQ,S;;AAER,MAAMQ,oBAAoB,GAAG;EAClCC,OAAO,EAAEhB,kBAAA,CAAUiB;AADe,CAA7B;;AAIA,MAAMC,aAAa,GAAG;EAC3BhB,IAAI,EAAEF,kBAAA,CAAUG,MADW;EAE3BgB,IAAI,EAAEnB,kBAAA,CAAUoB;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"}
|
|
@@ -98,38 +98,28 @@ const Switch = ({
|
|
|
98
98
|
switch (type) {
|
|
99
99
|
case 'qcmDrag':
|
|
100
100
|
return /*#__PURE__*/_react.default.createElement(_qcmDrag.default, _extends({}, model, {
|
|
101
|
-
help: help
|
|
102
|
-
groupAriaLabel: translate('answer_the_question')
|
|
101
|
+
help: help
|
|
103
102
|
}));
|
|
104
103
|
|
|
105
104
|
case 'qcm':
|
|
106
|
-
return /*#__PURE__*/_react.default.createElement(_qcm.default,
|
|
107
|
-
groupAriaLabel: translate('answer_the_question')
|
|
108
|
-
}));
|
|
105
|
+
return /*#__PURE__*/_react.default.createElement(_qcm.default, model);
|
|
109
106
|
|
|
110
107
|
case 'qcmGraphic':
|
|
111
|
-
return /*#__PURE__*/_react.default.createElement(_qcmGraphic.default,
|
|
112
|
-
groupAriaLabel: translate('answer_the_question')
|
|
113
|
-
}));
|
|
108
|
+
return /*#__PURE__*/_react.default.createElement(_qcmGraphic.default, model);
|
|
114
109
|
|
|
115
110
|
case 'freeText':
|
|
116
111
|
return /*#__PURE__*/_react.default.createElement(_freeText.default, model);
|
|
117
112
|
|
|
118
113
|
case 'dropDown':
|
|
119
114
|
return /*#__PURE__*/_react.default.createElement(_dropDown.default, _extends({}, model, {
|
|
120
|
-
"aria-label": translate('drop_down_icon')
|
|
121
|
-
groupAriaLabel: translate('answer_the_question')
|
|
115
|
+
"aria-label": translate('drop_down_icon')
|
|
122
116
|
}));
|
|
123
117
|
|
|
124
118
|
case 'slider':
|
|
125
|
-
return /*#__PURE__*/_react.default.createElement(_questionRange.default,
|
|
126
|
-
groupAriaLabel: translate('answer_the_question')
|
|
127
|
-
}));
|
|
119
|
+
return /*#__PURE__*/_react.default.createElement(_questionRange.default, model);
|
|
128
120
|
|
|
129
121
|
case 'template':
|
|
130
|
-
return /*#__PURE__*/_react.default.createElement(_template.default,
|
|
131
|
-
groupAriaLabel: translate('answer_the_question')
|
|
132
|
-
}));
|
|
122
|
+
return /*#__PURE__*/_react.default.createElement(_template.default, model);
|
|
133
123
|
}
|
|
134
124
|
};
|
|
135
125
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["MediaView","media","videoId","type","childProps","TYPE_IMAGE","style","backgroundImage","url","TYPE_VIDEO","video","TYPE_AUDIO","audio","propTypes","MediaViewPropTypes","Switch","model","help","translate","contextTypes","Provider","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":["MediaView","media","videoId","type","childProps","TYPE_IMAGE","style","backgroundImage","url","TYPE_VIDEO","video","TYPE_AUDIO","audio","propTypes","MediaViewPropTypes","Switch","model","help","translate","contextTypes","Provider","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;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEA,MAAMA,SAAS,GAAG,CAAC;EAACC;AAAD,CAAD,KAAa;EAC7B,MAAM;IAACC,OAAD;IAAUC;EAAV,IAAiCF,KAAvC;EAAA,MAAyBG,UAAzB,iCAAuCH,KAAvC;;EACA,QAAQE,IAAR;IACE,KAAKE,qBAAL;MACE,oBACE;QACE,SAAS,EAAEC,cAAA,CAAML,KADnB;QAEE,KAAK,EAAE;UACLM,eAAe,EAAG,OAAMN,KAAK,CAACO,GAAI;QAD7B;MAFT,EADF;;IAQF,KAAKC,qBAAL;MACE,oBACE;QAAK,SAAS,EAAEH,cAAA,CAAMI;MAAtB,gBACE,6BAAC,oBAAD,eAAiB,oBAAK,IAAL,EAAWN,UAAX,CAAjB;QAAyC,EAAE,EAAEF,OAA7C;QAAsD,MAAM,EAAC,MAA7D;QAAoE,KAAK,EAAC;MAA1E,GADF,CADF;;IAKF,KAAKS,qBAAL;MACE,oBACE;QAAK,SAAS,EAAEL,cAAA,CAAMM;MAAtB,gBACE,6BAAC,cAAD,eAAW,oBAAK,IAAL,EAAWR,UAAX,CAAX;QAAmC,MAAM,EAAC,MAA1C;QAAiD,KAAK,EAAC;MAAvD,GADF,CADF;;IAKF;MACE,OAAO,IAAP;EAvBJ;AAyBD,CA3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AAC,MAAD;IAAQ,KAAK,EAAEe,KAAf;IAAsB,IAAI,EAAEC;EAA5B,EAFF,CADF;AAMD,CATD;;AAWAK,MAAM,CAACT,SAAP,2CAAmBA,kBAAnB;eAEeS,M"}
|
|
@@ -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"}
|