@coorpacademy/components 11.32.13 → 11.32.15-alpha.9
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/button-link/style.css +1 -0
- package/es/atom/select/index.d.ts.map +1 -1
- package/es/atom/select/index.js +2 -1
- package/es/atom/select/index.js.map +1 -1
- package/es/atom/select/style.css +23 -0
- package/es/molecule/cm-popin/types.d.ts +3 -0
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/dashboard/cards-list/index.d.ts +4 -1
- package/es/molecule/dashboard/cards-list/index.d.ts.map +1 -1
- package/es/molecule/dashboard/cards-list/index.js +8 -3
- package/es/molecule/dashboard/cards-list/index.js.map +1 -1
- package/es/molecule/dashboard/cards-list/prop-types.d.ts +3 -1
- package/es/molecule/dashboard/cards-list/prop-types.d.ts.map +1 -1
- package/es/molecule/dashboard/cards-list/prop-types.js.map +1 -1
- package/es/molecule/dashboard/cards-list/style.css +4 -0
- package/es/molecule/learner-skill-card/index.js +2 -2
- package/es/molecule/learner-skill-card/index.js.map +1 -1
- package/es/organism/cards-grid/index.d.ts +3 -0
- package/es/organism/cards-grid/index.js +4 -1
- package/es/organism/cards-grid/index.js.map +1 -1
- package/es/organism/cards-grid/style.css +0 -1
- package/es/template/app-player/loading/index.d.ts +3 -0
- package/es/template/app-player/player/index.d.ts +6 -0
- package/es/template/app-player/player/slides/index.d.ts +3 -0
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +3 -0
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +7 -1
- package/es/template/app-player/popin-end/summary.d.ts +4 -1
- package/es/template/app-review/index.d.ts +3 -0
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +3 -0
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +3 -0
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +3 -0
- package/es/template/common/authors/index.d.ts +3 -0
- package/es/template/common/authors/index.d.ts.map +1 -1
- package/es/template/common/dashboard/index.d.ts +6 -0
- package/es/template/common/search-page/index.d.ts +10 -1
- package/es/template/external-course/index.d.ts +3 -0
- package/es/template/my-learning/index.d.ts +3 -0
- package/es/template/my-learning/index.d.ts.map +1 -1
- package/es/template/my-learning/index.js +24 -7
- package/es/template/my-learning/index.js.map +1 -1
- package/es/template/skill-detail/all-courses.css +128 -0
- package/es/template/skill-detail/all-courses.d.ts +80 -0
- package/es/template/skill-detail/all-courses.d.ts.map +1 -0
- package/es/template/skill-detail/all-courses.js +195 -0
- package/es/template/skill-detail/all-courses.js.map +1 -0
- package/es/template/skill-detail/continue-learning.css +16 -0
- package/es/template/skill-detail/continue-learning.d.ts +39 -0
- package/es/template/skill-detail/continue-learning.d.ts.map +1 -0
- package/es/template/skill-detail/continue-learning.js +42 -0
- package/es/template/skill-detail/continue-learning.js.map +1 -0
- package/es/template/skill-detail/index.d.ts +101 -0
- package/es/template/skill-detail/index.d.ts.map +1 -0
- package/es/template/skill-detail/index.js +228 -0
- package/es/template/skill-detail/index.js.map +1 -0
- package/es/template/skill-detail/style.css +174 -0
- package/es/template/teams-dashboard/index.d.ts +4 -1
- package/lib/atom/button-link/style.css +1 -0
- package/lib/atom/select/index.d.ts.map +1 -1
- package/lib/atom/select/index.js +2 -1
- package/lib/atom/select/index.js.map +1 -1
- package/lib/atom/select/style.css +23 -0
- package/lib/molecule/cm-popin/types.d.ts +3 -0
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/dashboard/cards-list/index.d.ts +4 -1
- package/lib/molecule/dashboard/cards-list/index.d.ts.map +1 -1
- package/lib/molecule/dashboard/cards-list/index.js +8 -4
- package/lib/molecule/dashboard/cards-list/index.js.map +1 -1
- package/lib/molecule/dashboard/cards-list/prop-types.d.ts +3 -1
- package/lib/molecule/dashboard/cards-list/prop-types.d.ts.map +1 -1
- package/lib/molecule/dashboard/cards-list/prop-types.js.map +1 -1
- package/lib/molecule/dashboard/cards-list/style.css +4 -0
- package/lib/molecule/learner-skill-card/index.js +2 -2
- package/lib/molecule/learner-skill-card/index.js.map +1 -1
- package/lib/organism/cards-grid/index.d.ts +3 -0
- package/lib/organism/cards-grid/index.js +4 -1
- package/lib/organism/cards-grid/index.js.map +1 -1
- package/lib/organism/cards-grid/style.css +0 -1
- package/lib/template/app-player/loading/index.d.ts +3 -0
- package/lib/template/app-player/player/index.d.ts +6 -0
- package/lib/template/app-player/player/slides/index.d.ts +3 -0
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +3 -0
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +7 -1
- package/lib/template/app-player/popin-end/summary.d.ts +4 -1
- package/lib/template/app-review/index.d.ts +3 -0
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +3 -0
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +3 -0
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +3 -0
- package/lib/template/common/authors/index.d.ts +3 -0
- package/lib/template/common/authors/index.d.ts.map +1 -1
- package/lib/template/common/dashboard/index.d.ts +6 -0
- package/lib/template/common/search-page/index.d.ts +10 -1
- package/lib/template/external-course/index.d.ts +3 -0
- package/lib/template/my-learning/index.d.ts +3 -0
- package/lib/template/my-learning/index.d.ts.map +1 -1
- package/lib/template/my-learning/index.js +24 -7
- package/lib/template/my-learning/index.js.map +1 -1
- package/lib/template/skill-detail/all-courses.css +128 -0
- package/lib/template/skill-detail/all-courses.d.ts +80 -0
- package/lib/template/skill-detail/all-courses.d.ts.map +1 -0
- package/lib/template/skill-detail/all-courses.js +214 -0
- package/lib/template/skill-detail/all-courses.js.map +1 -0
- package/lib/template/skill-detail/continue-learning.css +16 -0
- package/lib/template/skill-detail/continue-learning.d.ts +39 -0
- package/lib/template/skill-detail/continue-learning.d.ts.map +1 -0
- package/lib/template/skill-detail/continue-learning.js +59 -0
- package/lib/template/skill-detail/continue-learning.js.map +1 -0
- package/lib/template/skill-detail/index.d.ts +101 -0
- package/lib/template/skill-detail/index.d.ts.map +1 -0
- package/lib/template/skill-detail/index.js +250 -0
- package/lib/template/skill-detail/index.js.map +1 -0
- package/lib/template/skill-detail/style.css +174 -0
- package/lib/template/teams-dashboard/index.d.ts +4 -1
- package/locales/en/global.json +8 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/molecule/dashboard/cards-list/index.js"],"names":[],"mappings":";AAuFA;IACE;;;OAGG;IACH
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/molecule/dashboard/cards-list/index.js"],"names":[],"mappings":";AAuFA;IACE;;;OAGG;IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAeE;IAEF;;;;;;;;;;;;;;;;;;;;;;;MAGE;IAEF,wBAkCC;IA/BC;;;;;;;;MAQC;IAED,0DAAgE;IAsHlE,qBAiBC;IAED,qBAGC;IAED,sBAGC;IAED,0BASC;IAvJC,uEAA6D;IAyJ/D,mCAIC;IA5DD,oCAMC;IAGD,sCAIC;IA5DD,qBAGC;IAnCD,0BAMC;IAED,2BAYC;IAED,6BAOC;IASD,wCAuCC;IAGC,kBAA2B;IA6D7B,sBAuGC;CACF"}
|
|
@@ -319,6 +319,7 @@ class CardsList extends _react.default.PureComponent {
|
|
|
319
319
|
title,
|
|
320
320
|
showMore,
|
|
321
321
|
cards,
|
|
322
|
+
customStyle = {},
|
|
322
323
|
onShowMore,
|
|
323
324
|
dataName,
|
|
324
325
|
contentType,
|
|
@@ -369,14 +370,15 @@ class CardsList extends _react.default.PureComponent {
|
|
|
369
370
|
"aria-label": ariaLabel.showMoreOnRightAriaLabel
|
|
370
371
|
}));
|
|
371
372
|
|
|
372
|
-
const titleView = /*#__PURE__*/_react.default.createElement("span", {
|
|
373
|
+
const titleView = typeof title === 'string' ? /*#__PURE__*/_react.default.createElement("span", {
|
|
373
374
|
"data-name": "title",
|
|
374
375
|
className: titleStyle,
|
|
375
376
|
onClick: onShowMore
|
|
376
377
|
}, /*#__PURE__*/_react.default.createElement(IconView, {
|
|
377
378
|
contentType: contentType
|
|
378
|
-
}), /*#__PURE__*/_react.default.createElement("span", null, title))
|
|
379
|
-
|
|
379
|
+
}), /*#__PURE__*/_react.default.createElement("span", null, title)) : /*#__PURE__*/_react.default.createElement("span", {
|
|
380
|
+
className: _style.default.titleNode
|
|
381
|
+
}, title);
|
|
380
382
|
const hasPages = maxPages > 0;
|
|
381
383
|
const showMoreView = hasPages && showMore && onShowMore ? /*#__PURE__*/_react.default.createElement(ShowMoreLink, {
|
|
382
384
|
className: hasPages ? _style.default.showMoreBar : _style.default.showMore,
|
|
@@ -388,6 +390,7 @@ class CardsList extends _react.default.PureComponent {
|
|
|
388
390
|
}, showMoreView, leftArrowView, rightArrowView) : null;
|
|
389
391
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
390
392
|
className: _style.default.wrapper,
|
|
393
|
+
style: customStyle,
|
|
391
394
|
"data-name": "cardsList",
|
|
392
395
|
"data-max-pages": `${maxPages}` // eslint-disable-next-line react/destructuring-assignment
|
|
393
396
|
,
|
|
@@ -414,9 +417,10 @@ CardsList.contextTypes = {
|
|
|
414
417
|
CardsList.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
415
418
|
contentType: _propTypes.default.string,
|
|
416
419
|
dataName: _propTypes.default.string,
|
|
417
|
-
title: _propTypes.default.string,
|
|
420
|
+
title: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.string]),
|
|
418
421
|
showMore: _propTypes.default.string,
|
|
419
422
|
cards: _propTypes.default.arrayOf(_propTypes.default.shape(_card.cardPropTypes)),
|
|
423
|
+
customStyle: _propTypes.default.objectOf(_propTypes.default.string),
|
|
420
424
|
onScroll: _propTypes.default.func,
|
|
421
425
|
onShowMore: _propTypes.default.func,
|
|
422
426
|
'arrows-aria-label': _propTypes.default.shape({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ShowMoreLink","props","onShowMore","showMore","className","contextTypes","skin","Provider","childContextTypes","propTypes","PropTypes","func","string","IconView","context","contentType","ICONS","chapter","TimerIcon","course","LearnerIcon","dark","IconType","color","style","icon","computeWidth","card","type","nextPage","page","maxPages","CardsList","React","PureComponent","constructor","state","actualPage","scrollLeft","offsetWidth","possiblePositions","possiblePages","cardsWidth","handleScroll_","handleScroll","bind","handleOnLeft","handleOnRight","scrollTo","updateState","updatePages","setCardsWrapper","getScrollWidth","handleResize","testingSizes","componentDidMount","cardsWrapper","addEventListener","window","componentDidUpdate","cards","newCardsWidth","updatePaginationState","setState","componentWillUnmount","removeEventListener","cancel","wrapperWidth","wrapperScrollLeft","cardWidths","cardPositions","accWidth","cardWidth","acc","pageIndex","accPageWidth","pageWidth","skip","position","element","index","onScroll","leftBound","rightBound","leftIndex","rightIndex","limit","indexOfNextFirstCard","indexOf","nextPosition","render","title","dataName","ariaLabel","titleStyle","titleLink","cardsView","key","leftArrowView","circle","left","showMoreOnLeftAriaLabel","rightArrowView","right","showMoreOnRightAriaLabel","titleView","hasPages","showMoreView","showMoreBar","switchPagesView","pagingWrapper","wrapper","list","header","translate","arrayOf","shape","cardPropTypes","any"],"sources":["../../../../src/molecule/dashboard/cards-list/index.js"],"sourcesContent":["import React from 'react';\nimport {\n debounce,\n throttle,\n get,\n getOr,\n map,\n sum,\n last,\n pipe,\n toPairs,\n reduce,\n head,\n findIndex,\n findLastIndex\n} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport {\n NovaCompositionNavigationArrowLeft as ArrowLeft,\n NovaCompositionNavigationArrowRight as ArrowRight,\n NovaSolidContentContentBook1 as LearnerIcon,\n NovaCompositionCoorpacademyTimer as TimerIcon\n} from '@coorpacademy/nova-icons';\nimport Provider from '../../../atom/provider';\nimport Card, {cardPropTypes} from '../../card';\nimport style from './style.css';\n\nconst ShowMoreLink = props => {\n const {onShowMore, showMore, className} = props;\n return (\n <div className={className} onClick={onShowMore}>\n {showMore}\n </div>\n );\n};\n\nShowMoreLink.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nShowMoreLink.propTypes = {\n onShowMore: PropTypes.func,\n showMore: PropTypes.string,\n className: PropTypes.string\n};\n\nconst IconView = (props, context) => {\n const {skin} = context;\n const {contentType} = props;\n const ICONS = {\n chapter: TimerIcon,\n course: LearnerIcon\n };\n\n if (!contentType) {\n return null;\n }\n\n const dark = get('common.dark', skin);\n const IconType = ICONS[contentType];\n\n return (\n <div>\n <IconType style={{color: dark}} className={style.icon} data-contenttype={contentType} />\n </div>\n );\n};\n\nconst computeWidth = card => {\n switch (card && card.type) {\n case 'chapter':\n return 219;\n default:\n return 272;\n }\n};\n\nconst nextPage = (page, maxPages) => {\n if (page < 0) return maxPages;\n if (page > maxPages) return 0;\n return page;\n};\n\nIconView.propTypes = {\n contentType: PropTypes.string\n};\n\nclass CardsList extends React.PureComponent {\n /**\n * IMPORTANT: update prop-types.ts too, 1st a migration of tests\n * is intended, then, a TS + functional refactor is planned.\n */\n static propTypes = {\n contentType: PropTypes.string,\n dataName: PropTypes.string,\n title: PropTypes.string,\n showMore: PropTypes.string,\n cards: PropTypes.arrayOf(PropTypes.shape(cardPropTypes)),\n onScroll: PropTypes.func,\n onShowMore: PropTypes.func,\n 'arrows-aria-label': PropTypes.shape({\n showMoreOnLeftAriaLabel: PropTypes.string,\n showMoreOnRightAriaLabel: PropTypes.string\n }),\n // eslint-disable-next-line react/forbid-prop-types\n testingSizes: PropTypes.any\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n };\n\n constructor(props) {\n super(props);\n\n this.state = {\n actualPage: 0,\n maxPages: 0,\n scrollLeft: 0,\n offsetWidth: 0,\n possiblePositions: [],\n possiblePages: [],\n cardsWidth: 0\n };\n\n this.handleScroll_ = throttle(200, this.handleScroll.bind(this));\n this.handleScroll = this.handleScroll.bind(this);\n this.handleOnLeft = this.handleOnLeft.bind(this);\n this.handleOnRight = this.handleOnRight.bind(this);\n this.scrollTo = this.scrollTo.bind(this);\n this.updateState = debounce(200, this.updatePages.bind(this));\n this.updatePages = this.updatePages.bind(this);\n this.setCardsWrapper = this.setCardsWrapper.bind(this);\n this.getScrollWidth = this.getScrollWidth.bind(this);\n this.handleResize = this.handleResize.bind(this);\n\n // for testing purposes only - no other way to test this polluted component\n if (props.testingSizes) {\n const {offsetWidth, scrollLeft, maxPages, possiblePages, possiblePositions} =\n props.testingSizes;\n this.state.offsetWidth = offsetWidth;\n this.state.scrollLeft = scrollLeft;\n this.state.maxPages = maxPages;\n this.state.possiblePages = possiblePages;\n this.state.possiblePositions = possiblePositions;\n }\n }\n\n componentDidMount() {\n this.cardsWrapper.addEventListener('scroll', this.handleScroll_);\n\n if (window) {\n window.addEventListener('resize', this.handleResize);\n }\n }\n\n componentDidUpdate() {\n const {cards = []} = this.props;\n const {offsetWidth, cardsWidth} = this.state;\n const newCardsWidth = pipe(map(computeWidth), sum)(cards);\n\n if (newCardsWidth !== cardsWidth && offsetWidth !== 0) {\n this.updatePaginationState(cards);\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState({\n cardsWidth: newCardsWidth\n });\n }\n }\n\n componentWillUnmount() {\n this.cardsWrapper.removeEventListener('scroll', this.handleScroll_);\n\n if (window) {\n window.removeEventListener('resize', this.handleResize);\n }\n this.updateState.cancel();\n }\n\n /* istanbul ignore next */\n handleResize() {\n const {cards = []} = this.props;\n this.updatePaginationState(cards);\n }\n\n /* istanbul ignore next */\n updatePaginationState(cards) {\n const {offsetWidth: wrapperWidth, scrollLeft: wrapperScrollLeft} = this.state;\n\n const cardWidths = map(computeWidth)(cards);\n\n const possiblePositions = pipe(\n reduce(\n ([cardPositions, accWidth], cardWidth) => [\n [...cardPositions, accWidth],\n cardWidth + accWidth\n ],\n [[], 0]\n ),\n head\n )(cardWidths);\n\n const possiblePages = pipe(\n reduce(\n ([acc, pageIndex, accPageWidth], cardWidth) => {\n const pageWidth = accPageWidth + cardWidth;\n if (pageWidth > wrapperWidth) {\n return [[...acc, pageIndex + 1], pageIndex + 1, cardWidth];\n }\n return [[...acc, pageIndex], pageIndex, pageWidth];\n },\n [[], 0, 0]\n ),\n head\n )(cardWidths);\n\n const skip = findIndex(position => position >= wrapperScrollLeft, possiblePositions);\n const actualPage = possiblePages[skip + 1];\n\n this.setState({\n possiblePositions,\n possiblePages,\n maxPages: last(possiblePages),\n actualPage\n });\n }\n\n setCardsWrapper(element) {\n this.cardsWrapper = element;\n this.setState({\n scrollLeft: this.cardsWrapper?.scrollLeft,\n offsetWidth: this.cardsWrapper?.offsetWidth\n });\n }\n\n /* istanbul ignore next */\n getScrollWidth(index) {\n const {cards = []} = this.props;\n const card = cards[index];\n return computeWidth(card);\n }\n\n /* istanbul ignore next */\n handleScroll() {\n const scrollLeft = this.cardsWrapper?.scrollLeft;\n this.setState({scrollLeft});\n\n const {possiblePositions, offsetWidth} = this.state;\n const {onScroll} = this.props;\n if (onScroll) {\n const leftBound = scrollLeft;\n const rightBound = scrollLeft + offsetWidth;\n\n const leftIndex = findIndex(position => position > leftBound, possiblePositions) - 1;\n const rightIndex = findLastIndex(position => position < rightBound, possiblePositions);\n const skip = leftIndex;\n const limit = rightIndex - skip + 1;\n\n onScroll(skip, limit);\n }\n }\n\n handleOnLeft() {\n const {actualPage, maxPages} = this.state;\n this.scrollTo(nextPage(actualPage - 1, maxPages));\n }\n\n handleOnRight() {\n const {actualPage, maxPages} = this.state;\n this.scrollTo(nextPage(actualPage + 1, maxPages));\n }\n\n scrollTo(page) {\n const {possiblePages, possiblePositions} = this.state;\n const indexOfNextFirstCard = possiblePages.indexOf(page);\n const nextPosition = possiblePositions[indexOfNextFirstCard];\n this.cardsWrapper.scrollLeft = nextPosition;\n this.updatePages(page);\n this.setState({\n scrollLeft: nextPosition\n });\n }\n\n updatePages(actualPage) {\n this.setState({\n actualPage\n });\n }\n\n render() {\n const {\n title,\n showMore,\n cards,\n onShowMore,\n dataName,\n contentType,\n 'arrows-aria-label': ariaLabel = {}\n } = this.props;\n const {skin} = this.context;\n const {maxPages} = this.state;\n const dark = getOr('#90A4AE', 'common.dark', skin);\n const titleStyle = onShowMore ? style.titleLink : style.title;\n const cardsView = pipe(\n toPairs,\n map(([key, card]) => {\n return (\n <div className={style.card} key={key}>\n <Card {...card} dataName={`${dataName}-${key}`} />\n </div>\n );\n })\n )(cards);\n const leftArrowView = (\n <div className={style.circle} onClick={this.handleOnLeft} data-name=\"card-list-left-arrow\">\n <ArrowLeft\n style={{color: dark}}\n className={style.left}\n width={10}\n height={10}\n aria-label={ariaLabel.showMoreOnLeftAriaLabel}\n />\n </div>\n );\n const rightArrowView = (\n <div className={style.circle} onClick={this.handleOnRight} data-name=\"card-list-right-arrow\">\n <ArrowRight\n style={{color: dark}}\n className={style.right}\n width={10}\n height={10}\n aria-label={ariaLabel.showMoreOnRightAriaLabel}\n />\n </div>\n );\n\n const titleView = (\n <span data-name=\"title\" className={titleStyle} onClick={onShowMore}>\n <IconView contentType={contentType} />\n <span>{title}</span>\n </span>\n );\n\n const hasPages = maxPages > 0;\n const showMoreView =\n hasPages && showMore && onShowMore ? (\n <ShowMoreLink\n className={hasPages ? style.showMoreBar : style.showMore}\n onShowMore={onShowMore}\n showMore={showMore}\n />\n ) : null;\n\n const switchPagesView = hasPages ? (\n <div className={style.pagingWrapper}>\n {showMoreView}\n {leftArrowView}\n {rightArrowView}\n </div>\n ) : null;\n\n return (\n <div\n className={style.wrapper}\n data-name=\"cardsList\"\n data-max-pages={`${maxPages}`}\n // eslint-disable-next-line react/destructuring-assignment\n data-actual-page={`${this.state.actualPage}`}\n data-scroll-left={this.cardsWrapper?.scrollLeft}\n >\n <div className={style.list}>\n <div>\n <div data-name=\"header\" className={style.header}>\n {titleView}\n {switchPagesView}\n </div>\n <div\n className={style.cards}\n data-testid=\"cards-view-wrapper\"\n ref={this.setCardsWrapper}\n >\n {cardsView}\n </div>\n </div>\n </div>\n </div>\n );\n }\n}\n\nexport default CardsList;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAgBA;;AACA;;AAMA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,YAAY,GAAGC,KAAK,IAAI;EAC5B,MAAM;IAACC,UAAD;IAAaC,QAAb;IAAuBC;EAAvB,IAAoCH,KAA1C;EACA,oBACE;IAAK,SAAS,EAAEG,SAAhB;IAA2B,OAAO,EAAEF;EAApC,GACGC,QADH,CADF;AAKD,CAPD;;AASAH,YAAY,CAACK,YAAb,GAA4B;EAC1BC,IAAI,EAAEC,iBAAA,CAASC,iBAAT,CAA2BF;AADP,CAA5B;AAIAN,YAAY,CAACS,SAAb,2CAAyB;EACvBP,UAAU,EAAEQ,kBAAA,CAAUC,IADC;EAEvBR,QAAQ,EAAEO,kBAAA,CAAUE,MAFG;EAGvBR,SAAS,EAAEM,kBAAA,CAAUE;AAHE,CAAzB;;AAMA,MAAMC,QAAQ,GAAG,CAACZ,KAAD,EAAQa,OAAR,KAAoB;EACnC,MAAM;IAACR;EAAD,IAASQ,OAAf;EACA,MAAM;IAACC;EAAD,IAAgBd,KAAtB;EACA,MAAMe,KAAK,GAAG;IACZC,OAAO,EAAEC,2CADG;IAEZC,MAAM,EAAEC;EAFI,CAAd;;EAKA,IAAI,CAACL,WAAL,EAAkB;IAChB,OAAO,IAAP;EACD;;EAED,MAAMM,IAAI,GAAG,mBAAI,aAAJ,EAAmBf,IAAnB,CAAb;EACA,MAAMgB,QAAQ,GAAGN,KAAK,CAACD,WAAD,CAAtB;EAEA,oBACE,uDACE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cAAA,CAAMoC,KADnB;MAEE,eAAY,oBAFd;MAGE,GAAG,EAAE,KAAKT;IAHZ,GAKG6C,SALH,CALF,CADF,CARF,CADF;EA0BD;;AA7SyC;;AAAtChE,S,CAqBG3B,Y,GAAe;EACpBC,IAAI,EAAEC,iBAAA,CAASC,iBAAT,CAA2BF,IADb;EAEpB4G,SAAS,EAAE3G,iBAAA,CAASC,iBAAT,CAA2B0G;AAFlB,C;AArBlBlF,S,CAKGvB,S,2CAAY;EACjBM,WAAW,EAAEL,kBAAA,CAAUE,MADN;EAEjBgF,QAAQ,EAAElF,kBAAA,CAAUE,MAFH;EAGjB+E,KAAK,EAAEjF,kBAAA,CAAUE,MAHA;EAIjBT,QAAQ,EAAEO,kBAAA,CAAUE,MAJH;EAKjBgD,KAAK,EAAElD,kBAAA,CAAUyG,OAAV,CAAkBzG,kBAAA,CAAU0G,KAAV,CAAgBC,mBAAhB,CAAlB,CALU;EAMjBpC,QAAQ,EAAEvE,kBAAA,CAAUC,IANH;EAOjBT,UAAU,EAAEQ,kBAAA,CAAUC,IAPL;EAQjB,qBAAqBD,kBAAA,CAAU0G,KAAV,CAAgB;IACnCf,uBAAuB,EAAE3F,kBAAA,CAAUE,MADA;IAEnC4F,wBAAwB,EAAE9F,kBAAA,CAAUE;EAFD,CAAhB,CARJ;EAYjB;EACA0C,YAAY,EAAE5C,kBAAA,CAAU4G;AAbP,C;eA2SNtF,S"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["ShowMoreLink","props","onShowMore","showMore","className","contextTypes","skin","Provider","childContextTypes","propTypes","PropTypes","func","string","IconView","context","contentType","ICONS","chapter","TimerIcon","course","LearnerIcon","dark","IconType","color","style","icon","computeWidth","card","type","nextPage","page","maxPages","CardsList","React","PureComponent","constructor","state","actualPage","scrollLeft","offsetWidth","possiblePositions","possiblePages","cardsWidth","handleScroll_","handleScroll","bind","handleOnLeft","handleOnRight","scrollTo","updateState","updatePages","setCardsWrapper","getScrollWidth","handleResize","testingSizes","componentDidMount","cardsWrapper","addEventListener","window","componentDidUpdate","cards","newCardsWidth","updatePaginationState","setState","componentWillUnmount","removeEventListener","cancel","wrapperWidth","wrapperScrollLeft","cardWidths","cardPositions","accWidth","cardWidth","acc","pageIndex","accPageWidth","pageWidth","skip","position","element","index","onScroll","leftBound","rightBound","leftIndex","rightIndex","limit","indexOfNextFirstCard","indexOf","nextPosition","render","title","customStyle","dataName","ariaLabel","titleStyle","titleLink","cardsView","key","leftArrowView","circle","left","showMoreOnLeftAriaLabel","rightArrowView","right","showMoreOnRightAriaLabel","titleView","titleNode","hasPages","showMoreView","showMoreBar","switchPagesView","pagingWrapper","wrapper","list","header","translate","oneOfType","node","arrayOf","shape","cardPropTypes","objectOf","any"],"sources":["../../../../src/molecule/dashboard/cards-list/index.js"],"sourcesContent":["import React from 'react';\nimport {\n debounce,\n throttle,\n get,\n getOr,\n map,\n sum,\n last,\n pipe,\n toPairs,\n reduce,\n head,\n findIndex,\n findLastIndex\n} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport {\n NovaCompositionNavigationArrowLeft as ArrowLeft,\n NovaCompositionNavigationArrowRight as ArrowRight,\n NovaSolidContentContentBook1 as LearnerIcon,\n NovaCompositionCoorpacademyTimer as TimerIcon\n} from '@coorpacademy/nova-icons';\nimport Provider from '../../../atom/provider';\nimport Card, {cardPropTypes} from '../../card';\nimport style from './style.css';\n\nconst ShowMoreLink = props => {\n const {onShowMore, showMore, className} = props;\n return (\n <div className={className} onClick={onShowMore}>\n {showMore}\n </div>\n );\n};\n\nShowMoreLink.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nShowMoreLink.propTypes = {\n onShowMore: PropTypes.func,\n showMore: PropTypes.string,\n className: PropTypes.string\n};\n\nconst IconView = (props, context) => {\n const {skin} = context;\n const {contentType} = props;\n const ICONS = {\n chapter: TimerIcon,\n course: LearnerIcon\n };\n\n if (!contentType) {\n return null;\n }\n\n const dark = get('common.dark', skin);\n const IconType = ICONS[contentType];\n\n return (\n <div>\n <IconType style={{color: dark}} className={style.icon} data-contenttype={contentType} />\n </div>\n );\n};\n\nconst computeWidth = card => {\n switch (card && card.type) {\n case 'chapter':\n return 219;\n default:\n return 272;\n }\n};\n\nconst nextPage = (page, maxPages) => {\n if (page < 0) return maxPages;\n if (page > maxPages) return 0;\n return page;\n};\n\nIconView.propTypes = {\n contentType: PropTypes.string\n};\n\nclass CardsList extends React.PureComponent {\n /**\n * IMPORTANT: update prop-types.ts too, 1st a migration of tests\n * is intended, then, a TS + functional refactor is planned.\n */\n static propTypes = {\n contentType: PropTypes.string,\n dataName: PropTypes.string,\n title: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),\n showMore: PropTypes.string,\n cards: PropTypes.arrayOf(PropTypes.shape(cardPropTypes)),\n customStyle: PropTypes.objectOf(PropTypes.string),\n onScroll: PropTypes.func,\n onShowMore: PropTypes.func,\n 'arrows-aria-label': PropTypes.shape({\n showMoreOnLeftAriaLabel: PropTypes.string,\n showMoreOnRightAriaLabel: PropTypes.string\n }),\n // eslint-disable-next-line react/forbid-prop-types\n testingSizes: PropTypes.any\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n };\n\n constructor(props) {\n super(props);\n\n this.state = {\n actualPage: 0,\n maxPages: 0,\n scrollLeft: 0,\n offsetWidth: 0,\n possiblePositions: [],\n possiblePages: [],\n cardsWidth: 0\n };\n\n this.handleScroll_ = throttle(200, this.handleScroll.bind(this));\n this.handleScroll = this.handleScroll.bind(this);\n this.handleOnLeft = this.handleOnLeft.bind(this);\n this.handleOnRight = this.handleOnRight.bind(this);\n this.scrollTo = this.scrollTo.bind(this);\n this.updateState = debounce(200, this.updatePages.bind(this));\n this.updatePages = this.updatePages.bind(this);\n this.setCardsWrapper = this.setCardsWrapper.bind(this);\n this.getScrollWidth = this.getScrollWidth.bind(this);\n this.handleResize = this.handleResize.bind(this);\n\n // for testing purposes only - no other way to test this polluted component\n if (props.testingSizes) {\n const {offsetWidth, scrollLeft, maxPages, possiblePages, possiblePositions} =\n props.testingSizes;\n this.state.offsetWidth = offsetWidth;\n this.state.scrollLeft = scrollLeft;\n this.state.maxPages = maxPages;\n this.state.possiblePages = possiblePages;\n this.state.possiblePositions = possiblePositions;\n }\n }\n\n componentDidMount() {\n this.cardsWrapper.addEventListener('scroll', this.handleScroll_);\n\n if (window) {\n window.addEventListener('resize', this.handleResize);\n }\n }\n\n componentDidUpdate() {\n const {cards = []} = this.props;\n const {offsetWidth, cardsWidth} = this.state;\n const newCardsWidth = pipe(map(computeWidth), sum)(cards);\n\n if (newCardsWidth !== cardsWidth && offsetWidth !== 0) {\n this.updatePaginationState(cards);\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState({\n cardsWidth: newCardsWidth\n });\n }\n }\n\n componentWillUnmount() {\n this.cardsWrapper.removeEventListener('scroll', this.handleScroll_);\n\n if (window) {\n window.removeEventListener('resize', this.handleResize);\n }\n this.updateState.cancel();\n }\n\n /* istanbul ignore next */\n handleResize() {\n const {cards = []} = this.props;\n this.updatePaginationState(cards);\n }\n\n /* istanbul ignore next */\n updatePaginationState(cards) {\n const {offsetWidth: wrapperWidth, scrollLeft: wrapperScrollLeft} = this.state;\n\n const cardWidths = map(computeWidth)(cards);\n\n const possiblePositions = pipe(\n reduce(\n ([cardPositions, accWidth], cardWidth) => [\n [...cardPositions, accWidth],\n cardWidth + accWidth\n ],\n [[], 0]\n ),\n head\n )(cardWidths);\n\n const possiblePages = pipe(\n reduce(\n ([acc, pageIndex, accPageWidth], cardWidth) => {\n const pageWidth = accPageWidth + cardWidth;\n if (pageWidth > wrapperWidth) {\n return [[...acc, pageIndex + 1], pageIndex + 1, cardWidth];\n }\n return [[...acc, pageIndex], pageIndex, pageWidth];\n },\n [[], 0, 0]\n ),\n head\n )(cardWidths);\n\n const skip = findIndex(position => position >= wrapperScrollLeft, possiblePositions);\n const actualPage = possiblePages[skip + 1];\n\n this.setState({\n possiblePositions,\n possiblePages,\n maxPages: last(possiblePages),\n actualPage\n });\n }\n\n setCardsWrapper(element) {\n this.cardsWrapper = element;\n this.setState({\n scrollLeft: this.cardsWrapper?.scrollLeft,\n offsetWidth: this.cardsWrapper?.offsetWidth\n });\n }\n\n /* istanbul ignore next */\n getScrollWidth(index) {\n const {cards = []} = this.props;\n const card = cards[index];\n return computeWidth(card);\n }\n\n /* istanbul ignore next */\n handleScroll() {\n const scrollLeft = this.cardsWrapper?.scrollLeft;\n this.setState({scrollLeft});\n\n const {possiblePositions, offsetWidth} = this.state;\n const {onScroll} = this.props;\n if (onScroll) {\n const leftBound = scrollLeft;\n const rightBound = scrollLeft + offsetWidth;\n\n const leftIndex = findIndex(position => position > leftBound, possiblePositions) - 1;\n const rightIndex = findLastIndex(position => position < rightBound, possiblePositions);\n const skip = leftIndex;\n const limit = rightIndex - skip + 1;\n\n onScroll(skip, limit);\n }\n }\n\n handleOnLeft() {\n const {actualPage, maxPages} = this.state;\n this.scrollTo(nextPage(actualPage - 1, maxPages));\n }\n\n handleOnRight() {\n const {actualPage, maxPages} = this.state;\n this.scrollTo(nextPage(actualPage + 1, maxPages));\n }\n\n scrollTo(page) {\n const {possiblePages, possiblePositions} = this.state;\n const indexOfNextFirstCard = possiblePages.indexOf(page);\n const nextPosition = possiblePositions[indexOfNextFirstCard];\n this.cardsWrapper.scrollLeft = nextPosition;\n this.updatePages(page);\n this.setState({\n scrollLeft: nextPosition\n });\n }\n\n updatePages(actualPage) {\n this.setState({\n actualPage\n });\n }\n\n render() {\n const {\n title,\n showMore,\n cards,\n customStyle = {},\n onShowMore,\n dataName,\n contentType,\n 'arrows-aria-label': ariaLabel = {}\n } = this.props;\n const {skin} = this.context;\n const {maxPages} = this.state;\n const dark = getOr('#90A4AE', 'common.dark', skin);\n const titleStyle = onShowMore ? style.titleLink : style.title;\n const cardsView = pipe(\n toPairs,\n map(([key, card]) => {\n return (\n <div className={style.card} key={key}>\n <Card {...card} dataName={`${dataName}-${key}`} />\n </div>\n );\n })\n )(cards);\n const leftArrowView = (\n <div className={style.circle} onClick={this.handleOnLeft} data-name=\"card-list-left-arrow\">\n <ArrowLeft\n style={{color: dark}}\n className={style.left}\n width={10}\n height={10}\n aria-label={ariaLabel.showMoreOnLeftAriaLabel}\n />\n </div>\n );\n const rightArrowView = (\n <div className={style.circle} onClick={this.handleOnRight} data-name=\"card-list-right-arrow\">\n <ArrowRight\n style={{color: dark}}\n className={style.right}\n width={10}\n height={10}\n aria-label={ariaLabel.showMoreOnRightAriaLabel}\n />\n </div>\n );\n\n const titleView =\n typeof title === 'string' ? (\n <span data-name=\"title\" className={titleStyle} onClick={onShowMore}>\n <IconView contentType={contentType} />\n <span>{title}</span>\n </span>\n ) : (\n <span className={style.titleNode}>{title}</span>\n );\n\n const hasPages = maxPages > 0;\n const showMoreView =\n hasPages && showMore && onShowMore ? (\n <ShowMoreLink\n className={hasPages ? style.showMoreBar : style.showMore}\n onShowMore={onShowMore}\n showMore={showMore}\n />\n ) : null;\n\n const switchPagesView = hasPages ? (\n <div className={style.pagingWrapper}>\n {showMoreView}\n {leftArrowView}\n {rightArrowView}\n </div>\n ) : null;\n\n return (\n <div\n className={style.wrapper}\n style={customStyle}\n data-name=\"cardsList\"\n data-max-pages={`${maxPages}`}\n // eslint-disable-next-line react/destructuring-assignment\n data-actual-page={`${this.state.actualPage}`}\n data-scroll-left={this.cardsWrapper?.scrollLeft}\n >\n <div className={style.list}>\n <div>\n <div data-name=\"header\" className={style.header}>\n {titleView}\n {switchPagesView}\n </div>\n <div\n className={style.cards}\n data-testid=\"cards-view-wrapper\"\n ref={this.setCardsWrapper}\n >\n {cardsView}\n </div>\n </div>\n </div>\n </div>\n );\n }\n}\n\nexport default CardsList;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAgBA;;AACA;;AAMA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,YAAY,GAAGC,KAAK,IAAI;EAC5B,MAAM;IAACC,UAAD;IAAaC,QAAb;IAAuBC;EA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,S,2CAAY;EACjBM,WAAW,EAAEL,kBAAA,CAAUE,MADN;EAEjBiF,QAAQ,EAAEnF,kBAAA,CAAUE,MAFH;EAGjB+E,KAAK,EAAEjF,kBAAA,CAAU2G,SAAV,CAAoB,CAAC3G,kBAAA,CAAU4G,IAAX,EAAiB5G,kBAAA,CAAUE,MAA3B,CAApB,CAHU;EAIjBT,QAAQ,EAAEO,kBAAA,CAAUE,MAJH;EAKjBgD,KAAK,EAAElD,kBAAA,CAAU6G,OAAV,CAAkB7G,kBAAA,CAAU8G,KAAV,CAAgBC,mBAAhB,CAAlB,CALU;EAMjB7B,WAAW,EAAElF,kBAAA,CAAUgH,QAAV,CAAmBhH,kBAAA,CAAUE,MAA7B,CANI;EAOjBqE,QAAQ,EAAEvE,kBAAA,CAAUC,IAPH;EAQjBT,UAAU,EAAEQ,kBAAA,CAAUC,IARL;EASjB,qBAAqBD,kBAAA,CAAU8G,KAAV,CAAgB;IACnClB,uBAAuB,EAAE5F,kBAAA,CAAUE,MADA;IAEnC6F,wBAAwB,EAAE/F,kBAAA,CAAUE;EAFD,CAAhB,CATJ;EAajB;EACA0C,YAAY,EAAE5C,kBAAA,CAAUiH;AAdP,C;eAiTN3F,S"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare type CardsListProps = {
|
|
2
3
|
contentType: string;
|
|
3
4
|
dataName: string;
|
|
4
|
-
title: string;
|
|
5
|
+
title: string | React.ReactNode;
|
|
5
6
|
showMore: string;
|
|
6
7
|
cards: Record<string, unknown>[];
|
|
8
|
+
customStyle: Record<string, unknown>;
|
|
7
9
|
onScroll: (skip: number, limit: number) => void;
|
|
8
10
|
onShowMore: () => void;
|
|
9
11
|
'arrows-aria-label': {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../../src/molecule/dashboard/cards-list/prop-types.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc,GAAG;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../../src/molecule/dashboard/cards-list/prop-types.ts"],"names":[],"mappings":";AAAA,oBAAY,cAAc,GAAG;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IACjC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,mBAAmB,EAAE;QACnB,uBAAuB,EAAE,MAAM,CAAC;QAChC,wBAAwB,EAAE,MAAM,CAAC;KAClC,CAAC;CACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.js","names":[],"sources":["../../../../src/molecule/dashboard/cards-list/prop-types.ts"],"sourcesContent":["export type CardsListProps = {\n contentType: string;\n dataName: string;\n title: string;\n showMore: string;\n cards: Record<string, unknown>[];\n onScroll: (skip: number, limit: number) => void;\n onShowMore: () => void;\n 'arrows-aria-label': {\n showMoreOnLeftAriaLabel: string;\n showMoreOnRightAriaLabel: string;\n };\n};\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"prop-types.js","names":[],"sources":["../../../../src/molecule/dashboard/cards-list/prop-types.ts"],"sourcesContent":["export type CardsListProps = {\n contentType: string;\n dataName: string;\n title: string | React.ReactNode;\n showMore: string;\n cards: Record<string, unknown>[];\n customStyle: Record<string, unknown>;\n onScroll: (skip: number, limit: number) => void;\n onShowMore: () => void;\n 'arrows-aria-label': {\n showMoreOnLeftAriaLabel: string;\n showMoreOnRightAriaLabel: string;\n };\n};\n"],"mappings":""}
|
|
@@ -138,7 +138,7 @@ const LearnerSkillCard = (props, context) => {
|
|
|
138
138
|
}
|
|
139
139
|
}), skillFocusLocale) : null), /*#__PURE__*/_react.default.createElement(ProgressBar, null), /*#__PURE__*/_react.default.createElement("div", {
|
|
140
140
|
className: _style.default.progressInformations
|
|
141
|
-
}, content
|
|
141
|
+
}, content ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
142
142
|
className: _style.default.progressInformation,
|
|
143
143
|
"data-name": "skill-completed-courses"
|
|
144
144
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -148,7 +148,7 @@ const LearnerSkillCard = (props, context) => {
|
|
|
148
148
|
"data-name": "completed-percentage"
|
|
149
149
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
150
150
|
className: _style.default.progressInformationNumber
|
|
151
|
-
}, score, "%")))), /*#__PURE__*/_react.default.createElement("div", {
|
|
151
|
+
}, score, "%"))) : null), /*#__PURE__*/_react.default.createElement("div", {
|
|
152
152
|
className: _style.default.ctaWrapper,
|
|
153
153
|
"data-name": "cta-wrapper"
|
|
154
154
|
}, /*#__PURE__*/_react.default.createElement(_buttonLink.default, buttonReviewProps), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["LearnerSkillCard","props","context","ariaLabel","skillTitle","skillAriaLabel","focus","metrics","review","onReviewClick","onExploreClick","score","content","questionsToReview","contentCompleted","skin","translate","hovered","setHovered","useState","primarySkinColor","reviewLocale","exploreLocale","coursesLocale","questionsLocale","skillFocusLocale","contentCompletedLocale","handleMouseOver","useCallback","handleMouseLeave","buttonReviewProps","customStyle","backgroundColor","transition","padding","disabled","onClick","label","buttonExploreProps","convert","color","icon","position","faIcon","name","size","ProgressBar","progressBarColor","inlineProgressValueStyle","width","style","progressWrapper","progress","learnerSkillCardWrapper","skillCoursesAndQuestionsWrapper","skillInformation","skillInformationNumber","skillTitleWrapper","skillFocusBadge","faSize","wrapperSize","progressInformations","progressInformation","progressInformationNumber","ctaWrapper","buttonWrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","bool","shape","number","func"],"sources":["../../../src/molecule/learner-skill-card/index.js"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport {convert} from 'css-color-function';\nimport {get} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport Icon from '../../atom/icon';\nimport ButtonLink from '../../atom/button-link';\nimport Provider from '../../atom/provider';\nimport style from './style.css';\n\nconst LearnerSkillCard = (props, context) => {\n const {\n 'aria-label': ariaLabel,\n skillTitle,\n skillAriaLabel,\n focus = false,\n metrics,\n review = false,\n onReviewClick,\n onExploreClick\n } = props;\n const {score, content, questionsToReview, contentCompleted = 0} = metrics;\n const {skin, translate} = context;\n const [hovered, setHovered] = useState(false);\n const primarySkinColor = get('common.primary', skin);\n\n const reviewLocale = translate('Review');\n const exploreLocale = translate('Explore');\n const coursesLocale = translate('courses');\n const questionsLocale = translate('questions');\n const skillFocusLocale = translate('skill_focus');\n const contentCompletedLocale = translate('courses_completed');\n\n const handleMouseOver = useCallback(() => setHovered(true), [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n const buttonReviewProps = {\n customStyle: {\n backgroundColor: '#FFF',\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',\n padding: '0px'\n },\n disabled: !review,\n onClick: onReviewClick,\n 'aria-label': `${skillTitle}, ${reviewLocale}`,\n label: reviewLocale,\n 'data-name': 'learner-skill-card-review-button'\n };\n\n const buttonExploreProps = {\n customStyle: {\n backgroundColor: hovered ? primarySkinColor : convert(`color(${primarySkinColor} a(0.07))`),\n color: hovered ? '#FFFFFF' : primarySkinColor,\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out'\n },\n onClick: onExploreClick,\n 'aria-label': `${skillTitle}, ${exploreLocale}`,\n label: exploreLocale,\n 'data-name': 'learner-skill-card-explore-button',\n icon: {\n position: 'left',\n faIcon: {\n name: 'compass',\n backgroundColor: hovered ? primarySkinColor : convert(`color(${primarySkinColor} a(0.07))`),\n color: hovered ? '#FFFFFF' : primarySkinColor,\n size: 16\n }\n }\n };\n\n const ProgressBar = useCallback(() => {\n if (!content) return null;\n\n const progressBarColor = '#3EC483';\n const inlineProgressValueStyle = {\n backgroundColor: progressBarColor,\n width: `${score}%`\n };\n\n return (\n <div className={style.progressWrapper}>\n <div\n data-name=\"progress\"\n className={style.progress}\n style={inlineProgressValueStyle}\n role=\"progressbar\"\n aria-label={get('progression', ariaLabel)}\n />\n </div>\n );\n }, [score, ariaLabel, content]);\n\n return (\n <div\n className={style.learnerSkillCardWrapper}\n data-name=\"learner-skill-card-wrapper\"\n aria-label={ariaLabel}\n >\n {content || questionsToReview ? (\n <div className={style.skillCoursesAndQuestionsWrapper}>\n {content ? (\n <div className={style.skillInformation} data-name=\"skill-courses\">\n <span className={style.skillInformationNumber}>{content}</span> {coursesLocale}\n </div>\n ) : null}\n {questionsToReview ? (\n <div className={style.skillInformation} data-name=\"skill-questions\">\n <span className={style.skillInformationNumber}>{questionsToReview}</span>\n {questionsLocale}\n </div>\n ) : null}\n </div>\n ) : null}\n <div className={style.skillTitleWrapper}>\n <div\n data-name=\"skill-title\"\n className={style.skillTitle}\n aria-label={skillAriaLabel || skillTitle}\n >\n {skillTitle}\n </div>\n {focus ? (\n <div className={style.skillFocusBadge}>\n <Icon\n iconName=\"bullseye-arrow\"\n backgroundColor=\"#DDD1FF\"\n size={{\n faSize: 10,\n wrapperSize: 16\n }}\n />\n {skillFocusLocale}\n </div>\n ) : null}\n </div>\n <ProgressBar />\n <div className={style.progressInformations}>\n {content && (\n <>\n <div className={style.progressInformation} data-name=\"skill-completed-courses\">\n <span className={style.progressInformationNumber}>{contentCompleted}</span>\n {` ${contentCompletedLocale}`}\n </div>\n <div className={style.progressInformation} data-name=\"completed-percentage\">\n <span className={style.progressInformationNumber}>{score}%</span>\n </div>\n </>\n )}\n </div>\n <div className={style.ctaWrapper} data-name=\"cta-wrapper\">\n <ButtonLink {...buttonReviewProps} />\n <div\n className={style.buttonWrapper}\n onMouseOver={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n data-name=\"button-explore-wrapper\"\n >\n <ButtonLink {...buttonExploreProps} />\n </div>\n </div>\n </div>\n );\n};\n\nLearnerSkillCard.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nLearnerSkillCard.propTypes = {\n 'aria-label': PropTypes.string,\n skillTitle: PropTypes.string,\n skillAriaLabel: PropTypes.string,\n focus: PropTypes.bool,\n metrics: PropTypes.shape({\n score: PropTypes.number,\n content: PropTypes.number,\n questionsToReview: PropTypes.number,\n contentCompleted: PropTypes.number\n }),\n review: PropTypes.bool,\n onReviewClick: PropTypes.func,\n onExploreClick: PropTypes.func\n};\n\nexport default LearnerSkillCard;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,gBAAgB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EAC3C,MAAM;IACJ,cAAcC,SADV;IAEJC,UAFI;IAGJC,cAHI;IAIJC,KAAK,GAAG,KAJJ;IAKJC,OALI;IAMJC,MAAM,GAAG,KANL;IAOJC,aAPI;IAQJC;EARI,IASFT,KATJ;EAUA,MAAM;IAACU,KAAD;IAAQC,OAAR;IAAiBC,iBAAjB;IAAoCC,gBAAgB,GAAG;EAAvD,IAA4DP,OAAlE;EACA,MAAM;IAACQ,IAAD;IAAOC;EAAP,IAAoBd,OAA1B;EACA,MAAM,CAACe,OAAD,EAAUC,UAAV,IAAwB,IAAAC,eAAA,EAAS,KAAT,CAA9B;EACA,MAAMC,gBAAgB,GAAG,mBAAI,gBAAJ,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DF,CADF;AAsED,CAzJD;;AA2JAtC,gBAAgB,CAACkE,YAAjB,GAAgC;EAC9BnD,IAAI,EAAEoD,iBAAA,CAASC,iBAAT,CAA2BrD,IADH;EAE9BC,SAAS,EAAEmD,iBAAA,CAASC,iBAAT,CAA2BpD;AAFR,CAAhC;AAKAhB,gBAAgB,CAACqE,SAAjB,2CAA6B;EAC3B,cAAcC,kBAAA,CAAUC,MADG;EAE3BnE,UAAU,EAAEkE,kBAAA,CAAUC,MAFK;EAG3BlE,cAAc,EAAEiE,kBAAA,CAAUC,MAHC;EAI3BjE,KAAK,EAAEgE,kBAAA,CAAUE,IAJU;EAK3BjE,OAAO,EAAE+D,kBAAA,CAAUG,KAAV,CAAgB;IACvB9D,KAAK,EAAE2D,kBAAA,CAAUI,MADM;IAEvB9D,OAAO,EAAE0D,kBAAA,CAAUI,MAFI;IAGvB7D,iBAAiB,EAAEyD,kBAAA,CAAUI,MAHN;IAIvB5D,gBAAgB,EAAEwD,kBAAA,CAAUI;EAJL,CAAhB,CALkB;EAW3BlE,MAAM,EAAE8D,kBAAA,CAAUE,IAXS;EAY3B/D,aAAa,EAAE6D,kBAAA,CAAUK,IAZE;EAa3BjE,cAAc,EAAE4D,kBAAA,CAAUK;AAbC,CAA7B;eAgBe3E,gB"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["LearnerSkillCard","props","context","ariaLabel","skillTitle","skillAriaLabel","focus","metrics","review","onReviewClick","onExploreClick","score","content","questionsToReview","contentCompleted","skin","translate","hovered","setHovered","useState","primarySkinColor","reviewLocale","exploreLocale","coursesLocale","questionsLocale","skillFocusLocale","contentCompletedLocale","handleMouseOver","useCallback","handleMouseLeave","buttonReviewProps","customStyle","backgroundColor","transition","padding","disabled","onClick","label","buttonExploreProps","convert","color","icon","position","faIcon","name","size","ProgressBar","progressBarColor","inlineProgressValueStyle","width","style","progressWrapper","progress","learnerSkillCardWrapper","skillCoursesAndQuestionsWrapper","skillInformation","skillInformationNumber","skillTitleWrapper","skillFocusBadge","faSize","wrapperSize","progressInformations","progressInformation","progressInformationNumber","ctaWrapper","buttonWrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","bool","shape","number","func"],"sources":["../../../src/molecule/learner-skill-card/index.js"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport {convert} from 'css-color-function';\nimport {get} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport Icon from '../../atom/icon';\nimport ButtonLink from '../../atom/button-link';\nimport Provider from '../../atom/provider';\nimport style from './style.css';\n\nconst LearnerSkillCard = (props, context) => {\n const {\n 'aria-label': ariaLabel,\n skillTitle,\n skillAriaLabel,\n focus = false,\n metrics,\n review = false,\n onReviewClick,\n onExploreClick\n } = props;\n const {score, content, questionsToReview, contentCompleted = 0} = metrics;\n const {skin, translate} = context;\n const [hovered, setHovered] = useState(false);\n const primarySkinColor = get('common.primary', skin);\n\n const reviewLocale = translate('Review');\n const exploreLocale = translate('Explore');\n const coursesLocale = translate('courses');\n const questionsLocale = translate('questions');\n const skillFocusLocale = translate('skill_focus');\n const contentCompletedLocale = translate('courses_completed');\n\n const handleMouseOver = useCallback(() => setHovered(true), [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n const buttonReviewProps = {\n customStyle: {\n backgroundColor: '#FFF',\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',\n padding: '0px'\n },\n disabled: !review,\n onClick: onReviewClick,\n 'aria-label': `${skillTitle}, ${reviewLocale}`,\n label: reviewLocale,\n 'data-name': 'learner-skill-card-review-button'\n };\n\n const buttonExploreProps = {\n customStyle: {\n backgroundColor: hovered ? primarySkinColor : convert(`color(${primarySkinColor} a(0.07))`),\n color: hovered ? '#FFFFFF' : primarySkinColor,\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out'\n },\n onClick: onExploreClick,\n 'aria-label': `${skillTitle}, ${exploreLocale}`,\n label: exploreLocale,\n 'data-name': 'learner-skill-card-explore-button',\n icon: {\n position: 'left',\n faIcon: {\n name: 'compass',\n backgroundColor: hovered ? primarySkinColor : convert(`color(${primarySkinColor} a(0.07))`),\n color: hovered ? '#FFFFFF' : primarySkinColor,\n size: 16\n }\n }\n };\n\n const ProgressBar = useCallback(() => {\n if (!content) return null;\n\n const progressBarColor = '#3EC483';\n const inlineProgressValueStyle = {\n backgroundColor: progressBarColor,\n width: `${score}%`\n };\n\n return (\n <div className={style.progressWrapper}>\n <div\n data-name=\"progress\"\n className={style.progress}\n style={inlineProgressValueStyle}\n role=\"progressbar\"\n aria-label={get('progression', ariaLabel)}\n />\n </div>\n );\n }, [score, ariaLabel, content]);\n\n return (\n <div\n className={style.learnerSkillCardWrapper}\n data-name=\"learner-skill-card-wrapper\"\n aria-label={ariaLabel}\n >\n {content || questionsToReview ? (\n <div className={style.skillCoursesAndQuestionsWrapper}>\n {content ? (\n <div className={style.skillInformation} data-name=\"skill-courses\">\n <span className={style.skillInformationNumber}>{content}</span> {coursesLocale}\n </div>\n ) : null}\n {questionsToReview ? (\n <div className={style.skillInformation} data-name=\"skill-questions\">\n <span className={style.skillInformationNumber}>{questionsToReview}</span>\n {questionsLocale}\n </div>\n ) : null}\n </div>\n ) : null}\n <div className={style.skillTitleWrapper}>\n <div\n data-name=\"skill-title\"\n className={style.skillTitle}\n aria-label={skillAriaLabel || skillTitle}\n >\n {skillTitle}\n </div>\n {focus ? (\n <div className={style.skillFocusBadge}>\n <Icon\n iconName=\"bullseye-arrow\"\n backgroundColor=\"#DDD1FF\"\n size={{\n faSize: 10,\n wrapperSize: 16\n }}\n />\n {skillFocusLocale}\n </div>\n ) : null}\n </div>\n <ProgressBar />\n <div className={style.progressInformations}>\n {content ? (\n <>\n <div className={style.progressInformation} data-name=\"skill-completed-courses\">\n <span className={style.progressInformationNumber}>{contentCompleted}</span>\n {` ${contentCompletedLocale}`}\n </div>\n <div className={style.progressInformation} data-name=\"completed-percentage\">\n <span className={style.progressInformationNumber}>{score}%</span>\n </div>\n </>\n ) : null}\n </div>\n <div className={style.ctaWrapper} data-name=\"cta-wrapper\">\n <ButtonLink {...buttonReviewProps} />\n <div\n className={style.buttonWrapper}\n onMouseOver={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n data-name=\"button-explore-wrapper\"\n >\n <ButtonLink {...buttonExploreProps} />\n </div>\n </div>\n </div>\n );\n};\n\nLearnerSkillCard.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nLearnerSkillCard.propTypes = {\n 'aria-label': PropTypes.string,\n skillTitle: PropTypes.string,\n skillAriaLabel: PropTypes.string,\n focus: PropTypes.bool,\n metrics: PropTypes.shape({\n score: PropTypes.number,\n content: PropTypes.number,\n questionsToReview: PropTypes.number,\n contentCompleted: PropTypes.number\n }),\n review: PropTypes.bool,\n onReviewClick: PropTypes.func,\n onExploreClick: PropTypes.func\n};\n\nexport default LearnerSkillCard;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,gBAAgB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EAC3C,MAAM;IACJ,cAAcC,SADV;IAEJC,UAFI;IAGJC,cAHI;IAIJC,KAAK,GAAG,KAJJ;IAKJC,OALI;IAMJC,MAAM,GAAG,KANL;IAOJC,aAPI;IAQJC;EARI,IASFT,KATJ;EAUA,MAAM;IAACU,KAAD;IAAQC,OAAR;IAAiBC,iBAAjB;IAAoCC,gBAAgB,GAAG;EAAvD,IAA4DP,OAAlE;EACA,MAAM;IAACQ,IAAD;IAAOC;EAAP,IAAoBd,OAA1B;EACA,MAAM,CAACe,OAAD,EAAUC,UAAV,IAAwB,IAAAC,eAAA,EAAS,KAAT,CAA9B;EACA,MAAMC,gBAAgB,GAAG,mBAAI,gBAAJ,EAAsBL,IAAtB,CAAzB;EAEA,MAAMM,YAAY,GAAGL,SAAS,CAAC,QAAD,CAA9B;EACA,MAAMM,aAAa,GAAGN,SAAS,CAAC,SAAD,CA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A2BrD,IADH;EAE9BC,SAAS,EAAEmD,iBAAA,CAASC,iBAAT,CAA2BpD;AAFR,CAAhC;AAKAhB,gBAAgB,CAACqE,SAAjB,2CAA6B;EAC3B,cAAcC,kBAAA,CAAUC,MADG;EAE3BnE,UAAU,EAAEkE,kBAAA,CAAUC,MAFK;EAG3BlE,cAAc,EAAEiE,kBAAA,CAAUC,MAHC;EAI3BjE,KAAK,EAAEgE,kBAAA,CAAUE,IAJU;EAK3BjE,OAAO,EAAE+D,kBAAA,CAAUG,KAAV,CAAgB;IACvB9D,KAAK,EAAE2D,kBAAA,CAAUI,MADM;IAEvB9D,OAAO,EAAE0D,kBAAA,CAAUI,MAFI;IAGvB7D,iBAAiB,EAAEyD,kBAAA,CAAUI,MAHN;IAIvB5D,gBAAgB,EAAEwD,kBAAA,CAAUI;EAJL,CAAhB,CALkB;EAW3BlE,MAAM,EAAE8D,kBAAA,CAAUE,IAXS;EAY3B/D,aAAa,EAAE6D,kBAAA,CAAUK,IAZE;EAa3BjE,cAAc,EAAE4D,kBAAA,CAAUK;AAbC,CAA7B;eAgBe3E,gB"}
|
|
@@ -3,6 +3,9 @@ declare function CardsGrid(props: any): JSX.Element;
|
|
|
3
3
|
declare namespace CardsGrid {
|
|
4
4
|
namespace propTypes {
|
|
5
5
|
const list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
6
|
+
const customStyle: PropTypes.Requireable<{
|
|
7
|
+
[x: string]: string | null | undefined;
|
|
8
|
+
}>;
|
|
6
9
|
const loading: PropTypes.Requireable<boolean>;
|
|
7
10
|
}
|
|
8
11
|
}
|
|
@@ -20,6 +20,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
20
20
|
function CardsGrid(props) {
|
|
21
21
|
const {
|
|
22
22
|
list = [],
|
|
23
|
+
customStyle = {},
|
|
23
24
|
loading = false
|
|
24
25
|
} = props;
|
|
25
26
|
const loader = loading ? /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -33,12 +34,14 @@ function CardsGrid(props) {
|
|
|
33
34
|
}, /*#__PURE__*/_react.default.createElement(_card.default, cardProps));
|
|
34
35
|
}, list);
|
|
35
36
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
36
|
-
className: _style.default.default
|
|
37
|
+
className: _style.default.default,
|
|
38
|
+
style: customStyle
|
|
37
39
|
}, cards, loader);
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
CardsGrid.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
41
43
|
list: _propTypes.default.arrayOf(_propTypes.default.shape(_card.default.propTypes)),
|
|
44
|
+
customStyle: _propTypes.default.objectOf(_propTypes.default.string),
|
|
42
45
|
loading: _propTypes.default.bool
|
|
43
46
|
} : {};
|
|
44
47
|
var _default = CardsGrid;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["CardsGrid","props","list","loading","loader","style","cards","cardProps","card","key","default","propTypes","PropTypes","arrayOf","shape","Card","bool"],"sources":["../../../src/organism/cards-grid/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map} from 'lodash/fp';\nimport Card from '../../molecule/card';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\n\nfunction CardsGrid(props) {\n const {list = [], loading = false} = props;\n\n const loader = loading ? (\n <div className={style.loader}>\n <Loader />\n </div>\n ) : null;\n\n const cards = map(cardProps => {\n return (\n <div data-name=\"cardGrid\" className={style.card} key={cardProps.key}>\n <Card {...cardProps} />\n </div>\n );\n }, list);\n\n return (\n <div className={style.default}>\n {cards}\n {loader}\n </div>\n );\n}\n\nCardsGrid.propTypes = {\n list: PropTypes.arrayOf(PropTypes.shape(Card.propTypes)),\n loading: PropTypes.bool\n};\n\nexport default CardsGrid;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;AAEA,SAASA,SAAT,CAAmBC,KAAnB,EAA0B;EACxB,MAAM;IAACC,IAAI,GAAG,EAAR;IAAYC,OAAO,GAAG;
|
|
1
|
+
{"version":3,"file":"index.js","names":["CardsGrid","props","list","customStyle","loading","loader","style","cards","cardProps","card","key","default","propTypes","PropTypes","arrayOf","shape","Card","objectOf","string","bool"],"sources":["../../../src/organism/cards-grid/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map} from 'lodash/fp';\nimport Card from '../../molecule/card';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\n\nfunction CardsGrid(props) {\n const {list = [], customStyle = {}, loading = false} = props;\n\n const loader = loading ? (\n <div className={style.loader}>\n <Loader />\n </div>\n ) : null;\n\n const cards = map(cardProps => {\n return (\n <div data-name=\"cardGrid\" className={style.card} key={cardProps.key}>\n <Card {...cardProps} />\n </div>\n );\n }, list);\n\n return (\n <div className={style.default} style={customStyle}>\n {cards}\n {loader}\n </div>\n );\n}\n\nCardsGrid.propTypes = {\n list: PropTypes.arrayOf(PropTypes.shape(Card.propTypes)),\n customStyle: PropTypes.objectOf(PropTypes.string),\n loading: PropTypes.bool\n};\n\nexport default CardsGrid;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;AAEA,SAASA,SAAT,CAAmBC,KAAnB,EAA0B;EACxB,MAAM;IAACC,IAAI,GAAG,EAAR;IAAYC,WAAW,GAAG,EAA1B;IAA8BC,OAAO,GAAG;EAAxC,IAAiDH,KAAvD;EAEA,MAAMI,MAAM,GAAGD,OAAO,gBACpB;IAAK,SAAS,EAAEE,cAAA,CAAMD;EAAtB,gBACE,6BAAC,eAAD,OADF,CADoB,GAIlB,IAJJ;EAMA,MAAME,KAAK,GAAG,mBAAIC,SAAS,IAAI;IAC7B,oBACE;MAAK,aAAU,UAAf;MAA0B,SAAS,EAAEF,cAAA,CAAMG,IAA3C;MAAiD,GAAG,EAAED,SAAS,CAACE;IAAhE,gBACE,6BAAC,aAAD,EAAUF,SAAV,CADF,CADF;EAKD,CANa,EAMXN,IANW,CAAd;EAQA,oBACE;IAAK,SAAS,EAAEI,cAAA,CAAMK,OAAtB;IAA+B,KAAK,EAAER;EAAtC,GACGI,KADH,EAEGF,MAFH,CADF;AAMD;;AAEDL,SAAS,CAACY,SAAV,2CAAsB;EACpBV,IAAI,EAAEW,kBAAA,CAAUC,OAAV,CAAkBD,kBAAA,CAAUE,KAAV,CAAgBC,aAAA,CAAKJ,SAArB,CAAlB,CADc;EAEpBT,WAAW,EAAEU,kBAAA,CAAUI,QAAV,CAAmBJ,kBAAA,CAAUK,MAA7B,CAFO;EAGpBd,OAAO,EAAES,kBAAA,CAAUM;AAHC,CAAtB;eAMenB,S"}
|
|
@@ -75,6 +75,9 @@ declare namespace PlayerLoading {
|
|
|
75
75
|
type: PropTypes.Requireable<string>;
|
|
76
76
|
list: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
77
77
|
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
78
|
+
customStyle: PropTypes.Requireable<{
|
|
79
|
+
[x: string]: string | null | undefined;
|
|
80
|
+
}>;
|
|
78
81
|
loading: PropTypes.Requireable<boolean>;
|
|
79
82
|
}> | PropTypes.InferProps<{
|
|
80
83
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -126,6 +126,9 @@ declare namespace SlidePlayer {
|
|
|
126
126
|
type: PropTypes.Requireable<string>;
|
|
127
127
|
list: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
128
128
|
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
129
|
+
customStyle: PropTypes.Requireable<{
|
|
130
|
+
[x: string]: string | null | undefined;
|
|
131
|
+
}>;
|
|
129
132
|
loading: PropTypes.Requireable<boolean>;
|
|
130
133
|
}> | PropTypes.InferProps<{
|
|
131
134
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -395,6 +398,9 @@ declare namespace SlidePlayer {
|
|
|
395
398
|
type: PropTypes.Requireable<string>;
|
|
396
399
|
list: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
397
400
|
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
401
|
+
customStyle: PropTypes.Requireable<{
|
|
402
|
+
[x: string]: string | null | undefined;
|
|
403
|
+
}>;
|
|
398
404
|
loading: PropTypes.Requireable<boolean>;
|
|
399
405
|
}> | PropTypes.InferProps<{
|
|
400
406
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -132,6 +132,9 @@ declare namespace SlidesPlayer {
|
|
|
132
132
|
type: PropTypes.Requireable<string>;
|
|
133
133
|
list: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
134
134
|
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
135
|
+
customStyle: PropTypes.Requireable<{
|
|
136
|
+
[x: string]: string | null | undefined;
|
|
137
|
+
}>;
|
|
135
138
|
loading: PropTypes.Requireable<boolean>;
|
|
136
139
|
}> | PropTypes.InferProps<{
|
|
137
140
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/template/app-player/player/slides/index.js"],"names":[],"mappings":";AA+aA,qEAkBC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/template/app-player/player/slides/index.js"],"names":[],"mappings":";AA+aA,qEAkBC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA1ID;;uBAyBC;;;;;;;;;;;;;;;;;;;;;;;;;AArPD;;;gBAaC;;;;;;;;;;;;;AAyDD;;;;gBAEC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAlHD,oEAQC;;;;;;;;;AAgND;;gBAiBC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA/GD,qEAaC"}
|
|
@@ -160,6 +160,9 @@ declare class PopinCorrection extends React.Component<any, any, any> {
|
|
|
160
160
|
type: PropTypes.Requireable<string>;
|
|
161
161
|
list: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
162
162
|
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
163
|
+
customStyle: PropTypes.Requireable<{
|
|
164
|
+
[x: string]: string | null | undefined;
|
|
165
|
+
}>;
|
|
163
166
|
loading: PropTypes.Requireable<boolean>;
|
|
164
167
|
}> | PropTypes.InferProps<{
|
|
165
168
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/app-player/popin-correction/index.js"],"names":[],"mappings":";AAmGA;IACE
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/app-player/popin-correction/index.js"],"names":[],"mappings":";AAmGA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmBE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,wBAIC;IAFC;;MAA0B;IAkB5B,gCAEC;IAhBD,0BAEC;IAED,kBAQC;IALC,gCAIE;IAIF,aAAsB;IAGxB,sBAsEC;CACF"}
|
|
@@ -107,7 +107,7 @@ declare namespace PopinEnd {
|
|
|
107
107
|
recommendation: PropTypes.Requireable<PropTypes.InferProps<{
|
|
108
108
|
contentType: PropTypes.Requireable<string>;
|
|
109
109
|
dataName: PropTypes.Requireable<string>;
|
|
110
|
-
title: PropTypes.Requireable<
|
|
110
|
+
title: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
111
111
|
showMore: PropTypes.Requireable<string>;
|
|
112
112
|
cards: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
113
113
|
badge: PropTypes.Requireable<string>;
|
|
@@ -161,6 +161,9 @@ declare namespace PopinEnd {
|
|
|
161
161
|
adaptive: PropTypes.Requireable<string>;
|
|
162
162
|
}>>;
|
|
163
163
|
}> | null | undefined)[]>;
|
|
164
|
+
customStyle: PropTypes.Requireable<{
|
|
165
|
+
[x: string]: string | null | undefined;
|
|
166
|
+
}>;
|
|
164
167
|
onScroll: PropTypes.Requireable<(...args: any[]) => any>;
|
|
165
168
|
onShowMore: PropTypes.Requireable<(...args: any[]) => any>;
|
|
166
169
|
'arrows-aria-label': PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -252,6 +255,9 @@ declare namespace PopinEnd {
|
|
|
252
255
|
type: PropTypes.Requireable<string>;
|
|
253
256
|
list: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
254
257
|
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
258
|
+
customStyle: PropTypes.Requireable<{
|
|
259
|
+
[x: string]: string | null | undefined;
|
|
260
|
+
}>;
|
|
255
261
|
loading: PropTypes.Requireable<boolean>;
|
|
256
262
|
}> | PropTypes.InferProps<{
|
|
257
263
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -113,7 +113,7 @@ declare namespace Summary {
|
|
|
113
113
|
const recommendation: PropTypes.Requireable<PropTypes.InferProps<{
|
|
114
114
|
contentType: PropTypes.Requireable<string>;
|
|
115
115
|
dataName: PropTypes.Requireable<string>;
|
|
116
|
-
title: PropTypes.Requireable<
|
|
116
|
+
title: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
117
117
|
showMore: PropTypes.Requireable<string>;
|
|
118
118
|
cards: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
119
119
|
badge: PropTypes.Requireable<string>;
|
|
@@ -167,6 +167,9 @@ declare namespace Summary {
|
|
|
167
167
|
adaptive: PropTypes.Requireable<string>;
|
|
168
168
|
}>>;
|
|
169
169
|
}> | null | undefined)[]>;
|
|
170
|
+
customStyle: PropTypes.Requireable<{
|
|
171
|
+
[x: string]: string | null | undefined;
|
|
172
|
+
}>;
|
|
170
173
|
onScroll: PropTypes.Requireable<(...args: any[]) => any>;
|
|
171
174
|
onShowMore: PropTypes.Requireable<(...args: any[]) => any>;
|
|
172
175
|
'arrows-aria-label': PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -583,6 +583,9 @@ declare const AppReview: {
|
|
|
583
583
|
type: import("prop-types").Requireable<string>;
|
|
584
584
|
list: import("prop-types").Requireable<NonNullable<import("prop-types").InferProps<{
|
|
585
585
|
list: import("prop-types").Requireable<(import("prop-types").InferProps<any> | null | undefined)[]>;
|
|
586
|
+
customStyle: import("prop-types").Requireable<{
|
|
587
|
+
[x: string]: string | null | undefined;
|
|
588
|
+
}>;
|
|
586
589
|
loading: import("prop-types").Requireable<boolean>;
|
|
587
590
|
}> | import("prop-types").InferProps<{
|
|
588
591
|
'aria-label': import("prop-types").Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/app-review/index.tsx"],"names":[],"mappings":";AAGA,OAAkB,EAAC,cAAc,EAAC,MAAM,cAAc,CAAC;AAEvD,QAAA,MAAM,SAAS;2BAAwB,cAAc
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/app-review/index.tsx"],"names":[],"mappings":";AAGA,OAAkB,EAAC,cAAc,EAAC,MAAM,cAAc,CAAC;AAEvD,QAAA,MAAM,SAAS;2BAAwB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOpD,CAAC;AAIF,eAAe,SAAS,CAAC"}
|
|
@@ -583,6 +583,9 @@ declare const propTypes: {
|
|
|
583
583
|
type: PropTypes.Requireable<string>;
|
|
584
584
|
list: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
585
585
|
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
586
|
+
customStyle: PropTypes.Requireable<{
|
|
587
|
+
[x: string]: string | null | undefined;
|
|
588
|
+
}>;
|
|
586
589
|
loading: PropTypes.Requireable<boolean>;
|
|
587
590
|
}> | PropTypes.InferProps<{
|
|
588
591
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../../src/template/app-review/player/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,cAAc,CAAC;AACtD,OAAO,EAAC,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC9D,OAAgC,EAC9B,mBAAmB,EACpB,MAAM,8CAA8C,CAAC;AAEtD,OAA8B,EAAC,WAAW,EAAC,MAAM,uCAAuC,CAAC;AAEzF,OAA+B,EAC7B,gBAAgB,EACjB,MAAM,oDAAoD,CAAC;AAE5D,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../../src/template/app-review/player/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,cAAc,CAAC;AACtD,OAAO,EAAC,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC9D,OAAgC,EAC9B,mBAAmB,EACpB,MAAM,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,eAAe,CAAC,EAAE,mBAAmB,CAAC;IACtC,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAC/B,SAAS,CAAC,EAAE,YAAY,CAAC;CAC1B,CAAC"}
|
|
@@ -587,6 +587,9 @@ declare const propTypes: {
|
|
|
587
587
|
type: PropTypes.Requireable<string>;
|
|
588
588
|
list: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
589
589
|
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
590
|
+
customStyle: PropTypes.Requireable<{
|
|
591
|
+
[x: string]: string | null | undefined;
|
|
592
|
+
}>;
|
|
590
593
|
loading: PropTypes.Requireable<boolean>;
|
|
591
594
|
}> | PropTypes.InferProps<{
|
|
592
595
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -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;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
|
|
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,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.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
791
|
+
customStyle: PropTypes.Requireable<{
|
|
792
|
+
[x: string]: string | null | undefined;
|
|
793
|
+
}>;
|
|
791
794
|
loading: PropTypes.Requireable<boolean>;
|
|
792
795
|
}> | PropTypes.InferProps<{
|
|
793
796
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -3,6 +3,9 @@ declare class Authors extends React.Component<any, any, any> {
|
|
|
3
3
|
static propTypes: {
|
|
4
4
|
cards: PropTypes.Requireable<PropTypes.InferProps<{
|
|
5
5
|
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
6
|
+
customStyle: PropTypes.Requireable<{
|
|
7
|
+
[x: string]: string | null | undefined;
|
|
8
|
+
}>;
|
|
6
9
|
loading: PropTypes.Requireable<boolean>;
|
|
7
10
|
}>>;
|
|
8
11
|
cardsTitle: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/common/authors/index.js"],"names":[],"mappings":";AASA;IACE
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/common/authors/index.js"],"names":[],"mappings":";AASA;IACE;;;;;;;;;;;;;;;;;;;;MAgBE;IAEF;;;;;;;;;;;;;;;;;;;;;;;MAGE;IAEF,sCAMC;IAJC;;MAEC;IAIH,4BAIC;IAED,sBA+EC;CACF"}
|
|
@@ -76,6 +76,9 @@ declare namespace Dashboard {
|
|
|
76
76
|
type: PropTypes.Requireable<string>;
|
|
77
77
|
list: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
78
78
|
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
79
|
+
customStyle: PropTypes.Requireable<{
|
|
80
|
+
[x: string]: string | null | undefined;
|
|
81
|
+
}>;
|
|
79
82
|
loading: PropTypes.Requireable<boolean>;
|
|
80
83
|
}> | PropTypes.InferProps<{
|
|
81
84
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -348,6 +351,9 @@ declare namespace Dashboard {
|
|
|
348
351
|
type: PropTypes.Requireable<string>;
|
|
349
352
|
list: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
350
353
|
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
354
|
+
customStyle: PropTypes.Requireable<{
|
|
355
|
+
[x: string]: string | null | undefined;
|
|
356
|
+
}>;
|
|
351
357
|
loading: PropTypes.Requireable<boolean>;
|
|
352
358
|
}> | PropTypes.InferProps<{
|
|
353
359
|
'aria-label': PropTypes.Requireable<string>;
|