@coorpacademy/components 10.13.2 → 10.13.3-alpha.20

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 (185) hide show
  1. package/es/atom/drag-and-drop/index.js +72 -46
  2. package/es/atom/drag-and-drop/index.js.map +1 -1
  3. package/es/atom/drag-and-drop/style.css +161 -73
  4. package/es/atom/drag-and-drop/test/dragging.js +8 -1
  5. package/es/atom/drag-and-drop/test/dragging.js.map +1 -1
  6. package/es/atom/drag-and-drop/test/fixtures/clean-and-modified.js +12 -0
  7. package/es/atom/drag-and-drop/test/fixtures/clean-and-modified.js.map +1 -0
  8. package/es/atom/drag-and-drop/test/fixtures/default.js +3 -3
  9. package/es/atom/drag-and-drop/test/fixtures/default.js.map +1 -1
  10. package/es/atom/drag-and-drop/test/fixtures/error.js +12 -0
  11. package/es/atom/drag-and-drop/test/fixtures/error.js.map +1 -0
  12. package/es/atom/drag-and-drop/test/fixtures/modified.js +12 -0
  13. package/es/atom/drag-and-drop/test/fixtures/modified.js.map +1 -0
  14. package/es/atom/drag-and-drop/test/fixtures/with-children.js +1 -14
  15. package/es/atom/drag-and-drop/test/fixtures/with-children.js.map +1 -1
  16. package/es/atom/drag-and-drop/test/fixtures/with-image.js +1 -1
  17. package/es/atom/drag-and-drop/test/fixtures/with-image.js.map +1 -1
  18. package/es/atom/drag-and-drop/test/fixtures/with-long-description.js +12 -0
  19. package/es/atom/drag-and-drop/test/fixtures/with-long-description.js.map +1 -0
  20. package/es/atom/drag-and-drop/test/fixtures/with-video.js +2 -1
  21. package/es/atom/drag-and-drop/test/fixtures/with-video.js.map +1 -1
  22. package/es/atom/drag-and-drop/test/fixtures.js +8 -0
  23. package/es/atom/drag-and-drop/test/fixtures.js.map +1 -1
  24. package/es/atom/image-upload/index.js +6 -3
  25. package/es/atom/image-upload/index.js.map +1 -1
  26. package/es/atom/image-upload/test/fixtures/clean-modified.js +13 -0
  27. package/es/atom/image-upload/test/fixtures/clean-modified.js.map +1 -0
  28. package/es/atom/image-upload/test/fixtures/{without-image.js → default.js} +1 -1
  29. package/es/atom/image-upload/test/fixtures/default.js.map +1 -0
  30. package/es/atom/image-upload/test/fixtures.js +4 -2
  31. package/es/atom/image-upload/test/fixtures.js.map +1 -1
  32. package/es/atom/input-text/style.css +1 -1
  33. package/es/atom/input-text-with-title/index.js +4 -2
  34. package/es/atom/input-text-with-title/index.js.map +1 -1
  35. package/es/atom/input-text-with-title/style.css +6 -2
  36. package/es/atom/input-text-with-title/test/fixtures/error.js +3 -1
  37. package/es/atom/input-text-with-title/test/fixtures/error.js.map +1 -1
  38. package/es/atom/loader/style.css +7 -3
  39. package/es/atom/review-header-step-item/test/fixtures.js +19 -0
  40. package/es/atom/review-header-step-item/test/fixtures.js.map +1 -0
  41. package/es/atom/select/index.js +4 -1
  42. package/es/atom/select/index.js.map +1 -1
  43. package/es/molecule/brand-form-group/index.js +3 -1
  44. package/es/molecule/brand-form-group/index.js.map +1 -1
  45. package/es/molecule/brand-form-group/style.css +5 -0
  46. package/es/molecule/brand-form-group/test/fixtures/images.js +6 -2
  47. package/es/molecule/brand-form-group/test/fixtures/images.js.map +1 -1
  48. package/es/molecule/course-sections/index.js +4 -1
  49. package/es/molecule/course-sections/index.js.map +1 -1
  50. package/es/molecule/course-sections/style.css +15 -2
  51. package/es/molecule/drag-and-drop-wrapper/index.js +39 -0
  52. package/es/molecule/drag-and-drop-wrapper/index.js.map +1 -0
  53. package/es/molecule/drag-and-drop-wrapper/style.css +15 -0
  54. package/es/molecule/drag-and-drop-wrapper/test/fixtures/default.js +9 -0
  55. package/es/molecule/drag-and-drop-wrapper/test/fixtures/default.js.map +1 -0
  56. package/es/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js +10 -0
  57. package/es/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js.map +1 -0
  58. package/es/molecule/drag-and-drop-wrapper/test/fixtures.js +15 -0
  59. package/es/molecule/drag-and-drop-wrapper/test/fixtures.js.map +1 -0
  60. package/es/molecule/review-header-steps/test/fixtures.js +23 -0
  61. package/es/molecule/review-header-steps/test/fixtures.js.map +1 -0
  62. package/es/molecule/setup-slide/index.js +3 -1
  63. package/es/molecule/setup-slide/index.js.map +1 -1
  64. package/es/molecule/setup-slide/style.css +5 -0
  65. package/es/molecule/setup-slide/test/fixtures/without-upload-image.js +41 -0
  66. package/es/molecule/setup-slide/test/fixtures/without-upload-image.js.map +1 -0
  67. package/es/molecule/setup-slide/test/fixtures.js +2 -0
  68. package/es/molecule/setup-slide/test/fixtures.js.map +1 -1
  69. package/es/molecule/setup-slider/test/fixtures/default.js +8 -4
  70. package/es/molecule/setup-slider/test/fixtures/default.js.map +1 -1
  71. package/es/organism/brand-form/test/fixtures/lms.js +14 -0
  72. package/es/organism/brand-form/test/fixtures/lms.js.map +1 -1
  73. package/es/organism/course-selection/index.js +2 -1
  74. package/es/organism/course-selection/index.js.map +1 -1
  75. package/es/organism/course-selection/style.css +12 -3
  76. package/es/organism/course-selection/test/fixtures/loading.js +9 -0
  77. package/es/organism/course-selection/test/fixtures/loading.js.map +1 -0
  78. package/es/organism/course-selection/test/fixtures.js +2 -0
  79. package/es/organism/course-selection/test/fixtures.js.map +1 -1
  80. package/es/organism/search-and-chips-results/index.js +2 -1
  81. package/es/organism/search-and-chips-results/index.js.map +1 -1
  82. package/es/organism/search-and-chips-results/style.css +10 -3
  83. package/es/organism/search-and-chips-results/test/fixtures/loading.js +9 -0
  84. package/es/organism/search-and-chips-results/test/fixtures/loading.js.map +1 -0
  85. package/es/organism/search-and-chips-results/test/fixtures.js +2 -0
  86. package/es/organism/search-and-chips-results/test/fixtures.js.map +1 -1
  87. package/es/template/back-office/brand-update/index.js +5 -2
  88. package/es/template/back-office/brand-update/index.js.map +1 -1
  89. package/es/template/back-office/brand-update/style.css +10 -1
  90. package/es/util/button-icons.js +3 -2
  91. package/es/util/button-icons.js.map +1 -1
  92. package/lib/atom/drag-and-drop/index.js +74 -45
  93. package/lib/atom/drag-and-drop/index.js.map +1 -1
  94. package/lib/atom/drag-and-drop/style.css +161 -73
  95. package/lib/atom/drag-and-drop/test/dragging.js +8 -1
  96. package/lib/atom/drag-and-drop/test/dragging.js.map +1 -1
  97. package/lib/atom/drag-and-drop/test/fixtures/clean-and-modified.js +21 -0
  98. package/lib/atom/drag-and-drop/test/fixtures/clean-and-modified.js.map +1 -0
  99. package/lib/atom/drag-and-drop/test/fixtures/default.js +3 -3
  100. package/lib/atom/drag-and-drop/test/fixtures/default.js.map +1 -1
  101. package/lib/atom/drag-and-drop/test/fixtures/error.js +21 -0
  102. package/lib/atom/drag-and-drop/test/fixtures/error.js.map +1 -0
  103. package/lib/atom/drag-and-drop/test/fixtures/modified.js +21 -0
  104. package/lib/atom/drag-and-drop/test/fixtures/modified.js.map +1 -0
  105. package/lib/atom/drag-and-drop/test/fixtures/with-children.js +1 -19
  106. package/lib/atom/drag-and-drop/test/fixtures/with-children.js.map +1 -1
  107. package/lib/atom/drag-and-drop/test/fixtures/with-image.js +1 -1
  108. package/lib/atom/drag-and-drop/test/fixtures/with-image.js.map +1 -1
  109. package/lib/atom/drag-and-drop/test/fixtures/with-long-description.js +21 -0
  110. package/lib/atom/drag-and-drop/test/fixtures/with-long-description.js.map +1 -0
  111. package/lib/atom/drag-and-drop/test/fixtures/with-video.js +2 -1
  112. package/lib/atom/drag-and-drop/test/fixtures/with-video.js.map +1 -1
  113. package/lib/atom/drag-and-drop/test/fixtures.js +12 -0
  114. package/lib/atom/drag-and-drop/test/fixtures.js.map +1 -1
  115. package/lib/atom/image-upload/index.js +6 -3
  116. package/lib/atom/image-upload/index.js.map +1 -1
  117. package/lib/atom/image-upload/test/fixtures/clean-modified.js +22 -0
  118. package/lib/atom/image-upload/test/fixtures/clean-modified.js.map +1 -0
  119. package/lib/atom/image-upload/test/fixtures/{without-image.js → default.js} +1 -1
  120. package/lib/atom/image-upload/test/fixtures/default.js.map +1 -0
  121. package/lib/atom/image-upload/test/fixtures.js +6 -3
  122. package/lib/atom/image-upload/test/fixtures.js.map +1 -1
  123. package/lib/atom/input-text/style.css +1 -1
  124. package/lib/atom/input-text-with-title/index.js +4 -2
  125. package/lib/atom/input-text-with-title/index.js.map +1 -1
  126. package/lib/atom/input-text-with-title/style.css +6 -2
  127. package/lib/atom/input-text-with-title/test/fixtures/error.js +3 -1
  128. package/lib/atom/input-text-with-title/test/fixtures/error.js.map +1 -1
  129. package/lib/atom/loader/style.css +7 -3
  130. package/lib/atom/review-header-step-item/test/fixtures.js +31 -0
  131. package/lib/atom/review-header-step-item/test/fixtures.js.map +1 -0
  132. package/lib/atom/select/index.js +4 -1
  133. package/lib/atom/select/index.js.map +1 -1
  134. package/lib/molecule/brand-form-group/index.js +3 -1
  135. package/lib/molecule/brand-form-group/index.js.map +1 -1
  136. package/lib/molecule/brand-form-group/style.css +5 -0
  137. package/lib/molecule/brand-form-group/test/fixtures/images.js +6 -2
  138. package/lib/molecule/brand-form-group/test/fixtures/images.js.map +1 -1
  139. package/lib/molecule/course-sections/index.js +4 -1
  140. package/lib/molecule/course-sections/index.js.map +1 -1
  141. package/lib/molecule/course-sections/style.css +15 -2
  142. package/lib/molecule/drag-and-drop-wrapper/index.js +49 -0
  143. package/lib/molecule/drag-and-drop-wrapper/index.js.map +1 -0
  144. package/lib/molecule/drag-and-drop-wrapper/style.css +15 -0
  145. package/lib/molecule/drag-and-drop-wrapper/test/fixtures/default.js +19 -0
  146. package/lib/molecule/drag-and-drop-wrapper/test/fixtures/default.js.map +1 -0
  147. package/lib/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js +21 -0
  148. package/lib/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js.map +1 -0
  149. package/lib/molecule/drag-and-drop-wrapper/test/fixtures.js +25 -0
  150. package/lib/molecule/drag-and-drop-wrapper/test/fixtures.js.map +1 -0
  151. package/lib/molecule/review-header-steps/test/fixtures.js +37 -0
  152. package/lib/molecule/review-header-steps/test/fixtures.js.map +1 -0
  153. package/lib/molecule/setup-slide/index.js +3 -1
  154. package/lib/molecule/setup-slide/index.js.map +1 -1
  155. package/lib/molecule/setup-slide/style.css +5 -0
  156. package/lib/molecule/setup-slide/test/fixtures/without-upload-image.js +46 -0
  157. package/lib/molecule/setup-slide/test/fixtures/without-upload-image.js.map +1 -0
  158. package/lib/molecule/setup-slide/test/fixtures.js +3 -0
  159. package/lib/molecule/setup-slide/test/fixtures.js.map +1 -1
  160. package/lib/molecule/setup-slider/test/fixtures/default.js +7 -2
  161. package/lib/molecule/setup-slider/test/fixtures/default.js.map +1 -1
  162. package/lib/organism/brand-form/test/fixtures/lms.js +14 -0
  163. package/lib/organism/brand-form/test/fixtures/lms.js.map +1 -1
  164. package/lib/organism/course-selection/index.js +2 -1
  165. package/lib/organism/course-selection/index.js.map +1 -1
  166. package/lib/organism/course-selection/style.css +12 -3
  167. package/lib/organism/course-selection/test/fixtures/loading.js +19 -0
  168. package/lib/organism/course-selection/test/fixtures/loading.js.map +1 -0
  169. package/lib/organism/course-selection/test/fixtures.js +3 -0
  170. package/lib/organism/course-selection/test/fixtures.js.map +1 -1
  171. package/lib/organism/search-and-chips-results/index.js +2 -1
  172. package/lib/organism/search-and-chips-results/index.js.map +1 -1
  173. package/lib/organism/search-and-chips-results/style.css +10 -3
  174. package/lib/organism/search-and-chips-results/test/fixtures/loading.js +19 -0
  175. package/lib/organism/search-and-chips-results/test/fixtures/loading.js.map +1 -0
  176. package/lib/organism/search-and-chips-results/test/fixtures.js +3 -0
  177. package/lib/organism/search-and-chips-results/test/fixtures.js.map +1 -1
  178. package/lib/template/back-office/brand-update/index.js +5 -2
  179. package/lib/template/back-office/brand-update/index.js.map +1 -1
  180. package/lib/template/back-office/brand-update/style.css +10 -1
  181. package/lib/util/button-icons.js +2 -1
  182. package/lib/util/button-icons.js.map +1 -1
  183. package/package.json +2 -2
  184. package/es/atom/image-upload/test/fixtures/without-image.js.map +0 -1
  185. package/lib/atom/image-upload/test/fixtures/without-image.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/molecule/brand-form-group/index.js"],"names":["React","PropTypes","classNames","Autocomplete","Select","SelectMultiple","InputText","InputColor","InputCheckbox","InputReadonly","InputSwitch","BrandUploadBox","BrandDownloadBox","Button","InputTextarea","InputHTML","InputDoublestep","ImageUpload","SetupSlider","SetupSections","Title","Roles","style","inputContainerStyle","default","defaultWidth","medium","mediumWidth","large","largeWidth","buildInput","field","type","buildField","index","input","theme","size","styleInput","BrandFormGroup","props","title","subtitle","fieldsLayout","groupLayout","fields","fieldsList","convert","cap","wrapper","groupGrid","titleWrapper","grid","propTypes","string","arrayOf","oneOfType","shape","oneOf"],"mappings":";;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,YAAP,MAAyB,yBAAzB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,SAAP,MAAsB,uBAAtB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,aAAP,MAA0B,2BAA1B;AACA,OAAOC,aAAP,MAA0B,2BAA1B;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,cAAP,MAA2B,qBAA3B;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,aAAP,MAA0B,2BAA1B;AACA,OAAOC,SAAP,MAAsB,uBAAtB;AACA,OAAOC,eAAP,MAA4B,6BAA5B;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,KAAP,MAAkB,wBAAlB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,mBAA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ADM;AALiB,CAA3B;AAuFA,eAAed,cAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {keys, map, snakeCase} from 'lodash/fp';\nimport classNames from 'classnames';\nimport Autocomplete from '../../atom/autocomplete';\nimport Select from '../../atom/select';\nimport SelectMultiple from '../select-multiple';\nimport InputText from '../../atom/input-text';\nimport InputColor from '../../atom/input-color';\nimport InputCheckbox from '../../atom/input-checkbox';\nimport InputReadonly from '../../atom/input-readonly';\nimport InputSwitch from '../../atom/input-switch';\nimport BrandUploadBox from '../brand-upload-box';\nimport BrandDownloadBox from '../brand-download-box';\nimport Button from '../../atom/button';\nimport InputTextarea from '../../atom/input-textarea';\nimport InputHTML from '../../atom/input-html';\nimport InputDoublestep from '../../atom/input-doublestep';\nimport ImageUpload from '../../atom/image-upload';\nimport SetupSlider from '../setup-slider';\nimport SetupSections from '../setup-sections';\nimport Title from '../../atom/title';\nimport Roles from '../coorp-manager-roles';\nimport style from './style.css';\n\nconst inputContainerStyle = {\n default: style.defaultWidth,\n medium: style.mediumWidth,\n large: style.largeWidth\n};\n\nconst buildInput = field => {\n const {type} = field;\n\n switch (type) {\n case 'autoComplete':\n return <Autocomplete {...field} />;\n case 'color':\n return <InputColor {...field} />;\n case 'readonly':\n return <InputReadonly {...field} />;\n case 'switch':\n return <InputSwitch {...field} />;\n case 'textarea':\n return <InputTextarea {...field} />;\n case 'html':\n return <InputHTML {...field} />;\n case 'doublestep':\n return <InputDoublestep {...field} />;\n case 'select':\n return <Select {...field} theme={'coorpmanager'} />;\n case 'selectMultiple':\n return <SelectMultiple {...field} />;\n case 'checkbox':\n return <InputCheckbox {...field} />;\n case 'image':\n return <ImageUpload {...field} />;\n case 'slider':\n return <SetupSlider {...field} />;\n case 'sections':\n return <SetupSections {...field} />;\n case 'text':\n return <InputText {...field} />;\n case 'downloadbox':\n return <BrandDownloadBox {...field} />;\n case 'uploadbox':\n return <BrandUploadBox {...field} />;\n case 'button':\n case 'link':\n return <Button {...field} />;\n case 'roles':\n return <Roles {...field} />;\n default:\n return <InputText {...field} />;\n }\n};\n\nconst buildField = (field, index) => {\n const input = buildInput(field);\n const {theme, size = 'default'} = field;\n const styleInput = theme === 'coorpmanager' ? inputContainerStyle[size] : style.field;\n\n return (\n <div className={styleInput} key={index}>\n {input}\n </div>\n );\n};\n\nconst BrandFormGroup = props => {\n const {title, subtitle = '', fieldsLayout = '', groupLayout = '', fields = []} = props;\n const fieldsList = map.convert({cap: false})(buildField, fields);\n\n return (\n <div\n data-name={`brand_form_group_${snakeCase(title)}`}\n className={classNames(style.wrapper, groupLayout === 'grid' && style.groupGrid)}\n >\n <div className={style.titleWrapper}>\n <Title title={title} subtitle={subtitle} type={'form-group'} />\n </div>\n <div className={fieldsLayout === 'grid' ? style.grid : null}>{fieldsList}</div>\n </div>\n );\n};\n\nBrandFormGroup.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n fieldsLayout: PropTypes.string,\n groupLayout: PropTypes.string,\n fields: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n ...Autocomplete.propTypes,\n type: PropTypes.oneOf(['autoComplete']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputColor.propTypes,\n type: PropTypes.oneOf(['color'])\n }),\n PropTypes.shape({\n ...InputReadonly.propTypes,\n type: PropTypes.oneOf(['readonly'])\n }),\n PropTypes.shape({\n ...InputSwitch.propTypes,\n type: PropTypes.oneOf(['switch'])\n }),\n PropTypes.shape({\n ...InputTextarea.propTypes,\n type: PropTypes.oneOf(['textarea']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputHTML.propTypes,\n type: PropTypes.oneOf(['html'])\n }),\n PropTypes.shape({\n ...InputDoublestep.propTypes,\n type: PropTypes.oneOf(['doublestep'])\n }),\n PropTypes.shape({\n ...Select.propTypes,\n type: PropTypes.oneOf(['select']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputCheckbox.propTypes,\n type: PropTypes.oneOf(['checkbox'])\n }),\n PropTypes.shape({\n ...ImageUpload.propTypes,\n type: PropTypes.oneOf(['image'])\n }),\n PropTypes.shape({\n ...SetupSlider.propTypes,\n type: PropTypes.oneOf(['slider'])\n }),\n PropTypes.shape({\n ...SetupSections.propTypes,\n type: PropTypes.oneOf(['sections'])\n }),\n PropTypes.shape({\n ...InputText.propTypes,\n type: PropTypes.oneOf(['text']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...BrandDownloadBox.propTypes,\n type: PropTypes.oneOf(['downloadbox'])\n }),\n PropTypes.shape({\n ...BrandUploadBox.propTypes,\n type: PropTypes.oneOf(['uploadbox'])\n }),\n PropTypes.shape({\n ...Button.propTypes,\n type: PropTypes.oneOf(['button'])\n }),\n PropTypes.shape({\n ...SelectMultiple.propTypes,\n type: PropTypes.oneOf(['selectMultiple'])\n }),\n PropTypes.shape({\n ...Roles.propTypes,\n type: PropTypes.oneOf(['roles'])\n }),\n PropTypes.shape(InputText.propTypes)\n ])\n )\n};\nexport default BrandFormGroup;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/molecule/brand-form-group/index.js"],"names":["React","PropTypes","classNames","Autocomplete","Select","SelectMultiple","InputText","InputColor","InputCheckbox","InputReadonly","InputSwitch","BrandUploadBox","BrandDownloadBox","Button","InputTextarea","InputHTML","InputDoublestep","ImageUpload","SetupSlider","SetupSections","Title","Roles","style","inputContainerStyle","default","defaultWidth","medium","mediumWidth","large","largeWidth","buildInput","field","type","imageUploadContainer","buildField","index","input","theme","size","styleInput","BrandFormGroup","props","title","subtitle","fieldsLayout","groupLayout","fields","fieldsList","convert","cap","wrapper","groupGrid","titleWrapper","grid","propTypes","string","arrayOf","oneOfType","shape","oneOf"],"mappings":";;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAA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ACyD,KAAV,uBACK9C,gBAAgB,CAAC0C,SADtB;AAEEtB,IAAAA,IAAI,EAAE/B,SAAS,CAAC0D,KAAV,CAAgB,CAAC,aAAD,CAAhB;AAFR,KAzDkB,EA6DlB1D,SAAS,CAACyD,KAAV,uBACK/C,cAAc,CAAC2C,SADpB;AAEEtB,IAAAA,IAAI,EAAE/B,SAAS,CAAC0D,KAAV,CAAgB,CAAC,WAAD,CAAhB;AAFR,KA7DkB,EAiElB1D,SAAS,CAACyD,KAAV,uBACK7C,MAAM,CAACyC,SADZ;AAEEtB,IAAAA,IAAI,EAAE/B,SAAS,CAAC0D,KAAV,CAAgB,CAAC,QAAD,CAAhB;AAFR,KAjEkB,EAqElB1D,SAAS,CAACyD,KAAV,uBACKrD,cAAc,CAACiD,SADpB;AAEEtB,IAAAA,IAAI,EAAE/B,SAAS,CAAC0D,KAAV,CAAgB,CAAC,gBAAD,CAAhB;AAFR,KArEkB,EAyElB1D,SAAS,CAACyD,KAAV,uBACKrC,KAAK,CAACiC,SADX;AAEEtB,IAAAA,IAAI,EAAE/B,SAAS,CAAC0D,KAAV,CAAgB,CAAC,OAAD,CAAhB;AAFR,KAzEkB,EA6ElB1D,SAAS,CAACyD,KAAV,CAAgBpD,SAAS,CAACgD,SAA1B,CA7EkB,CAApB,CADM;AALiB,CAA3B;AAuFA,eAAed,cAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {keys, map, snakeCase} from 'lodash/fp';\nimport classNames from 'classnames';\nimport Autocomplete from '../../atom/autocomplete';\nimport Select from '../../atom/select';\nimport SelectMultiple from '../select-multiple';\nimport InputText from '../../atom/input-text';\nimport InputColor from '../../atom/input-color';\nimport InputCheckbox from '../../atom/input-checkbox';\nimport InputReadonly from '../../atom/input-readonly';\nimport InputSwitch from '../../atom/input-switch';\nimport BrandUploadBox from '../brand-upload-box';\nimport BrandDownloadBox from '../brand-download-box';\nimport Button from '../../atom/button';\nimport InputTextarea from '../../atom/input-textarea';\nimport InputHTML from '../../atom/input-html';\nimport InputDoublestep from '../../atom/input-doublestep';\nimport ImageUpload from '../../atom/image-upload';\nimport SetupSlider from '../setup-slider';\nimport SetupSections from '../setup-sections';\nimport Title from '../../atom/title';\nimport Roles from '../coorp-manager-roles';\nimport style from './style.css';\n\nconst inputContainerStyle = {\n default: style.defaultWidth,\n medium: style.mediumWidth,\n large: style.largeWidth\n};\n\nconst buildInput = field => {\n const {type} = field;\n\n switch (type) {\n case 'autoComplete':\n return <Autocomplete {...field} />;\n case 'color':\n return <InputColor {...field} />;\n case 'readonly':\n return <InputReadonly {...field} />;\n case 'switch':\n return <InputSwitch {...field} />;\n case 'textarea':\n return <InputTextarea {...field} />;\n case 'html':\n return <InputHTML {...field} />;\n case 'doublestep':\n return <InputDoublestep {...field} />;\n case 'select':\n return <Select {...field} theme={'coorpmanager'} />;\n case 'selectMultiple':\n return <SelectMultiple {...field} />;\n case 'checkbox':\n return <InputCheckbox {...field} />;\n case 'image':\n return (\n <div className={style.imageUploadContainer}>\n <ImageUpload {...field} />\n </div>\n );\n case 'slider':\n return <SetupSlider {...field} />;\n case 'sections':\n return <SetupSections {...field} />;\n case 'text':\n return <InputText {...field} />;\n case 'downloadbox':\n return <BrandDownloadBox {...field} />;\n case 'uploadbox':\n return <BrandUploadBox {...field} />;\n case 'button':\n case 'link':\n return <Button {...field} />;\n case 'roles':\n return <Roles {...field} />;\n default:\n return <InputText {...field} />;\n }\n};\n\nconst buildField = (field, index) => {\n const input = buildInput(field);\n const {theme, size = 'default'} = field;\n const styleInput = theme === 'coorpmanager' ? inputContainerStyle[size] : style.field;\n\n return (\n <div className={styleInput} key={index}>\n {input}\n </div>\n );\n};\n\nconst BrandFormGroup = props => {\n const {title, subtitle = '', fieldsLayout = '', groupLayout = '', fields = []} = props;\n const fieldsList = map.convert({cap: false})(buildField, fields);\n\n return (\n <div\n data-name={`brand_form_group_${snakeCase(title)}`}\n className={classNames(style.wrapper, groupLayout === 'grid' && style.groupGrid)}\n >\n <div className={style.titleWrapper}>\n <Title title={title} subtitle={subtitle} type={'form-group'} />\n </div>\n <div className={fieldsLayout === 'grid' ? style.grid : null}>{fieldsList}</div>\n </div>\n );\n};\n\nBrandFormGroup.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n fieldsLayout: PropTypes.string,\n groupLayout: PropTypes.string,\n fields: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n ...Autocomplete.propTypes,\n type: PropTypes.oneOf(['autoComplete']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputColor.propTypes,\n type: PropTypes.oneOf(['color'])\n }),\n PropTypes.shape({\n ...InputReadonly.propTypes,\n type: PropTypes.oneOf(['readonly'])\n }),\n PropTypes.shape({\n ...InputSwitch.propTypes,\n type: PropTypes.oneOf(['switch'])\n }),\n PropTypes.shape({\n ...InputTextarea.propTypes,\n type: PropTypes.oneOf(['textarea']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputHTML.propTypes,\n type: PropTypes.oneOf(['html'])\n }),\n PropTypes.shape({\n ...InputDoublestep.propTypes,\n type: PropTypes.oneOf(['doublestep'])\n }),\n PropTypes.shape({\n ...Select.propTypes,\n type: PropTypes.oneOf(['select']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputCheckbox.propTypes,\n type: PropTypes.oneOf(['checkbox'])\n }),\n PropTypes.shape({\n ...ImageUpload.propTypes,\n type: PropTypes.oneOf(['image'])\n }),\n PropTypes.shape({\n ...SetupSlider.propTypes,\n type: PropTypes.oneOf(['slider'])\n }),\n PropTypes.shape({\n ...SetupSections.propTypes,\n type: PropTypes.oneOf(['sections'])\n }),\n PropTypes.shape({\n ...InputText.propTypes,\n type: PropTypes.oneOf(['text']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...BrandDownloadBox.propTypes,\n type: PropTypes.oneOf(['downloadbox'])\n }),\n PropTypes.shape({\n ...BrandUploadBox.propTypes,\n type: PropTypes.oneOf(['uploadbox'])\n }),\n PropTypes.shape({\n ...Button.propTypes,\n type: PropTypes.oneOf(['button'])\n }),\n PropTypes.shape({\n ...SelectMultiple.propTypes,\n type: PropTypes.oneOf(['selectMultiple'])\n }),\n PropTypes.shape({\n ...Roles.propTypes,\n type: PropTypes.oneOf(['roles'])\n }),\n PropTypes.shape(InputText.propTypes)\n ])\n )\n};\nexport default BrandFormGroup;\n"],"file":"index.js"}
