@coorpacademy/components 10.27.5-alpha.31 → 10.28.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/autocomplete/index.d.ts +1 -1
- package/es/atom/autocomplete/index.js.map +1 -1
- package/es/atom/avatar/index.js.map +1 -1
- package/es/atom/button/index.js +1 -1
- package/es/atom/button/index.js.map +1 -1
- package/es/atom/button-link/index.js +1 -1
- package/es/atom/button-link/index.js.map +1 -1
- package/es/atom/button-link-icon-only/index.js +1 -1
- package/es/atom/button-link-icon-only/index.js.map +1 -1
- package/es/atom/button-menu/index.js +1 -1
- package/es/atom/button-menu/index.js.map +1 -1
- package/es/atom/card-image-preview/index.js.map +1 -1
- package/es/atom/catalog-section/index.js.map +1 -1
- package/es/atom/centered-text/index.js.map +1 -1
- package/es/atom/checkbox/index.js +3 -2
- package/es/atom/checkbox/index.js.map +1 -1
- package/es/atom/checkbox-with-title/index.js.map +1 -1
- package/es/atom/chips/index.js.map +1 -1
- package/es/atom/choice/index.native.d.ts +1 -0
- package/es/atom/choice/index.native.d.ts.map +1 -1
- package/es/atom/choice/index.native.js +1 -1
- package/es/atom/choice/index.native.js.map +1 -1
- package/es/atom/clue/index.js.map +1 -1
- package/es/atom/content-badge/index.js.map +1 -1
- package/es/atom/cta/index.js.map +1 -1
- package/es/atom/difficulty-level/index.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/empty-search-result/index.js.map +1 -1
- package/es/atom/gradient/index.native.js.map +1 -1
- package/es/atom/header-back-button/index.native.d.ts +1 -0
- package/es/atom/header-back-button/index.native.d.ts.map +1 -1
- package/es/atom/header-back-button/index.native.js.map +1 -1
- package/es/atom/header-back-icon/index.native.d.ts +1 -0
- package/es/atom/header-back-icon/index.native.d.ts.map +1 -1
- package/es/atom/header-back-icon/index.native.js.map +1 -1
- package/es/atom/html/index.native.d.ts +1 -0
- package/es/atom/html/index.native.d.ts.map +1 -1
- package/es/atom/html/index.native.js +6 -6
- package/es/atom/html/index.native.js.map +1 -1
- package/es/atom/image-background/index.native.js +7 -4
- package/es/atom/image-background/index.native.js.map +1 -1
- package/es/atom/image-upload/index.js +2 -2
- package/es/atom/image-upload/index.js.map +1 -1
- package/es/atom/input-checkbox/index.js.map +1 -1
- package/es/atom/input-color/index.js.map +1 -1
- package/es/atom/input-doublestep/index.js +1 -1
- package/es/atom/input-doublestep/index.js.map +1 -1
- package/es/atom/input-html/index.js.map +1 -1
- package/es/atom/input-html/input-preview.js.map +1 -1
- package/es/atom/input-readonly/index.js.map +1 -1
- package/es/atom/input-search/index.js.map +1 -1
- package/es/atom/input-switch/index.js.map +1 -1
- package/es/atom/input-text/index.js.map +1 -1
- package/es/atom/input-text-with-title/index.js +2 -2
- package/es/atom/input-text-with-title/index.js.map +1 -1
- package/es/atom/input-textarea/index.js.map +1 -1
- package/es/atom/label/index.js.map +1 -1
- package/es/atom/life/index.js.map +1 -1
- package/es/atom/link/index.js +4 -3
- package/es/atom/link/index.js.map +1 -1
- package/es/atom/loader/index.js.map +1 -1
- package/es/atom/lottie-wrapper/index.js +4 -4
- package/es/atom/lottie-wrapper/index.js.map +1 -1
- package/es/atom/lottie-wrapper/prop-types.js.map +1 -1
- package/es/atom/notification/index.js.map +1 -1
- package/es/atom/picture/index.js +1 -1
- package/es/atom/picture/index.js.map +1 -1
- package/es/atom/picture-background/index.d.ts +3 -3
- package/es/atom/picture-background/index.js.map +1 -1
- package/es/atom/promo-code/index.js.map +1 -1
- package/es/atom/provider/index.d.ts +1 -1
- package/es/atom/provider/index.js.map +1 -1
- package/es/atom/provider/web-context.js +5 -3
- package/es/atom/provider/web-context.js.map +1 -1
- package/es/atom/radio-group/index.js +1 -1
- package/es/atom/radio-group/index.js.map +1 -1
- package/es/atom/radio-group/item.js.map +1 -1
- package/es/atom/range/handle.js.map +1 -1
- package/es/atom/range/index.d.ts +1 -1
- package/es/atom/range/index.js +2 -2
- package/es/atom/range/index.js.map +1 -1
- package/es/atom/resource-miniature/index.js.map +1 -1
- package/es/atom/review-background/index.js.map +1 -1
- package/es/atom/review-background/prop-types.js.map +1 -1
- package/es/atom/review-header-step-item/index.d.ts +1 -0
- package/es/atom/review-header-step-item/index.d.ts.map +1 -1
- package/es/atom/review-header-step-item/index.js.map +1 -1
- package/es/atom/review-header-step-item/index.native.d.ts +1 -0
- package/es/atom/review-header-step-item/index.native.d.ts.map +1 -1
- package/es/atom/review-header-step-item/index.native.js.map +1 -1
- package/es/atom/review-header-step-item/types.js.map +1 -1
- package/es/atom/review-presentation/index.js.map +1 -1
- package/es/atom/review-presentation/index.native.d.ts +1 -0
- package/es/atom/review-presentation/index.native.d.ts.map +1 -1
- package/es/atom/review-presentation/index.native.js.map +1 -1
- package/es/atom/review-presentation/prop-types.js.map +1 -1
- package/es/atom/select/index.d.ts +2 -2
- package/es/atom/select/index.js +1 -1
- package/es/atom/select/index.js.map +1 -1
- package/es/atom/select-modal/index.native.d.ts +1 -0
- package/es/atom/select-modal/index.native.d.ts.map +1 -1
- package/es/atom/select-modal/index.native.js.map +1 -1
- package/es/atom/slide/index.js +1 -1
- package/es/atom/slide/index.js.map +1 -1
- package/es/atom/social-link/index.js.map +1 -1
- package/es/atom/space/index.native.d.ts +1 -0
- package/es/atom/space/index.native.d.ts.map +1 -1
- package/es/atom/space/index.native.js.map +1 -1
- package/es/atom/spinner/index.js.map +1 -1
- package/es/atom/tab/index.js.map +1 -1
- package/es/atom/tab-content/index.js.map +1 -1
- package/es/atom/tag/index.js.map +1 -1
- package/es/atom/text/index.native.js +1 -1
- package/es/atom/text/index.native.js.map +1 -1
- package/es/atom/title/index.js.map +1 -1
- package/es/atom/video-upload/index.js +2 -2
- package/es/atom/video-upload/index.js.map +1 -1
- package/es/atom/wizard-steps/index.js.map +1 -1
- package/es/globals.d.js.map +1 -1
- package/es/hoc/animation/index.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/modal/index.native.js.map +1 -1
- package/es/hoc/modal/select/index.native.d.ts +1 -0
- package/es/hoc/modal/select/index.native.d.ts.map +1 -1
- package/es/hoc/modal/select/index.native.js.map +1 -1
- package/es/hoc/modal/select-item/index.native.d.ts +1 -0
- package/es/hoc/modal/select-item/index.native.d.ts.map +1 -1
- package/es/hoc/modal/select-item/index.native.js.map +1 -1
- package/es/hoc/swapper/index.js +4 -2
- package/es/hoc/swapper/index.js.map +1 -1
- package/es/hoc/touchable/index.native.js +2 -2
- package/es/hoc/touchable/index.native.js.map +1 -1
- package/es/hoc/transition/index.js +1 -1
- package/es/hoc/transition/index.js.map +1 -1
- package/es/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/index.native.d.ts +1 -0
- package/es/molecule/answer/index.native.d.ts.map +1 -1
- package/es/molecule/answer/index.native.js.map +1 -1
- package/es/molecule/answer/prop-types.d.ts +6 -6
- package/es/molecule/answer/prop-types.js +2 -2
- package/es/molecule/answer/prop-types.js.map +1 -1
- package/es/molecule/audio/index.js.map +1 -1
- package/es/molecule/banner/index.js.map +1 -1
- package/es/molecule/battle-request/index.js.map +1 -1
- package/es/molecule/brand-card/description.js.map +1 -1
- package/es/molecule/brand-card/index.js.map +1 -1
- package/es/molecule/brand-card-create/index.js.map +1 -1
- package/es/molecule/brand-create-form/index.d.ts +2 -2
- package/es/molecule/brand-create-form/index.js.map +1 -1
- package/es/molecule/brand-download-box/index.js.map +1 -1
- package/es/molecule/brand-form-group/index.d.ts +9 -9
- package/es/molecule/brand-form-group/index.js +20 -20
- package/es/molecule/brand-form-group/index.js.map +1 -1
- package/es/molecule/brand-logo/index.native.d.ts +1 -0
- package/es/molecule/brand-logo/index.native.d.ts.map +1 -1
- package/es/molecule/brand-logo/index.native.js +2 -2
- package/es/molecule/brand-logo/index.native.js.map +1 -1
- package/es/molecule/brand-tabs/index.js.map +1 -1
- package/es/molecule/brand-upload-box/index.js.map +1 -1
- package/es/molecule/breadcrumbs/index.js.map +1 -1
- package/es/molecule/bullet-point-menu-button/index.js.map +1 -1
- package/es/molecule/card/customer.js.map +1 -1
- package/es/molecule/card/favorite.js.map +1 -1
- package/es/molecule/card/index.js +2 -2
- package/es/molecule/card/index.js.map +1 -1
- package/es/molecule/card/notification.js.map +1 -1
- package/es/molecule/card/selectable.js.map +1 -1
- package/es/molecule/card-content/index.js.map +1 -1
- package/es/molecule/card-with-button/index.d.ts +1 -1
- package/es/molecule/card-with-button/index.js.map +1 -1
- package/es/molecule/cm-popin/index.js.map +1 -1
- package/es/molecule/cm-popin/types.js.map +1 -1
- package/es/molecule/cookie-banner/index.js.map +1 -1
- package/es/molecule/coorp-manager-roles/index.js +2 -2
- package/es/molecule/coorp-manager-roles/index.js.map +1 -1
- package/es/molecule/course-section/index.js.map +1 -1
- package/es/molecule/course-sections/index.js +2 -2
- package/es/molecule/course-sections/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/index.js +1 -1
- package/es/molecule/dashboard/cards-list/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/review-banner/index.js +3 -3
- package/es/molecule/dashboard/review-banner/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-cta/index.js.map +1 -1
- package/es/molecule/discipline-header/index.js.map +1 -1
- package/es/molecule/discipline-partners/index.js.map +1 -1
- package/es/molecule/discipline-scope/index.js.map +1 -1
- package/es/molecule/drag-and-drop/index.js +2 -2
- package/es/molecule/drag-and-drop/index.js.map +1 -1
- package/es/molecule/drag-and-drop/overlay.js.map +1 -1
- package/es/molecule/drag-and-drop/placeholder.js.map +1 -1
- package/es/molecule/drag-and-drop/upload-report.js +2 -2
- package/es/molecule/drag-and-drop/upload-report.js.map +1 -1
- package/es/molecule/drag-and-drop-wrapper/index.js.map +1 -1
- package/es/molecule/draggable/index.js.map +1 -1
- package/es/molecule/draggable-list/index.js +1 -1
- package/es/molecule/draggable-list/index.js.map +1 -1
- package/es/molecule/external-content-button/index.js.map +1 -1
- package/es/molecule/external-content-viewer/index.js.map +1 -1
- package/es/molecule/feedback/index.js +2 -2
- package/es/molecule/feedback/index.js.map +1 -1
- package/es/molecule/filters/filters-wrapper.js +1 -1
- package/es/molecule/filters/filters-wrapper.js.map +1 -1
- package/es/molecule/filters/index.d.ts +1 -1
- package/es/molecule/filters/index.js.map +1 -1
- package/es/molecule/forum/forum-comment/index.js.map +1 -1
- package/es/molecule/forum/forum-post/index.js.map +1 -1
- package/es/molecule/forum/forum-thread/index.js +1 -1
- package/es/molecule/forum/forum-thread/index.js.map +1 -1
- package/es/molecule/forum/post-conditions.js.map +1 -1
- package/es/molecule/go1-banner/index.js.map +1 -1
- package/es/molecule/hero/index.js.map +1 -1
- package/es/molecule/input-text-with-titled-checkbox/index.js.map +1 -1
- package/es/molecule/list-badges/index.js.map +1 -1
- package/es/molecule/login-alert/index.js.map +1 -1
- package/es/molecule/menu-list/index.js.map +1 -1
- package/es/molecule/message-popin/index.js.map +1 -1
- package/es/molecule/modal/index.js.map +1 -1
- package/es/molecule/module-bubble/index.js.map +1 -1
- package/es/molecule/module-card/index.js +1 -1
- package/es/molecule/module-card/index.js.map +1 -1
- package/es/molecule/news/index.js +1 -1
- package/es/molecule/news/index.js.map +1 -1
- package/es/molecule/notification-banner/index.js.map +1 -1
- package/es/molecule/pagination/index.js.map +1 -1
- package/es/molecule/payment-form/index.js.map +1 -1
- package/es/molecule/pdf/index.js.map +1 -1
- package/es/molecule/popin/index.js +2 -2
- package/es/molecule/popin/index.js.map +1 -1
- package/es/molecule/product-card/index.js.map +1 -1
- package/es/molecule/progress-bar/index.d.ts +1 -1
- package/es/molecule/progress-bar/index.js +2 -2
- package/es/molecule/progress-bar/index.js.map +1 -1
- package/es/molecule/questions/drop-down/index.d.ts +1 -1
- package/es/molecule/questions/drop-down/index.js.map +1 -1
- package/es/molecule/questions/free-text/index.js +3 -3
- package/es/molecule/questions/free-text/index.js.map +1 -1
- package/es/molecule/questions/free-text/index.native.d.ts +1 -0
- package/es/molecule/questions/free-text/index.native.d.ts.map +1 -1
- package/es/molecule/questions/free-text/index.native.js +3 -3
- package/es/molecule/questions/free-text/index.native.js.map +1 -1
- package/es/molecule/questions/mobile/draggable/index.native.d.ts +1 -0
- package/es/molecule/questions/mobile/draggable/index.native.d.ts.map +1 -1
- package/es/molecule/questions/mobile/draggable/index.native.js.map +1 -1
- package/es/molecule/questions/mobile/slider/index.native.d.ts +1 -0
- package/es/molecule/questions/mobile/slider/index.native.d.ts.map +1 -1
- package/es/molecule/questions/mobile/slider/index.native.js +2 -2
- package/es/molecule/questions/mobile/slider/index.native.js.map +1 -1
- package/es/molecule/questions/mobile/switch/index.native.d.ts +1 -0
- package/es/molecule/questions/mobile/switch/index.native.d.ts.map +1 -1
- package/es/molecule/questions/mobile/switch/index.native.js.map +1 -1
- package/es/molecule/questions/mobile/template/index.native.d.ts +1 -0
- package/es/molecule/questions/mobile/template/index.native.d.ts.map +1 -1
- package/es/molecule/questions/mobile/template/index.native.js +3 -3
- package/es/molecule/questions/mobile/template/index.native.js.map +1 -1
- package/es/molecule/questions/qcm/index.js +1 -1
- package/es/molecule/questions/qcm/index.js.map +1 -1
- package/es/molecule/questions/qcm-drag/index.js.map +1 -1
- package/es/molecule/questions/qcm-graphic/index.js +1 -1
- package/es/molecule/questions/qcm-graphic/index.js.map +1 -1
- package/es/molecule/questions/question-range/index.d.ts +1 -1
- package/es/molecule/questions/question-range/index.js +4 -3
- package/es/molecule/questions/question-range/index.js.map +1 -1
- package/es/molecule/questions/template/index.d.ts +12 -3
- package/es/molecule/questions/template/index.js +4 -3
- package/es/molecule/questions/template/index.js.map +1 -1
- package/es/molecule/questions/types.js.map +1 -1
- package/es/molecule/quick-access-card/index.js.map +1 -1
- package/es/molecule/quick-access-cards-group/index.js.map +1 -1
- package/es/molecule/resource-player/index.d.ts +2 -2
- package/es/molecule/resource-player/index.js +3 -2
- package/es/molecule/resource-player/index.js.map +1 -1
- package/es/molecule/review-card-congrats/index.js +1 -1
- package/es/molecule/review-card-congrats/index.js.map +1 -1
- package/es/molecule/review-card-congrats/prop-types.js.map +1 -1
- package/es/molecule/review-correction-popin/index.js +3 -3
- package/es/molecule/review-correction-popin/index.js.map +1 -1
- package/es/molecule/review-correction-popin/prop-types.js.map +1 -1
- package/es/molecule/review-header-steps/index.js +1 -1
- package/es/molecule/review-header-steps/index.js.map +1 -1
- package/es/molecule/review-header-steps/prop-types.js.map +1 -1
- package/es/molecule/scope-content/index.js +1 -1
- package/es/molecule/scope-content/index.js.map +1 -1
- package/es/molecule/scope-tabs/index.js +1 -1
- package/es/molecule/scope-tabs/index.js.map +1 -1
- package/es/molecule/search-form/index.js +1 -1
- package/es/molecule/search-form/index.js.map +1 -1
- package/es/molecule/select-multiple/index.d.ts +2 -2
- package/es/molecule/select-multiple/index.js +4 -4
- package/es/molecule/select-multiple/index.js.map +1 -1
- package/es/molecule/setup-cohort-item/index.js +1 -1
- package/es/molecule/setup-cohort-item/index.js.map +1 -1
- package/es/molecule/setup-section/index.js +2 -2
- package/es/molecule/setup-section/index.js.map +1 -1
- package/es/molecule/setup-sections/index.js.map +1 -1
- package/es/molecule/setup-slide/index.d.ts +3 -3
- package/es/molecule/setup-slide/index.js +9 -9
- package/es/molecule/setup-slide/index.js.map +1 -1
- package/es/molecule/setup-slider/index.d.ts +3 -3
- package/es/molecule/setup-slider/index.js +1 -1
- package/es/molecule/setup-slider/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/skill-card/index.js.map +1 -1
- package/es/molecule/skill-card/prop-types.js.map +1 -1
- package/es/molecule/ssmenu-list/index.js.map +1 -1
- package/es/molecule/subscription-freemium/index.js.map +1 -1
- package/es/molecule/subscription-premium/index.js.map +1 -1
- package/es/molecule/table/index.d.ts +2 -2
- package/es/molecule/table/index.js.map +1 -1
- package/es/molecule/teams-popin/index.js.map +1 -1
- package/es/molecule/theme-image/index.js.map +1 -1
- package/es/molecule/title-and-checkbox-wrapper/index.d.ts +2 -2
- package/es/molecule/title-and-checkbox-wrapper/index.js +3 -3
- package/es/molecule/title-and-checkbox-wrapper/index.js.map +1 -1
- package/es/molecule/titled-checkbox/index.d.ts +2 -2
- package/es/molecule/titled-checkbox/index.js.map +1 -1
- package/es/molecule/unsubscribe/index.js.map +1 -1
- package/es/molecule/vertical-tabs/index.js.map +1 -1
- package/es/molecule/video-iframe/index.d.ts.map +1 -1
- package/es/molecule/video-iframe/index.js +2 -2
- package/es/molecule/video-iframe/index.js.map +1 -1
- package/es/molecule/video-player/index.js +4 -2
- package/es/molecule/video-player/index.js.map +1 -1
- package/es/molecule/video-player/jwplayer-prop-types.js.map +1 -1
- package/es/molecule/video-player/jwplayer.js +3 -3
- package/es/molecule/video-player/jwplayer.js.map +1 -1
- package/es/molecule/video-player/prop-types.js.map +1 -1
- package/es/molecule/video-player/vimeo.d.ts +3 -3
- package/es/molecule/video-player/vimeo.js +2 -2
- package/es/molecule/video-player/vimeo.js.map +1 -1
- package/es/molecule/wizard-summary/index.d.ts +2 -2
- package/es/molecule/wizard-summary/index.js.map +1 -1
- package/es/organism/accordion/container/index.js +1 -1
- package/es/organism/accordion/container/index.js.map +1 -1
- package/es/organism/accordion/coorp-manager/index.js +2 -2
- package/es/organism/accordion/coorp-manager/index.js.map +1 -1
- package/es/organism/accordion/coorp-manager/part/index.js +1 -1
- package/es/organism/accordion/coorp-manager/part/index.js.map +1 -1
- package/es/organism/accordion/part/index.js.map +1 -1
- package/es/organism/accordion/toggler/index.js +2 -2
- package/es/organism/accordion/toggler/index.js.map +1 -1
- package/es/organism/brand-analytics/analytics-popin.js.map +1 -1
- package/es/organism/brand-analytics/index.d.ts +3 -3
- package/es/organism/brand-analytics/index.js.map +1 -1
- package/es/organism/brand-dashboard/index.js +1 -1
- package/es/organism/brand-dashboard/index.js.map +1 -1
- package/es/organism/brand-form/index.d.ts +9 -9
- package/es/organism/brand-form/index.js.map +1 -1
- package/es/organism/brand-table/index.d.ts +2 -2
- package/es/organism/brand-table/index.js.map +1 -1
- package/es/organism/brand-upload/index.d.ts +2 -2
- package/es/organism/brand-upload/index.js +1 -1
- package/es/organism/brand-upload/index.js.map +1 -1
- package/es/organism/cards-grid/index.js.map +1 -1
- package/es/organism/cart/index.js.map +1 -1
- package/es/organism/content-translation/index.js +3 -3
- package/es/organism/content-translation/index.js.map +1 -1
- package/es/organism/course-selection/index.js +1 -1
- package/es/organism/course-selection/index.js.map +1 -1
- package/es/organism/discussion/index.js +1 -1
- package/es/organism/discussion/index.js.map +1 -1
- package/es/organism/get-the-app/index.js +3 -3
- package/es/organism/get-the-app/index.js.map +1 -1
- package/es/organism/grid-list/index.js.map +1 -1
- package/es/organism/header/index.d.ts +2 -2
- package/es/organism/header/index.js.map +1 -1
- package/es/organism/header-v2/index.native.d.ts +1 -0
- package/es/organism/header-v2/index.native.d.ts.map +1 -1
- package/es/organism/header-v2/index.native.js.map +1 -1
- package/es/organism/hero/index.js.map +1 -1
- package/es/organism/list-item/index.js.map +1 -1
- package/es/organism/list-items/index.js.map +1 -1
- package/es/organism/mobile-navigation/index.native.js.map +1 -1
- package/es/organism/mooc/image-slider/index.js +1 -1
- package/es/organism/mooc/image-slider/index.js.map +1 -1
- package/es/organism/mooc-footer/index.js.map +1 -1
- package/es/organism/mooc-header/index.js +1 -1
- package/es/organism/mooc-header/index.js.map +1 -1
- package/es/organism/podcast-popin-intro/index.native.d.ts +1 -0
- package/es/organism/podcast-popin-intro/index.native.d.ts.map +1 -1
- package/es/organism/podcast-popin-intro/index.native.js.map +1 -1
- package/es/organism/popin/index.js.map +1 -1
- package/es/organism/resource-browser/index.js +1 -1
- package/es/organism/resource-browser/index.js.map +1 -1
- package/es/organism/review-congrats/index.js +1 -1
- package/es/organism/review-congrats/index.js.map +1 -1
- package/es/organism/review-congrats/prop-types.js.map +1 -1
- package/es/organism/review-header/index.js.map +1 -1
- package/es/organism/review-header/index.native.d.ts +1 -0
- package/es/organism/review-header/index.native.d.ts.map +1 -1
- package/es/organism/review-header/index.native.js +1 -1
- package/es/organism/review-header/index.native.js.map +1 -1
- package/es/organism/review-header/types.js.map +1 -1
- package/es/organism/review-skills/index.js.map +1 -1
- package/es/organism/review-skills/prop-types.js +3 -3
- package/es/organism/review-skills/prop-types.js.map +1 -1
- package/es/organism/review-slide/index.js +1 -1
- package/es/organism/review-slide/index.js.map +1 -1
- package/es/organism/review-slide/index.native.d.ts +1 -0
- package/es/organism/review-slide/index.native.d.ts.map +1 -1
- package/es/organism/review-slide/index.native.js.map +1 -1
- package/es/organism/review-slide/prop-types.d.ts +8 -8
- package/es/organism/review-slide/prop-types.js.map +1 -1
- package/es/organism/review-stacked-slides/index.d.ts.map +1 -1
- package/es/organism/review-stacked-slides/index.js +13 -9
- package/es/organism/review-stacked-slides/index.js.map +1 -1
- package/es/organism/review-stacked-slides/index.native.d.ts +1 -0
- package/es/organism/review-stacked-slides/index.native.d.ts.map +1 -1
- package/es/organism/review-stacked-slides/index.native.js +3 -6
- package/es/organism/review-stacked-slides/index.native.js.map +1 -1
- package/es/organism/review-stacked-slides/prop-types.d.ts +22 -22
- package/es/organism/review-stacked-slides/prop-types.js.map +1 -1
- package/es/organism/review-stacked-slides/style.css +120 -8
- package/es/organism/rewards-form/index.d.ts +2 -2
- package/es/organism/rewards-form/index.js +3 -1
- package/es/organism/rewards-form/index.js.map +1 -1
- package/es/organism/search-and-chips-results/index.js +1 -1
- package/es/organism/search-and-chips-results/index.js.map +1 -1
- package/es/organism/settings/index.js +4 -3
- package/es/organism/settings/index.js.map +1 -1
- package/es/organism/setup-header/index.js.map +1 -1
- package/es/organism/sidebar/index.d.ts +29 -5
- package/es/organism/sidebar/index.js +12 -11
- package/es/organism/sidebar/index.js.map +1 -1
- package/es/organism/slider/index.d.ts +1 -1
- package/es/organism/slider/index.d.ts.map +1 -1
- package/es/organism/slider/index.js.map +1 -1
- package/es/organism/user-preferences/index.js +4 -3
- package/es/organism/user-preferences/index.js.map +1 -1
- package/es/organism/wizard-contents/index.d.ts +19 -19
- package/es/organism/wizard-contents/index.js +8 -8
- package/es/organism/wizard-contents/index.js.map +1 -1
- package/es/template/activity/engine-stars.js.map +1 -1
- package/es/template/activity/index.d.ts +3 -3
- package/es/template/activity/index.js +2 -2
- package/es/template/activity/index.js.map +1 -1
- package/es/template/activity/progression-item.js.map +1 -1
- package/es/template/activity/stars-summary.d.ts +2 -2
- package/es/template/activity/stars-summary.js +1 -1
- package/es/template/activity/stars-summary.js.map +1 -1
- package/es/template/app-player/loading/index.js.map +1 -1
- package/es/template/app-player/player/index.js +1 -1
- package/es/template/app-player/player/index.js.map +1 -1
- package/es/template/app-player/player/slides/footer/index.js +2 -2
- package/es/template/app-player/player/slides/footer/index.js.map +1 -1
- package/es/template/app-player/player/slides/header/index.js.map +1 -1
- package/es/template/app-player/player/slides/header/learner.d.ts +4 -4
- package/es/template/app-player/player/slides/header/learner.js +1 -1
- package/es/template/app-player/player/slides/header/learner.js.map +1 -1
- package/es/template/app-player/player/slides/header/lives.js.map +1 -1
- package/es/template/app-player/player/slides/header/microlearning.js.map +1 -1
- package/es/template/app-player/player/slides/index.d.ts +6 -6
- package/es/template/app-player/player/slides/index.js +15 -12
- package/es/template/app-player/player/slides/index.js.map +1 -1
- package/es/template/app-player/popin-correction/index.js +4 -3
- package/es/template/app-player/popin-correction/index.js.map +1 -1
- package/es/template/app-player/popin-end/index.js +1 -1
- package/es/template/app-player/popin-end/index.js.map +1 -1
- package/es/template/app-player/popin-end/summary.js +15 -12
- package/es/template/app-player/popin-end/summary.js.map +1 -1
- package/es/template/app-player/popin-header/index.js +5 -4
- package/es/template/app-player/popin-header/index.js.map +1 -1
- package/es/template/app-player/popin-no-access/index.js.map +1 -1
- package/es/template/app-review/demo-ts/index.js.map +1 -1
- package/es/template/app-review/demo-ts/index.native.d.ts +1 -0
- package/es/template/app-review/demo-ts/index.native.d.ts.map +1 -1
- package/es/template/app-review/demo-ts/index.native.js.map +1 -1
- package/es/template/app-review/demo-ts/typings.js.map +1 -1
- package/es/template/app-review/index.d.ts +23 -22
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/index.js +1 -1
- package/es/template/app-review/index.js.map +1 -1
- package/es/template/app-review/index.native.d.ts +1 -0
- package/es/template/app-review/index.native.d.ts.map +1 -1
- package/es/template/app-review/index.native.js.map +1 -1
- package/es/template/app-review/onboarding/index.js.map +1 -1
- package/es/template/app-review/onboarding/index.native.js.map +1 -1
- package/es/template/app-review/player/index.js.map +1 -1
- package/es/template/app-review/player/index.native.d.ts +1 -0
- package/es/template/app-review/player/index.native.d.ts.map +1 -1
- package/es/template/app-review/player/index.native.js.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +22 -22
- package/es/template/app-review/player/prop-types.js +1 -1
- package/es/template/app-review/player/prop-types.js.map +1 -1
- package/es/template/app-review/prop-types.d.ts +22 -22
- package/es/template/app-review/prop-types.js +1 -1
- package/es/template/app-review/prop-types.js.map +1 -1
- package/es/template/app-review/skills/index.js.map +1 -1
- package/es/template/app-review/skills/index.native.d.ts +1 -0
- package/es/template/app-review/skills/index.native.d.ts.map +1 -1
- package/es/template/app-review/skills/index.native.js.map +1 -1
- package/es/template/app-review/skills/prop-types.js.map +1 -1
- package/es/template/app-review/skills/stories.js.map +1 -1
- package/es/template/app-review/template-context.js +1 -1
- package/es/template/app-review/template-context.js.map +1 -1
- package/es/template/back-office/brand-create/index.js.map +1 -1
- package/es/template/back-office/brand-list/index.js +4 -2
- package/es/template/back-office/brand-list/index.js.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +39 -39
- package/es/template/back-office/brand-update/index.js +9 -9
- package/es/template/back-office/brand-update/index.js.map +1 -1
- package/es/template/back-office/dashboard-preview/dashboard-popin.js.map +1 -1
- package/es/template/back-office/dashboard-preview/index.js.map +1 -1
- package/es/template/back-office/layout/index.js.map +1 -1
- package/es/template/battle-requests/index.d.ts +2 -2
- package/es/template/battle-requests/index.js.map +1 -1
- package/es/template/cockpit/jw-uploader/index.js +2 -2
- package/es/template/cockpit/jw-uploader/index.js.map +1 -1
- package/es/template/common/authors/index.js.map +1 -1
- package/es/template/common/coorp-header/content.js.map +1 -1
- package/es/template/common/coorp-header/index.js.map +1 -1
- package/es/template/common/dashboard/index.d.ts +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/discipline/index.js.map +1 -1
- package/es/template/common/search-page/index.d.ts +1 -1
- package/es/template/common/search-page/index.js +1 -1
- package/es/template/common/search-page/index.js.map +1 -1
- package/es/template/external-course/index.d.ts.map +1 -1
- package/es/template/external-course/index.js.map +1 -1
- package/es/template/review-dashboard-skills/index.js.map +1 -1
- package/es/template/teams-dashboard/index.js +1 -1
- package/es/template/teams-dashboard/index.js.map +1 -1
- package/es/util/bubbling.js.map +1 -1
- package/es/util/build-query-string.js.map +1 -1
- package/es/util/button-icons.js.map +1 -1
- package/es/util/closest-step.js.map +1 -1
- package/es/util/constants.js.map +1 -1
- package/es/util/external-content.js.map +1 -1
- package/es/util/get-class-state.js.map +1 -1
- package/es/util/get-clean-uri.js.map +1 -1
- package/es/util/get-resized-image.js +3 -3
- package/es/util/get-resized-image.js.map +1 -1
- package/es/util/get-shadow-box-color-from-primary.js.map +1 -1
- package/es/util/image.js.map +1 -1
- package/es/util/navigation.js.map +1 -1
- package/es/util/parse-template-string.js.map +1 -1
- package/es/util/proptypes.js.map +1 -1
- package/es/util/render-with-context.js +7 -4
- package/es/util/render-with-context.js.map +1 -1
- package/es/util/shallow-compare.js.map +1 -1
- package/es/variables/analytics.js.map +1 -1
- package/es/variables/brand.native.js.map +1 -1
- package/es/variables/colors.js.map +1 -1
- package/es/variables/default-mobile-translations.js.map +1 -1
- package/es/variables/shadow.js.map +1 -1
- package/es/variables/theme.native.js.map +1 -1
- package/es/variables/vibration.js.map +1 -1
- package/lib/atom/autocomplete/index.d.ts +1 -1
- package/lib/atom/autocomplete/index.js +2 -2
- package/lib/atom/autocomplete/index.js.map +1 -1
- package/lib/atom/avatar/index.js.map +1 -1
- package/lib/atom/button/index.js +1 -1
- package/lib/atom/button/index.js.map +1 -1
- package/lib/atom/button-link/index.js +3 -3
- package/lib/atom/button-link/index.js.map +1 -1
- package/lib/atom/button-link-icon-only/index.js +3 -3
- package/lib/atom/button-link-icon-only/index.js.map +1 -1
- package/lib/atom/button-menu/index.js +3 -3
- package/lib/atom/button-menu/index.js.map +1 -1
- package/lib/atom/card-image-preview/index.js.map +1 -1
- package/lib/atom/catalog-section/index.js.map +1 -1
- package/lib/atom/centered-text/index.js.map +1 -1
- package/lib/atom/checkbox/index.js +6 -4
- package/lib/atom/checkbox/index.js.map +1 -1
- package/lib/atom/checkbox-with-title/index.js +2 -2
- package/lib/atom/checkbox-with-title/index.js.map +1 -1
- package/lib/atom/chips/index.js +2 -2
- package/lib/atom/chips/index.js.map +1 -1
- package/lib/atom/choice/index.native.d.ts +1 -0
- package/lib/atom/choice/index.native.d.ts.map +1 -1
- package/lib/atom/choice/index.native.js +3 -3
- package/lib/atom/choice/index.native.js.map +1 -1
- package/lib/atom/clue/index.js.map +1 -1
- package/lib/atom/content-badge/index.js.map +1 -1
- package/lib/atom/cta/index.js.map +1 -1
- package/lib/atom/difficulty-level/index.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/empty-search-result/index.js.map +1 -1
- package/lib/atom/gradient/index.native.js.map +1 -1
- package/lib/atom/header-back-button/index.native.d.ts +1 -0
- package/lib/atom/header-back-button/index.native.d.ts.map +1 -1
- package/lib/atom/header-back-button/index.native.js +3 -3
- package/lib/atom/header-back-button/index.native.js.map +1 -1
- package/lib/atom/header-back-icon/index.native.d.ts +1 -0
- package/lib/atom/header-back-icon/index.native.d.ts.map +1 -1
- package/lib/atom/header-back-icon/index.native.js.map +1 -1
- package/lib/atom/html/index.native.d.ts +1 -0
- package/lib/atom/html/index.native.d.ts.map +1 -1
- package/lib/atom/html/index.native.js +8 -8
- package/lib/atom/html/index.native.js.map +1 -1
- package/lib/atom/image-background/index.native.js +7 -4
- package/lib/atom/image-background/index.native.js.map +1 -1
- package/lib/atom/image-upload/index.js +4 -4
- package/lib/atom/image-upload/index.js.map +1 -1
- package/lib/atom/input-checkbox/index.js +2 -2
- package/lib/atom/input-checkbox/index.js.map +1 -1
- package/lib/atom/input-color/index.js +2 -2
- package/lib/atom/input-color/index.js.map +1 -1
- package/lib/atom/input-doublestep/index.js +3 -3
- package/lib/atom/input-doublestep/index.js.map +1 -1
- package/lib/atom/input-html/index.js.map +1 -1
- package/lib/atom/input-html/input-preview.js.map +1 -1
- package/lib/atom/input-readonly/index.js.map +1 -1
- package/lib/atom/input-search/index.js +2 -2
- package/lib/atom/input-search/index.js.map +1 -1
- package/lib/atom/input-switch/index.js +2 -2
- package/lib/atom/input-switch/index.js.map +1 -1
- package/lib/atom/input-text/index.js +2 -2
- package/lib/atom/input-text/index.js.map +1 -1
- package/lib/atom/input-text-with-title/index.js +2 -2
- package/lib/atom/input-text-with-title/index.js.map +1 -1
- package/lib/atom/input-textarea/index.js +2 -2
- package/lib/atom/input-textarea/index.js.map +1 -1
- package/lib/atom/label/index.js.map +1 -1
- package/lib/atom/life/index.js.map +1 -1
- package/lib/atom/link/index.js +5 -3
- package/lib/atom/link/index.js.map +1 -1
- package/lib/atom/loader/index.js.map +1 -1
- package/lib/atom/lottie-wrapper/index.js +7 -7
- package/lib/atom/lottie-wrapper/index.js.map +1 -1
- package/lib/atom/lottie-wrapper/prop-types.js.map +1 -1
- package/lib/atom/notification/index.js.map +1 -1
- package/lib/atom/picture/index.js +1 -1
- package/lib/atom/picture/index.js.map +1 -1
- package/lib/atom/picture-background/index.d.ts +3 -3
- package/lib/atom/picture-background/index.js.map +1 -1
- package/lib/atom/promo-code/index.js.map +1 -1
- package/lib/atom/provider/index.d.ts +1 -1
- package/lib/atom/provider/index.js +2 -2
- package/lib/atom/provider/index.js.map +1 -1
- package/lib/atom/provider/web-context.js +8 -6
- package/lib/atom/provider/web-context.js.map +1 -1
- package/lib/atom/radio-group/index.js +1 -1
- package/lib/atom/radio-group/index.js.map +1 -1
- package/lib/atom/radio-group/item.js.map +1 -1
- package/lib/atom/range/handle.js +2 -2
- package/lib/atom/range/handle.js.map +1 -1
- package/lib/atom/range/index.d.ts +1 -1
- package/lib/atom/range/index.js +2 -2
- package/lib/atom/range/index.js.map +1 -1
- package/lib/atom/resource-miniature/index.js.map +1 -1
- package/lib/atom/review-background/index.js.map +1 -1
- package/lib/atom/review-background/prop-types.js.map +1 -1
- package/lib/atom/review-header-step-item/index.d.ts +1 -0
- package/lib/atom/review-header-step-item/index.d.ts.map +1 -1
- package/lib/atom/review-header-step-item/index.js.map +1 -1
- package/lib/atom/review-header-step-item/index.native.d.ts +1 -0
- package/lib/atom/review-header-step-item/index.native.d.ts.map +1 -1
- package/lib/atom/review-header-step-item/index.native.js +2 -2
- package/lib/atom/review-header-step-item/index.native.js.map +1 -1
- package/lib/atom/review-header-step-item/types.js.map +1 -1
- package/lib/atom/review-presentation/index.js.map +1 -1
- package/lib/atom/review-presentation/index.native.d.ts +1 -0
- package/lib/atom/review-presentation/index.native.d.ts.map +1 -1
- package/lib/atom/review-presentation/index.native.js +2 -2
- package/lib/atom/review-presentation/index.native.js.map +1 -1
- package/lib/atom/review-presentation/prop-types.js +1 -1
- package/lib/atom/review-presentation/prop-types.js.map +1 -1
- package/lib/atom/select/index.d.ts +2 -2
- package/lib/atom/select/index.js +3 -3
- package/lib/atom/select/index.js.map +1 -1
- package/lib/atom/select-modal/index.native.d.ts +1 -0
- package/lib/atom/select-modal/index.native.d.ts.map +1 -1
- package/lib/atom/select-modal/index.native.js +2 -2
- package/lib/atom/select-modal/index.native.js.map +1 -1
- package/lib/atom/slide/index.js +1 -1
- package/lib/atom/slide/index.js.map +1 -1
- package/lib/atom/social-link/index.js.map +1 -1
- package/lib/atom/space/index.native.d.ts +1 -0
- package/lib/atom/space/index.native.d.ts.map +1 -1
- package/lib/atom/space/index.native.js +2 -2
- package/lib/atom/space/index.native.js.map +1 -1
- package/lib/atom/spinner/index.js.map +1 -1
- package/lib/atom/tab/index.js +2 -2
- package/lib/atom/tab/index.js.map +1 -1
- package/lib/atom/tab-content/index.js.map +1 -1
- package/lib/atom/tag/index.js.map +1 -1
- package/lib/atom/text/index.native.js +3 -3
- package/lib/atom/text/index.native.js.map +1 -1
- package/lib/atom/title/index.js.map +1 -1
- package/lib/atom/video-upload/index.js +2 -2
- package/lib/atom/video-upload/index.js.map +1 -1
- package/lib/atom/wizard-steps/index.js.map +1 -1
- package/lib/globals.d.js.map +1 -1
- package/lib/hoc/animation/index.js +1 -1
- package/lib/hoc/animation/index.js.map +1 -1
- package/lib/hoc/animation-scheduler/index.js +4 -4
- package/lib/hoc/animation-scheduler/index.js.map +1 -1
- package/lib/hoc/modal/index.native.js +2 -2
- package/lib/hoc/modal/index.native.js.map +1 -1
- package/lib/hoc/modal/select/index.native.d.ts +1 -0
- package/lib/hoc/modal/select/index.native.d.ts.map +1 -1
- package/lib/hoc/modal/select/index.native.js +2 -2
- package/lib/hoc/modal/select/index.native.js.map +1 -1
- package/lib/hoc/modal/select-item/index.native.d.ts +1 -0
- package/lib/hoc/modal/select-item/index.native.d.ts.map +1 -1
- package/lib/hoc/modal/select-item/index.native.js +2 -2
- package/lib/hoc/modal/select-item/index.native.js.map +1 -1
- package/lib/hoc/swapper/index.js +5 -3
- package/lib/hoc/swapper/index.js.map +1 -1
- package/lib/hoc/touchable/index.native.js +4 -4
- package/lib/hoc/touchable/index.native.js.map +1 -1
- package/lib/hoc/transition/index.js +3 -3
- package/lib/hoc/transition/index.js.map +1 -1
- package/lib/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 +6 -4
- package/lib/molecule/answer/index.js.map +1 -1
- package/lib/molecule/answer/index.native.d.ts +1 -0
- package/lib/molecule/answer/index.native.d.ts.map +1 -1
- package/lib/molecule/answer/index.native.js.map +1 -1
- package/lib/molecule/answer/prop-types.d.ts +6 -6
- package/lib/molecule/answer/prop-types.js +3 -3
- package/lib/molecule/answer/prop-types.js.map +1 -1
- package/lib/molecule/audio/index.js.map +1 -1
- package/lib/molecule/banner/index.js.map +1 -1
- package/lib/molecule/battle-request/index.js.map +1 -1
- package/lib/molecule/brand-card/description.js.map +1 -1
- package/lib/molecule/brand-card/index.js.map +1 -1
- package/lib/molecule/brand-card-create/index.js.map +1 -1
- package/lib/molecule/brand-create-form/index.d.ts +2 -2
- package/lib/molecule/brand-create-form/index.js +2 -2
- package/lib/molecule/brand-create-form/index.js.map +1 -1
- package/lib/molecule/brand-download-box/index.js.map +1 -1
- package/lib/molecule/brand-form-group/index.d.ts +9 -9
- package/lib/molecule/brand-form-group/index.js +20 -20
- package/lib/molecule/brand-form-group/index.js.map +1 -1
- package/lib/molecule/brand-logo/index.native.d.ts +1 -0
- package/lib/molecule/brand-logo/index.native.d.ts.map +1 -1
- package/lib/molecule/brand-logo/index.native.js +2 -2
- package/lib/molecule/brand-logo/index.native.js.map +1 -1
- package/lib/molecule/brand-tabs/index.js.map +1 -1
- package/lib/molecule/brand-upload-box/index.js.map +1 -1
- package/lib/molecule/breadcrumbs/index.js.map +1 -1
- package/lib/molecule/bullet-point-menu-button/index.js +2 -2
- package/lib/molecule/bullet-point-menu-button/index.js.map +1 -1
- package/lib/molecule/card/customer.js.map +1 -1
- package/lib/molecule/card/favorite.js.map +1 -1
- package/lib/molecule/card/index.js +4 -4
- package/lib/molecule/card/index.js.map +1 -1
- package/lib/molecule/card/notification.js.map +1 -1
- package/lib/molecule/card/selectable.js.map +1 -1
- package/lib/molecule/card-content/index.js.map +1 -1
- package/lib/molecule/card-with-button/index.d.ts +1 -1
- package/lib/molecule/card-with-button/index.js.map +1 -1
- package/lib/molecule/cm-popin/index.js.map +1 -1
- package/lib/molecule/cm-popin/types.js.map +1 -1
- package/lib/molecule/cookie-banner/index.js.map +1 -1
- package/lib/molecule/coorp-manager-roles/index.js +2 -2
- package/lib/molecule/coorp-manager-roles/index.js.map +1 -1
- package/lib/molecule/course-section/index.js.map +1 -1
- package/lib/molecule/course-sections/index.js +2 -2
- package/lib/molecule/course-sections/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/index.js +1 -1
- package/lib/molecule/dashboard/cards-list/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/review-banner/index.js +3 -3
- package/lib/molecule/dashboard/review-banner/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-cta/index.js.map +1 -1
- package/lib/molecule/discipline-header/index.js.map +1 -1
- package/lib/molecule/discipline-partners/index.js.map +1 -1
- package/lib/molecule/discipline-scope/index.js.map +1 -1
- package/lib/molecule/drag-and-drop/index.js +4 -4
- package/lib/molecule/drag-and-drop/index.js.map +1 -1
- package/lib/molecule/drag-and-drop/overlay.js.map +1 -1
- package/lib/molecule/drag-and-drop/placeholder.js.map +1 -1
- package/lib/molecule/drag-and-drop/upload-report.js +4 -4
- package/lib/molecule/drag-and-drop/upload-report.js.map +1 -1
- package/lib/molecule/drag-and-drop-wrapper/index.js.map +1 -1
- package/lib/molecule/draggable/index.js +2 -2
- package/lib/molecule/draggable/index.js.map +1 -1
- package/lib/molecule/draggable-list/index.js +3 -3
- package/lib/molecule/draggable-list/index.js.map +1 -1
- package/lib/molecule/external-content-button/index.js.map +1 -1
- package/lib/molecule/external-content-viewer/index.js.map +1 -1
- package/lib/molecule/feedback/index.js +4 -4
- package/lib/molecule/feedback/index.js.map +1 -1
- package/lib/molecule/filters/filters-wrapper.js +1 -1
- package/lib/molecule/filters/filters-wrapper.js.map +1 -1
- package/lib/molecule/filters/index.d.ts +1 -1
- package/lib/molecule/filters/index.js.map +1 -1
- package/lib/molecule/forum/forum-comment/index.js.map +1 -1
- package/lib/molecule/forum/forum-post/index.js.map +1 -1
- package/lib/molecule/forum/forum-thread/index.js +1 -1
- package/lib/molecule/forum/forum-thread/index.js.map +1 -1
- package/lib/molecule/forum/post-conditions.js.map +1 -1
- package/lib/molecule/go1-banner/index.js.map +1 -1
- package/lib/molecule/hero/index.js +2 -2
- package/lib/molecule/hero/index.js.map +1 -1
- package/lib/molecule/input-text-with-titled-checkbox/index.js.map +1 -1
- package/lib/molecule/list-badges/index.js.map +1 -1
- package/lib/molecule/login-alert/index.js.map +1 -1
- package/lib/molecule/menu-list/index.js.map +1 -1
- package/lib/molecule/message-popin/index.js.map +1 -1
- package/lib/molecule/modal/index.js.map +1 -1
- package/lib/molecule/module-bubble/index.js.map +1 -1
- package/lib/molecule/module-card/index.js +1 -1
- package/lib/molecule/module-card/index.js.map +1 -1
- package/lib/molecule/news/index.js +1 -1
- package/lib/molecule/news/index.js.map +1 -1
- package/lib/molecule/notification-banner/index.js.map +1 -1
- package/lib/molecule/pagination/index.js.map +1 -1
- package/lib/molecule/payment-form/index.js.map +1 -1
- package/lib/molecule/pdf/index.js.map +1 -1
- package/lib/molecule/popin/index.js +4 -4
- package/lib/molecule/popin/index.js.map +1 -1
- package/lib/molecule/product-card/index.js.map +1 -1
- package/lib/molecule/progress-bar/index.d.ts +1 -1
- package/lib/molecule/progress-bar/index.js +2 -2
- package/lib/molecule/progress-bar/index.js.map +1 -1
- package/lib/molecule/questions/drop-down/index.d.ts +1 -1
- package/lib/molecule/questions/drop-down/index.js +2 -2
- package/lib/molecule/questions/drop-down/index.js.map +1 -1
- package/lib/molecule/questions/free-text/index.js +5 -5
- package/lib/molecule/questions/free-text/index.js.map +1 -1
- package/lib/molecule/questions/free-text/index.native.d.ts +1 -0
- package/lib/molecule/questions/free-text/index.native.d.ts.map +1 -1
- package/lib/molecule/questions/free-text/index.native.js +5 -5
- package/lib/molecule/questions/free-text/index.native.js.map +1 -1
- package/lib/molecule/questions/mobile/draggable/index.native.d.ts +1 -0
- package/lib/molecule/questions/mobile/draggable/index.native.d.ts.map +1 -1
- package/lib/molecule/questions/mobile/draggable/index.native.js +2 -2
- package/lib/molecule/questions/mobile/draggable/index.native.js.map +1 -1
- package/lib/molecule/questions/mobile/slider/index.native.d.ts +1 -0
- package/lib/molecule/questions/mobile/slider/index.native.d.ts.map +1 -1
- package/lib/molecule/questions/mobile/slider/index.native.js +4 -4
- package/lib/molecule/questions/mobile/slider/index.native.js.map +1 -1
- package/lib/molecule/questions/mobile/switch/index.native.d.ts +1 -0
- package/lib/molecule/questions/mobile/switch/index.native.d.ts.map +1 -1
- package/lib/molecule/questions/mobile/switch/index.native.js +2 -2
- package/lib/molecule/questions/mobile/switch/index.native.js.map +1 -1
- package/lib/molecule/questions/mobile/template/index.native.d.ts +1 -0
- package/lib/molecule/questions/mobile/template/index.native.d.ts.map +1 -1
- package/lib/molecule/questions/mobile/template/index.native.js +5 -5
- package/lib/molecule/questions/mobile/template/index.native.js.map +1 -1
- package/lib/molecule/questions/qcm/index.js +3 -3
- package/lib/molecule/questions/qcm/index.js.map +1 -1
- package/lib/molecule/questions/qcm-drag/index.js +2 -2
- package/lib/molecule/questions/qcm-drag/index.js.map +1 -1
- package/lib/molecule/questions/qcm-graphic/index.js +3 -3
- package/lib/molecule/questions/qcm-graphic/index.js.map +1 -1
- package/lib/molecule/questions/question-range/index.d.ts +1 -1
- package/lib/molecule/questions/question-range/index.js +7 -5
- package/lib/molecule/questions/question-range/index.js.map +1 -1
- package/lib/molecule/questions/template/index.d.ts +12 -3
- package/lib/molecule/questions/template/index.js +5 -3
- package/lib/molecule/questions/template/index.js.map +1 -1
- package/lib/molecule/questions/types.js.map +1 -1
- package/lib/molecule/quick-access-card/index.js.map +1 -1
- package/lib/molecule/quick-access-cards-group/index.js.map +1 -1
- package/lib/molecule/resource-player/index.d.ts +2 -2
- package/lib/molecule/resource-player/index.js +5 -3
- package/lib/molecule/resource-player/index.js.map +1 -1
- package/lib/molecule/review-card-congrats/index.js +4 -4
- package/lib/molecule/review-card-congrats/index.js.map +1 -1
- package/lib/molecule/review-card-congrats/prop-types.js.map +1 -1
- package/lib/molecule/review-correction-popin/index.js +3 -3
- package/lib/molecule/review-correction-popin/index.js.map +1 -1
- package/lib/molecule/review-correction-popin/prop-types.js.map +1 -1
- package/lib/molecule/review-header-steps/index.js +1 -1
- package/lib/molecule/review-header-steps/index.js.map +1 -1
- package/lib/molecule/review-header-steps/prop-types.js.map +1 -1
- package/lib/molecule/scope-content/index.js +1 -1
- package/lib/molecule/scope-content/index.js.map +1 -1
- package/lib/molecule/scope-tabs/index.js +3 -3
- package/lib/molecule/scope-tabs/index.js.map +1 -1
- package/lib/molecule/search-form/index.js +3 -3
- package/lib/molecule/search-form/index.js.map +1 -1
- package/lib/molecule/select-multiple/index.d.ts +2 -2
- package/lib/molecule/select-multiple/index.js +7 -7
- package/lib/molecule/select-multiple/index.js.map +1 -1
- package/lib/molecule/setup-cohort-item/index.js +1 -1
- package/lib/molecule/setup-cohort-item/index.js.map +1 -1
- package/lib/molecule/setup-section/index.js +2 -2
- package/lib/molecule/setup-section/index.js.map +1 -1
- package/lib/molecule/setup-sections/index.js.map +1 -1
- package/lib/molecule/setup-slide/index.d.ts +3 -3
- package/lib/molecule/setup-slide/index.js +9 -9
- package/lib/molecule/setup-slide/index.js.map +1 -1
- package/lib/molecule/setup-slider/index.d.ts +3 -3
- package/lib/molecule/setup-slider/index.js +1 -1
- package/lib/molecule/setup-slider/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/skill-card/index.js +2 -2
- package/lib/molecule/skill-card/index.js.map +1 -1
- package/lib/molecule/skill-card/prop-types.js.map +1 -1
- package/lib/molecule/ssmenu-list/index.js.map +1 -1
- package/lib/molecule/subscription-freemium/index.js.map +1 -1
- package/lib/molecule/subscription-premium/index.js.map +1 -1
- package/lib/molecule/table/index.d.ts +2 -2
- package/lib/molecule/table/index.js.map +1 -1
- package/lib/molecule/teams-popin/index.js.map +1 -1
- package/lib/molecule/theme-image/index.js.map +1 -1
- package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +2 -2
- package/lib/molecule/title-and-checkbox-wrapper/index.js +3 -3
- package/lib/molecule/title-and-checkbox-wrapper/index.js.map +1 -1
- package/lib/molecule/titled-checkbox/index.d.ts +2 -2
- package/lib/molecule/titled-checkbox/index.js +2 -2
- package/lib/molecule/titled-checkbox/index.js.map +1 -1
- package/lib/molecule/unsubscribe/index.js.map +1 -1
- package/lib/molecule/vertical-tabs/index.js.map +1 -1
- package/lib/molecule/video-iframe/index.d.ts.map +1 -1
- package/lib/molecule/video-iframe/index.js +2 -2
- package/lib/molecule/video-iframe/index.js.map +1 -1
- package/lib/molecule/video-player/index.js +4 -2
- package/lib/molecule/video-player/index.js.map +1 -1
- package/lib/molecule/video-player/jwplayer-prop-types.js.map +1 -1
- package/lib/molecule/video-player/jwplayer.js +3 -3
- package/lib/molecule/video-player/jwplayer.js.map +1 -1
- package/lib/molecule/video-player/prop-types.js.map +1 -1
- package/lib/molecule/video-player/vimeo.d.ts +3 -3
- package/lib/molecule/video-player/vimeo.js +2 -2
- package/lib/molecule/video-player/vimeo.js.map +1 -1
- package/lib/molecule/wizard-summary/index.d.ts +2 -2
- package/lib/molecule/wizard-summary/index.js +2 -2
- package/lib/molecule/wizard-summary/index.js.map +1 -1
- package/lib/organism/accordion/container/index.js +3 -3
- package/lib/organism/accordion/container/index.js.map +1 -1
- package/lib/organism/accordion/coorp-manager/index.js +4 -4
- package/lib/organism/accordion/coorp-manager/index.js.map +1 -1
- package/lib/organism/accordion/coorp-manager/part/index.js +1 -1
- package/lib/organism/accordion/coorp-manager/part/index.js.map +1 -1
- package/lib/organism/accordion/part/index.js.map +1 -1
- package/lib/organism/accordion/toggler/index.js +2 -2
- package/lib/organism/accordion/toggler/index.js.map +1 -1
- package/lib/organism/brand-analytics/analytics-popin.js.map +1 -1
- package/lib/organism/brand-analytics/index.d.ts +3 -3
- package/lib/organism/brand-analytics/index.js.map +1 -1
- package/lib/organism/brand-dashboard/index.js +1 -1
- package/lib/organism/brand-dashboard/index.js.map +1 -1
- package/lib/organism/brand-form/index.d.ts +9 -9
- package/lib/organism/brand-form/index.js +2 -2
- package/lib/organism/brand-form/index.js.map +1 -1
- package/lib/organism/brand-table/index.d.ts +2 -2
- package/lib/organism/brand-table/index.js.map +1 -1
- package/lib/organism/brand-upload/index.d.ts +2 -2
- package/lib/organism/brand-upload/index.js +1 -1
- package/lib/organism/brand-upload/index.js.map +1 -1
- package/lib/organism/cards-grid/index.js.map +1 -1
- package/lib/organism/cart/index.js.map +1 -1
- package/lib/organism/content-translation/index.js +3 -3
- package/lib/organism/content-translation/index.js.map +1 -1
- package/lib/organism/course-selection/index.js +1 -1
- package/lib/organism/course-selection/index.js.map +1 -1
- package/lib/organism/discussion/index.js +1 -1
- package/lib/organism/discussion/index.js.map +1 -1
- package/lib/organism/get-the-app/index.js +3 -3
- package/lib/organism/get-the-app/index.js.map +1 -1
- package/lib/organism/grid-list/index.js.map +1 -1
- package/lib/organism/header/index.d.ts +2 -2
- package/lib/organism/header/index.js.map +1 -1
- package/lib/organism/header-v2/index.native.d.ts +1 -0
- package/lib/organism/header-v2/index.native.d.ts.map +1 -1
- package/lib/organism/header-v2/index.native.js +2 -2
- package/lib/organism/header-v2/index.native.js.map +1 -1
- package/lib/organism/hero/index.js.map +1 -1
- package/lib/organism/list-item/index.js.map +1 -1
- package/lib/organism/list-items/index.js.map +1 -1
- package/lib/organism/mobile-navigation/index.native.js +2 -2
- package/lib/organism/mobile-navigation/index.native.js.map +1 -1
- package/lib/organism/mooc/image-slider/index.js +1 -1
- package/lib/organism/mooc/image-slider/index.js.map +1 -1
- package/lib/organism/mooc-footer/index.js.map +1 -1
- package/lib/organism/mooc-header/index.js +1 -1
- package/lib/organism/mooc-header/index.js.map +1 -1
- package/lib/organism/podcast-popin-intro/index.native.d.ts +1 -0
- package/lib/organism/podcast-popin-intro/index.native.d.ts.map +1 -1
- package/lib/organism/podcast-popin-intro/index.native.js +2 -2
- package/lib/organism/podcast-popin-intro/index.native.js.map +1 -1
- package/lib/organism/popin/index.js.map +1 -1
- package/lib/organism/resource-browser/index.js +1 -1
- package/lib/organism/resource-browser/index.js.map +1 -1
- package/lib/organism/review-congrats/index.js +4 -4
- package/lib/organism/review-congrats/index.js.map +1 -1
- package/lib/organism/review-congrats/prop-types.js.map +1 -1
- package/lib/organism/review-header/index.js.map +1 -1
- package/lib/organism/review-header/index.native.d.ts +1 -0
- package/lib/organism/review-header/index.native.d.ts.map +1 -1
- package/lib/organism/review-header/index.native.js +1 -1
- package/lib/organism/review-header/index.native.js.map +1 -1
- package/lib/organism/review-header/types.js.map +1 -1
- package/lib/organism/review-skills/index.js +2 -2
- package/lib/organism/review-skills/index.js.map +1 -1
- package/lib/organism/review-skills/prop-types.js +3 -3
- package/lib/organism/review-skills/prop-types.js.map +1 -1
- package/lib/organism/review-slide/index.js +3 -3
- package/lib/organism/review-slide/index.js.map +1 -1
- package/lib/organism/review-slide/index.native.d.ts +1 -0
- package/lib/organism/review-slide/index.native.d.ts.map +1 -1
- package/lib/organism/review-slide/index.native.js +2 -2
- package/lib/organism/review-slide/index.native.js.map +1 -1
- package/lib/organism/review-slide/prop-types.d.ts +8 -8
- package/lib/organism/review-slide/prop-types.js.map +1 -1
- package/lib/organism/review-stacked-slides/index.d.ts.map +1 -1
- package/lib/organism/review-stacked-slides/index.js +13 -9
- package/lib/organism/review-stacked-slides/index.js.map +1 -1
- package/lib/organism/review-stacked-slides/index.native.d.ts +1 -0
- package/lib/organism/review-stacked-slides/index.native.d.ts.map +1 -1
- package/lib/organism/review-stacked-slides/index.native.js +3 -6
- package/lib/organism/review-stacked-slides/index.native.js.map +1 -1
- package/lib/organism/review-stacked-slides/prop-types.d.ts +22 -22
- package/lib/organism/review-stacked-slides/prop-types.js +2 -2
- package/lib/organism/review-stacked-slides/prop-types.js.map +1 -1
- package/lib/organism/review-stacked-slides/style.css +120 -8
- package/lib/organism/rewards-form/index.d.ts +2 -2
- package/lib/organism/rewards-form/index.js +3 -1
- package/lib/organism/rewards-form/index.js.map +1 -1
- package/lib/organism/search-and-chips-results/index.js +1 -1
- package/lib/organism/search-and-chips-results/index.js.map +1 -1
- package/lib/organism/settings/index.js +5 -3
- package/lib/organism/settings/index.js.map +1 -1
- package/lib/organism/setup-header/index.js.map +1 -1
- package/lib/organism/sidebar/index.d.ts +29 -5
- package/lib/organism/sidebar/index.js +16 -14
- package/lib/organism/sidebar/index.js.map +1 -1
- package/lib/organism/slider/index.d.ts +1 -1
- package/lib/organism/slider/index.d.ts.map +1 -1
- package/lib/organism/slider/index.js.map +1 -1
- package/lib/organism/user-preferences/index.js +5 -3
- package/lib/organism/user-preferences/index.js.map +1 -1
- package/lib/organism/wizard-contents/index.d.ts +19 -19
- package/lib/organism/wizard-contents/index.js +8 -8
- package/lib/organism/wizard-contents/index.js.map +1 -1
- package/lib/template/activity/engine-stars.js.map +1 -1
- package/lib/template/activity/index.d.ts +3 -3
- package/lib/template/activity/index.js +2 -2
- package/lib/template/activity/index.js.map +1 -1
- package/lib/template/activity/progression-item.js +2 -2
- package/lib/template/activity/progression-item.js.map +1 -1
- package/lib/template/activity/stars-summary.d.ts +2 -2
- package/lib/template/activity/stars-summary.js +1 -1
- package/lib/template/activity/stars-summary.js.map +1 -1
- package/lib/template/app-player/loading/index.js.map +1 -1
- package/lib/template/app-player/player/index.js +1 -1
- package/lib/template/app-player/player/index.js.map +1 -1
- package/lib/template/app-player/player/slides/footer/index.js +2 -2
- package/lib/template/app-player/player/slides/footer/index.js.map +1 -1
- package/lib/template/app-player/player/slides/header/index.js.map +1 -1
- package/lib/template/app-player/player/slides/header/learner.d.ts +4 -4
- package/lib/template/app-player/player/slides/header/learner.js +1 -1
- package/lib/template/app-player/player/slides/header/learner.js.map +1 -1
- package/lib/template/app-player/player/slides/header/lives.js.map +1 -1
- package/lib/template/app-player/player/slides/header/microlearning.js.map +1 -1
- package/lib/template/app-player/player/slides/index.d.ts +6 -6
- package/lib/template/app-player/player/slides/index.js +16 -12
- package/lib/template/app-player/player/slides/index.js.map +1 -1
- package/lib/template/app-player/popin-correction/index.js +7 -5
- package/lib/template/app-player/popin-correction/index.js.map +1 -1
- package/lib/template/app-player/popin-end/index.js +1 -1
- package/lib/template/app-player/popin-end/index.js.map +1 -1
- package/lib/template/app-player/popin-end/summary.js +16 -12
- package/lib/template/app-player/popin-end/summary.js.map +1 -1
- package/lib/template/app-player/popin-header/index.js +8 -6
- package/lib/template/app-player/popin-header/index.js.map +1 -1
- package/lib/template/app-player/popin-no-access/index.js.map +1 -1
- package/lib/template/app-review/demo-ts/index.js.map +1 -1
- package/lib/template/app-review/demo-ts/index.native.d.ts +1 -0
- package/lib/template/app-review/demo-ts/index.native.d.ts.map +1 -1
- package/lib/template/app-review/demo-ts/index.native.js.map +1 -1
- package/lib/template/app-review/demo-ts/typings.js.map +1 -1
- package/lib/template/app-review/index.d.ts +23 -22
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/index.js +1 -1
- package/lib/template/app-review/index.js.map +1 -1
- package/lib/template/app-review/index.native.d.ts +1 -0
- package/lib/template/app-review/index.native.d.ts.map +1 -1
- package/lib/template/app-review/index.native.js +2 -2
- package/lib/template/app-review/index.native.js.map +1 -1
- package/lib/template/app-review/onboarding/index.js.map +1 -1
- package/lib/template/app-review/onboarding/index.native.js.map +1 -1
- package/lib/template/app-review/player/index.js.map +1 -1
- package/lib/template/app-review/player/index.native.d.ts +1 -0
- package/lib/template/app-review/player/index.native.d.ts.map +1 -1
- package/lib/template/app-review/player/index.native.js +2 -2
- package/lib/template/app-review/player/index.native.js.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +22 -22
- package/lib/template/app-review/player/prop-types.js +1 -1
- package/lib/template/app-review/player/prop-types.js.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +22 -22
- package/lib/template/app-review/prop-types.js +1 -1
- package/lib/template/app-review/prop-types.js.map +1 -1
- package/lib/template/app-review/skills/index.js.map +1 -1
- package/lib/template/app-review/skills/index.native.d.ts +1 -0
- package/lib/template/app-review/skills/index.native.d.ts.map +1 -1
- package/lib/template/app-review/skills/index.native.js +2 -2
- package/lib/template/app-review/skills/index.native.js.map +1 -1
- package/lib/template/app-review/skills/prop-types.js +1 -1
- package/lib/template/app-review/skills/prop-types.js.map +1 -1
- package/lib/template/app-review/skills/stories.js.map +1 -1
- package/lib/template/app-review/template-context.js +3 -3
- package/lib/template/app-review/template-context.js.map +1 -1
- package/lib/template/back-office/brand-create/index.js.map +1 -1
- package/lib/template/back-office/brand-list/index.js +4 -2
- package/lib/template/back-office/brand-list/index.js.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +39 -39
- package/lib/template/back-office/brand-update/index.js +9 -9
- package/lib/template/back-office/brand-update/index.js.map +1 -1
- package/lib/template/back-office/dashboard-preview/dashboard-popin.js.map +1 -1
- package/lib/template/back-office/dashboard-preview/index.js.map +1 -1
- package/lib/template/back-office/layout/index.js.map +1 -1
- package/lib/template/battle-requests/index.d.ts +2 -2
- package/lib/template/battle-requests/index.js.map +1 -1
- package/lib/template/cockpit/jw-uploader/index.js +2 -2
- package/lib/template/cockpit/jw-uploader/index.js.map +1 -1
- package/lib/template/common/authors/index.js.map +1 -1
- package/lib/template/common/coorp-header/content.js.map +1 -1
- package/lib/template/common/coorp-header/index.js.map +1 -1
- package/lib/template/common/dashboard/index.d.ts +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/discipline/index.js +2 -2
- package/lib/template/common/discipline/index.js.map +1 -1
- package/lib/template/common/search-page/index.d.ts +1 -1
- package/lib/template/common/search-page/index.js +1 -1
- package/lib/template/common/search-page/index.js.map +1 -1
- package/lib/template/external-course/index.d.ts.map +1 -1
- package/lib/template/external-course/index.js.map +1 -1
- package/lib/template/review-dashboard-skills/index.js.map +1 -1
- package/lib/template/teams-dashboard/index.js +3 -3
- package/lib/template/teams-dashboard/index.js.map +1 -1
- package/lib/util/bubbling.js.map +1 -1
- package/lib/util/build-query-string.js.map +1 -1
- package/lib/util/button-icons.js.map +1 -1
- package/lib/util/closest-step.js.map +1 -1
- package/lib/util/constants.js.map +1 -1
- package/lib/util/external-content.js +1 -1
- package/lib/util/external-content.js.map +1 -1
- package/lib/util/get-class-state.js.map +1 -1
- package/lib/util/get-clean-uri.js.map +1 -1
- package/lib/util/get-resized-image.js +3 -3
- package/lib/util/get-resized-image.js.map +1 -1
- package/lib/util/get-shadow-box-color-from-primary.js.map +1 -1
- package/lib/util/image.js.map +1 -1
- package/lib/util/navigation.js.map +1 -1
- package/lib/util/parse-template-string.js.map +1 -1
- package/lib/util/proptypes.js +1 -1
- package/lib/util/proptypes.js.map +1 -1
- package/lib/util/render-with-context.js +7 -4
- package/lib/util/render-with-context.js.map +1 -1
- package/lib/util/shallow-compare.js.map +1 -1
- package/lib/variables/analytics.js.map +1 -1
- package/lib/variables/brand.native.js.map +1 -1
- package/lib/variables/colors.js.map +1 -1
- package/lib/variables/default-mobile-translations.js.map +1 -1
- package/lib/variables/shadow.js.map +1 -1
- package/lib/variables/theme.native.js.map +1 -1
- package/lib/variables/vibration.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["createStyleSheet","theme","StyleSheet","create","container","flex","paddingHorizontal","flexDirection","justifyContent","header","fontSize","fontWeight","bold","textAlign","textValue","color","colors","black","valuesContainer","leftValue","alignItems","rightValue","track","height","borderRadius","radius","button","thumb","BOX_STYLE","width","backgroundColor","borderWidth","QuestionSlider","props","step","style","min","max","unit","value","storeValue","onSlidingComplete","testID","templateContext","useTemplateContext","brandTheme","styleSheet","setStylesheet","useState","setValue","handleSlidingComplete","useCallback","useEffect","_stylesheet","primary","borderColor"],"sources":["../../../../../src/molecule/questions/mobile/slider/index.native.tsx"],"sourcesContent":["import React, {useState, useEffect, useCallback} from 'react';\nimport {View, StyleSheet, ViewStyle, TextStyle} from 'react-native';\nimport Slider from '@coorpacademy/react-native-slider';\n\nimport {Theme} from '../../../../variables/theme.native';\nimport Text from '../../../../atom/text/index.native';\nimport {useTemplateContext} from '../../../../template/app-review/template-context';\nimport {BOX_STYLE} from '../../../../variables/shadow';\n\nexport type OnSlidingCompleteFunction = (value: number) => void;\n\nexport type Props = {\n min: number;\n max: number;\n value?: number;\n unit?: string;\n onSlidingComplete: OnSlidingCompleteFunction;\n style?: ViewStyle;\n step?: number;\n testID?: string;\n};\n\ntype StyleSheetType = {\n container: ViewStyle;\n header: TextStyle;\n textValue: TextStyle;\n valuesContainer: ViewStyle;\n leftValue: ViewStyle;\n rightValue: ViewStyle;\n track: ViewStyle;\n thumb: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n container: {\n flex: 1,\n paddingHorizontal: 20,\n flexDirection: 'column',\n justifyContent: 'center'\n },\n header: {\n fontSize: 25,\n fontWeight: theme.fontWeight.bold,\n textAlign: 'center'\n },\n textValue: {\n fontSize: 15,\n color: theme.colors.black,\n fontWeight: theme.fontWeight.bold,\n textAlign: 'center'\n },\n valuesContainer: {\n flexDirection: 'row',\n justifyContent: 'space-around'\n },\n leftValue: {\n flex: 1,\n alignItems: 'flex-start'\n },\n rightValue: {\n flex: 1,\n alignItems: 'flex-end'\n },\n track: {\n height: 10,\n borderRadius: theme.radius.button\n },\n thumb: {\n ...BOX_STYLE,\n width: 30,\n height: 30,\n borderRadius: 30 / 2,\n backgroundColor: 'white',\n borderWidth: 1\n }\n });\n\nconst QuestionSlider = (props: Props) => {\n const {\n step,\n style,\n min,\n max,\n unit = '',\n value: storeValue = 0,\n onSlidingComplete,\n testID\n } = props;\n const templateContext = useTemplateContext();\n const {brandTheme, theme} = templateContext;\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const [value, setValue] = useState<number>(storeValue);\n\n const handleSlidingComplete = useCallback(() => {\n onSlidingComplete(value);\n }, [onSlidingComplete, value]);\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <View style={[styleSheet.container, style]} testID={testID}>\n <Text style={[styleSheet.header, {color: brandTheme?.colors?.primary}]} testID=\"slider-value\">\n {value}\n </Text>\n <Slider\n step={step || 1}\n value={value}\n onValueChange={setValue}\n maximumValue={max}\n minimumValue={min}\n onSlidingComplete={handleSlidingComplete}\n minimumTrackTintColor={brandTheme?.colors?.primary}\n trackStyle={styleSheet.track}\n thumbStyle={[styleSheet.thumb, {borderColor: brandTheme?.colors?.primary}]}\n testID=\"slider\"\n />\n <View style={styleSheet.valuesContainer} testID=\"slider-values-container\">\n <View style={styleSheet.leftValue}>\n <Text style={styleSheet.textValue} testID=\"slider-min-value\">\n {`${min} ${unit}`}\n </Text>\n </View>\n <View style={styleSheet.rightValue}>\n <Text style={styleSheet.textValue} testID=\"slider-max-value\">\n {`${max} ${unit}`}\n </Text>\n </View>\n </View>\n </View>\n );\n};\n\nexport default QuestionSlider;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAGA;;AACA;;AACA;;;;;;;;;;AA0BA,MAAMA,gBAAgB,GAAIC,KAAD,IACvBC,uBAAA,CAAW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E7B,MAAZ,EAAoBsC;IAAlC,CAAnB,CATd;IAUE,MAAM,EAAC;EAVT,EAJF,eAgBE,6BAAC,iBAAD;IAAM,KAAK,EAAER,UAAU,CAAC5B,eAAxB;IAAyC,MAAM,EAAC;EAAhD,gBACE,6BAAC,iBAAD;IAAM,KAAK,EAAE4B,UAAU,CAAC3B;EAAxB,gBACE,6BAAC,cAAD;IAAM,KAAK,EAAE2B,UAAU,CAAChC,SAAxB;IAAmC,MAAM,EAAC;EAA1C,GACI,GAAEsB,GAAI,IAAGE,IAAK,EADlB,CADF,CADF,eAME,6BAAC,iBAAD;IAAM,KAAK,EAAEQ,UAAU,CAACzB;EAAxB,gBACE,6BAAC,cAAD;IAAM,KAAK,EAAEyB,UAAU,CAAChC,SAAxB;IAAmC,MAAM,EAAC;EAA1C,GACI,GAAEuB,GAAI,IAAGC,IAAK,EADlB,CADF,CANF,CAhBF,CADF;AA+BD,CA5DD;;eA8DeN,c"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../../src/molecule/questions/mobile/switch/index.native.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,YAAY,EACZ,MAAM,EAIP,MAAM,aAAa,CAAC;AAErB,oBAAY,KAAK,GAAG;IAClB,IAAI,EAAE,YAAY,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEzC,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC,CAAC;AAqBF,QAAA,MAAM,MAAM,UAAW,KAAK,gBAoK3B,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../../src/molecule/questions/mobile/switch/index.native.tsx"],"names":[],"mappings":";AAYA,OAAO,KAAK,EACV,YAAY,EACZ,MAAM,EAIP,MAAM,aAAa,CAAC;AAErB,oBAAY,KAAK,GAAG;IAClB,IAAI,EAAE,YAAY,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEzC,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC,CAAC;AAqBF,QAAA,MAAM,MAAM,UAAW,KAAK,gBAoK3B,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -23,9 +23,9 @@ var _analytics = require("../../../../variables/analytics");
|
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
26
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
26
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
27
|
|
|
28
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
28
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
29
|
|
|
30
30
|
const styleSheet = _reactNative.StyleSheet.create({
|
|
31
31
|
cards: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/questions/mobile/switch/index.native.tsx"],"names":["styleSheet","StyleSheet","create","cards","flexDirection","alignItems","card","flex","choice","paddingVertical","Switch","props","templateContext","analytics","store","focusedSelectId","handleBlur","handleFocus","type","template","isDisabled","choices","min","max","unit","value","step","onSliderChange","onItemPress","onItemInputChange","onInputValueChange","handleChoicePress","onPress","handleItemInputChange","_value","handleSlidingComplete","logEvent","ANALYTICS_EVENT_TYPE","SLIDE","id","questionType","map","_id","selected","label","media","undefined","console","warn"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;AAiCA,MAAMA,UAA0B,GAAGC,wBAAWC,MAAX,CAAkB;AACnDC,EAAAA,KAAK,EAAE;AACLC,IAAAA,aAAa,EAAE,KADV;AAELC,IAAAA,UAAU,EAAE;AAFP,GAD4C;AAKnDC,EAAAA,IAAI,EAAE;AACJC,IAAAA,IAAI,EAAE;AADF,GAL6C;AAQnDC,EAAAA,MAAM,EAAE;AACNC,IAAAA,eAAe,EAAE;AADX;AAR2C,CAAlB,CAAnC;;AAaA,MAAMC,MAAM,GAAIC,KAAD,IAAkB;AAC/B,QAAMC,eAAe,GAAG,0CAAxB;AACA,QAAM;AAACC,IAAAA,SAAD;AAAYC,IAAAA;AAAZ,MAAqBF,eAA3B;AACA,QAAM;AAACG,IAAAA,eAAD;AAAkBC,IAAAA,UAAlB;AAA8BC,IAAAA;AAA9B,MAA6CH,KAAnD;AAEA,QAAM;AACJI,IAAAA,IADI;AAEJC,IAAAA,QAFI;AAGJC,IAAAA,UAHI;AAIJC,IAAAA,OAAO,GAAG,EAJN;AAKJC,IAAAA,GALI;AAMJC,IAAAA,GANI;AAOJC,IAAAA,IAPI;AAQJC,IAAAA,KARI;AASJC,IAAAA,IATI;AAUJC,IAAAA,cAVI;AAWJC,IA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AM,EAAC;AAPT,UADF;AAWD;;AACD,SAAK,UAAL;AACE,UAAInB,UAAU,KAAK8B,SAAf,IAA4B7B,WAAW,KAAK6B,SAA5C,IAAyD/B,eAAe,KAAK+B,SAAjF,EAA4F;AAC1F;AACAC,QAAAA,OAAO,CAACC,IAAR,CAAa,mEAAb;AACA,4BAAO,6BAAC,iBAAD,OAAP;AACD;;AAED,0BACE,6BAAC,iBAAD;AAAM,QAAA,MAAM,EAAC;AAAb,sBACE,6BAAC,eAAD;AACE,QAAA,UAAU,EAAE5B,UADd;AAEE,QAAA,QAAQ,EAAED,QAAQ,IAAI,EAFxB;AAGE,QAAA,OAAO,EAAEE,OAHX;AAIE,QAAA,aAAa,EAAEY,qBAJjB;AAKE,QAAA,UAAU,EAAEjB,UALd;AAME,QAAA,WAAW,EAAEC,WANf;AAOE,QAAA,eAAe,EAAEF;AAPnB,QADF,CADF;;AAaF,SAAK,SAAL;AACE,0BACE,6BAAC,iBAAD;AAAM,QAAA,MAAM,EAAC;AAAb,sBACE,6BAAC,eAAD;AAAmB,QAAA,OAAO,EAAEM,OAA5B;AAA2D,QAAA,OAAO,EAAEU;AAApE,QADF,CADF;;AAKF,SAAK,OAAL;AACE,UAAI,CAACD,kBAAL,EAAyB;AACvB,4BAAO,6BAAC,iBAAD,OAAP;AACD;;AAED,0BACE,6BAAC,eAAD;AACE,QAAA,SAAS,MADX;AAEE,QAAA,QAAQ,EAAEA,kBAFZ;AAGE,QAAA,MAAM,EAAC,qBAHT;AAIE,QAAA,YAAY,EAAC,OAJf;AAKE,QAAA,UAAU,EAAEV;AALd,QADF;;AASF;AACE,0BACE,6BAAC,iBAAD,qBACE,6BAAC,iBAAD,4BAAuBF,IAAvB,CADF,CADF;AAhGJ;AAsGD,CApKD;;eAsKeR,M","sourcesContent":["import React, {useCallback} from 'react';\nimport {View, StyleSheet, Text, ViewStyle} from 'react-native';\n\nimport QuestionChoice from '../../../../atom/choice/index.native';\nimport QuestionDraggable from '../draggable/index.native';\nimport QuestionTemplate from '../template/index.native';\nimport QuestionSlider from '../slider/index.native';\nimport FreeText from '../../free-text/index.native';\n\nimport {useTemplateContext} from '../../../../template/app-review/template-context';\nimport {ANALYTICS_EVENT_TYPE} from '../../../../variables/analytics';\n\nimport type {\n QuestionType,\n Choice,\n TemplateListOfChoices,\n TemplateTextChoice,\n SelectableChoice\n} from '../../types';\n\nexport type Props = {\n type: QuestionType;\n isDisabled?: boolean;\n template?: string;\n choices?: Array<Choice>;\n min?: number;\n max?: number;\n unit?: string;\n step?: number;\n value?: number;\n onInputValueChange?: (value: string) => void;\n onSliderChange?: (value: number) => void;\n // --- mobile learner only\n onItemInputChange?: (item: Choice, value: string) => void;\n onItemPress?: (item: Choice) => void;\n};\n\ntype StyleSheetType = {\n cards: ViewStyle;\n card: ViewStyle;\n choice: ViewStyle;\n};\n\nconst styleSheet: StyleSheetType = StyleSheet.create({\n cards: {\n flexDirection: 'row',\n alignItems: 'stretch'\n },\n card: {\n flex: 1\n },\n choice: {\n paddingVertical: 5\n }\n});\n\nconst Switch = (props: Props) => {\n const templateContext = useTemplateContext();\n const {analytics, store} = templateContext;\n const {focusedSelectId, handleBlur, handleFocus} = store;\n\n const {\n type,\n template,\n isDisabled,\n choices = [],\n min,\n max,\n unit,\n value,\n step,\n onSliderChange,\n onItemPress,\n onItemInputChange,\n onInputValueChange\n } = props;\n\n const handleChoicePress = useCallback(\n (choice: Choice) => () => {\n if ((choice as SelectableChoice).onPress) {\n // e.g. app-review\n (choice as SelectableChoice).onPress();\n } else if (onItemPress) {\n // e.g. learner\n onItemPress(choice);\n }\n },\n [onItemPress]\n );\n\n const handleItemInputChange = useCallback(\n (choice: Choice, _value: string) => {\n if ((choice as SelectableChoice).onPress) {\n // e.g. app-review\n (choice as SelectableChoice).onPress(_value);\n } else if (onItemInputChange) {\n // e.g. learner\n onItemInputChange(choice, _value);\n }\n },\n [onItemInputChange]\n );\n\n const handleSlidingComplete = useCallback(\n _value => {\n analytics &&\n analytics.logEvent(ANALYTICS_EVENT_TYPE.SLIDE, {\n id: 'slider',\n questionType: 'slider'\n });\n\n if (onSliderChange) {\n onSliderChange(_value);\n }\n },\n [analytics, onSliderChange]\n );\n\n switch (type) {\n case 'qcm':\n return (\n <View testID=\"question-choices\">\n {(choices as SelectableChoice[]).map(choice => (\n <QuestionChoice\n key={`question-choice-${choice._id}`}\n onPress={handleChoicePress(choice)}\n isDisabled={isDisabled}\n isSelected={choice.selected}\n testID={`question-choice-${choice._id}`}\n style={styleSheet.choice}\n questionType={type}\n >\n {choice.label}\n </QuestionChoice>\n ))}\n </View>\n );\n case 'qcmGraphic':\n return (\n <View testID=\"question-choices\">\n {(choices as SelectableChoice[]).map(choice => (\n <QuestionChoice\n key={`question-choice-${choice._id}`}\n onPress={handleChoicePress(choice)}\n media={choice.media}\n isDisabled={isDisabled}\n isSelected={choice.selected}\n testID={`question-choice-${choice._id}`}\n style={styleSheet.choice}\n questionType={type}\n >\n {choice.label}\n </QuestionChoice>\n ))}\n </View>\n );\n case 'slider': {\n if (min === undefined || max === undefined) {\n return <View />;\n }\n\n return (\n <QuestionSlider\n min={min}\n max={max}\n unit={unit}\n value={value}\n step={step}\n onSlidingComplete={handleSlidingComplete}\n testID=\"question-slider\"\n />\n );\n }\n case 'template':\n if (handleBlur === undefined || handleFocus === undefined || focusedSelectId === undefined) {\n // eslint-disable-next-line no-console\n console.warn('type template must implement handleFocus etc within Context.store');\n return <View />;\n }\n\n return (\n <View testID=\"question-choices\">\n <QuestionTemplate\n isDisabled={isDisabled}\n template={template || ''}\n choices={choices as (TemplateListOfChoices | TemplateTextChoice)[]}\n onInputChange={handleItemInputChange}\n handleBlur={handleBlur}\n handleFocus={handleFocus}\n focusedSelectId={focusedSelectId}\n />\n </View>\n );\n case 'qcmDrag':\n return (\n <View testID=\"question-draggable\">\n <QuestionDraggable choices={choices as SelectableChoice[]} onPress={handleChoicePress} />\n </View>\n );\n case 'basic':\n if (!onInputValueChange) {\n return <View />;\n }\n\n return (\n <FreeText\n fullWidth\n onChange={onInputValueChange}\n testID=\"question-input-text\"\n questionType=\"basic\"\n isDisabled={isDisabled}\n />\n );\n default:\n return (\n <View>\n <Text>Unhandled type: {type}</Text>\n </View>\n );\n }\n};\n\nexport default Switch;\n"],"file":"index.native.js"}
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["styleSheet","StyleSheet","create","cards","flexDirection","alignItems","card","flex","choice","paddingVertical","Switch","props","templateContext","useTemplateContext","analytics","store","focusedSelectId","handleBlur","handleFocus","type","template","isDisabled","choices","min","max","unit","value","step","onSliderChange","onItemPress","onItemInputChange","onInputValueChange","handleChoicePress","useCallback","onPress","handleItemInputChange","_value","handleSlidingComplete","logEvent","ANALYTICS_EVENT_TYPE","SLIDE","id","questionType","map","_id","selected","label","media","undefined","console","warn"],"sources":["../../../../../src/molecule/questions/mobile/switch/index.native.tsx"],"sourcesContent":["import React, {useCallback} from 'react';\nimport {View, StyleSheet, Text, ViewStyle} from 'react-native';\n\nimport QuestionChoice from '../../../../atom/choice/index.native';\nimport QuestionDraggable from '../draggable/index.native';\nimport QuestionTemplate from '../template/index.native';\nimport QuestionSlider from '../slider/index.native';\nimport FreeText from '../../free-text/index.native';\n\nimport {useTemplateContext} from '../../../../template/app-review/template-context';\nimport {ANALYTICS_EVENT_TYPE} from '../../../../variables/analytics';\n\nimport type {\n QuestionType,\n Choice,\n TemplateListOfChoices,\n TemplateTextChoice,\n SelectableChoice\n} from '../../types';\n\nexport type Props = {\n type: QuestionType;\n isDisabled?: boolean;\n template?: string;\n choices?: Array<Choice>;\n min?: number;\n max?: number;\n unit?: string;\n step?: number;\n value?: number;\n onInputValueChange?: (value: string) => void;\n onSliderChange?: (value: number) => void;\n // --- mobile learner only\n onItemInputChange?: (item: Choice, value: string) => void;\n onItemPress?: (item: Choice) => void;\n};\n\ntype StyleSheetType = {\n cards: ViewStyle;\n card: ViewStyle;\n choice: ViewStyle;\n};\n\nconst styleSheet: StyleSheetType = StyleSheet.create({\n cards: {\n flexDirection: 'row',\n alignItems: 'stretch'\n },\n card: {\n flex: 1\n },\n choice: {\n paddingVertical: 5\n }\n});\n\nconst Switch = (props: Props) => {\n const templateContext = useTemplateContext();\n const {analytics, store} = templateContext;\n const {focusedSelectId, handleBlur, handleFocus} = store;\n\n const {\n type,\n template,\n isDisabled,\n choices = [],\n min,\n max,\n unit,\n value,\n step,\n onSliderChange,\n onItemPress,\n onItemInputChange,\n onInputValueChange\n } = props;\n\n const handleChoicePress = useCallback(\n (choice: Choice) => () => {\n if ((choice as SelectableChoice).onPress) {\n // e.g. app-review\n (choice as SelectableChoice).onPress();\n } else if (onItemPress) {\n // e.g. learner\n onItemPress(choice);\n }\n },\n [onItemPress]\n );\n\n const handleItemInputChange = useCallback(\n (choice: Choice, _value: string) => {\n if ((choice as SelectableChoice).onPress) {\n // e.g. app-review\n (choice as SelectableChoice).onPress(_value);\n } else if (onItemInputChange) {\n // e.g. learner\n onItemInputChange(choice, _value);\n }\n },\n [onItemInputChange]\n );\n\n const handleSlidingComplete = useCallback(\n _value => {\n analytics &&\n analytics.logEvent(ANALYTICS_EVENT_TYPE.SLIDE, {\n id: 'slider',\n questionType: 'slider'\n });\n\n if (onSliderChange) {\n onSliderChange(_value);\n }\n },\n [analytics, onSliderChange]\n );\n\n switch (type) {\n case 'qcm':\n return (\n <View testID=\"question-choices\">\n {(choices as SelectableChoice[]).map(choice => (\n <QuestionChoice\n key={`question-choice-${choice._id}`}\n onPress={handleChoicePress(choice)}\n isDisabled={isDisabled}\n isSelected={choice.selected}\n testID={`question-choice-${choice._id}`}\n style={styleSheet.choice}\n questionType={type}\n >\n {choice.label}\n </QuestionChoice>\n ))}\n </View>\n );\n case 'qcmGraphic':\n return (\n <View testID=\"question-choices\">\n {(choices as SelectableChoice[]).map(choice => (\n <QuestionChoice\n key={`question-choice-${choice._id}`}\n onPress={handleChoicePress(choice)}\n media={choice.media}\n isDisabled={isDisabled}\n isSelected={choice.selected}\n testID={`question-choice-${choice._id}`}\n style={styleSheet.choice}\n questionType={type}\n >\n {choice.label}\n </QuestionChoice>\n ))}\n </View>\n );\n case 'slider': {\n if (min === undefined || max === undefined) {\n return <View />;\n }\n\n return (\n <QuestionSlider\n min={min}\n max={max}\n unit={unit}\n value={value}\n step={step}\n onSlidingComplete={handleSlidingComplete}\n testID=\"question-slider\"\n />\n );\n }\n case 'template':\n if (handleBlur === undefined || handleFocus === undefined || focusedSelectId === undefined) {\n // eslint-disable-next-line no-console\n console.warn('type template must implement handleFocus etc within Context.store');\n return <View />;\n }\n\n return (\n <View testID=\"question-choices\">\n <QuestionTemplate\n isDisabled={isDisabled}\n template={template || ''}\n choices={choices as (TemplateListOfChoices | TemplateTextChoice)[]}\n onInputChange={handleItemInputChange}\n handleBlur={handleBlur}\n handleFocus={handleFocus}\n focusedSelectId={focusedSelectId}\n />\n </View>\n );\n case 'qcmDrag':\n return (\n <View testID=\"question-draggable\">\n <QuestionDraggable choices={choices as SelectableChoice[]} onPress={handleChoicePress} />\n </View>\n );\n case 'basic':\n if (!onInputValueChange) {\n return <View />;\n }\n\n return (\n <FreeText\n fullWidth\n onChange={onInputValueChange}\n testID=\"question-input-text\"\n questionType=\"basic\"\n isDisabled={isDisabled}\n />\n );\n default:\n return (\n <View>\n <Text>Unhandled type: {type}</Text>\n </View>\n );\n }\n};\n\nexport default Switch;\n"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;AAiCA,MAAMA,UAA0B,GAAGC,uBAAA,CAAWC,MAAX,CAAkB;EACnDC,KAAK,EAAE;IACLC,aAAa,EAAE,KADV;IAELC,UAAU,EAAE;EAFP,CAD4C;EAKnDC,IAAI,EAAE;IACJC,IAAI,EAAE;EADF,CAL6C;EAQnDC,MAAM,EAAE;IACNC,eAAe,EAAE;EADX;AAR2C,CAAlB,CAAnC;;AAaA,MAAMC,MAAM,GAAIC,KAAD,IAAkB;EAC/B,MAAMC,eAAe,GAAG,IAAAC,mCAAA,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P;UAGE,IAAI,EAAEC,IAHR;UAIE,KAAK,EAAEC,KAJT;UAKE,IAAI,EAAEC,IALR;UAME,iBAAiB,EAAEU,qBANrB;UAOE,MAAM,EAAC;QAPT,EADF;MAWD;;IACD,KAAK,UAAL;MACE,IAAIpB,UAAU,KAAK+B,SAAf,IAA4B9B,WAAW,KAAK8B,SAA5C,IAAyDhC,eAAe,KAAKgC,SAAjF,EAA4F;QAC1F;QACAC,OAAO,CAACC,IAAR,CAAa,mEAAb;QACA,oBAAO,6BAAC,iBAAD,OAAP;MACD;;MAED,oBACE,6BAAC,iBAAD;QAAM,MAAM,EAAC;MAAb,gBACE,6BAAC,eAAD;QACE,UAAU,EAAE7B,UADd;QAEE,QAAQ,EAAED,QAAQ,IAAI,EAFxB;QAGE,OAAO,EAAEE,OAHX;QAIE,aAAa,EAAEa,qBAJjB;QAKE,UAAU,EAAElB,UALd;QAME,WAAW,EAAEC,WANf;QAOE,eAAe,EAAEF;MAPnB,EADF,CADF;;IAaF,KAAK,SAAL;MACE,oBACE,6BAAC,iBAAD;QAAM,MAAM,EAAC;MAAb,gBACE,6BAAC,eAAD;QAAmB,OAAO,EAAEM,OAA5B;QAA2D,OAAO,EAAEU;MAApE,EADF,CADF;;IAKF,KAAK,OAAL;MACE,IAAI,CAACD,kBAAL,EAAyB;QACvB,oBAAO,6BAAC,iBAAD,OAAP;MACD;;MAED,oBACE,6BAAC,eAAD;QACE,SAAS,MADX;QAEE,QAAQ,EAAEA,kBAFZ;QAGE,MAAM,EAAC,qBAHT;QAIE,YAAY,EAAC,OAJf;QAKE,UAAU,EAAEV;MALd,EADF;;IASF;MACE,oBACE,6BAAC,iBAAD,qBACE,6BAAC,iBAAD,4BAAuBF,IAAvB,CADF,CADF;EAhGJ;AAsGD,CApKD;;eAsKeT,M"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../../src/molecule/questions/mobile/template/index.native.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAC,qBAAqB,EAAE,kBAAkB,EAAC,MAAM,aAAa,CAAC;AAE3E,OAAO,EACL,eAAe,EACf,UAAU,EACV,WAAW,EAEZ,MAAM,kDAAkD,CAAC;AA+J1D,oBAAY,KAAK,GAAG;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC,kBAAkB,GAAG,qBAAqB,CAAC,CAAC;IAC3D,aAAa,EAAE,CAAC,IAAI,EAAE,kBAAkB,GAAG,qBAAqB,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzF,eAAe,EAAE,eAAe,CAAC;IACjC,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;CAC1B,CAAC;AAEF,QAAA,MAAM,gBAAgB,UAAW,KAAK,uBA+CrC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../../src/molecule/questions/mobile/template/index.native.tsx"],"names":[],"mappings":";AAQA,OAAO,KAAK,EAAC,qBAAqB,EAAE,kBAAkB,EAAC,MAAM,aAAa,CAAC;AAE3E,OAAO,EACL,eAAe,EACf,UAAU,EACV,WAAW,EAEZ,MAAM,kDAAkD,CAAC;AA+J1D,oBAAY,KAAK,GAAG;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC,kBAAkB,GAAG,qBAAqB,CAAC,CAAC;IAC3D,aAAa,EAAE,CAAC,IAAI,EAAE,kBAAkB,GAAG,qBAAqB,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzF,eAAe,EAAE,eAAe,CAAC;IACjC,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;CAC1B,CAAC;AAEF,QAAA,MAAM,gBAAgB,UAAW,KAAK,uBA+CrC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -25,11 +25,11 @@ var _shadow = require("../../../../variables/shadow");
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
27
|
|
|
28
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
28
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
29
29
|
|
|
30
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
30
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
31
|
|
|
32
|
-
function _extends() { _extends = Object.assign
|
|
32
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
33
33
|
|
|
34
34
|
const createStyleSheet = theme => ({
|
|
35
35
|
container: {
|
|
@@ -48,13 +48,13 @@ const createStyleSheet = theme => ({
|
|
|
48
48
|
lineHeight: 25
|
|
49
49
|
},
|
|
50
50
|
// eslint-disable-next-line @coorpacademy/coorpacademy/no-overwriting-spread
|
|
51
|
-
selectInput: _extends(
|
|
51
|
+
selectInput: _extends({
|
|
52
52
|
padding: theme.spacing.tiny,
|
|
53
53
|
borderRadius: theme.radius.regular,
|
|
54
54
|
minWidth: 175,
|
|
55
55
|
marginHorizontal: 12,
|
|
56
56
|
paddingVertical: 16
|
|
57
|
-
}, _shadow.BOX_STYLE
|
|
57
|
+
}, _shadow.BOX_STYLE, {
|
|
58
58
|
backgroundColor: theme.colors.white
|
|
59
59
|
}),
|
|
60
60
|
selectText: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/questions/mobile/template/index.native.tsx"],"names":["createStyleSheet","theme","container","width","flexDirection","flexWrap","justifyContent","alignItems","spaced","paddingVertical","spacing","tiny","htmlText","color","colors","black","fontWeight","bold","lineHeight","selectInput","padding","borderRadius","radius","regular","minWidth","marginHorizontal","BOX_STYLE","backgroundColor","white","selectText","gray","medium","fontSize","textAlign","Item","props","part","index","isDisabled","focusedSelectId","choices","onInputChange","handleBlur","handleFocus","styles","templateContext","brandTheme","translations","inputNames","map","choice","name","id","isFocused","coloredText","primary","type","includes","value","choiceIndex","findIndex","disabledSuffix","selectedSuffix","handleInputChange","_item","_value","selectInputStyle","push","selectText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AAKA,MAAI,CAACuE,QAAD,IAAa,CAACC,UAAlB,EAA8B;AAC5B,WAAO,IAAP;AACD;;AAED,QAAMG,KAAqB,GAAG,kCAAoBJ,QAApB,CAA9B;AAEA,sBACE,6BAAC,iBAAD;AAAM,IAAA,KAAK,EAAEC,UAAU,CAACvE,SAAxB;AAAmC,IAAA,MAAM,EAAC;AAA1C,KACG0E,KAAK,CAAC3B,GAAN,CAAU,CAACb,IAAD,EAAOgB,EAAP,kBACT,6BAAC,iBAAD;AAAM,IAAA,GAAG,EAAG,iBAAgBA,EAAG,EAA/B;AAAkC,IAAA,KAAK,EAAE;AAAChD,MAAAA,aAAa,EAAE;AAAhB;AAAzC,kBACE,6BAAC,IAAD;AACE,IAAA,IAAI,EAAEgC,IADR;AAEE,IAAA,OAAO,EAAEI,OAFX;AAGE,IAAA,KAAK,EAAEY,EAHT;AAIE,IAAA,eAAe,EAAEb,eAJnB;AAKE,IAAA,UAAU,EAAED,UALd;AAME,IAAA,UAAU,EAAEI,UANd;AAOE,IAAA,WAAW,EAAEC,WAPf;AAQE,IAAA,aAAa,EAAEF,aARjB;AASE,IAAA,MAAM,EAAEgC;AATV,IADF,eAYE,6BAAC,eAAD;AAAO,IAAA,IAAI,EAAC;AAAZ,IAZF,CADD,CADH,CADF;AAoBD,CA/CD;;eAiDeF,gB","sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {TextStyle, View, ViewStyle} from 'react-native';\n\nimport trim from 'lodash/fp/trim';\n\nimport Html from '../../../../atom/html/index.native';\nimport Select from '../../../../atom/select-modal/index.native';\nimport Space from '../../../../atom/space/index.native';\nimport type {TemplateListOfChoices, TemplateTextChoice} from '../../types';\nimport FreeText from '../../free-text/index.native';\nimport {\n FocusedSelectId,\n HandleBlur,\n HandleFocus,\n useTemplateContext\n} from '../../../../template/app-review/template-context';\nimport {Theme} from '../../../../variables/theme.native';\nimport parseTemplateString from '../../../../util/parse-template-string';\nimport {BOX_STYLE} from '../../../../variables/shadow';\n\ntype StyleSheetType = {\n container: ViewStyle;\n spaced: ViewStyle;\n htmlText: TextStyle;\n selectInput: ViewStyle;\n selectText: TextStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType => ({\n container: {\n width: '100%',\n flexDirection: 'row',\n flexWrap: 'wrap',\n justifyContent: 'center',\n alignItems: 'center'\n },\n spaced: {\n paddingVertical: theme.spacing.tiny\n },\n htmlText: {\n color: theme.colors.black,\n fontWeight: theme.fontWeight.bold,\n lineHeight: 25\n },\n // eslint-disable-next-line @coorpacademy/coorpacademy/no-overwriting-spread\n selectInput: {\n padding: theme.spacing.tiny,\n borderRadius: theme.radius.regular,\n minWidth: 175,\n marginHorizontal: 12,\n paddingVertical: 16,\n ...BOX_STYLE,\n backgroundColor: theme.colors.white\n },\n selectText: {\n color: theme.colors.gray.medium,\n fontWeight: theme.fontWeight.bold,\n fontSize: theme.fontSize.regular,\n textAlign: 'center'\n }\n});\n\ntype TemplatePart = {\n type: 'string' | 'answerField';\n value: string;\n};\n\ntype ItemProps = {\n part: TemplatePart;\n choices: Array<TemplateTextChoice | TemplateListOfChoices>;\n index: number;\n isDisabled?: boolean;\n onInputChange: (item: TemplateTextChoice | TemplateListOfChoices, value: string) => void;\n focusedSelectId: FocusedSelectId;\n handleBlur: HandleBlur;\n handleFocus: HandleFocus;\n styles: StyleSheetType;\n};\n\nconst Item = (props: ItemProps) => {\n const {\n part,\n index,\n isDisabled = false,\n focusedSelectId,\n choices,\n onInputChange,\n handleBlur,\n handleFocus,\n styles\n } = props;\n\n const templateContext = useTemplateContext();\n const {theme, brandTheme, translations} = templateContext;\n\n const inputNames = choices.map(choice => choice.name);\n const id = `question-part-${index + 1}`;\n const isFocused = focusedSelectId === id;\n\n const coloredText = brandTheme && {\n color: brandTheme.colors?.primary\n };\n\n if (part.type === 'answerField' && inputNames.includes(part.value)) {\n const choiceIndex = choices.findIndex(choice => choice.name === part.value);\n const choice = choices[choiceIndex];\n const {value} = choice;\n\n if (!choice || !choice.type || !choice.name) {\n return null;\n }\n\n const disabledSuffix = isDisabled ? '-disabled' : '';\n const selectedSuffix = value ? '-selected' : '';\n\n const handleInputChange =\n (_item: TemplateTextChoice | TemplateListOfChoices) => (_value: string) =>\n onInputChange(_item, _value);\n\n if (choice.type === 'text') {\n return (\n <View style={styles.spaced} testID={id}>\n <FreeText\n key={id}\n isDisabled={isDisabled}\n onChange={handleInputChange(choice)}\n value={value}\n testID={`${id}-text${selectedSuffix}${disabledSuffix}`}\n questionType=\"template\"\n />\n </View>\n );\n }\n\n const selectInputStyle: TextStyle[] = [styles.selectInput];\n if (coloredText && value) {\n selectInputStyle.push(coloredText);\n }\n\n const selectTextStyle: TextStyle[] = [styles.selectText];\n if (coloredText && value) {\n selectTextStyle.push(coloredText);\n }\n\n if (choice.type === 'select') {\n return (\n <View style={styles.spaced} testID={id}>\n <Select\n isDisabled={isDisabled}\n questionType=\"template\"\n values={choice.items}\n value={value}\n placeholder={translations.selectAnAnswer}\n isFocused={isFocused}\n onBlur={handleBlur}\n onFocus={handleFocus(id)}\n onChange={handleInputChange(choice)}\n textStyle={selectTextStyle}\n style={selectInputStyle}\n analyticsID={`${id}-select${selectedSuffix}${disabledSuffix}`}\n testID={`${id}-select${selectedSuffix}${disabledSuffix}`}\n />\n </View>\n );\n }\n }\n\n return (\n <Html key={id} fontSize={theme.fontSize.regular} testID={id} style={styles.htmlText}>\n {trim(part.value || '')}\n </Html>\n );\n};\n\nexport type Props = {\n isDisabled?: boolean;\n template: string;\n choices: Array<TemplateTextChoice | TemplateListOfChoices>;\n onInputChange: (item: TemplateTextChoice | TemplateListOfChoices, value: string) => void;\n focusedSelectId: FocusedSelectId;\n handleBlur: HandleBlur;\n handleFocus: HandleFocus;\n};\n\nconst QuestionTemplate = (props: Props) => {\n const {\n template,\n onInputChange,\n choices,\n handleBlur,\n handleFocus,\n focusedSelectId,\n isDisabled = false\n } = props;\n\n const templateContext = useTemplateContext();\n const {theme} = templateContext;\n\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n if (!template || !styleSheet) {\n return null;\n }\n\n const parts: TemplatePart[] = parseTemplateString(template);\n\n return (\n <View style={styleSheet.container} testID=\"question-template\">\n {parts.map((part, id) => (\n <View key={`question-part-${id}`} style={{flexDirection: 'row'}}>\n <Item\n part={part}\n choices={choices}\n index={id}\n focusedSelectId={focusedSelectId}\n isDisabled={isDisabled}\n handleBlur={handleBlur}\n handleFocus={handleFocus}\n onInputChange={onInputChange}\n styles={styleSheet}\n />\n <Space type=\"micro\" />\n </View>\n ))}\n </View>\n );\n};\n\nexport default QuestionTemplate;\n"],"file":"index.native.js"}
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["createStyleSheet","theme","container","width","flexDirection","flexWrap","justifyContent","alignItems","spaced","paddingVertical","spacing","tiny","htmlText","color","colors","black","fontWeight","bold","lineHeight","selectInput","padding","borderRadius","radius","regular","minWidth","marginHorizontal","BOX_STYLE","backgroundColor","white","selectText","gray","medium","fontSize","textAlign","Item","props","part","index","isDisabled","focusedSelectId","choices","onInputChange","handleBlur","handleFocus","styles","templateContext","useTemplateContext","brandTheme","translations","inputNames","map","choice","name","id","isFocused","coloredText","primary","type","includes","value","choiceIndex","findIndex","disabledSuffix","selectedSuffix","handleInputChange","_item","_value","selectInputStyle","push","selectTextStyle","items","selectAnAnswer","trim","QuestionTemplate","template","styleSheet","setStylesheet","useState","useEffect","_stylesheet","parts","parseTemplateString"],"sources":["../../../../../src/molecule/questions/mobile/template/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {TextStyle, View, ViewStyle} from 'react-native';\n\nimport trim from 'lodash/fp/trim';\n\nimport Html from '../../../../atom/html/index.native';\nimport Select from '../../../../atom/select-modal/index.native';\nimport Space from '../../../../atom/space/index.native';\nimport type {TemplateListOfChoices, TemplateTextChoice} from '../../types';\nimport FreeText from '../../free-text/index.native';\nimport {\n FocusedSelectId,\n HandleBlur,\n HandleFocus,\n useTemplateContext\n} from '../../../../template/app-review/template-context';\nimport {Theme} from '../../../../variables/theme.native';\nimport parseTemplateString from '../../../../util/parse-template-string';\nimport {BOX_STYLE} from '../../../../variables/shadow';\n\ntype StyleSheetType = {\n container: ViewStyle;\n spaced: ViewStyle;\n htmlText: TextStyle;\n selectInput: ViewStyle;\n selectText: TextStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType => ({\n container: {\n width: '100%',\n flexDirection: 'row',\n flexWrap: 'wrap',\n justifyContent: 'center',\n alignItems: 'center'\n },\n spaced: {\n paddingVertical: theme.spacing.tiny\n },\n htmlText: {\n color: theme.colors.black,\n fontWeight: theme.fontWeight.bold,\n lineHeight: 25\n },\n // eslint-disable-next-line @coorpacademy/coorpacademy/no-overwriting-spread\n selectInput: {\n padding: theme.spacing.tiny,\n borderRadius: theme.radius.regular,\n minWidth: 175,\n marginHorizontal: 12,\n paddingVertical: 16,\n ...BOX_STYLE,\n backgroundColor: theme.colors.white\n },\n selectText: {\n color: theme.colors.gray.medium,\n fontWeight: theme.fontWeight.bold,\n fontSize: theme.fontSize.regular,\n textAlign: 'center'\n }\n});\n\ntype TemplatePart = {\n type: 'string' | 'answerField';\n value: string;\n};\n\ntype ItemProps = {\n part: TemplatePart;\n choices: Array<TemplateTextChoice | TemplateListOfChoices>;\n index: number;\n isDisabled?: boolean;\n onInputChange: (item: TemplateTextChoice | TemplateListOfChoices, value: string) => void;\n focusedSelectId: FocusedSelectId;\n handleBlur: HandleBlur;\n handleFocus: HandleFocus;\n styles: StyleSheetType;\n};\n\nconst Item = (props: ItemProps) => {\n const {\n part,\n index,\n isDisabled = false,\n focusedSelectId,\n choices,\n onInputChange,\n handleBlur,\n handleFocus,\n styles\n } = props;\n\n const templateContext = useTemplateContext();\n const {theme, brandTheme, translations} = templateContext;\n\n const inputNames = choices.map(choice => choice.name);\n const id = `question-part-${index + 1}`;\n const isFocused = focusedSelectId === id;\n\n const coloredText = brandTheme && {\n color: brandTheme.colors?.primary\n };\n\n if (part.type === 'answerField' && inputNames.includes(part.value)) {\n const choiceIndex = choices.findIndex(choice => choice.name === part.value);\n const choice = choices[choiceIndex];\n const {value} = choice;\n\n if (!choice || !choice.type || !choice.name) {\n return null;\n }\n\n const disabledSuffix = isDisabled ? '-disabled' : '';\n const selectedSuffix = value ? '-selected' : '';\n\n const handleInputChange =\n (_item: TemplateTextChoice | TemplateListOfChoices) => (_value: string) =>\n onInputChange(_item, _value);\n\n if (choice.type === 'text') {\n return (\n <View style={styles.spaced} testID={id}>\n <FreeText\n key={id}\n isDisabled={isDisabled}\n onChange={handleInputChange(choice)}\n value={value}\n testID={`${id}-text${selectedSuffix}${disabledSuffix}`}\n questionType=\"template\"\n />\n </View>\n );\n }\n\n const selectInputStyle: TextStyle[] = [styles.selectInput];\n if (coloredText && value) {\n selectInputStyle.push(coloredText);\n }\n\n const selectTextStyle: TextStyle[] = [styles.selectText];\n if (coloredText && value) {\n selectTextStyle.push(coloredText);\n }\n\n if (choice.type === 'select') {\n return (\n <View style={styles.spaced} testID={id}>\n <Select\n isDisabled={isDisabled}\n questionType=\"template\"\n values={choice.items}\n value={value}\n placeholder={translations.selectAnAnswer}\n isFocused={isFocused}\n onBlur={handleBlur}\n onFocus={handleFocus(id)}\n onChange={handleInputChange(choice)}\n textStyle={selectTextStyle}\n style={selectInputStyle}\n analyticsID={`${id}-select${selectedSuffix}${disabledSuffix}`}\n testID={`${id}-select${selectedSuffix}${disabledSuffix}`}\n />\n </View>\n );\n }\n }\n\n return (\n <Html key={id} fontSize={theme.fontSize.regular} testID={id} style={styles.htmlText}>\n {trim(part.value || '')}\n </Html>\n );\n};\n\nexport type Props = {\n isDisabled?: boolean;\n template: string;\n choices: Array<TemplateTextChoice | TemplateListOfChoices>;\n onInputChange: (item: TemplateTextChoice | TemplateListOfChoices, value: string) => void;\n focusedSelectId: FocusedSelectId;\n handleBlur: HandleBlur;\n handleFocus: HandleFocus;\n};\n\nconst QuestionTemplate = (props: Props) => {\n const {\n template,\n onInputChange,\n choices,\n handleBlur,\n handleFocus,\n focusedSelectId,\n isDisabled = false\n } = props;\n\n const templateContext = useTemplateContext();\n const {theme} = templateContext;\n\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n if (!template || !styleSheet) {\n return null;\n }\n\n const parts: TemplatePart[] = parseTemplateString(template);\n\n return (\n <View style={styleSheet.container} testID=\"question-template\">\n {parts.map((part, id) => (\n <View key={`question-part-${id}`} style={{flexDirection: 'row'}}>\n <Item\n part={part}\n choices={choices}\n index={id}\n focusedSelectId={focusedSelectId}\n isDisabled={isDisabled}\n handleBlur={handleBlur}\n handleFocus={handleFocus}\n onInputChange={onInputChange}\n styles={styleSheet}\n />\n <Space type=\"micro\" />\n </View>\n ))}\n </View>\n );\n};\n\nexport default QuestionTemplate;\n"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;AAEA;;AACA;;AAOA;;AACA;;;;;;;;;;AAUA,MAAMA,gBAAgB,GAAIC,KAAD,KAAmC;EAC1DC,SAAS,EAAE;IACTC,KAAK,EAAE,MADE;IAETC,aAAa,EAAE,KAFN;IAGTC,QAAQ,EAAE,MAHD;IAITC,cAAc,EAAE,QAJP;IAKTC,UAAU,EAAE;EALH,CAD+C;EAQ1DC,MAAM,EAAE;IACNC,eAAe,EAAER,KAAK,CAACS,OAAN,CAAcC;EADzB,CARkD;EAW1DC,QAAQ,EAAE;IACRC,KAAK,EAAEZ,KAAK,CAACa,MAAN,CAAaC,KADZ;IAERC,UAAU,EAAEf,KAAK,CAACe,UAAN,CAAiBC,IAFrB;IAGRC,UAAU,EAAE;EAHJ,CAXgD;EAgB1D;EACAC,WAAW;IACTC,OAAO,EAAEnB,KAAK,CAACS,OAAN,CAAcC,IADd;IAETU,YAAY,EAAEpB,KAAK,CAACqB,MA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,gBAAgB,CAACC,KAAD,CAApC;;IACA2E,aAAa,CAACG,WAAD,CAAb;EACD,CAHD,EAGG,CAAC9E,KAAD,CAHH;;EAKA,IAAI,CAACyE,QAAD,IAAa,CAACC,UAAlB,EAA8B;IAC5B,OAAO,IAAP;EACD;;EAED,MAAMK,KAAqB,GAAG,IAAAC,4BAAA,EAAoBP,QAApB,CAA9B;EAEA,oBACE,6BAAC,iBAAD;IAAM,KAAK,EAAEC,UAAU,CAACzE,SAAxB;IAAmC,MAAM,EAAC;EAA1C,GACG8E,KAAK,CAAC9B,GAAN,CAAU,CAACd,IAAD,EAAOiB,EAAP,kBACT,6BAAC,iBAAD;IAAM,GAAG,EAAG,iBAAgBA,EAAG,EAA/B;IAAkC,KAAK,EAAE;MAACjD,aAAa,EAAE;IAAhB;EAAzC,gBACE,6BAAC,IAAD;IACE,IAAI,EAAEgC,IADR;IAEE,OAAO,EAAEI,OAFX;IAGE,KAAK,EAAEa,EAHT;IAIE,eAAe,EAAEd,eAJnB;IAKE,UAAU,EAAED,UALd;IAME,UAAU,EAAEI,UANd;IAOE,WAAW,EAAEC,WAPf;IAQE,aAAa,EAAEF,aARjB;IASE,MAAM,EAAEkC;EATV,EADF,eAYE,6BAAC,eAAD;IAAO,IAAI,EAAC;EAAZ,EAZF,CADD,CADH,CADF;AAoBD,CA/CD;;eAiDeF,gB"}
|
|
@@ -21,11 +21,11 @@ var _style = _interopRequireDefault(require("./style.css"));
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
24
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
25
|
|
|
26
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
27
|
|
|
28
|
-
function _extends() { _extends = Object.assign
|
|
28
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
29
29
|
|
|
30
30
|
const QCM = (props, legacyContext) => {
|
|
31
31
|
const {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":["QCM","props","legacyContext","answers","longestAnswer","maxBy","title","length","skin","GetSkinFromContext","primarySkinColor","getOr","answersViews","useMemo","map","answer","key","onClick","selected","ariaLabel","longAnswerClass","style","selectedAnswerClass","selectedAnswer","unselectedAnswer","classnames","innerHTML","boxShadow","getShadowBoxColorFromPrimary","backgroundColor","background","answerText","__html","wrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","arrayOf","shape","string","bool","func"],"sources":["../../../../src/molecule/questions/qcm/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\nimport getOr from 'lodash/fp/getOr';\nimport maxBy from 'lodash/fp/maxBy';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport {getShadowBoxColorFromPrimary} from '../../../util/get-shadow-box-color-from-primary';\nimport style from './style.css';\n\nconst QCM = (props, legacyContext) => {\n const {answers} = props;\n const longestAnswer = maxBy(({title}) => title.length, answers);\n const skin = GetSkinFromContext(legacyContext);\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n const answersViews = useMemo(\n () =>\n answers.map((answer, key) => {\n const {onClick, title, selected, 'aria-label': ariaLabel} = answer;\n const longAnswerClass = longestAnswer.title === title ? style.longestAnswer : style.answer;\n const selectedAnswerClass = selected ? style.selectedAnswer : style.unselectedAnswer;\n\n return (\n <div\n data-name=\"answer\"\n aria-label={ariaLabel || title}\n className={classnames(longAnswerClass, style.innerHTML, selectedAnswerClass)}\n onClick={onClick}\n style={{\n ...(selected && {\n boxShadow: `0 4px 16px ${getShadowBoxColorFromPrimary(primarySkinColor)}`\n })\n }}\n data-selected={selected}\n key={key}\n >\n <div\n data-name=\"answer-background\"\n style={{backgroundColor: selected ? primarySkinColor : '#F4F4F5' /* cm_grey_75 */}}\n className={style.background}\n />\n <span\n data-name=\"answer-label\"\n className={style.answerText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n );\n }),\n [answers, longestAnswer, primarySkinColor]\n );\n\n return (\n <div data-name=\"qcm\" className={style.wrapper}>\n {answersViews}\n </div>\n );\n};\n\nQCM.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nQCM.propTypes = {\n answers: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n selected: PropTypes.bool,\n onClick: PropTypes.func,\n 'aria-label': PropTypes.string\n })\n )\n};\n\nexport default QCM;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,GAAG,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EACpC,MAAM;IAACC;EAAD,IAAYF,KAAlB;EACA,MAAMG,aAAa,GAAG,IAAAC,cAAA,EAAM,CAAC;IAACC;EAAD,CAAD,KAAaA,KAAK,CAACC,MAAzB,EAAiCJ,OAAjC,CAAtB;EACA,MAAMK,IAAI,GAAG,IAAAC,4BAAA,EAAmBP,aAAnB,CAAb;EACA,MAAMQ,gBAAgB,GAAG,IAAAC,cAAA,EAAM,SAAN,EAAiB,gBAAjB,EAAmCH,IAAnC,CAAzB;EAEA,MAAMI,YAAY,GAAG,IAAAC,cAAA,EACnB,MACEV,OAAO,CAACW,GAAR,CAAY,CAACC,MAAD,EAASC,GAAT,KAAiB;IAC3B,MAAM;MAACC,OAAD;MAAUX,KAAV;MAAiBY,QAAjB;MAA2B,cAAcC;IAAzC,IAAsDJ,MAA5D;IACA,MAAMK,eAAe,GAAGhB,aAAa,CAACE,KAAd,KAAwBA,KAAxB,GAAgCe,cAAA,CAAMjB,aAAtC,GAAsDiB,cAAA,CAAMN,MAApF;IACA,MAAMO,mBAAmB,GAAGJ,QAAQ,GAAGG,cAAA,CAAME,cAAT,GAA0BF,cAAA,CAAMG,gBAApE;IAEA,oBACE;MACE,aAAU,QADZ;MAEE,cAAYL,SAAS,IAAIb,KAF3B;MAGE,SAAS,EAAE,IAAAmB,mBAAA,EAAWL,eAAX,EAA4BC,cAAA,CAAMK,SAAlC,EAA6CJ,mBAA7C,CAHb;MAIE,OAAO,EAAEL,OAJX;MAKE,KAAK,eACCC,QAAQ,IAAI;QACdS,SAAS,EAAG,cAAa,IAAAC,0DAAA,EAA6BlB,gBAA7B,CAA+C;MAD1D,CADb,CALP;MAUE,iBAAeQ,QAVjB;MAWE,GAAG,EAAEF;IAXP,gBAaE;MACE,aAAU,mBADZ;MAEE,KAAK,EAAE;QAACa,eAAe,EAAEX,QAAQ,GAAGR,gBAAH,GAAsB;QAAU;;MAA1D,CAFT;MAGE,SAAS,EAAEW,cAAA,CAAMS;IAHnB,EAbF,eAkBE;MACE,aAAU,cADZ;MAEE,SAAS,EAAET,cAAA,CAAMU,UAFnB,CAGE;MAHF;MAIE,uBAAuB,EAAE;QAACC,MAAM,EAAE1B;MAAT;IAJ3B,EAlBF,CADF;EA2BD,CAhCD,CAFiB,EAmCnB,CAACH,OAAD,EAAUC,aAAV,EAAyBM,gBAAzB,CAnCmB,CAArB;EAsCA,oBACE;IAAK,aAAU,KAAf;IAAqB,SAAS,EAAEW,cAAA,CAAMY;EAAtC,GACGrB,YADH,CADF;AAKD,CAjDD;;AAmDAZ,GAAG,CAACkC,YAAJ,GAAmB;EACjB1B,IAAI,EAAE2B,iBAAA,CAASC,iBAAT,CAA2B5B;AADhB,CAAnB;AAIAR,GAAG,CAACqC,SAAJ,2CAAgB;EACdlC,OAAO,EAAEmC,kBAAA,CAAUC,OAAV,CACPD,kBAAA,CAAUE,KAAV,CAAgB;IACdlC,KAAK,EAAEgC,kBAAA,CAAUG,MADH;IAEdvB,QAAQ,EAAEoB,kBAAA,CAAUI,IAFN;IAGdzB,OAAO,EAAEqB,kBAAA,CAAUK,IAHL;IAId,cAAcL,kBAAA,CAAUG;EAJV,CAAhB,CADO;AADK,CAAhB;eAWezC,G"}
|
|
@@ -23,9 +23,9 @@ var _getShadowBoxColorFromPrimary = require("../../../util/get-shadow-box-color-
|
|
|
23
23
|
|
|
24
24
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
25
25
|
|
|
26
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
26
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
27
|
|
|
28
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
28
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
29
|
|
|
30
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
31
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":["AnswersPropTypes","PropTypes","arrayOf","shape","onClick","func","order","number","selected","bool","title","string","help","EmptyView","style","emptySpan","propTypes","Choices","answers","answersViews","map","answer","key","classnames","invisibleAnswer","unselected","innerHTML","__html","choices","SelectedAnswerSections","backgroundColor","selectedAnswers","selectedAnswersViews","boxShadow","getShadowBoxColorFromPrimary","background","content","selectedAnswerText","length","emptyAnswers","QcmDrag","legacyContext","skin","GetSkinFromContext","primarySkinColor","wrapper","contextTypes","Provider","childContextTypes"],"sources":["../../../../src/molecule/questions/qcm-drag/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {pipe, filter, orderBy, getOr} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport {getShadowBoxColorFromPrimary} from '../../../util/get-shadow-box-color-from-primary';\nimport style from './style.css';\n\nconst AnswersPropTypes = PropTypes.arrayOf(\n PropTypes.shape({\n onClick: PropTypes.func,\n order: PropTypes.number,\n selected: PropTypes.bool,\n title: PropTypes.string,\n help: PropTypes.string\n })\n);\n\nconst EmptyView = ({help}) => <span className={style.emptySpan}>{help}</span>;\n\nEmptyView.propTypes = {\n help: PropTypes.string\n};\n\nconst Choices = ({answers}) => {\n const answersViews = answers.map((answer, key) => {\n const {onClick, title, selected} = answer;\n return (\n <div\n className={classnames(selected ? style.invisibleAnswer : style.unselected, style.innerHTML)}\n data-name=\"answer\"\n onClick={onClick}\n key={key}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n );\n });\n\n return <div className={style.choices}>{answersViews}</div>;\n};\n\nChoices.propTypes = {\n answers: AnswersPropTypes\n};\n\nconst SelectedAnswerSections = ({answers, help, backgroundColor}) => {\n const selectedAnswers = pipe(filter('selected'), orderBy('order', 'asc'))(answers);\n const selectedAnswersViews = selectedAnswers.map((answer, key) => {\n const {onClick, title} = answer;\n return (\n <div\n data-selected=\"true\"\n onClick={onClick}\n key={key}\n data-name=\"selectedAnswer\"\n className={style.selected}\n style={{\n boxShadow: `0px 4px 16px ${getShadowBoxColorFromPrimary(backgroundColor)}`\n }}\n >\n <div\n data-name=\"answerBackground\"\n style={{\n backgroundColor\n }}\n className={style.background}\n />\n <div className={style.content}>\n <span\n data-name=\"answerContent\"\n className={classnames(style.selectedAnswerText, style.innerHTML)}\n title={title}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n </div>\n );\n });\n\n if (selectedAnswersViews.length > 0) {\n return <div className={style.selectedAnswers}>{selectedAnswersViews}</div>;\n } else {\n return (\n <div className={style.emptyAnswers}>\n <EmptyView help={help} />\n </div>\n );\n }\n};\n\nSelectedAnswerSections.propTypes = {\n answers: AnswersPropTypes,\n help: EmptyView.propTypes.help,\n backgroundColor: PropTypes.string\n};\n\nconst QcmDrag = ({answers, help}, legacyContext) => {\n const skin = GetSkinFromContext(legacyContext);\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n return (\n <div className={style.wrapper}>\n <SelectedAnswerSections answers={answers} help={help} backgroundColor={primarySkinColor} />\n <div data-name=\"qcm-drag-answers\" className={style.answers}>\n <Choices answers={answers} />\n </div>\n </div>\n );\n};\n\nQcmDrag.propTypes = {\n answers: AnswersPropTypes,\n help: SelectedAnswerSections.propTypes.help\n};\n\nQcmDrag.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nexport default QcmDrag;\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,gBAAN,2CAAyBC,kBAAA,CAAUC,OAAV,CACvBD,kBAAA,CAAUE,KAAV,CAAgB;EACdC,OAAO,EAAEH,kBAAA,CAAUI,IADL;EAEdC,KAAK,EAAEL,kBAAA,CAAUM,MAFH;EAGdC,QAAQ,EAAEP,kBAAA,CAAUQ,IAHN;EAIdC,KAAK,EAAET,kBAAA,CAAUU,MAJH;EAKdC,IAAI,EA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,IAAI,GAAG,IAAAC,4BAAA,EAAmBF,aAAnB,CAAb;EACA,MAAMG,gBAAgB,GAAG,qBAAM,SAAN,EAAiB,gBAAjB,EAAmCF,IAAnC,CAAzB;EAEA,oBACE;IAAK,SAAS,EAAE5B,cAAA,CAAM+B;EAAtB,gBACE,6BAAC,sBAAD;IAAwB,OAAO,EAAE3B,OAAjC;IAA0C,IAAI,EAAEN,IAAhD;IAAsD,eAAe,EAAEgC;EAAvE,EADF,eAEE;IAAK,aAAU,kBAAf;IAAkC,SAAS,EAAE9B,cAAA,CAAMI;EAAnD,gBACE,6BAAC,OAAD;IAAS,OAAO,EAAEA;EAAlB,EADF,CAFF,CADF;AAQD,CAZD;;AAcAsB,OAAO,CAACxB,SAAR,2CAAoB;EAClBE,OAAO,EAAElB,gBADS;EAElBY,IAAI,EAAEiB,sBAAsB,CAACb,SAAvB,CAAiCJ;AAFrB,CAApB;AAKA4B,OAAO,CAACM,YAAR,GAAuB;EACrBJ,IAAI,EAAEK,iBAAA,CAASC,iBAAT,CAA2BN;AADZ,CAAvB;eAIeF,O"}
|
|
@@ -17,13 +17,13 @@ var _getShadowBoxColorFromPrimary = require("../../../util/get-shadow-box-color-
|
|
|
17
17
|
|
|
18
18
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
19
19
|
|
|
20
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
20
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
21
|
|
|
22
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
22
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
26
|
-
function _extends() { _extends = Object.assign
|
|
26
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
27
27
|
|
|
28
28
|
const QCMImage = (props, legacyContext) => {
|
|
29
29
|
const {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":["QCMImage","props","legacyContext","answers","skin","GetSkinFromContext","primarySkinColor","answersViews","map","answer","key","onClick","title","selected","image","ariaLabel","boxShadow","getShadowBoxColorFromPrimary","style","backgroundColor","background","content","imageWrapper","backgroundImage","titleWrapper","classnames","innerHTML","__html","wrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","arrayOf","shape","string","bool","func"],"sources":["../../../../src/molecule/questions/qcm-graphic/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport {getShadowBoxColorFromPrimary} from '../../../util/get-shadow-box-color-from-primary';\nimport style from './style.css';\n\nconst QCMImage = (props, legacyContext) => {\n const {answers} = props;\n const skin = GetSkinFromContext(legacyContext);\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n const answersViews = answers.map((answer, key) => {\n const {onClick, title, selected, image, ariaLabel} = answer;\n\n return (\n <div\n onClick={onClick}\n data-selected={selected}\n data-name=\"answerGraphic\"\n style={{\n ...(selected && {\n boxShadow: `0 4px 16px ${getShadowBoxColorFromPrimary(primarySkinColor)}`\n })\n }}\n className={selected ? style.selected : style.answer}\n key={key}\n >\n <div\n data-name=\"answerBackground\"\n style={{\n backgroundColor: selected ? primarySkinColor : '#F4F4F5'\n }}\n className={style.background}\n />\n <div data-name=\"answerContent\" className={style.content}>\n <div\n className={style.imageWrapper}\n data-name=\"answerImage\"\n aria-label={ariaLabel || title}\n style={{\n backgroundImage: `url(${image})`\n }}\n />\n <div data-name=\"answerText\" className={style.titleWrapper}>\n <div\n title={title}\n className={classnames(style.title, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n </div>\n </div>\n );\n });\n\n return (\n <div data-name=\"qcm-graphic-wrapper\" className={style.wrapper}>\n {answersViews}\n </div>\n );\n};\n\nQCMImage.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nQCMImage.propTypes = {\n answers: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n selected: PropTypes.bool,\n onClick: PropTypes.func,\n image: PropTypes.string,\n ariaLabel: PropTyp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,CAAMM;IAA7C,gBACE;MACE,KAAK,EAAEZ,KADT;MAEE,SAAS,EAAE,IAAAa,mBAAA,EAAWP,cAAA,CAAMN,KAAjB,EAAwBM,cAAA,CAAMQ,SAA9B,CAFb,CAGE;MAHF;MAIE,uBAAuB,EAAE;QAACC,MAAM,EAAEf;MAAT;IAJ3B,EADF,CATF,CAnBF,CADF;EAwCD,CA3CoB,CAArB;EA6CA,oBACE;IAAK,aAAU,qBAAf;IAAqC,SAAS,EAAEM,cAAA,CAAMU;EAAtD,GACGrB,YADH,CADF;AAKD,CAvDD;;AAyDAP,QAAQ,CAAC6B,YAAT,GAAwB;EACtBzB,IAAI,EAAE0B,iBAAA,CAASC,iBAAT,CAA2B3B;AADX,CAAxB;AAIAJ,QAAQ,CAACgC,SAAT,2CAAqB;EACnB7B,OAAO,EAAE8B,kBAAA,CAAUC,OAAV,CACPD,kBAAA,CAAUE,KAAV,CAAgB;IACdvB,KAAK,EAAEqB,kBAAA,CAAUG,MADH;IAEdvB,QAAQ,EAAEoB,kBAAA,CAAUI,IAFN;IAGd1B,OAAO,EAAEsB,kBAAA,CAAUK,IAHL;IAIdxB,KAAK,EAAEmB,kBAAA,CAAUG,MAJH;IAKdrB,SAAS,EAAEkB,kBAAA,CAAUG;EALP,CAAhB,CADO;AADU,CAArB;eAYepC,Q"}
|
|
@@ -31,7 +31,7 @@ declare namespace QuestionRange {
|
|
|
31
31
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
32
32
|
onChangeEnd: PropTypes.Requireable<(...args: any[]) => any>;
|
|
33
33
|
multi: PropTypes.Requireable<boolean>;
|
|
34
|
-
value: PropTypes.Requireable<number | (number | null | undefined)[]
|
|
34
|
+
value: PropTypes.Requireable<NonNullable<number | (number | null | undefined)[] | null | undefined>>;
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
import PropTypes from "prop-types";
|
|
@@ -17,13 +17,15 @@ var _range = _interopRequireDefault(require("../../../atom/range"));
|
|
|
17
17
|
|
|
18
18
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
const _excluded = ["title", "minLabel", "maxLabel"];
|
|
21
21
|
|
|
22
|
-
function
|
|
22
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
+
|
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
25
|
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
27
|
|
|
26
|
-
function _extends() { _extends = Object.assign
|
|
28
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
27
29
|
|
|
28
30
|
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; }
|
|
29
31
|
|
|
@@ -33,7 +35,7 @@ const QuestionRange = (props, legacyContext) => {
|
|
|
33
35
|
minLabel,
|
|
34
36
|
maxLabel
|
|
35
37
|
} = props,
|
|
36
|
-
rangeProps = _objectWithoutPropertiesLoose(props,
|
|
38
|
+
rangeProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
37
39
|
|
|
38
40
|
const skin = (0, _provider.GetSkinFromContext)(legacyContext);
|
|
39
41
|
const defaultColor = (0, _getOr2.default)('#00B0FF', 'common.primary', skin);
|
|
@@ -69,7 +71,7 @@ const QuestionRange = (props, legacyContext) => {
|
|
|
69
71
|
QuestionRange.contextTypes = {
|
|
70
72
|
skin: _provider.default.childContextTypes.skin
|
|
71
73
|
};
|
|
72
|
-
QuestionRange.propTypes = process.env.NODE_ENV !== "production" ? _extends(
|
|
74
|
+
QuestionRange.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, _range.default.propTypes, {
|
|
73
75
|
title: _propTypes.default.string,
|
|
74
76
|
minLabel: _propTypes.default.string,
|
|
75
77
|
maxLabel: _propTypes.default.string
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":["QuestionRange","props","legacyContext","title","minLabel","maxLabel","rangeProps","skin","GetSkinFromContext","defaultColor","titleStyle","color","style","wrapper","classnames","innerHTML","__html","labelWrapper","label","contextTypes","Provider","childContextTypes","propTypes","Range","PropTypes","string"],"sources":["../../../../src/molecule/questions/question-range/index.js"],"sourcesContent":["import React from 'react';\nimport {getOr} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport Range from '../../../atom/range';\nimport style from './style.css';\n\nconst QuestionRange = (props, legacyContext) => {\n const {title, minLabel, maxLabel, ...rangeProps} = props;\n\n const skin = GetSkinFromContext(legacyContext);\n const defaultColor = getOr('#00B0FF', 'common.primary', skin);\n\n const titleStyle = {\n color: defaultColor\n };\n\n return (\n <div className={style.wrapper}>\n <span\n style={titleStyle}\n className={classnames(style.title, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n <Range {...rangeProps} />\n <div className={style.labelWrapper}>\n <span\n className={classnames(style.label, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: minLabel}}\n />\n <span\n className={classnames(style.label, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: maxLabel}}\n />\n </div>\n </div>\n );\n};\n\nQuestionRange.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nQuestionRange.propTypes = {\n ...Range.propTypes,\n title: PropTypes.string,\n minLabel: PropTypes.string,\n maxLabel: PropTypes.string\n};\n\nexport default QuestionRange;\n"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEA,MAAMA,aAAa,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EAC9C,MAAM;IAACC,KAAD;IAAQC,QAAR;IAAkBC;EAAlB,IAA6CJ,KAAnD;EAAA,MAAqCK,UAArC,iCAAmDL,KAAnD;;EAEA,MAAMM,IAAI,GAAG,IAAAC,4BAAA,EAAmBN,aAAnB,CAAb;EACA,MAAMO,YAAY,GAAG,qBAAM,SAAN,EAAiB,gBAAjB,EAAmCF,IAAnC,CAArB;EAEA,MAAMG,UAAU,GAAG;IACjBC,KAAK,EAAEF;EADU,CAAnB;EAIA,oBACE;IAAK,SAAS,EAAEG,cAAA,CAAMC;EAAtB,gBACE;IACE,KAAK,EAAEH,UADT;IAEE,SAAS,EAAE,IAAAI,mBAAA,EAAWF,cAAA,CAAMT,KAAjB,EAAwBS,cAAA,CAAMG,SAA9B,CAFb,CAGE;IAHF;IAIE,uBAAuB,EAAE;MAACC,MAAM,EAAEb;IAAT;EAJ3B,EADF,eAOE,6BAAC,cAAD,EAAWG,UAAX,CAPF,eAQE;IAAK,SAAS,EAAEM,cAAA,CAAMK;EAAtB,gBACE;IACE,SAAS,EAAE,IAAAH,mBAAA,EAAWF,cAAA,CAAMM,KAAjB,EAAwBN,cAAA,CAAMG,SAA9B,CADb,CAEE;IAFF;IAGE,uBAAuB,EAAE;MAACC,MAAM,EAAEZ;IAAT;EAH3B,EADF,eAME;IACE,SAAS,EAAE,IAAAU,mBAAA,EAAWF,cAAA,CAAMM,KAAjB,EAAwBN,cAAA,CAAMG,SAA9B,CADb,CAEE;IAFF;IAGE,uBAAuB,EAAE;MAACC,MAAM,EAAEX;IAAT;EAH3B,EANF,CARF,CADF;AAuBD,CAjCD;;AAmCAL,aAAa,CAACmB,YAAd,GAA6B;EAC3BZ,IAAI,EAAEa,iBAAA,CAASC,iBAAT,CAA2Bd;AADN,CAA7B;AAIAP,aAAa,CAACsB,SAAd,wDACKC,cAAA,CAAMD,SADX;EAEEnB,KAAK,EAAEqB,kBAAA,CAAUC,MAFnB;EAGErB,QAAQ,EAAEoB,kBAAA,CAAUC,MAHtB;EAIEpB,QAAQ,EAAEmB,kBAAA,CAAUC;AAJtB;eAOezB,a"}
|
|
@@ -6,16 +6,25 @@ declare function Template({ template, answers }: {
|
|
|
6
6
|
declare namespace Template {
|
|
7
7
|
namespace propTypes {
|
|
8
8
|
const template: PropTypes.Requireable<string>;
|
|
9
|
-
const answers: PropTypes.Requireable<(PropTypes.
|
|
9
|
+
const answers: PropTypes.Requireable<((PropTypes.InferPropsInner<Pick<{
|
|
10
10
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
11
11
|
options: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
12
12
|
name: PropTypes.Validator<string>;
|
|
13
|
-
value: PropTypes.Requireable<string | number
|
|
13
|
+
value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
14
14
|
selected: PropTypes.Requireable<boolean>;
|
|
15
15
|
validOption: PropTypes.Requireable<boolean>;
|
|
16
16
|
}> | null | undefined)[]>;
|
|
17
17
|
theme: PropTypes.Requireable<string>;
|
|
18
|
-
}
|
|
18
|
+
}, never>> & Partial<PropTypes.InferPropsInner<Pick<{
|
|
19
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
|
+
options: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
21
|
+
name: PropTypes.Validator<string>;
|
|
22
|
+
value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
23
|
+
selected: PropTypes.Requireable<boolean>;
|
|
24
|
+
validOption: PropTypes.Requireable<boolean>;
|
|
25
|
+
}> | null | undefined)[]>;
|
|
26
|
+
theme: PropTypes.Requireable<string>;
|
|
27
|
+
}, "onChange" | "theme" | "options">>>) | null | undefined)[]>;
|
|
19
28
|
}
|
|
20
29
|
}
|
|
21
30
|
import PropTypes from "prop-types";
|
|
@@ -19,9 +19,11 @@ var _freeText = _interopRequireDefault(require("../free-text"));
|
|
|
19
19
|
|
|
20
20
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
21
21
|
|
|
22
|
+
const _excluded = ["type"];
|
|
23
|
+
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
25
|
|
|
24
|
-
function _extends() { _extends = Object.assign
|
|
26
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
25
27
|
|
|
26
28
|
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; }
|
|
27
29
|
|
|
@@ -56,7 +58,7 @@ const Template = ({
|
|
|
56
58
|
const {
|
|
57
59
|
type: fieldType
|
|
58
60
|
} = field,
|
|
59
|
-
fieldProps = _objectWithoutPropertiesLoose(field,
|
|
61
|
+
fieldProps = _objectWithoutPropertiesLoose(field, _excluded);
|
|
60
62
|
|
|
61
63
|
const fieldView = fieldType === 'text' ? /*#__PURE__*/_react.default.createElement(_freeText.default, _extends({}, fieldProps, {
|
|
62
64
|
className: _style.default.text
|
|
@@ -76,7 +78,7 @@ const Template = ({
|
|
|
76
78
|
}, templateCompose);
|
|
77
79
|
};
|
|
78
80
|
|
|
79
|
-
const TextPropTypes = process.env.NODE_ENV !== "production" ? _extends(
|
|
81
|
+
const TextPropTypes = process.env.NODE_ENV !== "production" ? _extends({}, _dropDown.default.propTypes, {
|
|
80
82
|
type: _propTypes.default.string
|
|
81
83
|
}) : {};
|
|
82
84
|
Template.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":["Template","template","answers","totalTemplate","parseTemplateString","templateCompose","convert","cap","part","key","type","style","textPart","__html","value","field","name","fieldType","fieldProps","fieldView","text","answerType","wrapper","TextPropTypes","DropDown","propTypes","PropTypes","string","arrayOf","oneOfType","shape"],"sources":["../../../../src/molecule/questions/template/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map, find} from 'lodash/fp';\nimport parseTemplateString from '../../../util/parse-template-string';\nimport DropDown from '../drop-down';\nimport FreeText from '../free-text';\nimport style from './style.css';\n\nconst Template = ({template, answers}) => {\n const totalTemplate = parseTemplateString(template);\n const templateCompose = map.convert({cap: false})((part, key) => {\n const type = part.type;\n if (type === 'string') {\n return (\n <span\n key={key}\n className={style.textPart}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: part.value}}\n />\n );\n }\n if (type === 'answerField') {\n const field = find({name: part.value}, answers);\n if (!field) return null;\n const {type: fieldType, ...fieldProps} = field;\n const fieldView =\n fieldType === 'text' ? (\n <FreeText {...fieldProps} className={style.text} />\n ) : (\n <DropDown {...fieldProps} theme=\"player\" />\n );\n\n return (\n <div className={style.answerType} key={part.value}>\n {fieldView}\n </div>\n );\n }\n }, totalTemplate);\n\n return (\n <div data-name=\"template-wrapper\" className={style.wrapper}>\n {templateCompose}\n </div>\n );\n};\n\nconst TextPropTypes = {\n ...DropDown.propTypes,\n type: PropTypes.string\n};\n\nTemplate.propTypes = {\n template: PropTypes.string,\n answers: PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.shape(DropDown.propTypes), PropTypes.shape(TextPropTypes)])\n )\n};\n\nexport default Template;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,QAAQ,GAAG,CAAC;EAACC,QAAD;EAAWC;AAAX,CAAD,KAAyB;EACxC,MAAMC,aAAa,GAAG,IAAAC,4BAAA,EAAoBH,QAApB,CAAtB;;EACA,MAAMI,eAAe,GAAG,cAAIC,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EAA0B,CAACC,IAAD,EAAOC,GAAP,KAAe;IAC/D,MAAMC,IAAI,GAAGF,IAAI,CAACE,IAAlB;;IACA,IAAIA,IAAI,KAAK,QAAb,EAAuB;MACrB,oBACE;QACE,GAAG,EAAED,GADP;QAEE,SAAS,EAAEE,cAAA,CAAMC,QAFnB,CAGE;QAHF;QAIE,uBAAuB,EAAE;UAACC,MAAM,EAAEL,IAAI,CAACM;QAAd;MAJ3B,EADF;IAQD;;IACD,IAAIJ,IAAI,KAAK,aAAb,EAA4B;MAC1B,MAAMK,KAAK,GAAG,oBAAK;QAACC,IAAI,EAAER,IAAI,CAACM;MAAZ,CAAL,EAAyBZ,OAAzB,CAAd;MACA,IAAI,CAACa,KAAL,EAAY,OAAO,IAAP;;MACZ,MAAM;QAACL,IAAI,EAAEO;MAAP,IAAmCF,KAAzC;MAAA,MAA2BG,UAA3B,iCAAyCH,KAAzC;;MACA,MAAMI,SAAS,GACbF,SAAS,KAAK,MAAd,gBACE,6BAAC,iBAAD,eAAcC,UAAd;QAA0B,SAAS,EAAEP,cAAA,CAAMS;MAA3C,GADF,gBAGE,6BAAC,iBAAD,eAAcF,UAAd;QAA0B,KAAK,EAAC;MAAhC,GAJJ;MAOA,oBACE;QAAK,SAAS,EAAEP,cAAA,CAAMU,UAAtB;QAAkC,GAAG,EAAEb,IAAI,CAACM;MAA5C,GACGK,SADH,CADF;IAKD;EACF,CA7BuB,EA6BrBhB,aA7BqB,CAAxB;;EA+BA,oBACE;IAAK,aAAU,kBAAf;IAAkC,SAAS,EAAEQ,cAAA,CAAMW;EAAnD,GACGjB,eADH,CADF;AAKD,CAtCD;;AAwCA,MAAMkB,aAAN,wDACKC,iBAAA,CAASC,SADd;EAEEf,IAAI,EAAEgB,kBAAA,CAAUC;AAFlB;AAKA3B,QAAQ,CAACyB,SAAT,2CAAqB;EACnBxB,QAAQ,EAAEyB,kBAAA,CAAUC,MADD;EAEnBzB,OAAO,EAAEwB,kBAAA,CAAUE,OAAV,CACPF,kBAAA,CAAUG,SAAV,CAAoB,CAACH,kBAAA,CAAUI,KAAV,CAAgBN,iBAAA,CAASC,SAAzB,CAAD,EAAsCC,kBAAA,CAAUI,KAAV,CAAgBP,aAAhB,CAAtC,CAApB,CADO;AAFU,CAArB;eAOevB,Q"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/molecule/questions/types.ts"],"sourcesContent":["import {ChoiceItem} from '../../atom/select-modal/index.native';\n\ntype Url = string;\n\ntype VideoMimeType =\n | 'application/kontiki'\n | 'application/jwplayer'\n | 'application/youtube'\n | 'application/omniPlayer'\n | 'application/vimeo';\n\ntype ResourceMimeType =\n | 'video/mp4'\n | 'audio/acc'\n | 'image/jpeg'\n | 'image/png'\n | 'application/pdf'\n | VideoMimeType;\n\nexport type Source = {\n _id?: string;\n mimeType?: ResourceMimeType;\n url: Url;\n videoId?: string;\n};\n\nexport type MediaType = 'img' | 'audio' | 'video' | 'pdf';\n\nexport type Media = {\n type?: MediaType;\n description?: string;\n mimeType?: ResourceMimeType;\n _id?: string;\n mediaUrl?: Url;\n url?: Url;\n subtitles?: Array<string>;\n posters?: Array<Url>;\n src?: Array<Source>;\n poster?: string;\n videoId?: string;\n onClick?: () => void;\n onPlay?: () => void;\n onPause?: () => void;\n onResume?: () => void;\n onEnded?: () => void;\n};\n\nexport type QuestionType = 'qcm' | 'qcmGraphic' | 'slider' | 'qcmDrag' | 'basic' | 'template';\n\ntype ChoiceBase = {\n _id: string;\n value?: string;\n name?: string;\n label?: string;\n};\n\nexport type SelectableChoice = {\n _id: string;\n label: string;\n selected: boolean;\n onPress: (value?: string) => void;\n media?: Media;\n};\n\nexport type TemplateTextChoice = {\n type: 'text';\n _id: string;\n name: string;\n value: string;\n label: string;\n selected: boolean;\n};\n\nexport type TemplateListOfChoices = {\n type: 'select';\n _id: string;\n name: string;\n value: string;\n label: string;\n items: Array<ChoiceItem>;\n};\n\nexport type Choice = ChoiceBase | SelectableChoice | TemplateListOfChoices | TemplateTextChoice;\n"],"mappings":""}
|