@coorpacademy/components 11.13.2 → 11.13.3
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/index.d.ts +2 -0
- package/es/atom/button-link/index.d.ts.map +1 -1
- package/es/atom/button-link/index.js +18 -9
- package/es/atom/button-link/index.js.map +1 -1
- package/es/atom/tooltip/index.d.ts +5 -1
- package/es/atom/tooltip/index.d.ts.map +1 -1
- package/es/atom/tooltip/index.js +36 -18
- package/es/atom/tooltip/index.js.map +1 -1
- package/es/atom/tooltip/style.css +1 -1
- package/es/molecule/brand-form-group/index.d.ts +2 -0
- package/es/molecule/review-correction-popin/index.d.ts.map +1 -1
- package/es/molecule/review-correction-popin/index.js +38 -14
- package/es/molecule/review-correction-popin/index.js.map +1 -1
- package/es/molecule/review-correction-popin/style.css +11 -53
- package/es/organism/brand-form/index.d.ts +2 -0
- package/es/organism/list-items/index.d.ts +2 -0
- package/es/organism/setup-header/index.d.ts +8 -0
- package/es/organism/wizard-contents/index.d.ts +2 -0
- package/es/template/activity/engine-stars.d.ts.map +1 -1
- package/es/template/activity/engine-stars.js +2 -1
- package/es/template/activity/engine-stars.js.map +1 -1
- package/es/template/back-office/brand-create/index.d.ts +8 -0
- package/es/template/back-office/brand-create/index.d.ts.map +1 -1
- package/es/template/back-office/brand-list/index.d.ts +8 -0
- package/es/template/back-office/brand-list/index.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +14 -0
- package/es/template/back-office/dashboard-preview/index.d.ts +8 -0
- package/es/template/back-office/layout/index.d.ts +8 -0
- package/es/template/back-office/layout/index.d.ts.map +1 -1
- package/lib/atom/button-link/index.d.ts +2 -0
- package/lib/atom/button-link/index.d.ts.map +1 -1
- package/lib/atom/button-link/index.js +18 -9
- package/lib/atom/button-link/index.js.map +1 -1
- package/lib/atom/tooltip/index.d.ts +5 -1
- package/lib/atom/tooltip/index.d.ts.map +1 -1
- package/lib/atom/tooltip/index.js +38 -18
- package/lib/atom/tooltip/index.js.map +1 -1
- package/lib/atom/tooltip/style.css +1 -1
- package/lib/molecule/brand-form-group/index.d.ts +2 -0
- package/lib/molecule/review-correction-popin/index.d.ts.map +1 -1
- package/lib/molecule/review-correction-popin/index.js +44 -14
- package/lib/molecule/review-correction-popin/index.js.map +1 -1
- package/lib/molecule/review-correction-popin/style.css +11 -53
- package/lib/organism/brand-form/index.d.ts +2 -0
- package/lib/organism/list-items/index.d.ts +2 -0
- package/lib/organism/setup-header/index.d.ts +8 -0
- package/lib/organism/wizard-contents/index.d.ts +2 -0
- package/lib/template/activity/engine-stars.d.ts.map +1 -1
- package/lib/template/activity/engine-stars.js +2 -1
- package/lib/template/activity/engine-stars.js.map +1 -1
- package/lib/template/back-office/brand-create/index.d.ts +8 -0
- package/lib/template/back-office/brand-create/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-list/index.d.ts +8 -0
- package/lib/template/back-office/brand-list/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +14 -0
- package/lib/template/back-office/dashboard-preview/index.d.ts +8 -0
- package/lib/template/back-office/layout/index.d.ts +8 -0
- package/lib/template/back-office/layout/index.d.ts.map +1 -1
- package/locales/en/global.json +1 -0
- package/package.json +2 -2
|
@@ -14,6 +14,7 @@ declare namespace SetupHeader {
|
|
|
14
14
|
type: PropTypes.Requireable<string>;
|
|
15
15
|
}>>;
|
|
16
16
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
17
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
17
18
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
18
19
|
href: PropTypes.Requireable<string>;
|
|
19
20
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -22,6 +23,7 @@ declare namespace SetupHeader {
|
|
|
22
23
|
disabled: PropTypes.Requireable<boolean>;
|
|
23
24
|
className: PropTypes.Requireable<string>;
|
|
24
25
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
26
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
25
27
|
}>>;
|
|
26
28
|
logOut: PropTypes.Requireable<PropTypes.InferProps<{
|
|
27
29
|
type: PropTypes.Requireable<string>;
|
|
@@ -34,6 +36,7 @@ declare namespace SetupHeader {
|
|
|
34
36
|
type: PropTypes.Requireable<string>;
|
|
35
37
|
}>>;
|
|
36
38
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
39
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
37
40
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
38
41
|
href: PropTypes.Requireable<string>;
|
|
39
42
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -42,6 +45,7 @@ declare namespace SetupHeader {
|
|
|
42
45
|
disabled: PropTypes.Requireable<boolean>;
|
|
43
46
|
className: PropTypes.Requireable<string>;
|
|
44
47
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
48
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
45
49
|
}>>;
|
|
46
50
|
globalAnalytics: PropTypes.Requireable<PropTypes.InferProps<{
|
|
47
51
|
type: PropTypes.Requireable<string>;
|
|
@@ -54,6 +58,7 @@ declare namespace SetupHeader {
|
|
|
54
58
|
type: PropTypes.Requireable<string>;
|
|
55
59
|
}>>;
|
|
56
60
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
61
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
57
62
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
58
63
|
href: PropTypes.Requireable<string>;
|
|
59
64
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -62,6 +67,7 @@ declare namespace SetupHeader {
|
|
|
62
67
|
disabled: PropTypes.Requireable<boolean>;
|
|
63
68
|
className: PropTypes.Requireable<string>;
|
|
64
69
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
70
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
65
71
|
}>>;
|
|
66
72
|
platformList: PropTypes.Requireable<PropTypes.InferProps<{
|
|
67
73
|
type: PropTypes.Requireable<string>;
|
|
@@ -74,6 +80,7 @@ declare namespace SetupHeader {
|
|
|
74
80
|
type: PropTypes.Requireable<string>;
|
|
75
81
|
}>>;
|
|
76
82
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
83
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
77
84
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
78
85
|
href: PropTypes.Requireable<string>;
|
|
79
86
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -82,6 +89,7 @@ declare namespace SetupHeader {
|
|
|
82
89
|
disabled: PropTypes.Requireable<boolean>;
|
|
83
90
|
className: PropTypes.Requireable<string>;
|
|
84
91
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
92
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
85
93
|
}>>;
|
|
86
94
|
}>>;
|
|
87
95
|
const platformName: PropTypes.Requireable<string>;
|
|
@@ -466,6 +466,7 @@ declare namespace WizardContents {
|
|
|
466
466
|
type: PropTypes.Requireable<string>;
|
|
467
467
|
}>>;
|
|
468
468
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
469
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
469
470
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
470
471
|
href: PropTypes.Requireable<string>;
|
|
471
472
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -474,6 +475,7 @@ declare namespace WizardContents {
|
|
|
474
475
|
disabled: PropTypes.Requireable<boolean>;
|
|
475
476
|
className: PropTypes.Requireable<string>;
|
|
476
477
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
478
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
477
479
|
}> | PropTypes.InferProps<{
|
|
478
480
|
type: PropTypes.Requireable<string>;
|
|
479
481
|
title: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine-stars.d.ts","sourceRoot":"","sources":["../../../src/template/activity/engine-stars.js"],"names":[],"mappings":";AAuEA,
|
|
1
|
+
{"version":3,"file":"engine-stars.d.ts","sourceRoot":"","sources":["../../../src/template/activity/engine-stars.js"],"names":[],"mappings":";AAuEA,0EA8IC"}
|
|
@@ -126,7 +126,8 @@ const EngineStars = (props, legacyContext) => {
|
|
|
126
126
|
"data-tooltip-place": "left",
|
|
127
127
|
onKeyDown: handleKeyPress,
|
|
128
128
|
onMouseLeave: handleMouseLeave,
|
|
129
|
-
onMouseOver: handleMouseOver
|
|
129
|
+
onMouseOver: handleMouseOver,
|
|
130
|
+
"aria-label": translate('More details')
|
|
130
131
|
}, disabled ? /*#__PURE__*/React.createElement(ToolTip, _extends({}, toolTipProps, {
|
|
131
132
|
anchorId: engineStarsContentId,
|
|
132
133
|
toolTipIsVisible: toolTipIsVisible,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine-stars.js","names":["classnames","React","useCallback","useMemo","useState","useRef","PropTypes","v5","uuidV5","NovaCompositionCoorpacademyStar","StarIcon","NovaCompositionCoorpacademyTimer","TimerIcon","NovaCompositionCoorpacademyBolt","BoltIcon","NovaSolidSchoolScienceGraduationHat","CertificationIcon","NovaSolidContentContentBook1","LearnerIcon","NovaSolidVoteRewardsRewardsBadge1","BonusIcon","NovaCompositionCoorpacademyScorm","ScormIcon","NovaCompositionCoorpacademyArticle","ArticleIcon","NovaCompositionCoorpacademyVideo","VideoIcon","NovaCompositionCoorpacademyMicrophone","PodcastIcon","NovaCompositionCoorpacademyRevision","RevisionIcon","Provider","GetSkinFromContext","GetTranslateFromContext","ToolTip","toggleStateOnKeyPress","Link","style","ICONS","microlearning","learner","battle","certifications","bonus","article","scorm","video","podcast","review","ToolTipContent","preMessage","linkMessage","endMessage","onClick","color","handleContentMouseOver","toolTipContent","propTypes","string","func","EngineStars","props","legacyContext","skin","translate","toolTip","disabled","type","stars","title","active","className","handleClick","e","stopPropagation","preventDefault","dark","light","IconType","primary","engineStarsContentId","URL","undefined","toolTipIsVisible","setToolTipIsVisible","mouseLeaveTimer","setMouseLeaveTimer","buttonRef","handleKeyPress","event","handleMouseOver","clearTimeout","handleMouseLeave","setTimeout","toolTipContentProps","toolTipProps","closeToolTipInformationTextAriaLabel","TooltipContent","_props","engineStars","clickable","engineIcon","backgroundColor","iconHeader","score","iconStar","scoreTitle","isRequired","number","bool","shape","contextTypes","childContextTypes"],"sources":["../../../src/template/activity/engine-stars.js"],"sourcesContent":["import classnames from 'classnames';\nimport React, {useCallback, useMemo, useState, useRef} from 'react';\nimport PropTypes from 'prop-types';\nimport {get, noop} from 'lodash/fp';\nimport {v5 as uuidV5} from 'uuid';\nimport {\n NovaCompositionCoorpacademyStar as StarIcon,\n NovaCompositionCoorpacademyTimer as TimerIcon,\n NovaCompositionCoorpacademyBolt as BoltIcon,\n NovaSolidSchoolScienceGraduationHat as CertificationIcon,\n NovaSolidContentContentBook1 as LearnerIcon,\n NovaSolidVoteRewardsRewardsBadge1 as BonusIcon,\n NovaCompositionCoorpacademyScorm as ScormIcon,\n NovaCompositionCoorpacademyArticle as ArticleIcon,\n NovaCompositionCoorpacademyVideo as VideoIcon,\n NovaCompositionCoorpacademyMicrophone as PodcastIcon,\n NovaCompositionCoorpacademyRevision as RevisionIcon\n} from '@coorpacademy/nova-icons';\nimport Provider, {GetSkinFromContext, GetTranslateFromContext} from '../../atom/provider';\nimport ToolTip, {toggleStateOnKeyPress} from '../../atom/tooltip';\nimport Link from '../../atom/link';\nimport style from './engine-stars.css';\n\nconst ICONS = {\n microlearning: TimerIcon,\n learner: LearnerIcon,\n battle: BoltIcon,\n certifications: CertificationIcon,\n bonus: BonusIcon,\n article: ArticleIcon,\n scorm: ScormIcon,\n video: VideoIcon,\n podcast: PodcastIcon,\n review: RevisionIcon\n};\n\nconst ToolTipContent = ({\n preMessage,\n linkMessage,\n endMessage,\n onClick,\n color,\n handleContentMouseOver\n}) => (\n <p\n className={style.toolTipContent}\n onMouseOver={handleContentMouseOver}\n data-testid=\"react-tooltip-content\"\n >\n <span>{preMessage}</span>\n <Link\n onClick={onClick}\n style={{\n color\n }}\n >\n {linkMessage}\n </Link>\n <span>{endMessage}</span>\n </p>\n);\n\nToolTipContent.propTypes = {\n preMessage: PropTypes.string,\n linkMessage: PropTypes.string,\n endMessage: PropTypes.string,\n color: PropTypes.string,\n onClick: PropTypes.func,\n handleContentMouseOver: PropTypes.func\n};\n\nconst EngineStars = (props, legacyContext) => {\n const skin = GetSkinFromContext(legacyContext);\n const translate = GetTranslateFromContext(legacyContext);\n const {\n toolTip = null,\n disabled,\n type,\n stars,\n title,\n active = false,\n onClick = noop,\n className\n } = props;\n\n const handleClick = e => {\n e.stopPropagation();\n e.preventDefault();\n onClick(e);\n };\n const dark = get('common.dark', skin);\n const light = get('common.light', skin);\n const IconType = ICONS[type];\n\n const primary = get('common.primary', skin);\n\n // to replace by useId when React17 is bumped to React18\n const [engineStarsContentId] = useState(\n disabled ? uuidV5('engine-stars', uuidV5.URL) : undefined\n );\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n const [mouseLeaveTimer, setMouseLeaveTimer] = useState(undefined);\n const buttonRef = useRef(null);\n\n const handleKeyPress = useCallback(\n event => {\n toggleStateOnKeyPress(toolTipIsVisible, setToolTipIsVisible, buttonRef)(event);\n },\n [toolTipIsVisible]\n );\n\n const handleMouseOver = useCallback(() => {\n mouseLeaveTimer && clearTimeout(mouseLeaveTimer);\n setToolTipIsVisible(true);\n }, [mouseLeaveTimer]);\n\n const handleContentMouseOver = useCallback(() => {\n mouseLeaveTimer && /* istanbul ignore next */ clearTimeout(mouseLeaveTimer);\n }, [mouseLeaveTimer]);\n\n const handleMouseLeave = useCallback(() => {\n setMouseLeaveTimer(setTimeout(() => setToolTipIsVisible(false), 500));\n }, []);\n\n const toolTipContentProps = useMemo(\n () =>\n toolTip\n ? {\n preMessage: toolTip.preMessage,\n linkMessage: toolTip.linkMessage,\n endMessage: toolTip.endMessage,\n color: primary,\n onClick: toolTip.onClick\n }\n : null,\n [primary, toolTip]\n );\n\n const toolTipProps = {\n closeToolTipInformationTextAriaLabel: translate(\n 'Press the escape key to close the information text'\n )\n };\n\n const TooltipContent = useCallback(\n _props => (\n <ToolTipContent\n {...{...toolTipContentProps, ..._props}}\n handleContentMouseOver={handleContentMouseOver}\n />\n ),\n [handleContentMouseOver, toolTipContentProps]\n );\n\n return (\n <button\n ref={buttonRef}\n data-tip={disabled}\n data-engine={type}\n data-testid={`engine-stars-${type}`}\n // eslint-disable-next-line no-nested-ternary\n onClick={disabled ? handleKeyPress : active ? noop : handleClick}\n data-for={engineStarsContentId}\n className={classnames([\n style.engineStars,\n disabled ? style.disabled : '',\n active ? style.active : '',\n onClick !== noop ? style.clickable : null,\n className\n ])}\n type=\"button\"\n data-tooltip-place=\"left\"\n onKeyDown={handleKeyPress}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n >\n {disabled ? (\n <ToolTip\n {...toolTipProps}\n anchorId={engineStarsContentId}\n toolTipIsVisible={toolTipIsVisible}\n TooltipContent={TooltipContent}\n mouseLeaveTimer={mouseLeaveTimer}\n />\n ) : null}\n <span\n className={style.engineIcon}\n style={{\n backgroundColor: onClick === noop ? light : primary\n }}\n >\n <IconType className={style.iconHeader} width=\"30\" />\n </span>\n <div\n className={style.score}\n style={{\n color: active ? primary : dark\n }}\n >\n <p data-name=\"star-counter\">{stars}</p>\n <span>\n <StarIcon\n className={style.iconStar}\n style={{\n color: active ? primary : dark\n }}\n />\n </span>\n </div>\n <div className={style.scoreTitle}>{title}</div>\n </button>\n );\n};\n\nEngineStars.propTypes = {\n type: PropTypes.string.isRequired,\n stars: PropTypes.number.isRequired,\n title: PropTypes.string.isRequired,\n active: PropTypes.bool,\n disabled: PropTypes.bool,\n onClick: PropTypes.func,\n className: PropTypes.string,\n toolTip: PropTypes.shape({\n preMessage: PropTypes.string,\n linkMessage: PropTypes.string,\n endMessage: PropTypes.string,\n onClick: PropTypes.func\n })\n};\n\nEngineStars.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nexport default EngineStars;\n"],"mappings":";;;;;AAAA,OAAOA,UAAP,MAAuB,YAAvB;AACA,OAAOC,KAAP,IAAeC,WAAf,EAA4BC,OAA5B,EAAqCC,QAArC,EAA+CC,MAA/C,QAA4D,OAA5D;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,SAAQC,EAAE,IAAIC,MAAd,QAA2B,MAA3B;AACA,SACEC,+BAA+B,IAAIC,QADrC,EAEEC,gCAAgC,IAAIC,SAFtC,EAGEC,+BAA+B,IAAIC,QAHrC,EAIEC,mCAAmC,IAAIC,iBAJzC,EAKEC,4BAA4B,IAAIC,WALlC,EAMEC,iCAAiC,IAAIC,SANvC,EAOEC,gCAAgC,IAAIC,SAPtC,EAQEC,kCAAkC,IAAIC,WARxC,EASEC,gCAAgC,IAAIC,SATtC,EAUEC,qCAAqC,IAAIC,WAV3C,EAWEC,mCAAmC,IAAIC,YAXzC,QAYO,0BAZP;AAaA,OAAOC,QAAP,IAAkBC,kBAAlB,EAAsCC,uBAAtC,QAAoE,qBAApE;AACA,OAAOC,OAAP,IAAiBC,qBAAjB,QAA6C,oBAA7C;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,KAAP,MAAkB,oBAAlB;AAEA,MAAMC,KAAK,GAAG;EACZC,aAAa,EAAE3B,SADH;EAEZ4B,OAAO,EAAEtB,WAFG;EAGZuB,MAAM,EAAE3B,QAHI;EAIZ4B,cAAc,EAAE1B,iBAJJ;EAKZ2B,KAAK,EAAEvB,SALK;EAMZwB,OAAO,EAAEpB,WANG;EAOZqB,KAAK,EAAEvB,SAPK;EAQZwB,KAAK,EAAEpB,SARK;EASZqB,OAAO,EAAEnB,WATG;EAUZoB,MAAM,EAAEl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D,MADC;IAEvBP,WAAW,EAAE7C,SAAS,CAACoD,MAFA;IAGvBN,UAAU,EAAE9C,SAAS,CAACoD,MAHC;IAIvBL,OAAO,EAAE/C,SAAS,CAACqD;EAJI,CAAhB;AARa,CAAxB;AAgBAC,WAAW,CAACmD,YAAZ,GAA2B;EACzBhD,IAAI,EAAEhC,QAAQ,CAACiF,iBAAT,CAA2BjD,IADR;EAEzBC,SAAS,EAAEjC,QAAQ,CAACiF,iBAAT,CAA2BhD;AAFb,CAA3B;AAKA,eAAeJ,WAAf"}
|
|
1
|
+
{"version":3,"file":"engine-stars.js","names":["classnames","React","useCallback","useMemo","useState","useRef","PropTypes","v5","uuidV5","NovaCompositionCoorpacademyStar","StarIcon","NovaCompositionCoorpacademyTimer","TimerIcon","NovaCompositionCoorpacademyBolt","BoltIcon","NovaSolidSchoolScienceGraduationHat","CertificationIcon","NovaSolidContentContentBook1","LearnerIcon","NovaSolidVoteRewardsRewardsBadge1","BonusIcon","NovaCompositionCoorpacademyScorm","ScormIcon","NovaCompositionCoorpacademyArticle","ArticleIcon","NovaCompositionCoorpacademyVideo","VideoIcon","NovaCompositionCoorpacademyMicrophone","PodcastIcon","NovaCompositionCoorpacademyRevision","RevisionIcon","Provider","GetSkinFromContext","GetTranslateFromContext","ToolTip","toggleStateOnKeyPress","Link","style","ICONS","microlearning","learner","battle","certifications","bonus","article","scorm","video","podcast","review","ToolTipContent","preMessage","linkMessage","endMessage","onClick","color","handleContentMouseOver","toolTipContent","propTypes","string","func","EngineStars","props","legacyContext","skin","translate","toolTip","disabled","type","stars","title","active","className","handleClick","e","stopPropagation","preventDefault","dark","light","IconType","primary","engineStarsContentId","URL","undefined","toolTipIsVisible","setToolTipIsVisible","mouseLeaveTimer","setMouseLeaveTimer","buttonRef","handleKeyPress","event","handleMouseOver","clearTimeout","handleMouseLeave","setTimeout","toolTipContentProps","toolTipProps","closeToolTipInformationTextAriaLabel","TooltipContent","_props","engineStars","clickable","engineIcon","backgroundColor","iconHeader","score","iconStar","scoreTitle","isRequired","number","bool","shape","contextTypes","childContextTypes"],"sources":["../../../src/template/activity/engine-stars.js"],"sourcesContent":["import classnames from 'classnames';\nimport React, {useCallback, useMemo, useState, useRef} from 'react';\nimport PropTypes from 'prop-types';\nimport {get, noop} from 'lodash/fp';\nimport {v5 as uuidV5} from 'uuid';\nimport {\n NovaCompositionCoorpacademyStar as StarIcon,\n NovaCompositionCoorpacademyTimer as TimerIcon,\n NovaCompositionCoorpacademyBolt as BoltIcon,\n NovaSolidSchoolScienceGraduationHat as CertificationIcon,\n NovaSolidContentContentBook1 as LearnerIcon,\n NovaSolidVoteRewardsRewardsBadge1 as BonusIcon,\n NovaCompositionCoorpacademyScorm as ScormIcon,\n NovaCompositionCoorpacademyArticle as ArticleIcon,\n NovaCompositionCoorpacademyVideo as VideoIcon,\n NovaCompositionCoorpacademyMicrophone as PodcastIcon,\n NovaCompositionCoorpacademyRevision as RevisionIcon\n} from '@coorpacademy/nova-icons';\nimport Provider, {GetSkinFromContext, GetTranslateFromContext} from '../../atom/provider';\nimport ToolTip, {toggleStateOnKeyPress} from '../../atom/tooltip';\nimport Link from '../../atom/link';\nimport style from './engine-stars.css';\n\nconst ICONS = {\n microlearning: TimerIcon,\n learner: LearnerIcon,\n battle: BoltIcon,\n certifications: CertificationIcon,\n bonus: BonusIcon,\n article: ArticleIcon,\n scorm: ScormIcon,\n video: VideoIcon,\n podcast: PodcastIcon,\n review: RevisionIcon\n};\n\nconst ToolTipContent = ({\n preMessage,\n linkMessage,\n endMessage,\n onClick,\n color,\n handleContentMouseOver\n}) => (\n <p\n className={style.toolTipContent}\n onMouseOver={handleContentMouseOver}\n data-testid=\"react-tooltip-content\"\n >\n <span>{preMessage}</span>\n <Link\n onClick={onClick}\n style={{\n color\n }}\n >\n {linkMessage}\n </Link>\n <span>{endMessage}</span>\n </p>\n);\n\nToolTipContent.propTypes = {\n preMessage: PropTypes.string,\n linkMessage: PropTypes.string,\n endMessage: PropTypes.string,\n color: PropTypes.string,\n onClick: PropTypes.func,\n handleContentMouseOver: PropTypes.func\n};\n\nconst EngineStars = (props, legacyContext) => {\n const skin = GetSkinFromContext(legacyContext);\n const translate = GetTranslateFromContext(legacyContext);\n const {\n toolTip = null,\n disabled,\n type,\n stars,\n title,\n active = false,\n onClick = noop,\n className\n } = props;\n\n const handleClick = e => {\n e.stopPropagation();\n e.preventDefault();\n onClick(e);\n };\n const dark = get('common.dark', skin);\n const light = get('common.light', skin);\n const IconType = ICONS[type];\n\n const primary = get('common.primary', skin);\n\n // to replace by useId when React17 is bumped to React18\n const [engineStarsContentId] = useState(\n disabled ? uuidV5('engine-stars', uuidV5.URL) : undefined\n );\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n const [mouseLeaveTimer, setMouseLeaveTimer] = useState(undefined);\n const buttonRef = useRef(null);\n\n const handleKeyPress = useCallback(\n event => {\n toggleStateOnKeyPress(toolTipIsVisible, setToolTipIsVisible, buttonRef)(event);\n },\n [toolTipIsVisible]\n );\n\n const handleMouseOver = useCallback(() => {\n mouseLeaveTimer && clearTimeout(mouseLeaveTimer);\n setToolTipIsVisible(true);\n }, [mouseLeaveTimer]);\n\n const handleContentMouseOver = useCallback(() => {\n mouseLeaveTimer && /* istanbul ignore next */ clearTimeout(mouseLeaveTimer);\n }, [mouseLeaveTimer]);\n\n const handleMouseLeave = useCallback(() => {\n setMouseLeaveTimer(setTimeout(() => setToolTipIsVisible(false), 500));\n }, []);\n\n const toolTipContentProps = useMemo(\n () =>\n toolTip\n ? {\n preMessage: toolTip.preMessage,\n linkMessage: toolTip.linkMessage,\n endMessage: toolTip.endMessage,\n color: primary,\n onClick: toolTip.onClick\n }\n : null,\n [primary, toolTip]\n );\n\n const toolTipProps = {\n closeToolTipInformationTextAriaLabel: translate(\n 'Press the escape key to close the information text'\n )\n };\n\n const TooltipContent = useCallback(\n _props => (\n <ToolTipContent\n {...{...toolTipContentProps, ..._props}}\n handleContentMouseOver={handleContentMouseOver}\n />\n ),\n [handleContentMouseOver, toolTipContentProps]\n );\n\n return (\n <button\n ref={buttonRef}\n data-tip={disabled}\n data-engine={type}\n data-testid={`engine-stars-${type}`}\n // eslint-disable-next-line no-nested-ternary\n onClick={disabled ? handleKeyPress : active ? noop : handleClick}\n data-for={engineStarsContentId}\n className={classnames([\n style.engineStars,\n disabled ? style.disabled : '',\n active ? style.active : '',\n onClick !== noop ? style.clickable : null,\n className\n ])}\n type=\"button\"\n data-tooltip-place=\"left\"\n onKeyDown={handleKeyPress}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n aria-label={translate('More details')}\n >\n {disabled ? (\n <ToolTip\n {...toolTipProps}\n anchorId={engineStarsContentId}\n toolTipIsVisible={toolTipIsVisible}\n TooltipContent={TooltipContent}\n mouseLeaveTimer={mouseLeaveTimer}\n />\n ) : null}\n <span\n className={style.engineIcon}\n style={{\n backgroundColor: onClick === noop ? light : primary\n }}\n >\n <IconType className={style.iconHeader} width=\"30\" />\n </span>\n <div\n className={style.score}\n style={{\n color: active ? primary : dark\n }}\n >\n <p data-name=\"star-counter\">{stars}</p>\n <span>\n <StarIcon\n className={style.iconStar}\n style={{\n color: active ? primary : dark\n }}\n />\n </span>\n </div>\n <div className={style.scoreTitle}>{title}</div>\n </button>\n );\n};\n\nEngineStars.propTypes = {\n type: PropTypes.string.isRequired,\n stars: PropTypes.number.isRequired,\n title: PropTypes.string.isRequired,\n active: PropTypes.bool,\n disabled: PropTypes.bool,\n onClick: PropTypes.func,\n className: PropTypes.string,\n toolTip: PropTypes.shape({\n preMessage: PropTypes.string,\n linkMessage: PropTypes.string,\n endMessage: PropTypes.string,\n onClick: PropTypes.func\n })\n};\n\nEngineStars.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nexport default EngineStars;\n"],"mappings":";;;;;AAAA,OAAOA,UAAP,MAAuB,YAAvB;AACA,OAAOC,KAAP,IAAeC,WAAf,EAA4BC,OAA5B,EAAqCC,QAArC,EA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AAS,EAAEjC,QAAQ,CAACiF,iBAAT,CAA2BhD;AAFb,CAA3B;AAKA,eAAeJ,WAAf"}
|
|
@@ -15,6 +15,7 @@ declare const BrandCreate: {
|
|
|
15
15
|
type: PropTypes.Requireable<string>;
|
|
16
16
|
}>>;
|
|
17
17
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
19
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
19
20
|
href: PropTypes.Requireable<string>;
|
|
20
21
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -23,6 +24,7 @@ declare const BrandCreate: {
|
|
|
23
24
|
disabled: PropTypes.Requireable<boolean>;
|
|
24
25
|
className: PropTypes.Requireable<string>;
|
|
25
26
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
27
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
26
28
|
}>>;
|
|
27
29
|
logOut: PropTypes.Requireable<PropTypes.InferProps<{
|
|
28
30
|
type: PropTypes.Requireable<string>;
|
|
@@ -35,6 +37,7 @@ declare const BrandCreate: {
|
|
|
35
37
|
type: PropTypes.Requireable<string>;
|
|
36
38
|
}>>;
|
|
37
39
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
40
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
38
41
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
39
42
|
href: PropTypes.Requireable<string>;
|
|
40
43
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -43,6 +46,7 @@ declare const BrandCreate: {
|
|
|
43
46
|
disabled: PropTypes.Requireable<boolean>;
|
|
44
47
|
className: PropTypes.Requireable<string>;
|
|
45
48
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
49
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
46
50
|
}>>;
|
|
47
51
|
globalAnalytics: PropTypes.Requireable<PropTypes.InferProps<{
|
|
48
52
|
type: PropTypes.Requireable<string>;
|
|
@@ -55,6 +59,7 @@ declare const BrandCreate: {
|
|
|
55
59
|
type: PropTypes.Requireable<string>;
|
|
56
60
|
}>>;
|
|
57
61
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
62
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
58
63
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
59
64
|
href: PropTypes.Requireable<string>;
|
|
60
65
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -63,6 +68,7 @@ declare const BrandCreate: {
|
|
|
63
68
|
disabled: PropTypes.Requireable<boolean>;
|
|
64
69
|
className: PropTypes.Requireable<string>;
|
|
65
70
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
71
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
66
72
|
}>>;
|
|
67
73
|
platformList: PropTypes.Requireable<PropTypes.InferProps<{
|
|
68
74
|
type: PropTypes.Requireable<string>;
|
|
@@ -75,6 +81,7 @@ declare const BrandCreate: {
|
|
|
75
81
|
type: PropTypes.Requireable<string>;
|
|
76
82
|
}>>;
|
|
77
83
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
84
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
78
85
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
79
86
|
href: PropTypes.Requireable<string>;
|
|
80
87
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -83,6 +90,7 @@ declare const BrandCreate: {
|
|
|
83
90
|
disabled: PropTypes.Requireable<boolean>;
|
|
84
91
|
className: PropTypes.Requireable<string>;
|
|
85
92
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
93
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
86
94
|
}>>;
|
|
87
95
|
}>>;
|
|
88
96
|
platformName: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/back-office/brand-create/index.js"],"names":[],"mappings":";AAOA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/back-office/brand-create/index.js"],"names":[],"mappings":";AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBG"}
|
|
@@ -15,6 +15,7 @@ declare const BrandList: {
|
|
|
15
15
|
type: PropTypes.Requireable<string>;
|
|
16
16
|
}>>;
|
|
17
17
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
19
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
19
20
|
href: PropTypes.Requireable<string>;
|
|
20
21
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -23,6 +24,7 @@ declare const BrandList: {
|
|
|
23
24
|
disabled: PropTypes.Requireable<boolean>;
|
|
24
25
|
className: PropTypes.Requireable<string>;
|
|
25
26
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
27
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
26
28
|
}>>;
|
|
27
29
|
logOut: PropTypes.Requireable<PropTypes.InferProps<{
|
|
28
30
|
type: PropTypes.Requireable<string>;
|
|
@@ -35,6 +37,7 @@ declare const BrandList: {
|
|
|
35
37
|
type: PropTypes.Requireable<string>;
|
|
36
38
|
}>>;
|
|
37
39
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
40
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
38
41
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
39
42
|
href: PropTypes.Requireable<string>;
|
|
40
43
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -43,6 +46,7 @@ declare const BrandList: {
|
|
|
43
46
|
disabled: PropTypes.Requireable<boolean>;
|
|
44
47
|
className: PropTypes.Requireable<string>;
|
|
45
48
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
49
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
46
50
|
}>>;
|
|
47
51
|
globalAnalytics: PropTypes.Requireable<PropTypes.InferProps<{
|
|
48
52
|
type: PropTypes.Requireable<string>;
|
|
@@ -55,6 +59,7 @@ declare const BrandList: {
|
|
|
55
59
|
type: PropTypes.Requireable<string>;
|
|
56
60
|
}>>;
|
|
57
61
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
62
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
58
63
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
59
64
|
href: PropTypes.Requireable<string>;
|
|
60
65
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -63,6 +68,7 @@ declare const BrandList: {
|
|
|
63
68
|
disabled: PropTypes.Requireable<boolean>;
|
|
64
69
|
className: PropTypes.Requireable<string>;
|
|
65
70
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
71
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
66
72
|
}>>;
|
|
67
73
|
platformList: PropTypes.Requireable<PropTypes.InferProps<{
|
|
68
74
|
type: PropTypes.Requireable<string>;
|
|
@@ -75,6 +81,7 @@ declare const BrandList: {
|
|
|
75
81
|
type: PropTypes.Requireable<string>;
|
|
76
82
|
}>>;
|
|
77
83
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
84
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
78
85
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
79
86
|
href: PropTypes.Requireable<string>;
|
|
80
87
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -83,6 +90,7 @@ declare const BrandList: {
|
|
|
83
90
|
disabled: PropTypes.Requireable<boolean>;
|
|
84
91
|
className: PropTypes.Requireable<string>;
|
|
85
92
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
93
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
86
94
|
}>>;
|
|
87
95
|
}>>;
|
|
88
96
|
platformName: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/back-office/brand-list/index.js"],"names":[],"mappings":";AAWA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/back-office/brand-list/index.js"],"names":[],"mappings":";AAWA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyCG"}
|
|
@@ -30,6 +30,7 @@ declare namespace BrandUpdate {
|
|
|
30
30
|
type: PropTypes.Requireable<string>;
|
|
31
31
|
}>>;
|
|
32
32
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
33
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
33
34
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
34
35
|
href: PropTypes.Requireable<string>;
|
|
35
36
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -38,6 +39,7 @@ declare namespace BrandUpdate {
|
|
|
38
39
|
disabled: PropTypes.Requireable<boolean>;
|
|
39
40
|
className: PropTypes.Requireable<string>;
|
|
40
41
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
42
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
41
43
|
}>>;
|
|
42
44
|
logOut: PropTypes.Requireable<PropTypes.InferProps<{
|
|
43
45
|
type: PropTypes.Requireable<string>;
|
|
@@ -50,6 +52,7 @@ declare namespace BrandUpdate {
|
|
|
50
52
|
type: PropTypes.Requireable<string>;
|
|
51
53
|
}>>;
|
|
52
54
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
55
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
53
56
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
54
57
|
href: PropTypes.Requireable<string>;
|
|
55
58
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -58,6 +61,7 @@ declare namespace BrandUpdate {
|
|
|
58
61
|
disabled: PropTypes.Requireable<boolean>;
|
|
59
62
|
className: PropTypes.Requireable<string>;
|
|
60
63
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
64
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
61
65
|
}>>;
|
|
62
66
|
globalAnalytics: PropTypes.Requireable<PropTypes.InferProps<{
|
|
63
67
|
type: PropTypes.Requireable<string>;
|
|
@@ -70,6 +74,7 @@ declare namespace BrandUpdate {
|
|
|
70
74
|
type: PropTypes.Requireable<string>;
|
|
71
75
|
}>>;
|
|
72
76
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
77
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
73
78
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
74
79
|
href: PropTypes.Requireable<string>;
|
|
75
80
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -78,6 +83,7 @@ declare namespace BrandUpdate {
|
|
|
78
83
|
disabled: PropTypes.Requireable<boolean>;
|
|
79
84
|
className: PropTypes.Requireable<string>;
|
|
80
85
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
86
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
81
87
|
}>>;
|
|
82
88
|
platformList: PropTypes.Requireable<PropTypes.InferProps<{
|
|
83
89
|
type: PropTypes.Requireable<string>;
|
|
@@ -90,6 +96,7 @@ declare namespace BrandUpdate {
|
|
|
90
96
|
type: PropTypes.Requireable<string>;
|
|
91
97
|
}>>;
|
|
92
98
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
99
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
93
100
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
94
101
|
href: PropTypes.Requireable<string>;
|
|
95
102
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -98,6 +105,7 @@ declare namespace BrandUpdate {
|
|
|
98
105
|
disabled: PropTypes.Requireable<boolean>;
|
|
99
106
|
className: PropTypes.Requireable<string>;
|
|
100
107
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
108
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
101
109
|
}>>;
|
|
102
110
|
}>>;
|
|
103
111
|
platformName: PropTypes.Requireable<string>;
|
|
@@ -551,6 +559,7 @@ declare namespace BrandUpdate {
|
|
|
551
559
|
type: PropTypes.Requireable<string>;
|
|
552
560
|
}>>;
|
|
553
561
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
562
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
554
563
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
555
564
|
href: PropTypes.Requireable<string>;
|
|
556
565
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -559,6 +568,7 @@ declare namespace BrandUpdate {
|
|
|
559
568
|
disabled: PropTypes.Requireable<boolean>;
|
|
560
569
|
className: PropTypes.Requireable<string>;
|
|
561
570
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
571
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
562
572
|
}> | PropTypes.InferProps<{
|
|
563
573
|
type: PropTypes.Requireable<string>;
|
|
564
574
|
title: PropTypes.Requireable<string>;
|
|
@@ -1220,6 +1230,7 @@ declare namespace BrandUpdate {
|
|
|
1220
1230
|
type: PropTypes.Requireable<string>;
|
|
1221
1231
|
}>>;
|
|
1222
1232
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
1233
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
1223
1234
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
1224
1235
|
href: PropTypes.Requireable<string>;
|
|
1225
1236
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -1228,6 +1239,7 @@ declare namespace BrandUpdate {
|
|
|
1228
1239
|
disabled: PropTypes.Requireable<boolean>;
|
|
1229
1240
|
className: PropTypes.Requireable<string>;
|
|
1230
1241
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
1242
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
1231
1243
|
}> | PropTypes.InferProps<{
|
|
1232
1244
|
type: PropTypes.Requireable<string>;
|
|
1233
1245
|
title: PropTypes.Requireable<string>;
|
|
@@ -1504,6 +1516,7 @@ declare namespace BrandUpdate {
|
|
|
1504
1516
|
type: PropTypes.Requireable<string>;
|
|
1505
1517
|
}>>;
|
|
1506
1518
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
1519
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
1507
1520
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
1508
1521
|
href: PropTypes.Requireable<string>;
|
|
1509
1522
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -1512,6 +1525,7 @@ declare namespace BrandUpdate {
|
|
|
1512
1525
|
disabled: PropTypes.Requireable<boolean>;
|
|
1513
1526
|
className: PropTypes.Requireable<string>;
|
|
1514
1527
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
1528
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
1515
1529
|
}>>;
|
|
1516
1530
|
items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
1517
1531
|
bulletPointMenuButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -14,6 +14,7 @@ declare const _default: {
|
|
|
14
14
|
type: PropTypes.Requireable<string>;
|
|
15
15
|
}>>;
|
|
16
16
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
17
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
17
18
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
18
19
|
href: PropTypes.Requireable<string>;
|
|
19
20
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -22,6 +23,7 @@ declare const _default: {
|
|
|
22
23
|
disabled: PropTypes.Requireable<boolean>;
|
|
23
24
|
className: PropTypes.Requireable<string>;
|
|
24
25
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
26
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
25
27
|
}>>;
|
|
26
28
|
logOut: PropTypes.Requireable<PropTypes.InferProps<{
|
|
27
29
|
type: PropTypes.Requireable<string>;
|
|
@@ -34,6 +36,7 @@ declare const _default: {
|
|
|
34
36
|
type: PropTypes.Requireable<string>;
|
|
35
37
|
}>>;
|
|
36
38
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
39
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
37
40
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
38
41
|
href: PropTypes.Requireable<string>;
|
|
39
42
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -42,6 +45,7 @@ declare const _default: {
|
|
|
42
45
|
disabled: PropTypes.Requireable<boolean>;
|
|
43
46
|
className: PropTypes.Requireable<string>;
|
|
44
47
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
48
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
45
49
|
}>>;
|
|
46
50
|
globalAnalytics: PropTypes.Requireable<PropTypes.InferProps<{
|
|
47
51
|
type: PropTypes.Requireable<string>;
|
|
@@ -54,6 +58,7 @@ declare const _default: {
|
|
|
54
58
|
type: PropTypes.Requireable<string>;
|
|
55
59
|
}>>;
|
|
56
60
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
61
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
57
62
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
58
63
|
href: PropTypes.Requireable<string>;
|
|
59
64
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -62,6 +67,7 @@ declare const _default: {
|
|
|
62
67
|
disabled: PropTypes.Requireable<boolean>;
|
|
63
68
|
className: PropTypes.Requireable<string>;
|
|
64
69
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
70
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
65
71
|
}>>;
|
|
66
72
|
platformList: PropTypes.Requireable<PropTypes.InferProps<{
|
|
67
73
|
type: PropTypes.Requireable<string>;
|
|
@@ -74,6 +80,7 @@ declare const _default: {
|
|
|
74
80
|
type: PropTypes.Requireable<string>;
|
|
75
81
|
}>>;
|
|
76
82
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
83
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
77
84
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
78
85
|
href: PropTypes.Requireable<string>;
|
|
79
86
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -82,6 +89,7 @@ declare const _default: {
|
|
|
82
89
|
disabled: PropTypes.Requireable<boolean>;
|
|
83
90
|
className: PropTypes.Requireable<string>;
|
|
84
91
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
92
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
85
93
|
}>>;
|
|
86
94
|
}>>;
|
|
87
95
|
platformName: PropTypes.Requireable<string>;
|
|
@@ -15,6 +15,7 @@ declare function createLayout(Template: any): {
|
|
|
15
15
|
type: PropTypes.Requireable<string>;
|
|
16
16
|
}>>;
|
|
17
17
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
19
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
19
20
|
href: PropTypes.Requireable<string>;
|
|
20
21
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -23,6 +24,7 @@ declare function createLayout(Template: any): {
|
|
|
23
24
|
disabled: PropTypes.Requireable<boolean>;
|
|
24
25
|
className: PropTypes.Requireable<string>;
|
|
25
26
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
27
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
26
28
|
}>>;
|
|
27
29
|
logOut: PropTypes.Requireable<PropTypes.InferProps<{
|
|
28
30
|
type: PropTypes.Requireable<string>;
|
|
@@ -35,6 +37,7 @@ declare function createLayout(Template: any): {
|
|
|
35
37
|
type: PropTypes.Requireable<string>;
|
|
36
38
|
}>>;
|
|
37
39
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
40
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
38
41
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
39
42
|
href: PropTypes.Requireable<string>;
|
|
40
43
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -43,6 +46,7 @@ declare function createLayout(Template: any): {
|
|
|
43
46
|
disabled: PropTypes.Requireable<boolean>;
|
|
44
47
|
className: PropTypes.Requireable<string>;
|
|
45
48
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
49
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
46
50
|
}>>;
|
|
47
51
|
globalAnalytics: PropTypes.Requireable<PropTypes.InferProps<{
|
|
48
52
|
type: PropTypes.Requireable<string>;
|
|
@@ -55,6 +59,7 @@ declare function createLayout(Template: any): {
|
|
|
55
59
|
type: PropTypes.Requireable<string>;
|
|
56
60
|
}>>;
|
|
57
61
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
62
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
58
63
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
59
64
|
href: PropTypes.Requireable<string>;
|
|
60
65
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -63,6 +68,7 @@ declare function createLayout(Template: any): {
|
|
|
63
68
|
disabled: PropTypes.Requireable<boolean>;
|
|
64
69
|
className: PropTypes.Requireable<string>;
|
|
65
70
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
71
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
66
72
|
}>>;
|
|
67
73
|
platformList: PropTypes.Requireable<PropTypes.InferProps<{
|
|
68
74
|
type: PropTypes.Requireable<string>;
|
|
@@ -75,6 +81,7 @@ declare function createLayout(Template: any): {
|
|
|
75
81
|
type: PropTypes.Requireable<string>;
|
|
76
82
|
}>>;
|
|
77
83
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
84
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
78
85
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
79
86
|
href: PropTypes.Requireable<string>;
|
|
80
87
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -83,6 +90,7 @@ declare function createLayout(Template: any): {
|
|
|
83
90
|
disabled: PropTypes.Requireable<boolean>;
|
|
84
91
|
className: PropTypes.Requireable<string>;
|
|
85
92
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
93
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
86
94
|
}>>;
|
|
87
95
|
}>>;
|
|
88
96
|
platformName: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/back-office/layout/index.js"],"names":[],"mappings":";AAKA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/back-office/layout/index.js"],"names":[],"mappings":";AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBC"}
|
|
@@ -12,6 +12,7 @@ declare namespace ButtonLink {
|
|
|
12
12
|
type: PropTypes.Requireable<string>;
|
|
13
13
|
}>>;
|
|
14
14
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
15
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
15
16
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
16
17
|
href: PropTypes.Requireable<string>;
|
|
17
18
|
download: PropTypes.Requireable<boolean>;
|
|
@@ -20,6 +21,7 @@ declare namespace ButtonLink {
|
|
|
20
21
|
disabled: PropTypes.Requireable<boolean>;
|
|
21
22
|
className: PropTypes.Requireable<string>;
|
|
22
23
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
24
|
+
useTitle: PropTypes.Requireable<boolean>;
|
|
23
25
|
};
|
|
24
26
|
}
|
|
25
27
|
import PropTypes from "prop-types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.js"],"names":[],"mappings":";AA6BA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.js"],"names":[],"mappings":";AA6BA,qDAqEC"}
|
|
@@ -66,34 +66,41 @@ const ButtonLink = props => {
|
|
|
66
66
|
'aria-label': ariaLabel,
|
|
67
67
|
link,
|
|
68
68
|
onClick = _noop2.default,
|
|
69
|
+
onKeyDown = _noop2.default,
|
|
69
70
|
className,
|
|
70
|
-
customStyle
|
|
71
|
+
customStyle,
|
|
72
|
+
useTitle = true
|
|
71
73
|
} = props;
|
|
72
74
|
const contentView = getButtonContent(icon, label);
|
|
73
75
|
const styleButton = (0, _classnames.default)(className, _style.default.button, type === 'primary' && _style.default.primary, type === 'secondary' && _style.default.secondary, type === 'tertiary' && _style.default.tertiary, type === 'text' && _style.default.text, type === 'dangerous' && _style.default.dangerous, link && _style.default.link, disabled && _style.default.disabled);
|
|
74
76
|
const handleOnClick = (0, _react.useCallback)(() => onClick(), [onClick]);
|
|
77
|
+
const handleOnKeyDown = (0, _react.useCallback)(event => onKeyDown(event), [onKeyDown]);
|
|
75
78
|
|
|
76
79
|
if (link) {
|
|
77
|
-
return /*#__PURE__*/_react.default.createElement(_link.default, _extends({}, link, {
|
|
80
|
+
return /*#__PURE__*/_react.default.createElement(_link.default, _extends({}, link, useTitle && {
|
|
81
|
+
title: ariaLabel || label
|
|
82
|
+
}, {
|
|
78
83
|
style: customStyle,
|
|
79
84
|
className: styleButton,
|
|
80
85
|
"data-name": dataName,
|
|
81
86
|
"data-testid": dataTestId,
|
|
82
|
-
"aria-label": ariaLabel || label
|
|
83
|
-
title: ariaLabel || label
|
|
87
|
+
"aria-label": ariaLabel || label
|
|
84
88
|
}), contentView);
|
|
85
89
|
}
|
|
86
90
|
|
|
87
|
-
return /*#__PURE__*/_react.default.createElement("button", {
|
|
91
|
+
return /*#__PURE__*/_react.default.createElement("button", _extends({}, useTitle && {
|
|
92
|
+
title: ariaLabel || label
|
|
93
|
+
}, {
|
|
88
94
|
type: "button",
|
|
89
95
|
"aria-label": ariaLabel || label,
|
|
90
|
-
title: ariaLabel || label,
|
|
91
96
|
"data-name": dataName,
|
|
92
97
|
"data-testid": dataTestId,
|
|
93
98
|
style: customStyle,
|
|
94
99
|
className: styleButton,
|
|
95
|
-
onClick: handleOnClick
|
|
96
|
-
|
|
100
|
+
onClick: handleOnClick,
|
|
101
|
+
onKeyDown: handleOnKeyDown,
|
|
102
|
+
tabIndex: 0
|
|
103
|
+
}), contentView);
|
|
97
104
|
};
|
|
98
105
|
|
|
99
106
|
ButtonLink.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -107,6 +114,7 @@ ButtonLink.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
107
114
|
type: _propTypes.default.oneOf((0, _keys2.default)(_buttonIcons.ICONS))
|
|
108
115
|
}),
|
|
109
116
|
onClick: _propTypes.default.func,
|
|
117
|
+
onKeyDown: _propTypes.default.func,
|
|
110
118
|
link: _propTypes.default.shape({
|
|
111
119
|
href: _propTypes.default.string,
|
|
112
120
|
download: _propTypes.default.bool,
|
|
@@ -114,7 +122,8 @@ ButtonLink.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
114
122
|
}),
|
|
115
123
|
disabled: _propTypes.default.bool,
|
|
116
124
|
className: _propTypes.default.string,
|
|
117
|
-
customStyle: _propTypes.default.shape({})
|
|
125
|
+
customStyle: _propTypes.default.shape({}),
|
|
126
|
+
useTitle: _propTypes.default.bool
|
|
118
127
|
} : {};
|
|
119
128
|
var _default = ButtonLink;
|
|
120
129
|
exports.default = _default;
|