@coorpacademy/components 11.9.3-alpha.25.24 → 11.9.3-alpha.28
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/input-search/index.d.ts.map +1 -1
- package/es/atom/input-search/index.js +1 -0
- package/es/atom/input-search/index.js.map +1 -1
- package/es/atom/input-switch/index.d.ts +1 -0
- package/es/atom/input-switch/index.d.ts.map +1 -1
- package/es/atom/input-switch/index.js +23 -12
- package/es/atom/input-switch/index.js.map +1 -1
- package/es/atom/select/index.d.ts +1 -0
- package/es/atom/select/index.d.ts.map +1 -1
- package/es/atom/select/index.js +13 -8
- package/es/atom/select/index.js.map +1 -1
- package/es/molecule/brand-form-group/index.d.ts +5 -0
- package/es/molecule/cm-popin/types.d.ts +1 -0
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/draggable-list/index.d.ts +1 -0
- package/es/molecule/filters/filters-wrapper.d.ts.map +1 -1
- package/es/molecule/filters/filters-wrapper.js +4 -1
- package/es/molecule/filters/filters-wrapper.js.map +1 -1
- package/es/molecule/filters/index.d.ts +2 -0
- package/es/molecule/filters/index.d.ts.map +1 -1
- package/es/molecule/filters/index.js +10 -3
- package/es/molecule/filters/index.js.map +1 -1
- package/es/molecule/setup-section/index.d.ts +1 -0
- package/es/molecule/setup-section/index.d.ts.map +1 -1
- package/es/molecule/setup-sections/index.d.ts +1 -0
- package/es/molecule/setup-slide/index.d.ts +2 -0
- package/es/molecule/setup-slider/index.d.ts +2 -0
- package/es/organism/brand-form/index.d.ts +5 -0
- package/es/organism/mooc-header/index.d.ts +0 -6
- package/es/organism/mooc-header/index.d.ts.map +1 -1
- package/es/organism/mooc-header/index.js +12 -71
- package/es/organism/mooc-header/index.js.map +1 -1
- package/es/organism/mooc-header/style.css +0 -46
- package/es/organism/user-preferences/index.d.ts +1 -0
- package/es/organism/wizard-contents/index.d.ts +5 -0
- package/es/template/activity/index.d.ts +12 -11
- package/es/template/activity/index.d.ts.map +1 -1
- package/es/template/activity/index.js +6 -3
- package/es/template/activity/index.js.map +1 -1
- package/es/template/app-player/loading/index.d.ts +1 -0
- package/es/template/app-player/player/index.d.ts +2 -0
- package/es/template/app-player/player/slides/index.d.ts +1 -0
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +1 -0
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +1 -0
- package/es/template/app-review/index.d.ts +1 -0
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +1 -0
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +1 -0
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +11 -0
- package/es/template/common/dashboard/index.d.ts +1 -0
- package/es/template/common/search-page/index.d.ts +3 -0
- package/es/template/common/search-page/index.d.ts.map +1 -1
- package/es/template/common/search-page/index.js +6 -3
- package/es/template/common/search-page/index.js.map +1 -1
- package/es/template/teams-dashboard/index.d.ts +0 -2
- package/lib/atom/input-search/index.d.ts.map +1 -1
- package/lib/atom/input-search/index.js +1 -0
- package/lib/atom/input-search/index.js.map +1 -1
- package/lib/atom/input-switch/index.d.ts +1 -0
- package/lib/atom/input-switch/index.d.ts.map +1 -1
- package/lib/atom/input-switch/index.js +22 -12
- package/lib/atom/input-switch/index.js.map +1 -1
- package/lib/atom/select/index.d.ts +1 -0
- package/lib/atom/select/index.d.ts.map +1 -1
- package/lib/atom/select/index.js +13 -8
- package/lib/atom/select/index.js.map +1 -1
- package/lib/molecule/brand-form-group/index.d.ts +5 -0
- package/lib/molecule/cm-popin/types.d.ts +1 -0
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/draggable-list/index.d.ts +1 -0
- package/lib/molecule/filters/filters-wrapper.d.ts.map +1 -1
- package/lib/molecule/filters/filters-wrapper.js +4 -1
- package/lib/molecule/filters/filters-wrapper.js.map +1 -1
- package/lib/molecule/filters/index.d.ts +2 -0
- package/lib/molecule/filters/index.d.ts.map +1 -1
- package/lib/molecule/filters/index.js +9 -3
- package/lib/molecule/filters/index.js.map +1 -1
- package/lib/molecule/setup-section/index.d.ts +1 -0
- package/lib/molecule/setup-section/index.d.ts.map +1 -1
- package/lib/molecule/setup-sections/index.d.ts +1 -0
- package/lib/molecule/setup-slide/index.d.ts +2 -0
- package/lib/molecule/setup-slider/index.d.ts +2 -0
- package/lib/organism/brand-form/index.d.ts +5 -0
- package/lib/organism/mooc-header/index.d.ts +0 -6
- package/lib/organism/mooc-header/index.d.ts.map +1 -1
- package/lib/organism/mooc-header/index.js +11 -70
- package/lib/organism/mooc-header/index.js.map +1 -1
- package/lib/organism/mooc-header/style.css +0 -46
- package/lib/organism/user-preferences/index.d.ts +1 -0
- package/lib/organism/wizard-contents/index.d.ts +5 -0
- package/lib/template/activity/index.d.ts +12 -11
- package/lib/template/activity/index.d.ts.map +1 -1
- package/lib/template/activity/index.js +6 -3
- package/lib/template/activity/index.js.map +1 -1
- package/lib/template/app-player/loading/index.d.ts +1 -0
- package/lib/template/app-player/player/index.d.ts +2 -0
- package/lib/template/app-player/player/slides/index.d.ts +1 -0
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +1 -0
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +1 -0
- package/lib/template/app-review/index.d.ts +1 -0
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +1 -0
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +1 -0
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +11 -0
- package/lib/template/common/dashboard/index.d.ts +1 -0
- package/lib/template/common/search-page/index.d.ts +3 -0
- package/lib/template/common/search-page/index.d.ts.map +1 -1
- package/lib/template/common/search-page/index.js +6 -3
- package/lib/template/common/search-page/index.js.map +1 -1
- package/lib/template/teams-dashboard/index.d.ts +0 -2
- package/package.json +3 -3
|
@@ -30,7 +30,8 @@ const Progression = (props, legacyContext) => {
|
|
|
30
30
|
total,
|
|
31
31
|
engines = [],
|
|
32
32
|
themeFilter = {},
|
|
33
|
-
loading
|
|
33
|
+
loading,
|
|
34
|
+
'aria-label': ariaLabel
|
|
34
35
|
} = props;
|
|
35
36
|
const skin = GetSkinFromContext(legacyContext);
|
|
36
37
|
const {
|
|
@@ -64,7 +65,8 @@ const Progression = (props, legacyContext) => {
|
|
|
64
65
|
className: style.select,
|
|
65
66
|
theme: "thematiques",
|
|
66
67
|
options: themeFilter.options,
|
|
67
|
-
onChange: handleSelectTheme
|
|
68
|
+
onChange: handleSelectTheme,
|
|
69
|
+
"aria-label": ariaLabel
|
|
68
70
|
}) : null;
|
|
69
71
|
const recommendationSection = !isEmpty(recommendation) ? /*#__PURE__*/React.createElement("div", {
|
|
70
72
|
className: style.recommendationWrapper
|
|
@@ -136,7 +138,8 @@ Progression.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
136
138
|
subtitle: PropTypes.string.isRequired,
|
|
137
139
|
courseTitle: PropTypes.string.isRequired,
|
|
138
140
|
onClick: PropTypes.func
|
|
139
|
-
})
|
|
141
|
+
}),
|
|
142
|
+
'aria-label': PropTypes.string
|
|
140
143
|
} : {};
|
|
141
144
|
export default Progression;
|
|
142
145
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","get","isEmpty","map","noop","omit","PropTypes","classnames","Provider","GetSkinFromContext","Button","Select","Loader","ProgressionItem","EngineStars","StarsSummary","style","mapWithIndex","convert","cap","Progression","props","legacyContext","mainTitle","mainSubtitle","recommendation","progressions","adaptiveAriaLabel","total","engines","themeFilter","loading","skin","onChange","themeFilterOnChange","handleClick","e","stopPropagation","preventDefault","onClick","handleSelectTheme","primary","loader","allProgressions","progression","index","ref","coreProgression","core","themeSelect","options","selectBorder","select","recommendationSection","recommendationWrapper","title","subtitle","course","innerHTML","__html","courseTitle","cta","backgroundColor","default","headerProgression","wrapperCta","wrapperProgression","contextTypes","childContextTypes","propTypes","string","isRequired","shape","label","stars","number","arrayOf","bool","func"],"sources":["../../../src/template/activity/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport get from 'lodash/fp/get';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport map from 'lodash/fp/map';\nimport noop from 'lodash/fp/noop';\nimport omit from 'lodash/fp/omit';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Provider, {GetSkinFromContext} from '../../atom/provider';\nimport Button from '../../atom/button';\nimport Select from '../../atom/select';\nimport Loader from '../../atom/loader';\nimport ProgressionItem from './progression-item';\nimport EngineStars from './engine-stars';\nimport StarsSummary from './stars-summary';\nimport style from './style.css';\n\nconst mapWithIndex = map.convert({cap: false});\n\nconst Progression = (props, legacyContext) => {\n const {\n mainTitle,\n mainSubtitle,\n recommendation = {},\n progressions = [],\n adaptiveAriaLabel,\n total,\n engines = [],\n themeFilter = {},\n loading\n } = props;\n const skin = GetSkinFromContext(legacyContext);\n const {onChange: themeFilterOnChange} = themeFilter;\n\n const handleClick = useCallback(\n e => {\n e.stopPropagation();\n e.preventDefault();\n const {onClick = noop} = recommendation;\n onClick(e);\n },\n [recommendation]\n );\n\n const handleSelectTheme = useCallback(\n e => {\n themeFilterOnChange && themeFilterOnChange(e);\n },\n [themeFilterOnChange]\n );\n\n const primary = get('common.primary', skin);\n const loader = loading ? (\n <div className={style.loader}>\n <Loader />\n </div>\n ) : null;\n const allProgressions = mapWithIndex(\n (progression, index) => (\n <ProgressionItem\n {...omit(['ref'], progression)}\n key={`${index}-${progression.ref}`}\n adaptiveAriaLabel={adaptiveAriaLabel}\n />\n ),\n progressions\n );\n\n const coreProgression = (\n <div data-name=\"activityCore\" className={style.core}>\n {allProgressions}\n </div>\n );\n const themeSelect = !isEmpty(themeFilter.options) ? (\n <Select\n borderClassName={style.selectBorder}\n className={style.select}\n theme=\"thematiques\"\n options={themeFilter.options}\n onChange={handleSelectTheme}\n />\n ) : null;\n const recommendationSection = !isEmpty(recommendation) ? (\n <div className={style.recommendationWrapper}>\n <p className={style.recommendationSection}>{recommendation.title} </p>\n <p className={style.recommendationSection}>\n <span>{recommendation.subtitle} </span>\n <span\n className={classnames(style.course, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: recommendation.courseTitle}}\n />\n </p>\n <Button\n type=\"link\"\n onClick={handleClick}\n submitValue={recommendation.cta}\n style={{\n backgroundColor: primary\n }}\n className={style.cta}\n />\n </div>\n ) : null;\n\n return (\n <div className={style.default}>\n <div data-name=\"activity-header\" tabIndex={0}>\n <div className={style.mainTitle} tabIndex={0}>\n <span>{mainTitle}</span> {mainSubtitle}\n </div>\n <div className={style.headerProgression} tabIndex={0}>\n <div className={style.wrapperCta} tabIndex={0}>\n {themeSelect}\n {recommendationSection}\n </div>\n <StarsSummary engines={engines} total={total} />\n </div>\n </div>\n <div className={style.wrapperProgression} data-name=\"activityList\">\n {coreProgression}\n {loader}\n </div>\n </div>\n );\n};\n\nProgression.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nProgression.propTypes = {\n mainTitle: PropTypes.string.isRequired,\n mainSubtitle: PropTypes.string.isRequired,\n adaptiveAriaLabel: PropTypes.string,\n total: PropTypes.shape({\n label: PropTypes.string.isRequired,\n stars: PropTypes.number.isRequired\n }).isRequired,\n engines: PropTypes.arrayOf(PropTypes.shape(EngineStars.propTypes)),\n loading: PropTypes.bool.isRequired,\n progressions: PropTypes.arrayOf(\n PropTypes.shape({...ProgressionItem.propTypes, ref: PropTypes.string.isRequired})\n ),\n themeFilter: PropTypes.shape({\n options: Select.propTypes.options.isRequired,\n onChange: Select.propTypes.onChange\n }),\n recommendation: PropTypes.shape({\n cta: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string.isRequired,\n courseTitle: PropTypes.string.isRequired,\n onClick: PropTypes.func\n })\n};\n\nexport default Progression;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,QAAP,IAAkBC,kBAAlB,QAA2C,qBAA3C;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,eAAP,MAA4B,oBAA5B;AACA,OAAOC,WAAP,MAAwB,gBAAxB;AACA,OAAOC,YAAP,MAAyB,iBAAzB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,YAAY,GAAGd,GAAG,CAACe,OAAJ,CAAY;EAACC,GAAG,EAAE;AAAN,CAAZ,CAArB;;AAEA,MAAMC,WAAW,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EAC5C,MAAM;IACJC,SADI;IAEJC,YAFI;IAGJC,cAAc,GAAG,EAHb;IAIJC,YAAY,GAAG,EAJX;IAKJC,iBALI;IAMJC,KANI;IAOJC,OAAO,GAAG,EAPN;IAQJC,WAAW,GAAG,EARV;IASJC;EATI,IAUFV,KAVJ;EAWA,MAAMW,IAAI,GAAGvB,kBAAkB,CAACa,aAAD,CAA/B;EACA,MAAM;IAACW,QAAQ,EAAEC;EAAX,IAAkCJ,WAAxC;EAEA,MAAMK,WAAW,GAAGnC,WAAW,CAC7BoC,CAAC,IAAI;IACHA,CAAC,CAACC,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BX,WAAW,EAAEtD,SAAS,CAACgE,MAAV,CAAiBC,UAJA;IAK9BhC,OAAO,EAAEjC,SAAS,CAACwE;EALW,CAAhB;AAjBM,CAAxB;AA0BA,eAAe1D,WAAf"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","get","isEmpty","map","noop","omit","PropTypes","classnames","Provider","GetSkinFromContext","Button","Select","Loader","ProgressionItem","EngineStars","StarsSummary","style","mapWithIndex","convert","cap","Progression","props","legacyContext","mainTitle","mainSubtitle","recommendation","progressions","adaptiveAriaLabel","total","engines","themeFilter","loading","ariaLabel","skin","onChange","themeFilterOnChange","handleClick","e","stopPropagation","preventDefault","onClick","handleSelectTheme","primary","loader","allProgressions","progression","index","ref","coreProgression","core","themeSelect","options","selectBorder","select","recommendationSection","recommendationWrapper","title","subtitle","course","innerHTML","__html","courseTitle","cta","backgroundColor","default","headerProgression","wrapperCta","wrapperProgression","contextTypes","childContextTypes","propTypes","string","isRequired","shape","label","stars","number","arrayOf","bool","func"],"sources":["../../../src/template/activity/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport get from 'lodash/fp/get';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport map from 'lodash/fp/map';\nimport noop from 'lodash/fp/noop';\nimport omit from 'lodash/fp/omit';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Provider, {GetSkinFromContext} from '../../atom/provider';\nimport Button from '../../atom/button';\nimport Select from '../../atom/select';\nimport Loader from '../../atom/loader';\nimport ProgressionItem from './progression-item';\nimport EngineStars from './engine-stars';\nimport StarsSummary from './stars-summary';\nimport style from './style.css';\n\nconst mapWithIndex = map.convert({cap: false});\n\nconst Progression = (props, legacyContext) => {\n const {\n mainTitle,\n mainSubtitle,\n recommendation = {},\n progressions = [],\n adaptiveAriaLabel,\n total,\n engines = [],\n themeFilter = {},\n loading,\n 'aria-label': ariaLabel\n } = props;\n const skin = GetSkinFromContext(legacyContext);\n const {onChange: themeFilterOnChange} = themeFilter;\n\n const handleClick = useCallback(\n e => {\n e.stopPropagation();\n e.preventDefault();\n const {onClick = noop} = recommendation;\n onClick(e);\n },\n [recommendation]\n );\n\n const handleSelectTheme = useCallback(\n e => {\n themeFilterOnChange && themeFilterOnChange(e);\n },\n [themeFilterOnChange]\n );\n\n const primary = get('common.primary', skin);\n const loader = loading ? (\n <div className={style.loader}>\n <Loader />\n </div>\n ) : null;\n const allProgressions = mapWithIndex(\n (progression, index) => (\n <ProgressionItem\n {...omit(['ref'], progression)}\n key={`${index}-${progression.ref}`}\n adaptiveAriaLabel={adaptiveAriaLabel}\n />\n ),\n progressions\n );\n\n const coreProgression = (\n <div data-name=\"activityCore\" className={style.core}>\n {allProgressions}\n </div>\n );\n const themeSelect = !isEmpty(themeFilter.options) ? (\n <Select\n borderClassName={style.selectBorder}\n className={style.select}\n theme=\"thematiques\"\n options={themeFilter.options}\n onChange={handleSelectTheme}\n aria-label={ariaLabel}\n />\n ) : null;\n const recommendationSection = !isEmpty(recommendation) ? (\n <div className={style.recommendationWrapper}>\n <p className={style.recommendationSection}>{recommendation.title} </p>\n <p className={style.recommendationSection}>\n <span>{recommendation.subtitle} </span>\n <span\n className={classnames(style.course, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: recommendation.courseTitle}}\n />\n </p>\n <Button\n type=\"link\"\n onClick={handleClick}\n submitValue={recommendation.cta}\n style={{\n backgroundColor: primary\n }}\n className={style.cta}\n />\n </div>\n ) : null;\n\n return (\n <div className={style.default}>\n <div data-name=\"activity-header\" tabIndex={0}>\n <div className={style.mainTitle} tabIndex={0}>\n <span>{mainTitle}</span> {mainSubtitle}\n </div>\n <div className={style.headerProgression} tabIndex={0}>\n <div className={style.wrapperCta} tabIndex={0}>\n {themeSelect}\n {recommendationSection}\n </div>\n <StarsSummary engines={engines} total={total} />\n </div>\n </div>\n <div className={style.wrapperProgression} data-name=\"activityList\">\n {coreProgression}\n {loader}\n </div>\n </div>\n );\n};\n\nProgression.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nProgression.propTypes = {\n mainTitle: PropTypes.string.isRequired,\n mainSubtitle: PropTypes.string.isRequired,\n adaptiveAriaLabel: PropTypes.string,\n total: PropTypes.shape({\n label: PropTypes.string.isRequired,\n stars: PropTypes.number.isRequired\n }).isRequired,\n engines: PropTypes.arrayOf(PropTypes.shape(EngineStars.propTypes)),\n loading: PropTypes.bool.isRequired,\n progressions: PropTypes.arrayOf(\n PropTypes.shape({...ProgressionItem.propTypes, ref: PropTypes.string.isRequired})\n ),\n themeFilter: PropTypes.shape({\n options: Select.propTypes.options.isRequired,\n onChange: Select.propTypes.onChange\n }),\n recommendation: PropTypes.shape({\n cta: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string.isRequired,\n courseTitle: PropTypes.string.isRequired,\n onClick: PropTypes.func\n }),\n 'aria-label': PropTypes.string\n};\n\nexport default Progression;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,QAAP,IAAkBC,kBAAlB,QAA2C,qBAA3C;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,eAAP,MAA4B,oBAA5B;AACA,OAAOC,WAAP,MAAwB,gBAAxB;AACA,OAAOC,YAAP,MAAyB,iBAAzB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,YAAY,GAAGd,GAAG,CAACe,OAAJ,CAAY;EAACC,GAAG,EAAE;AAAN,CAAZ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AAEzC,SAAS,CAACiE,MAAV,CAAiBC;EAArE,GADY,CAVQ;EAatB1C,WAAW,EAAExB,SAAS,CAACmE,KAAV,CAAgB;IAC3BtB,OAAO,EAAExC,MAAM,CAAC2D,SAAP,CAAiBnB,OAAjB,CAAyBqB,UADP;IAE3BtC,QAAQ,EAAEvB,MAAM,CAAC2D,SAAP,CAAiBpC;EAFA,CAAhB,CAbS;EAiBtBT,cAAc,EAAEnB,SAAS,CAACmE,KAAV,CAAgB;IAC9BX,GAAG,EAAExD,SAAS,CAACiE,MAAV,CAAiBC,UADQ;IAE9BhB,KAAK,EAAElD,SAAS,CAACiE,MAAV,CAAiBC,UAFM;IAG9Bf,QAAQ,EAAEnD,SAAS,CAACiE,MAAV,CAAiBC,UAHG;IAI9BX,WAAW,EAAEvD,SAAS,CAACiE,MAAV,CAAiBC,UAJA;IAK9BhC,OAAO,EAAElC,SAAS,CAACyE;EALW,CAAhB,CAjBM;EAwBtB,cAAczE,SAAS,CAACiE;AAxBF,CAAxB;AA2BA,eAAenD,WAAf"}
|
|
@@ -46,6 +46,7 @@ declare namespace PlayerLoading {
|
|
|
46
46
|
disabled: PropTypes.Requireable<boolean>;
|
|
47
47
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
48
48
|
description: PropTypes.Requireable<string>;
|
|
49
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
49
50
|
modified: PropTypes.Requireable<boolean>;
|
|
50
51
|
titlePosition: PropTypes.Requireable<string>;
|
|
51
52
|
theme: PropTypes.Requireable<string>;
|
|
@@ -95,6 +95,7 @@ declare namespace SlidePlayer {
|
|
|
95
95
|
disabled: PropTypes.Requireable<boolean>;
|
|
96
96
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
97
97
|
description: PropTypes.Requireable<string>;
|
|
98
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
98
99
|
modified: PropTypes.Requireable<boolean>;
|
|
99
100
|
titlePosition: PropTypes.Requireable<string>;
|
|
100
101
|
theme: PropTypes.Requireable<string>;
|
|
@@ -146,6 +147,7 @@ declare namespace SlidePlayer {
|
|
|
146
147
|
disabled: PropTypes.Requireable<boolean>;
|
|
147
148
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
148
149
|
description: PropTypes.Requireable<string>;
|
|
150
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
149
151
|
modified: PropTypes.Requireable<boolean>;
|
|
150
152
|
titlePosition: PropTypes.Requireable<string>;
|
|
151
153
|
theme: PropTypes.Requireable<string>;
|
|
@@ -103,6 +103,7 @@ declare namespace SlidesPlayer {
|
|
|
103
103
|
disabled: PropTypes.Requireable<boolean>;
|
|
104
104
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
105
105
|
description: PropTypes.Requireable<string>;
|
|
106
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
106
107
|
modified: PropTypes.Requireable<boolean>;
|
|
107
108
|
titlePosition: PropTypes.Requireable<string>;
|
|
108
109
|
theme: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/template/app-player/player/slides/index.js"],"names":[],"mappings":";AAgZA,qEAkBC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/template/app-player/player/slides/index.js"],"names":[],"mappings":";AAgZA,qEAkBC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA1HD;;uBAUC;;;;;;;;;;;;;;;;;;;;;;;AAnOD;;;gBAaC;;;;;;;;;;;;;AAyDD;;;gBAAoF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAhHpF,oEAQC;;;;;;;;;AA6MD;;gBAiBC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA/GD,qEAaC"}
|
|
@@ -129,6 +129,7 @@ declare class PopinCorrection extends React.Component<any, any, any> {
|
|
|
129
129
|
disabled: PropTypes.Requireable<boolean>;
|
|
130
130
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
131
131
|
description: PropTypes.Requireable<string>;
|
|
132
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
132
133
|
modified: PropTypes.Requireable<boolean>;
|
|
133
134
|
titlePosition: PropTypes.Requireable<string>;
|
|
134
135
|
theme: 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"}
|
|
@@ -170,6 +170,7 @@ declare namespace PopinEnd {
|
|
|
170
170
|
disabled: PropTypes.Requireable<boolean>;
|
|
171
171
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
172
172
|
description: PropTypes.Requireable<string>;
|
|
173
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
173
174
|
modified: PropTypes.Requireable<boolean>;
|
|
174
175
|
titlePosition: PropTypes.Requireable<string>;
|
|
175
176
|
theme: PropTypes.Requireable<string>;
|
|
@@ -548,6 +548,7 @@ declare const AppReview: {
|
|
|
548
548
|
disabled: import("prop-types").Requireable<boolean>;
|
|
549
549
|
onChange: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
550
550
|
description: import("prop-types").Requireable<string>;
|
|
551
|
+
'aria-labelledby': import("prop-types").Requireable<string>;
|
|
551
552
|
modified: import("prop-types").Requireable<boolean>;
|
|
552
553
|
titlePosition: import("prop-types").Requireable<string>;
|
|
553
554
|
theme: 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"}
|
|
@@ -548,6 +548,7 @@ declare const propTypes: {
|
|
|
548
548
|
disabled: PropTypes.Requireable<boolean>;
|
|
549
549
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
550
550
|
description: PropTypes.Requireable<string>;
|
|
551
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
551
552
|
modified: PropTypes.Requireable<boolean>;
|
|
552
553
|
titlePosition: PropTypes.Requireable<string>;
|
|
553
554
|
theme: 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,8CAA8C,CAAC;AAEtD,OAA8B,EAAC,WAAW,EAAC,MAAM,uCAAuC,CAAC;AAEzF,OAA+B,EAC7B,gBAAgB,EACjB,MAAM,oDAAoD,CAAC;AAE5D,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKd,CAAC;AAEF,eAAe,SAAS,CAAC;AAEzB,oBAAY,iBAAiB,GAAG;IAC9B,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,gBAAgB,CAAC;IACxB,eAAe,CAAC,EAAE,mBAAmB,CAAC;IACtC,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAC/B,SAAS,CAAC,EAAE,YAAY,CAAC;CAC1B,CAAC"}
|
|
@@ -552,6 +552,7 @@ declare const propTypes: {
|
|
|
552
552
|
disabled: PropTypes.Requireable<boolean>;
|
|
553
553
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
554
554
|
description: PropTypes.Requireable<string>;
|
|
555
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
555
556
|
modified: PropTypes.Requireable<boolean>;
|
|
556
557
|
titlePosition: PropTypes.Requireable<string>;
|
|
557
558
|
theme: 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,CAAC,EAAE,iBAAiB,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAEF,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -188,6 +188,7 @@ declare namespace BrandUpdate {
|
|
|
188
188
|
disabled: PropTypes.Requireable<boolean>;
|
|
189
189
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
190
190
|
description: PropTypes.Requireable<string>;
|
|
191
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
191
192
|
modified: PropTypes.Requireable<boolean>;
|
|
192
193
|
titlePosition: PropTypes.Requireable<string>;
|
|
193
194
|
theme: PropTypes.Requireable<string>;
|
|
@@ -241,6 +242,7 @@ declare namespace BrandUpdate {
|
|
|
241
242
|
modified: PropTypes.Requireable<boolean>;
|
|
242
243
|
error: PropTypes.Requireable<boolean>;
|
|
243
244
|
'aria-label': PropTypes.Requireable<string>;
|
|
245
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
244
246
|
}> | PropTypes.InferProps<{
|
|
245
247
|
type: PropTypes.Requireable<string>;
|
|
246
248
|
title: PropTypes.Validator<string>;
|
|
@@ -320,6 +322,7 @@ declare namespace BrandUpdate {
|
|
|
320
322
|
disabled: PropTypes.Requireable<boolean>;
|
|
321
323
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
322
324
|
description: PropTypes.Requireable<string>;
|
|
325
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
323
326
|
modified: PropTypes.Requireable<boolean>;
|
|
324
327
|
titlePosition: PropTypes.Requireable<string>;
|
|
325
328
|
theme: PropTypes.Requireable<string>;
|
|
@@ -356,6 +359,7 @@ declare namespace BrandUpdate {
|
|
|
356
359
|
modified: PropTypes.Requireable<boolean>;
|
|
357
360
|
error: PropTypes.Requireable<boolean>;
|
|
358
361
|
'aria-label': PropTypes.Requireable<string>;
|
|
362
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
359
363
|
}> | PropTypes.InferProps<{
|
|
360
364
|
type: PropTypes.Requireable<string>;
|
|
361
365
|
title: PropTypes.Validator<string>;
|
|
@@ -460,6 +464,7 @@ declare namespace BrandUpdate {
|
|
|
460
464
|
disabled: PropTypes.Requireable<boolean>;
|
|
461
465
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
462
466
|
description: PropTypes.Requireable<string>;
|
|
467
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
463
468
|
modified: PropTypes.Requireable<boolean>;
|
|
464
469
|
titlePosition: PropTypes.Requireable<string>;
|
|
465
470
|
theme: PropTypes.Requireable<string>;
|
|
@@ -834,6 +839,7 @@ declare namespace BrandUpdate {
|
|
|
834
839
|
disabled: PropTypes.Requireable<boolean>;
|
|
835
840
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
836
841
|
description: PropTypes.Requireable<string>;
|
|
842
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
837
843
|
modified: PropTypes.Requireable<boolean>;
|
|
838
844
|
titlePosition: PropTypes.Requireable<string>;
|
|
839
845
|
theme: PropTypes.Requireable<string>;
|
|
@@ -887,6 +893,7 @@ declare namespace BrandUpdate {
|
|
|
887
893
|
modified: PropTypes.Requireable<boolean>;
|
|
888
894
|
error: PropTypes.Requireable<boolean>;
|
|
889
895
|
'aria-label': PropTypes.Requireable<string>;
|
|
896
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
890
897
|
}> | PropTypes.InferProps<{
|
|
891
898
|
type: PropTypes.Requireable<string>;
|
|
892
899
|
title: PropTypes.Validator<string>;
|
|
@@ -966,6 +973,7 @@ declare namespace BrandUpdate {
|
|
|
966
973
|
disabled: PropTypes.Requireable<boolean>;
|
|
967
974
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
968
975
|
description: PropTypes.Requireable<string>;
|
|
976
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
969
977
|
modified: PropTypes.Requireable<boolean>;
|
|
970
978
|
titlePosition: PropTypes.Requireable<string>;
|
|
971
979
|
theme: PropTypes.Requireable<string>;
|
|
@@ -1002,6 +1010,7 @@ declare namespace BrandUpdate {
|
|
|
1002
1010
|
modified: PropTypes.Requireable<boolean>;
|
|
1003
1011
|
error: PropTypes.Requireable<boolean>;
|
|
1004
1012
|
'aria-label': PropTypes.Requireable<string>;
|
|
1013
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
1005
1014
|
}> | PropTypes.InferProps<{
|
|
1006
1015
|
type: PropTypes.Requireable<string>;
|
|
1007
1016
|
title: PropTypes.Validator<string>;
|
|
@@ -1106,6 +1115,7 @@ declare namespace BrandUpdate {
|
|
|
1106
1115
|
disabled: PropTypes.Requireable<boolean>;
|
|
1107
1116
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
1108
1117
|
description: PropTypes.Requireable<string>;
|
|
1118
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
1109
1119
|
modified: PropTypes.Requireable<boolean>;
|
|
1110
1120
|
titlePosition: PropTypes.Requireable<string>;
|
|
1111
1121
|
theme: PropTypes.Requireable<string>;
|
|
@@ -1561,6 +1571,7 @@ declare namespace BrandUpdate {
|
|
|
1561
1571
|
disabled: PropTypes.Requireable<boolean>;
|
|
1562
1572
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
1563
1573
|
description: PropTypes.Requireable<string>;
|
|
1574
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
1564
1575
|
modified: PropTypes.Requireable<boolean>;
|
|
1565
1576
|
titlePosition: PropTypes.Requireable<string>;
|
|
1566
1577
|
theme: PropTypes.Requireable<string>;
|
|
@@ -47,6 +47,7 @@ declare namespace Dashboard {
|
|
|
47
47
|
disabled: PropTypes.Requireable<boolean>;
|
|
48
48
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
49
49
|
description: PropTypes.Requireable<string>;
|
|
50
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
50
51
|
modified: PropTypes.Requireable<boolean>;
|
|
51
52
|
titlePosition: PropTypes.Requireable<string>;
|
|
52
53
|
theme: PropTypes.Requireable<string>;
|
|
@@ -67,6 +67,7 @@ declare namespace SearchPage {
|
|
|
67
67
|
modified: PropTypes.Requireable<boolean>;
|
|
68
68
|
error: PropTypes.Requireable<boolean>;
|
|
69
69
|
'aria-label': PropTypes.Requireable<string>;
|
|
70
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
70
71
|
}>>;
|
|
71
72
|
onSearch: PropTypes.Requireable<(...args: any[]) => any>;
|
|
72
73
|
onToggleFilters: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -74,6 +75,7 @@ declare namespace SearchPage {
|
|
|
74
75
|
moreSortAriaLabel: PropTypes.Requireable<string>;
|
|
75
76
|
moreFilterAriaLabel: PropTypes.Requireable<string>;
|
|
76
77
|
filterGroupAriaLabel: PropTypes.Requireable<string>;
|
|
78
|
+
sortAriaLabel: PropTypes.Requireable<string>;
|
|
77
79
|
}>>;
|
|
78
80
|
const cards: PropTypes.Requireable<PropTypes.InferProps<{
|
|
79
81
|
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
@@ -111,6 +113,7 @@ declare namespace SearchPage {
|
|
|
111
113
|
const moreSortAriaLabel: PropTypes.Requireable<string>;
|
|
112
114
|
const moreFilterAriaLabel: PropTypes.Requireable<string>;
|
|
113
115
|
const filterGroupAriaLabel: PropTypes.Requireable<string>;
|
|
116
|
+
const sortAriaLabel: PropTypes.Requireable<string>;
|
|
114
117
|
}
|
|
115
118
|
}
|
|
116
119
|
import PropTypes from "prop-types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/common/search-page/index.js"],"names":[],"mappings":";AAUA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/common/search-page/index.js"],"names":[],"mappings":";AAUA,mEAsDC"}
|
|
@@ -22,7 +22,8 @@ const SearchPage = (props, context) => {
|
|
|
22
22
|
recommendations,
|
|
23
23
|
moreSortAriaLabel,
|
|
24
24
|
moreFilterAriaLabel,
|
|
25
|
-
filterGroupAriaLabel
|
|
25
|
+
filterGroupAriaLabel,
|
|
26
|
+
sortAriaLabel
|
|
26
27
|
} = props;
|
|
27
28
|
const {
|
|
28
29
|
skin
|
|
@@ -46,7 +47,8 @@ const SearchPage = (props, context) => {
|
|
|
46
47
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Filters, _extends({}, searchFilters, {
|
|
47
48
|
moreSortAriaLabel: moreSortAriaLabel,
|
|
48
49
|
moreFilterAriaLabel: moreFilterAriaLabel,
|
|
49
|
-
filterGroupAriaLabel: filterGroupAriaLabel
|
|
50
|
+
filterGroupAriaLabel: filterGroupAriaLabel,
|
|
51
|
+
sortAriaLabel: sortAriaLabel
|
|
50
52
|
})), /*#__PURE__*/React.createElement("div", {
|
|
51
53
|
"data-name": "searchResult",
|
|
52
54
|
className: style.cardsWrapper
|
|
@@ -68,7 +70,8 @@ SearchPage.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
68
70
|
recommendations: PropTypes.shape(CardsList.propTypes),
|
|
69
71
|
moreSortAriaLabel: PropTypes.string,
|
|
70
72
|
moreFilterAriaLabel: PropTypes.string,
|
|
71
|
-
filterGroupAriaLabel: PropTypes.string
|
|
73
|
+
filterGroupAriaLabel: PropTypes.string,
|
|
74
|
+
sortAriaLabel: PropTypes.string
|
|
72
75
|
} : {};
|
|
73
76
|
export default SearchPage;
|
|
74
77
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","Provider","Button","Filters","CardsGrid","CardsList","style","SearchPage","props","context","title","searchFilters","cards","noresultsfound","clearFilters","recommendations","moreSortAriaLabel","moreFilterAriaLabel","filterGroupAriaLabel","skin","defaultColor","recommendationsView","cardsView","list","noresults","noresultstxt","clear","background","cardsWrapper","contextTypes","childContextTypes","propTypes","string","shape"],"sources":["../../../../src/template/common/search-page/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, isEmpty} from 'lodash/fp';\nimport Provider from '../../../atom/provider';\nimport Button from '../../../atom/button';\nimport Filters from '../../../molecule/filters';\nimport CardsGrid from '../../../organism/cards-grid';\nimport CardsList from '../../../molecule/dashboard/cards-list';\nimport style from './style.css';\n\nconst SearchPage = (props, context) => {\n const {\n title,\n searchFilters,\n cards,\n noresultsfound,\n clearFilters,\n recommendations,\n moreSortAriaLabel,\n moreFilterAriaLabel,\n filterGroupAriaLabel\n } = props;\n\n const {skin} = context;\n const defaultColor = getOr('#00B0FF', 'common.primary', skin);\n\n const recommendationsView = isEmpty(recommendations) ? null : <CardsList {...recommendations} />;\n\n const cardsView = isEmpty(cards.list) ? (\n <div>\n <div className={style.noresults}>\n <div className={style.noresultstxt}>{noresultsfound}</div>\n <Button\n {...clearFilters}\n data-name=\"searchPageClear\"\n className={style.clear}\n style={{background: defaultColor}}\n type=\"link\"\n />\n </div>\n {recommendationsView}\n </div>\n ) : (\n <CardsGrid {...cards} />\n );\n\n return (\n <div>\n <Filters\n {...searchFilters}\n moreSortAriaLabel={moreSortAriaLabel}\n moreFilterAriaLabel={moreFilterAriaLabel}\n filterGroupAriaLabel={filterGroupAriaLabel}\n />\n <div data-name=\"searchResult\" className={style.cardsWrapper}>\n <div className={style.title} role=\"status\">\n {title}\n </div>\n {cardsView}\n </div>\n </div>\n );\n};\n\nSearchPage.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSearchPage.propTypes = {\n noresultsfound: PropTypes.string,\n title: PropTypes.string,\n searchFilters: PropTypes.shape(Filters.propTypes),\n cards: PropTypes.shape(CardsGrid.propTypes),\n clearFilters: PropTypes.shape(Button.propTypes),\n recommendations: PropTypes.shape(CardsList.propTypes),\n moreSortAriaLabel: PropTypes.string,\n moreFilterAriaLabel: PropTypes.string,\n filterGroupAriaLabel: PropTypes.string\n};\n\nexport default SearchPage;\n"],"mappings":";;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,QAAP,MAAqB,wBAArB;AACA,OAAOC,MAAP,MAAmB,sBAAnB;AACA,OAAOC,OAAP,MAAoB,2BAApB;AACA,OAAOC,SAAP,MAAsB,8BAAtB;AACA,OAAOC,SAAP,MAAsB,wCAAtB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,UAAU,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACrC,MAAM;IACJC,KADI;IAEJC,aAFI;IAGJC,KAHI;IAIJC,cAJI;IAKJC,YALI;IAMJC,eANI;IAOJC,iBAPI;IAQJC,mBARI;IASJC;
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","Provider","Button","Filters","CardsGrid","CardsList","style","SearchPage","props","context","title","searchFilters","cards","noresultsfound","clearFilters","recommendations","moreSortAriaLabel","moreFilterAriaLabel","filterGroupAriaLabel","sortAriaLabel","skin","defaultColor","recommendationsView","cardsView","list","noresults","noresultstxt","clear","background","cardsWrapper","contextTypes","childContextTypes","propTypes","string","shape"],"sources":["../../../../src/template/common/search-page/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, isEmpty} from 'lodash/fp';\nimport Provider from '../../../atom/provider';\nimport Button from '../../../atom/button';\nimport Filters from '../../../molecule/filters';\nimport CardsGrid from '../../../organism/cards-grid';\nimport CardsList from '../../../molecule/dashboard/cards-list';\nimport style from './style.css';\n\nconst SearchPage = (props, context) => {\n const {\n title,\n searchFilters,\n cards,\n noresultsfound,\n clearFilters,\n recommendations,\n moreSortAriaLabel,\n moreFilterAriaLabel,\n filterGroupAriaLabel,\n sortAriaLabel\n } = props;\n\n const {skin} = context;\n const defaultColor = getOr('#00B0FF', 'common.primary', skin);\n\n const recommendationsView = isEmpty(recommendations) ? null : <CardsList {...recommendations} />;\n\n const cardsView = isEmpty(cards.list) ? (\n <div>\n <div className={style.noresults}>\n <div className={style.noresultstxt}>{noresultsfound}</div>\n <Button\n {...clearFilters}\n data-name=\"searchPageClear\"\n className={style.clear}\n style={{background: defaultColor}}\n type=\"link\"\n />\n </div>\n {recommendationsView}\n </div>\n ) : (\n <CardsGrid {...cards} />\n );\n\n return (\n <div>\n <Filters\n {...searchFilters}\n moreSortAriaLabel={moreSortAriaLabel}\n moreFilterAriaLabel={moreFilterAriaLabel}\n filterGroupAriaLabel={filterGroupAriaLabel}\n sortAriaLabel={sortAriaLabel}\n />\n <div data-name=\"searchResult\" className={style.cardsWrapper}>\n <div className={style.title} role=\"status\">\n {title}\n </div>\n {cardsView}\n </div>\n </div>\n );\n};\n\nSearchPage.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSearchPage.propTypes = {\n noresultsfound: PropTypes.string,\n title: PropTypes.string,\n searchFilters: PropTypes.shape(Filters.propTypes),\n cards: PropTypes.shape(CardsGrid.propTypes),\n clearFilters: PropTypes.shape(Button.propTypes),\n recommendations: PropTypes.shape(CardsList.propTypes),\n moreSortAriaLabel: PropTypes.string,\n moreFilterAriaLabel: PropTypes.string,\n filterGroupAriaLabel: PropTypes.string,\n sortAriaLabel: PropTypes.string\n};\n\nexport default SearchPage;\n"],"mappings":";;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAE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K,CAACuB;EAA/C,gBACE;IAAK,SAAS,EAAEvB,KAAK,CAACI,KAAtB;IAA6B,IAAI,EAAC;EAAlC,GACGA,KADH,CADF,EAIGa,SAJH,CARF,CADF;AAiBD,CAtDD;;AAwDAhB,UAAU,CAACuB,YAAX,GAA0B;EACxBV,IAAI,EAAEnB,QAAQ,CAAC8B,iBAAT,CAA2BX;AADT,CAA1B;AAIAb,UAAU,CAACyB,SAAX,2CAAuB;EACrBnB,cAAc,EAAEb,SAAS,CAACiC,MADL;EAErBvB,KAAK,EAAEV,SAAS,CAACiC,MAFI;EAGrBtB,aAAa,EAAEX,SAAS,CAACkC,KAAV,CAAgB/B,OAAO,CAAC6B,SAAxB,CAHM;EAIrBpB,KAAK,EAAEZ,SAAS,CAACkC,KAAV,CAAgB9B,SAAS,CAAC4B,SAA1B,CAJc;EAKrBlB,YAAY,EAAEd,SAAS,CAACkC,KAAV,CAAgBhC,MAAM,CAAC8B,SAAvB,CALO;EAMrBjB,eAAe,EAAEf,SAAS,CAACkC,KAAV,CAAgB7B,SAAS,CAAC2B,SAA1B,CANI;EAOrBhB,iBAAiB,EAAEhB,SAAS,CAACiC,MAPR;EAQrBhB,mBAAmB,EAAEjB,SAAS,CAACiC,MARV;EASrBf,oBAAoB,EAAElB,SAAS,CAACiC,MATX;EAUrBd,aAAa,EAAEnB,SAAS,CAACiC;AAVJ,CAAvB;AAaA,eAAe1B,UAAf"}
|
|
@@ -13,8 +13,6 @@ declare namespace TeamsDashboard {
|
|
|
13
13
|
href: PropTypes.Requireable<string>;
|
|
14
14
|
'aria-label': PropTypes.Requireable<string>;
|
|
15
15
|
'button-aria-label': PropTypes.Requireable<string>;
|
|
16
|
-
toolTipText: PropTypes.Requireable<string>;
|
|
17
|
-
closeToolTipInformationTextAriaLabel: PropTypes.Requireable<string>;
|
|
18
16
|
}>>;
|
|
19
17
|
const platformLinks: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
20
18
|
submitValue: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-search/index.js"],"names":[],"mappings":";AAYA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-search/index.js"],"names":[],"mappings":";AAYA,iDAgDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Search","props","value","placeholder","onChange","onClear","onFocus","onBlur","theme","handleChange","useMemo","e","target","cmStyle","classnames","style","coorpmanager","isDefaultTheme","wrapperSearch","searchIcon","title","noValue","search","clearIcon","contextTypes","skin","Provider","childContextTypes","propTypes","PropTypes","string","isRequired","func","oneOf"],"sources":["../../../src/atom/input-search/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {\n NovaCompositionCoorpacademySearchThin as CMSearchIcon,\n NovaCompositionCoorpacademySearch as SearchIcon,\n NovaSolidStatusClose as CloseIcon\n} from '@coorpacademy/nova-icons';\nimport {noop, isEmpty} from 'lodash/fp';\nimport Provider from '../provider';\nimport style from './style.css';\n\nconst Search = props => {\n const {\n value,\n placeholder,\n onChange = noop,\n onClear = noop,\n onFocus,\n onBlur,\n theme = 'default'\n } = props;\n const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);\n const cmStyle = classnames(style.coorpmanager);\n const isDefaultTheme = theme === 'default';\n\n return (\n <div className={isDefaultTheme ? style.wrapperSearch : cmStyle}>\n <label htmlFor=\"search\" title={placeholder}>\n {!isDefaultTheme ? (\n <CMSearchIcon className={style.searchIcon} />\n ) : (\n <SearchIcon className={style.searchIcon} />\n )}\n {!isDefaultTheme ? (\n <span className={classnames(style.title, isEmpty(value) && style.noValue)}>\n {placeholder}\n </span>\n ) : null}\n </label>\n <input\n data-name=\"search-input\"\n className={style.search}\n aria-label={placeholder}\n type=\"text\"\n name=\"search\"\n id=\"search\"\n placeholder={placeholder}\n value={value}\n onInput={handleChange}\n onFocus={onFocus}\n onChange={noop}\n onBlur={onBlur}\n />\n {value && !isDefaultTheme ? (\n <CloseIcon onClick={onClear} className={style.clearIcon} />\n ) : null}\n </div>\n );\n};\n\nSearch.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSearch.propTypes = {\n value: PropTypes.string,\n placeholder: PropTypes.string.isRequired,\n onChange: PropTypes.func,\n onClear: PropTypes.func,\n onFocus: PropTypes.func,\n onBlur: PropTypes.func,\n theme: PropTypes.oneOf(['default', 'coorpmanager'])\n};\n\nexport default Search;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAMA;;AACA;;;;;;;;AAEA,MAAMA,MAAM,GAAGC,KAAK,IAAI;EACtB,MAAM;IACJC,KADI;IAEJC,WAFI;IAGJC,QAAQ,iBAHJ;IAIJC,OAAO,iBAJH;IAKJC,OALI;IAMJC,MANI;IAOJC,KAAK,GAAG;EAPJ,IAQFP,KARJ;EASA,MAAMQ,YAAY,GAAG,IAAAC,cAAA,EAAQ,MAAMC,CAAC,IAAIP,QAAQ,CAACO,CAAC,CAACC,MAAF,CAASV,KAAV,CAA3B,EAA6C,CAACE,QAAD,CAA7C,CAArB;EACA,MAAMS,OAAO,GAAG,IAAAC,mBAAA,EAAWC,cAAA,CAAMC,YAAjB,CAAhB;EACA,MAAMC,cAAc,GAAGT,KAAK,KAAK,SAAjC;EAEA,oBACE;IAAK,SAAS,EAAES,cAAc,GAAGF,cAAA,CAAMG,aAAT,GAAyBL;EAAvD,gBACE;IAAO,OAAO,EAAC,QAAf;IAAwB,KAAK,EAAEV;EAA/B,GACG,CAACc,cAAD,gBACC,6BAAC,gDAAD;IAAc,SAAS,EAAEF,cAAA,CAAMI;EAA/B,EADD,gBAGC,6BAAC,4CAAD;IAAY,SAAS,EAAEJ,cAAA,CAAMI;EAA7B,EAJJ,EAMG,CAACF,cAAD,gBACC;IAAM,SAAS,EAAE,IAAAH,mBAAA,EAAWC,cAAA,CAAMK,KAAjB,EAAwB,uBAAQlB,KAAR,KAAkBa,cAAA,CAAMM,OAAhD;EAAjB,GACGlB,WADH,CADD,GAIG,IAVN,CADF,eAaE;IACE,aAAU,cADZ;IAEE,SAAS,EAAEY,cAAA,CAAMO,MAFnB;IAGE,cAAYnB,WAHd;IAIE,IAAI,EAAC,MAJP;IAKE,IAAI,EAAC,QALP;IAME,EAAE,EAAC,QANL;IAOE,WAAW,EAAEA,WAPf;IAQE,KAAK,
|
|
1
|
+
{"version":3,"file":"index.js","names":["Search","props","value","placeholder","onChange","onClear","onFocus","onBlur","theme","handleChange","useMemo","e","target","cmStyle","classnames","style","coorpmanager","isDefaultTheme","wrapperSearch","searchIcon","title","noValue","search","clearIcon","contextTypes","skin","Provider","childContextTypes","propTypes","PropTypes","string","isRequired","func","oneOf"],"sources":["../../../src/atom/input-search/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {\n NovaCompositionCoorpacademySearchThin as CMSearchIcon,\n NovaCompositionCoorpacademySearch as SearchIcon,\n NovaSolidStatusClose as CloseIcon\n} from '@coorpacademy/nova-icons';\nimport {noop, isEmpty} from 'lodash/fp';\nimport Provider from '../provider';\nimport style from './style.css';\n\nconst Search = props => {\n const {\n value,\n placeholder,\n onChange = noop,\n onClear = noop,\n onFocus,\n onBlur,\n theme = 'default'\n } = props;\n const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);\n const cmStyle = classnames(style.coorpmanager);\n const isDefaultTheme = theme === 'default';\n\n return (\n <div className={isDefaultTheme ? style.wrapperSearch : cmStyle}>\n <label htmlFor=\"search\" title={placeholder}>\n {!isDefaultTheme ? (\n <CMSearchIcon className={style.searchIcon} />\n ) : (\n <SearchIcon className={style.searchIcon} />\n )}\n {!isDefaultTheme ? (\n <span className={classnames(style.title, isEmpty(value) && style.noValue)}>\n {placeholder}\n </span>\n ) : null}\n </label>\n <input\n data-name=\"search-input\"\n className={style.search}\n aria-label={placeholder}\n type=\"text\"\n name=\"search\"\n id=\"search\"\n placeholder={placeholder}\n title={placeholder}\n value={value}\n onInput={handleChange}\n onFocus={onFocus}\n onChange={noop}\n onBlur={onBlur}\n />\n {value && !isDefaultTheme ? (\n <CloseIcon onClick={onClear} className={style.clearIcon} />\n ) : null}\n </div>\n );\n};\n\nSearch.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSearch.propTypes = {\n value: PropTypes.string,\n placeholder: PropTypes.string.isRequired,\n onChange: PropTypes.func,\n onClear: PropTypes.func,\n onFocus: PropTypes.func,\n onBlur: PropTypes.func,\n theme: PropTypes.oneOf(['default', 'coorpmanager'])\n};\n\nexport default Search;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAMA;;AACA;;;;;;;;AAEA,MAAMA,MAAM,GAAGC,KAAK,IAAI;EACtB,MAAM;IACJC,KADI;IAEJC,WAFI;IAGJC,QAAQ,iBAHJ;IAIJC,OAAO,iBAJH;IAKJC,OALI;IAMJC,MANI;IAOJC,KAAK,GAAG;EAPJ,IAQFP,KARJ;EASA,MAAMQ,YAAY,GAAG,IAAAC,cAAA,EAAQ,MAAMC,CAAC,IAAIP,QAAQ,CAACO,CAAC,CAACC,MAAF,CAASV,KAAV,CAA3B,EAA6C,CAACE,QAAD,CAA7C,CAArB;EACA,MAAMS,OAAO,GAAG,IAAAC,mBAAA,EAAWC,cAAA,CAAMC,YAAjB,CAAhB;EACA,MAAMC,cAAc,GAAGT,KAAK,KAAK,SAAjC;EAEA,oBACE;IAAK,SAAS,EAAES,cAAc,GAAGF,cAAA,CAAMG,aAAT,GAAyBL;EAAvD,gBACE;IAAO,OAAO,EAAC,QAAf;IAAwB,KAAK,EAAEV;EAA/B,GACG,CAACc,cAAD,gBACC,6BAAC,gDAAD;IAAc,SAAS,EAAEF,cAAA,CAAMI;EAA/B,EADD,gBAGC,6BAAC,4CAAD;IAAY,SAAS,EAAEJ,cAAA,CAAMI;EAA7B,EAJJ,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9
|
disabled: PropTypes.Requireable<boolean>;
|
|
10
10
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
11
11
|
description: PropTypes.Requireable<string>;
|
|
12
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
12
13
|
modified: PropTypes.Requireable<boolean>;
|
|
13
14
|
titlePosition: PropTypes.Requireable<string>;
|
|
14
15
|
theme: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-switch/index.js"],"names":[],"mappings":";AAMA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-switch/index.js"],"names":[],"mappings":";AAMA,sDA8EC"}
|
|
@@ -21,6 +21,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
24
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
|
+
|
|
24
26
|
const InputSwitch = props => {
|
|
25
27
|
const {
|
|
26
28
|
title,
|
|
@@ -35,14 +37,17 @@ const InputSwitch = props => {
|
|
|
35
37
|
titlePosition = 'left',
|
|
36
38
|
details = '',
|
|
37
39
|
requiredSelection = false,
|
|
38
|
-
'data-name': dataName
|
|
40
|
+
'data-name': dataName,
|
|
41
|
+
'aria-labelledby': ariaLabelledBy
|
|
39
42
|
} = props;
|
|
40
43
|
const idSwitch = id || (0, _uniqueId2.default)('input-switch-');
|
|
41
44
|
const isDisabled = disabled ? 'disabled' : '';
|
|
42
45
|
const handleChange = (0, _react.useMemo)(() => e => onChange(e.target.checked), [onChange]);
|
|
43
|
-
const titleView = title ? /*#__PURE__*/_react.default.createElement("
|
|
46
|
+
const titleView = title ? /*#__PURE__*/_react.default.createElement("div", {
|
|
47
|
+
id: `title-view-${dataName}`
|
|
48
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
44
49
|
className: _style.default.title
|
|
45
|
-
}, `${title}
|
|
50
|
+
}, `${title} `, " ")) : null;
|
|
46
51
|
const descriptionView = description ? /*#__PURE__*/_react.default.createElement("div", {
|
|
47
52
|
className: _style.default.description
|
|
48
53
|
}, description) : null;
|
|
@@ -77,13 +82,17 @@ const InputSwitch = props => {
|
|
|
77
82
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
78
83
|
className: className,
|
|
79
84
|
"data-name": `switch-input-${theme}${dataName}`
|
|
80
|
-
}, titlePosition === 'left' ?
|
|
81
|
-
|
|
82
|
-
}
|
|
85
|
+
}, titlePosition === 'left' ? {
|
|
86
|
+
titleView
|
|
87
|
+
} : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
83
88
|
className: requiredSelection ? _style.default.requiredSelection : null
|
|
84
89
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
85
90
|
className: _style.default.btnSwitchContainer
|
|
86
|
-
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
91
|
+
}, /*#__PURE__*/_react.default.createElement("input", _extends({}, ariaLabelledBy ? {
|
|
92
|
+
'aria-labelledby': ariaLabelledBy
|
|
93
|
+
} : {}, title && !ariaLabelledBy ? {
|
|
94
|
+
'aria-labelledby': `title-view-${dataName}`
|
|
95
|
+
} : {}, {
|
|
87
96
|
type: "checkbox",
|
|
88
97
|
id: idSwitch,
|
|
89
98
|
name: name,
|
|
@@ -91,15 +100,15 @@ const InputSwitch = props => {
|
|
|
91
100
|
checked: value,
|
|
92
101
|
disabled: isDisabled,
|
|
93
102
|
className: _style.default.checkbox,
|
|
94
|
-
"aria-labelledby":
|
|
95
|
-
}), /*#__PURE__*/_react.default.createElement("label", {
|
|
103
|
+
"aria-labelledby": ariaLabelledBy
|
|
104
|
+
})), /*#__PURE__*/_react.default.createElement("label", {
|
|
96
105
|
htmlFor: idSwitch,
|
|
97
106
|
"data-name": "input-switch-label"
|
|
98
107
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
99
108
|
className: !details ? _style.default.alignedTextContainer : null
|
|
100
|
-
}, titlePosition === 'right' ?
|
|
101
|
-
|
|
102
|
-
}
|
|
109
|
+
}, titlePosition === 'right' ? {
|
|
110
|
+
titleView
|
|
111
|
+
} : null, details ? /*#__PURE__*/_react.default.createElement("div", {
|
|
103
112
|
className: _style.default.detailsTxt
|
|
104
113
|
}, details) : null), descriptionView);
|
|
105
114
|
};
|
|
@@ -112,6 +121,7 @@ InputSwitch.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
112
121
|
disabled: _propTypes.default.bool,
|
|
113
122
|
onChange: _propTypes.default.func,
|
|
114
123
|
description: _propTypes.default.string,
|
|
124
|
+
'aria-labelledby': _propTypes.default.string,
|
|
115
125
|
modified: _propTypes.default.bool,
|
|
116
126
|
titlePosition: _propTypes.default.oneOf(['right', 'left']),
|
|
117
127
|
theme: _propTypes.default.oneOf(['default', 'coorpmanager', 'mooc']),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["InputSwitch","props","title","name","id","value","disabled","onChange","description","modified","theme","titlePosition","details","requiredSelection","dataName","idSwitch","isDisabled","handleChange","useMemo","e","target","checked","titleView","style","descriptionView","getClass","defaultClass","coorpmanager","modifiedClass","coorpmanagerModified","partielUncheck","default","className","getClassState","btnSwitchContainer","checkbox","alignedTextContainer","detailsTxt","propTypes","PropTypes","string","bool","func","oneOf"],"sources":["../../../src/atom/input-switch/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, uniqueId} from 'lodash/fp';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst InputSwitch = props => {\n const {\n title,\n name,\n id,\n value,\n disabled,\n onChange = noop,\n description,\n modified = false,\n theme = 'default',\n titlePosition = 'left',\n details = '',\n requiredSelection = false,\n 'data-name': dataName\n } = props;\n\n const idSwitch = id || uniqueId('input-switch-');\n const isDisabled = disabled ? 'disabled' : '';\n const handleChange = useMemo(() => e => onChange(e.target.checked), [onChange]);\n\n const titleView = title ? <span className={style.title}>{`${title} `}</span
|
|
1
|
+
{"version":3,"file":"index.js","names":["InputSwitch","props","title","name","id","value","disabled","onChange","description","modified","theme","titlePosition","details","requiredSelection","dataName","ariaLabelledBy","idSwitch","isDisabled","handleChange","useMemo","e","target","checked","titleView","style","descriptionView","getClass","defaultClass","coorpmanager","modifiedClass","coorpmanagerModified","partielUncheck","default","className","getClassState","btnSwitchContainer","checkbox","alignedTextContainer","detailsTxt","propTypes","PropTypes","string","bool","func","oneOf"],"sources":["../../../src/atom/input-switch/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, uniqueId} from 'lodash/fp';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst InputSwitch = props => {\n const {\n title,\n name,\n id,\n value,\n disabled,\n onChange = noop,\n description,\n modified = false,\n theme = 'default',\n titlePosition = 'left',\n details = '',\n requiredSelection = false,\n 'data-name': dataName,\n 'aria-labelledby': ariaLabelledBy\n } = props;\n\n const idSwitch = id || uniqueId('input-switch-');\n const isDisabled = disabled ? 'disabled' : '';\n const handleChange = useMemo(() => e => onChange(e.target.checked), [onChange]);\n\n const titleView = title ? (\n <div id={`title-view-${dataName}`}>\n <span className={style.title}>{`${title} `} </span>\n </div>\n ) : null;\n\n const descriptionView = description ? (\n <div className={style.description}>{description}</div>\n ) : null;\n\n const getClass = () => {\n switch (theme) {\n case 'coorpmanager':\n return {\n defaultClass: style.coorpmanager,\n modifiedClass: style.coorpmanagerModified\n };\n case 'mooc':\n return {\n defaultClass: style.partielUncheck,\n modifiedClass: style.coorpmanagerModified\n };\n default:\n return {defaultClass: style.default, modifiedClass: style.modified};\n }\n };\n const {defaultClass, modifiedClass} = getClass();\n const className = getClassState(defaultClass, modifiedClass, null, modified);\n\n return (\n <div className={className} data-name={`switch-input-${theme}${dataName}`}>\n {titlePosition === 'left' ? {titleView} : null}\n <div className={requiredSelection ? style.requiredSelection : null}>\n <div className={style.btnSwitchContainer}>\n <input\n {...(ariaLabelledBy ? {'aria-labelledby': ariaLabelledBy} : {})}\n {...(title && !ariaLabelledBy ? {'aria-labelledby': `title-view-${dataName}`} : {})}\n type=\"checkbox\"\n id={idSwitch}\n name={name}\n onChange={handleChange}\n checked={value}\n disabled={isDisabled}\n className={style.checkbox}\n aria-labelledby={ariaLabelledBy}\n />\n <label htmlFor={idSwitch} data-name=\"input-switch-label\" />\n </div>\n </div>\n <div className={!details ? style.alignedTextContainer : null}>\n {titlePosition === 'right' ? {titleView} : null}\n {details ? <div className={style.detailsTxt}>{details}</div> : null}\n </div>\n {descriptionView}\n </div>\n );\n};\n\nInputSwitch.propTypes = {\n title: PropTypes.string,\n name: PropTypes.string,\n id: PropTypes.string,\n value: PropTypes.bool,\n disabled: PropTypes.bool,\n onChange: PropTypes.func,\n description: PropTypes.string,\n 'aria-labelledby': PropTypes.string,\n modified: PropTypes.bool,\n titlePosition: PropTypes.oneOf(['right', 'left']),\n theme: PropTypes.oneOf(['default', 'coorpmanager', 'mooc']),\n details: PropTypes.string,\n 'data-name': PropTypes.string,\n requiredSelection: PropTypes.bool\n};\nexport default InputSwitch;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;;;AAEA,MAAMA,WAAW,GAAGC,KAAK,IAAI;EAC3B,MAAM;IACJC,KADI;IAEJC,IAFI;IAGJC,EAHI;IAIJC,KAJI;IAKJC,QALI;IAMJC,QAAQ,iBANJ;IAOJC,WAPI;IAQJC,QAAQ,GAAG,KARP;IASJC,KAAK,GAAG,SATJ;IAUJC,aAAa,GAAG,MAVZ;IAWJC,OAAO,GAAG,EAXN;IAYJC,iBAAiB,GAAG,KAZhB;IAaJ,aA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EAMtBnC,QAAQ,EAAEiC,kBAAA,CAAUG,IANE;EAOtBnC,WAAW,EAAEgC,kBAAA,CAAUC,MAPD;EAQtB,mBAAmBD,kBAAA,CAAUC,MARP;EAStBhC,QAAQ,EAAE+B,kBAAA,CAAUE,IATE;EAUtB/B,aAAa,EAAE6B,kBAAA,CAAUI,KAAV,CAAgB,CAAC,OAAD,EAAU,MAAV,CAAhB,CAVO;EAWtBlC,KAAK,EAAE8B,kBAAA,CAAUI,KAAV,CAAgB,CAAC,SAAD,EAAY,cAAZ,EAA4B,MAA5B,CAAhB,CAXe;EAYtBhC,OAAO,EAAE4B,kBAAA,CAAUC,MAZG;EAatB,aAAaD,kBAAA,CAAUC,MAbD;EActB5B,iBAAiB,EAAE2B,kBAAA,CAAUE;AAdP,CAAxB;eAgBe1C,W"}
|
|
@@ -69,6 +69,7 @@ declare namespace Select {
|
|
|
69
69
|
modified: PropTypes.Requireable<boolean>;
|
|
70
70
|
error: PropTypes.Requireable<boolean>;
|
|
71
71
|
'aria-label': PropTypes.Requireable<string>;
|
|
72
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
72
73
|
};
|
|
73
74
|
}
|
|
74
75
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/select/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/select/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAuDA,qEAwLC"}
|