@sparkle-learning/core 0.0.39 → 0.0.40
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} +11602 -2716
- package/dist/cjs/{icons-c61db785.js → icons-fda820af.js} +0 -0
- package/dist/cjs/index.cjs.js +5 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sparkle-code.cjs.entry.js +1 -1
- package/dist/cjs/sparkle-core.cjs.js +1 -1
- package/dist/cjs/sparkle-feedback.cjs.entry.js +1 -2
- package/dist/cjs/sparkle-menu-collapsible.cjs.entry.js +1 -1
- package/dist/cjs/sparkle-quiz-feedback_5.cjs.entry.js +117 -0
- package/dist/cjs/sparkle-quiz.cjs.entry.js +120 -0
- package/dist/cjs/student.service-2e58f237.js +78 -0
- package/dist/esm/{auth.service-9fb86455.js → PrivateRoute-c5441f35.js} +33 -4
- package/dist/esm/{animation-e0716b39.js → animation-12377cb3.js} +1 -1
- package/dist/esm/{auth.store-633e8414.js → auth.store-dba2c2da.js} +1 -1
- package/dist/esm/{facilitator.service-8fd435bf.js → facilitator.service-b0292f7f.js} +2 -2
- package/dist/esm/{feed.service-ace049e5.js → feed.service-8fbe4ce3.js} +3 -3
- package/dist/esm/{framework-delegate-e4f8013b.js → framework-delegate-3e634a5c.js} +1 -1
- package/dist/esm/{sparkle-export-lessons_6.entry.js → header-mobile-collapse_61.entry.js} +11501 -2670
- package/dist/esm/{helpers-03073fe4.js → helpers-bf0e23d6.js} +1 -1
- package/dist/esm/{httpService-61864992.js → httpService-7b75b095.js} +2 -2
- package/dist/esm/{icons-90b957ab.js → icons-1c794c74.js} +1 -1
- package/dist/esm/{index-b4b4e503.js → index-2b84cad2.js} +3 -3
- package/dist/esm/{index-a2d2941d.js → index-45fec1e7.js} +1 -1
- package/dist/esm/{index-37004831.js → index-5e8971ae.js} +1 -1
- package/dist/esm/{index-dedabca0.js → index-cded2d87.js} +2 -2
- package/dist/esm/{index.es-283fbd2e.js → index.es-e0c0f891.js} +1 -1
- package/dist/esm/index.js +5 -6
- package/dist/esm/{input-shims-cc3720a0.js → input-shims-671d8d9f.js} +2 -2
- package/dist/esm/ion-accordion.entry.js +1 -1
- package/dist/esm/ion-action-sheet_4.entry.js +5 -5
- package/dist/esm/ion-app.entry.js +3 -3
- package/dist/esm/ion-back-button.entry.js +1 -1
- package/dist/esm/ion-breadcrumb.entry.js +1 -1
- package/dist/esm/ion-content_2.entry.js +2 -2
- package/dist/esm/ion-datetime-button.entry.js +1 -1
- package/dist/esm/ion-datetime.entry.js +1 -1
- package/dist/esm/ion-fab-button.entry.js +1 -1
- package/dist/esm/ion-footer.entry.js +2 -2
- package/dist/esm/ion-img.entry.js +1 -1
- package/dist/esm/ion-infinite-scroll.entry.js +2 -2
- package/dist/esm/ion-item-options.entry.js +1 -1
- package/dist/esm/ion-item-sliding.entry.js +2 -2
- package/dist/esm/ion-loading.entry.js +3 -3
- package/dist/esm/ion-menu-button.entry.js +4 -4
- package/dist/esm/ion-menu-toggle.entry.js +4 -4
- package/dist/esm/ion-menu.entry.js +4 -4
- package/dist/esm/ion-modal.entry.js +6 -6
- package/dist/esm/ion-nav.entry.js +4 -4
- package/dist/esm/ion-picker-column-internal_2.entry.js +1 -1
- package/dist/esm/ion-picker-column.entry.js +1 -1
- package/dist/esm/ion-picker.entry.js +3 -3
- package/dist/esm/ion-progress-bar.entry.js +1 -1
- package/dist/esm/ion-refresher.entry.js +3 -3
- package/dist/esm/ion-reorder-group.entry.js +2 -2
- package/dist/esm/ion-router-outlet.entry.js +4 -4
- package/dist/esm/ion-router.entry.js +1 -1
- package/dist/esm/ion-searchbar.entry.js +1 -1
- package/dist/esm/ion-segment-button.entry.js +1 -1
- package/dist/esm/ion-segment.entry.js +1 -1
- package/dist/esm/ion-select_2.entry.js +2 -2
- package/dist/esm/ion-slides.entry.js +1 -1
- package/dist/esm/ion-tab.entry.js +2 -2
- package/dist/esm/ion-textarea.entry.js +1 -1
- package/dist/esm/ion-toast.entry.js +3 -3
- package/dist/esm/ion-toggle.entry.js +1 -1
- package/dist/esm/ion-virtual-scroll.entry.js +1 -1
- package/dist/esm/{ios.transition-3a6179bb.js → ios.transition-131d64fe.js} +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{md.transition-cff16bf3.js → md.transition-f6126011.js} +3 -3
- package/dist/esm/{menu-toggle-util-59241733.js → menu-toggle-util-bace8ae6.js} +1 -1
- package/dist/esm/{overlays-bdd9344a.js → overlays-3b4dca92.js} +2 -2
- package/dist/esm/{purify-7085b248.js → purify-85bfcc69.js} +1 -1
- package/dist/esm/sparkle-animation-player.entry.js +1 -1
- package/dist/esm/sparkle-code.entry.js +1 -1
- package/dist/esm/sparkle-core.js +1 -1
- package/dist/esm/sparkle-facilitator-notes-form.entry.js +5 -5
- package/dist/esm/sparkle-feed-post.entry.js +1 -1
- package/dist/esm/sparkle-feedback.entry.js +5 -6
- package/dist/esm/sparkle-goal-form.entry.js +6 -6
- package/dist/esm/sparkle-menu-collapsible.entry.js +1 -1
- package/dist/esm/sparkle-quiz-feedback_5.entry.js +109 -0
- package/dist/esm/sparkle-quiz.entry.js +116 -0
- package/dist/esm/{status-tap-463d0f87.js → status-tap-dde52787.js} +2 -2
- package/dist/esm/{student.service-e6eb1f99.js → student.service-0746418b.js} +19 -3
- package/dist/esm/{swipe-back-f8765ac9.js → swipe-back-7847a0c1.js} +1 -1
- package/dist/esm/{util-a831d09d.js → util-6ef753e9.js} +1 -1
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/button/button.css +49 -0
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/cards/card/card.css +208 -0
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/cards/cards.css +31 -0
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/code/code.css +245 -0
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/dropdown/dropdown.css +115 -0
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/header/header-mobile-collapse/header-mobile-collapse.css +255 -0
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/header/header.css +232 -0
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/menu/collapsible/collapsible.css +3 -0
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/menu/menu-toggle/menu-toggle.css +25 -0
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/menu/menu.css +71 -0
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/nav/nav.css +194 -0
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/notfound-page/notfound-page.css +4 -0
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/overlay/overlay.css +67 -0
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/page-footer/page-footer.css +18 -0
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/pagination/pagination.css +89 -0
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/select/select.css +52 -0
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/sidebar/sidebar.css +98 -0
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/sparkle-lower-content-nav/sparkle-lower-content-nav.css +8 -0
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/table-of-contents/table-of-contents.css +37 -0
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/tabs/tabs.css +64 -0
- package/dist/sparkle-core/index.esm.js +1 -1
- package/dist/sparkle-core/{p-539bf742.js → p-00d10dc9.js} +2 -2
- package/dist/sparkle-core/{p-b9933822.js → p-05c032dd.js} +1 -1
- package/dist/sparkle-core/{p-dabc80c4.entry.js → p-0664370b.entry.js} +1 -1
- package/dist/sparkle-core/p-077c732b.js +4 -0
- package/dist/sparkle-core/{p-c278db5f.entry.js → p-0ad5c123.entry.js} +1 -1
- package/dist/sparkle-core/{p-b9b1d4da.entry.js → p-0afa3a4d.entry.js} +1 -1
- package/dist/sparkle-core/{p-285ab4ed.entry.js → p-0c3f3ea6.entry.js} +1 -1
- package/dist/sparkle-core/{p-727e1c28.entry.js → p-0f1c5899.entry.js} +1 -1
- package/dist/sparkle-core/{p-64e814b9.entry.js → p-11356b03.entry.js} +1 -1
- package/dist/sparkle-core/{p-b5ec8fb0.entry.js → p-11a6c175.entry.js} +1 -1
- package/dist/sparkle-core/p-12dd96d7.js +4 -0
- package/dist/sparkle-core/{p-a85598ad.js → p-1d4c7c11.js} +1 -1
- package/dist/sparkle-core/{p-c8fe45df.entry.js → p-1e125ca5.entry.js} +1 -1
- package/dist/sparkle-core/{p-cab3da3c.entry.js → p-1e4f65ee.entry.js} +1 -1
- package/dist/sparkle-core/{p-405f7c58.js → p-2033cd86.js} +2 -2
- package/dist/sparkle-core/p-23aca7ca.js +4 -0
- package/dist/sparkle-core/{p-e65c72cc.entry.js → p-24cb9a33.entry.js} +1 -1
- package/dist/sparkle-core/{p-014b5707.entry.js → p-2c1ca854.entry.js} +1 -1
- package/dist/sparkle-core/{p-340754ed.js → p-2f569553.js} +1 -1
- package/dist/sparkle-core/{p-2e2b813c.js → p-2ff67662.js} +2 -2
- package/dist/sparkle-core/{p-0c0f8acd.entry.js → p-30b810d1.entry.js} +1 -1
- package/dist/sparkle-core/{p-b236d258.entry.js → p-377b04c2.entry.js} +1 -1
- package/dist/sparkle-core/{p-fde382f0.entry.js → p-39712c56.entry.js} +1 -1
- package/dist/sparkle-core/{p-be28346b.js → p-3de0e00c.js} +1 -1
- package/dist/sparkle-core/p-462bffba.js +1 -0
- package/dist/sparkle-core/{p-3f85e1ca.js → p-48f72e63.js} +2 -2
- package/dist/sparkle-core/{p-6f0545b3.entry.js → p-54dd894f.entry.js} +1 -1
- package/dist/sparkle-core/{p-ce94efdb.entry.js → p-564e64fc.entry.js} +1 -1
- package/dist/sparkle-core/{p-db8387eb.entry.js → p-58e4bbe5.entry.js} +1 -1
- package/dist/sparkle-core/{p-ca4c8a10.js → p-5cad23f1.js} +1 -1
- package/dist/sparkle-core/p-5efc6566.js +1 -0
- package/dist/sparkle-core/{p-c9cd4ff1.js → p-600cf6a3.js} +1 -1
- package/dist/sparkle-core/{p-2e035338.entry.js → p-641bfc92.entry.js} +1 -1
- package/dist/sparkle-core/{p-b4bc8b02.entry.js → p-6faa194c.entry.js} +1 -1
- package/dist/sparkle-core/{p-2f10208d.entry.js → p-6ffd2420.entry.js} +1 -1
- package/dist/sparkle-core/p-73721c84.js +4 -0
- package/dist/sparkle-core/{p-ed9f48c4.entry.js → p-74864276.entry.js} +1 -1
- package/dist/sparkle-core/p-80d6b0e6.entry.js +1 -0
- package/dist/sparkle-core/p-8492a765.entry.js +1 -0
- package/dist/sparkle-core/{p-a019ad0c.js → p-86ed13f0.js} +1 -1
- package/dist/sparkle-core/{p-4ae75caa.entry.js → p-894ff7e6.entry.js} +1 -1
- package/dist/sparkle-core/{p-5519d283.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-25e556cc.entry.js → p-957715c5.entry.js} +1 -1
- package/dist/sparkle-core/{p-b4b01fa2.entry.js → p-9abbd715.entry.js} +1 -1
- package/dist/sparkle-core/{p-e7568d4b.js → p-9d894ed4.js} +1 -1
- package/dist/sparkle-core/{p-4320dac0.entry.js → p-9ebf0537.entry.js} +1 -1
- package/dist/sparkle-core/p-a49ab4e8.entry.js +1 -0
- package/dist/sparkle-core/{p-93e74f1b.entry.js → p-af3cc111.entry.js} +1 -1
- package/dist/sparkle-core/{p-5fc26938.js → p-b0603d19.js} +1 -1
- package/dist/sparkle-core/{p-317037de.entry.js → p-b3f375fb.entry.js} +1 -1
- package/dist/sparkle-core/p-b4408842.entry.js +352 -0
- package/dist/sparkle-core/{p-2fba9a3a.entry.js → p-b5f3e1bf.entry.js} +1 -1
- package/dist/sparkle-core/{p-82ad4e7c.entry.js → p-b96f3c84.entry.js} +2 -2
- package/dist/sparkle-core/{p-ad102371.js → p-bd80ff43.js} +1 -1
- package/dist/sparkle-core/{p-f0cf4a8f.entry.js → p-be64105c.entry.js} +1 -1
- package/dist/sparkle-core/{p-f4b0b6a4.entry.js → p-c0533c23.entry.js} +1 -1
- package/dist/sparkle-core/p-c3cadfc6.entry.js +1 -0
- package/dist/sparkle-core/{p-2d4a5ddf.entry.js → p-c60b29bd.entry.js} +2 -2
- package/dist/sparkle-core/{p-56a2e8a2.js → p-cabe9139.js} +1 -1
- package/dist/sparkle-core/{p-0bb0cf41.entry.js → p-cabfbf22.entry.js} +1 -1
- package/dist/sparkle-core/{p-66a85393.entry.js → p-ce4b22f7.entry.js} +1 -1
- package/dist/sparkle-core/{p-17eb4633.js → p-d68092b7.js} +1 -1
- package/dist/sparkle-core/{p-0ea2518d.entry.js → p-de4deb61.entry.js} +1 -1
- package/dist/sparkle-core/{p-1f0b3ff9.entry.js → p-e686d8b5.entry.js} +1 -1
- package/dist/sparkle-core/{p-08d97c59.entry.js → p-e77d982d.entry.js} +1 -1
- package/dist/sparkle-core/{p-44f813b7.entry.js → p-e863bf1d.entry.js} +1 -1
- package/dist/sparkle-core/{p-63f69cdc.entry.js → p-ebd4354b.entry.js} +1 -1
- package/dist/sparkle-core/{p-fc965b88.entry.js → p-ef4edc48.entry.js} +1 -1
- package/dist/sparkle-core/{p-c2bbaf55.entry.js → p-fb0ca75e.entry.js} +1 -1
- package/dist/sparkle-core/{p-b83444c7.entry.js → p-fb757951.entry.js} +1 -1
- package/dist/sparkle-core/{p-d81a0680.js → p-fbccd30c.js} +1 -1
- package/dist/sparkle-core/sparkle-core.esm.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/PrivateRoute-4abc9d29.js +0 -35
- package/dist/cjs/dom-utils-b8befdd5.js +0 -63
- package/dist/cjs/header-mobile-collapse.cjs.entry.js +0 -90
- package/dist/cjs/index-70e63f5b.js +0 -3071
- package/dist/cjs/injectHistory-7206bbb9.js +0 -9
- package/dist/cjs/ion-avatar.cjs.entry.js +0 -25
- package/dist/cjs/ion-button.cjs.entry.js +0 -129
- package/dist/cjs/ion-card_2.cjs.entry.js +0 -91
- 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-icon_13.cjs.entry.js +0 -1505
- package/dist/cjs/ion-input_2.cjs.entry.js +0 -313
- package/dist/cjs/ion-label_2.cjs.entry.js +0 -126
- package/dist/cjs/ion-spinner.cjs.entry.js +0 -64
- 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-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-7b526801.js +0 -33
- package/dist/esm/dom-utils-109a7d75.js +0 -55
- package/dist/esm/header-mobile-collapse.entry.js +0 -86
- package/dist/esm/index-f9b9ba5d.js +0 -3067
- package/dist/esm/injectHistory-968f626d.js +0 -7
- package/dist/esm/ion-avatar.entry.js +0 -21
- package/dist/esm/ion-button.entry.js +0 -125
- package/dist/esm/ion-card_2.entry.js +0 -86
- package/dist/esm/ion-checkbox_4.entry.js +0 -353
- package/dist/esm/ion-col_3.entry.js +0 -153
- package/dist/esm/ion-icon_13.entry.js +0 -1489
- package/dist/esm/ion-input_2.entry.js +0 -308
- package/dist/esm/ion-label_2.entry.js +0 -121
- package/dist/esm/ion-spinner.entry.js +0 -60
- 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-router-redirect.entry.js +0 -28
- package/dist/esm/user.store-b8645067.js +0 -19
- package/dist/sparkle-core/p-03585916.js +0 -1
- package/dist/sparkle-core/p-1019ebc3.js +0 -1
- package/dist/sparkle-core/p-1728ead7.js +0 -1
- package/dist/sparkle-core/p-32762a44.entry.js +0 -1
- package/dist/sparkle-core/p-3bc68dd0.js +0 -1
- package/dist/sparkle-core/p-3c133235.entry.js +0 -1
- package/dist/sparkle-core/p-46869031.entry.js +0 -1
- package/dist/sparkle-core/p-4a5f2b2b.js +0 -1
- package/dist/sparkle-core/p-53bcbd1d.js +0 -1
- package/dist/sparkle-core/p-54ada5e3.entry.js +0 -1
- package/dist/sparkle-core/p-554da5b8.entry.js +0 -1
- package/dist/sparkle-core/p-5da2d95a.entry.js +0 -1
- package/dist/sparkle-core/p-6b05a1d3.entry.js +0 -1
- package/dist/sparkle-core/p-6ea246fe.js +0 -4
- package/dist/sparkle-core/p-6ed0236e.entry.js +0 -1
- package/dist/sparkle-core/p-7f25366a.entry.js +0 -1
- package/dist/sparkle-core/p-91accfc1.js +0 -1
- package/dist/sparkle-core/p-a5c5da9a.entry.js +0 -1
- package/dist/sparkle-core/p-a8a77bec.entry.js +0 -1
- package/dist/sparkle-core/p-c4af184b.entry.js +0 -1
- package/dist/sparkle-core/p-c71cbbf7.entry.js +0 -1
- package/dist/sparkle-core/p-c8c73fa7.js +0 -4
- package/dist/sparkle-core/p-cd832fbf.entry.js +0 -1
- package/dist/sparkle-core/p-d0ac5f17.js +0 -1
- package/dist/sparkle-core/p-d1fcbfc2.js +0 -4
- package/dist/sparkle-core/p-d432d3ac.entry.js +0 -1
- package/dist/sparkle-core/p-d969f7d0.entry.js +0 -348
- package/dist/sparkle-core/p-dca90a55.entry.js +0 -4
- package/dist/sparkle-core/p-dd2e7f84.js +0 -4
- package/dist/sparkle-core/p-e0429a19.entry.js +0 -1
- package/dist/sparkle-core/p-e7066c64.entry.js +0 -1
- package/dist/sparkle-core/p-eb40a191.entry.js +0 -1
- package/dist/sparkle-core/p-ecdea569.entry.js +0 -1
- package/dist/sparkle-core/p-ef6c2352.entry.js +0 -1
@@ -1,499 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* TS adaption of https://github.com/pillarjs/path-to-regexp/blob/master/index.js
|
3
|
-
*/
|
4
|
-
/**
|
5
|
-
* Default configs.
|
6
|
-
*/
|
7
|
-
const DEFAULT_DELIMITER = '/';
|
8
|
-
const DEFAULT_DELIMITERS = './';
|
9
|
-
/**
|
10
|
-
* The main path matching regexp utility.
|
11
|
-
*/
|
12
|
-
const PATH_REGEXP = new RegExp([
|
13
|
-
// Match escaped characters that would otherwise appear in future matches.
|
14
|
-
// This allows the user to escape special characters that won't transform.
|
15
|
-
'(\\\\.)',
|
16
|
-
// Match Express-style parameters and un-named parameters with a prefix
|
17
|
-
// and optional suffixes. Matches appear as:
|
18
|
-
//
|
19
|
-
// "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?"]
|
20
|
-
// "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined]
|
21
|
-
'(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?'
|
22
|
-
].join('|'), 'g');
|
23
|
-
/**
|
24
|
-
* Parse a string for the raw tokens.
|
25
|
-
*/
|
26
|
-
const parse = (str, options) => {
|
27
|
-
var tokens = [];
|
28
|
-
var key = 0;
|
29
|
-
var index = 0;
|
30
|
-
var path = '';
|
31
|
-
var defaultDelimiter = (options && options.delimiter) || DEFAULT_DELIMITER;
|
32
|
-
var delimiters = (options && options.delimiters) || DEFAULT_DELIMITERS;
|
33
|
-
var pathEscaped = false;
|
34
|
-
var res;
|
35
|
-
while ((res = PATH_REGEXP.exec(str)) !== null) {
|
36
|
-
var m = res[0];
|
37
|
-
var escaped = res[1];
|
38
|
-
var offset = res.index;
|
39
|
-
path += str.slice(index, offset);
|
40
|
-
index = offset + m.length;
|
41
|
-
// Ignore already escaped sequences.
|
42
|
-
if (escaped) {
|
43
|
-
path += escaped[1];
|
44
|
-
pathEscaped = true;
|
45
|
-
continue;
|
46
|
-
}
|
47
|
-
var prev = '';
|
48
|
-
var next = str[index];
|
49
|
-
var name = res[2];
|
50
|
-
var capture = res[3];
|
51
|
-
var group = res[4];
|
52
|
-
var modifier = res[5];
|
53
|
-
if (!pathEscaped && path.length) {
|
54
|
-
var k = path.length - 1;
|
55
|
-
if (delimiters.indexOf(path[k]) > -1) {
|
56
|
-
prev = path[k];
|
57
|
-
path = path.slice(0, k);
|
58
|
-
}
|
59
|
-
}
|
60
|
-
// Push the current path onto the tokens.
|
61
|
-
if (path) {
|
62
|
-
tokens.push(path);
|
63
|
-
path = '';
|
64
|
-
pathEscaped = false;
|
65
|
-
}
|
66
|
-
var partial = prev !== '' && next !== undefined && next !== prev;
|
67
|
-
var repeat = modifier === '+' || modifier === '*';
|
68
|
-
var optional = modifier === '?' || modifier === '*';
|
69
|
-
var delimiter = prev || defaultDelimiter;
|
70
|
-
var pattern = capture || group;
|
71
|
-
tokens.push({
|
72
|
-
name: name || key++,
|
73
|
-
prefix: prev,
|
74
|
-
delimiter: delimiter,
|
75
|
-
optional: optional,
|
76
|
-
repeat: repeat,
|
77
|
-
partial: partial,
|
78
|
-
pattern: pattern ? escapeGroup(pattern) : '[^' + escapeString(delimiter) + ']+?'
|
79
|
-
});
|
80
|
-
}
|
81
|
-
// Push any remaining characters.
|
82
|
-
if (path || index < str.length) {
|
83
|
-
tokens.push(path + str.substr(index));
|
84
|
-
}
|
85
|
-
return tokens;
|
86
|
-
};
|
87
|
-
/**
|
88
|
-
* Escape a regular expression string.
|
89
|
-
*/
|
90
|
-
const escapeString = (str) => {
|
91
|
-
return str.replace(/([.+*?=^!:${}()[\]|/\\])/g, '\\$1');
|
92
|
-
};
|
93
|
-
/**
|
94
|
-
* Escape the capturing group by escaping special characters and meaning.
|
95
|
-
*/
|
96
|
-
const escapeGroup = (group) => {
|
97
|
-
return group.replace(/([=!:$/()])/g, '\\$1');
|
98
|
-
};
|
99
|
-
/**
|
100
|
-
* Get the flags for a regexp from the options.
|
101
|
-
*/
|
102
|
-
const flags = (options) => {
|
103
|
-
return options && options.sensitive ? '' : 'i';
|
104
|
-
};
|
105
|
-
/**
|
106
|
-
* Pull out keys from a regexp.
|
107
|
-
*/
|
108
|
-
const regexpToRegexp = (path, keys) => {
|
109
|
-
if (!keys)
|
110
|
-
return path;
|
111
|
-
// Use a negative lookahead to match only capturing groups.
|
112
|
-
var groups = path.source.match(/\((?!\?)/g);
|
113
|
-
if (groups) {
|
114
|
-
for (var i = 0; i < groups.length; i++) {
|
115
|
-
keys.push({
|
116
|
-
name: i,
|
117
|
-
prefix: null,
|
118
|
-
delimiter: null,
|
119
|
-
optional: false,
|
120
|
-
repeat: false,
|
121
|
-
partial: false,
|
122
|
-
pattern: null
|
123
|
-
});
|
124
|
-
}
|
125
|
-
}
|
126
|
-
return path;
|
127
|
-
};
|
128
|
-
/**
|
129
|
-
* Transform an array into a regexp.
|
130
|
-
*/
|
131
|
-
const arrayToRegexp = (path, keys, options) => {
|
132
|
-
var parts = [];
|
133
|
-
for (var i = 0; i < path.length; i++) {
|
134
|
-
parts.push(pathToRegexp(path[i], keys, options).source);
|
135
|
-
}
|
136
|
-
return new RegExp('(?:' + parts.join('|') + ')', flags(options));
|
137
|
-
};
|
138
|
-
/**
|
139
|
-
* Create a path regexp from string input.
|
140
|
-
*/
|
141
|
-
const stringToRegexp = (path, keys, options) => {
|
142
|
-
return tokensToRegExp(parse(path, options), keys, options);
|
143
|
-
};
|
144
|
-
/**
|
145
|
-
* Expose a function for taking tokens and returning a RegExp.
|
146
|
-
*/
|
147
|
-
const tokensToRegExp = (tokens, keys, options) => {
|
148
|
-
options = options || {};
|
149
|
-
var strict = options.strict;
|
150
|
-
var end = options.end !== false;
|
151
|
-
var delimiter = escapeString(options.delimiter || DEFAULT_DELIMITER);
|
152
|
-
var delimiters = options.delimiters || DEFAULT_DELIMITERS;
|
153
|
-
var endsWith = [].concat(options.endsWith || []).map(escapeString).concat('$').join('|');
|
154
|
-
var route = '';
|
155
|
-
var isEndDelimited = false;
|
156
|
-
// Iterate over the tokens and create our regexp string.
|
157
|
-
for (var i = 0; i < tokens.length; i++) {
|
158
|
-
var token = tokens[i];
|
159
|
-
if (typeof token === 'string') {
|
160
|
-
route += escapeString(token);
|
161
|
-
isEndDelimited = i === tokens.length - 1 && delimiters.indexOf(token[token.length - 1]) > -1;
|
162
|
-
}
|
163
|
-
else {
|
164
|
-
var prefix = escapeString(token.prefix || '');
|
165
|
-
var capture = token.repeat
|
166
|
-
? '(?:' + token.pattern + ')(?:' + prefix + '(?:' + token.pattern + '))*'
|
167
|
-
: token.pattern;
|
168
|
-
if (keys)
|
169
|
-
keys.push(token);
|
170
|
-
if (token.optional) {
|
171
|
-
if (token.partial) {
|
172
|
-
route += prefix + '(' + capture + ')?';
|
173
|
-
}
|
174
|
-
else {
|
175
|
-
route += '(?:' + prefix + '(' + capture + '))?';
|
176
|
-
}
|
177
|
-
}
|
178
|
-
else {
|
179
|
-
route += prefix + '(' + capture + ')';
|
180
|
-
}
|
181
|
-
}
|
182
|
-
}
|
183
|
-
if (end) {
|
184
|
-
if (!strict)
|
185
|
-
route += '(?:' + delimiter + ')?';
|
186
|
-
route += endsWith === '$' ? '$' : '(?=' + endsWith + ')';
|
187
|
-
}
|
188
|
-
else {
|
189
|
-
if (!strict)
|
190
|
-
route += '(?:' + delimiter + '(?=' + endsWith + '))?';
|
191
|
-
if (!isEndDelimited)
|
192
|
-
route += '(?=' + delimiter + '|' + endsWith + ')';
|
193
|
-
}
|
194
|
-
return new RegExp('^' + route, flags(options));
|
195
|
-
};
|
196
|
-
/**
|
197
|
-
* Normalize the given path string, returning a regular expression.
|
198
|
-
*
|
199
|
-
* An empty array can be passed in for the keys, which will hold the
|
200
|
-
* placeholder key descriptions. For example, using `/user/:id`, `keys` will
|
201
|
-
* contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
|
202
|
-
*/
|
203
|
-
const pathToRegexp = (path, keys, options) => {
|
204
|
-
if (path instanceof RegExp) {
|
205
|
-
return regexpToRegexp(path, keys);
|
206
|
-
}
|
207
|
-
if (Array.isArray(path)) {
|
208
|
-
return arrayToRegexp(path, keys, options);
|
209
|
-
}
|
210
|
-
return stringToRegexp(path, keys, options);
|
211
|
-
};
|
212
|
-
|
213
|
-
const hasBasename = (path, prefix) => {
|
214
|
-
return (new RegExp('^' + prefix + '(\\/|\\?|#|$)', 'i')).test(path);
|
215
|
-
};
|
216
|
-
const stripBasename = (path, prefix) => {
|
217
|
-
return hasBasename(path, prefix) ? path.substr(prefix.length) : path;
|
218
|
-
};
|
219
|
-
const stripTrailingSlash = (path) => {
|
220
|
-
return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;
|
221
|
-
};
|
222
|
-
const addLeadingSlash = (path) => {
|
223
|
-
return path.charAt(0) === '/' ? path : '/' + path;
|
224
|
-
};
|
225
|
-
const stripLeadingSlash = (path) => {
|
226
|
-
return path.charAt(0) === '/' ? path.substr(1) : path;
|
227
|
-
};
|
228
|
-
const parsePath = (path) => {
|
229
|
-
let pathname = path || '/';
|
230
|
-
let search = '';
|
231
|
-
let hash = '';
|
232
|
-
const hashIndex = pathname.indexOf('#');
|
233
|
-
if (hashIndex !== -1) {
|
234
|
-
hash = pathname.substr(hashIndex);
|
235
|
-
pathname = pathname.substr(0, hashIndex);
|
236
|
-
}
|
237
|
-
const searchIndex = pathname.indexOf('?');
|
238
|
-
if (searchIndex !== -1) {
|
239
|
-
search = pathname.substr(searchIndex);
|
240
|
-
pathname = pathname.substr(0, searchIndex);
|
241
|
-
}
|
242
|
-
return {
|
243
|
-
pathname,
|
244
|
-
search: search === '?' ? '' : search,
|
245
|
-
hash: hash === '#' ? '' : hash,
|
246
|
-
query: {},
|
247
|
-
key: ''
|
248
|
-
};
|
249
|
-
};
|
250
|
-
const createPath = (location) => {
|
251
|
-
const { pathname, search, hash } = location;
|
252
|
-
let path = pathname || '/';
|
253
|
-
if (search && search !== '?') {
|
254
|
-
path += (search.charAt(0) === '?' ? search : `?${search}`);
|
255
|
-
}
|
256
|
-
if (hash && hash !== '#') {
|
257
|
-
path += (hash.charAt(0) === '#' ? hash : `#${hash}`);
|
258
|
-
}
|
259
|
-
return path;
|
260
|
-
};
|
261
|
-
const parseQueryString = (query) => {
|
262
|
-
if (!query) {
|
263
|
-
return {};
|
264
|
-
}
|
265
|
-
return (/^[?#]/.test(query) ? query.slice(1) : query)
|
266
|
-
.split('&')
|
267
|
-
.reduce((params, param) => {
|
268
|
-
let [key, value] = param.split('=');
|
269
|
-
params[key] = value ? decodeURIComponent(value.replace(/\+/g, ' ')) : '';
|
270
|
-
return params;
|
271
|
-
}, {});
|
272
|
-
};
|
273
|
-
|
274
|
-
const isAbsolute = (pathname) => {
|
275
|
-
return pathname.charAt(0) === '/';
|
276
|
-
};
|
277
|
-
const createKey = (keyLength) => {
|
278
|
-
return Math.random().toString(36).substr(2, keyLength);
|
279
|
-
};
|
280
|
-
// About 1.5x faster than the two-arg version of Array#splice()
|
281
|
-
const spliceOne = (list, index) => {
|
282
|
-
for (let i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {
|
283
|
-
list[i] = list[k];
|
284
|
-
}
|
285
|
-
list.pop();
|
286
|
-
};
|
287
|
-
// This implementation is based heavily on node's url.parse
|
288
|
-
const resolvePathname = (to, from = '') => {
|
289
|
-
let fromParts = from && from.split('/') || [];
|
290
|
-
let hasTrailingSlash;
|
291
|
-
let up = 0;
|
292
|
-
const toParts = to && to.split('/') || [];
|
293
|
-
const isToAbs = to && isAbsolute(to);
|
294
|
-
const isFromAbs = from && isAbsolute(from);
|
295
|
-
const mustEndAbs = isToAbs || isFromAbs;
|
296
|
-
if (to && isAbsolute(to)) {
|
297
|
-
// to is absolute
|
298
|
-
fromParts = toParts;
|
299
|
-
}
|
300
|
-
else if (toParts.length) {
|
301
|
-
// to is relative, drop the filename
|
302
|
-
fromParts.pop();
|
303
|
-
fromParts = fromParts.concat(toParts);
|
304
|
-
}
|
305
|
-
if (!fromParts.length) {
|
306
|
-
return '/';
|
307
|
-
}
|
308
|
-
if (fromParts.length) {
|
309
|
-
const last = fromParts[fromParts.length - 1];
|
310
|
-
hasTrailingSlash = (last === '.' || last === '..' || last === '');
|
311
|
-
}
|
312
|
-
else {
|
313
|
-
hasTrailingSlash = false;
|
314
|
-
}
|
315
|
-
for (let i = fromParts.length; i >= 0; i--) {
|
316
|
-
const part = fromParts[i];
|
317
|
-
if (part === '.') {
|
318
|
-
spliceOne(fromParts, i);
|
319
|
-
}
|
320
|
-
else if (part === '..') {
|
321
|
-
spliceOne(fromParts, i);
|
322
|
-
up++;
|
323
|
-
}
|
324
|
-
else if (up) {
|
325
|
-
spliceOne(fromParts, i);
|
326
|
-
up--;
|
327
|
-
}
|
328
|
-
}
|
329
|
-
if (!mustEndAbs) {
|
330
|
-
for (; up--; up) {
|
331
|
-
fromParts.unshift('..');
|
332
|
-
}
|
333
|
-
}
|
334
|
-
if (mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0]))) {
|
335
|
-
fromParts.unshift('');
|
336
|
-
}
|
337
|
-
let result = fromParts.join('/');
|
338
|
-
if (hasTrailingSlash && result.substr(-1) !== '/') {
|
339
|
-
result += '/';
|
340
|
-
}
|
341
|
-
return result;
|
342
|
-
};
|
343
|
-
const valueEqual = (a, b) => {
|
344
|
-
if (a === b) {
|
345
|
-
return true;
|
346
|
-
}
|
347
|
-
if (a == null || b == null) {
|
348
|
-
return false;
|
349
|
-
}
|
350
|
-
if (Array.isArray(a)) {
|
351
|
-
return Array.isArray(b) && a.length === b.length && a.every((item, index) => {
|
352
|
-
return valueEqual(item, b[index]);
|
353
|
-
});
|
354
|
-
}
|
355
|
-
const aType = typeof a;
|
356
|
-
const bType = typeof b;
|
357
|
-
if (aType !== bType) {
|
358
|
-
return false;
|
359
|
-
}
|
360
|
-
if (aType === 'object') {
|
361
|
-
const aValue = a.valueOf();
|
362
|
-
const bValue = b.valueOf();
|
363
|
-
if (aValue !== a || bValue !== b) {
|
364
|
-
return valueEqual(aValue, bValue);
|
365
|
-
}
|
366
|
-
const aKeys = Object.keys(a);
|
367
|
-
const bKeys = Object.keys(b);
|
368
|
-
if (aKeys.length !== bKeys.length) {
|
369
|
-
return false;
|
370
|
-
}
|
371
|
-
return aKeys.every((key) => {
|
372
|
-
return valueEqual(a[key], b[key]);
|
373
|
-
});
|
374
|
-
}
|
375
|
-
return false;
|
376
|
-
};
|
377
|
-
const locationsAreEqual = (a, b) => {
|
378
|
-
return a.pathname === b.pathname &&
|
379
|
-
a.search === b.search &&
|
380
|
-
a.hash === b.hash &&
|
381
|
-
a.key === b.key &&
|
382
|
-
valueEqual(a.state, b.state);
|
383
|
-
};
|
384
|
-
const createLocation = (path, state, key, currentLocation) => {
|
385
|
-
let location;
|
386
|
-
if (typeof path === 'string') {
|
387
|
-
// Two-arg form: push(path, state)
|
388
|
-
location = parsePath(path);
|
389
|
-
if (state !== undefined) {
|
390
|
-
location.state = state;
|
391
|
-
}
|
392
|
-
}
|
393
|
-
else {
|
394
|
-
// One-arg form: push(location)
|
395
|
-
location = Object.assign({ pathname: '' }, path);
|
396
|
-
if (location.search && location.search.charAt(0) !== '?') {
|
397
|
-
location.search = '?' + location.search;
|
398
|
-
}
|
399
|
-
if (location.hash && location.hash.charAt(0) !== '#') {
|
400
|
-
location.hash = '#' + location.hash;
|
401
|
-
}
|
402
|
-
if (state !== undefined && location.state === undefined) {
|
403
|
-
location.state = state;
|
404
|
-
}
|
405
|
-
}
|
406
|
-
try {
|
407
|
-
location.pathname = decodeURI(location.pathname);
|
408
|
-
}
|
409
|
-
catch (e) {
|
410
|
-
if (e instanceof URIError) {
|
411
|
-
throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' +
|
412
|
-
'This is likely caused by an invalid percent-encoding.');
|
413
|
-
}
|
414
|
-
else {
|
415
|
-
throw e;
|
416
|
-
}
|
417
|
-
}
|
418
|
-
location.key = key;
|
419
|
-
if (currentLocation) {
|
420
|
-
// Resolve incomplete/relative pathname relative to current location.
|
421
|
-
if (!location.pathname) {
|
422
|
-
location.pathname = currentLocation.pathname;
|
423
|
-
}
|
424
|
-
else if (location.pathname.charAt(0) !== '/') {
|
425
|
-
location.pathname = resolvePathname(location.pathname, currentLocation.pathname);
|
426
|
-
}
|
427
|
-
}
|
428
|
-
else {
|
429
|
-
// When there is no prior location and pathname is empty, set it to /
|
430
|
-
if (!location.pathname) {
|
431
|
-
location.pathname = '/';
|
432
|
-
}
|
433
|
-
}
|
434
|
-
location.query = parseQueryString(location.search || '');
|
435
|
-
return location;
|
436
|
-
};
|
437
|
-
|
438
|
-
let cacheCount = 0;
|
439
|
-
const patternCache = {};
|
440
|
-
const cacheLimit = 10000;
|
441
|
-
// Memoized function for creating the path match regex
|
442
|
-
const compilePath = (pattern, options) => {
|
443
|
-
const cacheKey = `${options.end}${options.strict}`;
|
444
|
-
const cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});
|
445
|
-
const cachePattern = JSON.stringify(pattern);
|
446
|
-
if (cache[cachePattern]) {
|
447
|
-
return cache[cachePattern];
|
448
|
-
}
|
449
|
-
const keys = [];
|
450
|
-
const re = pathToRegexp(pattern, keys, options);
|
451
|
-
const compiledPattern = { re, keys };
|
452
|
-
if (cacheCount < cacheLimit) {
|
453
|
-
cache[cachePattern] = compiledPattern;
|
454
|
-
cacheCount += 1;
|
455
|
-
}
|
456
|
-
return compiledPattern;
|
457
|
-
};
|
458
|
-
/**
|
459
|
-
* Public API for matching a URL pathname to a path pattern.
|
460
|
-
*/
|
461
|
-
const matchPath = (pathname, options = {}) => {
|
462
|
-
if (typeof options === 'string') {
|
463
|
-
options = { path: options };
|
464
|
-
}
|
465
|
-
const { path = '/', exact = false, strict = false } = options;
|
466
|
-
const { re, keys } = compilePath(path, { end: exact, strict });
|
467
|
-
const match = re.exec(pathname);
|
468
|
-
if (!match) {
|
469
|
-
return null;
|
470
|
-
}
|
471
|
-
const [url, ...values] = match;
|
472
|
-
const isExact = pathname === url;
|
473
|
-
if (exact && !isExact) {
|
474
|
-
return null;
|
475
|
-
}
|
476
|
-
return {
|
477
|
-
path,
|
478
|
-
url: path === '/' && url === '' ? '/' : url,
|
479
|
-
isExact,
|
480
|
-
params: keys.reduce((memo, key, index) => {
|
481
|
-
memo[key.name] = values[index];
|
482
|
-
return memo;
|
483
|
-
}, {})
|
484
|
-
};
|
485
|
-
};
|
486
|
-
const matchesAreEqual = (a, b) => {
|
487
|
-
if (a == null && b == null) {
|
488
|
-
return true;
|
489
|
-
}
|
490
|
-
if (b == null) {
|
491
|
-
return false;
|
492
|
-
}
|
493
|
-
return a && b &&
|
494
|
-
a.path === b.path &&
|
495
|
-
a.url === b.url &&
|
496
|
-
valueEqual(a.params, b.params);
|
497
|
-
};
|
498
|
-
|
499
|
-
export { matchesAreEqual as a, addLeadingSlash as b, createLocation as c, createKey as d, stripBasename as e, createPath as f, stripLeadingSlash as g, hasBasename as h, locationsAreEqual as l, matchPath as m, stripTrailingSlash as s };
|
@@ -1,85 +0,0 @@
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-c04b9ed5.js';
|
2
|
-
import { O as Outbound } from './icons-90b957ab.js';
|
3
|
-
|
4
|
-
const cardCss = "sparkle-card{display:block;font-size:12px;max-width:30em}.Card{background-color:var(--background);border-radius:4px;box-shadow:0px 0.175em 0.5em rgba(2, 8, 20, 0.1), 0px 0.085em 0.175em rgba(2, 8, 20, 0.08);color:var(--text-color--light);display:flex;flex-direction:column;font-size:inherit;font-weight:normal;height:100%;justify-content:flex-start;line-height:1.6;transition:box-shadow 150ms ease, transform 150ms ease;width:100%;overflow:hidden}.Card-with-image{grid-row:span 2}.Card-without-image{font-size:12px}.Card-container{padding:1.65em 2em 1.65em}.Card-image{width:100%;height:auto}.Card-icon,.Card-iconset__container{width:48px;height:48px;margin-bottom:1.2em;border-radius:50%;object-fit:cover;background:rgb(246, 248, 251)}.Card-icon-hover{display:none}.Card-iconset__container{position:relative}.Card-iconset__container .Card-icon{position:absolute;opacity:0;transition:0.8s opacity}.Card-iconset__container .Card-icon--active{opacity:1}.Card-ionicon{width:48px;height:48px;float:left;margin-right:1em}@media (hover: hover){.Card[href]:hover{box-shadow:0 0.35em 1.175em rgba(2, 8, 20, 0.1), 0 0.175em 0.5em rgba(2, 8, 20, 0.08);transform:translateY(-1px)}.Card[href]:hover .Card-icon-default{display:none}.Card[href]:hover .Card-icon-hover{display:block}}.Card-content>*:first-child{margin-top:0}.Card-content>*:last-child{margin-bottom:0}.Card-content>*{margin:0 0 0.65em}.Card-header{color:var(--text-color--dark);font-size:1.4em;font-weight:500;line-height:1.4;margin-bottom:0.45em}.Card-without-image .Card-header{margin-bottom:0.3em}.Card-header>svg{fill:currentColor;height:1em;margin-bottom:-0.125em;width:auto}.Card-size-lg{font-size:14px}.Card-size-lg .Card-icon,.Card-size-lg .Card-ionicon,.Card-size-lg .Card-iconset__container{width:80px;height:80px}.Card-size-lg.Card-without-image .Card-header{font-size:20px}sparkle-card.disabled,sparkle-card[disabled]{position:relative}sparkle-card.disabled::after,sparkle-card[disabled]::after{position:absolute;top:0;right:0;left:0;bottom:0;background:rgba(232, 232, 232, 0.5);pointer-events:none;content:''}aside sparkle-card{max-width:240px}aside .Card-container{display:grid;grid-template-columns:minmax(0, max-content) 1fr;grid-template-rows:minmax(0, min-content);grid-template-areas:'icon title'\r\n 'icon body'}aside .Card-icon{width:32px;height:32px;margin-right:16px;margin-bottom:0;grid-area:icon}aside .Card-header{grid-area:title}aside .Card-header::after{background-image:url('/docs/assets/img/new-tab.svg');display:inline-block;height:13px;width:13px;background-size:13px 13px;margin-left:4px;content:''}aside .Card-content{grid-area:body;max-height:42px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}aside .Card-icon+.Card-content{margin-top:-6px}.markdown-content p sparkle-card{margin-top:1em}";
|
5
|
-
|
6
|
-
const SparkleCard = class {
|
7
|
-
constructor(hostRef) {
|
8
|
-
registerInstance(this, hostRef);
|
9
|
-
this.activeIndex = 0;
|
10
|
-
this.rotationTime = 6000; // 4 seconds
|
11
|
-
}
|
12
|
-
hostData() {
|
13
|
-
return {
|
14
|
-
class: {
|
15
|
-
'Card-with-image': typeof this.img !== 'undefined',
|
16
|
-
'Card-without-image': typeof this.img === 'undefined',
|
17
|
-
'Card-size-lg': this.size === 'lg',
|
18
|
-
}
|
19
|
-
};
|
20
|
-
}
|
21
|
-
componentWillLoad() {
|
22
|
-
if (typeof this.iconset !== 'undefined') {
|
23
|
-
return;
|
24
|
-
}
|
25
|
-
this.activeIndex = 0;
|
26
|
-
this.rotationTime = 4000 + (Math.random() * 2000); // 4 - 6 seconds - randomize it a bit
|
27
|
-
// make the first transiton happen a bit faster
|
28
|
-
setInterval(this.tic.bind(this), this.rotationTime);
|
29
|
-
setTimeout(this.tic.bind(this), this.rotationTime / 3);
|
30
|
-
}
|
31
|
-
componentWillUnload() {
|
32
|
-
clearInterval(this.interval);
|
33
|
-
}
|
34
|
-
tic() {
|
35
|
-
if (typeof this.iconset !== 'undefined' && this.activeIndex >= this.iconset.split(',').length - 1) {
|
36
|
-
return this.activeIndex = 0;
|
37
|
-
}
|
38
|
-
this.activeIndex++;
|
39
|
-
}
|
40
|
-
__stencil_render() {
|
41
|
-
const isStatic = typeof this.href === 'undefined';
|
42
|
-
const isOutbound = typeof this.href !== 'undefined' ? /^http/.test(this.href) : false;
|
43
|
-
const header = this.header === 'undefined' ? null : (h("header", { class: "Card-header" }, this.header, " ", isOutbound ? h(Outbound, null) : null));
|
44
|
-
const hoverIcon = this.hoverIcon || this.icon;
|
45
|
-
const content = [
|
46
|
-
this.img && h("img", { src: this.img, class: "Card-image" }),
|
47
|
-
h("div", { class: "Card-container" }, this.icon && h("img", { src: this.icon, class: "Card-icon Card-icon-default" }), hoverIcon && h("img", { src: hoverIcon, class: "Card-icon Card-icon-hover" }), this.ionicon && h("ion-icon", { name: this.ionicon, class: "Card-ionicon" }), this.iconset && h("div", { class: "Card-iconset__container" }, this.iconset.split(',').map((icon, index) => h("img", { src: icon, class: `Card-icon ${index === this.activeIndex ? 'Card-icon--active' : ''}`, "data-index": index }))), header, h("div", { class: "Card-content" }, h("slot", null)))
|
48
|
-
];
|
49
|
-
if (isStatic) {
|
50
|
-
return (h("div", { class: "Card" }, content));
|
51
|
-
}
|
52
|
-
if (isOutbound) {
|
53
|
-
return (h("a", { class: "Card", href: this.href }, content));
|
54
|
-
}
|
55
|
-
return (h("stencil-route-link", { url: this.href, anchorClass: "Card" }, content));
|
56
|
-
}
|
57
|
-
render() { return h(Host, this.hostData(), this.__stencil_render()); }
|
58
|
-
};
|
59
|
-
SparkleCard.style = cardCss;
|
60
|
-
|
61
|
-
const cardsCss = "sparkle-cards{display:grid;font-size:12px;grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));grid-gap:1.35rem}sparkle-cards>sparkle-card{font-size:inherit;max-width:none}sparkle-cards>sparkle-card.tall{grid-row:span 2}sparkle-cards>sparkle-card.wide{grid-column:span 2}sparkle-cards.prioritized>sparkle-card:nth-child(-n+5){font-size:1.25em}sparkle-cards.prioritized>sparkle-card:first-child{grid-row:span 2}sparkle-cards.max-measure>sparkle-card{max-width:50%}";
|
62
|
-
|
63
|
-
const SparkleCards = class {
|
64
|
-
constructor(hostRef) {
|
65
|
-
registerInstance(this, hostRef);
|
66
|
-
}
|
67
|
-
render() {
|
68
|
-
return h("slot", null);
|
69
|
-
}
|
70
|
-
};
|
71
|
-
SparkleCards.style = cardsCss;
|
72
|
-
|
73
|
-
const sparkleGoalItemCss = ":host{display:block}.Card-content{padding-top:8px}.goal-header{display:flex;justify-content:flex-end;margin-top:-40px !important}";
|
74
|
-
|
75
|
-
const SparkleGoalItem = class {
|
76
|
-
constructor(hostRef) {
|
77
|
-
registerInstance(this, hostRef);
|
78
|
-
}
|
79
|
-
render() {
|
80
|
-
return (h(Host, null, h("sparkle-card", { header: this.goal.Name, icon: this.goal.CategoryIcon }, h("div", { class: "goal-header" }, h("ion-button", { size: "small", color: "primary", onClick: () => this.onEditGoal() }, "Edit")), h("p", null, this.goal.Description), h("sparkle-goal-progress", { percentage: this.goal.Percentage.toString() }))));
|
81
|
-
}
|
82
|
-
};
|
83
|
-
SparkleGoalItem.style = sparkleGoalItemCss;
|
84
|
-
|
85
|
-
export { SparkleCard as sparkle_card, SparkleCards as sparkle_cards, SparkleGoalItem as sparkle_goal_item };
|