@coorpacademy/components 11.2.9 → 11.2.11-alpha.10

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.
Files changed (203) hide show
  1. package/es/atom/clue/index.d.ts +1 -1
  2. package/es/atom/lottie-wrapper/index.d.ts.map +1 -1
  3. package/es/atom/lottie-wrapper/index.js +9 -3
  4. package/es/atom/lottie-wrapper/index.js.map +1 -1
  5. package/es/atom/lottie-wrapper/prop-types.d.ts +2 -2
  6. package/es/atom/lottie-wrapper/prop-types.d.ts.map +1 -1
  7. package/es/atom/lottie-wrapper/prop-types.js +1 -1
  8. package/es/atom/lottie-wrapper/prop-types.js.map +1 -1
  9. package/es/atom/promo-code/index.d.ts +1 -1
  10. package/es/atom/provider/index.d.ts +1 -1
  11. package/es/atom/provider/index.js +1 -1
  12. package/es/atom/provider/index.js.map +1 -1
  13. package/es/atom/review-presentation/index.d.ts.map +1 -1
  14. package/es/atom/review-presentation/index.js +82 -20
  15. package/es/atom/review-presentation/index.js.map +1 -1
  16. package/es/atom/review-presentation/prop-types.d.ts +12 -0
  17. package/es/atom/review-presentation/prop-types.d.ts.map +1 -1
  18. package/es/atom/review-presentation/prop-types.js +3 -1
  19. package/es/atom/review-presentation/prop-types.js.map +1 -1
  20. package/es/atom/review-presentation/style.css +3 -14
  21. package/es/atom/select/index.d.ts +16 -17
  22. package/es/atom/select/index.d.ts.map +1 -1
  23. package/es/atom/select/index.js +7 -6
  24. package/es/atom/select/index.js.map +1 -1
  25. package/es/atom/tab-content/index.d.ts +1 -1
  26. package/es/molecule/answer/index.d.ts.map +1 -1
  27. package/es/molecule/answer/index.js +9 -1
  28. package/es/molecule/answer/index.js.map +1 -1
  29. package/es/molecule/battle-request/index.d.ts +1 -1
  30. package/es/molecule/brand-create-form/index.d.ts +1 -1
  31. package/es/molecule/brand-form-group/index.d.ts +2 -2
  32. package/es/molecule/card-with-button/index.d.ts +1 -1
  33. package/es/molecule/cookie-banner/index.d.ts +1 -1
  34. package/es/molecule/dashboard/cards-list/index.d.ts +1 -1
  35. package/es/molecule/discipline-partners/index.d.ts +1 -1
  36. package/es/molecule/external-content-button/index.d.ts +1 -1
  37. package/es/molecule/filters/index.d.ts +1 -1
  38. package/es/molecule/forum/forum-comment/index.d.ts +1 -1
  39. package/es/molecule/forum/forum-post/index.d.ts +1 -1
  40. package/es/molecule/payment-form/index.d.ts +1 -1
  41. package/es/molecule/pdf/index.d.ts +1 -1
  42. package/es/molecule/product-card/index.d.ts +1 -1
  43. package/es/molecule/questions/drop-down/index.d.ts +6 -5
  44. package/es/molecule/questions/drop-down/index.js +5 -2
  45. package/es/molecule/questions/drop-down/index.js.map +1 -1
  46. package/es/molecule/questions/template/index.d.ts +3 -1
  47. package/es/molecule/review-card-congrats/prop-types.d.ts +1 -1
  48. package/es/molecule/scope-content/index.d.ts +1 -1
  49. package/es/molecule/setup-section/index.d.ts +1 -1
  50. package/es/molecule/setup-slide/index.d.ts +1 -1
  51. package/es/molecule/setup-slider/index.d.ts +1 -1
  52. package/es/molecule/subscription-freemium/index.d.ts +1 -1
  53. package/es/molecule/subscription-premium/index.d.ts +1 -1
  54. package/es/molecule/table/index.d.ts +1 -1
  55. package/es/molecule/unsubscribe/index.d.ts +1 -1
  56. package/es/organism/brand-analytics/index.d.ts +1 -1
  57. package/es/organism/brand-form/index.d.ts +2 -2
  58. package/es/organism/cart/index.d.ts +1 -1
  59. package/es/organism/mooc-header/index.d.ts +1 -1
  60. package/es/organism/mooc-header/index.js +1 -1
  61. package/es/organism/mooc-header/index.js.map +1 -1
  62. package/es/organism/review-congrats/index.d.ts.map +1 -1
  63. package/es/organism/review-congrats/index.js +8 -6
  64. package/es/organism/review-congrats/index.js.map +1 -1
  65. package/es/organism/review-congrats/prop-types.d.ts +3 -3
  66. package/es/organism/settings/index.d.ts +1 -1
  67. package/es/organism/user-preferences/index.d.ts +1 -0
  68. package/es/organism/user-preferences/index.d.ts.map +1 -1
  69. package/es/organism/user-preferences/index.js +11 -6
  70. package/es/organism/user-preferences/index.js.map +1 -1
  71. package/es/organism/wizard-contents/index.d.ts +2 -2
  72. package/es/template/activity/index.d.ts +2 -0
  73. package/es/template/activity/index.d.ts.map +1 -1
  74. package/es/template/activity/index.js +4 -1
  75. package/es/template/activity/index.js.map +1 -1
  76. package/es/template/activity/progression-item.d.ts +1 -0
  77. package/es/template/activity/progression-item.d.ts.map +1 -1
  78. package/es/template/activity/progression-item.js +5 -2
  79. package/es/template/activity/progression-item.js.map +1 -1
  80. package/es/template/app-player/player/slides/index.d.ts +2 -2
  81. package/es/template/app-player/player/slides/index.js +1 -1
  82. package/es/template/app-player/player/slides/index.js.map +1 -1
  83. package/es/template/app-review/index.d.ts +11 -3
  84. package/es/template/app-review/index.d.ts.map +1 -1
  85. package/es/template/app-review/player/prop-types.d.ts +3 -3
  86. package/es/template/app-review/prop-types.d.ts +11 -3
  87. package/es/template/app-review/prop-types.d.ts.map +1 -1
  88. package/es/template/app-review/template-context.d.ts +1 -0
  89. package/es/template/app-review/template-context.d.ts.map +1 -1
  90. package/es/template/app-review/template-context.js +2 -1
  91. package/es/template/app-review/template-context.js.map +1 -1
  92. package/es/template/back-office/brand-update/index.d.ts +4 -4
  93. package/es/template/battle-requests/index.d.ts +1 -1
  94. package/es/template/common/authors/index.d.ts +1 -1
  95. package/es/template/common/search-page/index.d.ts +1 -1
  96. package/es/template/review-dashboard-skills/index.d.ts +8 -0
  97. package/es/util/render-with-context.d.ts +1 -4
  98. package/es/util/render-with-context.d.ts.map +1 -1
  99. package/es/util/render-with-context.js +6 -6
  100. package/es/util/render-with-context.js.map +1 -1
  101. package/lib/atom/clue/index.d.ts +1 -1
  102. package/lib/atom/lottie-wrapper/index.d.ts.map +1 -1
  103. package/lib/atom/lottie-wrapper/index.js +9 -3
  104. package/lib/atom/lottie-wrapper/index.js.map +1 -1
  105. package/lib/atom/lottie-wrapper/prop-types.d.ts +2 -2
  106. package/lib/atom/lottie-wrapper/prop-types.d.ts.map +1 -1
  107. package/lib/atom/lottie-wrapper/prop-types.js +1 -1
  108. package/lib/atom/lottie-wrapper/prop-types.js.map +1 -1
  109. package/lib/atom/promo-code/index.d.ts +1 -1
  110. package/lib/atom/provider/index.d.ts +1 -1
  111. package/lib/atom/provider/index.js +1 -1
  112. package/lib/atom/provider/index.js.map +1 -1
  113. package/lib/atom/review-presentation/index.d.ts.map +1 -1
  114. package/lib/atom/review-presentation/index.js +86 -20
  115. package/lib/atom/review-presentation/index.js.map +1 -1
  116. package/lib/atom/review-presentation/prop-types.d.ts +12 -0
  117. package/lib/atom/review-presentation/prop-types.d.ts.map +1 -1
  118. package/lib/atom/review-presentation/prop-types.js +3 -1
  119. package/lib/atom/review-presentation/prop-types.js.map +1 -1
  120. package/lib/atom/review-presentation/style.css +3 -14
  121. package/lib/atom/select/index.d.ts +16 -17
  122. package/lib/atom/select/index.d.ts.map +1 -1
  123. package/lib/atom/select/index.js +7 -6
  124. package/lib/atom/select/index.js.map +1 -1
  125. package/lib/atom/tab-content/index.d.ts +1 -1
  126. package/lib/molecule/answer/index.d.ts.map +1 -1
  127. package/lib/molecule/answer/index.js +10 -1
  128. package/lib/molecule/answer/index.js.map +1 -1
  129. package/lib/molecule/battle-request/index.d.ts +1 -1
  130. package/lib/molecule/brand-create-form/index.d.ts +1 -1
  131. package/lib/molecule/brand-form-group/index.d.ts +2 -2
  132. package/lib/molecule/card-with-button/index.d.ts +1 -1
  133. package/lib/molecule/cookie-banner/index.d.ts +1 -1
  134. package/lib/molecule/dashboard/cards-list/index.d.ts +1 -1
  135. package/lib/molecule/discipline-partners/index.d.ts +1 -1
  136. package/lib/molecule/external-content-button/index.d.ts +1 -1
  137. package/lib/molecule/filters/index.d.ts +1 -1
  138. package/lib/molecule/forum/forum-comment/index.d.ts +1 -1
  139. package/lib/molecule/forum/forum-post/index.d.ts +1 -1
  140. package/lib/molecule/payment-form/index.d.ts +1 -1
  141. package/lib/molecule/pdf/index.d.ts +1 -1
  142. package/lib/molecule/product-card/index.d.ts +1 -1
  143. package/lib/molecule/questions/drop-down/index.d.ts +6 -5
  144. package/lib/molecule/questions/drop-down/index.js +5 -2
  145. package/lib/molecule/questions/drop-down/index.js.map +1 -1
  146. package/lib/molecule/questions/template/index.d.ts +3 -1
  147. package/lib/molecule/review-card-congrats/prop-types.d.ts +1 -1
  148. package/lib/molecule/scope-content/index.d.ts +1 -1
  149. package/lib/molecule/setup-section/index.d.ts +1 -1
  150. package/lib/molecule/setup-slide/index.d.ts +1 -1
  151. package/lib/molecule/setup-slider/index.d.ts +1 -1
  152. package/lib/molecule/subscription-freemium/index.d.ts +1 -1
  153. package/lib/molecule/subscription-premium/index.d.ts +1 -1
  154. package/lib/molecule/table/index.d.ts +1 -1
  155. package/lib/molecule/unsubscribe/index.d.ts +1 -1
  156. package/lib/organism/brand-analytics/index.d.ts +1 -1
  157. package/lib/organism/brand-form/index.d.ts +2 -2
  158. package/lib/organism/cart/index.d.ts +1 -1
  159. package/lib/organism/mooc-header/index.d.ts +1 -1
  160. package/lib/organism/mooc-header/index.js +1 -1
  161. package/lib/organism/mooc-header/index.js.map +1 -1
  162. package/lib/organism/review-congrats/index.d.ts.map +1 -1
  163. package/lib/organism/review-congrats/index.js +3 -1
  164. package/lib/organism/review-congrats/index.js.map +1 -1
  165. package/lib/organism/review-congrats/prop-types.d.ts +3 -3
  166. package/lib/organism/settings/index.d.ts +1 -1
  167. package/lib/organism/user-preferences/index.d.ts +1 -0
  168. package/lib/organism/user-preferences/index.d.ts.map +1 -1
  169. package/lib/organism/user-preferences/index.js +11 -6
  170. package/lib/organism/user-preferences/index.js.map +1 -1
  171. package/lib/organism/wizard-contents/index.d.ts +2 -2
  172. package/lib/template/activity/index.d.ts +2 -0
  173. package/lib/template/activity/index.d.ts.map +1 -1
  174. package/lib/template/activity/index.js +4 -1
  175. package/lib/template/activity/index.js.map +1 -1
  176. package/lib/template/activity/progression-item.d.ts +1 -0
  177. package/lib/template/activity/progression-item.d.ts.map +1 -1
  178. package/lib/template/activity/progression-item.js +5 -2
  179. package/lib/template/activity/progression-item.js.map +1 -1
  180. package/lib/template/app-player/player/slides/index.d.ts +2 -2
  181. package/lib/template/app-player/player/slides/index.js +1 -1
  182. package/lib/template/app-player/player/slides/index.js.map +1 -1
  183. package/lib/template/app-review/index.d.ts +11 -3
  184. package/lib/template/app-review/index.d.ts.map +1 -1
  185. package/lib/template/app-review/player/prop-types.d.ts +3 -3
  186. package/lib/template/app-review/prop-types.d.ts +11 -3
  187. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  188. package/lib/template/app-review/template-context.d.ts +1 -0
  189. package/lib/template/app-review/template-context.d.ts.map +1 -1
  190. package/lib/template/app-review/template-context.js +2 -1
  191. package/lib/template/app-review/template-context.js.map +1 -1
  192. package/lib/template/back-office/brand-update/index.d.ts +4 -4
  193. package/lib/template/battle-requests/index.d.ts +1 -1
  194. package/lib/template/common/authors/index.d.ts +1 -1
  195. package/lib/template/common/search-page/index.d.ts +1 -1
  196. package/lib/template/review-dashboard-skills/index.d.ts +8 -0
  197. package/lib/util/render-with-context.d.ts +1 -4
  198. package/lib/util/render-with-context.d.ts.map +1 -1
  199. package/lib/util/render-with-context.js +6 -6
  200. package/lib/util/render-with-context.js.map +1 -1
  201. package/locales/en/global.json +1 -0
  202. package/package.json +2 -2
  203. package/locales/.mtslconfig.json +0 -1
