@coorpacademy/components 10.27.5-alpha.31 → 10.27.5-alpha.89
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/review-presentation/style.css +2 -3
- 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.d.ts.map +1 -1
- package/es/molecule/cm-popin/index.js +1 -1
- package/es/molecule/cm-popin/index.js.map +1 -1
- package/es/molecule/cm-popin/style.css +9 -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.d.ts.map +1 -1
- package/es/molecule/review-correction-popin/index.js +16 -8
- 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-correction-popin/style.css +2 -2
- 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/index.native.d.ts +5 -0
- package/es/molecule/skill-card/index.native.d.ts.map +1 -0
- package/es/molecule/skill-card/index.native.js +82 -0
- package/es/molecule/skill-card/index.native.js.map +1 -0
- package/es/molecule/skill-card/prop-types.d.ts +14 -3
- package/es/molecule/skill-card/prop-types.d.ts.map +1 -1
- package/es/molecule/skill-card/prop-types.js +2 -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 +3 -3
- 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-no-skills/index.d.ts +11 -0
- package/es/organism/review-no-skills/index.d.ts.map +1 -0
- package/es/organism/review-no-skills/index.js +25 -0
- package/es/organism/review-no-skills/index.js.map +1 -0
- package/es/organism/review-no-skills/index.native.d.ts +5 -0
- package/es/organism/review-no-skills/index.native.d.ts.map +1 -0
- package/es/organism/review-no-skills/index.native.js +59 -0
- package/es/organism/review-no-skills/index.native.js.map +1 -0
- package/es/organism/review-no-skills/prop-types.d.ts +13 -0
- package/es/organism/review-no-skills/prop-types.d.ts.map +1 -0
- package/es/organism/review-no-skills/prop-types.js +8 -0
- package/es/organism/review-no-skills/prop-types.js.map +1 -0
- package/es/organism/review-no-skills/style.css +73 -0
- package/es/organism/review-skills/index.d.ts +5 -3
- package/es/organism/review-skills/index.d.ts.map +1 -1
- package/es/organism/review-skills/index.js +3 -60
- package/es/organism/review-skills/index.js.map +1 -1
- package/es/organism/review-skills/index.native.d.ts +5 -0
- package/es/organism/review-skills/index.native.d.ts.map +1 -0
- package/es/organism/review-skills/index.native.js +46 -0
- package/es/organism/review-skills/index.native.js.map +1 -0
- package/es/organism/review-skills/prop-types.d.ts +7 -28
- package/es/organism/review-skills/prop-types.d.ts.map +1 -1
- package/es/organism/review-skills/prop-types.js +4 -16
- package/es/organism/review-skills/prop-types.js.map +1 -1
- package/es/organism/review-skills/style.css +3 -106
- 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-slide/style.css +1 -0
- 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 +30 -29
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/index.js +1 -5
- 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 +3 -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/player/style.css +2 -2
- package/es/template/app-review/prop-types.d.ts +31 -31
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- 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.d.ts +6 -2
- package/es/template/app-review/skills/index.d.ts.map +1 -1
- package/es/template/app-review/skills/index.js +46 -2
- package/es/template/app-review/skills/index.js.map +1 -1
- package/es/template/app-review/skills/index.native.d.ts +4 -3
- package/es/template/app-review/skills/index.native.d.ts.map +1 -1
- package/es/template/app-review/skills/index.native.js +26 -176
- package/es/template/app-review/skills/index.native.js.map +1 -1
- package/es/template/app-review/skills/prop-types.d.ts +14 -38
- package/es/template/app-review/skills/prop-types.d.ts.map +1 -1
- package/es/template/app-review/skills/prop-types.js +10 -13
- package/es/template/app-review/skills/prop-types.js.map +1 -1
- package/es/template/app-review/skills/style.css +49 -0
- 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.d.ts +7 -7
- package/es/template/review-dashboard-skills/index.js +1 -1
- package/es/template/review-dashboard-skills/index.js.map +1 -1
- package/es/template/review-dashboard-skills/style.css +1 -2
- 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/review-presentation/style.css +2 -3
- 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.d.ts.map +1 -1
- package/lib/molecule/cm-popin/index.js +1 -1
- package/lib/molecule/cm-popin/index.js.map +1 -1
- package/lib/molecule/cm-popin/style.css +9 -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.d.ts.map +1 -1
- package/lib/molecule/review-correction-popin/index.js +16 -8
- 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-correction-popin/style.css +2 -2
- 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/index.native.d.ts +5 -0
- package/lib/molecule/skill-card/index.native.d.ts.map +1 -0
- package/lib/molecule/skill-card/index.native.js +95 -0
- package/lib/molecule/skill-card/index.native.js.map +1 -0
- package/lib/molecule/skill-card/prop-types.d.ts +14 -3
- package/lib/molecule/skill-card/prop-types.d.ts.map +1 -1
- package/lib/molecule/skill-card/prop-types.js +2 -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 +5 -5
- 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-no-skills/index.d.ts +11 -0
- package/lib/organism/review-no-skills/index.d.ts.map +1 -0
- package/lib/organism/review-no-skills/index.js +36 -0
- package/lib/organism/review-no-skills/index.js.map +1 -0
- package/lib/organism/review-no-skills/index.native.d.ts +5 -0
- package/lib/organism/review-no-skills/index.native.d.ts.map +1 -0
- package/lib/organism/review-no-skills/index.native.js +72 -0
- package/lib/organism/review-no-skills/index.native.js.map +1 -0
- package/lib/organism/review-no-skills/prop-types.d.ts +13 -0
- package/lib/organism/review-no-skills/prop-types.d.ts.map +1 -0
- package/lib/organism/review-no-skills/prop-types.js +17 -0
- package/lib/organism/review-no-skills/prop-types.js.map +1 -0
- package/lib/organism/review-no-skills/style.css +73 -0
- package/lib/organism/review-skills/index.d.ts +5 -3
- package/lib/organism/review-skills/index.d.ts.map +1 -1
- package/lib/organism/review-skills/index.js +3 -67
- package/lib/organism/review-skills/index.js.map +1 -1
- package/lib/organism/review-skills/index.native.d.ts +5 -0
- package/lib/organism/review-skills/index.native.d.ts.map +1 -0
- package/lib/organism/review-skills/index.native.js +57 -0
- package/lib/organism/review-skills/index.native.js.map +1 -0
- package/lib/organism/review-skills/prop-types.d.ts +7 -28
- package/lib/organism/review-skills/prop-types.d.ts.map +1 -1
- package/lib/organism/review-skills/prop-types.js +3 -19
- package/lib/organism/review-skills/prop-types.js.map +1 -1
- package/lib/organism/review-skills/style.css +3 -106
- 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-slide/style.css +1 -0
- 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 +30 -29
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/index.js +1 -5
- 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 +6 -3
- 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/player/style.css +2 -2
- package/lib/template/app-review/prop-types.d.ts +31 -31
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- 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.d.ts +6 -2
- package/lib/template/app-review/skills/index.d.ts.map +1 -1
- package/lib/template/app-review/skills/index.js +51 -1
- package/lib/template/app-review/skills/index.js.map +1 -1
- package/lib/template/app-review/skills/index.native.d.ts +4 -3
- package/lib/template/app-review/skills/index.native.d.ts.map +1 -1
- package/lib/template/app-review/skills/index.native.js +30 -177
- package/lib/template/app-review/skills/index.native.js.map +1 -1
- package/lib/template/app-review/skills/prop-types.d.ts +14 -38
- package/lib/template/app-review/skills/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/skills/prop-types.js +12 -17
- package/lib/template/app-review/skills/prop-types.js.map +1 -1
- package/lib/template/app-review/skills/style.css +49 -0
- 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.d.ts +7 -7
- package/lib/template/review-dashboard-skills/index.js +3 -3
- package/lib/template/review-dashboard-skills/index.js.map +1 -1
- package/lib/template/review-dashboard-skills/style.css +1 -2
- 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/locales/.mtslconfig.json +1 -0
- package/package.json +4 -4
- package/es/template/app-review/skills/stories.d.ts +0 -1
- package/es/template/app-review/skills/stories.d.ts.map +0 -1
- package/es/template/app-review/skills/stories.js +0 -15
- package/es/template/app-review/skills/stories.js.map +0 -1
- package/lib/template/app-review/skills/stories.d.ts +0 -1
- package/lib/template/app-review/skills/stories.d.ts.map +0 -1
- package/lib/template/app-review/skills/stories.js +0 -16
- package/lib/template/app-review/skills/stories.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","Provider","style","ProductCard","props","context","title","subtitle","price","currency","checkImage","translate","descriptionItemTranslationKeys","priceTemplate","priceValue","items","map","itemDescription","index","productDescriptionItem","productCheckbox","productDescriptionText","product","productHeader","productHeaderTitle","productHeaderSubtitle","productBody","productSeparation","productPrice","cancelText","contextTypes","childContextTypes","propTypes","string","isRequired"],"sources":["../../../src/molecule/product-card/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {template} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport style from './style.css';\n\nconst ProductCard = (props, context) => {\n const {title, subtitle, price, currency, checkImage} = props;\n\n const {translate} = context;\n\n const descriptionItemTranslationKeys = [\n translate('product_desc_culture'),\n translate('product_desc_partnership'),\n translate('product_desc_battle'),\n translate('product_desc_coach'),\n translate('product_desc_forum'),\n translate('product_desc_certificates')\n ];\n\n const priceTemplate = translate('subscription_price');\n const priceValue = template(priceTemplate)({price, currency});\n\n const items = descriptionItemTranslationKeys.map((itemDescription, index) => {\n return (\n <div className={style.productDescriptionItem} key={index}>\n <img className={style.productCheckbox} src={checkImage} />\n <div className={style.productDescriptionText}>{itemDescription}</div>\n </div>\n );\n });\n\n return (\n <div className={style.product}>\n <div className={style.productHeader}>\n <div className={style.productHeaderTitle}>{title}</div>\n <div className={style.productHeaderSubtitle}>{subtitle}</div>\n </div>\n <div className={style.productBody}>\n <div className=\"product__description\">{items}</div>\n <hr className={style.productSeparation} />\n <div className={style.productPrice}>\n <div className={style.priceValue}>{priceValue}</div>\n <div className={style.cancelText}>{translate('product_cancel')}</div>\n </div>\n </div>\n </div>\n );\n};\n\nProductCard.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nProductCard.propTypes = {\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string.isRequired,\n currency: PropTypes.string.isRequired,\n price: PropTypes.string.isRequired,\n checkImage: PropTypes.string.isRequired\n};\n\nexport default ProductCard;\n"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,WAAW,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACtC,MAAM;IAACC,KAAD;IAAQC,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AAEzB,KAAK,CAAC0B;EAAtB,gBACE;IAAK,SAAS,EAAE1B,KAAK,CAACY;EAAtB,GAAmCA,UAAnC,CADF,eAEE;IAAK,SAAS,EAAEZ,KAAK,CAAC2B;EAAtB,GAAmClB,SAAS,CAAC,gBAAD,CAA5C,CAFF,CAHF,CALF,CADF;AAgBD,CA1CD;;AA4CAR,WAAW,CAAC2B,YAAZ,GAA2B;EACzBnB,SAAS,EAAEV,QAAQ,CAAC8B,iBAAT,CAA2BpB;AADb,CAA3B;AAIAR,WAAW,CAAC6B,SAAZ,2CAAwB;EACtB1B,KAAK,EAAEN,SAAS,CAACiC,MAAV,CAAiBC,UADF;EAEtB3B,QAAQ,EAAEP,SAAS,CAACiC,MAAV,CAAiBC,UAFL;EAGtBzB,QAAQ,EAAET,SAAS,CAACiC,MAAV,CAAiBC,UAHL;EAItB1B,KAAK,EAAER,SAAS,CAACiC,MAAV,CAAiBC,UAJF;EAKtBxB,UAAU,EAAEV,SAAS,CAACiC,MAAV,CAAiBC;AALP,CAAxB;AAQA,eAAe/B,WAAf"}
|
|
@@ -8,7 +8,7 @@ declare namespace ProgressBar {
|
|
|
8
8
|
const desc: PropTypes.Requireable<string>;
|
|
9
9
|
const steps: PropTypes.Requireable<number>;
|
|
10
10
|
const style: PropTypes.Requireable<{
|
|
11
|
-
[x: string]: string | number | null | undefined;
|
|
11
|
+
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
12
12
|
}>;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _times from "lodash/fp/times";
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
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); }
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
@@ -29,7 +29,7 @@ const ProgressBar = props => {
|
|
|
29
29
|
className: classnames(style.background, className)
|
|
30
30
|
}, /*#__PURE__*/React.createElement("div", {
|
|
31
31
|
className: style.progress,
|
|
32
|
-
style: _extends(
|
|
32
|
+
style: _extends({}, propsStyle, {
|
|
33
33
|
width: `${ratio * 100}%`
|
|
34
34
|
})
|
|
35
35
|
}), /*#__PURE__*/React.createElement("p", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","classnames","style","ProgressBar","props","className","value","max","desc","steps","propsStyle","ratio","percentage","Math","floor","text","stepList","index","step","background","progress","width","texts","description","propTypes","string","number","isRequired","objectOf","oneOfType"],"sources":["../../../src/molecule/progress-bar/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {times} from 'lodash/fp';\nimport style from './style.css';\n\nconst ProgressBar = props => {\n const {className, value, max, desc = '', steps = 0, style: propsStyle} = props;\n\n const ratio = value / max;\n const percentage = Math.floor(ratio * 100);\n const text = `${percentage}%`;\n const stepList = times(index => <div className={style.step} key={index} />, steps);\n return (\n <div className={classnames(style.background, className)}>\n <div\n className={style.progress}\n style={{\n ...propsStyle,\n width: `${ratio * 100}%`\n }}\n />\n <p className={style.texts}>\n <span className={style.description}>{`${value}/${max} ${desc}`}</span>\n <span className={style.percentage}>{text}</span>\n </p>\n <div className={style.steps}>{stepList}</div>\n </div>\n );\n};\n\nProgressBar.propTypes = {\n className: PropTypes.string,\n value: PropTypes.number.isRequired,\n max: PropTypes.number.isRequired,\n desc: PropTypes.string,\n steps: PropTypes.number,\n style: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))\n};\n\nexport default ProgressBar;\n"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA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GAAG,EAAEP,SAAS,CAAC0B,MAAV,CAAiBC,UAHA;EAItBnB,IAAI,EAAER,SAAS,CAACyB,MAJM;EAKtBhB,KAAK,EAAET,SAAS,CAAC0B,MALK;EAMtBxB,KAAK,EAAEF,SAAS,CAAC4B,QAAV,CAAmB5B,SAAS,CAAC6B,SAAV,CAAoB,CAAC7B,SAAS,CAACyB,MAAX,EAAmBzB,SAAS,CAAC0B,MAA7B,CAApB,CAAnB;AANe,CAAxB;AASA,eAAevB,WAAf"}
|
|
@@ -5,7 +5,7 @@ declare namespace DropDown {
|
|
|
5
5
|
const onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
6
6
|
const options: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
7
7
|
name: PropTypes.Validator<string>;
|
|
8
|
-
value: PropTypes.Requireable<string | number
|
|
8
|
+
value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
9
9
|
selected: PropTypes.Requireable<boolean>;
|
|
10
10
|
validOption: PropTypes.Requireable<boolean>;
|
|
11
11
|
}> | null | undefined)[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","Select","SelectOptionPropTypes","style","DropDown","props","options","onChange","theme","propsTheme","currentSelection","defaultTheme","validOption","wrapper","propTypes","arrayOf","shape"],"sources":["../../../../src/molecule/questions/drop-down/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {find} from 'lodash/fp';\nimport Select, {SelectOptionPropTypes} from '../../../atom/select';\nimport style from './style.css';\n\nconst DropDown = props => {\n const {options, onChange, theme: propsTheme} = props;\n\n const currentSelection = find('selected', options);\n const defaultTheme =\n !currentSelection || currentSelection.validOption === false ? 'invalid' : 'question';\n\n const theme = propsTheme || defaultTheme;\n\n return (\n <div className={style.wrapper}>\n <Select theme={theme} options={options} onChange={onChange} />\n </div>\n );\n};\n\nDropDown.propTypes = {\n onChange: Select.propTypes.onChange,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes)),\n theme: Select.propTypes.theme\n};\n\nexport default DropDown;\n"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,MAAP,IAAgBC,qBAAhB,QAA4C,sBAA5C;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,QAAQ,GAAGC,KAAK,IAAI;EACxB,MAAM;IAACC,OAAD;IAAUC,QAAV;IAAoBC,KAAK,EAAEC;EAA3B,IAAyCJ,KAA/C;;EAEA,MAAMK,gBAAgB,GAAG,MAAK,UAAL,EAAiBJ,OAAjB,CAAzB;;EACA,MAAMK,YAAY,GAChB,CAACD,gBAAD,IAAqBA,gBAAgB,CAACE,WAAjB,KAAiC,KAAtD,GAA8D,SAA9D,GAA0E,UAD5E;EAGA,MAAMJ,KAAK,GAAGC,UAAU,IAAIE,YAA5B;EAEA,oBACE;IAAK,SAAS,EAAER,KAAK,CAACU;EAAtB,gBACE,oBAAC,MAAD;IAAQ,KAAK,EAAEL,KAAf;IAAsB,OAAO,EAAEF,OAA/B;IAAwC,QAAQ,EAAEC;EAAlD,EADF,CADF;AAKD,CAdD;;AAgBAH,QAAQ,CAACU,SAAT,2CAAqB;EACnBP,QAAQ,EAAEN,MAAM,CAACa,SAAP,CAAiBP,QADR;EAEnBD,OAAO,EAAEN,SAAS,CAACe,OAAV,CAAkBf,SAAS,CAACgB,KAAV,CAAgBd,qBAAhB,CAAlB,CAFU;EAGnBM,KAAK,EAAEP,MAAM,CAACa,SAAP,CAAiBN;AAHL,CAArB;AAMA,eAAeJ,QAAf"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _getOr from "lodash/fp/getOr";
|
|
2
2
|
import _noop from "lodash/fp/noop";
|
|
3
3
|
|
|
4
|
-
function _extends() { _extends = Object.assign
|
|
4
|
+
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); }
|
|
5
5
|
|
|
6
6
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
@@ -42,11 +42,11 @@ const FreeText = (props, legacyContext) => {
|
|
|
42
42
|
value: value,
|
|
43
43
|
onInput: handleChange,
|
|
44
44
|
onChange: _noop,
|
|
45
|
-
style: _extends(
|
|
45
|
+
style: _extends({
|
|
46
46
|
boxShadow: `0 4px 16px ${shadowBoxPrimaryColor}`
|
|
47
47
|
}, value && {
|
|
48
48
|
boxShadow: `0 4px 16px ${hovered ? convert(`color(${primarySkinColor} a(20%))`) : shadowBoxPrimaryColor}`
|
|
49
|
-
}
|
|
49
|
+
}, {
|
|
50
50
|
color: primarySkinColor
|
|
51
51
|
})
|
|
52
52
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","useMemo","useState","PropTypes","convert","Provider","GetSkinFromContext","style","FreeText","props","legacyContext","skin","placeholder","value","onChange","ariaLabel","hovered","setHovered","handleChange","e","target","primarySkinColor","handleMouseOver","handleMouseLeave","shadowBoxPrimaryColor","wrapper","boxShadow","freeText","color","contextTypes","childContextTypes","propTypes","string","func"],"sources":["../../../../src/molecule/questions/free-text/index.js"],"sourcesContent":["import React, {useCallback, useMemo, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, getOr} from 'lodash/fp';\nimport {convert} from 'css-color-function';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport style from './style.css';\n\nconst FreeText = (props, legacyContext) => {\n const skin = GetSkinFromContext(legacyContext);\n const {placeholder = '', value = '', onChange = noop, 'aria-label': ariaLabel} = props;\n const [hovered, setHovered] = useState(false);\n\n const handleChange = useCallback(e => onChange(e.target.value), [onChange]);\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n const handleMouseOver = useCallback(() => setHovered(true), [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n const shadowBoxPrimaryColor = useMemo(\n () => convert(`color(${primarySkinColor} a(12%))`),\n [primarySkinColor]\n );\n\n return (\n <div\n data-name=\"freeText\"\n className={style.wrapper}\n onMouseOver={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n style={{\n ...(value && {\n boxShadow: hovered ? 'none' : `0 4px 16px ${shadowBoxPrimaryColor}`\n })\n }}\n >\n <input\n data-name=\"free-text-input\"\n type=\"text\"\n aria-label={ariaLabel || value || placeholder}\n className={style.freeText}\n placeholder={placeholder}\n value={value}\n onInput={handleChange}\n onChange={noop}\n style={{\n boxShadow: `0 4px 16px ${shadowBoxPrimaryColor}`,\n ...(value && {\n boxShadow: `0 4px 16px ${\n hovered ? convert(`color(${primarySkinColor} a(20%))`) : shadowBoxPrimaryColor\n }`\n }),\n color: primarySkinColor\n }}\n />\n </div>\n );\n};\n\nFreeText.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nFreeText.propTypes = {\n placeholder: PropTypes.string,\n value: PropTypes.string,\n onChange: PropTypes.func,\n 'aria-label': PropTypes.string\n};\n\nexport default FreeText;\n"],"mappings":";;;;;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,OAA5B,EAAqCC,QAArC,QAAoD,OAApD;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,SAAQC,OAAR,QAAsB,oBAAtB;AACA,OAAOC,QAAP,IAAkBC,kBAAlB,QAA2C,wBAA3C;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,QAAQ,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EACzC,MAAMC,IAAI,GAAGL,kBAAkB,CAACI,aAAD,CAA/B;EACA,MAAM;IAACE,WAAW,GAAG,EAAf;IAAmBC,KAAK,GAAG,EAA3B;IAA+BC,QAAQ,QAAvC;IAA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,CAAE,SAAQiB,gBAAiB,UAA3B,CAAV,GAAkDG,qBAC1D;IAHU,CAFV;MAOHI,KAAK,EAAEP;IAPJ;EATP,EAXF,CADF;AAiCD,CAlDD;;AAoDAb,QAAQ,CAACqB,YAAT,GAAwB;EACtBlB,IAAI,EAAEN,QAAQ,CAACyB,iBAAT,CAA2BnB;AADX,CAAxB;AAIAH,QAAQ,CAACuB,SAAT,2CAAqB;EACnBnB,WAAW,EAAET,SAAS,CAAC6B,MADJ;EAEnBnB,KAAK,EAAEV,SAAS,CAAC6B,MAFE;EAGnBlB,QAAQ,EAAEX,SAAS,CAAC8B,IAHD;EAInB,cAAc9B,SAAS,CAAC6B;AAJL,CAArB;AAOA,eAAexB,QAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/molecule/questions/free-text/index.native.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAuB,SAAS,EAAC,MAAM,8BAA8B,CAAC;AAK7E,aAAK,YAAY,GAAG,OAAO,GAAG,UAAU,CAAC;AAEzC,UAAU,KAAK;IACb,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,YAAY,CAAC;IAC3B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA6CD,QAAA,MAAM,QAAQ,UAAW,KAAK,uBA2D7B,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/molecule/questions/free-text/index.native.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAuB,SAAS,EAAC,MAAM,8BAA8B,CAAC;AAK7E,aAAK,YAAY,GAAG,OAAO,GAAG,UAAU,CAAC;AAEzC,UAAU,KAAK;IACb,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,YAAY,CAAC;IAC3B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA6CD,QAAA,MAAM,QAAQ,UAAW,KAAK,uBA2D7B,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
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); }
|
|
2
2
|
|
|
3
3
|
import { View, StyleSheet, TextInput } from 'react-native';
|
|
4
4
|
import React, { useState, useEffect, useCallback } from 'react';
|
|
@@ -8,14 +8,14 @@ import { BOX_STYLE } from '../../../variables/shadow';
|
|
|
8
8
|
|
|
9
9
|
const createStyleSheet = (brandTheme, theme) => StyleSheet.create({
|
|
10
10
|
// eslint-disable-next-line @coorpacademy/coorpacademy/no-overwriting-spread
|
|
11
|
-
input: _extends(
|
|
11
|
+
input: _extends({
|
|
12
12
|
padding: theme.spacing.tiny,
|
|
13
13
|
borderColor: theme.colors.gray.lightMedium,
|
|
14
14
|
borderRadius: theme.radius.regular,
|
|
15
15
|
minWidth: 175,
|
|
16
16
|
marginHorizontal: 12,
|
|
17
17
|
paddingVertical: 16
|
|
18
|
-
}, BOX_STYLE
|
|
18
|
+
}, BOX_STYLE, {
|
|
19
19
|
backgroundColor: theme.colors.white
|
|
20
20
|
}),
|
|
21
21
|
text: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["View","StyleSheet","TextInput","React","useState","useEffect","useCallback","useTemplateContext","ANALYTICS_EVENT_TYPE","BOX_STYLE","createStyleSheet","brandTheme","theme","create","input","padding","spacing","tiny","borderColor","colors","gray","lightMedium","borderRadius","radius","regular","minWidth","marginHorizontal","paddingVertical","backgroundColor","white","text","primary","color","medium","fontWeight","bold","fontSize","textAlign","spaced","fullWitdh","width","logEvent","eventName","analytics","questionType","id","FreeText","props","templateContext","styleSheet","setStylesheet","translations","PLACEHOLDER_COLOR","fullWidth","testID","onChange","isDisabled","value","handleFocus","INPUT_FOCUS","handleBlur","INPUT_BLUR","_stylesheet","typeHere"],"sources":["../../../../src/molecule/questions/free-text/index.native.tsx"],"sourcesContent":["import {View, StyleSheet, TextInput, ViewStyle} from 'react-native';\nimport React, {useState, useEffect, useCallback} from 'react';\nimport {useTemplateContext} from '../../../template/app-review/template-context';\nimport {ANALYTICS_EVENT_TYPE, Analytics} from '../../../variables/analytics';\nimport {Theme} from '../../../variables/theme.native';\nimport {BOX_STYLE} from '../../../variables/shadow';\nimport {Brand} from '../../../variables/brand.native';\n\ntype QuestionType = 'basic' | 'template';\n\ninterface Props {\n fullWidth?: boolean;\n testID: string;\n questionType: QuestionType;\n analytics?: Analytics;\n onChange: (text: string) => void;\n isDisabled?: boolean;\n value?: string; // when value is undefined, TextInput acts as not controlled\n}\n\ntype StyleSheetType = {\n input: ViewStyle;\n text: ViewStyle;\n spaced: ViewStyle;\n fullWitdh: ViewStyle;\n};\n\nconst createStyleSheet = (brandTheme: Brand, theme: Theme): StyleSheetType =>\n StyleSheet.create({\n // eslint-disable-next-line @coorpacademy/coorpacademy/no-overwriting-spread\n input: {\n padding: theme.spacing.tiny,\n borderColor: theme.colors.gray.lightMedium,\n borderRadius: theme.radius.regular,\n minWidth: 175,\n marginHorizontal: 12,\n paddingVertical: 16,\n ...BOX_STYLE,\n backgroundColor: theme.colors.white\n },\n text: {\n borderColor: brandTheme?.colors?.primary,\n color: brandTheme?.colors?.primary || theme.colors.gray.medium,\n fontWeight: theme.fontWeight.bold,\n fontSize: theme.fontSize.regular,\n textAlign: 'center'\n },\n spaced: {\n paddingVertical: theme.spacing.tiny\n },\n fullWitdh: {\n width: '100%'\n }\n });\n\nconst logEvent = (eventName: string, analytics: Analytics, questionType: QuestionType) => {\n analytics &&\n analytics.logEvent(eventName, {\n id: `question-input-text`,\n questionType\n });\n};\n\nconst FreeText = (props: Props) => {\n const templateContext = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const {brandTheme, theme, translations} = templateContext;\n const PLACEHOLDER_COLOR = theme.colors.gray.medium;\n\n // ------------------------------------\n\n const {\n analytics,\n questionType,\n fullWidth = false,\n testID,\n onChange,\n isDisabled = false,\n value\n } = props;\n\n // ------------------------------------\n\n const handleFocus = useCallback(\n () => analytics && logEvent(ANALYTICS_EVENT_TYPE.INPUT_FOCUS, analytics, questionType),\n [analytics, questionType]\n );\n\n const handleBlur = useCallback(\n () => analytics && logEvent(ANALYTICS_EVENT_TYPE.INPUT_BLUR, analytics, questionType),\n [analytics, questionType]\n );\n\n // ------------------------------------\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(brandTheme, theme);\n setStylesheet(_stylesheet);\n }, [brandTheme, theme]);\n\n // ------------------------------------\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <View style={[styleSheet.spaced, fullWidth && styleSheet.fullWitdh]}>\n <TextInput\n style={[styleSheet.input, styleSheet.text]}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onChangeText={onChange}\n placeholder={translations.typeHere}\n placeholderTextColor={PLACEHOLDER_COLOR}\n value={value}\n testID={testID}\n editable={!isDisabled}\n selectTextOnFocus={!isDisabled}\n />\n </View>\n );\n};\n\nexport default FreeText;\n"],"mappings":";;AAAA,SAAQA,IAAR,EAAcC,UAAd,EAA0BC,SAA1B,QAAqD,cAArD;AACA,OAAOC,KAAP,IAAeC,QAAf,EA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IJ,UAAU,CAACV,SAA5C;EAAb,gBACE,oBAAC,SAAD;IACE,KAAK,EAAE,CAACU,UAAU,CAACnC,KAAZ,EAAmBmC,UAAU,CAACnB,IAA9B,CADT;IAEE,OAAO,EAAE4B,WAFX;IAGE,MAAM,EAAEE,UAHV;IAIE,YAAY,EAAEL,QAJhB;IAKE,WAAW,EAAEJ,YAAY,CAACY,QAL5B;IAME,oBAAoB,EAAEX,iBANxB;IAOE,KAAK,EAAEK,KAPT;IAQE,MAAM,EAAEH,MARV;IASE,QAAQ,EAAE,CAACE,UATb;IAUE,iBAAiB,EAAE,CAACA;EAVtB,EADF,CADF;AAgBD,CA3DD;;AA6DA,eAAeV,QAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../../src/molecule/questions/mobile/draggable/index.native.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,aAAa,CAAC;AAElD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACjC,OAAO,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,MAAM,IAAI,CAAC;CACjD;AAgFD,MAAM,WAAW,KAAK;IACpB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,MAAM,IAAI,CAAC;CACjD;AAkBD,QAAA,MAAM,iBAAiB,UAAW,KAAK,uBAuCtC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../../src/molecule/questions/mobile/draggable/index.native.tsx"],"names":[],"mappings":";AAMA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,aAAa,CAAC;AAElD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACjC,OAAO,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,MAAM,IAAI,CAAC;CACjD;AAgFD,MAAM,WAAW,KAAK;IACpB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,MAAM,IAAI,CAAC;CACjD;AAkBD,QAAA,MAAM,iBAAiB,UAAW,KAAK,uBAuCtC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["React","useEffect","useState","View","StyleSheet","Text","QuestionChoice","useTemplateContext","createDropZoneStyle","theme","create","choice","margin","spacing","micro","dropZone","flexWrap","flexDirection","borderStyle","borderWidth","padding","borderColor","colors","gray","light","backgroundColor","extra","borderRadius","radius","common","marginBottom","tiny","emptyContent","justifyContent","alignContent","alignItems","height","text","color","medium","DropZone","props","templateContext","translations","onPress","styleSheet","setStylesheet","_stylesheet","choices","mappedSortedChoices","map","item","_id","label","hasNoSelectedChoices","length","selectSomethingBelow","createStyleSheet","pickableChoices","QuestionDraggable","testID","selectedChoices","filter","selected"],"sources":["../../../../../src/molecule/questions/mobile/draggable/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {View, StyleSheet, Text, ViewStyle, TextStyle} from 'react-native';\nimport QuestionChoice from '../../../../atom/choice/index.native';\nimport {useTemplateContext} from '../../../../template/app-review/template-context';\nimport {Theme} from '../../../../variables/theme.native';\n\nimport type {SelectableChoice} from '../../types';\n\nexport interface DropZoneProps {\n choices: Array<SelectableChoice>;\n onPress: (item: SelectableChoice) => () => void;\n}\n\ntype DropZoneStyleSheet = {\n choice: ViewStyle;\n dropZone: ViewStyle;\n emptyContent: ViewStyle;\n text: TextStyle;\n};\n\nconst createDropZoneStyle = (theme: Theme): DropZoneStyleSheet =>\n StyleSheet.create({\n choice: {\n margin: theme.spacing.micro\n },\n dropZone: {\n flexWrap: 'wrap',\n flexDirection: 'row',\n borderStyle: 'dashed',\n borderWidth: 2,\n padding: theme.spacing.micro,\n borderColor: theme.colors.gray.light,\n backgroundColor: theme.colors.gray.extra,\n borderRadius: theme.radius.common,\n marginBottom: theme.spacing.tiny\n },\n emptyContent: {\n justifyContent: 'center',\n alignContent: 'center',\n alignItems: 'center',\n height: 60\n },\n text: {\n color: theme.colors.gray.medium\n }\n });\n\nconst DropZone = (props: DropZoneProps) => {\n const templateContext = useTemplateContext();\n const {theme, translations} = templateContext;\n const {onPress} = props;\n\n const [styleSheet, setStylesheet] = useState<DropZoneStyleSheet | null>(null);\n\n useEffect(() => {\n const _stylesheet = createDropZoneStyle(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n if (!styleSheet) {\n return null;\n }\n\n const {choices} = props;\n const mappedSortedChoices = choices.map(item => (\n <QuestionChoice\n style={styleSheet.choice}\n key={item._id}\n squeezed\n isSelected\n testID={`choice-${item._id}`}\n onPress={onPress(item)}\n questionType=\"qcmDrag\"\n >\n {item.label}\n </QuestionChoice>\n ));\n\n const hasNoSelectedChoices = mappedSortedChoices.length === 0;\n\n return (\n <View style={[styleSheet.dropZone, hasNoSelectedChoices && styleSheet.emptyContent]}>\n {hasNoSelectedChoices ? (\n <Text style={styleSheet.text}>{translations.selectSomethingBelow}</Text>\n ) : null}\n\n {!hasNoSelectedChoices && mappedSortedChoices}\n </View>\n );\n};\n\nexport interface Props {\n choices: Array<SelectableChoice>;\n testID?: string;\n onPress: (item: SelectableChoice) => () => void;\n}\n\ntype QuestionDraggableStyleSheet = {\n pickableChoices: ViewStyle;\n choice: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme): QuestionDraggableStyleSheet =>\n StyleSheet.create({\n pickableChoices: {\n flexDirection: 'row',\n flexWrap: 'wrap'\n },\n choice: {\n margin: theme.spacing.micro\n }\n });\n\nconst QuestionDraggable = (props: Props) => {\n const templateContext = useTemplateContext();\n const {theme} = templateContext;\n\n const [styleSheet, setStylesheet] = useState<QuestionDraggableStyleSheet | null>(null);\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n if (!styleSheet) {\n return null;\n }\n\n const {choices, onPress, testID} = props;\n const selectedChoices = choices.filter(item => item.selected);\n\n const pickableChoices = choices\n .filter(item => !item.selected)\n .map((item: SelectableChoice) => (\n <QuestionChoice\n style={styleSheet.choice}\n key={item._id}\n squeezed\n testID={`choice-${item._id}-unselected`}\n onPress={onPress(item)}\n questionType=\"qcmDrag\"\n >\n {item.label}\n </QuestionChoice>\n ));\n\n return (\n <View testID={testID}>\n <DropZone choices={selectedChoices} onPress={onPress} />\n <View style={styleSheet.pickableChoices}>{pickableChoices}</View>\n </View>\n );\n};\n\nexport default QuestionDraggable;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,SAAf,EAA0BC,QAA1B,QAAyC,OAAzC;AACA,SAAQC,IAAR,EAAcC,UAAd,EAA0BC,IAA1B,QAA2D,cAA3D;AACA,OAAOC,cAAP,MAA2B,sCAA3B;AACA,SAAQC,kBAAR,QAAiC,kDAAjC;;AAiBA,MAAMC,mBAAmB,GAAIC,KAAD,IAC1BL,UAAU,CAACM,MAAX,CAAkB;EAChBC,MAAM,EAAE;IACNC,MAAM,EAAEH,KAAK,CAACI,OAAN,CAAcC;EADhB,CADQ;EAIhBC,QAAQ,EAAE;IACRC,QAAQ,EAAE,MADF;IAERC,aAAa,EAAE,KAFP;IAGRC,WAAW,EAAE,QAHL;IAIRC,WAAW,EAAE,CAJL;IAKRC,OAAO,EAAEX,KAAK,CAACI,OAAN,CAAcC,KALf;IAMRO,WAAW,EAAEZ,KAAK,CAACa,MAAN,CAAaC,IAAb,CAAkBC,KANvB;IAORC,eAAe,EAAEhB,KAAK,CAACa,MAAN,CAAaC,IAAb,CAAkBG,KAP3B;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AFqB,CAEhBC,IAAD,iBACH,oBAAC,cAAD;IACE,KAAK,EAAEN,UAAU,CAAClC,MADpB;IAEE,GAAG,EAAEwC,IAAI,CAACC,GAFZ;IAGE,QAAQ,MAHV;IAIE,MAAM,EAAG,UAASD,IAAI,CAACC,GAAI,aAJ7B;IAKE,OAAO,EAAER,OAAO,CAACO,IAAD,CALlB;IAME,YAAY,EAAC;EANf,GAQGA,IAAI,CAACE,KARR,CAHoB,CAAxB;EAeA,oBACE,oBAAC,IAAD;IAAM,MAAM,EAAEO;EAAd,gBACE,oBAAC,QAAD;IAAU,OAAO,EAAEC,eAAnB;IAAoC,OAAO,EAAEjB;EAA7C,EADF,eAEE,oBAAC,IAAD;IAAM,KAAK,EAAEC,UAAU,CAACa;EAAxB,GAA0CA,eAA1C,CAFF,CADF;AAMD,CAvCD;;AAyCA,eAAeC,iBAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../../src/molecule/questions/mobile/slider/index.native.tsx"],"names":[],"mappings":"AACA,OAAO,EAAmB,SAAS,EAAY,MAAM,cAAc,CAAC;AAQpE,oBAAY,yBAAyB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;AAEhE,oBAAY,KAAK,GAAG;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,yBAAyB,CAAC;IAC7C,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AA0DF,QAAA,MAAM,cAAc,UAAW,KAAK,uBA4DnC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../../src/molecule/questions/mobile/slider/index.native.tsx"],"names":[],"mappings":";AACA,OAAO,EAAmB,SAAS,EAAY,MAAM,cAAc,CAAC;AAQpE,oBAAY,yBAAyB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;AAEhE,oBAAY,KAAK,GAAG;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,yBAAyB,CAAC;IAC7C,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AA0DF,QAAA,MAAM,cAAc,UAAW,KAAK,uBA4DnC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
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); }
|
|
2
2
|
|
|
3
3
|
import React, { useState, useEffect, useCallback } from 'react';
|
|
4
4
|
import { View, StyleSheet } from 'react-native';
|
|
@@ -41,7 +41,7 @@ const createStyleSheet = theme => StyleSheet.create({
|
|
|
41
41
|
height: 10,
|
|
42
42
|
borderRadius: theme.radius.button
|
|
43
43
|
},
|
|
44
|
-
thumb: _extends(
|
|
44
|
+
thumb: _extends({}, BOX_STYLE, {
|
|
45
45
|
width: 30,
|
|
46
46
|
height: 30,
|
|
47
47
|
borderRadius: 30 / 2,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["React","useState","useEffect","useCallback","View","StyleSheet","Slider","Text","useTemplateContext","BOX_STYLE","createStyleSheet","theme","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","width","backgroundColor","borderWidth","QuestionSlider","props","step","style","min","max","unit","value","storeValue","onSlidingComplete","testID","templateContext","brandTheme","styleSheet","setStylesheet","setValue","handleSlidingComplete","_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,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,SAAzB,EAAoCC,WAApC,QAAsD,OAAtD;AACA,SAAQC,IAAR,EAAcC,UAAd,QAAqD,cAArD;AACA,OAAOC,MAAP,MAAmB,mCAAnB;AAGA,OAAOC,IAA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iC,OAP7C;IAQE,UAAU,EAAEL,UAAU,CAACtB,KARzB;IASE,UAAU,EAAE,CAACsB,UAAU,CAACjB,KAAZ,EAAmB;MAACuB,WAAW,EAAEP,UAAU,EAAE3B,MAAZ,EAAoBiC;IAAlC,CAAnB,CATd;IAUE,MAAM,EAAC;EAVT,EAJF,eAgBE,oBAAC,IAAD;IAAM,KAAK,EAAEL,UAAU,CAAC1B,eAAxB;IAAyC,MAAM,EAAC;EAAhD,gBACE,oBAAC,IAAD;IAAM,KAAK,EAAE0B,UAAU,CAACzB;EAAxB,gBACE,oBAAC,IAAD;IAAM,KAAK,EAAEyB,UAAU,CAAC9B,SAAxB;IAAmC,MAAM,EAAC;EAA1C,GACI,GAAEqB,GAAI,IAAGE,IAAK,EADlB,CADF,CADF,eAME,oBAAC,IAAD;IAAM,KAAK,EAAEO,UAAU,CAACvB;EAAxB,gBACE,oBAAC,IAAD;IAAM,KAAK,EAAEuB,UAAU,CAAC9B,SAAxB;IAAmC,MAAM,EAAC;EAA1C,GACI,GAAEsB,GAAI,IAAGC,IAAK,EADlB,CADF,CANF,CAhBF,CADF;AA+BD,CA5DD;;AA8DA,eAAeN,cAAf"}
|
|
@@ -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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/questions/mobile/switch/index.native.tsx"],"names":["React","useCallback","View","StyleSheet","Text","QuestionChoice","QuestionDraggable","QuestionTemplate","QuestionSlider","FreeText","useTemplateContext","ANALYTICS_EVENT_TYPE","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","SLIDE","id","questionType","map","_id","selected","label","media","undefined","console","warn"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AACA,SAAQC,IAAR,EAAcC,UAAd,EAA0BC,IAA1B,QAAgD,cAAhD;AAEA,OAAOC,cAAP,MAA2B,sCAA3B;AACA,OAAOC,iBAAP,MAA8B,2BAA9B;AACA,OAAOC,gBAAP,MAA6B,0BAA7B;AACA,OAAOC,cAAP,MAA2B,wBAA3B;AACA,OAAOC,QAAP,MAAqB,8BAArB;AAEA,SAAQC,kBAAR,QAAiC,kDAAjC;AACA,SAAQC,oBAAR,QAAmC,iCAAnC;AAiCA,MAAMC,UAA0B,GAAGT,UAAU,CAACU,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;A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oBAAC,IAAD,OAAP;AACD;;AAED,0BACE,oBAAC,QAAD;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,oBAAC,IAAD,qBACE,oBAAC,IAAD,4BAAuBF,IAAvB,CADF,CADF;AAhGJ;AAsGD,CApKD;;AAsKA,eAAeR,MAAf","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":["React","useCallback","View","StyleSheet","Text","QuestionChoice","QuestionDraggable","QuestionTemplate","QuestionSlider","FreeText","useTemplateContext","ANALYTICS_EVENT_TYPE","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","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,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AACA,SAAQC,IAAR,EAAcC,UAAd,EAA0BC,IAA1B,QAAgD,cAAhD;AAEA,OAAOC,cAAP,MAA2B,sCAA3B;AACA,OAAOC,iBAAP,MAA8B,2BAA9B;AACA,OAAOC,gBAAP,MAA6B,0BAA7B;AACA,OAAOC,cAAP,MAA2B,wBAA3B;AACA,OAAOC,QAAP,MAAqB,8BAArB;AAEA,SAAQC,kBAAR,QAAiC,kDAAjC;AACA,SAAQC,oBAAR,QAAmC,iCAAnC;AAiCA,MAAMC,UAA0B,GAAGT,UAAU,CAACU,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,GAAGb,kBAAkB,EAA1C;EACA,MAAM;IAACc,SAAD;IAAYC;EAAZ,IAAqBF,eAA3B;EACA,MAAM;IAACG,eAAD;IAAkBC,UAAlB;IAA8BC;EAA9B,IAA6CH,KAAnD;EAEA,MAAM;IACJI,IADI;IAEJC,QAFI;IAGJC,UAHI;IAIJC,OAAO,GAAG,EAJN;IAKJC,GALI;IAMJC,GANI;IAOJC,IAPI;IAQJC,KARI;IASJC,IATI;IAUJC,cAVI;IAWJC,WAXI;IAYJC,iBAZI;IAaJC;EAbI,IAcFnB,KAdJ;EAgBA,MAAMoB,iBAAiB,GAAGzC,WAAW,CAClCkB,MAAD,IAAoB,MAAM;IACxB,IAAKA,MAAD,CAA6BwB,OAAjC,EAA0C;MACxC;MACC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AEE,OAHX;QAIE,aAAa,EAAEY,qBAJjB;QAKE,UAAU,EAAEjB,UALd;QAME,WAAW,EAAEC,WANf;QAOE,eAAe,EAAEF;MAPnB,EADF,CADF;;IAaF,KAAK,SAAL;MACE,oBACE,oBAAC,IAAD;QAAM,MAAM,EAAC;MAAb,gBACE,oBAAC,iBAAD;QAAmB,OAAO,EAAEM,OAA5B;QAA2D,OAAO,EAAEU;MAApE,EADF,CADF;;IAKF,KAAK,OAAL;MACE,IAAI,CAACD,kBAAL,EAAyB;QACvB,oBAAO,oBAAC,IAAD,OAAP;MACD;;MAED,oBACE,oBAAC,QAAD;QACE,SAAS,MADX;QAEE,QAAQ,EAAEA,kBAFZ;QAGE,MAAM,EAAC,qBAHT;QAIE,YAAY,EAAC,OAJf;QAKE,UAAU,EAAEV;MALd,EADF;;IASF;MACE,oBACE,oBAAC,IAAD,qBACE,oBAAC,IAAD,4BAAuBF,IAAvB,CADF,CADF;EAhGJ;AAsGD,CApKD;;AAsKA,eAAeR,MAAf"}
|
|
@@ -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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
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); }
|
|
2
2
|
|
|
3
3
|
import React, { useEffect, useState } from 'react';
|
|
4
4
|
import { View } from 'react-native';
|
|
@@ -28,13 +28,13 @@ const createStyleSheet = theme => ({
|
|
|
28
28
|
lineHeight: 25
|
|
29
29
|
},
|
|
30
30
|
// eslint-disable-next-line @coorpacademy/coorpacademy/no-overwriting-spread
|
|
31
|
-
selectInput: _extends(
|
|
31
|
+
selectInput: _extends({
|
|
32
32
|
padding: theme.spacing.tiny,
|
|
33
33
|
borderRadius: theme.radius.regular,
|
|
34
34
|
minWidth: 175,
|
|
35
35
|
marginHorizontal: 12,
|
|
36
36
|
paddingVertical: 16
|
|
37
|
-
}, BOX_STYLE
|
|
37
|
+
}, BOX_STYLE, {
|
|
38
38
|
backgroundColor: theme.colors.white
|
|
39
39
|
}),
|
|
40
40
|
selectText: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/questions/mobile/template/index.native.tsx"],"names":["React","useEffect","useState","View","trim","Html","Select","Space","FreeText","useTemplateContext","parseTemplateString","BOX_STYLE","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","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","selectTextStyle","items","selectAnAnswer","QuestionTemplate","template","styleSheet","setStylesheet","_stylesheet","parts"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,SAAf,EAA0BC,QAA1B,QAAyC,OAAzC;AACA,SAAmBC,IAAnB,QAAyC,cAAzC;AAEA,OAAOC,IAAP,MAAiB,gBAAjB;AAEA,OAAOC,IAAP,MAAiB,oCAAjB;AACA,OAAOC,MAAP,MAAmB,4CAAnB;AACA,OAAOC,KAAP,MAAkB,qCAAlB;AAEA,OAAOC,QAAP,MAAqB,8BAArB;AACA,SAIEC,kBAJF,QAKO,kDALP;AAOA,OAAOC,mBAAP,MAAgC,wCAAhC;AACA,SAAQC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;AAED,QAAMG,KAAqB,GAAG7E,mBAAmB,CAACyE,QAAD,CAAjD;AAEA,sBACE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAEC,UAAU,CAACtE,SAAxB;AAAmC,IAAA,MAAM,EAAC;AAA1C,KACGyE,KAAK,CAAC3B,GAAN,CAAU,CAACb,IAAD,EAAOgB,EAAP,kBACT,oBAAC,IAAD;AAAM,IAAA,GAAG,EAAG,iBAAgBA,EAAG,EAA/B;AAAkC,IAAA,KAAK,EAAE;AAAC/C,MAAAA,aAAa,EAAE;AAAhB;AAAzC,kBACE,oBAAC,IAAD;AACE,IAAA,IAAI,EAAE+B,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,oBAAC,KAAD;AAAO,IAAA,IAAI,EAAC;AAAZ,IAZF,CADD,CADH,CADF;AAoBD,CA/CD;;AAiDA,eAAeF,gBAAf","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":["React","useEffect","useState","View","trim","Html","Select","Space","FreeText","useTemplateContext","parseTemplateString","BOX_STYLE","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","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","selectTextStyle","items","selectAnAnswer","QuestionTemplate","template","styleSheet","setStylesheet","_stylesheet","parts"],"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,OAAOA,KAAP,IAAeC,SAAf,EAA0BC,QAA1B,QAAyC,OAAzC;AACA,SAAmBC,IAAnB,QAAyC,cAAzC;AAEA,OAAOC,IAAP,MAAiB,gBAAjB;AAEA,OAAOC,IAAP,MAAiB,oCAAjB;AACA,OAAOC,MAAP,MAAmB,4CAAnB;AACA,OAAOC,KAAP,MAAkB,qCAAlB;AAEA,OAAOC,QAAP,MAAqB,8BAArB;AACA,SAIEC,kBAJF,QAKO,kDALP;AAOA,OAAOC,mBAAP,MAAgC,wCAAhC;AACA,SAAQC,SAAR,QAAwB,8BAAxB;;AAUA,MAAMC,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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FH,KARJ;EAUA,MAAMU,eAAe,GAAG/C,kBAAkB,EAA1C;EACA,MAAM;IAACI;EAAD,IAAU2C,eAAhB;EAEA,MAAM,CAAC4B,UAAD,EAAaC,aAAb,IAA8BnF,QAAQ,CAAwB,IAAxB,CAA5C;EAEAD,SAAS,CAAC,MAAM;IACd,MAAMqF,WAAW,GAAG1E,gBAAgB,CAACC,KAAD,CAApC;;IACAwE,aAAa,CAACC,WAAD,CAAb;EACD,CAHQ,EAGN,CAACzE,KAAD,CAHM,CAAT;;EAKA,IAAI,CAACsE,QAAD,IAAa,CAACC,UAAlB,EAA8B;IAC5B,OAAO,IAAP;EACD;;EAED,MAAMG,KAAqB,GAAG7E,mBAAmB,CAACyE,QAAD,CAAjD;EAEA,oBACE,oBAAC,IAAD;IAAM,KAAK,EAAEC,UAAU,CAACtE,SAAxB;IAAmC,MAAM,EAAC;EAA1C,GACGyE,KAAK,CAAC3B,GAAN,CAAU,CAACb,IAAD,EAAOgB,EAAP,kBACT,oBAAC,IAAD;IAAM,GAAG,EAAG,iBAAgBA,EAAG,EAA/B;IAAkC,KAAK,EAAE;MAAC/C,aAAa,EAAE;IAAhB;EAAzC,gBACE,oBAAC,IAAD;IACE,IAAI,EAAE+B,IADR;IAEE,OAAO,EAAEI,OAFX;IAGE,KAAK,EAAEY,EAHT;IAIE,eAAe,EAAEb,eAJnB;IAKE,UAAU,EAAED,UALd;IAME,UAAU,EAAEI,UANd;IAOE,WAAW,EAAEC,WAPf;IAQE,aAAa,EAAEF,aARjB;IASE,MAAM,EAAEgC;EATV,EADF,eAYE,oBAAC,KAAD;IAAO,IAAI,EAAC;EAAZ,EAZF,CADD,CADH,CADF;AAoBD,CA/CD;;AAiDA,eAAeF,gBAAf"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
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); }
|
|
2
2
|
|
|
3
3
|
import React, { useMemo } from 'react';
|
|
4
4
|
import classnames from 'classnames';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useMemo","classnames","PropTypes","getOr","maxBy","Provider","GetSkinFromContext","getShadowBoxColorFromPrimary","style","QCM","props","legacyContext","answers","longestAnswer","title","length","skin","primarySkinColor","answersViews","map","answer","key","onClick","selected","ariaLabel","longAnswerClass","selectedAnswerClass","selectedAnswer","unselectedAnswer","innerHTML","boxShadow","backgroundColor","background","answerText","__html","wrapper","contextTypes","childContextTypes","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,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,QAAP,IAAkBC,kBAAlB,QAA2C,wBAA3C;AACA,SAAQC,4BAAR,QAA2C,iDAA3C;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,GAAG,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EACpC,MAAM;IAACC;EAAD,IAAYF,KAAlB;EACA,MAAMG,aAAa,GAAGT,KAAK,CAAC,CAAC;IAACU;EAAD,CAAD,KAAaA,KAAK,CAACC,MAApB,EAA4BH,OAA5B,CAA3B;EACA,MAAMI,IAAI,GAAGV,kBAAkB,CAACK,aAAD,CAA/B;EACA,MAAMM,gBAAgB,GAAGd,KAAK,CAAC,SAAD,EAAY,gBAAZ,EAA8Ba,IAA9B,CAA9B;EAEA,MAAME,YAAY,GAAGlB,OAAO,CAC1B,MACEY,OAAO,CAACO,GAAR,CAAY,CAACC,MAAD,EAASC,GAAT,KAAiB;IA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