@pod-os/elements 0.7.0 → 0.7.1-2196a40.0

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 (409) hide show
  1. package/dist/cjs/{animation-5840e4df.js → animation-9bea118f.js} +115 -84
  2. package/dist/cjs/{app-globals-1aedd05c.js → app-globals-6352043e.js} +1 -1
  3. package/dist/cjs/{cubic-bezier-dcb7bfef.js → cubic-bezier-0b702a31.js} +13 -12
  4. package/dist/cjs/data-0c9489d7.js +1510 -0
  5. package/dist/cjs/dir-011f46ea.js +20 -0
  6. package/dist/cjs/elements.cjs.js +4 -4
  7. package/dist/cjs/focus-visible-2624ec15.js +76 -0
  8. package/dist/cjs/framework-delegate-437c0645.js +119 -0
  9. package/dist/cjs/{gesture-controller-fbbe9a65.js → gesture-controller-00a6b02f.js} +6 -2
  10. package/dist/cjs/{haptic-09e73337.js → haptic-7358cb0b.js} +37 -8
  11. package/dist/cjs/{hardware-back-button-01027575.js → hardware-back-button-25372ec7.js} +11 -8
  12. package/dist/cjs/{helpers-398ced09.js → helpers-cb08f5ae.js} +115 -15
  13. package/dist/cjs/{index-2067b305.js → index-1b07c737.js} +35 -24
  14. package/dist/cjs/{index-68ae43d2.js → index-2dc3637c.js} +34 -28
  15. package/dist/cjs/index-57b9fa9e.js +30 -0
  16. package/dist/cjs/{index-d01d9183.js → index-643851c6.js} +34 -19
  17. package/dist/cjs/index-731691ca.js +48 -0
  18. package/dist/cjs/{index-6bbae9b1.js → index-7d56774d.js} +12 -8
  19. package/dist/cjs/index-9fca5d6f.js +140 -0
  20. package/dist/cjs/index-b2a479e4.js +38 -0
  21. package/dist/cjs/{index-b4a9ece2.js → index-eaa0d16e.js} +7 -0
  22. package/dist/cjs/{tap-click-f24cb477.js → index-ed2ce04f.js} +37 -19
  23. package/dist/cjs/{input-shims-e959d9e2.js → input-shims-427999f7.js} +89 -38
  24. package/dist/cjs/ion-accordion-group.cjs.entry.js +205 -0
  25. package/dist/cjs/ion-accordion.cjs.entry.js +336 -0
  26. package/dist/cjs/ion-action-sheet_3.cjs.entry.js +865 -0
  27. package/dist/cjs/{ion-app_45.cjs.entry.js → ion-app_46.cjs.entry.js} +1694 -1406
  28. package/dist/cjs/ion-avatar.cjs.entry.js +2 -2
  29. package/dist/cjs/ion-back-button.cjs.entry.js +12 -11
  30. package/dist/cjs/ion-backdrop.cjs.entry.js +4 -4
  31. package/dist/cjs/ion-breadcrumb.cjs.entry.js +101 -0
  32. package/dist/cjs/ion-breadcrumbs.cjs.entry.js +133 -0
  33. package/dist/cjs/ion-buttons_3.cjs.entry.js +793 -0
  34. package/dist/cjs/ion-card-subtitle.cjs.entry.js +4 -4
  35. package/dist/cjs/{ion-list-header_3.cjs.entry.js → ion-checkbox_4.cjs.entry.js} +124 -23
  36. package/dist/cjs/ion-chip.cjs.entry.js +5 -10
  37. package/dist/cjs/ion-datetime-button.cjs.entry.js +346 -0
  38. package/dist/cjs/ion-datetime.cjs.entry.js +1548 -856
  39. package/dist/cjs/ion-fab-button.cjs.entry.js +26 -9
  40. package/dist/cjs/ion-fab-list.cjs.entry.js +4 -4
  41. package/dist/cjs/ion-fab.cjs.entry.js +15 -13
  42. package/dist/cjs/ion-img.cjs.entry.js +28 -4
  43. package/dist/cjs/ion-infinite-scroll-content.cjs.entry.js +5 -5
  44. package/dist/cjs/ion-infinite-scroll.cjs.entry.js +13 -13
  45. package/dist/cjs/ion-input.cjs.entry.js +57 -23
  46. package/dist/cjs/ion-item-option.cjs.entry.js +8 -8
  47. package/dist/cjs/ion-item-options.cjs.entry.js +5 -5
  48. package/dist/cjs/ion-item-sliding.cjs.entry.js +59 -63
  49. package/dist/cjs/ion-loading.cjs.entry.js +37 -36
  50. package/dist/cjs/ion-menu-button.cjs.entry.js +14 -12
  51. package/dist/cjs/ion-menu-toggle.cjs.entry.js +8 -7
  52. package/dist/cjs/ion-menu.cjs.entry.js +71 -57
  53. package/dist/cjs/ion-modal.cjs.entry.js +1384 -154
  54. package/dist/cjs/ion-nav-link.cjs.entry.js +5 -2
  55. package/dist/cjs/ion-nav.cjs.entry.js +177 -171
  56. package/dist/cjs/ion-picker-column.cjs.entry.js +25 -27
  57. package/dist/cjs/ion-picker.cjs.entry.js +22 -17
  58. package/dist/cjs/ion-popover.cjs.entry.js +1208 -182
  59. package/dist/cjs/ion-range.cjs.entry.js +137 -57
  60. package/dist/cjs/ion-refresher-content.cjs.entry.js +7 -12
  61. package/dist/cjs/ion-refresher.cjs.entry.js +150 -148
  62. package/dist/cjs/ion-reorder-group.cjs.entry.js +42 -35
  63. package/dist/cjs/ion-reorder.cjs.entry.js +5 -4
  64. package/dist/cjs/ion-route-redirect.cjs.entry.js +1 -1
  65. package/dist/cjs/ion-route.cjs.entry.js +1 -1
  66. package/dist/cjs/ion-router-link.cjs.entry.js +5 -5
  67. package/dist/cjs/ion-router-outlet.cjs.entry.js +24 -20
  68. package/dist/cjs/ion-router.cjs.entry.js +291 -194
  69. package/dist/cjs/ion-segment-button.cjs.entry.js +10 -17
  70. package/dist/cjs/ion-segment.cjs.entry.js +119 -26
  71. package/dist/cjs/ion-select-option.cjs.entry.js +3 -3
  72. package/dist/cjs/ion-select.cjs.entry.js +113 -78
  73. package/dist/cjs/ion-slide.cjs.entry.js +3 -3
  74. package/dist/cjs/ion-slides.cjs.entry.js +26 -27
  75. package/dist/cjs/ion-spinner.cjs.entry.js +10 -9
  76. package/dist/cjs/ion-split-pane.cjs.entry.js +16 -12
  77. package/dist/cjs/ion-tab-bar.cjs.entry.js +16 -23
  78. package/dist/cjs/ion-tab-button.cjs.entry.js +6 -6
  79. package/dist/cjs/ion-tab.cjs.entry.js +4 -4
  80. package/dist/cjs/ion-tabs.cjs.entry.js +4 -5
  81. package/dist/cjs/ion-text.cjs.entry.js +3 -3
  82. package/dist/cjs/ion-textarea.cjs.entry.js +31 -29
  83. package/dist/cjs/ion-thumbnail.cjs.entry.js +2 -2
  84. package/dist/cjs/ion-toast.cjs.entry.js +49 -59
  85. package/dist/cjs/ion-toggle.cjs.entry.js +41 -22
  86. package/dist/cjs/ion-virtual-scroll.cjs.entry.js +39 -31
  87. package/dist/cjs/{ionic-global-56e10eb5.js → ionic-global-f2d95fd3.js} +112 -93
  88. package/dist/cjs/{ios.transition-32e4623d.js → ios.transition-0f31ec9a.js} +78 -53
  89. package/dist/cjs/{keyboard-9e8103e4.js → keyboard-79afcba2.js} +6 -3
  90. package/dist/cjs/keyboard-controller-a934d106.js +42 -0
  91. package/dist/cjs/loader.cjs.js +4 -4
  92. package/dist/cjs/{md.transition-169c54f0.js → md.transition-d2a33a23.js} +15 -17
  93. package/dist/cjs/{menu-toggle-util-087678e0.js → menu-toggle-util-0a43ff7c.js} +5 -2
  94. package/dist/cjs/{overlays-49fe9ba7.js → overlays-65c716aa.js} +187 -71
  95. package/dist/cjs/spinner-configs-cd0abbeb.js +147 -0
  96. package/dist/cjs/{status-tap-ada894ff.js → status-tap-beaa3a71.js} +10 -5
  97. package/dist/cjs/{swipe-back-c4a778df.js → swipe-back-666ea8e6.js} +34 -15
  98. package/dist/cjs/test-component.cjs.entry.js +1 -1
  99. package/dist/cjs/{theme-2259d0f5.js → theme-fc63803b.js} +9 -5
  100. package/dist/collection/collection-manifest.json +7 -0
  101. package/dist/custom-elements/index.js +12689 -4785
  102. package/dist/custom-elements/{tap-click.js → index2.js} +36 -18
  103. package/dist/custom-elements/input-shims.js +87 -38
  104. package/dist/custom-elements/ios.transition.js +74 -50
  105. package/dist/custom-elements/md.transition.js +11 -14
  106. package/dist/custom-elements/status-tap.js +7 -4
  107. package/dist/custom-elements/swipe-back.js +31 -13
  108. package/dist/elements/elements.css +1 -1
  109. package/dist/elements/elements.esm.js +1 -1
  110. package/dist/elements/p-0268cbd3.entry.js +7 -0
  111. package/dist/elements/p-0587332d.entry.js +1 -0
  112. package/dist/elements/{p-cfc0e54d.js → p-0991c811.js} +3 -0
  113. package/dist/elements/p-0a69a563.entry.js +1 -0
  114. package/dist/elements/p-0b95be17.entry.js +1 -0
  115. package/dist/elements/p-0d284fe0.entry.js +1 -0
  116. package/dist/elements/p-0fd77b33.entry.js +1 -0
  117. package/dist/elements/p-120dec2b.entry.js +1 -0
  118. package/dist/elements/p-12880671.entry.js +1 -0
  119. package/dist/elements/p-14ccd586.entry.js +1 -0
  120. package/dist/elements/{p-83d45051.entry.js → p-14df6ac0.entry.js} +1 -1
  121. package/dist/elements/{p-e860be6a.entry.js → p-17079f06.entry.js} +1 -1
  122. package/dist/elements/p-19e4a688.js +4 -0
  123. package/dist/elements/p-1afc4eb4.js +4 -0
  124. package/dist/elements/p-1beaf6bf.js +4 -0
  125. package/dist/elements/p-1d1c6a6f.entry.js +1 -0
  126. package/dist/elements/{p-31d30e42.entry.js → p-1d98f84b.entry.js} +1 -1
  127. package/dist/elements/p-278ca4c9.js +4 -0
  128. package/dist/elements/p-27f5629c.entry.js +1 -0
  129. package/dist/elements/p-29c0f03f.js +4 -0
  130. package/dist/elements/p-2da59aca.js +4 -0
  131. package/dist/elements/p-3152143f.js +4 -0
  132. package/dist/elements/p-343ff720.entry.js +7 -0
  133. package/dist/elements/p-36d4c9a8.js +4 -0
  134. package/dist/elements/p-3a30dfb2.entry.js +1 -0
  135. package/dist/elements/p-3c013bf1.entry.js +1 -0
  136. package/dist/elements/{p-74ba1e42.entry.js → p-3c318da5.entry.js} +1 -1
  137. package/dist/elements/p-3cee3222.entry.js +1 -0
  138. package/dist/elements/p-480b3c4f.entry.js +1 -0
  139. package/dist/elements/p-4e9d8f18.entry.js +1 -0
  140. package/dist/elements/p-53e23176.js +2 -0
  141. package/dist/elements/p-548524f3.js +4 -0
  142. package/dist/elements/p-5739fa41.entry.js +1 -0
  143. package/dist/elements/p-5808c505.js +1 -0
  144. package/dist/elements/p-58a8cc2a.js +4 -0
  145. package/dist/elements/p-6035415e.entry.js +1 -0
  146. package/dist/elements/p-60eeae90.js +4 -0
  147. package/dist/elements/p-610b03ff.entry.js +4 -0
  148. package/dist/elements/p-67777478.entry.js +1 -0
  149. package/dist/elements/p-6ab826e1.entry.js +1 -0
  150. package/dist/elements/p-6f5a2827.entry.js +1 -0
  151. package/dist/elements/p-779676c5.entry.js +1 -0
  152. package/dist/elements/p-7916ecc5.entry.js +1 -0
  153. package/dist/elements/p-79f06b80.entry.js +1 -0
  154. package/dist/elements/p-7b5991c1.entry.js +1 -0
  155. package/dist/elements/p-7d0def79.js +5 -0
  156. package/dist/elements/p-8112afea.js +4 -0
  157. package/dist/elements/p-83678d7d.entry.js +4 -0
  158. package/dist/elements/p-87e45c94.entry.js +1 -0
  159. package/dist/elements/p-8da6a31e.entry.js +1 -0
  160. package/dist/elements/p-8f80768f.entry.js +4 -0
  161. package/dist/elements/p-8fe0433b.js +4 -0
  162. package/dist/elements/{p-4cb27b48.entry.js → p-9147d82b.entry.js} +1 -1
  163. package/dist/elements/p-97abb434.entry.js +1 -0
  164. package/dist/elements/p-98497a4b.entry.js +1 -0
  165. package/dist/elements/p-9c719139.js +4 -0
  166. package/dist/elements/p-9ca37332.js +4 -0
  167. package/dist/elements/{p-37de7110.js → p-9d48def2.js} +3 -0
  168. package/dist/elements/p-a79a6ad9.entry.js +79 -0
  169. package/dist/elements/p-a805f2f9.entry.js +1 -0
  170. package/dist/elements/p-a86a5bfa.entry.js +1 -0
  171. package/dist/elements/{p-9c1dbe52.entry.js → p-ac34eab7.entry.js} +1 -1
  172. package/dist/elements/p-ad366eab.entry.js +4 -0
  173. package/dist/elements/p-aef3a931.js +7 -0
  174. package/dist/elements/p-b0537eb3.entry.js +1 -0
  175. package/dist/elements/p-b337f3b8.js +4 -0
  176. package/dist/elements/p-b34bf73f.entry.js +7 -0
  177. package/dist/elements/p-b41e66f0.entry.js +1 -0
  178. package/dist/elements/p-b47e7091.entry.js +1 -0
  179. package/dist/elements/p-b840320e.js +4 -0
  180. package/dist/elements/p-b934ac5d.entry.js +1 -0
  181. package/dist/elements/p-b98314e0.entry.js +4 -0
  182. package/dist/elements/p-bd12806f.entry.js +1 -0
  183. package/dist/elements/p-c16d38d5.js +4 -0
  184. package/dist/elements/p-c84205a3.js +4 -0
  185. package/dist/elements/{p-06675ac7.entry.js → p-cbe318f8.entry.js} +1 -1
  186. package/dist/elements/p-cfed7395.js +4 -0
  187. package/dist/elements/p-d22a1dc7.entry.js +7 -0
  188. package/dist/elements/p-d3e75c94.entry.js +1 -0
  189. package/dist/elements/p-d8f6d3ce.entry.js +14 -0
  190. package/dist/elements/p-d9880221.entry.js +4 -0
  191. package/dist/elements/p-da5db8fb.entry.js +1 -0
  192. package/dist/elements/{p-91fe653f.js → p-dcc6b03c.js} +3 -0
  193. package/dist/elements/{p-305e246c.entry.js → p-dd846020.entry.js} +1 -1
  194. package/dist/elements/p-df240b2a.entry.js +4 -0
  195. package/dist/elements/p-dffd8689.js +4 -0
  196. package/dist/elements/p-e495a095.js +4 -0
  197. package/dist/elements/p-e5fc7d42.entry.js +1 -0
  198. package/dist/elements/{p-aaa8393e.entry.js → p-eb137e9d.entry.js} +1 -1
  199. package/dist/elements/p-f4e54a17.js +7 -0
  200. package/dist/elements/p-f67d0717.entry.js +1 -0
  201. package/dist/elements/p-f7f4c640.js +1 -0
  202. package/dist/elements/p-f851b91a.js +4 -0
  203. package/dist/elements/p-fb27ee76.entry.js +1 -0
  204. package/dist/elements/p-fbddca35.entry.js +1 -0
  205. package/dist/elements/p-fc1df8e0.entry.js +7 -0
  206. package/dist/elements/p-fdac5f3a.js +4 -0
  207. package/dist/esm/{animation-fe6ed422.js → animation-801a007a.js} +115 -84
  208. package/dist/esm/{app-globals-27d92837.js → app-globals-05a3abfb.js} +1 -1
  209. package/dist/esm/{cubic-bezier-108b8579.js → cubic-bezier-538b6253.js} +13 -12
  210. package/dist/esm/data-62c81c24.js +1463 -0
  211. package/dist/esm/dir-defb16c6.js +18 -0
  212. package/dist/esm/elements.js +4 -4
  213. package/dist/esm/focus-visible-78d55799.js +74 -0
  214. package/dist/esm/framework-delegate-7e2b767b.js +115 -0
  215. package/dist/esm/{gesture-controller-8f35af24.js → gesture-controller-c466ff14.js} +6 -2
  216. package/dist/esm/{haptic-c424e670.js → haptic-e7d5ef4d.js} +38 -9
  217. package/dist/esm/{hardware-back-button-bb4c578a.js → hardware-back-button-242191a7.js} +11 -8
  218. package/dist/esm/{helpers-44e3bd9f.js → helpers-aeff219b.js} +113 -16
  219. package/dist/esm/index-0dbaca1a.js +28 -0
  220. package/dist/esm/index-1f3d8582.js +34 -0
  221. package/dist/esm/{index-97199683.js → index-2be9a18b.js} +34 -28
  222. package/dist/esm/{index-8d682224.js → index-51e4a829.js} +12 -8
  223. package/dist/esm/{index-8a463a85.js → index-6048aed6.js} +35 -24
  224. package/dist/esm/index-65ecd543.js +25 -0
  225. package/dist/esm/{tap-click-a7e55ef5.js → index-b212db1c.js} +37 -19
  226. package/dist/esm/{index-e4deec27.js → index-cb938ffb.js} +7 -1
  227. package/dist/esm/{index-3a1bd803.js → index-d39eb62b.js} +35 -20
  228. package/dist/esm/index-ebf7f059.js +128 -0
  229. package/dist/esm/{input-shims-3b48722f.js → input-shims-8a389148.js} +89 -38
  230. package/dist/esm/ion-accordion-group.entry.js +201 -0
  231. package/dist/esm/ion-accordion.entry.js +332 -0
  232. package/dist/esm/ion-action-sheet_3.entry.js +859 -0
  233. package/dist/esm/{ion-app_45.entry.js → ion-app_46.entry.js} +1694 -1407
  234. package/dist/esm/ion-avatar.entry.js +2 -2
  235. package/dist/esm/ion-back-button.entry.js +12 -11
  236. package/dist/esm/ion-backdrop.entry.js +4 -4
  237. package/dist/esm/ion-breadcrumb.entry.js +97 -0
  238. package/dist/esm/ion-breadcrumbs.entry.js +129 -0
  239. package/dist/esm/ion-buttons_3.entry.js +787 -0
  240. package/dist/esm/ion-card-subtitle.entry.js +4 -4
  241. package/dist/esm/{ion-list-header_3.entry.js → ion-checkbox_4.entry.js} +124 -24
  242. package/dist/esm/ion-chip.entry.js +5 -10
  243. package/dist/esm/ion-datetime-button.entry.js +342 -0
  244. package/dist/esm/ion-datetime.entry.js +1548 -856
  245. package/dist/esm/ion-fab-button.entry.js +26 -9
  246. package/dist/esm/ion-fab-list.entry.js +4 -4
  247. package/dist/esm/ion-fab.entry.js +15 -13
  248. package/dist/esm/ion-img.entry.js +28 -4
  249. package/dist/esm/ion-infinite-scroll-content.entry.js +5 -5
  250. package/dist/esm/ion-infinite-scroll.entry.js +13 -13
  251. package/dist/esm/ion-input.entry.js +57 -23
  252. package/dist/esm/ion-item-option.entry.js +8 -8
  253. package/dist/esm/ion-item-options.entry.js +5 -5
  254. package/dist/esm/ion-item-sliding.entry.js +59 -63
  255. package/dist/esm/ion-loading.entry.js +37 -36
  256. package/dist/esm/ion-menu-button.entry.js +14 -12
  257. package/dist/esm/ion-menu-toggle.entry.js +8 -7
  258. package/dist/esm/ion-menu.entry.js +71 -57
  259. package/dist/esm/ion-modal.entry.js +1375 -145
  260. package/dist/esm/ion-nav-link.entry.js +5 -2
  261. package/dist/esm/ion-nav.entry.js +177 -171
  262. package/dist/esm/ion-picker-column.entry.js +25 -27
  263. package/dist/esm/ion-picker.entry.js +22 -17
  264. package/dist/esm/ion-popover.entry.js +1208 -182
  265. package/dist/esm/ion-range.entry.js +137 -57
  266. package/dist/esm/ion-refresher-content.entry.js +7 -12
  267. package/dist/esm/ion-refresher.entry.js +149 -147
  268. package/dist/esm/ion-reorder-group.entry.js +42 -35
  269. package/dist/esm/ion-reorder.entry.js +5 -4
  270. package/dist/esm/ion-route-redirect.entry.js +1 -1
  271. package/dist/esm/ion-route.entry.js +1 -1
  272. package/dist/esm/ion-router-link.entry.js +5 -5
  273. package/dist/esm/ion-router-outlet.entry.js +24 -20
  274. package/dist/esm/ion-router.entry.js +291 -194
  275. package/dist/esm/ion-segment-button.entry.js +10 -17
  276. package/dist/esm/ion-segment.entry.js +119 -26
  277. package/dist/esm/ion-select-option.entry.js +3 -3
  278. package/dist/esm/ion-select.entry.js +113 -78
  279. package/dist/esm/ion-slide.entry.js +3 -3
  280. package/dist/esm/ion-slides.entry.js +26 -27
  281. package/dist/esm/ion-spinner.entry.js +10 -9
  282. package/dist/esm/ion-split-pane.entry.js +16 -12
  283. package/dist/esm/ion-tab-bar.entry.js +16 -23
  284. package/dist/esm/ion-tab-button.entry.js +6 -6
  285. package/dist/esm/ion-tab.entry.js +4 -4
  286. package/dist/esm/ion-tabs.entry.js +4 -5
  287. package/dist/esm/ion-text.entry.js +3 -3
  288. package/dist/esm/ion-textarea.entry.js +31 -29
  289. package/dist/esm/ion-thumbnail.entry.js +2 -2
  290. package/dist/esm/ion-toast.entry.js +49 -59
  291. package/dist/esm/ion-toggle.entry.js +41 -22
  292. package/dist/esm/ion-virtual-scroll.entry.js +39 -31
  293. package/dist/esm/{ionic-global-2e28f7c7.js → ionic-global-6cd57191.js} +112 -93
  294. package/dist/esm/{ios.transition-a783e3cd.js → ios.transition-bbd952f2.js} +78 -53
  295. package/dist/{custom-elements/keyboard.js → esm/keyboard-413afe04.js} +6 -3
  296. package/dist/esm/keyboard-controller-33693bc2.js +40 -0
  297. package/dist/esm/loader.js +4 -4
  298. package/dist/esm/{md.transition-5a4a8c82.js → md.transition-5170a6d3.js} +15 -17
  299. package/dist/esm/{menu-toggle-util-562dfc9c.js → menu-toggle-util-82bf888a.js} +5 -2
  300. package/dist/esm/{overlays-fc9a0625.js → overlays-0c7f05e1.js} +186 -71
  301. package/dist/esm/spinner-configs-cbcd1f62.js +145 -0
  302. package/dist/esm/{status-tap-69e62ad6.js → status-tap-ad757b8a.js} +10 -5
  303. package/dist/esm/swipe-back-7ef22876.js +69 -0
  304. package/dist/esm/test-component.entry.js +1 -1
  305. package/dist/esm/{theme-d21826a7.js → theme-7cf2cab0.js} +9 -5
  306. package/package.json +4 -5
  307. package/LICENSE +0 -21
  308. package/dist/cjs/button-active-c14dab31.js +0 -66
  309. package/dist/cjs/focus-visible-16c98640.js +0 -45
  310. package/dist/cjs/framework-delegate-c45292a3.js +0 -37
  311. package/dist/cjs/ion-action-sheet.cjs.entry.js +0 -265
  312. package/dist/cjs/ion-alert.cjs.entry.js +0 -456
  313. package/dist/cjs/ion-buttons.cjs.entry.js +0 -42
  314. package/dist/cjs/ion-checkbox.cjs.entry.js +0 -117
  315. package/dist/cjs/ion-note.cjs.entry.js +0 -29
  316. package/dist/cjs/ion-select-popover.cjs.entry.js +0 -35
  317. package/dist/cjs/spinner-configs-fb16b986.js +0 -112
  318. package/dist/custom-elements/focus-visible.js +0 -43
  319. package/dist/elements/p-03bda390.js +0 -1
  320. package/dist/elements/p-0be044f1.entry.js +0 -1
  321. package/dist/elements/p-119c7c6c.entry.js +0 -1
  322. package/dist/elements/p-14c7c3ea.entry.js +0 -1
  323. package/dist/elements/p-1d4a2c61.js +0 -1
  324. package/dist/elements/p-1d894ac4.entry.js +0 -1
  325. package/dist/elements/p-1dafa1ce.entry.js +0 -1
  326. package/dist/elements/p-23b89ccb.entry.js +0 -1
  327. package/dist/elements/p-2c03b9ab.entry.js +0 -1
  328. package/dist/elements/p-346985f2.js +0 -1
  329. package/dist/elements/p-360f1c62.entry.js +0 -1
  330. package/dist/elements/p-373e1f25.entry.js +0 -1
  331. package/dist/elements/p-40547acb.entry.js +0 -1
  332. package/dist/elements/p-40b68014.entry.js +0 -1
  333. package/dist/elements/p-42e4f702.entry.js +0 -1
  334. package/dist/elements/p-489807e5.js +0 -1
  335. package/dist/elements/p-4ad72d54.entry.js +0 -1
  336. package/dist/elements/p-4cca7b5e.entry.js +0 -1
  337. package/dist/elements/p-4f24d306.js +0 -1
  338. package/dist/elements/p-519d6a53.entry.js +0 -1
  339. package/dist/elements/p-536e8e52.entry.js +0 -1
  340. package/dist/elements/p-599bb53f.entry.js +0 -1
  341. package/dist/elements/p-5eb7a546.js +0 -1
  342. package/dist/elements/p-60df2bed.entry.js +0 -1
  343. package/dist/elements/p-65133e33.js +0 -1
  344. package/dist/elements/p-6693fce8.js +0 -1
  345. package/dist/elements/p-689bdcc1.entry.js +0 -1
  346. package/dist/elements/p-70713b3d.entry.js +0 -1
  347. package/dist/elements/p-707d5d76.js +0 -1
  348. package/dist/elements/p-7212b7f2.js +0 -1
  349. package/dist/elements/p-73992898.entry.js +0 -1
  350. package/dist/elements/p-792c1e0f.entry.js +0 -1
  351. package/dist/elements/p-7e5300af.js +0 -2
  352. package/dist/elements/p-8068987c.entry.js +0 -1
  353. package/dist/elements/p-83accf46.entry.js +0 -1
  354. package/dist/elements/p-86635d06.entry.js +0 -1
  355. package/dist/elements/p-874c2b44.js +0 -1
  356. package/dist/elements/p-89c12ce8.entry.js +0 -1
  357. package/dist/elements/p-8bcba3f7.entry.js +0 -1
  358. package/dist/elements/p-8c759f51.entry.js +0 -1
  359. package/dist/elements/p-8f945e6b.entry.js +0 -1
  360. package/dist/elements/p-9300ab6a.js +0 -1
  361. package/dist/elements/p-93cacd51.entry.js +0 -1
  362. package/dist/elements/p-9408d0b4.entry.js +0 -1
  363. package/dist/elements/p-98c79eda.js +0 -1
  364. package/dist/elements/p-99f8abed.js +0 -1
  365. package/dist/elements/p-9ca7e079.js +0 -1
  366. package/dist/elements/p-a4648b74.entry.js +0 -1
  367. package/dist/elements/p-aab0f63c.js +0 -1
  368. package/dist/elements/p-ad4e2295.entry.js +0 -1
  369. package/dist/elements/p-afb8f7d5.entry.js +0 -1
  370. package/dist/elements/p-b055ec44.js +0 -1
  371. package/dist/elements/p-b078d63b.entry.js +0 -1
  372. package/dist/elements/p-b3460325.entry.js +0 -1
  373. package/dist/elements/p-b5406b58.entry.js +0 -1
  374. package/dist/elements/p-b5ef0c91.entry.js +0 -1
  375. package/dist/elements/p-b6ba623e.entry.js +0 -1
  376. package/dist/elements/p-b9926d8b.entry.js +0 -1
  377. package/dist/elements/p-bfd4cfcd.entry.js +0 -1
  378. package/dist/elements/p-c08dd7d0.entry.js +0 -1
  379. package/dist/elements/p-c0db9c51.entry.js +0 -1
  380. package/dist/elements/p-c1e7fbfb.js +0 -1
  381. package/dist/elements/p-ca69d6c9.js +0 -1
  382. package/dist/elements/p-cc4cb1ac.entry.js +0 -1
  383. package/dist/elements/p-cf8a7031.entry.js +0 -1
  384. package/dist/elements/p-cff82b6f.js +0 -1
  385. package/dist/elements/p-d01009b8.entry.js +0 -67
  386. package/dist/elements/p-d6d1e65f.entry.js +0 -1
  387. package/dist/elements/p-d9462b66.entry.js +0 -1
  388. package/dist/elements/p-e2e0fee9.entry.js +0 -1
  389. package/dist/elements/p-e642b266.entry.js +0 -1
  390. package/dist/elements/p-e953934f.entry.js +0 -1
  391. package/dist/elements/p-f0474f46.js +0 -1
  392. package/dist/elements/p-f10a94f6.entry.js +0 -1
  393. package/dist/elements/p-f2426182.entry.js +0 -1
  394. package/dist/elements/p-f327fd21.js +0 -1
  395. package/dist/elements/p-f84987ee.js +0 -1
  396. package/dist/elements/p-f8a3367d.entry.js +0 -1
  397. package/dist/esm/button-active-fd9d6d91.js +0 -64
  398. package/dist/esm/focus-visible-edb28f19.js +0 -43
  399. package/dist/esm/framework-delegate-9cd8048f.js +0 -34
  400. package/dist/esm/ion-action-sheet.entry.js +0 -261
  401. package/dist/esm/ion-alert.entry.js +0 -452
  402. package/dist/esm/ion-buttons.entry.js +0 -38
  403. package/dist/esm/ion-checkbox.entry.js +0 -113
  404. package/dist/esm/ion-note.entry.js +0 -25
  405. package/dist/esm/ion-select-popover.entry.js +0 -31
  406. package/dist/esm/keyboard-e6abcb80.js +0 -125
  407. package/dist/esm/spinner-configs-aaf2a1a9.js +0 -110
  408. package/dist/esm/swipe-back-d84cfc8a.js +0 -50
  409. package/readme.md +0 -55
