@coorpacademy/components 10.13.7 → 10.13.10-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/card-image-preview/test/fixtures.js +15 -0
- package/es/atom/card-image-preview/test/fixtures.js.map +1 -0
- package/es/atom/checkbox-with-title/test/fixtures.js +15 -0
- package/es/atom/checkbox-with-title/test/fixtures.js.map +1 -0
- package/es/atom/drag-and-drop/index.js +75 -47
- package/es/atom/drag-and-drop/index.js.map +1 -1
- package/es/atom/drag-and-drop/style.css +173 -73
- package/es/atom/drag-and-drop/test/dragging.js +8 -1
- package/es/atom/drag-and-drop/test/dragging.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/clean-and-modified.js +12 -0
- package/es/atom/drag-and-drop/test/fixtures/clean-and-modified.js.map +1 -0
- package/es/atom/drag-and-drop/test/fixtures/default.js +3 -3
- package/es/atom/drag-and-drop/test/fixtures/default.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/error.js +12 -0
- package/es/atom/drag-and-drop/test/fixtures/error.js.map +1 -0
- package/es/atom/drag-and-drop/test/fixtures/modified.js +12 -0
- package/es/atom/drag-and-drop/test/fixtures/modified.js.map +1 -0
- package/es/atom/drag-and-drop/test/fixtures/with-children.js +1 -14
- package/es/atom/drag-and-drop/test/fixtures/with-children.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/with-image.js +1 -1
- package/es/atom/drag-and-drop/test/fixtures/with-image.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/with-long-description.js +12 -0
- package/es/atom/drag-and-drop/test/fixtures/with-long-description.js.map +1 -0
- package/es/atom/drag-and-drop/test/fixtures/with-video.js +2 -1
- package/es/atom/drag-and-drop/test/fixtures/with-video.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures.js +8 -0
- package/es/atom/drag-and-drop/test/fixtures.js.map +1 -1
- package/es/atom/image-upload/index.js +6 -3
- package/es/atom/image-upload/index.js.map +1 -1
- package/es/atom/image-upload/test/fixtures/clean-modified.js +13 -0
- package/es/atom/image-upload/test/fixtures/clean-modified.js.map +1 -0
- package/es/atom/image-upload/test/fixtures/{without-image.js → default.js} +1 -1
- package/es/atom/image-upload/test/fixtures/default.js.map +1 -0
- package/es/atom/image-upload/test/fixtures.js +4 -2
- package/es/atom/image-upload/test/fixtures.js.map +1 -1
- package/es/atom/input-text-with-title/test/fixtures.js +15 -0
- package/es/atom/input-text-with-title/test/fixtures.js.map +1 -0
- package/es/atom/loader/style.css +7 -3
- package/es/atom/review-header-step-item/style.css +1 -5
- package/es/atom/review-header-step-item/test/fixtures.js +19 -0
- package/es/atom/review-header-step-item/test/fixtures.js.map +1 -0
- package/es/atom/select/test/fixtures.js +4 -0
- package/es/atom/select/test/fixtures.js.map +1 -1
- package/es/molecule/brand-form-group/index.js +3 -1
- package/es/molecule/brand-form-group/index.js.map +1 -1
- package/es/molecule/brand-form-group/style.css +5 -0
- package/es/molecule/brand-form-group/test/fixtures/images.js +6 -2
- package/es/molecule/brand-form-group/test/fixtures/images.js.map +1 -1
- package/es/molecule/card/test/fixtures.js +2 -0
- package/es/molecule/card/test/fixtures.js.map +1 -1
- package/es/molecule/course-section/test/fixtures.js +15 -0
- package/es/molecule/course-section/test/fixtures.js.map +1 -0
- package/es/molecule/course-sections/index.js +4 -1
- package/es/molecule/course-sections/index.js.map +1 -1
- package/es/molecule/course-sections/style.css +14 -1
- package/es/molecule/course-sections/test/fixtures.js +17 -0
- package/es/molecule/course-sections/test/fixtures.js.map +1 -0
- package/es/molecule/dashboard/review-banner/test/fixtures.js +13 -0
- package/es/molecule/dashboard/review-banner/test/fixtures.js.map +1 -0
- package/es/molecule/drag-and-drop-wrapper/test/fixtures.js +15 -0
- package/es/molecule/drag-and-drop-wrapper/test/fixtures.js.map +1 -0
- package/es/molecule/draggable/test/fixtures.js +13 -0
- package/es/molecule/draggable/test/fixtures.js.map +1 -0
- package/es/molecule/draggable-list/test/fixtures.js +15 -0
- package/es/molecule/draggable-list/test/fixtures.js.map +1 -0
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures.js +15 -0
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures.js.map +1 -0
- package/es/molecule/questions/free-text/test/fixtures.js +4 -2
- package/es/molecule/questions/free-text/test/fixtures.js.map +1 -1
- package/es/molecule/review-correction-popin/test/fixtures.js +15 -0
- package/es/molecule/review-correction-popin/test/fixtures.js.map +1 -0
- package/es/molecule/review-header-steps/test/fixtures.js +23 -0
- package/es/molecule/review-header-steps/test/fixtures.js.map +1 -0
- package/es/molecule/setup-slide/index.js +3 -1
- package/es/molecule/setup-slide/index.js.map +1 -1
- package/es/molecule/setup-slide/style.css +5 -0
- package/es/molecule/setup-slide/test/fixtures/without-upload-image.js +41 -0
- package/es/molecule/setup-slide/test/fixtures/without-upload-image.js.map +1 -0
- package/es/molecule/setup-slide/test/fixtures.js +2 -0
- package/es/molecule/setup-slide/test/fixtures.js.map +1 -1
- package/es/molecule/setup-slider/test/fixtures/default.js +8 -4
- package/es/molecule/setup-slider/test/fixtures/default.js.map +1 -1
- package/es/molecule/wizard-summary/test/fixtures.js +2 -0
- package/es/molecule/wizard-summary/test/fixtures.js.map +1 -1
- package/es/organism/brand-form/test/fixtures/lms.js +14 -0
- package/es/organism/brand-form/test/fixtures/lms.js.map +1 -1
- package/es/organism/course-selection/index.js +2 -1
- package/es/organism/course-selection/index.js.map +1 -1
- package/es/organism/course-selection/style.css +12 -3
- package/es/organism/course-selection/test/fixtures/loading.js +9 -0
- package/es/organism/course-selection/test/fixtures/loading.js.map +1 -0
- package/es/organism/course-selection/test/fixtures.js +2 -0
- package/es/organism/course-selection/test/fixtures.js.map +1 -1
- package/es/organism/playlist-translation/test/fixtures.js +15 -0
- package/es/organism/playlist-translation/test/fixtures.js.map +1 -0
- package/es/organism/search-and-chips-results/index.js +2 -1
- package/es/organism/search-and-chips-results/index.js.map +1 -1
- package/es/organism/search-and-chips-results/style.css +10 -3
- package/es/organism/search-and-chips-results/test/fixtures/loading.js +9 -0
- package/es/organism/search-and-chips-results/test/fixtures/loading.js.map +1 -0
- package/es/organism/search-and-chips-results/test/fixtures.js +2 -0
- package/es/organism/search-and-chips-results/test/fixtures.js.map +1 -1
- package/es/organism/wizard-contents/test/fixtures.js +2 -0
- package/es/organism/wizard-contents/test/fixtures.js.map +1 -1
- package/es/template/app-player/popin-end/test/fixtures.js +2 -0
- package/es/template/app-player/popin-end/test/fixtures.js.map +1 -1
- package/es/template/back-office/brand-update/index.js +5 -2
- package/es/template/back-office/brand-update/index.js.map +1 -1
- package/es/template/back-office/brand-update/style.css +10 -1
- package/es/template/back-office/brand-update/test/fixtures.js +2 -0
- package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/es/util/button-icons.js +3 -2
- package/es/util/button-icons.js.map +1 -1
- package/lib/atom/card-image-preview/test/fixtures.js +25 -0
- package/lib/atom/card-image-preview/test/fixtures.js.map +1 -0
- package/lib/atom/checkbox-with-title/test/fixtures.js +25 -0
- package/lib/atom/checkbox-with-title/test/fixtures.js.map +1 -0
- package/lib/atom/drag-and-drop/index.js +77 -46
- package/lib/atom/drag-and-drop/index.js.map +1 -1
- package/lib/atom/drag-and-drop/style.css +173 -73
- package/lib/atom/drag-and-drop/test/dragging.js +8 -1
- package/lib/atom/drag-and-drop/test/dragging.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/clean-and-modified.js +21 -0
- package/lib/atom/drag-and-drop/test/fixtures/clean-and-modified.js.map +1 -0
- package/lib/atom/drag-and-drop/test/fixtures/default.js +3 -3
- package/lib/atom/drag-and-drop/test/fixtures/default.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/error.js +21 -0
- package/lib/atom/drag-and-drop/test/fixtures/error.js.map +1 -0
- package/lib/atom/drag-and-drop/test/fixtures/modified.js +21 -0
- package/lib/atom/drag-and-drop/test/fixtures/modified.js.map +1 -0
- package/lib/atom/drag-and-drop/test/fixtures/with-children.js +1 -19
- package/lib/atom/drag-and-drop/test/fixtures/with-children.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/with-image.js +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/with-image.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/with-long-description.js +21 -0
- package/lib/atom/drag-and-drop/test/fixtures/with-long-description.js.map +1 -0
- package/lib/atom/drag-and-drop/test/fixtures/with-video.js +2 -1
- package/lib/atom/drag-and-drop/test/fixtures/with-video.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures.js +12 -0
- package/lib/atom/drag-and-drop/test/fixtures.js.map +1 -1
- package/lib/atom/image-upload/index.js +6 -3
- package/lib/atom/image-upload/index.js.map +1 -1
- package/lib/atom/image-upload/test/fixtures/clean-modified.js +22 -0
- package/lib/atom/image-upload/test/fixtures/clean-modified.js.map +1 -0
- package/lib/atom/image-upload/test/fixtures/{without-image.js → default.js} +1 -1
- package/lib/atom/image-upload/test/fixtures/default.js.map +1 -0
- package/lib/atom/image-upload/test/fixtures.js +6 -3
- package/lib/atom/image-upload/test/fixtures.js.map +1 -1
- package/lib/atom/input-text-with-title/test/fixtures.js +25 -0
- package/lib/atom/input-text-with-title/test/fixtures.js.map +1 -0
- package/lib/atom/loader/style.css +7 -3
- package/lib/atom/review-header-step-item/style.css +1 -5
- package/lib/atom/review-header-step-item/test/fixtures.js +31 -0
- package/lib/atom/review-header-step-item/test/fixtures.js.map +1 -0
- package/lib/atom/select/test/fixtures.js +6 -0
- package/lib/atom/select/test/fixtures.js.map +1 -1
- package/lib/molecule/brand-form-group/index.js +3 -1
- package/lib/molecule/brand-form-group/index.js.map +1 -1
- package/lib/molecule/brand-form-group/style.css +5 -0
- package/lib/molecule/brand-form-group/test/fixtures/images.js +6 -2
- package/lib/molecule/brand-form-group/test/fixtures/images.js.map +1 -1
- package/lib/molecule/card/test/fixtures.js +3 -0
- package/lib/molecule/card/test/fixtures.js.map +1 -1
- package/lib/molecule/course-section/test/fixtures.js +25 -0
- package/lib/molecule/course-section/test/fixtures.js.map +1 -0
- package/lib/molecule/course-sections/index.js +4 -1
- package/lib/molecule/course-sections/index.js.map +1 -1
- package/lib/molecule/course-sections/style.css +14 -1
- package/lib/molecule/course-sections/test/fixtures.js +28 -0
- package/lib/molecule/course-sections/test/fixtures.js.map +1 -0
- package/lib/molecule/dashboard/review-banner/test/fixtures.js +22 -0
- package/lib/molecule/dashboard/review-banner/test/fixtures.js.map +1 -0
- package/lib/molecule/drag-and-drop-wrapper/test/fixtures.js +25 -0
- package/lib/molecule/drag-and-drop-wrapper/test/fixtures.js.map +1 -0
- package/lib/molecule/draggable/test/fixtures.js +22 -0
- package/lib/molecule/draggable/test/fixtures.js.map +1 -0
- package/lib/molecule/draggable-list/test/fixtures.js +25 -0
- package/lib/molecule/draggable-list/test/fixtures.js.map +1 -0
- package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures.js +25 -0
- package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures.js.map +1 -0
- package/lib/molecule/questions/free-text/test/fixtures.js +5 -2
- package/lib/molecule/questions/free-text/test/fixtures.js.map +1 -1
- package/lib/molecule/review-correction-popin/test/fixtures.js +25 -0
- package/lib/molecule/review-correction-popin/test/fixtures.js.map +1 -0
- package/lib/molecule/review-header-steps/test/fixtures.js +37 -0
- package/lib/molecule/review-header-steps/test/fixtures.js.map +1 -0
- package/lib/molecule/setup-slide/index.js +3 -1
- package/lib/molecule/setup-slide/index.js.map +1 -1
- package/lib/molecule/setup-slide/style.css +5 -0
- package/lib/molecule/setup-slide/test/fixtures/without-upload-image.js +46 -0
- package/lib/molecule/setup-slide/test/fixtures/without-upload-image.js.map +1 -0
- package/lib/molecule/setup-slide/test/fixtures.js +3 -0
- package/lib/molecule/setup-slide/test/fixtures.js.map +1 -1
- package/lib/molecule/setup-slider/test/fixtures/default.js +7 -2
- package/lib/molecule/setup-slider/test/fixtures/default.js.map +1 -1
- package/lib/molecule/wizard-summary/test/fixtures.js +3 -0
- package/lib/molecule/wizard-summary/test/fixtures.js.map +1 -1
- package/lib/organism/brand-form/test/fixtures/lms.js +14 -0
- package/lib/organism/brand-form/test/fixtures/lms.js.map +1 -1
- package/lib/organism/course-selection/index.js +2 -1
- package/lib/organism/course-selection/index.js.map +1 -1
- package/lib/organism/course-selection/style.css +12 -3
- package/lib/organism/course-selection/test/fixtures/loading.js +19 -0
- package/lib/organism/course-selection/test/fixtures/loading.js.map +1 -0
- package/lib/organism/course-selection/test/fixtures.js +3 -0
- package/lib/organism/course-selection/test/fixtures.js.map +1 -1
- package/lib/organism/playlist-translation/test/fixtures.js +25 -0
- package/lib/organism/playlist-translation/test/fixtures.js.map +1 -0
- package/lib/organism/search-and-chips-results/index.js +2 -1
- package/lib/organism/search-and-chips-results/index.js.map +1 -1
- package/lib/organism/search-and-chips-results/style.css +10 -3
- package/lib/organism/search-and-chips-results/test/fixtures/loading.js +19 -0
- package/lib/organism/search-and-chips-results/test/fixtures/loading.js.map +1 -0
- package/lib/organism/search-and-chips-results/test/fixtures.js +3 -0
- package/lib/organism/search-and-chips-results/test/fixtures.js.map +1 -1
- package/lib/organism/wizard-contents/test/fixtures.js +3 -0
- package/lib/organism/wizard-contents/test/fixtures.js.map +1 -1
- package/lib/template/app-player/popin-end/test/fixtures.js +3 -0
- package/lib/template/app-player/popin-end/test/fixtures.js.map +1 -1
- package/lib/template/back-office/brand-update/index.js +5 -2
- package/lib/template/back-office/brand-update/index.js.map +1 -1
- package/lib/template/back-office/brand-update/style.css +10 -1
- package/lib/template/back-office/brand-update/test/fixtures.js +3 -0
- package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/lib/util/button-icons.js +2 -1
- package/lib/util/button-icons.js.map +1 -1
- package/package.json +3 -3
- package/es/atom/image-upload/test/fixtures/without-image.js.map +0 -1
- package/es/molecule/cockpit-popin/test/fixtures.js +0 -17
- package/es/molecule/cockpit-popin/test/fixtures.js.map +0 -1
- package/lib/atom/image-upload/test/fixtures/without-image.js.map +0 -1
- package/lib/molecule/cockpit-popin/test/fixtures.js +0 -28
- package/lib/molecule/cockpit-popin/test/fixtures.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,KA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zD,SAAS,CAACwD,KAAV,CAAgBnD,SAAS,CAAC+C,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 <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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CAAC0D,KAAV,CAAgB,MAAKpC,mBAAL,CAAhB;AAHR,KApDkB,EAyDlBtB,SAAS,CAACyD,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"}
|
|
@@ -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;
|
|
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"}
|
|
@@ -6,6 +6,7 @@ import fixtureAdaptivAndDisabled from './fixtures/adaptiv-and-disabled';
|
|
|
6
6
|
import fixtureAdaptiv from './fixtures/adaptiv';
|
|
7
7
|
import fixtureArabic from './fixtures/arabic';
|
|
8
8
|
import fixtureArticle from './fixtures/article';
|
|
9
|
+
import fixtureCoorpmanager from './fixtures/coorpmanager';
|
|
9
10
|
import fixtureDefault from './fixtures/default';
|
|
10
11
|
import fixtureDisabled from './fixtures/disabled';
|
|
11
12
|
import fixtureEmpty from './fixtures/empty';
|
|
@@ -28,6 +29,7 @@ test('Molecule › MoleculeCard › AdaptivAndDisabled › should be rendered',
|
|
|
28
29
|
test('Molecule › MoleculeCard › Adaptiv › should be rendered', renderComponentMacro, MoleculeCard, fixtureAdaptiv);
|
|
29
30
|
test('Molecule › MoleculeCard › Arabic › should be rendered', renderComponentMacro, MoleculeCard, fixtureArabic);
|
|
30
31
|
test('Molecule › MoleculeCard › Article › should be rendered', renderComponentMacro, MoleculeCard, fixtureArticle);
|
|
32
|
+
test('Molecule › MoleculeCard › Coorpmanager › should be rendered', renderComponentMacro, MoleculeCard, fixtureCoorpmanager);
|
|
31
33
|
test('Molecule › MoleculeCard › Default › should be rendered', renderComponentMacro, MoleculeCard, fixtureDefault);
|
|
32
34
|
test('Molecule › MoleculeCard › Disabled › should be rendered', renderComponentMacro, MoleculeCard, fixtureDisabled);
|
|
33
35
|
test('Molecule › MoleculeCard › Empty › should be rendered', renderComponentMacro, MoleculeCard, fixtureEmpty);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/card/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeCard","fixtureAdaptivAndDisabled","fixtureAdaptiv","fixtureArabic","fixtureArticle","fixtureDefault","fixtureDisabled","fixtureEmpty","fixtureExternalContent","fixtureFavorite","fixtureFreerunAndDisabled","fixtureFreerun","fixturePodcast","fixtureScorm","fixtureSelectableFalse","fixtureSelectableTrue","fixtureVideo","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,YAAP,MAAyB,IAAzB;AACA,OAAOC,yBAAP,MAAsC,iCAAtC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,sBAAP,MAAmC,6BAAnC;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,yBAAP,MAAsC,iCAAtC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,sBAAP,MAAmC,6BAAnC;AACA,OAAOC,qBAAP,MAAkC,4BAAlC;AACA,OAAOC,YAAP,MAAyB,kBAAzB;
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/card/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeCard","fixtureAdaptivAndDisabled","fixtureAdaptiv","fixtureArabic","fixtureArticle","fixtureCoorpmanager","fixtureDefault","fixtureDisabled","fixtureEmpty","fixtureExternalContent","fixtureFavorite","fixtureFreerunAndDisabled","fixtureFreerun","fixturePodcast","fixtureScorm","fixtureSelectableFalse","fixtureSelectableTrue","fixtureVideo","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,YAAP,MAAyB,IAAzB;AACA,OAAOC,yBAAP,MAAsC,iCAAtC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,cAAP,MAA2B,oBAA3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,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,YAAlF,EAAgGO,eAAhG,CAAJ;AACAV,IAAI,CAAC,sDAAD,EAAyDE,oBAAzD,EAA+EC,YAA/E,EAA6FQ,YAA7F,CAAJ;AACAX,IAAI,CAAC,gEAAD,EAAmEE,oBAAnE,EAAyFC,YAAzF,EAAuGS,sBAAvG,CAAJ;AACAZ,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,YAAlF,EAAgGU,eAAhG,CAAJ;AACAb,IAAI,CAAC,mEAAD,EAAsEE,oBAAtE,EAA4FC,YAA5F,EAA0GW,yBAA1G,CAAJ;AACAd,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,YAAjF,EAA+FY,cAA/F,CAAJ;AACAf,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,YAAjF,EAA+Fa,cAA/F,CAAJ;AACAhB,IAAI,CAAC,sDAAD,EAAyDE,oBAAzD,EAA+EC,YAA/E,EAA6Fc,YAA7F,CAAJ;AACAjB,IAAI,CAAC,gEAAD,EAAmEE,oBAAnE,EAAyFC,YAAzF,EAAuGe,sBAAvG,CAAJ;AACAlB,IAAI,CAAC,+DAAD,EAAkEE,oBAAlE,EAAwFC,YAAxF,EAAsGgB,qBAAtG,CAAJ;AACAnB,IAAI,CAAC,sDAAD,EAAyDE,oBAAzD,EAA+EC,YAA/E,EAA6FiB,YAA7F,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCard from '..';\nimport fixtureAdaptivAndDisabled from './fixtures/adaptiv-and-disabled';\nimport fixtureAdaptiv from './fixtures/adaptiv';\nimport fixtureArabic from './fixtures/arabic';\nimport fixtureArticle from './fixtures/article';\nimport fixtureCoorpmanager from './fixtures/coorpmanager';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDisabled from './fixtures/disabled';\nimport fixtureEmpty from './fixtures/empty';\nimport fixtureExternalContent from './fixtures/external-content';\nimport fixtureFavorite from './fixtures/favorite';\nimport fixtureFreerunAndDisabled from './fixtures/freerun-and-disabled';\nimport fixtureFreerun from './fixtures/freerun';\nimport fixturePodcast from './fixtures/podcast';\nimport fixtureScorm from './fixtures/scorm';\nimport fixtureSelectableFalse from './fixtures/selectable-false';\nimport fixtureSelectableTrue from './fixtures/selectable-true';\nimport fixtureVideo from './fixtures/video';\n\ntest('Molecule › MoleculeCard > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCard.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCard.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCard › AdaptivAndDisabled › should be rendered', renderComponentMacro, MoleculeCard, fixtureAdaptivAndDisabled);\ntest('Molecule › MoleculeCard › Adaptiv › should be rendered', renderComponentMacro, MoleculeCard, fixtureAdaptiv);\ntest('Molecule › MoleculeCard › Arabic › should be rendered', renderComponentMacro, MoleculeCard, fixtureArabic);\ntest('Molecule › MoleculeCard › Article › should be rendered', renderComponentMacro, MoleculeCard, fixtureArticle);\ntest('Molecule › MoleculeCard › Coorpmanager › should be rendered', renderComponentMacro, MoleculeCard, fixtureCoorpmanager);\ntest('Molecule › MoleculeCard › Default › should be rendered', renderComponentMacro, MoleculeCard, fixtureDefault);\ntest('Molecule › MoleculeCard › Disabled › should be rendered', renderComponentMacro, MoleculeCard, fixtureDisabled);\ntest('Molecule › MoleculeCard › Empty › should be rendered', renderComponentMacro, MoleculeCard, fixtureEmpty);\ntest('Molecule › MoleculeCard › ExternalContent › should be rendered', renderComponentMacro, MoleculeCard, fixtureExternalContent);\ntest('Molecule › MoleculeCard › Favorite › should be rendered', renderComponentMacro, MoleculeCard, fixtureFavorite);\ntest('Molecule › MoleculeCard › FreerunAndDisabled › should be rendered', renderComponentMacro, MoleculeCard, fixtureFreerunAndDisabled);\ntest('Molecule › MoleculeCard › Freerun › should be rendered', renderComponentMacro, MoleculeCard, fixtureFreerun);\ntest('Molecule › MoleculeCard › Podcast › should be rendered', renderComponentMacro, MoleculeCard, fixturePodcast);\ntest('Molecule › MoleculeCard › Scorm › should be rendered', renderComponentMacro, MoleculeCard, fixtureScorm);\ntest('Molecule › MoleculeCard › SelectableFalse › should be rendered', renderComponentMacro, MoleculeCard, fixtureSelectableFalse);\ntest('Molecule › MoleculeCard › SelectableTrue › should be rendered', renderComponentMacro, MoleculeCard, fixtureSelectableTrue);\ntest('Molecule › MoleculeCard › Video › should be rendered', renderComponentMacro, MoleculeCard, fixtureVideo);\n"],"file":"fixtures.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 MoleculeCourseSection from '..';
|
|
5
|
+
import fixtureChapter from './fixtures/chapter';
|
|
6
|
+
import fixtureCourse from './fixtures/course';
|
|
7
|
+
test('Molecule › MoleculeCourseSection > should have valid propTypes', t => {
|
|
8
|
+
t.pass();
|
|
9
|
+
forEach(MoleculeCourseSection.propTypes, (value, key) => {
|
|
10
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeCourseSection.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
test('Molecule › MoleculeCourseSection › Chapter › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureChapter);
|
|
14
|
+
test('Molecule › MoleculeCourseSection › Course › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureCourse);
|
|
15
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/course-section/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeCourseSection","fixtureChapter","fixtureCourse","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,qBAAP,MAAkC,IAAlC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AAEAL,IAAI,CAAC,gEAAD,EAAmEM,CAAC,IAAI;AAC1EA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,qBAAqB,CAACK,SAAvB,EAAkC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACvDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,0DAAyDF,GAAI,mEAAtF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,iEAAD,EAAoEE,oBAApE,EAA0FC,qBAA1F,EAAiHC,cAAjH,CAAJ;AACAJ,IAAI,CAAC,gEAAD,EAAmEE,oBAAnE,EAAyFC,qBAAzF,EAAgHE,aAAhH,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCourseSection from '..';\nimport fixtureChapter from './fixtures/chapter';\nimport fixtureCourse from './fixtures/course';\n\ntest('Molecule › MoleculeCourseSection > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCourseSection.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCourseSection.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCourseSection › Chapter › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureChapter);\ntest('Molecule › MoleculeCourseSection › Course › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureCourse);\n"],"file":"fixtures.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",
|
|
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,
|
|
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,MAA0B,mBAA1B;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,OAAO,GA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V,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"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
+
import MoleculeCourseSections from '..';
|
|
5
|
+
import fixtureDefault from './fixtures/default';
|
|
6
|
+
import fixtureLoading from './fixtures/loading';
|
|
7
|
+
import fixtureWithMandatoryCoursesInput from './fixtures/with-mandatory-courses-input';
|
|
8
|
+
test('Molecule › MoleculeCourseSections > should have valid propTypes', t => {
|
|
9
|
+
t.pass();
|
|
10
|
+
forEach(MoleculeCourseSections.propTypes, (value, key) => {
|
|
11
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeCourseSections.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
test('Molecule › MoleculeCourseSections › Default › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureDefault);
|
|
15
|
+
test('Molecule › MoleculeCourseSections › Loading › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureLoading);
|
|
16
|
+
test('Molecule › MoleculeCourseSections › WithMandatoryCoursesInput › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureWithMandatoryCoursesInput);
|
|
17
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/course-sections/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeCourseSections","fixtureDefault","fixtureLoading","fixtureWithMandatoryCoursesInput","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,sBAAP,MAAmC,IAAnC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,gCAAP,MAA6C,yCAA7C;AAEAN,IAAI,CAAC,iEAAD,EAAoEO,CAAC,IAAI;AAC3EA,EAAAA,CAAC,CAACC,IAAF;AACAP,EAAAA,OAAO,CAACE,sBAAsB,CAACM,SAAxB,EAAmC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2DAA0DF,GAAI,mEAAvF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAX,IAAI,CAAC,kEAAD,EAAqEE,oBAArE,EAA2FC,sBAA3F,EAAmHC,cAAnH,CAAJ;AACAJ,IAAI,CAAC,kEAAD,EAAqEE,oBAArE,EAA2FC,sBAA3F,EAAmHE,cAAnH,CAAJ;AACAL,IAAI,CAAC,oFAAD,EAAuFE,oBAAvF,EAA6GC,sBAA7G,EAAqIG,gCAArI,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCourseSections from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLoading from './fixtures/loading';\nimport fixtureWithMandatoryCoursesInput from './fixtures/with-mandatory-courses-input';\n\ntest('Molecule › MoleculeCourseSections > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCourseSections.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCourseSections.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCourseSections › Default › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureDefault);\ntest('Molecule › MoleculeCourseSections › Loading › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureLoading);\ntest('Molecule › MoleculeCourseSections › WithMandatoryCoursesInput › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureWithMandatoryCoursesInput);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../../test/helpers/render-component';
|
|
4
|
+
import MoleculeDashboardReviewBanner from '..';
|
|
5
|
+
import fixtureDefault from './fixtures/default';
|
|
6
|
+
test('MoleculeDashboard › MoleculeDashboardReviewBanner > should have valid propTypes', t => {
|
|
7
|
+
t.pass();
|
|
8
|
+
forEach(MoleculeDashboardReviewBanner.propTypes, (value, key) => {
|
|
9
|
+
t.not(value, undefined, `PropType for "MoleculeDashboard.MoleculeDashboardReviewBanner.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
test('MoleculeDashboard › MoleculeDashboardReviewBanner › Default › should be rendered', renderComponentMacro, MoleculeDashboardReviewBanner, fixtureDefault);
|
|
13
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/dashboard/review-banner/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeDashboardReviewBanner","fixtureDefault","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,2CAAjC;AACA,OAAOC,6BAAP,MAA0C,IAA1C;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AAEAJ,IAAI,CAAC,iFAAD,EAAoFK,CAAC,IAAI;AAC3FA,EAAAA,CAAC,CAACC,IAAF;AACAL,EAAAA,OAAO,CAACE,6BAA6B,CAACI,SAA/B,EAA0C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC/DJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2EAA0EF,GAAI,mEAAvG;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAT,IAAI,CAAC,kFAAD,EAAqFE,oBAArF,EAA2GC,6BAA3G,EAA0IC,cAA1I,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../../test/helpers/render-component';\nimport MoleculeDashboardReviewBanner from '..';\nimport fixtureDefault from './fixtures/default';\n\ntest('MoleculeDashboard › MoleculeDashboardReviewBanner > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeDashboardReviewBanner.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"MoleculeDashboard.MoleculeDashboardReviewBanner.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('MoleculeDashboard › MoleculeDashboardReviewBanner › Default › should be rendered', renderComponentMacro, MoleculeDashboardReviewBanner, fixtureDefault);\n"],"file":"fixtures.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,13 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
+
import MoleculeDraggable from '..';
|
|
5
|
+
import fixtureDefault from './fixtures/default';
|
|
6
|
+
test('Molecule › MoleculeDraggable > should have valid propTypes', t => {
|
|
7
|
+
t.pass();
|
|
8
|
+
forEach(MoleculeDraggable.propTypes, (value, key) => {
|
|
9
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeDraggable.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
test('Molecule › MoleculeDraggable › Default › should be rendered', renderComponentMacro, MoleculeDraggable, fixtureDefault);
|
|
13
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/draggable/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeDraggable","fixtureDefault","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,iBAAP,MAA8B,IAA9B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AAEAJ,IAAI,CAAC,4DAAD,EAA+DK,CAAC,IAAI;AACtEA,EAAAA,CAAC,CAACC,IAAF;AACAL,EAAAA,OAAO,CAACE,iBAAiB,CAACI,SAAnB,EAA8B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACnDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,sDAAqDF,GAAI,mEAAlF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAT,IAAI,CAAC,6DAAD,EAAgEE,oBAAhE,EAAsFC,iBAAtF,EAAyGC,cAAzG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeDraggable from '..';\nimport fixtureDefault from './fixtures/default';\n\ntest('Molecule › MoleculeDraggable > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeDraggable.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeDraggable.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeDraggable › Default › should be rendered', renderComponentMacro, MoleculeDraggable, fixtureDefault);\n"],"file":"fixtures.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 MoleculeDraggableList from '..';
|
|
5
|
+
import fixtureCourseSections from './fixtures/course-sections';
|
|
6
|
+
import fixtureDashboardSections from './fixtures/dashboard-sections';
|
|
7
|
+
test('Molecule › MoleculeDraggableList > should have valid propTypes', t => {
|
|
8
|
+
t.pass();
|
|
9
|
+
forEach(MoleculeDraggableList.propTypes, (value, key) => {
|
|
10
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeDraggableList.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
test('Molecule › MoleculeDraggableList › CourseSections › should be rendered', renderComponentMacro, MoleculeDraggableList, fixtureCourseSections);
|
|
14
|
+
test('Molecule › MoleculeDraggableList › DashboardSections › should be rendered', renderComponentMacro, MoleculeDraggableList, fixtureDashboardSections);
|
|
15
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/draggable-list/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeDraggableList","fixtureCourseSections","fixtureDashboardSections","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,qBAAP,MAAkC,IAAlC;AACA,OAAOC,qBAAP,MAAkC,4BAAlC;AACA,OAAOC,wBAAP,MAAqC,+BAArC;AAEAL,IAAI,CAAC,gEAAD,EAAmEM,CAAC,IAAI;AAC1EA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,qBAAqB,CAACK,SAAvB,EAAkC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACvDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,0DAAyDF,GAAI,mEAAtF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,wEAAD,EAA2EE,oBAA3E,EAAiGC,qBAAjG,EAAwHC,qBAAxH,CAAJ;AACAJ,IAAI,CAAC,2EAAD,EAA8EE,oBAA9E,EAAoGC,qBAApG,EAA2HE,wBAA3H,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeDraggableList from '..';\nimport fixtureCourseSections from './fixtures/course-sections';\nimport fixtureDashboardSections from './fixtures/dashboard-sections';\n\ntest('Molecule › MoleculeDraggableList > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeDraggableList.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeDraggableList.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeDraggableList › CourseSections › should be rendered', renderComponentMacro, MoleculeDraggableList, fixtureCourseSections);\ntest('Molecule › MoleculeDraggableList › DashboardSections › should be rendered', renderComponentMacro, MoleculeDraggableList, fixtureDashboardSections);\n"],"file":"fixtures.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 MoleculeInputTextWithTiteledCheckbox from '..';
|
|
5
|
+
import fixtureChecked from './fixtures/checked';
|
|
6
|
+
import fixtureUnchecked from './fixtures/unchecked';
|
|
7
|
+
test('Molecule › MoleculeInputTextWithTiteledCheckbox > should have valid propTypes', t => {
|
|
8
|
+
t.pass();
|
|
9
|
+
forEach(MoleculeInputTextWithTiteledCheckbox.propTypes, (value, key) => {
|
|
10
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeInputTextWithTiteledCheckbox.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
test('Molecule › MoleculeInputTextWithTiteledCheckbox › Checked › should be rendered', renderComponentMacro, MoleculeInputTextWithTiteledCheckbox, fixtureChecked);
|
|
14
|
+
test('Molecule › MoleculeInputTextWithTiteledCheckbox › Unchecked › should be rendered', renderComponentMacro, MoleculeInputTextWithTiteledCheckbox, fixtureUnchecked);
|
|
15
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/input-text-with-titeled-checkbox/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeInputTextWithTiteledCheckbox","fixtureChecked","fixtureUnchecked","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,oCAAP,MAAiD,IAAjD;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AAEAL,IAAI,CAAC,+EAAD,EAAkFM,CAAC,IAAI;AACzFA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,oCAAoC,CAACK,SAAtC,EAAiD,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACtEJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,yEAAwEF,GAAI,mEAArG;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,gFAAD,EAAmFE,oBAAnF,EAAyGC,oCAAzG,EAA+IC,cAA/I,CAAJ;AACAJ,IAAI,CAAC,kFAAD,EAAqFE,oBAArF,EAA2GC,oCAA3G,EAAiJE,gBAAjJ,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeInputTextWithTiteledCheckbox from '..';\nimport fixtureChecked from './fixtures/checked';\nimport fixtureUnchecked from './fixtures/unchecked';\n\ntest('Molecule › MoleculeInputTextWithTiteledCheckbox > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeInputTextWithTiteledCheckbox.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeInputTextWithTiteledCheckbox.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeInputTextWithTiteledCheckbox › Checked › should be rendered', renderComponentMacro, MoleculeInputTextWithTiteledCheckbox, fixtureChecked);\ntest('Molecule › MoleculeInputTextWithTiteledCheckbox › Unchecked › should be rendered', renderComponentMacro, MoleculeInputTextWithTiteledCheckbox, fixtureUnchecked);\n"],"file":"fixtures.js"}
|
|
@@ -3,7 +3,8 @@ import forEach from 'lodash/forEach';
|
|
|
3
3
|
import renderComponentMacro from '../../../../test/helpers/render-component';
|
|
4
4
|
import MoleculeQuestionsFreeText from '..';
|
|
5
5
|
import fixtureDefault from './fixtures/default';
|
|
6
|
-
import
|
|
6
|
+
import fixtureWithValueOnChange from './fixtures/with-value-on-change';
|
|
7
|
+
import fixtureWithValue from './fixtures/with-value';
|
|
7
8
|
test('MoleculeQuestions › MoleculeQuestionsFreeText > should have valid propTypes', t => {
|
|
8
9
|
t.pass();
|
|
9
10
|
forEach(MoleculeQuestionsFreeText.propTypes, (value, key) => {
|
|
@@ -11,5 +12,6 @@ test('MoleculeQuestions › MoleculeQuestionsFreeText > should have valid propTy
|
|
|
11
12
|
});
|
|
12
13
|
});
|
|
13
14
|
test('MoleculeQuestions › MoleculeQuestionsFreeText › Default › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureDefault);
|
|
14
|
-
test('MoleculeQuestions › MoleculeQuestionsFreeText ›
|
|
15
|
+
test('MoleculeQuestions › MoleculeQuestionsFreeText › WithValueOnChange › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureWithValueOnChange);
|
|
16
|
+
test('MoleculeQuestions › MoleculeQuestionsFreeText › WithValue › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureWithValue);
|
|
15
17
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/questions/free-text/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeQuestionsFreeText","fixtureDefault","
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/questions/free-text/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeQuestionsFreeText","fixtureDefault","fixtureWithValueOnChange","fixtureWithValue","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,2CAAjC;AACA,OAAOC,yBAAP,MAAsC,IAAtC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,wBAAP,MAAqC,iCAArC;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AAEAN,IAAI,CAAC,6EAAD,EAAgFO,CAAC,IAAI;AACvFA,EAAAA,CAAC,CAACC,IAAF;AACAP,EAAAA,OAAO,CAACE,yBAAyB,CAACM,SAA3B,EAAsC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC3DJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,uEAAsEF,GAAI,mEAAnG;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAX,IAAI,CAAC,8EAAD,EAAiFE,oBAAjF,EAAuGC,yBAAvG,EAAkIC,cAAlI,CAAJ;AACAJ,IAAI,CAAC,wFAAD,EAA2FE,oBAA3F,EAAiHC,yBAAjH,EAA4IE,wBAA5I,CAAJ;AACAL,IAAI,CAAC,gFAAD,EAAmFE,oBAAnF,EAAyGC,yBAAzG,EAAoIG,gBAApI,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../../test/helpers/render-component';\nimport MoleculeQuestionsFreeText from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureWithValueOnChange from './fixtures/with-value-on-change';\nimport fixtureWithValue from './fixtures/with-value';\n\ntest('MoleculeQuestions › MoleculeQuestionsFreeText > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeQuestionsFreeText.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"MoleculeQuestions.MoleculeQuestionsFreeText.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('MoleculeQuestions › MoleculeQuestionsFreeText › Default › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureDefault);\ntest('MoleculeQuestions › MoleculeQuestionsFreeText › WithValueOnChange › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureWithValueOnChange);\ntest('MoleculeQuestions › MoleculeQuestionsFreeText › WithValue › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureWithValue);\n"],"file":"fixtures.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 MoleculeReviewCorrectionPopin from '..';
|
|
5
|
+
import fixtureRight from './fixtures/right';
|
|
6
|
+
import fixtureWrong from './fixtures/wrong';
|
|
7
|
+
test('Molecule › MoleculeReviewCorrectionPopin > should have valid propTypes', t => {
|
|
8
|
+
t.pass();
|
|
9
|
+
forEach(MoleculeReviewCorrectionPopin.propTypes, (value, key) => {
|
|
10
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeReviewCorrectionPopin.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
test('Molecule › MoleculeReviewCorrectionPopin › Right › should be rendered', renderComponentMacro, MoleculeReviewCorrectionPopin, fixtureRight);
|
|
14
|
+
test('Molecule › MoleculeReviewCorrectionPopin › Wrong › should be rendered', renderComponentMacro, MoleculeReviewCorrectionPopin, fixtureWrong);
|
|
15
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/review-correction-popin/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeReviewCorrectionPopin","fixtureRight","fixtureWrong","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,6BAAP,MAA0C,IAA1C;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AAEAL,IAAI,CAAC,wEAAD,EAA2EM,CAAC,IAAI;AAClFA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,6BAA6B,CAACK,SAA/B,EAA0C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC/DJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,kEAAiEF,GAAI,mEAA9F;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,6BAAhG,EAA+HC,YAA/H,CAAJ;AACAJ,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,6BAAhG,EAA+HE,YAA/H,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeReviewCorrectionPopin from '..';\nimport fixtureRight from './fixtures/right';\nimport fixtureWrong from './fixtures/wrong';\n\ntest('Molecule › MoleculeReviewCorrectionPopin > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeReviewCorrectionPopin.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeReviewCorrectionPopin.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeReviewCorrectionPopin › Right › should be rendered', renderComponentMacro, MoleculeReviewCorrectionPopin, fixtureRight);\ntest('Molecule › MoleculeReviewCorrectionPopin › Wrong › should be rendered', renderComponentMacro, MoleculeReviewCorrectionPopin, fixtureWrong);\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(
|
|
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,WAAK,QAAL;AACE,4BAAO,oBAAC,MAAD,eAAYA,KAAZ;AAAmB,UAAA,KAAK,EAAE;AAA1B,WAAP;;AACF,WAAK,UAAL;AACE,4BAAO,oBAAC,aAAD,EAAmBA,KAAnB,CAAP;;AACF,WAAK,OAAL;AACE,
|
|
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,KAAjB,CAAP;;AACF,WAAK,QAAL;AACE,4BAAO,oBAAC,MAAD,eAAYA,KAAZ;AAAmB,UAAA,KAAK,EAAE;AAA1B,WAAP;;AACF,WAAK,UAAL;AACE,4BAAO,oBAAC,aAAD,EAAmBA,KAAnB,CAAP;;AACF,WAAK,OAAL;AACE,4BACE;AAAK,UAAA,SAAS,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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"}
|
|
@@ -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
|