@@ -73,6 +73,11 @@
73
73
  width: 100%;
74
74
  }
75
75
 
76
+ .imageUploadContainer {
77
+ height: 300px;
78
+ width: 360px;
79
+ }
80
+
76
81
  @media desktop {
77
82
  .groupGrid {
78
83
  flex-direction: column;
@@ -11,9 +11,13 @@ export default {
11
11
  fields: [_extends(_extends({}, Desktop.props), {}, {
12
12
  type: 'image'
13
13
  }), _extends(_extends({}, Mobile.props), {}, {
14
- type: 'image'
14
+ type: 'image',
15
+ previewContent: {}
15
16
  }), _extends(_extends({}, Email.props), {}, {
16
- type: 'image'
17
+ type: 'image',
18
+ modified: false,
19
+ loading: true,
20
+ previewContent: {}
17
21
  })]
18
22
  }
19
23
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/molecule/brand-form-group/test/fixtures/images.js"],"names":["Desktop","Mobile","Email","props","title","subtitle","fieldsLayout","fields","type"],"mappings":";;AAAA,OAAOA,OAAP,MAAoB,qDAApB;AACA,OAAOC,MAAP,MAAmB,oDAAnB;AACA,OAAOC,KAAP,MAAkB,mDAAlB;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,gBADF;AAELC,IAAAA,QAAQ,EACN,4GAHG;AAILC,IAAAA,YAAY,EAAE,MAJT;AAKLC,IAAAA,MAAM,EAAE,uBAEDP,OAAO,CAACG,KAFP;AAGJK,MAAAA,IAAI,EAAE;AAHF,8BAMDP,MAAM,CAACE,KANN;AAOJK,MAAAA,IAAI,EAAE;AAPF,8BAUDN,KAAK,CAACC,KAVL;AAWJK,MAAAA,IAAI,EAAE;AAXF;AALH;AADM,CAAf","sourcesContent":["import Desktop from '../../../../atom/image-upload/test/fixtures/desktop';\nimport Mobile from '../../../../atom/image-upload/test/fixtures/mobile';\nimport Email from '../../../../atom/image-upload/test/fixtures/email';\n\nexport default {\n props: {\n title: 'Platform logos',\n subtitle:\n '(SVG files are recommanded for retina display. For any other file types, max height recommanded is xxx px)',\n fieldsLayout: 'grid',\n fields: [\n {\n ...Desktop.props,\n type: 'image'\n },\n {\n ...Mobile.props,\n type: 'image'\n },\n {\n ...Email.props,\n type: 'image'\n }\n ]\n }\n};\n"],"file":"images.js"}
1
+ {"version":3,"sources":["../../../../../src/molecule/brand-form-group/test/fixtures/images.js"],"names":["Desktop","Mobile","Email","props","title","subtitle","fieldsLayout","fields","type","previewContent","modified","loading"],"mappings":";;AAAA,OAAOA,OAAP,MAAoB,qDAApB;AACA,OAAOC,MAAP,MAAmB,oDAAnB;AACA,OAAOC,KAAP,MAAkB,mDAAlB;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,gBADF;AAELC,IAAAA,QAAQ,EACN,4GAHG;AAILC,IAAAA,YAAY,EAAE,MAJT;AAKLC,IAAAA,MAAM,EAAE,uBAEDP,OAAO,CAACG,KAFP;AAGJK,MAAAA,IAAI,EAAE;AAHF,8BAMDP,MAAM,CAACE,KANN;AAOJK,MAAAA,IAAI,EAAE,OAPF;AAQJC,MAAAA,cAAc,EAAE;AARZ,8BAWDP,KAAK,CAACC,KAXL;AAYJK,MAAAA,IAAI,EAAE,OAZF;AAaJE,MAAAA,QAAQ,EAAE,KAbN;AAcJC,MAAAA,OAAO,EAAE,IAdL;AAeJF,MAAAA,cAAc,EAAE;AAfZ;AALH;AADM,CAAf","sourcesContent":["import Desktop from '../../../../atom/image-upload/test/fixtures/desktop';\nimport Mobile from '../../../../atom/image-upload/test/fixtures/mobile';\nimport Email from '../../../../atom/image-upload/test/fixtures/email';\n\nexport default {\n props: {\n title: 'Platform logos',\n subtitle:\n '(SVG files are recommanded for retina display. For any other file types, max height recommanded is xxx px)',\n fieldsLayout: 'grid',\n fields: [\n {\n ...Desktop.props,\n type: 'image'\n },\n {\n ...Mobile.props,\n type: 'image',\n previewContent: {}\n },\n {\n ...Email.props,\n type: 'image',\n modified: false,\n loading: true,\n previewContent: {}\n }\n ]\n }\n};\n"],"file":"images.js"}
@@ -7,7 +7,10 @@ import Loader from '../../atom/loader';
7
7
  import Title from '../../atom/title';
8
8
  import style from './style.css';
9
9
 
10
- const Loading = () => /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Loader, {
10
+ const Loading = () => /*#__PURE__*/React.createElement("div", {
11
+ className: style.loaderContainer
12
+ }, /*#__PURE__*/React.createElement(Loader, {
13
+ className: style.loader,
11
14
  theme: "coorpmanager"
12
15
  }));
13
16
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/molecule/course-sections/index.js"],"names":["React","PropTypes","InputTextWithTitle","CourseSection","DraggableList","Loader","Title","style","Loading","CourseSections","sections","onDrop","isLoading","title","mandatoryCoursesInput","inputTitle","propTypes","string","arrayOf","shape","func","bool"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,kBAAP,MAA+B,kCAA/B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,OAAO,GAAG,mBACd,8CACE,oBAAC,MAAD;AAAQ,EAAA,KAAK,EAAC;AAAd,EADF,CADF;;AAMA,MAAMC,cAAc,GAAG,CAAC;AACtBC,EAAAA,QADsB;AAEtBC,EAAAA,MAFsB;AAGtBC,EAAAA,SAHs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3B;AASA,eAAeP,cAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport InputTextWithTitle from '../../atom/input-text-with-title';\nimport CourseSection from '../course-section';\nimport DraggableList from '../draggable-list';\nimport Loader from '../../atom/loader';\nimport Title from '../../atom/title';\nimport style from './style.css';\n\nconst Loading = () => (\n <div>\n <Loader theme=\"coorpmanager\" />\n </div>\n);\n\nconst CourseSections = ({\n sections,\n onDrop,\n isLoading,\n title,\n mandatoryCoursesInput,\n inputTitle\n}) => {\n if (isLoading) return <Loading />;\n\n return (\n <div>\n {inputTitle ? (\n <div className={style.title}>\n <Title\n title={inputTitle}\n type={'form-group'}\n data-name={'mandatory-courses-input-title'}\n />\n </div>\n ) : null}\n {mandatoryCoursesInput ? (\n <div className={style.mandatoryCoursesInput}>\n <InputTextWithTitle {...mandatoryCoursesInput} />\n </div>\n ) : null}\n {title ? (\n <div className={style.title}>\n <Title title={title} type={'form-group'} data-name={'course-sections-title'} />\n </div>\n ) : null}\n <DraggableList itemType=\"course-section\" items={sections} onDrop={onDrop} />\n </div>\n );\n};\n\nCourseSections.propTypes = {\n inputTitle: PropTypes.string,\n title: PropTypes.string,\n sections: PropTypes.arrayOf(PropTypes.shape(CourseSection.propTypes)),\n onDrop: PropTypes.func,\n isLoading: PropTypes.bool,\n mandatoryCoursesInput: PropTypes.shape(InputTextWithTitle.propTypes)\n};\n\nexport default CourseSections;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/molecule/course-sections/index.js"],"names":["React","PropTypes","InputTextWithTitle","CourseSection","DraggableList","Loader","Title","style","Loading","loaderContainer","loader","CourseSections","sections","onDrop","isLoading","title","mandatoryCoursesInput","inputTitle","propTypes","string","arrayOf","shape","func","bool"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,kBAAP,MAA+B,kCAA/B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,aAAP,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,EAAAA,UAAU,EAAEhB,SAAS,CAACkB,MADG;AAEzBJ,EAAAA,KAAK,EAAEd,SAAS,CAACkB,MAFQ;AAGzBP,EAAAA,QAAQ,EAAEX,SAAS,CAACmB,OAAV,CAAkBnB,SAAS,CAACoB,KAAV,CAAgBlB,aAAa,CAACe,SAA9B,CAAlB,CAHe;AAIzBL,EAAAA,MAAM,EAAEZ,SAAS,CAACqB,IAJO;AAKzBR,EAAAA,SAAS,EAAEb,SAAS,CAACsB,IALI;AAMzBP,EAAAA,qBAAqB,EAAEf,SAAS,CAACoB,KAAV,CAAgBnB,kBAAkB,CAACgB,SAAnC;AANE,CAA3B;AASA,eAAeP,cAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport InputTextWithTitle from '../../atom/input-text-with-title';\nimport CourseSection from '../course-section';\nimport DraggableList from '../draggable-list';\nimport Loader from '../../atom/loader';\nimport Title from '../../atom/title';\nimport style from './style.css';\n\nconst Loading = () => (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n);\n\nconst CourseSections = ({\n sections,\n onDrop,\n isLoading,\n title,\n mandatoryCoursesInput,\n inputTitle\n}) => {\n if (isLoading) return <Loading />;\n\n return (\n <div>\n {inputTitle ? (\n <div className={style.title}>\n <Title\n title={inputTitle}\n type={'form-group'}\n data-name={'mandatory-courses-input-title'}\n />\n </div>\n ) : null}\n {mandatoryCoursesInput ? (\n <div className={style.mandatoryCoursesInput}>\n <InputTextWithTitle {...mandatoryCoursesInput} />\n </div>\n ) : null}\n {title ? (\n <div className={style.title}>\n <Title title={title} type={'form-group'} data-name={'course-sections-title'} />\n </div>\n ) : null}\n <DraggableList itemType=\"course-section\" items={sections} onDrop={onDrop} />\n </div>\n );\n};\n\nCourseSections.propTypes = {\n inputTitle: PropTypes.string,\n title: PropTypes.string,\n sections: PropTypes.arrayOf(PropTypes.shape(CourseSection.propTypes)),\n onDrop: PropTypes.func,\n isLoading: PropTypes.bool,\n mandatoryCoursesInput: PropTypes.shape(InputTextWithTitle.propTypes)\n};\n\nexport default CourseSections;\n"],"file":"index.js"}
@@ -3,5 +3,18 @@
3
3
  }
4
4
 
5
5
  .mandatoryCoursesInput {
6
- margin: 0 0 16px 16px;
7
- }
6
+ margin: 0 0 32px 16px;
7
+ }
8
+
9
+ .loader {
10
+ width: 60px;
11
+ height: 60px;
12
+ }
13
+
14
+ .loaderContainer {
15
+ display: flex;
16
+ justify-content: center;
17
+ align-items: center;
18
+ height: 50vh;
19
+ width: 100%;
20
+ }
@@ -0,0 +1,39 @@
1
+ import _map from "lodash/fp/map";
2
+
3
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
+
5
+ import React from 'react';
6
+ import PropTypes from 'prop-types';
7
+ import DragAndDrop from '../../atom/drag-and-drop';
8
+ import CheckboxWithTitle from '../../atom/checkbox-with-title';
9
+ import style from './style.css';
10
+
11
+ const DragAndDropWrapper = props => {
12
+ const {
13
+ list = [],
14
+ checkBoxTitle,
15
+ 'data-name': dataName
16
+ } = props;
17
+
18
+ const dragAndDropList = _map(dragAndDropProps => {
19
+ return /*#__PURE__*/React.createElement("li", {
20
+ className: style.dragAndDrop,
21
+ key: `dragAndDrop-${dragAndDropProps.title}`
22
+ }, /*#__PURE__*/React.createElement(DragAndDrop, dragAndDropProps));
23
+ }, list);
24
+
25
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
26
+ className: style.title
27
+ }, /*#__PURE__*/React.createElement(CheckboxWithTitle, checkBoxTitle)), /*#__PURE__*/React.createElement("ul", {
28
+ className: style.group,
29
+ "data-name": dataName
30
+ }, dragAndDropList));
31
+ };
32
+
33
+ DragAndDropWrapper.propTypes = process.env.NODE_ENV !== "production" ? {
34
+ list: PropTypes.arrayOf(PropTypes.shape(DragAndDrop.propTypes)),
35
+ checkBoxTitle: PropTypes.shape(_extends({}, CheckboxWithTitle.propTypes)),
36
+ 'data-name': PropTypes.string
37
+ } : {};
38
+ export default DragAndDropWrapper;
39
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/molecule/drag-and-drop-wrapper/index.js"],"names":["React","PropTypes","DragAndDrop","CheckboxWithTitle","style","DragAndDropWrapper","props","list","checkBoxTitle","dataName","dragAndDropList","dragAndDropProps","dragAndDrop","title","group","propTypes","arrayOf","shape","string"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,WAAP,MAAwB,0BAAxB;AACA,OAAOC,iBAAP,MAA8B,gCAA9B;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,kBAAkB,GAAGC,KAAK,IAAI;AAClC,QAAM;AAACC,IAAAA,IAAI,GAAG,EAAR;AAAYC,IAAAA,aAAZ;AAA2B,iBAAaC;AAAxC,MAAoDH,KAA1D;;AAEA,QAAMI,eAAe,GAAG,KAAIC,gBAAgB,IAAI;AAC9C,wBACE;AAAI,MAAA,SAAS,EAAEP,KAAK,CAACQ,WAArB;AAAkC,MAAA,GAAG,EAAG,eAAcD,gBAAgB,CAACE,KAAM;AAA7E,oBACE,oBAAC,WAAD,EAAiBF,gBAAjB,CADF,CADF;AAKD,GANuB,EAMrBJ,IANqB,CAAxB;;AAQA,sBACE,8CACE;AAAK,IAAA,SAAS,EAAEH,KAAK,CAACS;AAAtB,kBACE,oBAAC,iBAAD,EAAuBL,aAAvB,CADF,CADF,eAIE;AAAI,IAAA,SAAS,EAAEJ,KAAK,CAACU,KAArB;AAA4B,iBAAWL;AAAvC,KACGC,eADH,CAJF,CADF;AAUD,CArBD;;AAuBAL,kBAAkB,CAACU,SAAnB,2CAA+B;AAC7BR,EAAAA,IAAI,EAAEN,SAAS,CAACe,OAAV,CAAkBf,SAAS,CAACgB,KAAV,CAAgBf,WAAW,CAACa,SAA5B,CAAlB,CADuB;AAE7BP,EAAAA,aAAa,EAAEP,SAAS,CAACgB,KAAV,cAAoBd,iBAAiB,CAACY,SAAtC,EAFc;AAG7B,eAAad,SAAS,CAACiB;AAHM,CAA/B;AAMA,eAAeb,kBAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map} from 'lodash/fp';\nimport DragAndDrop from '../../atom/drag-and-drop';\nimport CheckboxWithTitle from '../../atom/checkbox-with-title';\nimport style from './style.css';\n\nconst DragAndDropWrapper = props => {\n const {list = [], checkBoxTitle, 'data-name': dataName} = props;\n\n const dragAndDropList = map(dragAndDropProps => {\n return (\n <li className={style.dragAndDrop} key={`dragAndDrop-${dragAndDropProps.title}`}>\n <DragAndDrop {...dragAndDropProps} />\n </li>\n );\n }, list);\n\n return (\n <div>\n <div className={style.title}>\n <CheckboxWithTitle {...checkBoxTitle} />\n </div>\n <ul className={style.group} data-name={dataName}>\n {dragAndDropList}\n </ul>\n </div>\n );\n};\n\nDragAndDropWrapper.propTypes = {\n list: PropTypes.arrayOf(PropTypes.shape(DragAndDrop.propTypes)),\n checkBoxTitle: PropTypes.shape({...CheckboxWithTitle.propTypes}),\n 'data-name': PropTypes.string\n};\n\nexport default DragAndDropWrapper;\n"],"file":"index.js"}
@@ -0,0 +1,15 @@
1
+ .title {
2
+ margin-bottom: 18px;
3
+ }
4
+ .group {
5
+ display: flex;
6
+ overflow-y: inherit;
7
+ align-content: flex-start;
8
+ flex-wrap: wrap;
9
+ margin-left: 31px;
10
+ list-style-type: none;
11
+ }
12
+
13
+ .dragAndDrop {
14
+ margin-right: 16px;
15
+ }
@@ -0,0 +1,9 @@
1
+ import firstdDragAndDrop from '../../../../atom/drag-and-drop/test/fixtures/default';
2
+ import checkBoxTitle from '../../../../atom/checkbox-with-title/test/fixtures/checked';
3
+ export default {
4
+ props: {
5
+ checkBoxTitle: checkBoxTitle.props,
6
+ list: [firstdDragAndDrop.props]
7
+ }
8
+ };
9
+ //# sourceMappingURL=default.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/molecule/drag-and-drop-wrapper/test/fixtures/default.js"],"names":["firstdDragAndDrop","checkBoxTitle","props","list"],"mappings":"AAAA,OAAOA,iBAAP,MAA8B,sDAA9B;AACA,OAAOC,aAAP,MAA0B,4DAA1B;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLD,IAAAA,aAAa,EAAEA,aAAa,CAACC,KADxB;AAELC,IAAAA,IAAI,EAAE,CAACH,iBAAiB,CAACE,KAAnB;AAFD;AADM,CAAf","sourcesContent":["import firstdDragAndDrop from '../../../../atom/drag-and-drop/test/fixtures/default';\nimport checkBoxTitle from '../../../../atom/checkbox-with-title/test/fixtures/checked';\n\nexport default {\n props: {\n checkBoxTitle: checkBoxTitle.props,\n list: [firstdDragAndDrop.props]\n }\n};\n"],"file":"default.js"}
@@ -0,0 +1,10 @@
1
+ import firstdDragAndDrop from '../../../../atom/drag-and-drop/test/fixtures/default';
2
+ import secondDragAndDrop from '../../../../atom/drag-and-drop/test/fixtures/with-children';
3
+ import checkBoxTitle from '../../../../atom/checkbox-with-title/test/fixtures/checked';
4
+ export default {
5
+ props: {
6
+ checkBoxTitle: checkBoxTitle.props,
7
+ list: [firstdDragAndDrop.props, secondDragAndDrop.props]
8
+ }
9
+ };
10
+ //# sourceMappingURL=two-drag-and-drops.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js"],"names":["firstdDragAndDrop","secondDragAndDrop","checkBoxTitle","props","list"],"mappings":"AAAA,OAAOA,iBAAP,MAA8B,sDAA9B;AACA,OAAOC,iBAAP,MAA8B,4DAA9B;AACA,OAAOC,aAAP,MAA0B,4DAA1B;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLD,IAAAA,aAAa,EAAEA,aAAa,CAACC,KADxB;AAELC,IAAAA,IAAI,EAAE,CAACJ,iBAAiB,CAACG,KAAnB,EAA0BF,iBAAiB,CAACE,KAA5C;AAFD;AADM,CAAf","sourcesContent":["import firstdDragAndDrop from '../../../../atom/drag-and-drop/test/fixtures/default';\nimport secondDragAndDrop from '../../../../atom/drag-and-drop/test/fixtures/with-children';\nimport checkBoxTitle from '../../../../atom/checkbox-with-title/test/fixtures/checked';\n\nexport default {\n props: {\n checkBoxTitle: checkBoxTitle.props,\n list: [firstdDragAndDrop.props, secondDragAndDrop.props]\n }\n};\n"],"file":"two-drag-and-drops.js"}
@@ -0,0 +1,15 @@
1
+ import test from 'ava';
2
+ import forEach from 'lodash/forEach';
3
+ import renderComponentMacro from '../../../test/helpers/render-component';
4
+ import MoleculeDragAndDropWrapper from '..';
5
+ import fixtureDefault from './fixtures/default';
6
+ import fixtureTwoDragAndDrops from './fixtures/two-drag-and-drops';
7
+ test('Molecule › MoleculeDragAndDropWrapper > should have valid propTypes', t => {
8
+ t.pass();
9
+ forEach(MoleculeDragAndDropWrapper.propTypes, (value, key) => {
10
+ t.not(value, undefined, `PropType for "Molecule.MoleculeDragAndDropWrapper.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
11
+ });
12
+ });
13
+ test('Molecule › MoleculeDragAndDropWrapper › Default › should be rendered', renderComponentMacro, MoleculeDragAndDropWrapper, fixtureDefault);
14
+ test('Molecule › MoleculeDragAndDropWrapper › TwoDragAndDrops › should be rendered', renderComponentMacro, MoleculeDragAndDropWrapper, fixtureTwoDragAndDrops);
15
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/molecule/drag-and-drop-wrapper/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeDragAndDropWrapper","fixtureDefault","fixtureTwoDragAndDrops","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,0BAAP,MAAuC,IAAvC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,sBAAP,MAAmC,+BAAnC;AAEAL,IAAI,CAAC,qEAAD,EAAwEM,CAAC,IAAI;AAC/EA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,0BAA0B,CAACK,SAA5B,EAAuC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC5DJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,+DAA8DF,GAAI,mEAA3F;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,sEAAD,EAAyEE,oBAAzE,EAA+FC,0BAA/F,EAA2HC,cAA3H,CAAJ;AACAJ,IAAI,CAAC,8EAAD,EAAiFE,oBAAjF,EAAuGC,0BAAvG,EAAmIE,sBAAnI,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeDragAndDropWrapper from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureTwoDragAndDrops from './fixtures/two-drag-and-drops';\n\ntest('Molecule › MoleculeDragAndDropWrapper > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeDragAndDropWrapper.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeDragAndDropWrapper.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeDragAndDropWrapper › Default › should be rendered', renderComponentMacro, MoleculeDragAndDropWrapper, fixtureDefault);\ntest('Molecule › MoleculeDragAndDropWrapper › TwoDragAndDrops › should be rendered', renderComponentMacro, MoleculeDragAndDropWrapper, fixtureTwoDragAndDrops);\n"],"file":"fixtures.js"}
@@ -0,0 +1,23 @@
1
+ import test from 'ava';
2
+ import forEach from 'lodash/forEach';
3
+ import renderComponentMacro from '../../../test/helpers/render-component';
4
+ import MoleculeReviewHeaderSteps from '..';
5
+ import fixtureAllQuestionsOk from './fixtures/all-questions-ok';
6
+ import fixtureCurrentQuestionNoAswered from './fixtures/current-question-no-aswered';
7
+ import fixtureCurrentQuestionWrong from './fixtures/current-question-wrong';
8
+ import fixtureFirstQuestionCurrentRight from './fixtures/first-question-current-right';
9
+ import fixtureNoAnsweredQuestion from './fixtures/no-answered-question';
10
+ import fixtureQuestionToRepeat from './fixtures/question-to-repeat';
11
+ test('Molecule › MoleculeReviewHeaderSteps > should have valid propTypes', t => {
12
+ t.pass();
13
+ forEach(MoleculeReviewHeaderSteps.propTypes, (value, key) => {
14
+ t.not(value, undefined, `PropType for "Molecule.MoleculeReviewHeaderSteps.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
15
+ });
16
+ });
17
+ test('Molecule › MoleculeReviewHeaderSteps › AllQuestionsOk › should be rendered', renderComponentMacro, MoleculeReviewHeaderSteps, fixtureAllQuestionsOk);
18
+ test('Molecule › MoleculeReviewHeaderSteps › CurrentQuestionNoAswered › should be rendered', renderComponentMacro, MoleculeReviewHeaderSteps, fixtureCurrentQuestionNoAswered);
19
+ test('Molecule › MoleculeReviewHeaderSteps › CurrentQuestionWrong › should be rendered', renderComponentMacro, MoleculeReviewHeaderSteps, fixtureCurrentQuestionWrong);
20
+ test('Molecule › MoleculeReviewHeaderSteps › FirstQuestionCurrentRight › should be rendered', renderComponentMacro, MoleculeReviewHeaderSteps, fixtureFirstQuestionCurrentRight);
21
+ test('Molecule › MoleculeReviewHeaderSteps › NoAnsweredQuestion › should be rendered', renderComponentMacro, MoleculeReviewHeaderSteps, fixtureNoAnsweredQuestion);
22
+ test('Molecule › MoleculeReviewHeaderSteps › QuestionToRepeat › should be rendered', renderComponentMacro, MoleculeReviewHeaderSteps, fixtureQuestionToRepeat);
23
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/molecule/review-header-steps/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeReviewHeaderSteps","fixtureAllQuestionsOk","fixtureCurrentQuestionNoAswered","fixtureCurrentQuestionWrong","fixtureFirstQuestionCurrentRight","fixtureNoAnsweredQuestion","fixtureQuestionToRepeat","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,yBAAP,MAAsC,IAAtC;AACA,OAAOC,qBAAP,MAAkC,6BAAlC;AACA,OAAOC,+BAAP,MAA4C,wCAA5C;AACA,OAAOC,2BAAP,MAAwC,mCAAxC;AACA,OAAOC,gCAAP,MAA6C,yCAA7C;AACA,OAAOC,yBAAP,MAAsC,iCAAtC;AACA,OAAOC,uBAAP,MAAoC,+BAApC;AAEAT,IAAI,CAAC,oEAAD,EAAuEU,CAAC,IAAI;AAC9EA,EAAAA,CAAC,CAACC,IAAF;AACAV,EAAAA,OAAO,CAACE,yBAAyB,CAACS,SAA3B,EAAsC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC3DJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,8DAA6DF,GAAI,mEAA1F;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAd,IAAI,CAAC,4EAAD,EAA+EE,oBAA/E,EAAqGC,yBAArG,EAAgIC,qBAAhI,CAAJ;AACAJ,IAAI,CAAC,sFAAD,EAAyFE,oBAAzF,EAA+GC,yBAA/G,EAA0IE,+BAA1I,CAAJ;AACAL,IAAI,CAAC,kFAAD,EAAqFE,oBAArF,EAA2GC,yBAA3G,EAAsIG,2BAAtI,CAAJ;AACAN,IAAI,CAAC,uFAAD,EAA0FE,oBAA1F,EAAgHC,yBAAhH,EAA2II,gCAA3I,CAAJ;AACAP,IAAI,CAAC,gFAAD,EAAmFE,oBAAnF,EAAyGC,yBAAzG,EAAoIK,yBAApI,CAAJ;AACAR,IAAI,CAAC,8EAAD,EAAiFE,oBAAjF,EAAuGC,yBAAvG,EAAkIM,uBAAlI,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeReviewHeaderSteps from '..';\nimport fixtureAllQuestionsOk from './fixtures/all-questions-ok';\nimport fixtureCurrentQuestionNoAswered from './fixtures/current-question-no-aswered';\nimport fixtureCurrentQuestionWrong from './fixtures/current-question-wrong';\nimport fixtureFirstQuestionCurrentRight from './fixtures/first-question-current-right';\nimport fixtureNoAnsweredQuestion from './fixtures/no-answered-question';\nimport fixtureQuestionToRepeat from './fixtures/question-to-repeat';\n\ntest('Molecule › MoleculeReviewHeaderSteps > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeReviewHeaderSteps.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeReviewHeaderSteps.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeReviewHeaderSteps › AllQuestionsOk › should be rendered', renderComponentMacro, MoleculeReviewHeaderSteps, fixtureAllQuestionsOk);\ntest('Molecule › MoleculeReviewHeaderSteps › CurrentQuestionNoAswered › should be rendered', renderComponentMacro, MoleculeReviewHeaderSteps, fixtureCurrentQuestionNoAswered);\ntest('Molecule › MoleculeReviewHeaderSteps › CurrentQuestionWrong › should be rendered', renderComponentMacro, MoleculeReviewHeaderSteps, fixtureCurrentQuestionWrong);\ntest('Molecule › MoleculeReviewHeaderSteps › FirstQuestionCurrentRight › should be rendered', renderComponentMacro, MoleculeReviewHeaderSteps, fixtureFirstQuestionCurrentRight);\ntest('Molecule › MoleculeReviewHeaderSteps › NoAnsweredQuestion › should be rendered', renderComponentMacro, MoleculeReviewHeaderSteps, fixtureNoAnsweredQuestion);\ntest('Molecule › MoleculeReviewHeaderSteps › QuestionToRepeat › should be rendered', renderComponentMacro, MoleculeReviewHeaderSteps, fixtureQuestionToRepeat);\n"],"file":"fixtures.js"}
@@ -38,7 +38,9 @@ const SetupSlide = props => {
38
38
  return /*#__PURE__*/React.createElement(InputCheckbox, field);
39
39
 
40
40
  case 'image':
41
- return /*#__PURE__*/React.createElement(ImageUpload, field);
41
+ return /*#__PURE__*/React.createElement("div", {
42
+ className: style.imageUploadContainer
43
+ }, /*#__PURE__*/React.createElement(ImageUpload, field));
42
44
 
43
45
  case 'splitForm':
44
46
  return /*#__PURE__*/React.createElement(SetupCohortItem, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/molecule/setup-slide/index.js"],"names":["React","PropTypes","Select","InputReadonly","InputText","InputCheckbox","InputDoublestep","InputSwitch","ImageUpload","SetupCohortItem","MessagePopin","style","SetupSlide","props","fields","buildInput","field","type","title","subtitle","buildField","index","input","fieldsList","convert","cap","wrapper","defaultProps","propTypes","arrayOf","oneOfType","shape","oneOf"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,aAAP,MAA0B,2BAA1B;AACA,OAAOC,SAAP,MAAsB,uBAAtB;AACA,OAAOC,aAAP,MAA0B,2BAA1B;AACA,OAAOC,eAAP,MAA4B,6BAA5B;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,eAAP,MAA4B,sBAA5B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,UAAU,GAAGC,KAAK,IAAI;AAC1B,QAAM;AAACC,IAAAA;AAAD,MAAWD,KAAjB;;AACA,QAAME,UAAU,GAAGC,KAAK,IAAI;AAC1B,UAAM;AAACC,MAAAA;AAAD,QAASD,KAAf;;AACA,YAAQC,IAAR;AACE,WAAK,QAAL;AACE,4BAAO,oBAAC,WAAD,EAAiBD,KAAjB,CAAP;;AACF,WA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B,SAAS,CAAC8B,KAAV,CAAgB3B,SAAS,CAACwB,SAA1B,CAjCkB,CAApB,CADM;AADa,CAAvB;AAuCA,eAAehB,UAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map} from 'lodash/fp';\nimport Select from '../../atom/select';\nimport InputReadonly from '../../atom/input-readonly';\nimport InputText from '../../atom/input-text';\nimport InputCheckbox from '../../atom/input-checkbox';\nimport InputDoublestep from '../../atom/input-doublestep';\nimport InputSwitch from '../../atom/input-switch';\nimport ImageUpload from '../../atom/image-upload';\nimport SetupCohortItem from '../setup-cohort-item';\nimport MessagePopin from '../message-popin';\nimport style from './style.css';\n\nconst SetupSlide = props => {\n const {fields} = props;\n const buildInput = field => {\n const {type} = field;\n switch (type) {\n case 'switch':\n return <InputSwitch {...field} />;\n case 'select':\n return <Select {...field} theme={'coorpmanager'} />;\n case 'checkbox':\n return <InputCheckbox {...field} />;\n case 'image':\n return <ImageUpload {...field} />;\n case 'splitForm':\n return <SetupCohortItem field={field} />;\n case 'alert':\n return <MessagePopin header={field.title} content={field.subtitle} />;\n case 'readonly':\n return <InputReadonly {...field} />;\n case 'doublestep':\n return <InputDoublestep {...field} />;\n default:\n return <InputText {...field} />;\n }\n };\n\n const buildField = (field, index) => {\n const input = buildInput(field);\n return (\n <div className={style.field} key={index}>\n {input}\n </div>\n );\n };\n\n const fieldsList = map.convert({cap: false})(buildField, fields);\n\n return <div className={style.wrapper}>{fieldsList}</div>;\n};\n\nSetupSlide.defaultProps = {\n fields: []\n};\n\nSetupSlide.propTypes = {\n fields: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n ...InputSwitch.propTypes,\n type: PropTypes.oneOf(['switch'])\n }),\n PropTypes.shape({\n ...Select.propTypes,\n type: PropTypes.oneOf(['select'])\n }),\n PropTypes.shape({\n ...InputCheckbox.propTypes,\n type: PropTypes.oneOf(['checkbox'])\n }),\n PropTypes.shape({\n ...ImageUpload.propTypes,\n type: PropTypes.oneOf(['image'])\n }),\n PropTypes.shape({\n ...InputReadonly.propTypes,\n type: PropTypes.oneOf(['readonly'])\n }),\n PropTypes.shape({\n ...InputDoublestep.propTypes,\n type: PropTypes.oneOf(['doublestep'])\n }),\n PropTypes.shape({\n ...SetupCohortItem.propTypes,\n type: PropTypes.oneOf(['splitForm'])\n }),\n PropTypes.shape({\n ...MessagePopin.propTypes,\n type: PropTypes.oneOf(['alert'])\n }),\n PropTypes.shape(InputText.propTypes)\n ])\n )\n};\nexport default SetupSlide;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/molecule/setup-slide/index.js"],"names":["React","PropTypes","Select","InputReadonly","InputText","InputCheckbox","InputDoublestep","InputSwitch","ImageUpload","SetupCohortItem","MessagePopin","style","SetupSlide","props","fields","buildInput","field","type","imageUploadContainer","title","subtitle","buildField","index","input","fieldsList","convert","cap","wrapper","defaultProps","propTypes","arrayOf","oneOfType","shape","oneOf"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,aAAP,MAA0B,2BAA1B;AACA,OAAOC,SAAP,MAAsB,uBAAtB;AACA,OAAOC,aAAP,MAA0B,2BAA1B;AACA,OAAOC,eAAP,MAA4B,6BAA5B;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,eAAP,MAA4B,sBAA5B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,UAAU,GAAGC,KAAK,IAAI;AAC1B,QAAM;AAACC,IAAAA;AAAD,MAAWD,KAAjB;;AACA,QAAME,UAAU,GAAGC,KAAK,IAAI;AAC1B,UAAM;AAACC,MAAAA;AAAD,QAASD,KAAf;;AACA,YAAQC,IAAR;AACE,WAAK,QAAL;AACE,4BAAO,oBAAC,WAAD,EAAiBD,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AAI,EAAEhB,SAAS,CAACgC,KAAV,CAAgB,CAAC,OAAD,CAAhB;AAFR,KA7BkB,EAiClBhC,SAAS,CAAC+B,KAAV,CAAgB5B,SAAS,CAACyB,SAA1B,CAjCkB,CAApB,CADM;AADa,CAAvB;AAuCA,eAAejB,UAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map} from 'lodash/fp';\nimport Select from '../../atom/select';\nimport InputReadonly from '../../atom/input-readonly';\nimport InputText from '../../atom/input-text';\nimport InputCheckbox from '../../atom/input-checkbox';\nimport InputDoublestep from '../../atom/input-doublestep';\nimport InputSwitch from '../../atom/input-switch';\nimport ImageUpload from '../../atom/image-upload';\nimport SetupCohortItem from '../setup-cohort-item';\nimport MessagePopin from '../message-popin';\nimport style from './style.css';\n\nconst SetupSlide = props => {\n const {fields} = props;\n const buildInput = field => {\n const {type} = field;\n switch (type) {\n case 'switch':\n return <InputSwitch {...field} />;\n case 'select':\n return <Select {...field} theme={'coorpmanager'} />;\n case 'checkbox':\n return <InputCheckbox {...field} />;\n case 'image':\n return (\n <div className={style.imageUploadContainer}>\n <ImageUpload {...field} />\n </div>\n );\n case 'splitForm':\n return <SetupCohortItem field={field} />;\n case 'alert':\n return <MessagePopin header={field.title} content={field.subtitle} />;\n case 'readonly':\n return <InputReadonly {...field} />;\n case 'doublestep':\n return <InputDoublestep {...field} />;\n default:\n return <InputText {...field} />;\n }\n };\n\n const buildField = (field, index) => {\n const input = buildInput(field);\n return (\n <div className={style.field} key={index}>\n {input}\n </div>\n );\n };\n\n const fieldsList = map.convert({cap: false})(buildField, fields);\n\n return <div className={style.wrapper}>{fieldsList}</div>;\n};\n\nSetupSlide.defaultProps = {\n fields: []\n};\n\nSetupSlide.propTypes = {\n fields: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n ...InputSwitch.propTypes,\n type: PropTypes.oneOf(['switch'])\n }),\n PropTypes.shape({\n ...Select.propTypes,\n type: PropTypes.oneOf(['select'])\n }),\n PropTypes.shape({\n ...InputCheckbox.propTypes,\n type: PropTypes.oneOf(['checkbox'])\n }),\n PropTypes.shape({\n ...ImageUpload.propTypes,\n type: PropTypes.oneOf(['image'])\n }),\n PropTypes.shape({\n ...InputReadonly.propTypes,\n type: PropTypes.oneOf(['readonly'])\n }),\n PropTypes.shape({\n ...InputDoublestep.propTypes,\n type: PropTypes.oneOf(['doublestep'])\n }),\n PropTypes.shape({\n ...SetupCohortItem.propTypes,\n type: PropTypes.oneOf(['splitForm'])\n }),\n PropTypes.shape({\n ...MessagePopin.propTypes,\n type: PropTypes.oneOf(['alert'])\n }),\n PropTypes.shape(InputText.propTypes)\n ])\n )\n};\nexport default SetupSlide;\n"],"file":"index.js"}