@@ -2,18 +2,22 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-b4a9ece2.js');
6
- const helpers = require('./helpers-398ced09.js');
5
+ const index = require('./index-eaa0d16e.js');
6
+ const helpers = require('./helpers-cb08f5ae.js');
7
7
 
8
+ /*!
9
+ * (C) Ionic http://ionicframework.com - MIT License
10
+ */
8
11
  const ROUTER_INTENT_NONE = 'root';
9
12
  const ROUTER_INTENT_FORWARD = 'forward';
10
13
  const ROUTER_INTENT_BACK = 'back';
11
14
 
12
- // Join the non empty segments with "/".
15
+ /*!
16
+ * (C) Ionic http://ionicframework.com - MIT License
17
+ */
18
+ /** Join the non empty segments with "/". */
13
19
  const generatePath = (segments) => {
14
- const path = segments
15
- .filter(s => s.length > 0)
16
- .join('/');
20
+ const path = segments.filter((s) => s.length > 0).join('/');
17
21
  return '/' + path;
18
22
  };
19
23
  const generateUrl = (segments, useHash, queryString) => {
@@ -26,8 +30,8 @@ const generateUrl = (segments, useHash, queryString) => {
26
30
  }
27
31
  return url;
28
32
  };
29
- const writePath = (history, root, useHash, path, direction, state, queryString) => {
30
- const url = generateUrl([...parsePath(root).segments, ...path], useHash, queryString);
33
+ const writeSegments = (history, root, useHash, segments, direction, state, queryString) => {
34
+ const url = generateUrl([...parsePath(root).segments, ...segments], useHash, queryString);
31
35
  if (direction === ROUTER_INTENT_FORWARD) {
32
36
  history.pushState(state, '', url);
33
37
  }
@@ -35,67 +39,79 @@ const writePath = (history, root, useHash, path, direction, state, queryString)
35
39
  history.replaceState(state, '', url);
36
40
  }
37
41
  };
