@sparkle-learning/core 0.0.35 → 0.0.36
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/dist/cjs/{auth.service-4b584cd7.js → PrivateRoute-074c584e.js} +30 -0
- package/dist/cjs/{sparkle-export-lessons_6.cjs.entry.js → header-mobile-collapse_61.cjs.entry.js} +11600 -2714
- package/dist/cjs/index.cjs.js +5 -6
- package/dist/cjs/ion-card-title.cjs.entry.js +30 -0
- package/dist/cjs/ion-textarea.cjs.entry.js +248 -0
- package/dist/cjs/ion-toggle.cjs.entry.js +177 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sparkle-core.cjs.js +1 -1
- package/dist/cjs/sparkle-feed-post.cjs.entry.js +120 -0
- package/dist/cjs/sparkle-feedback.cjs.entry.js +1 -2
- package/dist/cjs/sparkle-quiz-v1.cjs.entry.js +105 -0
- package/dist/cjs/sparkle-quiz.cjs.entry.js +54 -40
- package/dist/cjs/student.service-2e58f237.js +78 -0
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/sparkle-quiz/{sparkle-quiz.css → sparkle-quiz/sparkle-quiz.css} +0 -0
- package/dist/collection/components/sparkle-quiz/sparkle-quiz/sparkle-quiz.js +326 -0
- package/dist/collection/components/sparkle-quiz/sparkle-quiz-v1.css +48 -0
- package/dist/collection/components/sparkle-quiz/{sparkle-quiz.js → sparkle-quiz-v1.js} +4 -4
- package/dist/esm/{auth.service-79389d86.js → PrivateRoute-c5441f35.js} +33 -4
- package/dist/esm/{active-router-9843e205.js → active-router-fc9e4e06.js} +1 -1
- package/dist/esm/{animation-d98d3e81.js → animation-12377cb3.js} +1 -1
- package/dist/esm/{app-globals-08edc964.js → app-globals-3f0347b0.js} +1 -1
- package/dist/esm/{auth.store-b812b34b.js → auth.store-dba2c2da.js} +2 -2
- package/dist/esm/compass-svg.entry.js +1 -1
- package/dist/esm/context-consumer.entry.js +1 -1
- package/dist/esm/course-select.entry.js +1 -1
- package/dist/esm/{facilitator.service-7babc526.js → facilitator.service-b0292f7f.js} +2 -2
- package/dist/esm/{feed.service-80fbe79d.js → feed.service-8fbe4ce3.js} +3 -3
- package/dist/esm/{framework-delegate-9b329182.js → framework-delegate-3e634a5c.js} +1 -1
- package/dist/esm/{haptic-3a76a65c.js → haptic-522f76f2.js} +1 -1
- package/dist/esm/{sparkle-export-lessons_6.entry.js → header-mobile-collapse_61.entry.js} +11501 -2670
- package/dist/esm/{helpers-94a5855b.js → helpers-bf0e23d6.js} +1 -1
- package/dist/esm/{httpService-b2b7a1ad.js → httpService-7b75b095.js} +2 -2
- package/dist/esm/{icons-16f1a80b.js → icons-9b62a1ec.js} +2 -2
- package/dist/esm/{index-478745be.js → index-2b84cad2.js} +4 -4
- package/dist/esm/{index-4ec6b9c2.js → index-4044fde9.js} +1 -1
- package/dist/esm/{index-230a26c9.js → index-45fec1e7.js} +1 -1
- package/dist/esm/{index-c23a1826.js → index-5e8971ae.js} +2 -2
- package/dist/esm/{index-9db08224.js → index-c04b9ed5.js} +1 -1
- package/dist/esm/{index-95307148.js → index-cded2d87.js} +3 -3
- package/dist/esm/{index.es-1c3b1ef3.js → index.es-e0c0f891.js} +2 -2
- package/dist/esm/index.js +7 -8
- package/dist/esm/{input-shims-ce5c01df.js → input-shims-671d8d9f.js} +2 -2
- package/dist/esm/ion-accordion-group.entry.js +2 -2
- package/dist/esm/ion-accordion.entry.js +4 -4
- package/dist/esm/ion-action-sheet_4.entry.js +8 -8
- package/dist/esm/ion-app.entry.js +5 -5
- package/dist/esm/ion-back-button.entry.js +4 -4
- package/dist/esm/ion-backdrop.entry.js +2 -2
- package/dist/esm/ion-badge.entry.js +2 -2
- package/dist/esm/ion-breadcrumb.entry.js +4 -4
- package/dist/esm/ion-breadcrumbs.entry.js +2 -2
- package/dist/esm/ion-buttons_3.entry.js +2 -2
- package/dist/esm/ion-card-header.entry.js +2 -2
- package/dist/esm/ion-card-subtitle.entry.js +2 -2
- package/dist/esm/ion-card-title.entry.js +26 -0
- package/dist/esm/ion-chip.entry.js +2 -2
- package/dist/esm/ion-content_2.entry.js +4 -4
- package/dist/esm/ion-datetime-button.entry.js +3 -3
- package/dist/esm/ion-datetime.entry.js +4 -4
- package/dist/esm/ion-fab-button.entry.js +4 -4
- package/dist/esm/ion-fab-list.entry.js +2 -2
- package/dist/esm/ion-fab.entry.js +2 -2
- package/dist/esm/ion-footer.entry.js +4 -4
- package/dist/esm/ion-img.entry.js +3 -3
- package/dist/esm/ion-infinite-scroll-content.entry.js +2 -2
- package/dist/esm/ion-infinite-scroll.entry.js +4 -4
- package/dist/esm/ion-item-divider.entry.js +2 -2
- package/dist/esm/ion-item-group.entry.js +2 -2
- package/dist/esm/ion-item-option.entry.js +2 -2
- package/dist/esm/ion-item-options.entry.js +3 -3
- package/dist/esm/ion-item-sliding.entry.js +4 -4
- package/dist/esm/ion-loading.entry.js +5 -5
- package/dist/esm/ion-menu-button.entry.js +7 -7
- package/dist/esm/ion-menu-toggle.entry.js +6 -6
- package/dist/esm/ion-menu.entry.js +6 -6
- package/dist/esm/ion-modal.entry.js +8 -8
- package/dist/esm/ion-nav-link.entry.js +1 -1
- package/dist/esm/ion-nav.entry.js +6 -6
- package/dist/esm/ion-picker-column-internal_2.entry.js +4 -4
- package/dist/esm/ion-picker-column.entry.js +4 -4
- package/dist/esm/ion-picker.entry.js +5 -5
- package/dist/esm/ion-progress-bar.entry.js +3 -3
- package/dist/esm/ion-refresher-content.entry.js +3 -3
- package/dist/esm/ion-refresher.entry.js +6 -6
- package/dist/esm/ion-reorder-group.entry.js +5 -5
- package/dist/esm/ion-reorder.entry.js +3 -3
- package/dist/esm/ion-route-redirect.entry.js +1 -1
- package/dist/esm/ion-route.entry.js +1 -1
- package/dist/esm/ion-router-link.entry.js +2 -2
- package/dist/esm/ion-router-outlet.entry.js +6 -6
- package/dist/esm/ion-router.entry.js +2 -2
- package/dist/esm/ion-searchbar.entry.js +4 -4
- package/dist/esm/ion-segment-button.entry.js +3 -3
- package/dist/esm/ion-segment.entry.js +3 -3
- package/dist/esm/ion-select_2.entry.js +4 -4
- package/dist/esm/ion-skeleton-text.entry.js +2 -2
- package/dist/esm/ion-slide.entry.js +2 -2
- package/dist/esm/ion-slides.entry.js +3 -3
- package/dist/esm/ion-split-pane.entry.js +2 -2
- package/dist/esm/ion-tab-bar.entry.js +2 -2
- package/dist/esm/ion-tab-button.entry.js +2 -2
- package/dist/esm/ion-tab.entry.js +3 -3
- package/dist/esm/ion-tabs.entry.js +1 -1
- package/dist/esm/ion-textarea.entry.js +244 -0
- package/dist/esm/ion-thumbnail.entry.js +2 -2
- package/dist/esm/ion-toast.entry.js +5 -5
- package/dist/esm/ion-toggle.entry.js +173 -0
- package/dist/esm/ion-virtual-scroll.entry.js +2 -2
- package/dist/esm/{ionic-global-293e882b.js → ionic-global-4903e23e.js} +1 -1
- package/dist/esm/{ios.transition-7cd34deb.js → ios.transition-131d64fe.js} +4 -4
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{md.transition-2589a5b1.js → md.transition-f6126011.js} +4 -4
- package/dist/esm/{menu-toggle-util-f92ba2f0.js → menu-toggle-util-bace8ae6.js} +1 -1
- package/dist/esm/{overlays-dfa730c8.js → overlays-3b4dca92.js} +3 -3
- package/dist/esm/{purify-79af871f.js → purify-85bfcc69.js} +1 -1
- package/dist/esm/sparkle-animation-player.entry.js +2 -2
- package/dist/esm/sparkle-character-intro.entry.js +1 -1
- package/dist/esm/sparkle-code.entry.js +2 -2
- package/dist/esm/sparkle-compass-post.entry.js +1 -1
- package/dist/esm/sparkle-compass.entry.js +1 -1
- package/dist/esm/sparkle-core.js +4 -4
- package/dist/esm/sparkle-emoji.entry.js +1 -1
- package/dist/esm/sparkle-facilitator-notes-form.entry.js +7 -7
- package/dist/esm/sparkle-feed-post.entry.js +116 -0
- package/dist/esm/sparkle-feedback.entry.js +7 -8
- package/dist/esm/sparkle-goal-form.entry.js +8 -8
- package/dist/esm/sparkle-gww-comment-list.entry.js +1 -1
- package/dist/esm/sparkle-gww-graph.entry.js +1 -1
- package/dist/esm/sparkle-intro.entry.js +1 -1
- package/dist/esm/sparkle-lower-content-nav.entry.js +1 -1
- package/dist/esm/sparkle-menu-collapsible.entry.js +2 -2
- package/dist/esm/sparkle-modal-image.entry.js +1 -1
- package/dist/esm/sparkle-notfound-page.entry.js +1 -1
- package/dist/esm/sparkle-overlay.entry.js +1 -1
- package/dist/esm/sparkle-poll.entry.js +1 -1
- package/dist/esm/sparkle-quiz-container.entry.js +1 -1
- package/dist/esm/sparkle-quiz-feedback_5.entry.js +1 -1
- package/dist/esm/sparkle-quiz-v1.entry.js +101 -0
- package/dist/esm/sparkle-quiz.entry.js +55 -41
- package/dist/esm/sparkle-select.entry.js +1 -1
- package/dist/esm/sparkle-sidebar.entry.js +1 -1
- package/dist/esm/sparkle-tab.entry.js +1 -1
- package/dist/esm/sparkle-table-of-contents.entry.js +1 -1
- package/dist/esm/sparkle-tabs.entry.js +1 -1
- package/dist/esm/sparkle-youtube.entry.js +1 -1
- package/dist/esm/{status-tap-79b6199d.js → status-tap-dde52787.js} +3 -3
- package/dist/esm/stencil-async-content.entry.js +1 -1
- package/dist/esm/stencil-route-title.entry.js +2 -2
- package/dist/esm/stencil-router-prompt.entry.js +2 -2
- package/dist/esm/{student.service-0caed0f4.js → student.service-0746418b.js} +19 -3
- package/dist/esm/{swipe-back-ad7a0361.js → swipe-back-7847a0c1.js} +1 -1
- package/dist/esm/{util-a831d09d.js → util-6ef753e9.js} +1 -1
- package/dist/sparkle-core/index.esm.js +1 -1
- package/dist/sparkle-core/p-00d10dc9.js +4 -0
- package/dist/sparkle-core/p-0147266a.js +1 -0
- package/dist/sparkle-core/{p-9ef14088.entry.js → p-04c7b276.entry.js} +1 -1
- package/dist/sparkle-core/{p-fde96f7c.js → p-05c032dd.js} +1 -1
- package/dist/sparkle-core/{p-4af496a8.entry.js → p-06642405.entry.js} +1 -1
- package/dist/sparkle-core/p-0664370b.entry.js +1 -0
- package/dist/sparkle-core/{p-0b92326d.entry.js → p-06c7d0f2.entry.js} +1 -1
- package/dist/sparkle-core/p-077c732b.js +4 -0
- package/dist/sparkle-core/{p-3c752205.entry.js → p-0ad5c123.entry.js} +1 -1
- package/dist/sparkle-core/p-0afa3a4d.entry.js +1 -0
- package/dist/sparkle-core/{p-e6d39f6e.entry.js → p-0c3f3ea6.entry.js} +1 -1
- package/dist/sparkle-core/{p-8cbe019a.entry.js → p-0f1c5899.entry.js} +1 -1
- package/dist/sparkle-core/{p-767c9db8.entry.js → p-0fa3fd63.entry.js} +1 -1
- package/dist/sparkle-core/p-11356b03.entry.js +1 -0
- package/dist/sparkle-core/{p-506f3c5f.js → p-12dd96d7.js} +2 -2
- package/dist/sparkle-core/p-162bff1a.entry.js +1 -0
- package/dist/sparkle-core/p-1b1ba156.entry.js +1 -0
- package/dist/sparkle-core/{p-966817ec.js → p-1d4c7c11.js} +1 -1
- package/dist/sparkle-core/p-1e125ca5.entry.js +1 -0
- package/dist/sparkle-core/{p-b00d0a47.entry.js → p-1e4782af.entry.js} +1 -1
- package/dist/sparkle-core/p-1e4f65ee.entry.js +1 -0
- package/dist/sparkle-core/{p-1394cbb8.js → p-2033cd86.js} +2 -2
- package/dist/sparkle-core/{p-3ef53ebf.entry.js → p-214d1229.entry.js} +1 -1
- package/dist/sparkle-core/p-23aca7ca.js +4 -0
- package/dist/sparkle-core/p-24cb9a33.entry.js +1 -0
- package/dist/sparkle-core/{p-bae8cd7d.entry.js → p-27fbabc3.entry.js} +1 -1
- package/dist/sparkle-core/{p-d220a642.entry.js → p-2ba70507.entry.js} +1 -1
- package/dist/sparkle-core/{p-4c9e010d.entry.js → p-2c1ca854.entry.js} +1 -1
- package/dist/sparkle-core/p-2d9659e2.entry.js +1 -0
- package/dist/sparkle-core/{p-23d713e2.js → p-2f569553.js} +1 -1
- package/dist/sparkle-core/{p-c9f474d0.js → p-2ff67662.js} +2 -2
- package/dist/sparkle-core/{p-136b93d5.entry.js → p-30b810d1.entry.js} +1 -1
- package/dist/sparkle-core/p-32f4e565.entry.js +1 -0
- package/dist/sparkle-core/{p-7b21bd70.entry.js → p-352677e6.entry.js} +1 -1
- package/dist/sparkle-core/p-370609ba.entry.js +1 -0
- package/dist/sparkle-core/{p-bd2c8e30.entry.js → p-377b04c2.entry.js} +2 -2
- package/dist/sparkle-core/{p-fea20ec2.entry.js → p-38b7cf68.entry.js} +1 -1
- package/dist/sparkle-core/{p-c5eb4404.entry.js → p-3963e02b.entry.js} +1 -1
- package/dist/sparkle-core/{p-9b4979b5.entry.js → p-39712c56.entry.js} +1 -1
- package/dist/sparkle-core/p-3a965828.entry.js +1 -0
- package/dist/sparkle-core/{p-3810777d.js → p-3de0e00c.js} +1 -1
- package/dist/sparkle-core/p-4053ecdb.entry.js +1 -0
- package/dist/sparkle-core/p-462bffba.js +1 -0
- package/dist/sparkle-core/{p-308517b3.js → p-48f72e63.js} +2 -2
- package/dist/sparkle-core/{p-a05871e6.js → p-4c6a7e52.js} +1 -1
- package/dist/sparkle-core/{p-d6637b48.entry.js → p-5096739e.entry.js} +1 -1
- package/dist/sparkle-core/p-5322c920.entry.js +1 -0
- package/dist/sparkle-core/{p-34d93a39.entry.js → p-54dd894f.entry.js} +1 -1
- package/dist/sparkle-core/{p-085eb951.entry.js → p-564e64fc.entry.js} +1 -1
- package/dist/sparkle-core/{p-d0d0e5e5.entry.js → p-5893bbe5.entry.js} +1 -1
- package/dist/sparkle-core/{p-351b82a8.entry.js → p-58e4bbe5.entry.js} +1 -1
- package/dist/sparkle-core/p-590266d6.entry.js +1 -0
- package/dist/sparkle-core/{p-b8ba8164.entry.js → p-594a6982.entry.js} +1 -1
- package/dist/sparkle-core/{p-34ebfc8a.entry.js → p-5c435d5a.entry.js} +1 -1
- package/dist/sparkle-core/{p-a19b42f0.js → p-5cad23f1.js} +1 -1
- package/dist/sparkle-core/p-5efc6566.js +1 -0
- package/dist/sparkle-core/{p-7b3d1457.js → p-600cf6a3.js} +1 -1
- package/dist/sparkle-core/{p-16b7974e.entry.js → p-601397df.entry.js} +1 -1
- package/dist/sparkle-core/{p-dff8325e.js → p-604a7987.js} +1 -1
- package/dist/sparkle-core/{p-58f74119.entry.js → p-616941c6.entry.js} +1 -1
- package/dist/sparkle-core/{p-fe214d79.entry.js → p-6316d124.entry.js} +1 -1
- package/dist/sparkle-core/p-63f71ada.entry.js +1 -0
- package/dist/sparkle-core/p-641bfc92.entry.js +1 -0
- package/dist/sparkle-core/{p-ea4a9f0d.entry.js → p-69487d90.entry.js} +1 -1
- package/dist/sparkle-core/{p-9a383065.entry.js → p-6faa194c.entry.js} +2 -2
- package/dist/sparkle-core/{p-df5efe0d.entry.js → p-6ffd2420.entry.js} +1 -1
- package/dist/sparkle-core/{p-c48352cf.js → p-73721c84.js} +1 -1
- package/dist/sparkle-core/p-74864276.entry.js +1 -0
- package/dist/sparkle-core/p-80d6b0e6.entry.js +1 -0
- package/dist/sparkle-core/p-81714d94.entry.js +1 -0
- package/dist/sparkle-core/p-8492a765.entry.js +1 -0
- package/dist/sparkle-core/p-859563db.entry.js +1 -0
- package/dist/sparkle-core/p-865f36a8.entry.js +1 -0
- package/dist/sparkle-core/{p-280e938d.js → p-86ed13f0.js} +1 -1
- package/dist/sparkle-core/{p-01743e3e.js → p-871106e0.js} +1 -1
- package/dist/sparkle-core/p-894ff7e6.entry.js +1 -0
- package/dist/sparkle-core/p-8a41b502.entry.js +1 -0
- package/dist/sparkle-core/p-8c74cbb6.entry.js +1 -0
- package/dist/sparkle-core/{p-5979f253.entry.js → p-9289cdbc.entry.js} +1 -1
- package/dist/sparkle-core/{p-4bd4dab2.js → p-935e7cfc.js} +1 -1
- package/dist/sparkle-core/{p-6ae9c743.entry.js → p-975b99ee.entry.js} +1 -1
- package/dist/sparkle-core/p-99ee9919.js +1 -0
- package/dist/sparkle-core/{p-0127a61a.entry.js → p-9abbd715.entry.js} +1 -1
- package/dist/sparkle-core/{p-4338e1e3.js → p-9d894ed4.js} +1 -1
- package/dist/sparkle-core/{p-3fd92216.entry.js → p-9e309b3e.entry.js} +1 -1
- package/dist/sparkle-core/p-9e7fee8f.entry.js +1 -0
- package/dist/sparkle-core/{p-d6a3a639.entry.js → p-9ebf0537.entry.js} +1 -1
- package/dist/sparkle-core/p-a102341e.entry.js +1 -0
- package/dist/sparkle-core/{p-06af1bc8.entry.js → p-a2638250.entry.js} +1 -1
- package/dist/sparkle-core/{p-e1743d82.entry.js → p-a2ebcf0a.entry.js} +1 -1
- package/dist/sparkle-core/{p-ba775d8e.entry.js → p-a98d7ebe.entry.js} +1 -1
- package/dist/sparkle-core/p-af3cc111.entry.js +1 -0
- package/dist/sparkle-core/{p-1c2aee9c.js → p-b0603d19.js} +1 -1
- package/dist/sparkle-core/p-b3f375fb.entry.js +1 -0
- package/dist/sparkle-core/p-b5f3e1bf.entry.js +1 -0
- package/dist/sparkle-core/{p-3d2c0e24.entry.js → p-b96f3c84.entry.js} +2 -2
- package/dist/sparkle-core/{p-ed3dfd89.js → p-bd80ff43.js} +2 -2
- package/dist/sparkle-core/p-be64105c.entry.js +1 -0
- package/dist/sparkle-core/{p-defeaa5c.entry.js → p-c0533c23.entry.js} +1 -1
- package/dist/sparkle-core/p-c2990b24.entry.js +1 -0
- package/dist/sparkle-core/p-c3cadfc6.entry.js +1 -0
- package/dist/sparkle-core/{p-5a3de051.entry.js → p-c60b29bd.entry.js} +2 -2
- package/dist/sparkle-core/p-cabfbf22.entry.js +1 -0
- package/dist/sparkle-core/p-cc518c36.entry.js +1 -0
- package/dist/sparkle-core/{p-0c603495.entry.js → p-ce4b22f7.entry.js} +1 -1
- package/dist/sparkle-core/p-cffd4817.entry.js +1 -0
- package/dist/sparkle-core/{p-9cd95e7e.entry.js → p-d0adf726.entry.js} +1 -1
- package/dist/sparkle-core/p-d20e4fcf.entry.js +1 -0
- package/dist/sparkle-core/p-d24e53ab.entry.js +1 -0
- package/dist/sparkle-core/p-d288e6c1.entry.js +1 -0
- package/dist/sparkle-core/{p-785f1879.entry.js → p-d601810e.entry.js} +1 -1
- package/dist/sparkle-core/{p-27075abe.js → p-d68092b7.js} +1 -1
- package/dist/sparkle-core/p-de4deb61.entry.js +1 -0
- package/dist/sparkle-core/{p-d5b8302f.entry.js → p-e249aebf.entry.js} +1 -1
- package/dist/sparkle-core/p-e3e36ce9.entry.js +1 -0
- package/dist/sparkle-core/{p-fdb9a613.entry.js → p-e421d638.entry.js} +1 -1
- package/dist/sparkle-core/{p-c8ad5a5b.entry.js → p-e686d8b5.entry.js} +2 -2
- package/dist/sparkle-core/{p-8d630960.js → p-e8073714.js} +1 -1
- package/dist/sparkle-core/p-e863bf1d.entry.js +1 -0
- package/dist/sparkle-core/{p-efe37368.entry.js → p-e8988989.entry.js} +1 -1
- package/dist/sparkle-core/{p-6a337ad1.entry.js → p-ea962e1b.entry.js} +1 -1
- package/dist/sparkle-core/p-eaf76d1d.entry.js +352 -0
- package/dist/sparkle-core/p-ebd4354b.entry.js +1 -0
- package/dist/sparkle-core/{p-6a5ace01.js → p-ee1e0eb4.js} +1 -1
- package/dist/sparkle-core/{p-1701723e.entry.js → p-ef4edc48.entry.js} +1 -1
- package/dist/sparkle-core/{p-a6c1a55a.entry.js → p-fb0ca75e.entry.js} +1 -1
- package/dist/sparkle-core/{p-0798d46a.entry.js → p-fb757951.entry.js} +1 -1
- package/dist/sparkle-core/{p-ea7d7a3b.js → p-fbccd30c.js} +1 -1
- package/dist/sparkle-core/p-fd8d0738.entry.js +4 -0
- package/dist/sparkle-core/{p-63d8a5b7.entry.js → p-fda95b6e.entry.js} +1 -1
- package/dist/sparkle-core/{p-3eb56165.entry.js → p-fe6dc976.entry.js} +1 -1
- package/dist/sparkle-core/{p-f63a13d8.entry.js → p-ff0e0d4e.entry.js} +1 -1
- package/dist/sparkle-core/sparkle-core.esm.js +1 -1
- package/dist/types/components/sparkle-quiz/sparkle-quiz/sparkle-quiz.d.ts +42 -0
- package/dist/types/components/sparkle-quiz/sparkle-quiz-v1.d.ts +41 -0
- package/dist/types/components/sparkle-quiz/sparkle-quiz.d.ts +36 -36
- package/dist/types/components.d.ts +37 -1
- package/package.json +1 -1
- package/dist/cjs/PrivateRoute-4abc9d29.js +0 -35
- package/dist/cjs/dom-utils-b8befdd5.js +0 -63
- package/dist/cjs/header-mobile-collapse_2.cjs.entry.js +0 -112
- package/dist/cjs/index-70e63f5b.js +0 -3071
- package/dist/cjs/injectHistory-7206bbb9.js +0 -9
- package/dist/cjs/ion-avatar_16.cjs.entry.js +0 -1907
- package/dist/cjs/ion-checkbox_4.cjs.entry.js +0 -360
- package/dist/cjs/ion-col_3.cjs.entry.js +0 -159
- package/dist/cjs/ion-range.cjs.entry.js +0 -515
- package/dist/cjs/ion-text.cjs.entry.js +0 -24
- package/dist/cjs/match-path-84c9f7ca.js +0 -511
- package/dist/cjs/sparkle-card_3.cjs.entry.js +0 -91
- package/dist/cjs/sparkle-course-root.cjs.entry.js +0 -146
- package/dist/cjs/sparkle-dropdown.cjs.entry.js +0 -61
- package/dist/cjs/sparkle-facilitator-header_19.cjs.entry.js +0 -2130
- package/dist/cjs/sparkle-goal-progress.cjs.entry.js +0 -19
- package/dist/cjs/sparkle-gww-item.cjs.entry.js +0 -74
- package/dist/cjs/sparkle-menu-toggle_3.cjs.entry.js +0 -236
- package/dist/cjs/sparkle-validation-error.cjs.entry.js +0 -21
- package/dist/cjs/stencil-route-link.cjs.entry.js +0 -77
- package/dist/cjs/stencil-router-redirect.cjs.entry.js +0 -32
- package/dist/cjs/student.service-d48f1c99.js +0 -61
- package/dist/cjs/user.store-8a049c4e.js +0 -21
- package/dist/esm/PrivateRoute-530ef873.js +0 -33
- package/dist/esm/dom-utils-8e73e88b.js +0 -55
- package/dist/esm/header-mobile-collapse_2.entry.js +0 -107
- package/dist/esm/index-ab1c6a9f.js +0 -3067
- package/dist/esm/injectHistory-4bfff188.js +0 -7
- package/dist/esm/ion-avatar_16.entry.js +0 -1888
- package/dist/esm/ion-checkbox_4.entry.js +0 -353
- package/dist/esm/ion-col_3.entry.js +0 -153
- package/dist/esm/ion-range.entry.js +0 -511
- package/dist/esm/ion-text.entry.js +0 -20
- package/dist/esm/match-path-36fdf5c7.js +0 -499
- package/dist/esm/sparkle-card_3.entry.js +0 -85
- package/dist/esm/sparkle-course-root.entry.js +0 -142
- package/dist/esm/sparkle-dropdown.entry.js +0 -57
- package/dist/esm/sparkle-facilitator-header_19.entry.js +0 -2108
- package/dist/esm/sparkle-goal-progress.entry.js +0 -15
- package/dist/esm/sparkle-gww-item.entry.js +0 -70
- package/dist/esm/sparkle-menu-toggle_3.entry.js +0 -230
- package/dist/esm/sparkle-validation-error.entry.js +0 -17
- package/dist/esm/stencil-route-link.entry.js +0 -73
- package/dist/esm/stencil-router-redirect.entry.js +0 -28
- package/dist/esm/user.store-8477642a.js +0 -19
- package/dist/sparkle-core/p-0d7cceaa.entry.js +0 -1
- package/dist/sparkle-core/p-0d813026.entry.js +0 -1
- package/dist/sparkle-core/p-11ed6b7f.entry.js +0 -1
- package/dist/sparkle-core/p-122427b7.entry.js +0 -1
- package/dist/sparkle-core/p-12c4f45c.entry.js +0 -1
- package/dist/sparkle-core/p-14340143.entry.js +0 -4
- package/dist/sparkle-core/p-14a06a91.entry.js +0 -1
- package/dist/sparkle-core/p-16c81890.entry.js +0 -1
- package/dist/sparkle-core/p-1728ead7.js +0 -1
- package/dist/sparkle-core/p-17aef6f9.js +0 -1
- package/dist/sparkle-core/p-180857a2.entry.js +0 -1
- package/dist/sparkle-core/p-1acc7870.entry.js +0 -1
- package/dist/sparkle-core/p-1cd4c3cc.entry.js +0 -1
- package/dist/sparkle-core/p-21d9833d.js +0 -1
- package/dist/sparkle-core/p-25c13612.entry.js +0 -1
- package/dist/sparkle-core/p-2699868a.entry.js +0 -1
- package/dist/sparkle-core/p-2bd4c60e.js +0 -1
- package/dist/sparkle-core/p-2c89a6c2.entry.js +0 -1
- package/dist/sparkle-core/p-3227afcb.entry.js +0 -1
- package/dist/sparkle-core/p-363a2d6d.js +0 -4
- package/dist/sparkle-core/p-36c48760.entry.js +0 -1
- package/dist/sparkle-core/p-384911d7.entry.js +0 -1
- package/dist/sparkle-core/p-3b618eda.entry.js +0 -1
- package/dist/sparkle-core/p-442eadcf.entry.js +0 -1
- package/dist/sparkle-core/p-4d0dfbc9.js +0 -1
- package/dist/sparkle-core/p-4e0502b8.entry.js +0 -4
- package/dist/sparkle-core/p-524a6174.entry.js +0 -1
- package/dist/sparkle-core/p-53aac9d7.entry.js +0 -1
- package/dist/sparkle-core/p-56700a40.entry.js +0 -1
- package/dist/sparkle-core/p-5722be24.entry.js +0 -1
- package/dist/sparkle-core/p-58389020.entry.js +0 -348
- package/dist/sparkle-core/p-5a850731.entry.js +0 -1
- package/dist/sparkle-core/p-5dcf33fb.entry.js +0 -1
- package/dist/sparkle-core/p-5e8fa1ac.entry.js +0 -1
- package/dist/sparkle-core/p-5ef50959.js +0 -1
- package/dist/sparkle-core/p-615b8f64.entry.js +0 -1
- package/dist/sparkle-core/p-76206f80.entry.js +0 -1
- package/dist/sparkle-core/p-76a6e202.entry.js +0 -1
- package/dist/sparkle-core/p-788735b9.entry.js +0 -1
- package/dist/sparkle-core/p-8e42e634.entry.js +0 -1
- package/dist/sparkle-core/p-8e56f9ee.entry.js +0 -1
- package/dist/sparkle-core/p-8ed0cefb.entry.js +0 -1
- package/dist/sparkle-core/p-9484e34b.entry.js +0 -1
- package/dist/sparkle-core/p-969e98e5.entry.js +0 -1
- package/dist/sparkle-core/p-98f3925b.js +0 -4
- package/dist/sparkle-core/p-99231c00.js +0 -4
- package/dist/sparkle-core/p-9dc42d70.entry.js +0 -1
- package/dist/sparkle-core/p-9eea81f2.js +0 -1
- package/dist/sparkle-core/p-a111c567.entry.js +0 -1
- package/dist/sparkle-core/p-a2f7c751.entry.js +0 -1
- package/dist/sparkle-core/p-a458b415.entry.js +0 -1
- package/dist/sparkle-core/p-ab3a8f5e.entry.js +0 -1
- package/dist/sparkle-core/p-ac0e4d8c.entry.js +0 -1
- package/dist/sparkle-core/p-b2827978.entry.js +0 -1
- package/dist/sparkle-core/p-bb3e3482.entry.js +0 -1
- package/dist/sparkle-core/p-bb575dba.entry.js +0 -1
- package/dist/sparkle-core/p-ca0edc9b.entry.js +0 -1
- package/dist/sparkle-core/p-cb04b18a.entry.js +0 -1
- package/dist/sparkle-core/p-d38a2511.entry.js +0 -1
- package/dist/sparkle-core/p-d5ba8e80.entry.js +0 -1
- package/dist/sparkle-core/p-d6788642.entry.js +0 -1
- package/dist/sparkle-core/p-d86f8633.entry.js +0 -1
- package/dist/sparkle-core/p-df5cfa7f.entry.js +0 -1
- package/dist/sparkle-core/p-e09de7ac.js +0 -1
- package/dist/sparkle-core/p-e28a106d.entry.js +0 -1
- package/dist/sparkle-core/p-e566c0b3.entry.js +0 -1
- package/dist/sparkle-core/p-f187d129.entry.js +0 -1
- package/dist/sparkle-core/p-f5e7bfa5.js +0 -1
- package/dist/sparkle-core/p-fe3a7bca.js +0 -1
- package/dist/sparkle-core/p-ff26d891.entry.js +0 -1
@@ -0,0 +1,105 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
const index = require('./index-51e8292e.js');
|
6
|
+
const assets_service = require('./assets.service-0c759d51.js');
|
7
|
+
const environmentConfig_service = require('./environment-config.service-0e02b049.js');
|
8
|
+
|
9
|
+
const sparkleQuizV1Css = "sparkle-quiz-v1{display:block;font-family:var(--font-family);--sparkle-quiz-question-container-padding:10px 0px;--sparkle-quiz-question-container-margin:0px;--sparkle-quiz-question-text-padding:10px 0px;--sparkle-quiz-option-border:2px solid var(--line-rule-color);--sparkle-quiz-selected-option-border:2px solid var(--text-color--dark);--sparkle-quiz-option-border-radius:4px;--sparkle-quiz-option-padding:5px 10px;--sparkle-quiz-option-width:100%;--sparkle-quiz-error-bg-color:#fbaeae;--sparkle-quiz-success-bg-color:#fbaeae;padding:var(--sparkle-quiz-question-container-padding);margin:var(--sparkle-quiz-question-container-margin)}.question-text{padding:var(--sparkle-quiz-question-text-padding)}.option{padding:5px 0px}.number{padding:0px 14px;border:1px solid #ebebeb;border-radius:4px;margin-right:10px;font-size:14px;width:14px;display:inline-flex;justify-content:center}.feedback-container{padding:10px;border-radius:4px}.incorrect .feedback-container{background-color:var(--sparkle-quiz-error-bg-color, #fbaeae)}.correct .feedback-container{background-color:var(--sparkle-quiz-success-bg-color, #fbaeae)}";
|
10
|
+
|
11
|
+
const SparkleQuizV1 = class {
|
12
|
+
constructor(hostRef) {
|
13
|
+
index.registerInstance(this, hostRef);
|
14
|
+
this.quizAnswerChanged = index.createEvent(this, "quizAnswerChanged", 7);
|
15
|
+
}
|
16
|
+
async loadQuestion() {
|
17
|
+
if (this.quizData) {
|
18
|
+
this.question = this.quizData[+this.questionId];
|
19
|
+
}
|
20
|
+
}
|
21
|
+
async componentWillLoad() {
|
22
|
+
}
|
23
|
+
async componentDidLoad() {
|
24
|
+
const config = environmentConfig_service.EnvironmentConfigService.getInstance().get('sparkle');
|
25
|
+
this.quizData = await assets_service.AssetsService.getInstance().loadJsonFile(config.quizPath);
|
26
|
+
await this.loadQuestion();
|
27
|
+
this.quizAnswerChanged.emit({
|
28
|
+
question: null,
|
29
|
+
answer: "1"
|
30
|
+
});
|
31
|
+
}
|
32
|
+
quizInputChangeHandler(event) {
|
33
|
+
this.quizAnswerChanged.emit({
|
34
|
+
question: event.detail.question,
|
35
|
+
answer: event.detail.value
|
36
|
+
});
|
37
|
+
}
|
38
|
+
quizFeedbackChangeHandler(event) {
|
39
|
+
this.quizAnswerChanged.emit({
|
40
|
+
question: event.detail.question,
|
41
|
+
answer: event.detail.value
|
42
|
+
});
|
43
|
+
}
|
44
|
+
quizSelectChangeHandler(event) {
|
45
|
+
this.quizAnswerChanged.emit({
|
46
|
+
question: event.detail.question,
|
47
|
+
answer: event.detail.value
|
48
|
+
});
|
49
|
+
}
|
50
|
+
quizOpinionChangeHandler(event) {
|
51
|
+
this.quizAnswerChanged.emit({
|
52
|
+
question: event.detail.question,
|
53
|
+
answer: event.detail.value
|
54
|
+
});
|
55
|
+
}
|
56
|
+
getQuestionFeedback() {
|
57
|
+
if (this.question.questionType == "MULTIPLE-CHOICE") {
|
58
|
+
const feedbacks = this.question.options.filter(x => x.correct == true).map(x => x.feedback);
|
59
|
+
return feedbacks.length > 0 && feedbacks.map(feedback => index.h("small", null, feedback));
|
60
|
+
}
|
61
|
+
else if (this.question.questionType == "FEEDBACK" || this.question.questionType == "TEXT") {
|
62
|
+
return this.question.feedback && index.h("small", null, " ", this.question.feedback);
|
63
|
+
}
|
64
|
+
}
|
65
|
+
showAnswerStatus() {
|
66
|
+
return index.h("div", null, this.correct ? index.h("strong", null, "Good job!") : index.h("strong", null, "Incorrect answer, please try again."));
|
67
|
+
}
|
68
|
+
renderQuestion() {
|
69
|
+
if (this.question.questionType == "MULTIPLE-CHOICE") {
|
70
|
+
return index.h("sparkle-quiz-select", { question: this.question, allowMultiple: true });
|
71
|
+
}
|
72
|
+
else if (this.question.questionType == "FEEDBACK") {
|
73
|
+
return index.h("sparkle-quiz-feedback", { question: this.question });
|
74
|
+
}
|
75
|
+
else if (this.question.questionType == "TEXT") {
|
76
|
+
return index.h("sparkle-quiz-input", { question: this.question });
|
77
|
+
}
|
78
|
+
else if (this.question.questionType == "OPINION") {
|
79
|
+
return index.h("sparkle-quiz-opinion", { question: this.question });
|
80
|
+
}
|
81
|
+
else if (this.question.questionType == "POLL") {
|
82
|
+
return index.h("sparkle-quiz-poll", { question: this.question });
|
83
|
+
}
|
84
|
+
}
|
85
|
+
render() {
|
86
|
+
if (this.question) {
|
87
|
+
let classes = {
|
88
|
+
'correct': this.submitted && this.correct,
|
89
|
+
'incorrect': this.submitted && !this.correct
|
90
|
+
};
|
91
|
+
return index.h("div", { class: classes }, this.renderQuestion(), this.submitted && this.showInstantResult && index.h("div", { class: "feedback-container" }, [this.showAnswerStatus(),
|
92
|
+
this.getQuestionFeedback()]));
|
93
|
+
}
|
94
|
+
else {
|
95
|
+
return index.h("p", null, "No question found.");
|
96
|
+
}
|
97
|
+
}
|
98
|
+
get el() { return index.getElement(this); }
|
99
|
+
static get watchers() { return {
|
100
|
+
"questionId": ["loadQuestion"]
|
101
|
+
}; }
|
102
|
+
};
|
103
|
+
SparkleQuizV1.style = sparkleQuizV1Css;
|
104
|
+
|
105
|
+
exports.sparkle_quiz_v1 = SparkleQuizV1;
|
@@ -3,8 +3,6 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-51e8292e.js');
|
6
|
-
const assets_service = require('./assets.service-0c759d51.js');
|
7
|
-
const environmentConfig_service = require('./environment-config.service-0e02b049.js');
|
8
6
|
|
9
7
|
const sparkleQuizCss = "sparkle-quiz{display:block;font-family:var(--font-family);--sparkle-quiz-question-container-padding:10px 0px;--sparkle-quiz-question-container-margin:0px;--sparkle-quiz-question-text-padding:10px 0px;--sparkle-quiz-option-border:2px solid var(--line-rule-color);--sparkle-quiz-selected-option-border:2px solid var(--text-color--dark);--sparkle-quiz-option-border-radius:4px;--sparkle-quiz-option-padding:5px 10px;--sparkle-quiz-option-width:100%;--sparkle-quiz-error-bg-color:#fbaeae;--sparkle-quiz-success-bg-color:#fbaeae;padding:var(--sparkle-quiz-question-container-padding);margin:var(--sparkle-quiz-question-container-margin)}.question-text{padding:var(--sparkle-quiz-question-text-padding)}.option{padding:5px 0px}.number{padding:0px 14px;border:1px solid #ebebeb;border-radius:4px;margin-right:10px;font-size:14px;width:14px;display:inline-flex;justify-content:center}.feedback-container{padding:10px;border-radius:4px}.incorrect .feedback-container{background-color:var(--sparkle-quiz-error-bg-color, #fbaeae)}.correct .feedback-container{background-color:var(--sparkle-quiz-success-bg-color, #fbaeae)}";
|
10
8
|
|
@@ -12,93 +10,109 @@ const SparkleQuiz = class {
|
|
12
10
|
constructor(hostRef) {
|
13
11
|
index.registerInstance(this, hostRef);
|
14
12
|
this.quizAnswerChanged = index.createEvent(this, "quizAnswerChanged", 7);
|
13
|
+
this.type = 'TEXT';
|
14
|
+
this.scale = 'FIVE-POINTS';
|
15
|
+
this.options = [];
|
15
16
|
}
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
}
|
17
|
+
// private pageInfo: any;
|
18
|
+
// @Watch('questionId')
|
19
|
+
// async loadQuestion() {
|
20
|
+
// if (this.quizData) {
|
21
|
+
// this.question = this.quizData[+this.questionId];
|
22
|
+
// }
|
23
|
+
// }
|
24
|
+
//@State() question: SparkleQuizQuestion;
|
25
|
+
//@State() quizData: { [key: string]: SparkleQuizQuestion };
|
26
|
+
async componentWillLoad() { }
|
23
27
|
async componentDidLoad() {
|
24
|
-
|
25
|
-
this.
|
26
|
-
|
28
|
+
this.options = [];
|
29
|
+
if (this.el.querySelector("[slot='options']")) {
|
30
|
+
Array.from(this.el.querySelector("[slot='options']").querySelectorAll('option')).forEach(el => {
|
31
|
+
this.options = [...this.options, { option: el.innerText }];
|
32
|
+
});
|
33
|
+
}
|
27
34
|
this.quizAnswerChanged.emit({
|
28
35
|
question: null,
|
29
|
-
answer:
|
36
|
+
answer: '1',
|
30
37
|
});
|
31
38
|
}
|
32
39
|
quizInputChangeHandler(event) {
|
33
40
|
this.quizAnswerChanged.emit({
|
34
41
|
question: event.detail.question,
|
35
|
-
answer: event.detail.value
|
42
|
+
answer: event.detail.value,
|
36
43
|
});
|
37
44
|
}
|
38
45
|
quizFeedbackChangeHandler(event) {
|
39
46
|
this.quizAnswerChanged.emit({
|
40
47
|
question: event.detail.question,
|
41
|
-
answer: event.detail.value
|
48
|
+
answer: event.detail.value,
|
42
49
|
});
|
43
50
|
}
|
44
51
|
quizSelectChangeHandler(event) {
|
45
52
|
this.quizAnswerChanged.emit({
|
46
53
|
question: event.detail.question,
|
47
|
-
answer: event.detail.value
|
54
|
+
answer: event.detail.value,
|
48
55
|
});
|
49
56
|
}
|
50
57
|
quizOpinionChangeHandler(event) {
|
51
58
|
this.quizAnswerChanged.emit({
|
52
59
|
question: event.detail.question,
|
53
|
-
answer: event.detail.value
|
60
|
+
answer: event.detail.value,
|
54
61
|
});
|
55
62
|
}
|
56
63
|
getQuestionFeedback() {
|
57
|
-
if (this.
|
58
|
-
const feedbacks = this.question.options.filter(x => x.correct == true).map(x => x.feedback);
|
59
|
-
return feedbacks.length > 0 && feedbacks.map(feedback =>
|
64
|
+
if (this.type == 'MULTIPLE-CHOICE') {
|
65
|
+
// const feedbacks = this.question.options.filter(x => x.correct == true).map(x => x.feedback);
|
66
|
+
// return feedbacks.length > 0 && feedbacks.map(feedback => <small>{feedback}</small>);
|
67
|
+
return index.h("small", null);
|
60
68
|
}
|
61
|
-
else if (this.
|
62
|
-
return this.
|
69
|
+
else if (this.type == 'FEEDBACK' || this.type == 'TEXT') {
|
70
|
+
return this.feedback && index.h("small", null, " ", this.feedback);
|
63
71
|
}
|
64
72
|
}
|
65
73
|
showAnswerStatus() {
|
66
74
|
return index.h("div", null, this.correct ? index.h("strong", null, "Good job!") : index.h("strong", null, "Incorrect answer, please try again."));
|
67
75
|
}
|
68
76
|
renderQuestion() {
|
69
|
-
|
70
|
-
|
77
|
+
var question = {
|
78
|
+
questionId: this.questionId,
|
79
|
+
questionText: this.questionText,
|
80
|
+
questionType: this.type,
|
81
|
+
scale: this.scale,
|
82
|
+
showOptionNumber: this.showOptionNumber,
|
83
|
+
options: this.options,
|
84
|
+
//options: Array<SparkleQuizQuestionOption>;
|
85
|
+
feedback: this.feedback,
|
86
|
+
};
|
87
|
+
if (this.type == 'MULTIPLE-CHOICE') {
|
88
|
+
return index.h("sparkle-quiz-select", { question: question, allowMultiple: true });
|
71
89
|
}
|
72
|
-
else if (this.
|
73
|
-
return index.h("sparkle-quiz-feedback", { question:
|
90
|
+
else if (this.type == 'FEEDBACK') {
|
91
|
+
return index.h("sparkle-quiz-feedback", { question: question });
|
74
92
|
}
|
75
|
-
else if (this.
|
76
|
-
return index.h("sparkle-quiz-input", { question:
|
93
|
+
else if (this.type == 'TEXT') {
|
94
|
+
return index.h("sparkle-quiz-input", { question: question });
|
77
95
|
}
|
78
|
-
else if (this.
|
79
|
-
return index.h("sparkle-quiz-opinion", { question:
|
96
|
+
else if (this.type == 'OPINION') {
|
97
|
+
return index.h("sparkle-quiz-opinion", { question: question });
|
80
98
|
}
|
81
|
-
else if (this.
|
82
|
-
return index.h("sparkle-quiz-poll", { question:
|
99
|
+
else if (this.type == 'POLL') {
|
100
|
+
return index.h("sparkle-quiz-poll", { question: question });
|
83
101
|
}
|
84
102
|
}
|
85
103
|
render() {
|
86
|
-
if (this.
|
104
|
+
if (this.questionText) {
|
87
105
|
let classes = {
|
88
|
-
|
89
|
-
|
106
|
+
correct: this.submitted && this.correct,
|
107
|
+
incorrect: this.submitted && !this.correct,
|
90
108
|
};
|
91
|
-
return index.h("div", { class: classes }, this.renderQuestion(), this.submitted && this.showInstantResult && index.h("div", { class: "feedback-container" }, [this.showAnswerStatus(),
|
92
|
-
this.getQuestionFeedback()]));
|
109
|
+
return (index.h("div", { class: classes, ref: el => (this.containerRef = el) }, index.h("div", null, index.h("slot", null)), this.renderQuestion(), this.submitted && this.showInstantResult && index.h("div", { class: "feedback-container" }, [this.showAnswerStatus(), this.getQuestionFeedback()])));
|
93
110
|
}
|
94
111
|
else {
|
95
112
|
return index.h("p", null, "No question found.");
|
96
113
|
}
|
97
114
|
}
|
98
115
|
get el() { return index.getElement(this); }
|
99
|
-
static get watchers() { return {
|
100
|
-
"questionId": ["loadQuestion"]
|
101
|
-
}; }
|
102
116
|
};
|
103
117
|
SparkleQuiz.style = sparkleQuizCss;
|
104
118
|
|
@@ -0,0 +1,78 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
const httpService = require('./httpService-7211d93b.js');
|
4
|
+
const auth_store = require('./auth.store-1e630a7d.js');
|
5
|
+
|
6
|
+
const { state, onChange, reset } = auth_store.createStore({
|
7
|
+
user: {
|
8
|
+
FirstName: '',
|
9
|
+
LastName: '',
|
10
|
+
ProfileText: '',
|
11
|
+
ProfileImage: '',
|
12
|
+
IsVerified: false,
|
13
|
+
Roles: [],
|
14
|
+
FacilitatorClassList: []
|
15
|
+
},
|
16
|
+
loaded: false,
|
17
|
+
updateLoading: false,
|
18
|
+
enrollmentList: [],
|
19
|
+
});
|
20
|
+
const userStore = { state, onChange, reset };
|
21
|
+
|
22
|
+
class StudentService {
|
23
|
+
constructor() { }
|
24
|
+
static getInstance() {
|
25
|
+
if (!StudentService.instance) {
|
26
|
+
StudentService.instance = new StudentService();
|
27
|
+
}
|
28
|
+
return StudentService.instance;
|
29
|
+
}
|
30
|
+
async enrollClass(enrollInput) {
|
31
|
+
let result = await httpService.HttpService.http.post('api/v1/Student/EnrollClass', enrollInput);
|
32
|
+
if (result) {
|
33
|
+
userStore.state.enrollmentList = [
|
34
|
+
...userStore.state.enrollmentList,
|
35
|
+
result.Data
|
36
|
+
];
|
37
|
+
}
|
38
|
+
return result;
|
39
|
+
}
|
40
|
+
async leaveClass(leaveInput) {
|
41
|
+
let result = await httpService.HttpService.http.post('api/v1/Student/LeaveClass', leaveInput);
|
42
|
+
if (result) {
|
43
|
+
userStore.state.enrollmentList = userStore.state.enrollmentList.filter((item) => item.Id != result.Data);
|
44
|
+
}
|
45
|
+
return result;
|
46
|
+
}
|
47
|
+
async fetchUserConfiguration() {
|
48
|
+
let result = await httpService.HttpService.http.get('api/v1/Student/UserConfiguration');
|
49
|
+
if (result) {
|
50
|
+
userStore.state.enrollmentList = result.Data.EnrollmentList;
|
51
|
+
userStore.state.user.FirstName = result.Data.FirstName;
|
52
|
+
userStore.state.user.LastName = result.Data.LastName;
|
53
|
+
userStore.state.user.ProfileText = result.Data.ProfileText;
|
54
|
+
userStore.state.user.ProfileImage = result.Data.ProfileImage;
|
55
|
+
userStore.state.user.IsVerified = result.Data.IsVerified;
|
56
|
+
userStore.state.user.Roles = result.Data.Roles;
|
57
|
+
userStore.state.user.FacilitatorClassList = result.Data.FacilitatorClassList;
|
58
|
+
}
|
59
|
+
return result;
|
60
|
+
}
|
61
|
+
async updateProfile(updateProfileInput) {
|
62
|
+
userStore.state.updateLoading = true;
|
63
|
+
let result = await httpService.HttpService.http.post('api/Account/update-profile', updateProfileInput);
|
64
|
+
console.log('after fetch', result);
|
65
|
+
if (result) {
|
66
|
+
userStore.state.updateLoading = false;
|
67
|
+
userStore.state.user = Object.assign(Object.assign({}, userStore.state.user), { FirstName: result.Data.FirstName, LastName: result.Data.LastName, ProfileText: result.Data.ProfileText, ProfileImage: result.Data.ProfileImage });
|
68
|
+
}
|
69
|
+
return result;
|
70
|
+
}
|
71
|
+
async submitFeedback(feedbackInput) {
|
72
|
+
let result = await httpService.HttpService.http.post('api/v1/Feedback', feedbackInput);
|
73
|
+
return result;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
exports.StudentService = StudentService;
|
78
|
+
exports.userStore = userStore;
|
@@ -32,7 +32,8 @@
|
|
32
32
|
"./components/sparkle-intro/sparkle-intro.js",
|
33
33
|
"./components/sparkle-login/sparkle-login.js",
|
34
34
|
"./components/sparkle-poll/sparkle-poll.js",
|
35
|
-
"./components/sparkle-quiz/sparkle-quiz.js",
|
35
|
+
"./components/sparkle-quiz/sparkle-quiz-v1.js",
|
36
|
+
"./components/sparkle-quiz/sparkle-quiz/sparkle-quiz.js",
|
36
37
|
"./components/sparkle-quiz/sparkle-quiz-feedback/sparkle-quiz-feedback.js",
|
37
38
|
"./components/sparkle-quiz/sparkle-quiz-input/sparkle-quiz-input.js",
|
38
39
|
"./components/sparkle-quiz/sparkle-quiz-opinion/sparkle-quiz-opinion.js",
|
package/dist/collection/components/sparkle-quiz/{sparkle-quiz.css → sparkle-quiz/sparkle-quiz.css}
RENAMED
File without changes
|
@@ -0,0 +1,326 @@
|
|
1
|
+
import { Component, Prop, Listen, State, Event, Element, h } from '@stencil/core';
|
2
|
+
export class SparkleQuiz {
|
3
|
+
constructor() {
|
4
|
+
this.type = 'TEXT';
|
5
|
+
this.scale = 'FIVE-POINTS';
|
6
|
+
this.options = [];
|
7
|
+
}
|
8
|
+
// private pageInfo: any;
|
9
|
+
// @Watch('questionId')
|
10
|
+
// async loadQuestion() {
|
11
|
+
// if (this.quizData) {
|
12
|
+
// this.question = this.quizData[+this.questionId];
|
13
|
+
// }
|
14
|
+
// }
|
15
|
+
//@State() question: SparkleQuizQuestion;
|
16
|
+
//@State() quizData: { [key: string]: SparkleQuizQuestion };
|
17
|
+
async componentWillLoad() { }
|
18
|
+
async componentDidLoad() {
|
19
|
+
this.options = [];
|
20
|
+
if (this.el.querySelector("[slot='options']")) {
|
21
|
+
Array.from(this.el.querySelector("[slot='options']").querySelectorAll('option')).forEach(el => {
|
22
|
+
this.options = [...this.options, { option: el.innerText }];
|
23
|
+
});
|
24
|
+
}
|
25
|
+
this.quizAnswerChanged.emit({
|
26
|
+
question: null,
|
27
|
+
answer: '1',
|
28
|
+
});
|
29
|
+
}
|
30
|
+
quizInputChangeHandler(event) {
|
31
|
+
this.quizAnswerChanged.emit({
|
32
|
+
question: event.detail.question,
|
33
|
+
answer: event.detail.value,
|
34
|
+
});
|
35
|
+
}
|
36
|
+
quizFeedbackChangeHandler(event) {
|
37
|
+
this.quizAnswerChanged.emit({
|
38
|
+
question: event.detail.question,
|
39
|
+
answer: event.detail.value,
|
40
|
+
});
|
41
|
+
}
|
42
|
+
quizSelectChangeHandler(event) {
|
43
|
+
this.quizAnswerChanged.emit({
|
44
|
+
question: event.detail.question,
|
45
|
+
answer: event.detail.value,
|
46
|
+
});
|
47
|
+
}
|
48
|
+
quizOpinionChangeHandler(event) {
|
49
|
+
this.quizAnswerChanged.emit({
|
50
|
+
question: event.detail.question,
|
51
|
+
answer: event.detail.value,
|
52
|
+
});
|
53
|
+
}
|
54
|
+
getQuestionFeedback() {
|
55
|
+
if (this.type == 'MULTIPLE-CHOICE') {
|
56
|
+
// const feedbacks = this.question.options.filter(x => x.correct == true).map(x => x.feedback);
|
57
|
+
// return feedbacks.length > 0 && feedbacks.map(feedback => <small>{feedback}</small>);
|
58
|
+
return h("small", null);
|
59
|
+
}
|
60
|
+
else if (this.type == 'FEEDBACK' || this.type == 'TEXT') {
|
61
|
+
return this.feedback && h("small", null,
|
62
|
+
" ",
|
63
|
+
this.feedback);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
showAnswerStatus() {
|
67
|
+
return h("div", null, this.correct ? h("strong", null, "Good job!") : h("strong", null, "Incorrect answer, please try again."));
|
68
|
+
}
|
69
|
+
renderQuestion() {
|
70
|
+
var question = {
|
71
|
+
questionId: this.questionId,
|
72
|
+
questionText: this.questionText,
|
73
|
+
questionType: this.type,
|
74
|
+
scale: this.scale,
|
75
|
+
showOptionNumber: this.showOptionNumber,
|
76
|
+
options: this.options,
|
77
|
+
//options: Array<SparkleQuizQuestionOption>;
|
78
|
+
feedback: this.feedback,
|
79
|
+
};
|
80
|
+
if (this.type == 'MULTIPLE-CHOICE') {
|
81
|
+
return h("sparkle-quiz-select", { question: question, allowMultiple: true });
|
82
|
+
}
|
83
|
+
else if (this.type == 'FEEDBACK') {
|
84
|
+
return h("sparkle-quiz-feedback", { question: question });
|
85
|
+
}
|
86
|
+
else if (this.type == 'TEXT') {
|
87
|
+
return h("sparkle-quiz-input", { question: question });
|
88
|
+
}
|
89
|
+
else if (this.type == 'OPINION') {
|
90
|
+
return h("sparkle-quiz-opinion", { question: question });
|
91
|
+
}
|
92
|
+
else if (this.type == 'POLL') {
|
93
|
+
return h("sparkle-quiz-poll", { question: question });
|
94
|
+
}
|
95
|
+
}
|
96
|
+
render() {
|
97
|
+
if (this.questionText) {
|
98
|
+
let classes = {
|
99
|
+
correct: this.submitted && this.correct,
|
100
|
+
incorrect: this.submitted && !this.correct,
|
101
|
+
};
|
102
|
+
return (h("div", { class: classes, ref: el => (this.containerRef = el) },
|
103
|
+
h("div", null,
|
104
|
+
h("slot", null)),
|
105
|
+
this.renderQuestion(),
|
106
|
+
this.submitted && this.showInstantResult && h("div", { class: "feedback-container" }, [this.showAnswerStatus(), this.getQuestionFeedback()])));
|
107
|
+
}
|
108
|
+
else {
|
109
|
+
return h("p", null, "No question found.");
|
110
|
+
}
|
111
|
+
}
|
112
|
+
static get is() { return "sparkle-quiz"; }
|
113
|
+
static get originalStyleUrls() { return {
|
114
|
+
"$": ["sparkle-quiz.scss"]
|
115
|
+
}; }
|
116
|
+
static get styleUrls() { return {
|
117
|
+
"$": ["sparkle-quiz.css"]
|
118
|
+
}; }
|
119
|
+
static get properties() { return {
|
120
|
+
"questionId": {
|
121
|
+
"type": "number",
|
122
|
+
"mutable": false,
|
123
|
+
"complexType": {
|
124
|
+
"original": "number",
|
125
|
+
"resolved": "number",
|
126
|
+
"references": {}
|
127
|
+
},
|
128
|
+
"required": false,
|
129
|
+
"optional": false,
|
130
|
+
"docs": {
|
131
|
+
"tags": [],
|
132
|
+
"text": ""
|
133
|
+
},
|
134
|
+
"attribute": "question-id",
|
135
|
+
"reflect": false
|
136
|
+
},
|
137
|
+
"type": {
|
138
|
+
"type": "string",
|
139
|
+
"mutable": false,
|
140
|
+
"complexType": {
|
141
|
+
"original": "'MULTIPLE-CHOICE' | 'TEXT' | 'FEEDBACK' | 'OPINION' | 'POLL'",
|
142
|
+
"resolved": "\"FEEDBACK\" | \"MULTIPLE-CHOICE\" | \"OPINION\" | \"POLL\" | \"TEXT\"",
|
143
|
+
"references": {}
|
144
|
+
},
|
145
|
+
"required": false,
|
146
|
+
"optional": false,
|
147
|
+
"docs": {
|
148
|
+
"tags": [],
|
149
|
+
"text": ""
|
150
|
+
},
|
151
|
+
"attribute": "type",
|
152
|
+
"reflect": false,
|
153
|
+
"defaultValue": "'TEXT'"
|
154
|
+
},
|
155
|
+
"scale": {
|
156
|
+
"type": "string",
|
157
|
+
"mutable": false,
|
158
|
+
"complexType": {
|
159
|
+
"original": "'FIVE-POINTS' | 'TEN-POINTS'",
|
160
|
+
"resolved": "\"FIVE-POINTS\" | \"TEN-POINTS\"",
|
161
|
+
"references": {}
|
162
|
+
},
|
163
|
+
"required": false,
|
164
|
+
"optional": false,
|
165
|
+
"docs": {
|
166
|
+
"tags": [],
|
167
|
+
"text": ""
|
168
|
+
},
|
169
|
+
"attribute": "scale",
|
170
|
+
"reflect": false,
|
171
|
+
"defaultValue": "'FIVE-POINTS'"
|
172
|
+
},
|
173
|
+
"questionText": {
|
174
|
+
"type": "string",
|
175
|
+
"mutable": false,
|
176
|
+
"complexType": {
|
177
|
+
"original": "string",
|
178
|
+
"resolved": "string",
|
179
|
+
"references": {}
|
180
|
+
},
|
181
|
+
"required": false,
|
182
|
+
"optional": false,
|
183
|
+
"docs": {
|
184
|
+
"tags": [],
|
185
|
+
"text": ""
|
186
|
+
},
|
187
|
+
"attribute": "question-text",
|
188
|
+
"reflect": false
|
189
|
+
},
|
190
|
+
"showOptionNumber": {
|
191
|
+
"type": "boolean",
|
192
|
+
"mutable": false,
|
193
|
+
"complexType": {
|
194
|
+
"original": "boolean",
|
195
|
+
"resolved": "boolean",
|
196
|
+
"references": {}
|
197
|
+
},
|
198
|
+
"required": false,
|
199
|
+
"optional": false,
|
200
|
+
"docs": {
|
201
|
+
"tags": [],
|
202
|
+
"text": ""
|
203
|
+
},
|
204
|
+
"attribute": "show-option-number",
|
205
|
+
"reflect": false
|
206
|
+
},
|
207
|
+
"submitted": {
|
208
|
+
"type": "boolean",
|
209
|
+
"mutable": false,
|
210
|
+
"complexType": {
|
211
|
+
"original": "boolean",
|
212
|
+
"resolved": "boolean",
|
213
|
+
"references": {}
|
214
|
+
},
|
215
|
+
"required": false,
|
216
|
+
"optional": false,
|
217
|
+
"docs": {
|
218
|
+
"tags": [],
|
219
|
+
"text": ""
|
220
|
+
},
|
221
|
+
"attribute": "submitted",
|
222
|
+
"reflect": false
|
223
|
+
},
|
224
|
+
"correct": {
|
225
|
+
"type": "boolean",
|
226
|
+
"mutable": false,
|
227
|
+
"complexType": {
|
228
|
+
"original": "boolean",
|
229
|
+
"resolved": "boolean",
|
230
|
+
"references": {}
|
231
|
+
},
|
232
|
+
"required": false,
|
233
|
+
"optional": false,
|
234
|
+
"docs": {
|
235
|
+
"tags": [],
|
236
|
+
"text": ""
|
237
|
+
},
|
238
|
+
"attribute": "correct",
|
239
|
+
"reflect": false
|
240
|
+
},
|
241
|
+
"feedback": {
|
242
|
+
"type": "string",
|
243
|
+
"mutable": false,
|
244
|
+
"complexType": {
|
245
|
+
"original": "string",
|
246
|
+
"resolved": "string",
|
247
|
+
"references": {}
|
248
|
+
},
|
249
|
+
"required": false,
|
250
|
+
"optional": false,
|
251
|
+
"docs": {
|
252
|
+
"tags": [],
|
253
|
+
"text": ""
|
254
|
+
},
|
255
|
+
"attribute": "feedback",
|
256
|
+
"reflect": false
|
257
|
+
},
|
258
|
+
"showInstantResult": {
|
259
|
+
"type": "boolean",
|
260
|
+
"mutable": false,
|
261
|
+
"complexType": {
|
262
|
+
"original": "boolean",
|
263
|
+
"resolved": "boolean",
|
264
|
+
"references": {}
|
265
|
+
},
|
266
|
+
"required": false,
|
267
|
+
"optional": false,
|
268
|
+
"docs": {
|
269
|
+
"tags": [],
|
270
|
+
"text": ""
|
271
|
+
},
|
272
|
+
"attribute": "show-instant-result",
|
273
|
+
"reflect": false
|
274
|
+
}
|
275
|
+
}; }
|
276
|
+
static get states() { return {
|
277
|
+
"options": {}
|
278
|
+
}; }
|
279
|
+
static get events() { return [{
|
280
|
+
"method": "quizAnswerChanged",
|
281
|
+
"name": "quizAnswerChanged",
|
282
|
+
"bubbles": true,
|
283
|
+
"cancelable": true,
|
284
|
+
"composed": true,
|
285
|
+
"docs": {
|
286
|
+
"tags": [],
|
287
|
+
"text": ""
|
288
|
+
},
|
289
|
+
"complexType": {
|
290
|
+
"original": "{ answer: any; question: SparkleQuizQuestion }",
|
291
|
+
"resolved": "{ answer: any; question: SparkleQuizQuestion; }",
|
292
|
+
"references": {
|
293
|
+
"SparkleQuizQuestion": {
|
294
|
+
"location": "import",
|
295
|
+
"path": "../../../models/quiz.model"
|
296
|
+
}
|
297
|
+
}
|
298
|
+
}
|
299
|
+
}]; }
|
300
|
+
static get elementRef() { return "el"; }
|
301
|
+
static get listeners() { return [{
|
302
|
+
"name": "quizInputChange",
|
303
|
+
"method": "quizInputChangeHandler",
|
304
|
+
"target": undefined,
|
305
|
+
"capture": false,
|
306
|
+
"passive": false
|
307
|
+
}, {
|
308
|
+
"name": "quizFeedbackChange",
|
309
|
+
"method": "quizFeedbackChangeHandler",
|
310
|
+
"target": undefined,
|
311
|
+
"capture": false,
|
312
|
+
"passive": false
|
313
|
+
}, {
|
314
|
+
"name": "quizSelectChange",
|
315
|
+
"method": "quizSelectChangeHandler",
|
316
|
+
"target": undefined,
|
317
|
+
"capture": false,
|
318
|
+
"passive": false
|
319
|
+
}, {
|
320
|
+
"name": "quizOpinionChange",
|
321
|
+
"method": "quizOpinionChangeHandler",
|
322
|
+
"target": undefined,
|
323
|
+
"capture": false,
|
324
|
+
"passive": false
|
325
|
+
}]; }
|
326
|
+
}
|