@@ -12,3 +12,8 @@
12
12
  .field:last-child {
13
13
  margin-bottom: 0;
14
14
  }
15
+
16
+ .imageUploadContainer {
17
+ height: 300px;
18
+ width: 360px;
19
+ }
@@ -0,0 +1,41 @@
1
+ export default {
2
+ props: {
3
+ fields: [{
4
+ type: 'select',
5
+ title: 'Text position',
6
+ options: [{
7
+ name: 'Left',
8
+ value: 'Pouet',
9
+ selected: false
10
+ }, {
11
+ name: 'Center',
12
+ value: 'Pouet2',
13
+ selected: true
14
+ }, {
15
+ name: 'Right',
16
+ value: 'Pouet3',
17
+ selected: false
18
+ }],
19
+ onChange: value => console.log(value)
20
+ }, {
21
+ type: 'switch',
22
+ title: 'Light color',
23
+ value: false
24
+ }, {
25
+ type: 'readonly',
26
+ title: 'Informative input',
27
+ value: 'Some data displayed to the user'
28
+ }, {
29
+ type: 'doublestep',
30
+ toggleValue: 'Delete',
31
+ confirmValue: 'Confirm',
32
+ confirmDisabled: false,
33
+ cancelValue: 'Cancel',
34
+ description: "You are about to delete some important data. Click 'Confirm' to proceed.",
35
+ textValidation: false,
36
+ isPending: false,
37
+ onClick: () => true
38
+ }]
39
+ }
40
+ };
41
+ //# sourceMappingURL=without-upload-image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/molecule/setup-slide/test/fixtures/without-upload-image.js"],"names":["props","fields","type","title","options","name","value","selected","onChange","console","log","toggleValue","confirmValue","confirmDisabled","cancelValue","description","textValidation","isPending","onClick"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE,CACN;AACEC,MAAAA,IAAI,EAAE,QADR;AAEEC,MAAAA,KAAK,EAAE,eAFT;AAGEC,MAAAA,OAAO,EAAE,CACP;AACEC,QAAAA,IAAI,EAAE,MADR;AAEEC,QAAAA,KAAK,EAAE,OAFT;AAGEC,QAAAA,QAAQ,EAAE;AAHZ,OADO,EAMP;AACEF,QAAAA,IAAI,EAAE,QADR;AAEEC,QAAAA,KAAK,EAAE,QAFT;AAGEC,QAAAA,QAAQ,EAAE;AAHZ,OANO,EAWP;AACEF,QAAAA,IAAI,EAAE,OADR;AAEEC,QAAAA,KAAK,EAAE,QAFT;AAGEC,QAAAA,QAAQ,EAAE;AAHZ,OAXO,CAHX;AAoBEC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AApBrB,KADM,EAuBN;AACEJ,MAAAA,IAAI,EAAE,QADR;AAEEC,MAAAA,KAAK,EAAE,aAFT;AAGEG,MAAAA,KAAK,EAAE;AAHT,KAvBM,EA4BN;AACEJ,MAAAA,IAAI,EAAE,UADR;AAEEC,MAAAA,KAAK,EAAE,mBAFT;AAGEG,MAAAA,KAAK,EAAE;AAHT,KA5BM,EAiCN;AACEJ,MAAAA,IAAI,EAAE,YADR;AAEES,MAAAA,WAAW,EAAE,QAFf;AAGEC,MAAAA,YAAY,EAAE,SAHhB;AAIEC,MAAAA,eAAe,EAAE,KAJnB;AAKEC,MAAAA,WAAW,EAAE,QALf;AAMEC,MAAAA,WAAW,EAAE,0EANf;AAOEC,MAAAA,cAAc,EAAE,KAPlB;AAQEC,MAAAA,SAAS,EAAE,KARb;AASEC,MAAAA,OAAO,EAAE,MAAM;AATjB,KAjCM;AADH;AADM,CAAf","sourcesContent":["export default {\n props: {\n fields: [\n {\n type: 'select',\n title: 'Text position',\n options: [\n {\n name: 'Left',\n value: 'Pouet',\n selected: false\n },\n {\n name: 'Center',\n value: 'Pouet2',\n selected: true\n },\n {\n name: 'Right',\n value: 'Pouet3',\n selected: false\n }\n ],\n onChange: value => console.log(value)\n },\n {\n type: 'switch',\n title: 'Light color',\n value: false\n },\n {\n type: 'readonly',\n title: 'Informative input',\n value: 'Some data displayed to the user'\n },\n {\n type: 'doublestep',\n toggleValue: 'Delete',\n confirmValue: 'Confirm',\n confirmDisabled: false,\n cancelValue: 'Cancel',\n description: \"You are about to delete some important data. Click 'Confirm' to proceed.\",\n textValidation: false,\n isPending: false,\n onClick: () => true\n }\n ]\n }\n};\n"],"file":"without-upload-image.js"}
@@ -8,6 +8,7 @@ import fixtureCohort from './fixtures/cohort';
8
8
  import fixtureCreateNewCohort from './fixtures/create-new-cohort';