38
- const chainToPath = (chain) => {
39
- const path = [];
42
+ /**
43
+ * Transforms a chain to a list of segments.
44
+ *
45
+ * Notes:
46
+ * - parameter segments of the form :param are replaced with their value,
47
+ * - null is returned when a value is missing for any parameter segment.
48
+ */
49
+ const chainToSegments = (chain) => {
50
+ const segments = [];
40
51
  for (const route of chain) {
41
- for (const segment of route.path) {
52
+ for (const segment of route.segments) {
42
53
  if (segment[0] === ':') {
43
54
  const param = route.params && route.params[segment.slice(1)];
44
55
  if (!param) {
45
56
  return null;
46
57
  }
47
- path.push(param);
58
+ segments.push(param);
48
59
  }
49
60
  else if (segment !== '') {
50
- path.push(segment);
61
+ segments.push(segment);
51
62
  }
52
63
  }
53
64
  }
54
- return path;
65
+ return segments;
55
66
  };
56
- // Remove the prefix segments from the path segments.
57
- //
58
- // Return:
59
- // - null when the path segments do not start with the passed prefix,
60
- // - the path segments after the prefix otherwise.
61
- const removePrefix = (prefix, path) => {
62
- if (prefix.length > path.length) {
67
+ /**
68
+ * Removes the prefix segments from the path segments.
69
+ *
70
+ * Return:
71
+ * - null when the path segments do not start with the passed prefix,
72
+ * - the path segments after the prefix otherwise.
73
+ */
74
+ const removePrefix = (prefix, segments) => {
75
+ if (prefix.length > segments.length) {
63
76
  return null;
64
77
  }
65
78
  if (prefix.length <= 1 && prefix[0] === '') {
66
- return path;
79
+ return segments;
67
80
  }
68
81
  for (let i = 0; i < prefix.length; i++) {
69
- if (prefix[i] !== path[i]) {
82
+ if (prefix[i] !== segments[i]) {
70
83
  return null;
71
84
  }
72
85
  }
73
- if (path.length === prefix.length) {
86
+ if (segments.length === prefix.length) {
74
87
  return [''];
75
88
  }
76
- return path.slice(prefix.length);
89
+ return segments.slice(prefix.length);
77
90
  };
78
- const readPath = (loc, root, useHash) => {
91
+ const readSegments = (loc, root, useHash) => {
79
92
  const prefix = parsePath(root).segments;
80
93
  const pathname = useHash ? loc.hash.slice(1) : loc.pathname;
81
- const path = parsePath(pathname).segments;
82
- return removePrefix(prefix, path);
94
+ const segments = parsePath(pathname).segments;
95
+ return removePrefix(prefix, segments);
83
96
  };
84
- // Parses the path to:
85
- // - segments an array of '/' separated parts,
86
- // - queryString (undefined when no query string).
97
+ /**
98
+ * Parses the path to:
99
+ * - segments an array of '/' separated parts,
100
+ * - queryString (undefined when no query string).
101
+ */
87
102
  const parsePath = (path) => {
88
103
  let segments = [''];
89
104
  let queryString;
90
105
  if (path != null) {
91
106
  const qsStart = path.indexOf('?');
92
107
  if (qsStart > -1) {
93
- queryString = path.substr(qsStart + 1);
94
- path = path.substr(0, qsStart);
108
+ queryString = path.substring(qsStart + 1);
109
+ path = path.substring(0, qsStart);
95
110
  }
96
- segments = path.split('/')
97
- .map(s => s.trim())
98
- .filter(s => s.length > 0);
111
+ segments = path
112
+ .split('/')
113
+ .map((s) => s.trim())
114
+ .filter((s) => s.length > 0);
99
115
  if (segments.length === 0) {
100
116
  segments = [''];
101
117
  }
@@ -103,13 +119,16 @@ const parsePath = (path) => {
103
119
  return { segments, queryString };
104
120
  };
105
121
 
122
+ /*!
123
+ * (C) Ionic http://ionicframework.com - MIT License
124
+ */
106
125
  const printRoutes = (routes) => {
107
126
  console.group(`[ion-core] ROUTES[${routes.length}]`);
108
127
  for (const chain of routes) {
109
- const path = [];
110
- chain.forEach(r => path.push(...r.path));
111
- const ids = chain.map(r => r.id);
112
- console.debug(`%c ${generatePath(path)}`, 'font-weight: bold; padding-left: 20px', '=>\t', `(${ids.join(', ')})`);
128
+ const segments = [];
129
+ chain.forEach((r) => segments.push(...r.segments));
130
+ const ids = chain.map((r) => r.id);
131
+ console.debug(`%c ${generatePath(segments)}`, 'font-weight: bold; padding-left: 20px', '=>\t', `(${ids.join(', ')})`);
113
132
  }
114
133
  console.groupEnd();
115
134
  };
@@ -123,6 +142,17 @@ const printRedirects = (redirects) => {
123
142
  console.groupEnd();
124
143
  };
125
144
 
145
+ /*!
146
+ * (C) Ionic http://ionicframework.com - MIT License
147
+ */
148
+ /**
149
+ * Activates the passed route chain.
150
+ *
151
+ * There must be exactly one outlet per route entry in the chain.
152
+ *
153
+ * The methods calls setRouteId on each of the outlet with the corresponding route entry in the chain.
154
+ * setRouteId will create or select the view in the outlet.
155
+ */
126
156
  const writeNavState = async (root, chain, direction, index, changed = false, animation) => {
127
157
  try {
128
158
  // find next navigation outlet in the DOM
@@ -131,7 +161,7 @@ const writeNavState = async (root, chain, direction, index, changed = false, ani
131
161
  if (index >= chain.length || !outlet) {
132
162
  return changed;
133
163
  }
134
- await new Promise(resolve => helpers.componentOnReady(outlet, resolve));
164
+ await new Promise((resolve) => helpers.componentOnReady(outlet, resolve));
135
165
  const route = chain[index];
136
166
  const result = await outlet.setRouteId(route.id, route.params, direction, animation);
137
167
  // if the outlet changed the page, reset navigation to neutral (no direction)
@@ -154,23 +184,22 @@ const writeNavState = async (root, chain, direction, index, changed = false, ani
154
184
  return false;
155
185
  }
156
186
  };
187
+ /**
188
+ * Recursively walks the outlet in the DOM.
189
+ *
190
+ * The function returns a list of RouteID corresponding to each of the outlet and the last outlet without a RouteID.
191
+ */
157
192
  const readNavState = async (root) => {
158
193
  const ids = [];
159
194
  let outlet;
160
195
  let node = root;
161
- // tslint:disable-next-line:no-constant-condition
162
- while (true) {
163
- outlet = searchNavNode(node);
164
- if (outlet) {
165
- const id = await outlet.getRouteId();
166
- if (id) {
167
- node = id.element;
168
- id.element = undefined;
169
- ids.push(id);
170
- }
171
- else {
172
- break;
173
- }
196
+ // eslint-disable-next-line no-cond-assign
197
+ while ((outlet = searchNavNode(node))) {
198
+ const id = await outlet.getRouteId();
199
+ if (id) {
200
+ node = id.element;
201
+ id.element = undefined;
202
+ ids.push(id);
174
203
  }
175
204
  else {
176
205
  break;
@@ -182,33 +211,39 @@ const waitUntilNavNode = () => {
182
211
  if (searchNavNode(document.body)) {
183
212
  return Promise.resolve();
184
213
  }
185
- return new Promise(resolve => {
186
- window.addEventListener('ionNavWillLoad', resolve, { once: true });
214
+ return new Promise((resolve) => {
215
+ window.addEventListener('ionNavWillLoad', () => resolve(), { once: true });
187
216
  });
188
217
  };
189
- const QUERY = ':not([no-router]) ion-nav, :not([no-router]) ion-tabs, :not([no-router]) ion-router-outlet';
218
+ /** Selector for all the outlets supported by the router. */
219
+ const OUTLET_SELECTOR = ':not([no-router]) ion-nav, :not([no-router]) ion-tabs, :not([no-router]) ion-router-outlet';
190
220
  const searchNavNode = (root) => {
191
221
  if (!root) {
192
222
  return undefined;
193
223
  }
194
- if (root.matches(QUERY)) {
224
+ if (root.matches(OUTLET_SELECTOR)) {
195
225
  return root;
196
226
  }
197
- const outlet = root.querySelector(QUERY);
227
+ const outlet = root.querySelector(OUTLET_SELECTOR);
198
228
  return outlet !== null && outlet !== void 0 ? outlet : undefined;
199
229
  };
200
230
 
201
- // Returns whether the given redirect matches the given path segments.
202
- //
203
- // A redirect matches when the segments of the path and redirect.from are equal.
204
- // Note that segments are only checked until redirect.from contains a '*' which matches any path segment.
205
- // The path ['some', 'path', 'to', 'page'] matches both ['some', 'path', 'to', 'page'] and ['some', 'path', '*'].
206
- const matchesRedirect = (path, redirect) => {
231
+ /*!
232
+ * (C) Ionic http://ionicframework.com - MIT License
233
+ */
234
+ /**
235
+ * Returns whether the given redirect matches the given path segments.
236
+ *
237
+ * A redirect matches when the segments of the path and redirect.from are equal.
238
+ * Note that segments are only checked until redirect.from contains a '*' which matches any path segment.
239
+ * The path ['some', 'path', 'to', 'page'] matches both ['some', 'path', 'to', 'page'] and ['some', 'path', '*'].
240
+ */
241
+ const matchesRedirect = (segments, redirect) => {
207
242
  const { from, to } = redirect;
208
243
  if (to === undefined) {
209
244
  return false;
210
245
  }
211
- if (from.length > path.length) {
246
+ if (from.length > segments.length) {
212
247
  return false;
213
248
  }
214
249
  for (let i = 0; i < from.length; i++) {
@@ -216,15 +251,15 @@ const matchesRedirect = (path, redirect) => {
216
251
  if (expected === '*') {
217
252
  return true;
218
253
  }
219
- if (expected !== path[i]) {
254
+ if (expected !== segments[i]) {
220
255
  return false;
221
256
  }
222
257
  }
223
- return from.length === path.length;
258
+ return from.length === segments.length;
224
259
  };
225
- // Returns the first redirect matching the path segments or undefined when no match found.
226
- const findRouteRedirect = (path, redirects) => {
227
- return redirects.find(redirect => matchesRedirect(path, redirect));
260
+ /** Returns the first redirect matching the path segments or undefined when no match found. */
261
+ const findRouteRedirect = (segments, redirects) => {
262
+ return redirects.find((redirect) => matchesRedirect(segments, redirect));
228
263
  };
229
264
  const matchesIDs = (ids, chain) => {
230
265
  const len = Math.min(ids.length, chain.length);
@@ -238,33 +273,30 @@ const matchesIDs = (ids, chain) => {
238
273
  }
239
274
  if (routeId.params) {
240
275
  const routeIdParams = Object.keys(routeId.params);
241
- /**
242
- * Only compare routes with the chain that have the same number of parameters.
243
- */
244
- if (routeIdParams.length === routeChain.path.length) {
245
- /**
246
- * Maps the route's params into a path based on the path variable names,
247
- * to compare against the route chain format.
248
- *
249
- * Before:
250
- * ```ts
251
- * {
252
- * params: {
253
- * s1: 'a',
254
- * s2: 'b'
255
- * }
256
- * }
257
- * ```
258
- *
259
- * After:
260
- * ```ts
261
- * [':s1',':s2']
262
- * ```
263
- */
264
- const pathWithParams = routeIdParams.map(key => `:${key}`);
276
+ // Only compare routes with the chain that have the same number of parameters.
277
+ if (routeIdParams.length === routeChain.segments.length) {
278
+ // Maps the route's params into a path based on the path variable names,
279
+ // to compare against the route chain format.
280
+ //
281
+ // Before:
282
+ // ```ts
283
+ // {
284
+ // params: {
285
+ // s1: 'a',
286
+ // s2: 'b'
287
+ // }
288
+ // }
289
+ // ```
290
+ //
291
+ // After:
292
+ // ```ts
293
+ // [':s1',':s2']
294
+ // ```
295
+ //
296
+ const pathWithParams = routeIdParams.map((key) => `:${key}`);
265
297
  for (let j = 0; j < pathWithParams.length; j++) {
266
298
  // Skip results where the path variable is not a match
267
- if (pathWithParams[j].toLowerCase() !== routeChain.path[j]) {
299
+ if (pathWithParams[j].toLowerCase() !== routeChain.segments[j]) {
268
300
  break;
269
301
  }
270
302
  // Weight path matches for the same index higher.
@@ -277,18 +309,25 @@ const matchesIDs = (ids, chain) => {
277
309
  }
278
310
  return score;
279
311
  };
280
- const matchesPath = (inputPath, chain) => {
281
- const segments = new RouterSegments(inputPath);
312
+ /**
313
+ * Matches the segments against the chain.
314
+ *
315
+ * Returns:
316
+ * - null when there is no match,
317
+ * - a chain with the params properties updated with the parameter segments on match.
318
+ */
319
+ const matchesSegments = (segments, chain) => {
320
+ const inputSegments = new RouterSegments(segments);
282
321
  let matchesDefault = false;
283
322
  let allparams;
284
323
  for (let i = 0; i < chain.length; i++) {
285
- const path = chain[i].path;
286
- if (path[0] === '') {
324
+ const chainSegments = chain[i].segments;
325
+ if (chainSegments[0] === '') {
287
326
  matchesDefault = true;
288
327
  }
289
328
  else {
290
- for (const segment of path) {
291
- const data = segments.next();
329
+ for (const segment of chainSegments) {
330
+ const data = inputSegments.next();
292
331
  // data param
293
332
  if (segment[0] === ':') {
294
333
  if (data === '') {
@@ -305,29 +344,36 @@ const matchesPath = (inputPath, chain) => {
305
344
  matchesDefault = false;
306
345
  }
307
346
  }
308
- const matches = (matchesDefault)
309
- ? matchesDefault === (segments.next() === '')
310
- : true;
347
+ const matches = matchesDefault ? matchesDefault === (inputSegments.next() === '') : true;
311
348
  if (!matches) {
312
349
  return null;
313
350
  }
314
351
  if (allparams) {
315
352
  return chain.map((route, i) => ({
316
353
  id: route.id,
317
- path: route.path,
354
+ segments: route.segments,
318
355
  params: mergeParams(route.params, allparams[i]),
319
356
  beforeEnter: route.beforeEnter,
320
- beforeLeave: route.beforeLeave
357
+ beforeLeave: route.beforeLeave,
321
358
  }));
322
359
  }
323
360
  return chain;
324
361
  };
325
- // Merges the route parameter objects.
326
- // Returns undefined when both parameters are undefined.
362
+ /**
363
+ * Merges the route parameter objects.
364
+ * Returns undefined when both parameters are undefined.
365
+ */
327
366
  const mergeParams = (a, b) => {
328
367
  return a || b ? Object.assign(Object.assign({}, a), b) : undefined;
329
368
  };
330
- const routerIDsToChain = (ids, chains) => {
369
+ /**
370
+ * Finds the best match for the ids in the chains.
371
+ *
372
+ * Returns the best match or null when no match is found.
373
+ * When a chain is returned the parameters are updated from the RouteIDs.
374
+ * That is they contain both the componentProps of the <ion-route> and the parameter segment.
375
+ */
376
+ const findChainForIDs = (ids, chains) => {
331
377
  let match = null;
332
378
  let maxMatches = 0;
333
379
  for (const chain of chains) {
@@ -338,38 +384,59 @@ const routerIDsToChain = (ids, chains) => {
338
384
  }
339
385
  }
340
386
  if (match) {
341
- return match.map((route, i) => ({
342
- id: route.id,
343
- path: route.path,
344
- params: mergeParams(route.params, ids[i] && ids[i].params)
345
- }));
387
+ return match.map((route, i) => {
388
+ var _a;
389
+ return ({
390
+ id: route.id,
391
+ segments: route.segments,
392
+ params: mergeParams(route.params, (_a = ids[i]) === null || _a === void 0 ? void 0 : _a.params),
393
+ });
394
+ });
346
395
  }
347
396
  return null;
348
397
  };
349
- const routerPathToChain = (path, chains) => {
398
+ /**
399
+ * Finds the best match for the segments in the chains.
400
+ *
401
+ * Returns the best match or null when no match is found.
402
+ * When a chain is returned the parameters are updated from the segments.
403
+ * That is they contain both the componentProps of the <ion-route> and the parameter segments.
404
+ */
405
+ const findChainForSegments = (segments, chains) => {
350
406
  let match = null;
351
- let matches = 0;
407
+ let bestScore = 0;
352
408
  for (const chain of chains) {
353
- const matchedChain = matchesPath(path, chain);
409
+ const matchedChain = matchesSegments(segments, chain);
354
410
  if (matchedChain !== null) {
355
411
  const score = computePriority(matchedChain);
356
- if (score > matches) {
357
- matches = score;
412
+ if (score > bestScore) {
413
+ bestScore = score;
358
414
  match = matchedChain;
359
415
  }
360
416
  }
361
417
  }
362
418
  return match;
363
419
  };
420
+ /**
421
+ * Computes the priority of a chain.
422
+ *
423
+ * Parameter segments are given a lower priority over fixed segments.
424
+ *
425
+ * Considering the following 2 chains matching the path /path/to/page:
426
+ * - /path/to/:where
427
+ * - /path/to/page
428
+ *
429
+ * The second one will be given a higher priority because "page" is a fixed segment (vs ":where", a parameter segment).
430
+ */
364
431
  const computePriority = (chain) => {
365
432
  let score = 1;
366
433
  let level = 1;
367
434
  for (const route of chain) {
368
- for (const path of route.path) {
369
- if (path[0] === ':') {
435
+ for (const segment of route.segments) {
436
+ if (segment[0] === ':') {
370
437
  score += Math.pow(1, level);
371
438
  }
372
- else if (path !== '') {
439
+ else if (segment !== '') {
373
440
  score += Math.pow(2, level);
374
441
  }
375
442
  level++;
@@ -378,17 +445,20 @@ const computePriority = (chain) => {
378
445
  return score;
379
446
  };
380
447
  class RouterSegments {
381
- constructor(path) {
382
- this.path = path.slice();
448
+ constructor(segments) {
449
+ this.segments = segments.slice();
383
450
  }
384
451
  next() {
385
- if (this.path.length > 0) {
386
- return this.path.shift();
452
+ if (this.segments.length > 0) {
453
+ return this.segments.shift();
387
454
  }
388
455
  return '';
389
456
  }
390
457
  }
391
458
 
459
+ /*!
460
+ * (C) Ionic http://ionicframework.com - MIT License
461
+ */
392
462
  const readProp = (el, prop) => {
393
463
  if (prop in el) {
394
464
  return el[prop];
@@ -398,10 +468,15 @@ const readProp = (el, prop) => {
398
468
  }
399
469
  return null;
400
470
  };
471
+ /**
472
+ * Extracts the redirects (that is <ion-route-redirect> elements inside the root).
473
+ *
474
+ * The redirects are returned as a list of RouteRedirect.
475
+ */
401
476
  const readRedirects = (root) => {
402
477
  return Array.from(root.children)
403
- .filter(el => el.tagName === 'ION-ROUTE-REDIRECT')
404
- .map(el => {
478
+ .filter((el) => el.tagName === 'ION-ROUTE-REDIRECT')
479
+ .map((el) => {
405
480
  const to = readProp(el, 'to');
406
481
  return {
407
482
  from: parsePath(readProp(el, 'from')).segments,
@@ -409,24 +484,39 @@ const readRedirects = (root) => {
409
484
  };
410
485
  });
411
486
  };
487
+ /**
488
+ * Extracts all the routes (that is <ion-route> elements inside the root).
489
+ *
490
+ * The routes are returned as a list of chains - the flattened tree.
491
+ */
412
492
  const readRoutes = (root) => {
413
493
  return flattenRouterTree(readRouteNodes(root));
414
494
  };
495
+ /**
496
+ * Reads the route nodes as a tree modeled after the DOM tree of <ion-route> elements.
497
+ *
498
+ * Note: routes without a component are ignored together with their children.
499
+ */
415
500
  const readRouteNodes = (node) => {
416
501
  return Array.from(node.children)
417
- .filter(el => el.tagName === 'ION-ROUTE' && el.component)
418
- .map(el => {
502
+ .filter((el) => el.tagName === 'ION-ROUTE' && el.component)
503
+ .map((el) => {
419
504
  const component = readProp(el, 'component');
420
505
  return {
421
- path: parsePath(readProp(el, 'url')).segments,
506
+ segments: parsePath(readProp(el, 'url')).segments,
422
507
  id: component.toLowerCase(),
423
508
  params: el.componentProps,
424
509
  beforeLeave: el.beforeLeave,
425
510
  beforeEnter: el.beforeEnter,
426
- children: readRouteNodes(el)
511
+ children: readRouteNodes(el),
427
512
  };
428
513
  });
429
514
  };
515
+ /**
516
+ * Flattens a RouterTree in a list of chains.
517
+ *
518
+ * Each chain represents a path from the root node to a terminal node.
519
+ */
430
520
  const flattenRouterTree = (nodes) => {
431
521
  const chains = [];
432
522
  for (const node of nodes) {
@@ -434,15 +524,18 @@ const flattenRouterTree = (nodes) => {
434
524
  }
435
525
  return chains;
436
526
  };
527
+ /** Flattens a route node recursively and push each branch to the chains list. */
437
528
  const flattenNode = (chain, chains, node) => {
438
- chain = chain.slice();
439
- chain.push({
440
- id: node.id,
441
- path: node.path,
442
- params: node.params,
443
- beforeLeave: node.beforeLeave,
444
- beforeEnter: node.beforeEnter
445
- });
529
+ chain = [
530
+ ...chain,
531
+ {
532
+ id: node.id,
533
+ segments: node.segments,
534
+ params: node.params,
535
+ beforeLeave: node.beforeLeave,
536
+ beforeEnter: node.beforeEnter,
537
+ },
538
+ ];
446
539
  if (node.children.length === 0) {
447
540
  chains.push(chain);
448
541
  return;
@@ -484,12 +577,12 @@ const Router = class {
484
577
  }
485
578
  async componentWillLoad() {
486
579
  await waitUntilNavNode();
487
- const canProceed = await this.runGuards(this.getPath());
580
+ const canProceed = await this.runGuards(this.getSegments());
488
581
  if (canProceed !== true) {
489
582
  if (typeof canProceed === 'object') {
490
583
  const { redirect } = canProceed;
491
584
  const path = parsePath(redirect);
492
- this.setPath(path.segments, ROUTER_INTENT_NONE, path.queryString);
585
+ this.setSegments(path.segments, ROUTER_INTENT_NONE, path.queryString);
493
586
  await this.writeNavStateRoot(path.segments, ROUTER_INTENT_NONE);
494
587
  }
495
588
  }
@@ -503,7 +596,7 @@ const Router = class {
503
596
  }
504
597
  async onPopState() {
505
598
  const direction = this.historyDirection();
506
- let segments = this.getPath();
599
+ let segments = this.getSegments();
507
600
  const canProceed = await this.runGuards(segments);
508
601
  if (canProceed !== true) {
509
602
  if (typeof canProceed === 'object') {
@@ -516,7 +609,7 @@ const Router = class {
516
609
  return this.writeNavStateRoot(segments, direction);
517
610
  }
518
611
  onBackButton(ev) {
519
- ev.detail.register(0, processNextHandler => {
612
+ ev.detail.register(0, (processNextHandler) => {
520
613
  this.back();
521
614
  processNextHandler();
522
615
  });
@@ -535,16 +628,20 @@ const Router = class {
535
628
  return true;
536
629
  }
537
630
  /**
538
- * Navigate to the specified URL.
631
+ * Navigate to the specified path.
539
632
  *
540
- * @param url The url to navigate to.
633
+ * @param path The path to navigate to.
541
634
  * @param direction The direction of the animation. Defaults to `"forward"`.
542
635
  */
543
- async push(url, direction = 'forward', animation) {
544
- if (url.startsWith('.')) {
545
- url = (new URL(url, window.location.href)).pathname;
636
+ async push(path, direction = 'forward', animation) {
637
+ var _a;
638
+ if (path.startsWith('.')) {
639
+ const currentPath = (_a = this.previousPath) !== null && _a !== void 0 ? _a : '/';
640
+ // Convert currentPath to an URL by pre-pending a protocol and a host to resolve the relative path.
641
+ const url = new URL(path, `https://host/${currentPath}`);
642
+ path = url.pathname + url.search;
546
643
  }
547
- let parsedPath = parsePath(url);
644
+ let parsedPath = parsePath(path);
548
645
  const canProceed = await this.runGuards(parsedPath.segments);
549
646
  if (canProceed !== true) {
550
647
  if (typeof canProceed === 'object') {
@@ -554,12 +651,10 @@ const Router = class {
554
651
  return false;
555
652
  }
556
653
  }
557
- this.setPath(parsedPath.segments, direction, parsedPath.queryString);
654
+ this.setSegments(parsedPath.segments, direction, parsedPath.queryString);
558
655
  return this.writeNavStateRoot(parsedPath.segments, direction, animation);
559
656
  }
560
- /**
561
- * Go back to previous page in the window.history.
562
- */
657
+ /** Go back to previous page in the window.history. */
563
658
  back() {
564
659
  window.history.back();
565
660
  return Promise.resolve(this.waitPromise);
@@ -577,30 +672,30 @@ const Router = class {
577
672
  }
578
673
  const { ids, outlet } = await readNavState(window.document.body);
579
674
  const routes = readRoutes(this.el);
580
- const chain = routerIDsToChain(ids, routes);
675
+ const chain = findChainForIDs(ids, routes);
581
676
  if (!chain) {
582
- console.warn('[ion-router] no matching URL for ', ids.map(i => i.id));
677
+ console.warn('[ion-router] no matching URL for ', ids.map((i) => i.id));
583
678
  return false;
584
679
  }
585
- const path = chainToPath(chain);
586
- if (!path) {
680
+ const segments = chainToSegments(chain);
681
+ if (!segments) {
587
682
  console.warn('[ion-router] router could not match path because some required param is missing');
588
683
  return false;
589
684
  }
590
- this.setPath(path, direction);
591
- await this.safeWriteNavState(outlet, chain, ROUTER_INTENT_NONE, path, null, ids.length);
685
+ this.setSegments(segments, direction);
686
+ await this.safeWriteNavState(outlet, chain, ROUTER_INTENT_NONE, segments, null, ids.length);
592
687
  return true;
593
688
  }
594
- // This handler gets called when a `ion-route-redirect` component is added to the DOM or if the from or to property of such node changes.
689
+ /** This handler gets called when a `ion-route-redirect` component is added to the DOM or if the from or to property of such node changes. */
595
690
  onRedirectChanged() {
596
- const path = this.getPath();
597
- if (path && findRouteRedirect(path, readRedirects(this.el))) {
598
- this.writeNavStateRoot(path, ROUTER_INTENT_NONE);
691
+ const segments = this.getSegments();
692
+ if (segments && findRouteRedirect(segments, readRedirects(this.el))) {
693
+ this.writeNavStateRoot(segments, ROUTER_INTENT_NONE);
599
694
  }
600
695
  }
601
- // This handler gets called when a `ion-route` component is added to the DOM or if the from or to property of such node changes.
696
+ /** This handler gets called when a `ion-route` component is added to the DOM or if the from or to property of such node changes. */
602
697
  onRoutesChanged() {
603
- return this.writeNavStateRoot(this.getPath(), ROUTER_INTENT_NONE);
698
+ return this.writeNavStateRoot(this.getSegments(), ROUTER_INTENT_NONE);
604
699
  }
605
700
  historyDirection() {
606
701
  var _a;
@@ -620,36 +715,36 @@ const Router = class {
620
715
  }
621
716
  return ROUTER_INTENT_NONE;
622
717
  }
623
- async writeNavStateRoot(path, direction, animation) {
624
- if (!path) {
718
+ async writeNavStateRoot(segments, direction, animation) {
719
+ if (!segments) {
625
720
  console.error('[ion-router] URL is not part of the routing set');
626
721
  return false;
627
722
  }
628
723
  // lookup redirect rule
629
724
  const redirects = readRedirects(this.el);
630
- const redirect = findRouteRedirect(path, redirects);
725
+ const redirect = findRouteRedirect(segments, redirects);
631
726
  let redirectFrom = null;
632
727
  if (redirect) {
633
- const { segments, queryString } = redirect.to;
634
- this.setPath(segments, direction, queryString);
728
+ const { segments: toSegments, queryString } = redirect.to;
729
+ this.setSegments(toSegments, direction, queryString);
635
730
  redirectFrom = redirect.from;
636
- path = segments;
731
+ segments = toSegments;
637
732
  }
638
733
  // lookup route chain
639
734
  const routes = readRoutes(this.el);
640
- const chain = routerPathToChain(path, routes);
735
+ const chain = findChainForSegments(segments, routes);
641
736
  if (!chain) {
642
737
  console.error('[ion-router] the path does not match any route');
643
738
  return false;
644
739
  }
645
740
  // write DOM give
646
- return this.safeWriteNavState(document.body, chain, direction, path, redirectFrom, 0, animation);
741
+ return this.safeWriteNavState(document.body, chain, direction, segments, redirectFrom, 0, animation);
647
742
  }
648
- async safeWriteNavState(node, chain, direction, path, redirectFrom, index = 0, animation) {
743
+ async safeWriteNavState(node, chain, direction, segments, redirectFrom, index = 0, animation) {
649
744
  const unlock = await this.lock();
650
745
  let changed = false;
651
746
  try {
652
- changed = await this.writeNavState(node, chain, direction, path, redirectFrom, index, animation);
747
+ changed = await this.writeNavState(node, chain, direction, segments, redirectFrom, index, animation);
653
748
  }
654
749
  catch (e) {
655
750
  console.error(e);
@@ -660,17 +755,19 @@ const Router = class {
660
755
  async lock() {
661
756
  const p = this.waitPromise;
662
757
  let resolve;
663
- this.waitPromise = new Promise(r => resolve = r);
758
+ this.waitPromise = new Promise((r) => (resolve = r));
664
759
  if (p !== undefined) {
665
760
  await p;
666
761
  }
667
762
  return resolve;
668
763
  }
669
- // Executes the beforeLeave hook of the source route and the beforeEnter hook of the target route if they exist.
670
- //
671
- // When the beforeLeave hook does not return true (to allow navigating) then that value is returned early and the beforeEnter is executed.
672
- // Otherwise the beforeEnterHook hook of the target route is executed.
673
- async runGuards(to = this.getPath(), from) {
764
+ /**
765
+ * Executes the beforeLeave hook of the source route and the beforeEnter hook of the target route if they exist.
766
+ *
767
+ * When the beforeLeave hook does not return true (to allow navigating) then that value is returned early and the beforeEnter is executed.
768
+ * Otherwise the beforeEnterHook hook of the target route is executed.
769
+ */
770
+ async runGuards(to = this.getSegments(), from) {
674
771
  if (from === undefined) {
675
772
  from = parsePath(this.previousPath).segments;
676
773
  }
@@ -678,24 +775,24 @@ const Router = class {
678
775
  return true;
679
776
  }
680
777
  const routes = readRoutes(this.el);
681
- const fromChain = routerPathToChain(from, routes);
778
+ const fromChain = findChainForSegments(from, routes);
682
779
  const beforeLeaveHook = fromChain && fromChain[fromChain.length - 1].beforeLeave;
683
780
  const canLeave = beforeLeaveHook ? await beforeLeaveHook() : true;
684
781
  if (canLeave === false || typeof canLeave === 'object') {
685
782
  return canLeave;
686
783
  }
687
- const toChain = routerPathToChain(to, routes);
784
+ const toChain = findChainForSegments(to, routes);
688
785
  const beforeEnterHook = toChain && toChain[toChain.length - 1].beforeEnter;
689
786
  return beforeEnterHook ? beforeEnterHook() : true;
690
787
  }
691
- async writeNavState(node, chain, direction, path, redirectFrom, index = 0, animation) {
788
+ async writeNavState(node, chain, direction, segments, redirectFrom, index = 0, animation) {
692
789
  if (this.busy) {
693
790
  console.warn('[ion-router] router is busy, transition was cancelled');
694
791
  return false;
695
792
  }
696
793
  this.busy = true;
697
794
  // generate route event and emit will change
698
- const routeEvent = this.routeChangeEvent(path, redirectFrom);
795
+ const routeEvent = this.routeChangeEvent(segments, redirectFrom);
699
796
  if (routeEvent) {
700
797
  this.ionRouteWillChange.emit(routeEvent);
701
798
  }
@@ -707,21 +804,21 @@ const Router = class {
707
804
  }
708
805
  return changed;
709
806
  }
710
- setPath(path, direction, queryString) {
807
+ setSegments(segments, direction, queryString) {
711
808
  this.state++;
712
- writePath(window.history, this.root, this.useHash, path, direction, this.state, queryString);
809
+ writeSegments(window.history, this.root, this.useHash, segments, direction, this.state, queryString);
713
810
  }
714
- getPath() {
715
- return readPath(window.location, this.root, this.useHash);
811
+ getSegments() {
812
+ return readSegments(window.location, this.root, this.useHash);
716
813
  }
717
- routeChangeEvent(path, redirectFromPath) {
814
+ routeChangeEvent(toSegments, redirectFromSegments) {
718
815
  const from = this.previousPath;
719
- const to = generatePath(path);
816
+ const to = generatePath(toSegments);
720
817
  this.previousPath = to;
721
818
  if (to === from) {
722
819
  return null;
723
820
  }
724
- const redirectedFrom = redirectFromPath ? generatePath(redirectFromPath) : null;
821
+ const redirectedFrom = redirectFromSegments ? generatePath(redirectFromSegments) : null;
725
822
  return {
726
823
  from,
727
824
  redirectedFrom,