@coorpacademy/components 11.2.10 → 11.2.12-alpha.1
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/lottie-wrapper/index.d.ts.map +1 -1
- package/es/atom/lottie-wrapper/index.js +9 -3
- package/es/atom/lottie-wrapper/index.js.map +1 -1
- package/es/atom/lottie-wrapper/prop-types.d.ts +2 -2
- package/es/atom/lottie-wrapper/prop-types.d.ts.map +1 -1
- package/es/atom/lottie-wrapper/prop-types.js +1 -1
- package/es/atom/lottie-wrapper/prop-types.js.map +1 -1
- package/es/atom/review-presentation/index.d.ts.map +1 -1
- package/es/atom/review-presentation/index.js +9 -5
- package/es/atom/review-presentation/index.js.map +1 -1
- package/es/atom/review-presentation/prop-types.d.ts +8 -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/molecule/add-to-my-list/index.js +3 -1
- package/es/molecule/add-to-my-list/index.js.map +1 -1
- package/es/molecule/card/notification.js +3 -1
- package/es/molecule/card/notification.js.map +1 -1
- package/es/molecule/forum/forum-post/index.d.ts.map +1 -1
- package/es/molecule/forum/forum-post/index.js +2 -1
- package/es/molecule/forum/forum-post/index.js.map +1 -1
- package/es/molecule/review-card-congrats/prop-types.d.ts +1 -1
- package/es/molecule/share/index.d.ts.map +1 -1
- package/es/molecule/share/index.js +7 -2
- package/es/molecule/share/index.js.map +1 -1
- package/es/organism/review-congrats/index.d.ts.map +1 -1
- package/es/organism/review-congrats/index.js +8 -6
- package/es/organism/review-congrats/index.js.map +1 -1
- package/es/organism/review-congrats/prop-types.d.ts +3 -3
- package/es/organism/user-preferences/index.d.ts +1 -0
- package/es/organism/user-preferences/index.d.ts.map +1 -1
- package/es/organism/user-preferences/index.js +11 -6
- package/es/organism/user-preferences/index.js.map +1 -1
- package/es/template/activity/index.d.ts +2 -0
- package/es/template/activity/index.d.ts.map +1 -1
- package/es/template/activity/index.js +4 -1
- package/es/template/activity/index.js.map +1 -1
- package/es/template/activity/progression-item.d.ts +1 -0
- package/es/template/activity/progression-item.d.ts.map +1 -1
- package/es/template/activity/progression-item.js +5 -2
- package/es/template/activity/progression-item.js.map +1 -1
- package/es/template/app-review/index.d.ts +4 -47
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/index.js +0 -10
- package/es/template/app-review/index.js.map +1 -1
- package/es/template/app-review/index.native.d.ts.map +1 -1
- package/es/template/app-review/index.native.js +0 -8
- package/es/template/app-review/index.native.js.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +3 -3
- package/es/template/app-review/prop-types.d.ts +4 -51
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.js +1 -5
- package/es/template/app-review/prop-types.js.map +1 -1
- package/es/template/common/search-page/index.d.ts.map +1 -1
- package/es/template/common/search-page/index.js +2 -1
- 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/lottie-wrapper/index.d.ts.map +1 -1
- package/lib/atom/lottie-wrapper/index.js +9 -3
- package/lib/atom/lottie-wrapper/index.js.map +1 -1
- package/lib/atom/lottie-wrapper/prop-types.d.ts +2 -2
- package/lib/atom/lottie-wrapper/prop-types.d.ts.map +1 -1
- package/lib/atom/lottie-wrapper/prop-types.js +1 -1
- package/lib/atom/lottie-wrapper/prop-types.js.map +1 -1
- package/lib/atom/review-presentation/index.d.ts.map +1 -1
- package/lib/atom/review-presentation/index.js +9 -5
- package/lib/atom/review-presentation/index.js.map +1 -1
- package/lib/atom/review-presentation/prop-types.d.ts +8 -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/molecule/add-to-my-list/index.js +3 -1
- package/lib/molecule/add-to-my-list/index.js.map +1 -1
- package/lib/molecule/card/notification.js +3 -1
- package/lib/molecule/card/notification.js.map +1 -1
- package/lib/molecule/forum/forum-post/index.d.ts.map +1 -1
- package/lib/molecule/forum/forum-post/index.js +2 -1
- package/lib/molecule/forum/forum-post/index.js.map +1 -1
- package/lib/molecule/review-card-congrats/prop-types.d.ts +1 -1
- package/lib/molecule/share/index.d.ts.map +1 -1
- package/lib/molecule/share/index.js +7 -2
- package/lib/molecule/share/index.js.map +1 -1
- package/lib/organism/review-congrats/index.d.ts.map +1 -1
- package/lib/organism/review-congrats/index.js +3 -1
- package/lib/organism/review-congrats/index.js.map +1 -1
- package/lib/organism/review-congrats/prop-types.d.ts +3 -3
- package/lib/organism/user-preferences/index.d.ts +1 -0
- package/lib/organism/user-preferences/index.d.ts.map +1 -1
- package/lib/organism/user-preferences/index.js +11 -6
- package/lib/organism/user-preferences/index.js.map +1 -1
- package/lib/template/activity/index.d.ts +2 -0
- package/lib/template/activity/index.d.ts.map +1 -1
- package/lib/template/activity/index.js +4 -1
- package/lib/template/activity/index.js.map +1 -1
- package/lib/template/activity/progression-item.d.ts +1 -0
- package/lib/template/activity/progression-item.d.ts.map +1 -1
- package/lib/template/activity/progression-item.js +5 -2
- package/lib/template/activity/progression-item.js.map +1 -1
- package/lib/template/app-review/index.d.ts +4 -47
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/index.js +0 -12
- package/lib/template/app-review/index.js.map +1 -1
- package/lib/template/app-review/index.native.d.ts.map +1 -1
- package/lib/template/app-review/index.native.js +0 -9
- package/lib/template/app-review/index.native.js.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +3 -3
- package/lib/template/app-review/prop-types.d.ts +4 -51
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.js +1 -7
- package/lib/template/app-review/prop-types.js.map +1 -1
- package/lib/template/common/search-page/index.d.ts.map +1 -1
- package/lib/template/common/search-page/index.js +2 -1
- package/lib/template/common/search-page/index.js.map +1 -1
- package/lib/template/review-dashboard-skills/index.d.ts +4 -0
- package/package.json +2 -2
|
@@ -1,60 +1,13 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
import Onboarding from './onboarding';
|
|
3
|
-
import { ReviewSkillsProps } from './skills/prop-types';
|
|
4
2
|
import { ReviewPlayerProps } from './player/prop-types';
|
|
5
|
-
export declare type ViewName = '
|
|
3
|
+
export declare type ViewName = 'slides' | 'loader';
|
|
6
4
|
export declare type AppReviewProps = {
|
|
7
5
|
viewName: ViewName;
|
|
8
6
|
slides?: ReviewPlayerProps;
|
|
9
|
-
skills?: ReviewSkillsProps;
|
|
10
|
-
onboarding?: PropTypes.InferProps<typeof Onboarding.propTypes>;
|
|
11
7
|
navigateBack?: () => void;
|
|
12
8
|
};
|
|
13
9
|
declare const propTypes: {
|
|
14
10
|
viewName: PropTypes.Requireable<string>;
|
|
15
|
-
onboarding: PropTypes.Requireable<PropTypes.InferProps<{
|
|
16
|
-
'aria-label': PropTypes.Requireable<string>;
|
|
17
|
-
reviewTitle: PropTypes.Requireable<string>;
|
|
18
|
-
reviewText: PropTypes.Requireable<string>;
|
|
19
|
-
labelsList: PropTypes.Requireable<PropTypes.InferProps<{
|
|
20
|
-
skills: PropTypes.Requireable<PropTypes.InferProps<{
|
|
21
|
-
text: PropTypes.Requireable<string>;
|
|
22
|
-
tooltipText: PropTypes.Requireable<string>;
|
|
23
|
-
}>>;
|
|
24
|
-
questions: PropTypes.Requireable<PropTypes.InferProps<{
|
|
25
|
-
text: PropTypes.Requireable<string>;
|
|
26
|
-
tooltipText: PropTypes.Requireable<string>;
|
|
27
|
-
}>>;
|
|
28
|
-
lifes: PropTypes.Requireable<PropTypes.InferProps<{
|
|
29
|
-
text: PropTypes.Requireable<string>;
|
|
30
|
-
tooltipText: PropTypes.Requireable<string>;
|
|
31
|
-
}>>;
|
|
32
|
-
allright: PropTypes.Requireable<PropTypes.InferProps<{
|
|
33
|
-
text: PropTypes.Requireable<string>;
|
|
34
|
-
tooltipText: PropTypes.Requireable<string>;
|
|
35
|
-
}>>;
|
|
36
|
-
}>>;
|
|
37
|
-
}>>;
|
|
38
|
-
skills: PropTypes.Requireable<PropTypes.InferProps<{
|
|
39
|
-
'aria-label': PropTypes.Requireable<string>;
|
|
40
|
-
title: PropTypes.Requireable<string>;
|
|
41
|
-
isLoading: PropTypes.Requireable<boolean>;
|
|
42
|
-
isLoadingAriaLabel: PropTypes.Requireable<string>;
|
|
43
|
-
listSkills: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
44
|
-
'aria-label': PropTypes.Requireable<string>;
|
|
45
|
-
skillTitle: PropTypes.Requireable<string>;
|
|
46
|
-
skillAriaLabel: PropTypes.Requireable<string>;
|
|
47
|
-
buttonLabel: PropTypes.Requireable<string>;
|
|
48
|
-
buttonAriaLabel: PropTypes.Requireable<string>;
|
|
49
|
-
reviseLabel: PropTypes.Requireable<string>;
|
|
50
|
-
reviseAriaLabel: PropTypes.Requireable<string>;
|
|
51
|
-
isCustom: PropTypes.Requireable<boolean>;
|
|
52
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
53
|
-
}> | null | undefined)[]>;
|
|
54
|
-
titleNoSkills: PropTypes.Requireable<string>;
|
|
55
|
-
textNoSkills: PropTypes.Requireable<string>;
|
|
56
|
-
iconSkillAriaLabel: PropTypes.Requireable<string>;
|
|
57
|
-
}>>;
|
|
58
11
|
slides: PropTypes.Requireable<PropTypes.InferProps<{
|
|
59
12
|
header: PropTypes.Requireable<PropTypes.InferProps<{
|
|
60
13
|
steps: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
@@ -475,7 +428,7 @@ declare const propTypes: {
|
|
|
475
428
|
'aria-label': PropTypes.Requireable<string>;
|
|
476
429
|
'data-name': PropTypes.Requireable<string>;
|
|
477
430
|
animationLottie: PropTypes.Requireable<PropTypes.InferProps<{
|
|
478
|
-
'aria-label': PropTypes.
|
|
431
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
479
432
|
'data-name': PropTypes.Requireable<string>;
|
|
480
433
|
animationSrc: PropTypes.Validator<string>;
|
|
481
434
|
loop: PropTypes.Requireable<boolean>;
|
|
@@ -496,7 +449,7 @@ declare const propTypes: {
|
|
|
496
449
|
'aria-label': PropTypes.Requireable<string>;
|
|
497
450
|
'data-name': PropTypes.Requireable<string>;
|
|
498
451
|
animationLottie: PropTypes.Requireable<PropTypes.InferProps<{
|
|
499
|
-
'aria-label': PropTypes.
|
|
452
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
500
453
|
'data-name': PropTypes.Requireable<string>;
|
|
501
454
|
animationSrc: PropTypes.Validator<string>;
|
|
502
455
|
loop: PropTypes.Requireable<boolean>;
|
|
@@ -524,7 +477,7 @@ declare const propTypes: {
|
|
|
524
477
|
'aria-label': PropTypes.Requireable<string>;
|
|
525
478
|
'data-name': PropTypes.Requireable<string>;
|
|
526
479
|
animationLottie: PropTypes.Requireable<PropTypes.InferProps<{
|
|
527
|
-
'aria-label': PropTypes.
|
|
480
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
528
481
|
'data-name': PropTypes.Requireable<string>;
|
|
529
482
|
animationSrc: PropTypes.Validator<string>;
|
|
530
483
|
loop: PropTypes.Requireable<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/template/app-review/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/template/app-review/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAEtD,oBAAY,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE3C,oBAAY,cAAc,GAAG;IAC3B,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAEF,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import Onboarding from './onboarding';
|
|
5
|
-
import Skills from './skills';
|
|
6
4
|
import Player from './player';
|
|
7
5
|
const propTypes = {
|
|
8
|
-
viewName: PropTypes.oneOf(['
|
|
9
|
-
onboarding: PropTypes.shape(_extends({}, Onboarding.propTypes)),
|
|
10
|
-
skills: PropTypes.shape(_extends({}, Skills.propTypes)),
|
|
6
|
+
viewName: PropTypes.oneOf(['slides', 'loader']),
|
|
11
7
|
slides: PropTypes.shape(_extends({}, Player.propTypes))
|
|
12
8
|
};
|
|
13
9
|
export default propTypes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.js","names":["PropTypes","
|
|
1
|
+
{"version":3,"file":"prop-types.js","names":["PropTypes","Player","propTypes","viewName","oneOf","slides","shape"],"sources":["../../../src/template/app-review/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport Player from './player';\nimport {ReviewPlayerProps} from './player/prop-types';\n\nexport type ViewName = 'slides' | 'loader';\n\nexport type AppReviewProps = {\n viewName: ViewName;\n slides?: ReviewPlayerProps;\n navigateBack?: () => void;\n};\n\nconst propTypes = {\n viewName: PropTypes.oneOf(['slides', 'loader']),\n slides: PropTypes.shape({...Player.propTypes})\n};\n\nexport default propTypes;\n"],"mappings":";;AAAA,OAAOA,SAAP,MAAsB,YAAtB;AACA,OAAOC,MAAP,MAAmB,UAAnB;AAWA,MAAMC,SAAS,GAAG;EAChBC,QAAQ,EAAEH,SAAS,CAACI,KAAV,CAAgB,CAAC,QAAD,EAAW,QAAX,CAAhB,CADM;EAEhBC,MAAM,EAAEL,SAAS,CAACM,KAAV,cAAoBL,MAAM,CAACC,SAA3B;AAFQ,CAAlB;AAKA,eAAeA,SAAf"}
|
|
@@ -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"}
|
|
@@ -49,7 +49,8 @@ const SearchPage = (props, context) => {
|
|
|
49
49
|
"data-name": "searchResult",
|
|
50
50
|
className: style.cardsWrapper
|
|
51
51
|
}, /*#__PURE__*/React.createElement("div", {
|
|
52
|
-
className: style.title
|
|
52
|
+
className: style.title,
|
|
53
|
+
role: "status"
|
|
53
54
|
}, title), cardsView));
|
|
54
55
|
};
|
|
55
56
|
|
|
@@ -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","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}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","Provider","Button","Filters","CardsGrid","CardsList","style","SearchPage","props","context","title","searchFilters","cards","noresultsfound","clearFilters","recommendations","moreSortAriaLabel","moreFilterAriaLabel","skin","defaultColor","recommendationsView","cardsView","list","noresults","noresultstxt","clear","background","cardsWrapper","contextTypes","childContextTypes","propTypes","string","shape"],"sources":["../../../../src/template/common/search-page/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, isEmpty} from 'lodash/fp';\nimport Provider from '../../../atom/provider';\nimport Button from '../../../atom/button';\nimport Filters from '../../../molecule/filters';\nimport CardsGrid from '../../../organism/cards-grid';\nimport CardsList from '../../../molecule/dashboard/cards-list';\nimport style from './style.css';\n\nconst SearchPage = (props, context) => {\n const {\n title,\n searchFilters,\n cards,\n noresultsfound,\n clearFilters,\n recommendations,\n moreSortAriaLabel,\n moreFilterAriaLabel\n } = props;\n\n const {skin} = context;\n const defaultColor = getOr('#00B0FF', 'common.primary', skin);\n\n const recommendationsView = isEmpty(recommendations) ? null : <CardsList {...recommendations} />;\n\n const cardsView = isEmpty(cards.list) ? (\n <div>\n <div className={style.noresults}>\n <div className={style.noresultstxt}>{noresultsfound}</div>\n <Button\n {...clearFilters}\n data-name=\"searchPageClear\"\n className={style.clear}\n style={{background: defaultColor}}\n type=\"link\"\n />\n </div>\n {recommendationsView}\n </div>\n ) : (\n <CardsGrid {...cards} />\n );\n\n return (\n <div>\n <Filters\n {...searchFilters}\n moreSortAriaLabel={moreSortAriaLabel}\n moreFilterAriaLabel={moreFilterAriaLabel}\n />\n <div data-name=\"searchResult\" className={style.cardsWrapper}>\n <div className={style.title} role=\"status\">\n {title}\n </div>\n {cardsView}\n </div>\n </div>\n );\n};\n\nSearchPage.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSearchPage.propTypes = {\n noresultsfound: PropTypes.string,\n title: PropTypes.string,\n searchFilters: PropTypes.shape(Filters.propTypes),\n cards: PropTypes.shape(CardsGrid.propTypes),\n clearFilters: PropTypes.shape(Button.propTypes),\n recommendations: PropTypes.shape(CardsList.propTypes),\n moreSortAriaLabel: PropTypes.string,\n moreFilterAriaLabel: PropTypes.string\n};\n\nexport default SearchPage;\n"],"mappings":";;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,QAAP,MAAqB,wBAArB;AACA,OAAOC,MAAP,MAAmB,sBAAnB;AACA,OAAOC,OAAP,MAAoB,2BAApB;AACA,OAAOC,SAAP,MAAsB,8BAAtB;AACA,OAAOC,SAAP,MAAsB,wCAAtB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,UAAU,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACrC,MAAM;IACJC,KADI;IAEJC,aAFI;IAGJC,KAHI;IAIJC,cAJI;IAKJC,YALI;IAMJC,eANI;IAOJC,iBAPI;IAQJC;EARI,IASFT,KATJ;EAWA,MAAM;IAACU;EAAD,IAAST,OAAf;;EACA,MAAMU,YAAY,GAAG,OAAM,SAAN,EAAiB,gBAAjB,EAAmCD,IAAnC,CAArB;;EAEA,MAAME,mBAAmB,GAAG,SAAQL,eAAR,IAA2B,IAA3B,gBAAkC,oBAAC,SAAD,EAAeA,eAAf,CAA9D;EAEA,MAAMM,SAAS,GAAG,SAAQT,KAAK,CAACU,IAAd,iBAChB,8CACE;IAAK,SAAS,EAAEhB,KAAK,CAACiB;EAAtB,gBACE;IAAK,SAAS,EAAEjB,KAAK,CAACkB;EAAtB,GAAqCX,cAArC,CADF,eAEE,oBAAC,MAAD,eACMC,YADN;IAEE,aAAU,iBAFZ;IAGE,SAAS,EAAER,KAAK,CAACmB,KAHnB;IAIE,KAAK,EAAE;MAACC,UAAU,EAAEP;IAAb,CAJT;IAKE,IAAI,EAAC;EALP,GAFF,CADF,EAWGC,mBAXH,CADgB,gBAehB,oBAAC,SAAD,EAAeR,KAAf,CAfF;EAkBA,oBACE,8CACE,oBAAC,OAAD,eACMD,aADN;IAEE,iBAAiB,EAAEK,iBAFrB;IAGE,mBAAmB,EAAEC;EAHvB,GADF,eAME;IAAK,aAAU,cAAf;IAA8B,SAAS,EAAEX,KAAK,CAACqB;EAA/C,gBACE;IAAK,SAAS,EAAErB,KAAK,CAACI,KAAtB;IAA6B,IAAI,EAAC;EAAlC,GACGA,KADH,CADF,EAIGW,SAJH,CANF,CADF;AAeD,CAlDD;;AAoDAd,UAAU,CAACqB,YAAX,GAA0B;EACxBV,IAAI,EAAEjB,QAAQ,CAAC4B,iBAAT,CAA2BX;AADT,CAA1B;AAIAX,UAAU,CAACuB,SAAX,2CAAuB;EACrBjB,cAAc,EAAEb,SAAS,CAAC+B,MADL;EAErBrB,KAAK,EAAEV,SAAS,CAAC+B,MAFI;EAGrBpB,aAAa,EAAEX,SAAS,CAACgC,KAAV,CAAgB7B,OAAO,CAAC2B,SAAxB,CAHM;EAIrBlB,KAAK,EAAEZ,SAAS,CAACgC,KAAV,CAAgB5B,SAAS,CAAC0B,SAA1B,CAJc;EAKrBhB,YAAY,EAAEd,SAAS,CAACgC,KAAV,CAAgB9B,MAAM,CAAC4B,SAAvB,CALO;EAMrBf,eAAe,EAAEf,SAAS,CAACgC,KAAV,CAAgB3B,SAAS,CAACyB,SAA1B,CANI;EAOrBd,iBAAiB,EAAEhB,SAAS,CAAC+B,MAPR;EAQrBd,mBAAmB,EAAEjB,SAAS,CAAC+B;AARV,CAAvB;AAWA,eAAexB,UAAf"}
|
|
@@ -11,18 +11,22 @@ declare namespace ReviewDashboardSkills {
|
|
|
11
11
|
skills: PropTypes.Requireable<PropTypes.InferProps<{
|
|
12
12
|
text: PropTypes.Requireable<string>;
|
|
13
13
|
tooltipText: PropTypes.Requireable<string>;
|
|
14
|
+
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
14
15
|
}>>;
|
|
15
16
|
questions: PropTypes.Requireable<PropTypes.InferProps<{
|
|
16
17
|
text: PropTypes.Requireable<string>;
|
|
17
18
|
tooltipText: PropTypes.Requireable<string>;
|
|
19
|
+
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
18
20
|
}>>;
|
|
19
21
|
lifes: PropTypes.Requireable<PropTypes.InferProps<{
|
|
20
22
|
text: PropTypes.Requireable<string>;
|
|
21
23
|
tooltipText: PropTypes.Requireable<string>;
|
|
24
|
+
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
22
25
|
}>>;
|
|
23
26
|
allright: PropTypes.Requireable<PropTypes.InferProps<{
|
|
24
27
|
text: PropTypes.Requireable<string>;
|
|
25
28
|
tooltipText: PropTypes.Requireable<string>;
|
|
29
|
+
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
26
30
|
}>>;
|
|
27
31
|
}>>;
|
|
28
32
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/lottie-wrapper/index.js"],"names":[],"mappings":"AAsBO,iMAmCN;;AAED,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/lottie-wrapper/index.js"],"names":[],"mappings":"AAsBO,iMAmCN;;AAED,wDA4HC"}
|
|
@@ -132,9 +132,15 @@ const LottieWrapper = props => {
|
|
|
132
132
|
/* istanbul ignore next */
|
|
133
133
|
_lottieWeb.default.destroy(animationItem.name);
|
|
134
134
|
}, [lottieAnimationClassName, containerRef, hideOnTransparent, loop, animationSrc, _isIE11, animationItem, autoplay]);
|
|
135
|
-
|
|
135
|
+
const accessibilityProps = ariaLabel ? {
|
|
136
|
+
'aria-label': ariaLabel,
|
|
137
|
+
role: 'img'
|
|
138
|
+
} : {
|
|
139
|
+
'aria-hidden': 'true',
|
|
140
|
+
role: 'presentation'
|
|
141
|
+
};
|
|
142
|
+
return /*#__PURE__*/_react.default.createElement("div", _extends({}, accessibilityProps, {
|
|
136
143
|
ref: containerRef,
|
|
137
|
-
"aria-label": ariaLabel,
|
|
138
144
|
"data-name": dataName,
|
|
139
145
|
className: wrapperClassName,
|
|
140
146
|
style: _extends({}, width && {
|
|
@@ -147,7 +153,7 @@ const LottieWrapper = props => {
|
|
|
147
153
|
opacity: isAnimationVisible ? 1 : 0,
|
|
148
154
|
transition: 'opacity 0.25s ease-in'
|
|
149
155
|
})
|
|
150
|
-
}, _isIE11 ? /*#__PURE__*/_react.default.createElement("img", {
|
|
156
|
+
}), _isIE11 ? /*#__PURE__*/_react.default.createElement("img", {
|
|
151
157
|
src: ie11ImageBackup,
|
|
152
158
|
className: ie11BackupImageClassName,
|
|
153
159
|
"data-name": "ie11-backup-image"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["isIE11","window","userAgent","get","hasMsCrypto","has","hasRevision","includes","hasTrident","fetchAndLoadAnimation","_lottie","_fetch","animationSrc","containerRef","loop","animationClassnames","hideOnTransparent","autoplay","animationUrl","URL","toString","fetchResult","headers","animationData","json","animation","loadAnimation","container","current","renderer","rendererSettings","className","preserveAspectRatio","LottieWrapper","props","dataName","ariaLabel","width","height","ie11ImageBackup","backupImageClassName","animationControl","animationClassName","useRef","animationItem","setAnimationItem","useState","isAnimationVisible","setIsAnimationVisible","_isIE11","useMemo","wrapperClassName","classnames","style","lottieContainer","lottieAnimationClassName","ie11BackupImageClassName","backupImage","useEffect","keys","omit","ANIMATION_CONTROL","stop","lottie","unfetch","destroy","name","maxWidth","maxHeight","opacity","transition","propTypes"],"sources":["../../../src/atom/lottie-wrapper/index.js"],"sourcesContent":["import React, {useMemo, useRef, useEffect, useState} from 'react';\nimport classnames from 'classnames';\nimport lottie from 'lottie-web';\nimport get from 'lodash/fp/get';\nimport has from 'lodash/fp/has';\nimport includes from 'lodash/fp/includes';\nimport keys from 'lodash/fp/keys';\nimport omit from 'lodash/fp/omit';\nimport unfetch from 'isomorphic-unfetch';\nimport style from './style.css';\nimport propTypes, {ANIMATION_CONTROL} from './prop-types';\n\nconst isIE11 = () => {\n if (typeof window === 'undefined') return;\n const userAgent = get('navigator.userAgent', window);\n const hasMsCrypto = has('msCrypto', window);\n const hasRevision = includes('rv:', userAgent);\n const hasTrident = includes('Trident/', userAgent);\n\n return hasMsCrypto || (hasRevision && hasTrident);\n};\n\nexport const fetchAndLoadAnimation = async (\n _lottie,\n _fetch,\n animationSrc,\n containerRef,\n loop,\n animationClassnames,\n hideOnTransparent,\n autoplay\n) => {\n const animationUrl = new URL(animationSrc).toString();\n const fetchResult = await _fetch(animationUrl, {\n headers: {\n 'X-Requested-With': 'XMLHttpRequest',\n 'Content-Type': 'application/json'\n }\n });\n\n const animationData = await fetchResult.json();\n\n const animation =\n _lottie.loadAnimation &&\n _lottie.loadAnimation({\n container: containerRef.current, // the dom element that will contain the animation\n renderer: 'svg',\n autoplay,\n loop,\n animationData,\n rendererSettings: {\n className: animationClassnames,\n hideOnTransparent,\n preserveAspectRatio: 'xMidYMid meet' // same options as a preserveAspectRatio prop\n }\n });\n return animation;\n};\n\nconst LottieWrapper = props => {\n const {\n className,\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n animationSrc,\n loop = false,\n rendererSettings = {},\n width,\n height,\n ie11ImageBackup,\n backupImageClassName,\n autoplay = true,\n animationControl\n } = props;\n\n const {className: animationClassName, hideOnTransparent = true} = rendererSettings;\n\n const containerRef = useRef(null);\n\n // lottie's animation instance\n const [animationItem, setAnimationItem] = useState(null);\n\n const [isAnimationVisible, setIsAnimationVisible] = useState(autoplay);\n\n const _isIE11 = useMemo(() => isIE11(), []);\n\n const wrapperClassName = useMemo(() => classnames(className, style.lottieContainer), [className]);\n\n const lottieAnimationClassName = useMemo(\n () => classnames(animationClassName, style.animation),\n [animationClassName]\n );\n\n const ie11BackupImageClassName = useMemo(\n () => classnames(backupImageClassName, style.backupImage),\n [backupImageClassName]\n );\n\n useEffect(() => {\n // enzyme does not handle well the state update after an async useEffect in tests\n // to remove when the migration towards @testing-library/react is done\n /* istanbul ignore next */\n if (includes(animationControl, keys(omit('loading', ANIMATION_CONTROL))) && !autoplay) {\n setIsAnimationVisible(true);\n if (animationItem) animationItem[animationControl]();\n if (animationControl === ANIMATION_CONTROL.stop) setIsAnimationVisible(false);\n }\n }, [animationControl, animationItem, autoplay]);\n\n useEffect(() => {\n const loadAnimation = async () => {\n if (!_isIE11 && !animationItem) {\n /* istanbul ignore else */\n if (typeof window !== 'undefined') {\n window.lottie = lottie;\n }\n const animation = await fetchAndLoadAnimation(\n lottie,\n unfetch,\n animationSrc,\n containerRef,\n loop,\n lottieAnimationClassName,\n hideOnTransparent,\n autoplay\n );\n\n /* istanbul ignore next */\n setAnimationItem(animation);\n }\n };\n\n loadAnimation();\n return () => animationItem && /* istanbul ignore next */ lottie.destroy(animationItem.name);\n }, [\n lottieAnimationClassName,\n containerRef,\n hideOnTransparent,\n loop,\n animationSrc,\n _isIE11,\n animationItem,\n autoplay\n ]);\n\n return (\n <div\n ref={containerRef}\n aria-label={ariaLabel}\n data-name={dataName}\n className={wrapperClassName}\n style={{\n ...(width && {\n width: `${width}px`,\n maxWidth: `${width}px`\n }),\n ...(height && {\n height: `${height}px`,\n maxHeight: `${height}px`\n }),\n opacity: isAnimationVisible ? 1 : 0,\n transition: 'opacity 0.25s ease-in'\n }}\n >\n {_isIE11 ? (\n <img\n src={ie11ImageBackup}\n className={ie11BackupImageClassName}\n data-name=\"ie11-backup-image\"\n />\n ) : null}\n </div>\n );\n};\n\nLottieWrapper.propTypes = propTypes;\n\nexport default LottieWrapper;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,MAAM,GAAG,MAAM;EACnB,IAAI,OAAOC,MAAP,KAAkB,WAAtB,EAAmC;EACnC,MAAMC,SAAS,GAAG,IAAAC,YAAA,EAAI,qBAAJ,EAA2BF,MAA3B,CAAlB;EACA,MAAMG,WAAW,GAAG,IAAAC,YAAA,EAAI,UAAJ,EAAgBJ,MAAhB,CAApB;EACA,MAAMK,WAAW,GAAG,IAAAC,iBAAA,EAAS,KAAT,EAAgBL,SAAhB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IAEE,SAAS,EAAEiB,wBAFb;IAGE,aAAU;EAHZ,EADM,GAMJ,IAxBN,CADF;AA4BD,CAlHD;;AAoHAvB,aAAa,CAACsC,SAAd,2CAA0BA,kBAA1B;eAEetC,a"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["isIE11","window","userAgent","get","hasMsCrypto","has","hasRevision","includes","hasTrident","fetchAndLoadAnimation","_lottie","_fetch","animationSrc","containerRef","loop","animationClassnames","hideOnTransparent","autoplay","animationUrl","URL","toString","fetchResult","headers","animationData","json","animation","loadAnimation","container","current","renderer","rendererSettings","className","preserveAspectRatio","LottieWrapper","props","dataName","ariaLabel","width","height","ie11ImageBackup","backupImageClassName","animationControl","animationClassName","useRef","animationItem","setAnimationItem","useState","isAnimationVisible","setIsAnimationVisible","_isIE11","useMemo","wrapperClassName","classnames","style","lottieContainer","lottieAnimationClassName","ie11BackupImageClassName","backupImage","useEffect","keys","omit","ANIMATION_CONTROL","stop","lottie","unfetch","destroy","name","accessibilityProps","role","maxWidth","maxHeight","opacity","transition","propTypes"],"sources":["../../../src/atom/lottie-wrapper/index.js"],"sourcesContent":["import React, {useMemo, useRef, useEffect, useState} from 'react';\nimport classnames from 'classnames';\nimport lottie from 'lottie-web';\nimport get from 'lodash/fp/get';\nimport has from 'lodash/fp/has';\nimport includes from 'lodash/fp/includes';\nimport keys from 'lodash/fp/keys';\nimport omit from 'lodash/fp/omit';\nimport unfetch from 'isomorphic-unfetch';\nimport style from './style.css';\nimport propTypes, {ANIMATION_CONTROL} from './prop-types';\n\nconst isIE11 = () => {\n if (typeof window === 'undefined') return;\n const userAgent = get('navigator.userAgent', window);\n const hasMsCrypto = has('msCrypto', window);\n const hasRevision = includes('rv:', userAgent);\n const hasTrident = includes('Trident/', userAgent);\n\n return hasMsCrypto || (hasRevision && hasTrident);\n};\n\nexport const fetchAndLoadAnimation = async (\n _lottie,\n _fetch,\n animationSrc,\n containerRef,\n loop,\n animationClassnames,\n hideOnTransparent,\n autoplay\n) => {\n const animationUrl = new URL(animationSrc).toString();\n const fetchResult = await _fetch(animationUrl, {\n headers: {\n 'X-Requested-With': 'XMLHttpRequest',\n 'Content-Type': 'application/json'\n }\n });\n\n const animationData = await fetchResult.json();\n\n const animation =\n _lottie.loadAnimation &&\n _lottie.loadAnimation({\n container: containerRef.current, // the dom element that will contain the animation\n renderer: 'svg',\n autoplay,\n loop,\n animationData,\n rendererSettings: {\n className: animationClassnames,\n hideOnTransparent,\n preserveAspectRatio: 'xMidYMid meet' // same options as a preserveAspectRatio prop\n }\n });\n return animation;\n};\n\nconst LottieWrapper = props => {\n const {\n className,\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n animationSrc,\n loop = false,\n rendererSettings = {},\n width,\n height,\n ie11ImageBackup,\n backupImageClassName,\n autoplay = true,\n animationControl\n } = props;\n\n const {className: animationClassName, hideOnTransparent = true} = rendererSettings;\n\n const containerRef = useRef(null);\n\n // lottie's animation instance\n const [animationItem, setAnimationItem] = useState(null);\n\n const [isAnimationVisible, setIsAnimationVisible] = useState(autoplay);\n\n const _isIE11 = useMemo(() => isIE11(), []);\n\n const wrapperClassName = useMemo(() => classnames(className, style.lottieContainer), [className]);\n\n const lottieAnimationClassName = useMemo(\n () => classnames(animationClassName, style.animation),\n [animationClassName]\n );\n\n const ie11BackupImageClassName = useMemo(\n () => classnames(backupImageClassName, style.backupImage),\n [backupImageClassName]\n );\n\n useEffect(() => {\n // enzyme does not handle well the state update after an async useEffect in tests\n // to remove when the migration towards @testing-library/react is done\n /* istanbul ignore next */\n if (includes(animationControl, keys(omit('loading', ANIMATION_CONTROL))) && !autoplay) {\n setIsAnimationVisible(true);\n if (animationItem) animationItem[animationControl]();\n if (animationControl === ANIMATION_CONTROL.stop) setIsAnimationVisible(false);\n }\n }, [animationControl, animationItem, autoplay]);\n\n useEffect(() => {\n const loadAnimation = async () => {\n if (!_isIE11 && !animationItem) {\n /* istanbul ignore else */\n if (typeof window !== 'undefined') {\n window.lottie = lottie;\n }\n const animation = await fetchAndLoadAnimation(\n lottie,\n unfetch,\n animationSrc,\n containerRef,\n loop,\n lottieAnimationClassName,\n hideOnTransparent,\n autoplay\n );\n\n /* istanbul ignore next */\n setAnimationItem(animation);\n }\n };\n\n loadAnimation();\n return () => animationItem && /* istanbul ignore next */ lottie.destroy(animationItem.name);\n }, [\n lottieAnimationClassName,\n containerRef,\n hideOnTransparent,\n loop,\n animationSrc,\n _isIE11,\n animationItem,\n autoplay\n ]);\n\n const accessibilityProps = ariaLabel\n ? {\n 'aria-label': ariaLabel,\n role: 'img'\n }\n : {\n 'aria-hidden': 'true',\n role: 'presentation'\n };\n\n return (\n <div\n {...accessibilityProps}\n ref={containerRef}\n data-name={dataName}\n className={wrapperClassName}\n style={{\n ...(width && {\n width: `${width}px`,\n maxWidth: `${width}px`\n }),\n ...(height && {\n height: `${height}px`,\n maxHeight: `${height}px`\n }),\n opacity: isAnimationVisible ? 1 : 0,\n transition: 'opacity 0.25s ease-in'\n }}\n >\n {_isIE11 ? (\n <img\n src={ie11ImageBackup}\n className={ie11BackupImageClassName}\n data-name=\"ie11-backup-image\"\n />\n ) : null}\n </div>\n );\n};\n\nLottieWrapper.propTypes = propTypes;\n\nexport default LottieWrapper;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,MAAM,GAAG,MAAM;EACnB,IAAI,OAAOC,MAAP,KAAkB,WAAtB,EAAmC;EACnC,MAAMC,SAAS,GAAG,IAAAC,YAAA,EAAI,qBAAJ,EAA2BF,MAA3B,CAAlB;EACA,MAAMG,WAAW,GAAG,IAAAC,YAAA,EAAI,UAAJ,EAAgBJ,MAAhB,CAApB;EACA,MAAMK,WAAW,GAAG,IAAAC,iBAAA,EAAS,KAAT,EAAgBL,SAAhB,CAApB;EACA,MAAMM,UAAU,GAAG,IAAAD,iBAAA,EAAS,UAAT,EAAqBL,SAArB,CAAnB;EAEA,OAAOE,WAAW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,IAkBGvB,OAAO,gBACN;IACE,GAAG,EAAEV,eADP;IAEE,SAAS,EAAEiB,wBAFb;IAGE,aAAU;EAHZ,EADM,GAMJ,IAxBN,CADF;AA4BD,CA5HD;;AA8HAvB,aAAa,CAACwC,SAAd,2CAA0BA,kBAA1B;eAEexC,a"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
export declare type LottieAnimationProps = {
|
|
3
|
-
'aria-label'
|
|
3
|
+
'aria-label'?: string;
|
|
4
4
|
'data-name'?: string;
|
|
5
5
|
animationSrc: string;
|
|
6
6
|
loop?: boolean;
|
|
@@ -23,7 +23,7 @@ export declare const ANIMATION_CONTROL: {
|
|
|
23
23
|
loading: string;
|
|
24
24
|
};
|
|
25
25
|
declare const propTypes: {
|
|
26
|
-
'aria-label': PropTypes.
|
|
26
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
27
27
|
'data-name': PropTypes.Requireable<string>;
|
|
28
28
|
animationSrc: PropTypes.Validator<string>;
|
|
29
29
|
loop: PropTypes.Requireable<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/atom/lottie-wrapper/prop-types.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,oBAAY,oBAAoB,GAAG;IACjC,YAAY,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/atom/lottie-wrapper/prop-types.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,oBAAY,oBAAoB,GAAG;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,gBAAgB,CAAC,EAAE;QACjB,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;CAC1D,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;CAK7B,CAAC;AAEF,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;CAgBd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -17,7 +17,7 @@ const ANIMATION_CONTROL = {
|
|
|
17
17
|
};
|
|
18
18
|
exports.ANIMATION_CONTROL = ANIMATION_CONTROL;
|
|
19
19
|
const propTypes = {
|
|
20
|
-
'aria-label': _propTypes.default.string
|
|
20
|
+
'aria-label': _propTypes.default.string,
|
|
21
21
|
'data-name': _propTypes.default.string,
|
|
22
22
|
animationSrc: _propTypes.default.string.isRequired,
|
|
23
23
|
loop: _propTypes.default.bool,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.js","names":["ANIMATION_CONTROL","play","pause","stop","loading","propTypes","PropTypes","string","
|
|
1
|
+
{"version":3,"file":"prop-types.js","names":["ANIMATION_CONTROL","play","pause","stop","loading","propTypes","PropTypes","string","animationSrc","isRequired","loop","bool","rendererSettings","shape","hideOnTransparent","className","height","number","width","ie11ImageBackup","backupImageClassName","autoplay","animationControl","oneOf","keys"],"sources":["../../../src/atom/lottie-wrapper/prop-types.ts"],"sourcesContent":["import keys from 'lodash/fp/keys';\nimport PropTypes from 'prop-types';\n\nexport type LottieAnimationProps = {\n 'aria-label'?: string;\n 'data-name'?: string;\n animationSrc: string;\n loop?: boolean;\n rendererSettings?: {\n hideOnTransparent?: boolean;\n className?: string;\n };\n height?: number;\n width?: number;\n className?: string;\n ie11ImageBackup: string;\n backupImageClassName?: string;\n autoplay?: boolean;\n animationControl?: 'play' | 'pause' | 'stop' | 'loading';\n};\n\nexport const ANIMATION_CONTROL = {\n play: 'play',\n pause: 'pause',\n stop: 'stop',\n loading: 'loading'\n};\n\nconst propTypes = {\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n animationSrc: PropTypes.string.isRequired,\n loop: PropTypes.bool,\n rendererSettings: PropTypes.shape({\n hideOnTransparent: PropTypes.bool,\n className: PropTypes.string\n }),\n height: PropTypes.number,\n width: PropTypes.number,\n className: PropTypes.string,\n ie11ImageBackup: PropTypes.string.isRequired,\n backupImageClassName: PropTypes.string,\n autoplay: PropTypes.bool,\n animationControl: PropTypes.oneOf(keys(ANIMATION_CONTROL))\n};\n\nexport default propTypes;\n"],"mappings":";;;;;AAAA;;AACA;;;;AAoBO,MAAMA,iBAAiB,GAAG;EAC/BC,IAAI,EAAE,MADyB;EAE/BC,KAAK,EAAE,OAFwB;EAG/BC,IAAI,EAAE,MAHyB;EAI/BC,OAAO,EAAE;AAJsB,CAA1B;;AAOP,MAAMC,SAAS,GAAG;EAChB,cAAcC,kBAAA,CAAUC,MADR;EAEhB,aAAaD,kBAAA,CAAUC,MAFP;EAGhBC,YAAY,EAAEF,kBAAA,CAAUC,MAAV,CAAiBE,UAHf;EAIhBC,IAAI,EAAEJ,kBAAA,CAAUK,IAJA;EAKhBC,gBAAgB,EAAEN,kBAAA,CAAUO,KAAV,CAAgB;IAChCC,iBAAiB,EAAER,kBAAA,CAAUK,IADG;IAEhCI,SAAS,EAAET,kBAAA,CAAUC;EAFW,CAAhB,CALF;EAShBS,MAAM,EAAEV,kBAAA,CAAUW,MATF;EAUhBC,KAAK,EAAEZ,kBAAA,CAAUW,MAVD;EAWhBF,SAAS,EAAET,kBAAA,CAAUC,MAXL;EAYhBY,eAAe,EAAEb,kBAAA,CAAUC,MAAV,CAAiBE,UAZlB;EAahBW,oBAAoB,EAAEd,kBAAA,CAAUC,MAbhB;EAchBc,QAAQ,EAAEf,kBAAA,CAAUK,IAdJ;EAehBW,gBAAgB,EAAEhB,kBAAA,CAAUiB,KAAV,CAAgB,IAAAC,aAAA,EAAKxB,iBAAL,CAAhB;AAfF,CAAlB;eAkBeK,S"}
|
|
@@ -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":";AAiDA,6DA8BC"}
|
|
@@ -42,7 +42,8 @@ const getIcon = icon => {
|
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
const ToolTip = ({
|
|
45
|
-
tooltipText
|
|
45
|
+
tooltipText,
|
|
46
|
+
'aria-label': moreDetailsAriaLabel
|
|
46
47
|
}) => {
|
|
47
48
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
48
49
|
className: _style.default.tooltipContainer
|
|
@@ -51,10 +52,11 @@ const ToolTip = ({
|
|
|
51
52
|
}, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyInformationIcon, {
|
|
52
53
|
className: _style.default.informationIcon,
|
|
53
54
|
width: 12,
|
|
54
|
-
height: 12
|
|
55
|
+
height: 12,
|
|
56
|
+
"aria-label": moreDetailsAriaLabel
|
|
55
57
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
56
58
|
className: _style.default.toolTip
|
|
57
|
-
}, /*#__PURE__*/_react.default.createElement("
|
|
59
|
+
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
58
60
|
className: _style.default.tooltipText
|
|
59
61
|
}, tooltipText)));
|
|
60
62
|
};
|
|
@@ -96,13 +98,15 @@ const ReviewPresentation = props => {
|
|
|
96
98
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
97
99
|
className: _style.default.reviewListText
|
|
98
100
|
}, getIcon(key), " ", label.text), /*#__PURE__*/_react.default.createElement(ToolTip, {
|
|
99
|
-
tooltipText: label.tooltipText
|
|
101
|
+
tooltipText: label.tooltipText,
|
|
102
|
+
"aria-label": label.moreDetailsAriaLabel
|
|
100
103
|
})));
|
|
101
104
|
}, labelsList)));
|
|
102
105
|
};
|
|
103
106
|
|
|
104
107
|
ToolTip.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
105
|
-
tooltipText: _propTypes.default.string
|
|
108
|
+
tooltipText: _propTypes.default.string,
|
|
109
|
+
'aria-label': _propTypes.default.string
|
|
106
110
|
} : {};
|
|
107
111
|
ReviewPresentation.propTypes = process.env.NODE_ENV !== "production" ? _propTypes2.default : {};
|
|
108
112
|
var _default = ReviewPresentation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ICONS","skills","TargetIcon","questions","QuestionIcon","lifes","HeartIcon","allright","CheckIcon","getIcon","icon","Icon","getOr","style","labelIcon","ToolTip","tooltipText","tooltipContainer","tooltipIconContainer","informationIcon","toolTip","ReviewPresentation","props","ariaLabel","reviewTitle","reviewText","labelsList","reviewWrapper","__html","reviewListWrapper","map","convert","cap","label","key","reviewList","reviewListItemWrapper","reviewListText","text","propTypes","PropTypes","string"],"sources":["../../../src/atom/review-presentation/index.js"],"sourcesContent":["import React 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 getIcon = 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 = ({tooltipText}) => {\n return (\n <div className={style.tooltipContainer}>\n <div className={style.tooltipIconContainer}>\n <InformationIcon
|
|
1
|
+
{"version":3,"file":"index.js","names":["ICONS","skills","TargetIcon","questions","QuestionIcon","lifes","HeartIcon","allright","CheckIcon","getIcon","icon","Icon","getOr","style","labelIcon","ToolTip","tooltipText","moreDetailsAriaLabel","tooltipContainer","tooltipIconContainer","informationIcon","toolTip","ReviewPresentation","props","ariaLabel","reviewTitle","reviewText","labelsList","reviewWrapper","__html","reviewListWrapper","map","convert","cap","label","key","reviewList","reviewListItemWrapper","reviewListText","text","propTypes","PropTypes","string"],"sources":["../../../src/atom/review-presentation/index.js"],"sourcesContent":["import React 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 getIcon = 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 = ({tooltipText, 'aria-label': moreDetailsAriaLabel}) => {\n return (\n <div className={style.tooltipContainer}>\n <div className={style.tooltipIconContainer}>\n <InformationIcon\n className={style.informationIcon}\n width={12}\n height={12}\n aria-label={moreDetailsAriaLabel}\n />\n </div>\n <div className={style.toolTip}>\n <p className={style.tooltipText}>{tooltipText}</p>\n </div>\n </div>\n );\n};\n\nconst ReviewPresentation = props => {\n const {'aria-label': ariaLabel, reviewTitle, reviewText, labelsList} = props;\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 <div className={style.reviewListItemWrapper} data-tip data-for=\"reviewListItem\">\n <div className={style.reviewListText}>\n {getIcon(key)} {label.text}\n </div>\n <ToolTip tooltipText={label.tooltipText} aria-label={label.moreDetailsAriaLabel} />\n </div>\n </li>\n );\n }, labelsList)}\n </ul>\n </div>\n );\n};\n\nToolTip.propTypes = {\n tooltipText: PropTypes.string,\n 'aria-label': PropTypes.string\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,CAAd;;AAOA,MAAMC,OAAO,GAAGC,IAAI,IAAI;EACtB,MAAMC,IAAI,GAAG,IAAAC,cAAA,EAAM,IAAN,EAAYF,IAAZ,EAAkBV,KAAlB,CAAb;EAEA;;EACA,IAAI,CAACW,IAAL,EAAW;IACT,oBAAO;MAAK,SAAS,EAAEE,cAAA,CAAMC;IAAtB,EAAP;EACD;;EACD,oBAAO,6BAAC,IAAD;IAAM,SAAS,EAAED,cA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YAAS;IAA/D,gBACE;MAAK,SAAS,EAAExB,cAAA,CAAMyB;IAAtB,GACG7B,OAAO,CAAC0B,GAAD,CADV,OACkBD,KAAK,CAACK,IADxB,CADF,eAIE,6BAAC,OAAD;MAAS,WAAW,EAAEL,KAAK,CAAClB,WAA5B;MAAyC,cAAYkB,KAAK,CAACjB;IAA3D,EAJF,CADF,CADF;EAUD,CAXA,EAWEU,UAXF,CADH,CAXF,CADF;AA4BD,CA9BD;;AAgCAZ,OAAO,CAACyB,SAAR,2CAAoB;EAClBxB,WAAW,EAAEyB,kBAAA,CAAUC,MADL;EAElB,cAAcD,kBAAA,CAAUC;AAFN,CAApB;AAKApB,kBAAkB,CAACkB,SAAnB,2CAA+BA,mBAA/B;eAEelB,kB"}
|
|
@@ -9,18 +9,22 @@ declare const propTypes: {
|
|
|
9
9
|
skills: PropTypes.Requireable<PropTypes.InferProps<{
|
|
10
10
|
text: PropTypes.Requireable<string>;
|
|
11
11
|
tooltipText: PropTypes.Requireable<string>;
|
|
12
|
+
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
12
13
|
}>>;
|
|
13
14
|
questions: PropTypes.Requireable<PropTypes.InferProps<{
|
|
14
15
|
text: PropTypes.Requireable<string>;
|
|
15
16
|
tooltipText: PropTypes.Requireable<string>;
|
|
17
|
+
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
16
18
|
}>>;
|
|
17
19
|
lifes: PropTypes.Requireable<PropTypes.InferProps<{
|
|
18
20
|
text: PropTypes.Requireable<string>;
|
|
19
21
|
tooltipText: PropTypes.Requireable<string>;
|
|
22
|
+
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
20
23
|
}>>;
|
|
21
24
|
allright: PropTypes.Requireable<PropTypes.InferProps<{
|
|
22
25
|
text: PropTypes.Requireable<string>;
|
|
23
26
|
tooltipText: PropTypes.Requireable<string>;
|
|
27
|
+
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
24
28
|
}>>;
|
|
25
29
|
}>>;
|
|
26
30
|
};
|
|
@@ -40,18 +44,22 @@ export declare type OnboardingProps = {
|
|
|
40
44
|
skills?: {
|
|
41
45
|
text?: string | undefined;
|
|
42
46
|
tooltipText?: string | undefined;
|
|
47
|
+
'aria-label'?: string | undefined;
|
|
43
48
|
} | undefined;
|
|
44
49
|
questions?: {
|
|
45
50
|
text?: string | undefined;
|
|
46
51
|
tooltipText?: string | undefined;
|
|
52
|
+
'aria-label'?: string | undefined;
|
|
47
53
|
};
|
|
48
54
|
lifes?: {
|
|
49
55
|
text?: string | undefined;
|
|
50
56
|
tooltipText?: string | undefined;
|
|
57
|
+
'aria-label'?: string | undefined;
|
|
51
58
|
} | undefined;
|
|
52
59
|
allright?: {
|
|
53
60
|
text?: string | undefined;
|
|
54
61
|
tooltipText?: string | undefined;
|
|
62
|
+
'aria-label'?: string | undefined;
|
|
55
63
|
} | undefined;
|
|
56
64
|
};
|
|
57
65
|
onPress: (event: GestureResponderEvent) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/atom/review-presentation/prop-types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,UAAU,EAAE,qBAAqB,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/atom/review-presentation/prop-types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,UAAU,EAAE,qBAAqB,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AAQ1E,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;CAUd,CAAC;AAEF,eAAe,SAAS,CAAC;AAEzB,eAAO,MAAM,oBAAoB;;CAEhC,CAAC;AAEF,eAAO,MAAM,aAAa;;;CAGzB,CAAC;AAEF,oBAAY,eAAe,GAAG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;KAAC,CAAC,CAAC;CACtF,CAAC"}
|
|
@@ -9,7 +9,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
9
9
|
|
|
10
10
|
const levelItem = _propTypes.default.shape({
|
|
11
11
|
text: _propTypes.default.string,
|
|
12
|
-
tooltipText: _propTypes.default.string
|
|
12
|
+
tooltipText: _propTypes.default.string,
|
|
13
|
+
moreDetailsAreaLabel: _propTypes.default.string
|
|
13
14
|
});
|
|
14
15
|
|
|
15
16
|
const propTypes = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.js","names":["levelItem","PropTypes","shape","text","string","tooltipText","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});\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 }\n | undefined;\n questions?: {\n text?: string | undefined;\n tooltipText?: string | undefined;\n };\n lifes?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n }\n | undefined;\n allright?:\n | {\n text?: string | undefined;\n tooltipText?: 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;
|
|
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;AAHA,CAAhB,CAAlB;;AAMA,MAAMG,SAAS,GAAG;EAChB,cAAcN,kBAAA,CAAUG,MADR;EAEhBI,WAAW,EAAEP,kBAAA,CAAUG,MAFP;EAGhBK,UAAU,EAAER,kBAAA,CAAUG,MAHN;EAIhBM,UAAU,EAAET,kBAAA,CAAUC,KAAV,CAAgB;IAC1BS,MAAM,EAAEX,SADkB;IAE1BY,SAAS,EAAEZ,SAFe;IAG1Ba,KAAK,EAAEb,SAHmB;IAI1Bc,QAAQ,EAAEd;EAJgB,CAAhB;AAJI,CAAlB;eAYeO,S;;AAER,MAAMQ,oBAAoB,GAAG;EAClCC,OAAO,EAAEf,kBAAA,CAAUgB;AADe,CAA7B;;AAIA,MAAMC,aAAa,GAAG;EAC3Bf,IAAI,EAAEF,kBAAA,CAAUG,MADW;EAE3Be,IAAI,EAAElB,kBAAA,CAAUmB;AAFW,CAAtB"}
|
|
@@ -64,7 +64,9 @@ const AddToMyListFeedback = ({
|
|
|
64
64
|
className: _style.default.checkIcon,
|
|
65
65
|
width: 13,
|
|
66
66
|
height: 13
|
|
67
|
-
}), /*#__PURE__*/_react.default.createElement("p",
|
|
67
|
+
}), /*#__PURE__*/_react.default.createElement("p", {
|
|
68
|
+
role: "status"
|
|
69
|
+
}, favorite ? addToMyListText : removeFromMyListText));
|
|
68
70
|
};
|
|
69
71
|
|
|
70
72
|
exports.AddToMyListFeedback = AddToMyListFeedback;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ADD_TO_MY_LIST_STATUS","IDLE","SUCCESS","StatusContext","React","createContext","AddToMyListStatusProvider","children","status","setStatus","useState","useEffect","timeoutId","DURATION","setTimeout","clearTimeout","statusValue","useMemo","AddToMyListFeedback","addToMyListText","removeFromMyListText","favorite","useContext","classnames","styles","feedback","checkIcon","AddToMyList","style","addToMyListButton","onFavoriteClick","cb","onClick","container","cta","wrapper","shareIcon","propTypes","PropTypes","node","string","bool","func"],"sources":["../../../src/molecule/add-to-my-list/index.js"],"sourcesContent":["import React, {useState, useContext, useEffect, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {\n NovaCompositionCoorpacademyCheck as CheckIcon,\n NovaCompositionNavigationMore as MoreIcon\n} from '@coorpacademy/nova-icons';\nimport Link from '../../atom/link';\nimport styles from './style.css';\n\nconst ADD_TO_MY_LIST_STATUS = {\n IDLE: 'IDLE',\n SUCCESS: 'SUCCESS'\n};\n\nconst StatusContext = React.createContext(ADD_TO_MY_LIST_STATUS.IDLE);\n\nexport const AddToMyListStatusProvider = ({children}) => {\n const [status, setStatus] = useState(ADD_TO_MY_LIST_STATUS.IDLE);\n useEffect(() => {\n let timeoutId;\n const DURATION = 3000;\n if (status !== ADD_TO_MY_LIST_STATUS.IDLE) {\n timeoutId = setTimeout(() => setStatus(ADD_TO_MY_LIST_STATUS.IDLE), DURATION);\n }\n return () => clearTimeout(timeoutId);\n }, [status]);\n const statusValue = useMemo(() => [status, setStatus], [status, setStatus]);\n return <StatusContext.Provider value={statusValue}>{children}</StatusContext.Provider>;\n};\n\nexport const AddToMyListFeedback = ({addToMyListText, removeFromMyListText, favorite}) => {\n const [status] = useContext(StatusContext);\n if (status === ADD_TO_MY_LIST_STATUS.IDLE) return null;\n\n return (\n <div className={classnames(styles.feedback)} data-name={'add-to-my-list-feedback'}>\n <CheckIcon className={styles.checkIcon} width={13} height={13} />\n <p>{favorite ? addToMyListText : removeFromMyListText}</p>\n </div>\n );\n};\n\nconst AddToMyList = ({style, addToMyListButton, favorite, onFavoriteClick}) => {\n const [, setStatus] = useContext(StatusContext);\n const cb = () => setStatus(ADD_TO_MY_LIST_STATUS.SUCCESS);\n\n function onClick() {\n onFavoriteClick(cb);\n }\n\n return (\n <div className={(styles.container, style)}>\n <Link data-name={'add-to-my-list-button'} onClick={onClick} className={styles.cta}>\n <div className={styles.wrapper}>\n {favorite ? (\n <CheckIcon className={styles.shareIcon} width={15} height={15} />\n ) : (\n <MoreIcon className={styles.shareIcon} width={12} height={12} />\n )}\n <p>{addToMyListButton}</p>\n </div>\n </Link>\n </div>\n );\n};\n\nAddToMyListStatusProvider.propTypes = {\n children: PropTypes.node\n};\n\nAddToMyListFeedback.propTypes = {\n addToMyListText: PropTypes.string,\n removeFromMyListText: PropTypes.string,\n favorite: PropTypes.bool\n};\n\nAddToMyList.propTypes = {\n style: PropTypes.string,\n addToMyListButton: PropTypes.string,\n favorite: PropTypes.bool,\n onFavoriteClick: PropTypes.func\n};\n\nexport default AddToMyList;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AAIA;;AACA;;;;;;;;AAEA,MAAMA,qBAAqB,GAAG;EAC5BC,IAAI,EAAE,MADsB;EAE5BC,OAAO,EAAE;AAFmB,CAA9B;;AAKA,MAAMC,aAAa,gBAAGC,cAAA,CAAMC,aAAN,CAAoBL,qBAAqB,CAACC,IAA1C,CAAtB;;AAEO,MAAMK,yBAAyB,GAAG,CAAC;EAACC;AAAD,CAAD,KAAgB;EACvD,MAAM,CAACC,MAAD,EAASC,SAAT,IAAsB,IAAAC,eAAA,EAASV,qBAAqB,CAACC,IAA/B,CAA5B;EACA,IAAAU,gBAAA,EAAU,MAAM;IACd,IAAIC,SAAJ;IACA,MAAMC,QAAQ,GAAG,IAAjB;;IACA,IAAIL,MAAM,KAAKR,qBAAqB,CAACC,IAArC,EAA2C;MACzCW,SAAS,GAAGE,UAAU,CAAC,MAAML,SAAS,CAACT,qBAAqB,CAACC,IAAvB,CAAhB,EAA8CY,QAA9C,CAAtB;IACD;;IACD,OAAO,MAAME,YAAY,CAACH,SAAD,CAAzB;EACD,CAPD,EAOG,CAACJ,MAAD,CAPH;EAQA,MAAMQ,WAAW,GAAG,IAAAC,cAAA,EAAQ,MAAM,CAACT,MAAD,EAASC,SAAT,CAAd,EAAmC,CAACD,MAAD,EAASC,SAAT,CAAnC,CAApB;EACA,oBAAO,6BAAC,aAAD,CAAe,QAAf;IAAwB,KAAK,EAAEO;EAA/B,GAA6CT,QAA7C,CAAP;AACD,CAZM;;;;AAcA,MAAMW,mBAAmB,GAAG,CAAC;EAACC,eAAD;EAAkBC,oBAAlB;EAAwCC;AAAxC,CAAD,KAAuD;EACxF,MAAM,CAACb,MAAD,IAAW,IAAAc,iBAAA,EAAWnB,aAAX,CAAjB;EACA,IAAIK,MAAM,KAAKR,qBAAqB,CAACC,IAArC,EAA2C,OAAO,IAAP;EAE3C,oBACE;IAAK,SAAS,EAAE,IAAAsB,mBAAA,EAAWC,cAAA,CAAOC,QAAlB,CAAhB;IAA6C,aAAW;EAAxD,gBACE,6BAAC,2CAAD;IAAW,SAAS,EAAED,cAAA,CAAOE,SAA7B;IAAwC,KAAK,EAAE,EAA/C;IAAmD,MAAM,EAAE;EAA3D,EADF,eAEE,
|
|
1
|
+
{"version":3,"file":"index.js","names":["ADD_TO_MY_LIST_STATUS","IDLE","SUCCESS","StatusContext","React","createContext","AddToMyListStatusProvider","children","status","setStatus","useState","useEffect","timeoutId","DURATION","setTimeout","clearTimeout","statusValue","useMemo","AddToMyListFeedback","addToMyListText","removeFromMyListText","favorite","useContext","classnames","styles","feedback","checkIcon","AddToMyList","style","addToMyListButton","onFavoriteClick","cb","onClick","container","cta","wrapper","shareIcon","propTypes","PropTypes","node","string","bool","func"],"sources":["../../../src/molecule/add-to-my-list/index.js"],"sourcesContent":["import React, {useState, useContext, useEffect, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {\n NovaCompositionCoorpacademyCheck as CheckIcon,\n NovaCompositionNavigationMore as MoreIcon\n} from '@coorpacademy/nova-icons';\nimport Link from '../../atom/link';\nimport styles from './style.css';\n\nconst ADD_TO_MY_LIST_STATUS = {\n IDLE: 'IDLE',\n SUCCESS: 'SUCCESS'\n};\n\nconst StatusContext = React.createContext(ADD_TO_MY_LIST_STATUS.IDLE);\n\nexport const AddToMyListStatusProvider = ({children}) => {\n const [status, setStatus] = useState(ADD_TO_MY_LIST_STATUS.IDLE);\n useEffect(() => {\n let timeoutId;\n const DURATION = 3000;\n if (status !== ADD_TO_MY_LIST_STATUS.IDLE) {\n timeoutId = setTimeout(() => setStatus(ADD_TO_MY_LIST_STATUS.IDLE), DURATION);\n }\n return () => clearTimeout(timeoutId);\n }, [status]);\n const statusValue = useMemo(() => [status, setStatus], [status, setStatus]);\n return <StatusContext.Provider value={statusValue}>{children}</StatusContext.Provider>;\n};\n\nexport const AddToMyListFeedback = ({addToMyListText, removeFromMyListText, favorite}) => {\n const [status] = useContext(StatusContext);\n if (status === ADD_TO_MY_LIST_STATUS.IDLE) return null;\n\n return (\n <div className={classnames(styles.feedback)} data-name={'add-to-my-list-feedback'}>\n <CheckIcon className={styles.checkIcon} width={13} height={13} />\n <p role=\"status\">{favorite ? addToMyListText : removeFromMyListText}</p>\n </div>\n );\n};\n\nconst AddToMyList = ({style, addToMyListButton, favorite, onFavoriteClick}) => {\n const [, setStatus] = useContext(StatusContext);\n const cb = () => setStatus(ADD_TO_MY_LIST_STATUS.SUCCESS);\n\n function onClick() {\n onFavoriteClick(cb);\n }\n\n return (\n <div className={(styles.container, style)}>\n <Link data-name={'add-to-my-list-button'} onClick={onClick} className={styles.cta}>\n <div className={styles.wrapper}>\n {favorite ? (\n <CheckIcon className={styles.shareIcon} width={15} height={15} />\n ) : (\n <MoreIcon className={styles.shareIcon} width={12} height={12} />\n )}\n <p>{addToMyListButton}</p>\n </div>\n </Link>\n </div>\n );\n};\n\nAddToMyListStatusProvider.propTypes = {\n children: PropTypes.node\n};\n\nAddToMyListFeedback.propTypes = {\n addToMyListText: PropTypes.string,\n removeFromMyListText: PropTypes.string,\n favorite: PropTypes.bool\n};\n\nAddToMyList.propTypes = {\n style: PropTypes.string,\n addToMyListButton: PropTypes.string,\n favorite: PropTypes.bool,\n onFavoriteClick: PropTypes.func\n};\n\nexport default AddToMyList;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AAIA;;AACA;;;;;;;;AAEA,MAAMA,qBAAqB,GAAG;EAC5BC,IAAI,EAAE,MADsB;EAE5BC,OAAO,EAAE;AAFmB,CAA9B;;AAKA,MAAMC,aAAa,gBAAGC,cAAA,CAAMC,aAAN,CAAoBL,qBAAqB,CAACC,IAA1C,CAAtB;;AAEO,MAAMK,yBAAyB,GAAG,CAAC;EAACC;AAAD,CAAD,KAAgB;EACvD,MAAM,CAACC,MAAD,EAASC,SAAT,IAAsB,IAAAC,eAAA,EAASV,qBAAqB,CAACC,IAA/B,CAA5B;EACA,IAAAU,gBAAA,EAAU,MAAM;IACd,IAAIC,SAAJ;IACA,MAAMC,QAAQ,GAAG,IAAjB;;IACA,IAAIL,MAAM,KAAKR,qBAAqB,CAACC,IAArC,EAA2C;MACzCW,SAAS,GAAGE,UAAU,CAAC,MAAML,SAAS,CAACT,qBAAqB,CAACC,IAAvB,CAAhB,EAA8CY,QAA9C,CAAtB;IACD;;IACD,OAAO,MAAME,YAAY,CAACH,SAAD,CAAzB;EACD,CAPD,EAOG,CAACJ,MAAD,CAPH;EAQA,MAAMQ,WAAW,GAAG,IAAAC,cAAA,EAAQ,MAAM,CAACT,MAAD,EAASC,SAAT,CAAd,EAAmC,CAACD,MAAD,EAASC,SAAT,CAAnC,CAApB;EACA,oBAAO,6BAAC,aAAD,CAAe,QAAf;IAAwB,KAAK,EAAEO;EAA/B,GAA6CT,QAA7C,CAAP;AACD,CAZM;;;;AAcA,MAAMW,mBAAmB,GAAG,CAAC;EAACC,eAAD;EAAkBC,o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EAAE,EAA9C;IAAkD,MAAM,EAAE;EAA1D,EAJJ,eAME,wCAAIP,iBAAJ,CANF,CADF,CADF,CADF;AAcD,CAtBD;;AAwBAvB,yBAAyB,CAAC+B,SAA1B,2CAAsC;EACpC9B,QAAQ,EAAE+B,kBAAA,CAAUC;AADgB,CAAtC;AAIArB,mBAAmB,CAACmB,SAApB,2CAAgC;EAC9BlB,eAAe,EAAEmB,kBAAA,CAAUE,MADG;EAE9BpB,oBAAoB,EAAEkB,kBAAA,CAAUE,MAFF;EAG9BnB,QAAQ,EAAEiB,kBAAA,CAAUG;AAHU,CAAhC;AAMAd,WAAW,CAACU,SAAZ,2CAAwB;EACtBT,KAAK,EAAEU,kBAAA,CAAUE,MADK;EAEtBX,iBAAiB,EAAES,kBAAA,CAAUE,MAFP;EAGtBnB,QAAQ,EAAEiB,kBAAA,CAAUG,IAHE;EAItBX,eAAe,EAAEQ,kBAAA,CAAUI;AAJL,CAAxB;eAOef,W"}
|
|
@@ -51,7 +51,9 @@ const Notification = props => {
|
|
|
51
51
|
stroke: null
|
|
52
52
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
53
53
|
className: _notification.default.message
|
|
54
|
-
}, /*#__PURE__*/_react.default.createElement("span",
|
|
54
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
55
|
+
role: "status"
|
|
56
|
+
}, message))));
|
|
55
57
|
};
|
|
56
58
|
|
|
57
59
|
Notification.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.js","names":["NOTIFICATION_ICON","addFavorite","CheckIcon","removeFavorite","MoreIcon","lock","LockIcon","unlock","UnlockIcon","handleOverlayClick","e","stopPropagation","preventDefault","Notification","props","message","icon","IconType","classnames","style","showOverlay","notificationWrapper","notification","propTypes","PropTypes","string","isRequired","oneOf"],"sources":["../../../src/molecule/card/notification.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get, keys} from 'lodash/fp';\nimport {\n NovaCompositionNavigationMore as MoreIcon,\n NovaSolidLoginLocked as LockIcon,\n NovaSolidLocksLockUnlock1 as UnlockIcon,\n NovaCompositionCoorpacademyCheck as CheckIcon\n} from '@coorpacademy/nova-icons';\nimport style from './notification.css';\n\nconst NOTIFICATION_ICON = {\n addFavorite: CheckIcon,\n removeFavorite: MoreIcon,\n lock: LockIcon,\n unlock: UnlockIcon\n};\n\nconst handleOverlayClick = e => {\n e.stopPropagation();\n e.preventDefault();\n return false;\n};\n\nconst Notification = props => {\n const {message, icon} = props;\n\n const IconType = get(icon, NOTIFICATION_ICON);\n return (\n <div\n data-name=\"notification\"\n data-type={icon}\n onClick={handleOverlayClick}\n className={classnames(style.showOverlay, style.notificationWrapper)}\n >\n <div className={style.notification}>\n <IconType className={style.icon} color={null} stroke={null} />\n <div className={style.message}>\n <span>{message}</span>\n </div>\n </div>\n </div>\n );\n};\nNotification.propTypes = {\n message: PropTypes.string.isRequired,\n icon: PropTypes.oneOf(keys(NOTIFICATION_ICON)).isRequired\n};\n\nexport default Notification;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAMA;;;;AAEA,MAAMA,iBAAiB,GAAG;EACxBC,WAAW,EAAEC,2CADW;EAExBC,cAAc,EAAEC,wCAFQ;EAGxBC,IAAI,EAAEC,+BAHkB;EAIxBC,MAAM,EAAEC;AAJgB,CAA1B;;AAOA,MAAMC,kBAAkB,GAAGC,CAAC,IAAI;EAC9BA,CAAC,CAACC,eAAF;EACAD,CAAC,CAACE,cAAF;EACA,OAAO,KAAP;AACD,CAJD;;AAMA,MAAMC,YAAY,GAAGC,KAAK,IAAI;EAC5B,MAAM;IAACC,OAAD;IAAUC;EAAV,IAAkBF,KAAxB;EAEA,MAAMG,QAAQ,GAAG,mBAAID,IAAJ,EAAUhB,iBAAV,CAAjB;EACA,oBACE;IACE,aAAU,cADZ;IAEE,aAAWgB,IAFb;IAGE,OAAO,EAAEP,kBAHX;IAIE,SAAS,EAAE,IAAAS,mBAAA,EAAWC,qBAAA,CAAMC,WAAjB,EAA8BD,qBAAA,CAAME,mBAApC;EAJb,gBAME;IAAK,SAAS,EAAEF,qBAAA,CAAMG;EAAtB,gBACE,6BAAC,QAAD;IAAU,SAAS,EAAEH,qBAAA,CAAMH,IAA3B;IAAiC,KAAK,EAAE,IAAxC;IAA8C,MAAM,EAAE;EAAtD,EADF,eAEE;IAAK,SAAS,EAAEG,qBAAA,CAAMJ;EAAtB,gBACE,
|
|
1
|
+
{"version":3,"file":"notification.js","names":["NOTIFICATION_ICON","addFavorite","CheckIcon","removeFavorite","MoreIcon","lock","LockIcon","unlock","UnlockIcon","handleOverlayClick","e","stopPropagation","preventDefault","Notification","props","message","icon","IconType","classnames","style","showOverlay","notificationWrapper","notification","propTypes","PropTypes","string","isRequired","oneOf"],"sources":["../../../src/molecule/card/notification.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get, keys} from 'lodash/fp';\nimport {\n NovaCompositionNavigationMore as MoreIcon,\n NovaSolidLoginLocked as LockIcon,\n NovaSolidLocksLockUnlock1 as UnlockIcon,\n NovaCompositionCoorpacademyCheck as CheckIcon\n} from '@coorpacademy/nova-icons';\nimport style from './notification.css';\n\nconst NOTIFICATION_ICON = {\n addFavorite: CheckIcon,\n removeFavorite: MoreIcon,\n lock: LockIcon,\n unlock: UnlockIcon\n};\n\nconst handleOverlayClick = e => {\n e.stopPropagation();\n e.preventDefault();\n return false;\n};\n\nconst Notification = props => {\n const {message, icon} = props;\n\n const IconType = get(icon, NOTIFICATION_ICON);\n return (\n <div\n data-name=\"notification\"\n data-type={icon}\n onClick={handleOverlayClick}\n className={classnames(style.showOverlay, style.notificationWrapper)}\n >\n <div className={style.notification}>\n <IconType className={style.icon} color={null} stroke={null} />\n <div className={style.message}>\n <span role=\"status\">{message}</span>\n </div>\n </div>\n </div>\n );\n};\nNotification.propTypes = {\n message: PropTypes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1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/molecule/forum/forum-post/index.js"],"names":[],"mappings":";AAUA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/molecule/forum/forum-post/index.js"],"names":[],"mappings":";AAUA,kEAkJC"}
|
|
@@ -127,7 +127,8 @@ const ForumPost = (props, context) => {
|
|
|
127
127
|
display: rejectable ? 'block' : 'none'
|
|
128
128
|
}
|
|
129
129
|
}, rejected ? putBackLabel : rejectLabel), /*#__PURE__*/_react.default.createElement("div", {
|
|
130
|
-
className: messageClassName
|
|
130
|
+
className: messageClassName,
|
|
131
|
+
role: "status"
|
|
131
132
|
}, deleted ? infoDeleted : message), /*#__PURE__*/_react.default.createElement("div", {
|
|
132
133
|
className: `${_style.default.edition} ${showEditBox ? _style.default.visible : ''}`
|
|
133
134
|
}, /*#__PURE__*/_react.default.createElement(_forumComment.default, {
|