@sparkle-learning/core 0.0.33 → 0.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (631) hide show
  1. package/dist/cjs/{auth.service-f878f6ab.js → PrivateRoute-074c584e.js} +34 -3
  2. package/dist/cjs/{active-router-eedb3bfe.js → active-router-f9e18bd8.js} +1 -1
  3. package/dist/cjs/{animation-6132e37f.js → animation-ee586546.js} +83 -78
  4. package/dist/cjs/{app-globals-9869bf67.js → app-globals-33c9f31b.js} +1 -1
  5. package/dist/cjs/{auth.store-ff3fda09.js → auth.store-1e630a7d.js} +48 -725
  6. package/dist/cjs/compass-svg.cjs.entry.js +1 -1
  7. package/dist/cjs/context-consumer.cjs.entry.js +1 -1
  8. package/dist/cjs/course-select.cjs.entry.js +1 -1
  9. package/dist/cjs/{cubic-bezier-293f4663.js → cubic-bezier-53d26d05.js} +10 -11
  10. package/dist/cjs/{facilitator.service-faac5c0c.js → facilitator.service-9e990274.js} +8 -7
  11. package/dist/cjs/{feed.service-66405969.js → feed.service-b4f09441.js} +8 -7
  12. package/dist/cjs/{focus-visible-ad3828a7.js → focus-visible-b0b07ba6.js} +19 -6
  13. package/dist/cjs/{framework-delegate-2470a246.js → framework-delegate-59a98abd.js} +11 -13
  14. package/dist/cjs/{gesture-controller-07c31f70.js → gesture-controller-0eb5579e.js} +1 -1
  15. package/dist/cjs/{haptic-91e86eb7.js → haptic-780f33c4.js} +3 -2
  16. package/dist/cjs/{hardware-back-button-f7b5d99e.js → hardware-back-button-92d97ff8.js} +8 -8
  17. package/dist/cjs/{sparkle-export-lessons_6.cjs.entry.js → header-mobile-collapse_61.cjs.entry.js} +11608 -2721
  18. package/dist/cjs/{helpers-7e28976c.js → helpers-c2496722.js} +81 -14
  19. package/dist/cjs/httpService-7211d93b.js +685 -0
  20. package/dist/cjs/{icons-80d477f6.js → icons-c61db785.js} +1 -1
  21. package/dist/cjs/{index-43642662.js → index-12082cba.js} +21 -18
  22. package/dist/cjs/{index-459a5fa9.js → index-15ea05f5.js} +19 -28
  23. package/dist/cjs/{index-bae2a754.js → index-51e8292e.js} +18 -11
  24. package/dist/cjs/{index-b12edb26.js → index-787d4498.js} +17 -25
  25. package/dist/cjs/{tap-click-1caf1780.js → index-8b5629a6.js} +30 -20
  26. package/dist/cjs/{index-8540d72e.js → index-975586fd.js} +7 -1
  27. package/dist/cjs/index-9c7b27e4.js +140 -0
  28. package/dist/cjs/{index-185f9c5a.js → index-af080b50.js} +9 -8
  29. package/dist/cjs/index-e56e09b8.js +38 -0
  30. package/dist/cjs/index.cjs.js +12 -12
  31. package/dist/cjs/{index.es-ef3efdfb.js → index.es-38cbcdbe.js} +2 -7
  32. package/dist/cjs/{input-shims-6c442c9f.js → input-shims-eff63b88.js} +21 -24
  33. package/dist/cjs/ion-accordion-group.cjs.entry.js +17 -9
  34. package/dist/cjs/ion-accordion.cjs.entry.js +19 -23
  35. package/dist/cjs/ion-action-sheet_4.cjs.entry.js +216 -212
  36. package/dist/cjs/ion-app.cjs.entry.js +8 -8
  37. package/dist/cjs/ion-back-button.cjs.entry.js +11 -11
  38. package/dist/cjs/ion-backdrop.cjs.entry.js +4 -4
  39. package/dist/cjs/ion-badge.cjs.entry.js +3 -3
  40. package/dist/cjs/ion-breadcrumb.cjs.entry.js +13 -21
  41. package/dist/cjs/ion-breadcrumbs.cjs.entry.js +12 -14
  42. package/dist/cjs/ion-buttons_3.cjs.entry.js +13 -13
  43. package/dist/cjs/ion-card-header.cjs.entry.js +4 -4
  44. package/dist/cjs/ion-card-subtitle.cjs.entry.js +4 -4
  45. package/dist/cjs/ion-card-title.cjs.entry.js +4 -4
  46. package/dist/cjs/ion-chip.cjs.entry.js +3 -3
  47. package/dist/cjs/ion-content_2.cjs.entry.js +59 -52
  48. package/dist/cjs/ion-datetime-button.cjs.entry.js +312 -0
  49. package/dist/cjs/ion-datetime.cjs.entry.js +752 -1245
  50. package/dist/cjs/ion-fab-button.cjs.entry.js +25 -9
  51. package/dist/cjs/ion-fab-list.cjs.entry.js +4 -4
  52. package/dist/cjs/ion-fab.cjs.entry.js +15 -13
  53. package/dist/cjs/ion-footer.cjs.entry.js +16 -14
  54. package/dist/cjs/ion-img.cjs.entry.js +4 -4
  55. package/dist/cjs/ion-infinite-scroll-content.cjs.entry.js +5 -5
  56. package/dist/cjs/ion-infinite-scroll.cjs.entry.js +13 -15
  57. package/dist/cjs/ion-item-divider.cjs.entry.js +4 -4
  58. package/dist/cjs/ion-item-group.cjs.entry.js +3 -3
  59. package/dist/cjs/ion-item-option.cjs.entry.js +8 -8
  60. package/dist/cjs/ion-item-options.cjs.entry.js +5 -5
  61. package/dist/cjs/ion-item-sliding.cjs.entry.js +41 -46
  62. package/dist/cjs/ion-loading.cjs.entry.js +23 -35
  63. package/dist/cjs/ion-menu-button.cjs.entry.js +13 -13
  64. package/dist/cjs/ion-menu-toggle.cjs.entry.js +7 -7
  65. package/dist/cjs/ion-menu.cjs.entry.js +47 -40
  66. package/dist/cjs/ion-modal.cjs.entry.js +935 -282
  67. package/dist/cjs/ion-nav-link.cjs.entry.js +2 -2
  68. package/dist/cjs/ion-nav.cjs.entry.js +45 -35
  69. package/dist/cjs/ion-picker-column-internal_2.cjs.entry.js +151 -43
  70. package/dist/cjs/ion-picker-column.cjs.entry.js +23 -25
  71. package/dist/cjs/ion-picker.cjs.entry.js +15 -17
  72. package/dist/cjs/ion-progress-bar.cjs.entry.js +6 -8
  73. package/dist/cjs/ion-refresher-content.cjs.entry.js +6 -12
  74. package/dist/cjs/ion-refresher.cjs.entry.js +68 -50
  75. package/dist/cjs/ion-reorder-group.cjs.entry.js +15 -16
  76. package/dist/cjs/ion-reorder.cjs.entry.js +3 -3
  77. package/dist/cjs/ion-route-redirect.cjs.entry.js +1 -1
  78. package/dist/cjs/ion-route.cjs.entry.js +1 -1
  79. package/dist/cjs/ion-router-link.cjs.entry.js +5 -5
  80. package/dist/cjs/ion-router-outlet.cjs.entry.js +22 -20
  81. package/dist/cjs/ion-router.cjs.entry.js +32 -31
  82. package/dist/cjs/ion-searchbar.cjs.entry.js +14 -16
  83. package/dist/cjs/ion-segment-button.cjs.entry.js +8 -8
  84. package/dist/cjs/ion-segment.cjs.entry.js +24 -26
  85. package/dist/cjs/ion-select_2.cjs.entry.js +59 -56
  86. package/dist/cjs/ion-skeleton-text.cjs.entry.js +4 -4
  87. package/dist/cjs/ion-slide.cjs.entry.js +3 -3
  88. package/dist/cjs/ion-slides.cjs.entry.js +23 -23
  89. package/dist/cjs/ion-split-pane.cjs.entry.js +10 -11
  90. package/dist/cjs/ion-tab-bar.cjs.entry.js +5 -5
  91. package/dist/cjs/ion-tab-button.cjs.entry.js +6 -6
  92. package/dist/cjs/ion-tab.cjs.entry.js +4 -4
  93. package/dist/cjs/ion-tabs.cjs.entry.js +4 -5
  94. package/dist/cjs/ion-textarea.cjs.entry.js +29 -28
  95. package/dist/cjs/ion-thumbnail.cjs.entry.js +2 -2
  96. package/dist/cjs/ion-toast.cjs.entry.js +23 -43
  97. package/dist/cjs/ion-toggle.cjs.entry.js +36 -19
  98. package/dist/cjs/ion-virtual-scroll.cjs.entry.js +29 -28
  99. package/dist/cjs/{ionic-global-878073d1.js → ionic-global-2cde9d3a.js} +27 -31
  100. package/dist/cjs/{ios.transition-c3bfb096.js → ios.transition-da235483.js} +71 -51
  101. package/dist/cjs/{keyboard-dfd76ac3.js → keyboard-91096619.js} +3 -3
  102. package/dist/cjs/loader.cjs.js +5 -5
  103. package/dist/cjs/{md.transition-7eb9a1a7.js → md.transition-be429e07.js} +9 -16
  104. package/dist/cjs/{menu-toggle-util-cb549c2c.js → menu-toggle-util-7a01448c.js} +2 -2
  105. package/dist/cjs/{overlays-0a748609.js → overlays-32df265a.js} +29 -29
  106. package/dist/cjs/parse-d0071120.js +1237 -0
  107. package/dist/cjs/{purify-d0ad2883.js → purify-fb9c107e.js} +1 -1
  108. package/dist/cjs/sparkle-animation-player.cjs.entry.js +1 -1
  109. package/dist/cjs/sparkle-character-intro.cjs.entry.js +1 -1
  110. package/dist/cjs/sparkle-code.cjs.entry.js +2 -2
  111. package/dist/cjs/sparkle-compass-post.cjs.entry.js +1 -1
  112. package/dist/cjs/sparkle-compass.cjs.entry.js +1 -1
  113. package/dist/cjs/sparkle-core.cjs.js +5 -5
  114. package/dist/cjs/sparkle-emoji.cjs.entry.js +1 -1
  115. package/dist/cjs/sparkle-facilitator-notes-form.cjs.entry.js +8 -7
  116. package/dist/cjs/sparkle-feed-post.cjs.entry.js +104 -3
  117. package/dist/cjs/sparkle-feedback.cjs.entry.js +8 -8
  118. package/dist/cjs/sparkle-goal-form.cjs.entry.js +8 -7
  119. package/dist/cjs/sparkle-gww-comment-list.cjs.entry.js +1 -1
  120. package/dist/cjs/sparkle-gww-graph.cjs.entry.js +1 -1
  121. package/dist/cjs/sparkle-intro.cjs.entry.js +2 -2
  122. package/dist/cjs/sparkle-lower-content-nav.cjs.entry.js +1 -1
  123. package/dist/cjs/sparkle-menu-collapsible.cjs.entry.js +2 -2
  124. package/dist/cjs/sparkle-modal-image.cjs.entry.js +1 -1
  125. package/dist/cjs/sparkle-notfound-page.cjs.entry.js +1 -1
  126. package/dist/cjs/sparkle-overlay.cjs.entry.js +1 -1
  127. package/dist/cjs/sparkle-poll.cjs.entry.js +1 -1
  128. package/dist/cjs/sparkle-quiz-container.cjs.entry.js +1 -1
  129. package/dist/cjs/sparkle-quiz-feedback_5.cjs.entry.js +1 -1
  130. package/dist/cjs/sparkle-quiz-v1.cjs.entry.js +105 -0
  131. package/dist/cjs/sparkle-quiz.cjs.entry.js +55 -41
  132. package/dist/cjs/sparkle-select.cjs.entry.js +1 -1
  133. package/dist/cjs/sparkle-sidebar.cjs.entry.js +1 -1
  134. package/dist/cjs/sparkle-tab.cjs.entry.js +1 -1
  135. package/dist/cjs/sparkle-table-of-contents.cjs.entry.js +1 -1
  136. package/dist/cjs/sparkle-tabs.cjs.entry.js +1 -1
  137. package/dist/cjs/sparkle-youtube.cjs.entry.js +1 -1
  138. package/dist/cjs/{spinner-configs-6f6b7ef0.js → spinner-configs-0ac05f2d.js} +43 -43
  139. package/dist/cjs/{status-tap-8697433c.js → status-tap-033befa2.js} +7 -5
  140. package/dist/cjs/stencil-async-content.cjs.entry.js +1 -1
  141. package/dist/cjs/stencil-route-title.cjs.entry.js +2 -2
  142. package/dist/cjs/stencil-router-prompt.cjs.entry.js +2 -2
  143. package/dist/cjs/student.service-2e58f237.js +78 -0
  144. package/dist/cjs/{swipe-back-7e08b5e0.js → swipe-back-4a826f9b.js} +5 -5
  145. package/dist/cjs/{theme-4252ac15.js → theme-b0b295c1.js} +6 -5
  146. package/dist/collection/collection-manifest.json +4 -2
  147. package/dist/collection/components/sparkle-feed-post/sparkle-feed-post.css +16 -0
  148. package/dist/collection/components/sparkle-feed-post/sparkle-feed-post.js +197 -3
  149. package/dist/collection/components/sparkle-intro/sparkle-intro.css +0 -1
  150. package/dist/collection/components/sparkle-quiz/{sparkle-quiz.css → sparkle-quiz/sparkle-quiz.css} +0 -0
  151. package/dist/collection/components/sparkle-quiz/sparkle-quiz/sparkle-quiz.js +326 -0
  152. package/dist/collection/components/sparkle-quiz/sparkle-quiz-v1.css +48 -0
  153. package/dist/collection/components/sparkle-quiz/{sparkle-quiz.js → sparkle-quiz-v1.js} +4 -4
  154. package/dist/esm/{auth.service-7ab0ac58.js → PrivateRoute-c5441f35.js} +33 -3
  155. package/dist/esm/{active-router-909088d6.js → active-router-fc9e4e06.js} +1 -1
  156. package/dist/esm/{animation-7b083379.js → animation-12377cb3.js} +83 -78
  157. package/dist/esm/{app-globals-5c736ae5.js → app-globals-3f0347b0.js} +1 -1
  158. package/dist/esm/{auth.store-98fad96d.js → auth.store-dba2c2da.js} +45 -725
  159. package/dist/esm/compass-svg.entry.js +1 -1
  160. package/dist/esm/context-consumer.entry.js +1 -1
  161. package/dist/esm/course-select.entry.js +1 -1
  162. package/dist/esm/{cubic-bezier-a7ad9c8e.js → cubic-bezier-4c0db14f.js} +10 -11
  163. package/dist/esm/{facilitator.service-1524bf89.js → facilitator.service-b0292f7f.js} +2 -1
  164. package/dist/esm/{feed.service-4900fc62.js → feed.service-8fbe4ce3.js} +3 -2
  165. package/dist/esm/{focus-visible-40cda868.js → focus-visible-4e9a0764.js} +19 -6
  166. package/dist/esm/{framework-delegate-518bd233.js → framework-delegate-3e634a5c.js} +11 -13
  167. package/dist/esm/{gesture-controller-686622ba.js → gesture-controller-7be18351.js} +1 -1
  168. package/dist/esm/{haptic-99c9e346.js → haptic-522f76f2.js} +3 -2
  169. package/dist/esm/{hardware-back-button-b6ccf74a.js → hardware-back-button-fa04d6e9.js} +8 -8
  170. package/dist/esm/{sparkle-export-lessons_6.entry.js → header-mobile-collapse_61.entry.js} +11502 -2670
  171. package/dist/esm/{helpers-9d0930de.js → helpers-bf0e23d6.js} +81 -15
  172. package/dist/esm/httpService-7b75b095.js +683 -0
  173. package/dist/esm/{icons-05b6ce86.js → icons-9b62a1ec.js} +2 -2
  174. package/dist/esm/{index-a12c14bd.js → index-21661af2.js} +22 -19
  175. package/dist/esm/{index-8de9446b.js → index-2b84cad2.js} +17 -25
  176. package/dist/esm/{index-ea26196a.js → index-4044fde9.js} +5 -2
  177. package/dist/esm/{tap-click-cca25060.js → index-45fec1e7.js} +30 -20
  178. package/dist/esm/index-5e8971ae.js +128 -0
  179. package/dist/esm/{index-435af8e6.js → index-be6112f8.js} +9 -8
  180. package/dist/esm/{index-5568e3fa.js → index-c04b9ed5.js} +18 -11
  181. package/dist/esm/{index-fa5e93c5.js → index-cded2d87.js} +19 -28
  182. package/dist/esm/index-dad75b83.js +34 -0
  183. package/dist/esm/{index.es-89cff481.js → index.es-e0c0f891.js} +2 -7
  184. package/dist/esm/index.js +8 -8
  185. package/dist/esm/{input-shims-7f04e044.js → input-shims-671d8d9f.js} +21 -24
  186. package/dist/esm/ion-accordion-group.entry.js +17 -9
  187. package/dist/esm/ion-accordion.entry.js +19 -23
  188. package/dist/esm/ion-action-sheet_4.entry.js +216 -212
  189. package/dist/esm/ion-app.entry.js +8 -8
  190. package/dist/esm/ion-back-button.entry.js +11 -11
  191. package/dist/esm/ion-backdrop.entry.js +4 -4
  192. package/dist/esm/ion-badge.entry.js +3 -3
  193. package/dist/esm/ion-breadcrumb.entry.js +13 -21
  194. package/dist/esm/ion-breadcrumbs.entry.js +12 -14
  195. package/dist/esm/ion-buttons_3.entry.js +13 -13
  196. package/dist/esm/ion-card-header.entry.js +4 -4
  197. package/dist/esm/ion-card-subtitle.entry.js +4 -4
  198. package/dist/esm/ion-card-title.entry.js +4 -4
  199. package/dist/esm/ion-chip.entry.js +3 -3
  200. package/dist/esm/ion-content_2.entry.js +59 -52
  201. package/dist/esm/ion-datetime-button.entry.js +308 -0
  202. package/dist/esm/ion-datetime.entry.js +723 -1216
  203. package/dist/esm/ion-fab-button.entry.js +25 -9
  204. package/dist/esm/ion-fab-list.entry.js +4 -4
  205. package/dist/esm/ion-fab.entry.js +15 -13
  206. package/dist/esm/ion-footer.entry.js +16 -14
  207. package/dist/esm/ion-img.entry.js +4 -4
  208. package/dist/esm/ion-infinite-scroll-content.entry.js +5 -5
  209. package/dist/esm/ion-infinite-scroll.entry.js +13 -15
  210. package/dist/esm/ion-item-divider.entry.js +4 -4
  211. package/dist/esm/ion-item-group.entry.js +3 -3
  212. package/dist/esm/ion-item-option.entry.js +8 -8
  213. package/dist/esm/ion-item-options.entry.js +5 -5
  214. package/dist/esm/ion-item-sliding.entry.js +41 -46
  215. package/dist/esm/ion-loading.entry.js +23 -35
  216. package/dist/esm/ion-menu-button.entry.js +13 -13
  217. package/dist/esm/ion-menu-toggle.entry.js +7 -7
  218. package/dist/esm/ion-menu.entry.js +47 -40
  219. package/dist/esm/ion-modal.entry.js +921 -268
  220. package/dist/esm/ion-nav-link.entry.js +2 -2
  221. package/dist/esm/ion-nav.entry.js +45 -35
  222. package/dist/esm/ion-picker-column-internal_2.entry.js +151 -43
  223. package/dist/esm/ion-picker-column.entry.js +23 -25
  224. package/dist/esm/ion-picker.entry.js +15 -17
  225. package/dist/esm/ion-progress-bar.entry.js +6 -8
  226. package/dist/esm/ion-refresher-content.entry.js +6 -12
  227. package/dist/esm/ion-refresher.entry.js +68 -50
  228. package/dist/esm/ion-reorder-group.entry.js +15 -16
  229. package/dist/esm/ion-reorder.entry.js +3 -3
  230. package/dist/esm/ion-route-redirect.entry.js +1 -1
  231. package/dist/esm/ion-route.entry.js +1 -1
  232. package/dist/esm/ion-router-link.entry.js +5 -5
  233. package/dist/esm/ion-router-outlet.entry.js +22 -20
  234. package/dist/esm/ion-router.entry.js +32 -31
  235. package/dist/esm/ion-searchbar.entry.js +14 -16
  236. package/dist/esm/ion-segment-button.entry.js +8 -8
  237. package/dist/esm/ion-segment.entry.js +24 -26
  238. package/dist/esm/ion-select_2.entry.js +59 -56
  239. package/dist/esm/ion-skeleton-text.entry.js +4 -4
  240. package/dist/esm/ion-slide.entry.js +3 -3
  241. package/dist/esm/ion-slides.entry.js +23 -23
  242. package/dist/esm/ion-split-pane.entry.js +10 -11
  243. package/dist/esm/ion-tab-bar.entry.js +5 -5
  244. package/dist/esm/ion-tab-button.entry.js +6 -6
  245. package/dist/esm/ion-tab.entry.js +4 -4
  246. package/dist/esm/ion-tabs.entry.js +4 -5
  247. package/dist/esm/ion-textarea.entry.js +29 -28
  248. package/dist/esm/ion-thumbnail.entry.js +2 -2
  249. package/dist/esm/ion-toast.entry.js +23 -43
  250. package/dist/esm/ion-toggle.entry.js +36 -19
  251. package/dist/esm/ion-virtual-scroll.entry.js +29 -28
  252. package/dist/esm/{ionic-global-0939c477.js → ionic-global-4903e23e.js} +27 -31
  253. package/dist/esm/{ios.transition-db4f4ca6.js → ios.transition-131d64fe.js} +71 -51
  254. package/dist/esm/{keyboard-2503e874.js → keyboard-7e8329b3.js} +3 -3
  255. package/dist/esm/loader.js +5 -5
  256. package/dist/esm/{md.transition-8294b503.js → md.transition-f6126011.js} +9 -16
  257. package/dist/esm/{menu-toggle-util-06adade3.js → menu-toggle-util-bace8ae6.js} +2 -2
  258. package/dist/esm/{overlays-5c777f10.js → overlays-3b4dca92.js} +30 -30
  259. package/dist/esm/parse-1ae3a9bb.js +1196 -0
  260. package/dist/esm/polyfills/css-shim.js +1 -1
  261. package/dist/esm/{purify-eb68cf1d.js → purify-85bfcc69.js} +1 -1
  262. package/dist/esm/sparkle-animation-player.entry.js +2 -2
  263. package/dist/esm/sparkle-character-intro.entry.js +1 -1
  264. package/dist/esm/sparkle-code.entry.js +2 -2
  265. package/dist/esm/sparkle-compass-post.entry.js +1 -1
  266. package/dist/esm/sparkle-compass.entry.js +1 -1
  267. package/dist/esm/sparkle-core.js +5 -5
  268. package/dist/esm/sparkle-emoji.entry.js +1 -1
  269. package/dist/esm/sparkle-facilitator-notes-form.entry.js +8 -7
  270. package/dist/esm/sparkle-feed-post.entry.js +104 -3
  271. package/dist/esm/sparkle-feedback.entry.js +8 -8
  272. package/dist/esm/sparkle-goal-form.entry.js +9 -8
  273. package/dist/esm/sparkle-gww-comment-list.entry.js +1 -1
  274. package/dist/esm/sparkle-gww-graph.entry.js +1 -1
  275. package/dist/esm/sparkle-intro.entry.js +2 -2
  276. package/dist/esm/sparkle-lower-content-nav.entry.js +1 -1
  277. package/dist/esm/sparkle-menu-collapsible.entry.js +2 -2
  278. package/dist/esm/sparkle-modal-image.entry.js +1 -1
  279. package/dist/esm/sparkle-notfound-page.entry.js +1 -1
  280. package/dist/esm/sparkle-overlay.entry.js +1 -1
  281. package/dist/esm/sparkle-poll.entry.js +1 -1
  282. package/dist/esm/sparkle-quiz-container.entry.js +1 -1
  283. package/dist/esm/sparkle-quiz-feedback_5.entry.js +1 -1
  284. package/dist/esm/sparkle-quiz-v1.entry.js +101 -0
  285. package/dist/esm/sparkle-quiz.entry.js +55 -41
  286. package/dist/esm/sparkle-select.entry.js +1 -1
  287. package/dist/esm/sparkle-sidebar.entry.js +1 -1
  288. package/dist/esm/sparkle-tab.entry.js +1 -1
  289. package/dist/esm/sparkle-table-of-contents.entry.js +1 -1
  290. package/dist/esm/sparkle-tabs.entry.js +1 -1
  291. package/dist/esm/sparkle-youtube.entry.js +1 -1
  292. package/dist/esm/{spinner-configs-f609a655.js → spinner-configs-a37e628a.js} +43 -43
  293. package/dist/esm/{status-tap-e8c0c752.js → status-tap-dde52787.js} +7 -5
  294. package/dist/esm/stencil-async-content.entry.js +1 -1
  295. package/dist/esm/stencil-route-title.entry.js +2 -2
  296. package/dist/esm/stencil-router-prompt.entry.js +2 -2
  297. package/dist/esm/{student.service-c2f44f3a.js → student.service-0746418b.js} +19 -3
  298. package/dist/esm/{swipe-back-9a3b2cdd.js → swipe-back-7847a0c1.js} +5 -5
  299. package/dist/esm/{theme-c336c9d9.js → theme-7ef00c83.js} +6 -5
  300. package/dist/esm/{util-a831d09d.js → util-6ef753e9.js} +1 -1
  301. package/dist/node_modules/@ionic/core/dist/collection/components/content/content.css +8 -1
  302. package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.ios.css +46 -22
  303. package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.md.css +43 -19
  304. package/dist/node_modules/@ionic/core/dist/collection/components/datetime-button/datetime-button.css +60 -0
  305. package/dist/node_modules/@ionic/core/dist/collection/components/item/item.ios.css +2 -1
  306. package/dist/node_modules/@ionic/core/dist/collection/components/item/item.md.css +2 -2
  307. package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.ios.css +6 -6
  308. package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.md.css +6 -6
  309. package/dist/node_modules/@ionic/core/dist/collection/components/label/label.ios.css +3 -3
  310. package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.ios.css +1 -6
  311. package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.md.css +1 -6
  312. package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.ios.css +1 -5
  313. package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.md.css +1 -5
  314. package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.ios.css +31 -3
  315. package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.md.css +29 -1
  316. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column-internal/picker-column-internal.ios.css +24 -1
  317. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column-internal/picker-column-internal.md.css +24 -1
  318. package/dist/node_modules/@ionic/core/dist/collection/components/picker-internal/picker-internal.ios.css +4 -0
  319. package/dist/node_modules/@ionic/core/dist/collection/components/picker-internal/picker-internal.md.css +4 -0
  320. package/dist/node_modules/@ionic/core/dist/collection/components/range/range.ios.css +2 -2
  321. package/dist/node_modules/@ionic/core/dist/collection/components/range/range.md.css +2 -2
  322. package/dist/node_modules/@ionic/core/dist/collection/components/spinner/spinner.css +8 -8
  323. package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.ios.css +34 -17
  324. package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.md.css +34 -17
  325. package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.ios.css +50 -1
  326. package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.md.css +27 -0
  327. package/dist/sparkle-core/index.esm.js +1 -1
  328. package/dist/sparkle-core/p-00d10dc9.js +4 -0
  329. package/dist/sparkle-core/p-0147266a.js +1 -0
  330. package/dist/sparkle-core/{p-797c23ed.entry.js → p-04c7b276.entry.js} +1 -1
  331. package/dist/sparkle-core/p-05c032dd.js +4 -0
  332. package/dist/sparkle-core/{p-5f45d206.entry.js → p-06642405.entry.js} +1 -1
  333. package/dist/sparkle-core/p-0664370b.entry.js +1 -0
  334. package/dist/sparkle-core/{p-39e5a90f.entry.js → p-06c7d0f2.entry.js} +1 -1
  335. package/dist/sparkle-core/{p-703ca87c.js → p-076f0239.js} +0 -0
  336. package/dist/sparkle-core/p-077c732b.js +4 -0
  337. package/dist/sparkle-core/p-0ad5c123.entry.js +1 -0
  338. package/dist/sparkle-core/{p-beb401e3.entry.js → p-0afa3a4d.entry.js} +1 -1
  339. package/dist/sparkle-core/{p-52f1d1ca.entry.js → p-0c3f3ea6.entry.js} +1 -1
  340. package/dist/sparkle-core/{p-69e7783d.js → p-0e4de1d0.js} +0 -0
  341. package/dist/sparkle-core/{p-337f92b0.entry.js → p-0f1c5899.entry.js} +5 -5
  342. package/dist/sparkle-core/{p-5e4ec238.entry.js → p-0fa3fd63.entry.js} +1 -1
  343. package/dist/sparkle-core/p-11356b03.entry.js +1 -0
  344. package/dist/sparkle-core/p-12dd96d7.js +4 -0
  345. package/dist/sparkle-core/{p-21db4e8e.entry.js → p-162bff1a.entry.js} +1 -1
  346. package/dist/sparkle-core/p-1b1ba156.entry.js +1 -0
  347. package/dist/sparkle-core/p-1d4c7c11.js +1 -0
  348. package/dist/sparkle-core/{p-11234d0f.entry.js → p-1e125ca5.entry.js} +1 -1
  349. package/dist/sparkle-core/{p-5b40aae5.entry.js → p-1e4782af.entry.js} +1 -1
  350. package/dist/sparkle-core/{p-4550e10f.entry.js → p-1e4f65ee.entry.js} +1 -1
  351. package/dist/sparkle-core/{p-f6bafe1d.js → p-2033cd86.js} +2 -2
  352. package/dist/sparkle-core/{p-ed0e9d29.entry.js → p-214d1229.entry.js} +1 -1
  353. package/dist/sparkle-core/p-23aca7ca.js +4 -0
  354. package/dist/sparkle-core/{p-85429b12.entry.js → p-24cb9a33.entry.js} +1 -1
  355. package/dist/sparkle-core/{p-37c00e39.entry.js → p-27fbabc3.entry.js} +1 -1
  356. package/dist/sparkle-core/{p-7d61177b.entry.js → p-2ba70507.entry.js} +1 -1
  357. package/dist/sparkle-core/{p-c8ae9e47.entry.js → p-2c1ca854.entry.js} +1 -1
  358. package/dist/sparkle-core/{p-23a9f7d1.entry.js → p-2d9659e2.entry.js} +1 -1
  359. package/dist/sparkle-core/p-2f569553.js +1 -0
  360. package/dist/sparkle-core/p-2ff67662.js +4 -0
  361. package/dist/sparkle-core/p-30b810d1.entry.js +4 -0
  362. package/dist/sparkle-core/p-32f4e565.entry.js +1 -0
  363. package/dist/sparkle-core/{p-057f6a23.entry.js → p-352677e6.entry.js} +1 -1
  364. package/dist/sparkle-core/{p-b49ca0ea.entry.js → p-370609ba.entry.js} +1 -1
  365. package/dist/sparkle-core/p-377b04c2.entry.js +10 -0
  366. package/dist/sparkle-core/{p-aa9ebc39.entry.js → p-38b7cf68.entry.js} +1 -1
  367. package/dist/sparkle-core/{p-667accac.entry.js → p-3963e02b.entry.js} +1 -1
  368. package/dist/sparkle-core/p-39712c56.entry.js +4 -0
  369. package/dist/sparkle-core/p-3a965828.entry.js +1 -0
  370. package/dist/sparkle-core/p-3de0e00c.js +4 -0
  371. package/dist/sparkle-core/{p-04583c51.entry.js → p-4053ecdb.entry.js} +1 -1
  372. package/dist/sparkle-core/p-462bffba.js +1 -0
  373. package/dist/sparkle-core/p-48f72e63.js +4 -0
  374. package/dist/sparkle-core/p-4c6a7e52.js +1 -0
  375. package/dist/sparkle-core/{p-8c6b6038.js → p-4d4077ea.js} +0 -0
  376. package/dist/sparkle-core/{p-3a202a38.entry.js → p-5096739e.entry.js} +1 -1
  377. package/dist/sparkle-core/p-5322c920.entry.js +1 -0
  378. package/dist/sparkle-core/{p-c748f64e.entry.js → p-54dd894f.entry.js} +1 -1
  379. package/dist/sparkle-core/p-564e64fc.entry.js +4 -0
  380. package/dist/sparkle-core/{p-b3909012.entry.js → p-5893bbe5.entry.js} +1 -1
  381. package/dist/sparkle-core/p-58e4bbe5.entry.js +1 -0
  382. package/dist/sparkle-core/p-590266d6.entry.js +1 -0
  383. package/dist/sparkle-core/p-594a6982.entry.js +1 -0
  384. package/dist/sparkle-core/{p-aef8aa31.entry.js → p-5c435d5a.entry.js} +1 -1
  385. package/dist/sparkle-core/{p-a7832a51.js → p-5cad23f1.js} +1 -1
  386. package/dist/sparkle-core/p-5efc6566.js +1 -0
  387. package/dist/sparkle-core/p-600cf6a3.js +1 -0
  388. package/dist/sparkle-core/{p-a9ee3f6d.entry.js → p-601397df.entry.js} +1 -1
  389. package/dist/sparkle-core/p-604a7987.js +4 -0
  390. package/dist/sparkle-core/{p-11cf398a.entry.js → p-616941c6.entry.js} +1 -1
  391. package/dist/sparkle-core/{p-aa87c7f0.entry.js → p-6316d124.entry.js} +1 -1
  392. package/dist/sparkle-core/p-63f71ada.entry.js +1 -0
  393. package/dist/sparkle-core/p-641bfc92.entry.js +1 -0
  394. package/dist/sparkle-core/p-69487d90.entry.js +1 -0
  395. package/dist/sparkle-core/{p-5a98d42e.entry.js → p-6faa194c.entry.js} +2 -2
  396. package/dist/sparkle-core/p-6ffd2420.entry.js +1 -0
  397. package/dist/sparkle-core/p-73721c84.js +4 -0
  398. package/dist/sparkle-core/p-74864276.entry.js +1 -0
  399. package/dist/sparkle-core/p-7d8427eb.js +4 -0
  400. package/dist/sparkle-core/{p-5264da79.js → p-7e7ce516.js} +0 -0
  401. package/dist/sparkle-core/{p-43a7391b.entry.js → p-80d6b0e6.entry.js} +1 -1
  402. package/dist/sparkle-core/{p-c5b9bdd6.entry.js → p-81714d94.entry.js} +1 -1
  403. package/dist/sparkle-core/p-8492a765.entry.js +1 -0
  404. package/dist/sparkle-core/p-859563db.entry.js +1 -0
  405. package/dist/sparkle-core/{p-4dc3ef96.entry.js → p-865f36a8.entry.js} +1 -1
  406. package/dist/sparkle-core/{p-52d4715a.js → p-86ed13f0.js} +1 -1
  407. package/dist/sparkle-core/p-871106e0.js +4 -0
  408. package/dist/sparkle-core/p-894ff7e6.entry.js +1 -0
  409. package/dist/sparkle-core/{p-7493ee15.entry.js → p-8a41b502.entry.js} +1 -1
  410. package/dist/sparkle-core/p-8c74cbb6.entry.js +1 -0
  411. package/dist/sparkle-core/{p-d4c07aca.js → p-924b2917.js} +0 -0
  412. package/dist/sparkle-core/p-9289cdbc.entry.js +1 -0
  413. package/dist/sparkle-core/{p-4bd4dab2.js → p-935e7cfc.js} +1 -1
  414. package/dist/sparkle-core/{p-d7baf31e.entry.js → p-975b99ee.entry.js} +1 -1
  415. package/dist/sparkle-core/p-99ee9919.js +1 -0
  416. package/dist/sparkle-core/p-9abbd715.entry.js +1 -0
  417. package/dist/sparkle-core/{p-ff4d6858.js → p-9d894ed4.js} +2 -2
  418. package/dist/sparkle-core/{p-fbd7eeca.entry.js → p-9e309b3e.entry.js} +1 -1
  419. package/dist/sparkle-core/{p-996361f9.entry.js → p-9e7fee8f.entry.js} +1 -1
  420. package/dist/sparkle-core/p-9ebf0537.entry.js +1 -0
  421. package/dist/sparkle-core/p-a102341e.entry.js +1 -0
  422. package/dist/sparkle-core/p-a208ab2d.js +4 -0
  423. package/dist/sparkle-core/p-a2638250.entry.js +1 -0
  424. package/dist/sparkle-core/{p-016a7aaf.entry.js → p-a2ebcf0a.entry.js} +1 -1
  425. package/dist/sparkle-core/{p-6823e6c1.entry.js → p-a98d7ebe.entry.js} +1 -1
  426. package/dist/sparkle-core/p-add30d46.js +4 -0
  427. package/dist/sparkle-core/p-af3cc111.entry.js +1 -0
  428. package/dist/sparkle-core/{p-0ad99881.js → p-b0603d19.js} +1 -1
  429. package/dist/sparkle-core/p-b3f375fb.entry.js +1 -0
  430. package/dist/sparkle-core/p-b5f3e1bf.entry.js +1 -0
  431. package/dist/sparkle-core/{p-90466494.entry.js → p-b96f3c84.entry.js} +2 -2
  432. package/dist/sparkle-core/p-bd80ff43.js +4 -0
  433. package/dist/sparkle-core/p-be64105c.entry.js +1 -0
  434. package/dist/sparkle-core/{p-08923b40.entry.js → p-c0533c23.entry.js} +1 -1
  435. package/dist/sparkle-core/p-c2990b24.entry.js +1 -0
  436. package/dist/sparkle-core/{p-c3d3d5c4.entry.js → p-c3cadfc6.entry.js} +1 -1
  437. package/dist/sparkle-core/p-c60b29bd.entry.js +4 -0
  438. package/dist/sparkle-core/p-cabfbf22.entry.js +1 -0
  439. package/dist/sparkle-core/p-cc518c36.entry.js +1 -0
  440. package/dist/sparkle-core/{p-b21d0d9f.entry.js → p-ce4b22f7.entry.js} +2 -2
  441. package/dist/sparkle-core/p-cffd4817.entry.js +1 -0
  442. package/dist/sparkle-core/{p-c69b0a7a.entry.js → p-d0adf726.entry.js} +1 -1
  443. package/dist/sparkle-core/{p-03ec54a8.entry.js → p-d20e4fcf.entry.js} +1 -1
  444. package/dist/sparkle-core/p-d24e53ab.entry.js +1 -0
  445. package/dist/sparkle-core/p-d288e6c1.entry.js +1 -0
  446. package/dist/sparkle-core/{p-ee0d7f19.entry.js → p-d601810e.entry.js} +1 -1
  447. package/dist/sparkle-core/p-d68092b7.js +4 -0
  448. package/dist/sparkle-core/p-de4deb61.entry.js +1 -0
  449. package/dist/sparkle-core/{p-b07a2cf2.entry.js → p-e249aebf.entry.js} +1 -1
  450. package/dist/sparkle-core/p-e3e36ce9.entry.js +1 -0
  451. package/dist/sparkle-core/{p-1726da2f.entry.js → p-e421d638.entry.js} +1 -1
  452. package/dist/sparkle-core/p-e686d8b5.entry.js +4 -0
  453. package/dist/sparkle-core/{p-401feeb0.js → p-e8073714.js} +1 -1
  454. package/dist/sparkle-core/p-e863bf1d.entry.js +1 -0
  455. package/dist/sparkle-core/{p-3defe550.entry.js → p-e8988989.entry.js} +1 -1
  456. package/dist/sparkle-core/p-e9431eeb.js +7 -0
  457. package/dist/sparkle-core/p-ea962e1b.entry.js +1 -0
  458. package/dist/sparkle-core/p-eaa8bbee.js +4 -0
  459. package/dist/sparkle-core/p-eaf76d1d.entry.js +352 -0
  460. package/dist/sparkle-core/p-ebd4354b.entry.js +1 -0
  461. package/dist/sparkle-core/p-ee1e0eb4.js +2 -0
  462. package/dist/sparkle-core/{p-d00f550b.entry.js → p-ef4edc48.entry.js} +1 -1
  463. package/dist/sparkle-core/{p-a9ccb0df.js → p-f3cba72a.js} +0 -0
  464. package/dist/sparkle-core/p-fb0ca75e.entry.js +5 -0
  465. package/dist/sparkle-core/p-fb757951.entry.js +1 -0
  466. package/dist/sparkle-core/p-fbccd30c.js +1 -0
  467. package/dist/sparkle-core/p-fd8d0738.entry.js +4 -0
  468. package/dist/sparkle-core/{p-90389886.entry.js → p-fda95b6e.entry.js} +1 -1
  469. package/dist/sparkle-core/{p-350adbaa.entry.js → p-fe6dc976.entry.js} +1 -1
  470. package/dist/sparkle-core/{p-ecd39170.entry.js → p-ff0e0d4e.entry.js} +1 -1
  471. package/dist/sparkle-core/sparkle-core.css +1 -1
  472. package/dist/sparkle-core/sparkle-core.esm.js +1 -1
  473. package/dist/types/components/sparkle-feed-post/sparkle-feed-post.d.ts +16 -0
  474. package/dist/types/components/sparkle-quiz/sparkle-quiz/sparkle-quiz.d.ts +42 -0
  475. package/dist/types/components/sparkle-quiz/sparkle-quiz-v1.d.ts +41 -0
  476. package/dist/types/components/sparkle-quiz/sparkle-quiz.d.ts +36 -36
  477. package/dist/types/components.d.ts +96 -11
  478. package/package.json +3 -3
  479. package/dist/cjs/PrivateRoute-482697a6.js +0 -35
  480. package/dist/cjs/dom-utils-b8befdd5.js +0 -63
  481. package/dist/cjs/header-mobile-collapse_2.cjs.entry.js +0 -112
  482. package/dist/cjs/index-07e8aa51.js +0 -3071
  483. package/dist/cjs/injectHistory-77d41284.js +0 -9
  484. package/dist/cjs/ion-avatar.cjs.entry.js +0 -25
  485. package/dist/cjs/ion-button_3.cjs.entry.js +0 -383
  486. package/dist/cjs/ion-card_2.cjs.entry.js +0 -93
  487. package/dist/cjs/ion-checkbox_4.cjs.entry.js +0 -370
  488. package/dist/cjs/ion-col_3.cjs.entry.js +0 -155
  489. package/dist/cjs/ion-icon_2.cjs.entry.js +0 -397
  490. package/dist/cjs/ion-input_2.cjs.entry.js +0 -316
  491. package/dist/cjs/ion-label_2.cjs.entry.js +0 -126
  492. package/dist/cjs/ion-range.cjs.entry.js +0 -445
  493. package/dist/cjs/ion-spinner.cjs.entry.js +0 -64
  494. package/dist/cjs/match-path-84c9f7ca.js +0 -511
  495. package/dist/cjs/sparkle-card_3.cjs.entry.js +0 -91
  496. package/dist/cjs/sparkle-course-root.cjs.entry.js +0 -145
  497. package/dist/cjs/sparkle-dropdown.cjs.entry.js +0 -61
  498. package/dist/cjs/sparkle-facilitator-header_19.cjs.entry.js +0 -2129
  499. package/dist/cjs/sparkle-goal-progress.cjs.entry.js +0 -19
  500. package/dist/cjs/sparkle-gww-item.cjs.entry.js +0 -74
  501. package/dist/cjs/sparkle-menu-toggle_3.cjs.entry.js +0 -236
  502. package/dist/cjs/sparkle-validation-error.cjs.entry.js +0 -21
  503. package/dist/cjs/stencil-route-link.cjs.entry.js +0 -77
  504. package/dist/cjs/stencil-router-redirect.cjs.entry.js +0 -32
  505. package/dist/cjs/student.service-7af424fe.js +0 -61
  506. package/dist/cjs/user.store-3d29139d.js +0 -21
  507. package/dist/esm/PrivateRoute-f59ba6b5.js +0 -33
  508. package/dist/esm/dom-utils-8e73e88b.js +0 -55
  509. package/dist/esm/header-mobile-collapse_2.entry.js +0 -107
  510. package/dist/esm/index-c92f99d4.js +0 -3067
  511. package/dist/esm/injectHistory-52d0c7eb.js +0 -7
  512. package/dist/esm/ion-avatar.entry.js +0 -21
  513. package/dist/esm/ion-button_3.entry.js +0 -377
  514. package/dist/esm/ion-card_2.entry.js +0 -88
  515. package/dist/esm/ion-checkbox_4.entry.js +0 -363
  516. package/dist/esm/ion-col_3.entry.js +0 -149
  517. package/dist/esm/ion-icon_2.entry.js +0 -392
  518. package/dist/esm/ion-input_2.entry.js +0 -311
  519. package/dist/esm/ion-label_2.entry.js +0 -121
  520. package/dist/esm/ion-range.entry.js +0 -441
  521. package/dist/esm/ion-spinner.entry.js +0 -60
  522. package/dist/esm/match-path-36fdf5c7.js +0 -499
  523. package/dist/esm/sparkle-card_3.entry.js +0 -85
  524. package/dist/esm/sparkle-course-root.entry.js +0 -141
  525. package/dist/esm/sparkle-dropdown.entry.js +0 -57
  526. package/dist/esm/sparkle-facilitator-header_19.entry.js +0 -2107
  527. package/dist/esm/sparkle-goal-progress.entry.js +0 -15
  528. package/dist/esm/sparkle-gww-item.entry.js +0 -70
  529. package/dist/esm/sparkle-menu-toggle_3.entry.js +0 -230
  530. package/dist/esm/sparkle-validation-error.entry.js +0 -17
  531. package/dist/esm/stencil-route-link.entry.js +0 -73
  532. package/dist/esm/stencil-router-redirect.entry.js +0 -28
  533. package/dist/esm/user.store-e6ff7558.js +0 -19
  534. package/dist/sparkle-core/p-021fde3c.entry.js +0 -1
  535. package/dist/sparkle-core/p-034306e2.js +0 -1
  536. package/dist/sparkle-core/p-034aa29f.entry.js +0 -5
  537. package/dist/sparkle-core/p-052caa63.js +0 -1
  538. package/dist/sparkle-core/p-0580419b.entry.js +0 -1
  539. package/dist/sparkle-core/p-063cd168.js +0 -4
  540. package/dist/sparkle-core/p-06c0cce3.entry.js +0 -1
  541. package/dist/sparkle-core/p-081968cc.entry.js +0 -1
  542. package/dist/sparkle-core/p-0934f5dd.entry.js +0 -1
  543. package/dist/sparkle-core/p-1133fcbd.js +0 -4
  544. package/dist/sparkle-core/p-1551190a.entry.js +0 -1
  545. package/dist/sparkle-core/p-1728ead7.js +0 -1
  546. package/dist/sparkle-core/p-1e8c22e0.entry.js +0 -1
  547. package/dist/sparkle-core/p-21bf4ca0.entry.js +0 -1
  548. package/dist/sparkle-core/p-232cc3bc.js +0 -1
  549. package/dist/sparkle-core/p-28950db0.entry.js +0 -1
  550. package/dist/sparkle-core/p-2af82cc1.entry.js +0 -1
  551. package/dist/sparkle-core/p-2bd4c60e.js +0 -1
  552. package/dist/sparkle-core/p-2f437793.entry.js +0 -348
  553. package/dist/sparkle-core/p-330ccc7c.entry.js +0 -1
  554. package/dist/sparkle-core/p-35a7bd6c.entry.js +0 -1
  555. package/dist/sparkle-core/p-35c5c110.entry.js +0 -1
  556. package/dist/sparkle-core/p-3ff617d5.js +0 -1
  557. package/dist/sparkle-core/p-4028676b.js +0 -4
  558. package/dist/sparkle-core/p-41124baa.js +0 -4
  559. package/dist/sparkle-core/p-41af3793.entry.js +0 -1
  560. package/dist/sparkle-core/p-44c23f72.js +0 -1
  561. package/dist/sparkle-core/p-45e6db62.entry.js +0 -1
  562. package/dist/sparkle-core/p-48f9b960.entry.js +0 -1
  563. package/dist/sparkle-core/p-4a72626a.js +0 -1
  564. package/dist/sparkle-core/p-4ba57978.entry.js +0 -4
  565. package/dist/sparkle-core/p-4ef4b8bd.entry.js +0 -5
  566. package/dist/sparkle-core/p-4f144efa.js +0 -4
  567. package/dist/sparkle-core/p-58e98f89.entry.js +0 -1
  568. package/dist/sparkle-core/p-59f7bf6e.entry.js +0 -1
  569. package/dist/sparkle-core/p-5ec7fd67.entry.js +0 -1
  570. package/dist/sparkle-core/p-618f6f82.entry.js +0 -1
  571. package/dist/sparkle-core/p-62a6c96f.entry.js +0 -1
  572. package/dist/sparkle-core/p-65ca1fb2.entry.js +0 -1
  573. package/dist/sparkle-core/p-663fafa9.entry.js +0 -1
  574. package/dist/sparkle-core/p-67f71099.entry.js +0 -4
  575. package/dist/sparkle-core/p-680663a2.entry.js +0 -1
  576. package/dist/sparkle-core/p-6a16b9ef.entry.js +0 -4
  577. package/dist/sparkle-core/p-6b6a8f0a.entry.js +0 -1
  578. package/dist/sparkle-core/p-6c5b5ea2.entry.js +0 -1
  579. package/dist/sparkle-core/p-6ebf52fb.entry.js +0 -1
  580. package/dist/sparkle-core/p-6f45db93.js +0 -1
  581. package/dist/sparkle-core/p-6fd4985d.js +0 -4
  582. package/dist/sparkle-core/p-7052c43a.entry.js +0 -1
  583. package/dist/sparkle-core/p-70b2452c.js +0 -4
  584. package/dist/sparkle-core/p-74106ca8.entry.js +0 -1
  585. package/dist/sparkle-core/p-75572037.js +0 -1
  586. package/dist/sparkle-core/p-7568dcab.entry.js +0 -1
  587. package/dist/sparkle-core/p-768bcc9e.entry.js +0 -1
  588. package/dist/sparkle-core/p-7703bae9.entry.js +0 -1
  589. package/dist/sparkle-core/p-77c23496.entry.js +0 -1
  590. package/dist/sparkle-core/p-79606a41.entry.js +0 -1
  591. package/dist/sparkle-core/p-7976e88c.entry.js +0 -1
  592. package/dist/sparkle-core/p-7c1f59ec.js +0 -1
  593. package/dist/sparkle-core/p-7de0a22b.entry.js +0 -1
  594. package/dist/sparkle-core/p-848fe770.entry.js +0 -1
  595. package/dist/sparkle-core/p-86d099f1.js +0 -4
  596. package/dist/sparkle-core/p-87549bb7.js +0 -4
  597. package/dist/sparkle-core/p-8c470e28.entry.js +0 -1
  598. package/dist/sparkle-core/p-954c89c2.entry.js +0 -1
  599. package/dist/sparkle-core/p-95d01c4c.js +0 -4
  600. package/dist/sparkle-core/p-987c64eb.js +0 -1
  601. package/dist/sparkle-core/p-9babd345.js +0 -1
  602. package/dist/sparkle-core/p-a89dea80.entry.js +0 -1
  603. package/dist/sparkle-core/p-b17dd6df.js +0 -4
  604. package/dist/sparkle-core/p-b3e6427d.js +0 -7
  605. package/dist/sparkle-core/p-b7dafaae.entry.js +0 -1
  606. package/dist/sparkle-core/p-bd062288.entry.js +0 -1
  607. package/dist/sparkle-core/p-bef34cfe.entry.js +0 -1
  608. package/dist/sparkle-core/p-c1c59771.js +0 -1
  609. package/dist/sparkle-core/p-c4104929.entry.js +0 -1
  610. package/dist/sparkle-core/p-c48bbc7c.entry.js +0 -4
  611. package/dist/sparkle-core/p-c753207f.entry.js +0 -1
  612. package/dist/sparkle-core/p-c8ed0575.js +0 -1
  613. package/dist/sparkle-core/p-c96b24bd.entry.js +0 -4
  614. package/dist/sparkle-core/p-ce13171b.entry.js +0 -1
  615. package/dist/sparkle-core/p-d394eed1.entry.js +0 -1
  616. package/dist/sparkle-core/p-d48e95c1.entry.js +0 -1
  617. package/dist/sparkle-core/p-d4b1a14a.entry.js +0 -1
  618. package/dist/sparkle-core/p-d56efeac.entry.js +0 -4
  619. package/dist/sparkle-core/p-d59a5984.entry.js +0 -1
  620. package/dist/sparkle-core/p-d8aff730.entry.js +0 -1
  621. package/dist/sparkle-core/p-da8921d0.entry.js +0 -1
  622. package/dist/sparkle-core/p-e08059b6.js +0 -4
  623. package/dist/sparkle-core/p-e3fdd0a8.entry.js +0 -1
  624. package/dist/sparkle-core/p-ec4d22e3.entry.js +0 -1
  625. package/dist/sparkle-core/p-ed3eed72.entry.js +0 -1
  626. package/dist/sparkle-core/p-ee0717e1.entry.js +0 -4
  627. package/dist/sparkle-core/p-ef2dace6.js +0 -4
  628. package/dist/sparkle-core/p-f1106984.entry.js +0 -1
  629. package/dist/sparkle-core/p-f61ca75c.entry.js +0 -1
  630. package/dist/sparkle-core/p-f9b73032.entry.js +0 -1
  631. package/dist/sparkle-core/p-fef04ab5.js +0 -4