9
9
  import fixtureDefault from './fixtures/default';
10
10
  import fixtureSplitForm from './fixtures/split-form';
11
+ import fixtureWithoutUploadImage from './fixtures/without-upload-image';
11
12
  test('Molecule › MoleculeSetupSlide > should have valid propTypes', t => {
12
13
  t.pass();
13
14
  forEach(MoleculeSetupSlide.propTypes, (value, key) => {
@@ -20,4 +21,5 @@ test('Molecule › MoleculeSetupSlide › Cohort › should be rendered', render
20
21
  test('Molecule › MoleculeSetupSlide › CreateNewCohort › should be rendered', renderComponentMacro, MoleculeSetupSlide, fixtureCreateNewCohort);
21
22
  test('Molecule › MoleculeSetupSlide › Default › should be rendered', renderComponentMacro, MoleculeSetupSlide, fixtureDefault);
22
23
  test('Molecule › MoleculeSetupSlide › SplitForm › should be rendered', renderComponentMacro, MoleculeSetupSlide, fixtureSplitForm);
24
+ test('Molecule › MoleculeSetupSlide › WithoutUploadImage › should be rendered', renderComponentMacro, MoleculeSetupSlide, fixtureWithoutUploadImage);
23
25
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/molecule/setup-slide/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeSetupSlide","fixtureAlertMessage","fixtureCheckbox","fixtureCohort","fixtureCreateNewCohort","fixtureDefault","fixtureSplitForm","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,kBAAP,MAA+B,IAA/B;AACA,OAAOC,mBAAP,MAAgC,0BAAhC;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,sBAAP,MAAmC,8BAAnC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AAEAT,IAAI,CAAC,6DAAD,EAAgEU,CAAC,IAAI;AACvEA,EAAAA,CAAC,CAACC,IAAF;AACAV,EAAAA,OAAO,CAACE,kBAAkB,CAACS,SAApB,EAA+B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACpDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,uDAAsDF,GAAI,mEAAnF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAd,IAAI,CAAC,mEAAD,EAAsEE,oBAAtE,EAA4FC,kBAA5F,EAAgHC,mBAAhH,CAAJ;AACAJ,IAAI,CAAC,+DAAD,EAAkEE,oBAAlE,EAAwFC,kBAAxF,EAA4GE,eAA5G,CAAJ;AACAL,IAAI,CAAC,6DAAD,EAAgEE,oBAAhE,EAAsFC,kBAAtF,EAA0GG,aAA1G,CAAJ;AACAN,IAAI,CAAC,sEAAD,EAAyEE,oBAAzE,EAA+FC,kBAA/F,EAAmHI,sBAAnH,CAAJ;AACAP,IAAI,CAAC,8DAAD,EAAiEE,oBAAjE,EAAuFC,kBAAvF,EAA2GK,cAA3G,CAAJ;AACAR,IAAI,CAAC,gEAAD,EAAmEE,oBAAnE,EAAyFC,kBAAzF,EAA6GM,gBAA7G,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeSetupSlide from '..';\nimport fixtureAlertMessage from './fixtures/alert-message';\nimport fixtureCheckbox from './fixtures/checkbox';\nimport fixtureCohort from './fixtures/cohort';\nimport fixtureCreateNewCohort from './fixtures/create-new-cohort';\nimport fixtureDefault from './fixtures/default';\nimport fixtureSplitForm from './fixtures/split-form';\n\ntest('Molecule › MoleculeSetupSlide > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeSetupSlide.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeSetupSlide.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeSetupSlide › AlertMessage › should be rendered', renderComponentMacro, MoleculeSetupSlide, fixtureAlertMessage);\ntest('Molecule › MoleculeSetupSlide › Checkbox › should be rendered', renderComponentMacro, MoleculeSetupSlide, fixtureCheckbox);\ntest('Molecule › MoleculeSetupSlide › Cohort › should be rendered', renderComponentMacro, MoleculeSetupSlide, fixtureCohort);\ntest('Molecule › MoleculeSetupSlide › CreateNewCohort › should be rendered', renderComponentMacro, MoleculeSetupSlide, fixtureCreateNewCohort);\ntest('Molecule › MoleculeSetupSlide › Default › should be rendered', renderComponentMacro, MoleculeSetupSlide, fixtureDefault);\ntest('Molecule › MoleculeSetupSlide › SplitForm › should be rendered', renderComponentMacro, MoleculeSetupSlide, fixtureSplitForm);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/molecule/setup-slide/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeSetupSlide","fixtureAlertMessage","fixtureCheckbox","fixtureCohort","fixtureCreateNewCohort","fixtureDefault","fixtureSplitForm","fixtureWithoutUploadImage","t","pass","propTypes","value","key","not","undefined"],"mapp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O,yBAAtH,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeSetupSlide from '..';\nimport fixtureAlertMessage from './fixtures/alert-message';\nimport fixtureCheckbox from './fixtures/checkbox';\nimport fixtureCohort from './fixtures/cohort';\nimport fixtureCreateNewCohort from './fixtures/create-new-cohort';\nimport fixtureDefault from './fixtures/default';\nimport fixtureSplitForm from './fixtures/split-form';\nimport fixtureWithoutUploadImage from './fixtures/without-upload-image';\n\ntest('Molecule › MoleculeSetupSlide > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeSetupSlide.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeSetupSlide.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeSetupSlide › AlertMessage › should be rendered', renderComponentMacro, MoleculeSetupSlide, fixtureAlertMessage);\ntest('Molecule › MoleculeSetupSlide › Checkbox › should be rendered', renderComponentMacro, MoleculeSetupSlide, fixtureCheckbox);\ntest('Molecule › MoleculeSetupSlide › Cohort › should be rendered', renderComponentMacro, MoleculeSetupSlide, fixtureCohort);\ntest('Molecule › MoleculeSetupSlide › CreateNewCohort › should be rendered', renderComponentMacro, MoleculeSetupSlide, fixtureCreateNewCohort);\ntest('Molecule › MoleculeSetupSlide › Default › should be rendered', renderComponentMacro, MoleculeSetupSlide, fixtureDefault);\ntest('Molecule › MoleculeSetupSlide › SplitForm › should be rendered', renderComponentMacro, MoleculeSetupSlide, fixtureSplitForm);\ntest('Molecule › MoleculeSetupSlide › WithoutUploadImage › should be rendered', renderComponentMacro, MoleculeSetupSlide, fixtureWithoutUploadImage);\n"],"file":"fixtures.js"}
@@ -1,7 +1,11 @@
1
- import Slide from '../../../setup-slide/test/fixtures/default';
1
+ import withUploadImage from '../../../setup-slide/test/fixtures/default';
2
+ import withoutUploadImage from '../../../setup-slide/test/fixtures/without-upload-image';
2
3
  const {
3
- props
4
- } = Slide;
4
+ props: withImage
5
+ } = withUploadImage;
6
+ const {
7
+ props: withoutImage
8
+ } = withoutUploadImage;
5
9
  export default {
6
10
  props: {
7
11
  tabProps: [{
@@ -11,7 +15,7 @@ export default {
11
15
  }, {
12
16
  title: '3'
13
17
  }],
14
- slides: [props, props, props]
18
+ slides: [withImage, withoutImage, withoutImage]
15
19
  }
16
20
  };
17
21
  //# sourceMappingURL=default.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/molecule/setup-slider/test/fixtures/default.js"],"names":["Slide","props","tabProps","title","slides"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,4CAAlB;AAEA,MAAM;AAACC,EAAAA;AAAD,IAAUD,KAAhB;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,QAAQ,EAAE,CACR;AACEC,MAAAA,KAAK,EAAE;AADT,KADQ,EAIR;AACEA,MAAAA,KAAK,EAAE;AADT,KAJQ,EAOR;AACEA,MAAAA,KAAK,EAAE;AADT,KAPQ,CADL;AAYLC,IAAAA,MAAM,EAAE,CAACH,KAAD,EAAQA,KAAR,EAAeA,KAAf;AAZH;AADM,CAAf","sourcesContent":["import Slide from '../../../setup-slide/test/fixtures/default';\n\nconst {props} = Slide;\n\nexport default {\n props: {\n tabProps: [\n {\n title: '1'\n },\n {\n title: '2'\n },\n {\n title: '3'\n }\n ],\n slides: [props, props, props]\n }\n};\n"],"file":"default.js"}
1
+ {"version":3,"sources":["../../../../../src/molecule/setup-slider/test/fixtures/default.js"],"names":["withUploadImage","withoutUploadImage","props","withImage","withoutImage","tabProps","title","slides"],"mappings":"AAAA,OAAOA,eAAP,MAA4B,4CAA5B;AACA,OAAOC,kBAAP,MAA+B,yDAA/B;AAEA,MAAM;AAACC,EAAAA,KAAK,EAAEC;AAAR,IAAqBH,eAA3B;AACA,MAAM;AAACE,EAAAA,KAAK,EAAEE;AAAR,IAAwBH,kBAA9B;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLG,IAAAA,QAAQ,EAAE,CACR;AACEC,MAAAA,KAAK,EAAE;AADT,KADQ,EAIR;AACEA,MAAAA,KAAK,EAAE;AADT,KAJQ,EAOR;AACEA,MAAAA,KAAK,EAAE;AADT,KAPQ,CADL;AAYLC,IAAAA,MAAM,EAAE,CAACJ,SAAD,EAAYC,YAAZ,EAA0BA,YAA1B;AAZH;AADM,CAAf","sourcesContent":["import withUploadImage from '../../../setup-slide/test/fixtures/default';\nimport withoutUploadImage from '../../../setup-slide/test/fixtures/without-upload-image';\n\nconst {props: withImage} = withUploadImage;\nconst {props: withoutImage} = withoutUploadImage;\n\nexport default {\n props: {\n tabProps: [\n {\n title: '1'\n },\n {\n title: '2'\n },\n {\n title: '3'\n }\n ],\n slides: [withImage, withoutImage, withoutImage]\n }\n};\n"],"file":"default.js"}
@@ -191,6 +191,20 @@ export default {
191
191
  required: true,
192
192
  value: '',
193
193
  onChange: () => console.log('dispatch Provider')
194
+ }, {
195
+ description: 'This is where you can load a custom logo (that of Coorpacademy, the client, or one specific to the learning platform) which will be added at the bottom right of the thumbnails of the different courses in SAP.<br /><br />Max file size: 5MO. Recommended format: PNG. NB: The logo will be re-sized by the media service (height = 125px & wide = 400px), therefore, a horizontal format is highly suggested.',
196
+ error: null,
197
+ imageTypes: ['svg+xml', 'jpg', 'png'],
198
+ key: 'payload.lms.92be090d-12a8-4a8c-a04a-5f2e89989169.watermark',
199
+ loading: false,
200
+ modified: true,
201
+ onChange: () => console.log('on change'),
202
+ onReset: () => console.log('on reset'),
203
+ previewLabel: 'Preview',
204
+ required: false,
205
+ title: 'Thumbnail Logo',
206
+ type: 'image',
207
+ uploadLabel: 'Upload'
194
208
  }, {
195
209
  type: 'switch',
196
210
  title: 'Course',