@coorpacademy/components 11.32.21 → 11.32.23-alpha.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.
Files changed (213) hide show
  1. package/es/atom/radio-with-title/index.d.ts +3 -0
  2. package/es/atom/radio-with-title/index.d.ts.map +1 -1
  3. package/es/atom/radio-with-title/types.d.ts +3 -0
  4. package/es/atom/radio-with-title/types.d.ts.map +1 -1
  5. package/es/atom/tag/index.d.ts +5 -1
  6. package/es/atom/tag/index.d.ts.map +1 -1
  7. package/es/atom/tag/index.js +6 -3
  8. package/es/atom/tag/index.js.map +1 -1
  9. package/es/atom/title/index.d.ts +3 -0
  10. package/es/molecule/cm-popin/types.d.ts +7 -0
  11. package/es/molecule/cm-popin/types.d.ts.map +1 -1
  12. package/es/molecule/draggable-list/index.d.ts +12 -0
  13. package/es/molecule/draggable-list/index.d.ts.map +1 -1
  14. package/es/molecule/draggable-list/index.js +4 -2
  15. package/es/molecule/draggable-list/index.js.map +1 -1
  16. package/es/molecule/learning-priority-modal/index.d.ts +30 -0
  17. package/es/molecule/learning-priority-modal/index.d.ts.map +1 -0
  18. package/es/molecule/learning-priority-modal/index.js +242 -0
  19. package/es/molecule/learning-priority-modal/index.js.map +1 -0
  20. package/es/molecule/learning-priority-modal/style.css +70 -0
  21. package/es/molecule/learning-priority-setup-item/index.d.ts +18 -0
  22. package/es/molecule/learning-priority-setup-item/index.d.ts.map +1 -0
  23. package/es/molecule/learning-priority-setup-item/index.js +83 -0
  24. package/es/molecule/learning-priority-setup-item/index.js.map +1 -0
  25. package/es/molecule/learning-priority-setup-item/style.css +47 -0
  26. package/es/molecule/playlist-detail-cover/index.d.ts +14 -0
  27. package/es/molecule/playlist-detail-cover/index.d.ts.map +1 -0
  28. package/es/molecule/playlist-detail-cover/index.js +52 -0
  29. package/es/molecule/playlist-detail-cover/index.js.map +1 -0
  30. package/es/molecule/playlist-detail-cover/style.css +17 -0
  31. package/es/molecule/title-and-checkbox-wrapper/index.d.ts +3 -0
  32. package/es/molecule/title-radio-wrapper/index.d.ts +3 -0
  33. package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
  34. package/es/molecule/title-radio-wrapper/types.d.ts +3 -0
  35. package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
  36. package/es/organism/brand-learning-priorities/index.d.ts +167 -0
  37. package/es/organism/brand-learning-priorities/index.d.ts.map +1 -0
  38. package/es/organism/brand-learning-priorities/index.js +128 -0
  39. package/es/organism/brand-learning-priorities/index.js.map +1 -0
  40. package/es/organism/brand-learning-priorities/style.css +40 -0
  41. package/es/organism/list-item/index.d.ts +34 -2
  42. package/es/organism/list-item/index.d.ts.map +1 -1
  43. package/es/organism/list-item/index.js +58 -14
  44. package/es/organism/list-item/index.js.map +1 -1
  45. package/es/organism/list-item/style.css +25 -1
  46. package/es/organism/list-items/index.d.ts +4 -0
  47. package/es/organism/rewards-form/index.d.ts +3 -0
  48. package/es/organism/select-opponents/index.d.ts +3 -0
  49. package/es/organism/select-opponents/index.d.ts.map +1 -1
  50. package/es/organism/select-opponents/types.d.ts +3 -0
  51. package/es/organism/select-opponents/types.d.ts.map +1 -1
  52. package/es/organism/title-and-input/index.d.ts +6 -0
  53. package/es/organism/title-and-input/index.d.ts.map +1 -1
  54. package/es/organism/title-and-input/types.d.ts +6 -0
  55. package/es/organism/title-and-input/types.d.ts.map +1 -1
  56. package/es/organism/wizard-contents/index.d.ts +3 -0
  57. package/es/template/app-player/loading/index.d.ts +7 -0
  58. package/es/template/app-player/player/index.d.ts +14 -0
  59. package/es/template/app-player/player/slides/index.d.ts +7 -0
  60. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  61. package/es/template/app-player/popin-correction/index.d.ts +7 -0
  62. package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
  63. package/es/template/app-player/popin-end/index.d.ts +7 -0
  64. package/es/template/app-review/index.d.ts +7 -0
  65. package/es/template/app-review/index.d.ts.map +1 -1
  66. package/es/template/app-review/player/prop-types.d.ts +7 -0
  67. package/es/template/app-review/player/prop-types.d.ts.map +1 -1
  68. package/es/template/app-review/prop-types.d.ts +7 -0
  69. package/es/template/app-review/prop-types.d.ts.map +1 -1
  70. package/es/template/back-office/brand-update/index.d.ts +149 -0
  71. package/es/template/back-office/brand-update/index.d.ts.map +1 -1
  72. package/es/template/back-office/brand-update/index.js +7 -0
  73. package/es/template/back-office/brand-update/index.js.map +1 -1
  74. package/es/template/common/dashboard/index.d.ts +14 -0
  75. package/es/template/common/search-page/index.d.ts +7 -0
  76. package/es/template/external-course/index.d.ts +7 -0
  77. package/es/template/playlist-detail/index.d.ts +96 -0
  78. package/es/template/playlist-detail/index.d.ts.map +1 -0
  79. package/es/template/playlist-detail/index.js +112 -0
  80. package/es/template/playlist-detail/index.js.map +1 -0
  81. package/es/template/playlist-detail/style.css +109 -0
  82. package/es/template/skill-detail/all-courses.d.ts +1 -1
  83. package/es/template/skill-detail/all-courses.js +3 -3
  84. package/es/template/skill-detail/all-courses.js.map +1 -1
  85. package/es/template/skill-detail/index.d.ts +39 -4
  86. package/es/template/skill-detail/index.d.ts.map +1 -1
  87. package/es/template/skill-detail/index.js +2 -4
  88. package/es/template/skill-detail/index.js.map +1 -1
  89. package/es/variables/courses.d.ts +3 -0
  90. package/es/variables/courses.d.ts.map +1 -0
  91. package/es/variables/courses.js +3 -0
  92. package/es/variables/courses.js.map +1 -0
  93. package/lib/atom/radio-with-title/index.d.ts +3 -0
  94. package/lib/atom/radio-with-title/index.d.ts.map +1 -1
  95. package/lib/atom/radio-with-title/types.d.ts +3 -0
  96. package/lib/atom/radio-with-title/types.d.ts.map +1 -1
  97. package/lib/atom/tag/index.d.ts +5 -1
  98. package/lib/atom/tag/index.d.ts.map +1 -1
  99. package/lib/atom/tag/index.js +6 -3
  100. package/lib/atom/tag/index.js.map +1 -1
  101. package/lib/atom/title/index.d.ts +3 -0
  102. package/lib/molecule/cm-popin/types.d.ts +7 -0
  103. package/lib/molecule/cm-popin/types.d.ts.map +1 -1
  104. package/lib/molecule/draggable-list/index.d.ts +12 -0
  105. package/lib/molecule/draggable-list/index.d.ts.map +1 -1
  106. package/lib/molecule/draggable-list/index.js +5 -2
  107. package/lib/molecule/draggable-list/index.js.map +1 -1
  108. package/lib/molecule/learning-priority-modal/index.d.ts +30 -0
  109. package/lib/molecule/learning-priority-modal/index.d.ts.map +1 -0
  110. package/lib/molecule/learning-priority-modal/index.js +265 -0
  111. package/lib/molecule/learning-priority-modal/index.js.map +1 -0
  112. package/lib/molecule/learning-priority-modal/style.css +70 -0
  113. package/lib/molecule/learning-priority-setup-item/index.d.ts +18 -0
  114. package/lib/molecule/learning-priority-setup-item/index.d.ts.map +1 -0
  115. package/lib/molecule/learning-priority-setup-item/index.js +100 -0
  116. package/lib/molecule/learning-priority-setup-item/index.js.map +1 -0
  117. package/lib/molecule/learning-priority-setup-item/style.css +47 -0
  118. package/lib/molecule/playlist-detail-cover/index.d.ts +14 -0
  119. package/lib/molecule/playlist-detail-cover/index.d.ts.map +1 -0
  120. package/lib/molecule/playlist-detail-cover/index.js +68 -0
  121. package/lib/molecule/playlist-detail-cover/index.js.map +1 -0
  122. package/lib/molecule/playlist-detail-cover/style.css +17 -0
  123. package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +3 -0
  124. package/lib/molecule/title-radio-wrapper/index.d.ts +3 -0
  125. package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
  126. package/lib/molecule/title-radio-wrapper/types.d.ts +3 -0
  127. package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
  128. package/lib/organism/brand-learning-priorities/index.d.ts +167 -0
  129. package/lib/organism/brand-learning-priorities/index.d.ts.map +1 -0
  130. package/lib/organism/brand-learning-priorities/index.js +147 -0
  131. package/lib/organism/brand-learning-priorities/index.js.map +1 -0
  132. package/lib/organism/brand-learning-priorities/style.css +40 -0
  133. package/lib/organism/list-item/index.d.ts +34 -2
  134. package/lib/organism/list-item/index.d.ts.map +1 -1
  135. package/lib/organism/list-item/index.js +62 -16
  136. package/lib/organism/list-item/index.js.map +1 -1
  137. package/lib/organism/list-item/style.css +25 -1
  138. package/lib/organism/list-items/index.d.ts +4 -0
  139. package/lib/organism/rewards-form/index.d.ts +3 -0
  140. package/lib/organism/select-opponents/index.d.ts +3 -0
  141. package/lib/organism/select-opponents/index.d.ts.map +1 -1
  142. package/lib/organism/select-opponents/types.d.ts +3 -0
  143. package/lib/organism/select-opponents/types.d.ts.map +1 -1
  144. package/lib/organism/title-and-input/index.d.ts +6 -0
  145. package/lib/organism/title-and-input/index.d.ts.map +1 -1
  146. package/lib/organism/title-and-input/types.d.ts +6 -0
  147. package/lib/organism/title-and-input/types.d.ts.map +1 -1
  148. package/lib/organism/wizard-contents/index.d.ts +3 -0
  149. package/lib/template/app-player/loading/index.d.ts +7 -0
  150. package/lib/template/app-player/player/index.d.ts +14 -0
  151. package/lib/template/app-player/player/slides/index.d.ts +7 -0
  152. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  153. package/lib/template/app-player/popin-correction/index.d.ts +7 -0
  154. package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
  155. package/lib/template/app-player/popin-end/index.d.ts +7 -0
  156. package/lib/template/app-review/index.d.ts +7 -0
  157. package/lib/template/app-review/index.d.ts.map +1 -1
  158. package/lib/template/app-review/player/prop-types.d.ts +7 -0
  159. package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
  160. package/lib/template/app-review/prop-types.d.ts +7 -0
  161. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  162. package/lib/template/back-office/brand-update/index.d.ts +149 -0
  163. package/lib/template/back-office/brand-update/index.d.ts.map +1 -1
  164. package/lib/template/back-office/brand-update/index.js +8 -0
  165. package/lib/template/back-office/brand-update/index.js.map +1 -1
  166. package/lib/template/common/dashboard/index.d.ts +14 -0
  167. package/lib/template/common/search-page/index.d.ts +7 -0
  168. package/lib/template/external-course/index.d.ts +7 -0
  169. package/lib/template/playlist-detail/index.d.ts +96 -0
  170. package/lib/template/playlist-detail/index.d.ts.map +1 -0
  171. package/lib/template/playlist-detail/index.js +137 -0
  172. package/lib/template/playlist-detail/index.js.map +1 -0
  173. package/lib/template/playlist-detail/style.css +109 -0
  174. package/lib/template/skill-detail/all-courses.d.ts +1 -1
  175. package/lib/template/skill-detail/all-courses.js +3 -3
  176. package/lib/template/skill-detail/all-courses.js.map +1 -1
  177. package/lib/template/skill-detail/index.d.ts +39 -4
  178. package/lib/template/skill-detail/index.d.ts.map +1 -1
  179. package/lib/template/skill-detail/index.js +3 -2
  180. package/lib/template/skill-detail/index.js.map +1 -1
  181. package/lib/variables/courses.d.ts +3 -0
  182. package/lib/variables/courses.d.ts.map +1 -0
  183. package/lib/variables/courses.js +7 -0
  184. package/lib/variables/courses.js.map +1 -0
  185. package/locales/bs/global.json +13 -1
  186. package/locales/cs/global.json +13 -1
  187. package/locales/de/global.json +13 -1
  188. package/locales/en/global.json +12 -0
  189. package/locales/es/global.json +13 -1
  190. package/locales/et/global.json +13 -1
  191. package/locales/fi/global.json +13 -1
  192. package/locales/fr/global.json +13 -1
  193. package/locales/hr/global.json +13 -1
  194. package/locales/hu/global.json +13 -1
  195. package/locales/hy/global.json +13 -1
  196. package/locales/it/global.json +13 -1
  197. package/locales/ja/global.json +13 -1
  198. package/locales/ko/global.json +13 -1
  199. package/locales/nl/global.json +13 -1
  200. package/locales/pl/global.json +13 -1
  201. package/locales/pt/global.json +13 -1
  202. package/locales/ro/global.json +13 -1
  203. package/locales/ru/global.json +13 -1
  204. package/locales/sk/global.json +13 -1
  205. package/locales/sl/global.json +13 -1
  206. package/locales/sv/global.json +13 -1
  207. package/locales/tl/global.json +13 -1
  208. package/locales/tr/global.json +13 -1
  209. package/locales/uk/global.json +13 -1
  210. package/locales/vi/global.json +13 -1
  211. package/locales/zh/global.json +13 -1
  212. package/locales/zh_TW/global.json +13 -1
  213. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["getStyle","isSelected","style","selectedElement","unselectedElement","subTabsView","_subTabs","map","convert","cap","subTab","_index","title","type","selected","buildLeftNavigation","logo","items","onItemClick","formattedTabs","key","href","index","children","iconType","formattedTabsViews","tab","tabs","navigation","buildNotifications","notifications","isEmpty","notificationsList","notification","temporary","permanentNotification","find","permanentNotifications","buildHeader","header","buildPopin","popin","buildDocumentation","documentation","show","onClose","content","classNames","open","documentationContent","__html","closeButton","buildTabs","selectedTab","pipe","e","get","showTabs","subTabs","undefined","buildContentView","loaderContainer","loader","buildDetailsView","details","BrandUpdate","props","contentFixHeight","leftNavigation","notificationsView","documentationView","headerView","tabsView","contentView","detailsView","popinView","contentStyle","contentWithNotifications","container","left","contentWrapper","headerSticky","defaultProps","propTypes","PropTypes","arrayOf","shape","Banner","Header","string","isRequired","bool","oneOfType","BrandForm","oneOf","BrandTable","BrandUpload","BrandAnalytics","BrandDashboard","WizardContents","ListItems","BulkInfos","ExpandibleActionableTable","func","CmPopin"],"sources":["../../../../src/template/back-office/brand-update/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport map from 'lodash/fp/map';\nimport pipe from 'lodash/fp/pipe';\nimport get from 'lodash/fp/get';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport find from 'lodash/fp/find';\nimport classNames from 'classnames';\nimport BrandTabs from '../../../molecule/brand-tabs';\nimport {IconLinkItem, LinkItem} from '../../../organism/sidebar';\nimport BrandForm from '../../../organism/brand-form';\nimport BrandTable from '../../../organism/brand-table';\nimport BrandUpload from '../../../organism/brand-upload';\nimport BrandAnalytics from '../../../organism/brand-analytics';\nimport BrandDashboard from '../../../organism/brand-dashboard';\nimport WizardContents from '../../../organism/wizard-contents';\nimport ListItems from '../../../organism/list-items';\nimport Banner from '../../../molecule/banner';\nimport Header from '../../../organism/setup-header';\nimport Loader from '../../../atom/loader';\nimport Accordion from '../../../organism/accordion/coorp-manager';\nimport CmPopin from '../../../molecule/cm-popin';\nimport ButtonLinkIconOnly from '../../../atom/button-link-icon-only';\nimport ExpandibleActionableTable from '../../../molecule/expandible-actionable-table';\nimport BulkInfos from '../../../molecule/bulk-infos';\nimport style from './style.css';\n\nconst getStyle = isSelected => (isSelected ? style.selectedElement : style.unselectedElement);\n\nconst subTabsView = (_subTabs = []) =>\n map.convert({cap: false})((subTab, _index) => (\n <div key={subTab.title}>\n {subTab.type === 'iconLink' ? (\n <IconLinkItem\n {...subTab}\n styles={getStyle(subTab.selected)}\n uppercase={false}\n target={'_blank'}\n />\n ) : (\n <LinkItem\n {...subTab}\n styles={getStyle(subTab.selected)}\n uppercase={false}\n setChildrenAsHtml={false}\n />\n )}\n </div>\n ))(_subTabs);\n\n// TODO: this fonction should be replaced by a molecule to avoid this file to be unreadable\nconst buildLeftNavigation = (logo, items, onItemClick) => {\n const formattedTabs = items.map(({key, title, href, selected, type = 'simpleTab'}, index) => ({\n title,\n selected,\n type,\n href,\n index,\n children: [],\n iconType: key || 'arrow'\n }));\n\n const formattedTabsViews = map(tab => (\n <div key={tab.title} className={style.subTabsView}>\n {subTabsView(tab.tabs)}\n </div>\n ))(items);\n\n return (\n <div className={style.navigation}>\n <div className={style.logo}>\n <a href=\"/\">\n <img src={logo} />\n </a>\n </div>\n <Accordion tabProps={formattedTabs} theme={'setup'} onClick={onItemClick}>\n {formattedTabsViews}\n </Accordion>\n </div>\n );\n};\n\nconst buildNotifications = notifications => {\n if (isEmpty(notifications)) {\n return null;\n }\n\n const notificationsList = notifications.map((notification, index) => {\n return (\n <div className={!notification.temporary ? style.permanentNotification : null} key={index}>\n <Banner {...notification} />\n </div>\n );\n });\n return (\n <div className={!find({temporary: true}, notifications) ? style.permanentNotifications : null}>\n {notificationsList}\n </div>\n );\n};\n\nconst buildHeader = header => {\n return (\n <div className={style.header}>\n <Header {...header} />\n </div>\n );\n};\n\nconst buildPopin = popin => {\n return popin ? (\n <div className={style.popin}>\n <CmPopin {...popin} />\n </div>\n ) : null;\n};\n\nconst buildDocumentation = documentation => {\n if (!documentation) return null;\n const {show = false, onClose, content = ''} = documentation;\n return (\n <div className={classNames(style.documentation, show && style.open)}>\n <div\n className={style.documentationContent}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n {onClose ? (\n <ButtonLinkIconOnly\n className={style.closeButton}\n onClick={onClose}\n data-name={'close-icon'}\n aria-label={'close-icon'}\n size=\"small\"\n icon=\"close\"\n />\n ) : null}\n </div>\n );\n};\n\nconst buildTabs = items => {\n const selectedTab = pipe(\n find(e => e.selected),\n get('tabs'),\n find(e => e.selected)\n )(items);\n\n const showTabs = selectedTab ? find(e => e.selected, selectedTab.subTabs) : undefined;\n if (!showTabs) return null;\n return (\n <div className={style.tabs}>\n <BrandTabs type=\"light\" tabs={selectedTab.subTabs} />\n </div>\n );\n};\n\nconst buildContentView = content => {\n if (!content) {\n return (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n );\n }\n\n const {type} = content;\n switch (type) {\n case 'form':\n return <BrandForm {...content} />;\n case 'list':\n return <BrandTable {...content} />;\n case 'upload':\n return <BrandUpload {...content} />;\n case 'analytics-dashboards':\n return <BrandAnalytics {...content} />;\n case 'list-content':\n case 'expandible-actionable-table':\n return <ListItems {...content} />;\n case 'home':\n return <BrandDashboard {...content} />;\n case 'wizard':\n case 'expandible-table':\n return <WizardContents {...content} />;\n case 'bulk-empty-dashboard':\n return <BulkInfos {...content} />;\n case 'table-pending':\n return <ExpandibleActionableTable {...content} />;\n }\n};\n\nconst buildDetailsView = details => {\n if (!details) return;\n return <BrandTable {...details} />;\n};\n\nconst BrandUpdate = props => {\n const {\n notifications,\n header,\n items,\n content,\n details,\n popin,\n onItemClick,\n documentation,\n contentFixHeight\n } = props;\n const logo = 'https://static.coorpacademy.com/logo/coorp-manager.svg';\n\n const leftNavigation = buildLeftNavigation(logo, items, onItemClick);\n const notificationsView = buildNotifications(notifications);\n const documentationView = buildDocumentation(documentation);\n const headerView = buildHeader(header, notifications);\n const tabsView = buildTabs(items);\n const contentView = buildContentView(content);\n const detailsView = buildDetailsView(details);\n const popinView = buildPopin(popin);\n\n const contentStyle = classNames([\n style.content,\n !isEmpty(notifications) && style.contentWithNotifications,\n contentFixHeight && style.contentFixHeight\n ]);\n\n return (\n <div className={style.container}>\n <div className={style.left}>{leftNavigation}</div>\n <div className={style.contentWrapper}>\n <div className={style.headerSticky}>{headerView}</div>\n <div className={contentStyle}>\n {notificationsView}\n {tabsView}\n {contentView}\n {detailsView}\n {documentationView}\n </div>\n </div>\n {popinView}\n </div>\n );\n};\n\nBrandUpdate.defaultProps = {\n notifications: []\n};\n\nBrandUpdate.propTypes = {\n notifications: PropTypes.arrayOf(\n PropTypes.shape({\n ...Banner.propTypes\n })\n ),\n header: PropTypes.shape({...Header.propTypes}),\n items: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.string,\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string,\n tabs: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string,\n subTabs: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string\n })\n )\n })\n )\n })\n ).isRequired,\n content: PropTypes.oneOfType([\n PropTypes.shape({\n ...BrandForm.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['form'])\n }),\n PropTypes.shape({\n ...BrandTable.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list'])\n }),\n PropTypes.shape({\n ...BrandUpload.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['upload'])\n }),\n PropTypes.shape({\n ...BrandAnalytics.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['analytics-dashboards'])\n }),\n PropTypes.shape({\n ...BrandDashboard.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['home'])\n }),\n PropTypes.shape({\n ...WizardContents.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['wizard'])\n }),\n PropTypes.shape({\n ...ListItems.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list-content', 'expandible-actionable-table'])\n }),\n PropTypes.shape({\n ...BulkInfos.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['bulk-empty-dashboard'])\n }),\n PropTypes.shape({\n ...ExpandibleActionableTable.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['table-pending'])\n }),\n PropTypes.shape({\n ...WizardContents.propTypes,\n content: PropTypes.shape({\n ...ExpandibleActionableTable.propTypes,\n ...WizardContents.propTypes.content.propTypes\n }),\n key: PropTypes.string,\n type: PropTypes.oneOf(['expandible-table'])\n })\n ]),\n documentation: PropTypes.shape({\n content: PropTypes.string,\n show: PropTypes.bool,\n onClose: PropTypes.func\n }),\n popin: PropTypes.shape({...CmPopin.propTypes}),\n details: PropTypes.shape({\n ...BrandTable.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list'])\n }),\n onItemClick: PropTypes.func,\n contentFixHeight: PropTypes.bool\n};\n\nexport default BrandUpdate;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,QAAQ,GAAGC,UAAU,IAAKA,UAAU,GAAGC,cAAA,CAAMC,eAAT,GAA2BD,cAAA,CAAME,iBAA3E;;AAEA,MAAMC,WAAW,GAAG,CAACC,QAAQ,GAAG,EAAZ,KAClBC,YAAA,CAAIC,OAAJ,CAAY;EAACC,GAAG,EAAE;AAAN,CAAZ,EAA0B,CAACC,MAAD,EAASC,MAAT,kBACxB;EAAK,GAAG,EAAED,MAAM,CAACE;AAAjB,GAC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Tabs","map","convert","cap","subTab","_index","title","type","selected","buildLeftNavigation","logo","items","onItemClick","formattedTabs","key","href","index","children","iconType","formattedTabsViews","tab","tabs","navigation","buildNotifications","notifications","isEmpty","notificationsList","notification","temporary","permanentNotification","find","permanentNotifications","buildHeader","header","buildPopin","popin","buildDocumentation","documentation","show","onClose","content","classNames","open","documentationContent","__html","closeButton","buildTabs","selectedTab","pipe","e","get","showTabs","subTabs","undefined","buildContentView","loaderContainer","loader","buildDetailsView","details","BrandUpdate","props","contentFixHeight","leftNavigation","notificationsView","documentationView","headerView","tabsView","contentView","detailsView","popinView","contentStyle","contentWithNotifications","container","left","contentWrapper","headerSticky","defaultProps","propTypes","PropTypes","arrayOf","shape","Banner","Header","string","isRequired","bool","oneOfType","BrandForm","oneOf","BrandTable","BrandUpload","BrandAnalytics","BrandDashboard","WizardContents","ListItems","BulkInfos","ExpandibleActionableTable","BrandLearningPriorities","func","CmPopin"],"sources":["../../../../src/template/back-office/brand-update/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport map from 'lodash/fp/map';\nimport pipe from 'lodash/fp/pipe';\nimport get from 'lodash/fp/get';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport find from 'lodash/fp/find';\nimport classNames from 'classnames';\nimport BrandTabs from '../../../molecule/brand-tabs';\nimport {IconLinkItem, LinkItem} from '../../../organism/sidebar';\nimport BrandForm from '../../../organism/brand-form';\nimport BrandTable from '../../../organism/brand-table';\nimport BrandUpload from '../../../organism/brand-upload';\nimport BrandAnalytics from '../../../organism/brand-analytics';\nimport BrandDashboard from '../../../organism/brand-dashboard';\nimport WizardContents from '../../../organism/wizard-contents';\nimport ListItems from '../../../organism/list-items';\nimport BrandLearningPriorities from '../../../organism/brand-learning-priorities';\nimport Banner from '../../../molecule/banner';\nimport Header from '../../../organism/setup-header';\nimport Loader from '../../../atom/loader';\nimport Accordion from '../../../organism/accordion/coorp-manager';\nimport CmPopin from '../../../molecule/cm-popin';\nimport ButtonLinkIconOnly from '../../../atom/button-link-icon-only';\nimport ExpandibleActionableTable from '../../../molecule/expandible-actionable-table';\nimport BulkInfos from '../../../molecule/bulk-infos';\nimport style from './style.css';\n\nconst getStyle = isSelected => (isSelected ? style.selectedElement : style.unselectedElement);\n\nconst subTabsView = (_subTabs = []) =>\n map.convert({cap: false})((subTab, _index) => (\n <div key={subTab.title}>\n {subTab.type === 'iconLink' ? (\n <IconLinkItem\n {...subTab}\n styles={getStyle(subTab.selected)}\n uppercase={false}\n target={'_blank'}\n />\n ) : (\n <LinkItem\n {...subTab}\n styles={getStyle(subTab.selected)}\n uppercase={false}\n setChildrenAsHtml={false}\n />\n )}\n </div>\n ))(_subTabs);\n\n// TODO: this fonction should be replaced by a molecule to avoid this file to be unreadable\nconst buildLeftNavigation = (logo, items, onItemClick) => {\n const formattedTabs = items.map(({key, title, href, selected, type = 'simpleTab'}, index) => ({\n title,\n selected,\n type,\n href,\n index,\n children: [],\n iconType: key || 'arrow'\n }));\n\n const formattedTabsViews = map(tab => (\n <div key={tab.title} className={style.subTabsView}>\n {subTabsView(tab.tabs)}\n </div>\n ))(items);\n\n return (\n <div className={style.navigation}>\n <div className={style.logo}>\n <a href=\"/\">\n <img src={logo} />\n </a>\n </div>\n <Accordion tabProps={formattedTabs} theme={'setup'} onClick={onItemClick}>\n {formattedTabsViews}\n </Accordion>\n </div>\n );\n};\n\nconst buildNotifications = notifications => {\n if (isEmpty(notifications)) {\n return null;\n }\n\n const notificationsList = notifications.map((notification, index) => {\n return (\n <div className={!notification.temporary ? style.permanentNotification : null} key={index}>\n <Banner {...notification} />\n </div>\n );\n });\n return (\n <div className={!find({temporary: true}, notifications) ? style.permanentNotifications : null}>\n {notificationsList}\n </div>\n );\n};\n\nconst buildHeader = header => {\n return (\n <div className={style.header}>\n <Header {...header} />\n </div>\n );\n};\n\nconst buildPopin = popin => {\n return popin ? (\n <div className={style.popin}>\n <CmPopin {...popin} />\n </div>\n ) : null;\n};\n\nconst buildDocumentation = documentation => {\n if (!documentation) return null;\n const {show = false, onClose, content = ''} = documentation;\n return (\n <div className={classNames(style.documentation, show && style.open)}>\n <div\n className={style.documentationContent}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n {onClose ? (\n <ButtonLinkIconOnly\n className={style.closeButton}\n onClick={onClose}\n data-name={'close-icon'}\n aria-label={'close-icon'}\n size=\"small\"\n icon=\"close\"\n />\n ) : null}\n </div>\n );\n};\n\nconst buildTabs = items => {\n const selectedTab = pipe(\n find(e => e.selected),\n get('tabs'),\n find(e => e.selected)\n )(items);\n\n const showTabs = selectedTab ? find(e => e.selected, selectedTab.subTabs) : undefined;\n if (!showTabs) return null;\n return (\n <div className={style.tabs}>\n <BrandTabs type=\"light\" tabs={selectedTab.subTabs} />\n </div>\n );\n};\n\nconst buildContentView = content => {\n if (!content) {\n return (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n );\n }\n\n const {type} = content;\n switch (type) {\n case 'form':\n return <BrandForm {...content} />;\n case 'list':\n return <BrandTable {...content} />;\n case 'upload':\n return <BrandUpload {...content} />;\n case 'analytics-dashboards':\n return <BrandAnalytics {...content} />;\n case 'list-content':\n case 'expandible-actionable-table':\n return <ListItems {...content} />;\n case 'home':\n return <BrandDashboard {...content} />;\n case 'wizard':\n case 'expandible-table':\n return <WizardContents {...content} />;\n case 'bulk-empty-dashboard':\n return <BulkInfos {...content} />;\n case 'table-pending':\n return <ExpandibleActionableTable {...content} />;\n case 'learning-priorities':\n return <BrandLearningPriorities {...content} />;\n }\n};\n\nconst buildDetailsView = details => {\n if (!details) return;\n return <BrandTable {...details} />;\n};\n\nconst BrandUpdate = props => {\n const {\n notifications,\n header,\n items,\n content,\n details,\n popin,\n onItemClick,\n documentation,\n contentFixHeight\n } = props;\n const logo = 'https://static.coorpacademy.com/logo/coorp-manager.svg';\n\n const leftNavigation = buildLeftNavigation(logo, items, onItemClick);\n const notificationsView = buildNotifications(notifications);\n const documentationView = buildDocumentation(documentation);\n const headerView = buildHeader(header, notifications);\n const tabsView = buildTabs(items);\n const contentView = buildContentView(content);\n const detailsView = buildDetailsView(details);\n const popinView = buildPopin(popin);\n\n const contentStyle = classNames([\n style.content,\n !isEmpty(notifications) && style.contentWithNotifications,\n contentFixHeight && style.contentFixHeight\n ]);\n\n return (\n <div className={style.container}>\n <div className={style.left}>{leftNavigation}</div>\n <div className={style.contentWrapper}>\n <div className={style.headerSticky}>{headerView}</div>\n <div className={contentStyle}>\n {notificationsView}\n {tabsView}\n {contentView}\n {detailsView}\n {documentationView}\n </div>\n </div>\n {popinView}\n </div>\n );\n};\n\nBrandUpdate.defaultProps = {\n notifications: []\n};\n\nBrandUpdate.propTypes = {\n notifications: PropTypes.arrayOf(\n PropTypes.shape({\n ...Banner.propTypes\n })\n ),\n header: PropTypes.shape({...Header.propTypes}),\n items: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.string,\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string,\n tabs: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string,\n subTabs: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string\n })\n )\n })\n )\n })\n ).isRequired,\n content: PropTypes.oneOfType([\n PropTypes.shape({\n ...BrandForm.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['form'])\n }),\n PropTypes.shape({\n ...BrandTable.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list'])\n }),\n PropTypes.shape({\n ...BrandUpload.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['upload'])\n }),\n PropTypes.shape({\n ...BrandAnalytics.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['analytics-dashboards'])\n }),\n PropTypes.shape({\n ...BrandDashboard.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['home'])\n }),\n PropTypes.shape({\n ...WizardContents.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['wizard'])\n }),\n PropTypes.shape({\n ...ListItems.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list-content', 'expandible-actionable-table'])\n }),\n PropTypes.shape({\n ...BulkInfos.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['bulk-empty-dashboard'])\n }),\n PropTypes.shape({\n ...ExpandibleActionableTable.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['table-pending'])\n }),\n PropTypes.shape({\n ...WizardContents.propTypes,\n content: PropTypes.shape({\n ...ExpandibleActionableTable.propTypes,\n ...WizardContents.propTypes.content.propTypes\n }),\n key: PropTypes.string,\n type: PropTypes.oneOf(['expandible-table'])\n }),\n PropTypes.shape({\n ...BrandLearningPriorities.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['learning-priorities'])\n })\n ]),\n documentation: PropTypes.shape({\n content: PropTypes.string,\n show: PropTypes.bool,\n onClose: PropTypes.func\n }),\n popin: PropTypes.shape({...CmPopin.propTypes}),\n details: PropTypes.shape({\n ...BrandTable.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list'])\n }),\n onItemClick: PropTypes.func,\n contentFixHeight: PropTypes.bool\n};\n\nexport default BrandUpdate;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,QAAQ,GAAGC,UAAU,IAAKA,UAAU,GAAGC,cAAA,CAAMC,eAAT,GAA2BD,cAAA,CAAME,iBAA3E;;AAEA,MAAMC,WAAW,GAAG,CAACC,QAAQ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BmB,gBAAA,CAAQtB,SAA5B,EAlGe;EAmGtBnB,OAAO,EAAEoB,kBAAA,CAAUE,KAAV,cACJS,mBAAA,CAAWZ,SADP;IAEP/D,GAAG,EAAEgE,kBAAA,CAAUK,MAFR;IAGP5E,IAAI,EAAEuE,kBAAA,CAAUU,KAAV,CAAgB,CAAC,MAAD,CAAhB;EAHC,GAnGa;EAwGtB5E,WAAW,EAAEkE,kBAAA,CAAUoB,IAxGD;EAyGtBrC,gBAAgB,EAAEiB,kBAAA,CAAUO;AAzGN,CAAxB;eA4Ge1B,W"}