@@ -1,2129 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-bae2a754.js');
6
- const index$1 = require('./index-459a5fa9.js');
7
- const index$2 = require('./index-07e8aa51.js');
8
- const auth_store = require('./auth.store-ff3fda09.js');
9
- const facilitator_service = require('./facilitator.service-faac5c0c.js');
10
- const overlays = require('./overlays-0a748609.js');
11
- const feed_service = require('./feed.service-66405969.js');
12
- const environmentConfig_service = require('./environment-config.service-0e02b049.js');
13
- const assets_service = require('./assets.service-0c759d51.js');
14
- const util = require('./util-d383acb8.js');
15
- const auth_service = require('./auth.service-f878f6ab.js');
16
- const user_store = require('./user.store-3d29139d.js');
17
- const student_service = require('./student.service-7af424fe.js');
18
- const injectHistory = require('./injectHistory-77d41284.js');
19
- const matchPath = require('./match-path-84c9f7ca.js');
20
- const activeRouter = require('./active-router-eedb3bfe.js');
21
- const domUtils = require('./dom-utils-b8befdd5.js');
22
- require('./hardware-back-button-f7b5d99e.js');
23
- require('./helpers-7e28976c.js');
24
- require('./ionic-global-878073d1.js');
25
- require('./animation-6132e37f.js');
26
- require('./localstorage.service-6346a41d.js');
27
-
28
- const facilitatorHeaderCss = "sparkle-facilitator-header{background-color:var(--background);box-shadow:0px 1px 3px rgba(2, 8, 20, 0.06), 0px 1px 2px rgba(2, 8, 20, 0.04);color:var(--text-color--light);display:block;font-size:14px;font-weight:500;line-height:1;position:fixed;top:0;left:0;transform:translateY(0);transition:transform 200ms ease;user-select:none;width:100%;white-space:nowrap;z-index:2}@media (min-width: 768px){.Layout:not(.is-menu-toggled) sparkle-facilitator-header.hidden{transform:translateY(-100%)}}@media (max-width: 768px){.Layout.is-menu-toggled sparkle-facilitator-header.hidden{transform:translateY(-100%)}}sparkle-facilitator-header header{align-items:center;display:flex;height:var(--header-height);padding:0 1.4rem 0 0.8rem}sparkle-facilitator-header a{color:inherit;font-weight:500;padding:10px 0}sparkle-facilitator-header ion-icon{font-size:16px;color:#B2BECD}sparkle-facilitator-header .link-active{color:var(--ion-color-sparkle)}@media (hover: hover){sparkle-facilitator-header a:not(.link-active):hover{color:var(--text-color)}}sparkle-facilitator-header sparkle-menu-toggle{flex:none;margin-right:0.75em}sparkle-facilitator-header .HeaderLogo{color:var(--text-color--dark);font-family:var(--heading-font-family);height:25px;margin-right:2em;display:flex;justify-content:center;align-items:center;font-size:1.5em}sparkle-facilitator-header .SectionNav stencil-route{display:flex}sparkle-facilitator-header .SectionNav .Dropdown{align-self:center;color:var(--text-color);margin-right:0.75em}sparkle-facilitator-header .SectionNav .Dropdown-button{border:solid 1px #DEE3EA;border-radius:6px;color:var(--text-color--dark);padding:10px;transition:border-color 100ms ease}sparkle-facilitator-header .SectionNav .Dropdown.is-open .Dropdown-button{border-color:var(--line-rule-color)}sparkle-facilitator-header .SectionNav .Dropdown-panel{min-width:180px}sparkle-facilitator-header .SectionNav .Dropdown-panel a{display:flex;justify-content:space-between}sparkle-facilitator-header .SectionNav .Dropdown-panel svg{height:1em;width:1em}sparkle-facilitator-header .SectionNav .Dropdown-panel .Nav-link{margin-left:0;margin-right:0}sparkle-facilitator-header .SectionNav-tabs>*{align-items:center;display:inline-flex;height:var(--header-height);margin-right:1em;padding:0px 1em;position:relative}sparkle-facilitator-header .SectionNav-tabs .link-active:after{background-color:currentColor;bottom:0;content:\"\";display:block;height:2px;left:0;position:absolute;width:100%}sparkle-facilitator-header .UtilNav{align-items:center;display:flex;font-size:12px;margin-left:auto}sparkle-facilitator-header .UtilNav>*{margin-left:1em}sparkle-facilitator-header .UtilNav .Dropdown.is-open{color:var(--text-color)}sparkle-facilitator-header .UtilNav .Dropdown-button{padding:10px 0}@media (hover: hover){sparkle-facilitator-header .UtilNav .Dropdown-button:hover{color:var(--text-color)}}sparkle-facilitator-header .UtilNav .Dropdown-panel{font-size:14px}sparkle-facilitator-header .girls-inc-logo{display:block;max-width:40px;max-height:40px;width:auto;height:auto}";
29
-
30
- const SparkleFacilitatorHeader = class {
31
- constructor(hostRef) {
32
- index.registerInstance(this, hostRef);
33
- this.courseName = '';
34
- this.hidden = false;
35
- this.frameRequested = false;
36
- this.prevScroll = 0;
37
- }
38
- handleScroll() {
39
- if (!this.frameRequested) {
40
- requestAnimationFrame(() => {
41
- const { scrollY } = window;
42
- this.hidden = scrollY > 60 && scrollY > this.prevScroll;
43
- this.prevScroll = scrollY;
44
- this.frameRequested = false;
45
- });
46
- this.frameRequested = true;
47
- }
48
- }
49
- componentWillLoad() {
50
- }
51
- hostData() {
52
- return {
53
- class: { hidden: this.hidden },
54
- };
55
- }
56
- openEnd() {
57
- index$1.menuController.enable(true, 'students');
58
- index$1.menuController.open('students');
59
- }
60
- async openOnlineStudentsSidebar() {
61
- document.getElementById("#onlineStudents");
62
- }
63
- __stencil_render() {
64
- return (index.h("header", null, index.h("a", { href: "/home" }, index.h("div", { class: "HeaderLogo" }, this.courseName)), index.h("header-mobile-collapse", null, index.h("div", { class: "SectionNav-tabs" }), index.h("nav", { class: "UtilNav" }, index.h("sparkle-button", { href: "/login", round: true }, "Login"), index.h("sparkle-button", { href: "/signup", primary: true, round: true }, "Get Started"), index.h("slot", { name: "logo" })))));
65
- }
66
- get el() { return index.getElement(this); }
67
- render() { return index.h(index.Host, this.hostData(), this.__stencil_render()); }
68
- };
69
- SparkleFacilitatorHeader.style = facilitatorHeaderCss;
70
-
71
- class StoreService {
72
- constructor() { }
73
- static getInstance() {
74
- if (!StoreService.instance) {
75
- StoreService.instance = new StoreService();
76
- }
77
- return StoreService.instance;
78
- }
79
- async UpdateTocPageInfo(pageInfo) {
80
- auth_store.TocStore.state.pageInfo = pageInfo;
81
- }
82
- }
83
-
84
- const facilitatorPageCss = ".Error{align-items:center;background-color:var(--offset-background);color:var(--text-color--light);display:flex;flex-direction:column;justify-content:center;line-height:1;white-space:nowrap}.Error.full-screen{padding-bottom:3rem}.Error>*{margin:10px}.Error h1,.Error div{color:inherit;font-size:3rem}.Error div{text-shadow:3px 3px 3px rgba(0,0,0,0.1)}.Error p{font-size:18px}sparkle-facilitator-page{display:grid;font-size:16px;grid-template-columns:1fr;line-height:2;margin-top:var(--header-height);overflow-x:hidden;transform:var(--page-transform, none);transition:transform 200ms cubic-bezier(0.2, 1, 0.2, 1);--page-padding:2rem;padding:20px}@media (min-width: 1234px){sparkle-facilitator-page{grid-template-columns:1fr}}@media (min-width: 1800px){sparkle-facilitator-page{grid-template-columns:1fr}}sparkle-facilitator-page>main.column-1{position:relative;grid-column:1;margin-bottom:3rem;padding:var(--page-padding, 2rem 1rem);position:relative}sparkle-facilitator-page>main.column-2{position:relative;grid-column:1;margin-bottom:3rem;padding:var(--page-padding, 2rem 1rem);position:relative}sparkle-facilitator-page sparkle-pagination{grid-column:1 / -1;border:none;--page-padding:0rem 1rem}sparkle-facilitator-page .full-screen{grid-column:1 / -1;height:calc(100vh - var(--header-height));margin-bottom:0;overflow:hidden;padding:0}sparkle-facilitator-page sparkle-page-footer{margin-top:0rem}sparkle-facilitator-page .page-heading-encapsulation{text-transform:uppercase;background:transparent;color:#2d4665;border:1px solid #dee3ea;border-radius:14px;height:24px;padding:2px 8px;font-weight:600;font-size:10px;line-height:14px;display:inline-flex;align-items:center;align-self:center;justify-self:flex-end;letter-spacing:0.08em;float:right}sparkle-facilitator-page .page-heading-encapsulation:hover{border-color:#92a1b3}sparkle-facilitator-page h1{display:flex;justify-content:space-between;margin-top:2rem;margin-bottom:1rem}sparkle-facilitator-page h2 a[href^='#'],sparkle-facilitator-page h3 a[href^='#'],sparkle-facilitator-page h4 a[href^='#'],sparkle-facilitator-page h5 a[href^='#'],sparkle-facilitator-page h6 a[href^='#']{color:inherit;position:relative}sparkle-facilitator-page h2 a[href^='#']:before,sparkle-facilitator-page h3 a[href^='#']:before,sparkle-facilitator-page h4 a[href^='#']:before,sparkle-facilitator-page h5 a[href^='#']:before,sparkle-facilitator-page h6 a[href^='#']:before{content:'#';opacity:0;padding-right:5px;position:absolute;right:100%;transition:opacity 100ms ease}sparkle-facilitator-page h2 a[href^='#']:hover:before,sparkle-facilitator-page h3 a[href^='#']:hover:before,sparkle-facilitator-page h4 a[href^='#']:hover:before,sparkle-facilitator-page h5 a[href^='#']:hover:before,sparkle-facilitator-page h6 a[href^='#']:hover:before{opacity:1}sparkle-facilitator-page h2 code,sparkle-facilitator-page h3 code,sparkle-facilitator-page h4 code,sparkle-facilitator-page h5 code,sparkle-facilitator-page h6 code{background:none;font-size:inherit}sparkle-facilitator-page aside{float:right;margin-left:20px;margin-bottom:20px}@media (min-width: 1234px){sparkle-facilitator-page main.no-demo .page-meta{position:fixed;right:0;top:100px;width:240px;transition:0.2s transform ease}sparkle-header.hidden~stencil-route sparkle-facilitator-page main.no-demo .page-meta{transform:translateY(-60px)}}sparkle-facilitator-page main.has-demo .page-meta internal-ad{display:none}sparkle-facilitator-page .tab-content{padding:20px}";
85
-
86
- const FacilitatorPage = class {
87
- constructor(hostRef) {
88
- index.registerInstance(this, hostRef);
89
- this.pageDidLoad = index.createEvent(this, "pageDidLoad", 7);
90
- this.isLesson = false;
91
- this.notesPage = { title: null, path: null, body: null, pageInfo: null };
92
- this.lessonNotesPage = { title: null, path: null, body: null, pageInfo: null };
93
- this.page = { title: null, path: null, body: null, pageInfo: null };
94
- this.onlineStudents = [];
95
- this.activetab = "FACILITATOR_NOTES";
96
- this.validateFetch = (response) => {
97
- if (!response.ok) {
98
- throw response;
99
- }
100
- return response.json();
101
- };
102
- this.handleNotesPage = (page) => {
103
- this.badFetch = null;
104
- this.notesPage = page;
105
- this.pageDidLoad.emit({ pageInfo: this.notesPage.pageInfo });
106
- };
107
- this.handleLessonNotesPage = (page) => {
108
- this.badFetchLessonNotes = null;
109
- this.lessonNotesPage = page;
110
- };
111
- this.handleNewPage = (page) => {
112
- this.page = page;
113
- this.page = Object.assign(Object.assign({}, this.page), { nextUrl: "/presentation/teacher" + this.page.nextUrl, previousUrl: "/presentation/teacher" + this.page.previousUrl });
114
- StoreService.getInstance().UpdateTocPageInfo(this.page.pageInfo);
115
- };
116
- this.handleBadFetch = (error) => {
117
- this.badFetch = error;
118
- this.notesPage = {
119
- title: error.statusText,
120
- body: null,
121
- path: null,
122
- pageInfo: null
123
- };
124
- };
125
- this.handleLessonNotesBadFetch = (error) => {
126
- this.badFetchLessonNotes = error;
127
- this.lessonNotesPage = {
128
- title: error.statusText,
129
- body: null,
130
- path: null,
131
- pageInfo: null
132
- };
133
- };
134
- }
135
- async componentWillLoad() {
136
- await this.fetchClasses();
137
- return this.fetchNotesPage(this.notesPath) && this.fetchPage(this.path);
138
- }
139
- componentDidLoad() {
140
- this.isLesson = auth_store.TocStore.state.pageInfo.pageId > 0;
141
- if (!this.isLesson) {
142
- this.activetab = "ONLINE_STUDENTS";
143
- }
144
- }
145
- async fetchClasses() {
146
- await facilitator_service.FacilitatorService.getInstance().fetchClasses();
147
- }
148
- fetchNotesPage(path, oldPath) {
149
- if (path === null || path === oldPath) {
150
- return;
151
- }
152
- path = /^\/docs\/pages\/[a-z]{2}\.json$/.test(path) ? path.replace('.json', '/index.json') : path;
153
- let lessonPath = this.getLessonPath(path);
154
- console.log(lessonPath);
155
- return fetch(path).then(this.validateFetch).then(this.handleNotesPage).catch(this.handleBadFetch) &&
156
- fetch(lessonPath).then(this.validateFetch).then(this.handleLessonNotesPage).catch(this.handleLessonNotesBadFetch);
157
- }
158
- getLessonPath(path) {
159
- let splittedPath = path.split("/");
160
- splittedPath.pop();
161
- return splittedPath.join("/") + "/lesson-notes.json";
162
- }
163
- fetchPage(path, oldPath) {
164
- if (path === null || path === oldPath) {
165
- return;
166
- }
167
- if (index$2.SignalRService.getInstance().connection.connectionState == "Connected") {
168
- index$2.SignalRService.getInstance().callSignalR("NavigateFacilitatorPresentationCourseTo", { url: this.path.replace(".json", "") });
169
- }
170
- path = /^\/docs\/pages\/[a-z]{2}\.json$/.test(path) ? path.replace('.json', '/index.json') : path;
171
- return fetch(path).then(this.validateFetch).then(this.handleNewPage).catch(this.handleBadFetch);
172
- }
173
- disconnectedCallback() {
174
- StoreService.getInstance().UpdateTocPageInfo(null);
175
- }
176
- setDocumentMeta(page) {
177
- const { title, meta = {} } = page;
178
- const metaEls = {
179
- title: document.head.querySelectorAll('.meta-title'),
180
- description: document.head.querySelectorAll('.meta-description'),
181
- url: document.head.querySelectorAll('.meta-url, link[rel="canonical"]'),
182
- image: document.head.querySelectorAll('.meta-image'),
183
- };
184
- const updateMeta = (els, update) => {
185
- els.forEach((el) => {
186
- ['href', 'content'].forEach(attr => {
187
- if (el.hasAttribute(attr)) {
188
- el.setAttribute(attr, update(el.getAttribute(attr)));
189
- }
190
- });
191
- });
192
- };
193
- // Title
194
- const getTitle = () => {
195
- const suffix = /^\/docs\/pages.*$/.test(this.notesPath) ? 'Sparkle' : 'Sparkle';
196
- // Favor meta title, else go with auto-title. fallback to generic title
197
- return meta.title || title ? `${title} - ${suffix}` : suffix;
198
- };
199
- document.title = getTitle();
200
- updateMeta(metaEls.title, getTitle);
201
- // Canonical URL
202
- updateMeta(metaEls.url, (oldVal) => {
203
- const uri = '/docs/';
204
- const path = location.pathname.split(uri)[1];
205
- return oldVal.split(uri)[0] + uri + path;
206
- });
207
- // Description
208
- updateMeta(metaEls.description, () => meta.description || 'Sparkle is the free open-source platform for creating learning content on web, mobile and desktop.');
209
- // Sharing Image
210
- updateMeta(metaEls.image, () => meta.image || 'https://girlsinclearning.com//images/logo-primary.png');
211
- }
212
- hostData() {
213
- return {
214
- class: {
215
- [this.notesPage.pageClass]: typeof this.notesPage.pageClass === 'string',
216
- },
217
- };
218
- }
219
- renderNavigation() {
220
- return (index.h("div", { class: "p-2 d-md-flex justify-content-md-center" }, index.h("div", { class: "btn-group btn-group-sm", role: "group", "aria-label": "Basic outlined example" }, index.h("button", { type: "button", class: "btn btn-outline-primary" }, "Prev"), index.h("input", { type: "text", class: "form-control", placeholder: "Input group example", "aria-label": "Input group example", "aria-describedby": "btnGroupAddon", value: this.path.replace("index", ""), readOnly: true }), index.h("button", { type: "button", class: "btn btn-outline-primary" }, "Next"))));
221
- }
222
- renderTabs() {
223
- return (index.h("main", { class: 'no-demo' }, index.h("ul", { class: "nav nav-tabs" }, this.isLesson &&
224
- index.h(index.Fragment, null, index.h("li", { class: "nav-item" }, index.h("a", { class: `nav-link ${this.activetab == "FACILITATOR_NOTES" ? 'active' : ''}`, href: "javascript:void(0)", onClick: () => this.activetab = "FACILITATOR_NOTES" }, "Facilitator Notes")), index.h("li", { class: "nav-item" }, index.h("a", { class: `nav-link ${this.activetab == "NOTES" ? 'active' : ''}`, href: "javascript:void(0)", onClick: () => this.activetab = "NOTES" }, "Notes")), index.h("li", { class: "nav-item" }, index.h("a", { class: `nav-link ${this.activetab == "LESSON_NOTES" ? 'active' : ''}`, href: "javascript:void(0)", onClick: () => this.activetab = "LESSON_NOTES" }, "Lesson Notes"))), index.h("li", { class: "nav-item" }, index.h("a", { class: `nav-link ${this.activetab == "ONLINE_STUDENTS" ? 'active' : ''}`, href: "javascript:void(0)", onClick: () => this.activetab = "ONLINE_STUDENTS" }, "Online Students")), index.h("li", { class: "nav-item" }, index.h("a", { class: `nav-link ${this.activetab == "DASHBOARD" ? 'active' : ''}`, href: "javascript:void(0)", onClick: () => this.activetab = "DASHBOARD" }, "Dashboard")), index.h("li", { class: "nav-item" }, index.h("a", { class: `nav-link ${this.activetab == "EXPORT" ? 'active' : ''}`, href: "javascript:void(0)", onClick: () => this.activetab = "EXPORT" }, "Export"))), index.h("div", { class: "tab-content" }, this.activetab == "FACILITATOR_NOTES" && this.renderFacilitatorNotes(), this.activetab == "NOTES" && index.h("sparkle-facilitator-notes", null), this.activetab == "LESSON_NOTES" && this.renderLessonNotes(), this.activetab == "ONLINE_STUDENTS" && index.h("sparkle-online-students", { path: this.path }), this.activetab == "DASHBOARD" && index.h("sparkle-facilitator-dashboard", null), this.activetab == "EXPORT" && index.h("sparkle-export-lessons", null))));
225
- }
226
- renderLessonNotes() {
227
- const { lessonNotesPage } = this;
228
- const Template = index$2.templates[lessonNotesPage.template] || index$2.templates.default;
229
- if (this.badFetchLessonNotes) {
230
- return index$2.templates.error(this.badFetch);
231
- }
232
- return index.h(Template, { page: lessonNotesPage });
233
- }
234
- renderFacilitatorNotes() {
235
- const { notesPage } = this;
236
- const Template = index$2.templates[notesPage.template] || index$2.templates.default;
237
- if (this.badFetch) {
238
- return index$2.templates.error(this.badFetch);
239
- }
240
- return index.h(Template, { page: notesPage });
241
- }
242
- __stencil_render() {
243
- console.log(facilitator_service.facilitatorStore.state.classes);
244
- const { page } = this;
245
- const content = this.renderTabs();
246
- return index.h("div", { class: "container" }, index.h("div", { class: "d-flex justify-content-between align-items-center" }, index.h("sparkle-page-footer", { page: page }), index.h("div", null, index.h("select", { class: "form-select", "aria-label": "Default select example" }, facilitator_service.facilitatorStore.state.classes.map(item => index.h("option", null, item.ClassName))))), content);
247
- }
248
- static get watchers() { return {
249
- "notesPath": ["fetchNotesPage"],
250
- "path": ["fetchPage"],
251
- "page": ["setDocumentMeta"]
252
- }; }
253
- render() { return index.h(index.Host, this.hostData(), this.__stencil_render()); }
254
- };
255
- FacilitatorPage.style = facilitatorPageCss;
256
-
257
- class AccountService {
258
- constructor() { }
259
- static getInstance() {
260
- if (!AccountService.instance) {
261
- AccountService.instance = new AccountService();
262
- }
263
- return AccountService.instance;
264
- }
265
- async register(registerInput) {
266
- const headers = {
267
- 'Content-Type': 'application/json',
268
- };
269
- auth_store.AuthStore.state.loading = true;
270
- let result;
271
- try {
272
- result = await auth_store.HttpService.http.post('api/Account/Register', registerInput, {
273
- headers: headers
274
- });
275
- if (result.Succeeded) {
276
- auth_store.AuthStore.state.loading = false;
277
- }
278
- }
279
- catch (e) {
280
- auth_store.AuthStore.state.loading = false;
281
- return e;
282
- }
283
- return result;
284
- }
285
- async forgotPassword(forgotPasswordInput) {
286
- auth_store.AuthStore.state.loading = true;
287
- let result;
288
- try {
289
- result = await auth_store.HttpService.http.post('api/Account/Forgot-Password', forgotPasswordInput);
290
- if (result.Succeeded) {
291
- auth_store.AuthStore.state.loading = false;
292
- }
293
- }
294
- catch (e) {
295
- auth_store.AuthStore.state.loading = false;
296
- return e;
297
- }
298
- return result;
299
- }
300
- async resetPassword(resetPasswordInput) {
301
- auth_store.AuthStore.state.loading = true;
302
- let result;
303
- try {
304
- result = await auth_store.HttpService.http.post('api/Account/reset-password', resetPasswordInput);
305
- if (result.Succeeded) {
306
- auth_store.AuthStore.state.loading = false;
307
- }
308
- }
309
- catch (e) {
310
- auth_store.AuthStore.state.loading = false;
311
- return e;
312
- }
313
- return result;
314
- }
315
- }
316
-
317
- const sparkleForgotPasswordCss = "sparkle-forgot-password .list{margin-bottom:0}";
318
-
319
- const SparkleForgotPassword = class {
320
- constructor(hostRef) {
321
- index.registerInstance(this, hostRef);
322
- this.formControls = {
323
- email: {
324
- isValid: false,
325
- value: '',
326
- validate: value => {
327
- if (value) {
328
- return true;
329
- }
330
- else {
331
- return false;
332
- }
333
- },
334
- },
335
- };
336
- this.submitted = false;
337
- }
338
- changeFormValue(controlName, value) {
339
- this.formControls = Object.assign(Object.assign({}, this.formControls), { [controlName]: Object.assign(Object.assign({}, this.formControls[controlName]), { value: value, isValid: this.formControls[controlName].validate(value) }) });
340
- }
341
- async handleSubmit(e) {
342
- e.preventDefault();
343
- this.submitted = true;
344
- let isFormValid = true;
345
- //Run all validation functions
346
- for (let controlName in this.formControls) {
347
- let control = this.formControls[controlName];
348
- control.validate(control.value);
349
- if (!control.isValid) {
350
- isFormValid = false;
351
- }
352
- }
353
- if (isFormValid) {
354
- let result = await AccountService.getInstance().forgotPassword({
355
- Email: this.formControls.email.value,
356
- ClientURL: window.location.origin + "/reset-password"
357
- });
358
- if (result.Succeeded) {
359
- this.history.replace('/login', {});
360
- }
361
- else if (result.Failed) {
362
- if (result.Errors.length > 0) {
363
- this.validationErrors = result.Errors;
364
- }
365
- }
366
- }
367
- }
368
- render() {
369
- return [
370
- index.h("div", null, index.h("div", { class: "login-logo" }, index.h("img", { src: index.getAssetPath("/assets/img/G3-Girls.jpg"), alt: "Girls Inc" })), index.h("sparkle-validation-error", { errors: this.validationErrors }), index.h("form", { novalidate: "true", onSubmit: (e) => this.handleSubmit(e) }, index.h("ion-list", { "no-lines": true }, index.h("ion-item", { lines: "none" }, "Enter your email address and we will send you a link to reset your password."), index.h("ion-item", null, index.h("ion-label", { position: "stacked", color: "primary" }, "Email"), index.h("ion-input", { name: "email", type: "text", value: this.formControls.email.value, onInput: (ev) => this.changeFormValue("email", ev.target.value), spellcheck: false, autocapitalize: "off" })), index.h("ion-text", { color: "danger" }, index.h("p", { hidden: this.formControls.email.isValid || this.submitted === false, class: "ion-padding-left" }, "Email is required")), index.h("br", null), index.h("div", { class: "ion-padding" }, index.h("ion-button", { type: "submit", expand: "block", disabled: auth_store.AuthStore.state.loading }, auth_store.AuthStore.state.loading && index.h("ion-spinner", { name: "dots" }), " SEND PASSWORD RESET EMAIL")))))
371
- ];
372
- }
373
- };
374
- SparkleForgotPassword.style = sparkleForgotPasswordCss;
375
-
376
- const sparkleGoalsCss = ":host{display:block}sparkle-dropdown a{color:var(--text-color);padding:1em;cursor:pointer}";
377
-
378
- const SparkleGoals = class {
379
- constructor(hostRef) {
380
- index.registerInstance(this, hostRef);
381
- }
382
- async componentDidLoad() {
383
- await feed_service.AppDataService.getInstance().getAllGoals();
384
- }
385
- async presentAddGoalModal(appData) {
386
- const modal = await overlays.modalController.create({
387
- component: "sparkle-goal-form",
388
- cssClass: "auto-height",
389
- componentProps: { appData }
390
- });
391
- await modal.present();
392
- }
393
- render() {
394
- return (index.h(index.Host, null, index.h("h2", null, "MY GOALS"), index.h("ion-item", { lines: "none" }, index.h("ion-button", { size: "default", color: "primary", slot: "end", onClick: () => this.presentAddGoalModal(null) }, index.h("ion-icon", { name: "add-outline" }), "Add")), index.h("div", { class: "ion-padding" }, index.h("sparkle-cards", null, feed_service.goalStore.state.goals.map((goal) => index.h("div", { style: { "position": "relative" } }, index.h("sparkle-goal-item", { goal: goal.AppData, onEditGoal: () => this.presentAddGoalModal(goal) })))), !feed_service.goalStore.state.goalsLoading && feed_service.goalStore.state.goals.length == 0
395
- && index.h("div", { class: "text-center" }, "No Goals"), feed_service.goalStore.state.goalsLoading &&
396
- index.h("div", { class: "text-center" }, index.h("ion-spinner", { name: "dots" })))));
397
- }
398
- };
399
- SparkleGoals.style = sparkleGoalsCss;
400
-
401
- const sparkleGwwCss = ":host{display:block}";
402
-
403
- const SparkleGww = class {
404
- constructor(hostRef) {
405
- index.registerInstance(this, hostRef);
406
- this.commentPosted = index.createEvent(this, "commentPosted", 7);
407
- this.postComment = async (model) => {
408
- const result = await feed_service.FeedService.getInstance().createPostComment(model);
409
- if (result.Succeeded) {
410
- this.commentPosted.emit();
411
- }
412
- };
413
- }
414
- async componentDidLoad() {
415
- await feed_service.FeedService.getInstance().getAllPosts();
416
- }
417
- render() {
418
- console.log(feed_service.feedStore.state.postIdLoading, "Loading");
419
- return (index.h(index.Host, null, feed_service.feedStore.state.posts.map((item) => index.h("sparkle-gww-item", { key: item.Id, post: item, onPostComment: this.postComment, loading: feed_service.feedStore.state.postIdLoading == item.Id }))));
420
- }
421
- };
422
- SparkleGww.style = sparkleGwwCss;
423
-
424
- const storage = window.localStorage;
425
- function set(key, value) {
426
- return new Promise((resolve, reject) => {
427
- try {
428
- storage && storage.setItem(key, JSON.stringify(value));
429
- resolve();
430
- }
431
- catch (err) {
432
- reject(`Couldnt store object ${err}`);
433
- }
434
- });
435
- }
436
- function get(key) {
437
- try {
438
- if (storage) {
439
- const item = storage.getItem(key);
440
- return JSON.parse(item);
441
- }
442
- }
443
- catch (err) {
444
- return null;
445
- }
446
- }
447
-
448
- class SparkleGlobal {
449
- }
450
- SparkleGlobal.LOCALSTORAGE_CLASSROOM_MODE = "SPARKLE_CLASSROOM_MODE";
451
-
452
- const headerCss = "sparkle-header{background-color:var(--background);box-shadow:0px 1px 3px rgba(2, 8, 20, 0.06), 0px 1px 2px rgba(2, 8, 20, 0.04);color:var(--text-color--light);display:block;font-size:14px;font-weight:500;line-height:1;position:fixed;top:0;left:0;transform:translateY(0);transition:transform 200ms ease;user-select:none;width:100%;white-space:nowrap;z-index:2}@media (min-width: 768px){.Layout:not(.is-menu-toggled) sparkle-header.hidden{transform:translateY(-100%)}}@media (max-width: 768px){.Layout.is-menu-toggled sparkle-header.hidden{transform:translateY(-100%)}}sparkle-header header{align-items:center;display:flex;height:var(--header-height);padding:0 1.4rem 0 0.8rem}sparkle-header a{color:inherit;font-weight:500;padding:10px 0}sparkle-header ion-icon{font-size:16px;color:#b2becd}sparkle-header .link-active{color:var(--ion-color-sparkle)}@media (hover: hover){sparkle-header a:not(.link-active):hover{color:var(--text-color)}}sparkle-header sparkle-menu-toggle{flex:none;margin-right:0.75em}sparkle-header .HeaderLogo{color:var(--text-color--dark);font-family:var(--heading-font-family);height:25px;margin-right:2em;display:flex;justify-content:center;align-items:center;font-size:1.5em}sparkle-header .SectionNav stencil-route{display:flex}sparkle-header .SectionNav .Dropdown{align-self:center;color:var(--text-color);margin-right:0.75em}sparkle-header .SectionNav .Dropdown-button{border:solid 1px #dee3ea;border-radius:6px;color:var(--text-color--dark);padding:10px;transition:border-color 100ms ease}sparkle-header .SectionNav .Dropdown.is-open .Dropdown-button{border-color:var(--line-rule-color)}sparkle-header .SectionNav .Dropdown-panel{min-width:180px}sparkle-header .SectionNav .Dropdown-panel a{display:flex;justify-content:space-between}sparkle-header .SectionNav .Dropdown-panel svg{height:1em;width:1em}sparkle-header .SectionNav .Dropdown-panel .Nav-link{margin-left:0;margin-right:0}sparkle-header .SectionNav-tabs>*{align-items:center;display:inline-flex;height:var(--header-height);margin-right:1em;padding:0px 1em;position:relative}sparkle-header .SectionNav-tabs .link-active:after{background-color:currentColor;bottom:0;content:'';display:block;height:2px;left:0;position:absolute;width:100%}sparkle-header .UtilNav{align-items:center;display:flex;font-size:12px;margin-left:auto}sparkle-header .UtilNav>*{margin-left:1em}sparkle-header .UtilNav .Dropdown.is-open{color:var(--text-color)}sparkle-header .UtilNav .Dropdown-button{padding:10px 0}@media (hover: hover){sparkle-header .UtilNav .Dropdown-button:hover{color:var(--text-color)}}sparkle-header .UtilNav .Dropdown-panel{font-size:14px}sparkle-header .class-room-toggle-container{display:flex;justify-content:start;align-items:center;padding-left:20px}sparkle-header .class-room-mode-toggle-title{padding-right:5px}sparkle-header .class-room-mode-toggle{align-items:center;display:flex;justify-content:center;width:90px;height:28px;background:var(--ion-color-sparkle-step-50);border-radius:18px}sparkle-header .class-room-mode-toggle button{background-color:transparent;border:none;border-radius:16px;color:#5b708b;cursor:pointer;font-family:var(--font-family);font-size:11px;letter-spacing:-0.02em;width:calc(50% - 2px);line-height:21px;padding-top:2px;transition:200ms background-color ease, 200ms color ease}sparkle-header .class-room-mode-toggle button:focus,sparkle-header .class-room-mode-toggle button:active{outline:none}sparkle-header .class-room-mode-toggle button.is-selected{background-color:var(--ion-color-sparkle);color:var(--ion-color-sparkle-contrast);font-weight:600;box-shadow:0px 2px 3px #a7b5c7}sparkle-header .girls-inc-logo{display:block;max-width:40px;max-height:40px;width:auto;height:auto}sparkle-header sparkle-dropdown.profile-dropdown .Dropdown-icon{height:30px;width:30px}sparkle-header sparkle-dropdown.profile-dropdown .Dropdown-arrow{height:30px}";
453
-
454
- const SparkleHeader = class {
455
- constructor(hostRef) {
456
- index.registerInstance(this, hostRef);
457
- this.classRoomModeChanged = index.createEvent(this, "classRoomModeChanged", 7);
458
- this.hideClassRoomToggle = false;
459
- this.courseName = '';
460
- this.imageUrl = '';
461
- this.classRoomMode = true;
462
- this.hidden = false;
463
- this.frameRequested = false;
464
- this.prevScroll = 0;
465
- }
466
- handleScroll() {
467
- if (!this.frameRequested) {
468
- requestAnimationFrame(() => {
469
- const { scrollY } = window;
470
- this.hidden = scrollY > 60 && scrollY > this.prevScroll;
471
- this.prevScroll = scrollY;
472
- this.frameRequested = false;
473
- });
474
- this.frameRequested = true;
475
- }
476
- }
477
- componentDidLoad() {
478
- var _a;
479
- this.classRoomMode = (_a = get(SparkleGlobal.LOCALSTORAGE_CLASSROOM_MODE)) !== null && _a !== void 0 ? _a : false;
480
- }
481
- hostData() {
482
- return {
483
- class: { hidden: this.hidden },
484
- };
485
- }
486
- toggleClassRoomMode() {
487
- this.classRoomMode = !this.classRoomMode;
488
- set(SparkleGlobal.LOCALSTORAGE_CLASSROOM_MODE, this.classRoomMode);
489
- this.classRoomModeChanged.emit(this.classRoomMode);
490
- }
491
- renderModeToggle() {
492
- return (index.h("div", { class: "class-room-toggle-container" }, index.h("div", { class: "class-room-mode-toggle-title" }, "Classroom"), index.h("div", { class: "class-room-mode-toggle" }, index.h("button", { class: this.classRoomMode == true ? 'is-selected' : null, title: "Toggle classroom mode", onClick: () => this.toggleClassRoomMode() }, "On"), index.h("button", { class: this.classRoomMode == false ? 'is-selected' : null, title: "Toggle classroom mode", onClick: () => this.toggleClassRoomMode() }, "Off"))));
493
- }
494
- __stencil_render() {
495
- return (index.h("header", null, index.h("sparkle-menu-toggle", { onClick: this.toggleClickFn }), index.h("a", { href: "/home" }, index.h("div", { class: "HeaderLogo" }, this.courseName)), index.h("header-mobile-collapse", null, index.h("div", { class: "SectionNav-tabs" }, index.h("stencil-route-link", { url: "/home" }, "Home")), index.h("nav", { class: "UtilNav" }, !this.authUser ? ([
496
- index.h("sparkle-button", { href: "/login", round: true }, "Login"),
497
- index.h("sparkle-button", { href: "/signup", primary: true, round: true }, "Get Started"),
498
- ]) : (index.h("sparkle-dropdown", { image: this.imageUrl, align: "center", label: "Account", class: "label-sm-only profile-dropdown" }, index.h("section", null, index.h("stencil-route-link", { url: "/profile" }, "My Profile"), index.h("stencil-route-link", { url: "/enrollment" }, "My Enrollment"), index.h("a", { onClick: this.signoutClickFn }, "Sign Out")))), !this.hideClassRoomToggle && this.renderModeToggle(), index.h("slot", { name: "logo" })))));
499
- }
500
- render() { return index.h(index.Host, this.hostData(), this.__stencil_render()); }
501
- };
502
- SparkleHeader.style = headerCss;
503
-
504
- const { state, reset } = auth_store.createStore({
505
- mediaUploading: false,
506
- });
507
- const mediaStore = { state, reset };
508
-
509
- class MediaService {
510
- constructor() { }
511
- static getInstance() {
512
- if (!MediaService.instance) {
513
- MediaService.instance = new MediaService();
514
- }
515
- return MediaService.instance;
516
- }
517
- async uploadImage(files) {
518
- let formData = new FormData();
519
- for (let i = 0; i < files.length; i++) {
520
- formData.append("uploads[]", files[i], files[i].name);
521
- }
522
- mediaStore.state.mediaUploading = true;
523
- let result;
524
- try {
525
- result = await auth_store.HttpService.http.post(`api/v1/MediaItems/Upload`, formData);
526
- if (result) {
527
- mediaStore.state.mediaUploading = false;
528
- }
529
- }
530
- catch (e) {
531
- mediaStore.state.mediaUploading = false;
532
- }
533
- return result;
534
- }
535
- }
536
-
537
- const sparkleHealthCss = ":host{display:block}.health-image{display:block;max-width:300px;max-height:200px;width:auto;height:auto}";
538
-
539
- const SparkleHealth = class {
540
- constructor(hostRef) {
541
- index.registerInstance(this, hostRef);
542
- this.uploadedImageUrl = "";
543
- this.heartRate = 0;
544
- this.public = true;
545
- this.submitted = false;
546
- }
547
- async postFeed() {
548
- const sparkleConfig = environmentConfig_service.EnvironmentConfigService.getInstance().get('sparkle');
549
- const tocData = await assets_service.AssetsService.getInstance().loadJsonFile(sparkleConfig.tocPath);
550
- var model = {
551
- PostText: util.MyHealthTemplate(this.heartRate),
552
- ExternalResourceUrl: this.uploadedImageUrl,
553
- IsPublic: this.public,
554
- MiniAppId: util.SparkleGlobal.MY_HEALTH_APP_ID,
555
- CourseId: tocData.id,
556
- PostTextJSON: util.MyHealthTemplateJSON(this.heartRate)
557
- };
558
- const result = await feed_service.FeedService.getInstance().createPost(model);
559
- if (result.Succeeded) {
560
- this.history.replace('/home');
561
- }
562
- }
563
- async uploadImage(event) {
564
- this.submitted = true;
565
- console.log(event.target.files);
566
- if (event.target.files && event.target.files[0]) {
567
- const result = await MediaService.getInstance().uploadImage(event.target.files);
568
- if (result.Succeeded && result.Data && result.Data.length > 0) {
569
- this.uploadedImageUrl = result.Data[0].FullImageUrl;
570
- console.log(this.uploadedImageUrl);
571
- }
572
- }
573
- }
574
- selectFile() {
575
- this.el.querySelector("#fileInput").click();
576
- }
577
- render() {
578
- return (index.h(index.Host, null, index.h("div", null, index.h("h3", null, "MY HEALTH"), index.h("p", null, "This mini-app will help girls develop and instil good physical health habits"), index.h("ion-list", null, index.h("ion-list-header", null, "Select Heart Rate"), index.h("ion-item", { lines: "none" }, index.h("ion-range", { min: 0, max: 150, step: 1, snaps: true, pin: true, onIonChange: (ev) => this.heartRate = +ev.detail.value }, index.h("ion-icon", { size: "small", slot: "start", name: "pulse" }), index.h("ion-icon", { name: "pulse", size: "small" }), index.h("div", { slot: "end" }, index.h("strong", null, this.heartRate)))), this.uploadedImageUrl && index.h("ion-item", { lines: "none" }, index.h("img", { class: "health-image", src: this.uploadedImageUrl })), index.h("ion-item", { lines: "none" }, index.h("input", { type: "file", id: "fileInput", onChange: (ev) => this.uploadImage(ev), style: { display: "none" }, accept: "image/*" }), index.h("div", null, index.h("ion-button", { onClick: () => this.selectFile(), disabled: mediaStore.state.mediaUploading }, mediaStore.state.mediaUploading && index.h("ion-spinner", { name: "dots" }), "Upload Image"))), index.h("ion-item", { lines: "none" }, index.h("ion-label", null, "Share to Community Wall"), index.h("ion-checkbox", { slot: "start", onChange: (ev) => this.public = ev.detail.checked, checked: true })), index.h("ion-item", { lines: "none" }, index.h("ion-button", { slot: "end", color: "primary", size: "default", onClick: () => this.postFeed(), disabled: mediaStore.state.mediaUploading || feed_service.feedStore.state.createPostLoading }, feed_service.feedStore.state.createPostLoading && index.h("ion-spinner", { name: "dots" }), " POST"))))));
579
- }
580
- get el() { return index.getElement(this); }
581
- };
582
- SparkleHealth.style = sparkleHealthCss;
583
-
584
- const sparkleLoginCss = "sparkle-login .list{margin-bottom:0}";
585
-
586
- const PageLogin = class {
587
- constructor(hostRef) {
588
- index.registerInstance(this, hostRef);
589
- this.userDidLogIn = index.createEvent(this, "userDidLogIn", 7);
590
- this.username = {
591
- valid: false,
592
- value: ''
593
- };
594
- this.password = {
595
- valid: false,
596
- value: ''
597
- };
598
- this.rememberMe = {
599
- valid: true,
600
- value: false
601
- };
602
- this.submitted = false;
603
- }
604
- handleUsername(ev) {
605
- this.validateUsername();
606
- this.username = Object.assign(Object.assign({}, this.username), { value: ev.target.value });
607
- }
608
- handlePassword(ev) {
609
- this.validatePassword();
610
- this.password.value = ev.target.value;
611
- this.password = Object.assign(Object.assign({}, this.password), { value: ev.target.value });
612
- }
613
- handleRememberMe(ev) {
614
- this.rememberMe = Object.assign(Object.assign({}, this.password), { value: ev.target.checked });
615
- console.log(this.rememberMe.value);
616
- }
617
- validateUsername() {
618
- if (this.username.value && this.username.value.length > 0) {
619
- this.username = Object.assign(Object.assign({}, this.username), { valid: true });
620
- return;
621
- }
622
- this.username = Object.assign(Object.assign({}, this.username), { valid: false });
623
- }
624
- validatePassword() {
625
- if (this.password.value && this.password.value.length > 0) {
626
- this.password.valid = true;
627
- this.password = Object.assign(Object.assign({}, this.password), { valid: true });
628
- return;
629
- }
630
- this.password = Object.assign(Object.assign({}, this.password), { valid: false });
631
- }
632
- async componentWillLoad() {
633
- this.destroyListener = auth_store.AuthStore.onChange('authUser', async (authUser) => {
634
- this.notsignin = !authUser;
635
- });
636
- this.notsignin = !auth_store.AuthStore.state.authUser;
637
- }
638
- disconnectedCallback() {
639
- if (this.destroyListener) {
640
- this.destroyListener();
641
- }
642
- }
643
- async onLogin(e) {
644
- e.preventDefault();
645
- // const navCtrl: HTMLIonRouterElement = await (this.nav as any).componentOnReady();
646
- this.validatePassword();
647
- this.validateUsername();
648
- this.submitted = true;
649
- if (this.password.valid && this.username.valid) {
650
- //await UserData.login(this.username.value);
651
- await auth_service.AuthService.getInstance().authenticate({
652
- Email: this.username.value,
653
- Password: this.password.value,
654
- RememberClient: this.rememberMe.value
655
- });
656
- sessionStorage.setItem('rememberMe', this.rememberMe.value == true ? '1' : '0');
657
- this.userDidLogIn.emit({ loginStatus: true });
658
- }
659
- }
660
- async onSignup(e) {
661
- e.preventDefault();
662
- //const navCtrl: HTMLIonRouterElement = await (this.nav as any).componentOnReady();
663
- //navCtrl.push('/signup');
664
- }
665
- renderLogin() {
666
- return [
667
- index.h("div", null, index.h("div", { class: "login-logo" }, index.h("img", { src: index.getAssetPath("/assets/img/G3-Girls.jpg"), alt: "Girls Inc" })), index.h("form", { novalidate: "true", onSubmit: (e) => this.onLogin(e) }, index.h("ion-list", { "no-lines": true }, index.h("ion-item", null, index.h("ion-label", { position: "stacked", color: "primary" }, "Username"), index.h("ion-input", { name: "username", type: "text", value: this.username.value, onInput: (ev) => this.handleUsername(ev), spellcheck: false, autocapitalize: "off", required: true })), index.h("ion-text", { color: "danger" }, index.h("p", { hidden: this.username.valid || this.submitted === false, class: "ion-padding-left" }, "Username is required")), index.h("ion-item", null, index.h("ion-label", { position: "stacked", color: "primary" }, "Password"), index.h("ion-input", { name: "password", type: "password", value: this.password.value, onInput: (ev) => this.handlePassword(ev), required: true })), index.h("ion-text", { color: "danger" }, index.h("p", { hidden: this.password.valid || this.submitted === false, class: "ion-padding-left" }, "Password is required")), index.h("ion-item", { lines: "none" }, index.h("ion-label", null, "Remember Me"), index.h("ion-checkbox", { slot: "start", checked: this.rememberMe.value, onIonChange: (e) => this.handleRememberMe(e) })), index.h("ion-item", { lines: "none" }, index.h("stencil-route-link", { slot: "end", url: "/forgot-password", exact: true }, "Forgot Password?"))), index.h("ion-row", null, index.h("ion-col", null, index.h("ion-button", { type: "submit", expand: "block", disabled: auth_store.AuthStore.state.loading }, auth_store.AuthStore.state.loading && index.h("ion-spinner", { name: "dots" }), " Log In"))), index.h("ion-item", { lines: "none" }, index.h("span", null, " Not registered yet? ", index.h("stencil-route-link", { url: "/signup", exact: true }, "Sign Up")))))
668
- ];
669
- }
670
- render() {
671
- if (!this.notsignin) {
672
- return index.h("stencil-router-redirect", { url: "home" });
673
- }
674
- return this.renderLogin();
675
- }
676
- };
677
- PageLogin.style = sparkleLoginCss;
678
-
679
- const menuCss = "sparkle-menu{background-color:var(--background);border-right:solid 1px var(--line-rule-color);display:flex;flex-direction:column;height:100vh;left:0;position:fixed;top:0;transition:transform 200ms cubic-bezier(0.2, 1, 0.2, 1);transform:var(--menu-transform, none);width:var(--menu-width);z-index:1}sparkle-menu>header{align-items:center;border-bottom:solid 1px var(--line-rule-color);display:flex;flex:none;height:var(--header-height);padding:0 1.4rem 0 0.8rem;user-select:none}sparkle-menu sparkle-menu-toggle{margin-right:0.75em}sparkle-menu .MenuLogo{color:var(--text-color--dark);font-family:var(--heading-font-family);height:25px}sparkle-menu>.Menu{overflow-y:auto;-webkit-overflow-scrolling:touch}sparkle-menu nav{padding:2rem 1.5rem}.MenuControls{border-bottom:solid 1px var(--line-rule-color);box-shadow:0 5px 10px -10px rgba(0, 0, 0, 0.1);font-size:13px;padding:1em}.CourseSelect,.CourseSelect .Dropdown,.CourseSelect .Dropdown-button{width:100%}.CourseSelect-course{align-items:center;display:flex}.CourseSelect-icon{height:14px;width:14px;margin-right:0.5em}.CourseSelect .Select-option{padding-left:0.75em}";
680
-
681
- const SparkleMenu = class {
682
- constructor(hostRef) {
683
- index.registerInstance(this, hostRef);
684
- this.config = {
685
- showRomanNumber: false,
686
- showModuleIndex: true,
687
- showSessionIndex: true
688
- };
689
- }
690
- render() {
691
- return [
692
- index.h("header", null, index.h("sparkle-menu-toggle", { onClick: this.toggleClickFn }), index.h("stencil-route-link", { url: "/docs/" }, index.h("div", { class: "MenuLogo" }, this.toc.name))),
693
- // <section class="MenuControls">
694
- // <course-select />
695
- // </section>,
696
- index.h("stencil-route-switch", { scrollTopOffset: 0, class: "Menu" }, index.h("sparkle-nav", { toc: this.toc, config: this.config })),
697
- ];
698
- }
699
- };
700
- SparkleMenu.style = menuCss;
701
-
702
- const sparkleMoodCss = ":host{display:block}.show{display:block}.hide{display:none}";
703
-
704
- const SparkleMood = class {
705
- constructor(hostRef) {
706
- index.registerInstance(this, hostRef);
707
- this.feelingItems = ["Anger", "Fear", "Disgust", "Happiness", "Sadness", "Suprise", "Neutral", "Anxiety", "Love", "Depression", "Contempt", "Pride", "Shame", "Envy"];
708
- this.intensityItems = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'];
709
- this.locationItems = ["anger.jpg", "fear.jpg", "disgust.jpg", "happiness.jpg", "sadness.jpg", "neutral.jpg", "anxiety.jpg", "love.jpg", "depression.jpg", "contempt.jpg", "pride.jpg", "shame.jpg", "envy.jpg"];
710
- this.feeling = this.feelingItems[0];
711
- this.intensity = this.intensityItems[0];
712
- this.location = this.locationItems[0];
713
- this.public = true;
714
- this.submitted = false;
715
- this.currentStep = "FEELING";
716
- }
717
- back() {
718
- if (this.currentStep == "LOCATION") {
719
- this.currentStep = "INTENSITY";
720
- }
721
- else if (this.currentStep == "INTENSITY") {
722
- this.currentStep = "FEELING";
723
- }
724
- }
725
- async next() {
726
- if (this.currentStep == "FEELING") {
727
- this.currentStep = "INTENSITY";
728
- }
729
- else if (this.currentStep == "INTENSITY") {
730
- this.currentStep = "LOCATION";
731
- }
732
- else if (this.currentStep == "LOCATION") {
733
- const sparkleConfig = environmentConfig_service.EnvironmentConfigService.getInstance().get('sparkle');
734
- const tocData = await assets_service.AssetsService.getInstance().loadJsonFile(sparkleConfig.tocPath);
735
- var model = {
736
- CourseId: tocData.id,
737
- PostText: util.MyMoodTemplate(this.feeling, this.intensity, index.getAssetPath(`../assets/img/mood/` + this.location)),
738
- PostTextJSON: util.MyMoodTemplateJSON(this.feeling, this.intensity, index.getAssetPath(`../assets/img/mood/` + this.location)),
739
- ExternalResourceUrl: "",
740
- IsPublic: this.public,
741
- MiniAppId: util.SparkleGlobal.MY_MOOD_APP_ID,
742
- };
743
- const result = await feed_service.FeedService.getInstance().createPost(model);
744
- if (result.Succeeded) {
745
- this.history.replace('/home');
746
- }
747
- }
748
- }
749
- render() {
750
- const buttonLabel = this.currentStep == "LOCATION" ? "SUBMIT" : "NEXT";
751
- return (index.h(index.Host, null, index.h("div", { class: `${this.currentStep == "FEELING" ? '' : 'hide'}` }, index.h("ion-list", null, index.h("ion-radio-group", { name: "feeling", value: this.feeling, onIonChange: (ev) => this.feeling = ev.detail.value }, index.h("ion-list-header", null, index.h("ion-label", null, "FEELING")), this.feelingItems.map((item) => index.h("ion-item", null, index.h("ion-label", null, item), index.h("ion-radio", { slot: "start", value: item })))))), index.h("div", { class: `${this.currentStep == "INTENSITY" ? '' : 'hide'}` }, index.h("ion-list", null, index.h("ion-radio-group", { name: "intesity", value: this.intensity, onIonChange: (ev) => this.intensity = ev.detail.value }, index.h("ion-list-header", null, index.h("ion-label", null, "INTENSITY")), this.intensityItems.map((item) => index.h("ion-item", null, index.h("ion-label", null, item), index.h("ion-radio", { slot: "start", value: item })))))), index.h("div", { class: `${this.currentStep == "LOCATION" ? '' : 'hide'}` }, index.h("ion-list", null, index.h("ion-radio-group", { name: "location", value: this.location, onIonChange: (ev) => this.location = ev.detail.value }, index.h("ion-list-header", null, index.h("ion-label", null, index.h("h3", null, "LOCATION"))), this.locationItems.map((item) => index.h("ion-item", null, index.h("ion-label", null, index.h("img", { src: index.getAssetPath(`../assets/img/mood/` + item) })), index.h("ion-radio", { slot: "start", value: item })))), index.h("ion-item", { lines: "none" }, index.h("ion-label", null, "Share to Community Wall"), index.h("ion-checkbox", { slot: "start", onChange: (ev) => this.public = ev.detail.checked, checked: true })))), index.h("ion-item", { lines: "none" }, this.currentStep != "FEELING" && index.h("ion-button", { size: "default", slot: "start", onClick: () => this.back() }, "BACK"), index.h("ion-button", { slot: "end", color: "primary", size: "default", onClick: () => this.next(), disabled: feed_service.feedStore.state.createPostLoading }, feed_service.feedStore.state.createPostLoading && index.h("ion-spinner", { name: "dots" }), buttonLabel))));
752
- }
753
- };
754
- SparkleMood.style = sparkleMoodCss;
755
-
756
- const pageCss = ".Error{align-items:center;background-color:var(--offset-background);color:var(--text-color--light);display:flex;flex-direction:column;justify-content:center;line-height:1;white-space:nowrap}.Error.full-screen{padding-bottom:3rem}.Error>*{margin:10px}.Error h1,.Error div{color:inherit;font-size:3rem}.Error div{text-shadow:3px 3px 3px rgba(0,0,0,0.1)}.Error p{font-size:18px}sparkle-page{display:grid;font-size:16px;grid-template-columns:1fr minmax(0, var(--page-width, 720px)) 1fr;line-height:2;margin-left:var(--page-margin-left);margin-top:var(--header-height);overflow-x:hidden;transform:var(--page-transform, none);transition:transform 200ms cubic-bezier(0.2, 1, 0.2, 1)}@media (min-width: 1234px){sparkle-page{grid-template-columns:1fr minmax(0, var(--page-width, 720px)) 3fr}}@media (min-width: 1800px){sparkle-page{grid-template-columns:1fr minmax(0, var(--page-width, 720px)) 1fr 240px}}sparkle-page>main{position:relative;grid-column:2;margin-bottom:3rem;padding:var(--page-padding, 2rem 1rem);position:relative}sparkle-page sparkle-pagination{grid-column:1 / -1}sparkle-page .full-screen{grid-column:1 / -1;height:calc(100vh - var(--header-height));margin-bottom:0;overflow:hidden;padding:0}sparkle-page .page-heading-encapsulation{text-transform:uppercase;background:transparent;color:#2d4665;border:1px solid #dee3ea;border-radius:14px;height:24px;padding:2px 8px;font-weight:600;font-size:10px;line-height:14px;display:inline-flex;align-items:center;align-self:center;justify-self:flex-end;letter-spacing:0.08em;float:right}sparkle-page .page-heading-encapsulation:hover{border-color:#92a1b3}sparkle-page h1{display:flex;justify-content:space-between;margin-top:2rem;margin-bottom:1rem}sparkle-page h2 a[href^='#'],sparkle-page h3 a[href^='#'],sparkle-page h4 a[href^='#'],sparkle-page h5 a[href^='#'],sparkle-page h6 a[href^='#']{color:inherit;position:relative}sparkle-page h2 a[href^='#']:before,sparkle-page h3 a[href^='#']:before,sparkle-page h4 a[href^='#']:before,sparkle-page h5 a[href^='#']:before,sparkle-page h6 a[href^='#']:before{content:'#';opacity:0;padding-right:5px;position:absolute;right:100%;transition:opacity 100ms ease}sparkle-page h2 a[href^='#']:hover:before,sparkle-page h3 a[href^='#']:hover:before,sparkle-page h4 a[href^='#']:hover:before,sparkle-page h5 a[href^='#']:hover:before,sparkle-page h6 a[href^='#']:hover:before{opacity:1}sparkle-page h2 code,sparkle-page h3 code,sparkle-page h4 code,sparkle-page h5 code,sparkle-page h6 code{background:none;font-size:inherit}sparkle-page aside{float:right;margin-left:20px;margin-bottom:20px}@media (min-width: 1234px){sparkle-page main.no-demo .page-meta{position:fixed;right:0;top:100px;width:240px;transition:0.2s transform ease}sparkle-header.hidden~stencil-route sparkle-page main.no-demo .page-meta{transform:translateY(-60px)}}sparkle-page main.has-demo .page-meta internal-ad{display:none}sparkle-page .controls{display:flex;justify-content:flex-end}";
757
-
758
- const SparklePage = class {
759
- constructor(hostRef) {
760
- index.registerInstance(this, hostRef);
761
- this.pageDidLoad = index.createEvent(this, "pageDidLoad", 7);
762
- this.presentation = false;
763
- this.page = { title: null, path: null, body: null, pageInfo: null };
764
- this.isLesson = false;
765
- this.handleFacilitatorNavigationChange = (url) => {
766
- this.history.replace(url, {});
767
- };
768
- this.validateFetch = (response) => {
769
- if (!response.ok) {
770
- throw response;
771
- }
772
- return response.json();
773
- };
774
- this.handleNewPage = (page) => {
775
- this.badFetch = null;
776
- this.page = page;
777
- if (this.presentation) {
778
- this.page = Object.assign(Object.assign({}, this.page), { previousUrl: "/presentation" + this.page.previousUrl, nextUrl: "/presentation" + this.page.nextUrl });
779
- }
780
- StoreService.getInstance().UpdateTocPageInfo(this.page.pageInfo);
781
- this.isLesson = this.page.pageInfo.pageId > 0;
782
- this.pageDidLoad.emit({ pageInfo: this.page.pageInfo });
783
- };
784
- this.handleBadFetch = (error) => {
785
- this.badFetch = error;
786
- this.page = {
787
- title: error.statusText,
788
- body: null,
789
- path: null,
790
- pageInfo: null
791
- };
792
- };
793
- }
794
- componentWillLoad() {
795
- if (this.path) {
796
- return this.fetchPage(this.path);
797
- }
798
- }
799
- componentDidLoad() {
800
- if (this.presentation) {
801
- index$2.signalRStore.onChange("connected", (connected) => {
802
- if (connected) {
803
- index$2.SignalRService.getInstance().connection.on("NavigateFacilitatorPresentationCourseTo", this.handleFacilitatorNavigationChange);
804
- }
805
- });
806
- }
807
- }
808
- fetchPage(path, oldPath) {
809
- if (index$2.SignalRService.getInstance().connection.connectionState == "Connected") {
810
- index$2.SignalRService.getInstance().callSignalR("OnStudentNavigate", { url: window.location.href });
811
- if (this.presentation) {
812
- console.log('register listener');
813
- index$2.SignalRService.getInstance().connection.on("NavigateFacilitatorPresentationCourseTo", this.handleFacilitatorNavigationChange);
814
- }
815
- }
816
- if (path === null || path === oldPath) {
817
- return;
818
- }
819
- path = /^\/docs\/pages\/[a-z]{2}\.json$/.test(path) ? path.replace('.json', '/index.json') : path;
820
- return fetch(path).then(this.validateFetch).then(this.handleNewPage).catch(this.handleBadFetch);
821
- }
822
- disconnectedCallback() {
823
- StoreService.getInstance().UpdateTocPageInfo(null);
824
- }
825
- // @Watch('page')
826
- // setScrollPosition() {
827
- // const hash = this.history.location.hash;
828
- // if (this.isServer || (hash !== undefined && hash !== '')) {
829
- // return;
830
- // }
831
- // requestAnimationFrame(() => {
832
- // const { location } = this.history;
833
- // const { scrollPosition = [0, 0] } = location;
834
- // const [x, y] = scrollPosition;
835
- // document.documentElement.scrollTo(x, y);
836
- // });
837
- // }
838
- setDocumentMeta(page) {
839
- const { title, meta = {} } = page;
840
- const metaEls = {
841
- title: document.head.querySelectorAll('.meta-title'),
842
- description: document.head.querySelectorAll('.meta-description'),
843
- url: document.head.querySelectorAll('.meta-url, link[rel="canonical"]'),
844
- image: document.head.querySelectorAll('.meta-image'),
845
- };
846
- const updateMeta = (els, update) => {
847
- els.forEach((el) => {
848
- ['href', 'content'].forEach(attr => {
849
- if (el.hasAttribute(attr)) {
850
- el.setAttribute(attr, update(el.getAttribute(attr)));
851
- }
852
- });
853
- });
854
- };
855
- // Title
856
- const getTitle = () => {
857
- const suffix = /^\/docs\/pages\/appflow.*$/.test(this.path) ? 'Sparkle' : 'Sparkle';
858
- // Favor meta title, else go with auto-title. fallback to generic title
859
- return meta.title || title ? `${title} - ${suffix}` : suffix;
860
- };
861
- document.title = getTitle();
862
- updateMeta(metaEls.title, getTitle);
863
- // Canonical URL
864
- updateMeta(metaEls.url, (oldVal) => {
865
- const uri = '/docs/';
866
- const path = location.pathname.split(uri)[1];
867
- return oldVal.split(uri)[0] + uri + path;
868
- });
869
- // Description
870
- updateMeta(metaEls.description, () => meta.description || 'Sparkle is the free open-source platform for creating learning content on web, mobile and desktop.');
871
- // Sharing Image
872
- updateMeta(metaEls.image, () => meta.image || 'https://girlsinclearning.com//images/logo-primary.png');
873
- }
874
- hostData() {
875
- return {
876
- class: {
877
- [this.page.pageClass]: typeof this.page.pageClass === 'string',
878
- },
879
- };
880
- }
881
- async presentFeedbackModal() {
882
- const modal = await overlays.modalController.create({
883
- component: 'sparkle-feedback',
884
- cssClass: 'sparkle-modal sparkle-feedback-modal'
885
- });
886
- await modal.present();
887
- }
888
- async openProjectorPage() {
889
- if (user_store.userStore.state.user.FacilitatorClassList.length > 1) {
890
- await this.presentAlertClasses();
891
- }
892
- else {
893
- this.openWindows();
894
- }
895
- }
896
- async presentAlertClasses() {
897
- var inputs = [];
898
- // var defaultCourseClassId = this.jwtService.getDefaultCourseClassId();
899
- var classes = user_store.userStore.state.user.FacilitatorClassList;
900
- classes.forEach((item, index) => inputs.push({
901
- name: 'radio' + index,
902
- type: 'radio',
903
- label: item.CourseName,
904
- value: item.CourseClassId,
905
- //checked: defaultCourseClassId > 0 ? item.CourseClassId == defaultCourseClassId : index == 0
906
- }));
907
- const alert = await overlays.alertController.create({
908
- header: 'Classes',
909
- inputs: inputs,
910
- buttons: [
911
- {
912
- text: 'Cancel',
913
- role: 'cancel',
914
- cssClass: 'secondary',
915
- handler: () => {
916
- }
917
- }, {
918
- text: 'Ok',
919
- handler: (data) => {
920
- }
921
- }
922
- ]
923
- });
924
- await alert.present();
925
- }
926
- openWindows() {
927
- //this.jwtService.updateDefaultCourseClassId(data);
928
- window.open(window.location.origin + "/presentation" + this.path.replace(".json", ""), "_blank");
929
- setTimeout(() => {
930
- window.open(window.location.origin + "/presentation" + '/teacher' + this.path.replace(".json", ""), "_blank");
931
- }, 500);
932
- }
933
- renderControls() {
934
- if (auth_store.AuthStore.state.isAuthenticated) {
935
- return (index.h("div", { class: "controls" }, index.h("ion-button", { onClick: () => this.presentFeedbackModal() }, index.h("ion-icon", { name: "chatbox-outline" })), this.isLesson && user_store.userStore.state.user && user_store.userStore.state.user.Roles.indexOf('Facilitator') > -1 && index.h("ion-button", { onClick: () => this.openProjectorPage() }, index.h("ion-icon", { name: "desktop-outline" }))));
936
- }
937
- return "";
938
- }
939
- __stencil_render() {
940
- if (this.path) {
941
- const { page } = this;
942
- if (this.badFetch) {
943
- return index$2.templates.error(this.badFetch);
944
- }
945
- const Template = index$2.templates[page.template] || index$2.templates.default;
946
- const content = [
947
- index.h("main", { class: 'no-demo' }, this.renderControls(), index.h(Template, { page: page }))
948
- ];
949
- return content;
950
- }
951
- else {
952
- return index.h("main", { class: 'no-demo' }, index.h("slot", null));
953
- }
954
- }
955
- static get watchers() { return {
956
- "path": ["fetchPage"],
957
- "page": ["setDocumentMeta"]
958
- }; }
959
- render() { return index.h(index.Host, this.hostData(), this.__stencil_render()); }
960
- };
961
- SparklePage.style = pageCss;
962
-
963
- const sparkleResetPasswordCss = ":host{display:block}";
964
-
965
- const SparkleResetPassword = class {
966
- constructor(hostRef) {
967
- index.registerInstance(this, hostRef);
968
- this.formControls = {
969
- password: {
970
- isValid: false,
971
- value: '',
972
- validate: value => {
973
- if (value) {
974
- return true;
975
- }
976
- else {
977
- return false;
978
- }
979
- },
980
- },
981
- confirmPassword: {
982
- isValid: false,
983
- value: '',
984
- validate: value => {
985
- if (value) {
986
- return true;
987
- }
988
- else {
989
- return false;
990
- }
991
- },
992
- },
993
- };
994
- this.submitted = false;
995
- }
996
- componentDidLoad() {
997
- console.log(this.history.location.query.code);
998
- console.log(this.history.location.query.email);
999
- }
1000
- changeFormValue(controlName, value) {
1001
- this.formControls = Object.assign(Object.assign({}, this.formControls), { [controlName]: Object.assign(Object.assign({}, this.formControls[controlName]), { value: value, isValid: this.formControls[controlName].validate(value) }) });
1002
- }
1003
- async handleSubmit(e) {
1004
- e.preventDefault();
1005
- this.submitted = true;
1006
- let isFormValid = true;
1007
- //Run all validation functions
1008
- for (let controlName in this.formControls) {
1009
- let control = this.formControls[controlName];
1010
- control.validate(control.value);
1011
- if (!control.isValid) {
1012
- isFormValid = false;
1013
- }
1014
- }
1015
- if (isFormValid) {
1016
- let result = await AccountService.getInstance().resetPassword({
1017
- Email: this.history.location.query.email,
1018
- Token: this.history.location.query.code,
1019
- Password: this.formControls.password.value,
1020
- ConfirmPassword: this.formControls.confirmPassword.value,
1021
- });
1022
- if (result.Succeeded) {
1023
- this.history.replace('/login', {});
1024
- }
1025
- else if (result.Failed) {
1026
- if (result.Errors.length > 0) {
1027
- this.validationErrors = result.Errors;
1028
- }
1029
- }
1030
- }
1031
- }
1032
- render() {
1033
- return (index.h(index.Host, null, index.h("div", { class: "login-logo" }, index.h("img", { src: index.getAssetPath("/assets/img/G3-Girls.jpg"), alt: "Girls Inc" })), index.h("sparkle-validation-error", { errors: this.validationErrors }), index.h("form", { novalidate: "true", onSubmit: (e) => this.handleSubmit(e) }, index.h("ion-item", null, index.h("ion-label", { position: "stacked", color: "primary" }, "Password"), index.h("ion-input", { name: "password", type: "password", value: this.formControls.password.value, onInput: (ev) => this.changeFormValue("password", ev.target.value) })), index.h("ion-text", { color: "danger" }, index.h("p", { hidden: this.formControls.password.isValid || this.submitted === false, class: "ion-padding-start" }, "Password is required")), index.h("ion-item", null, index.h("ion-label", { position: "stacked", color: "primary" }, "Confirm Password"), index.h("ion-input", { name: "confirmPassword", type: "password", value: this.formControls.confirmPassword.value, onInput: (ev) => this.changeFormValue("confirmPassword", ev.target.value) })), index.h("ion-text", { color: "danger" }, index.h("p", { hidden: this.formControls.confirmPassword.isValid || this.submitted === false, class: "ion-padding-start" }, "Confirm Password is required")), index.h("br", null), index.h("div", { class: "ion-padding" }, index.h("ion-button", { type: "submit", expand: "block", disabled: auth_store.AuthStore.state.loading }, auth_store.AuthStore.state.loading && index.h("ion-spinner", { name: "dots" }), " Reset Password")))));
1034
- }
1035
- };
1036
- SparkleResetPassword.style = sparkleResetPasswordCss;
1037
-
1038
- const sparkleRootCss = ":root{--page-padding:2rem 0}sparkle-root{overflow-y:auto}.Layout{display:flex;overflow-x:hidden}.Layout>stencil-route,.Layout>stencil-route-switch{width:100%}.Layout.is-menu-toggled{--menu-transform:translateX(calc(-1 * var(--menu-width)));--page-margin-left:0}@media (max-width: 768px){.Layout{--menu-transform:translateX(calc(-1 * var(--menu-width)));--page-padding:1.5rem;--page-margin-left:0}.Layout.is-menu-toggled{--menu-transform:none;--page-transform:translateX(var(--menu-width))}.Layout.is-menu-toggled sparkle-page>*{opacity:0.2;pointer-events:none}body.scroll-lock{overflow-y:hidden}}#messagesList{display:grid;font-size:12px;font-weight:bold;grid-template-columns:1fr minmax(0, var(--page-width, 720px)) 1fr;line-height:2;margin-left:var(--page-margin-left);margin-top:var(--header-height);overflow-x:hidden;transform:var(--page-transform, none);margin-top:56px;padding:4px;background:#e50739;color:#fff}";
1039
-
1040
- const SparkleRoot = class {
1041
- constructor(hostRef) {
1042
- index.registerInstance(this, hostRef);
1043
- this.history = null;
1044
- this.handleStudentNavigationChange = (url) => {
1045
- this.history.replace(url, {});
1046
- };
1047
- }
1048
- async componentWillLoad() {
1049
- auth_service.setupConfig({
1050
- sparkle: Object.assign(Object.assign({}, this.config), { prod: true })
1051
- });
1052
- //return Promise.reject();
1053
- await auth_store.HttpService.getInstance();
1054
- await auth_store.HttpService.init();
1055
- var sparkleConfig = environmentConfig_service.EnvironmentConfigService.getInstance().get('sparkle');
1056
- if (sparkleConfig && sparkleConfig.auth && sparkleConfig.auth.getToken()) {
1057
- auth_store.AuthStore.state.isAuthenticated = true;
1058
- }
1059
- auth_store.AuthStore.onChange("isAuthenticated", async (isAuthenticated) => {
1060
- if (isAuthenticated) {
1061
- console.log('authenticated');
1062
- await student_service.StudentService.getInstance().fetchUserConfiguration();
1063
- }
1064
- });
1065
- if (auth_store.AuthStore.state.isAuthenticated) {
1066
- return await student_service.StudentService.getInstance().fetchUserConfiguration();
1067
- }
1068
- //SignalRAspNetCoreHelper.initSignalR();
1069
- }
1070
- componentDidLoad() {
1071
- index$2.SignalRService.getInstance().connection.on("NavigateStudentTo", this.handleStudentNavigationChange);
1072
- auth_store.AuthStore.onChange("isAuthenticated", async (isAuthenticated) => {
1073
- if (isAuthenticated) {
1074
- index$2.SignalRService.getInstance().start();
1075
- }
1076
- });
1077
- if (auth_store.AuthStore.state.isAuthenticated) {
1078
- index$2.SignalRService.getInstance().start();
1079
- }
1080
- }
1081
- render() {
1082
- return (index.h(index.Host, null, index.h("slot", null)));
1083
- }
1084
- };
1085
- injectHistory.injectHistory(SparkleRoot);
1086
- SparkleRoot.style = sparkleRootCss;
1087
-
1088
- const sparkleSignupCss = "sparkle-signup .list{margin-bottom:0}";
1089
-
1090
- const SparkleSignup = class {
1091
- constructor(hostRef) {
1092
- index.registerInstance(this, hostRef);
1093
- this.formControls = {
1094
- firstName: {
1095
- isValid: false,
1096
- value: '',
1097
- validate: value => {
1098
- if (value) {
1099
- return true;
1100
- }
1101
- else {
1102
- return false;
1103
- }
1104
- },
1105
- },
1106
- lastName: {
1107
- isValid: false,
1108
- value: '',
1109
- validate: value => {
1110
- if (value) {
1111
- return true;
1112
- }
1113
- else {
1114
- return false;
1115
- }
1116
- },
1117
- },
1118
- userName: {
1119
- isValid: false,
1120
- value: '',
1121
- validate: value => {
1122
- if (value) {
1123
- return true;
1124
- }
1125
- else {
1126
- return false;
1127
- }
1128
- },
1129
- },
1130
- email: {
1131
- isValid: false,
1132
- value: '',
1133
- validate: value => {
1134
- if (value) {
1135
- return true;
1136
- }
1137
- else {
1138
- return false;
1139
- }
1140
- },
1141
- },
1142
- password: {
1143
- isValid: false,
1144
- value: '',
1145
- validate: value => {
1146
- if (value) {
1147
- return true;
1148
- }
1149
- else {
1150
- return false;
1151
- }
1152
- },
1153
- },
1154
- confirmPassword: {
1155
- isValid: false,
1156
- value: '',
1157
- validate: value => {
1158
- if (value) {
1159
- return true;
1160
- }
1161
- else {
1162
- return false;
1163
- }
1164
- },
1165
- },
1166
- };
1167
- this.submitted = false;
1168
- }
1169
- changeFormValue(controlName, value) {
1170
- this.formControls = Object.assign(Object.assign({}, this.formControls), { [controlName]: Object.assign(Object.assign({}, this.formControls[controlName]), { value: value, isValid: this.formControls[controlName].validate(value) }) });
1171
- }
1172
- async handleSubmit(e) {
1173
- e.preventDefault();
1174
- this.submitted = true;
1175
- let isFormValid = true;
1176
- //Run all validation functions
1177
- for (let controlName in this.formControls) {
1178
- let control = this.formControls[controlName];
1179
- control.validate(control.value);
1180
- if (!control.isValid) {
1181
- isFormValid = false;
1182
- }
1183
- }
1184
- if (isFormValid) {
1185
- let result = await AccountService.getInstance().register({
1186
- Email: this.formControls.email.value,
1187
- UserName: this.formControls.userName.value,
1188
- FirstName: this.formControls.firstName.value,
1189
- LastName: this.formControls.lastName.value,
1190
- Password: this.formControls.password.value,
1191
- ConfirmPassword: this.formControls.confirmPassword.value,
1192
- });
1193
- if (result.Succeeded) {
1194
- this.history.replace('/login', {});
1195
- }
1196
- else if (result.Failed) {
1197
- if (result.Errors.length > 0) {
1198
- this.validationErrors = result.Errors;
1199
- }
1200
- }
1201
- }
1202
- }
1203
- render() {
1204
- return [
1205
- index.h("div", null, index.h("div", { class: "signup-logo" }, index.h("img", { src: index.getAssetPath("/assets/img/G3-Girls.jpg"), alt: "Girls Inc" })), index.h("sparkle-validation-error", { errors: this.validationErrors }), index.h("form", { onSubmit: e => this.handleSubmit(e), novalidate: true }, index.h("ion-list", { "no-lines": true }, index.h("ion-item", null, index.h("ion-label", { position: "stacked", color: "primary" }, "First Name"), index.h("ion-input", { name: "firstName", type: "text", value: this.formControls.firstName.value, onInput: (ev) => this.changeFormValue("firstName", ev.target.value) })), index.h("ion-text", { color: "danger" }, index.h("p", { hidden: this.formControls.firstName.isValid || this.submitted === false, class: "ion-padding-start" }, "First Name is required")), index.h("ion-item", null, index.h("ion-label", { position: "stacked", color: "primary" }, "Last Name"), index.h("ion-input", { name: "lastName", type: "text", value: this.formControls.lastName.value, onInput: (ev) => this.changeFormValue("lastName", ev.target.value) })), index.h("ion-text", { color: "danger" }, index.h("p", { hidden: this.formControls.lastName.isValid || this.submitted === false, class: "ion-padding-start" }, "Last Name is required")), index.h("ion-item", null, index.h("ion-label", { position: "stacked", color: "primary" }, "Username"), index.h("ion-input", { name: "userName", type: "text", value: this.formControls.userName.value, onInput: (ev) => this.changeFormValue("userName", ev.target.value) })), index.h("ion-text", { color: "danger" }, index.h("p", { hidden: this.formControls.userName.isValid || this.submitted === false, class: "ion-padding-start" }, "Username is required")), index.h("ion-item", null, index.h("ion-label", { position: "stacked", color: "primary" }, "Email"), index.h("ion-input", { name: "email", type: "text", value: this.formControls.email.value, onInput: (ev) => this.changeFormValue("email", ev.target.value) })), index.h("ion-text", { color: "danger" }, index.h("p", { hidden: this.formControls.email.isValid || this.submitted === false, class: "ion-padding-start" }, "Email is required")), index.h("ion-item", null, index.h("ion-label", { position: "stacked", color: "primary" }, "Password"), index.h("ion-input", { name: "password", type: "password", value: this.formControls.password.value, onInput: (ev) => this.changeFormValue("password", ev.target.value) })), index.h("ion-text", { color: "danger" }, index.h("p", { hidden: this.formControls.password.isValid || this.submitted === false, class: "ion-padding-start" }, "Password is required")), index.h("ion-item", null, index.h("ion-label", { position: "stacked", color: "primary" }, "Confirm Password"), index.h("ion-input", { name: "confirmPassword", type: "password", value: this.formControls.confirmPassword.value, onInput: (ev) => this.changeFormValue("confirmPassword", ev.target.value) })), index.h("ion-text", { color: "danger" }, index.h("p", { hidden: this.formControls.confirmPassword.isValid || this.submitted === false, class: "ion-padding-start" }, "Confirm Password is required"))), index.h("div", { class: "ion-padding" }, index.h("ion-button", { type: "submit", expand: "block", disabled: auth_store.AuthStore.state.loading }, auth_store.AuthStore.state.loading && index.h("ion-spinner", { name: "dots" }), "Register")), index.h("ion-item", { lines: "none" }, "Already have an account? \u00A0", index.h("stencil-route-link", { url: "/login", exact: true }, "Log In"))))
1206
- ];
1207
- }
1208
- };
1209
- SparkleSignup.style = sparkleSignupCss;
1210
-
1211
- const sparkleUnauthorizedCss = ":host{display:block}.unauthorized{display:block;padding-left:var(--page-margin-left);padding-top:var(--header-height)}.content{text-align:center;padding-top:40px}";
1212
-
1213
- const SparkleUnauthorized = class {
1214
- constructor(hostRef) {
1215
- index.registerInstance(this, hostRef);
1216
- }
1217
- render() {
1218
- return (index.h(index.Host, { class: {
1219
- 'unauthorized': true,
1220
- } }, index.h("div", { class: "content" }, index.h("h1", null, "401"), index.h("p", null, "Unauthorized"))));
1221
- }
1222
- };
1223
- SparkleUnauthorized.style = sparkleUnauthorizedCss;
1224
-
1225
- const sparkleUserEnrollmentCss = ":host{display:block}";
1226
-
1227
- const SparkleUserEnrollment = class {
1228
- constructor(hostRef) {
1229
- index.registerInstance(this, hostRef);
1230
- this.enrollmentFormControls = {
1231
- ShortCode: {
1232
- isValid: false,
1233
- value: '',
1234
- validate: (value) => {
1235
- if (value) {
1236
- return true;
1237
- }
1238
- else {
1239
- return false;
1240
- }
1241
- },
1242
- },
1243
- };
1244
- this.enrollmentFormSubmitted = false;
1245
- }
1246
- changeEnrollmentFormValue(controlName, value) {
1247
- this.enrollmentFormControls = Object.assign(Object.assign({}, this.enrollmentFormControls), { [controlName]: Object.assign(Object.assign({}, this.enrollmentFormControls[controlName]), { value: value, isValid: this.enrollmentFormControls[controlName].validate(value) }) });
1248
- }
1249
- async handleEnrollmentFormSubmit(e) {
1250
- e.preventDefault();
1251
- this.enrollmentFormSubmitted = true;
1252
- let isFormValid = true;
1253
- //Run all validation functions
1254
- for (let controlName in this.enrollmentFormControls) {
1255
- let control = this.enrollmentFormControls[controlName];
1256
- control.validate(control.value);
1257
- if (!control.isValid) {
1258
- isFormValid = false;
1259
- }
1260
- }
1261
- if (isFormValid) {
1262
- let result = await student_service.StudentService.getInstance().enrollClass({
1263
- ShortCode: this.enrollmentFormControls.ShortCode.value,
1264
- });
1265
- console.log(result);
1266
- }
1267
- }
1268
- async leaveClass(enrollmentId) {
1269
- let result = await student_service.StudentService.getInstance().leaveClass({
1270
- Id: enrollmentId,
1271
- });
1272
- console.log(result);
1273
- }
1274
- renderEnrollmentList() {
1275
- if (user_store.userStore.state.enrollmentList.length > 0) {
1276
- return (user_store.userStore.state.enrollmentList.map((item) => index.h("ion-item", null, index.h("ion-label", null, item.Name), index.h("ion-button", { onClick: () => this.leaveClass(item.Id) }, index.h("ion-icon", { name: "trash" })))));
1277
- }
1278
- else {
1279
- return (index.h("ion-item", { lines: "none" }, index.h("ion-text", { class: "ion-text-center" }, "No data found")));
1280
- }
1281
- }
1282
- render() {
1283
- return (index.h(index.Host, null, index.h("form", { onSubmit: e => this.handleEnrollmentFormSubmit(e), novalidate: true }, index.h("ion-list", { "no-lines": true }, index.h("ion-list-header", null, "Enrollment"), index.h("ion-grid", null, index.h("ion-row", { class: "ion-align-items-center" }, index.h("ion-col", { size: "9" }, index.h("ion-item", null, index.h("ion-label", { position: "stacked", color: "primary" }, "Short Code"), index.h("ion-input", { name: "ShortCode", type: "text", value: this.enrollmentFormControls.ShortCode.value, onInput: (ev) => this.changeEnrollmentFormValue("ShortCode", ev.target.value) })), index.h("ion-text", { color: "danger" }, index.h("p", { hidden: this.enrollmentFormControls.ShortCode.isValid || this.enrollmentFormSubmitted === false, class: "ion-padding-start" }, "Short Code is required"))), index.h("ion-col", { size: "3" }, index.h("div", null, index.h("ion-button", { slot: "end", type: "submit", expand: "block" }, "Enroll"))))))), index.h("ion-list", null, index.h("ion-list-header", null, "Enroll List"), this.renderEnrollmentList())));
1284
- }
1285
- };
1286
- SparkleUserEnrollment.style = sparkleUserEnrollmentCss;
1287
-
1288
- const sparkleUserProfileCss = ":host{display:block}ion-card{box-shadow:0px 2px 2px rgba(0, 0, 0, 0.2);overflow:visible;margin:16px 0 24px;position:relative;padding-top:60px}ion-card .img-wrapper{background-color:#f5f5f5;border-radius:10px;position:absolute;left:50%;top:-30px;transform:translateX(-50%)}ion-card .img-wrapper img{border-radius:10px;width:80px;height:80px}ion-card .img-wrapper ion-button{--border-width:1px;--border-color:var(--ion-color-sparkle);--border-style:solid;--padding-start:0;--padding-end:0;--padding-bottom:0;--padding-top:0;--border-radius:50%;height:26px;width:26px;position:absolute;right:-10px;bottom:-10px}ion-card .img-wrapper ion-button ion-icon{width:14px;height:14px}ion-card .img-wrapper img.loading{opacity:0.1}.image-upload-loading{position:absolute;top:40%;left:35%}";
1289
-
1290
- const SparkleUserProfile = class {
1291
- constructor(hostRef) {
1292
- index.registerInstance(this, hostRef);
1293
- this.profileFormControls = {
1294
- ProfileImage: {
1295
- isValid: true,
1296
- value: '',
1297
- validate: (_) => {
1298
- return true;
1299
- },
1300
- },
1301
- FirstName: {
1302
- isValid: false,
1303
- value: '',
1304
- validate: (value) => {
1305
- if (value) {
1306
- return true;
1307
- }
1308
- else {
1309
- return false;
1310
- }
1311
- },
1312
- },
1313
- LastName: {
1314
- isValid: false,
1315
- value: '',
1316
- validate: (value) => {
1317
- if (value) {
1318
- return true;
1319
- }
1320
- else {
1321
- return false;
1322
- }
1323
- },
1324
- },
1325
- ProfileText: {
1326
- isValid: true,
1327
- value: '',
1328
- validate: (value) => {
1329
- if (value) {
1330
- return true;
1331
- }
1332
- else {
1333
- return false;
1334
- }
1335
- }
1336
- }
1337
- };
1338
- this.profileFormSubmitted = false;
1339
- }
1340
- componentWillLoad() {
1341
- if (user_store.userStore.state.user) {
1342
- const user = user_store.userStore.state.user;
1343
- this.changeFormValue("FirstName", user.FirstName);
1344
- this.changeFormValue("LastName", user.LastName);
1345
- this.changeFormValue("ProfileText", user.ProfileText);
1346
- this.changeFormValue("ProfileImage", user.ProfileImage);
1347
- }
1348
- }
1349
- changeFormValue(controlName, value) {
1350
- this.profileFormControls = Object.assign(Object.assign({}, this.profileFormControls), { [controlName]: Object.assign(Object.assign({}, this.profileFormControls[controlName]), { value: value, isValid: this.profileFormControls[controlName].validate(value) }) });
1351
- }
1352
- async handleProfileFormSubmit(e) {
1353
- e.preventDefault();
1354
- await this.updateUser();
1355
- }
1356
- async updateUser() {
1357
- this.profileFormSubmitted = true;
1358
- let isFormValid = true;
1359
- for (let controlName in this.profileFormControls) {
1360
- let control = this.profileFormControls[controlName];
1361
- control.validate(control.value);
1362
- if (!control.isValid) {
1363
- isFormValid = false;
1364
- }
1365
- }
1366
- if (isFormValid) {
1367
- await student_service.StudentService.getInstance().updateProfile({
1368
- FirstName: this.profileFormControls.FirstName.value,
1369
- LastName: this.profileFormControls.LastName.value,
1370
- ProfileImage: this.profileFormControls.ProfileImage.value,
1371
- ProfileText: this.profileFormControls.ProfileText.value
1372
- });
1373
- }
1374
- }
1375
- async uploadProfileImage(event) {
1376
- if (event.target.files && event.target.files[0]) {
1377
- const result = await MediaService.getInstance().uploadImage(event.target.files);
1378
- if (result.Succeeded && result.Data && result.Data.length > 0) {
1379
- this.changeFormValue("ProfileImage", result.Data[0].FullImageUrl);
1380
- await this.updateUser();
1381
- }
1382
- }
1383
- }
1384
- selectFile() {
1385
- this.el.querySelector("#fileInput").click();
1386
- }
1387
- render() {
1388
- return (index.h(index.Host, null, index.h("ion-card", { color: "sparkle" }, index.h("div", { class: "img-wrapper" }, index.h("img", { class: mediaStore.state.mediaUploading ? "loading" : '', src: this.profileFormControls.ProfileImage.value || index.getAssetPath(`../assets/svg/profile.svg`) }), index.h("input", { type: "file", id: "fileInput", onChange: (ev) => this.uploadProfileImage(ev), style: { display: "none" }, accept: "image/*" }), index.h("ion-button", { color: "sparkle", onClick: () => this.selectFile(), disabled: mediaStore.state.mediaUploading }, index.h("ion-icon", { slot: "icon-only", name: "camera-outline" })), mediaStore.state.mediaUploading && index.h("ion-spinner", { class: "image-upload-loading", name: "dots" })), index.h("ion-card-content", { class: "ion-text-center" }, index.h("h2", null, this.profileFormControls.FirstName.value, " ", this.profileFormControls.LastName.value), index.h("h3", null, this.profileFormControls.ProfileText.value))), index.h("form", { onSubmit: e => this.handleProfileFormSubmit(e), novalidate: true }, index.h("ion-list", { "no-lines": true }, index.h("ion-item", null, index.h("ion-label", { position: "stacked", color: "primary" }, "First Name"), index.h("ion-input", { name: "firstName", type: "text", value: this.profileFormControls.FirstName.value, onInput: (ev) => this.changeFormValue("FirstName", ev.target.value) })), index.h("ion-text", { color: "danger" }, index.h("p", { hidden: this.profileFormControls.FirstName.isValid || this.profileFormSubmitted === false, class: "ion-padding-start" }, "First Name is required")), index.h("ion-item", null, index.h("ion-label", { position: "stacked", color: "primary" }, "Last Name"), index.h("ion-input", { name: "lastName", type: "text", value: this.profileFormControls.LastName.value, onInput: (ev) => this.changeFormValue("LastName", ev.target.value) })), index.h("ion-text", { color: "danger" }, index.h("p", { hidden: this.profileFormControls.LastName.isValid || this.profileFormSubmitted === false, class: "ion-padding-start" }, "Last Name is required")), index.h("ion-item", null, index.h("ion-label", { position: "stacked", color: "primary" }, "Profile Bio"), index.h("ion-input", { name: "lastName", type: "text", value: this.profileFormControls.ProfileText.value, onInput: (ev) => this.changeFormValue("ProfileText", ev.target.value) })), index.h("ion-text", { color: "danger" }, index.h("p", { hidden: this.profileFormControls.ProfileText.isValid || this.profileFormSubmitted === false, class: "ion-padding-start" }, "Profile Bio is required"))), index.h("div", { class: "ion-padding" }, index.h("ion-button", { type: "submit", expand: "block", disabled: user_store.userStore.state.updateLoading }, user_store.userStore.state.updateLoading && index.h("ion-spinner", { name: "dots" }), " Update")))));
1389
- }
1390
- get el() { return index.getElement(this); }
1391
- };
1392
- SparkleUserProfile.style = sparkleUserProfileCss;
1393
-
1394
- const routeCss = "stencil-route.inactive{display:none}";
1395
-
1396
- const Route = class {
1397
- constructor(hostRef) {
1398
- index.registerInstance(this, hostRef);
1399
- this.group = null;
1400
- this.match = null;
1401
- this.componentProps = {};
1402
- this.exact = false;
1403
- this.scrollOnNextRender = false;
1404
- this.previousMatch = null;
1405
- }
1406
- // Identify if the current route is a match.
1407
- computeMatch(newLocation) {
1408
- const isGrouped = this.group != null || (this.el.parentElement != null && this.el.parentElement.tagName.toLowerCase() === 'stencil-route-switch');
1409
- if (!newLocation || isGrouped) {
1410
- return;
1411
- }
1412
- this.previousMatch = this.match;
1413
- return this.match = matchPath.matchPath(newLocation.pathname, {
1414
- path: this.url,
1415
- exact: this.exact,
1416
- strict: true
1417
- });
1418
- }
1419
- async loadCompleted() {
1420
- let routeViewOptions = {};
1421
- if (this.history && this.history.location.hash) {
1422
- routeViewOptions = {
1423
- scrollToId: this.history.location.hash.substr(1)
1424
- };
1425
- }
1426
- else if (this.scrollTopOffset) {
1427
- routeViewOptions = {
1428
- scrollTopOffset: this.scrollTopOffset
1429
- };
1430
- }
1431
- // After all children have completed then tell switch
1432
- // the provided callback will get executed after this route is in view
1433
- if (typeof this.componentUpdated === 'function') {
1434
- this.componentUpdated(routeViewOptions);
1435
- // If this is an independent route and it matches then routes have updated.
1436
- // If the only change to location is a hash change then do not scroll.
1437
- }
1438
- else if (this.match && !matchPath.matchesAreEqual(this.match, this.previousMatch) && this.routeViewsUpdated) {
1439
- this.routeViewsUpdated(routeViewOptions);
1440
- }
1441
- }
1442
- async componentDidUpdate() {
1443
- await this.loadCompleted();
1444
- }
1445
- async componentDidLoad() {
1446
- await this.loadCompleted();
1447
- }
1448
- render() {
1449
- // If there is no activeRouter then do not render
1450
- // Check if this route is in the matching URL (for example, a parent route)
1451
- if (!this.match || !this.history) {
1452
- return null;
1453
- }
1454
- // component props defined in route
1455
- // the history api
1456
- // current match data including params
1457
- const childProps = Object.assign({}, this.componentProps, { history: this.history, match: this.match });
1458
- // If there is a routerRender defined then use
1459
- // that and pass the component and component props with it.
1460
- if (this.routeRender) {
1461
- return this.routeRender(Object.assign({}, childProps, { component: this.component }));
1462
- }
1463
- if (this.component) {
1464
- const ChildComponent = this.component;
1465
- return (index.h(ChildComponent, Object.assign({}, childProps)));
1466
- }
1467
- }
1468
- get el() { return index.getElement(this); }
1469
- static get watchers() { return {
1470
- "location": ["computeMatch"]
1471
- }; }
1472
- };
1473
- activeRouter.ActiveRouter.injectProps(Route, [
1474
- 'location',
1475
- 'history',
1476
- 'historyType',
1477
- 'routeViewsUpdated'
1478
- ]);
1479
- Route.style = routeCss;
1480
-
1481
- const warning = (value, ...args) => {
1482
- if (!value) {
1483
- console.warn(...args);
1484
- }
1485
- };
1486
-
1487
- // Adapted from the https://github.com/ReactTraining/history and converted to TypeScript
1488
- const createTransitionManager = () => {
1489
- let prompt;
1490
- let listeners = [];
1491
- const setPrompt = (nextPrompt) => {
1492
- warning(prompt == null, 'A history supports only one prompt at a time');
1493
- prompt = nextPrompt;
1494
- return () => {
1495
- if (prompt === nextPrompt) {
1496
- prompt = null;
1497
- }
1498
- };
1499
- };
1500
- const confirmTransitionTo = (location, action, getUserConfirmation, callback) => {
1501
- // TODO: If another transition starts while we're still confirming
1502
- // the previous one, we may end up in a weird state. Figure out the
1503
- // best way to handle this.
1504
- if (prompt != null) {
1505
- const result = typeof prompt === 'function' ? prompt(location, action) : prompt;
1506
- if (typeof result === 'string') {
1507
- if (typeof getUserConfirmation === 'function') {
1508
- getUserConfirmation(result, callback);
1509
- }
1510
- else {
1511
- warning(false, 'A history needs a getUserConfirmation function in order to use a prompt message');
1512
- callback(true);
1513
- }
1514
- }
1515
- else {
1516
- // Return false from a transition hook to cancel the transition.
1517
- callback(result !== false);
1518
- }
1519
- }
1520
- else {
1521
- callback(true);
1522
- }
1523
- };
1524
- const appendListener = (fn) => {
1525
- let isActive = true;
1526
- const listener = (...args) => {
1527
- if (isActive) {
1528
- fn(...args);
1529
- }
1530
- };
1531
- listeners.push(listener);
1532
- return () => {
1533
- isActive = false;
1534
- listeners = listeners.filter(item => item !== listener);
1535
- };
1536
- };
1537
- const notifyListeners = (...args) => {
1538
- listeners.forEach(listener => listener(...args));
1539
- };
1540
- return {
1541
- setPrompt,
1542
- confirmTransitionTo,
1543
- appendListener,
1544
- notifyListeners
1545
- };
1546
- };
1547
-
1548
- const createScrollHistory = (win, applicationScrollKey = 'scrollPositions') => {
1549
- let scrollPositions = new Map();
1550
- const set = (key, value) => {
1551
- scrollPositions.set(key, value);
1552
- if (domUtils.storageAvailable(win, 'sessionStorage')) {
1553
- const arrayData = [];
1554
- scrollPositions.forEach((value, key) => {
1555
- arrayData.push([key, value]);
1556
- });
1557
- win.sessionStorage.setItem('scrollPositions', JSON.stringify(arrayData));
1558
- }
1559
- };
1560
- const get = (key) => {
1561
- return scrollPositions.get(key);
1562
- };
1563
- const has = (key) => {
1564
- return scrollPositions.has(key);
1565
- };
1566
- const capture = (key) => {
1567
- set(key, [win.scrollX, win.scrollY]);
1568
- };
1569
- if (domUtils.storageAvailable(win, 'sessionStorage')) {
1570
- const scrollData = win.sessionStorage.getItem(applicationScrollKey);
1571
- scrollPositions = scrollData ?
1572
- new Map(JSON.parse(scrollData)) :
1573
- scrollPositions;
1574
- }
1575
- if ('scrollRestoration' in win.history) {
1576
- history.scrollRestoration = 'manual';
1577
- }
1578
- return {
1579
- set,
1580
- get,
1581
- has,
1582
- capture
1583
- };
1584
- };
1585
-
1586
- // Adapted from the https://github.com/ReactTraining/history and converted to TypeScript
1587
- const PopStateEvent = 'popstate';
1588
- const HashChangeEvent$1 = 'hashchange';
1589
- /**
1590
- * Creates a history object that uses the HTML5 history API including
1591
- * pushState, replaceState, and the popstate event.
1592
- */
1593
- const createBrowserHistory = (win, props = {}) => {
1594
- let forceNextPop = false;
1595
- const globalHistory = win.history;
1596
- const globalLocation = win.location;
1597
- const globalNavigator = win.navigator;
1598
- const canUseHistory = domUtils.supportsHistory(win);
1599
- const needsHashChangeListener = !domUtils.supportsPopStateOnHashChange(globalNavigator);
1600
- const scrollHistory = createScrollHistory(win);
1601
- const forceRefresh = (props.forceRefresh != null) ? props.forceRefresh : false;
1602
- const getUserConfirmation = (props.getUserConfirmation != null) ? props.getUserConfirmation : domUtils.getConfirmation;
1603
- const keyLength = (props.keyLength != null) ? props.keyLength : 6;
1604
- const basename = props.basename ? matchPath.stripTrailingSlash(matchPath.addLeadingSlash(props.basename)) : '';
1605
- const getHistoryState = () => {
1606
- try {
1607
- return win.history.state || {};
1608
- }
1609
- catch (e) {
1610
- // IE 11 sometimes throws when accessing window.history.state
1611
- // See https://github.com/ReactTraining/history/pull/289
1612
- return {};
1613
- }
1614
- };
1615
- const getDOMLocation = (historyState) => {
1616
- historyState = historyState || {};
1617
- const { key, state } = historyState;
1618
- const { pathname, search, hash } = globalLocation;
1619
- let path = pathname + search + hash;
1620
- warning((!basename || matchPath.hasBasename(path, basename)), 'You are attempting to use a basename on a page whose URL path does not begin ' +
1621
- 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".');
1622
- if (basename) {
1623
- path = matchPath.stripBasename(path, basename);
1624
- }
1625
- return matchPath.createLocation(path, state, key || matchPath.createKey(keyLength));
1626
- };
1627
- const transitionManager = createTransitionManager();
1628
- const setState = (nextState) => {
1629
- // Capture location for the view before changing history.
1630
- scrollHistory.capture(history.location.key);
1631
- Object.assign(history, nextState);
1632
- // Set scroll position based on its previous storage value
1633
- history.location.scrollPosition = scrollHistory.get(history.location.key);
1634
- history.length = globalHistory.length;
1635
- transitionManager.notifyListeners(history.location, history.action);
1636
- };
1637
- const handlePopState = (event) => {
1638
- // Ignore extraneous popstate events in WebKit.
1639
- if (!domUtils.isExtraneousPopstateEvent(globalNavigator, event)) {
1640
- handlePop(getDOMLocation(event.state));
1641
- }
1642
- };
1643
- const handleHashChange = () => {
1644
- handlePop(getDOMLocation(getHistoryState()));
1645
- };
1646
- const handlePop = (location) => {
1647
- if (forceNextPop) {
1648
- forceNextPop = false;
1649
- setState();
1650
- }
1651
- else {
1652
- const action = 'POP';
1653
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, (ok) => {
1654
- if (ok) {
1655
- setState({ action, location });
1656
- }
1657
- else {
1658
- revertPop(location);
1659
- }
1660
- });
1661
- }
1662
- };
1663
- const revertPop = (fromLocation) => {
1664
- const toLocation = history.location;
1665
- // TODO: We could probably make this more reliable by
1666
- // keeping a list of keys we've seen in sessionStorage.
1667
- // Instead, we just default to 0 for keys we don't know.
1668
- let toIndex = allKeys.indexOf(toLocation.key);
1669
- let fromIndex = allKeys.indexOf(fromLocation.key);
1670
- if (toIndex === -1) {
1671
- toIndex = 0;
1672
- }
1673
- if (fromIndex === -1) {
1674
- fromIndex = 0;
1675
- }
1676
- const delta = toIndex - fromIndex;
1677
- if (delta) {
1678
- forceNextPop = true;
1679
- go(delta);
1680
- }
1681
- };
1682
- const initialLocation = getDOMLocation(getHistoryState());
1683
- let allKeys = [initialLocation.key];
1684
- let listenerCount = 0;
1685
- let isBlocked = false;
1686
- // Public interface
1687
- const createHref = (location) => {
1688
- return basename + matchPath.createPath(location);
1689
- };
1690
- const push = (path, state) => {
1691
- warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' +
1692
- 'argument is a location-like object that already has state; it is ignored');
1693
- const action = 'PUSH';
1694
- const location = matchPath.createLocation(path, state, matchPath.createKey(keyLength), history.location);
1695
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, (ok) => {
1696
- if (!ok) {
1697
- return;
1698
- }
1699
- const href = createHref(location);
1700
- const { key, state } = location;
1701
- if (canUseHistory) {
1702
- globalHistory.pushState({ key, state }, '', href);
1703
- if (forceRefresh) {
1704
- globalLocation.href = href;
1705
- }
1706
- else {
1707
- const prevIndex = allKeys.indexOf(history.location.key);
1708
- const nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);
1709
- nextKeys.push(location.key);
1710
- allKeys = nextKeys;
1711
- setState({ action, location });
1712
- }
1713
- }
1714
- else {
1715
- warning(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history');
1716
- globalLocation.href = href;
1717
- }
1718
- });
1719
- };
1720
- const replace = (path, state) => {
1721
- warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' +
1722
- 'argument is a location-like object that already has state; it is ignored');
1723
- const action = 'REPLACE';
1724
- const location = matchPath.createLocation(path, state, matchPath.createKey(keyLength), history.location);
1725
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, (ok) => {
1726
- if (!ok) {
1727
- return;
1728
- }
1729
- const href = createHref(location);
1730
- const { key, state } = location;
1731
- if (canUseHistory) {
1732
- globalHistory.replaceState({ key, state }, '', href);
1733
- if (forceRefresh) {
1734
- globalLocation.replace(href);
1735
- }
1736
- else {
1737
- const prevIndex = allKeys.indexOf(history.location.key);
1738
- if (prevIndex !== -1) {
1739
- allKeys[prevIndex] = location.key;
1740
- }
1741
- setState({ action, location });
1742
- }
1743
- }
1744
- else {
1745
- warning(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history');
1746
- globalLocation.replace(href);
1747
- }
1748
- });
1749
- };
1750
- const go = (n) => {
1751
- globalHistory.go(n);
1752
- };
1753
- const goBack = () => go(-1);
1754
- const goForward = () => go(1);
1755
- const checkDOMListeners = (delta) => {
1756
- listenerCount += delta;
1757
- if (listenerCount === 1) {
1758
- win.addEventListener(PopStateEvent, handlePopState);
1759
- if (needsHashChangeListener) {
1760
- win.addEventListener(HashChangeEvent$1, handleHashChange);
1761
- }
1762
- }
1763
- else if (listenerCount === 0) {
1764
- win.removeEventListener(PopStateEvent, handlePopState);
1765
- if (needsHashChangeListener) {
1766
- win.removeEventListener(HashChangeEvent$1, handleHashChange);
1767
- }
1768
- }
1769
- };
1770
- const block = (prompt = '') => {
1771
- const unblock = transitionManager.setPrompt(prompt);
1772
- if (!isBlocked) {
1773
- checkDOMListeners(1);
1774
- isBlocked = true;
1775
- }
1776
- return () => {
1777
- if (isBlocked) {
1778
- isBlocked = false;
1779
- checkDOMListeners(-1);
1780
- }
1781
- return unblock();
1782
- };
1783
- };
1784
- const listen = (listener) => {
1785
- const unlisten = transitionManager.appendListener(listener);
1786
- checkDOMListeners(1);
1787
- return () => {
1788
- checkDOMListeners(-1);
1789
- unlisten();
1790
- };
1791
- };
1792
- const history = {
1793
- length: globalHistory.length,
1794
- action: 'POP',
1795
- location: initialLocation,
1796
- createHref,
1797
- push,
1798
- replace,
1799
- go,
1800
- goBack,
1801
- goForward,
1802
- block,
1803
- listen,
1804
- win: win
1805
- };
1806
- return history;
1807
- };
1808
-
1809
- // Adapted from the https://github.com/ReactTraining/history and converted to TypeScript
1810
- const HashChangeEvent = 'hashchange';
1811
- const HashPathCoders = {
1812
- hashbang: {
1813
- encodePath: (path) => path.charAt(0) === '!' ? path : '!/' + matchPath.stripLeadingSlash(path),
1814
- decodePath: (path) => path.charAt(0) === '!' ? path.substr(1) : path
1815
- },
1816
- noslash: {
1817
- encodePath: matchPath.stripLeadingSlash,
1818
- decodePath: matchPath.addLeadingSlash
1819
- },
1820
- slash: {
1821
- encodePath: matchPath.addLeadingSlash,
1822
- decodePath: matchPath.addLeadingSlash
1823
- }
1824
- };
1825
- const createHashHistory = (win, props = {}) => {
1826
- let forceNextPop = false;
1827
- let ignorePath = null;
1828
- let listenerCount = 0;
1829
- let isBlocked = false;
1830
- const globalLocation = win.location;
1831
- const globalHistory = win.history;
1832
- const canGoWithoutReload = domUtils.supportsGoWithoutReloadUsingHash(win.navigator);
1833
- const keyLength = (props.keyLength != null) ? props.keyLength : 6;
1834
- const { getUserConfirmation = domUtils.getConfirmation, hashType = 'slash' } = props;
1835
- const basename = props.basename ? matchPath.stripTrailingSlash(matchPath.addLeadingSlash(props.basename)) : '';
1836
- const { encodePath, decodePath } = HashPathCoders[hashType];
1837
- const getHashPath = () => {
1838
- // We can't use window.location.hash here because it's not
1839
- // consistent across browsers - Firefox will pre-decode it!
1840
- const href = globalLocation.href;
1841
- const hashIndex = href.indexOf('#');
1842
- return hashIndex === -1 ? '' : href.substring(hashIndex + 1);
1843
- };
1844
- const pushHashPath = (path) => (globalLocation.hash = path);
1845
- const replaceHashPath = (path) => {
1846
- const hashIndex = globalLocation.href.indexOf('#');
1847
- globalLocation.replace(globalLocation.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path);
1848
- };
1849
- const getDOMLocation = () => {
1850
- let path = decodePath(getHashPath());
1851
- warning((!basename || matchPath.hasBasename(path, basename)), 'You are attempting to use a basename on a page whose URL path does not begin ' +
1852
- 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".');
1853
- if (basename) {
1854
- path = matchPath.stripBasename(path, basename);
1855
- }
1856
- return matchPath.createLocation(path, undefined, matchPath.createKey(keyLength));
1857
- };
1858
- const transitionManager = createTransitionManager();
1859
- const setState = (nextState) => {
1860
- Object.assign(history, nextState);
1861
- history.length = globalHistory.length;
1862
- transitionManager.notifyListeners(history.location, history.action);
1863
- };
1864
- const handleHashChange = () => {
1865
- const path = getHashPath();
1866
- const encodedPath = encodePath(path);
1867
- if (path !== encodedPath) {
1868
- // Ensure we always have a properly-encoded hash.
1869
- replaceHashPath(encodedPath);
1870
- }
1871
- else {
1872
- const location = getDOMLocation();
1873
- const prevLocation = history.location;
1874
- if (!forceNextPop && matchPath.locationsAreEqual(prevLocation, location)) {
1875
- return; // A hashchange doesn't always == location change.
1876
- }
1877
- if (ignorePath === matchPath.createPath(location)) {
1878
- return; // Ignore this change; we already setState in push/replace.
1879
- }
1880
- ignorePath = null;
1881
- handlePop(location);
1882
- }
1883
- };
1884
- const handlePop = (location) => {
1885
- if (forceNextPop) {
1886
- forceNextPop = false;
1887
- setState();
1888
- }
1889
- else {
1890
- const action = 'POP';
1891
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, (ok) => {
1892
- if (ok) {
1893
- setState({ action, location });
1894
- }
1895
- else {
1896
- revertPop(location);
1897
- }
1898
- });
1899
- }
1900
- };
1901
- const revertPop = (fromLocation) => {
1902
- const toLocation = history.location;
1903
- // TODO: We could probably make this more reliable by
1904
- // keeping a list of paths we've seen in sessionStorage.
1905
- // Instead, we just default to 0 for paths we don't know.
1906
- let toIndex = allPaths.lastIndexOf(matchPath.createPath(toLocation));
1907
- let fromIndex = allPaths.lastIndexOf(matchPath.createPath(fromLocation));
1908
- if (toIndex === -1) {
1909
- toIndex = 0;
1910
- }
1911
- if (fromIndex === -1) {
1912
- fromIndex = 0;
1913
- }
1914
- const delta = toIndex - fromIndex;
1915
- if (delta) {
1916
- forceNextPop = true;
1917
- go(delta);
1918
- }
1919
- };
1920
- // Ensure the hash is encoded properly before doing anything else.
1921
- const path = getHashPath();
1922
- const encodedPath = encodePath(path);
1923
- if (path !== encodedPath) {
1924
- replaceHashPath(encodedPath);
1925
- }
1926
- const initialLocation = getDOMLocation();
1927
- let allPaths = [matchPath.createPath(initialLocation)];
1928
- // Public interface
1929
- const createHref = (location) => ('#' + encodePath(basename + matchPath.createPath(location)));
1930
- const push = (path, state) => {
1931
- warning(state === undefined, 'Hash history cannot push state; it is ignored');
1932
- const action = 'PUSH';
1933
- const location = matchPath.createLocation(path, undefined, matchPath.createKey(keyLength), history.location);
1934
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, (ok) => {
1935
- if (!ok) {
1936
- return;
1937
- }
1938
- const path = matchPath.createPath(location);
1939
- const encodedPath = encodePath(basename + path);
1940
- const hashChanged = getHashPath() !== encodedPath;
1941
- if (hashChanged) {
1942
- // We cannot tell if a hashchange was caused by a PUSH, so we'd
1943
- // rather setState here and ignore the hashchange. The caveat here
1944
- // is that other hash histories in the page will consider it a POP.
1945
- ignorePath = path;
1946
- pushHashPath(encodedPath);
1947
- const prevIndex = allPaths.lastIndexOf(matchPath.createPath(history.location));
1948
- const nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);
1949
- nextPaths.push(path);
1950
- allPaths = nextPaths;
1951
- setState({ action, location });
1952
- }
1953
- else {
1954
- warning(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack');
1955
- setState();
1956
- }
1957
- });
1958
- };
1959
- const replace = (path, state) => {
1960
- warning(state === undefined, 'Hash history cannot replace state; it is ignored');
1961
- const action = 'REPLACE';
1962
- const location = matchPath.createLocation(path, undefined, matchPath.createKey(keyLength), history.location);
1963
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, (ok) => {
1964
- if (!ok) {
1965
- return;
1966
- }
1967
- const path = matchPath.createPath(location);
1968
- const encodedPath = encodePath(basename + path);
1969
- const hashChanged = getHashPath() !== encodedPath;
1970
- if (hashChanged) {
1971
- // We cannot tell if a hashchange was caused by a REPLACE, so we'd
1972
- // rather setState here and ignore the hashchange. The caveat here
1973
- // is that other hash histories in the page will consider it a POP.
1974
- ignorePath = path;
1975
- replaceHashPath(encodedPath);
1976
- }
1977
- const prevIndex = allPaths.indexOf(matchPath.createPath(history.location));
1978
- if (prevIndex !== -1) {
1979
- allPaths[prevIndex] = path;
1980
- }
1981
- setState({ action, location });
1982
- });
1983
- };
1984
- const go = (n) => {
1985
- warning(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser');
1986
- globalHistory.go(n);
1987
- };
1988
- const goBack = () => go(-1);
1989
- const goForward = () => go(1);
1990
- const checkDOMListeners = (win, delta) => {
1991
- listenerCount += delta;
1992
- if (listenerCount === 1) {
1993
- win.addEventListener(HashChangeEvent, handleHashChange);
1994
- }
1995
- else if (listenerCount === 0) {
1996
- win.removeEventListener(HashChangeEvent, handleHashChange);
1997
- }
1998
- };
1999
- const block = (prompt = '') => {
2000
- const unblock = transitionManager.setPrompt(prompt);
2001
- if (!isBlocked) {
2002
- checkDOMListeners(win, 1);
2003
- isBlocked = true;
2004
- }
2005
- return () => {
2006
- if (isBlocked) {
2007
- isBlocked = false;
2008
- checkDOMListeners(win, -1);
2009
- }
2010
- return unblock();
2011
- };
2012
- };
2013
- const listen = (listener) => {
2014
- const unlisten = transitionManager.appendListener(listener);
2015
- checkDOMListeners(win, 1);
2016
- return () => {
2017
- checkDOMListeners(win, -1);
2018
- unlisten();
2019
- };
2020
- };
2021
- const history = {
2022
- length: globalHistory.length,
2023
- action: 'POP',
2024
- location: initialLocation,
2025
- createHref,
2026
- push,
2027
- replace,
2028
- go,
2029
- goBack,
2030
- goForward,
2031
- block,
2032
- listen,
2033
- win: win
2034
- };
2035
- return history;
2036
- };
2037
-
2038
- const getLocation = (location, root) => {
2039
- // Remove the root URL if found at beginning of string
2040
- const pathname = location.pathname.indexOf(root) == 0 ?
2041
- '/' + location.pathname.slice(root.length) :
2042
- location.pathname;
2043
- return Object.assign({}, location, { pathname });
2044
- };
2045
- const HISTORIES = {
2046
- 'browser': createBrowserHistory,
2047
- 'hash': createHashHistory
2048
- };
2049
- const Router = class {
2050
- constructor(hostRef) {
2051
- index.registerInstance(this, hostRef);
2052
- this.root = '/';
2053
- this.historyType = 'browser';
2054
- // A suffix to append to the page title whenever
2055
- // it's updated through RouteTitle
2056
- this.titleSuffix = '';
2057
- this.routeViewsUpdated = (options = {}) => {
2058
- if (this.history && options.scrollToId && this.historyType === 'browser') {
2059
- const elm = this.history.win.document.getElementById(options.scrollToId);
2060
- if (elm) {
2061
- return elm.scrollIntoView();
2062
- }
2063
- }
2064
- this.scrollTo(options.scrollTopOffset || this.scrollTopOffset);
2065
- };
2066
- this.isServer = index.getContext(this, "isServer");
2067
- this.queue = index.getContext(this, "queue");
2068
- }
2069
- componentWillLoad() {
2070
- this.history = HISTORIES[this.historyType](this.el.ownerDocument.defaultView);
2071
- this.history.listen((location) => {
2072
- location = getLocation(location, this.root);
2073
- this.location = location;
2074
- });
2075
- this.location = getLocation(this.history.location, this.root);
2076
- }
2077
- scrollTo(scrollToLocation) {
2078
- const history = this.history;
2079
- if (scrollToLocation == null || this.isServer || !history) {
2080
- return;
2081
- }
2082
- if (history.action === 'POP' && Array.isArray(history.location.scrollPosition)) {
2083
- return this.queue.write(() => {
2084
- if (history && history.location && Array.isArray(history.location.scrollPosition)) {
2085
- history.win.scrollTo(history.location.scrollPosition[0], history.location.scrollPosition[1]);
2086
- }
2087
- });
2088
- }
2089
- // okay, the frame has passed. Go ahead and render now
2090
- return this.queue.write(() => {
2091
- history.win.scrollTo(0, scrollToLocation);
2092
- });
2093
- }
2094
- render() {
2095
- if (!this.location || !this.history) {
2096
- return;
2097
- }
2098
- const state = {
2099
- historyType: this.historyType,
2100
- location: this.location,
2101
- titleSuffix: this.titleSuffix,
2102
- root: this.root,
2103
- history: this.history,
2104
- routeViewsUpdated: this.routeViewsUpdated
2105
- };
2106
- return (index.h(activeRouter.ActiveRouter.Provider, { state: state }, index.h("slot", null)));
2107
- }
2108
- get el() { return index.getElement(this); }
2109
- };
2110
-
2111
- exports.sparkle_facilitator_header = SparkleFacilitatorHeader;
2112
- exports.sparkle_facilitator_page = FacilitatorPage;
2113
- exports.sparkle_forgot_password = SparkleForgotPassword;
2114
- exports.sparkle_goals = SparkleGoals;
2115
- exports.sparkle_gww = SparkleGww;
2116
- exports.sparkle_header = SparkleHeader;
2117
- exports.sparkle_health = SparkleHealth;
2118
- exports.sparkle_login = PageLogin;
2119
- exports.sparkle_menu = SparkleMenu;
2120
- exports.sparkle_mood = SparkleMood;
2121
- exports.sparkle_page = SparklePage;
2122
- exports.sparkle_reset_password = SparkleResetPassword;
2123
- exports.sparkle_root = SparkleRoot;
2124
- exports.sparkle_signup = SparkleSignup;
2125
- exports.sparkle_unauthorized = SparkleUnauthorized;
2126
- exports.sparkle_user_enrollment = SparkleUserEnrollment;
2127
- exports.sparkle_user_profile = SparkleUserProfile;
2128
- exports.stencil_route = Route;
2129
- exports.stencil_router = Router;