@sparkle-learning/core 0.0.35 → 0.0.38
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/{header-mobile-collapse_2.cjs.entry.js → header-mobile-collapse.cjs.entry.js} +0 -22
- package/dist/cjs/ion-avatar.cjs.entry.js +25 -0
- package/dist/cjs/ion-button.cjs.entry.js +129 -0
- package/dist/cjs/ion-card-title.cjs.entry.js +30 -0
- package/dist/cjs/ion-card_2.cjs.entry.js +91 -0
- package/dist/cjs/ion-icon_13.cjs.entry.js +1505 -0
- package/dist/cjs/ion-input_2.cjs.entry.js +313 -0
- package/dist/cjs/ion-label_2.cjs.entry.js +126 -0
- package/dist/cjs/ion-spinner.cjs.entry.js +64 -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-quiz.cjs.entry.js → sparkle-quiz-v1.cjs.entry.js} +4 -4
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/sparkle-feed-post/sparkle-feed-post.js +30 -28
- 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 +327 -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/{PrivateRoute-530ef873.js → PrivateRoute-7b526801.js} +2 -2
- package/dist/esm/{active-router-9843e205.js → active-router-fc9e4e06.js} +1 -1
- package/dist/esm/{animation-d98d3e81.js → animation-e0716b39.js} +1 -1
- package/dist/esm/{app-globals-08edc964.js → app-globals-3f0347b0.js} +1 -1
- package/dist/esm/{auth.service-79389d86.js → auth.service-9fb86455.js} +3 -3
- package/dist/esm/{auth.store-b812b34b.js → auth.store-633e8414.js} +1 -1
- 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/{dom-utils-8e73e88b.js → dom-utils-109a7d75.js} +1 -1
- package/dist/esm/{facilitator.service-7babc526.js → facilitator.service-8fd435bf.js} +2 -2
- package/dist/esm/{feed.service-80fbe79d.js → feed.service-ace049e5.js} +2 -2
- package/dist/esm/{framework-delegate-9b329182.js → framework-delegate-e4f8013b.js} +1 -1
- package/dist/esm/{haptic-3a76a65c.js → haptic-522f76f2.js} +1 -1
- package/dist/esm/{header-mobile-collapse_2.entry.js → header-mobile-collapse.entry.js} +3 -24
- package/dist/esm/{helpers-94a5855b.js → helpers-03073fe4.js} +1 -1
- package/dist/esm/{httpService-b2b7a1ad.js → httpService-61864992.js} +2 -2
- package/dist/esm/{icons-16f1a80b.js → icons-90b957ab.js} +1 -1
- package/dist/esm/{index-c23a1826.js → index-37004831.js} +2 -2
- package/dist/esm/{index-4ec6b9c2.js → index-4044fde9.js} +1 -1
- package/dist/esm/{index-230a26c9.js → index-a2d2941d.js} +1 -1
- package/dist/esm/{index-478745be.js → index-b4b4e503.js} +4 -4
- package/dist/esm/{index-9db08224.js → index-c04b9ed5.js} +1 -1
- package/dist/esm/{index-95307148.js → index-dedabca0.js} +3 -3
- package/dist/esm/{index-ab1c6a9f.js → index-f9b9ba5d.js} +2 -2
- package/dist/esm/{index.es-1c3b1ef3.js → index.es-283fbd2e.js} +2 -2
- package/dist/esm/index.js +8 -8
- package/dist/esm/{injectHistory-4bfff188.js → injectHistory-968f626d.js} +1 -1
- package/dist/esm/{input-shims-ce5c01df.js → input-shims-cc3720a0.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-avatar.entry.js +21 -0
- 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-button.entry.js +125 -0
- 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-card_2.entry.js +86 -0
- package/dist/esm/ion-checkbox_4.entry.js +3 -3
- package/dist/esm/ion-chip.entry.js +2 -2
- package/dist/esm/ion-col_3.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-icon_13.entry.js +1489 -0
- 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-input_2.entry.js +308 -0
- 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-label_2.entry.js +121 -0
- 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-spinner.entry.js +60 -0
- 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-3a6179bb.js} +4 -4
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{md.transition-2589a5b1.js → md.transition-cff16bf3.js} +4 -4
- package/dist/esm/{menu-toggle-util-f92ba2f0.js → menu-toggle-util-59241733.js} +1 -1
- package/dist/esm/{overlays-dfa730c8.js → overlays-bdd9344a.js} +2 -2
- package/dist/esm/{purify-79af871f.js → purify-7085b248.js} +1 -1
- package/dist/esm/sparkle-animation-player.entry.js +1 -1
- package/dist/esm/sparkle-card_3.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-course-root.entry.js +11 -11
- package/dist/esm/sparkle-dropdown.entry.js +2 -2
- package/dist/esm/sparkle-emoji.entry.js +1 -1
- package/dist/esm/sparkle-export-lessons_6.entry.js +11 -11
- package/dist/esm/sparkle-facilitator-header_19.entry.js +17 -17
- 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 +8 -8
- package/dist/esm/sparkle-goal-form.entry.js +7 -7
- package/dist/esm/sparkle-goal-progress.entry.js +1 -1
- 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-gww-item.entry.js +4 -4
- 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-menu-toggle_3.entry.js +3 -3
- 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.entry.js → sparkle-quiz-v1.entry.js} +5 -5
- 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-validation-error.entry.js +1 -1
- package/dist/esm/sparkle-youtube.entry.js +1 -1
- package/dist/esm/{status-tap-79b6199d.js → status-tap-463d0f87.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/stencil-router-redirect.entry.js +2 -2
- package/dist/esm/{student.service-0caed0f4.js → student.service-e6eb1f99.js} +2 -2
- package/dist/esm/{swipe-back-ad7a0361.js → swipe-back-f8765ac9.js} +1 -1
- package/dist/esm/{user.store-8477642a.js → user.store-b8645067.js} +1 -1
- package/dist/sparkle-core/index.esm.js +1 -1
- package/dist/sparkle-core/p-0147266a.js +1 -0
- package/dist/sparkle-core/{p-4c9e010d.entry.js → p-014b5707.entry.js} +1 -1
- package/dist/sparkle-core/p-03585916.js +1 -0
- package/dist/sparkle-core/{p-9ef14088.entry.js → p-04c7b276.entry.js} +1 -1
- package/dist/sparkle-core/{p-4af496a8.entry.js → p-06642405.entry.js} +1 -1
- package/dist/sparkle-core/{p-0b92326d.entry.js → p-06c7d0f2.entry.js} +1 -1
- package/dist/sparkle-core/p-08d97c59.entry.js +1 -0
- package/dist/sparkle-core/p-0bb0cf41.entry.js +1 -0
- package/dist/sparkle-core/{p-136b93d5.entry.js → p-0c0f8acd.entry.js} +1 -1
- package/dist/sparkle-core/p-0ea2518d.entry.js +1 -0
- package/dist/sparkle-core/{p-fe3a7bca.js → p-1019ebc3.js} +1 -1
- package/dist/sparkle-core/p-162bff1a.entry.js +1 -0
- package/dist/sparkle-core/{p-27075abe.js → p-17eb4633.js} +1 -1
- package/dist/sparkle-core/p-1b1ba156.entry.js +1 -0
- package/dist/sparkle-core/{p-b00d0a47.entry.js → p-1e4782af.entry.js} +1 -1
- package/dist/sparkle-core/{p-c8ad5a5b.entry.js → p-1f0b3ff9.entry.js} +2 -2
- package/dist/sparkle-core/{p-3ef53ebf.entry.js → p-214d1229.entry.js} +1 -1
- package/dist/sparkle-core/p-25e556cc.entry.js +1 -0
- package/dist/sparkle-core/{p-bae8cd7d.entry.js → p-27fbabc3.entry.js} +1 -1
- package/dist/sparkle-core/{p-e6d39f6e.entry.js → p-285ab4ed.entry.js} +1 -1
- package/dist/sparkle-core/{p-d220a642.entry.js → p-2ba70507.entry.js} +1 -1
- package/dist/sparkle-core/{p-5a3de051.entry.js → p-2d4a5ddf.entry.js} +2 -2
- package/dist/sparkle-core/p-2d9659e2.entry.js +1 -0
- package/dist/sparkle-core/p-2e035338.entry.js +1 -0
- package/dist/sparkle-core/{p-c9f474d0.js → p-2e2b813c.js} +1 -1
- package/dist/sparkle-core/{p-df5efe0d.entry.js → p-2f10208d.entry.js} +1 -1
- package/dist/sparkle-core/p-2fba9a3a.entry.js +1 -0
- package/dist/sparkle-core/p-317037de.entry.js +1 -0
- package/dist/sparkle-core/p-32762a44.entry.js +1 -0
- package/dist/sparkle-core/p-32f4e565.entry.js +1 -0
- package/dist/sparkle-core/{p-23d713e2.js → p-340754ed.js} +1 -1
- 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-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-3bc68dd0.js +1 -0
- package/dist/sparkle-core/p-3c133235.entry.js +1 -0
- package/dist/sparkle-core/{p-308517b3.js → p-3f85e1ca.js} +2 -2
- package/dist/sparkle-core/p-4053ecdb.entry.js +1 -0
- package/dist/sparkle-core/{p-1394cbb8.js → p-405f7c58.js} +2 -2
- package/dist/sparkle-core/{p-d6a3a639.entry.js → p-4320dac0.entry.js} +1 -1
- package/dist/sparkle-core/p-44f813b7.entry.js +1 -0
- package/dist/sparkle-core/p-46869031.entry.js +1 -0
- package/dist/sparkle-core/{p-17aef6f9.js → p-4a5f2b2b.js} +1 -1
- package/dist/sparkle-core/p-4ae75caa.entry.js +1 -0
- 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-539bf742.js +4 -0
- package/dist/sparkle-core/{p-2bd4c60e.js → p-53bcbd1d.js} +1 -1
- package/dist/sparkle-core/{p-11ed6b7f.entry.js → p-54ada5e3.entry.js} +1 -1
- package/dist/sparkle-core/{p-5979f253.entry.js → p-5519d283.entry.js} +1 -1
- package/dist/sparkle-core/p-554da5b8.entry.js +1 -0
- package/dist/sparkle-core/{p-8d630960.js → p-56a2e8a2.js} +1 -1
- package/dist/sparkle-core/{p-d0d0e5e5.entry.js → p-5893bbe5.entry.js} +1 -1
- 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-5da2d95a.entry.js +1 -0
- package/dist/sparkle-core/{p-1c2aee9c.js → p-5fc26938.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-63f69cdc.entry.js +1 -0
- package/dist/sparkle-core/p-63f71ada.entry.js +1 -0
- package/dist/sparkle-core/p-64e814b9.entry.js +1 -0
- package/dist/sparkle-core/{p-0c603495.entry.js → p-66a85393.entry.js} +1 -1
- package/dist/sparkle-core/{p-ea4a9f0d.entry.js → p-69487d90.entry.js} +1 -1
- package/dist/sparkle-core/p-6b05a1d3.entry.js +1 -0
- package/dist/sparkle-core/{p-9dc42d70.entry.js → p-6c894fa2.entry.js} +1 -1
- package/dist/sparkle-core/p-6ea246fe.js +4 -0
- package/dist/sparkle-core/p-6ed0236e.entry.js +1 -0
- package/dist/sparkle-core/{p-34d93a39.entry.js → p-6f0545b3.entry.js} +1 -1
- package/dist/sparkle-core/{p-8cbe019a.entry.js → p-727e1c28.entry.js} +1 -1
- package/dist/sparkle-core/p-81714d94.entry.js +1 -0
- package/dist/sparkle-core/{p-3d2c0e24.entry.js → p-82ad4e7c.entry.js} +2 -2
- 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-01743e3e.js → p-871106e0.js} +1 -1
- 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-91accfc1.js +1 -0
- package/dist/sparkle-core/p-93e74f1b.entry.js +1 -0
- 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-3fd92216.entry.js → p-9e309b3e.entry.js} +1 -1
- package/dist/sparkle-core/p-9e7fee8f.entry.js +1 -0
- package/dist/sparkle-core/{p-280e938d.js → p-a019ad0c.js} +1 -1
- 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-a5c5da9a.entry.js +1 -0
- package/dist/sparkle-core/{p-966817ec.js → p-a85598ad.js} +1 -1
- package/dist/sparkle-core/p-a8a77bec.entry.js +1 -0
- package/dist/sparkle-core/{p-ba775d8e.entry.js → p-a98d7ebe.entry.js} +1 -1
- package/dist/sparkle-core/{p-ed3dfd89.js → p-ad102371.js} +2 -2
- package/dist/sparkle-core/{p-bd2c8e30.entry.js → p-b236d258.entry.js} +2 -2
- package/dist/sparkle-core/{p-0127a61a.entry.js → p-b4b01fa2.entry.js} +1 -1
- package/dist/sparkle-core/{p-9a383065.entry.js → p-b4bc8b02.entry.js} +2 -2
- package/dist/sparkle-core/{p-767c9db8.entry.js → p-b5ec8fb0.entry.js} +1 -1
- package/dist/sparkle-core/{p-0798d46a.entry.js → p-b83444c7.entry.js} +1 -1
- package/dist/sparkle-core/{p-fde96f7c.js → p-b9933822.js} +1 -1
- package/dist/sparkle-core/p-b9b1d4da.entry.js +1 -0
- package/dist/sparkle-core/{p-3810777d.js → p-be28346b.js} +1 -1
- package/dist/sparkle-core/{p-3c752205.entry.js → p-c278db5f.entry.js} +1 -1
- package/dist/sparkle-core/p-c2990b24.entry.js +1 -0
- package/dist/sparkle-core/{p-a6c1a55a.entry.js → p-c2bbaf55.entry.js} +1 -1
- package/dist/sparkle-core/{p-16c81890.entry.js → p-c4af184b.entry.js} +1 -1
- package/dist/sparkle-core/p-c71cbbf7.entry.js +1 -0
- package/dist/sparkle-core/p-c8c73fa7.js +4 -0
- package/dist/sparkle-core/p-c8fe45df.entry.js +1 -0
- package/dist/sparkle-core/{p-7b3d1457.js → p-c9cd4ff1.js} +1 -1
- package/dist/sparkle-core/{p-a19b42f0.js → p-ca4c8a10.js} +1 -1
- package/dist/sparkle-core/p-cab3da3c.entry.js +1 -0
- package/dist/sparkle-core/p-cc518c36.entry.js +1 -0
- package/dist/sparkle-core/p-cd832fbf.entry.js +1 -0
- package/dist/sparkle-core/{p-085eb951.entry.js → p-ce94efdb.entry.js} +1 -1
- package/dist/sparkle-core/p-cffd4817.entry.js +1 -0
- package/dist/sparkle-core/{p-e09de7ac.js → p-d0ac5f17.js} +1 -1
- package/dist/sparkle-core/{p-9cd95e7e.entry.js → p-d0adf726.entry.js} +1 -1
- package/dist/sparkle-core/p-d1fcbfc2.js +4 -0
- 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-d432d3ac.entry.js +1 -0
- package/dist/sparkle-core/{p-785f1879.entry.js → p-d601810e.entry.js} +1 -1
- package/dist/sparkle-core/{p-ea7d7a3b.js → p-d81a0680.js} +1 -1
- package/dist/sparkle-core/{p-58389020.entry.js → p-d969f7d0.entry.js} +3 -3
- package/dist/sparkle-core/p-dabc80c4.entry.js +1 -0
- package/dist/sparkle-core/{p-351b82a8.entry.js → p-db8387eb.entry.js} +1 -1
- package/dist/sparkle-core/{p-4e0502b8.entry.js → p-dca90a55.entry.js} +1 -1
- package/dist/sparkle-core/{p-506f3c5f.js → p-dd2e7f84.js} +2 -2
- package/dist/sparkle-core/p-e0429a19.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-e65c72cc.entry.js +1 -0
- package/dist/sparkle-core/{p-b2827978.entry.js → p-e7066c64.entry.js} +1 -1
- package/dist/sparkle-core/{p-4338e1e3.js → p-e7568d4b.js} +1 -1
- 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-eb40a191.entry.js +1 -0
- package/dist/sparkle-core/{p-bb575dba.entry.js → p-ecdea569.entry.js} +1 -1
- package/dist/sparkle-core/p-ed9f48c4.entry.js +1 -0
- package/dist/sparkle-core/{p-6a5ace01.js → p-ee1e0eb4.js} +1 -1
- package/dist/sparkle-core/{p-a111c567.entry.js → p-ef6c2352.entry.js} +1 -1
- package/dist/sparkle-core/p-f0cf4a8f.entry.js +1 -0
- package/dist/sparkle-core/{p-defeaa5c.entry.js → p-f4b0b6a4.entry.js} +1 -1
- package/dist/sparkle-core/{p-1701723e.entry.js → p-fc965b88.entry.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-9b4979b5.entry.js → p-fde382f0.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/ion-avatar_16.cjs.entry.js +0 -1907
- package/dist/cjs/ion-range.cjs.entry.js +0 -515
- package/dist/cjs/ion-text.cjs.entry.js +0 -24
- package/dist/cjs/sparkle-quiz-feedback_5.cjs.entry.js +0 -117
- package/dist/cjs/stencil-route-link.cjs.entry.js +0 -77
- package/dist/esm/ion-avatar_16.entry.js +0 -1888
- package/dist/esm/ion-range.entry.js +0 -511
- package/dist/esm/ion-text.entry.js +0 -20
- package/dist/esm/sparkle-quiz-feedback_5.entry.js +0 -109
- package/dist/esm/stencil-route-link.entry.js +0 -73
- 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-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-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-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-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-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-9eea81f2.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-bb3e3482.entry.js +0 -1
- package/dist/sparkle-core/p-c48352cf.js +0 -4
- 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-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-ff26d891.entry.js +0 -1
@@ -1,515 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
-
|
5
|
-
const index = require('./index-51e8292e.js');
|
6
|
-
const ionicGlobal = require('./ionic-global-2cde9d3a.js');
|
7
|
-
const index$2 = require('./index-9c7b27e4.js');
|
8
|
-
const helpers = require('./helpers-c2496722.js');
|
9
|
-
const index$1 = require('./index-e56e09b8.js');
|
10
|
-
const dir = require('./dir-5af5259a.js');
|
11
|
-
const theme = require('./theme-b0b295c1.js');
|
12
|
-
|
13
|
-
const rangeIosCss = ":host{--knob-handle-size:calc(var(--knob-size) * 2);display:flex;position:relative;flex:3;align-items:center;font-family:var(--ion-font-family, inherit);user-select:none;z-index:2}:host(.range-disabled){pointer-events:none}::slotted(ion-label){flex:initial}::slotted(ion-icon[slot]){font-size:24px}.range-slider{position:relative;flex:1;width:100%;height:var(--height);contain:size layout style;cursor:grab;touch-action:pan-y}:host(.range-pressed) .range-slider{cursor:grabbing}.range-pin{position:absolute;background:var(--ion-color-base);color:var(--ion-color-contrast);text-align:center;box-sizing:border-box}.range-knob-handle{left:0;top:calc((var(--height) - var(--knob-handle-size)) / 2);margin-left:calc(0px - var(--knob-handle-size) / 2);position:absolute;width:var(--knob-handle-size);height:var(--knob-handle-size);text-align:center}[dir=rtl] .range-knob-handle,:host-context([dir=rtl]) .range-knob-handle{left:unset;right:unset;right:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.range-knob-handle{margin-left:unset;-webkit-margin-start:calc(0px - var(--knob-handle-size) / 2);margin-inline-start:calc(0px - var(--knob-handle-size) / 2)}}[dir=rtl] .range-knob-handle,:host-context([dir=rtl]) .range-knob-handle{left:unset}.range-knob-handle:active,.range-knob-handle:focus{outline:none}.range-bar{border-radius:var(--bar-border-radius);left:0;top:calc((var(--height) - var(--bar-height)) / 2);position:absolute;width:100%;height:var(--bar-height);background:var(--bar-background);pointer-events:none}[dir=rtl] .range-bar,:host-context([dir=rtl]) .range-bar{left:unset;right:unset;right:0}[dir=rtl] .range-bar,:host-context([dir=rtl]) .range-bar{left:unset}.range-knob{border-radius:var(--knob-border-radius);left:calc(50% - var(--knob-size) / 2);top:calc(50% - var(--knob-size) / 2);position:absolute;width:var(--knob-size);height:var(--knob-size);background:var(--knob-background);box-shadow:var(--knob-box-shadow);z-index:2;pointer-events:none}[dir=rtl] .range-knob,:host-context([dir=rtl]) .range-knob{left:unset;right:unset;right:calc(50% - var(--knob-size) / 2)}[dir=rtl] .range-knob,:host-context([dir=rtl]) .range-knob{left:unset}:host(.range-pressed) .range-bar-active{will-change:left, right}:host(.in-item){width:100%}:host(.in-item) ::slotted(ion-label){align-self:center}:host{--knob-border-radius:50%;--knob-background:#ffffff;--knob-box-shadow:0 3px 1px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.13), 0 0 0 1px rgba(0, 0, 0, 0.02);--knob-size:28px;--bar-height:2px;--bar-background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.1);--bar-background-active:var(--ion-color-primary, #3880ff);--bar-border-radius:0;--height:42px;padding-left:16px;padding-right:16px;padding-top:8px;padding-bottom:8px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}:host(.ion-color) .range-bar-active,:host(.ion-color) .range-tick-active{background:var(--ion-color-base)}::slotted([slot=start]){margin-left:0;margin-right:16px;margin-top:0;margin-bottom:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted([slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}}::slotted([slot=end]){margin-left:16px;margin-right:0;margin-top:0;margin-bottom:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted([slot=end]){margin-left:unset;margin-right:unset;-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}}:host(.range-has-pin){padding-top:20px}.range-bar-active{bottom:0;width:auto;background:var(--bar-background-active)}.range-tick{margin-left:-1px;border-radius:0;position:absolute;top:18px;width:2px;height:8px;background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.1);pointer-events:none}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.range-tick{margin-left:unset;-webkit-margin-start:-1px;margin-inline-start:-1px}}.range-tick-active{background:var(--bar-background-active)}.range-pin{transform:translate3d(0, 28px, 0) scale(0.01);padding-left:8px;padding-right:8px;padding-top:8px;padding-bottom:8px;display:inline-block;position:relative;top:-20px;min-width:28px;transition:transform 120ms ease;background:transparent;color:var(--ion-text-color, #000);font-size:12px;text-align:center}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.range-pin{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}.range-knob-pressed .range-pin{transform:translate3d(0, 0, 0) scale(1)}:host(.range-disabled){opacity:0.5}";
|
14
|
-
|
15
|
-
const rangeMdCss = ":host{--knob-handle-size:calc(var(--knob-size) * 2);display:flex;position:relative;flex:3;align-items:center;font-family:var(--ion-font-family, inherit);user-select:none;z-index:2}:host(.range-disabled){pointer-events:none}::slotted(ion-label){flex:initial}::slotted(ion-icon[slot]){font-size:24px}.range-slider{position:relative;flex:1;width:100%;height:var(--height);contain:size layout style;cursor:grab;touch-action:pan-y}:host(.range-pressed) .range-slider{cursor:grabbing}.range-pin{position:absolute;background:var(--ion-color-base);color:var(--ion-color-contrast);text-align:center;box-sizing:border-box}.range-knob-handle{left:0;top:calc((var(--height) - var(--knob-handle-size)) / 2);margin-left:calc(0px - var(--knob-handle-size) / 2);position:absolute;width:var(--knob-handle-size);height:var(--knob-handle-size);text-align:center}[dir=rtl] .range-knob-handle,:host-context([dir=rtl]) .range-knob-handle{left:unset;right:unset;right:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.range-knob-handle{margin-left:unset;-webkit-margin-start:calc(0px - var(--knob-handle-size) / 2);margin-inline-start:calc(0px - var(--knob-handle-size) / 2)}}[dir=rtl] .range-knob-handle,:host-context([dir=rtl]) .range-knob-handle{left:unset}.range-knob-handle:active,.range-knob-handle:focus{outline:none}.range-bar{border-radius:var(--bar-border-radius);left:0;top:calc((var(--height) - var(--bar-height)) / 2);position:absolute;width:100%;height:var(--bar-height);background:var(--bar-background);pointer-events:none}[dir=rtl] .range-bar,:host-context([dir=rtl]) .range-bar{left:unset;right:unset;right:0}[dir=rtl] .range-bar,:host-context([dir=rtl]) .range-bar{left:unset}.range-knob{border-radius:var(--knob-border-radius);left:calc(50% - var(--knob-size) / 2);top:calc(50% - var(--knob-size) / 2);position:absolute;width:var(--knob-size);height:var(--knob-size);background:var(--knob-background);box-shadow:var(--knob-box-shadow);z-index:2;pointer-events:none}[dir=rtl] .range-knob,:host-context([dir=rtl]) .range-knob{left:unset;right:unset;right:calc(50% - var(--knob-size) / 2)}[dir=rtl] .range-knob,:host-context([dir=rtl]) .range-knob{left:unset}:host(.range-pressed) .range-bar-active{will-change:left, right}:host(.in-item){width:100%}:host(.in-item) ::slotted(ion-label){align-self:center}:host{--knob-border-radius:50%;--knob-background:var(--bar-background-active);--knob-box-shadow:none;--knob-size:18px;--bar-height:2px;--bar-background:rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.26);--bar-background-active:var(--ion-color-primary, #3880ff);--bar-border-radius:0;--height:42px;--pin-background:var(--ion-color-primary, #3880ff);--pin-color:var(--ion-color-primary-contrast, #fff);padding-left:14px;padding-right:14px;padding-top:8px;padding-bottom:8px;font-size:12px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:14px;padding-inline-start:14px;-webkit-padding-end:14px;padding-inline-end:14px}}:host(.ion-color) .range-bar{background:rgba(var(--ion-color-base-rgb), 0.26)}:host(.ion-color) .range-bar-active,:host(.ion-color) .range-knob,:host(.ion-color) .range-pin,:host(.ion-color) .range-pin::before,:host(.ion-color) .range-tick{background:var(--ion-color-base);color:var(--ion-color-contrast)}::slotted([slot=start]){margin-left:0;margin-right:14px;margin-top:0;margin-bottom:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted([slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:14px;margin-inline-end:14px}}::slotted([slot=end]){margin-left:14px;margin-right:0;margin-top:0;margin-bottom:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted([slot=end]){margin-left:unset;margin-right:unset;-webkit-margin-start:14px;margin-inline-start:14px;-webkit-margin-end:0;margin-inline-end:0}}:host(.range-has-pin){padding-top:28px}.range-bar-active{bottom:0;width:auto;background:var(--bar-background-active)}.range-knob{transform:scale(0.67);transition-duration:120ms;transition-property:transform, background-color, border;transition-timing-function:ease;z-index:2}.range-tick{position:absolute;top:calc((var(--height) - var(--bar-height)) / 2);width:var(--bar-height);height:var(--bar-height);background:var(--bar-background-active);z-index:1;pointer-events:none}.range-tick-active{background:transparent}.range-pin{padding-left:0;padding-right:0;padding-top:8px;padding-bottom:8px;border-radius:50%;transform:translate3d(0, 0, 0) scale(0.01);display:inline-block;position:relative;min-width:28px;height:28px;transition:transform 120ms ease, background 120ms ease;background:var(--pin-background);color:var(--pin-color);text-align:center}.range-pin::before{left:50%;top:3px;margin-left:-13px;border-radius:50% 50% 50% 0;position:absolute;width:26px;height:26px;transform:rotate(-45deg);transition:background 120ms ease;background:var(--pin-background);content:\"\";z-index:-1}[dir=rtl] .range-pin::before,:host-context([dir=rtl]) .range-pin::before{left:unset;right:unset;right:50%}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.range-pin::before{margin-left:unset;-webkit-margin-start:-13px;margin-inline-start:-13px}}[dir=rtl] .range-pin::before,:host-context([dir=rtl]) .range-pin::before{left:unset}.range-knob-pressed .range-pin{transform:translate3d(0, -24px, 0) scale(1)}:host(:not(.range-has-pin)) .range-knob-pressed .range-knob{transform:scale(1)}:host(.range-disabled) .range-bar-active,:host(.range-disabled) .range-bar,:host(.range-disabled) .range-tick{background-color:var(--ion-color-step-250, #bfbfbf)}:host(.range-disabled) .range-knob{transform:scale(0.55);outline:5px solid #fff;background-color:var(--ion-color-step-250, #bfbfbf)}";
|
16
|
-
|
17
|
-
const Range = class {
|
18
|
-
constructor(hostRef) {
|
19
|
-
index.registerInstance(this, hostRef);
|
20
|
-
this.ionChange = index.createEvent(this, "ionChange", 7);
|
21
|
-
this.ionStyle = index.createEvent(this, "ionStyle", 7);
|
22
|
-
this.ionFocus = index.createEvent(this, "ionFocus", 7);
|
23
|
-
this.ionBlur = index.createEvent(this, "ionBlur", 7);
|
24
|
-
this.ionKnobMoveStart = index.createEvent(this, "ionKnobMoveStart", 7);
|
25
|
-
this.ionKnobMoveEnd = index.createEvent(this, "ionKnobMoveEnd", 7);
|
26
|
-
this.didLoad = false;
|
27
|
-
this.noUpdate = false;
|
28
|
-
this.hasFocus = false;
|
29
|
-
this.inheritedAttributes = {};
|
30
|
-
this.contentEl = null;
|
31
|
-
this.initialContentScrollY = true;
|
32
|
-
this.ratioA = 0;
|
33
|
-
this.ratioB = 0;
|
34
|
-
/**
|
35
|
-
* How long, in milliseconds, to wait to trigger the
|
36
|
-
* `ionChange` event after each change in the range value.
|
37
|
-
* This also impacts form bindings such as `ngModel` or `v-model`.
|
38
|
-
*/
|
39
|
-
this.debounce = 0;
|
40
|
-
// TODO: In Ionic Framework v6 this should initialize to this.rangeId like the other form components do.
|
41
|
-
/**
|
42
|
-
* The name of the control, which is submitted with the form data.
|
43
|
-
*/
|
44
|
-
this.name = '';
|
45
|
-
/**
|
46
|
-
* Show two knobs.
|
47
|
-
*/
|
48
|
-
this.dualKnobs = false;
|
49
|
-
/**
|
50
|
-
* Minimum integer value of the range.
|
51
|
-
*/
|
52
|
-
this.min = 0;
|
53
|
-
/**
|
54
|
-
* Maximum integer value of the range.
|
55
|
-
*/
|
56
|
-
this.max = 100;
|
57
|
-
/**
|
58
|
-
* If `true`, a pin with integer value is shown when the knob
|
59
|
-
* is pressed.
|
60
|
-
*/
|
61
|
-
this.pin = false;
|
62
|
-
/**
|
63
|
-
* A callback used to format the pin text.
|
64
|
-
* By default the pin text is set to `Math.round(value)`.
|
65
|
-
*/
|
66
|
-
this.pinFormatter = (value) => Math.round(value);
|
67
|
-
/**
|
68
|
-
* If `true`, the knob snaps to tick marks evenly spaced based
|
69
|
-
* on the step property value.
|
70
|
-
*/
|
71
|
-
this.snaps = false;
|
72
|
-
/**
|
73
|
-
* Specifies the value granularity.
|
74
|
-
*/
|
75
|
-
this.step = 1;
|
76
|
-
/**
|
77
|
-
* If `true`, tick marks are displayed based on the step value.
|
78
|
-
* Only applies when `snaps` is `true`.
|
79
|
-
*/
|
80
|
-
this.ticks = true;
|
81
|
-
/**
|
82
|
-
* If `true`, the user cannot interact with the range.
|
83
|
-
*/
|
84
|
-
this.disabled = false;
|
85
|
-
/**
|
86
|
-
* the value of the range.
|
87
|
-
*/
|
88
|
-
this.value = 0;
|
89
|
-
this.clampBounds = (value) => {
|
90
|
-
return helpers.clamp(this.min, value, this.max);
|
91
|
-
};
|
92
|
-
this.ensureValueInBounds = (value) => {
|
93
|
-
if (this.dualKnobs) {
|
94
|
-
return {
|
95
|
-
lower: this.clampBounds(value.lower),
|
96
|
-
upper: this.clampBounds(value.upper),
|
97
|
-
};
|
98
|
-
}
|
99
|
-
else {
|
100
|
-
return this.clampBounds(value);
|
101
|
-
}
|
102
|
-
};
|
103
|
-
this.setupGesture = async () => {
|
104
|
-
const rangeSlider = this.rangeSlider;
|
105
|
-
if (rangeSlider) {
|
106
|
-
this.gesture = (await Promise.resolve().then(function () { return require('./index-12082cba.js'); })).createGesture({
|
107
|
-
el: rangeSlider,
|
108
|
-
gestureName: 'range',
|
109
|
-
gesturePriority: 100,
|
110
|
-
threshold: 0,
|
111
|
-
onStart: (ev) => this.onStart(ev),
|
112
|
-
onMove: (ev) => this.onMove(ev),
|
113
|
-
onEnd: (ev) => this.onEnd(ev),
|
114
|
-
});
|
115
|
-
this.gesture.enable(!this.disabled);
|
116
|
-
}
|
117
|
-
};
|
118
|
-
this.handleKeyboard = (knob, isIncrease) => {
|
119
|
-
const { ensureValueInBounds } = this;
|
120
|
-
let step = this.step;
|
121
|
-
step = step > 0 ? step : 1;
|
122
|
-
step = step / (this.max - this.min);
|
123
|
-
if (!isIncrease) {
|
124
|
-
step *= -1;
|
125
|
-
}
|
126
|
-
if (knob === 'A') {
|
127
|
-
this.ratioA = helpers.clamp(0, this.ratioA + step, 1);
|
128
|
-
}
|
129
|
-
else {
|
130
|
-
this.ratioB = helpers.clamp(0, this.ratioB + step, 1);
|
131
|
-
}
|
132
|
-
this.ionKnobMoveStart.emit({ value: ensureValueInBounds(this.value) });
|
133
|
-
this.updateValue();
|
134
|
-
this.ionKnobMoveEnd.emit({ value: ensureValueInBounds(this.value) });
|
135
|
-
};
|
136
|
-
this.onBlur = () => {
|
137
|
-
if (this.hasFocus) {
|
138
|
-
this.hasFocus = false;
|
139
|
-
this.ionBlur.emit();
|
140
|
-
this.emitStyle();
|
141
|
-
}
|
142
|
-
};
|
143
|
-
this.onFocus = () => {
|
144
|
-
if (!this.hasFocus) {
|
145
|
-
this.hasFocus = true;
|
146
|
-
this.ionFocus.emit();
|
147
|
-
this.emitStyle();
|
148
|
-
}
|
149
|
-
};
|
150
|
-
}
|
151
|
-
debounceChanged() {
|
152
|
-
this.ionChange = helpers.debounceEvent(this.ionChange, this.debounce);
|
153
|
-
}
|
154
|
-
minChanged() {
|
155
|
-
if (!this.noUpdate) {
|
156
|
-
this.updateRatio();
|
157
|
-
}
|
158
|
-
}
|
159
|
-
maxChanged() {
|
160
|
-
if (!this.noUpdate) {
|
161
|
-
this.updateRatio();
|
162
|
-
}
|
163
|
-
}
|
164
|
-
activeBarStartChanged() {
|
165
|
-
const { activeBarStart } = this;
|
166
|
-
if (activeBarStart !== undefined) {
|
167
|
-
if (activeBarStart > this.max) {
|
168
|
-
index$1.printIonWarning(`Range: The value of activeBarStart (${activeBarStart}) is greater than the max (${this.max}). Valid values are greater than or equal to the min value and less than or equal to the max value.`, this.el);
|
169
|
-
this.activeBarStart = this.max;
|
170
|
-
}
|
171
|
-
else if (activeBarStart < this.min) {
|
172
|
-
index$1.printIonWarning(`Range: The value of activeBarStart (${activeBarStart}) is less than the min (${this.min}). Valid values are greater than or equal to the min value and less than or equal to the max value.`, this.el);
|
173
|
-
this.activeBarStart = this.min;
|
174
|
-
}
|
175
|
-
}
|
176
|
-
}
|
177
|
-
disabledChanged() {
|
178
|
-
if (this.gesture) {
|
179
|
-
this.gesture.enable(!this.disabled);
|
180
|
-
}
|
181
|
-
this.emitStyle();
|
182
|
-
}
|
183
|
-
valueChanged(value) {
|
184
|
-
if (!this.noUpdate) {
|
185
|
-
this.updateRatio();
|
186
|
-
}
|
187
|
-
value = this.ensureValueInBounds(value);
|
188
|
-
this.ionChange.emit({ value });
|
189
|
-
}
|
190
|
-
componentWillLoad() {
|
191
|
-
/**
|
192
|
-
* If user has custom ID set then we should
|
193
|
-
* not assign the default incrementing ID.
|
194
|
-
*/
|
195
|
-
this.rangeId = this.el.hasAttribute('id') ? this.el.getAttribute('id') : `ion-r-${rangeIds++}`;
|
196
|
-
this.inheritedAttributes = helpers.inheritAriaAttributes(this.el);
|
197
|
-
}
|
198
|
-
componentDidLoad() {
|
199
|
-
this.setupGesture();
|
200
|
-
this.didLoad = true;
|
201
|
-
}
|
202
|
-
connectedCallback() {
|
203
|
-
this.updateRatio();
|
204
|
-
this.debounceChanged();
|
205
|
-
this.disabledChanged();
|
206
|
-
this.activeBarStartChanged();
|
207
|
-
/**
|
208
|
-
* If we have not yet rendered
|
209
|
-
* ion-range, then rangeSlider is not defined.
|
210
|
-
* But if we are moving ion-range via appendChild,
|
211
|
-
* then rangeSlider will be defined.
|
212
|
-
*/
|
213
|
-
if (this.didLoad) {
|
214
|
-
this.setupGesture();
|
215
|
-
}
|
216
|
-
this.contentEl = index$2.findClosestIonContent(this.el);
|
217
|
-
}
|
218
|
-
disconnectedCallback() {
|
219
|
-
if (this.gesture) {
|
220
|
-
this.gesture.destroy();
|
221
|
-
this.gesture = undefined;
|
222
|
-
}
|
223
|
-
}
|
224
|
-
getValue() {
|
225
|
-
const value = this.value || 0;
|
226
|
-
if (this.dualKnobs) {
|
227
|
-
if (typeof value === 'object') {
|
228
|
-
return value;
|
229
|
-
}
|
230
|
-
return {
|
231
|
-
lower: 0,
|
232
|
-
upper: value,
|
233
|
-
};
|
234
|
-
}
|
235
|
-
else {
|
236
|
-
if (typeof value === 'object') {
|
237
|
-
return value.upper;
|
238
|
-
}
|
239
|
-
return value;
|
240
|
-
}
|
241
|
-
}
|
242
|
-
emitStyle() {
|
243
|
-
this.ionStyle.emit({
|
244
|
-
interactive: true,
|
245
|
-
'interactive-disabled': this.disabled,
|
246
|
-
});
|
247
|
-
}
|
248
|
-
onStart(detail) {
|
249
|
-
const { contentEl } = this;
|
250
|
-
if (contentEl) {
|
251
|
-
this.initialContentScrollY = index$2.disableContentScrollY(contentEl);
|
252
|
-
}
|
253
|
-
const rect = (this.rect = this.rangeSlider.getBoundingClientRect());
|
254
|
-
const currentX = detail.currentX;
|
255
|
-
// figure out which knob they started closer to
|
256
|
-
let ratio = helpers.clamp(0, (currentX - rect.left) / rect.width, 1);
|
257
|
-
if (dir.isRTL(this.el)) {
|
258
|
-
ratio = 1 - ratio;
|
259
|
-
}
|
260
|
-
this.pressedKnob = !this.dualKnobs || Math.abs(this.ratioA - ratio) < Math.abs(this.ratioB - ratio) ? 'A' : 'B';
|
261
|
-
this.setFocus(this.pressedKnob);
|
262
|
-
// update the active knob's position
|
263
|
-
this.update(currentX);
|
264
|
-
this.ionKnobMoveStart.emit({ value: this.ensureValueInBounds(this.value) });
|
265
|
-
}
|
266
|
-
onMove(detail) {
|
267
|
-
this.update(detail.currentX);
|
268
|
-
}
|
269
|
-
onEnd(detail) {
|
270
|
-
const { contentEl, initialContentScrollY } = this;
|
271
|
-
if (contentEl) {
|
272
|
-
index$2.resetContentScrollY(contentEl, initialContentScrollY);
|
273
|
-
}
|
274
|
-
this.update(detail.currentX);
|
275
|
-
this.pressedKnob = undefined;
|
276
|
-
this.ionKnobMoveEnd.emit({ value: this.ensureValueInBounds(this.value) });
|
277
|
-
}
|
278
|
-
update(currentX) {
|
279
|
-
// figure out where the pointer is currently at
|
280
|
-
// update the knob being interacted with
|
281
|
-
const rect = this.rect;
|
282
|
-
let ratio = helpers.clamp(0, (currentX - rect.left) / rect.width, 1);
|
283
|
-
if (dir.isRTL(this.el)) {
|
284
|
-
ratio = 1 - ratio;
|
285
|
-
}
|
286
|
-
if (this.snaps) {
|
287
|
-
// snaps the ratio to the current value
|
288
|
-
ratio = valueToRatio(ratioToValue(ratio, this.min, this.max, this.step), this.min, this.max);
|
289
|
-
}
|
290
|
-
// update which knob is pressed
|
291
|
-
if (this.pressedKnob === 'A') {
|
292
|
-
this.ratioA = ratio;
|
293
|
-
}
|
294
|
-
else {
|
295
|
-
this.ratioB = ratio;
|
296
|
-
}
|
297
|
-
// Update input value
|
298
|
-
this.updateValue();
|
299
|
-
}
|
300
|
-
get valA() {
|
301
|
-
return ratioToValue(this.ratioA, this.min, this.max, this.step);
|
302
|
-
}
|
303
|
-
get valB() {
|
304
|
-
return ratioToValue(this.ratioB, this.min, this.max, this.step);
|
305
|
-
}
|
306
|
-
get ratioLower() {
|
307
|
-
if (this.dualKnobs) {
|
308
|
-
return Math.min(this.ratioA, this.ratioB);
|
309
|
-
}
|
310
|
-
const { activeBarStart } = this;
|
311
|
-
if (activeBarStart == null) {
|
312
|
-
return 0;
|
313
|
-
}
|
314
|
-
return valueToRatio(activeBarStart, this.min, this.max);
|
315
|
-
}
|
316
|
-
get ratioUpper() {
|
317
|
-
if (this.dualKnobs) {
|
318
|
-
return Math.max(this.ratioA, this.ratioB);
|
319
|
-
}
|
320
|
-
return this.ratioA;
|
321
|
-
}
|
322
|
-
updateRatio() {
|
323
|
-
const value = this.getValue();
|
324
|
-
const { min, max } = this;
|
325
|
-
if (this.dualKnobs) {
|
326
|
-
this.ratioA = valueToRatio(value.lower, min, max);
|
327
|
-
this.ratioB = valueToRatio(value.upper, min, max);
|
328
|
-
}
|
329
|
-
else {
|
330
|
-
this.ratioA = valueToRatio(value, min, max);
|
331
|
-
}
|
332
|
-
}
|
333
|
-
updateValue() {
|
334
|
-
this.noUpdate = true;
|
335
|
-
const { valA, valB } = this;
|
336
|
-
this.value = !this.dualKnobs
|
337
|
-
? valA
|
338
|
-
: {
|
339
|
-
lower: Math.min(valA, valB),
|
340
|
-
upper: Math.max(valA, valB),
|
341
|
-
};
|
342
|
-
this.noUpdate = false;
|
343
|
-
}
|
344
|
-
setFocus(knob) {
|
345
|
-
if (this.el.shadowRoot) {
|
346
|
-
const knobEl = this.el.shadowRoot.querySelector(knob === 'A' ? '.range-knob-a' : '.range-knob-b');
|
347
|
-
if (knobEl) {
|
348
|
-
knobEl.focus();
|
349
|
-
}
|
350
|
-
}
|
351
|
-
}
|
352
|
-
render() {
|
353
|
-
var _a;
|
354
|
-
const { min, max, step, el, handleKeyboard, pressedKnob, disabled, pin, ratioLower, ratioUpper, inheritedAttributes, rangeId, pinFormatter, } = this;
|
355
|
-
/**
|
356
|
-
* Look for external label, ion-label, or aria-labelledby.
|
357
|
-
* If none, see if user placed an aria-label on the host
|
358
|
-
* and use that instead.
|
359
|
-
*/
|
360
|
-
let { labelText } = helpers.getAriaLabel(el, rangeId);
|
361
|
-
if (labelText === undefined || labelText === null) {
|
362
|
-
labelText = inheritedAttributes['aria-label'];
|
363
|
-
}
|
364
|
-
const mode = ionicGlobal.getIonMode(this);
|
365
|
-
let barStart = `${ratioLower * 100}%`;
|
366
|
-
let barEnd = `${100 - ratioUpper * 100}%`;
|
367
|
-
const rtl = dir.isRTL(this.el);
|
368
|
-
const start = rtl ? 'right' : 'left';
|
369
|
-
const end = rtl ? 'left' : 'right';
|
370
|
-
const tickStyle = (tick) => {
|
371
|
-
return {
|
372
|
-
[start]: tick[start],
|
373
|
-
};
|
374
|
-
};
|
375
|
-
if (this.dualKnobs === false) {
|
376
|
-
/**
|
377
|
-
* When the value is less than the activeBarStart or the min value,
|
378
|
-
* the knob will display at the start of the active bar.
|
379
|
-
*/
|
380
|
-
if (this.valA < ((_a = this.activeBarStart) !== null && _a !== void 0 ? _a : this.min)) {
|
381
|
-
/**
|
382
|
-
* Sets the bar positions relative to the upper and lower limits.
|
383
|
-
* Converts the ratio values into percentages, used as offsets for left/right styles.
|
384
|
-
*
|
385
|
-
* The ratioUpper refers to the knob position on the bar.
|
386
|
-
* The ratioLower refers to the end position of the active bar (the value).
|
387
|
-
*/
|
388
|
-
barStart = `${ratioUpper * 100}%`;
|
389
|
-
barEnd = `${100 - ratioLower * 100}%`;
|
390
|
-
}
|
391
|
-
else {
|
392
|
-
/**
|
393
|
-
* Otherwise, the knob will display at the end of the active bar.
|
394
|
-
*
|
395
|
-
* The ratioLower refers to the start position of the active bar (the value).
|
396
|
-
* The ratioUpper refers to the knob position on the bar.
|
397
|
-
*/
|
398
|
-
barStart = `${ratioLower * 100}%`;
|
399
|
-
barEnd = `${100 - ratioUpper * 100}%`;
|
400
|
-
}
|
401
|
-
}
|
402
|
-
const barStyle = {
|
403
|
-
[start]: barStart,
|
404
|
-
[end]: barEnd,
|
405
|
-
};
|
406
|
-
const ticks = [];
|
407
|
-
if (this.snaps && this.ticks) {
|
408
|
-
for (let value = min; value <= max; value += step) {
|
409
|
-
const ratio = valueToRatio(value, min, max);
|
410
|
-
const ratioMin = Math.min(ratioLower, ratioUpper);
|
411
|
-
const ratioMax = Math.max(ratioLower, ratioUpper);
|
412
|
-
const tick = {
|
413
|
-
ratio,
|
414
|
-
/**
|
415
|
-
* Sets the tick mark as active when the tick is between the min bounds and the knob.
|
416
|
-
* When using activeBarStart, the tick mark will be active between the knob and activeBarStart.
|
417
|
-
*/
|
418
|
-
active: ratio >= ratioMin && ratio <= ratioMax,
|
419
|
-
};
|
420
|
-
tick[start] = `${ratio * 100}%`;
|
421
|
-
ticks.push(tick);
|
422
|
-
}
|
423
|
-
}
|
424
|
-
helpers.renderHiddenInput(true, el, this.name, JSON.stringify(this.getValue()), disabled);
|
425
|
-
return (index.h(index.Host, { onFocusin: this.onFocus, onFocusout: this.onBlur, id: rangeId, class: theme.createColorClasses(this.color, {
|
426
|
-
[mode]: true,
|
427
|
-
'in-item': theme.hostContext('ion-item', el),
|
428
|
-
'range-disabled': disabled,
|
429
|
-
'range-pressed': pressedKnob !== undefined,
|
430
|
-
'range-has-pin': pin,
|
431
|
-
}) }, index.h("slot", { name: "start" }), index.h("div", { class: "range-slider", ref: (rangeEl) => (this.rangeSlider = rangeEl) }, ticks.map((tick) => (index.h("div", { style: tickStyle(tick), role: "presentation", class: {
|
432
|
-
'range-tick': true,
|
433
|
-
'range-tick-active': tick.active,
|
434
|
-
}, part: tick.active ? 'tick-active' : 'tick' }))), index.h("div", { class: "range-bar", role: "presentation", part: "bar" }), index.h("div", { class: "range-bar range-bar-active", role: "presentation", style: barStyle, part: "bar-active" }), renderKnob(rtl, {
|
435
|
-
knob: 'A',
|
436
|
-
pressed: pressedKnob === 'A',
|
437
|
-
value: this.valA,
|
438
|
-
ratio: this.ratioA,
|
439
|
-
pin,
|
440
|
-
pinFormatter,
|
441
|
-
disabled,
|
442
|
-
handleKeyboard,
|
443
|
-
min,
|
444
|
-
max,
|
445
|
-
labelText,
|
446
|
-
}), this.dualKnobs &&
|
447
|
-
renderKnob(rtl, {
|
448
|
-
knob: 'B',
|
449
|
-
pressed: pressedKnob === 'B',
|
450
|
-
value: this.valB,
|
451
|
-
ratio: this.ratioB,
|
452
|
-
pin,
|
453
|
-
pinFormatter,
|
454
|
-
disabled,
|
455
|
-
handleKeyboard,
|
456
|
-
min,
|
457
|
-
max,
|
458
|
-
labelText,
|
459
|
-
})), index.h("slot", { name: "end" })));
|
460
|
-
}
|
461
|
-
get el() { return index.getElement(this); }
|
462
|
-
static get watchers() { return {
|
463
|
-
"debounce": ["debounceChanged"],
|
464
|
-
"min": ["minChanged"],
|
465
|
-
"max": ["maxChanged"],
|
466
|
-
"activeBarStart": ["activeBarStartChanged"],
|
467
|
-
"disabled": ["disabledChanged"],
|
468
|
-
"value": ["valueChanged"]
|
469
|
-
}; }
|
470
|
-
};
|
471
|
-
const renderKnob = (rtl, { knob, value, ratio, min, max, disabled, pressed, pin, handleKeyboard, labelText, pinFormatter }) => {
|
472
|
-
const start = rtl ? 'right' : 'left';
|
473
|
-
const knobStyle = () => {
|
474
|
-
const style = {};
|
475
|
-
style[start] = `${ratio * 100}%`;
|
476
|
-
return style;
|
477
|
-
};
|
478
|
-
return (index.h("div", { onKeyDown: (ev) => {
|
479
|
-
const key = ev.key;
|
480
|
-
if (key === 'ArrowLeft' || key === 'ArrowDown') {
|
481
|
-
handleKeyboard(knob, false);
|
482
|
-
ev.preventDefault();
|
483
|
-
ev.stopPropagation();
|
484
|
-
}
|
485
|
-
else if (key === 'ArrowRight' || key === 'ArrowUp') {
|
486
|
-
handleKeyboard(knob, true);
|
487
|
-
ev.preventDefault();
|
488
|
-
ev.stopPropagation();
|
489
|
-
}
|
490
|
-
}, class: {
|
491
|
-
'range-knob-handle': true,
|
492
|
-
'range-knob-a': knob === 'A',
|
493
|
-
'range-knob-b': knob === 'B',
|
494
|
-
'range-knob-pressed': pressed,
|
495
|
-
'range-knob-min': value === min,
|
496
|
-
'range-knob-max': value === max,
|
497
|
-
}, style: knobStyle(), role: "slider", tabindex: disabled ? -1 : 0, "aria-label": labelText, "aria-valuemin": min, "aria-valuemax": max, "aria-disabled": disabled ? 'true' : null, "aria-valuenow": value }, pin && (index.h("div", { class: "range-pin", role: "presentation", part: "pin" }, pinFormatter(value))), index.h("div", { class: "range-knob", role: "presentation", part: "knob" })));
|
498
|
-
};
|
499
|
-
const ratioToValue = (ratio, min, max, step) => {
|
500
|
-
let value = (max - min) * ratio;
|
501
|
-
if (step > 0) {
|
502
|
-
value = Math.round(value / step) * step + min;
|
503
|
-
}
|
504
|
-
return helpers.clamp(min, value, max);
|
505
|
-
};
|
506
|
-
const valueToRatio = (value, min, max) => {
|
507
|
-
return helpers.clamp(0, (value - min) / (max - min), 1);
|
508
|
-
};
|
509
|
-
let rangeIds = 0;
|
510
|
-
Range.style = {
|
511
|
-
ios: rangeIosCss,
|
512
|
-
md: rangeMdCss
|
513
|
-
};
|
514
|
-
|
515
|
-
exports.ion_range = Range;
|
@@ -1,24 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
-
|
5
|
-
const index = require('./index-51e8292e.js');
|
6
|
-
const ionicGlobal = require('./ionic-global-2cde9d3a.js');
|
7
|
-
const theme = require('./theme-b0b295c1.js');
|
8
|
-
|
9
|
-
const textCss = ":host(.ion-color){color:var(--ion-color-base)}";
|
10
|
-
|
11
|
-
const Text = class {
|
12
|
-
constructor(hostRef) {
|
13
|
-
index.registerInstance(this, hostRef);
|
14
|
-
}
|
15
|
-
render() {
|
16
|
-
const mode = ionicGlobal.getIonMode(this);
|
17
|
-
return (index.h(index.Host, { class: theme.createColorClasses(this.color, {
|
18
|
-
[mode]: true,
|
19
|
-
}) }, index.h("slot", null)));
|
20
|
-
}
|
21
|
-
};
|
22
|
-
Text.style = textCss;
|
23
|
-
|
24
|
-
exports.ion_text = Text;
|
@@ -1,117 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
-
|
5
|
-
const index = require('./index-51e8292e.js');
|
6
|
-
|
7
|
-
function GetSelectOptionId(questionId, index) {
|
8
|
-
return "question-" + questionId + "-option-" + index;
|
9
|
-
}
|
10
|
-
|
11
|
-
const sparkleQuizFeedbackCss = ":host{display:block}";
|
12
|
-
|
13
|
-
const SparkleQuizFeedback = class {
|
14
|
-
constructor(hostRef) {
|
15
|
-
index.registerInstance(this, hostRef);
|
16
|
-
this.quizFeedbackChange = index.createEvent(this, "quizFeedbackChange", 7);
|
17
|
-
this.displayOptions = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
18
|
-
}
|
19
|
-
render() {
|
20
|
-
return (index.h(index.Host, { class: "quiz__feedback" }, index.h("div", { class: "question-container" }, index.h("div", { class: "question-text" }, this.question.questionText), index.h("div", null, this.displayOptions.map((option, index$1) => index.h("div", { class: "option" }, index.h("input", { type: "radio", id: GetSelectOptionId(this.question.questionId, index$1), name: "question-" + this.question.questionId, value: option, onChange: (e) => this.quizFeedbackChange.emit({ value: e.target.value, question: this.question }) }), index.h("label", { htmlFor: GetSelectOptionId(this.question.questionId, index$1) }, index.h("span", { class: "number" }, this.displayOptions[index$1]), " ", option), index.h("br", null)))))));
|
21
|
-
}
|
22
|
-
};
|
23
|
-
SparkleQuizFeedback.style = sparkleQuizFeedbackCss;
|
24
|
-
|
25
|
-
const sparkleQuizInputCss = ":host{display:block}";
|
26
|
-
|
27
|
-
const SparkleQuizInput = class {
|
28
|
-
constructor(hostRef) {
|
29
|
-
index.registerInstance(this, hostRef);
|
30
|
-
this.quizInputChange = index.createEvent(this, "quizInputChange", 7);
|
31
|
-
}
|
32
|
-
render() {
|
33
|
-
return (index.h(index.Host, { class: "quiz__input" }, index.h("div", { class: "question-container" }, index.h("label", { htmlFor: "question-" + this.question.questionId, class: "form-label" }, this.question.questionText), index.h("input", { type: "text", class: "form-control", id: "question-" + this.question.questionId, name: "question-" + this.question.questionId, onInput: (e) => this.quizInputChange.emit({ value: e.target.value, question: this.question }) }))));
|
34
|
-
}
|
35
|
-
};
|
36
|
-
SparkleQuizInput.style = sparkleQuizInputCss;
|
37
|
-
|
38
|
-
const sparkleQuizOpinionCss = "sparkle-quiz-opinion .scale{display:flex;justify-content:space-between}sparkle-quiz-opinion .scale>p{margin:0}sparkle-quiz-opinion .scale>p.selected{color:var(--ion-color-primary)}sparkle-quiz-opinion ion-icon{font-size:30px}sparkle-quiz-opinion .icon-group{min-width:70px;text-align:right;padding-right:10px}";
|
39
|
-
|
40
|
-
const SparkleQuizOpinion = class {
|
41
|
-
constructor(hostRef) {
|
42
|
-
index.registerInstance(this, hostRef);
|
43
|
-
this.quizOpinionChange = index.createEvent(this, "quizOpinionChange", 7);
|
44
|
-
this.fivePointsDisplayOptions = ['Strongly agree', 'Agree', 'Not sure', 'Disagree', 'Strongly disagree'];
|
45
|
-
this.tenPointsDisplayOptions = ["Never",
|
46
|
-
"Never",
|
47
|
-
"Sometimes",
|
48
|
-
"Sometimes",
|
49
|
-
"Half of the time",
|
50
|
-
"Half of the time",
|
51
|
-
"Most of the time",
|
52
|
-
"Most of the time",
|
53
|
-
"Always",
|
54
|
-
"Always",
|
55
|
-
"Always"];
|
56
|
-
this.tenPointsDefaultValue = 5;
|
57
|
-
}
|
58
|
-
optionChanged(index, answer) {
|
59
|
-
this.selectedIndex = index;
|
60
|
-
this.quizOpinionChange.emit({ value: answer, question: this.question });
|
61
|
-
}
|
62
|
-
renderFivePointScale() {
|
63
|
-
return (this.fivePointsDisplayOptions.map((option, index$1) => index.h("div", { class: "option" }, index.h("input", { id: GetSelectOptionId(this.question.questionId, index$1), type: "radio", name: "question-" + this.question.questionId, value: option, onChange: (e) => this.optionChanged(index$1, this.fivePointsDisplayOptions[index$1]) }), index.h("label", { htmlFor: GetSelectOptionId(this.question.questionId, index$1) }, index.h("span", { class: "number" }, index$1 + 1), option), index.h("br", null))));
|
64
|
-
}
|
65
|
-
renderTenPointScale() {
|
66
|
-
return (index.h("div", null, index.h("ion-item", null, index.h("ion-range", { class: "opinion-range", onIonChange: (e) => this.optionChanged(+e.detail.value, this.tenPointsDisplayOptions[+e.detail.value]), min: 0, max: 10, value: this.tenPointsDefaultValue, step: 1, pin: true, snaps: true }, index.h("ion-icon", { size: "small", slot: "start", name: "star-outline" }), index.h("ion-icon", { slot: "end", name: "star" }))), index.h("div", { class: "scale" }, index.h("p", null, "Never"), index.h("p", { class: "selected" }, this.tenPointsDisplayOptions[this.selectedIndex] || this.tenPointsDisplayOptions[this.tenPointsDefaultValue]), index.h("p", null, "Always")), index.h("br", null), index.h("hr", null)));
|
67
|
-
}
|
68
|
-
render() {
|
69
|
-
return (index.h(index.Host, { class: "quiz__opinion" }, index.h("div", { class: "opinion-container" }, index.h("div", { class: "question-text" }, this.question.questionText), index.h("div", null, this.question.scale == "FIVE-POINTS" && this.renderFivePointScale(), this.question.scale == "TEN-POINTS" && this.renderTenPointScale()))));
|
70
|
-
}
|
71
|
-
get el() { return index.getElement(this); }
|
72
|
-
};
|
73
|
-
SparkleQuizOpinion.style = sparkleQuizOpinionCss;
|
74
|
-
|
75
|
-
const sparkleQuizPollCss = ":host{display:block}";
|
76
|
-
|
77
|
-
const SparkleQuizPoll = class {
|
78
|
-
constructor(hostRef) {
|
79
|
-
index.registerInstance(this, hostRef);
|
80
|
-
this.quizInputChange = index.createEvent(this, "quizInputChange", 7);
|
81
|
-
}
|
82
|
-
render() {
|
83
|
-
return (index.h(index.Host, { class: "quiz__input" }, index.h("div", { class: "question-container" }, index.h("label", { htmlFor: "question-" + this.question.questionId, class: "form-label" }, this.question.questionText), index.h("input", { type: "text", class: "form-control", id: "question-" + this.question.questionId, name: "question-" + this.question.questionId, onInput: (e) => this.quizInputChange.emit({ value: e.target.value, question: this.question }) }))));
|
84
|
-
}
|
85
|
-
};
|
86
|
-
SparkleQuizPoll.style = sparkleQuizPollCss;
|
87
|
-
|
88
|
-
const sparkleQuizSelectCss = ":host{display:block}";
|
89
|
-
|
90
|
-
const SparkleQuizSelect = class {
|
91
|
-
constructor(hostRef) {
|
92
|
-
index.registerInstance(this, hostRef);
|
93
|
-
this.quizSelectChange = index.createEvent(this, "quizSelectChange", 7);
|
94
|
-
this.allowMultiple = false;
|
95
|
-
this.values = [];
|
96
|
-
this.displayOptions = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
|
97
|
-
}
|
98
|
-
optionChanged(e) {
|
99
|
-
if (e.target.checked) {
|
100
|
-
this.values = [...this.values, e.target.value];
|
101
|
-
}
|
102
|
-
else {
|
103
|
-
this.values = this.values.filter(x => x !== e.target.value);
|
104
|
-
}
|
105
|
-
this.quizSelectChange.emit({ value: this.values, question: this.question });
|
106
|
-
}
|
107
|
-
render() {
|
108
|
-
return (index.h(index.Host, { class: "quiz__select" }, index.h("div", { class: "question-container" }, index.h("div", { class: "question-text" }, this.question.questionText), index.h("div", null, this.question.options.map((option, index$1) => index.h("div", { class: "option" }, index.h("input", { type: this.allowMultiple ? "checkbox" : "radio", id: GetSelectOptionId(this.question.questionId, index$1), name: "question-" + this.question.questionId, value: option.option, onChange: (e) => this.optionChanged(e) }), index.h("label", { htmlFor: GetSelectOptionId(this.question.questionId, index$1) }, index.h("span", { class: "number" }, this.displayOptions[index$1]), option.option), index.h("br", null)))))));
|
109
|
-
}
|
110
|
-
};
|
111
|
-
SparkleQuizSelect.style = sparkleQuizSelectCss;
|
112
|
-
|
113
|
-
exports.sparkle_quiz_feedback = SparkleQuizFeedback;
|
114
|
-
exports.sparkle_quiz_input = SparkleQuizInput;
|
115
|
-
exports.sparkle_quiz_opinion = SparkleQuizOpinion;
|
116
|
-
exports.sparkle_quiz_poll = SparkleQuizPoll;
|
117
|
-
exports.sparkle_quiz_select = SparkleQuizSelect;
|