@@ -21,6 +21,9 @@ declare namespace Dashboard {
21
21
  label: PropTypes.Requireable<string>;
22
22
  type: PropTypes.Requireable<string>;
23
23
  size: PropTypes.Requireable<string>;
24
+ customStyle: PropTypes.Requireable<{
25
+ [x: string]: string | null | undefined;
26
+ }>;
24
27
  }>>;
25
28
  }>>;
26
29
  headerIcon: PropTypes.Requireable<string>;
@@ -132,6 +135,8 @@ declare namespace Dashboard {
132
135
  content: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
133
136
  items: PropTypes.Requireable<(PropTypes.InferProps<{
134
137
  title: PropTypes.Validator<string>;
138
+ subtitle: PropTypes.Requireable<string>;
139
+ selected: PropTypes.Requireable<boolean>;
135
140
  dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
136
141
  label: PropTypes.Requireable<string>;
137
142
  type: PropTypes.Requireable<string>;
@@ -174,6 +179,8 @@ declare namespace Dashboard {
174
179
  label: PropTypes.Requireable<string>;
175
180
  type: PropTypes.Requireable<string>;
176
181
  }> | null | undefined)[]>;
182
+ disabled: PropTypes.Requireable<boolean>;
183
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
177
184
  isBulkStyle: PropTypes.Requireable<boolean>;
178
185
  isOverflowHidden: PropTypes.Requireable<boolean>;
179
186
  order: PropTypes.Requireable<number>;
@@ -307,6 +314,9 @@ declare namespace Dashboard {
307
314
  label: PropTypes.Requireable<string>;
308
315
  type: PropTypes.Requireable<string>;
309
316
  size: PropTypes.Requireable<string>;
317
+ customStyle: PropTypes.Requireable<{
318
+ [x: string]: string | null | undefined;
319
+ }>;
310
320
  }>>;
311
321
  }>>;
312
322
  headerIcon: PropTypes.Requireable<string>;
@@ -418,6 +428,8 @@ declare namespace Dashboard {
418
428
  content: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
419
429
  items: PropTypes.Requireable<(PropTypes.InferProps<{
420
430
  title: PropTypes.Validator<string>;
431
+ subtitle: PropTypes.Requireable<string>;
432
+ selected: PropTypes.Requireable<boolean>;
421
433
  dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
422
434
  label: PropTypes.Requireable<string>;
423
435
  type: PropTypes.Requireable<string>;
@@ -460,6 +472,8 @@ declare namespace Dashboard {
460
472
  label: PropTypes.Requireable<string>;
461
473
  type: PropTypes.Requireable<string>;
462
474
  }> | null | undefined)[]>;
475
+ disabled: PropTypes.Requireable<boolean>;
476
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
463
477
  isBulkStyle: PropTypes.Requireable<boolean>;
464
478
  isOverflowHidden: PropTypes.Requireable<boolean>;
465
479
  order: PropTypes.Requireable<number>;
@@ -205,6 +205,9 @@ declare namespace SearchPage {
205
205
  label: PropTypes.Requireable<string>;
206
206
  type: PropTypes.Requireable<string>;
207
207
  size: PropTypes.Requireable<string>;
208
+ customStyle: PropTypes.Requireable<{
209
+ [x: string]: string | null | undefined;
210
+ }>;
208
211
  }>>;
209
212
  }>>;
210
213
  headerIcon: PropTypes.Requireable<string>;
@@ -316,6 +319,8 @@ declare namespace SearchPage {
316
319
  content: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
317
320
  items: PropTypes.Requireable<(PropTypes.InferProps<{
318
321
  title: PropTypes.Validator<string>;
322
+ subtitle: PropTypes.Requireable<string>;
323
+ selected: PropTypes.Requireable<boolean>;
319
324
  dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
320
325
  label: PropTypes.Requireable<string>;
321
326
  type: PropTypes.Requireable<string>;
@@ -358,6 +363,8 @@ declare namespace SearchPage {
358
363
  label: PropTypes.Requireable<string>;
359
364
  type: PropTypes.Requireable<string>;
360
365
  }> | null | undefined)[]>;
366
+ disabled: PropTypes.Requireable<boolean>;
367
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
361
368
  isBulkStyle: PropTypes.Requireable<boolean>;
362
369
  isOverflowHidden: PropTypes.Requireable<boolean>;
363
370
  order: PropTypes.Requireable<number>;
@@ -38,6 +38,9 @@ declare namespace ExternalCourse {
38
38
  label: PropTypes.Requireable<string>;
39
39
  type: PropTypes.Requireable<string>;
40
40
  size: PropTypes.Requireable<string>;
41
+ customStyle: PropTypes.Requireable<{
42
+ [x: string]: string | null | undefined;
43
+ }>;
41
44
  }>>;
42
45
  }>>;
43
46
  headerIcon: PropTypes.Requireable<string>;
@@ -149,6 +152,8 @@ declare namespace ExternalCourse {
149
152
  content: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
150
153
  items: PropTypes.Requireable<(PropTypes.InferProps<{
151
154
  title: PropTypes.Validator<string>;
155
+ subtitle: PropTypes.Requireable<string>;
156
+ selected: PropTypes.Requireable<boolean>;
152
157
  dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
153
158
  label: PropTypes.Requireable<string>;
154
159
  type: PropTypes.Requireable<string>;
@@ -191,6 +196,8 @@ declare namespace ExternalCourse {
191
196
  label: PropTypes.Requireable<string>;
192
197
  type: PropTypes.Requireable<string>;
193
198
  }> | null | undefined)[]>;
199
+ disabled: PropTypes.Requireable<boolean>;
200
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
194
201
  isBulkStyle: PropTypes.Requireable<boolean>;
195
202
  isOverflowHidden: PropTypes.Requireable<boolean>;
196
203
  order: PropTypes.Requireable<number>;
@@ -0,0 +1,96 @@
1
+ export default PlaylistDetail;
2
+ declare function PlaylistDetail(props: any, context: any): JSX.Element;
3
+ declare namespace PlaylistDetail {
4
+ namespace contextTypes {
5
+ const skin: PropTypes.Requireable<PropTypes.InferProps<{
6
+ common: PropTypes.Requireable<{
7
+ [x: string]: any;
8
+ }>;
9
+ images: PropTypes.Requireable<PropTypes.InferProps<{
10
+ 'logo-mobile': PropTypes.Requireable<any>;
11
+ logo: PropTypes.Requireable<any>;
12
+ 'logo-email': PropTypes.Requireable<any>;
13
+ login: PropTypes.Requireable<any>;
14
+ }>>;
15
+ icons: PropTypes.Requireable<{
16
+ [x: string]: any;
17
+ }>;
18
+ mod: PropTypes.Requireable<{
19
+ [x: string]: any;
20
+ }>;
21
+ courses: PropTypes.Requireable<any[]>;
22
+ texts: PropTypes.Requireable<{
23
+ [x: string]: any;
24
+ }>;
25
+ }>>;
26
+ const translate: PropTypes.Requireable<(...args: any[]) => any>;
27
+ }
28
+ namespace propTypes {
29
+ const title: PropTypes.Validator<string>;
30
+ const coverImages: PropTypes.Requireable<(PropTypes.InferProps<{
31
+ type: PropTypes.Requireable<string>;
32
+ url: PropTypes.Requireable<string>;
33
+ }> | null | undefined)[]>;
34
+ const playlistRef: PropTypes.Validator<string>;
35
+ const description: PropTypes.Requireable<string>;
36
+ const ongoingCourses: PropTypes.Requireable<PropTypes.InferProps<{
37
+ list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
38
+ customStyle: PropTypes.Requireable<{
39
+ [x: string]: string | null | undefined;
40
+ }>;
41
+ loading: PropTypes.Requireable<boolean>;
42
+ }>>;
43
+ const playlistCourses: PropTypes.Requireable<PropTypes.InferProps<{
44
+ list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
45
+ customStyle: PropTypes.Requireable<{
46
+ [x: string]: string | null | undefined;
47
+ }>;
48
+ loading: PropTypes.Requireable<boolean>;
49
+ }>>;
50
+ const totalCourses: PropTypes.Requireable<number>;
51
+ const filters: PropTypes.Requireable<PropTypes.InferProps<{
52
+ onChange: PropTypes.Requireable<(...args: any[]) => any>;
53
+ options: PropTypes.Requireable<(PropTypes.InferProps<{
54
+ name: PropTypes.Validator<string>;
55
+ value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
56
+ selected: PropTypes.Requireable<boolean>;
57
+ validOption: PropTypes.Requireable<boolean>;
58
+ }> | null | undefined)[]>;
59
+ }>>;
60
+ const sorting: PropTypes.Requireable<PropTypes.InferProps<{
61
+ title: PropTypes.Requireable<string>;
62
+ name: PropTypes.Requireable<string>;
63
+ className: PropTypes.Requireable<string>;
64
+ borderClassName: PropTypes.Requireable<string>;
65
+ disabled: PropTypes.Requireable<boolean>;
66
+ multiple: PropTypes.Requireable<boolean>;
67
+ description: PropTypes.Requireable<string>;
68
+ required: PropTypes.Requireable<boolean>;
69
+ onChange: PropTypes.Requireable<(...args: any[]) => any>;
70
+ theme: PropTypes.Requireable<string>;
71
+ options: PropTypes.Requireable<(PropTypes.InferProps<{
72
+ name: PropTypes.Validator<string>;
73
+ value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
74
+ selected: PropTypes.Requireable<boolean>;
75
+ validOption: PropTypes.Requireable<boolean>;
76
+ }> | null | undefined)[]>;
77
+ optgroups: PropTypes.Requireable<(PropTypes.InferProps<{
78
+ label: PropTypes.Validator<string>;
79
+ options: PropTypes.Requireable<(PropTypes.InferProps<{
80
+ name: PropTypes.Validator<string>;
81
+ value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
82
+ selected: PropTypes.Requireable<boolean>;
83
+ validOption: PropTypes.Requireable<boolean>;
84
+ }> | null | undefined)[]>;
85
+ }> | null | undefined)[]>;
86
+ modified: PropTypes.Requireable<boolean>;
87
+ error: PropTypes.Requireable<boolean>;
88
+ 'aria-label': PropTypes.Requireable<string>;
89
+ 'aria-labelledby': PropTypes.Requireable<string>;
90
+ }>>;
91
+ const onBackClick: PropTypes.Requireable<(...args: any[]) => any>;
92
+ const onContinueLearningClick: PropTypes.Requireable<(...args: any[]) => any>;
93
+ }
94
+ }
95
+ import PropTypes from "prop-types";
96
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/playlist-detail/index.js"],"names":[],"mappings":";AAgBA,uEAyEC"}
@@ -0,0 +1,137 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+
6
+ var _react = _interopRequireWildcard(require("react"));
7
+
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
+
10
+ var _classnames = _interopRequireDefault(require("classnames"));
11
+
12
+ var _provider = _interopRequireDefault(require("../../atom/provider"));
13
+
14
+ var _tag = _interopRequireDefault(require("../../atom/tag"));
15
+
16
+ var _select = _interopRequireWildcard(require("../../atom/select"));
17
+
18
+ var _icon = _interopRequireDefault(require("../../atom/icon"));
19
+
20
+ var _cardsGrid = _interopRequireDefault(require("../../organism/cards-grid"));
21
+
22
+ var _allCourses = _interopRequireDefault(require("../skill-detail/all-courses"));
23
+
24
+ var _continueLearning = _interopRequireDefault(require("../skill-detail/continue-learning"));
25
+
26
+ var _playlistDetailCover = _interopRequireDefault(require("../../molecule/playlist-detail-cover"));
27
+
28
+ var _skillDetail = require("../skill-detail");
29
+
30
+ var _style = _interopRequireDefault(require("./style.css"));
31
+
32
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
33
+
34
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
35
+
36
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
37
+
38
+ const DESCRIPTION_BREAKPOINT = 382;
39
+
40
+ const PlaylistDetail = (props, context) => {
41
+ const {
42
+ title,
43
+ coverImages,
44
+ playlistRef,
45
+ description,
46
+ ongoingCourses,
47
+ playlistCourses,
48
+ totalCourses,
49
+ filters,
50
+ sorting,
51
+ onBackClick,
52
+ onContinueLearningClick
53
+ } = props;
54
+ const {
55
+ translate
56
+ } = context;
57
+ const [showMore, setShowMore] = (0, _react.useState)(false);
58
+ const handleShowMore = (0, _react.useCallback)(() => setShowMore(!showMore), [setShowMore, showMore]);
59
+ const Description = (0, _react.useCallback)(() => {
60
+ return /*#__PURE__*/_react.default.createElement("div", {
61
+ className: (0, _classnames.default)(_style.default.description, !showMore && _style.default.truncate)
62
+ }, description);
63
+ }, [showMore, description]);
64
+ return /*#__PURE__*/_react.default.createElement("div", {
65
+ className: _style.default.backgroundContainer
66
+ }, /*#__PURE__*/_react.default.createElement("div", {
67
+ className: _style.default.container,
68
+ "data-name": playlistRef
69
+ }, /*#__PURE__*/_react.default.createElement("div", {
70
+ className: _style.default.backButtonWrapper,
71
+ onClick: onBackClick
72
+ }, /*#__PURE__*/_react.default.createElement(_icon.default, {
73
+ iconName: "arrow-left",
74
+ size: {
75
+ faSize: 14,
76
+ wrapperSize: 14
77
+ }
78
+ })), /*#__PURE__*/_react.default.createElement("div", {
79
+ className: _style.default.ctaContainer
80
+ }, /*#__PURE__*/_react.default.createElement("div", {
81
+ className: _style.default.coverWrapper
82
+ }, /*#__PURE__*/_react.default.createElement(_playlistDetailCover.default, {
83
+ images: coverImages
84
+ })), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_tag.default, {
85
+ label: translate('playlist')
86
+ }), /*#__PURE__*/_react.default.createElement("div", {
87
+ className: _style.default.title
88
+ }, title), description ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(Description, null), description.length >= DESCRIPTION_BREAKPOINT ? /*#__PURE__*/_react.default.createElement("div", {
89
+ className: _style.default.showMoreWrapper,
90
+ onClick: handleShowMore
91
+ }, translate(showMore ? 'Show less' : 'Show more'), /*#__PURE__*/_react.default.createElement(_icon.default, {
92
+ iconName: showMore ? 'chevron-up' : 'chevron-down',
93
+ size: {
94
+ faSize: 14,
95
+ wrapperSize: 16
96
+ }
97
+ })) : null) : null, /*#__PURE__*/_react.default.createElement("div", {
98
+ className: _style.default.continueLearningButton
99
+ }, /*#__PURE__*/_react.default.createElement(_skillDetail.ContinueLearningButton, {
100
+ ongoingCoursesAvailable: !!ongoingCourses.list.length,
101
+ onClick: onContinueLearningClick
102
+ })))), /*#__PURE__*/_react.default.createElement(_continueLearning.default, {
103
+ ongoingCourses: ongoingCourses
104
+ }), /*#__PURE__*/_react.default.createElement(_allCourses.default, {
105
+ courses: playlistCourses,
106
+ totalCourses: totalCourses,
107
+ filters: filters,
108
+ sorting: sorting
109
+ })));
110
+ };
111
+
112
+ PlaylistDetail.contextTypes = {
113
+ skin: _provider.default.childContextTypes.skin,
114
+ translate: _provider.default.childContextTypes.translate
115
+ };
116
+ PlaylistDetail.propTypes = process.env.NODE_ENV !== "production" ? {
117
+ title: _propTypes.default.string.isRequired,
118
+ coverImages: _propTypes.default.arrayOf(_propTypes.default.shape({
119
+ type: _propTypes.default.oneOf(['podcast', 'video', 'interactive', 'document']),
120
+ url: _propTypes.default.string
121
+ })),
122
+ playlistRef: _propTypes.default.string.isRequired,
123
+ description: _propTypes.default.string,
124
+ ongoingCourses: _propTypes.default.shape(_cardsGrid.default.propTypes),
125
+ playlistCourses: _propTypes.default.shape(_cardsGrid.default.propTypes),
126
+ totalCourses: _propTypes.default.number,
127
+ filters: _propTypes.default.shape({
128
+ onChange: _propTypes.default.func,
129
+ options: _propTypes.default.arrayOf(_propTypes.default.shape(_select.SelectOptionPropTypes))
130
+ }),
131
+ sorting: _propTypes.default.shape(_select.default.propTypes),
132
+ onBackClick: _propTypes.default.func,
133
+ onContinueLearningClick: _propTypes.default.func
134
+ } : {};
135
+ var _default = PlaylistDetail;
136
+ exports.default = _default;
137
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["DESCRIPTION_BREAKPOINT","PlaylistDetail","props","context","title","coverImages","playlistRef","description","ongoingCourses","playlistCourses","totalCourses","filters","sorting","onBackClick","onContinueLearningClick","translate","showMore","setShowMore","useState","handleShowMore","useCallback","Description","classnames","style","truncate","backgroundContainer","container","backButtonWrapper","faSize","wrapperSize","ctaContainer","coverWrapper","length","showMoreWrapper","continueLearningButton","list","contextTypes","skin","Provider","childContextTypes","propTypes","PropTypes","string","isRequired","arrayOf","shape","type","oneOf","url","CardsGrid","number","onChange","func","options","SelectOptionPropTypes","Select"],"sources":["../../../src/template/playlist-detail/index.js"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Provider from '../../atom/provider';\nimport Tag from '../../atom/tag';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport Icon from '../../atom/icon';\nimport CardsGrid from '../../organism/cards-grid';\nimport AllCourses from '../skill-detail/all-courses';\nimport ContinueLearning from '../skill-detail/continue-learning';\nimport PlaylistDetailCover from '../../molecule/playlist-detail-cover';\nimport {ContinueLearningButton} from '../skill-detail';\nimport style from './style.css';\n\nconst DESCRIPTION_BREAKPOINT = 382;\n\nconst PlaylistDetail = (props, context) => {\n const {\n title,\n coverImages,\n playlistRef,\n description,\n ongoingCourses,\n playlistCourses,\n totalCourses,\n filters,\n sorting,\n onBackClick,\n onContinueLearningClick\n } = props;\n const {translate} = context;\n\n const [showMore, setShowMore] = useState(false);\n\n const handleShowMore = useCallback(() => setShowMore(!showMore), [setShowMore, showMore]);\n\n const Description = useCallback(() => {\n return (\n <div className={classnames(style.description, !showMore && style.truncate)}>\n {description}\n </div>\n );\n }, [showMore, description]);\n\n return (\n <div className={style.backgroundContainer}>\n <div className={style.container} data-name={playlistRef}>\n <div className={style.backButtonWrapper} onClick={onBackClick}>\n <Icon iconName=\"arrow-left\" size={{faSize: 14, wrapperSize: 14}} />\n </div>\n <div className={style.ctaContainer}>\n <div className={style.coverWrapper}>\n <PlaylistDetailCover images={coverImages} />\n </div>\n <div>\n <Tag label={translate('playlist')} />\n <div className={style.title}>{title}</div>\n {description ? (\n <>\n <Description />\n {description.length >= DESCRIPTION_BREAKPOINT ? (\n <div className={style.showMoreWrapper} onClick={handleShowMore}>\n {translate(showMore ? 'Show less' : 'Show more')}\n <Icon\n iconName={showMore ? 'chevron-up' : 'chevron-down'}\n size={{faSize: 14, wrapperSize: 16}}\n />\n </div>\n ) : null}\n </>\n ) : null}\n <div className={style.continueLearningButton}>\n <ContinueLearningButton\n ongoingCoursesAvailable={!!ongoingCourses.list.length}\n onClick={onContinueLearningClick}\n />\n </div>\n </div>\n </div>\n <ContinueLearning ongoingCourses={ongoingCourses} />\n <AllCourses\n courses={playlistCourses}\n totalCourses={totalCourses}\n filters={filters}\n sorting={sorting}\n />\n </div>\n </div>\n );\n};\n\nPlaylistDetail.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nPlaylistDetail.propTypes = {\n title: PropTypes.string.isRequired,\n coverImages: PropTypes.arrayOf(\n PropTypes.shape({\n type: PropTypes.oneOf(['podcast', 'video', 'interactive', 'document']),\n url: PropTypes.string\n })\n ),\n playlistRef: PropTypes.string.isRequired,\n description: PropTypes.string,\n ongoingCourses: PropTypes.shape(CardsGrid.propTypes),\n playlistCourses: PropTypes.shape(CardsGrid.propTypes),\n totalCourses: PropTypes.number,\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n sorting: PropTypes.shape(Select.propTypes),\n onBackClick: PropTypes.func,\n onContinueLearningClick: PropTypes.func\n};\n\nexport default PlaylistDetail;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,sBAAsB,GAAG,GAA/B;;AAEA,MAAMC,cAAc,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACzC,MAAM;IACJC,KADI;IAEJC,WAFI;IAGJC,WAHI;IAIJC,WAJI;IAKJC,cALI;IAMJC,eANI;IAOJC,YAPI;IAQJC,OARI;IASJC,OATI;IAUJC,WAVI;IAWJC;EAXI,IAYFZ,KAZJ;EAaA,MAAM;IAACa;EAAD,IAAcZ,OAApB;EAEA,MAAM,CAACa,QAAD,EAAWC,WAAX,IAA0B,IAAAC,eAAA,EAAS,KAAT,CAAhC;EAEA,MAAMC,cAAc,GAAG,IAAAC,kBAAA,EAAY,MAAMH,WAAW,CAAC,CAACD,QAAF,CAA7B,EAA0C,CAACC,WAAD,EAAcD,QAAd,CAA1C,CAAvB;EAEA,MAAMK,WAAW,GAAG,IAAAD,kBAAA,EAAY,MAAM;IACpC,oBACE;MAAK,SAAS,EAAE,IAAAE,mBAAA,EAAWC,cAAA,CAAMhB,WAAjB,EAA8B,CAACS,QAAD,IAAaO,cAAA,CAAMC,QAAjD;IAAhB,GACGjB,WADH,CADF;EAKD,CANmB,EAMjB,CAACS,QAAD,EAAWT,WAAX,CANiB,CAApB;EAQA,oBACE;IAAK,SAAS,EAAEgB,cAAA,CAAME;EAAtB,gBACE;IAAK,SAAS,EAAEF,cAAA,CAAMG,SAAtB;IAAiC,aAAWpB;EAA5C,gBACE;IAAK,SAAS,EAAEiB,cAAA,CAAMI,iBAAtB;IAAyC,OAAO,EAAEd;EAAlD,gBACE,6BAAC,aAAD;IAAM,QAAQ,EAAC,YAAf;IAA4B,IAAI,EAAE;MAACe,MAAM,EAAE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@value mobile from breakpoints;
5
+ @value xtraLightGrey from colors;
6
+ @value cm_grey_100 from colors;
7
+ @value cm_grey_200 from colors;
8
+ @value cm_grey_400 from colors;
9
+
10
+ .textBase {
11
+ font-family: "Gilroy";
12
+ font-style: normal;
13
+ }
14
+
15
+ .backgroundContainer {
16
+ background-color: white;
17
+ min-height: 100%;
18
+ width: 100%;
19
+ }
20
+
21
+ .container {
22
+ composes: textBase;
23
+ background-color: white;
24
+ font-family: "Gilroy";
25
+ font-style: normal;
26
+ margin-top: 48px;
27
+ margin-bottom: 48px;
28
+ margin-left: auto;
29
+ margin-right: auto;
30
+ padding: 0 16px;
31
+ position: relative;
32
+ box-sizing: border-box;
33
+ min-height: 100%;
34
+ width: 100%;
35
+ max-width: calc(1080px + 40px);
36
+ }
37
+
38
+ .backButtonWrapper {
39
+ margin-bottom: 16px;
40
+ background-color: cm_grey_100;
41
+ border-radius: 8px;
42
+ width: fit-content;
43
+ padding: 8px;
44
+ cursor: pointer;
45
+ }
46
+
47
+ .ctaContainer {
48
+ display: flex;
49
+ width: 100%;
50
+ justify-content: space-between;
51
+ gap: 40px;
52
+ }
53
+
54
+ .coverWrapper {
55
+ width: 420px;
56
+ height: 280px;
57
+ }
58
+
59
+ .showMoreWrapper {
60
+ display: flex;
61
+ gap: 8px;
62
+ }
63
+
64
+ .showMoreWrapper {
65
+ align-items: center;
66
+ margin-top: 8px;
67
+ font-weight: 600;
68
+ cursor: pointer;
69
+ }
70
+
71
+ .title {
72
+ margin-top: 8px;
73
+ font-size: 24px;
74
+ font-weight: 700;
75
+ line-height: 32px;
76
+ }
77
+
78
+ .description {
79
+ margin-top: 8px;
80
+ max-width: 620px;
81
+ font-size: 14px;
82
+ font-weight: 500;
83
+ line-height: 20px;
84
+ color: cm_grey_400;
85
+ }
86
+
87
+ .truncate {
88
+ display: -webkit-box;
89
+ -webkit-line-clamp: 4;
90
+ -webkit-box-orient: vertical;
91
+ overflow: hidden;
92
+ text-overflow: ellipsis;
93
+ }
94
+
95
+ .continueLearningButton {
96
+ margin-top: 24px;
97
+ }
98
+
99
+ @media tablet {
100
+ .ctaContainer {
101
+ flex-direction: column;
102
+ }
103
+ }
104
+
105
+ @media mobile {
106
+ .coverWrapper {
107
+ width: 100%;
108
+ }
109
+ }
@@ -26,7 +26,7 @@ declare namespace AllCourses {
26
26
  const translate: PropTypes.Requireable<(...args: any[]) => any>;
27
27
  }
28
28
  namespace propTypes {
29
- const skillIncludedCourses: PropTypes.Requireable<PropTypes.InferProps<{
29
+ const courses: PropTypes.Requireable<PropTypes.InferProps<{
30
30
  list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
31
31
  customStyle: PropTypes.Requireable<{
32
32
  [x: string]: string | null | undefined;
@@ -73,7 +73,7 @@ FilterButton.propTypes = process.env.NODE_ENV !== "production" ? {
73
73
 
74
74
  const AllCourses = (props, context) => {
75
75
  const {
76
- skillIncludedCourses,
76
+ courses,
77
77
  totalCourses,
78
78
  filters,
79
79
  sorting
@@ -85,7 +85,7 @@ const AllCourses = (props, context) => {
85
85
  const {
86
86
  list,
87
87
  loading
88
- } = skillIncludedCourses;
88
+ } = courses;
89
89
  const {
90
90
  translate
91
91
  } = context;
@@ -197,7 +197,7 @@ AllCourses.contextTypes = {
197
197
  translate: _provider.default.childContextTypes.translate
198
198
  };
199
199
  AllCourses.propTypes = process.env.NODE_ENV !== "production" ? {
200
- skillIncludedCourses: _propTypes.default.shape(_cardsGrid.default.propTypes),
200
+ courses: _propTypes.default.shape(_cardsGrid.default.propTypes),
201
201
  totalCourses: _propTypes.default.number,
202
202
  filters: _propTypes.default.shape({
203
203
  onChange: _propTypes.default.func,