@ionic/angular 8.8.19 → 8.8.20-dev.11787158518.168a2fea

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 (600) hide show
  1. package/README.md +9 -7
  2. package/dist/common/directives/control-value-accessors/index.js +2 -0
  3. package/dist/common/directives/control-value-accessors/index.js.map +1 -0
  4. package/{common → dist/common}/directives/control-value-accessors/value-accessor.d.ts +1 -1
  5. package/dist/common/directives/control-value-accessors/value-accessor.js +152 -0
  6. package/dist/common/directives/control-value-accessors/value-accessor.js.map +1 -0
  7. package/{common → dist/common}/directives/navigation/back-button.d.ts +1 -1
  8. package/dist/common/directives/navigation/back-button.js +61 -0
  9. package/dist/common/directives/navigation/back-button.js.map +1 -0
  10. package/dist/common/directives/navigation/nav-params.js +47 -0
  11. package/dist/common/directives/navigation/nav-params.js.map +1 -0
  12. package/{common → dist/common}/directives/navigation/nav.d.ts +1 -1
  13. package/dist/common/directives/navigation/nav.js +49 -0
  14. package/dist/common/directives/navigation/nav.js.map +1 -0
  15. package/{common → dist/common}/directives/navigation/router-link-delegate.d.ts +2 -2
  16. package/dist/common/directives/navigation/router-link-delegate.js +188 -0
  17. package/dist/common/directives/navigation/router-link-delegate.js.map +1 -0
  18. package/{common → dist/common}/directives/navigation/router-outlet.d.ts +1 -1
  19. package/dist/common/directives/navigation/router-outlet.js +476 -0
  20. package/dist/common/directives/navigation/router-outlet.js.map +1 -0
  21. package/dist/common/directives/navigation/stack-controller.js +282 -0
  22. package/dist/common/directives/navigation/stack-controller.js.map +1 -0
  23. package/dist/common/directives/navigation/stack-utils.js +73 -0
  24. package/dist/common/directives/navigation/stack-utils.js.map +1 -0
  25. package/{common → dist/common}/directives/navigation/tabs.d.ts +9 -1
  26. package/dist/common/directives/navigation/tabs.js +290 -0
  27. package/dist/common/directives/navigation/tabs.js.map +1 -0
  28. package/{common → dist/common}/index.d.ts +1 -1
  29. package/dist/common/index.js +20 -0
  30. package/dist/common/index.js.map +1 -0
  31. package/{common → dist/common}/overlays/modal.d.ts +1 -1
  32. package/dist/common/overlays/modal.js +96 -0
  33. package/dist/common/overlays/modal.js.map +1 -0
  34. package/{common → dist/common}/overlays/popover.d.ts +1 -1
  35. package/dist/common/overlays/popover.js +84 -0
  36. package/dist/common/overlays/popover.js.map +1 -0
  37. package/{common → dist/common}/providers/angular-delegate.d.ts +2 -2
  38. package/dist/common/providers/angular-delegate.js +229 -0
  39. package/dist/common/providers/angular-delegate.js.map +1 -0
  40. package/dist/common/providers/config.js +44 -0
  41. package/dist/common/providers/config.js.map +1 -0
  42. package/dist/common/providers/dom-controller.js +44 -0
  43. package/dist/common/providers/dom-controller.js.map +1 -0
  44. package/dist/common/providers/menu-controller.js +114 -0
  45. package/dist/common/providers/menu-controller.js.map +1 -0
  46. package/dist/common/providers/nav-controller.js +232 -0
  47. package/dist/common/providers/nav-controller.js.map +1 -0
  48. package/dist/common/providers/platform.js +256 -0
  49. package/dist/common/providers/platform.js.map +1 -0
  50. package/dist/common/types/interfaces.js +2 -0
  51. package/dist/common/types/interfaces.js.map +1 -0
  52. package/dist/common/types/ionic-lifecycle-hooks.js +5 -0
  53. package/dist/common/types/ionic-lifecycle-hooks.js.map +1 -0
  54. package/dist/common/types/overlay-options.js +2 -0
  55. package/dist/common/types/overlay-options.js.map +1 -0
  56. package/dist/common/utils/overlay.js +26 -0
  57. package/dist/common/utils/overlay.js.map +1 -0
  58. package/dist/common/utils/proxy.js +47 -0
  59. package/dist/common/utils/proxy.js.map +1 -0
  60. package/dist/common/utils/routing.js +55 -0
  61. package/dist/common/utils/routing.js.map +1 -0
  62. package/dist/common/utils/util.js +10 -0
  63. package/dist/common/utils/util.js.map +1 -0
  64. package/dist/lazy/app-initialize.js +29 -0
  65. package/dist/lazy/app-initialize.js.map +1 -0
  66. package/dist/lazy/directives/angular-component-lib/utils.js +59 -0
  67. package/dist/lazy/directives/angular-component-lib/utils.js.map +1 -0
  68. package/{directives → dist/lazy/directives}/control-value-accessors/boolean-value-accessor.d.ts +1 -1
  69. package/dist/lazy/directives/control-value-accessors/boolean-value-accessor.js +47 -0
  70. package/dist/lazy/directives/control-value-accessors/boolean-value-accessor.js.map +1 -0
  71. package/dist/lazy/directives/control-value-accessors/index.js +5 -0
  72. package/dist/lazy/directives/control-value-accessors/index.js.map +1 -0
  73. package/{directives → dist/lazy/directives}/control-value-accessors/numeric-value-accessor.d.ts +1 -1
  74. package/dist/lazy/directives/control-value-accessors/numeric-value-accessor.js +55 -0
  75. package/dist/lazy/directives/control-value-accessors/numeric-value-accessor.js.map +1 -0
  76. package/{directives → dist/lazy/directives}/control-value-accessors/select-value-accessor.d.ts +1 -1
  77. package/dist/lazy/directives/control-value-accessors/select-value-accessor.js +44 -0
  78. package/dist/lazy/directives/control-value-accessors/select-value-accessor.js.map +1 -0
  79. package/{directives → dist/lazy/directives}/control-value-accessors/text-value-accessor.d.ts +1 -1
  80. package/dist/lazy/directives/control-value-accessors/text-value-accessor.js +43 -0
  81. package/dist/lazy/directives/control-value-accessors/text-value-accessor.js.map +1 -0
  82. package/dist/lazy/directives/navigation/ion-back-button.js +24 -0
  83. package/dist/lazy/directives/navigation/ion-back-button.js.map +1 -0
  84. package/dist/lazy/directives/navigation/ion-nav.js +21 -0
  85. package/dist/lazy/directives/navigation/ion-nav.js.map +1 -0
  86. package/dist/lazy/directives/navigation/ion-router-outlet.js +52 -0
  87. package/dist/lazy/directives/navigation/ion-router-outlet.js.map +1 -0
  88. package/dist/lazy/directives/navigation/ion-tabs.js +58 -0
  89. package/dist/lazy/directives/navigation/ion-tabs.js.map +1 -0
  90. package/dist/lazy/directives/navigation/router-link-delegate.js +32 -0
  91. package/dist/lazy/directives/navigation/router-link-delegate.js.map +1 -0
  92. package/dist/lazy/directives/overlays/modal.js +22 -0
  93. package/dist/lazy/directives/overlays/modal.js.map +1 -0
  94. package/dist/lazy/directives/overlays/popover.js +18 -0
  95. package/dist/lazy/directives/overlays/popover.js.map +1 -0
  96. package/{directives → dist/lazy/directives}/proxies-list.d.ts +1 -1
  97. package/dist/lazy/directives/proxies-list.js +89 -0
  98. package/dist/lazy/directives/proxies-list.js.map +1 -0
  99. package/{directives → dist/lazy/directives}/proxies.d.ts +290 -191
  100. package/dist/lazy/directives/proxies.js +2759 -0
  101. package/dist/lazy/directives/proxies.js.map +1 -0
  102. package/dist/lazy/directives/validators/index.js +3 -0
  103. package/dist/lazy/directives/validators/index.js.map +1 -0
  104. package/dist/lazy/directives/validators/max-validator.js +26 -0
  105. package/dist/lazy/directives/validators/max-validator.js.map +1 -0
  106. package/dist/lazy/directives/validators/min-validator.js +26 -0
  107. package/dist/lazy/directives/validators/min-validator.js.map +1 -0
  108. package/{index.d.ts → dist/lazy/index.d.ts} +1 -2
  109. package/dist/lazy/index.js +34 -0
  110. package/dist/lazy/index.js.map +1 -0
  111. package/dist/lazy/ionic-module.d.ts +38 -0
  112. package/dist/lazy/ionic-module.js +121 -0
  113. package/dist/lazy/ionic-module.js.map +1 -0
  114. package/dist/lazy/providers/action-sheet-controller.js +18 -0
  115. package/dist/lazy/providers/action-sheet-controller.js.map +1 -0
  116. package/dist/lazy/providers/alert-controller.js +18 -0
  117. package/dist/lazy/providers/alert-controller.js.map +1 -0
  118. package/dist/lazy/providers/animation-controller.js +37 -0
  119. package/dist/lazy/providers/animation-controller.js.map +1 -0
  120. package/dist/lazy/providers/gesture-controller.js +32 -0
  121. package/dist/lazy/providers/gesture-controller.js.map +1 -0
  122. package/dist/lazy/providers/loading-controller.js +18 -0
  123. package/dist/lazy/providers/loading-controller.js.map +1 -0
  124. package/dist/lazy/providers/menu-controller.js +18 -0
  125. package/dist/lazy/providers/menu-controller.js.map +1 -0
  126. package/dist/lazy/providers/modal-controller.js +25 -0
  127. package/dist/lazy/providers/modal-controller.js.map +1 -0
  128. package/dist/lazy/providers/popover-controller.js +19 -0
  129. package/dist/lazy/providers/popover-controller.js.map +1 -0
  130. package/dist/lazy/providers/toast-controller.js +18 -0
  131. package/dist/lazy/providers/toast-controller.js.map +1 -0
  132. package/{schematics → dist/schematics}/add/index.js +6 -6
  133. package/dist/schematics/utils/ast.js +64 -0
  134. package/{schematics → dist/schematics}/utils/config.js +10 -11
  135. package/{schematics → dist/schematics}/utils/package.js +6 -4
  136. package/dist/standalone/directives/angular-component-lib/utils.js +59 -0
  137. package/dist/standalone/directives/angular-component-lib/utils.js.map +1 -0
  138. package/dist/standalone/directives/checkbox.js +75 -0
  139. package/dist/standalone/directives/checkbox.js.map +1 -0
  140. package/dist/standalone/directives/datetime.js +93 -0
  141. package/dist/standalone/directives/datetime.js.map +1 -0
  142. package/dist/standalone/directives/icon.js +35 -0
  143. package/dist/standalone/directives/icon.js.map +1 -0
  144. package/dist/standalone/directives/index.js +13 -0
  145. package/dist/standalone/directives/index.js.map +1 -0
  146. package/dist/standalone/directives/input-otp.js +89 -0
  147. package/dist/standalone/directives/input-otp.js.map +1 -0
  148. package/dist/standalone/directives/input.js +112 -0
  149. package/dist/standalone/directives/input.js.map +1 -0
  150. package/dist/standalone/directives/ion-accordion-group.d.ts +21 -0
  151. package/dist/standalone/directives/ion-accordion-group.js +40 -0
  152. package/dist/standalone/directives/ion-accordion-group.js.map +1 -0
  153. package/dist/standalone/directives/ion-accordion.d.ts +12 -0
  154. package/dist/standalone/directives/ion-accordion.js +36 -0
  155. package/dist/standalone/directives/ion-accordion.js.map +1 -0
  156. package/dist/standalone/directives/ion-action-sheet.d.ts +58 -0
  157. package/dist/standalone/directives/ion-action-sheet.js +62 -0
  158. package/dist/standalone/directives/ion-action-sheet.js.map +1 -0
  159. package/dist/standalone/directives/ion-alert.d.ts +58 -0
  160. package/dist/standalone/directives/ion-alert.js +62 -0
  161. package/dist/standalone/directives/ion-alert.js.map +1 -0
  162. package/dist/standalone/directives/ion-app.d.ts +12 -0
  163. package/dist/standalone/directives/ion-app.js +36 -0
  164. package/dist/standalone/directives/ion-app.js.map +1 -0
  165. package/dist/standalone/directives/ion-avatar.d.ts +12 -0
  166. package/dist/standalone/directives/ion-avatar.js +35 -0
  167. package/dist/standalone/directives/ion-avatar.js.map +1 -0
  168. package/dist/standalone/directives/ion-backdrop.d.ts +18 -0
  169. package/dist/standalone/directives/ion-backdrop.js +40 -0
  170. package/dist/standalone/directives/ion-backdrop.js.map +1 -0
  171. package/dist/standalone/directives/ion-badge.d.ts +12 -0
  172. package/dist/standalone/directives/ion-badge.js +36 -0
  173. package/dist/standalone/directives/ion-badge.js.map +1 -0
  174. package/dist/standalone/directives/ion-breadcrumb.d.ts +23 -0
  175. package/dist/standalone/directives/ion-breadcrumb.js +43 -0
  176. package/dist/standalone/directives/ion-breadcrumb.js.map +1 -0
  177. package/dist/standalone/directives/ion-breadcrumbs.d.ts +19 -0
  178. package/dist/standalone/directives/ion-breadcrumbs.js +40 -0
  179. package/dist/standalone/directives/ion-breadcrumbs.js.map +1 -0
  180. package/dist/standalone/directives/ion-button.d.ts +23 -0
  181. package/dist/standalone/directives/ion-button.js +43 -0
  182. package/dist/standalone/directives/ion-button.js.map +1 -0
  183. package/dist/standalone/directives/ion-buttons.d.ts +12 -0
  184. package/dist/standalone/directives/ion-buttons.js +36 -0
  185. package/dist/standalone/directives/ion-buttons.js.map +1 -0
  186. package/dist/standalone/directives/ion-card-content.d.ts +12 -0
  187. package/dist/standalone/directives/ion-card-content.js +36 -0
  188. package/dist/standalone/directives/ion-card-content.js.map +1 -0
  189. package/dist/standalone/directives/ion-card-header.d.ts +12 -0
  190. package/dist/standalone/directives/ion-card-header.js +36 -0
  191. package/dist/standalone/directives/ion-card-header.js.map +1 -0
  192. package/dist/standalone/directives/ion-card-subtitle.d.ts +12 -0
  193. package/dist/standalone/directives/ion-card-subtitle.js +36 -0
  194. package/dist/standalone/directives/ion-card-subtitle.js.map +1 -0
  195. package/dist/standalone/directives/ion-card-title.d.ts +12 -0
  196. package/dist/standalone/directives/ion-card-title.js +36 -0
  197. package/dist/standalone/directives/ion-card-title.js.map +1 -0
  198. package/dist/standalone/directives/ion-card.d.ts +12 -0
  199. package/dist/standalone/directives/ion-card.js +36 -0
  200. package/dist/standalone/directives/ion-card.js.map +1 -0
  201. package/dist/standalone/directives/ion-chip.d.ts +12 -0
  202. package/dist/standalone/directives/ion-chip.js +36 -0
  203. package/dist/standalone/directives/ion-chip.js.map +1 -0
  204. package/dist/standalone/directives/ion-col.d.ts +12 -0
  205. package/dist/standalone/directives/ion-col.js +36 -0
  206. package/dist/standalone/directives/ion-col.js.map +1 -0
  207. package/dist/standalone/directives/ion-content.d.ts +33 -0
  208. package/dist/standalone/directives/ion-content.js +47 -0
  209. package/dist/standalone/directives/ion-content.js.map +1 -0
  210. package/dist/standalone/directives/ion-datetime-button.d.ts +12 -0
  211. package/dist/standalone/directives/ion-datetime-button.js +36 -0
  212. package/dist/standalone/directives/ion-datetime-button.js.map +1 -0
  213. package/dist/standalone/directives/ion-fab-button.d.ts +23 -0
  214. package/dist/standalone/directives/ion-fab-button.js +43 -0
  215. package/dist/standalone/directives/ion-fab-button.js.map +1 -0
  216. package/dist/standalone/directives/ion-fab-list.d.ts +12 -0
  217. package/dist/standalone/directives/ion-fab-list.js +36 -0
  218. package/dist/standalone/directives/ion-fab-list.js.map +1 -0
  219. package/dist/standalone/directives/ion-fab.d.ts +12 -0
  220. package/dist/standalone/directives/ion-fab.js +37 -0
  221. package/dist/standalone/directives/ion-fab.js.map +1 -0
  222. package/dist/standalone/directives/ion-footer.d.ts +12 -0
  223. package/dist/standalone/directives/ion-footer.js +36 -0
  224. package/dist/standalone/directives/ion-footer.js.map +1 -0
  225. package/dist/standalone/directives/ion-grid.d.ts +12 -0
  226. package/dist/standalone/directives/ion-grid.js +36 -0
  227. package/dist/standalone/directives/ion-grid.js.map +1 -0
  228. package/dist/standalone/directives/ion-header.d.ts +12 -0
  229. package/dist/standalone/directives/ion-header.js +36 -0
  230. package/dist/standalone/directives/ion-header.js.map +1 -0
  231. package/dist/standalone/directives/ion-img.d.ts +28 -0
  232. package/dist/standalone/directives/ion-img.js +46 -0
  233. package/dist/standalone/directives/ion-img.js.map +1 -0
  234. package/dist/standalone/directives/ion-infinite-scroll-content.d.ts +12 -0
  235. package/dist/standalone/directives/ion-infinite-scroll-content.js +36 -0
  236. package/dist/standalone/directives/ion-infinite-scroll-content.js.map +1 -0
  237. package/dist/standalone/directives/ion-infinite-scroll.d.ts +21 -0
  238. package/dist/standalone/directives/ion-infinite-scroll.js +41 -0
  239. package/dist/standalone/directives/ion-infinite-scroll.js.map +1 -0
  240. package/dist/standalone/directives/ion-input-password-toggle.d.ts +12 -0
  241. package/dist/standalone/directives/ion-input-password-toggle.js +36 -0
  242. package/dist/standalone/directives/ion-input-password-toggle.js.map +1 -0
  243. package/dist/standalone/directives/ion-item-divider.d.ts +12 -0
  244. package/dist/standalone/directives/ion-item-divider.js +36 -0
  245. package/dist/standalone/directives/ion-item-divider.js.map +1 -0
  246. package/dist/standalone/directives/ion-item-group.d.ts +12 -0
  247. package/dist/standalone/directives/ion-item-group.js +35 -0
  248. package/dist/standalone/directives/ion-item-group.js.map +1 -0
  249. package/dist/standalone/directives/ion-item-option.d.ts +12 -0
  250. package/dist/standalone/directives/ion-item-option.js +36 -0
  251. package/dist/standalone/directives/ion-item-option.js.map +1 -0
  252. package/dist/standalone/directives/ion-item-options.d.ts +18 -0
  253. package/dist/standalone/directives/ion-item-options.js +40 -0
  254. package/dist/standalone/directives/ion-item-options.js.map +1 -0
  255. package/dist/standalone/directives/ion-item-sliding.d.ts +18 -0
  256. package/dist/standalone/directives/ion-item-sliding.js +41 -0
  257. package/dist/standalone/directives/ion-item-sliding.js.map +1 -0
  258. package/dist/standalone/directives/ion-item.d.ts +12 -0
  259. package/dist/standalone/directives/ion-item.js +36 -0
  260. package/dist/standalone/directives/ion-item.js.map +1 -0
  261. package/dist/standalone/directives/ion-label.d.ts +12 -0
  262. package/dist/standalone/directives/ion-label.js +36 -0
  263. package/dist/standalone/directives/ion-label.js.map +1 -0
  264. package/dist/standalone/directives/ion-list-header.d.ts +12 -0
  265. package/dist/standalone/directives/ion-list-header.js +36 -0
  266. package/dist/standalone/directives/ion-list-header.js.map +1 -0
  267. package/dist/standalone/directives/ion-list.d.ts +12 -0
  268. package/dist/standalone/directives/ion-list.js +37 -0
  269. package/dist/standalone/directives/ion-list.js.map +1 -0
  270. package/dist/standalone/directives/ion-loading.d.ts +58 -0
  271. package/dist/standalone/directives/ion-loading.js +62 -0
  272. package/dist/standalone/directives/ion-loading.js.map +1 -0
  273. package/dist/standalone/directives/ion-menu-button.d.ts +12 -0
  274. package/dist/standalone/directives/ion-menu-button.js +36 -0
  275. package/dist/standalone/directives/ion-menu-button.js.map +1 -0
  276. package/dist/standalone/directives/ion-menu-toggle.d.ts +12 -0
  277. package/dist/standalone/directives/ion-menu-toggle.js +36 -0
  278. package/dist/standalone/directives/ion-menu-toggle.js.map +1 -0
  279. package/dist/standalone/directives/ion-menu.d.ts +34 -0
  280. package/dist/standalone/directives/ion-menu.js +50 -0
  281. package/dist/standalone/directives/ion-menu.js.map +1 -0
  282. package/dist/standalone/directives/ion-nav-link.d.ts +12 -0
  283. package/dist/standalone/directives/ion-nav-link.js +36 -0
  284. package/dist/standalone/directives/ion-nav-link.js.map +1 -0
  285. package/dist/standalone/directives/ion-note.d.ts +12 -0
  286. package/dist/standalone/directives/ion-note.js +36 -0
  287. package/dist/standalone/directives/ion-note.js.map +1 -0
  288. package/dist/standalone/directives/ion-picker-column-option.d.ts +12 -0
  289. package/dist/standalone/directives/ion-picker-column-option.js +36 -0
  290. package/dist/standalone/directives/ion-picker-column-option.js.map +1 -0
  291. package/dist/standalone/directives/ion-picker-column.d.ts +21 -0
  292. package/dist/standalone/directives/ion-picker-column.js +41 -0
  293. package/dist/standalone/directives/ion-picker-column.js.map +1 -0
  294. package/dist/standalone/directives/ion-picker.d.ts +12 -0
  295. package/dist/standalone/directives/ion-picker.js +36 -0
  296. package/dist/standalone/directives/ion-picker.js.map +1 -0
  297. package/dist/standalone/directives/ion-progress-bar.d.ts +12 -0
  298. package/dist/standalone/directives/ion-progress-bar.js +36 -0
  299. package/dist/standalone/directives/ion-progress-bar.js.map +1 -0
  300. package/dist/standalone/directives/ion-radio.d.ts +23 -0
  301. package/dist/standalone/directives/ion-radio.js +43 -0
  302. package/dist/standalone/directives/ion-radio.js.map +1 -0
  303. package/dist/standalone/directives/ion-refresher-content.d.ts +12 -0
  304. package/dist/standalone/directives/ion-refresher-content.js +36 -0
  305. package/dist/standalone/directives/ion-refresher-content.js.map +1 -0
  306. package/dist/standalone/directives/ion-refresher.d.ts +45 -0
  307. package/dist/standalone/directives/ion-refresher.js +53 -0
  308. package/dist/standalone/directives/ion-refresher.js.map +1 -0
  309. package/dist/standalone/directives/ion-reorder-group.d.ts +44 -0
  310. package/dist/standalone/directives/ion-reorder-group.js +50 -0
  311. package/dist/standalone/directives/ion-reorder-group.js.map +1 -0
  312. package/dist/standalone/directives/ion-reorder.d.ts +12 -0
  313. package/dist/standalone/directives/ion-reorder.js +35 -0
  314. package/dist/standalone/directives/ion-reorder.js.map +1 -0
  315. package/dist/standalone/directives/ion-ripple-effect.d.ts +12 -0
  316. package/dist/standalone/directives/ion-ripple-effect.js +37 -0
  317. package/dist/standalone/directives/ion-ripple-effect.js.map +1 -0
  318. package/dist/standalone/directives/ion-row.d.ts +12 -0
  319. package/dist/standalone/directives/ion-row.js +35 -0
  320. package/dist/standalone/directives/ion-row.js.map +1 -0
  321. package/dist/standalone/directives/ion-segment-button.d.ts +12 -0
  322. package/dist/standalone/directives/ion-segment-button.js +36 -0
  323. package/dist/standalone/directives/ion-segment-button.js.map +1 -0
  324. package/dist/standalone/directives/ion-segment-content.d.ts +12 -0
  325. package/dist/standalone/directives/ion-segment-content.js +35 -0
  326. package/dist/standalone/directives/ion-segment-content.js.map +1 -0
  327. package/dist/standalone/directives/ion-segment-view.d.ts +19 -0
  328. package/dist/standalone/directives/ion-segment-view.js +40 -0
  329. package/dist/standalone/directives/ion-segment-view.js.map +1 -0
  330. package/dist/standalone/directives/ion-select-modal.d.ts +12 -0
  331. package/dist/standalone/directives/ion-select-modal.js +36 -0
  332. package/dist/standalone/directives/ion-select-modal.js.map +1 -0
  333. package/dist/standalone/directives/ion-select-option.d.ts +12 -0
  334. package/dist/standalone/directives/ion-select-option.js +36 -0
  335. package/dist/standalone/directives/ion-select-option.js.map +1 -0
  336. package/dist/standalone/directives/ion-skeleton-text.d.ts +12 -0
  337. package/dist/standalone/directives/ion-skeleton-text.js +36 -0
  338. package/dist/standalone/directives/ion-skeleton-text.js.map +1 -0
  339. package/dist/standalone/directives/ion-spinner.d.ts +12 -0
  340. package/dist/standalone/directives/ion-spinner.js +36 -0
  341. package/dist/standalone/directives/ion-spinner.js.map +1 -0
  342. package/dist/standalone/directives/ion-split-pane.d.ts +22 -0
  343. package/dist/standalone/directives/ion-split-pane.js +40 -0
  344. package/dist/standalone/directives/ion-split-pane.js.map +1 -0
  345. package/dist/standalone/directives/ion-tab-bar.d.ts +12 -0
  346. package/dist/standalone/directives/ion-tab-bar.js +36 -0
  347. package/dist/standalone/directives/ion-tab-bar.js.map +1 -0
  348. package/dist/standalone/directives/ion-tab-button.d.ts +12 -0
  349. package/dist/standalone/directives/ion-tab-button.js +36 -0
  350. package/dist/standalone/directives/ion-tab-button.js.map +1 -0
  351. package/dist/standalone/directives/ion-tab.d.ts +12 -0
  352. package/dist/standalone/directives/ion-tab.js +37 -0
  353. package/dist/standalone/directives/ion-tab.js.map +1 -0
  354. package/dist/standalone/directives/ion-text.d.ts +12 -0
  355. package/dist/standalone/directives/ion-text.js +36 -0
  356. package/dist/standalone/directives/ion-text.js.map +1 -0
  357. package/dist/standalone/directives/ion-thumbnail.d.ts +12 -0
  358. package/dist/standalone/directives/ion-thumbnail.js +35 -0
  359. package/dist/standalone/directives/ion-thumbnail.js.map +1 -0
  360. package/dist/standalone/directives/ion-title.d.ts +12 -0
  361. package/dist/standalone/directives/ion-title.js +36 -0
  362. package/dist/standalone/directives/ion-title.js.map +1 -0
  363. package/dist/standalone/directives/ion-toast.d.ts +58 -0
  364. package/dist/standalone/directives/ion-toast.js +62 -0
  365. package/dist/standalone/directives/ion-toast.js.map +1 -0
  366. package/dist/standalone/directives/ion-toolbar.d.ts +12 -0
  367. package/dist/standalone/directives/ion-toolbar.js +36 -0
  368. package/dist/standalone/directives/ion-toolbar.js.map +1 -0
  369. package/dist/standalone/directives/proxies.d.ts +77 -0
  370. package/dist/standalone/directives/proxies.js +79 -0
  371. package/dist/standalone/directives/proxies.js.map +1 -0
  372. package/dist/standalone/directives/radio-group.js +59 -0
  373. package/dist/standalone/directives/radio-group.js.map +1 -0
  374. package/dist/standalone/directives/range.js +77 -0
  375. package/dist/standalone/directives/range.js.map +1 -0
  376. package/dist/standalone/directives/searchbar.js +81 -0
  377. package/dist/standalone/directives/searchbar.js.map +1 -0
  378. package/dist/standalone/directives/segment.js +59 -0
  379. package/dist/standalone/directives/segment.js.map +1 -0
  380. package/dist/standalone/directives/select.js +83 -0
  381. package/dist/standalone/directives/select.js.map +1 -0
  382. package/dist/standalone/directives/textarea.js +90 -0
  383. package/dist/standalone/directives/textarea.js.map +1 -0
  384. package/dist/standalone/directives/toggle.js +75 -0
  385. package/dist/standalone/directives/toggle.js.map +1 -0
  386. package/{standalone → dist/standalone}/index.d.ts +1 -2
  387. package/dist/standalone/index.js +24 -0
  388. package/dist/standalone/index.js.map +1 -0
  389. package/dist/standalone/navigation/back-button.js +32 -0
  390. package/dist/standalone/navigation/back-button.js.map +1 -0
  391. package/dist/standalone/navigation/nav.js +28 -0
  392. package/dist/standalone/navigation/nav.js.map +1 -0
  393. package/dist/standalone/navigation/router-link-delegate.js +26 -0
  394. package/dist/standalone/navigation/router-link-delegate.js.map +1 -0
  395. package/dist/standalone/navigation/router-outlet.js +60 -0
  396. package/dist/standalone/navigation/router-outlet.js.map +1 -0
  397. package/dist/standalone/navigation/tabs.js +57 -0
  398. package/dist/standalone/navigation/tabs.js.map +1 -0
  399. package/dist/standalone/overlays/modal.js +32 -0
  400. package/dist/standalone/overlays/modal.js.map +1 -0
  401. package/dist/standalone/overlays/popover.js +28 -0
  402. package/dist/standalone/overlays/popover.js.map +1 -0
  403. package/dist/standalone/providers/action-sheet-controller.js +20 -0
  404. package/dist/standalone/providers/action-sheet-controller.js.map +1 -0
  405. package/dist/standalone/providers/alert-controller.js +20 -0
  406. package/dist/standalone/providers/alert-controller.js.map +1 -0
  407. package/dist/standalone/providers/animation-controller.js +37 -0
  408. package/dist/standalone/providers/animation-controller.js.map +1 -0
  409. package/dist/standalone/providers/gesture-controller.js +32 -0
  410. package/dist/standalone/providers/gesture-controller.js.map +1 -0
  411. package/dist/standalone/providers/ionic-angular.js +38 -0
  412. package/dist/standalone/providers/ionic-angular.js.map +1 -0
  413. package/dist/standalone/providers/loading-controller.js +20 -0
  414. package/dist/standalone/providers/loading-controller.js.map +1 -0
  415. package/dist/standalone/providers/menu-controller.js +18 -0
  416. package/dist/standalone/providers/menu-controller.js.map +1 -0
  417. package/dist/standalone/providers/modal-controller.js +27 -0
  418. package/dist/standalone/providers/modal-controller.js.map +1 -0
  419. package/dist/standalone/providers/popover-controller.js +21 -0
  420. package/dist/standalone/providers/popover-controller.js.map +1 -0
  421. package/dist/standalone/providers/toast-controller.js +20 -0
  422. package/dist/standalone/providers/toast-controller.js.map +1 -0
  423. package/package.json +172 -30
  424. package/esm2022/app-initialize.mjs +0 -29
  425. package/esm2022/common/directives/control-value-accessors/index.mjs +0 -2
  426. package/esm2022/common/directives/control-value-accessors/value-accessor.mjs +0 -153
  427. package/esm2022/common/directives/navigation/back-button.mjs +0 -61
  428. package/esm2022/common/directives/navigation/nav-params.mjs +0 -47
  429. package/esm2022/common/directives/navigation/nav.mjs +0 -49
  430. package/esm2022/common/directives/navigation/router-link-delegate.mjs +0 -190
  431. package/esm2022/common/directives/navigation/router-outlet.mjs +0 -480
  432. package/esm2022/common/directives/navigation/stack-controller.mjs +0 -283
  433. package/esm2022/common/directives/navigation/stack-utils.mjs +0 -73
  434. package/esm2022/common/directives/navigation/tabs.mjs +0 -279
  435. package/esm2022/common/index.mjs +0 -20
  436. package/esm2022/common/ionic-angular-common.mjs +0 -5
  437. package/esm2022/common/overlays/modal.mjs +0 -103
  438. package/esm2022/common/overlays/popover.mjs +0 -91
  439. package/esm2022/common/providers/angular-delegate.mjs +0 -210
  440. package/esm2022/common/providers/config.mjs +0 -45
  441. package/esm2022/common/providers/dom-controller.mjs +0 -45
  442. package/esm2022/common/providers/menu-controller.mjs +0 -114
  443. package/esm2022/common/providers/nav-controller.mjs +0 -235
  444. package/esm2022/common/providers/platform.mjs +0 -258
  445. package/esm2022/common/types/interfaces.mjs +0 -2
  446. package/esm2022/common/types/ionic-lifecycle-hooks.mjs +0 -5
  447. package/esm2022/common/types/overlay-options.mjs +0 -2
  448. package/esm2022/common/utils/overlay.mjs +0 -26
  449. package/esm2022/common/utils/proxy.mjs +0 -47
  450. package/esm2022/common/utils/routing.mjs +0 -55
  451. package/esm2022/common/utils/util.mjs +0 -10
  452. package/esm2022/directives/angular-component-lib/utils.mjs +0 -59
  453. package/esm2022/directives/control-value-accessors/boolean-value-accessor.mjs +0 -42
  454. package/esm2022/directives/control-value-accessors/index.mjs +0 -5
  455. package/esm2022/directives/control-value-accessors/numeric-value-accessor.mjs +0 -50
  456. package/esm2022/directives/control-value-accessors/select-value-accessor.mjs +0 -39
  457. package/esm2022/directives/control-value-accessors/text-value-accessor.mjs +0 -38
  458. package/esm2022/directives/navigation/ion-back-button.mjs +0 -24
  459. package/esm2022/directives/navigation/ion-nav.mjs +0 -21
  460. package/esm2022/directives/navigation/ion-router-outlet.mjs +0 -52
  461. package/esm2022/directives/navigation/ion-tabs.mjs +0 -59
  462. package/esm2022/directives/navigation/router-link-delegate.mjs +0 -32
  463. package/esm2022/directives/overlays/modal.mjs +0 -22
  464. package/esm2022/directives/overlays/popover.mjs +0 -18
  465. package/esm2022/directives/proxies-list.mjs +0 -90
  466. package/esm2022/directives/proxies.mjs +0 -2373
  467. package/esm2022/directives/validators/index.mjs +0 -3
  468. package/esm2022/directives/validators/max-validator.mjs +0 -27
  469. package/esm2022/directives/validators/min-validator.mjs +0 -27
  470. package/esm2022/index.mjs +0 -32
  471. package/esm2022/ionic-angular.mjs +0 -5
  472. package/esm2022/ionic-module.mjs +0 -111
  473. package/esm2022/providers/action-sheet-controller.mjs +0 -19
  474. package/esm2022/providers/alert-controller.mjs +0 -19
  475. package/esm2022/providers/animation-controller.mjs +0 -38
  476. package/esm2022/providers/gesture-controller.mjs +0 -33
  477. package/esm2022/providers/loading-controller.mjs +0 -19
  478. package/esm2022/providers/menu-controller.mjs +0 -19
  479. package/esm2022/providers/modal-controller.mjs +0 -26
  480. package/esm2022/providers/picker-controller.mjs +0 -22
  481. package/esm2022/providers/popover-controller.mjs +0 -19
  482. package/esm2022/providers/toast-controller.mjs +0 -19
  483. package/esm2022/standalone/directives/angular-component-lib/utils.mjs +0 -59
  484. package/esm2022/standalone/directives/checkbox.mjs +0 -76
  485. package/esm2022/standalone/directives/datetime.mjs +0 -95
  486. package/esm2022/standalone/directives/icon.mjs +0 -35
  487. package/esm2022/standalone/directives/index.mjs +0 -13
  488. package/esm2022/standalone/directives/input-otp.mjs +0 -90
  489. package/esm2022/standalone/directives/input.mjs +0 -113
  490. package/esm2022/standalone/directives/proxies.mjs +0 -2260
  491. package/esm2022/standalone/directives/radio-group.mjs +0 -60
  492. package/esm2022/standalone/directives/range.mjs +0 -78
  493. package/esm2022/standalone/directives/searchbar.mjs +0 -82
  494. package/esm2022/standalone/directives/segment.mjs +0 -60
  495. package/esm2022/standalone/directives/select.mjs +0 -84
  496. package/esm2022/standalone/directives/textarea.mjs +0 -91
  497. package/esm2022/standalone/directives/toggle.mjs +0 -76
  498. package/esm2022/standalone/index.mjs +0 -25
  499. package/esm2022/standalone/ionic-angular-standalone.mjs +0 -5
  500. package/esm2022/standalone/navigation/back-button.mjs +0 -32
  501. package/esm2022/standalone/navigation/nav.mjs +0 -28
  502. package/esm2022/standalone/navigation/router-link-delegate.mjs +0 -28
  503. package/esm2022/standalone/navigation/router-outlet.mjs +0 -60
  504. package/esm2022/standalone/navigation/tabs.mjs +0 -58
  505. package/esm2022/standalone/overlays/modal.mjs +0 -32
  506. package/esm2022/standalone/overlays/popover.mjs +0 -28
  507. package/esm2022/standalone/providers/action-sheet-controller.mjs +0 -21
  508. package/esm2022/standalone/providers/alert-controller.mjs +0 -21
  509. package/esm2022/standalone/providers/animation-controller.mjs +0 -38
  510. package/esm2022/standalone/providers/gesture-controller.mjs +0 -33
  511. package/esm2022/standalone/providers/ionic-angular.mjs +0 -38
  512. package/esm2022/standalone/providers/loading-controller.mjs +0 -21
  513. package/esm2022/standalone/providers/menu-controller.mjs +0 -19
  514. package/esm2022/standalone/providers/modal-controller.mjs +0 -28
  515. package/esm2022/standalone/providers/picker-controller.mjs +0 -24
  516. package/esm2022/standalone/providers/popover-controller.mjs +0 -21
  517. package/esm2022/standalone/providers/toast-controller.mjs +0 -21
  518. package/fesm2022/ionic-angular-common.mjs +0 -2791
  519. package/fesm2022/ionic-angular-common.mjs.map +0 -1
  520. package/fesm2022/ionic-angular-standalone.mjs +0 -3562
  521. package/fesm2022/ionic-angular-standalone.mjs.map +0 -1
  522. package/fesm2022/ionic-angular.mjs +0 -3139
  523. package/fesm2022/ionic-angular.mjs.map +0 -1
  524. package/ionic-module.d.ts +0 -28
  525. package/providers/picker-controller.d.ts +0 -11
  526. package/schematics/utils/ast.js +0 -32
  527. package/standalone/directives/proxies.d.ts +0 -1035
  528. package/standalone/providers/picker-controller.d.ts +0 -11
  529. /package/{common → dist/common}/directives/control-value-accessors/index.d.ts +0 -0
  530. /package/{common → dist/common}/directives/navigation/nav-params.d.ts +0 -0
  531. /package/{common → dist/common}/directives/navigation/stack-controller.d.ts +0 -0
  532. /package/{common → dist/common}/directives/navigation/stack-utils.d.ts +0 -0
  533. /package/{common → dist/common}/providers/config.d.ts +0 -0
  534. /package/{common → dist/common}/providers/dom-controller.d.ts +0 -0
  535. /package/{common → dist/common}/providers/menu-controller.d.ts +0 -0
  536. /package/{common → dist/common}/providers/nav-controller.d.ts +0 -0
  537. /package/{common → dist/common}/providers/platform.d.ts +0 -0
  538. /package/{common → dist/common}/types/interfaces.d.ts +0 -0
  539. /package/{common → dist/common}/types/ionic-lifecycle-hooks.d.ts +0 -0
  540. /package/{common → dist/common}/types/overlay-options.d.ts +0 -0
  541. /package/{common → dist/common}/utils/overlay.d.ts +0 -0
  542. /package/{common → dist/common}/utils/proxy.d.ts +0 -0
  543. /package/{common → dist/common}/utils/routing.d.ts +0 -0
  544. /package/{common → dist/common}/utils/util.d.ts +0 -0
  545. /package/{app-initialize.d.ts → dist/lazy/app-initialize.d.ts} +0 -0
  546. /package/{directives → dist/lazy/directives}/angular-component-lib/utils.d.ts +0 -0
  547. /package/{directives → dist/lazy/directives}/control-value-accessors/index.d.ts +0 -0
  548. /package/{directives → dist/lazy/directives}/navigation/ion-back-button.d.ts +0 -0
  549. /package/{directives → dist/lazy/directives}/navigation/ion-nav.d.ts +0 -0
  550. /package/{directives → dist/lazy/directives}/navigation/ion-router-outlet.d.ts +0 -0
  551. /package/{directives → dist/lazy/directives}/navigation/ion-tabs.d.ts +0 -0
  552. /package/{directives → dist/lazy/directives}/navigation/router-link-delegate.d.ts +0 -0
  553. /package/{directives → dist/lazy/directives}/overlays/modal.d.ts +0 -0
  554. /package/{directives → dist/lazy/directives}/overlays/popover.d.ts +0 -0
  555. /package/{directives → dist/lazy/directives}/validators/index.d.ts +0 -0
  556. /package/{directives → dist/lazy/directives}/validators/max-validator.d.ts +0 -0
  557. /package/{directives → dist/lazy/directives}/validators/min-validator.d.ts +0 -0
  558. /package/{providers → dist/lazy/providers}/action-sheet-controller.d.ts +0 -0
  559. /package/{providers → dist/lazy/providers}/alert-controller.d.ts +0 -0
  560. /package/{providers → dist/lazy/providers}/animation-controller.d.ts +0 -0
  561. /package/{providers → dist/lazy/providers}/gesture-controller.d.ts +0 -0
  562. /package/{providers → dist/lazy/providers}/loading-controller.d.ts +0 -0
  563. /package/{providers → dist/lazy/providers}/menu-controller.d.ts +0 -0
  564. /package/{providers → dist/lazy/providers}/modal-controller.d.ts +0 -0
  565. /package/{providers → dist/lazy/providers}/popover-controller.d.ts +0 -0
  566. /package/{providers → dist/lazy/providers}/toast-controller.d.ts +0 -0
  567. /package/{schematics → dist/schematics}/add/files/root/theme/variables.css +0 -0
  568. /package/{schematics → dist/schematics}/add/schema.json +0 -0
  569. /package/{schematics → dist/schematics}/collection.json +0 -0
  570. /package/{standalone → dist/standalone}/directives/angular-component-lib/utils.d.ts +0 -0
  571. /package/{standalone → dist/standalone}/directives/checkbox.d.ts +0 -0
  572. /package/{standalone → dist/standalone}/directives/datetime.d.ts +0 -0
  573. /package/{standalone → dist/standalone}/directives/icon.d.ts +0 -0
  574. /package/{standalone → dist/standalone}/directives/index.d.ts +0 -0
  575. /package/{standalone → dist/standalone}/directives/input-otp.d.ts +0 -0
  576. /package/{standalone → dist/standalone}/directives/input.d.ts +0 -0
  577. /package/{standalone → dist/standalone}/directives/radio-group.d.ts +0 -0
  578. /package/{standalone → dist/standalone}/directives/range.d.ts +0 -0
  579. /package/{standalone → dist/standalone}/directives/searchbar.d.ts +0 -0
  580. /package/{standalone → dist/standalone}/directives/segment.d.ts +0 -0
  581. /package/{standalone → dist/standalone}/directives/select.d.ts +0 -0
  582. /package/{standalone → dist/standalone}/directives/textarea.d.ts +0 -0
  583. /package/{standalone → dist/standalone}/directives/toggle.d.ts +0 -0
  584. /package/{standalone → dist/standalone}/navigation/back-button.d.ts +0 -0
  585. /package/{standalone → dist/standalone}/navigation/nav.d.ts +0 -0
  586. /package/{standalone → dist/standalone}/navigation/router-link-delegate.d.ts +0 -0
  587. /package/{standalone → dist/standalone}/navigation/router-outlet.d.ts +0 -0
  588. /package/{standalone → dist/standalone}/navigation/tabs.d.ts +0 -0
  589. /package/{standalone → dist/standalone}/overlays/modal.d.ts +0 -0
  590. /package/{standalone → dist/standalone}/overlays/popover.d.ts +0 -0
  591. /package/{standalone → dist/standalone}/providers/action-sheet-controller.d.ts +0 -0
  592. /package/{standalone → dist/standalone}/providers/alert-controller.d.ts +0 -0
  593. /package/{standalone → dist/standalone}/providers/animation-controller.d.ts +0 -0
  594. /package/{standalone → dist/standalone}/providers/gesture-controller.d.ts +0 -0
  595. /package/{standalone → dist/standalone}/providers/ionic-angular.d.ts +0 -0
  596. /package/{standalone → dist/standalone}/providers/loading-controller.d.ts +0 -0
  597. /package/{standalone → dist/standalone}/providers/menu-controller.d.ts +0 -0
  598. /package/{standalone → dist/standalone}/providers/modal-controller.d.ts +0 -0
  599. /package/{standalone → dist/standalone}/providers/popover-controller.d.ts +0 -0
  600. /package/{standalone → dist/standalone}/providers/toast-controller.d.ts +0 -0
