@coorpacademy/components 11.11.1-alpha.0 → 11.11.2
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 +2 -0
- package/es/atom/input-switch/index.d.ts.map +1 -1
- package/es/atom/input-switch/index.js +23 -11
- 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/atom/tooltip/index.d.ts +1 -3
- package/es/atom/tooltip/index.d.ts.map +1 -1
- package/es/atom/tooltip/index.js +7 -17
- package/es/atom/tooltip/index.js.map +1 -1
- package/es/atom/tooltip/style.css +2 -10
- package/es/globals.d.js.map +1 -1
- package/es/molecule/brand-form-group/index.d.ts +8 -0
- package/es/molecule/cm-popin/types.d.ts +2 -0
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/draggable-list/index.d.ts +2 -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 +2 -0
- package/es/molecule/setup-section/index.d.ts.map +1 -1
- package/es/molecule/setup-sections/index.d.ts +2 -0
- package/es/molecule/setup-slide/index.d.ts +3 -0
- package/es/molecule/setup-slider/index.d.ts +3 -0
- package/es/molecule/video-player-mobile/index.native.d.ts +1 -1
- package/es/molecule/video-player-mobile/index.native.d.ts.map +1 -1
- package/es/molecule/video-player-mobile/index.native.js +26 -9
- package/es/molecule/video-player-mobile/index.native.js.map +1 -1
- package/es/organism/brand-form/index.d.ts +8 -0
- package/es/organism/mooc-header/index.d.ts.map +1 -1
- package/es/organism/mooc-header/index.js +4 -1
- package/es/organism/mooc-header/index.js.map +1 -1
- package/es/organism/review-slide/index.native.d.ts.map +1 -1
- package/es/organism/review-slide/index.native.js +32 -15
- package/es/organism/review-slide/index.native.js.map +1 -1
- package/es/organism/user-preferences/index.d.ts +2 -0
- package/es/organism/wizard-contents/index.d.ts +8 -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 +2 -0
- package/es/template/app-player/player/index.d.ts +4 -0
- package/es/template/app-player/player/slides/index.d.ts +2 -0
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +2 -0
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +2 -0
- package/es/template/app-review/index.d.ts +2 -0
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +2 -0
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +2 -0
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +18 -0
- package/es/template/common/dashboard/index.d.ts +2 -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/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 +2 -0
- package/lib/atom/input-switch/index.d.ts.map +1 -1
- package/lib/atom/input-switch/index.js +22 -11
- 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/atom/tooltip/index.d.ts +1 -3
- package/lib/atom/tooltip/index.d.ts.map +1 -1
- package/lib/atom/tooltip/index.js +7 -18
- package/lib/atom/tooltip/index.js.map +1 -1
- package/lib/atom/tooltip/style.css +2 -10
- package/lib/globals.d.js.map +1 -1
- package/lib/molecule/brand-form-group/index.d.ts +8 -0
- package/lib/molecule/cm-popin/types.d.ts +2 -0
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/draggable-list/index.d.ts +2 -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 +2 -0
- package/lib/molecule/setup-section/index.d.ts.map +1 -1
- package/lib/molecule/setup-sections/index.d.ts +2 -0
- package/lib/molecule/setup-slide/index.d.ts +3 -0
- package/lib/molecule/setup-slider/index.d.ts +3 -0
- package/lib/molecule/video-player-mobile/index.native.d.ts +1 -1
- package/lib/molecule/video-player-mobile/index.native.d.ts.map +1 -1
- package/lib/molecule/video-player-mobile/index.native.js +29 -9
- package/lib/molecule/video-player-mobile/index.native.js.map +1 -1
- package/lib/organism/brand-form/index.d.ts +8 -0
- package/lib/organism/mooc-header/index.d.ts.map +1 -1
- package/lib/organism/mooc-header/index.js +4 -1
- package/lib/organism/mooc-header/index.js.map +1 -1
- package/lib/organism/review-slide/index.native.d.ts.map +1 -1
- package/lib/organism/review-slide/index.native.js +31 -13
- package/lib/organism/review-slide/index.native.js.map +1 -1
- package/lib/organism/user-preferences/index.d.ts +2 -0
- package/lib/organism/wizard-contents/index.d.ts +8 -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 +2 -0
- package/lib/template/app-player/player/index.d.ts +4 -0
- package/lib/template/app-player/player/slides/index.d.ts +2 -0
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +2 -0
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +2 -0
- package/lib/template/app-review/index.d.ts +2 -0
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +2 -0
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +2 -0
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +18 -0
- package/lib/template/common/dashboard/index.d.ts +2 -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/locales/.mtslconfig.json +1 -0
- package/package.json +4 -2
- package/es/atom/battle-opponent/index.d.ts +0 -19
- package/es/atom/battle-opponent/index.d.ts.map +0 -1
- package/es/atom/battle-opponent/index.js +0 -52
- package/es/atom/battle-opponent/index.js.map +0 -1
- package/es/atom/battle-opponent/prop-types.d.ts +0 -19
- package/es/atom/battle-opponent/prop-types.d.ts.map +0 -1
- package/es/atom/battle-opponent/prop-types.js +0 -11
- package/es/atom/battle-opponent/prop-types.js.map +0 -1
- package/es/atom/battle-opponent/style.css +0 -126
- package/lib/atom/battle-opponent/index.d.ts +0 -19
- package/lib/atom/battle-opponent/index.d.ts.map +0 -1
- package/lib/atom/battle-opponent/index.js +0 -70
- package/lib/atom/battle-opponent/index.js.map +0 -1
- package/lib/atom/battle-opponent/prop-types.d.ts +0 -19
- package/lib/atom/battle-opponent/prop-types.d.ts.map +0 -1
- package/lib/atom/battle-opponent/prop-types.js +0 -20
- package/lib/atom/battle-opponent/prop-types.js.map +0 -1
- package/lib/atom/battle-opponent/style.css +0 -126
|
@@ -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","translate","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 translate: Provider.childContextTypes.translate\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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AAoB5D,eAAe,CAACyD,SAApC;IAA+CxB,GAAG,EAAExC,SAAS,CAACiE,MAAV,CAAiBC;EAArE,GADY,CAVQ;EAatB1C,WAAW,EAAExB,SAAS,CAACmE,KAAV,CAAgB;IAC3BvB,OAAO,EAAEvC,MAAM,CAAC2D,SAAP,CAAiBpB,OAAjB,CAAyBsB,UADP;IAE3BvC,QAAQ,EAAEtB,MAAM,CAAC2D,SAAP,CAAiBrC;EAFA,CAAhB,CAbS;EAiBtBR,cAAc,EAAEnB,SAAS,CAACmE,KAAV,CAAgB;IAC9BZ,GAAG,EAAEvD,SAAS,CAACiE,MAAV,CAAiBC,UADQ;IAE9BjB,KAAK,EAAEjD,SAAS,CAACiE,MAAV,CAAiBC,UAFM;IAG9BhB,QAAQ,EAAElD,SAAS,CAACiE,MAAV,CAAiBC,UAHG;IAI9BZ,WAAW,EAAEtD,SAAS,CAACiE,MAAV,CAAiBC,UAJA;IAK9BjC,OAAO,EAAEjC,SAAS,CAACyE;EALW,CAAhB;AAjBM,CAAxB;AA0BA,eAAe3D,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","translate","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 translate: Provider.childContextTypes.translate\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,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AAxBF,CAAxB;AA2BA,eAAepD,WAAf"}
|
|
@@ -46,6 +46,8 @@ 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>;
|
|
50
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
49
51
|
modified: PropTypes.Requireable<boolean>;
|
|
50
52
|
titlePosition: PropTypes.Requireable<string>;
|
|
51
53
|
theme: PropTypes.Requireable<string>;
|
|
@@ -95,6 +95,8 @@ 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>;
|
|
99
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
98
100
|
modified: PropTypes.Requireable<boolean>;
|
|
99
101
|
titlePosition: PropTypes.Requireable<string>;
|
|
100
102
|
theme: PropTypes.Requireable<string>;
|
|
@@ -146,6 +148,8 @@ declare namespace SlidePlayer {
|
|
|
146
148
|
disabled: PropTypes.Requireable<boolean>;
|
|
147
149
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
148
150
|
description: PropTypes.Requireable<string>;
|
|
151
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
152
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
149
153
|
modified: PropTypes.Requireable<boolean>;
|
|
150
154
|
titlePosition: PropTypes.Requireable<string>;
|
|
151
155
|
theme: PropTypes.Requireable<string>;
|
|
@@ -103,6 +103,8 @@ 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>;
|
|
107
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
106
108
|
modified: PropTypes.Requireable<boolean>;
|
|
107
109
|
titlePosition: PropTypes.Requireable<string>;
|
|
108
110
|
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,8 @@ 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>;
|
|
133
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
132
134
|
modified: PropTypes.Requireable<boolean>;
|
|
133
135
|
titlePosition: PropTypes.Requireable<string>;
|
|
134
136
|
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,8 @@ 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>;
|
|
174
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
173
175
|
modified: PropTypes.Requireable<boolean>;
|
|
174
176
|
titlePosition: PropTypes.Requireable<string>;
|
|
175
177
|
theme: PropTypes.Requireable<string>;
|
|
@@ -548,6 +548,8 @@ 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>;
|
|
552
|
+
'aria-label': import("prop-types").Requireable<string>;
|
|
551
553
|
modified: import("prop-types").Requireable<boolean>;
|
|
552
554
|
titlePosition: import("prop-types").Requireable<string>;
|
|
553
555
|
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,8 @@ 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>;
|
|
552
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
551
553
|
modified: PropTypes.Requireable<boolean>;
|
|
552
554
|
titlePosition: PropTypes.Requireable<string>;
|
|
553
555
|
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,8 @@ 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>;
|
|
556
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
555
557
|
modified: PropTypes.Requireable<boolean>;
|
|
556
558
|
titlePosition: PropTypes.Requireable<string>;
|
|
557
559
|
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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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -188,6 +188,8 @@ 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>;
|
|
192
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
191
193
|
modified: PropTypes.Requireable<boolean>;
|
|
192
194
|
titlePosition: PropTypes.Requireable<string>;
|
|
193
195
|
theme: PropTypes.Requireable<string>;
|
|
@@ -241,6 +243,7 @@ declare namespace BrandUpdate {
|
|
|
241
243
|
modified: PropTypes.Requireable<boolean>;
|
|
242
244
|
error: PropTypes.Requireable<boolean>;
|
|
243
245
|
'aria-label': PropTypes.Requireable<string>;
|
|
246
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
244
247
|
}> | PropTypes.InferProps<{
|
|
245
248
|
type: PropTypes.Requireable<string>;
|
|
246
249
|
title: PropTypes.Validator<string>;
|
|
@@ -320,6 +323,8 @@ declare namespace BrandUpdate {
|
|
|
320
323
|
disabled: PropTypes.Requireable<boolean>;
|
|
321
324
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
322
325
|
description: PropTypes.Requireable<string>;
|
|
326
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
327
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
323
328
|
modified: PropTypes.Requireable<boolean>;
|
|
324
329
|
titlePosition: PropTypes.Requireable<string>;
|
|
325
330
|
theme: PropTypes.Requireable<string>;
|
|
@@ -356,6 +361,7 @@ declare namespace BrandUpdate {
|
|
|
356
361
|
modified: PropTypes.Requireable<boolean>;
|
|
357
362
|
error: PropTypes.Requireable<boolean>;
|
|
358
363
|
'aria-label': PropTypes.Requireable<string>;
|
|
364
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
359
365
|
}> | PropTypes.InferProps<{
|
|
360
366
|
type: PropTypes.Requireable<string>;
|
|
361
367
|
title: PropTypes.Validator<string>;
|
|
@@ -460,6 +466,8 @@ declare namespace BrandUpdate {
|
|
|
460
466
|
disabled: PropTypes.Requireable<boolean>;
|
|
461
467
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
462
468
|
description: PropTypes.Requireable<string>;
|
|
469
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
470
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
463
471
|
modified: PropTypes.Requireable<boolean>;
|
|
464
472
|
titlePosition: PropTypes.Requireable<string>;
|
|
465
473
|
theme: PropTypes.Requireable<string>;
|
|
@@ -834,6 +842,8 @@ declare namespace BrandUpdate {
|
|
|
834
842
|
disabled: PropTypes.Requireable<boolean>;
|
|
835
843
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
836
844
|
description: PropTypes.Requireable<string>;
|
|
845
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
846
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
837
847
|
modified: PropTypes.Requireable<boolean>;
|
|
838
848
|
titlePosition: PropTypes.Requireable<string>;
|
|
839
849
|
theme: PropTypes.Requireable<string>;
|
|
@@ -887,6 +897,7 @@ declare namespace BrandUpdate {
|
|
|
887
897
|
modified: PropTypes.Requireable<boolean>;
|
|
888
898
|
error: PropTypes.Requireable<boolean>;
|
|
889
899
|
'aria-label': PropTypes.Requireable<string>;
|
|
900
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
890
901
|
}> | PropTypes.InferProps<{
|
|
891
902
|
type: PropTypes.Requireable<string>;
|
|
892
903
|
title: PropTypes.Validator<string>;
|
|
@@ -966,6 +977,8 @@ declare namespace BrandUpdate {
|
|
|
966
977
|
disabled: PropTypes.Requireable<boolean>;
|
|
967
978
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
968
979
|
description: PropTypes.Requireable<string>;
|
|
980
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
981
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
969
982
|
modified: PropTypes.Requireable<boolean>;
|
|
970
983
|
titlePosition: PropTypes.Requireable<string>;
|
|
971
984
|
theme: PropTypes.Requireable<string>;
|
|
@@ -1002,6 +1015,7 @@ declare namespace BrandUpdate {
|
|
|
1002
1015
|
modified: PropTypes.Requireable<boolean>;
|
|
1003
1016
|
error: PropTypes.Requireable<boolean>;
|
|
1004
1017
|
'aria-label': PropTypes.Requireable<string>;
|
|
1018
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
1005
1019
|
}> | PropTypes.InferProps<{
|
|
1006
1020
|
type: PropTypes.Requireable<string>;
|
|
1007
1021
|
title: PropTypes.Validator<string>;
|
|
@@ -1106,6 +1120,8 @@ declare namespace BrandUpdate {
|
|
|
1106
1120
|
disabled: PropTypes.Requireable<boolean>;
|
|
1107
1121
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
1108
1122
|
description: PropTypes.Requireable<string>;
|
|
1123
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
1124
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
1109
1125
|
modified: PropTypes.Requireable<boolean>;
|
|
1110
1126
|
titlePosition: PropTypes.Requireable<string>;
|
|
1111
1127
|
theme: PropTypes.Requireable<string>;
|
|
@@ -1590,6 +1606,8 @@ declare namespace BrandUpdate {
|
|
|
1590
1606
|
disabled: PropTypes.Requireable<boolean>;
|
|
1591
1607
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
1592
1608
|
description: PropTypes.Requireable<string>;
|
|
1609
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
1610
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
1593
1611
|
modified: PropTypes.Requireable<boolean>;
|
|
1594
1612
|
titlePosition: PropTypes.Requireable<string>;
|
|
1595
1613
|
theme: PropTypes.Requireable<string>;
|
|
@@ -47,6 +47,8 @@ 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>;
|
|
51
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
50
52
|
modified: PropTypes.Requireable<boolean>;
|
|
51
53
|
titlePosition: PropTypes.Requireable<string>;
|
|
52
54
|
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,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,cAAf;IAA8B,SAAS,EAAEb,KAAK,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"}
|
|
@@ -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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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,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,EAAEA,WART;IASE,KAAK,EAAED,KATT;IAUE,OAAO,EAAEO,YAVX;IAWE,OAAO,EAAEH,OAXX;IAYE,QAAQ,gBAZV;IAaE,MAAM,EAAEC;EAbV,EAbF,EA4BGL,KAAK,IAAI,CAACe,cAAV,gBACC,6BAAC,+BAAD;IAAW,OAAO,EAAEZ,OAApB;IAA6B,SAAS,EAAEU,cAAA,CAAMQ;EAA9C,EADD,GAEG,IA9BN,CADF;AAkCD,CAhDD;;AAkDAvB,MAAM,CAACwB,YAAP,GAAsB;EACpBC,IAAI,EAAEC,iBAAA,CAASC,iBAAT,CAA2BF;AADb,CAAtB;AAIAzB,MAAM,CAAC4B,SAAP,2CAAmB;EACjB1B,KAAK,EAAE2B,kBAAA,CAAUC,MADA;EAEjB3B,WAAW,EAAE0B,kBAAA,CAAUC,MAAV,CAAiBC,UAFb;EAGjB3B,QAAQ,EAAEyB,kBAAA,CAAUG,IAHH;EAIjB3B,OAAO,EAAEwB,kBAAA,CAAUG,IAJF;EAKjB1B,OAAO,EAAEuB,kBAAA,CAAUG,IALF;EAMjBzB,MAAM,EAAEsB,kBAAA,CAAUG,IAND;EAOjBxB,KAAK,EAAEqB,kBAAA,CAAUI,KAAV,CAAgB,CAAC,SAAD,EAAY,cAAZ,CAAhB;AAPU,CAAnB;eAUejC,M"}
|
|
@@ -9,6 +9,8 @@ declare namespace InputSwitch {
|
|
|
9
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>;
|
|
13
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
12
14
|
modified: PropTypes.Requireable<boolean>;
|
|
13
15
|
titlePosition: PropTypes.Requireable<string>;
|
|
14
16
|
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,sDAgFC"}
|
|
@@ -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,
|
|
42
|
+
'aria-label': ariaLabel
|
|
39
43
|
} = props;
|
|
40
44
|
const idSwitch = id || (0, _uniqueId2.default)('input-switch-');
|
|
41
45
|
const isDisabled = disabled ? 'disabled' : '';
|
|
42
46
|
const handleChange = (0, _react.useMemo)(() => e => onChange(e.target.checked), [onChange]);
|
|
43
47
|
const titleView = title ? /*#__PURE__*/_react.default.createElement("span", {
|
|
48
|
+
id: `title-view-${dataName}`,
|
|
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' ? /*#__PURE__*/_react.default.createElement("div", {
|
|
81
|
-
id: `title-view-${dataName}`
|
|
82
|
-
}, titleView, " ") : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
85
|
+
}, titlePosition === 'left' ? titleView : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
83
86
|
className: requiredSelection ? _style.default.requiredSelection : null
|
|
84
87
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
85
88
|
className: _style.default.btnSwitchContainer
|
|
86
|
-
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
89
|
+
}, /*#__PURE__*/_react.default.createElement("input", _extends({}, ariaLabelledBy ? {
|
|
90
|
+
'aria-labelledby': ariaLabelledBy
|
|
91
|
+
} : {}, title ? {
|
|
92
|
+
'aria-labelledby': `title-view-${dataName}`
|
|
93
|
+
} : {}, ariaLabel && !ariaLabelledBy && !title ? {
|
|
94
|
+
'aria-label': ariaLabel
|
|
95
|
+
} : {}, {
|
|
87
96
|
type: "checkbox",
|
|
88
97
|
id: idSwitch,
|
|
89
98
|
name: name,
|
|
@@ -91,16 +100,16 @@ 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
|
tabIndex: 0
|
|
99
108
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
100
109
|
className: !details ? _style.default.alignedTextContainer : null
|
|
101
|
-
}, titlePosition === 'right' ?
|
|
102
|
-
|
|
103
|
-
}
|
|
110
|
+
}, titlePosition === 'right' ? {
|
|
111
|
+
titleView
|
|
112
|
+
} : null, details ? /*#__PURE__*/_react.default.createElement("div", {
|
|
104
113
|
className: _style.default.detailsTxt
|
|
105
114
|
}, details) : null), descriptionView);
|
|
106
115
|
};
|
|
@@ -113,6 +122,8 @@ InputSwitch.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
113
122
|
disabled: _propTypes.default.bool,
|
|
114
123
|
onChange: _propTypes.default.func,
|
|
115
124
|
description: _propTypes.default.string,
|
|
125
|
+
'aria-labelledby': _propTypes.default.string,
|
|
126
|
+
'aria-label': _propTypes.default.string,
|
|
116
127
|
modified: _propTypes.default.bool,
|
|
117
128
|
titlePosition: _propTypes.default.oneOf(['right', 'left']),
|
|
118
129
|
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}
|
|
1
|
+
{"version":3,"file":"index.js","names":["InputSwitch","props","title","name","id","value","disabled","onChange","description","modified","theme","titlePosition","details","requiredSelection","dataName","ariaLabelledBy","ariaLabel","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 'aria-label': ariaLabel\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 <span id={`title-view-${dataName}`} className={style.title}>\n {`${title} `}{' '}\n </span>\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 ? {'aria-labelledby': `title-view-${dataName}`} : {})}\n {...(ariaLabel && !ariaLabelledBy && !title ? {'aria-label': ariaLabel} : {})}\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\" tabIndex={0} />\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 'aria-label': 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,aAAaC,QAbT;IAcJ,mBAAmBC,cAdf;IAeJ,cAAcC;EAfV,IAgBFf,KAhBJ;EAkBA,MAAMgB,QAAQ,GAAGb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mC,kBAAA,CAAUE,IALE;EAMtBpC,QAAQ,EAAEkC,kBAAA,CAAUG,IANE;EAOtBpC,WAAW,EAAEiC,kBAAA,CAAUC,MAPD;EAQtB,mBAAmBD,kBAAA,CAAUC,MARP;EAStB,cAAcD,kBAAA,CAAUC,MATF;EAUtBjC,QAAQ,EAAEgC,kBAAA,CAAUE,IAVE;EAWtBhC,aAAa,EAAE8B,kBAAA,CAAUI,KAAV,CAAgB,CAAC,OAAD,EAAU,MAAV,CAAhB,CAXO;EAYtBnC,KAAK,EAAE+B,kBAAA,CAAUI,KAAV,CAAgB,CAAC,SAAD,EAAY,cAAZ,EAA4B,MAA5B,CAAhB,CAZe;EAatBjC,OAAO,EAAE6B,kBAAA,CAAUC,MAbG;EActB,aAAaD,kBAAA,CAAUC,MAdD;EAetB7B,iBAAiB,EAAE4B,kBAAA,CAAUE;AAfP,CAAxB;eAiBe3C,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"}
|