@coorpacademy/components 10.3.25 → 10.3.27-alpha.26
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/autocomplete/test/fixtures/error.js +1 -1
- package/es/atom/autocomplete/test/fixtures/error.js.map +1 -1
- package/es/atom/autocomplete/test/fixtures/filled.js +1 -1
- package/es/atom/autocomplete/test/fixtures/filled.js.map +1 -1
- package/es/atom/autocomplete/test/fixtures/modified.js +1 -1
- package/es/atom/autocomplete/test/fixtures/modified.js.map +1 -1
- package/es/atom/clue/index.js.map +1 -1
- package/es/atom/clue/test/see-clue.js +33 -0
- package/es/atom/clue/test/see-clue.js.map +1 -1
- package/es/atom/content-badge/test/fixtures.js +2 -0
- package/es/atom/content-badge/test/fixtures.js.map +1 -1
- package/es/atom/cta/test/fixtures/certification.js +1 -1
- package/es/atom/cta/test/fixtures/certification.js.map +1 -1
- package/es/atom/cta/test/fixtures/disabled.js +1 -1
- package/es/atom/cta/test/fixtures/disabled.js.map +1 -1
- package/es/atom/cta/test/fixtures/light-small.js +1 -1
- package/es/atom/cta/test/fixtures/light-small.js.map +1 -1
- package/es/atom/cta/test/fixtures/light.js +1 -1
- package/es/atom/cta/test/fixtures/light.js.map +1 -1
- package/es/atom/cta/test/fixtures/logout.js +1 -1
- package/es/atom/cta/test/fixtures/logout.js.map +1 -1
- package/es/atom/cta/test/fixtures/primary-small.js +1 -1
- package/es/atom/cta/test/fixtures/primary-small.js.map +1 -1
- package/es/atom/cta/test/fixtures/rectangular-secondary-fullwidth.js +1 -1
- package/es/atom/cta/test/fixtures/rectangular-secondary-fullwidth.js.map +1 -1
- package/es/atom/cta/test/fixtures/rectangular-secondary.js +1 -1
- package/es/atom/cta/test/fixtures/rectangular-secondary.js.map +1 -1
- package/es/atom/cta/test/fixtures/rectangular.js +1 -1
- package/es/atom/cta/test/fixtures/rectangular.js.map +1 -1
- package/es/atom/cta/test/fixtures/secondary-small.js +1 -1
- package/es/atom/cta/test/fixtures/secondary-small.js.map +1 -1
- package/es/atom/cta/test/fixtures/secondary.js +1 -1
- package/es/atom/cta/test/fixtures/secondary.js.map +1 -1
- package/es/atom/drag-and-drop/index.js +1 -1
- package/es/atom/drag-and-drop/index.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/loading.js +1 -1
- package/es/atom/drag-and-drop/test/fixtures/loading.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/with-image-reset.js +1 -1
- package/es/atom/drag-and-drop/test/fixtures/with-image-reset.js.map +1 -1
- package/es/atom/image-upload/index.js +1 -1
- package/es/atom/image-upload/index.js.map +1 -1
- package/es/atom/image-upload/test/fixtures/desktop-reset-description-multiple.js +1 -1
- package/es/atom/image-upload/test/fixtures/desktop-reset-description-multiple.js.map +1 -1
- package/es/atom/image-upload/test/fixtures/desktop-reset-description-only-png.js +1 -1
- package/es/atom/image-upload/test/fixtures/desktop-reset-description-only-png.js.map +1 -1
- package/es/atom/image-upload/test/fixtures/desktop-reset-description.js +1 -1
- package/es/atom/image-upload/test/fixtures/desktop-reset-description.js.map +1 -1
- package/es/atom/image-upload/test/fixtures/desktop-reset-no-description.js +1 -1
- package/es/atom/image-upload/test/fixtures/desktop-reset-no-description.js.map +1 -1
- package/es/atom/image-upload/test/fixtures/email.js +1 -1
- package/es/atom/image-upload/test/fixtures/email.js.map +1 -1
- package/es/atom/image-upload/test/fixtures/mobile.js +1 -1
- package/es/atom/image-upload/test/fixtures/mobile.js.map +1 -1
- package/es/atom/image-upload/test/fixtures/modified.js +1 -1
- package/es/atom/image-upload/test/fixtures/modified.js.map +1 -1
- package/es/atom/input-html/index.js.map +1 -1
- package/es/atom/input-switch/index.js +13 -6
- package/es/atom/input-switch/index.js.map +1 -1
- package/es/atom/input-switch/style.css +47 -0
- package/es/atom/input-switch/test/fixtures/cm-left.js +11 -0
- package/es/atom/input-switch/test/fixtures/cm-left.js.map +1 -0
- package/es/atom/input-switch/test/fixtures/cm-right-checked.js +11 -0
- package/es/atom/input-switch/test/fixtures/cm-right-checked.js.map +1 -0
- package/es/atom/input-switch/test/fixtures/cm-right-disabled.js +11 -0
- package/es/atom/input-switch/test/fixtures/cm-right-disabled.js.map +1 -0
- package/es/atom/input-switch/test/fixtures/cm-right-modified.js +12 -0
- package/es/atom/input-switch/test/fixtures/cm-right-modified.js.map +1 -0
- package/es/atom/input-switch/test/fixtures/cm-right.js +11 -0
- package/es/atom/input-switch/test/fixtures/cm-right.js.map +1 -0
- package/es/atom/input-switch/test/fixtures/disabled.js +1 -1
- package/es/atom/input-switch/test/fixtures/disabled.js.map +1 -1
- package/es/atom/input-switch/test/fixtures.js +10 -0
- package/es/atom/input-switch/test/fixtures.js.map +1 -1
- package/es/atom/link/index.js +3 -2
- package/es/atom/link/index.js.map +1 -1
- package/es/atom/promo-code/index.js.map +1 -1
- package/es/atom/provider/index.js +1 -1
- package/es/atom/provider/index.js.map +1 -1
- package/es/atom/provider/test/index.js +1 -1
- package/es/atom/provider/test/index.js.map +1 -1
- package/es/atom/range/index.js +1 -1
- package/es/atom/range/index.js.map +1 -1
- package/es/atom/range/test/fixtures/multi.js +1 -1
- package/es/atom/range/test/fixtures/multi.js.map +1 -1
- package/es/atom/range/test/index.js +9 -9
- package/es/atom/range/test/index.js.map +1 -1
- package/es/atom/video-upload/index.js +1 -1
- package/es/atom/video-upload/index.js.map +1 -1
- package/es/atom/video-upload/test/fixtures/loading.js +1 -1
- package/es/atom/video-upload/test/fixtures/loading.js.map +1 -1
- package/es/atom/video-upload/test/fixtures/modified.js +1 -1
- package/es/atom/video-upload/test/fixtures/modified.js.map +1 -1
- package/es/hoc/animation-scheduler/index.js +3 -3
- package/es/hoc/animation-scheduler/index.js.map +1 -1
- package/es/hoc/swapper/index.js +4 -2
- package/es/hoc/swapper/index.js.map +1 -1
- package/es/hoc/transition/index.js +1 -1
- package/es/hoc/transition/index.js.map +1 -1
- package/es/molecule/add-to-my-list/index.js +1 -1
- package/es/molecule/add-to-my-list/index.js.map +1 -1
- package/es/molecule/answer/index.js +3 -2
- package/es/molecule/answer/index.js.map +1 -1
- package/es/molecule/answer/test/fixtures/audio.js +1 -1
- package/es/molecule/answer/test/fixtures/audio.js.map +1 -1
- package/es/molecule/answer/test/fixtures/default.js +1 -1
- package/es/molecule/answer/test/fixtures/default.js.map +1 -1
- package/es/molecule/answer/test/fixtures/drop-down.js +1 -1
- package/es/molecule/answer/test/fixtures/drop-down.js.map +1 -1
- package/es/molecule/answer/test/fixtures/qcm-arabic.js +1 -1
- package/es/molecule/answer/test/fixtures/qcm-arabic.js.map +1 -1
- package/es/molecule/answer/test/fixtures/qcm-drag.js +1 -1
- package/es/molecule/answer/test/fixtures/qcm-drag.js.map +1 -1
- package/es/molecule/answer/test/fixtures/qcm-graphic.js +1 -1
- package/es/molecule/answer/test/fixtures/qcm-graphic.js.map +1 -1
- package/es/molecule/answer/test/fixtures/qcm-short-audio.js +1 -1
- package/es/molecule/answer/test/fixtures/qcm-short-audio.js.map +1 -1
- package/es/molecule/answer/test/fixtures/qcm-short-video.js +1 -1
- package/es/molecule/answer/test/fixtures/qcm-short-video.js.map +1 -1
- package/es/molecule/answer/test/fixtures/qcm-short.js +1 -1
- package/es/molecule/answer/test/fixtures/qcm-short.js.map +1 -1
- package/es/molecule/answer/test/fixtures/qcm.js +1 -1
- package/es/molecule/answer/test/fixtures/qcm.js.map +1 -1
- package/es/molecule/answer/test/fixtures/range.js +1 -1
- package/es/molecule/answer/test/fixtures/range.js.map +1 -1
- package/es/molecule/answer/test/fixtures/template.js +1 -1
- package/es/molecule/answer/test/fixtures/template.js.map +1 -1
- package/es/molecule/banner/style.css +1 -0
- package/es/molecule/banner/test/fixtures/default.js +1 -1
- package/es/molecule/banner/test/fixtures/default.js.map +1 -1
- package/es/molecule/banner/test/fixtures.js +8 -0
- package/es/molecule/banner/test/fixtures.js.map +1 -1
- package/es/molecule/brand-form-group/index.js +18 -18
- package/es/molecule/brand-form-group/index.js.map +1 -1
- package/es/molecule/brand-form-group/test/fixtures/analytics.js +1 -1
- package/es/molecule/brand-form-group/test/fixtures/analytics.js.map +1 -1
- package/es/molecule/brand-form-group/test/fixtures/animations.js +2 -2
- package/es/molecule/brand-form-group/test/fixtures/animations.js.map +1 -1
- package/es/molecule/brand-form-group/test/fixtures/cohort.js +1 -1
- package/es/molecule/brand-form-group/test/fixtures/cohort.js.map +1 -1
- package/es/molecule/brand-form-group/test/fixtures/dashboard.js +1 -1
- package/es/molecule/brand-form-group/test/fixtures/dashboard.js.map +1 -1
- package/es/molecule/brand-form-group/test/fixtures/images.js +3 -3
- package/es/molecule/brand-form-group/test/fixtures/images.js.map +1 -1
- package/es/molecule/brand-form-group/test/fixtures/slider.js +1 -1
- package/es/molecule/brand-form-group/test/fixtures/slider.js.map +1 -1
- package/es/molecule/card/customer.css +61 -3
- package/es/molecule/card/customer.js +17 -5
- package/es/molecule/card/customer.js.map +1 -1
- package/es/molecule/card/index.js +16 -6
- package/es/molecule/card/index.js.map +1 -1
- package/es/molecule/card/style.css +86 -24
- package/es/molecule/card/test/fixtures/adaptiv-and-disabled.js +1 -1
- package/es/molecule/card/test/fixtures/adaptiv-and-disabled.js.map +1 -1
- package/es/molecule/card/test/fixtures/adaptiv.js +1 -1
- package/es/molecule/card/test/fixtures/adaptiv.js.map +1 -1
- package/es/molecule/card/test/fixtures/coorpmanager.js +18 -0
- package/es/molecule/card/test/fixtures/coorpmanager.js.map +1 -0
- package/es/molecule/card/test/fixtures/disabled.js +1 -1
- package/es/molecule/card/test/fixtures/disabled.js.map +1 -1
- package/es/molecule/card-content/index.js +11 -5
- package/es/molecule/card-content/index.js.map +1 -1
- package/es/molecule/card-content/style.css +52 -0
- package/es/molecule/card-content/test/fixtures/adaptiv-and-disabled.js +1 -1
- package/es/molecule/card-content/test/fixtures/adaptiv-and-disabled.js.map +1 -1
- package/es/molecule/card-content/test/fixtures/adaptiv.js +1 -1
- package/es/molecule/card-content/test/fixtures/adaptiv.js.map +1 -1
- package/es/molecule/card-content/test/fixtures/disabled.js +1 -1
- package/es/molecule/card-content/test/fixtures/disabled.js.map +1 -1
- package/es/molecule/card-with-button/index.js.map +1 -1
- package/es/molecule/cm-popin/style.css +1 -0
- package/es/molecule/coorp-manager-roles/index.js +1 -1
- package/es/molecule/coorp-manager-roles/index.js.map +1 -1
- package/es/molecule/dashboard/battle-request-list/index.js +1 -1
- package/es/molecule/dashboard/battle-request-list/index.js.map +1 -1
- package/es/molecule/dashboard/cards-list/test/fixtures/microlearning.js +1 -1
- package/es/molecule/dashboard/cards-list/test/fixtures/microlearning.js.map +1 -1
- package/es/molecule/dashboard/cards-list/test/fixtures/performance.js +1 -1
- package/es/molecule/dashboard/cards-list/test/fixtures/performance.js.map +1 -1
- package/es/molecule/dashboard/cards-list/test/index.js +1 -1
- package/es/molecule/dashboard/cards-list/test/index.js.map +1 -1
- package/es/molecule/dashboard/news-list/index.js +1 -1
- package/es/molecule/dashboard/news-list/index.js.map +1 -1
- package/es/molecule/dashboard/start-battle/index.js +1 -1
- package/es/molecule/dashboard/start-battle/index.js.map +1 -1
- package/es/molecule/discipline-header/test/fixtures/long-description.js.map +1 -1
- package/es/molecule/drag-and-drop/index.js +1 -1
- package/es/molecule/drag-and-drop/index.js.map +1 -1
- package/es/molecule/drag-and-drop/test/fixtures/error.js +1 -1
- package/es/molecule/drag-and-drop/test/fixtures/error.js.map +1 -1
- package/es/molecule/drag-and-drop/test/fixtures/loading.js +1 -1
- package/es/molecule/drag-and-drop/test/fixtures/loading.js.map +1 -1
- package/es/molecule/drag-and-drop/test/fixtures/ready-invalid.js +1 -1
- package/es/molecule/drag-and-drop/test/fixtures/ready-invalid.js.map +1 -1
- package/es/molecule/drag-and-drop/test/fixtures/ready.js +1 -1
- package/es/molecule/drag-and-drop/test/fixtures/ready.js.map +1 -1
- package/es/molecule/drag-and-drop/test/fixtures/success-video.js +1 -1
- package/es/molecule/drag-and-drop/test/fixtures/success-video.js.map +1 -1
- package/es/molecule/drag-and-drop/test/fixtures/success.js +1 -1
- package/es/molecule/drag-and-drop/test/fixtures/success.js.map +1 -1
- package/es/molecule/drag-and-drop/test/on-click.js +2 -2
- package/es/molecule/drag-and-drop/test/on-click.js.map +1 -1
- package/es/molecule/drag-and-drop/upload-report.js +1 -1
- package/es/molecule/drag-and-drop/upload-report.js.map +1 -1
- package/es/molecule/feedback/index.js +1 -1
- package/es/molecule/feedback/index.js.map +1 -1
- package/es/molecule/filters/test/fixtures/default.js +4 -4
- package/es/molecule/filters/test/fixtures/default.js.map +1 -1
- package/es/molecule/filters/test/fixtures/filters-list.js +6 -6
- package/es/molecule/filters/test/fixtures/filters-list.js.map +1 -1
- package/es/molecule/filters/test/fixtures/one.js +2 -2
- package/es/molecule/filters/test/fixtures/one.js.map +1 -1
- package/es/molecule/filters/test/fixtures/only-radio-group.js +1 -1
- package/es/molecule/filters/test/fixtures/only-radio-group.js.map +1 -1
- package/es/molecule/filters/test/fixtures/only-timer.js +1 -1
- package/es/molecule/filters/test/fixtures/only-timer.js.map +1 -1
- package/es/molecule/filters/test/fixtures/three.js +3 -3
- package/es/molecule/filters/test/fixtures/three.js.map +1 -1
- package/es/molecule/filters/test/fixtures/two.js +3 -3
- package/es/molecule/filters/test/fixtures/two.js.map +1 -1
- package/es/molecule/filters/test/fixtures/zero.js +1 -1
- package/es/molecule/filters/test/fixtures/zero.js.map +1 -1
- package/es/molecule/forum/forum-thread/test/fixtures/deep-answers.js +4 -4
- package/es/molecule/forum/forum-thread/test/fixtures/deep-answers.js.map +1 -1
- package/es/molecule/forum/forum-thread/test/fixtures/with-answers.js +1 -1
- package/es/molecule/forum/forum-thread/test/fixtures/with-answers.js.map +1 -1
- package/es/molecule/hero/test/fixtures/arabic.js +1 -1
- package/es/molecule/hero/test/fixtures/arabic.js.map +1 -1
- package/es/molecule/hero/test/fixtures/hero.js +1 -1
- package/es/molecule/hero/test/fixtures/hero.js.map +1 -1
- package/es/molecule/news/test/fixtures/long-description.js +1 -1
- package/es/molecule/news/test/fixtures/long-description.js.map +1 -1
- package/es/molecule/news/test/fixtures/long-title.js +1 -1
- package/es/molecule/news/test/fixtures/long-title.js.map +1 -1
- package/es/molecule/news/test/fixtures/small-desciption.js +1 -1
- package/es/molecule/news/test/fixtures/small-desciption.js.map +1 -1
- package/es/molecule/news/test/fixtures/small-title.js +1 -1
- package/es/molecule/news/test/fixtures/small-title.js.map +1 -1
- package/es/molecule/popin/index.js +1 -1
- package/es/molecule/popin/index.js.map +1 -1
- package/es/molecule/progress-bar/index.js +1 -1
- package/es/molecule/progress-bar/index.js.map +1 -1
- package/es/molecule/questions/drop-down/index.js +1 -1
- package/es/molecule/questions/drop-down/index.js.map +1 -1
- package/es/molecule/questions/question-range/index.js +3 -2
- package/es/molecule/questions/question-range/index.js.map +1 -1
- package/es/molecule/questions/template/index.js +2 -2
- package/es/molecule/questions/template/index.js.map +1 -1
- package/es/molecule/questions/template/test/index.js +1 -1
- package/es/molecule/questions/template/test/index.js.map +1 -1
- package/es/molecule/quick-access-card/index.js.map +1 -1
- package/es/molecule/resource-player/index.js +2 -1
- package/es/molecule/resource-player/index.js.map +1 -1
- package/es/molecule/select-multiple/index.js +3 -3
- package/es/molecule/select-multiple/index.js.map +1 -1
- package/es/molecule/select-multiple/style.css +2 -1
- package/es/molecule/select-multiple/test/fixtures.js +8 -0
- package/es/molecule/select-multiple/test/fixtures.js.map +1 -1
- package/es/molecule/select-multiple/test/index.js +2 -2
- package/es/molecule/select-multiple/test/index.js.map +1 -1
- package/es/molecule/setup-section/index.js +1 -1
- package/es/molecule/setup-section/index.js.map +1 -1
- package/es/molecule/setup-section/test/fixtures/first.js +1 -1
- package/es/molecule/setup-section/test/fixtures/first.js.map +1 -1
- package/es/molecule/setup-slide/index.js +8 -8
- package/es/molecule/setup-slide/index.js.map +1 -1
- package/es/molecule/share/index.js +1 -1
- package/es/molecule/share/index.js.map +1 -1
- package/es/molecule/video-iframe/index.js +1 -1
- package/es/molecule/video-iframe/index.js.map +1 -1
- package/es/molecule/video-player/index.js +3 -1
- package/es/molecule/video-player/index.js.map +1 -1
- package/es/molecule/video-player/jwplayer.js +2 -2
- package/es/molecule/video-player/jwplayer.js.map +1 -1
- package/es/molecule/video-player/test/fixtures/youtube.js +1 -1
- package/es/molecule/video-player/test/fixtures/youtube.js.map +1 -1
- package/es/molecule/video-player/vimeo.js +1 -1
- package/es/molecule/video-player/vimeo.js.map +1 -1
- package/es/molecule/wizard-summary/index.js +30 -3
- package/es/molecule/wizard-summary/index.js.map +1 -1
- package/es/organism/accordion/coorp-manager/index.js +1 -1
- package/es/organism/accordion/coorp-manager/index.js.map +1 -1
- package/es/organism/accordion/toggler/index.js +1 -1
- package/es/organism/accordion/toggler/index.js.map +1 -1
- package/es/organism/accordion/toggler/test/render.js +2 -2
- package/es/organism/accordion/toggler/test/render.js.map +1 -1
- package/es/organism/brand-form/test/fixtures/sso.js +3 -3
- package/es/organism/brand-form/test/fixtures/sso.js.map +1 -1
- package/es/organism/content-translation/index.js +2 -2
- package/es/organism/content-translation/index.js.map +1 -1
- package/es/organism/content-translation/style.css +1 -0
- package/es/organism/content-translation/test/fixtures/default.js +2 -2
- package/es/organism/content-translation/test/fixtures/default.js.map +1 -1
- package/es/organism/content-translation/test/fixtures.js +15 -0
- package/es/organism/content-translation/test/fixtures.js.map +1 -0
- package/es/organism/course-selection/index.js +26 -9
- package/es/organism/course-selection/index.js.map +1 -1
- package/es/organism/course-selection/style.css +11 -3
- package/es/organism/course-selection/test/fixtures/default.js +44 -13
- package/es/organism/course-selection/test/fixtures/default.js.map +1 -1
- package/es/organism/course-selection/test/fixtures/empty.js +9 -0
- package/es/organism/course-selection/test/fixtures/empty.js.map +1 -1
- package/es/organism/course-selection/test/fixtures/filtered.js +11 -3
- package/es/organism/course-selection/test/fixtures/filtered.js.map +1 -1
- package/es/organism/course-selection/test/fixtures/sorted-selected.js +14 -6
- package/es/organism/course-selection/test/fixtures/sorted-selected.js.map +1 -1
- package/es/organism/course-selection/test/fixtures/switch-activated.js +23 -0
- package/es/organism/course-selection/test/fixtures/switch-activated.js.map +1 -0
- package/es/organism/course-selection/test/fixtures/unsorted-selected.js +14 -6
- package/es/organism/course-selection/test/fixtures/unsorted-selected.js.map +1 -1
- package/es/organism/course-selection/test/fixtures.js +2 -0
- package/es/organism/course-selection/test/fixtures.js.map +1 -1
- package/es/organism/discussion/test/fixtures/default.js +1 -1
- package/es/organism/discussion/test/fixtures/default.js.map +1 -1
- package/es/organism/discussion/test/fixtures/loading-more.js +1 -1
- package/es/organism/discussion/test/fixtures/loading-more.js.map +1 -1
- package/es/organism/discussion/test/fixtures/new-discussion.js +1 -1
- package/es/organism/discussion/test/fixtures/new-discussion.js.map +1 -1
- package/es/organism/get-the-app/index.js +2 -2
- package/es/organism/get-the-app/index.js.map +1 -1
- package/es/organism/list-item/test/fixtures.js +19 -0
- package/es/organism/list-item/test/fixtures.js.map +1 -0
- package/es/organism/list-items/test/fixtures/archived.js +1 -1
- package/es/organism/list-items/test/fixtures/archived.js.map +1 -1
- package/es/organism/list-items/test/fixtures/draft.js +1 -1
- package/es/organism/list-items/test/fixtures/draft.js.map +1 -1
- package/es/organism/list-items/test/fixtures/published.js +2 -2
- package/es/organism/list-items/test/fixtures/published.js.map +1 -1
- package/es/organism/list-items/test/fixtures.js +17 -0
- package/es/organism/list-items/test/fixtures.js.map +1 -0
- package/es/organism/mooc/image-slider/test/fixtures/multiple-slides.js +2 -2
- package/es/organism/mooc/image-slider/test/fixtures/multiple-slides.js.map +1 -1
- package/es/organism/mooc-footer/style.css +1 -0
- package/es/organism/mooc-header/test/fixtures/default.js +1 -1
- package/es/organism/mooc-header/test/fixtures/default.js.map +1 -1
- package/es/organism/mooc-header/test/fixtures/logged-with-battle-notifications.js +1 -1
- package/es/organism/mooc-header/test/fixtures/logged-with-battle-notifications.js.map +1 -1
- package/es/organism/popin/test/fixtures/default.js.map +1 -1
- package/es/organism/resource-browser/test/fixtures/jwplayer-with-overlay.js +1 -1
- package/es/organism/resource-browser/test/fixtures/jwplayer-with-overlay.js.map +1 -1
- package/es/organism/resource-browser/test/fixtures/jwplayer.js +1 -1
- package/es/organism/resource-browser/test/fixtures/jwplayer.js.map +1 -1
- package/es/organism/resource-browser/test/fixtures/kontiki.js +1 -1
- package/es/organism/resource-browser/test/fixtures/kontiki.js.map +1 -1
- package/es/organism/resource-browser/test/fixtures/mp4.js +1 -1
- package/es/organism/resource-browser/test/fixtures/mp4.js.map +1 -1
- package/es/organism/search-and-chips-results/index.js +11 -4
- package/es/organism/search-and-chips-results/index.js.map +1 -1
- package/es/organism/search-and-chips-results/style.css +7 -1
- package/es/organism/search-and-chips-results/test/fixtures/default.js +1 -0
- package/es/organism/search-and-chips-results/test/fixtures/default.js.map +1 -1
- package/es/organism/settings/index.js +3 -2
- package/es/organism/settings/index.js.map +1 -1
- package/es/organism/sidebar/index.js +11 -10
- package/es/organism/sidebar/index.js.map +1 -1
- package/es/organism/user-preferences/index.js +3 -2
- package/es/organism/user-preferences/index.js.map +1 -1
- package/es/organism/wizard-contents/index.js +8 -9
- package/es/organism/wizard-contents/index.js.map +1 -1
- package/es/organism/wizard-contents/style.css +11 -13
- package/es/organism/wizard-contents/test/fixtures/playlist-add-courses-create.js +1 -1
- package/es/organism/wizard-contents/test/fixtures/playlist-add-courses-create.js.map +1 -1
- package/es/organism/wizard-contents/test/fixtures/playlist-general-settings-create.js +1 -1
- package/es/organism/wizard-contents/test/fixtures/playlist-general-settings-create.js.map +1 -1
- package/es/organism/wizard-contents/test/fixtures/playlist-general-settings-edit.js +1 -1
- package/es/organism/wizard-contents/test/fixtures/playlist-general-settings-edit.js.map +1 -1
- package/es/organism/wizard-contents/test/fixtures/playlist-populations-create.js +1 -1
- package/es/organism/wizard-contents/test/fixtures/playlist-populations-create.js.map +1 -1
- package/es/organism/wizard-contents/test/fixtures/playlist-translate-edit.js +1 -1
- package/es/organism/wizard-contents/test/fixtures/playlist-translate-edit.js.map +1 -1
- package/es/organism/wizard-contents/test/fixtures.js +21 -0
- package/es/organism/wizard-contents/test/fixtures.js.map +1 -0
- package/es/template/activity/index.js +1 -1
- package/es/template/activity/index.js.map +1 -1
- package/es/template/activity/test/progression-item-test.js +1 -1
- package/es/template/activity/test/progression-item-test.js.map +1 -1
- package/es/template/app-player/player/slides/footer/index.js +1 -1
- package/es/template/app-player/player/slides/footer/index.js.map +1 -1
- package/es/template/app-player/player/slides/index.js +14 -11
- package/es/template/app-player/player/slides/index.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/arabic-context.js +2 -2
- package/es/template/app-player/player/slides/test/fixtures/arabic-context.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/arabic-qcm.js +1 -1
- package/es/template/app-player/player/slides/test/fixtures/arabic-qcm.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/arabic-resources.js +2 -2
- package/es/template/app-player/player/slides/test/fixtures/arabic-resources.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/arabic.js +2 -2
- package/es/template/app-player/player/slides/test/fixtures/arabic.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/clue.js +2 -2
- package/es/template/app-player/player/slides/test/fixtures/clue.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/context-with-audio.js +2 -2
- package/es/template/app-player/player/slides/test/fixtures/context-with-audio.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/context-with-image.js +2 -2
- package/es/template/app-player/player/slides/test/fixtures/context-with-image.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/context-with-pdf.js +2 -2
- package/es/template/app-player/player/slides/test/fixtures/context-with-pdf.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/context-with-video.js +2 -2
- package/es/template/app-player/player/slides/test/fixtures/context-with-video.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/context.js +2 -2
- package/es/template/app-player/player/slides/test/fixtures/context.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/default.js +2 -2
- package/es/template/app-player/player/slides/test/fixtures/default.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/drop-down.js +1 -1
- package/es/template/app-player/player/slides/test/fixtures/drop-down.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/free-text.js +1 -1
- package/es/template/app-player/player/slides/test/fixtures/free-text.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/media-h5p.js +2 -2
- package/es/template/app-player/player/slides/test/fixtures/media-h5p.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/media-omni-player.js +2 -2
- package/es/template/app-player/player/slides/test/fixtures/media-omni-player.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/media.js +2 -2
- package/es/template/app-player/player/slides/test/fixtures/media.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/no-clue.js +2 -2
- package/es/template/app-player/player/slides/test/fixtures/no-clue.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/no-question.js +2 -2
- package/es/template/app-player/player/slides/test/fixtures/no-question.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/no-total.js +1 -1
- package/es/template/app-player/player/slides/test/fixtures/no-total.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/only-clue.js +2 -2
- package/es/template/app-player/player/slides/test/fixtures/only-clue.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/qcm-drag.js +1 -1
- package/es/template/app-player/player/slides/test/fixtures/qcm-drag.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/qcm-graphic.js +1 -1
- package/es/template/app-player/player/slides/test/fixtures/qcm-graphic.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/qcm-see-lesson-no-step.js +1 -1
- package/es/template/app-player/player/slides/test/fixtures/qcm-see-lesson-no-step.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/qcm-see-lesson.js +1 -1
- package/es/template/app-player/player/slides/test/fixtures/qcm-see-lesson.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/qcm-short.js +1 -1
- package/es/template/app-player/player/slides/test/fixtures/qcm-short.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/qcm-template.js +1 -1
- package/es/template/app-player/player/slides/test/fixtures/qcm-template.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/qcm-with-review-lesson.js +1 -1
- package/es/template/app-player/player/slides/test/fixtures/qcm-with-review-lesson.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/qcm.js +1 -1
- package/es/template/app-player/player/slides/test/fixtures/qcm.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/range.js +1 -1
- package/es/template/app-player/player/slides/test/fixtures/range.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/template.js +1 -1
- package/es/template/app-player/player/slides/test/fixtures/template.js.map +1 -1
- package/es/template/app-player/player/slides/test/fixtures/with-min-height.js +1 -1
- package/es/template/app-player/player/slides/test/fixtures/with-min-height.js.map +1 -1
- package/es/template/app-player/player/test/fixtures/background.js +1 -1
- package/es/template/app-player/player/test/fixtures/background.js.map +1 -1
- package/es/template/app-player/popin-correction/index.js +3 -2
- package/es/template/app-player/popin-correction/index.js.map +1 -1
- package/es/template/app-player/popin-correction/test/fixtures/correct-closed-without-klf-and-tips.js +1 -1
- package/es/template/app-player/popin-correction/test/fixtures/correct-closed-without-klf-and-tips.js.map +1 -1
- package/es/template/app-player/popin-correction/test/fixtures/correct-closed.js +1 -1
- package/es/template/app-player/popin-correction/test/fixtures/correct-closed.js.map +1 -1
- package/es/template/app-player/popin-end/summary.js +11 -7
- package/es/template/app-player/popin-end/summary.js.map +1 -1
- package/es/template/app-player/popin-end/test/fixtures/adaptive.js +2 -2
- package/es/template/app-player/popin-end/test/fixtures/adaptive.js.map +1 -1
- package/es/template/app-player/popin-end/test/fixtures/infinite-lives.js +2 -2
- package/es/template/app-player/popin-end/test/fixtures/infinite-lives.js.map +1 -1
- package/es/template/app-player/popin-header/index.js +4 -3
- package/es/template/app-player/popin-header/index.js.map +1 -1
- package/es/template/back-office/brand-create/test/fixtures/default.js +1 -1
- package/es/template/back-office/brand-create/test/fixtures/default.js.map +1 -1
- package/es/template/back-office/brand-create/test/fixtures/loading.js +1 -1
- package/es/template/back-office/brand-create/test/fixtures/loading.js.map +1 -1
- package/es/template/back-office/brand-create/test/fixtures/modified.js +1 -1
- package/es/template/back-office/brand-create/test/fixtures/modified.js.map +1 -1
- package/es/template/back-office/brand-list/test/fixtures/default.js +1 -1
- package/es/template/back-office/brand-list/test/fixtures/default.js.map +1 -1
- package/es/template/back-office/brand-list/test/fixtures/rh.js +1 -1
- package/es/template/back-office/brand-list/test/fixtures/rh.js.map +1 -1
- package/es/template/back-office/brand-update/index.js +13 -11
- package/es/template/back-office/brand-update/index.js.map +1 -1
- package/es/template/back-office/brand-update/style.css +4 -0
- package/es/template/back-office/brand-update/test/fixtures/list-items-archived.js +1 -1
- package/es/template/back-office/brand-update/test/fixtures/list-items-archived.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures/list-items-draft.js +1 -1
- package/es/template/back-office/brand-update/test/fixtures/list-items-draft.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures/list-items-published-with-popin.js +1 -1
- package/es/template/back-office/brand-update/test/fixtures/list-items-published-with-popin.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures/list-items-published.js +1 -1
- package/es/template/back-office/brand-update/test/fixtures/list-items-published.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures/loader.js +6 -2
- package/es/template/back-office/brand-update/test/fixtures/loader.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures/manageusers-edit.js +237 -2
- package/es/template/back-office/brand-update/test/fixtures/manageusers-edit.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures/manageusers-list.js +1 -1
- package/es/template/back-office/brand-update/test/fixtures/manageusers-list.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures/quick-access.js +1 -1
- package/es/template/back-office/brand-update/test/fixtures/quick-access.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures/uploadusers-loading.js +1 -1
- package/es/template/back-office/brand-update/test/fixtures/uploadusers-loading.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures/uploadusers-successful.js +1 -1
- package/es/template/back-office/brand-update/test/fixtures/uploadusers-successful.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures/uploadusers.js +2 -2
- package/es/template/back-office/brand-update/test/fixtures/uploadusers.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures/wizard-add-courses-playlist.js +1 -1
- package/es/template/back-office/brand-update/test/fixtures/wizard-add-courses-playlist.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures/wizard-form-create-playlist.js +50 -1
- package/es/template/back-office/brand-update/test/fixtures/wizard-form-create-playlist.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures/wizard-form-edit-playlist.js +1 -1
- package/es/template/back-office/brand-update/test/fixtures/wizard-form-edit-playlist.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures/wizard-populations-playlist-with-popin.js +1 -1
- package/es/template/back-office/brand-update/test/fixtures/wizard-populations-playlist-with-popin.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures/wizard-populations-playlist.js +1 -1
- package/es/template/back-office/brand-update/test/fixtures/wizard-populations-playlist.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures/wizard-translate-playlist.js +1 -1
- package/es/template/back-office/brand-update/test/fixtures/wizard-translate-playlist.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures.js +20 -2
- package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/es/template/cockpit/jw-uploader/index.js +1 -1
- package/es/template/cockpit/jw-uploader/index.js.map +1 -1
- package/es/template/common/dashboard/index.js +1 -1
- package/es/template/common/dashboard/index.js.map +1 -1
- package/es/template/common/dashboard/test/fixtures/empty-requests.js +1 -1
- package/es/template/common/dashboard/test/fixtures/empty-requests.js.map +1 -1
- package/es/template/common/dashboard/test/fixtures/with-hero-card.js +1 -1
- package/es/template/common/dashboard/test/fixtures/with-hero-card.js.map +1 -1
- package/es/template/common/discipline/test/fixtures/add-to-my-list.js +1 -1
- package/es/template/common/discipline/test/fixtures/add-to-my-list.js.map +1 -1
- package/es/template/common/discipline/test/fixtures/arabic.js +1 -1
- package/es/template/common/discipline/test/fixtures/arabic.js.map +1 -1
- package/es/template/common/discipline/test/fixtures/default.js +2 -2
- package/es/template/common/discipline/test/fixtures/default.js.map +1 -1
- package/es/template/common/discipline/test/fixtures/external-course-with-video.js +2 -2
- package/es/template/common/discipline/test/fixtures/external-course-with-video.js.map +1 -1
- package/es/template/common/discipline/test/fixtures/external-course-without-image.js +2 -2
- package/es/template/common/discipline/test/fixtures/external-course-without-image.js.map +1 -1
- package/es/template/common/discipline/test/fixtures/external-course.js +2 -2
- package/es/template/common/discipline/test/fixtures/external-course.js.map +1 -1
- package/es/template/common/discipline/test/fixtures/share.js +1 -1
- package/es/template/common/discipline/test/fixtures/share.js.map +1 -1
- package/es/template/teams-dashboard/test/fixtures/default.js +1 -1
- package/es/template/teams-dashboard/test/fixtures/default.js.map +1 -1
- package/es/template/teams-dashboard/test/fixtures/is-loading.js +1 -1
- package/es/template/teams-dashboard/test/fixtures/is-loading.js.map +1 -1
- package/es/template/teams-dashboard/test/fixtures/mobile.js +1 -1
- package/es/template/teams-dashboard/test/fixtures/mobile.js.map +1 -1
- package/es/util/shallow-compare.js.map +1 -1
- package/es/util/test/navigation.js +4 -3
- package/es/util/test/navigation.js.map +1 -1
- package/lib/atom/autocomplete/index.js +2 -2
- package/lib/atom/autocomplete/test/fixtures/error.js +1 -1
- package/lib/atom/autocomplete/test/fixtures/error.js.map +1 -1
- package/lib/atom/autocomplete/test/fixtures/filled.js +1 -1
- package/lib/atom/autocomplete/test/fixtures/filled.js.map +1 -1
- package/lib/atom/autocomplete/test/fixtures/modified.js +1 -1
- package/lib/atom/autocomplete/test/fixtures/modified.js.map +1 -1
- package/lib/atom/button-link/index.js +2 -2
- package/lib/atom/button-link-icon-only/index.js +2 -2
- package/lib/atom/button-menu/index.js +2 -2
- package/lib/atom/button-menu/test/fixtures/default.js +1 -1
- package/lib/atom/button-menu/test/fixtures/multiple-buttons.js +1 -1
- package/lib/atom/chips/index.js +2 -2
- package/lib/atom/clue/index.js.map +1 -1
- package/lib/atom/clue/test/see-clue.js +34 -0
- package/lib/atom/clue/test/see-clue.js.map +1 -1
- package/lib/atom/content-badge/test/fixtures.js +3 -0
- package/lib/atom/content-badge/test/fixtures.js.map +1 -1
- package/lib/atom/cta/test/fixtures/certification.js +1 -1
- package/lib/atom/cta/test/fixtures/certification.js.map +1 -1
- package/lib/atom/cta/test/fixtures/disabled.js +1 -1
- package/lib/atom/cta/test/fixtures/disabled.js.map +1 -1
- package/lib/atom/cta/test/fixtures/light-small.js +1 -1
- package/lib/atom/cta/test/fixtures/light-small.js.map +1 -1
- package/lib/atom/cta/test/fixtures/light.js +1 -1
- package/lib/atom/cta/test/fixtures/light.js.map +1 -1
- package/lib/atom/cta/test/fixtures/logout.js +1 -1
- package/lib/atom/cta/test/fixtures/logout.js.map +1 -1
- package/lib/atom/cta/test/fixtures/primary-small.js +1 -1
- package/lib/atom/cta/test/fixtures/primary-small.js.map +1 -1
- package/lib/atom/cta/test/fixtures/rectangular-secondary-fullwidth.js +1 -1
- package/lib/atom/cta/test/fixtures/rectangular-secondary-fullwidth.js.map +1 -1
- package/lib/atom/cta/test/fixtures/rectangular-secondary.js +1 -1
- package/lib/atom/cta/test/fixtures/rectangular-secondary.js.map +1 -1
- package/lib/atom/cta/test/fixtures/rectangular.js +1 -1
- package/lib/atom/cta/test/fixtures/rectangular.js.map +1 -1
- package/lib/atom/cta/test/fixtures/secondary-small.js +1 -1
- package/lib/atom/cta/test/fixtures/secondary-small.js.map +1 -1
- package/lib/atom/cta/test/fixtures/secondary.js +1 -1
- package/lib/atom/cta/test/fixtures/secondary.js.map +1 -1
- package/lib/atom/drag-and-drop/index.js +1 -1
- package/lib/atom/drag-and-drop/index.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/loading.js +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/loading.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/with-image-reset.js +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/with-image-reset.js.map +1 -1
- package/lib/atom/image-upload/index.js +3 -3
- package/lib/atom/image-upload/index.js.map +1 -1
- package/lib/atom/image-upload/test/fixtures/desktop-reset-description-multiple.js +1 -1
- package/lib/atom/image-upload/test/fixtures/desktop-reset-description-multiple.js.map +1 -1
- package/lib/atom/image-upload/test/fixtures/desktop-reset-description-only-png.js +1 -1
- package/lib/atom/image-upload/test/fixtures/desktop-reset-description-only-png.js.map +1 -1
- package/lib/atom/image-upload/test/fixtures/desktop-reset-description.js +1 -1
- package/lib/atom/image-upload/test/fixtures/desktop-reset-description.js.map +1 -1
- package/lib/atom/image-upload/test/fixtures/desktop-reset-no-description.js +1 -1
- package/lib/atom/image-upload/test/fixtures/desktop-reset-no-description.js.map +1 -1
- package/lib/atom/image-upload/test/fixtures/email.js +1 -1
- package/lib/atom/image-upload/test/fixtures/email.js.map +1 -1
- package/lib/atom/image-upload/test/fixtures/mobile.js +1 -1
- package/lib/atom/image-upload/test/fixtures/mobile.js.map +1 -1
- package/lib/atom/image-upload/test/fixtures/modified.js +1 -1
- package/lib/atom/image-upload/test/fixtures/modified.js.map +1 -1
- package/lib/atom/input-checkbox/index.js +2 -2
- package/lib/atom/input-color/index.js +2 -2
- package/lib/atom/input-doublestep/index.js +2 -2
- package/lib/atom/input-html/index.js.map +1 -1
- package/lib/atom/input-search/index.js +2 -2
- package/lib/atom/input-switch/index.js +15 -8
- package/lib/atom/input-switch/index.js.map +1 -1
- package/lib/atom/input-switch/style.css +47 -0
- package/lib/atom/input-switch/test/fixtures/cm-left.js +16 -0
- package/lib/atom/input-switch/test/fixtures/cm-left.js.map +1 -0
- package/lib/atom/input-switch/test/fixtures/cm-right-checked.js +16 -0
- package/lib/atom/input-switch/test/fixtures/cm-right-checked.js.map +1 -0
- package/lib/atom/input-switch/test/fixtures/cm-right-disabled.js +20 -0
- package/lib/atom/input-switch/test/fixtures/cm-right-disabled.js.map +1 -0
- package/lib/atom/input-switch/test/fixtures/cm-right-modified.js +17 -0
- package/lib/atom/input-switch/test/fixtures/cm-right-modified.js.map +1 -0
- package/lib/atom/input-switch/test/fixtures/cm-right.js +16 -0
- package/lib/atom/input-switch/test/fixtures/cm-right.js.map +1 -0
- package/lib/atom/input-switch/test/fixtures/disabled.js +1 -1
- package/lib/atom/input-switch/test/fixtures/disabled.js.map +1 -1
- package/lib/atom/input-switch/test/fixtures.js +15 -0
- package/lib/atom/input-switch/test/fixtures.js.map +1 -1
- package/lib/atom/input-text/index.js +2 -2
- package/lib/atom/input-textarea/index.js +2 -2
- package/lib/atom/link/index.js +4 -2
- package/lib/atom/link/index.js.map +1 -1
- package/lib/atom/promo-code/index.js.map +1 -1
- package/lib/atom/provider/index.js +1 -1
- package/lib/atom/provider/index.js.map +1 -1
- package/lib/atom/provider/test/index.js +1 -1
- package/lib/atom/provider/test/index.js.map +1 -1
- package/lib/atom/range/index.js +1 -1
- package/lib/atom/range/index.js.map +1 -1
- package/lib/atom/range/test/fixtures/multi.js +1 -1
- package/lib/atom/range/test/fixtures/multi.js.map +1 -1
- package/lib/atom/range/test/index.js +9 -9
- package/lib/atom/range/test/index.js.map +1 -1
- package/lib/atom/select/index.js +2 -2
- package/lib/atom/tab/index.js +2 -2
- package/lib/atom/video-upload/index.js +1 -1
- package/lib/atom/video-upload/index.js.map +1 -1
- package/lib/atom/video-upload/test/fixtures/loading.js +1 -1
- package/lib/atom/video-upload/test/fixtures/loading.js.map +1 -1
- package/lib/atom/video-upload/test/fixtures/modified.js +1 -1
- package/lib/atom/video-upload/test/fixtures/modified.js.map +1 -1
- package/lib/hoc/animation/index.js +1 -1
- package/lib/hoc/animation/test/on-mount.js +2 -2
- package/lib/hoc/animation-scheduler/index.js +4 -4
- package/lib/hoc/animation-scheduler/index.js.map +1 -1
- package/lib/hoc/animation-scheduler/test/fixtures/parallel.js +3 -3
- package/lib/hoc/animation-scheduler/test/fixtures/series.js +2 -2
- package/lib/hoc/animation-scheduler/test/on-mount.js +2 -2
- package/lib/hoc/swapper/index.js +5 -3
- package/lib/hoc/swapper/index.js.map +1 -1
- package/lib/hoc/swapper/test/on-mount.js +2 -2
- package/lib/hoc/transition/index.js +3 -3
- package/lib/hoc/transition/index.js.map +1 -1
- package/lib/molecule/add-to-my-list/index.js +4 -4
- package/lib/molecule/add-to-my-list/index.js.map +1 -1
- package/lib/molecule/answer/index.js +5 -3
- package/lib/molecule/answer/index.js.map +1 -1
- package/lib/molecule/answer/test/fixtures/audio.js +1 -1
- package/lib/molecule/answer/test/fixtures/audio.js.map +1 -1
- package/lib/molecule/answer/test/fixtures/default.js +1 -1
- package/lib/molecule/answer/test/fixtures/default.js.map +1 -1
- package/lib/molecule/answer/test/fixtures/drop-down.js +1 -1
- package/lib/molecule/answer/test/fixtures/drop-down.js.map +1 -1
- package/lib/molecule/answer/test/fixtures/qcm-arabic.js +1 -1
- package/lib/molecule/answer/test/fixtures/qcm-arabic.js.map +1 -1
- package/lib/molecule/answer/test/fixtures/qcm-drag.js +1 -1
- package/lib/molecule/answer/test/fixtures/qcm-drag.js.map +1 -1
- package/lib/molecule/answer/test/fixtures/qcm-graphic.js +1 -1
- package/lib/molecule/answer/test/fixtures/qcm-graphic.js.map +1 -1
- package/lib/molecule/answer/test/fixtures/qcm-short-audio.js +1 -1
- package/lib/molecule/answer/test/fixtures/qcm-short-audio.js.map +1 -1
- package/lib/molecule/answer/test/fixtures/qcm-short-video.js +1 -1
- package/lib/molecule/answer/test/fixtures/qcm-short-video.js.map +1 -1
- package/lib/molecule/answer/test/fixtures/qcm-short.js +1 -1
- package/lib/molecule/answer/test/fixtures/qcm-short.js.map +1 -1
- package/lib/molecule/answer/test/fixtures/qcm.js +1 -1
- package/lib/molecule/answer/test/fixtures/qcm.js.map +1 -1
- package/lib/molecule/answer/test/fixtures/range.js +1 -1
- package/lib/molecule/answer/test/fixtures/range.js.map +1 -1
- package/lib/molecule/answer/test/fixtures/template.js +1 -1
- package/lib/molecule/answer/test/fixtures/template.js.map +1 -1
- package/lib/molecule/banner/style.css +1 -0
- package/lib/molecule/banner/test/fixtures/default.js +1 -1
- package/lib/molecule/banner/test/fixtures/default.js.map +1 -1
- package/lib/molecule/banner/test/fixtures.js +12 -0
- package/lib/molecule/banner/test/fixtures.js.map +1 -1
- package/lib/molecule/brand-create-form/index.js +2 -2
- package/lib/molecule/brand-form-group/index.js +18 -18
- package/lib/molecule/brand-form-group/index.js.map +1 -1
- package/lib/molecule/brand-form-group/test/fixtures/analytics.js +1 -1
- package/lib/molecule/brand-form-group/test/fixtures/analytics.js.map +1 -1
- package/lib/molecule/brand-form-group/test/fixtures/animations.js +2 -2
- package/lib/molecule/brand-form-group/test/fixtures/animations.js.map +1 -1
- package/lib/molecule/brand-form-group/test/fixtures/cohort.js +1 -1
- package/lib/molecule/brand-form-group/test/fixtures/cohort.js.map +1 -1
- package/lib/molecule/brand-form-group/test/fixtures/dashboard.js +1 -1
- package/lib/molecule/brand-form-group/test/fixtures/dashboard.js.map +1 -1
- package/lib/molecule/brand-form-group/test/fixtures/images.js +3 -3
- package/lib/molecule/brand-form-group/test/fixtures/images.js.map +1 -1
- package/lib/molecule/brand-form-group/test/fixtures/slider.js +1 -1
- package/lib/molecule/brand-form-group/test/fixtures/slider.js.map +1 -1
- package/lib/molecule/bullet-point-menu-button/index.js +2 -2
- package/lib/molecule/card/customer.css +61 -3
- package/lib/molecule/card/customer.js +22 -6
- package/lib/molecule/card/customer.js.map +1 -1
- package/lib/molecule/card/index.js +22 -9
- package/lib/molecule/card/index.js.map +1 -1
- package/lib/molecule/card/style.css +86 -24
- package/lib/molecule/card/test/fixtures/adaptiv-and-disabled.js +1 -1
- package/lib/molecule/card/test/fixtures/adaptiv-and-disabled.js.map +1 -1
- package/lib/molecule/card/test/fixtures/adaptiv.js +1 -1
- package/lib/molecule/card/test/fixtures/adaptiv.js.map +1 -1
- package/lib/molecule/card/test/fixtures/coorpmanager.js +28 -0
- package/lib/molecule/card/test/fixtures/coorpmanager.js.map +1 -0
- package/lib/molecule/card/test/fixtures/disabled.js +1 -1
- package/lib/molecule/card/test/fixtures/disabled.js.map +1 -1
- package/lib/molecule/card-content/index.js +14 -6
- package/lib/molecule/card-content/index.js.map +1 -1
- package/lib/molecule/card-content/style.css +52 -0
- package/lib/molecule/card-content/test/fixtures/adaptiv-and-disabled.js +1 -1
- package/lib/molecule/card-content/test/fixtures/adaptiv-and-disabled.js.map +1 -1
- package/lib/molecule/card-content/test/fixtures/adaptiv.js +1 -1
- package/lib/molecule/card-content/test/fixtures/adaptiv.js.map +1 -1
- package/lib/molecule/card-content/test/fixtures/disabled.js +1 -1
- package/lib/molecule/card-content/test/fixtures/disabled.js.map +1 -1
- package/lib/molecule/card-with-button/index.js.map +1 -1
- package/lib/molecule/cm-popin/style.css +1 -0
- package/lib/molecule/coorp-manager-roles/index.js +1 -1
- package/lib/molecule/coorp-manager-roles/index.js.map +1 -1
- package/lib/molecule/dashboard/battle-request-list/index.js +1 -1
- package/lib/molecule/dashboard/battle-request-list/index.js.map +1 -1
- package/lib/molecule/dashboard/cards-list/test/fixtures/microlearning.js +1 -1
- package/lib/molecule/dashboard/cards-list/test/fixtures/microlearning.js.map +1 -1
- package/lib/molecule/dashboard/cards-list/test/fixtures/performance.js +1 -1
- package/lib/molecule/dashboard/cards-list/test/fixtures/performance.js.map +1 -1
- package/lib/molecule/dashboard/cards-list/test/index.js +1 -1
- package/lib/molecule/dashboard/cards-list/test/index.js.map +1 -1
- package/lib/molecule/dashboard/news-list/index.js +1 -1
- package/lib/molecule/dashboard/news-list/index.js.map +1 -1
- package/lib/molecule/dashboard/start-battle/index.js +1 -1
- package/lib/molecule/dashboard/start-battle/index.js.map +1 -1
- package/lib/molecule/discipline-header/test/fixtures/long-description.js.map +1 -1
- package/lib/molecule/drag-and-drop/index.js +3 -3
- package/lib/molecule/drag-and-drop/index.js.map +1 -1
- package/lib/molecule/drag-and-drop/test/fixtures/error.js +1 -1
- package/lib/molecule/drag-and-drop/test/fixtures/error.js.map +1 -1
- package/lib/molecule/drag-and-drop/test/fixtures/loading.js +1 -1
- package/lib/molecule/drag-and-drop/test/fixtures/loading.js.map +1 -1
- package/lib/molecule/drag-and-drop/test/fixtures/ready-invalid.js +1 -1
- package/lib/molecule/drag-and-drop/test/fixtures/ready-invalid.js.map +1 -1
- package/lib/molecule/drag-and-drop/test/fixtures/ready.js +1 -1
- package/lib/molecule/drag-and-drop/test/fixtures/ready.js.map +1 -1
- package/lib/molecule/drag-and-drop/test/fixtures/success-video.js +1 -1
- package/lib/molecule/drag-and-drop/test/fixtures/success-video.js.map +1 -1
- package/lib/molecule/drag-and-drop/test/fixtures/success.js +1 -1
- package/lib/molecule/drag-and-drop/test/fixtures/success.js.map +1 -1
- package/lib/molecule/drag-and-drop/test/on-click.js +2 -2
- package/lib/molecule/drag-and-drop/test/on-click.js.map +1 -1
- package/lib/molecule/drag-and-drop/upload-report.js +3 -3
- package/lib/molecule/drag-and-drop/upload-report.js.map +1 -1
- package/lib/molecule/feedback/index.js +3 -3
- package/lib/molecule/feedback/index.js.map +1 -1
- package/lib/molecule/filters/test/fixtures/default.js +4 -4
- package/lib/molecule/filters/test/fixtures/default.js.map +1 -1
- package/lib/molecule/filters/test/fixtures/filters-list.js +6 -6
- package/lib/molecule/filters/test/fixtures/filters-list.js.map +1 -1
- package/lib/molecule/filters/test/fixtures/one.js +2 -2
- package/lib/molecule/filters/test/fixtures/one.js.map +1 -1
- package/lib/molecule/filters/test/fixtures/only-radio-group.js +1 -1
- package/lib/molecule/filters/test/fixtures/only-radio-group.js.map +1 -1
- package/lib/molecule/filters/test/fixtures/only-timer.js +1 -1
- package/lib/molecule/filters/test/fixtures/only-timer.js.map +1 -1
- package/lib/molecule/filters/test/fixtures/three.js +3 -3
- package/lib/molecule/filters/test/fixtures/three.js.map +1 -1
- package/lib/molecule/filters/test/fixtures/two.js +3 -3
- package/lib/molecule/filters/test/fixtures/two.js.map +1 -1
- package/lib/molecule/filters/test/fixtures/zero.js +1 -1
- package/lib/molecule/filters/test/fixtures/zero.js.map +1 -1
- package/lib/molecule/forum/forum-thread/test/fixtures/deep-answers.js +4 -4
- package/lib/molecule/forum/forum-thread/test/fixtures/deep-answers.js.map +1 -1
- package/lib/molecule/forum/forum-thread/test/fixtures/with-answers.js +1 -1
- package/lib/molecule/forum/forum-thread/test/fixtures/with-answers.js.map +1 -1
- package/lib/molecule/hero/index.js +2 -2
- package/lib/molecule/hero/test/fixtures/arabic.js +1 -1
- package/lib/molecule/hero/test/fixtures/arabic.js.map +1 -1
- package/lib/molecule/hero/test/fixtures/hero.js +1 -1
- package/lib/molecule/hero/test/fixtures/hero.js.map +1 -1
- package/lib/molecule/news/test/fixtures/long-description.js +1 -1
- package/lib/molecule/news/test/fixtures/long-description.js.map +1 -1
- package/lib/molecule/news/test/fixtures/long-title.js +1 -1
- package/lib/molecule/news/test/fixtures/long-title.js.map +1 -1
- package/lib/molecule/news/test/fixtures/small-desciption.js +1 -1
- package/lib/molecule/news/test/fixtures/small-desciption.js.map +1 -1
- package/lib/molecule/news/test/fixtures/small-title.js +1 -1
- package/lib/molecule/news/test/fixtures/small-title.js.map +1 -1
- package/lib/molecule/popin/index.js +3 -3
- package/lib/molecule/popin/index.js.map +1 -1
- package/lib/molecule/progress-bar/index.js +1 -1
- package/lib/molecule/progress-bar/index.js.map +1 -1
- package/lib/molecule/questions/drop-down/index.js +3 -3
- package/lib/molecule/questions/drop-down/index.js.map +1 -1
- package/lib/molecule/questions/free-text/index.js +2 -2
- package/lib/molecule/questions/question-range/index.js +4 -2
- package/lib/molecule/questions/question-range/index.js.map +1 -1
- package/lib/molecule/questions/template/index.js +2 -2
- package/lib/molecule/questions/template/index.js.map +1 -1
- package/lib/molecule/questions/template/test/index.js +1 -1
- package/lib/molecule/questions/template/test/index.js.map +1 -1
- package/lib/molecule/quick-access-card/index.js.map +1 -1
- package/lib/molecule/resource-player/index.js +4 -2
- package/lib/molecule/resource-player/index.js.map +1 -1
- package/lib/molecule/scope-tabs/index.js +2 -2
- package/lib/molecule/search-form/index.js +2 -2
- package/lib/molecule/select-multiple/index.js +6 -6
- package/lib/molecule/select-multiple/index.js.map +1 -1
- package/lib/molecule/select-multiple/style.css +2 -1
- package/lib/molecule/select-multiple/test/fixtures.js +12 -0
- package/lib/molecule/select-multiple/test/fixtures.js.map +1 -1
- package/lib/molecule/select-multiple/test/index.js +4 -4
- package/lib/molecule/select-multiple/test/index.js.map +1 -1
- package/lib/molecule/setup-section/index.js +1 -1
- package/lib/molecule/setup-section/index.js.map +1 -1
- package/lib/molecule/setup-section/test/fixtures/first.js +1 -1
- package/lib/molecule/setup-section/test/fixtures/first.js.map +1 -1
- package/lib/molecule/setup-sections/index.js +2 -2
- package/lib/molecule/setup-slide/index.js +8 -8
- package/lib/molecule/setup-slide/index.js.map +1 -1
- package/lib/molecule/share/index.js +4 -4
- package/lib/molecule/share/index.js.map +1 -1
- package/lib/molecule/titled-checkbox/index.js +2 -2
- package/lib/molecule/vertical-tabs/test/fixtures/default.js +1 -1
- package/lib/molecule/video-iframe/index.js +1 -1
- package/lib/molecule/video-iframe/index.js.map +1 -1
- package/lib/molecule/video-player/index.js +3 -1
- package/lib/molecule/video-player/index.js.map +1 -1
- package/lib/molecule/video-player/jwplayer.js +2 -2
- package/lib/molecule/video-player/jwplayer.js.map +1 -1
- package/lib/molecule/video-player/test/fixtures/youtube.js +1 -1
- package/lib/molecule/video-player/test/fixtures/youtube.js.map +1 -1
- package/lib/molecule/video-player/vimeo.js +1 -1
- package/lib/molecule/video-player/vimeo.js.map +1 -1
- package/lib/molecule/wizard-summary/index.js +31 -4
- package/lib/molecule/wizard-summary/index.js.map +1 -1
- package/lib/organism/accordion/container/index.js +2 -2
- package/lib/organism/accordion/coorp-manager/index.js +3 -3
- package/lib/organism/accordion/coorp-manager/index.js.map +1 -1
- package/lib/organism/accordion/toggler/index.js +1 -1
- package/lib/organism/accordion/toggler/index.js.map +1 -1
- package/lib/organism/accordion/toggler/test/render.js +2 -2
- package/lib/organism/accordion/toggler/test/render.js.map +1 -1
- package/lib/organism/brand-form/index.js +2 -2
- package/lib/organism/brand-form/test/fixtures/sso.js +3 -3
- package/lib/organism/brand-form/test/fixtures/sso.js.map +1 -1
- package/lib/organism/content-translation/index.js +2 -2
- package/lib/organism/content-translation/index.js.map +1 -1
- package/lib/organism/content-translation/style.css +1 -0
- package/lib/organism/content-translation/test/fixtures/default.js +2 -2
- package/lib/organism/content-translation/test/fixtures/default.js.map +1 -1
- package/lib/organism/content-translation/test/fixtures.js +25 -0
- package/lib/organism/content-translation/test/fixtures.js.map +1 -0
- package/lib/organism/course-selection/index.js +28 -9
- package/lib/organism/course-selection/index.js.map +1 -1
- package/lib/organism/course-selection/style.css +11 -3
- package/lib/organism/course-selection/test/fixtures/default.js +45 -13
- package/lib/organism/course-selection/test/fixtures/default.js.map +1 -1
- package/lib/organism/course-selection/test/fixtures/empty.js +9 -0
- package/lib/organism/course-selection/test/fixtures/empty.js.map +1 -1
- package/lib/organism/course-selection/test/fixtures/filtered.js +11 -3
- package/lib/organism/course-selection/test/fixtures/filtered.js.map +1 -1
- package/lib/organism/course-selection/test/fixtures/sorted-selected.js +14 -6
- package/lib/organism/course-selection/test/fixtures/sorted-selected.js.map +1 -1
- package/lib/organism/course-selection/test/fixtures/switch-activated.js +32 -0
- package/lib/organism/course-selection/test/fixtures/switch-activated.js.map +1 -0
- package/lib/organism/course-selection/test/fixtures/unsorted-selected.js +14 -6
- package/lib/organism/course-selection/test/fixtures/unsorted-selected.js.map +1 -1
- package/lib/organism/course-selection/test/fixtures.js +3 -0
- package/lib/organism/course-selection/test/fixtures.js.map +1 -1
- package/lib/organism/discussion/test/fixtures/default.js +1 -1
- package/lib/organism/discussion/test/fixtures/default.js.map +1 -1
- package/lib/organism/discussion/test/fixtures/loading-more.js +1 -1
- package/lib/organism/discussion/test/fixtures/loading-more.js.map +1 -1
- package/lib/organism/discussion/test/fixtures/new-discussion.js +1 -1
- package/lib/organism/discussion/test/fixtures/new-discussion.js.map +1 -1
- package/lib/organism/get-the-app/index.js +2 -2
- package/lib/organism/get-the-app/index.js.map +1 -1
- package/lib/organism/list-item/test/fixtures.js +31 -0
- package/lib/organism/list-item/test/fixtures.js.map +1 -0
- package/lib/organism/list-items/test/fixtures/archived.js +1 -1
- package/lib/organism/list-items/test/fixtures/archived.js.map +1 -1
- package/lib/organism/list-items/test/fixtures/draft.js +1 -1
- package/lib/organism/list-items/test/fixtures/draft.js.map +1 -1
- package/lib/organism/list-items/test/fixtures/published.js +2 -2
- package/lib/organism/list-items/test/fixtures/published.js.map +1 -1
- package/lib/organism/list-items/test/fixtures.js +28 -0
- package/lib/organism/list-items/test/fixtures.js.map +1 -0
- package/lib/organism/mooc/image-slider/test/fixtures/multiple-slides.js +2 -2
- package/lib/organism/mooc/image-slider/test/fixtures/multiple-slides.js.map +1 -1
- package/lib/organism/mooc-footer/style.css +1 -0
- package/lib/organism/mooc-header/test/fixtures/default.js +1 -1
- package/lib/organism/mooc-header/test/fixtures/default.js.map +1 -1
- package/lib/organism/mooc-header/test/fixtures/logged-with-battle-notifications.js +1 -1
- package/lib/organism/mooc-header/test/fixtures/logged-with-battle-notifications.js.map +1 -1
- package/lib/organism/popin/test/fixtures/default.js.map +1 -1
- package/lib/organism/resource-browser/test/fixtures/jwplayer-with-overlay.js +1 -1
- package/lib/organism/resource-browser/test/fixtures/jwplayer-with-overlay.js.map +1 -1
- package/lib/organism/resource-browser/test/fixtures/jwplayer.js +1 -1
- package/lib/organism/resource-browser/test/fixtures/jwplayer.js.map +1 -1
- package/lib/organism/resource-browser/test/fixtures/kontiki.js +1 -1
- package/lib/organism/resource-browser/test/fixtures/kontiki.js.map +1 -1
- package/lib/organism/resource-browser/test/fixtures/mp4.js +1 -1
- package/lib/organism/resource-browser/test/fixtures/mp4.js.map +1 -1
- package/lib/organism/search-and-chips-results/index.js +12 -4
- package/lib/organism/search-and-chips-results/index.js.map +1 -1
- package/lib/organism/search-and-chips-results/style.css +7 -1
- package/lib/organism/search-and-chips-results/test/fixtures/default.js +1 -0
- package/lib/organism/search-and-chips-results/test/fixtures/default.js.map +1 -1
- package/lib/organism/settings/index.js +4 -2
- package/lib/organism/settings/index.js.map +1 -1
- package/lib/organism/sidebar/index.js +15 -13
- package/lib/organism/sidebar/index.js.map +1 -1
- package/lib/organism/user-preferences/index.js +4 -2
- package/lib/organism/user-preferences/index.js.map +1 -1
- package/lib/organism/wizard-contents/index.js +8 -10
- package/lib/organism/wizard-contents/index.js.map +1 -1
- package/lib/organism/wizard-contents/style.css +11 -13
- package/lib/organism/wizard-contents/test/fixtures/playlist-add-courses-create.js +1 -1
- package/lib/organism/wizard-contents/test/fixtures/playlist-add-courses-create.js.map +1 -1
- package/lib/organism/wizard-contents/test/fixtures/playlist-general-settings-create.js +1 -1
- package/lib/organism/wizard-contents/test/fixtures/playlist-general-settings-create.js.map +1 -1
- package/lib/organism/wizard-contents/test/fixtures/playlist-general-settings-edit.js +1 -1
- package/lib/organism/wizard-contents/test/fixtures/playlist-general-settings-edit.js.map +1 -1
- package/lib/organism/wizard-contents/test/fixtures/playlist-populations-create.js +1 -1
- package/lib/organism/wizard-contents/test/fixtures/playlist-populations-create.js.map +1 -1
- package/lib/organism/wizard-contents/test/fixtures/playlist-translate-edit.js +1 -1
- package/lib/organism/wizard-contents/test/fixtures/playlist-translate-edit.js.map +1 -1
- package/lib/organism/wizard-contents/test/fixtures.js +34 -0
- package/lib/organism/wizard-contents/test/fixtures.js.map +1 -0
- package/lib/template/activity/index.js +1 -1
- package/lib/template/activity/index.js.map +1 -1
- package/lib/template/activity/progression-item.js +2 -2
- package/lib/template/activity/test/progression-item-test.js +1 -1
- package/lib/template/activity/test/progression-item-test.js.map +1 -1
- package/lib/template/app-player/player/slides/footer/index.js +1 -1
- package/lib/template/app-player/player/slides/footer/index.js.map +1 -1
- package/lib/template/app-player/player/slides/index.js +15 -11
- package/lib/template/app-player/player/slides/index.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/arabic-context.js +2 -2
- package/lib/template/app-player/player/slides/test/fixtures/arabic-context.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/arabic-qcm.js +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/arabic-qcm.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/arabic-resources.js +2 -2
- package/lib/template/app-player/player/slides/test/fixtures/arabic-resources.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/arabic.js +2 -2
- package/lib/template/app-player/player/slides/test/fixtures/arabic.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/clue.js +2 -2
- package/lib/template/app-player/player/slides/test/fixtures/clue.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/context-with-audio.js +2 -2
- package/lib/template/app-player/player/slides/test/fixtures/context-with-audio.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/context-with-image.js +2 -2
- package/lib/template/app-player/player/slides/test/fixtures/context-with-image.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/context-with-pdf.js +2 -2
- package/lib/template/app-player/player/slides/test/fixtures/context-with-pdf.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/context-with-video.js +2 -2
- package/lib/template/app-player/player/slides/test/fixtures/context-with-video.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/context.js +2 -2
- package/lib/template/app-player/player/slides/test/fixtures/context.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/default.js +2 -2
- package/lib/template/app-player/player/slides/test/fixtures/default.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/drop-down.js +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/drop-down.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/free-text.js +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/free-text.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/media-h5p.js +2 -2
- package/lib/template/app-player/player/slides/test/fixtures/media-h5p.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/media-omni-player.js +2 -2
- package/lib/template/app-player/player/slides/test/fixtures/media-omni-player.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/media.js +2 -2
- package/lib/template/app-player/player/slides/test/fixtures/media.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/no-clue.js +2 -2
- package/lib/template/app-player/player/slides/test/fixtures/no-clue.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/no-question.js +2 -2
- package/lib/template/app-player/player/slides/test/fixtures/no-question.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/no-total.js +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/no-total.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/only-clue.js +2 -2
- package/lib/template/app-player/player/slides/test/fixtures/only-clue.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/qcm-drag.js +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/qcm-drag.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/qcm-graphic.js +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/qcm-graphic.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/qcm-see-lesson-no-step.js +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/qcm-see-lesson-no-step.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/qcm-see-lesson.js +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/qcm-see-lesson.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/qcm-short.js +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/qcm-short.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/qcm-template.js +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/qcm-template.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/qcm-with-review-lesson.js +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/qcm-with-review-lesson.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/qcm.js +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/qcm.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/range.js +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/range.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/template.js +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/template.js.map +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/with-min-height.js +1 -1
- package/lib/template/app-player/player/slides/test/fixtures/with-min-height.js.map +1 -1
- package/lib/template/app-player/player/test/fixtures/background.js +1 -1
- package/lib/template/app-player/player/test/fixtures/background.js.map +1 -1
- package/lib/template/app-player/popin-correction/index.js +6 -4
- package/lib/template/app-player/popin-correction/index.js.map +1 -1
- package/lib/template/app-player/popin-correction/test/fixtures/correct-closed-without-klf-and-tips.js +1 -1
- package/lib/template/app-player/popin-correction/test/fixtures/correct-closed-without-klf-and-tips.js.map +1 -1
- package/lib/template/app-player/popin-correction/test/fixtures/correct-closed.js +1 -1
- package/lib/template/app-player/popin-correction/test/fixtures/correct-closed.js.map +1 -1
- package/lib/template/app-player/popin-end/summary.js +12 -7
- package/lib/template/app-player/popin-end/summary.js.map +1 -1
- package/lib/template/app-player/popin-end/test/fixtures/adaptive.js +2 -2
- package/lib/template/app-player/popin-end/test/fixtures/adaptive.js.map +1 -1
- package/lib/template/app-player/popin-end/test/fixtures/infinite-lives.js +2 -2
- package/lib/template/app-player/popin-end/test/fixtures/infinite-lives.js.map +1 -1
- package/lib/template/app-player/popin-header/index.js +7 -5
- package/lib/template/app-player/popin-header/index.js.map +1 -1
- package/lib/template/back-office/brand-create/test/fixtures/default.js +1 -1
- package/lib/template/back-office/brand-create/test/fixtures/default.js.map +1 -1
- package/lib/template/back-office/brand-create/test/fixtures/loading.js +1 -1
- package/lib/template/back-office/brand-create/test/fixtures/loading.js.map +1 -1
- package/lib/template/back-office/brand-create/test/fixtures/modified.js +1 -1
- package/lib/template/back-office/brand-create/test/fixtures/modified.js.map +1 -1
- package/lib/template/back-office/brand-list/test/fixtures/default.js +1 -1
- package/lib/template/back-office/brand-list/test/fixtures/default.js.map +1 -1
- package/lib/template/back-office/brand-list/test/fixtures/rh.js +1 -1
- package/lib/template/back-office/brand-list/test/fixtures/rh.js.map +1 -1
- package/lib/template/back-office/brand-update/index.js +13 -11
- package/lib/template/back-office/brand-update/index.js.map +1 -1
- package/lib/template/back-office/brand-update/style.css +4 -0
- package/lib/template/back-office/brand-update/test/fixtures/analytics.js +2 -2
- package/lib/template/back-office/brand-update/test/fixtures/animations.js +2 -2
- package/lib/template/back-office/brand-update/test/fixtures/cohort-error.js +2 -2
- package/lib/template/back-office/brand-update/test/fixtures/cohort.js +2 -2
- package/lib/template/back-office/brand-update/test/fixtures/dashboard.js +2 -2
- package/lib/template/back-office/brand-update/test/fixtures/dashboards-analytics.js +2 -2
- package/lib/template/back-office/brand-update/test/fixtures/default.js +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/list-items-archived.js +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/list-items-archived.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/list-items-draft.js +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/list-items-draft.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/list-items-published-with-popin.js +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/list-items-published-with-popin.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/list-items-published.js +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/list-items-published.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/lms-error.js +2 -2
- package/lib/template/back-office/brand-update/test/fixtures/lms-modified.js +2 -2
- package/lib/template/back-office/brand-update/test/fixtures/lms-success.js +2 -2
- package/lib/template/back-office/brand-update/test/fixtures/lms.js +2 -2
- package/lib/template/back-office/brand-update/test/fixtures/loader.js +7 -3
- package/lib/template/back-office/brand-update/test/fixtures/loader.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/lookandfeel.js +2 -2
- package/lib/template/back-office/brand-update/test/fixtures/manageusers-edit.js +237 -2
- package/lib/template/back-office/brand-update/test/fixtures/manageusers-edit.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/manageusers-list.js +2 -2
- package/lib/template/back-office/brand-update/test/fixtures/manageusers-list.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/quick-access.js +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/quick-access.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/sso.js +2 -2
- package/lib/template/back-office/brand-update/test/fixtures/uploadusers-loading.js +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/uploadusers-loading.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/uploadusers-successful.js +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/uploadusers-successful.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/uploadusers.js +3 -3
- package/lib/template/back-office/brand-update/test/fixtures/uploadusers.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/wizard-add-courses-playlist.js +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/wizard-add-courses-playlist.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/wizard-form-create-playlist.js +50 -1
- package/lib/template/back-office/brand-update/test/fixtures/wizard-form-create-playlist.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/wizard-form-edit-playlist.js +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/wizard-form-edit-playlist.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/wizard-populations-playlist-with-popin.js +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/wizard-populations-playlist-with-popin.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/wizard-populations-playlist.js +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/wizard-populations-playlist.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/wizard-translate-playlist.js +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/wizard-translate-playlist.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures.js +30 -3
- package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/lib/template/cockpit/jw-uploader/index.js +1 -1
- package/lib/template/cockpit/jw-uploader/index.js.map +1 -1
- package/lib/template/common/dashboard/index.js +1 -1
- package/lib/template/common/dashboard/index.js.map +1 -1
- package/lib/template/common/dashboard/test/fixtures/empty-requests.js +1 -1
- package/lib/template/common/dashboard/test/fixtures/empty-requests.js.map +1 -1
- package/lib/template/common/dashboard/test/fixtures/with-hero-card.js +1 -1
- package/lib/template/common/dashboard/test/fixtures/with-hero-card.js.map +1 -1
- package/lib/template/common/discipline/index.js +2 -2
- package/lib/template/common/discipline/test/fixtures/add-to-my-list.js +1 -1
- package/lib/template/common/discipline/test/fixtures/add-to-my-list.js.map +1 -1
- package/lib/template/common/discipline/test/fixtures/arabic.js +1 -1
- package/lib/template/common/discipline/test/fixtures/arabic.js.map +1 -1
- package/lib/template/common/discipline/test/fixtures/default.js +2 -2
- package/lib/template/common/discipline/test/fixtures/default.js.map +1 -1
- package/lib/template/common/discipline/test/fixtures/external-course-with-video.js +2 -2
- package/lib/template/common/discipline/test/fixtures/external-course-with-video.js.map +1 -1
- package/lib/template/common/discipline/test/fixtures/external-course-without-image.js +2 -2
- package/lib/template/common/discipline/test/fixtures/external-course-without-image.js.map +1 -1
- package/lib/template/common/discipline/test/fixtures/external-course.js +2 -2
- package/lib/template/common/discipline/test/fixtures/external-course.js.map +1 -1
- package/lib/template/common/discipline/test/fixtures/share.js +1 -1
- package/lib/template/common/discipline/test/fixtures/share.js.map +1 -1
- package/lib/template/teams-dashboard/index.js +2 -2
- package/lib/template/teams-dashboard/test/fixtures/default.js +2 -2
- package/lib/template/teams-dashboard/test/fixtures/default.js.map +1 -1
- package/lib/template/teams-dashboard/test/fixtures/is-loading.js +1 -1
- package/lib/template/teams-dashboard/test/fixtures/is-loading.js.map +1 -1
- package/lib/template/teams-dashboard/test/fixtures/mobile.js +1 -1
- package/lib/template/teams-dashboard/test/fixtures/mobile.js.map +1 -1
- package/lib/test/helpers/render-component.js +1 -1
- package/lib/util/external-content.js +1 -1
- package/lib/util/proptypes.js +1 -1
- package/lib/util/shallow-compare.js.map +1 -1
- package/lib/util/test/navigation.js +5 -3
- package/lib/util/test/navigation.js.map +1 -1
- package/locales/hy/global.json +80 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/atom/range/index.js"],"names":["React","PropTypes","Provider","Handle","style","valueOnTrack","track","x","left","right","getBoundingClientRect","extractStateFromProps","props","multi","value","Range","Component","getDerivedStateFromProps","state","pending","constructor","context","handleClick","bind","setRefTrack","handleMinChange","handleMaxChange","handleMinChangeEnd","handleMaxChangeEnd","e","srcEvent","stopPropagation","preventDefault","newValue","center","handleChange","valueIndex","prevValue","minValue","maxValue","nextValue","triggerChange","setState","newValues","onChange","onChangeEnd","handle","clientX","isClickToTheLeft","closestHandle","Math","abs","renderHandles","animatedHandle","render","skin","defaultColor","railWidth","railLeft","railStyle","backgroundColor","width","containerWrapper","container","rail","animatedRail","childContextTypes","propTypes","func","bool","oneOfType","number","arrayOf"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,QAAP,MAAqB,aAArB;AACA,OAAOC,MAAP,MAAmB,UAAnB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,YAAY,GAAG,CAACC,KAAD,EAAQC,CAAR,KAAc;AACjC,QAAM;AAACC,IAAAA,IAAD;AAAOC,IAAAA;AAAP,MAAgBH,KAAK,CAACI,qBAAN,EAAtB;AACA,SAAO,OAAM,CAAN,EAAS,CAAT,EAAY,CAACH,CAAC,GAAGC,IAAL,KAA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AAC6D,YAA7C;AAA2D,MAAA,KAAK,EAAEN;AAAlE,MAFF,EAGG,KAAKP,aAAL,EAHH,CADF,CADF;AASD;;AAtKiC;;gBAA9BrC,K,kBASkB;AACpBwC,EAAAA,IAAI,EAAErD,QAAQ,CAACgE,iBAAT,CAA2BX;AADb,C;;AATlBxC,K,CACGoD,S,2CAAY;AACjBvB,EAAAA,QAAQ,EAAE3C,SAAS,CAACmE,IADH;AAEjBvB,EAAAA,WAAW,EAAE5C,SAAS,CAACmE,IAFN;AAGjBvD,EAAAA,KAAK,EAAEZ,SAAS,CAACoE,IAHA;AAIjB;AACAvD,EAAAA,KAAK,EAAEb,SAAS,CAACqE,SAAV,CAAoB,CAACrE,SAAS,CAACsE,MAAX,EAAmBtE,SAAS,CAACuE,OAAV,CAAkBvE,SAAS,CAACsE,MAA5B,CAAnB,CAApB;AALU,C;AAwKrB,eAAexD,KAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, noop, set, clamp} from 'lodash/fp';\nimport Provider from '../provider';\nimport Handle from './handle';\nimport style from './style.css';\n\nconst valueOnTrack = (track, x) => {\n const {left, right} = track.getBoundingClientRect();\n return clamp(0, 1, (x - left) / (right - left));\n};\n\nconst extractStateFromProps = props => {\n const {multi = false, value = multi ? [0, 1] : 0} = props;\n return {\n multi,\n value: multi ? value : [0, value]\n };\n};\n\nclass Range extends React.Component {\n static propTypes = {\n onChange: PropTypes.func,\n onChangeEnd: PropTypes.func,\n multi: PropTypes.bool,\n // eslint-disable-next-line react/no-unused-prop-types\n value: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)])\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin\n };\n\n static getDerivedStateFromProps(props, state) {\n const {pending} = state;\n\n if (pending) return null;\n\n return extractStateFromProps(props);\n }\n\n constructor(props, context) {\n super(props, context);\n\n this.state = {\n ...extractStateFromProps(props),\n pending: false\n };\n\n this.handleClick = this.handleClick.bind(this);\n this.setRefTrack = this.setRefTrack.bind(this);\n this.handleMinChange = this.handleMinChange.bind(this);\n this.handleMaxChange = this.handleMaxChange.bind(this);\n this.handleMinChangeEnd = this.handleMinChangeEnd.bind(this);\n this.handleMaxChangeEnd = this.handleMaxChangeEnd.bind(this);\n }\n\n setRefTrack(track) {\n this.track = track;\n }\n\n handleMinChange(e) {\n e.srcEvent.stopPropagation();\n e.srcEvent.preventDefault();\n const newValue = valueOnTrack(this.track, e.center.x);\n return this.handleChange(newValue, 0, true);\n }\n\n handleMaxChange(e) {\n e.srcEvent.stopPropagation();\n e.srcEvent.preventDefault();\n const newValue = valueOnTrack(this.track, e.center.x);\n return this.handleChange(newValue, 1, true);\n }\n\n handleMinChangeEnd(e) {\n e.srcEvent.stopPropagation();\n e.srcEvent.preventDefault();\n const newValue = valueOnTrack(this.track, e.center.x);\n return this.handleChange(newValue, 0, false);\n }\n\n handleMaxChangeEnd(e) {\n e.srcEvent.stopPropagation();\n e.srcEvent.preventDefault();\n const newValue = valueOnTrack(this.track, e.center.x);\n return this.handleChange(newValue, 1, false);\n }\n\n handleChange(value, valueIndex, pending) {\n const {value: prevValue} = this.state;\n\n const newValue = set(valueIndex, value, prevValue);\n\n const [minValue, maxValue] = newValue;\n\n const nextValue = minValue > maxValue ? prevValue : newValue;\n\n this.triggerChange(nextValue, pending);\n return this.setState({\n pending,\n value: pending ? nextValue : extractStateFromProps(this.props).value\n });\n }\n\n triggerChange(newValues, pending) {\n const {onChange = noop, onChangeEnd = onChange, multi = false} = this.props;\n\n const handle = pending ? onChange : onChangeEnd;\n\n return handle(multi ? newValues : newValues[1]);\n }\n\n handleClick(e) {\n e.stopPropagation();\n e.preventDefault();\n const {\n value: [left, right],\n multi\n } = this.state;\n const x = e.clientX;\n const newValue = valueOnTrack(this.track, x);\n\n if (!multi) return this.handleChange(newValue, 1, false);\n\n if (left === right) {\n const isClickToTheLeft = left - newValue > 0;\n return this.handleChange(newValue, isClickToTheLeft ? 0 : 1, false);\n }\n\n const closestHandle = Math.abs(newValue - left) < Math.abs(newValue - right) ? 0 : 1;\n return this.handleChange(newValue, closestHandle, false);\n }\n\n renderHandles() {\n const {\n value: [left, right],\n multi,\n pending\n } = this.state;\n\n return (\n <div>\n {multi ? (\n <span\n className={pending ? style.handle : style.animatedHandle}\n style={{left: `${left * 100}%`}}\n >\n <Handle axis=\"x\" onPan={this.handleMinChange} onPanEnd={this.handleMinChangeEnd} />\n </span>\n ) : null}\n <span\n className={pending ? style.handle : style.animatedHandle}\n style={{left: `${right * 100}%`}}\n >\n <Handle axis=\"x\" onPan={this.handleMaxChange} onPanEnd={this.handleMaxChangeEnd} />\n </span>\n </div>\n );\n }\n\n render() {\n const {skin} = this.context;\n const defaultColor = getOr('#00B0FF', 'common.primary', skin);\n\n const {\n value: [left, right],\n pending\n } = this.state;\n const railWidth = right - left;\n const railLeft = left;\n const railStyle = {\n backgroundColor: defaultColor,\n width: `${railWidth * 100}%`,\n left: `${railLeft * 100}%`\n };\n\n return (\n <div className={style.containerWrapper} onClick={this.handleClick}>\n <div className={style.container}>\n <div className={style.track} data-name=\"sliderTrack\" ref={this.setRefTrack} />\n <div className={pending ? style.rail : style.animatedRail} style={railStyle} />\n {this.renderHandles()}\n </div>\n </div>\n );\n }\n}\n\nexport default Range;\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../../src/atom/range/index.js"],"names":["React","PropTypes","Provider","Handle","style","valueOnTrack","track","x","left","right","getBoundingClientRect","extractStateFromProps","props","multi","value","Range","Component","getDerivedStateFromProps","state","pending","constructor","context","handleClick","bind","setRefTrack","handleMinChange","handleMaxChange","handleMinChangeEnd","handleMaxChangeEnd","e","srcEvent","stopPropagation","preventDefault","newValue","center","handleChange","valueIndex","prevValue","minValue","maxValue","nextValue","triggerChange","setState","newValues","onChange","onChangeEnd","handle","clientX","isClickToTheLeft","closestHandle","Math","abs","renderHandles","animatedHandle","render","skin","defaultColor","railWidth","railLeft","railStyle","backgroundColor","width","containerWrapper","container","rail","anim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I,GAFV;AAGhBjD,MAAAA,IAAI,EAAG,GAAEkD,QAAQ,GAAG,GAAI;AAHR,KAAlB;AAMA,wBACE;AAAK,MAAA,SAAS,EAAEtD,KAAK,CAAC0D,gBAAtB;AAAwC,MAAA,OAAO,EAAE,KAAKxC;AAAtD,oBACE;AAAK,MAAA,SAAS,EAAElB,KAAK,CAAC2D;AAAtB,oBACE;AAAK,MAAA,SAAS,EAAE3D,KAAK,CAACE,KAAtB;AAA6B,mBAAU,aAAvC;AAAqD,MAAA,GAAG,EAAE,KAAKkB;AAA/D,MADF,eAEE;AAAK,MAAA,SAAS,EAAEL,OAAO,GAAGf,KAAK,CAAC4D,IAAT,GAAgB5D,KAAK,CAAC6D,YAA7C;AAA2D,MAAA,KAAK,EAAEN;AAAlE,MAFF,EAGG,KAAKP,aAAL,EAHH,CADF,CADF;AASD;;AAtKiC;;gBAA9BrC,K,kBASkB;AACpBwC,EAAAA,IAAI,EAAErD,QAAQ,CAACgE,iBAAT,CAA2BX;AADb,C;;AATlBxC,K,CACGoD,S,2CAAY;AACjBvB,EAAAA,QAAQ,EAAE3C,SAAS,CAACmE,IADH;AAEjBvB,EAAAA,WAAW,EAAE5C,SAAS,CAACmE,IAFN;AAGjBvD,EAAAA,KAAK,EAAEZ,SAAS,CAACoE,IAHA;AAIjB;AACAvD,EAAAA,KAAK,EAAEb,SAAS,CAACqE,SAAV,CAAoB,CAACrE,SAAS,CAACsE,MAAX,EAAmBtE,SAAS,CAACuE,OAAV,CAAkBvE,SAAS,CAACsE,MAA5B,CAAnB,CAApB;AALU,C;AAwKrB,eAAexD,KAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, noop, set, clamp} from 'lodash/fp';\nimport Provider from '../provider';\nimport Handle from './handle';\nimport style from './style.css';\n\nconst valueOnTrack = (track, x) => {\n const {left, right} = track.getBoundingClientRect();\n return clamp(0, 1, (x - left) / (right - left));\n};\n\nconst extractStateFromProps = props => {\n const {multi = false, value = multi ? [0, 1] : 0} = props;\n return {\n multi,\n value: multi ? value : [0, value]\n };\n};\n\nclass Range extends React.Component {\n static propTypes = {\n onChange: PropTypes.func,\n onChangeEnd: PropTypes.func,\n multi: PropTypes.bool,\n // eslint-disable-next-line react/no-unused-prop-types\n value: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)])\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin\n };\n\n static getDerivedStateFromProps(props, state) {\n const {pending} = state;\n\n if (pending) return null;\n\n return extractStateFromProps(props);\n }\n\n constructor(props, context) {\n super(props, context);\n\n this.state = {\n ...extractStateFromProps(props),\n pending: false\n };\n\n this.handleClick = this.handleClick.bind(this);\n this.setRefTrack = this.setRefTrack.bind(this);\n this.handleMinChange = this.handleMinChange.bind(this);\n this.handleMaxChange = this.handleMaxChange.bind(this);\n this.handleMinChangeEnd = this.handleMinChangeEnd.bind(this);\n this.handleMaxChangeEnd = this.handleMaxChangeEnd.bind(this);\n }\n\n setRefTrack(track) {\n this.track = track;\n }\n\n handleMinChange(e) {\n e.srcEvent.stopPropagation();\n e.srcEvent.preventDefault();\n const newValue = valueOnTrack(this.track, e.center.x);\n return this.handleChange(newValue, 0, true);\n }\n\n handleMaxChange(e) {\n e.srcEvent.stopPropagation();\n e.srcEvent.preventDefault();\n const newValue = valueOnTrack(this.track, e.center.x);\n return this.handleChange(newValue, 1, true);\n }\n\n handleMinChangeEnd(e) {\n e.srcEvent.stopPropagation();\n e.srcEvent.preventDefault();\n const newValue = valueOnTrack(this.track, e.center.x);\n return this.handleChange(newValue, 0, false);\n }\n\n handleMaxChangeEnd(e) {\n e.srcEvent.stopPropagation();\n e.srcEvent.preventDefault();\n const newValue = valueOnTrack(this.track, e.center.x);\n return this.handleChange(newValue, 1, false);\n }\n\n handleChange(value, valueIndex, pending) {\n const {value: prevValue} = this.state;\n\n const newValue = set(valueIndex, value, prevValue);\n\n const [minValue, maxValue] = newValue;\n\n const nextValue = minValue > maxValue ? prevValue : newValue;\n\n this.triggerChange(nextValue, pending);\n return this.setState({\n pending,\n value: pending ? nextValue : extractStateFromProps(this.props).value\n });\n }\n\n triggerChange(newValues, pending) {\n const {onChange = noop, onChangeEnd = onChange, multi = false} = this.props;\n\n const handle = pending ? onChange : onChangeEnd;\n\n return handle(multi ? newValues : newValues[1]);\n }\n\n handleClick(e) {\n e.stopPropagation();\n e.preventDefault();\n const {\n value: [left, right],\n multi\n } = this.state;\n const x = e.clientX;\n const newValue = valueOnTrack(this.track, x);\n\n if (!multi) return this.handleChange(newValue, 1, false);\n\n if (left === right) {\n const isClickToTheLeft = left - newValue > 0;\n return this.handleChange(newValue, isClickToTheLeft ? 0 : 1, false);\n }\n\n const closestHandle = Math.abs(newValue - left) < Math.abs(newValue - right) ? 0 : 1;\n return this.handleChange(newValue, closestHandle, false);\n }\n\n renderHandles() {\n const {\n value: [left, right],\n multi,\n pending\n } = this.state;\n\n return (\n <div>\n {multi ? (\n <span\n className={pending ? style.handle : style.animatedHandle}\n style={{left: `${left * 100}%`}}\n >\n <Handle axis=\"x\" onPan={this.handleMinChange} onPanEnd={this.handleMinChangeEnd} />\n </span>\n ) : null}\n <span\n className={pending ? style.handle : style.animatedHandle}\n style={{left: `${right * 100}%`}}\n >\n <Handle axis=\"x\" onPan={this.handleMaxChange} onPanEnd={this.handleMaxChangeEnd} />\n </span>\n </div>\n );\n }\n\n render() {\n const {skin} = this.context;\n const defaultColor = getOr('#00B0FF', 'common.primary', skin);\n\n const {\n value: [left, right],\n pending\n } = this.state;\n const railWidth = right - left;\n const railLeft = left;\n const railStyle = {\n backgroundColor: defaultColor,\n width: `${railWidth * 100}%`,\n left: `${railLeft * 100}%`\n };\n\n return (\n <div className={style.containerWrapper} onClick={this.handleClick}>\n <div className={style.container}>\n <div className={style.track} data-name=\"sliderTrack\" ref={this.setRefTrack} />\n <div className={pending ? style.rail : style.animatedRail} style={railStyle} />\n {this.renderHandles()}\n </div>\n </div>\n );\n }\n}\n\nexport default Range;\n"],"file":"index.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/atom/range/test/fixtures/multi.js"],"names":["Default","props","multi","value"],"mappings":";;AAAA,OAAOA,OAAP,MAAoB,WAApB;AAEA,MAAM;AAACC,EAAAA;AAAD,IAAUD,OAAhB;AAEA,eAAe;AACbC,EAAAA,KAAK,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/range/test/fixtures/multi.js"],"names":["Default","props","multi","value"],"mappings":";;AAAA,OAAOA,OAAP,MAAoB,WAApB;AAEA,MAAM;AAACC,EAAAA;AAAD,IAAUD,OAAhB;AAEA,eAAe;AACbC,EAAAA,KAAK,eACAA,KADA;AAEHC,IAAAA,KAAK,EAAE,IAFJ;AAGHC,IAAAA,KAAK,EAAE,CAAC,GAAD,EAAM,GAAN;AAHJ;AADQ,CAAf","sourcesContent":["import Default from './default';\n\nconst {props} = Default;\n\nexport default {\n props: {\n ...props,\n multi: true,\n value: [0.2, 0.7]\n }\n};\n"],"file":"multi.js"}
|
|
@@ -159,7 +159,7 @@ test('should move handle when range is clicked (single)', t => {
|
|
|
159
159
|
right: 1100
|
|
160
160
|
});
|
|
161
161
|
|
|
162
|
-
wrapper.find(`.${style.containerWrapper}`).simulate('click', _extends(
|
|
162
|
+
wrapper.find(`.${style.containerWrapper}`).simulate('click', _extends({}, defaultEvent, {
|
|
163
163
|
clientX: 1020
|
|
164
164
|
}));
|
|
165
165
|
});
|
|
@@ -183,37 +183,37 @@ test('should move closest handle when range is clicked (multi)', t => {
|
|
|
183
183
|
right: 1100
|
|
184
184
|
});
|
|
185
185
|
|
|
186
|
-
wrapper.find(`.${style.containerWrapper}`).simulate('click', _extends(
|
|
186
|
+
wrapper.find(`.${style.containerWrapper}`).simulate('click', _extends({}, defaultEvent, {
|
|
187
187
|
clientX: 1020
|
|
188
188
|
}));
|
|
189
189
|
wrapper.setProps({
|
|
190
190
|
value: [0.2, 0.7]
|
|
191
191
|
});
|
|
192
|
-
wrapper.find(`.${style.containerWrapper}`).simulate('click', _extends(
|
|
192
|
+
wrapper.find(`.${style.containerWrapper}`).simulate('click', _extends({}, defaultEvent, {
|
|
193
193
|
clientX: 1090
|
|
194
194
|
}));
|
|
195
195
|
wrapper.setProps({
|
|
196
196
|
value: [0.2, 0.9]
|
|
197
197
|
});
|
|
198
|
-
wrapper.find(`.${style.containerWrapper}`).simulate('click', _extends(
|
|
198
|
+
wrapper.find(`.${style.containerWrapper}`).simulate('click', _extends({}, defaultEvent, {
|
|
199
199
|
clientX: 1040
|
|
200
200
|
}));
|
|
201
201
|
wrapper.setProps({
|
|
202
202
|
value: [0.4, 0.9]
|
|
203
203
|
});
|
|
204
|
-
wrapper.find(`.${style.containerWrapper}`).simulate('click', _extends(
|
|
204
|
+
wrapper.find(`.${style.containerWrapper}`).simulate('click', _extends({}, defaultEvent, {
|
|
205
205
|
clientX: 1070
|
|
206
206
|
}));
|
|
207
207
|
wrapper.setProps({
|
|
208
208
|
value: [0.4, 0.7]
|
|
209
209
|
});
|
|
210
|
-
wrapper.find(`.${style.containerWrapper}`).simulate('click', _extends(
|
|
210
|
+
wrapper.find(`.${style.containerWrapper}`).simulate('click', _extends({}, defaultEvent, {
|
|
211
211
|
clientX: 1000
|
|
212
212
|
}));
|
|
213
213
|
wrapper.setProps({
|
|
214
214
|
value: [0, 0.7]
|
|
215
215
|
});
|
|
216
|
-
wrapper.find(`.${style.containerWrapper}`).simulate('click', _extends(
|
|
216
|
+
wrapper.find(`.${style.containerWrapper}`).simulate('click', _extends({}, defaultEvent, {
|
|
217
217
|
clientX: 1100
|
|
218
218
|
}));
|
|
219
219
|
});
|
|
@@ -234,7 +234,7 @@ test('should moveleft handle if the two handles have the same values and the cli
|
|
|
234
234
|
right: 100
|
|
235
235
|
});
|
|
236
236
|
|
|
237
|
-
wrapper.find(`.${style.containerWrapper}`).simulate('click', _extends(
|
|
237
|
+
wrapper.find(`.${style.containerWrapper}`).simulate('click', _extends({}, defaultEvent, {
|
|
238
238
|
clientX: 40
|
|
239
239
|
}));
|
|
240
240
|
});
|
|
@@ -255,7 +255,7 @@ test('should move right handle if the two handles have the same values and the c
|
|
|
255
255
|
right: 100
|
|
256
256
|
});
|
|
257
257
|
|
|
258
|
-
wrapper.find(`.${style.containerWrapper}`).simulate('click', _extends(
|
|
258
|
+
wrapper.find(`.${style.containerWrapper}`).simulate('click', _extends({}, defaultEvent, {
|
|
259
259
|
clientX: 60
|
|
260
260
|
}));
|
|
261
261
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/atom/range/test/index.js"],"names":["browserEnv","test","React","mount","configure","Adapter","style","Range","adapter","defaultEvent","stopPropagation","preventDefault","t","component","slider","instance","track","getBoundingClientRect","left","right","handleMaxChange","srcEvent","center","setProps","multi","handleMaxChangeEnd","unmount","pass","macro","props","boundingRect","maxCenterEvent","maxExpected","minCenterEvent","minExpected","plan","expectedChange","validChange","value","deepEqual","shift","expectedChangeEnd","validChangeEnd","handleMinChange","handleMinChangeEnd","x","onChange","is","wrapper","find","containerWrapper","simulate","clientX","expectedValues","length"],"mappings":";;;;AAAA,OAAOA,UAAP,MAAuB,aAAvB;AACA,OAAOC,IAAP,MAAiB,KAAjB;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,SAAQC,KAAR,EAAeC,SAAf,QAA+B,QAA/B;AACA,OAAOC,OAAP,MAAoB,yBAApB;AAEA,OAAOC,KAAP,MAAkB,cAAlB,C,CAAkC;;AAClC,OAAOC,KAAP,MAAkB,IAAlB;AAEAP,UAAU;AACVI,SAAS,CAAC;AAACI,EAAAA,OAAO,EAAE,IAAIH,OAAJ;AAAV,CAAD,CAAT;AAEA,MAAMI,YAAY,GAAG;AACnBC,EAAAA,eAAe,OADI;AAEnBC,EAAAA,cAAc;AAFK,CAArB;AAKAV,IAAI,CAAC,wCAAD,EAA2CW,CAAC,IAAI;AAClD,QAAMC,SAAS,gBAAG,oBAAC,KAAD,OAAlB;AACA,QAAMC,MAAM,G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D,IAAD,CAArB;AACA,QAAM/B,QAAQ,GAAGiC,OAAO,CAACjC,QAAR,EAAjB;;AACAA,EAAAA,QAAQ,CAACC,KAAT,CAAeC,qBAAf,GAAuC,OAAO;AAACC,IAAAA,IAAI,EAAE,CAAP;AAAUC,IAAAA,KAAK,EAAE;AAAjB,GAAP,CAAvC;;AAEA6B,EAAAA,OAAO,CAACC,IAAR,CAAc,IAAG3C,KAAK,CAAC4C,gBAAiB,EAAxC,EAA2CC,QAA3C,CAAoD,OAApD,wBAAiE1C,YAAjE;AAA+E2C,IAAAA,OAAO,EAAE;AAAxF;AACD,CAVG,CAAJ;AAYAnD,IAAI,CAAC,gGAAD,EAAmGW,CAAC,IAAI;AAC1G,QAAMkC,QAAQ,GAAGR,KAAK,IAAI;AACxB1B,IAAAA,CAAC,CAAC2B,SAAF,CAAYD,KAAZ,EAAmB,CAAC,GAAD,EAAM,GAAN,CAAnB;AACD,GAFD;;AAIA,QAAMU,OAAO,GAAG7C,KAAK,eAAC,oBAAC,KAAD;AAAO,IAAA,KAAK,EAAE,CAAC,GAAD,EAAM,GAAN,CAAd;AAA0B,IAAA,QAAQ,EAAE2C,QAApC;AAA8C,IAAA,KAAK;AAAnD,IAAD,CAArB;AACA,QAAM/B,QAAQ,GAAGiC,OAAO,CAACjC,QAAR,EAAjB;;AACAA,EAAAA,QAAQ,CAACC,KAAT,CAAeC,qBAAf,GAAuC,OAAO;AAACC,IAAAA,IAAI,EAAE,CAAP;AAAUC,IAAAA,KAAK,EAAE;AAAjB,GAAP,CAAvC;;AAEA6B,EAAAA,OAAO,CAACC,IAAR,CAAc,IAAG3C,KAAK,CAAC4C,gBAAiB,EAAxC,EAA2CC,QAA3C,CAAoD,OAApD,wBAAiE1C,YAAjE;AAA+E2C,IAAAA,OAAO,EAAE;AAAxF;AACD,CAVG,CAAJ","sourcesContent":["import browserEnv from 'browser-env';\nimport test from 'ava';\nimport React from 'react';\nimport {mount, configure} from 'enzyme';\nimport Adapter from 'enzyme-adapter-react-16';\nimport {noop} from 'lodash/fp';\nimport style from '../style.css'; // eslint-disable-line css-modules/no-unused-class\nimport Range from '..';\n\nbrowserEnv();\nconfigure({adapter: new Adapter()});\n\nconst defaultEvent = {\n stopPropagation: noop,\n preventDefault: noop\n};\n\ntest('should instanciate Range without props', t => {\n const component = <Range />;\n const slider = mount(component);\n const instance = slider.instance();\n instance.track.getBoundingClientRect = () => ({left: 0, right: 100});\n instance.handleMaxChange({srcEvent: defaultEvent, center: {}});\n slider.setProps({multi: true});\n instance.handleMaxChangeEnd({srcEvent: defaultEvent, center: {}});\n slider.unmount();\n t.pass();\n});\n\nconst macro = (\n t,\n props,\n boundingRect,\n maxCenterEvent,\n maxExpected,\n minCenterEvent,\n minExpected\n) => {\n t.plan(minExpected ? 4 : 2);\n\n const expectedChange = [maxExpected, minExpected];\n const validChange = value => {\n t.deepEqual(value, expectedChange.shift());\n };\n const expectedChangeEnd = [maxExpected, minExpected];\n const validChangeEnd = value => {\n t.deepEqual(value, expectedChangeEnd.shift());\n };\n\n const component = <Range {...props} onChange={validChange} onChangeEnd={validChangeEnd} />;\n const slider = mount(component);\n const instance = slider.instance();\n\n instance.track.getBoundingClientRect = () => boundingRect;\n\n instance.handleMaxChange({srcEvent: {...defaultEvent}, center: maxCenterEvent});\n instance.handleMaxChangeEnd({srcEvent: {...defaultEvent}, center: maxCenterEvent});\n if (minCenterEvent)\n instance.handleMinChange({srcEvent: {...defaultEvent}, center: minCenterEvent});\n if (minCenterEvent)\n instance.handleMinChangeEnd({srcEvent: {...defaultEvent}, center: minCenterEvent});\n};\n\ntest('should instanciate Range', macro, {value: 0.5}, {left: 10, right: 110}, {x: 60}, 0.5);\ntest('should limit left hangle', macro, {value: 0.5}, {left: 10, right: 110}, {x: 0}, 0);\ntest('should limit right hangle', macro, {value: 0.5}, {left: 10, right: 110}, {x: 120}, 1);\n\ntest(\n 'should instanciate multi Range',\n macro,\n {multi: true, value: [0, 1]},\n {left: 10, right: 110},\n {x: 60},\n [0, 0.5],\n {x: 20},\n [0.1, 1]\n);\ntest(\n 'should limit hangles',\n macro,\n {multi: true, value: [0, 1]},\n {left: 10, right: 110},\n {x: 120},\n [0, 1],\n {x: 0},\n [0, 1]\n);\ntest(\n 'should limit hangles 2',\n macro,\n {multi: true, value: [0.4, 0.6]},\n {left: 0, right: 100},\n {x: 30},\n [0.4, 0.6],\n {x: 70},\n [0.4, 0.6]\n);\n\ntest('should move handle when range is clicked (single)', t => {\n t.plan(1);\n const onChange = value => {\n t.is(value, 0.2);\n };\n\n const wrapper = mount(<Range value={0.5} onChange={onChange} />);\n const instance = wrapper.instance();\n instance.track.getBoundingClientRect = () => ({left: 1000, right: 1100});\n wrapper.find(`.${style.containerWrapper}`).simulate('click', {...defaultEvent, clientX: 1020});\n});\n\ntest('should move closest handle when range is clicked (multi)', t => {\n const expectedValues = [\n [0.2, 0.7],\n [0.2, 0.9],\n [0.4, 0.9],\n [0.4, 0.7],\n [0, 0.7],\n [0, 1]\n ];\n t.plan(expectedValues.length);\n const onChange = value => {\n t.deepEqual(value, expectedValues.shift());\n };\n\n const wrapper = mount(<Range value={[0.3, 0.7]} onChange={onChange} multi />);\n const instance = wrapper.instance();\n instance.track.getBoundingClientRect = () => ({left: 1000, right: 1100});\n\n wrapper.find(`.${style.containerWrapper}`).simulate('click', {...defaultEvent, clientX: 1020});\n wrapper.setProps({value: [0.2, 0.7]});\n wrapper.find(`.${style.containerWrapper}`).simulate('click', {...defaultEvent, clientX: 1090});\n wrapper.setProps({value: [0.2, 0.9]});\n wrapper.find(`.${style.containerWrapper}`).simulate('click', {...defaultEvent, clientX: 1040});\n wrapper.setProps({value: [0.4, 0.9]});\n wrapper.find(`.${style.containerWrapper}`).simulate('click', {...defaultEvent, clientX: 1070});\n wrapper.setProps({value: [0.4, 0.7]});\n wrapper.find(`.${style.containerWrapper}`).simulate('click', {...defaultEvent, clientX: 1000});\n wrapper.setProps({value: [0, 0.7]});\n wrapper.find(`.${style.containerWrapper}`).simulate('click', {...defaultEvent, clientX: 1100});\n});\n\ntest('should moveleft handle if the two handles have the same values and the click is on the left', t => {\n const onChange = value => {\n t.deepEqual(value, [0.4, 0.5]);\n };\n\n const wrapper = mount(<Range value={[0.5, 0.5]} onChange={onChange} multi />);\n const instance = wrapper.instance();\n instance.track.getBoundingClientRect = () => ({left: 0, right: 100});\n\n wrapper.find(`.${style.containerWrapper}`).simulate('click', {...defaultEvent, clientX: 40});\n});\n\ntest('should move right handle if the two handles have the same values and the click is on the right', t => {\n const onChange = value => {\n t.deepEqual(value, [0.5, 0.6]);\n };\n\n const wrapper = mount(<Range value={[0.5, 0.5]} onChange={onChange} multi />);\n const instance = wrapper.instance();\n instance.track.getBoundingClientRect = () => ({left: 0, right: 100});\n\n wrapper.find(`.${style.containerWrapper}`).simulate('click', {...defaultEvent, clientX: 60});\n});\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/range/test/index.js"],"names":["browserEnv","test","React","mount","configure","Adapter","style","Range","adapter","defaultEvent","stopPropagation","preventDefault","t","component","slider","instance","track","getBoundingClientRect","left","right","handleMaxChange","srcEvent","center","setProps","multi","handleMaxChangeEnd","unmount","pass","macro","props","boundingRect","maxCenterEvent","maxExpected","minCenterEvent","minExpected","plan","expectedChange","validChange","value","deepEqual","shift","expectedChangeEnd","validChangeEnd","handleMinChange","handleMinChangeEnd","x","onChange","is","wrapper","find","containerWrapper","simulate","clientX","expectedValues","length"],"mappings":";;;;AAAA,OAAOA,UAAP,MAAuB,aAAvB;AACA,OAAOC,IAAP,MAAiB,KAAjB;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,SAAQC,KAAR,EAAeC,SAAf,QAA+B,QAA/B;AACA,OAAOC,OAAP,MAAoB,yBAApB;AAEA,OAAOC,KAAP,MAAkB,cAAlB,C,CAAkC;;AAClC,OAAOC,KAAP,MAAkB,IAAlB;AAEAP,UAAU;AACVI,SAAS,CAAC;AAACI,EAAAA,OAAO,EAAE,IAAIH,OAAJ;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B,EAAxC,EAA2CC,QAA3C,CAAoD,OAApD,eAAiE1C,YAAjE;AAA+E2C,IAAAA,OAAO,EAAE;AAAxF;AACD,CAVG,CAAJ","sourcesContent":["import browserEnv from 'browser-env';\nimport test from 'ava';\nimport React from 'react';\nimport {mount, configure} from 'enzyme';\nimport Adapter from 'enzyme-adapter-react-16';\nimport {noop} from 'lodash/fp';\nimport style from '../style.css'; // eslint-disable-line css-modules/no-unused-class\nimport Range from '..';\n\nbrowserEnv();\nconfigure({adapter: new Adapter()});\n\nconst defaultEvent = {\n stopPropagation: noop,\n preventDefault: noop\n};\n\ntest('should instanciate Range without props', t => {\n const component = <Range />;\n const slider = mount(component);\n const instance = slider.instance();\n instance.track.getBoundingClientRect = () => ({left: 0, right: 100});\n instance.handleMaxChange({srcEvent: defaultEvent, center: {}});\n slider.setProps({multi: true});\n instance.handleMaxChangeEnd({srcEvent: defaultEvent, center: {}});\n slider.unmount();\n t.pass();\n});\n\nconst macro = (\n t,\n props,\n boundingRect,\n maxCenterEvent,\n maxExpected,\n minCenterEvent,\n minExpected\n) => {\n t.plan(minExpected ? 4 : 2);\n\n const expectedChange = [maxExpected, minExpected];\n const validChange = value => {\n t.deepEqual(value, expectedChange.shift());\n };\n const expectedChangeEnd = [maxExpected, minExpected];\n const validChangeEnd = value => {\n t.deepEqual(value, expectedChangeEnd.shift());\n };\n\n const component = <Range {...props} onChange={validChange} onChangeEnd={validChangeEnd} />;\n const slider = mount(component);\n const instance = slider.instance();\n\n instance.track.getBoundingClientRect = () => boundingRect;\n\n instance.handleMaxChange({srcEvent: {...defaultEvent}, center: maxCenterEvent});\n instance.handleMaxChangeEnd({srcEvent: {...defaultEvent}, center: maxCenterEvent});\n if (minCenterEvent)\n instance.handleMinChange({srcEvent: {...defaultEvent}, center: minCenterEvent});\n if (minCenterEvent)\n instance.handleMinChangeEnd({srcEvent: {...defaultEvent}, center: minCenterEvent});\n};\n\ntest('should instanciate Range', macro, {value: 0.5}, {left: 10, right: 110}, {x: 60}, 0.5);\ntest('should limit left hangle', macro, {value: 0.5}, {left: 10, right: 110}, {x: 0}, 0);\ntest('should limit right hangle', macro, {value: 0.5}, {left: 10, right: 110}, {x: 120}, 1);\n\ntest(\n 'should instanciate multi Range',\n macro,\n {multi: true, value: [0, 1]},\n {left: 10, right: 110},\n {x: 60},\n [0, 0.5],\n {x: 20},\n [0.1, 1]\n);\ntest(\n 'should limit hangles',\n macro,\n {multi: true, value: [0, 1]},\n {left: 10, right: 110},\n {x: 120},\n [0, 1],\n {x: 0},\n [0, 1]\n);\ntest(\n 'should limit hangles 2',\n macro,\n {multi: true, value: [0.4, 0.6]},\n {left: 0, right: 100},\n {x: 30},\n [0.4, 0.6],\n {x: 70},\n [0.4, 0.6]\n);\n\ntest('should move handle when range is clicked (single)', t => {\n t.plan(1);\n const onChange = value => {\n t.is(value, 0.2);\n };\n\n const wrapper = mount(<Range value={0.5} onChange={onChange} />);\n const instance = wrapper.instance();\n instance.track.getBoundingClientRect = () => ({left: 1000, right: 1100});\n wrapper.find(`.${style.containerWrapper}`).simulate('click', {...defaultEvent, clientX: 1020});\n});\n\ntest('should move closest handle when range is clicked (multi)', t => {\n const expectedValues = [\n [0.2, 0.7],\n [0.2, 0.9],\n [0.4, 0.9],\n [0.4, 0.7],\n [0, 0.7],\n [0, 1]\n ];\n t.plan(expectedValues.length);\n const onChange = value => {\n t.deepEqual(value, expectedValues.shift());\n };\n\n const wrapper = mount(<Range value={[0.3, 0.7]} onChange={onChange} multi />);\n const instance = wrapper.instance();\n instance.track.getBoundingClientRect = () => ({left: 1000, right: 1100});\n\n wrapper.find(`.${style.containerWrapper}`).simulate('click', {...defaultEvent, clientX: 1020});\n wrapper.setProps({value: [0.2, 0.7]});\n wrapper.find(`.${style.containerWrapper}`).simulate('click', {...defaultEvent, clientX: 1090});\n wrapper.setProps({value: [0.2, 0.9]});\n wrapper.find(`.${style.containerWrapper}`).simulate('click', {...defaultEvent, clientX: 1040});\n wrapper.setProps({value: [0.4, 0.9]});\n wrapper.find(`.${style.containerWrapper}`).simulate('click', {...defaultEvent, clientX: 1070});\n wrapper.setProps({value: [0.4, 0.7]});\n wrapper.find(`.${style.containerWrapper}`).simulate('click', {...defaultEvent, clientX: 1000});\n wrapper.setProps({value: [0, 0.7]});\n wrapper.find(`.${style.containerWrapper}`).simulate('click', {...defaultEvent, clientX: 1100});\n});\n\ntest('should moveleft handle if the two handles have the same values and the click is on the left', t => {\n const onChange = value => {\n t.deepEqual(value, [0.4, 0.5]);\n };\n\n const wrapper = mount(<Range value={[0.5, 0.5]} onChange={onChange} multi />);\n const instance = wrapper.instance();\n instance.track.getBoundingClientRect = () => ({left: 0, right: 100});\n\n wrapper.find(`.${style.containerWrapper}`).simulate('click', {...defaultEvent, clientX: 40});\n});\n\ntest('should move right handle if the two handles have the same values and the click is on the right', t => {\n const onChange = value => {\n t.deepEqual(value, [0.5, 0.6]);\n };\n\n const wrapper = mount(<Range value={[0.5, 0.5]} onChange={onChange} multi />);\n const instance = wrapper.instance();\n instance.track.getBoundingClientRect = () => ({left: 0, right: 100});\n\n wrapper.find(`.${style.containerWrapper}`).simulate('click', {...defaultEvent, clientX: 60});\n});\n"],"file":"index.js"}
|
|
@@ -35,7 +35,7 @@ const VideoUpload = ({
|
|
|
35
35
|
onDragLeave: onDragStop
|
|
36
36
|
}));
|
|
37
37
|
|
|
38
|
-
VideoUpload.propTypes = process.env.NODE_ENV !== "production" ? _extends(
|
|
38
|
+
VideoUpload.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, DragAndDrop.propTypes, {
|
|
39
39
|
name: PropTypes.string,
|
|
40
40
|
onChange: PropTypes.func
|
|
41
41
|
}) : {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/atom/video-upload/index.js"],"names":["React","PropTypes","DragAndDrop","style","VideoUpload","title","description","previewLabel","uploadLabel","previewContent","loading","modified","onChange","name","onDragStart","onDragStop","input","propTypes","string","func"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,WAAP,MAAwB,kBAAxB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,WAAW,GAAG,CAAC;AACnBC,EAAAA,KADmB;AAEnBC,EAAAA,WAFmB;AAGnBC,EAAAA,YAHmB;AAInBC,EAAAA,WAJmB;AAKnBC,EAAAA,cALmB;AAMnBC,EAAAA,OANmB;AAOnBC,EAAAA,QAPmB;AAQnBC,EAAAA,QARmB;AASnBC,EAAAA;AATmB,CAAD,kBAWlB,oBAAC,WAAD;AACE,EAAA,KAAK,EAAER,KADT;AAEE,EAAA,WAAW,EAAEC,WAFf;AAGE,EAAA,YAAY,EAAEC,YAHhB;AAIE,EAAA,WAAW,EAAEC,WAJf;AAKE,EAAA,cAAc,EAAEC,cALlB;AAME,EAAA,OAAO,EAAEC,OANX;AAOE,EAAA,QAAQ,EAAEC;AAPZ,GASG,CAACG,WAAD,EAAcC,UAAd,kBACC;AACE,EAAA,IAAI,EAAC,MADP;AAEE,EAAA,IAAI,EAAEF,IAFR;AAGE,EAAA,MAAM,EAAC,SAHT;AAIE,EAAA,QAAQ,EAAEH,OAJZ;AAKE,EAAA,SAAS,EAAEP,KAAK,CAACa,KALnB;AAME,EAAA,QAAQ,EAAEJ,QANZ;AAOE,EAAA,WAAW,EAAEE,WAPf;AAQE,EAAA,MAAM,EAAEC,UARV;AASE,EAAA,WAAW,EAAEA;AATf,EAVJ,CAXF;;AAoCAX,WAAW,CAACa,SAAZ,
|
|
1
|
+
{"version":3,"sources":["../../../src/atom/video-upload/index.js"],"names":["React","PropTypes","DragAndDrop","style","VideoUpload","title","description","previewLabel","uploadLabel","previewContent","loading","modified","onChange","name","onDragStart","onDragStop","input","propTypes","string","func"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,WAAP,MAAwB,kBAAxB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,WAAW,GAAG,CAAC;AACnBC,EAAAA,KADmB;AAEnBC,EAAAA,WAFmB;AAGnBC,EAAAA,YAHmB;AAInBC,EAAAA,WAJmB;AAKnBC,EAAAA,cALmB;AAMnBC,EAAAA,OANmB;AAOnBC,EAAAA,QAPmB;AAQnBC,EAAAA,QARmB;AASnBC,EAAAA;AATmB,CAAD,kBAWlB,oBAAC,WAAD;AACE,EAAA,KAAK,EAAER,KADT;AAEE,EAAA,WAAW,EAAEC,WAFf;AAGE,EAAA,YAAY,EAAEC,YAHhB;AAIE,EAAA,WAAW,EAAEC,WAJf;AAKE,EAAA,cAAc,EAAEC,cALlB;AAME,EAAA,OAAO,EAAEC,OANX;AAOE,EAAA,QAAQ,EAAEC;AAPZ,GASG,CAACG,WAAD,EAAcC,UAAd,kBACC;AACE,EAAA,IAAI,EAAC,MADP;AAEE,EAAA,IAAI,EAAEF,IAFR;AAGE,EAAA,MAAM,EAAC,SAHT;AAIE,EAAA,QAAQ,EAAEH,OAJZ;AAKE,EAAA,SAAS,EAAEP,KAAK,CAACa,KALnB;AAME,EAAA,QAAQ,EAAEJ,QANZ;AAOE,EAAA,WAAW,EAAEE,WAPf;AAQE,EAAA,MAAM,EAAEC,UARV;AASE,EAAA,WAAW,EAAEA;AATf,EAVJ,CAXF;;AAoCAX,WAAW,CAACa,SAAZ,wDACKf,WAAW,CAACe,SADjB;AAEEJ,EAAAA,IAAI,EAAEZ,SAAS,CAACiB,MAFlB;AAGEN,EAAAA,QAAQ,EAAEX,SAAS,CAACkB;AAHtB;AAMA,eAAef,WAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport DragAndDrop from '../drag-and-drop';\nimport style from './style.css';\n\nconst VideoUpload = ({\n title,\n description,\n previewLabel,\n uploadLabel,\n previewContent,\n loading,\n modified,\n onChange,\n name\n}) => (\n <DragAndDrop\n title={title}\n description={description}\n previewLabel={previewLabel}\n uploadLabel={uploadLabel}\n previewContent={previewContent}\n loading={loading}\n modified={modified}\n >\n {(onDragStart, onDragStop) => (\n <input\n type=\"file\"\n name={name}\n accept=\"video/*\"\n disabled={loading}\n className={style.input}\n onChange={onChange}\n onDragEnter={onDragStart}\n onDrop={onDragStop}\n onDragLeave={onDragStop}\n />\n )}\n </DragAndDrop>\n);\n\nVideoUpload.propTypes = {\n ...DragAndDrop.propTypes,\n name: PropTypes.string,\n onChange: PropTypes.func\n};\n\nexport default VideoUpload;\n"],"file":"index.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/atom/video-upload/test/fixtures/loading.js"],"names":["WithoutVideo","props","loading"],"mappings":";;AAAA,OAAOA,YAAP,MAAyB,iBAAzB;AAEA,MAAM;AAACC,EAAAA;AAAD,IAAUD,YAAhB;AAEA,eAAe;AACbC,EAAAA,KAAK,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/video-upload/test/fixtures/loading.js"],"names":["WithoutVideo","props","loading"],"mappings":";;AAAA,OAAOA,YAAP,MAAyB,iBAAzB;AAEA,MAAM;AAACC,EAAAA;AAAD,IAAUD,YAAhB;AAEA,eAAe;AACbC,EAAAA,KAAK,eACAA,KADA;AAEHC,IAAAA,OAAO,EAAE;AAFN;AADQ,CAAf","sourcesContent":["import WithoutVideo from './without-video';\n\nconst {props} = WithoutVideo;\n\nexport default {\n props: {\n ...props,\n loading: true\n }\n};\n"],"file":"loading.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/atom/video-upload/test/fixtures/modified.js"],"names":["Desktop","props","modified"],"mappings":";;AAAA,OAAOA,OAAP,MAAoB,WAApB;AAEA,MAAM;AAACC,EAAAA;AAAD,IAAUD,OAAhB;AAEA,eAAe;AACbC,EAAAA,KAAK,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/video-upload/test/fixtures/modified.js"],"names":["Desktop","props","modified"],"mappings":";;AAAA,OAAOA,OAAP,MAAoB,WAApB;AAEA,MAAM;AAACC,EAAAA;AAAD,IAAUD,OAAhB;AAEA,eAAe;AACbC,EAAAA,KAAK,eACAA,KADA;AAEHC,IAAAA,QAAQ,EAAE;AAFP;AADQ,CAAf","sourcesContent":["import Desktop from './desktop';\n\nconst {props} = Desktop;\n\nexport default {\n props: {\n ...props,\n modified: true\n }\n};\n"],"file":"modified.js"}
|
|
@@ -26,7 +26,7 @@ const AnimationAdapter = ({
|
|
|
26
26
|
name,
|
|
27
27
|
children
|
|
28
28
|
}) => {
|
|
29
|
-
return React.Children.map(children, child => React.cloneElement(child, {
|
|
29
|
+
return React.Children.map(children, child => /*#__PURE__*/React.cloneElement(child, {
|
|
30
30
|
animated,
|
|
31
31
|
onAnimationEnd: () => onAnimationEnd(name)
|
|
32
32
|
}));
|
|
@@ -47,7 +47,7 @@ const walker = (type, handler) => children => {
|
|
|
47
47
|
if (_isNil(child) || _isString(child)) return child;
|
|
48
48
|
const newChild = child.type === type ? handler(child) : child;
|
|
49
49
|
if (React.Children.count(newChild.props.children) === 0) return newChild;
|
|
50
|
-
return React.cloneElement(newChild, {}, walker(type, handler)(newChild.props.children));
|
|
50
|
+
return /*#__PURE__*/React.cloneElement(newChild, {}, walker(type, handler)(newChild.props.children));
|
|
51
51
|
});
|
|
52
52
|
};
|
|
53
53
|
|
|
@@ -136,7 +136,7 @@ class AnimationScheduler extends React.Component {
|
|
|
136
136
|
onAnimationEnd = _noop,
|
|
137
137
|
after
|
|
138
138
|
} = child.props;
|
|
139
|
-
return React.cloneElement(child, {
|
|
139
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
140
140
|
animated: parentAnimated ? this.isAnimated(after) || animated : animated,
|
|
141
141
|
onAnimationEnd: name => {
|
|
142
142
|
this.handlerAnimationEnd(name);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/hoc/animation-scheduler/index.js"],"names":["React","PropTypes","Animation","Transition","AnimationAdapter","animated","onAnimationEnd","name","children","Children","map","child","cloneElement","propTypes","string","isRequired","func","bool","pickByWithKey","convert","cap","walker","type","handler","index","newChild","count","props","reduceChildren","fun","acc","newAcc","getAnimationNames","mergeAnimationStates","animations","names","value","key","AnimationScheduler","Component","getDerivedStateFromProps","state","constructor","isAnimated","after","handlerAnimationEnd","setState","hasPendingAnimation","processAnimation","parentAnimated","render","bind","node"],"mappings":";;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAoBA,OAAOC,SAAP,MAAsB,cAAtB;AACA,OAAOC,UAAP,MAAuB,eAAvB;;AAEA,MAAMC,gBAAgB,GAAG,CAAC;AAACC,EAAAA,QAAD;AAAWC,EAAAA,cAAc,QAAzB;AAAkCC,EAAAA,IAAlC;AAAwCC,EAAAA;AAAxC,CAAD,KAAuD;AAC9E,SAAOR,KAAK,CAACS,QAAN,CAAeC,GAAf,CAAmBF,QAAnB,EAA6BG,KAAK,
|
|
1
|
+
{"version":3,"sources":["../../../src/hoc/animation-scheduler/index.js"],"names":["React","PropTypes","Animation","Transition","AnimationAdapter","animated","onAnimationEnd","name","children","Children","map","child","cloneElement","propTypes","string","isRequired","func","bool","pickByWithKey","convert","cap","walker","type","handler","index","newChild","count","props","reduceChildren","fun","acc","newAcc","getAnimationNames","mergeAnimationStates","animations","names","value","key","AnimationScheduler","Component","getDerivedStateFromProps","state","constructor","isAnimated","after","handlerAnimationEnd","setState","hasPendingAnimation","processAnimation","parentAnimated","render","bind","node"],"mappings":";;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAoBA,OAAOC,SAAP,MAAsB,cAAtB;AACA,OAAOC,UAAP,MAAuB,eAAvB;;AAEA,MAAMC,gBAAgB,GAAG,CAAC;AAACC,EAAAA,QAAD;AAAWC,EAAAA,cAAc,QAAzB;AAAkCC,EAAAA,IAAlC;AAAwCC,EAAAA;AAAxC,CAAD,KAAuD;AAC9E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import {\n assign,\n every,\n getOr,\n get,\n includes,\n isArray,\n isNil,\n isString,\n noop,\n pickBy,\n some,\n negate,\n identity,\n values,\n pipe,\n reduce,\n set\n} from 'lodash/fp';\nimport Animation from '../animation';\nimport Transition from '../transition';\n\nconst AnimationAdapter = ({animated, onAnimationEnd = noop, name, children}) => {\n return React.Children.map(children, child =>\n React.cloneElement(child, {\n animated,\n onAnimationEnd: () => onAnimationEnd(name)\n })\n );\n};\n\nAnimationAdapter.propTypes = {\n name: PropTypes.string.isRequired,\n onAnimationEnd: PropTypes.func,\n animated: PropTypes.bool\n};\n\nconst pickByWithKey = pickBy.convert({cap: true});\n\nconst walker = (type, handler) => children => {\n return React.Children.map(children, (child, index) => {\n if (isNil(child) || isString(child)) return child;\n const newChild = child.type === type ? handler(child) : child;\n if (React.Children.count(newChild.props.children) === 0) return newChild;\n return React.cloneElement(newChild, {}, walker(type, handler)(newChild.props.children));\n });\n};\n\nconst reduceChildren = fun => acc => children => {\n let newAcc = acc;\n React.Children.map(children, child => {\n newAcc = fun(newAcc, child);\n return child;\n });\n return newAcc;\n};\n\nconst getAnimationNames = reduceChildren((acc, child) => {\n if (isString(child)) return acc;\n\n const {\n type,\n props: {children}\n } = child;\n if (Animation !== type && Transition !== type && AnimationAdapter !== type)\n return [...acc, ...getAnimationNames(children)];\n\n const {\n props: {name}\n } = child;\n return [name, ...acc, ...getAnimationNames(children)];\n})([]);\n\nconst mergeAnimationStates = (animations, children) => {\n const names = getAnimationNames(children);\n\n return pipe(\n pickByWithKey((value, key) => includes(key, names)),\n assign(reduce((acc, name) => set(name, false, acc), {}, names))\n )(animations);\n};\n\nclass AnimationScheduler extends React.Component {\n static propTypes = {\n onAnimationEnd: PropTypes.func,\n animated: PropTypes.bool,\n children: PropTypes.node\n };\n\n static getDerivedStateFromProps(props, state) {\n const {children} = props;\n const {animations} = state;\n return {\n animations: mergeAnimationStates(animations, children)\n };\n }\n\n constructor(props) {\n super(props);\n\n const {children} = props;\n this.state = {\n animations: mergeAnimationStates({}, children)\n };\n }\n\n isAnimated(after) {\n if (isNil(after)) return true;\n\n const {animations} = this.state;\n\n const isAnimated = every(\n name => getOr(false, name, animations),\n isArray(after) ? after : [after]\n );\n\n return isAnimated;\n }\n\n handlerAnimationEnd(name) {\n this.setState(set(['animations', name], true), () => {\n const hasPendingAnimation = pipe(\n get('state.animations'),\n values,\n some(negate(identity))\n )(this);\n const {onAnimationEnd = noop} = this.props;\n if (!hasPendingAnimation) return onAnimationEnd();\n });\n }\n\n processAnimation(child) {\n const {animated: parentAnimated} = this.props;\n const {animated, onAnimationEnd = noop, after} = child.props;\n\n return React.cloneElement(child, {\n animated: parentAnimated ? this.isAnimated(after) || animated : animated,\n onAnimationEnd: name => {\n this.handlerAnimationEnd(name);\n return onAnimationEnd(name);\n }\n });\n }\n\n render() {\n const {children} = this.props;\n return pipe(\n walker(Animation, this.processAnimation.bind(this)),\n walker(Transition, this.processAnimation.bind(this)),\n walker(AnimationAdapter, this.processAnimation.bind(this))\n )(children);\n }\n}\n\nexport default AnimationScheduler;\n\nexport {AnimationAdapter};\n"],"file":"index.js"}
|
package/es/hoc/swapper/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const _excluded = ["children"];
|
|
2
|
+
|
|
1
3
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
2
4
|
|
|
3
5
|
import React from 'react';
|
|
@@ -35,10 +37,10 @@ class Swapper extends React.Component {
|
|
|
35
37
|
{
|
|
36
38
|
children
|
|
37
39
|
} = _this$props,
|
|
38
|
-
props = _objectWithoutPropertiesLoose(_this$props,
|
|
40
|
+
props = _objectWithoutPropertiesLoose(_this$props, _excluded);
|
|
39
41
|
|
|
40
42
|
const child = React.Children.only(children);
|
|
41
|
-
return init ? React.cloneElement(child, props) : child;
|
|
43
|
+
return init ? /*#__PURE__*/React.cloneElement(child, props) : child;
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/hoc/swapper/index.js"],"names":["React","PropTypes","safeCancelAnimationFrame","requestId","cancelAnimationFrame","Swapper","Component","constructor","props","state","init","componentDidMount","requestAnimationFrame","requestID","setState","componentWillUnmount","undefined","render","children","child","Children","only","cloneElement","propTypes","node"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/hoc/swapper/index.js"],"names":["React","PropTypes","safeCancelAnimationFrame","requestId","cancelAnimationFrame","Swapper","Component","constructor","props","state","init","componentDidMount","requestAnimationFrame","requestID","setState","componentWillUnmount","undefined","render","children","child","Children","only","cloneElement","propTypes","node"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAO,MAAMC,wBAAwB,GAAGC,SAAS,IAAIA,SAAS,IAAIC,oBAAoB,CAACD,SAAD,CAA/E;;AAEP,MAAME,OAAN,SAAsBL,KAAK,CAACM,SAA5B,CAAsC;AAKpCC,EAAAA,WAAW,CAACC,KAAD,EAAQ;AACjB,UAAMA,KAAN;AAEA,SAAKC,KAAL,GAAa;AACXC,MAAAA,IAAI,EAAE;AADK,KAAb;AAGD;;AAEDC,EAAAA,iBAAiB,GAAG;AAClB,QAAI,OAAOC,qBAAP,KAAiC,WAArC,EAAkD;AAChD,WAAKC,SAAL,GAAiBD,qBAAqB,CAAC,MAAM,KAAKE,QAAL,CAAc;AAACJ,QAAAA,IAAI,EAAE;AAAP,OAAd,CAAP,CAAtC;AACD;AACF;;AAEDK,EAAAA,oBAAoB,GAAG;AACrB,QAAI,KAAKF,SAAL,KAAmBG,SAAvB,EAAkC;AAChCd,MAAAA,wBAAwB,CAAC,KAAKW,SAAN,CAAxB;AACD;AACF;;AAEDI,EAAAA,MAAM,GAAG;AACP,UAAM;AAACP,MAAAA;AAAD,QAAS,KAAKD,KAApB;;AACA,wBAA6B,KAAKD,KAAlC;AAAA,UAAM;AAACU,MAAAA;AAAD,KAAN;AAAA,UAAoBV,KAApB;;AACA,UAAMW,KAAK,GAAGnB,KAAK,CAACoB,QAAN,CAAeC,IAAf,CAAoBH,QAApB,CAAd;AAEA,WAAOR,IAAI,gBAAGV,KAAK,CAACsB,YAAN,CAAmBH,KAAnB,EAA0BX,KAA1B,CAAH,GAAsCW,KAAjD;AACD;;AA/BmC;;AAAhCd,O,CACGkB,S,2CAAY;AACjBL,EAAAA,QAAQ,EAAEjB,SAAS,CAACuB;AADH,C;AAiCrB,eAAenB,OAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nexport const safeCancelAnimationFrame = requestId => requestId && cancelAnimationFrame(requestId);\n\nclass Swapper extends React.Component {\n static propTypes = {\n children: PropTypes.node\n };\n\n constructor(props) {\n super(props);\n\n this.state = {\n init: true\n };\n }\n\n componentDidMount() {\n if (typeof requestAnimationFrame !== 'undefined') {\n this.requestID = requestAnimationFrame(() => this.setState({init: false}));\n }\n }\n\n componentWillUnmount() {\n if (this.requestID !== undefined) {\n safeCancelAnimationFrame(this.requestID);\n }\n }\n\n render() {\n const {init} = this.state;\n const {children, ...props} = this.props;\n const child = React.Children.only(children);\n\n return init ? React.cloneElement(child, props) : child;\n }\n}\n\nexport default Swapper;\n"],"file":"index.js"}
|
|
@@ -24,7 +24,7 @@ const Transition = props => {
|
|
|
24
24
|
const handlerAnimationEnd = useMemo(() => () => {
|
|
25
25
|
return onAnimationEnd(name);
|
|
26
26
|
}, []);
|
|
27
|
-
return React.cloneElement(child, {
|
|
27
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
28
28
|
className: classnames(propClassName, className),
|
|
29
29
|
onTransitionEnd: handlerAnimationEnd,
|
|
30
30
|
onAnimationEnd: handlerAnimationEnd
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/hoc/transition/index.js"],"names":["React","useMemo","PropTypes","classnames","Transition","props","name","children","className","animated","onAnimationEnd","Child","child","propClassName","handlerAnimationEnd","cloneElement","onTransitionEnd","Children","map","propTypes","string","isRequired","func","bool"],"mappings":";AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AAEA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;;AAEA,MAAMC,UAAU,GAAGC,KAAK,IAAI;AAC1B,QAAM;AAACC,IAAAA,IAAD;AAAOC,IAAAA,QAAP;AAAiBC,IAAAA,SAAjB;AAA4BC,IAAAA,QAA5B;AAAsCC,IAAAA,cAAc;AAApD,MAA+DL,KAArE;AAEA,MAAI,CAACI,QAAL,EAAe,OAAOF,QAAP;;AAEf,QAAMI,KAAK,GAAG,CAAC;AAACC,IAAAA;AAAD,GAAD,KAAa;AACzB,UAAM;AACJP,MAAAA,KAAK,EAAE;AAACG,QAAAA,SAAS,EAAEK;AAAZ;AADH,QAEFD,KAFJ;AAIA,UAAME,mBAAmB,GAAGb,OAAO,CACjC,MAAM,MAAM;AACV,aAAOS,cAAc,CAACJ,IAAD,CAArB;AACD,KAHgC,EAIjC,EAJiC,CAAnC;AAOA,
|
|
1
|
+
{"version":3,"sources":["../../../src/hoc/transition/index.js"],"names":["React","useMemo","PropTypes","classnames","Transition","props","name","children","className","animated","onAnimationEnd","Child","child","propClassName","handlerAnimationEnd","cloneElement","onTransitionEnd","Children","map","propTypes","string","isRequired","func","bool"],"mappings":";AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AAEA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;;AAEA,MAAMC,UAAU,GAAGC,KAAK,IAAI;AAC1B,QAAM;AAACC,IAAAA,IAAD;AAAOC,IAAAA,QAAP;AAAiBC,IAAAA,SAAjB;AAA4BC,IAAAA,QAA5B;AAAsCC,IAAAA,cAAc;AAApD,MAA+DL,KAArE;AAEA,MAAI,CAACI,QAAL,EAAe,OAAOF,QAAP;;AAEf,QAAMI,KAAK,GAAG,CAAC;AAACC,IAAAA;AAAD,GAAD,KAAa;AACzB,UAAM;AACJP,MAAAA,KAAK,EAAE;AAACG,QAAAA,SAAS,EAAEK;AAAZ;AADH,QAEFD,KAFJ;AAIA,UAAME,mBAAmB,GAAGb,OAAO,CACjC,MAAM,MAAM;AACV,aAAOS,cAAc,CAACJ,IAAD,CAArB;AACD,KAHgC,EAIjC,EAJiC,CAAnC;AAOA,wBAAON,KAAK,CAACe,YAAN,CAAmBH,KAAnB,EAA0B;AAC/BJ,MAAAA,SAAS,EAAEL,UAAU,CAACU,aAAD,EAAgBL,SAAhB,CADU;AAE/BQ,MAAAA,eAAe,EAAEF,mBAFc;AAG/BJ,MAAAA,cAAc,EAAEI;AAHe,KAA1B,CAAP;AAKD,GAjBD;;AAmBA,SAAOd,KAAK,CAACiB,QAAN,CAAeC,GAAf,CAAmBX,QAAnB,EAA6BK,KAAK,iBAAI,oBAAC,KAAD;AAAO,IAAA,KAAK,EAAEA;AAAd,IAAtC,CAAP;AACD,CAzBD;;AA2BAR,UAAU,CAACe,SAAX,2CAAuB;AACrBb,EAAAA,IAAI,EAAEJ,SAAS,CAACkB,MAAV,CAAiBC,UADF;AAErBX,EAAAA,cAAc,EAAER,SAAS,CAACoB,IAFL;AAGrBb,EAAAA,QAAQ,EAAEP,SAAS,CAACqB;AAHC,CAAvB;AAMA,eAAenB,UAAf","sourcesContent":["import React, {useMemo} from 'react';\nimport {noop} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\n\nconst Transition = props => {\n const {name, children, className, animated, onAnimationEnd = noop} = props;\n\n if (!animated) return children;\n\n const Child = ({child}) => {\n const {\n props: {className: propClassName}\n } = child;\n\n const handlerAnimationEnd = useMemo(\n () => () => {\n return onAnimationEnd(name);\n },\n []\n );\n\n return React.cloneElement(child, {\n className: classnames(propClassName, className),\n onTransitionEnd: handlerAnimationEnd,\n onAnimationEnd: handlerAnimationEnd\n });\n };\n\n return React.Children.map(children, child => <Child child={child} />);\n};\n\nTransition.propTypes = {\n name: PropTypes.string.isRequired,\n onAnimationEnd: PropTypes.func,\n animated: PropTypes.bool\n};\n\nexport default Transition;\n"],"file":"index.js"}
|
|
@@ -8,7 +8,7 @@ const ADD_TO_MY_LIST_STATUS = {
|
|
|
8
8
|
IDLE: 'IDLE',
|
|
9
9
|
SUCCESS: 'SUCCESS'
|
|
10
10
|
};
|
|
11
|
-
const StatusContext = React.createContext(ADD_TO_MY_LIST_STATUS.IDLE);
|
|
11
|
+
const StatusContext = /*#__PURE__*/React.createContext(ADD_TO_MY_LIST_STATUS.IDLE);
|
|
12
12
|
export const AddToMyListStatusProvider = ({
|
|
13
13
|
children
|
|
14
14
|
}) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/add-to-my-list/index.js"],"names":["React","useState","useContext","useEffect","PropTypes","classnames","NovaCompositionCoorpacademyCheck","CheckIcon","NovaCompositionNavigationMore","MoreIcon","Link","styles","ADD_TO_MY_LIST_STATUS","IDLE","SUCCESS","StatusContext","createContext","AddToMyListStatusProvider","children","status","setStatus","timeoutId","DURATION","setTimeout","clearTimeout","AddToMyListFeedback","addToMyListText","removeFromMyListText","favorite","feedback","checkIcon","AddToMyList","style","addToMyListButton","onFavoriteClick","cb","onClick","container","cta","wrapper","shareIcon","propTypes","node","string","bool","func"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,UAAzB,EAAqCC,SAArC,QAAqD,OAArD;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SACEC,gCAAgC,IAAIC,SADtC,EAEEC,6BAA6B,IAAIC,QAFnC,QAGO,0BAHP;AAIA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,MAAP,MAAmB,aAAnB;AAEA,MAAMC,qBAAqB,GAAG;AAC5BC,EAAAA,IAAI,EAAE,MADsB;AAE5BC,EAAAA,OAAO,EAAE;AAFmB,CAA9B;AAKA,MAAMC,aAAa,
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/add-to-my-list/index.js"],"names":["React","useState","useContext","useEffect","PropTypes","classnames","NovaCompositionCoorpacademyCheck","CheckIcon","NovaCompositionNavigationMore","MoreIcon","Link","styles","ADD_TO_MY_LIST_STATUS","IDLE","SUCCESS","StatusContext","createContext","AddToMyListStatusProvider","children","status","setStatus","timeoutId","DURATION","setTimeout","clearTimeout","AddToMyListFeedback","addToMyListText","removeFromMyListText","favorite","feedback","checkIcon","AddToMyList","style","addToMyListButton","onFavoriteClick","cb","onClick","container","cta","wrapper","shareIcon","propTypes","node","string","bool","func"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,UAAzB,EAAqCC,SAArC,QAAqD,OAArD;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SACEC,gCAAgC,IAAIC,SADtC,EAEEC,6BAA6B,IAAIC,QAFnC,QAGO,0BAHP;AAIA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,MAAP,MAAmB,aAAnB;AAEA,MAAMC,qBAAqB,GAAG;AAC5BC,EAAAA,IAAI,EAAE,MADsB;AAE5BC,EAAAA,OAAO,EAAE;AAFmB,CAA9B;AAKA,MAAMC,aAAa,gBAAGf,KAAK,CAACgB,aAAN,CAAoBJ,qBAAqB,CAACC,IAA1C,CAAtB;AAEA,OAAO,MAAMI,yBAAyB,GAAG,CAAC;AAACC,EAAAA;AAAD,CAAD,KAAgB;AACvD,QAAM,CAACC,MAAD,EAASC,SAAT,IAAsBnB,QAAQ,CAACW,qBAAqB,CAACC,IAAvB,CAApC;AACAV,EAAAA,SAAS,CAAC,MAAM;AACd,QAAIkB,SAAJ;AACA,UAAMC,QAAQ,GAAG,IAAjB;;AACA,QAAIH,MAAM,KAAKP,qBAA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ACD;;AAED,sBACE;AAAK,IAAA,SAAS,GAAGxB,MAAM,CAAC0B,SAAP,EAAkBL,KAArB;AAAd,kBACE,oBAAC,IAAD;AAAM,iBAAW,uBAAjB;AAA0C,IAAA,OAAO,EAAEI,OAAnD;AAA4D,IAAA,SAAS,EAAEzB,MAAM,CAAC2B;AAA9E,kBACE;AAAK,IAAA,SAAS,EAAE3B,MAAM,CAAC4B;AAAvB,KACGX,QAAQ,gBACP,oBAAC,SAAD;AAAW,IAAA,SAAS,EAAEjB,MAAM,CAAC6B,SAA7B;AAAwC,IAAA,KAAK,EAAE,EAA/C;AAAmD,IAAA,MAAM,EAAE;AAA3D,IADO,gBAGP,oBAAC,QAAD;AAAU,IAAA,SAAS,EAAE7B,MAAM,CAAC6B,SAA5B;AAAuC,IAAA,KAAK,EAAE,EAA9C;AAAkD,IAAA,MAAM,EAAE;AAA1D,IAJJ,eAME,+BAAIP,iBAAJ,CANF,CADF,CADF,CADF;AAcD,CAtBD;;AAwBAhB,yBAAyB,CAACwB,SAA1B,2CAAsC;AACpCvB,EAAAA,QAAQ,EAAEd,SAAS,CAACsC;AADgB,CAAtC;AAIAjB,mBAAmB,CAACgB,SAApB,2CAAgC;AAC9Bf,EAAAA,eAAe,EAAEtB,SAAS,CAACuC,MADG;AAE9BhB,EAAAA,oBAAoB,EAAEvB,SAAS,CAACuC,MAFF;AAG9Bf,EAAAA,QAAQ,EAAExB,SAAS,CAACwC;AAHU,CAAhC;AAMAb,WAAW,CAACU,SAAZ,2CAAwB;AACtBT,EAAAA,KAAK,EAAE5B,SAAS,CAACuC,MADK;AAEtBV,EAAAA,iBAAiB,EAAE7B,SAAS,CAACuC,MAFP;AAGtBf,EAAAA,QAAQ,EAAExB,SAAS,CAACwC,IAHE;AAItBV,EAAAA,eAAe,EAAE9B,SAAS,CAACyC;AAJL,CAAxB;AAOA,eAAed,WAAf","sourcesContent":["import React, {useState, useContext, useEffect} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {\n NovaCompositionCoorpacademyCheck as CheckIcon,\n NovaCompositionNavigationMore as MoreIcon\n} from '@coorpacademy/nova-icons';\nimport Link from '../../atom/link';\nimport styles from './style.css';\n\nconst ADD_TO_MY_LIST_STATUS = {\n IDLE: 'IDLE',\n SUCCESS: 'SUCCESS'\n};\n\nconst StatusContext = React.createContext(ADD_TO_MY_LIST_STATUS.IDLE);\n\nexport const AddToMyListStatusProvider = ({children}) => {\n const [status, setStatus] = useState(ADD_TO_MY_LIST_STATUS.IDLE);\n useEffect(() => {\n let timeoutId;\n const DURATION = 3000;\n if (status !== ADD_TO_MY_LIST_STATUS.IDLE) {\n timeoutId = setTimeout(() => setStatus(ADD_TO_MY_LIST_STATUS.IDLE), DURATION);\n }\n return () => clearTimeout(timeoutId);\n }, [status]);\n return <StatusContext.Provider value={[status, setStatus]}>{children}</StatusContext.Provider>;\n};\n\nexport const AddToMyListFeedback = ({addToMyListText, removeFromMyListText, favorite}) => {\n const [status] = useContext(StatusContext);\n if (status === ADD_TO_MY_LIST_STATUS.IDLE) return null;\n\n return (\n <div className={classnames(styles.feedback)} data-name={'add-to-my-list-feedback'}>\n <CheckIcon className={styles.checkIcon} width={13} height={13} />\n <p>{favorite ? addToMyListText : removeFromMyListText}</p>\n </div>\n );\n};\n\nconst AddToMyList = ({style, addToMyListButton, favorite, onFavoriteClick}) => {\n const [, setStatus] = useContext(StatusContext);\n const cb = () => setStatus(ADD_TO_MY_LIST_STATUS.SUCCESS);\n\n function onClick() {\n onFavoriteClick(cb);\n }\n\n return (\n <div className={(styles.container, style)}>\n <Link data-name={'add-to-my-list-button'} onClick={onClick} className={styles.cta}>\n <div className={styles.wrapper}>\n {favorite ? (\n <CheckIcon className={styles.shareIcon} width={15} height={15} />\n ) : (\n <MoreIcon className={styles.shareIcon} width={12} height={12} />\n )}\n <p>{addToMyListButton}</p>\n </div>\n </Link>\n </div>\n );\n};\n\nAddToMyListStatusProvider.propTypes = {\n children: PropTypes.node\n};\n\nAddToMyListFeedback.propTypes = {\n addToMyListText: PropTypes.string,\n removeFromMyListText: PropTypes.string,\n favorite: PropTypes.bool\n};\n\nAddToMyList.propTypes = {\n style: PropTypes.string,\n addToMyListButton: PropTypes.string,\n favorite: PropTypes.bool,\n onFavoriteClick: PropTypes.func\n};\n\nexport default AddToMyList;\n"],"file":"index.js"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _omit from "lodash/fp/omit";
|
|
2
|
+
const _excluded = ["videoId", "type"];
|
|
2
3
|
|
|
3
4
|
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
|
|
|
@@ -27,7 +28,7 @@ const MediaView = ({
|
|
|
27
28
|
videoId,
|
|
28
29
|
type
|
|
29
30
|
} = media,
|
|
30
|
-
childProps = _objectWithoutPropertiesLoose(media,
|
|
31
|
+
childProps = _objectWithoutPropertiesLoose(media, _excluded);
|
|
31
32
|
|
|
32
33
|
switch (type) {
|
|
33
34
|
case TYPE_IMAGE:
|
|
@@ -61,7 +62,7 @@ const MediaView = ({
|
|
|
61
62
|
};
|
|
62
63
|
|
|
63
64
|
const isType = process.env.NODE_ENV !== "production" ? name => PropTypes.oneOf([name]) : {};
|
|
64
|
-
const videoPropType = process.env.NODE_ENV !== "production" ? PropTypes.shape(_extends(
|
|
65
|
+
const videoPropType = process.env.NODE_ENV !== "production" ? PropTypes.shape(_extends({}, VideoPlayer.propTypes, {
|
|
65
66
|
type: isType(TYPE_VIDEO).isRequired
|
|
66
67
|
})) : {};
|
|
67
68
|
const imgPropType = process.env.NODE_ENV !== "production" ? PropTypes.shape({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/answer/index.js"],"names":["React","PropTypes","VideoPlayer","DropDown","FreeText","QcmDrag","Qcm","QcmGraphic","QuestionRange","Template","Audio","style","TYPE_IMAGE","TYPE_VIDEO","TYPE_AUDIO","MediaView","media","videoId","type","childProps","backgroundImage","url","video","audio","isType","name","oneOf","videoPropType","shape","propTypes","isRequired","imgPropType","string","audioPropType","mediaUrl","oneOfType","Answer","props","model","help","buildAnswer","answerView","wrapper"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/answer/index.js"],"names":["React","PropTypes","VideoPlayer","DropDown","FreeText","QcmDrag","Qcm","QcmGraphic","QuestionRange","Template","Audio","style","TYPE_IMAGE","TYPE_VIDEO","TYPE_AUDIO","MediaView","media","videoId","type","childProps","backgroundImage","url","video","audio","isType","name","oneOf","videoPropType","shape","propTypes","isRequired","imgPropType","string","audioPropType","mediaUrl","oneOfType","Answer","props","model","help","buildAnswer","answerView","wrapper"],"mappings":";;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,QAAP,MAAqB,wBAArB;AACA,OAAOC,QAAP,MAAqB,wBAArB;AACA,OAAOC,OAAP,MAAoB,uBAApB;AACA,OAAOC,GAAP,MAAgB,kBAAhB;AACA,OAAOC,UAAP,MAAuB,0BAAvB;AACA,OAAOC,aAAP,MAA0B,6BAA1B;AACA,OAAOC,QAAP,MAAqB,uBAArB;AACA,OAAOC,KAAP,MAAkB,UAAlB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,OAAO,MAAMC,UAAU,GAAG,KAAnB;AACP,OAAO,MAAMC,UAAU,GAAG,OAAnB;AACP,OAAO,MAAMC,UAAU,GAAG,OAAnB;;AAEP,MAAMC,SAAS,GAAG,CAAC;AAACC,EAAAA;AAAD,CAAD,KAAa;AAC7B,QAAM;AAACC,IAAAA,OAAD;AAAUC,IAAAA;AAAV,MAAiCF,KAAvC;AAAA,QAAyBG,UAAzB,iCAAuCH,KAAvC;;AACA,UAAQE,IAAR;AACE,SAAKN,UAAL;AACE,0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,EAAAA,KAAK,EAAErC,SAAS,CAAC2B,KAAV,CAAgB;AACrBV,IAAAA,IAAI,EAAEjB,SAAS,CAACyB,KAAV,CAAgB,CACpB,SADoB,EAEpB,KAFoB,EAGpB,YAHoB,EAIpB,UAJoB,EAKpB,UALoB,EAMpB,QANoB,EAOpB,UAPoB,CAAhB,EAQHI;AATkB,GAAhB,CADU;AAYjBS,EAAAA,IAAI,EAAEtC,SAAS,CAAC+B,MAZC;AAajBhB,EAAAA,KAAK,EAAED,SAAS,CAACc,SAAV,CAAoBb;AAbV,CAAnB;AAgBA,eAAeoB,MAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'lodash/fp';\nimport VideoPlayer from '../video-player';\nimport DropDown from '../questions/drop-down';\nimport FreeText from '../questions/free-text';\nimport QcmDrag from '../questions/qcm-drag';\nimport Qcm from '../questions/qcm';\nimport QcmGraphic from '../questions/qcm-graphic';\nimport QuestionRange from '../questions/question-range';\nimport Template from '../questions/template';\nimport Audio from '../audio';\nimport style from './style.css';\n\nexport const TYPE_IMAGE = 'img';\nexport const TYPE_VIDEO = 'video';\nexport const TYPE_AUDIO = 'audio';\n\nconst MediaView = ({media}) => {\n const {videoId, type, ...childProps} = media;\n switch (type) {\n case TYPE_IMAGE:\n return (\n <div\n className={style.media}\n style={{\n backgroundImage: `url(${media.url})`\n }}\n />\n );\n case TYPE_VIDEO:\n return (\n <div className={style.video}>\n <VideoPlayer {...omit('id', childProps)} id={videoId} height=\"100%\" width=\"100%\" />\n </div>\n );\n case TYPE_AUDIO:\n return (\n <div className={style.audio}>\n <Audio {...omit('id', childProps)} height=\"100%\" width=\"100%\" />\n </div>\n );\n default:\n return null;\n }\n};\n\nconst isType = name => PropTypes.oneOf([name]);\n\nconst videoPropType = PropTypes.shape({\n ...VideoPlayer.propTypes,\n type: isType(TYPE_VIDEO).isRequired\n});\n\nconst imgPropType = PropTypes.shape({\n type: isType(TYPE_IMAGE).isRequired,\n url: PropTypes.string.isRequired\n});\n\nconst audioPropType = PropTypes.shape({\n type: isType(TYPE_AUDIO).isRequired,\n mediaUrl: PropTypes.string.isRequired\n});\n\nMediaView.propTypes = {\n media: PropTypes.oneOfType([videoPropType, imgPropType, audioPropType])\n};\n\nconst Answer = props => {\n const {model, media, help} = props;\n const buildAnswer = () => {\n const {type} = model;\n\n switch (type) {\n case 'qcmDrag':\n return <QcmDrag {...model} help={help} />;\n case 'qcm':\n return <Qcm {...model} />;\n case 'qcmGraphic':\n return <QcmGraphic {...model} />;\n case 'freeText':\n return <FreeText {...model} />;\n case 'dropDown':\n return <DropDown {...model} />;\n case 'slider':\n return <QuestionRange {...model} />;\n case 'template':\n return <Template {...model} />;\n }\n };\n const answerView = buildAnswer(model);\n\n return (\n <div data-name=\"answer\" className={style.wrapper}>\n {media ? <MediaView media={media} /> : null}\n {answerView}\n </div>\n );\n};\n\nAnswer.propTypes = {\n model: PropTypes.shape({\n type: PropTypes.oneOf([\n 'qcmDrag',\n 'qcm',\n 'qcmGraphic',\n 'freeText',\n 'dropDown',\n 'slider',\n 'template'\n ]).isRequired\n }),\n help: PropTypes.string,\n media: MediaView.propTypes.media\n};\n\nexport default Answer;\n"],"file":"index.js"}
|
|
@@ -3,7 +3,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
3
3
|
import FreeText from '../../../questions/free-text/test/fixtures/default';
|
|
4
4
|
export default {
|
|
5
5
|
props: {
|
|
6
|
-
model: _extends(
|
|
6
|
+
model: _extends({}, FreeText.props, {
|
|
7
7
|
type: 'freeText'
|
|
8
8
|
}),
|
|
9
9
|
media: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/answer/test/fixtures/audio.js"],"names":["FreeText","props","model","type","media","mediaUrl"],"mappings":";;AAAA,OAAOA,QAAP,MAAqB,oDAArB;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/answer/test/fixtures/audio.js"],"names":["FreeText","props","model","type","media","mediaUrl"],"mappings":";;AAAA,OAAOA,QAAP,MAAqB,oDAArB;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,eACAF,QAAQ,CAACC,KADT;AAEHE,MAAAA,IAAI,EAAE;AAFH,MADA;AAKLC,IAAAA,KAAK,EAAE;AACLD,MAAAA,IAAI,EAAE,OADD;AAELE,MAAAA,QAAQ,EACN;AAHG;AALF;AADM,CAAf","sourcesContent":["import FreeText from '../../../questions/free-text/test/fixtures/default';\n\nexport default {\n props: {\n model: {\n ...FreeText.props,\n type: 'freeText'\n },\n media: {\n type: 'audio',\n mediaUrl:\n 'https://static.coorpacademy.com/content/CoorpAcademy/content-bnpp/cockpit-letsgetdigital-migration/raw/sample-1618502603227.aac'\n }\n }\n};\n"],"file":"audio.js"}
|
|
@@ -3,7 +3,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
3
3
|
import FreeText from '../../../questions/free-text/test/fixtures/default';
|
|
4
4
|
export default {
|
|
5
5
|
props: {
|
|
6
|
-
model: _extends(
|
|
6
|
+
model: _extends({}, FreeText.props, {
|
|
7
7
|
type: 'freeText'
|
|
8
8
|
}),
|
|
9
9
|
media: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/answer/test/fixtures/default.js"],"names":["FreeText","props","model","type","media","url"],"mappings":";;AAAA,OAAOA,QAAP,MAAqB,oDAArB;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/answer/test/fixtures/default.js"],"names":["FreeText","props","model","type","media","url"],"mappings":";;AAAA,OAAOA,QAAP,MAAqB,oDAArB;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,eACAF,QAAQ,CAACC,KADT;AAEHE,MAAAA,IAAI,EAAE;AAFH,MADA;AAKLC,IAAAA,KAAK,EAAE;AACLD,MAAAA,IAAI,EAAE,KADD;AAELE,MAAAA,GAAG,EACD;AAHG;AALF;AADM,CAAf","sourcesContent":["import FreeText from '../../../questions/free-text/test/fixtures/default';\n\nexport default {\n props: {\n model: {\n ...FreeText.props,\n type: 'freeText'\n },\n media: {\n type: 'img',\n url:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/CoorpAcademy/content-minds-and-more/cockpit-minds-and-more/default/shutterstock_701165035-1518620484928.jpg&h=400&w=835&q=80&m=contain'\n }\n }\n};\n"],"file":"default.js"}
|
|
@@ -4,7 +4,7 @@ import DropDown from '../../../questions/drop-down/test/fixtures/default';
|
|
|
4
4
|
const answerProps = DropDown.props;
|
|
5
5
|
export default {
|
|
6
6
|
props: {
|
|
7
|
-
model: _extends(
|
|
7
|
+
model: _extends({}, answerProps, {
|
|
8
8
|
type: 'dropDown'
|
|
9
9
|
}),
|
|
10
10
|
media: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/answer/test/fixtures/drop-down.js"],"names":["DropDown","answerProps","props","model","type","media","url"],"mappings":";;AAAA,OAAOA,QAAP,MAAqB,oDAArB;AAEA,MAAMC,WAAW,GAAGD,QAAQ,CAACE,KAA7B;AAEA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/answer/test/fixtures/drop-down.js"],"names":["DropDown","answerProps","props","model","type","media","url"],"mappings":";;AAAA,OAAOA,QAAP,MAAqB,oDAArB;AAEA,MAAMC,WAAW,GAAGD,QAAQ,CAACE,KAA7B;AAEA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,eACAF,WADA;AAEHG,MAAAA,IAAI,EAAE;AAFH,MADA;AAKLC,IAAAA,KAAK,EAAE;AACLD,MAAAA,IAAI,EAAE,KADD;AAELE,MAAAA,GAAG,EACD;AAHG;AALF;AADM,CAAf","sourcesContent":["import DropDown from '../../../questions/drop-down/test/fixtures/default';\n\nconst answerProps = DropDown.props;\n\nexport default {\n props: {\n model: {\n ...answerProps,\n type: 'dropDown'\n },\n media: {\n type: 'img',\n url:\n 'https://api-staging.coorpacademy.com/api-service/medias?h=300&w=300&q=90&url=https://user-images.githubusercontent.com/7602475/28273504-db1da18a-6b0e-11e7-97cd-b2e307fc51c7.png'\n }\n }\n};\n"],"file":"drop-down.js"}
|