@sparkle-learning/core 0.0.32 → 0.0.35

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 (611) hide show
  1. package/dist/cjs/PrivateRoute-4abc9d29.js +35 -0
  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/{PrivateRoute-043bb7d3.js → auth.service-4b584cd7.js} +4 -33
  6. package/dist/cjs/{auth.store-ff3fda09.js → auth.store-1e630a7d.js} +48 -725
  7. package/dist/cjs/compass-svg.cjs.entry.js +1 -1
  8. package/dist/cjs/context-consumer.cjs.entry.js +1 -1
  9. package/dist/cjs/course-select.cjs.entry.js +1 -1
  10. package/dist/cjs/{cubic-bezier-293f4663.js → cubic-bezier-53d26d05.js} +10 -11
  11. package/dist/cjs/dom-utils-b8befdd5.js +63 -0
  12. package/dist/cjs/{facilitator.service-faac5c0c.js → facilitator.service-9e990274.js} +8 -7
  13. package/dist/cjs/{feed.service-66405969.js → feed.service-b4f09441.js} +8 -7
  14. package/dist/cjs/{focus-visible-ad3828a7.js → focus-visible-b0b07ba6.js} +19 -6
  15. package/dist/cjs/{framework-delegate-2470a246.js → framework-delegate-59a98abd.js} +11 -13
  16. package/dist/cjs/{gesture-controller-07c31f70.js → gesture-controller-0eb5579e.js} +1 -1
  17. package/dist/cjs/{haptic-91e86eb7.js → haptic-780f33c4.js} +3 -2
  18. package/dist/cjs/{hardware-back-button-f7b5d99e.js → hardware-back-button-92d97ff8.js} +8 -8
  19. package/dist/cjs/header-mobile-collapse_2.cjs.entry.js +112 -0
  20. package/dist/cjs/{helpers-7e28976c.js → helpers-c2496722.js} +81 -14
  21. package/dist/cjs/httpService-7211d93b.js +685 -0
  22. package/dist/cjs/{icons-80d477f6.js → icons-c61db785.js} +1 -1
  23. package/dist/cjs/{index-43642662.js → index-12082cba.js} +21 -18
  24. package/dist/cjs/{index-459a5fa9.js → index-15ea05f5.js} +19 -28
  25. package/dist/cjs/{index-bae2a754.js → index-51e8292e.js} +18 -11
  26. package/dist/cjs/index-70e63f5b.js +3071 -0
  27. package/dist/cjs/{index-b12edb26.js → index-787d4498.js} +17 -25
  28. package/dist/cjs/{tap-click-1caf1780.js → index-8b5629a6.js} +30 -20
  29. package/dist/cjs/{index-8540d72e.js → index-975586fd.js} +7 -1
  30. package/dist/cjs/index-9c7b27e4.js +140 -0
  31. package/dist/cjs/{index-185f9c5a.js → index-af080b50.js} +9 -8
  32. package/dist/cjs/index-e56e09b8.js +38 -0
  33. package/dist/cjs/index.cjs.js +13 -11
  34. package/dist/cjs/{index.es-ef3efdfb.js → index.es-38cbcdbe.js} +2 -7
  35. package/dist/cjs/injectHistory-7206bbb9.js +9 -0
  36. package/dist/cjs/{input-shims-6c442c9f.js → input-shims-eff63b88.js} +21 -24
  37. package/dist/cjs/ion-accordion-group.cjs.entry.js +17 -9
  38. package/dist/cjs/ion-accordion.cjs.entry.js +19 -23
  39. package/dist/cjs/ion-action-sheet_4.cjs.entry.js +216 -212
  40. package/dist/cjs/ion-app.cjs.entry.js +8 -8
  41. package/dist/cjs/ion-avatar_16.cjs.entry.js +1907 -0
  42. package/dist/cjs/ion-back-button.cjs.entry.js +11 -11
  43. package/dist/cjs/ion-backdrop.cjs.entry.js +4 -4
  44. package/dist/cjs/ion-badge.cjs.entry.js +3 -3
  45. package/dist/cjs/ion-breadcrumb.cjs.entry.js +13 -21
  46. package/dist/cjs/ion-breadcrumbs.cjs.entry.js +12 -14
  47. package/dist/cjs/ion-buttons_3.cjs.entry.js +13 -13
  48. package/dist/cjs/ion-card-header.cjs.entry.js +4 -4
  49. package/dist/cjs/ion-card-subtitle.cjs.entry.js +4 -4
  50. package/dist/cjs/ion-checkbox_4.cjs.entry.js +360 -0
  51. package/dist/cjs/ion-chip.cjs.entry.js +3 -3
  52. package/dist/cjs/ion-col_3.cjs.entry.js +159 -0
  53. package/dist/cjs/ion-content_2.cjs.entry.js +59 -52
  54. package/dist/cjs/ion-datetime-button.cjs.entry.js +312 -0
  55. package/dist/cjs/ion-datetime.cjs.entry.js +752 -1245
  56. package/dist/cjs/ion-fab-button.cjs.entry.js +25 -9
  57. package/dist/cjs/ion-fab-list.cjs.entry.js +4 -4
  58. package/dist/cjs/ion-fab.cjs.entry.js +15 -13
  59. package/dist/cjs/ion-footer.cjs.entry.js +16 -14
  60. package/dist/cjs/ion-img.cjs.entry.js +4 -4
  61. package/dist/cjs/ion-infinite-scroll-content.cjs.entry.js +5 -5
  62. package/dist/cjs/ion-infinite-scroll.cjs.entry.js +13 -15
  63. package/dist/cjs/ion-item-divider.cjs.entry.js +4 -4
  64. package/dist/cjs/ion-item-group.cjs.entry.js +3 -3
  65. package/dist/cjs/ion-item-option.cjs.entry.js +8 -8
  66. package/dist/cjs/ion-item-options.cjs.entry.js +5 -5
  67. package/dist/cjs/ion-item-sliding.cjs.entry.js +41 -46
  68. package/dist/cjs/ion-loading.cjs.entry.js +23 -35
  69. package/dist/cjs/ion-menu-button.cjs.entry.js +13 -13
  70. package/dist/cjs/ion-menu-toggle.cjs.entry.js +7 -7
  71. package/dist/cjs/ion-menu.cjs.entry.js +47 -40
  72. package/dist/cjs/ion-modal.cjs.entry.js +935 -282
  73. package/dist/cjs/ion-nav-link.cjs.entry.js +2 -2
  74. package/dist/cjs/ion-nav.cjs.entry.js +45 -35
  75. package/dist/cjs/ion-picker-column-internal_2.cjs.entry.js +151 -43
  76. package/dist/cjs/ion-picker-column.cjs.entry.js +23 -25
  77. package/dist/cjs/ion-picker.cjs.entry.js +15 -17
  78. package/dist/cjs/ion-progress-bar.cjs.entry.js +6 -8
  79. package/dist/cjs/ion-range.cjs.entry.js +515 -0
  80. package/dist/cjs/ion-refresher-content.cjs.entry.js +6 -12
  81. package/dist/cjs/ion-refresher.cjs.entry.js +68 -50
  82. package/dist/cjs/ion-reorder-group.cjs.entry.js +15 -16
  83. package/dist/cjs/ion-reorder.cjs.entry.js +3 -3
  84. package/dist/cjs/ion-route-redirect.cjs.entry.js +1 -1
  85. package/dist/cjs/ion-route.cjs.entry.js +1 -1
  86. package/dist/cjs/ion-router-link.cjs.entry.js +5 -5
  87. package/dist/cjs/ion-router-outlet.cjs.entry.js +22 -20
  88. package/dist/cjs/ion-router.cjs.entry.js +32 -31
  89. package/dist/cjs/ion-searchbar.cjs.entry.js +14 -16
  90. package/dist/cjs/ion-segment-button.cjs.entry.js +8 -8
  91. package/dist/cjs/ion-segment.cjs.entry.js +24 -26
  92. package/dist/cjs/ion-select_2.cjs.entry.js +59 -56
  93. package/dist/cjs/ion-skeleton-text.cjs.entry.js +4 -4
  94. package/dist/cjs/ion-slide.cjs.entry.js +3 -3
  95. package/dist/cjs/ion-slides.cjs.entry.js +23 -23
  96. package/dist/cjs/ion-split-pane.cjs.entry.js +10 -11
  97. package/dist/cjs/ion-tab-bar.cjs.entry.js +5 -5
  98. package/dist/cjs/ion-tab-button.cjs.entry.js +6 -6
  99. package/dist/cjs/ion-tab.cjs.entry.js +4 -4
  100. package/dist/cjs/ion-tabs.cjs.entry.js +4 -5
  101. package/dist/cjs/ion-text.cjs.entry.js +24 -0
  102. package/dist/cjs/ion-thumbnail.cjs.entry.js +2 -2
  103. package/dist/cjs/ion-toast.cjs.entry.js +23 -43
  104. package/dist/cjs/ion-virtual-scroll.cjs.entry.js +29 -28
  105. package/dist/cjs/{ionic-global-878073d1.js → ionic-global-2cde9d3a.js} +27 -31
  106. package/dist/cjs/{ios.transition-c3bfb096.js → ios.transition-da235483.js} +71 -51
  107. package/dist/cjs/{keyboard-dfd76ac3.js → keyboard-91096619.js} +3 -3
  108. package/dist/cjs/loader.cjs.js +5 -5
  109. package/dist/cjs/match-path-84c9f7ca.js +511 -0
  110. package/dist/cjs/{md.transition-7eb9a1a7.js → md.transition-be429e07.js} +9 -16
  111. package/dist/cjs/{menu-toggle-util-cb549c2c.js → menu-toggle-util-7a01448c.js} +2 -2
  112. package/dist/cjs/{overlays-0a748609.js → overlays-32df265a.js} +29 -29
  113. package/dist/cjs/parse-d0071120.js +1237 -0
  114. package/dist/cjs/{purify-d0ad2883.js → purify-fb9c107e.js} +1 -1
  115. package/dist/cjs/sparkle-animation-player.cjs.entry.js +1 -1
  116. package/dist/cjs/sparkle-card_3.cjs.entry.js +91 -0
  117. package/dist/cjs/sparkle-character-intro.cjs.entry.js +1 -1
  118. package/dist/cjs/sparkle-code.cjs.entry.js +2 -2
  119. package/dist/cjs/sparkle-compass-post.cjs.entry.js +1 -1
  120. package/dist/cjs/sparkle-compass.cjs.entry.js +1 -1
  121. package/dist/cjs/sparkle-core.cjs.js +5 -5
  122. package/dist/cjs/sparkle-course-root.cjs.entry.js +146 -0
  123. package/dist/cjs/sparkle-dropdown.cjs.entry.js +61 -0
  124. package/dist/cjs/sparkle-emoji.cjs.entry.js +1 -1
  125. package/dist/cjs/{header-mobile-collapse_61.cjs.entry.js → sparkle-export-lessons_6.cjs.entry.js} +8865 -17663
  126. package/dist/cjs/sparkle-facilitator-header_19.cjs.entry.js +2130 -0
  127. package/dist/cjs/sparkle-facilitator-notes-form.cjs.entry.js +8 -7
  128. package/dist/cjs/sparkle-feedback.cjs.entry.js +9 -7
  129. package/dist/cjs/sparkle-goal-form.cjs.entry.js +8 -7
  130. package/dist/cjs/sparkle-goal-progress.cjs.entry.js +19 -0
  131. package/dist/cjs/sparkle-gww-comment-list.cjs.entry.js +1 -1
  132. package/dist/cjs/sparkle-gww-graph.cjs.entry.js +1 -1
  133. package/dist/cjs/sparkle-gww-item.cjs.entry.js +74 -0
  134. package/dist/cjs/sparkle-intro.cjs.entry.js +26 -0
  135. package/dist/cjs/sparkle-lower-content-nav.cjs.entry.js +1 -1
  136. package/dist/cjs/sparkle-menu-collapsible.cjs.entry.js +2 -2
  137. package/dist/cjs/sparkle-menu-toggle_3.cjs.entry.js +236 -0
  138. package/dist/cjs/sparkle-modal-image.cjs.entry.js +1 -1
  139. package/dist/cjs/sparkle-notfound-page.cjs.entry.js +1 -1
  140. package/dist/cjs/sparkle-overlay.cjs.entry.js +1 -1
  141. package/dist/cjs/sparkle-poll.cjs.entry.js +1 -1
  142. package/dist/cjs/sparkle-quiz-container.cjs.entry.js +1 -1
  143. package/dist/cjs/sparkle-quiz-feedback_5.cjs.entry.js +1 -1
  144. package/dist/cjs/sparkle-quiz.cjs.entry.js +1 -1
  145. package/dist/cjs/sparkle-select.cjs.entry.js +1 -1
  146. package/dist/cjs/sparkle-sidebar.cjs.entry.js +1 -1
  147. package/dist/cjs/sparkle-tab.cjs.entry.js +1 -1
  148. package/dist/cjs/sparkle-table-of-contents.cjs.entry.js +1 -1
  149. package/dist/cjs/sparkle-tabs.cjs.entry.js +1 -1
  150. package/dist/cjs/sparkle-validation-error.cjs.entry.js +21 -0
  151. package/dist/cjs/sparkle-youtube.cjs.entry.js +1 -1
  152. package/dist/cjs/{spinner-configs-6f6b7ef0.js → spinner-configs-0ac05f2d.js} +43 -43
  153. package/dist/cjs/{status-tap-8697433c.js → status-tap-033befa2.js} +7 -5
  154. package/dist/cjs/stencil-async-content.cjs.entry.js +1 -1
  155. package/dist/cjs/stencil-route-link.cjs.entry.js +77 -0
  156. package/dist/cjs/stencil-route-title.cjs.entry.js +2 -2
  157. package/dist/cjs/stencil-router-prompt.cjs.entry.js +2 -2
  158. package/dist/cjs/stencil-router-redirect.cjs.entry.js +32 -0
  159. package/dist/cjs/student.service-d48f1c99.js +61 -0
  160. package/dist/cjs/{swipe-back-7e08b5e0.js → swipe-back-4a826f9b.js} +5 -5
  161. package/dist/cjs/{theme-4252ac15.js → theme-b0b295c1.js} +6 -5
  162. package/dist/cjs/user.store-8a049c4e.js +21 -0
  163. package/dist/collection/collection-manifest.json +3 -1
  164. package/dist/collection/components/sparkle-feed-post/sparkle-feed-post.css +16 -0
  165. package/dist/collection/components/sparkle-feed-post/sparkle-feed-post.js +197 -3
  166. package/dist/collection/components/sparkle-intro/sparkle-intro.css +15 -0
  167. package/dist/collection/components/sparkle-intro/sparkle-intro.js +35 -0
  168. package/dist/esm/PrivateRoute-530ef873.js +33 -0
  169. package/dist/esm/{active-router-909088d6.js → active-router-9843e205.js} +1 -1
  170. package/dist/esm/{animation-b306f6c2.js → animation-d98d3e81.js} +83 -78
  171. package/dist/esm/{app-globals-5c736ae5.js → app-globals-08edc964.js} +1 -1
  172. package/dist/esm/{PrivateRoute-b9937c45.js → auth.service-79389d86.js} +4 -32
  173. package/dist/esm/{auth.store-3ed2389e.js → auth.store-b812b34b.js} +45 -725
  174. package/dist/esm/compass-svg.entry.js +1 -1
  175. package/dist/esm/context-consumer.entry.js +1 -1
  176. package/dist/esm/course-select.entry.js +1 -1
  177. package/dist/esm/{cubic-bezier-a7ad9c8e.js → cubic-bezier-4c0db14f.js} +10 -11
  178. package/dist/esm/dom-utils-8e73e88b.js +55 -0
  179. package/dist/esm/{facilitator.service-ec0a9739.js → facilitator.service-7babc526.js} +2 -1
  180. package/dist/esm/{feed.service-33b83cb7.js → feed.service-80fbe79d.js} +3 -2
  181. package/dist/esm/{focus-visible-40cda868.js → focus-visible-4e9a0764.js} +19 -6
  182. package/dist/esm/{framework-delegate-3bc58c27.js → framework-delegate-9b329182.js} +11 -13
  183. package/dist/esm/{gesture-controller-686622ba.js → gesture-controller-7be18351.js} +1 -1
  184. package/dist/esm/{haptic-99c9e346.js → haptic-3a76a65c.js} +4 -3
  185. package/dist/esm/{hardware-back-button-b6ccf74a.js → hardware-back-button-fa04d6e9.js} +8 -8
  186. package/dist/esm/header-mobile-collapse_2.entry.js +107 -0
  187. package/dist/esm/{helpers-39367fe1.js → helpers-94a5855b.js} +81 -15
  188. package/dist/esm/httpService-b2b7a1ad.js +683 -0
  189. package/dist/esm/{icons-61dec176.js → icons-16f1a80b.js} +2 -2
  190. package/dist/esm/{index-a12c14bd.js → index-21661af2.js} +22 -19
  191. package/dist/esm/{tap-click-13f1fb0d.js → index-230a26c9.js} +30 -20
  192. package/dist/esm/{index-c26d8655.js → index-478745be.js} +17 -25
  193. package/dist/esm/{index-dc61f152.js → index-4ec6b9c2.js} +5 -2
  194. package/dist/esm/{index-9594837e.js → index-95307148.js} +19 -28
  195. package/dist/esm/{index-5568e3fa.js → index-9db08224.js} +19 -12
  196. package/dist/esm/index-ab1c6a9f.js +3067 -0
  197. package/dist/esm/{index-435af8e6.js → index-be6112f8.js} +9 -8
  198. package/dist/esm/index-c23a1826.js +128 -0
  199. package/dist/esm/index-dad75b83.js +34 -0
  200. package/dist/esm/{index.es-97dd8174.js → index.es-1c3b1ef3.js} +2 -7
  201. package/dist/esm/index.js +9 -7
  202. package/dist/esm/injectHistory-4bfff188.js +7 -0
  203. package/dist/esm/{input-shims-cc98ea92.js → input-shims-ce5c01df.js} +21 -24
  204. package/dist/esm/ion-accordion-group.entry.js +17 -9
  205. package/dist/esm/ion-accordion.entry.js +19 -23
  206. package/dist/esm/ion-action-sheet_4.entry.js +216 -212
  207. package/dist/esm/ion-app.entry.js +8 -8
  208. package/dist/esm/ion-avatar_16.entry.js +1888 -0
  209. package/dist/esm/ion-back-button.entry.js +11 -11
  210. package/dist/esm/ion-backdrop.entry.js +4 -4
  211. package/dist/esm/ion-badge.entry.js +3 -3
  212. package/dist/esm/ion-breadcrumb.entry.js +13 -21
  213. package/dist/esm/ion-breadcrumbs.entry.js +12 -14
  214. package/dist/esm/ion-buttons_3.entry.js +13 -13
  215. package/dist/esm/ion-card-header.entry.js +4 -4
  216. package/dist/esm/ion-card-subtitle.entry.js +4 -4
  217. package/dist/esm/ion-checkbox_4.entry.js +353 -0
  218. package/dist/esm/ion-chip.entry.js +3 -3
  219. package/dist/esm/ion-col_3.entry.js +153 -0
  220. package/dist/esm/ion-content_2.entry.js +59 -52
  221. package/dist/esm/ion-datetime-button.entry.js +308 -0
  222. package/dist/esm/ion-datetime.entry.js +723 -1216
  223. package/dist/esm/ion-fab-button.entry.js +25 -9
  224. package/dist/esm/ion-fab-list.entry.js +4 -4
  225. package/dist/esm/ion-fab.entry.js +15 -13
  226. package/dist/esm/ion-footer.entry.js +16 -14
  227. package/dist/esm/ion-img.entry.js +4 -4
  228. package/dist/esm/ion-infinite-scroll-content.entry.js +5 -5
  229. package/dist/esm/ion-infinite-scroll.entry.js +13 -15
  230. package/dist/esm/ion-item-divider.entry.js +4 -4
  231. package/dist/esm/ion-item-group.entry.js +3 -3
  232. package/dist/esm/ion-item-option.entry.js +8 -8
  233. package/dist/esm/ion-item-options.entry.js +5 -5
  234. package/dist/esm/ion-item-sliding.entry.js +41 -46
  235. package/dist/esm/ion-loading.entry.js +23 -35
  236. package/dist/esm/ion-menu-button.entry.js +13 -13
  237. package/dist/esm/ion-menu-toggle.entry.js +7 -7
  238. package/dist/esm/ion-menu.entry.js +47 -40
  239. package/dist/esm/ion-modal.entry.js +921 -268
  240. package/dist/esm/ion-nav-link.entry.js +2 -2
  241. package/dist/esm/ion-nav.entry.js +45 -35
  242. package/dist/esm/ion-picker-column-internal_2.entry.js +151 -43
  243. package/dist/esm/ion-picker-column.entry.js +23 -25
  244. package/dist/esm/ion-picker.entry.js +15 -17
  245. package/dist/esm/ion-progress-bar.entry.js +6 -8
  246. package/dist/esm/ion-range.entry.js +511 -0
  247. package/dist/esm/ion-refresher-content.entry.js +6 -12
  248. package/dist/esm/ion-refresher.entry.js +68 -50
  249. package/dist/esm/ion-reorder-group.entry.js +15 -16
  250. package/dist/esm/ion-reorder.entry.js +3 -3
  251. package/dist/esm/ion-route-redirect.entry.js +1 -1
  252. package/dist/esm/ion-route.entry.js +1 -1
  253. package/dist/esm/ion-router-link.entry.js +5 -5
  254. package/dist/esm/ion-router-outlet.entry.js +22 -20
  255. package/dist/esm/ion-router.entry.js +32 -31
  256. package/dist/esm/ion-searchbar.entry.js +14 -16
  257. package/dist/esm/ion-segment-button.entry.js +8 -8
  258. package/dist/esm/ion-segment.entry.js +24 -26
  259. package/dist/esm/ion-select_2.entry.js +59 -56
  260. package/dist/esm/ion-skeleton-text.entry.js +4 -4
  261. package/dist/esm/ion-slide.entry.js +3 -3
  262. package/dist/esm/ion-slides.entry.js +23 -23
  263. package/dist/esm/ion-split-pane.entry.js +10 -11
  264. package/dist/esm/ion-tab-bar.entry.js +5 -5
  265. package/dist/esm/ion-tab-button.entry.js +6 -6
  266. package/dist/esm/ion-tab.entry.js +4 -4
  267. package/dist/esm/ion-tabs.entry.js +4 -5
  268. package/dist/esm/ion-text.entry.js +20 -0
  269. package/dist/esm/ion-thumbnail.entry.js +2 -2
  270. package/dist/esm/ion-toast.entry.js +23 -43
  271. package/dist/esm/ion-virtual-scroll.entry.js +29 -28
  272. package/dist/esm/{ionic-global-0939c477.js → ionic-global-293e882b.js} +27 -31
  273. package/dist/esm/{ios.transition-b4ca8a33.js → ios.transition-7cd34deb.js} +71 -51
  274. package/dist/esm/{keyboard-2503e874.js → keyboard-7e8329b3.js} +3 -3
  275. package/dist/esm/loader.js +5 -5
  276. package/dist/esm/match-path-36fdf5c7.js +499 -0
  277. package/dist/esm/{md.transition-ca5e0322.js → md.transition-2589a5b1.js} +9 -16
  278. package/dist/esm/{menu-toggle-util-7fa22c2f.js → menu-toggle-util-f92ba2f0.js} +2 -2
  279. package/dist/esm/{overlays-34cfa9e0.js → overlays-dfa730c8.js} +30 -30
  280. package/dist/esm/parse-1ae3a9bb.js +1196 -0
  281. package/dist/esm/polyfills/css-shim.js +1 -1
  282. package/dist/esm/{purify-ffce2b4c.js → purify-79af871f.js} +1 -1
  283. package/dist/esm/sparkle-animation-player.entry.js +2 -2
  284. package/dist/esm/sparkle-card_3.entry.js +85 -0
  285. package/dist/esm/sparkle-character-intro.entry.js +1 -1
  286. package/dist/esm/sparkle-code.entry.js +2 -2
  287. package/dist/esm/sparkle-compass-post.entry.js +1 -1
  288. package/dist/esm/sparkle-compass.entry.js +1 -1
  289. package/dist/esm/sparkle-core.js +5 -5
  290. package/dist/esm/sparkle-course-root.entry.js +142 -0
  291. package/dist/esm/sparkle-dropdown.entry.js +57 -0
  292. package/dist/esm/sparkle-emoji.entry.js +1 -1
  293. package/dist/esm/{header-mobile-collapse_61.entry.js → sparkle-export-lessons_6.entry.js} +8860 -17603
  294. package/dist/esm/sparkle-facilitator-header_19.entry.js +2108 -0
  295. package/dist/esm/sparkle-facilitator-notes-form.entry.js +8 -7
  296. package/dist/esm/sparkle-feedback.entry.js +9 -7
  297. package/dist/esm/sparkle-goal-form.entry.js +9 -8
  298. package/dist/esm/sparkle-goal-progress.entry.js +15 -0
  299. package/dist/esm/sparkle-gww-comment-list.entry.js +1 -1
  300. package/dist/esm/sparkle-gww-graph.entry.js +1 -1
  301. package/dist/esm/sparkle-gww-item.entry.js +70 -0
  302. package/dist/esm/sparkle-intro.entry.js +22 -0
  303. package/dist/esm/sparkle-lower-content-nav.entry.js +1 -1
  304. package/dist/esm/sparkle-menu-collapsible.entry.js +2 -2
  305. package/dist/esm/sparkle-menu-toggle_3.entry.js +230 -0
  306. package/dist/esm/sparkle-modal-image.entry.js +1 -1
  307. package/dist/esm/sparkle-notfound-page.entry.js +1 -1
  308. package/dist/esm/sparkle-overlay.entry.js +1 -1
  309. package/dist/esm/sparkle-poll.entry.js +1 -1
  310. package/dist/esm/sparkle-quiz-container.entry.js +1 -1
  311. package/dist/esm/sparkle-quiz-feedback_5.entry.js +1 -1
  312. package/dist/esm/sparkle-quiz.entry.js +1 -1
  313. package/dist/esm/sparkle-select.entry.js +1 -1
  314. package/dist/esm/sparkle-sidebar.entry.js +1 -1
  315. package/dist/esm/sparkle-tab.entry.js +1 -1
  316. package/dist/esm/sparkle-table-of-contents.entry.js +1 -1
  317. package/dist/esm/sparkle-tabs.entry.js +1 -1
  318. package/dist/esm/sparkle-validation-error.entry.js +17 -0
  319. package/dist/esm/sparkle-youtube.entry.js +1 -1
  320. package/dist/esm/{spinner-configs-f609a655.js → spinner-configs-a37e628a.js} +43 -43
  321. package/dist/esm/{status-tap-6351a0cb.js → status-tap-79b6199d.js} +7 -5
  322. package/dist/esm/stencil-async-content.entry.js +1 -1
  323. package/dist/esm/stencil-route-link.entry.js +73 -0
  324. package/dist/esm/stencil-route-title.entry.js +2 -2
  325. package/dist/esm/stencil-router-prompt.entry.js +2 -2
  326. package/dist/esm/stencil-router-redirect.entry.js +28 -0
  327. package/dist/esm/{student.service-29b688ba.js → student.service-0caed0f4.js} +3 -18
  328. package/dist/esm/{swipe-back-34251834.js → swipe-back-ad7a0361.js} +5 -5
  329. package/dist/esm/{theme-c336c9d9.js → theme-7ef00c83.js} +6 -5
  330. package/dist/esm/user.store-8477642a.js +19 -0
  331. package/dist/esm/{util-6ef753e9.js → util-a831d09d.js} +1 -1
  332. package/dist/node_modules/@ionic/core/dist/collection/components/content/content.css +8 -1
  333. package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.ios.css +46 -22
  334. package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.md.css +43 -19
  335. package/dist/node_modules/@ionic/core/dist/collection/components/datetime-button/datetime-button.css +60 -0
  336. package/dist/node_modules/@ionic/core/dist/collection/components/item/item.ios.css +2 -1
  337. package/dist/node_modules/@ionic/core/dist/collection/components/item/item.md.css +2 -2
  338. package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.ios.css +6 -6
  339. package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.md.css +6 -6
  340. package/dist/node_modules/@ionic/core/dist/collection/components/label/label.ios.css +3 -3
  341. package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.ios.css +1 -6
  342. package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.md.css +1 -6
  343. package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.ios.css +1 -5
  344. package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.md.css +1 -5
  345. package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.ios.css +31 -3
  346. package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.md.css +29 -1
  347. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column-internal/picker-column-internal.ios.css +24 -1
  348. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column-internal/picker-column-internal.md.css +24 -1
  349. package/dist/node_modules/@ionic/core/dist/collection/components/picker-internal/picker-internal.ios.css +4 -0
  350. package/dist/node_modules/@ionic/core/dist/collection/components/picker-internal/picker-internal.md.css +4 -0
  351. package/dist/node_modules/@ionic/core/dist/collection/components/range/range.ios.css +2 -2
  352. package/dist/node_modules/@ionic/core/dist/collection/components/range/range.md.css +2 -2
  353. package/dist/node_modules/@ionic/core/dist/collection/components/spinner/spinner.css +8 -8
  354. package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.ios.css +34 -17
  355. package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.md.css +34 -17
  356. package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.ios.css +50 -1
  357. package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.md.css +27 -0
  358. package/dist/sparkle-core/index.esm.js +1 -1
  359. package/dist/sparkle-core/p-0127a61a.entry.js +1 -0
  360. package/dist/sparkle-core/p-01743e3e.js +4 -0
  361. package/dist/sparkle-core/p-06af1bc8.entry.js +1 -0
  362. package/dist/sparkle-core/{p-703ca87c.js → p-076f0239.js} +0 -0
  363. package/dist/sparkle-core/p-0798d46a.entry.js +1 -0
  364. package/dist/sparkle-core/p-085eb951.entry.js +4 -0
  365. package/dist/sparkle-core/{p-39e5a90f.entry.js → p-0b92326d.entry.js} +1 -1
  366. package/dist/sparkle-core/{p-5ff6416d.entry.js → p-0c603495.entry.js} +2 -2
  367. package/dist/sparkle-core/{p-6bbabb80.entry.js → p-0d7cceaa.entry.js} +1 -1
  368. package/dist/sparkle-core/p-0d813026.entry.js +1 -0
  369. package/dist/sparkle-core/{p-69e7783d.js → p-0e4de1d0.js} +0 -0
  370. package/dist/sparkle-core/p-11ed6b7f.entry.js +1 -0
  371. package/dist/sparkle-core/p-122427b7.entry.js +1 -0
  372. package/dist/sparkle-core/p-12c4f45c.entry.js +1 -0
  373. package/dist/sparkle-core/p-136b93d5.entry.js +4 -0
  374. package/dist/sparkle-core/{p-e225581a.js → p-1394cbb8.js} +2 -2
  375. package/dist/sparkle-core/{p-c48bbc7c.entry.js → p-14340143.entry.js} +1 -1
  376. package/dist/sparkle-core/p-14a06a91.entry.js +1 -0
  377. package/dist/sparkle-core/{p-a9ee3f6d.entry.js → p-16b7974e.entry.js} +1 -1
  378. package/dist/sparkle-core/p-16c81890.entry.js +1 -0
  379. package/dist/sparkle-core/{p-5c9aa1f9.entry.js → p-1701723e.entry.js} +1 -1
  380. package/dist/sparkle-core/p-1728ead7.js +1 -0
  381. package/dist/sparkle-core/p-17aef6f9.js +1 -0
  382. package/dist/sparkle-core/p-180857a2.entry.js +1 -0
  383. package/dist/sparkle-core/p-1acc7870.entry.js +1 -0
  384. package/dist/sparkle-core/{p-513794b0.js → p-1c2aee9c.js} +1 -1
  385. package/dist/sparkle-core/p-1cd4c3cc.entry.js +1 -0
  386. package/dist/sparkle-core/p-21d9833d.js +1 -0
  387. package/dist/sparkle-core/p-23d713e2.js +1 -0
  388. package/dist/sparkle-core/p-25c13612.entry.js +1 -0
  389. package/dist/sparkle-core/p-2699868a.entry.js +1 -0
  390. package/dist/sparkle-core/p-27075abe.js +4 -0
  391. package/dist/sparkle-core/{p-713590fc.js → p-280e938d.js} +1 -1
  392. package/dist/sparkle-core/p-2bd4c60e.js +1 -0
  393. package/dist/sparkle-core/p-2c89a6c2.entry.js +1 -0
  394. package/dist/sparkle-core/p-308517b3.js +4 -0
  395. package/dist/sparkle-core/p-3227afcb.entry.js +1 -0
  396. package/dist/sparkle-core/{p-173d5461.entry.js → p-34d93a39.entry.js} +1 -1
  397. package/dist/sparkle-core/p-34ebfc8a.entry.js +1 -0
  398. package/dist/sparkle-core/p-351b82a8.entry.js +1 -0
  399. package/dist/sparkle-core/p-363a2d6d.js +4 -0
  400. package/dist/sparkle-core/p-36c48760.entry.js +1 -0
  401. package/dist/sparkle-core/p-3810777d.js +4 -0
  402. package/dist/sparkle-core/p-384911d7.entry.js +1 -0
  403. package/dist/sparkle-core/p-3b618eda.entry.js +1 -0
  404. package/dist/sparkle-core/p-3c752205.entry.js +1 -0
  405. package/dist/sparkle-core/{p-50aac721.entry.js → p-3d2c0e24.entry.js} +2 -2
  406. package/dist/sparkle-core/{p-350adbaa.entry.js → p-3eb56165.entry.js} +1 -1
  407. package/dist/sparkle-core/{p-ed0e9d29.entry.js → p-3ef53ebf.entry.js} +1 -1
  408. package/dist/sparkle-core/{p-fbd7eeca.entry.js → p-3fd92216.entry.js} +1 -1
  409. package/dist/sparkle-core/{p-1df05176.js → p-4338e1e3.js} +2 -2
  410. package/dist/sparkle-core/p-442eadcf.entry.js +1 -0
  411. package/dist/sparkle-core/{p-5f45d206.entry.js → p-4af496a8.entry.js} +1 -1
  412. package/dist/sparkle-core/{p-935e7cfc.js → p-4bd4dab2.js} +1 -1
  413. package/dist/sparkle-core/{p-18e62133.entry.js → p-4c9e010d.entry.js} +1 -1
  414. package/dist/sparkle-core/p-4d0dfbc9.js +1 -0
  415. package/dist/sparkle-core/{p-8c6b6038.js → p-4d4077ea.js} +0 -0
  416. package/dist/sparkle-core/p-4e0502b8.entry.js +4 -0
  417. package/dist/sparkle-core/p-506f3c5f.js +4 -0
  418. package/dist/sparkle-core/p-524a6174.entry.js +1 -0
  419. package/dist/sparkle-core/p-53aac9d7.entry.js +1 -0
  420. package/dist/sparkle-core/{p-0580419b.entry.js → p-56700a40.entry.js} +1 -1
  421. package/dist/sparkle-core/p-5722be24.entry.js +1 -0
  422. package/dist/sparkle-core/p-58389020.entry.js +348 -0
  423. package/dist/sparkle-core/{p-11cf398a.entry.js → p-58f74119.entry.js} +1 -1
  424. package/dist/sparkle-core/p-5979f253.entry.js +1 -0
  425. package/dist/sparkle-core/p-5a3de051.entry.js +4 -0
  426. package/dist/sparkle-core/p-5a850731.entry.js +1 -0
  427. package/dist/sparkle-core/{p-950effe7.entry.js → p-5dcf33fb.entry.js} +1 -1
  428. package/dist/sparkle-core/p-5e8fa1ac.entry.js +1 -0
  429. package/dist/sparkle-core/p-5ef50959.js +1 -0
  430. package/dist/sparkle-core/p-615b8f64.entry.js +1 -0
  431. package/dist/sparkle-core/{p-90389886.entry.js → p-63d8a5b7.entry.js} +1 -1
  432. package/dist/sparkle-core/p-6a337ad1.entry.js +1 -0
  433. package/dist/sparkle-core/p-6a5ace01.js +2 -0
  434. package/dist/sparkle-core/{p-d7baf31e.entry.js → p-6ae9c743.entry.js} +1 -1
  435. package/dist/sparkle-core/p-76206f80.entry.js +1 -0
  436. package/dist/sparkle-core/{p-99b43ee1.entry.js → p-767c9db8.entry.js} +1 -1
  437. package/dist/sparkle-core/p-76a6e202.entry.js +1 -0
  438. package/dist/sparkle-core/{p-ee0d7f19.entry.js → p-785f1879.entry.js} +1 -1
  439. package/dist/sparkle-core/p-788735b9.entry.js +1 -0
  440. package/dist/sparkle-core/{p-057f6a23.entry.js → p-7b21bd70.entry.js} +1 -1
  441. package/dist/sparkle-core/p-7b3d1457.js +1 -0
  442. package/dist/sparkle-core/p-7d8427eb.js +4 -0
  443. package/dist/sparkle-core/{p-5264da79.js → p-7e7ce516.js} +0 -0
  444. package/dist/sparkle-core/{p-838fa86d.entry.js → p-8cbe019a.entry.js} +5 -5
  445. package/dist/sparkle-core/{p-9c1772c3.js → p-8d630960.js} +1 -1
  446. package/dist/sparkle-core/{p-7052c43a.entry.js → p-8e42e634.entry.js} +1 -1
  447. package/dist/sparkle-core/p-8e56f9ee.entry.js +1 -0
  448. package/dist/sparkle-core/p-8ed0cefb.entry.js +1 -0
  449. package/dist/sparkle-core/{p-d4c07aca.js → p-924b2917.js} +0 -0
  450. package/dist/sparkle-core/p-9484e34b.entry.js +1 -0
  451. package/dist/sparkle-core/p-966817ec.js +1 -0
  452. package/dist/sparkle-core/p-969e98e5.entry.js +1 -0
  453. package/dist/sparkle-core/p-98f3925b.js +4 -0
  454. package/dist/sparkle-core/{p-a1cab0f3.js → p-99231c00.js} +2 -2
  455. package/dist/sparkle-core/p-9a383065.entry.js +7 -0
  456. package/dist/sparkle-core/p-9b4979b5.entry.js +4 -0
  457. package/dist/sparkle-core/{p-c69b0a7a.entry.js → p-9cd95e7e.entry.js} +1 -1
  458. package/dist/sparkle-core/p-9dc42d70.entry.js +1 -0
  459. package/dist/sparkle-core/p-9eea81f2.js +1 -0
  460. package/dist/sparkle-core/{p-797c23ed.entry.js → p-9ef14088.entry.js} +1 -1
  461. package/dist/sparkle-core/p-a05871e6.js +1 -0
  462. package/dist/sparkle-core/p-a111c567.entry.js +1 -0
  463. package/dist/sparkle-core/{p-1af044f7.js → p-a19b42f0.js} +1 -1
  464. package/dist/sparkle-core/p-a208ab2d.js +4 -0
  465. package/dist/sparkle-core/p-a2f7c751.entry.js +1 -0
  466. package/dist/sparkle-core/p-a458b415.entry.js +1 -0
  467. package/dist/sparkle-core/p-a6c1a55a.entry.js +5 -0
  468. package/dist/sparkle-core/{p-145e40f5.entry.js → p-ab3a8f5e.entry.js} +1 -1
  469. package/dist/sparkle-core/p-ac0e4d8c.entry.js +1 -0
  470. package/dist/sparkle-core/p-add30d46.js +4 -0
  471. package/dist/sparkle-core/{p-5b40aae5.entry.js → p-b00d0a47.entry.js} +1 -1
  472. package/dist/sparkle-core/p-b2827978.entry.js +1 -0
  473. package/dist/sparkle-core/p-b8ba8164.entry.js +1 -0
  474. package/dist/sparkle-core/{p-6823e6c1.entry.js → p-ba775d8e.entry.js} +1 -1
  475. package/dist/sparkle-core/{p-37c00e39.entry.js → p-bae8cd7d.entry.js} +1 -1
  476. package/dist/sparkle-core/p-bb3e3482.entry.js +1 -0
  477. package/dist/sparkle-core/p-bb575dba.entry.js +1 -0
  478. package/dist/sparkle-core/p-bd2c8e30.entry.js +10 -0
  479. package/dist/sparkle-core/p-c48352cf.js +4 -0
  480. package/dist/sparkle-core/{p-667accac.entry.js → p-c5eb4404.entry.js} +1 -1
  481. package/dist/sparkle-core/p-c8ad5a5b.entry.js +4 -0
  482. package/dist/sparkle-core/p-c9f474d0.js +4 -0
  483. package/dist/sparkle-core/p-ca0edc9b.entry.js +1 -0
  484. package/dist/sparkle-core/{p-680663a2.entry.js → p-cb04b18a.entry.js} +1 -1
  485. package/dist/sparkle-core/{p-b3909012.entry.js → p-d0d0e5e5.entry.js} +1 -1
  486. package/dist/sparkle-core/{p-7d61177b.entry.js → p-d220a642.entry.js} +1 -1
  487. package/dist/sparkle-core/p-d38a2511.entry.js +1 -0
  488. package/dist/sparkle-core/{p-b07a2cf2.entry.js → p-d5b8302f.entry.js} +1 -1
  489. package/dist/sparkle-core/p-d5ba8e80.entry.js +1 -0
  490. package/dist/sparkle-core/{p-3a202a38.entry.js → p-d6637b48.entry.js} +1 -1
  491. package/dist/sparkle-core/p-d6788642.entry.js +1 -0
  492. package/dist/sparkle-core/p-d6a3a639.entry.js +1 -0
  493. package/dist/sparkle-core/p-d86f8633.entry.js +1 -0
  494. package/dist/sparkle-core/{p-9cfdeb18.entry.js → p-defeaa5c.entry.js} +1 -1
  495. package/dist/sparkle-core/p-df5cfa7f.entry.js +1 -0
  496. package/dist/sparkle-core/p-df5efe0d.entry.js +1 -0
  497. package/dist/sparkle-core/p-dff8325e.js +4 -0
  498. package/dist/sparkle-core/p-e09de7ac.js +1 -0
  499. package/dist/sparkle-core/{p-016a7aaf.entry.js → p-e1743d82.entry.js} +1 -1
  500. package/dist/sparkle-core/p-e28a106d.entry.js +1 -0
  501. package/dist/sparkle-core/p-e566c0b3.entry.js +1 -0
  502. package/dist/sparkle-core/{p-bca0e465.entry.js → p-e6d39f6e.entry.js} +1 -1
  503. package/dist/sparkle-core/p-e9431eeb.js +7 -0
  504. package/dist/sparkle-core/p-ea4a9f0d.entry.js +1 -0
  505. package/dist/sparkle-core/p-ea7d7a3b.js +1 -0
  506. package/dist/sparkle-core/p-eaa8bbee.js +4 -0
  507. package/dist/sparkle-core/p-ed3dfd89.js +4 -0
  508. package/dist/sparkle-core/{p-3defe550.entry.js → p-efe37368.entry.js} +1 -1
  509. package/dist/sparkle-core/p-f187d129.entry.js +1 -0
  510. package/dist/sparkle-core/{p-a9ccb0df.js → p-f3cba72a.js} +0 -0
  511. package/dist/sparkle-core/{p-052caa63.js → p-f5e7bfa5.js} +1 -1
  512. package/dist/sparkle-core/{p-ecd39170.entry.js → p-f63a13d8.entry.js} +1 -1
  513. package/dist/sparkle-core/{p-1726da2f.entry.js → p-fdb9a613.entry.js} +1 -1
  514. package/dist/sparkle-core/p-fde96f7c.js +4 -0
  515. package/dist/sparkle-core/{p-aa87c7f0.entry.js → p-fe214d79.entry.js} +1 -1
  516. package/dist/sparkle-core/p-fe3a7bca.js +1 -0
  517. package/dist/sparkle-core/{p-aa9ebc39.entry.js → p-fea20ec2.entry.js} +1 -1
  518. package/dist/sparkle-core/p-ff26d891.entry.js +1 -0
  519. package/dist/sparkle-core/sparkle-core.css +1 -1
  520. package/dist/sparkle-core/sparkle-core.esm.js +1 -1
  521. package/dist/types/components/sparkle-feed-post/sparkle-feed-post.d.ts +16 -0
  522. package/dist/types/components/sparkle-intro/sparkle-intro.d.ts +7 -0
  523. package/dist/types/components.d.ts +73 -11
  524. package/package.json +3 -3
  525. package/dist/cjs/ion-card-title.cjs.entry.js +0 -30
  526. package/dist/cjs/ion-textarea.cjs.entry.js +0 -247
  527. package/dist/cjs/ion-toggle.cjs.entry.js +0 -160
  528. package/dist/cjs/sparkle-feed-post.cjs.entry.js +0 -19
  529. package/dist/cjs/student.service-744c3155.js +0 -77
  530. package/dist/esm/ion-card-title.entry.js +0 -26
  531. package/dist/esm/ion-textarea.entry.js +0 -243
  532. package/dist/esm/ion-toggle.entry.js +0 -156
  533. package/dist/esm/sparkle-feed-post.entry.js +0 -15
  534. package/dist/sparkle-core/p-0187adef.entry.js +0 -1
  535. package/dist/sparkle-core/p-03189863.js +0 -1
  536. package/dist/sparkle-core/p-03ec54a8.entry.js +0 -1
  537. package/dist/sparkle-core/p-04583c51.entry.js +0 -1
  538. package/dist/sparkle-core/p-063cd168.js +0 -4
  539. package/dist/sparkle-core/p-081968cc.entry.js +0 -1
  540. package/dist/sparkle-core/p-0934f5dd.entry.js +0 -1
  541. package/dist/sparkle-core/p-0f899097.entry.js +0 -352
  542. package/dist/sparkle-core/p-1339830f.entry.js +0 -1
  543. package/dist/sparkle-core/p-1b78dea1.entry.js +0 -1
  544. package/dist/sparkle-core/p-1cef8572.js +0 -4
  545. package/dist/sparkle-core/p-21bf4ca0.entry.js +0 -1
  546. package/dist/sparkle-core/p-21db4e8e.entry.js +0 -1
  547. package/dist/sparkle-core/p-23a9f7d1.entry.js +0 -1
  548. package/dist/sparkle-core/p-289a35ed.entry.js +0 -1
  549. package/dist/sparkle-core/p-2ee6a5f9.entry.js +0 -1
  550. package/dist/sparkle-core/p-35a7bd6c.entry.js +0 -1
  551. package/dist/sparkle-core/p-389500fd.js +0 -4
  552. package/dist/sparkle-core/p-45e6db62.entry.js +0 -1
  553. package/dist/sparkle-core/p-48f9b960.entry.js +0 -1
  554. package/dist/sparkle-core/p-4dc3ef96.entry.js +0 -1
  555. package/dist/sparkle-core/p-547b70c6.entry.js +0 -1
  556. package/dist/sparkle-core/p-5598650a.entry.js +0 -1
  557. package/dist/sparkle-core/p-55ae49e1.js +0 -4
  558. package/dist/sparkle-core/p-58e98f89.entry.js +0 -1
  559. package/dist/sparkle-core/p-59f7bf6e.entry.js +0 -1
  560. package/dist/sparkle-core/p-5a3d0e6b.js +0 -4
  561. package/dist/sparkle-core/p-5d2e54ee.entry.js +0 -1
  562. package/dist/sparkle-core/p-62a6c96f.entry.js +0 -1
  563. package/dist/sparkle-core/p-64e72f8f.js +0 -4
  564. package/dist/sparkle-core/p-660e0742.js +0 -1
  565. package/dist/sparkle-core/p-6bf07a28.js +0 -1
  566. package/dist/sparkle-core/p-6c6145cd.js +0 -4
  567. package/dist/sparkle-core/p-6c90bde6.entry.js +0 -5
  568. package/dist/sparkle-core/p-6e88764b.entry.js +0 -4
  569. package/dist/sparkle-core/p-6ee40949.js +0 -1
  570. package/dist/sparkle-core/p-6fbe3ca3.entry.js +0 -1
  571. package/dist/sparkle-core/p-6fd4985d.js +0 -4
  572. package/dist/sparkle-core/p-70b2452c.js +0 -4
  573. package/dist/sparkle-core/p-7493ee15.entry.js +0 -1
  574. package/dist/sparkle-core/p-75572037.js +0 -1
  575. package/dist/sparkle-core/p-768bcc9e.entry.js +0 -1
  576. package/dist/sparkle-core/p-7e61973d.entry.js +0 -7
  577. package/dist/sparkle-core/p-855ca600.js +0 -1
  578. package/dist/sparkle-core/p-857f3696.entry.js +0 -1
  579. package/dist/sparkle-core/p-8fe2e51f.entry.js +0 -4
  580. package/dist/sparkle-core/p-932bfb69.entry.js +0 -1
  581. package/dist/sparkle-core/p-941eaa3a.entry.js +0 -1
  582. package/dist/sparkle-core/p-95004267.entry.js +0 -1
  583. package/dist/sparkle-core/p-996361f9.entry.js +0 -1
  584. package/dist/sparkle-core/p-9a17f2ad.js +0 -4
  585. package/dist/sparkle-core/p-9babd345.js +0 -1
  586. package/dist/sparkle-core/p-a080e768.entry.js +0 -1
  587. package/dist/sparkle-core/p-a7cc0052.entry.js +0 -4
  588. package/dist/sparkle-core/p-ae1f145d.entry.js +0 -1
  589. package/dist/sparkle-core/p-b3e6427d.js +0 -7
  590. package/dist/sparkle-core/p-b49ca0ea.entry.js +0 -1
  591. package/dist/sparkle-core/p-b81e20fe.entry.js +0 -4
  592. package/dist/sparkle-core/p-c1279cc9.entry.js +0 -1
  593. package/dist/sparkle-core/p-c1376096.entry.js +0 -1
  594. package/dist/sparkle-core/p-c3986a52.entry.js +0 -1
  595. package/dist/sparkle-core/p-c3d3d5c4.entry.js +0 -1
  596. package/dist/sparkle-core/p-c5b9bdd6.entry.js +0 -1
  597. package/dist/sparkle-core/p-cbbeed67.entry.js +0 -1
  598. package/dist/sparkle-core/p-d4a435f8.entry.js +0 -1
  599. package/dist/sparkle-core/p-d5b05ece.entry.js +0 -5
  600. package/dist/sparkle-core/p-d8d3524a.js +0 -1
  601. package/dist/sparkle-core/p-e0fced48.entry.js +0 -1
  602. package/dist/sparkle-core/p-e1cba44b.entry.js +0 -4
  603. package/dist/sparkle-core/p-e3fdd0a8.entry.js +0 -1
  604. package/dist/sparkle-core/p-e6b66cef.entry.js +0 -1
  605. package/dist/sparkle-core/p-e72d4450.js +0 -4
  606. package/dist/sparkle-core/p-eb70a23c.entry.js +0 -1
  607. package/dist/sparkle-core/p-f4001fdf.js +0 -4
  608. package/dist/sparkle-core/p-f9b73032.entry.js +0 -1
  609. package/dist/sparkle-core/p-faa912d7.entry.js +0 -1
  610. package/dist/sparkle-core/p-fc933591.entry.js +0 -1
  611. package/dist/sparkle-core/p-fef04ab5.js +0 -4