@@ -0,0 +1,282 @@
1
+ import { bindLifecycleEvents } from '../../providers/angular-delegate';
2
+ import { computeStackId, destroyView, getUrl, insertView, isTabSwitch, toSegments, } from './stack-utils';
3
+ // TODO(FW-2827): types
4
+ export class StackController {
5
+ containerEl;
6
+ router;
7
+ navCtrl;
8
+ zone;
9
+ location;
10
+ views = [];
11
+ runningTask;
12
+ skipTransition = false;
13
+ tabsPrefix;
14
+ activeView;
15
+ nextId = 0;
16
+ constructor(tabsPrefix, containerEl, router, navCtrl, zone, location) {
17
+ this.containerEl = containerEl;
18
+ this.router = router;
19
+ this.navCtrl = navCtrl;
20
+ this.zone = zone;
21
+ this.location = location;
22
+ this.tabsPrefix = tabsPrefix !== undefined ? toSegments(tabsPrefix) : undefined;
23
+ }
24
+ createView(ref, activatedRoute) {
25
+ const url = getUrl(this.router, activatedRoute);
26
+ const element = ref?.location?.nativeElement;
27
+ const unlistenEvents = bindLifecycleEvents(this.zone, ref.changeDetectorRef, ref.instance, element);
28
+ return {
29
+ id: this.nextId++,
30
+ stackId: computeStackId(this.tabsPrefix, url),
31
+ unlistenEvents,
32
+ element,
33
+ ref,
34
+ url,
35
+ };
36
+ }
37
+ getExistingView(activatedRoute) {
38
+ const activatedUrlKey = getUrl(this.router, activatedRoute);
39
+ const view = this.views.find((vw) => vw.url === activatedUrlKey);
40
+ if (view) {
41
+ view.ref.changeDetectorRef.reattach();
42
+ }
43
+ return view;
44
+ }
45
+ setActive(enteringView) {
46
+ const consumeResult = this.navCtrl.consumeTransition();
47
+ let { direction, animation, animationBuilder } = consumeResult;
48
+ const leavingView = this.activeView;
49
+ const tabSwitch = isTabSwitch(enteringView, leavingView);
50
+ if (tabSwitch) {
51
+ direction = 'back';
52
+ animation = undefined;
53
+ }
54
+ const viewsSnapshot = this.views.slice();
55
+ let currentNavigation;
56
+ const router = this.router;
57
+ // Angular >= 7.2.0
58
+ if (router.getCurrentNavigation) {
59
+ currentNavigation = router.getCurrentNavigation();
60
+ // Angular < 7.2.0
61
+ }
62
+ else if (router.navigations?.value) {
63
+ currentNavigation = router.navigations.value;
64
+ }
65
+ /**
66
+ * If the navigation action
67
+ * sets `replaceUrl: true`
68
+ * then we need to make sure
69
+ * we remove the last item
70
+ * from our views stack
71
+ */
72
+ if (currentNavigation?.extras?.replaceUrl) {
73
+ if (this.views.length > 0) {
74
+ this.views.splice(-1, 1);
75
+ }
76
+ }
77
+ const reused = this.views.includes(enteringView);
78
+ const views = this.insertView(enteringView, direction);
79
+ // Trigger change detection before transition starts
80
+ // This will call ngOnInit() the first time too, just after the view
81
+ // was attached to the dom, but BEFORE the transition starts
82
+ if (!reused) {
83
+ enteringView.ref.changeDetectorRef.detectChanges();
84
+ }
85
+ /**
86
+ * If we are going back from a page that
87
+ * was presented using a custom animation
88
+ * we should default to using that
89
+ * unless the developer explicitly
90
+ * provided another animation.
91
+ */
92
+ const customAnimation = enteringView.animationBuilder;
93
+ if (animationBuilder === undefined && direction === 'back' && !tabSwitch && customAnimation !== undefined) {
94
+ animationBuilder = customAnimation;
95
+ }
96
+ /**
97
+ * Save any custom animation so that navigating
98
+ * back will use this custom animation by default.
99
+ */
100
+ if (leavingView) {
101
+ leavingView.animationBuilder = animationBuilder;
102
+ }
103
+ // Wait until previous transitions finish
104
+ return this.zone.runOutsideAngular(() => {
105
+ return this.wait(() => {
106
+ // disconnect leaving page from change detection to
107
+ // reduce jank during the page transition
108
+ if (leavingView) {
109
+ leavingView.ref.changeDetectorRef.detach();
110
+ }
111
+ // In case the enteringView is the same as the leavingPage we need to reattach()
112
+ enteringView.ref.changeDetectorRef.reattach();
113
+ return this.transition(enteringView, leavingView, animation, this.canGoBack(1), false, animationBuilder)
114
+ .then(() => cleanupAsync(enteringView, views, viewsSnapshot, this.location, this.zone))
115
+ .then(() => ({
116
+ enteringView,
117
+ direction,
118
+ animation,
119
+ tabSwitch,
120
+ }));
121
+ });
122
+ });
123
+ }
124
+ canGoBack(deep, stackId = this.getActiveStackId()) {
125
+ return this.getStack(stackId).length > deep;
126
+ }
127
+ pop(deep, stackId = this.getActiveStackId()) {
128
+ return this.zone.run(() => {
129
+ const views = this.getStack(stackId);
130
+ if (views.length <= deep) {
131
+ return Promise.resolve(false);
132
+ }
133
+ const view = views[views.length - deep - 1];
134
+ let url = view.url;
135
+ const viewSavedData = view.savedData;
136
+ if (viewSavedData) {
137
+ const primaryOutlet = viewSavedData.get('primary');
138
+ if (primaryOutlet?.route?._routerState?.snapshot.url) {
139
+ url = primaryOutlet.route._routerState.snapshot.url;
140
+ }
141
+ }
142
+ const { animationBuilder } = this.navCtrl.consumeTransition();
143
+ return this.navCtrl.navigateBack(url, { ...view.savedExtras, animation: animationBuilder }).then(() => true);
144
+ });
145
+ }
146
+ startBackTransition() {
147
+ const leavingView = this.activeView;
148
+ if (leavingView) {
149
+ const views = this.getStack(leavingView.stackId);
150
+ const enteringView = views[views.length - 2];
151
+ const customAnimation = enteringView.animationBuilder;
152
+ return this.wait(() => {
153
+ return this.transition(enteringView, // entering view
154
+ leavingView, // leaving view
155
+ 'back', this.canGoBack(2), true, customAnimation);
156
+ });
157
+ }
158
+ return Promise.resolve();
159
+ }
160
+ endBackTransition(shouldComplete) {
161
+ if (shouldComplete) {
162
+ this.skipTransition = true;
163
+ this.pop(1);
164
+ }
165
+ else if (this.activeView) {
166
+ cleanup(this.activeView, this.views, this.views, this.location, this.zone);
167
+ }
168
+ }
169
+ getLastUrl(stackId) {
170
+ const views = this.getStack(stackId);
171
+ return views.length > 0 ? views[views.length - 1] : undefined;
172
+ }
173
+ /**
174
+ * @internal
175
+ */
176
+ getRootUrl(stackId) {
177
+ const views = this.getStack(stackId);
178
+ return views.length > 0 ? views[0] : undefined;
179
+ }
180
+ getActiveStackId() {
181
+ return this.activeView ? this.activeView.stackId : undefined;
182
+ }
183
+ /**
184
+ * @internal
185
+ */
186
+ getActiveView() {
187
+ return this.activeView;
188
+ }
189
+ hasRunningTask() {
190
+ return this.runningTask !== undefined;
191
+ }
192
+ destroy() {
193
+ this.containerEl = undefined;
194
+ this.views.forEach(destroyView);
195
+ this.activeView = undefined;
196
+ this.views = [];
197
+ }
198
+ getStack(stackId) {
199
+ return this.views.filter((v) => v.stackId === stackId);
200
+ }
201
+ insertView(enteringView, direction) {
202
+ this.activeView = enteringView;
203
+ this.views = insertView(this.views, enteringView, direction);
204
+ return this.views.slice();
205
+ }
206
+ transition(enteringView, leavingView, direction, showGoBack, progressAnimation, animationBuilder) {
207
+ if (this.skipTransition) {
208
+ this.skipTransition = false;
209
+ return Promise.resolve(false);
210
+ }
211
+ if (leavingView === enteringView) {
212
+ return Promise.resolve(false);
213
+ }
214
+ const enteringEl = enteringView ? enteringView.element : undefined;
215
+ const leavingEl = leavingView ? leavingView.element : undefined;
216
+ const containerEl = this.containerEl;
217
+ if (enteringEl && enteringEl !== leavingEl) {
218
+ enteringEl.classList.add('ion-page');
219
+ enteringEl.classList.add('ion-page-invisible');
220
+ // containerEl is set to undefined when the stack controller is destroyed,
221
+ // so a transition that resolves after its outlet was destroyed must not
222
+ // dereference it (see destroy()).
223
+ if (containerEl?.commit) {
224
+ return containerEl.commit(enteringEl, leavingEl, {
225
+ duration: direction === undefined ? 0 : undefined,
226
+ direction,
227
+ showGoBack,
228
+ progressAnimation,
229
+ animationBuilder,
230
+ });
231
+ }
232
+ }
233
+ return Promise.resolve(false);
234
+ }
235
+ async wait(task) {
236
+ if (this.runningTask !== undefined) {
237
+ await this.runningTask;
238
+ this.runningTask = undefined;
239
+ }
240
+ const promise = (this.runningTask = task());
241
+ promise.finally(() => (this.runningTask = undefined));
242
+ return promise;
243
+ }
244
+ }
245
+ const cleanupAsync = (activeRoute, views, viewsSnapshot, location, zone) => {
246
+ if (typeof requestAnimationFrame === 'function') {
247
+ return new Promise((resolve) => {
248
+ requestAnimationFrame(() => {
249
+ cleanup(activeRoute, views, viewsSnapshot, location, zone);
250
+ resolve();
251
+ });
252
+ });
253
+ }
254
+ return Promise.resolve();
255
+ };
256
+ const cleanup = (activeRoute, views, viewsSnapshot, location, zone) => {
257
+ /**
258
+ * Re-enter the Angular zone when destroying page components. This will allow
259
+ * lifecycle events (`ngOnDestroy`) to be run inside the Angular zone.
260
+ */
261
+ zone.run(() => viewsSnapshot.filter((view) => !views.includes(view)).forEach(destroyView));
262
+ views.forEach((view) => {
263
+ /**
264
+ * In the event that a user navigated multiple
265
+ * times in rapid succession, we want to make sure
266
+ * we don't pre-emptively detach a view while
267
+ * it is in mid-transition.
268
+ *
269
+ * In this instance we also do not care about query
270
+ * params or fragments as it will be the same view regardless
271
+ */
272
+ const locationWithoutParams = location.path().split('?')[0];
273
+ const locationWithoutFragment = locationWithoutParams.split('#')[0];
274
+ if (view !== activeRoute && view.url !== locationWithoutFragment) {
275
+ const element = view.element;
276
+ element.setAttribute('aria-hidden', 'true');
277
+ element.classList.add('ion-page-hidden');
278
+ view.ref.changeDetectorRef.detach();
279
+ }
280
+ });
281
+ };
282
+ //# sourceMappingURL=stack-controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stack-controller.js","sourceRoot":"","sources":["../../../../src/common/directives/navigation/stack-controller.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAGvE,OAAO,EAGL,cAAc,EACd,WAAW,EACX,MAAM,EACN,UAAU,EAC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AAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;IAE3F,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACrB;;;;;;;;WAQG;QACH,MAAM,qBAAqB,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5D,MAAM,uBAAuB,GAAG,qBAAqB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAEpE,IAAI,IAAI,KAAK,WAAW,IAAI,IAAI,CAAC,GAAG,KAAK,uBAAuB,EAAE,CAAC;YACjE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;YAC7B,OAAO,CAAC,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;YAC5C,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;YACzC,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,MAAM,EAAE,CAAC;QACtC,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["import { Location } from '@angular/common';\nimport { ComponentRef, NgZone } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport type { AnimationBuilder, RouterDirection } from '@ionic/core/components';\n\nimport { bindLifecycleEvents } from '../../providers/angular-delegate';\nimport { NavController } from '../../providers/nav-controller';\n\nimport {\n RouteView,\n StackDidChangeEvent,\n computeStackId,\n destroyView,\n getUrl,\n insertView,\n isTabSwitch,\n toSegments,\n} from './stack-utils';\n\n// TODO(FW-2827): types\n\nexport class StackController {\n private views: RouteView[] = [];\n private runningTask?: Promise<any>;\n private skipTransition = false;\n private tabsPrefix: string[] | undefined;\n private activeView: RouteView | undefined;\n private nextId = 0;\n\n constructor(\n tabsPrefix: string | undefined,\n private containerEl: HTMLIonRouterOutletElement,\n private router: Router,\n private navCtrl: NavController,\n private zone: NgZone,\n private location: Location\n ) {\n this.tabsPrefix = tabsPrefix !== undefined ? toSegments(tabsPrefix) : undefined;\n }\n\n createView(ref: ComponentRef<any>, activatedRoute: ActivatedRoute): RouteView {\n const url = getUrl(this.router, activatedRoute);\n const element = ref?.location?.nativeElement as HTMLElement;\n const unlistenEvents = bindLifecycleEvents(this.zone, ref.changeDetectorRef, ref.instance, element);\n return {\n id: this.nextId++,\n stackId: computeStackId(this.tabsPrefix, url),\n unlistenEvents,\n element,\n ref,\n url,\n };\n }\n\n getExistingView(activatedRoute: ActivatedRoute): RouteView | undefined {\n const activatedUrlKey = getUrl(this.router, activatedRoute);\n const view = this.views.find((vw) => vw.url === activatedUrlKey);\n if (view) {\n view.ref.changeDetectorRef.reattach();\n }\n return view;\n }\n\n setActive(enteringView: RouteView): Promise<StackDidChangeEvent> {\n const consumeResult = this.navCtrl.consumeTransition();\n let { direction, animation, animationBuilder } = consumeResult;\n const leavingView = this.activeView;\n const tabSwitch = isTabSwitch(enteringView, leavingView);\n if (tabSwitch) {\n direction = 'back';\n animation = undefined;\n }\n\n const viewsSnapshot = this.views.slice();\n\n let currentNavigation;\n\n const router = this.router as any;\n\n // Angular >= 7.2.0\n if (router.getCurrentNavigation) {\n currentNavigation = router.getCurrentNavigation();\n\n // Angular < 7.2.0\n } else if (router.navigations?.value) {\n currentNavigation = router.navigations.value;\n }\n\n /**\n * If the navigation action\n * sets `replaceUrl: true`\n * then we need to make sure\n * we remove the last item\n * from our views stack\n */\n if (currentNavigation?.extras?.replaceUrl) {\n if (this.views.length > 0) {\n this.views.splice(-1, 1);\n }\n }\n\n const reused = this.views.includes(enteringView);\n const views = this.insertView(enteringView, direction);\n\n // Trigger change detection before transition starts\n // This will call ngOnInit() the first time too, just after the view\n // was attached to the dom, but BEFORE the transition starts\n if (!reused) {\n enteringView.ref.changeDetectorRef.detectChanges();\n }\n\n /**\n * If we are going back from a page that\n * was presented using a custom animation\n * we should default to using that\n * unless the developer explicitly\n * provided another animation.\n */\n const customAnimation = enteringView.animationBuilder;\n if (animationBuilder === undefined && direction === 'back' && !tabSwitch && customAnimation !== undefined) {\n animationBuilder = customAnimation;\n }\n\n /**\n * Save any custom animation so that navigating\n * back will use this custom animation by default.\n */\n if (leavingView) {\n leavingView.animationBuilder = animationBuilder;\n }\n\n // Wait until previous transitions finish\n return this.zone.runOutsideAngular(() => {\n return this.wait(() => {\n // disconnect leaving page from change detection to\n // reduce jank during the page transition\n if (leavingView) {\n leavingView.ref.changeDetectorRef.detach();\n }\n // In case the enteringView is the same as the leavingPage we need to reattach()\n enteringView.ref.changeDetectorRef.reattach();\n\n return this.transition(enteringView, leavingView, animation, this.canGoBack(1), false, animationBuilder)\n .then(() => cleanupAsync(enteringView, views, viewsSnapshot, this.location, this.zone))\n .then(() => ({\n enteringView,\n direction,\n animation,\n tabSwitch,\n }));\n });\n });\n }\n\n canGoBack(deep: number, stackId = this.getActiveStackId()): boolean {\n return this.getStack(stackId).length > deep;\n }\n\n pop(deep: number, stackId = this.getActiveStackId()): Promise<boolean> {\n return this.zone.run(() => {\n const views = this.getStack(stackId);\n if (views.length <= deep) {\n return Promise.resolve(false);\n }\n const view = views[views.length - deep - 1];\n let url = view.url;\n\n const viewSavedData = view.savedData;\n if (viewSavedData) {\n const primaryOutlet = viewSavedData.get('primary');\n if (primaryOutlet?.route?._routerState?.snapshot.url) {\n url = primaryOutlet.route._routerState.snapshot.url;\n }\n }\n const { animationBuilder } = this.navCtrl.consumeTransition();\n return this.navCtrl.navigateBack(url, { ...view.savedExtras, animation: animationBuilder }).then(() => true);\n });\n }\n\n startBackTransition(): Promise<boolean> | Promise<void> {\n const leavingView = this.activeView;\n if (leavingView) {\n const views = this.getStack(leavingView.stackId);\n const enteringView = views[views.length - 2];\n const customAnimation = enteringView.animationBuilder;\n\n return this.wait(() => {\n return this.transition(\n enteringView, // entering view\n leavingView, // leaving view\n 'back',\n this.canGoBack(2),\n true,\n customAnimation\n );\n });\n }\n return Promise.resolve();\n }\n\n endBackTransition(shouldComplete: boolean): void {\n if (shouldComplete) {\n this.skipTransition = true;\n this.pop(1);\n } else if (this.activeView) {\n cleanup(this.activeView, this.views, this.views, this.location, this.zone);\n }\n }\n\n getLastUrl(stackId?: string): RouteView | undefined {\n const views = this.getStack(stackId);\n return views.length > 0 ? views[views.length - 1] : undefined;\n }\n\n /**\n * @internal\n */\n getRootUrl(stackId?: string): RouteView | undefined {\n const views = this.getStack(stackId);\n return views.length > 0 ? views[0] : undefined;\n }\n\n getActiveStackId(): string | undefined {\n return this.activeView ? this.activeView.stackId : undefined;\n }\n\n /**\n * @internal\n */\n getActiveView(): RouteView | undefined {\n return this.activeView;\n }\n\n hasRunningTask(): boolean {\n return this.runningTask !== undefined;\n }\n\n destroy(): void {\n this.containerEl = undefined!;\n this.views.forEach(destroyView);\n this.activeView = undefined;\n this.views = [];\n }\n\n private getStack(stackId: string | undefined) {\n return this.views.filter((v) => v.stackId === stackId);\n }\n\n private insertView(enteringView: RouteView, direction: RouterDirection) {\n this.activeView = enteringView;\n this.views = insertView(this.views, enteringView, direction);\n return this.views.slice();\n }\n\n private transition(\n enteringView: RouteView | undefined,\n leavingView: RouteView | undefined,\n direction: 'forward' | 'back' | undefined,\n showGoBack: boolean,\n progressAnimation: boolean,\n animationBuilder?: AnimationBuilder\n ) {\n if (this.skipTransition) {\n this.skipTransition = false;\n return Promise.resolve(false);\n }\n if (leavingView === enteringView) {\n return Promise.resolve(false);\n }\n const enteringEl = enteringView ? enteringView.element : undefined;\n const leavingEl = leavingView ? leavingView.element : undefined;\n const containerEl = this.containerEl;\n if (enteringEl && enteringEl !== leavingEl) {\n enteringEl.classList.add('ion-page');\n enteringEl.classList.add('ion-page-invisible');\n\n // containerEl is set to undefined when the stack controller is destroyed,\n // so a transition that resolves after its outlet was destroyed must not\n // dereference it (see destroy()).\n if ((containerEl as any)?.commit) {\n return containerEl.commit(enteringEl, leavingEl, {\n duration: direction === undefined ? 0 : undefined,\n direction,\n showGoBack,\n progressAnimation,\n animationBuilder,\n });\n }\n }\n return Promise.resolve(false);\n }\n\n private async wait<T>(task: () => Promise<T>): Promise<T> {\n if (this.runningTask !== undefined) {\n await this.runningTask;\n this.runningTask = undefined;\n }\n const promise = (this.runningTask = task());\n promise.finally(() => (this.runningTask = undefined));\n return promise;\n }\n}\n\nconst cleanupAsync = (\n activeRoute: RouteView,\n views: RouteView[],\n viewsSnapshot: RouteView[],\n location: Location,\n zone: NgZone\n) => {\n if (typeof (requestAnimationFrame as any) === 'function') {\n return new Promise<void>((resolve) => {\n requestAnimationFrame(() => {\n cleanup(activeRoute, views, viewsSnapshot, location, zone);\n resolve();\n });\n });\n }\n return Promise.resolve();\n};\n\nconst cleanup = (\n activeRoute: RouteView,\n views: RouteView[],\n viewsSnapshot: RouteView[],\n location: Location,\n zone: NgZone\n) => {\n /**\n * Re-enter the Angular zone when destroying page components. This will allow\n * lifecycle events (`ngOnDestroy`) to be run inside the Angular zone.\n */\n zone.run(() => viewsSnapshot.filter((view) => !views.includes(view)).forEach(destroyView));\n\n views.forEach((view) => {\n /**\n * In the event that a user navigated multiple\n * times in rapid succession, we want to make sure\n * we don't pre-emptively detach a view while\n * it is in mid-transition.\n *\n * In this instance we also do not care about query\n * params or fragments as it will be the same view regardless\n */\n const locationWithoutParams = location.path().split('?')[0];\n const locationWithoutFragment = locationWithoutParams.split('#')[0];\n\n if (view !== activeRoute && view.url !== locationWithoutFragment) {\n const element = view.element;\n element.setAttribute('aria-hidden', 'true');\n element.classList.add('ion-page-hidden');\n view.ref.changeDetectorRef.detach();\n }\n });\n};\n"]}
@@ -0,0 +1,73 @@
1
+ export const insertView = (views, view, direction) => {
2
+ if (direction === 'root') {
3
+ return setRoot(views, view);
4
+ }
5
+ else if (direction === 'forward') {
6
+ return setForward(views, view);
7
+ }
8
+ else {
9
+ return setBack(views, view);
10
+ }
11
+ };
12
+ const setRoot = (views, view) => {
13
+ views = views.filter((v) => v.stackId !== view.stackId);
14
+ views.push(view);
15
+ return views;
16
+ };
17
+ const setForward = (views, view) => {
18
+ const index = views.indexOf(view);
19
+ if (index >= 0) {
20
+ views = views.filter((v) => v.stackId !== view.stackId || v.id <= view.id);
21
+ }
22
+ else {
23
+ views.push(view);
24
+ }
25
+ return views;
26
+ };
27
+ const setBack = (views, view) => {
28
+ const index = views.indexOf(view);
29
+ if (index >= 0) {
30
+ return views.filter((v) => v.stackId !== view.stackId || v.id <= view.id);
31
+ }
32
+ else {
33
+ return setRoot(views, view);
34
+ }
35
+ };
36
+ export const getUrl = (router, activatedRoute) => {
37
+ const urlTree = router.createUrlTree(['.'], { relativeTo: activatedRoute });
38
+ return router.serializeUrl(urlTree);
39
+ };
40
+ export const isTabSwitch = (enteringView, leavingView) => {
41
+ if (!leavingView) {
42
+ return true;
43
+ }
44
+ return enteringView.stackId !== leavingView.stackId;
45
+ };
46
+ export const computeStackId = (prefixUrl, url) => {
47
+ if (!prefixUrl) {
48
+ return undefined;
49
+ }
50
+ const segments = toSegments(url);
51
+ for (let i = 0; i < segments.length; i++) {
52
+ if (i >= prefixUrl.length) {
53
+ return segments[i];
54
+ }
55
+ if (segments[i] !== prefixUrl[i]) {
56
+ return undefined;
57
+ }
58
+ }
59
+ return undefined;
60
+ };
61
+ export const toSegments = (path) => {
62
+ return path
63
+ .split('/')
64
+ .map((s) => s.trim())
65
+ .filter((s) => s !== '');
66
+ };
67
+ export const destroyView = (view) => {
68
+ if (view) {
69
+ view.ref.destroy();
70
+ view.unlistenEvents();
71
+ }
72
+ };
73
+ //# sourceMappingURL=stack-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stack-utils.js","sourceRoot":"","sources":["../../../../src/common/directives/navigation/stack-utils.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAkB,EAAE,IAAe,EAAE,SAA0B,EAAe,EAAE;IACzG,IAAI,SAAS,KAAK,MAAM,EAAE,CAAC;QACzB,OAAO,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,C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AAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAY,EAAY,EAAE;IACnD,OAAO,IAAI;SACR,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SACpB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;AAC7B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAA2B,EAAQ,EAAE;IAC/D,IAAI,IAAI,EAAE,CAAC;QACT,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;QACnB,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;AACH,CAAC,CAAC","sourcesContent":["import { ComponentRef } from '@angular/core';\nimport { ActivatedRoute, NavigationExtras, Router } from '@angular/router';\nimport type { AnimationBuilder, NavDirection, RouterDirection } from '@ionic/core/components';\n\nexport const insertView = (views: RouteView[], view: RouteView, direction: RouterDirection): RouteView[] => {\n if (direction === 'root') {\n return setRoot(views, view);\n } else if (direction === 'forward') {\n return setForward(views, view);\n } else {\n return setBack(views, view);\n }\n};\n\nconst setRoot = (views: RouteView[], view: RouteView) => {\n views = views.filter((v) => v.stackId !== view.stackId);\n views.push(view);\n return views;\n};\n\nconst setForward = (views: RouteView[], view: RouteView) => {\n const index = views.indexOf(view);\n if (index >= 0) {\n views = views.filter((v) => v.stackId !== view.stackId || v.id <= view.id);\n } else {\n views.push(view);\n }\n return views;\n};\n\nconst setBack = (views: RouteView[], view: RouteView) => {\n const index = views.indexOf(view);\n if (index >= 0) {\n return views.filter((v) => v.stackId !== view.stackId || v.id <= view.id);\n } else {\n return setRoot(views, view);\n }\n};\n\nexport const getUrl = (router: Router, activatedRoute: ActivatedRoute): string => {\n const urlTree = router.createUrlTree(['.'], { relativeTo: activatedRoute });\n return router.serializeUrl(urlTree);\n};\n\nexport const isTabSwitch = (enteringView: RouteView, leavingView: RouteView | undefined): boolean => {\n if (!leavingView) {\n return true;\n }\n return enteringView.stackId !== leavingView.stackId;\n};\n\nexport const computeStackId = (prefixUrl: string[] | undefined, url: string): string | undefined => {\n if (!prefixUrl) {\n return undefined;\n }\n const segments = toSegments(url);\n for (let i = 0; i < segments.length; i++) {\n if (i >= prefixUrl.length) {\n return segments[i];\n }\n if (segments[i] !== prefixUrl[i]) {\n return undefined;\n }\n }\n return undefined;\n};\n\nexport const toSegments = (path: string): string[] => {\n return path\n .split('/')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n};\n\nexport const destroyView = (view: RouteView | undefined): void => {\n if (view) {\n view.ref.destroy();\n view.unlistenEvents();\n }\n};\n\nexport interface StackWillChangeEvent {\n enteringView: RouteView;\n /**\n * `true` if the event is trigged as a result of a switch\n * between tab navigation stacks.\n */\n tabSwitch: boolean;\n}\n\nexport interface StackDidChangeEvent {\n enteringView: RouteView;\n direction: RouterDirection;\n animation: NavDirection | undefined;\n /**\n * `true` if the event is trigged as a result of a switch\n * between tab navigation stacks.\n */\n tabSwitch: boolean;\n}\n\n// TODO(FW-2827): types\nexport interface RouteView {\n id: number;\n url: string;\n stackId: string | undefined;\n element: HTMLElement;\n ref: ComponentRef<any>;\n savedData?: any;\n savedExtras?: NavigationExtras;\n unlistenEvents: () => void;\n animationBuilder?: AnimationBuilder;\n}\n"]}
@@ -41,6 +41,14 @@ export declare abstract class IonTabs implements AfterViewInit, AfterContentInit
41
41
  * @internal