@@ -43,7 +43,7 @@ const Select = (props, legacyContext) => {
43
43
  modified = false,
44
44
  error = false,
45
45
  title: propTitle,
46
- moreAriaLabel
46
+ 'aria-label': ariaLabel
47
47
  } = props;
48
48
  const skin = GetSkinFromContext(legacyContext);
49
49
  const title = useMemo(() => propTitle ? `${propTitle}${required ? '*' : ''}` : null, [propTitle, required]);
@@ -83,10 +83,11 @@ const Select = (props, legacyContext) => {
83
83
  const arrowView = !multiple ? /*#__PURE__*/React.createElement(ArrowDown, {
84
84
  color: includes(theme, ['question', 'template', 'player']) ? arrowColor : black,
85
85
  className: shouldUseSkinFontColor ? style.selectedArrow : style.arrow,
86
- "aria-label": moreAriaLabel
86
+ "aria-label": ariaLabel,
87
+ "data-testid": "select-arrow-down-icon"
87
88
  }) : null;
88
- const behaviourClassName = useMemo(() => getClassState(style.default, style.modified, style.error, modified, error), [error, modified]);
89
- const composedClassName = useMemo(() => classnames(theme && theme !== 'coorpmanager' ? themeStyle[theme] : behaviourClassName, selected ? style.selected : style.unselected, className), [behaviourClassName, className, selected, theme]);
89
+ const behaviorClassName = useMemo(() => getClassState(style.default, style.modified, style.error, modified, error), [error, modified]);
90
+ const composedClassName = useMemo(() => classnames(theme && theme !== 'coorpmanager' ? themeStyle[theme] : behaviorClassName, selected ? style.selected : style.unselected, className), [behaviorClassName, className, selected, theme]);
90
91
  const labelSize = useMemo(() => size(selectedLabel), [selectedLabel]);
91
92
  const isLongLabel = useMemo(() => labelSize >= 65, [labelSize]);
92
93
  return /*#__PURE__*/React.createElement("div", {
@@ -128,7 +129,6 @@ Select.contextTypes = {
128
129
  };
129
130
  Select.propTypes = process.env.NODE_ENV !== "production" ? {
130
131
  title: PropTypes.string,
131
- moreAriaLabel: PropTypes.string,
132
132
  name: PropTypes.string,
133
133
  className: PropTypes.string,
134
134
  borderClassName: PropTypes.string,
@@ -140,7 +140,8 @@ Select.propTypes = process.env.NODE_ENV !== "production" ? {
140
140
  theme: PropTypes.oneOf(keys(themeStyle)),
141
141
  options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes)),
142
142
  modified: PropTypes.bool,
143
- error: PropTypes.bool
143
+ error: PropTypes.bool,
144
+ 'aria-label': PropTypes.string
144
145
  } : {};
145
146
  export default Select;
146
147
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","filter","find","get","getOr","includes","keys","map","size","NovaCompositionNavigationArrowDown","ArrowDown","Provider","GetSkinFromContext","getClassState","style","themeStyle","invalid","header","mooc","question","sort","thematiques","player","template","coorpmanager","Select","props","legacyContext","name","options","className","borderClassName","onChange","multiple","disabled","required","description","theme","modified","error","title","propTitle","moreAriaLabel","skin","optionList","option","index","value","selectOption","titleView","selected","selectedLabel","isSelectedInValidOption","validOption","handleChange","e","target","selectedOptions","black","color","shouldUseSkinFontColor","arrowColor","undefined","arrowView","selectedArrow","arrow","behaviourClassName","default","composedClassName","unselected","labelSize","isLongLabel","selectWrapper","selectSpan","noLabelCommon","longLabel","selectBox","SelectOptionPropTypes","string","isRequired","oneOfType","number","bool","contextTypes","childContextTypes","propTypes","func","oneOf","arrayOf","shape"],"sources":["../../../src/atom/select/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport filter from 'lodash/fp/filter';\nimport find from 'lodash/fp/find';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport includes from 'lodash/fp/includes';\nimport keys from 'lodash/fp/keys';\nimport map from 'lodash/fp/map';\nimport size from 'lodash/fp/size';\nimport {NovaCompositionNavigationArrowDown as ArrowDown} from '@coorpacademy/nova-icons';\nimport Provider, {GetSkinFromContext} from '../provider';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n filter: style.filter,\n invalid: style.invalid,\n header: style.header,\n mooc: style.mooc,\n question: style.question,\n sort: style.sort,\n thematiques: style.thematiques,\n player: style.player,\n template: style.template,\n coorpmanager: null\n};\n\nconst Select = (props, legacyContext) => {\n const {\n name,\n options = [],\n className,\n borderClassName,\n onChange,\n multiple = false,\n disabled,\n required,\n description,\n theme,\n modified = false,\n error = false,\n title: propTitle,\n moreAriaLabel\n } = props;\n\n const skin = GetSkinFromContext(legacyContext);\n const title = useMemo(\n () => (propTitle ? `${propTitle}${required ? '*' : ''}` : null),\n [propTitle, required]\n );\n\n const optionList =\n options &&\n options.map((option, index) => {\n return (\n <option key={index} value={option.value} className={style.selectOption}>\n {option.name}\n </option>\n );\n });\n\n const titleView = title ? <span className={style.title}>{title} </span> : null;\n\n const selected = useMemo(\n () =>\n multiple\n ? map(get('value'), filter({selected: true}, options))\n : get('value', find({selected: true}, options)),\n [multiple, options]\n );\n const selectedLabel = useMemo(\n () =>\n multiple\n ? map(get('name'), filter({selected: true}, options))\n : get('name', find({selected: true}, options)),\n [multiple, options]\n );\n\n const isSelectedInValidOption = useMemo(\n () =>\n theme === 'player' &&\n getOr(false, 'name', find({validOption: false, selected: true}, options)),\n [options, theme]\n );\n\n const handleChange = useMemo(\n () =>\n multiple\n ? e => {\n onChange(map(get('value'), e.target.selectedOptions));\n }\n : e => {\n onChange(e.target.value);\n },\n [onChange, multiple]\n );\n\n const black = useMemo(() => getOr('#14171A', 'common.black', skin), [skin]);\n const color = useMemo(() => getOr('#00B0FF', 'common.primary', skin), [skin]);\n const shouldUseSkinFontColor = useMemo(\n () =>\n !isSelectedInValidOption && selected && includes(theme, ['question', 'template', 'player']),\n [isSelectedInValidOption, selected, theme]\n );\n const arrowColor = selected ? color : undefined;\n\n const arrowView = !multiple ? (\n <ArrowDown\n color={includes(theme, ['question', 'template', 'player']) ? arrowColor : black}\n className={shouldUseSkinFontColor ? style.selectedArrow : style.arrow}\n aria-label={moreAriaLabel}\n />\n ) : null;\n const behaviourClassName = useMemo(\n () => getClassState(style.default, style.modified, style.error, modified, error),\n [error, modified]\n );\n const composedClassName = useMemo(\n () =>\n classnames(\n theme && theme !== 'coorpmanager' ? themeStyle[theme] : behaviourClassName,\n selected ? style.selected : style.unselected,\n className\n ),\n [behaviourClassName, className, selected, theme]\n );\n\n const labelSize = useMemo(() => size(selectedLabel), [selectedLabel]);\n\n const isLongLabel = useMemo(() => labelSize >= 65, [labelSize]);\n\n return (\n <div\n className={classnames(\n composedClassName,\n theme === 'coorpmanager' ? style.coorpmanager : null\n )}\n >\n <label\n data-name=\"select-wrapper\"\n style={{\n ...(shouldUseSkinFontColor && {\n color\n })\n }}\n className={style.selectWrapper}\n >\n {titleView}\n <span\n data-name=\"select-span\"\n className={classnames(\n style.selectSpan,\n includes(theme, ['player', 'invalid', 'question', 'thematiques', 'template'])\n ? style.noLabelCommon\n : null,\n borderClassName,\n isLongLabel ? style.longLabel : null\n )}\n style={{\n ...(shouldUseSkinFontColor && {\n color\n })\n }}\n >\n {selectedLabel}\n </span>\n {arrowView}\n <select\n data-name=\"native-select\"\n className={style.selectBox}\n title={selectedLabel}\n name={name}\n onChange={handleChange}\n value={selected}\n multiple={multiple}\n disabled={disabled}\n >\n {optionList}\n </select>\n </label>\n <div className={style.description}>{description}</div>\n </div>\n );\n};\n\nexport const SelectOptionPropTypes = {\n name: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n selected: PropTypes.bool,\n validOption: PropTypes.bool\n};\n\nSelect.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSelect.propTypes = {\n title: PropTypes.string,\n moreAriaLabel: PropTypes.string,\n name: PropTypes.string,\n className: PropTypes.string,\n borderClassName: PropTypes.string,\n disabled: PropTypes.bool,\n multiple: PropTypes.bool,\n description: PropTypes.string,\n required: PropTypes.bool,\n onChange: PropTypes.func,\n theme: PropTypes.oneOf(keys(themeStyle)),\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes)),\n modified: PropTypes.bool,\n error: PropTypes.bool\n};\n\nexport default Select;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,MAAP,MAAmB,kBAAnB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,QAAP,MAAqB,oBAArB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,SAAQC,kCAAkC,IAAIC,SAA9C,QAA8D,0BAA9D;AACA,OAAOC,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,WAAW,EAAErC,SAAS,CAAC+E,MARN;EASjB3C,QAAQ,EAAEpC,SAAS,CAACmF,IATH;EAUjBlD,QAAQ,EAAEjC,SAAS,CAACuF,IAVH;EAWjBjD,KAAK,EAAEtC,SAAS,CAACwF,KAAV,CAAgBjF,IAAI,CAACS,UAAD,CAApB,CAXU;EAYjBc,OAAO,EAAE9B,SAAS,CAACyF,OAAV,CAAkBzF,SAAS,CAAC0F,KAAV,CAAgBZ,qBAAhB,CAAlB,CAZQ;EAajBvC,QAAQ,EAAEvC,SAAS,CAACmF,IAbH;EAcjB3C,KAAK,EAAExC,SAAS,CAACmF;AAdA,CAAnB;AAiBA,eAAezD,MAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","filter","find","get","getOr","includes","keys","map","size","NovaCompositionNavigationArrowDown","ArrowDown","Provider","GetSkinFromContext","getClassState","style","themeStyle","invalid","header","mooc","question","sort","thematiques","player","template","coorpmanager","Select","props","legacyContext","name","options","className","borderClassName","onChange","multiple","disabled","required","description","theme","modified","error","title","propTitle","ariaLabel","skin","optionList","option","index","value","selectOption","titleView","selected","selectedLabel","isSelectedInValidOption","validOption","handleChange","e","target","selectedOptions","black","color","shouldUseSkinFontColor","arrowColor","undefined","arrowView","selectedArrow","arrow","behaviorClassName","default","composedClassName","unselected","labelSize","isLongLabel","selectWrapper","selectSpan","noLabelCommon","longLabel","selectBox","SelectOptionPropTypes","string","isRequired","oneOfType","number","bool","contextTypes","childContextTypes","propTypes","func","oneOf","arrayOf","shape"],"sources":["../../../src/atom/select/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport filter from 'lodash/fp/filter';\nimport find from 'lodash/fp/find';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport includes from 'lodash/fp/includes';\nimport keys from 'lodash/fp/keys';\nimport map from 'lodash/fp/map';\nimport size from 'lodash/fp/size';\nimport {NovaCompositionNavigationArrowDown as ArrowDown} from '@coorpacademy/nova-icons';\nimport Provider, {GetSkinFromContext} from '../provider';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n filter: style.filter,\n invalid: style.invalid,\n header: style.header,\n mooc: style.mooc,\n question: style.question,\n sort: style.sort,\n thematiques: style.thematiques,\n player: style.player,\n template: style.template,\n coorpmanager: null\n};\n\nconst Select = (props, legacyContext) => {\n const {\n name,\n options = [],\n className,\n borderClassName,\n onChange,\n multiple = false,\n disabled,\n required,\n description,\n theme,\n modified = false,\n error = false,\n title: propTitle,\n 'aria-label': ariaLabel\n } = props;\n\n const skin = GetSkinFromContext(legacyContext);\n const title = useMemo(\n () => (propTitle ? `${propTitle}${required ? '*' : ''}` : null),\n [propTitle, required]\n );\n\n const optionList =\n options &&\n options.map((option, index) => {\n return (\n <option key={index} value={option.value} className={style.selectOption}>\n {option.name}\n </option>\n );\n });\n\n const titleView = title ? <span className={style.title}>{title} </span> : null;\n\n const selected = useMemo(\n () =>\n multiple\n ? map(get('value'), filter({selected: true}, options))\n : get('value', find({selected: true}, options)),\n [multiple, options]\n );\n const selectedLabel = useMemo(\n () =>\n multiple\n ? map(get('name'), filter({selected: true}, options))\n : get('name', find({selected: true}, options)),\n [multiple, options]\n );\n\n const isSelectedInValidOption = useMemo(\n () =>\n theme === 'player' &&\n getOr(false, 'name', find({validOption: false, selected: true}, options)),\n [options, theme]\n );\n\n const handleChange = useMemo(\n () =>\n multiple\n ? e => {\n onChange(map(get('value'), e.target.selectedOptions));\n }\n : e => {\n onChange(e.target.value);\n },\n [onChange, multiple]\n );\n\n const black = useMemo(() => getOr('#14171A', 'common.black', skin), [skin]);\n const color = useMemo(() => getOr('#00B0FF', 'common.primary', skin), [skin]);\n const shouldUseSkinFontColor = useMemo(\n () =>\n !isSelectedInValidOption && selected && includes(theme, ['question', 'template', 'player']),\n [isSelectedInValidOption, selected, theme]\n );\n const arrowColor = selected ? color : undefined;\n\n const arrowView = !multiple ? (\n <ArrowDown\n color={includes(theme, ['question', 'template', 'player']) ? arrowColor : black}\n className={shouldUseSkinFontColor ? style.selectedArrow : style.arrow}\n aria-label={ariaLabel}\n data-testid=\"select-arrow-down-icon\"\n />\n ) : null;\n const behaviorClassName = useMemo(\n () => getClassState(style.default, style.modified, style.error, modified, error),\n [error, modified]\n );\n const composedClassName = useMemo(\n () =>\n classnames(\n theme && theme !== 'coorpmanager' ? themeStyle[theme] : behaviorClassName,\n selected ? style.selected : style.unselected,\n className\n ),\n [behaviorClassName, className, selected, theme]\n );\n\n const labelSize = useMemo(() => size(selectedLabel), [selectedLabel]);\n\n const isLongLabel = useMemo(() => labelSize >= 65, [labelSize]);\n\n return (\n <div\n className={classnames(\n composedClassName,\n theme === 'coorpmanager' ? style.coorpmanager : null\n )}\n >\n <label\n data-name=\"select-wrapper\"\n style={{\n ...(shouldUseSkinFontColor && {\n color\n })\n }}\n className={style.selectWrapper}\n >\n {titleView}\n <span\n data-name=\"select-span\"\n className={classnames(\n style.selectSpan,\n includes(theme, ['player', 'invalid', 'question', 'thematiques', 'template'])\n ? style.noLabelCommon\n : null,\n borderClassName,\n isLongLabel ? style.longLabel : null\n )}\n style={{\n ...(shouldUseSkinFontColor && {\n color\n })\n }}\n >\n {selectedLabel}\n </span>\n {arrowView}\n <select\n data-name=\"native-select\"\n className={style.selectBox}\n title={selectedLabel}\n name={name}\n onChange={handleChange}\n value={selected}\n multiple={multiple}\n disabled={disabled}\n >\n {optionList}\n </select>\n </label>\n <div className={style.description}>{description}</div>\n </div>\n );\n};\n\nexport const SelectOptionPropTypes = {\n name: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n selected: PropTypes.bool,\n validOption: PropTypes.bool\n};\n\nSelect.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSelect.propTypes = {\n title: PropTypes.string,\n name: PropTypes.string,\n className: PropTypes.string,\n borderClassName: PropTypes.string,\n disabled: PropTypes.bool,\n multiple: PropTypes.bool,\n description: PropTypes.string,\n required: PropTypes.bool,\n onChange: PropTypes.func,\n theme: PropTypes.oneOf(keys(themeStyle)),\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes)),\n modified: PropTypes.bool,\n error: PropTypes.bool,\n 'aria-label': PropTypes.string\n};\n\nexport default Select;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,MAAP,MAAmB,kBAAnB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,QAAP,MAAqB,oBAArB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,SAAQC,kCAAkC,IAAIC,SAA9C,QAA8D,0BAA9D;AACA,OAAOC,QAAP,IAAkBC,kBAAlB,QAA2C,aAA3C;AACA,OAAOC,aAAP,MAA0B,4BAA1B;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,UAAU,GAAG;EACjBd,MAAM,EAAEa,KAAK,CAACb,MADG;EAEjBe,OAAO,EAAEF,KAAK,CAACE,OAFE;EAGjBC,MAAM,EAAEH,KAAK,CAACG,MAHG;EAIjBC,IAAI,EAAEJ,KAAK,CAACI,IAJK;EAKjBC,QAAQ,EAAEL,KAAK,CAACK,QALC;EAMjBC,IAAI,EAAEN,KAAK,CAACM,IANK;EAOjBC,WAAW,EAAEP,KAAK,CAACO,WAPF;EAQjBC,MAAM,EAAER,KAAK,CAACQ,MARG;EASjBC,QAAQ,EAAET,KAAK,CAACS,QATC;EAUjBC,YAAY,EAAE;AAVG,CAAnB;;AAaA,MAAMC,MAAM,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EACvC,M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iBC,UADY;EAEnChC,KAAK,EAAEhD,SAAS,CAACiF,SAAV,CAAoB,CAACjF,SAAS,CAAC+E,MAAX,EAAmB/E,SAAS,CAACkF,MAA7B,CAApB,CAF4B;EAGnC/B,QAAQ,EAAEnD,SAAS,CAACmF,IAHe;EAInC7B,WAAW,EAAEtD,SAAS,CAACmF;AAJY,CAA9B;AAOPzD,MAAM,CAAC0D,YAAP,GAAsB;EACpBxC,IAAI,EAAEhC,QAAQ,CAACyE,iBAAT,CAA2BzC;AADb,CAAtB;AAIAlB,MAAM,CAAC4D,SAAP,2CAAmB;EACjB7C,KAAK,EAAEzC,SAAS,CAAC+E,MADA;EAEjBlD,IAAI,EAAE7B,SAAS,CAAC+E,MAFC;EAGjBhD,SAAS,EAAE/B,SAAS,CAAC+E,MAHJ;EAIjB/C,eAAe,EAAEhC,SAAS,CAAC+E,MAJV;EAKjB5C,QAAQ,EAAEnC,SAAS,CAACmF,IALH;EAMjBjD,QAAQ,EAAElC,SAAS,CAACmF,IANH;EAOjB9C,WAAW,EAAErC,SAAS,CAAC+E,MAPN;EAQjB3C,QAAQ,EAAEpC,SAAS,CAACmF,IARH;EASjBlD,QAAQ,EAAEjC,SAAS,CAACuF,IATH;EAUjBjD,KAAK,EAAEtC,SAAS,CAACwF,KAAV,CAAgBjF,IAAI,CAACS,UAAD,CAApB,CAVU;EAWjBc,OAAO,EAAE9B,SAAS,CAACyF,OAAV,CAAkBzF,SAAS,CAAC0F,KAAV,CAAgBZ,qBAAhB,CAAlB,CAXQ;EAYjBvC,QAAQ,EAAEvC,SAAS,CAACmF,IAZH;EAajB3C,KAAK,EAAExC,SAAS,CAACmF,IAbA;EAcjB,cAAcnF,SAAS,CAAC+E;AAdP,CAAnB;AAiBA,eAAerD,MAAf"}
@@ -2,7 +2,7 @@ export default TabContent;
2
2
  declare function TabContent(props: any): JSX.Element;
3
3
  declare namespace TabContent {
4
4
  namespace contextTypes {
5
- const translate: PropTypes.Validator<(...args: any[]) => any>;
5
+ const translate: PropTypes.Requireable<(...args: any[]) => any>;
6
6
  }
7
7
  namespace propTypes {
8
8
  const tabTitle: PropTypes.Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/answer/index.js"],"names":[],"mappings":";AAuEA,iDASC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/answer/index.js"],"names":[],"mappings":";AA4EA,iDASC"}
@@ -14,6 +14,7 @@ import Qcm from '../questions/qcm';
14
14
  import QcmGraphic from '../questions/qcm-graphic';
15
15
  import QuestionRange from '../questions/question-range';
16
16
  import Template from '../questions/template';
17
+ import Provider from '../../atom/provider';
17
18
  import Audio from '../audio';
18
19
  import style from './style.css';
19
20
  import propTypes, { MediaViewPropTypes, TYPE_AUDIO, TYPE_IMAGE, TYPE_VIDEO } from './prop-types';
@@ -63,6 +64,8 @@ MediaView.propTypes = process.env.NODE_ENV !== "production" ? MediaViewPropTypes
63
64
  const Switch = ({
64
65
  model,
65
66
  help
67
+ }, {
68
+ translate
66
69
  }) => {
67
70
  const {
68
71
  type
@@ -84,7 +87,9 @@ const Switch = ({
84
87
  return /*#__PURE__*/React.createElement(FreeText, model);
85
88
 
86
89
  case 'dropDown':
87
- return /*#__PURE__*/React.createElement(DropDown, model);
90
+ return /*#__PURE__*/React.createElement(DropDown, _extends({}, model, {
91
+ "aria-label": translate('drop_down_icon')
92
+ }));
88
93
 
89
94
  case 'slider':
90
95
  return /*#__PURE__*/React.createElement(QuestionRange, model);
@@ -98,6 +103,9 @@ Switch.propTypes = process.env.NODE_ENV !== "production" ? {
98
103
  model: propTypes.model,
99
104
  help: propTypes.help
100
105
  } : {};
106
+ Switch.contextTypes = {
107
+ translate: Provider.childContextTypes.translate
108
+ };
101
109
 
102
110
  const Answer = props => {
103
111
  const {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","VideoPlayer","DropDown","FreeText","QcmDrag","Qcm","QcmGraphic","QuestionRange","Template","Audio","style","propTypes","MediaViewPropTypes","TYPE_AUDIO","TYPE_IMAGE","TYPE_VIDEO","MediaView","media","videoId","type","childProps","backgroundImage","url","video","audio","Switch","model","help","Answer","props","wrapper"],"sources":["../../../src/molecule/answer/index.js"],"sourcesContent":["import React from 'react';\nimport {omit} from 'lodash/fp';\nimport VideoPlayer from '../video-player';\nimport DropDown from '../questions/drop-down';\nimport FreeText from '../questions/free-text';\nimport QcmDrag from '../questions/qcm-drag';\nimport Qcm from '../questions/qcm';\nimport QcmGraphic from '../questions/qcm-graphic';\nimport QuestionRange from '../questions/question-range';\nimport Template from '../questions/template';\nimport Audio from '../audio';\nimport style from './style.css';\nimport propTypes, {MediaViewPropTypes, TYPE_AUDIO, TYPE_IMAGE, TYPE_VIDEO} from './prop-types';\n\nconst MediaView = ({media}) => {\n const {videoId, type, ...childProps} = media;\n switch (type) {\n case TYPE_IMAGE:\n return (\n <div\n className={style.media}\n style={{\n backgroundImage: `url(${media.url})`\n }}\n />\n );\n case TYPE_VIDEO:\n return (\n <div className={style.video}>\n <VideoPlayer {...omit('id', childProps)} id={videoId} height=\"100%\" width=\"100%\" />\n </div>\n );\n case TYPE_AUDIO:\n return (\n <div className={style.audio}>\n <Audio {...omit('id', childProps)} height=\"100%\" width=\"100%\" />\n </div>\n );\n default:\n return null;\n }\n};\n\nMediaView.propTypes = MediaViewPropTypes;\n\nconst Switch = ({model, help}) => {\n const {type} = model;\n\n switch (type) {\n case 'qcmDrag':\n return <QcmDrag {...model} help={help} />;\n case 'qcm':\n return <Qcm {...model} />;\n case 'qcmGraphic':\n return <QcmGraphic {...model} />;\n case 'freeText':\n return <FreeText {...model} />;\n case 'dropDown':\n return <DropDown {...model} />;\n case 'slider':\n return <QuestionRange {...model} />;\n case 'template':\n return <Template {...model} />;\n }\n};\n\nSwitch.propTypes = {\n model: propTypes.model,\n help: propTypes.help\n};\n\nconst Answer = props => {\n const {model, media, help} = props;\n\n return (\n <div data-name=\"answer\" className={style.wrapper}>\n {media ? <MediaView media={media} /> : null}\n <Switch model={model} help={help} />\n </div>\n );\n};\n\nAnswer.propTypes = propTypes;\n\nexport default Answer;\n"],"mappings":";;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,QAAP,MAAqB,wBAArB;AACA,OAAOC,QAAP,MAAqB,wBAArB;AACA,OAAOC,OAAP,MAAoB,uBAApB;AACA,OAAOC,GAAP,MAAgB,kBAAhB;AACA,OAAOC,UAAP,MAAuB,0BAAvB;AACA,OAAOC,aAAP,MAA0B,6BAA1B;AACA,OAAOC,QAAP,MAAqB,uBAArB;AACA,OAAOC,KAAP,MAAkB,UAAlB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,SAAP,IAAmBC,kBAAnB,EAAuCC,UAAvC,EAAmDC,UAAnD,EAA+DC,UAA/D,QAAgF,cAAhF;;AAEA,MAAMC,SAAS,GAAG,CAAC;EAACC;AAAD,CAAD,KAAa;EAC7B,MAAM;IAACC,OAAD;IAAUC;EAAV,IAAiCF,KAAvC;EAAA,MAAyBG,UAAzB,iCAAuCH,KAAvC;;EACA,QAAQE,IAAR;IACE,KAAKL,UAAL;MACE,oBACE;QACE,SAAS,EAAEJ,KAAK,CAACO,KADnB;QAEE,KAAK,EAAE;UACLI,eAAe,EAAG,OAAMJ,KAAK,CAACK,GAAI;QAD7B;MAFT,EADF;;IAQF,KAAKP,UAAL;MACE,oBACE;QAAK,SAAS,EAAEL,KAAK,CAACa;MAAtB,gBACE,oBAAC,WAAD,eAAiB,MAAK,IAAL,EAAWH,UAAX,CAAjB;QAAyC,EAAE,EAAEF,OAA7C;QAAsD,MAAM,EAAC,MAA7D;QAAoE,KAAK,EAAC;MAA1E,GADF,CADF;;IAKF,KAAKL,UAAL;MACE,oBACE;QAAK,SAAS,EAAEH,KAAK,CAACc;MAAtB,gBACE,oBAAC,KAAD,eAAW,MAAK,IAAL,EAAWJ,UAAX,CAAX;QA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;AAMD,CATD;;AAWAC,MAAM,CAACjB,SAAP,2CAAmBA,SAAnB;AAEA,eAAeiB,MAAf"}
1
+ {"version":3,"file":"index.js","names":["React","VideoPlayer","DropDown","FreeText","QcmDrag","Qcm","QcmGraphic","QuestionRange","Template","Provider","Audio","style","propTypes","MediaViewPropTypes","TYPE_AUDIO","TYPE_IMAGE","TYPE_VIDEO","MediaView","media","videoId","type","childProps","backgroundImage","url","video","audio","Switch","model","help","translate","contextTypes","childContextTypes","Answer","props","wrapper"],"sources":["../../../src/molecule/answer/index.js"],"sourcesContent":["import React from 'react';\nimport {omit} from 'lodash/fp';\nimport VideoPlayer from '../video-player';\nimport DropDown from '../questions/drop-down';\nimport FreeText from '../questions/free-text';\nimport QcmDrag from '../questions/qcm-drag';\nimport Qcm from '../questions/qcm';\nimport QcmGraphic from '../questions/qcm-graphic';\nimport QuestionRange from '../questions/question-range';\nimport Template from '../questions/template';\nimport Provider from '../../atom/provider';\nimport Audio from '../audio';\nimport style from './style.css';\nimport propTypes, {MediaViewPropTypes, TYPE_AUDIO, TYPE_IMAGE, TYPE_VIDEO} from './prop-types';\n\nconst MediaView = ({media}) => {\n const {videoId, type, ...childProps} = media;\n switch (type) {\n case TYPE_IMAGE:\n return (\n <div\n className={style.media}\n style={{\n backgroundImage: `url(${media.url})`\n }}\n />\n );\n case TYPE_VIDEO:\n return (\n <div className={style.video}>\n <VideoPlayer {...omit('id', childProps)} id={videoId} height=\"100%\" width=\"100%\" />\n </div>\n );\n case TYPE_AUDIO:\n return (\n <div className={style.audio}>\n <Audio {...omit('id', childProps)} height=\"100%\" width=\"100%\" />\n </div>\n );\n default:\n return null;\n }\n};\n\nMediaView.propTypes = MediaViewPropTypes;\n\nconst Switch = ({model, help}, {translate}) => {\n const {type} = model;\n\n switch (type) {\n case 'qcmDrag':\n return <QcmDrag {...model} help={help} />;\n case 'qcm':\n return <Qcm {...model} />;\n case 'qcmGraphic':\n return <QcmGraphic {...model} />;\n case 'freeText':\n return <FreeText {...model} />;\n case 'dropDown':\n return <DropDown {...model} aria-label={translate('drop_down_icon')} />;\n case 'slider':\n return <QuestionRange {...model} />;\n case 'template':\n return <Template {...model} />;\n }\n};\n\nSwitch.propTypes = {\n model: propTypes.model,\n help: propTypes.help\n};\n\nSwitch.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nconst Answer = props => {\n const {model, media, help} = props;\n\n return (\n <div data-name=\"answer\" className={style.wrapper}>\n {media ? <MediaView media={media} /> : null}\n <Switch model={model} help={help} />\n </div>\n );\n};\n\nAnswer.propTypes = propTypes;\n\nexport default Answer;\n"],"mappings":";;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,QAAP,MAAqB,wBAArB;AACA,OAAOC,QAAP,MAAqB,wBAArB;AACA,OAAOC,OAAP,MAAoB,uBAApB;AACA,OAAOC,GAAP,MAAgB,kBAAhB;AACA,OAAOC,UAAP,MAAuB,0BAAvB;AACA,OAAOC,aAAP,MAA0B,6BAA1B;AACA,OAAOC,QAAP,MAAqB,uBAArB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,KAAP,MAAkB,UAAlB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,SAAP,IAAmBC,kBAAnB,EAAuCC,UAAvC,EAAmDC,UAAnD,EAA+DC,UAA/D,QAAgF,cAAhF;;AAEA,MAAMC,SAAS,GAAG,CAAC;EAACC;AAAD,CAAD,KAAa;EAC7B,MAAM;IAACC,OAAD;IAAUC;EAAV,IAAiCF,KAAvC;EAAA,MAAyBG,UAAzB,iCAAuCH,KAAvC;;EACA,QAAQE,IAAR;IACE,KAAKL,UAAL;MACE,oBACE;QACE,SAAS,EAAEJ,KAAK,CAACO,KADnB;QAEE,KAAK,EAAE;UACLI,eAAe,EAAG,OAAMJ,KAAK,CAACK,GAAI;QAD7B;MAFT,EADF;;IAQF,KAAKP,UAAL;MACE,oBACE;QAAK,S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IAAI,EAAEhB,SAAS,CAACgB;AAFC,CAAnB;AAKAF,MAAM,CAACI,YAAP,GAAsB;EACpBD,SAAS,EAAEpB,QAAQ,CAACsB,iBAAT,CAA2BF;AADlB,CAAtB;;AAIA,MAAMG,MAAM,GAAGC,KAAK,IAAI;EACtB,MAAM;IAACN,KAAD;IAAQT,KAAR;IAAeU;EAAf,IAAuBK,KAA7B;EAEA,oBACE;IAAK,aAAU,QAAf;IAAwB,SAAS,EAAEtB,KAAK,CAACuB;EAAzC,GACGhB,KAAK,gBAAG,oBAAC,SAAD;IAAW,KAAK,EAAEA;EAAlB,EAAH,GAAiC,IADzC,eAEE,oBAAC,MAAD;IAAQ,KAAK,EAAES,KAAf;IAAsB,IAAI,EAAEC;EAA5B,EAFF,CADF;AAMD,CATD;;AAWAI,MAAM,CAACpB,SAAP,2CAAmBA,SAAnB;AAEA,eAAeoB,MAAf"}
@@ -23,7 +23,7 @@ declare namespace BattleRequest {
23
23
  [x: string]: any;
24
24
  }>;
25
25
  }>>;
26
- const translate: PropTypes.Validator<(...args: any[]) => any>;
26
+ const translate: PropTypes.Requireable<(...args: any[]) => any>;
27
27
  }
28
28
  namespace propTypes {
29
29
  const username: PropTypes.Requireable<string>;
@@ -2,7 +2,7 @@ export default BrandCreateForm;
2
2
  declare function BrandCreateForm(props: any, context: any): JSX.Element;
3
3
  declare namespace BrandCreateForm {
4
4
  namespace contextTypes {
5
- const translate: PropTypes.Validator<(...args: any[]) => any>;
5
+ const translate: PropTypes.Requireable<(...args: any[]) => any>;
6
6
  }
7
7
  namespace propTypes {
8
8
  const title: PropTypes.Validator<string>;
@@ -81,7 +81,6 @@ declare namespace BrandFormGroup {
81
81
  type: PropTypes.Requireable<string>;
82
82
  size: PropTypes.Requireable<string>;
83
83
  title: PropTypes.Requireable<string>;
84
- moreAriaLabel: PropTypes.Requireable<string>;
85
84
  name: PropTypes.Requireable<string>;
86
85
  className: PropTypes.Requireable<string>;
87
86
  borderClassName: PropTypes.Requireable<string>;
@@ -99,6 +98,7 @@ declare namespace BrandFormGroup {
99
98
  }> | null | undefined)[]>;
100
99
  modified: PropTypes.Requireable<boolean>;
101
100
  error: PropTypes.Requireable<boolean>;
101
+ 'aria-label': PropTypes.Requireable<string>;
102
102
  }> | PropTypes.InferProps<{
103
103
  type: PropTypes.Requireable<string>;
104
104
  title: PropTypes.Validator<string>;
@@ -185,7 +185,6 @@ declare namespace BrandFormGroup {
185
185
  }> | PropTypes.InferProps<{
186
186
  type: PropTypes.Requireable<string>;
187
187
  title: PropTypes.Requireable<string>;
188
- moreAriaLabel: PropTypes.Requireable<string>;
189
188
  name: PropTypes.Requireable<string>;
190
189
  className: PropTypes.Requireable<string>;
191
190
  borderClassName: PropTypes.Requireable<string>;
@@ -203,6 +202,7 @@ declare namespace BrandFormGroup {
203
202
  }> | null | undefined)[]>;
204
203
  modified: PropTypes.Requireable<boolean>;
205
204
  error: PropTypes.Requireable<boolean>;
205
+ 'aria-label': PropTypes.Requireable<string>;
206
206
  }> | PropTypes.InferProps<{
207
207
  type: PropTypes.Requireable<string>;
208
208
  title: PropTypes.Validator<string>;
@@ -2,7 +2,7 @@ export default CardWithButton;
2
2
  declare function CardWithButton(props: any, context: any): JSX.Element;
3
3
  declare namespace CardWithButton {
4
4
  namespace contextTypes {
5
- const translate: PropTypes.Validator<(...args: any[]) => any>;
5
+ const translate: PropTypes.Requireable<(...args: any[]) => any>;
6
6
  const skin: PropTypes.Requireable<PropTypes.InferProps<{
7
7
  common: PropTypes.Requireable<{
8
8
  [x: string]: any;
@@ -26,7 +26,7 @@ declare namespace CookieBanner {
26
26
  [x: string]: any;
27
27
  }>;
28
28
  }>>;
29
- const translate: PropTypes.Validator<(...args: any[]) => any>;
29
+ const translate: PropTypes.Requireable<(...args: any[]) => any>;
30
30
  }
31
31
  namespace propTypes {
32
32
  const href: PropTypes.Requireable<string>;
@@ -35,7 +35,7 @@ declare class CardsList extends React.PureComponent<any, any, any> {
35
35
  [x: string]: any;
36
36
  }>;
37
37
  }>>;
38
- translate: PropTypes.Validator<(...args: any[]) => any>;
38
+ translate: PropTypes.Requireable<(...args: any[]) => any>;
39
39
  };
40
40
  constructor(props: any);
41
41
  state: {
@@ -2,7 +2,7 @@ export default DisciplinePartners;
2
2
  declare function DisciplinePartners(props: any, context: any): JSX.Element | null;
3
3
  declare namespace DisciplinePartners {
4
4
  namespace contextTypes {
5
- const translate: PropTypes.Validator<(...args: any[]) => any>;
5
+ const translate: PropTypes.Requireable<(...args: any[]) => any>;
6
6
  const skin: PropTypes.Requireable<PropTypes.InferProps<{
7
7
  common: PropTypes.Requireable<{
8
8
  [x: string]: any;
@@ -6,7 +6,7 @@ declare class ExternalContentButton extends React.Component<any, any, any> {
6
6
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
7
7
  };
8
8
  static contextTypes: {
9
- translate: PropTypes.Validator<(...args: any[]) => any>;
9
+ translate: PropTypes.Requireable<(...args: any[]) => any>;
10
10
  };
11
11
  constructor(props: any, context: any);
12
12
  handleClick: (e: any) => void;
@@ -13,7 +13,6 @@ declare class Filters extends React.Component<any, any, any> {
13
13
  }> | null | undefined)[]>;
14
14
  sorting: PropTypes.Requireable<PropTypes.InferProps<{
15
15
  title: PropTypes.Requireable<string>;
16
- moreAriaLabel: PropTypes.Requireable<string>;
17
16
  name: PropTypes.Requireable<string>;
18
17
  className: PropTypes.Requireable<string>;
19
18
  borderClassName: PropTypes.Requireable<string>;
@@ -31,6 +30,7 @@ declare class Filters extends React.Component<any, any, any> {
31
30
  }> | null | undefined)[]>;
32
31
  modified: PropTypes.Requireable<boolean>;
33
32
  error: PropTypes.Requireable<boolean>;
33
+ 'aria-label': PropTypes.Requireable<string>;
34
34
  }>>;
35
35
  onSearch: PropTypes.Requireable<(...args: any[]) => any>;
36
36
  onToggleFilters: PropTypes.Requireable<(...args: any[]) => any>;
@@ -2,7 +2,7 @@ export default ForumComment;
2
2
  declare function ForumComment(props: any, context: any): JSX.Element;
3
3
  declare namespace ForumComment {
4
4
  namespace contextTypes {
5
- const translate: PropTypes.Validator<(...args: any[]) => any>;
5
+ const translate: PropTypes.Requireable<(...args: any[]) => any>;
6
6
  const skin: PropTypes.Requireable<PropTypes.InferProps<{
7
7
  common: PropTypes.Requireable<{
8
8
  [x: string]: any;
@@ -2,7 +2,7 @@ export default ForumPost;
2
2
  declare function ForumPost(props: any, context: any): JSX.Element;
3
3
  declare namespace ForumPost {
4
4
  namespace contextTypes {
5
- const translate: PropTypes.Validator<(...args: any[]) => any>;
5
+ const translate: PropTypes.Requireable<(...args: any[]) => any>;
6
6
  const skin: PropTypes.Requireable<PropTypes.InferProps<{
7
7
  common: PropTypes.Requireable<{
8
8
  [x: string]: any;
@@ -19,7 +19,7 @@ declare class PaymentForm extends React.Component<any, any, any> {
19
19
  submitButtonEnabled: PropTypes.Requireable<boolean>;
20
20
  };
21
21
  static contextTypes: {
22
- translate: PropTypes.Validator<(...args: any[]) => any>;
22
+ translate: PropTypes.Requireable<(...args: any[]) => any>;
23
23
  };
24
24
  constructor(props: any);
25
25
  stripe: any;
@@ -2,7 +2,7 @@ export default PDF;
2
2
  declare function PDF(props: any, context: any): JSX.Element;
3
3
  declare namespace PDF {
4
4
  namespace contextTypes {
5
- const translate: PropTypes.Validator<(...args: any[]) => any>;
5
+ const translate: PropTypes.Requireable<(...args: any[]) => any>;
6
6
  const skin: PropTypes.Requireable<PropTypes.InferProps<{
7
7
  common: PropTypes.Requireable<{
8
8
  [x: string]: any;
@@ -2,7 +2,7 @@ export default ProductCard;
2
2
  declare function ProductCard(props: any, context: any): JSX.Element;
3
3
  declare namespace ProductCard {
4
4
  namespace contextTypes {
5
- const translate: PropTypes.Validator<(...args: any[]) => any>;
5
+ const translate: PropTypes.Requireable<(...args: any[]) => any>;
6
6
  }
7
7
  namespace propTypes {
8
8
  const title: PropTypes.Validator<string>;
@@ -1,16 +1,17 @@
1
1
  export default DropDown;
2
2
  declare function DropDown(props: any): JSX.Element;
3
3
  declare namespace DropDown {
4
- namespace propTypes {
5
- const onChange: PropTypes.Requireable<(...args: any[]) => any>;
6
- const options: PropTypes.Requireable<(PropTypes.InferProps<{
4
+ const propTypes: {
5
+ onChange: PropTypes.Requireable<(...args: any[]) => any>;
6
+ options: PropTypes.Requireable<(PropTypes.InferProps<{
7
7
  name: PropTypes.Validator<string>;
8
8
  value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
9
9
  selected: PropTypes.Requireable<boolean>;
10
10
  validOption: PropTypes.Requireable<boolean>;
11
11
  }> | null | undefined)[]>;
12
- const theme: PropTypes.Requireable<string>;
13
- }
12
+ theme: PropTypes.Requireable<string>;
13
+ 'aria-label': PropTypes.Requireable<string>;
14
+ };
14
15
  }
15
16
  import PropTypes from "prop-types";
16
17
  //# sourceMappingURL=index.d.ts.map
@@ -8,7 +8,8 @@ const DropDown = props => {
8
8
  const {
9
9
  options,
10
10
  onChange,
11
- theme: propsTheme
11
+ theme: propsTheme,
12
+ 'aria-label': ariaLabel
12
13
  } = props;
13
14
 
14
15
  const currentSelection = _find('selected', options);
@@ -18,6 +19,7 @@ const DropDown = props => {
18
19
  return /*#__PURE__*/React.createElement("div", {
19
20
  className: style.wrapper
20
21
  }, /*#__PURE__*/React.createElement(Select, {
22
+ "aria-label": ariaLabel,
21
23
  theme: theme,
22
24
  options: options,
23
25
  onChange: onChange
@@ -27,7 +29,8 @@ const DropDown = props => {
27
29
  DropDown.propTypes = process.env.NODE_ENV !== "production" ? {
28
30
  onChange: Select.propTypes.onChange,
29
31
  options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes)),
30
- theme: Select.propTypes.theme
32
+ theme: Select.propTypes.theme,
33
+ 'aria-label': PropTypes.string
31
34
  } : {};
32
35
  export default DropDown;
33
36
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","Select","SelectOptionPropTypes","style","DropDown","props","options","onChange","theme","propsTheme","currentSelection","defaultTheme","validOption","wrapper","propTypes","arrayOf","shape"],"sources":["../../../../src/molecule/questions/drop-down/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {find} from 'lodash/fp';\nimport Select, {SelectOptionPropTypes} from '../../../atom/select';\nimport style from './style.css';\n\nconst DropDown = props => {\n const {options, onChange, theme: propsTheme} = props;\n\n const currentSelection = find('selected', options);\n const defaultTheme =\n !currentSelection || currentSelection.validOption === false ? 'invalid' : 'question';\n\n const theme = propsTheme || defaultTheme;\n\n return (\n <div className={style.wrapper}>\n <Select theme={theme} options={options} onChange={onChange} />\n </div>\n );\n};\n\nDropDown.propTypes = {\n onChange: Select.propTypes.onChange,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes)),\n theme: Select.propTypes.theme\n};\n\nexport default DropDown;\n"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,MAAP,IAAgBC,qBAAhB,QAA4C,sBAA5C;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,QAAQ,GAAGC,KAAK,IAAI;EACxB,MAAM;IAACC,OAAD;IAAUC,QAAV;IAAoBC,KAAK,EAAEC;EAA3B,IAAyCJ,KAA/C;;EAEA,MAAMK,gBAAgB,GAAG,MAAK,UAAL,EAAiBJ,OAAjB,CAAzB;;EACA,MAAMK,YAAY,GAChB,CAACD,gBAAD,IAAqBA,gBAAgB,CAACE,WAAjB,KAAiC,KAAtD,GAA8D,SAA9D,GAA0E,UAD5E;EAGA,MAAMJ,KAAK,GAAGC,UAAU,IAAIE,YAA5B;EAEA,oBACE;IAAK,SAAS,EAAER,KAAK,CAACU;EAAtB,gBACE,oBAAC,MAAD;IAAQ,KAAK,EAAEL,KAAf;IAAsB,OAAO,EAAEF,OAA/B;IAAwC,QAAQ,EAAEC;EAAlD,EADF,CADF;AAKD,CAdD;;AAgBAH,QAAQ,CAACU,SAAT,2CAAqB;EACnBP,QAAQ,EAAEN,MAAM,CAACa,SAAP,CAAiBP,QADR;EAEnBD,OAAO,EAAEN,SAAS,CAACe,OAAV,CAAkBf,SAAS,CAACgB,KAAV,CAAgBd,qBAAhB,CAAlB,CAFU;EAGnBM,KAAK,EAAEP,MAAM,CAACa,SAAP,CAAiBN;AAHL,CAArB;AAMA,eAAeJ,QAAf"}
1
+ {"version":3,"file":"index.js","names":["React","PropTypes","Select","SelectOptionPropTypes","style","DropDown","props","options","onChange","theme","propsTheme","ariaLabel","currentSelection","defaultTheme","validOption","wrapper","propTypes","arrayOf","shape","string"],"sources":["../../../../src/molecule/questions/drop-down/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {find} from 'lodash/fp';\nimport Select, {SelectOptionPropTypes} from '../../../atom/select';\nimport style from './style.css';\n\nconst DropDown = props => {\n const {options, onChange, theme: propsTheme, 'aria-label': ariaLabel} = props;\n\n const currentSelection = find('selected', options);\n const defaultTheme =\n !currentSelection || currentSelection.validOption === false ? 'invalid' : 'question';\n\n const theme = propsTheme || defaultTheme;\n\n return (\n <div className={style.wrapper}>\n <Select aria-label={ariaLabel} theme={theme} options={options} onChange={onChange} />\n </div>\n );\n};\n\nDropDown.propTypes = {\n onChange: Select.propTypes.onChange,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes)),\n theme: Select.propTypes.theme,\n 'aria-label': PropTypes.string\n};\n\nexport default DropDown;\n"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,MAAP,IAAgBC,qBAAhB,QAA4C,sBAA5C;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,QAAQ,GAAGC,KAAK,IAAI;EACxB,MAAM;IAACC,OAAD;IAAUC,QAAV;IAAoBC,KAAK,EAAEC,UAA3B;IAAuC,cAAcC;EAArD,IAAkEL,KAAxE;;EAEA,MAAMM,gBAAgB,GAAG,MAAK,UAAL,EAAiBL,OAAjB,CAAzB;;EACA,MAAMM,YAAY,GAChB,CAACD,gBAAD,IAAqBA,gBAAgB,CAACE,WAAjB,KAAiC,KAAtD,GAA8D,SAA9D,GAA0E,UAD5E;EAGA,MAAML,KAAK,GAAGC,UAAU,IAAIG,YAA5B;EAEA,oBACE;IAAK,SAAS,EAAET,KAAK,CAACW;EAAtB,gBACE,oBAAC,MAAD;IAAQ,cAAYJ,SAApB;IAA+B,KAAK,EAAEF,KAAtC;IAA6C,OAAO,EAAEF,OAAtD;IAA+D,QAAQ,EAAEC;EAAzE,EADF,CADF;AAKD,CAdD;;AAgBAH,QAAQ,CAACW,SAAT,2CAAqB;EACnBR,QAAQ,EAAEN,MAAM,CAACc,SAAP,CAAiBR,QADR;EAEnBD,OAAO,EAAEN,SAAS,CAACgB,OAAV,CAAkBhB,SAAS,CAACiB,KAAV,CAAgBf,qBAAhB,CAAlB,CAFU;EAGnBM,KAAK,EAAEP,MAAM,CAACc,SAAP,CAAiBP,KAHL;EAInB,cAAcR,SAAS,CAACkB;AAJL,CAArB;AAOA,eAAed,QAAf"}
@@ -15,6 +15,7 @@ declare namespace Template {
15
15
  validOption: PropTypes.Requireable<boolean>;
16
16
  }> | null | undefined)[]>;
17
17
  theme: PropTypes.Requireable<string>;
18
+ 'aria-label': PropTypes.Requireable<string>;
18
19
  }, never>> & Partial<PropTypes.InferPropsInner<Pick<{
19
20
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
20
21
  options: PropTypes.Requireable<(PropTypes.InferProps<{
@@ -24,7 +25,8 @@ declare namespace Template {
24
25
  validOption: PropTypes.Requireable<boolean>;
25
26
  }> | null | undefined)[]>;
26
27
  theme: PropTypes.Requireable<string>;
27
- }, "onChange" | "theme" | "options">>>) | null | undefined)[]>;
28
+ 'aria-label': PropTypes.Requireable<string>;
29
+ }, "aria-label" | "onChange" | "theme" | "options">>>) | null | undefined)[]>;
28
30
  }
29
31
  }
30
32
  import PropTypes from "prop-types";
@@ -16,7 +16,7 @@ declare const _default: {
16
16
  'aria-label': PropTypes.Requireable<string>;
17
17
  'data-name': PropTypes.Requireable<string>;
18
18
  animationLottie: PropTypes.Requireable<PropTypes.InferProps<{
19
- 'aria-label': PropTypes.Validator<string>;
19
+ 'aria-label': PropTypes.Requireable<string>;
20
20
  'data-name': PropTypes.Requireable<string>;
21
21
  animationSrc: PropTypes.Validator<string>;
22
22
  loop: PropTypes.Requireable<boolean>;
@@ -23,7 +23,7 @@ declare namespace ScopeContent {
23
23
  [x: string]: any;
24
24
  }>;
25
25
  }>>;
26
- const translate: PropTypes.Validator<(...args: any[]) => any>;
26
+ const translate: PropTypes.Requireable<(...args: any[]) => any>;
27
27
  }
28
28
  namespace propTypes {
29
29
  const content: PropTypes.Requireable<PropTypes.InferProps<{
@@ -2,7 +2,7 @@ export default SetupSection;
2
2
  declare function SetupSection(props: any, context: any): JSX.Element;
3
3
  declare namespace SetupSection {
4
4
  namespace contextTypes {
5
- const translate: PropTypes.Validator<(...args: any[]) => any>;
5
+ const translate: PropTypes.Requireable<(...args: any[]) => any>;
6
6
  const skin: PropTypes.Requireable<PropTypes.InferProps<{
7
7
  common: PropTypes.Requireable<{
8
8
  [x: string]: any;
@@ -39,7 +39,6 @@ declare namespace SetupSlide {
39
39
  }> | PropTypes.InferProps<{
40
40
  type: PropTypes.Requireable<string>;
41
41
  title: PropTypes.Requireable<string>;
42
- moreAriaLabel: PropTypes.Requireable<string>;
43
42
  name: PropTypes.Requireable<string>;
44
43
  className: PropTypes.Requireable<string>;
45
44
  borderClassName: PropTypes.Requireable<string>;
@@ -57,6 +56,7 @@ declare namespace SetupSlide {
57
56
  }> | null | undefined)[]>;
58
57
  modified: PropTypes.Requireable<boolean>;
59
58
  error: PropTypes.Requireable<boolean>;
59
+ 'aria-label': PropTypes.Requireable<string>;
60
60
  }> | PropTypes.InferProps<{
61
61
  type: PropTypes.Requireable<string>;
62
62
  title: PropTypes.Validator<string>;
@@ -52,7 +52,6 @@ declare namespace SetupSlider {
52
52
  }> | PropTypes.InferProps<{
53
53
  type: PropTypes.Requireable<string>;
54
54
  title: PropTypes.Requireable<string>;
55
- moreAriaLabel: PropTypes.Requireable<string>;
56
55
  name: PropTypes.Requireable<string>;
57
56
  className: PropTypes.Requireable<string>;
58
57
  borderClassName: PropTypes.Requireable<string>;
@@ -70,6 +69,7 @@ declare namespace SetupSlider {
70
69
  }> | null | undefined)[]>;
71
70
  modified: PropTypes.Requireable<boolean>;
72
71
  error: PropTypes.Requireable<boolean>;
72
+ 'aria-label': PropTypes.Requireable<string>;
73
73
  }> | PropTypes.InferProps<{
74
74
  type: PropTypes.Requireable<string>;
75
75
  title: PropTypes.Validator<string>;
@@ -2,7 +2,7 @@ export default SubscriptionFreemiumDetails;
2
2
  declare function SubscriptionFreemiumDetails(props: any, context: any): JSX.Element;
3
3
  declare namespace SubscriptionFreemiumDetails {
4
4
  namespace contextTypes {
5
- const translate: PropTypes.Validator<(...args: any[]) => any>;
5
+ const translate: PropTypes.Requireable<(...args: any[]) => any>;
6
6
  }
7
7
  namespace propTypes {
8
8
  const onSubscriptionFreemiumButtonClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -2,7 +2,7 @@ export default SubscriptionPremiumDetails;
2
2
  declare function SubscriptionPremiumDetails(props: any, context: any): JSX.Element;
3
3
  declare namespace SubscriptionPremiumDetails {
4
4
  namespace contextTypes {
5
- const translate: PropTypes.Validator<(...args: any[]) => any>;
5
+ const translate: PropTypes.Requireable<(...args: any[]) => any>;
6
6
  }
7
7
  namespace propTypes {
8
8
  const checkImage: PropTypes.Requireable<string>;
@@ -23,7 +23,7 @@ declare namespace Table {
23
23
  [x: string]: any;
24
24
  }>;
25
25
  }>>;
26
- const translate: PropTypes.Validator<(...args: any[]) => any>;
26
+ const translate: PropTypes.Requireable<(...args: any[]) => any>;
27
27
  }
28
28
  namespace propTypes {
29
29
  const editable: PropTypes.Requireable<boolean>;
@@ -2,7 +2,7 @@ export default Unsubscribe;
2
2
  declare function Unsubscribe(props: any, context: any): JSX.Element;
3
3
  declare namespace Unsubscribe {
4
4
  namespace contextTypes {
5
- const translate: PropTypes.Validator<(...args: any[]) => any>;
5
+ const translate: PropTypes.Requireable<(...args: any[]) => any>;
6
6
  }
7
7
  namespace propTypes {
8
8
  const moocUrl: PropTypes.Requireable<string>;
@@ -23,7 +23,7 @@ declare namespace BrandAnalytics {
23
23
  [x: string]: any;
24
24
  }>;
25
25
  }>>;
26
- const translate: PropTypes.Validator<(...args: any[]) => any>;
26
+ const translate: PropTypes.Requireable<(...args: any[]) => any>;
27
27
  }
28
28
  namespace propTypes {
29
29
  const dashboards: PropTypes.Requireable<(PropTypes.InferProps<{
@@ -111,7 +111,6 @@ declare namespace BrandForm {
111
111
  type: PropTypes.Requireable<string>;
112
112
  size: PropTypes.Requireable<string>;
113
113
  title: PropTypes.Requireable<string>;
114
- moreAriaLabel: PropTypes.Requireable<string>;
115
114
  name: PropTypes.Requireable<string>;
116
115
  className: PropTypes.Requireable<string>;
117
116
  borderClassName: PropTypes.Requireable<string>;
@@ -129,6 +128,7 @@ declare namespace BrandForm {
129
128
  }> | null | undefined)[]>;
130
129
  modified: PropTypes.Requireable<boolean>;
131
130
  error: PropTypes.Requireable<boolean>;
131
+ 'aria-label': PropTypes.Requireable<string>;
132
132
  }> | PropTypes.InferProps<{
133
133
  type: PropTypes.Requireable<string>;
134
134
  title: PropTypes.Validator<string>;
@@ -215,7 +215,6 @@ declare namespace BrandForm {
215
215
  }> | PropTypes.InferProps<{
216
216
  type: PropTypes.Requireable<string>;
217
217
  title: PropTypes.Requireable<string>;
218
- moreAriaLabel: PropTypes.Requireable<string>;
219
218
  name: PropTypes.Requireable<string>;
220
219
  className: PropTypes.Requireable<string>;
221
220
  borderClassName: PropTypes.Requireable<string>;
@@ -233,6 +232,7 @@ declare namespace BrandForm {
233
232
  }> | null | undefined)[]>;
234
233
  modified: PropTypes.Requireable<boolean>;
235
234
  error: PropTypes.Requireable<boolean>;
235
+ 'aria-label': PropTypes.Requireable<string>;
236
236
  }> | PropTypes.InferProps<{
237
237
  type: PropTypes.Requireable<string>;
238
238
  title: PropTypes.Validator<string>;
@@ -2,7 +2,7 @@ export default Cart;
2
2
  declare function Cart(props: any, context: any): JSX.Element;
3
3
  declare namespace Cart {
4
4
  namespace contextTypes {
5
- const translate: PropTypes.Validator<(...args: any[]) => any>;
5
+ const translate: PropTypes.Requireable<(...args: any[]) => any>;
6
6
  }
7
7
  namespace propTypes {
8
8
  const productCardProps: PropTypes.Requireable<PropTypes.InferProps<{