@@ -0,0 +1,1237 @@
1
+ 'use strict';
2
+
3
+ const index = require('./index-e56e09b8.js');
4
+
5
+ /*!
6
+ * (C) Ionic http://ionicframework.com - MIT License
7
+ */
8
+ /**
9
+ * Returns true if the selected day is equal to the reference day
10
+ */
11
+ const isSameDay = (baseParts, compareParts) => {
12
+ return (baseParts.month === compareParts.month && baseParts.day === compareParts.day && baseParts.year === compareParts.year);
13
+ };
14
+ /**
15
+ * Returns true is the selected day is before the reference day.
16
+ */
17
+ const isBefore = (baseParts, compareParts) => {
18
+ return (baseParts.year < compareParts.year ||
19
+ (baseParts.year === compareParts.year && baseParts.month < compareParts.month) ||
20
+ (baseParts.year === compareParts.year &&
21
+ baseParts.month === compareParts.month &&
22
+ baseParts.day &&
23
+ baseParts.day < compareParts.day));
24
+ };
25
+ /**
26
+ * Returns true is the selected day is after the reference day.
27
+ */
28
+ const isAfter = (baseParts, compareParts) => {
29
+ return (baseParts.year > compareParts.year ||
30
+ (baseParts.year === compareParts.year && baseParts.month > compareParts.month) ||
31
+ (baseParts.year === compareParts.year &&
32
+ baseParts.month === compareParts.month &&
33
+ baseParts.day &&
34
+ baseParts.day > compareParts.day));
35
+ };
36
+ const warnIfValueOutOfBounds = (value, min, max) => {
37
+ const valueArray = Array.isArray(value) ? value : [value];
38
+ for (const val of valueArray) {
39
+ if ((min && isBefore(val, min)) || (max && isAfter(val, max))) {
40
+ index.printIonWarning('The value provided to ion-datetime is out of bounds.\n\n' +
41
+ `Min: ${JSON.stringify(min)}\n` +
42
+ `Max: ${JSON.stringify(max)}\n` +
43
+ `Value: ${JSON.stringify(value)}`);
44
+ break;
45
+ }
46
+ }
47
+ };
48
+
49
+ /*!
50
+ * (C) Ionic http://ionicframework.com - MIT License
51
+ */
52
+ /**
53
+ * Determines if given year is a
54
+ * leap year. Returns `true` if year
55
+ * is a leap year. Returns `false`
56
+ * otherwise.
57
+ */
58
+ const isLeapYear = (year) => {
59
+ return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
60
+ };
61
+ const is24Hour = (locale, hourCycle) => {
62
+ /**
63
+ * If developer has explicitly enabled h23 time
64
+ * then return early and do not look at the system default.
65
+ */
66
+ if (hourCycle !== undefined) {
67
+ return hourCycle === 'h23';
68
+ }
69
+ /**
70
+ * If hourCycle was not specified, check the locale
71
+ * that is set on the user's device. We first check the
72
+ * Intl.DateTimeFormat hourCycle option as developers can encode this
73
+ * option into the locale string. Example: `en-US-u-hc-h23`
74
+ */
75
+ const formatted = new Intl.DateTimeFormat(locale, { hour: 'numeric' });
76
+ const options = formatted.resolvedOptions();
77
+ if (options.hourCycle !== undefined) {
78
+ return options.hourCycle === 'h23';
79
+ }
80
+ /**
81
+ * If hourCycle is not specified (either through lack
82
+ * of browser support or locale information) then fall
83
+ * back to this slower hourCycle check.
84
+ */
85
+ const date = new Date('5/18/2021 00:00');
86
+ const parts = formatted.formatToParts(date);
87
+ const hour = parts.find((p) => p.type === 'hour');
88
+ if (!hour) {
89
+ throw new Error('Hour value not found from DateTimeFormat');
90
+ }
91
+ return hour.value === '00';
92
+ };
93
+ /**
94
+ * Given a date object, returns the number
95
+ * of days in that month.
96
+ * Month value begin at 1, not 0.
97
+ * i.e. January = month 1.
98
+ */
99
+ const getNumDaysInMonth = (month, year) => {
100
+ return month === 4 || month === 6 || month === 9 || month === 11
101
+ ? 30
102
+ : month === 2
103
+ ? isLeapYear(year)
104
+ ? 29
105
+ : 28
106
+ : 31;
107
+ };
108
+ /**
109
+ * Certain locales display month then year while
110
+ * others display year then month.
111
+ * We can use Intl.DateTimeFormat to determine
112
+ * the ordering for each locale.
113
+ * The formatOptions param can be used to customize
114
+ * which pieces of a date to compare against the month
115
+ * with. For example, some locales render dd/mm/yyyy
116
+ * while others render mm/dd/yyyy. This function can be
117
+ * used for variations of the same "month first" check.
118
+ */
119
+ const isMonthFirstLocale = (locale, formatOptions = {
120
+ month: 'numeric',
121
+ year: 'numeric',
122
+ }) => {
123
+ /**
124
+ * By setting month and year we guarantee that only
125
+ * month, year, and literal (slashes '/', for example)
126
+ * values are included in the formatToParts results.
127
+ *
128
+ * The ordering of the parts will be determined by
129
+ * the locale. So if the month is the first value,
130
+ * then we know month should be shown first. If the
131
+ * year is the first value, then we know year should be shown first.
132
+ *
133
+ * This ordering can be controlled by customizing the locale property.
134
+ */
135
+ const parts = new Intl.DateTimeFormat(locale, formatOptions).formatToParts(new Date());
136
+ return parts[0].type === 'month';
137
+ };
138
+ /**
139
+ * Determines if the given locale formats the day period (am/pm) to the
140
+ * left or right of the hour.
141
+ * @param locale The locale to check.
142
+ * @returns `true` if the locale formats the day period to the left of the hour.
143
+ */
144
+ const isLocaleDayPeriodRTL = (locale) => {
145
+ const parts = new Intl.DateTimeFormat(locale, { hour: 'numeric' }).formatToParts(new Date());
146
+ return parts[0].type === 'dayPeriod';
147
+ };
148
+
149
+ /*!
150
+ * (C) Ionic http://ionicframework.com - MIT License
151
+ */
152
+ const twoDigit = (val) => {
153
+ return ('0' + (val !== undefined ? Math.abs(val) : '0')).slice(-2);
154
+ };
155
+ const fourDigit = (val) => {
156
+ return ('000' + (val !== undefined ? Math.abs(val) : '0')).slice(-4);
157
+ };
158
+ function convertDataToISO(data) {
159
+ if (Array.isArray(data)) {
160
+ return data.map((parts) => convertDataToISO(parts));
161
+ }
162
+ // https://www.w3.org/TR/NOTE-datetime
163
+ let rtn = '';
164
+ if (data.year !== undefined) {
165
+ // YYYY
166
+ rtn = fourDigit(data.year);
167
+ if (data.month !== undefined) {
168
+ // YYYY-MM
169
+ rtn += '-' + twoDigit(data.month);
170
+ if (data.day !== undefined) {
171
+ // YYYY-MM-DD
172
+ rtn += '-' + twoDigit(data.day);
173
+ if (data.hour !== undefined) {
174
+ // YYYY-MM-DDTHH:mm:SS
175
+ rtn += `T${twoDigit(data.hour)}:${twoDigit(data.minute)}:00`;
176
+ if (data.tzOffset === undefined) {
177
+ // YYYY-MM-DDTHH:mm:SSZ
178
+ rtn += 'Z';
179
+ }
180
+ else {
181
+ // YYYY-MM-DDTHH:mm:SS+/-HH:mm
182
+ rtn +=
183
+ (data.tzOffset > 0 ? '+' : '-') +
184
+ twoDigit(Math.floor(Math.abs(data.tzOffset / 60))) +
185
+ ':' +
186
+ twoDigit(data.tzOffset % 60);
187
+ }
188
+ }
189
+ }
190
+ }
191
+ }
192
+ else if (data.hour !== undefined) {
193
+ // HH:mm
194
+ rtn = twoDigit(data.hour) + ':' + twoDigit(data.minute);
195
+ }
196
+ return rtn;
197
+ }
198
+ /**
199
+ * Converts an 12 hour value to 24 hours.
200
+ */
201
+ const convert12HourTo24Hour = (hour, ampm) => {
202
+ if (ampm === undefined) {
203
+ return hour;
204
+ }
205
+ /**
206
+ * If AM and 12am
207
+ * then return 00:00.
208
+ * Otherwise just return
209
+ * the hour since it is
210
+ * already in 24 hour format.
211
+ */
212
+ if (ampm === 'am') {
213
+ if (hour === 12) {
214
+ return 0;
215
+ }
216
+ return hour;
217
+ }
218
+ /**
219
+ * If PM and 12pm
220
+ * just return 12:00
221
+ * since it is already
222
+ * in 24 hour format.
223
+ * Otherwise add 12 hours
224
+ * to the time.
225
+ */
226
+ if (hour === 12) {
227
+ return 12;
228
+ }
229
+ return hour + 12;
230
+ };
231
+ const getStartOfWeek = (refParts) => {
232
+ const { dayOfWeek } = refParts;
233
+ if (dayOfWeek === null || dayOfWeek === undefined) {
234
+ throw new Error('No day of week provided');
235
+ }
236
+ return subtractDays(refParts, dayOfWeek);
237
+ };
238
+ const getEndOfWeek = (refParts) => {
239
+ const { dayOfWeek } = refParts;
240
+ if (dayOfWeek === null || dayOfWeek === undefined) {
241
+ throw new Error('No day of week provided');
242
+ }
243
+ return addDays(refParts, 6 - dayOfWeek);
244
+ };
245
+ const getNextDay = (refParts) => {
246
+ return addDays(refParts, 1);
247
+ };
248
+ const getPreviousDay = (refParts) => {
249
+ return subtractDays(refParts, 1);
250
+ };
251
+ const getPreviousWeek = (refParts) => {
252
+ return subtractDays(refParts, 7);
253
+ };
254
+ const getNextWeek = (refParts) => {
255
+ return addDays(refParts, 7);
256
+ };
257
+ /**
258
+ * Given datetime parts, subtract
259
+ * numDays from the date.
260
+ * Returns a new DatetimeParts object
261
+ * Currently can only go backward at most 1 month.
262
+ */
263
+ const subtractDays = (refParts, numDays) => {
264
+ const { month, day, year } = refParts;
265
+ if (day === null) {
266
+ throw new Error('No day provided');
267
+ }
268
+ const workingParts = {
269
+ month,
270
+ day,
271
+ year,
272
+ };
273
+ workingParts.day = day - numDays;
274
+ /**
275
+ * If wrapping to previous month
276
+ * update days and decrement month
277
+ */
278
+ if (workingParts.day < 1) {
279
+ workingParts.month -= 1;
280
+ }
281
+ /**
282
+ * If moving to previous year, reset
283
+ * month to December and decrement year
284
+ */
285
+ if (workingParts.month < 1) {
286
+ workingParts.month = 12;
287
+ workingParts.year -= 1;
288
+ }
289
+ /**
290
+ * Determine how many days are in the current
291
+ * month
292
+ */
293
+ if (workingParts.day < 1) {
294
+ const daysInMonth = getNumDaysInMonth(workingParts.month, workingParts.year);
295
+ /**
296
+ * Take num days in month and add the
297
+ * number of underflow days. This number will
298
+ * be negative.
299
+ * Example: 1 week before Jan 2, 2021 is
300
+ * December 26, 2021 so:
301
+ * 2 - 7 = -5
302
+ * 31 + (-5) = 26
303
+ */
304
+ workingParts.day = daysInMonth + workingParts.day;
305
+ }
306
+ return workingParts;
307
+ };
308
+ /**
309
+ * Given datetime parts, add
310
+ * numDays to the date.
311
+ * Returns a new DatetimeParts object
312
+ * Currently can only go forward at most 1 month.
313
+ */
314
+ const addDays = (refParts, numDays) => {
315
+ const { month, day, year } = refParts;
316
+ if (day === null) {
317
+ throw new Error('No day provided');
318
+ }
319
+ const workingParts = {
320
+ month,
321
+ day,
322
+ year,
323
+ };
324
+ const daysInMonth = getNumDaysInMonth(month, year);
325
+ workingParts.day = day + numDays;
326
+ /**
327
+ * If wrapping to next month
328
+ * update days and increment month
329
+ */
330
+ if (workingParts.day > daysInMonth) {
331
+ workingParts.day -= daysInMonth;
332
+ workingParts.month += 1;
333
+ }
334
+ /**
335
+ * If moving to next year, reset
336
+ * month to January and increment year
337
+ */
338
+ if (workingParts.month > 12) {
339
+ workingParts.month = 1;
340
+ workingParts.year += 1;
341
+ }
342
+ return workingParts;
343
+ };
344
+ /**
345
+ * Given DatetimeParts, generate the previous month.
346
+ */
347
+ const getPreviousMonth = (refParts) => {
348
+ /**
349
+ * If current month is January, wrap backwards
350
+ * to December of the previous year.
351
+ */
352
+ const month = refParts.month === 1 ? 12 : refParts.month - 1;
353
+ const year = refParts.month === 1 ? refParts.year - 1 : refParts.year;
354
+ const numDaysInMonth = getNumDaysInMonth(month, year);
355
+ const day = numDaysInMonth < refParts.day ? numDaysInMonth : refParts.day;
356
+ return { month, year, day };
357
+ };
358
+ /**
359
+ * Given DatetimeParts, generate the next month.
360
+ */
361
+ const getNextMonth = (refParts) => {
362
+ /**
363
+ * If current month is December, wrap forwards
364
+ * to January of the next year.
365
+ */
366
+ const month = refParts.month === 12 ? 1 : refParts.month + 1;
367
+ const year = refParts.month === 12 ? refParts.year + 1 : refParts.year;
368
+ const numDaysInMonth = getNumDaysInMonth(month, year);
369
+ const day = numDaysInMonth < refParts.day ? numDaysInMonth : refParts.day;
370
+ return { month, year, day };
371
+ };
372
+ const changeYear = (refParts, yearDelta) => {
373
+ const month = refParts.month;
374
+ const year = refParts.year + yearDelta;
375
+ const numDaysInMonth = getNumDaysInMonth(month, year);
376
+ const day = numDaysInMonth < refParts.day ? numDaysInMonth : refParts.day;
377
+ return { month, year, day };
378
+ };
379
+ /**
380
+ * Given DatetimeParts, generate the previous year.
381
+ */
382
+ const getPreviousYear = (refParts) => {
383
+ return changeYear(refParts, -1);
384
+ };
385
+ /**
386
+ * Given DatetimeParts, generate the next year.
387
+ */
388
+ const getNextYear = (refParts) => {
389
+ return changeYear(refParts, 1);
390
+ };
391
+ /**
392
+ * If PM, then internal value should
393
+ * be converted to 24-hr time.
394
+ * Does not apply when public
395
+ * values are already 24-hr time.
396
+ */
397
+ const getInternalHourValue = (hour, use24Hour, ampm) => {
398
+ if (use24Hour) {
399
+ return hour;
400
+ }
401
+ return convert12HourTo24Hour(hour, ampm);
402
+ };
403
+ /**
404
+ * Unless otherwise stated, all month values are
405
+ * 1 indexed instead of the typical 0 index in JS Date.
406
+ * Example:
407
+ * January = Month 0 when using JS Date
408
+ * January = Month 1 when using this datetime util
409
+ */
410
+ /**
411
+ * Given the current datetime parts and a new AM/PM value
412
+ * calculate what the hour should be in 24-hour time format.
413
+ * Used when toggling the AM/PM segment since we store our hours
414
+ * in 24-hour time format internally.
415
+ */
416
+ const calculateHourFromAMPM = (currentParts, newAMPM) => {
417
+ const { ampm: currentAMPM, hour } = currentParts;
418
+ let newHour = hour;
419
+ /**
420
+ * If going from AM --> PM, need to update the
421
+ *
422
+ */
423
+ if (currentAMPM === 'am' && newAMPM === 'pm') {
424
+ newHour = convert12HourTo24Hour(newHour, 'pm');
425
+ /**
426
+ * If going from PM --> AM
427
+ */
428
+ }
429
+ else if (currentAMPM === 'pm' && newAMPM === 'am') {
430
+ newHour = Math.abs(newHour - 12);
431
+ }
432
+ return newHour;
433
+ };
434
+
435
+ /*!
436
+ * (C) Ionic http://ionicframework.com - MIT License
437
+ */
438
+ const getFormattedDayPeriod = (dayPeriod) => {
439
+ if (dayPeriod === undefined) {
440
+ return '';
441
+ }
442
+ return dayPeriod.toUpperCase();
443
+ };
444
+ const getLocalizedTime = (locale, refParts, use24Hour) => {
445
+ if (refParts.hour === undefined || refParts.minute === undefined) {
446
+ return 'Invalid Time';
447
+ }
448
+ return new Intl.DateTimeFormat(locale, {
449
+ hour: 'numeric',
450
+ minute: 'numeric',
451
+ timeZone: 'UTC',
452
+ hour12: !use24Hour,
453
+ }).format(new Date(convertDataToISO(Object.assign(Object.assign({}, refParts), {
454
+ // TODO: FW-1831 will remove the need to manually set the tzOffset to undefined
455
+ tzOffset: undefined }))));
456
+ };
457
+ /**
458
+ * Adds padding to a time value so
459
+ * that it is always 2 digits.
460
+ */
461
+ const addTimePadding = (value) => {
462
+ const valueToString = value.toString();
463
+ if (valueToString.length > 1) {
464
+ return valueToString;
465
+ }
466
+ return `0${valueToString}`;
467
+ };
468
+ /**
469
+ * Formats the hour value so that it
470
+ * is always 2 digits. Only applies
471
+ * if using 12 hour format.
472
+ */
473
+ const getFormattedHour = (hour, use24Hour) => {
474
+ if (!use24Hour) {
475
+ return hour.toString();
476
+ }
477
+ return addTimePadding(hour);
478
+ };
479
+ /**
480
+ * Generates an aria-label to be read by screen readers
481
+ * given a local, a date, and whether or not that date is
482
+ * today's date.
483
+ */
484
+ const generateDayAriaLabel = (locale, today, refParts) => {
485
+ if (refParts.day === null) {
486
+ return null;
487
+ }
488
+ /**
489
+ * MM/DD/YYYY will return midnight in the user's timezone.
490
+ */
491
+ const date = new Date(`${refParts.month}/${refParts.day}/${refParts.year} GMT+0000`);
492
+ const labelString = new Intl.DateTimeFormat(locale, {
493
+ weekday: 'long',
494
+ month: 'long',
495
+ day: 'numeric',
496
+ timeZone: 'UTC',
497
+ }).format(date);
498
+ /**
499
+ * If date is today, prepend "Today" so screen readers indicate
500
+ * that the date is today.
501
+ */
502
+ return today ? `Today, ${labelString}` : labelString;
503
+ };
504
+ /**
505
+ * Gets the day of the week, month, and day
506
+ * Used for the header in MD mode.
507
+ */
508
+ const getMonthAndDay = (locale, refParts) => {
509
+ const date = new Date(`${refParts.month}/${refParts.day}/${refParts.year} GMT+0000`);
510
+ return new Intl.DateTimeFormat(locale, { weekday: 'short', month: 'short', day: 'numeric', timeZone: 'UTC' }).format(date);
511
+ };
512
+ /**
513
+ * Given a locale and a date object,
514
+ * return a formatted string that includes
515
+ * the month name and full year.
516
+ * Example: May 2021
517
+ */
518
+ const getMonthAndYear = (locale, refParts) => {
519
+ const date = new Date(`${refParts.month}/${refParts.day}/${refParts.year} GMT+0000`);
520
+ return new Intl.DateTimeFormat(locale, { month: 'long', year: 'numeric', timeZone: 'UTC' }).format(date);
521
+ };
522
+ /**
523
+ * Given a locale and a date object,
524
+ * return a formatted string that includes
525
+ * the short month, numeric day, and full year.
526
+ * Example: Apr 22, 2021
527
+ */
528
+ const getMonthDayAndYear = (locale, refParts) => {
529
+ return getLocalizedDateTime(locale, refParts, { month: 'short', day: 'numeric', year: 'numeric' });
530
+ };
531
+ /**
532
+ * Wrapper function for Intl.DateTimeFormat.
533
+ * Allows developers to apply an allowed format to DatetimeParts.
534
+ * This function also has built in safeguards for older browser bugs
535
+ * with Intl.DateTimeFormat.
536
+ */
537
+ const getLocalizedDateTime = (locale, refParts, options) => {
538
+ const timeString = !!refParts.hour && !!refParts.minute ? ` ${refParts.hour}:${refParts.minute}` : '';
539
+ const date = new Date(`${refParts.month}/${refParts.day}/${refParts.year}${timeString} GMT+0000`);
540
+ return new Intl.DateTimeFormat(locale, Object.assign(Object.assign({}, options), { timeZone: 'UTC' })).format(date);
541
+ };
542
+ /**
543
+ * Gets a localized version of "Today"
544
+ * Falls back to "Today" in English for
545
+ * browsers that do not support RelativeTimeFormat.
546
+ */
547
+ const getTodayLabel = (locale) => {
548
+ if ('RelativeTimeFormat' in Intl) {
549
+ const label = new Intl.RelativeTimeFormat(locale, { numeric: 'auto' }).format(0, 'day');
550
+ return label.charAt(0).toUpperCase() + label.slice(1);
551
+ }
552
+ else {
553
+ return 'Today';
554
+ }
555
+ };
556
+ /**
557
+ * When calling toISOString(), the browser
558
+ * will convert the date to UTC time by either adding
559
+ * or subtracting the time zone offset.
560
+ * To work around this, we need to either add
561
+ * or subtract the time zone offset to the Date
562
+ * object prior to calling toISOString().
563
+ * This allows us to get an ISO string
564
+ * that is in the user's time zone.
565
+ *
566
+ * Example:
567
+ * Time zone offset is 240
568
+ * Meaning: The browser needs to add 240 minutes
569
+ * to the Date object to get UTC time.
570
+ * What Ionic does: We subtract 240 minutes
571
+ * from the Date object. The browser then adds
572
+ * 240 minutes in toISOString(). The result
573
+ * is a time that is in the user's time zone
574
+ * and not UTC.
575
+ *
576
+ * Note: Some timezones include minute adjustments
577
+ * such as 30 or 45 minutes. This is why we use setMinutes
578
+ * instead of setHours.
579
+ * Example: India Standard Time
580
+ * Timezone offset: -330 = -5.5 hours.
581
+ *
582
+ * List of timezones with 30 and 45 minute timezones:
583
+ * https://www.timeanddate.com/time/time-zones-interesting.html
584
+ */
585
+ const removeDateTzOffset = (date) => {
586
+ const tzOffset = date.getTimezoneOffset();
587
+ date.setMinutes(date.getMinutes() - tzOffset);
588
+ return date;
589
+ };
590
+ const DATE_AM = removeDateTzOffset(new Date('2022T01:00'));
591
+ const DATE_PM = removeDateTzOffset(new Date('2022T13:00'));
592
+ /**
593
+ * Formats the locale's string representation of the day period (am/pm) for a given
594
+ * ref parts day period.
595
+ *
596
+ * @param locale The locale to format the day period in.
597
+ * @param value The date string, in ISO format.
598
+ * @returns The localized day period (am/pm) representation of the given value.
599
+ */
600
+ const getLocalizedDayPeriod = (locale, dayPeriod) => {
601
+ const date = dayPeriod === 'am' ? DATE_AM : DATE_PM;
602
+ const localizedDayPeriod = new Intl.DateTimeFormat(locale, {
603
+ hour: 'numeric',
604
+ timeZone: 'UTC',
605
+ })
606
+ .formatToParts(date)
607
+ .find((part) => part.type === 'dayPeriod');
608
+ if (localizedDayPeriod) {
609
+ return localizedDayPeriod.value;
610
+ }
611
+ return getFormattedDayPeriod(dayPeriod);
612
+ };
613
+ /**
614
+ * Formats the datetime's value to a string, for use in the native input.
615
+ *
616
+ * @param value The value to format, either an ISO string or an array thereof.
617
+ */
618
+ const formatValue = (value) => {
619
+ return Array.isArray(value) ? value.join(',') : value;
620
+ };
621
+
622
+ /*!
623
+ * (C) Ionic http://ionicframework.com - MIT License
624
+ */
625
+ /**
626
+ * Returns the current date as
627
+ * an ISO string in the user's
628
+ * time zone.
629
+ */
630
+ const getToday = () => {
631
+ /**
632
+ * ion-datetime intentionally does not
633
+ * parse time zones/do automatic time zone
634
+ * conversion when accepting user input.
635
+ * However when we get today's date string,
636
+ * we want it formatted relative to the user's
637
+ * time zone.
638
+ *
639
+ * When calling toISOString(), the browser
640
+ * will convert the date to UTC time by either adding
641
+ * or subtracting the time zone offset.
642
+ * To work around this, we need to either add
643
+ * or subtract the time zone offset to the Date
644
+ * object prior to calling toISOString().
645
+ * This allows us to get an ISO string
646
+ * that is in the user's time zone.
647
+ */
648
+ return removeDateTzOffset(new Date()).toISOString();
649
+ };
650
+ const minutes = [
651
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
652
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
653
+ ];
654
+ const hour12 = [12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
655
+ const hour23 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23];
656
+ /**
657
+ * Given a locale and a mode,
658
+ * return an array with formatted days
659
+ * of the week. iOS should display days
660
+ * such as "Mon" or "Tue".
661
+ * MD should display days such as "M"
662
+ * or "T".
663
+ */
664
+ const getDaysOfWeek = (locale, mode, firstDayOfWeek = 0) => {
665
+ /**
666
+ * Nov 1st, 2020 starts on a Sunday.
667
+ * ion-datetime assumes weeks start on Sunday,
668
+ * but is configurable via `firstDayOfWeek`.
669
+ */
670
+ const weekdayFormat = mode === 'ios' ? 'short' : 'narrow';
671
+ const intl = new Intl.DateTimeFormat(locale, { weekday: weekdayFormat });
672
+ const startDate = new Date('11/01/2020');
673
+ const daysOfWeek = [];
674
+ /**
675
+ * For each day of the week,
676
+ * get the day name.
677
+ */
678
+ for (let i = firstDayOfWeek; i < firstDayOfWeek + 7; i++) {
679
+ const currentDate = new Date(startDate);
680
+ currentDate.setDate(currentDate.getDate() + i);
681
+ daysOfWeek.push(intl.format(currentDate));
682
+ }
683
+ return daysOfWeek;
684
+ };
685
+ /**
686
+ * Returns an array containing all of the
687
+ * days in a month for a given year. Values are
688
+ * aligned with a week calendar starting on
689
+ * the firstDayOfWeek value (Sunday by default)
690
+ * using null values.
691
+ */
692
+ const getDaysOfMonth = (month, year, firstDayOfWeek) => {
693
+ const numDays = getNumDaysInMonth(month, year);
694
+ const firstOfMonth = new Date(`${month}/1/${year}`).getDay();
695
+ /**
696
+ * To get the first day of the month aligned on the correct
697
+ * day of the week, we need to determine how many "filler" days
698
+ * to generate. These filler days as empty/disabled buttons
699
+ * that fill the space of the days of the week before the first
700
+ * of the month.
701
+ *
702
+ * There are two cases here:
703
+ *
704
+ * 1. If firstOfMonth = 4, firstDayOfWeek = 0 then the offset
705
+ * is (4 - (0 + 1)) = 3. Since the offset loop goes from 0 to 3 inclusive,
706
+ * this will generate 4 filler days (0, 1, 2, 3), and then day of week 4 will have
707
+ * the first day of the month.
708
+ *
709
+ * 2. If firstOfMonth = 2, firstDayOfWeek = 4 then the offset
710
+ * is (6 - (4 - 2)) = 4. Since the offset loop goes from 0 to 4 inclusive,
711
+ * this will generate 5 filler days (0, 1, 2, 3, 4), and then day of week 5 will have
712
+ * the first day of the month.
713
+ */
714
+ const offset = firstOfMonth >= firstDayOfWeek ? firstOfMonth - (firstDayOfWeek + 1) : 6 - (firstDayOfWeek - firstOfMonth);
715
+ let days = [];
716
+ for (let i = 1; i <= numDays; i++) {
717
+ days.push({ day: i, dayOfWeek: (offset + i) % 7 });
718
+ }
719
+ for (let i = 0; i <= offset; i++) {
720
+ days = [{ day: null, dayOfWeek: null }, ...days];
721
+ }
722
+ return days;
723
+ };
724
+ /**
725
+ * Given a local, reference datetime parts and option
726
+ * max/min bound datetime parts, calculate the acceptable
727
+ * hour and minute values according to the bounds and locale.
728
+ */
729
+ const generateTime = (refParts, hourCycle = 'h12', minParts, maxParts, hourValues, minuteValues) => {
730
+ const use24Hour = hourCycle === 'h23';
731
+ let processedHours = use24Hour ? hour23 : hour12;
732
+ let processedMinutes = minutes;
733
+ let isAMAllowed = true;
734
+ let isPMAllowed = true;
735
+ if (hourValues) {
736
+ processedHours = processedHours.filter((hour) => hourValues.includes(hour));
737
+ }
738
+ if (minuteValues) {
739
+ processedMinutes = processedMinutes.filter((minute) => minuteValues.includes(minute));
740
+ }
741
+ if (minParts) {
742
+ /**
743
+ * If ref day is the same as the
744
+ * minimum allowed day, filter hour/minute
745
+ * values according to min hour and minute.
746
+ */
747
+ if (isSameDay(refParts, minParts)) {
748
+ /**
749
+ * Users may not always set the hour/minute for
750
+ * min value (i.e. 2021-06-02) so we should allow
751
+ * all hours/minutes in that case.
752
+ */
753
+ if (minParts.hour !== undefined) {
754
+ processedHours = processedHours.filter((hour) => {
755
+ const convertedHour = refParts.ampm === 'pm' ? (hour + 12) % 24 : hour;
756
+ return (use24Hour ? hour : convertedHour) >= minParts.hour;
757
+ });
758
+ isAMAllowed = minParts.hour < 13;
759
+ }
760
+ if (minParts.minute !== undefined) {
761
+ /**
762
+ * The minimum minute range should not be enforced when
763
+ * the hour is greater than the min hour.
764
+ *
765
+ * For example with a minimum range of 09:30, users
766
+ * should be able to select 10:00-10:29 and beyond.
767
+ */
768
+ let isPastMinHour = false;
769
+ if (minParts.hour !== undefined && refParts.hour !== undefined) {
770
+ if (refParts.hour > minParts.hour) {
771
+ isPastMinHour = true;
772
+ }
773
+ }
774
+ processedMinutes = processedMinutes.filter((minute) => {
775
+ if (isPastMinHour) {
776
+ return true;
777
+ }
778
+ return minute >= minParts.minute;
779
+ });
780
+ }
781
+ /**
782
+ * If ref day is before minimum
783
+ * day do not render any hours/minute values
784
+ */
785
+ }
786
+ else if (isBefore(refParts, minParts)) {
787
+ processedHours = [];
788
+ processedMinutes = [];
789
+ isAMAllowed = isPMAllowed = false;
790
+ }
791
+ }
792
+ if (maxParts) {
793
+ /**
794
+ * If ref day is the same as the
795
+ * maximum allowed day, filter hour/minute
796
+ * values according to max hour and minute.
797
+ */
798
+ if (isSameDay(refParts, maxParts)) {
799
+ /**
800
+ * Users may not always set the hour/minute for
801
+ * max value (i.e. 2021-06-02) so we should allow
802
+ * all hours/minutes in that case.
803
+ */
804
+ if (maxParts.hour !== undefined) {
805
+ processedHours = processedHours.filter((hour) => {
806
+ const convertedHour = refParts.ampm === 'pm' ? (hour + 12) % 24 : hour;
807
+ return (use24Hour ? hour : convertedHour) <= maxParts.hour;
808
+ });
809
+ isPMAllowed = maxParts.hour >= 13;
810
+ }
811
+ if (maxParts.minute !== undefined && refParts.hour === maxParts.hour) {
812
+ // The available minutes should only be filtered when the hour is the same as the max hour.
813
+ // For example if the max hour is 10:30 and the current hour is 10:00,
814
+ // users should be able to select 00-30 minutes.
815
+ // If the current hour is 09:00, users should be able to select 00-60 minutes.
816
+ processedMinutes = processedMinutes.filter((minute) => minute <= maxParts.minute);
817
+ }
818
+ /**
819
+ * If ref day is after minimum
820
+ * day do not render any hours/minute values
821
+ */
822
+ }
823
+ else if (isAfter(refParts, maxParts)) {
824
+ processedHours = [];
825
+ processedMinutes = [];
826
+ isAMAllowed = isPMAllowed = false;
827
+ }
828
+ }
829
+ return {
830
+ hours: processedHours,
831
+ minutes: processedMinutes,
832
+ am: isAMAllowed,
833
+ pm: isPMAllowed,
834
+ };
835
+ };
836
+ /**
837
+ * Given DatetimeParts, generate the previous,
838
+ * current, and and next months.
839
+ */
840
+ const generateMonths = (refParts) => {
841
+ return [
842
+ getPreviousMonth(refParts),
843
+ { month: refParts.month, year: refParts.year, day: refParts.day },
844
+ getNextMonth(refParts),
845
+ ];
846
+ };
847
+ const getMonthColumnData = (locale, refParts, minParts, maxParts, monthValues, formatOptions = {
848
+ month: 'long',
849
+ }) => {
850
+ const { year } = refParts;
851
+ const months = [];
852
+ if (monthValues !== undefined) {
853
+ let processedMonths = monthValues;
854
+ if ((maxParts === null || maxParts === void 0 ? void 0 : maxParts.month) !== undefined) {
855
+ processedMonths = processedMonths.filter((month) => month <= maxParts.month);
856
+ }
857
+ if ((minParts === null || minParts === void 0 ? void 0 : minParts.month) !== undefined) {
858
+ processedMonths = processedMonths.filter((month) => month >= minParts.month);
859
+ }
860
+ processedMonths.forEach((processedMonth) => {
861
+ const date = new Date(`${processedMonth}/1/${year} GMT+0000`);
862
+ const monthString = new Intl.DateTimeFormat(locale, Object.assign(Object.assign({}, formatOptions), { timeZone: 'UTC' })).format(date);
863
+ months.push({ text: monthString, value: processedMonth });
864
+ });
865
+ }
866
+ else {
867
+ const maxMonth = maxParts && maxParts.year === year ? maxParts.month : 12;
868
+ const minMonth = minParts && minParts.year === year ? minParts.month : 1;
869
+ for (let i = minMonth; i <= maxMonth; i++) {
870
+ /**
871
+ *
872
+ * There is a bug on iOS 14 where
873
+ * Intl.DateTimeFormat takes into account
874
+ * the local timezone offset when formatting dates.
875
+ *
876
+ * Forcing the timezone to 'UTC' fixes the issue. However,
877
+ * we should keep this workaround as it is safer. In the event
878
+ * this breaks in another browser, we will not be impacted
879
+ * because all dates will be interpreted in UTC.
880
+ *
881
+ * Example:
882
+ * new Intl.DateTimeFormat('en-US', { month: 'long' }).format(new Date('Sat Apr 01 2006 00:00:00 GMT-0400 (EDT)')) // "March"
883
+ * new Intl.DateTimeFormat('en-US', { month: 'long', timeZone: 'UTC' }).format(new Date('Sat Apr 01 2006 00:00:00 GMT-0400 (EDT)')) // "April"
884
+ *
885
+ * In certain timezones, iOS 14 shows the wrong
886
+ * date for .toUTCString(). To combat this, we
887
+ * force all of the timezones to GMT+0000 (UTC).
888
+ *
889
+ * Example:
890
+ * Time Zone: Central European Standard Time
891
+ * new Date('1/1/1992').toUTCString() // "Tue, 31 Dec 1991 23:00:00 GMT"
892
+ * new Date('1/1/1992 GMT+0000').toUTCString() // "Wed, 01 Jan 1992 00:00:00 GMT"
893
+ */
894
+ const date = new Date(`${i}/1/${year} GMT+0000`);
895
+ const monthString = new Intl.DateTimeFormat(locale, Object.assign(Object.assign({}, formatOptions), { timeZone: 'UTC' })).format(date);
896
+ months.push({ text: monthString, value: i });
897
+ }
898
+ }
899
+ return months;
900
+ };
901
+ /**
902
+ * Returns information regarding
903
+ * selectable dates (i.e 1st, 2nd, 3rd, etc)
904
+ * within a reference month.
905
+ * @param locale The locale to format the date with
906
+ * @param refParts The reference month/year to generate dates for
907
+ * @param minParts The minimum bound on the date that can be returned
908
+ * @param maxParts The maximum bound on the date that can be returned
909
+ * @param dayValues The allowed date values
910
+ * @returns Date data to be used in ion-picker-column-internal
911
+ */
912
+ const getDayColumnData = (locale, refParts, minParts, maxParts, dayValues, formatOptions = {
913
+ day: 'numeric',
914
+ }) => {
915
+ const { month, year } = refParts;
916
+ const days = [];
917
+ /**
918
+ * If we have max/min bounds that in the same
919
+ * month/year as the refParts, we should
920
+ * use the define day as the max/min day.
921
+ * Otherwise, fallback to the max/min days in a month.
922
+ */
923
+ const numDaysInMonth = getNumDaysInMonth(month, year);
924
+ const maxDay = (maxParts === null || maxParts === void 0 ? void 0 : maxParts.day) && maxParts.year === year && maxParts.month === month ? maxParts.day : numDaysInMonth;
925
+ const minDay = (minParts === null || minParts === void 0 ? void 0 : minParts.day) && minParts.year === year && minParts.month === month ? minParts.day : 1;
926
+ if (dayValues !== undefined) {
927
+ let processedDays = dayValues;
928
+ processedDays = processedDays.filter((day) => day >= minDay && day <= maxDay);
929
+ processedDays.forEach((processedDay) => {
930
+ const date = new Date(`${month}/${processedDay}/${year} GMT+0000`);
931
+ const dayString = new Intl.DateTimeFormat(locale, Object.assign(Object.assign({}, formatOptions), { timeZone: 'UTC' })).format(date);
932
+ days.push({ text: dayString, value: processedDay });
933
+ });
934
+ }
935
+ else {
936
+ for (let i = minDay; i <= maxDay; i++) {
937
+ const date = new Date(`${month}/${i}/${year} GMT+0000`);
938
+ const dayString = new Intl.DateTimeFormat(locale, Object.assign(Object.assign({}, formatOptions), { timeZone: 'UTC' })).format(date);
939
+ days.push({ text: dayString, value: i });
940
+ }
941
+ }
942
+ return days;
943
+ };
944
+ const getYearColumnData = (refParts, minParts, maxParts, yearValues) => {
945
+ let processedYears = [];
946
+ if (yearValues !== undefined) {
947
+ processedYears = yearValues;
948
+ if ((maxParts === null || maxParts === void 0 ? void 0 : maxParts.year) !== undefined) {
949
+ processedYears = processedYears.filter((year) => year <= maxParts.year);
950
+ }
951
+ if ((minParts === null || minParts === void 0 ? void 0 : minParts.year) !== undefined) {
952
+ processedYears = processedYears.filter((year) => year >= minParts.year);
953
+ }
954
+ }
955
+ else {
956
+ const { year } = refParts;
957
+ const maxYear = (maxParts === null || maxParts === void 0 ? void 0 : maxParts.year) || year;
958
+ const minYear = (minParts === null || minParts === void 0 ? void 0 : minParts.year) || year - 100;
959
+ for (let i = maxYear; i >= minYear; i--) {
960
+ processedYears.push(i);
961
+ }
962
+ }
963
+ return processedYears.map((year) => ({
964
+ text: `${year}`,
965
+ value: year,
966
+ }));
967
+ };
968
+ /**
969
+ * Given a starting date and an upper bound,
970
+ * this functions returns an array of all
971
+ * month objects in that range.
972
+ */
973
+ const getAllMonthsInRange = (currentParts, maxParts) => {
974
+ if (currentParts.month === maxParts.month && currentParts.year === maxParts.year) {
975
+ return [currentParts];
976
+ }
977
+ return [currentParts, ...getAllMonthsInRange(getNextMonth(currentParts), maxParts)];
978
+ };
979
+ /**
980
+ * Creates and returns picker items
981
+ * that represent the days in a month.
982
+ * Example: "Thu, Jun 2"
983
+ */
984
+ const getCombinedDateColumnData = (locale, refParts, todayParts, minParts, maxParts, dayValues, monthValues) => {
985
+ let items = [];
986
+ let parts = [];
987
+ /**
988
+ * Get all month objects from the min date
989
+ * to the max date. Note: Do not use getMonthColumnData
990
+ * as that function only generates dates within a
991
+ * single year.
992
+ */
993
+ let months = getAllMonthsInRange(minParts, maxParts);
994
+ /**
995
+ * Filter out any disallowed month values.
996
+ */
997
+ if (monthValues) {
998
+ months = months.filter(({ month }) => monthValues.includes(month));
999
+ }
1000
+ /**
1001
+ * Get all of the days in the month.
1002
+ * From there, generate an array where
1003
+ * each item has the month, date, and day
1004
+ * of work as the text.
1005
+ */
1006
+ months.forEach((monthObject) => {
1007
+ const referenceMonth = { month: monthObject.month, day: null, year: refParts.year };
1008
+ const monthDays = getDayColumnData(locale, referenceMonth, minParts, maxParts, dayValues, {
1009
+ month: 'short',
1010
+ day: 'numeric',
1011
+ weekday: 'short',
1012
+ });
1013
+ const dateParts = [];
1014
+ const dateColumnItems = [];
1015
+ monthDays.forEach((dayObject) => {
1016
+ const isToday = isSameDay(Object.assign(Object.assign({}, referenceMonth), { day: dayObject.value }), todayParts);
1017
+ /**
1018
+ * Today's date should read as "Today" (localized)
1019
+ * not the actual date string
1020
+ */
1021
+ dateColumnItems.push({
1022
+ text: isToday ? getTodayLabel(locale) : dayObject.text,
1023
+ value: `${refParts.year}-${monthObject.month}-${dayObject.value}`,
1024
+ });
1025
+ /**
1026
+ * When selecting a date in the wheel picker
1027
+ * we need access to the raw datetime parts data.
1028
+ * The picker column only accepts values of
1029
+ * type string or number, so we need to return
1030
+ * two sets of data: A data set to be passed
1031
+ * to the picker column, and a data set to
1032
+ * be used to reference the raw data when
1033
+ * updating the picker column value.
1034
+ */
1035
+ dateParts.push({
1036
+ month: monthObject.month,
1037
+ year: refParts.year,
1038
+ day: dayObject.value,
1039
+ });
1040
+ });
1041
+ parts = [...parts, ...dateParts];
1042
+ items = [...items, ...dateColumnItems];
1043
+ });
1044
+ return {
1045
+ parts,
1046
+ items,
1047
+ };
1048
+ };
1049
+ const getTimeColumnsData = (locale, refParts, hourCycle, minParts, maxParts, allowedHourValues, allowedMinuteVaues) => {
1050
+ const use24Hour = is24Hour(locale, hourCycle);
1051
+ const { hours, minutes, am, pm } = generateTime(refParts, use24Hour ? 'h23' : 'h12', minParts, maxParts, allowedHourValues, allowedMinuteVaues);
1052
+ const hoursItems = hours.map((hour) => {
1053
+ return {
1054
+ text: getFormattedHour(hour, use24Hour),
1055
+ value: getInternalHourValue(hour, use24Hour, refParts.ampm),
1056
+ };
1057
+ });
1058
+ const minutesItems = minutes.map((minute) => {
1059
+ return {
1060
+ text: addTimePadding(minute),
1061
+ value: minute,
1062
+ };
1063
+ });
1064
+ const dayPeriodItems = [];
1065
+ if (am && !use24Hour) {
1066
+ dayPeriodItems.push({
1067
+ text: getLocalizedDayPeriod(locale, 'am'),
1068
+ value: 'am',
1069
+ });
1070
+ }
1071
+ if (pm && !use24Hour) {
1072
+ dayPeriodItems.push({
1073
+ text: getLocalizedDayPeriod(locale, 'pm'),
1074
+ value: 'pm',
1075
+ });
1076
+ }
1077
+ return {
1078
+ minutesData: minutesItems,
1079
+ hoursData: hoursItems,
1080
+ dayPeriodData: dayPeriodItems,
1081
+ };
1082
+ };
1083
+
1084
+ /*!
1085
+ * (C) Ionic http://ionicframework.com - MIT License
1086
+ */
1087
+ const ISO_8601_REGEXP =
1088
+ // eslint-disable-next-line no-useless-escape
1089
+ /^(\d{4}|[+\-]\d{6})(?:-(\d{2})(?:-(\d{2}))?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/;
1090
+ // eslint-disable-next-line no-useless-escape
1091
+ const TIME_REGEXP = /^((\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/;
1092
+ /**
1093
+ * Use to convert a string of comma separated numbers or
1094
+ * an array of numbers, and clean up any user input
1095
+ */
1096
+ const convertToArrayOfNumbers = (input) => {
1097
+ if (input === undefined) {
1098
+ return;
1099
+ }
1100
+ let processedInput = input;
1101
+ if (typeof input === 'string') {
1102
+ // convert the string to an array of strings
1103
+ // auto remove any whitespace and [] characters
1104
+ processedInput = input.replace(/\[|\]|\s/g, '').split(',');
1105
+ }
1106
+ let values;
1107
+ if (Array.isArray(processedInput)) {
1108
+ // ensure each value is an actual number in the returned array
1109
+ values = processedInput.map((num) => parseInt(num, 10)).filter(isFinite);
1110
+ }
1111
+ else {
1112
+ values = [processedInput];
1113
+ }
1114
+ return values;
1115
+ };
1116
+ /**
1117
+ * Extracts date information
1118
+ * from a .calendar-day element
1119
+ * into DatetimeParts.
1120
+ */
1121
+ const getPartsFromCalendarDay = (el) => {
1122
+ return {
1123
+ month: parseInt(el.getAttribute('data-month'), 10),
1124
+ day: parseInt(el.getAttribute('data-day'), 10),
1125
+ year: parseInt(el.getAttribute('data-year'), 10),
1126
+ dayOfWeek: parseInt(el.getAttribute('data-day-of-week'), 10),
1127
+ };
1128
+ };
1129
+ function parseDate(val) {
1130
+ if (Array.isArray(val)) {
1131
+ return val.map((valStr) => parseDate(valStr));
1132
+ }
1133
+ // manually parse IS0 cuz Date.parse cannot be trusted
1134
+ // ISO 8601 format: 1994-12-15T13:47:20Z
1135
+ let parse = null;
1136
+ if (val != null && val !== '') {
1137
+ // try parsing for just time first, HH:MM
1138
+ parse = TIME_REGEXP.exec(val);
1139
+ if (parse) {
1140
+ // adjust the array so it fits nicely with the datetime parse
1141
+ parse.unshift(undefined, undefined);
1142
+ parse[2] = parse[3] = undefined;
1143
+ }
1144
+ else {
1145
+ // try parsing for full ISO datetime
1146
+ parse = ISO_8601_REGEXP.exec(val);
1147
+ }
1148
+ }
1149
+ if (parse === null) {
1150
+ // wasn't able to parse the ISO datetime
1151
+ return undefined;
1152
+ }
1153
+ // ensure all the parse values exist with at least 0
1154
+ for (let i = 1; i < 8; i++) {
1155
+ parse[i] = parse[i] !== undefined ? parseInt(parse[i], 10) : undefined;
1156
+ }
1157
+ let tzOffset = 0;
1158
+ if (parse[9] && parse[10]) {
1159
+ // hours
1160
+ tzOffset = parseInt(parse[10], 10) * 60;
1161
+ if (parse[11]) {
1162
+ // minutes
1163
+ tzOffset += parseInt(parse[11], 10);
1164
+ }
1165
+ if (parse[9] === '-') {
1166
+ // + or -
1167
+ tzOffset *= -1;
1168
+ }
1169
+ }
1170
+ // can also get second and millisecond from parse[6] and parse[7] if needed
1171
+ return {
1172
+ year: parse[1],
1173
+ month: parse[2],
1174
+ day: parse[3],
1175
+ hour: parse[4],
1176
+ minute: parse[5],
1177
+ tzOffset,
1178
+ };
1179
+ }
1180
+ const clampDate = (dateParts, minParts, maxParts) => {
1181
+ if (minParts && isBefore(dateParts, minParts)) {
1182
+ return minParts;
1183
+ }
1184
+ else if (maxParts && isAfter(dateParts, maxParts)) {
1185
+ return maxParts;
1186
+ }
1187
+ return dateParts;
1188
+ };
1189
+ /**
1190
+ * Parses an hour and returns if the value is in the morning (am) or afternoon (pm).
1191
+ * @param hour The hour to format, should be 0-23
1192
+ * @returns `pm` if the hour is greater than or equal to 12, `am` if less than 12.
1193
+ */
1194
+ const parseAmPm = (hour) => {
1195
+ return hour >= 12 ? 'pm' : 'am';
1196
+ };
1197
+
1198
+ exports.calculateHourFromAMPM = calculateHourFromAMPM;
1199
+ exports.clampDate = clampDate;
1200
+ exports.convertDataToISO = convertDataToISO;
1201
+ exports.convertToArrayOfNumbers = convertToArrayOfNumbers;
1202
+ exports.formatValue = formatValue;
1203
+ exports.generateDayAriaLabel = generateDayAriaLabel;
1204
+ exports.generateMonths = generateMonths;
1205
+ exports.getCombinedDateColumnData = getCombinedDateColumnData;
1206
+ exports.getDayColumnData = getDayColumnData;
1207
+ exports.getDaysOfMonth = getDaysOfMonth;
1208
+ exports.getDaysOfWeek = getDaysOfWeek;
1209
+ exports.getEndOfWeek = getEndOfWeek;
1210
+ exports.getLocalizedDateTime = getLocalizedDateTime;
1211
+ exports.getLocalizedTime = getLocalizedTime;
1212
+ exports.getMonthAndDay = getMonthAndDay;
1213
+ exports.getMonthAndYear = getMonthAndYear;
1214
+ exports.getMonthColumnData = getMonthColumnData;
1215
+ exports.getMonthDayAndYear = getMonthDayAndYear;
1216
+ exports.getNextDay = getNextDay;
1217
+ exports.getNextMonth = getNextMonth;
1218
+ exports.getNextWeek = getNextWeek;
1219
+ exports.getNextYear = getNextYear;
1220
+ exports.getPartsFromCalendarDay = getPartsFromCalendarDay;
1221
+ exports.getPreviousDay = getPreviousDay;
1222
+ exports.getPreviousMonth = getPreviousMonth;
1223
+ exports.getPreviousWeek = getPreviousWeek;
1224
+ exports.getPreviousYear = getPreviousYear;
1225
+ exports.getStartOfWeek = getStartOfWeek;
1226
+ exports.getTimeColumnsData = getTimeColumnsData;
1227
+ exports.getToday = getToday;
1228
+ exports.getYearColumnData = getYearColumnData;
1229
+ exports.is24Hour = is24Hour;
1230
+ exports.isAfter = isAfter;
1231
+ exports.isBefore = isBefore;
1232
+ exports.isLocaleDayPeriodRTL = isLocaleDayPeriodRTL;
1233
+ exports.isMonthFirstLocale = isMonthFirstLocale;
1234
+ exports.isSameDay = isSameDay;
1235
+ exports.parseAmPm = parseAmPm;
1236
+ exports.parseDate = parseDate;
1237
+ exports.warnIfValueOutOfBounds = warnIfValueOutOfBounds;