42
42
  */
43
43
  onStackDidChange({ enteringView, tabSwitch }: StackDidChangeEvent): void;
44
+ /**
45
+ * Host listener for the `ionTabButtonClick` event. Angular 22 enabled stricter
46
+ * host-binding type checking, which types `$event` as the DOM `Event`. That is
47
+ * not assignable to `select`'s public `string | CustomEvent` parameter, so this
48
+ * thin wrapper narrows the event before forwarding to keep `select`'s public
49
+ * signature intact.
50
+ */
51
+ onTabButtonClick(ev: Event): Promise<boolean> | undefined;
44
52
  /**
45
53
  * When a tab button is clicked, there are several scenarios:
46
54
  * 1. If the selected tab is currently active (the tab button has been clicked
@@ -79,5 +87,5 @@ export declare abstract class IonTabs implements AfterViewInit, AfterContentInit
79
87
  */
80
88
  private relocateTabBar;
81
89
  static ɵfac: i0.ɵɵFactoryDeclaration<IonTabs, never>;
82
- static ɵdir: i0.ɵɵDirectiveDeclaration<IonTabs, "ion-tabs", never, {}, { "ionTabsWillChange": "ionTabsWillChange"; "ionTabsDidChange": "ionTabsDidChange"; }, never, never, false, never>;
90
+ static ɵdir: i0.ɵɵDirectiveDeclaration<IonTabs, "ion-tabs", never, {}, { "ionTabsWillChange": "ionTabsWillChange"; "ionTabsDidChange": "ionTabsDidChange"; }, never, never, true, never>;
83
91
  }