@angular-wave/angular.ts 0.0.35 → 0.0.37

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 (480) hide show
  1. package/.eslintrc.cjs +1 -1
  2. package/Makefile +4 -0
  3. package/dist/angular-ts.esm.js +1 -1
  4. package/dist/angular-ts.umd.js +1 -1
  5. package/index.html +3 -102
  6. package/package.json +2 -2
  7. package/playwright.config.ts +4 -3
  8. package/public/public/my_other_directive.html +1 -0
  9. package/{test → src}/angular.spec.js +6 -6
  10. package/src/animations/animate-css-driver.js +1 -1
  11. package/src/animations/animate-queue.js +1 -1
  12. package/src/animations/animation.js +1 -1
  13. package/src/animations/shared.js +1 -1
  14. package/{test → src}/binding.spec.js +3 -3
  15. package/src/core/{animate-runner.js → animate/animate-runner.js} +1 -1
  16. package/src/core/animate/animate.html +18 -0
  17. package/src/core/{animate.js → animate/animate.js} +4 -5
  18. package/{test/core → src/core/animate}/animate.spec.js +1 -1
  19. package/src/core/cache/cache-factor.html +18 -0
  20. package/{test/core → src/core/cache}/cache-factor.spec.js +2 -2
  21. package/src/core/cache/cache-factor.test.js +11 -0
  22. package/src/core/compile/compile.html +18 -0
  23. package/src/core/{compile.js → compile/compile.js} +25 -21
  24. package/{test/core → src/core/compile}/compile.spec.js +65 -68
  25. package/src/core/compile/compile.test.js +12 -0
  26. package/src/core/controller/controller.html +21 -0
  27. package/src/core/{controller.js → controller/controller.js} +1 -1
  28. package/{test/core/controller-provider.spec.js → src/core/controller/controller.spec.js} +2 -2
  29. package/src/core/controller/controller.test.js +11 -0
  30. package/{test → src}/core/cookie-reader.spec.js +2 -2
  31. package/{test → src}/core/document.spec.js +3 -3
  32. package/src/core/filter/filter.html +18 -0
  33. package/src/core/{filter.js → filter/filter.js} +5 -5
  34. package/{test/core → src/core/filter}/filter.spec.js +2 -2
  35. package/src/core/filter/filter.test.js +11 -0
  36. package/src/core/interpolate/interpolate.html +21 -0
  37. package/src/core/{interpolate.js → interpolate/interpolate.js} +1 -1
  38. package/{test/core → src/core/interpolate}/interpolate.spec.js +2 -2
  39. package/src/core/interpolate/interpolate.test.js +11 -0
  40. package/src/core/{interval-factory.js → interval/interval-factory.js} +2 -1
  41. package/src/core/interval/interval.html +18 -0
  42. package/src/core/{interval.js → interval/interval.js} +3 -2
  43. package/{test/core → src/core/interval}/interval.spec.js +6 -10
  44. package/src/core/interval/interval.test.js +12 -0
  45. package/src/core/{location.js → location/location.js} +4 -3
  46. package/{test/core → src/core/location}/location.spec.js +3 -3
  47. package/{test → src}/core/on.spec.js +3 -3
  48. package/src/core/parser/parse.js +2 -3
  49. package/{test/core → src/core/parser}/parse.spec.js +4 -4
  50. package/{test → src}/core/prop.spec.js +4 -4
  51. package/{test/core → src/core/pubsub}/pubsub.spec.js +1 -1
  52. package/src/core/{q.js → q/q.js} +1 -1
  53. package/{test/core → src/core/q}/q.spec.js +3 -3
  54. package/{test → src}/core/root-element.spec.js +3 -3
  55. package/src/core/{sanitize-uri.js → sanitize/sanitize-uri.js} +2 -2
  56. package/{test/core → src/core/sanitize}/sanitize-uri.spec.js +1 -1
  57. package/src/core/{sce.js → sce/sce.js} +3 -3
  58. package/{test/core → src/core/sce}/sce.spec.js +3 -3
  59. package/src/core/{root-scope.js → scope/scope.js} +33 -35
  60. package/{test/core → src/core/scope}/scope.spec.js +5 -5
  61. package/src/core/{timeout.js → timeout/timeout.js} +2 -2
  62. package/{test/core → src/core/timeout}/timeout.spec.js +2 -2
  63. package/src/core/{urlUtils.js → url-utils/url-utils.js} +1 -1
  64. package/{test/core → src/core/url-utils}/url-utils.spec.js +1 -1
  65. package/src/directive/attrs/attrs.html +18 -0
  66. package/src/directive/{attrs.js → attrs/attrs.js} +3 -3
  67. package/{test/directive/scrset.spec.js → src/directive/attrs/attrs.spec.js} +3 -3
  68. package/{test/directive → src/directive/attrs}/boolean.spec.js +3 -3
  69. package/{test/directive → src/directive/attrs}/element-style.spec.js +3 -3
  70. package/src/directive/attrs/src.html +18 -0
  71. package/{test/directive → src/directive/attrs}/src.spec.js +3 -3
  72. package/src/directive/attrs/src.test.js +11 -0
  73. package/src/directive/bind/bind.html +18 -0
  74. package/src/directive/{bind.js → bind/bind.js} +1 -1
  75. package/{test/directive → src/directive/bind}/bind.spec.js +3 -3
  76. package/src/directive/bind/bind.test.js +11 -0
  77. package/{test/sanitize → src/directive/bind}/bing-html.spec.js +3 -3
  78. package/src/directive/change/change.html +18 -0
  79. package/{test/directive → src/directive/change}/change.spec.js +3 -3
  80. package/src/directive/change/change.test.js +11 -0
  81. package/src/directive/class/class.html +18 -0
  82. package/src/directive/{class.js → class/class.js} +3 -3
  83. package/{test/directive → src/directive/class}/class.spec.js +5 -5
  84. package/src/directive/class/class.test.js +11 -0
  85. package/src/directive/cloak/cloak.html +18 -0
  86. package/{test/directive → src/directive/cloak}/cloak.spec.js +3 -3
  87. package/src/directive/cloak/cloak.test.js +11 -0
  88. package/src/directive/controller/controller.html +21 -0
  89. package/{test/directive → src/directive/controller}/controller.spec.js +5 -5
  90. package/src/directive/controller/controller.test.js +11 -0
  91. package/{test/directive → src/directive/events}/click.spec.js +3 -3
  92. package/{test/directive → src/directive/events}/event.spec.js +4 -4
  93. package/src/directive/events/events.html +18 -0
  94. package/src/directive/{events.js → events/events.js} +2 -2
  95. package/src/directive/events/events.test.js +11 -0
  96. package/src/directive/form/form.html +18 -0
  97. package/src/directive/{form.js → form/form.js} +2 -2
  98. package/{test/directive → src/directive/form}/form.spec.js +5 -5
  99. package/src/directive/form/form.test.js +11 -0
  100. package/src/directive/if/if.html +18 -0
  101. package/src/directive/{if.js → if/if.js} +2 -1
  102. package/src/directive/if/if.md +77 -0
  103. package/{test/directive → src/directive/if}/if.spec.js +16 -16
  104. package/src/directive/if/if.test.js +12 -0
  105. package/src/directive/include/include.html +18 -0
  106. package/src/directive/{include.js → include/include.js} +2 -2
  107. package/{test/directive → src/directive/include}/include.spec.js +52 -71
  108. package/src/directive/include/include.test.js +12 -0
  109. package/src/directive/init/init.html +18 -0
  110. package/{test/directive → src/directive/init}/init.spec.js +4 -4
  111. package/src/directive/init/init.test.js +11 -0
  112. package/src/directive/input/input.html +18 -0
  113. package/src/directive/{input.js → input/input.js} +2 -2
  114. package/{test/directive → src/directive/input}/input.spec.js +5 -9
  115. package/src/directive/input/input.test.js +11 -0
  116. package/src/directive/list/list.html +18 -0
  117. package/src/directive/{list.js → list/list.js} +1 -1
  118. package/{test/directive → src/directive/list}/list.spec.js +3 -3
  119. package/src/directive/list/list.test.js +11 -0
  120. package/src/directive/model/model.html +18 -0
  121. package/src/directive/{model.js → model/model.js} +10 -6
  122. package/{test/directive → src/directive/model}/model.spec.js +8 -8
  123. package/src/directive/model/model.test.js +11 -0
  124. package/src/directive/model-options/model-option.test.js +11 -0
  125. package/src/directive/model-options/model-options.html +21 -0
  126. package/src/directive/{model-options.js → model-options/model-options.js} +1 -1
  127. package/{test/directive → src/directive/model-options}/model-options.spec.js +7 -7
  128. package/src/directive/non-bindable/non-bindable.html +21 -0
  129. package/{test/directive → src/directive/non-bindable}/non-bindable.spec.js +3 -3
  130. package/src/directive/non-bindable/non-bindable.test.js +11 -0
  131. package/src/directive/options/options.html +21 -0
  132. package/src/directive/{options.js → options/options.js} +8 -6
  133. package/{test/directive → src/directive/options}/options.spec.js +5 -5
  134. package/src/directive/options/options.test.js +11 -0
  135. package/src/directive/ref/href.html +18 -0
  136. package/{test/directive → src/directive/ref}/href.spec.js +4 -4
  137. package/src/directive/ref/href.test.js +17 -0
  138. package/src/directive/ref/ref.html +18 -0
  139. package/src/directive/{ref.js → ref/ref.js} +1 -1
  140. package/{test/directive → src/directive/ref}/ref.spec.js +2 -2
  141. package/src/directive/repeat/repeat.html +18 -0
  142. package/src/directive/{repeat.js → repeat/repeat.js} +13 -13
  143. package/{test/directive → src/directive/repeat}/repeat.spec.js +8 -9
  144. package/src/directive/repeat/repeat.test.js +11 -0
  145. package/src/directive/script/script.html +18 -0
  146. package/{test/directive → src/directive/script}/script.spec.js +3 -3
  147. package/src/directive/script/script.test.js +11 -0
  148. package/src/directive/select/select.html +18 -0
  149. package/src/directive/{select.js → select/select.js} +2 -2
  150. package/{test/directive → src/directive/select}/select.spec.js +5 -5
  151. package/src/directive/select/select.test.js +11 -0
  152. package/src/directive/show-hide/show-hide.html +21 -0
  153. package/{test/directive → src/directive/show-hide}/show-hide.spec.js +3 -3
  154. package/src/directive/show-hide/show-hide.test.js +11 -0
  155. package/src/directive/style/style.html +18 -0
  156. package/{test/directive → src/directive/style}/style.spec.js +3 -3
  157. package/src/directive/style/style.test.js +11 -0
  158. package/src/directive/switch/switch.html +18 -0
  159. package/src/directive/{switch.js → switch/switch.js} +3 -3
  160. package/{test/directive → src/directive/switch}/switch.spec.js +3 -3
  161. package/src/directive/switch/switch.test.js +11 -0
  162. package/src/directive/{transclude.js → transclude/transclude.js} +2 -2
  163. package/src/directive/validators/validators.html +21 -0
  164. package/src/directive/{validators.js → validators/validators.js} +3 -3
  165. package/{test/directive → src/directive/validators}/validators.spec.js +3 -3
  166. package/src/directive/validators/validators.test.js +11 -0
  167. package/src/exts/aria/aria.html +21 -0
  168. package/src/exts/{aria.js → aria/aria.js} +1 -1
  169. package/{test → src/exts}/aria/aria.spec.js +3 -3
  170. package/src/exts/aria/aria.test.js +11 -0
  171. package/src/exts/messages/messages.html +21 -0
  172. package/src/exts/{messages.js → messages/messages.js} +1 -1
  173. package/{test → src/exts}/messages/messages.spec.js +5 -5
  174. package/src/exts/messages/messages.test.js +11 -0
  175. package/{test/filter → src/filters}/filter.spec.js +10 -5
  176. package/{test/filter → src/filters}/filters.spec.js +3 -3
  177. package/{test/filter → src/filters}/limit-to.spec.js +3 -3
  178. package/{test/filter → src/filters}/order-by.spec.js +2 -2
  179. package/src/injector.js +1 -2
  180. package/{test → src}/injector.spec.js +4 -4
  181. package/src/loader.js +2 -2
  182. package/{test → src}/loader.spec.js +2 -2
  183. package/src/public.js +48 -45
  184. package/{test → src}/public.spec.js +2 -2
  185. package/src/router/common/glob.html +18 -0
  186. package/{test/router → src/router/common}/glob.spec.js +1 -1
  187. package/src/router/common/glob.test.js +11 -0
  188. package/src/router/directives/view-directive.js +1 -1
  189. package/{test → src}/router/services.spec.js +2 -2
  190. package/src/router/state/state-service.js +1 -1
  191. package/{test/router/ng-state-builder.spec.js → src/router/state-builder.spec.js} +1 -1
  192. package/{test → src}/router/state-directives.spec.js +3 -3
  193. package/{test → src}/router/state-filter.spec.js +2 -2
  194. package/{test → src}/router/state.spec.js +5 -5
  195. package/{test → src}/router/template-factory.spec.js +3 -3
  196. package/src/router/transition/transition-hook.js +1 -1
  197. package/{test → src}/router/url-service.spec.js +4 -4
  198. package/{test → src}/router/view-directive.spec.js +3 -3
  199. package/{test → src}/router/view-hook.spec.js +3 -3
  200. package/{test → src}/router/view-scroll.spec.js +3 -3
  201. package/{test → src}/router/view.spec.js +12 -12
  202. package/src/services/browser.js +2 -2
  203. package/src/services/cache-factory.js +5 -11
  204. package/src/services/document.js +1 -1
  205. package/src/services/{http.js → http/http.js} +5 -6
  206. package/{test/core → src/services/http}/http.spec.js +3 -3
  207. package/{test/core → src/services/http}/template-request.spec.js +2 -2
  208. package/src/services/{http-backend.js → http-backend/http-backend.js} +2 -2
  209. package/{test/core → src/services/http-backend}/http-backend.spec.js +3 -3
  210. package/src/services/template-request.js +1 -1
  211. package/{test → src}/shared/common.spec.js +4 -4
  212. package/{test → src}/shared/hof.spec.js +1 -1
  213. package/src/shared/jqlite/jqlite.html +18 -0
  214. package/src/{jqLite.js → shared/jqlite/jqlite.js} +2 -2
  215. package/{test → src/shared/jqlite}/jqlite.spec.js +7 -7
  216. package/src/shared/jqlite/jqlite.test.js +11 -0
  217. package/{test → src/shared}/min-err.spec.js +2 -2
  218. package/{test → src}/shared/strings.spec.js +1 -1
  219. package/{test → src/shared}/test-utils.js +1 -1
  220. package/src/shared/utils.js +3 -18
  221. package/{test → src}/shared/utils.spec.js +1 -1
  222. package/tsconfig.json +1 -1
  223. package/types/animations/animate-cache.d.ts +12 -0
  224. package/types/animations/animate-children-directive.d.ts +84 -0
  225. package/types/animations/animate-swap.d.ts +103 -0
  226. package/types/animations/animation.d.ts +14 -0
  227. package/types/animations/module.d.ts +750 -0
  228. package/types/animations/raf-scheduler.d.ts +5 -0
  229. package/types/animations/shared.d.ts +65 -0
  230. package/types/constants.d.ts +18 -0
  231. package/types/core/animate-css.d.ts +25 -0
  232. package/types/core/cache.d.ts +25 -0
  233. package/types/core/compile.d.ts +206 -0
  234. package/types/core/controller.d.ts +42 -0
  235. package/types/core/exception-handler.d.ts +46 -0
  236. package/types/core/filter.d.ts +9 -0
  237. package/types/core/interpolate.d.ts +83 -0
  238. package/types/core/interval-factory.d.ts +21 -0
  239. package/types/core/interval.d.ts +4 -0
  240. package/types/core/location.d.ts +234 -0
  241. package/types/core/pubsub.d.ts +164 -0
  242. package/types/core/q.d.ts +33 -0
  243. package/types/core/root-scope.d.ts +754 -0
  244. package/types/core/sanitize-uri.d.ts +57 -0
  245. package/types/core/sce.d.ts +432 -0
  246. package/types/core/task-tracker-factory.d.ts +50 -0
  247. package/types/core/timeout.d.ts +31 -0
  248. package/types/core/urlUtils.d.ts +98 -0
  249. package/types/directive/attrs.d.ts +176 -0
  250. package/types/directive/bind.d.ts +21 -0
  251. package/types/directive/change.d.ts +4 -0
  252. package/types/directive/class.d.ts +125 -0
  253. package/types/directive/cloak.d.ts +4 -0
  254. package/types/directive/controller.d.ts +6 -0
  255. package/types/directive/events.d.ts +12 -0
  256. package/types/directive/form.d.ts +230 -0
  257. package/types/directive/if.d.ts +17 -0
  258. package/types/directive/include.d.ts +33 -0
  259. package/types/directive/init.d.ts +4 -0
  260. package/types/directive/input.d.ts +192 -0
  261. package/types/directive/list.d.ts +4 -0
  262. package/types/directive/model.d.ts +672 -0
  263. package/types/directive/non-bindable.d.ts +5 -0
  264. package/types/directive/options.d.ts +16 -0
  265. package/types/directive/ref.d.ts +11 -0
  266. package/types/directive/repeat.d.ts +23 -0
  267. package/types/directive/script.d.ts +23 -0
  268. package/types/directive/show-hide.d.ts +234 -0
  269. package/types/directive/style.d.ts +4 -0
  270. package/types/directive/switch.d.ts +23 -0
  271. package/types/directive/transclude.d.ts +15 -0
  272. package/types/directive/validators.d.ts +173 -0
  273. package/types/exts/aria.d.ts +1 -0
  274. package/types/exts/messages.d.ts +1 -0
  275. package/types/filters/filter.d.ts +4 -0
  276. package/types/filters/filters.d.ts +38 -0
  277. package/types/filters/limit-to.d.ts +4 -0
  278. package/types/filters/order-by.d.ts +11 -0
  279. package/types/jqLite.d.ts +57 -0
  280. package/types/router/common/coreservices.d.ts +4 -0
  281. package/types/router/common/glob.d.ts +60 -0
  282. package/types/router/common/queue.d.ts +15 -0
  283. package/types/router/common/trace.d.ts +72 -0
  284. package/types/router/directives/view-directive.d.ts +160 -0
  285. package/types/router/globals.d.ts +30 -0
  286. package/types/router/hooks/core-resolvables.d.ts +2 -0
  287. package/types/router/hooks/ignored-transition.d.ts +1 -0
  288. package/types/router/hooks/invalid-transition.d.ts +1 -0
  289. package/types/router/hooks/lazy-load.d.ts +42 -0
  290. package/types/router/hooks/on-enter-exit-retain.d.ts +3 -0
  291. package/types/router/hooks/redirect-to.d.ts +4 -0
  292. package/types/router/hooks/resolve.d.ts +4 -0
  293. package/types/router/hooks/update-globals.d.ts +1 -0
  294. package/types/router/hooks/url.d.ts +5 -0
  295. package/types/router/hooks/views.d.ts +5 -0
  296. package/types/router/index.d.ts +1 -17
  297. package/types/router/injectables.d.ts +1 -0
  298. package/types/router/params/param-factory.d.ts +8 -0
  299. package/types/router/params/param-type.d.ts +65 -0
  300. package/types/router/params/param-types.d.ts +36 -0
  301. package/types/router/params/param.d.ts +41 -0
  302. package/types/router/params/state-params.d.ts +12 -0
  303. package/types/router/path/path-node.d.ts +45 -0
  304. package/types/router/path/path-utils.d.ts +83 -0
  305. package/types/router/resolve/resolvable.d.ts +50 -0
  306. package/types/router/resolve/resolve-context.d.ts +102 -0
  307. package/types/router/services.d.ts +12 -13
  308. package/types/router/state/state-builder.d.ts +89 -0
  309. package/types/router/state/state-matcher.d.ts +7 -0
  310. package/types/router/state/state-object.d.ts +72 -0
  311. package/types/router/state/state-queue-manager.d.ts +19 -0
  312. package/types/router/state/state-registry.d.ts +118 -0
  313. package/types/router/state/state-service.d.ts +419 -0
  314. package/types/router/state/target-state.d.ts +102 -0
  315. package/types/router/state/views.d.ts +50 -0
  316. package/types/router/state-filters.d.ts +15 -0
  317. package/types/router/state-provider.d.ts +123 -0
  318. package/types/router/template-factory.d.ts +124 -0
  319. package/types/router/transition/hook-builder.d.ts +40 -0
  320. package/types/router/transition/hook-registry.d.ts +102 -0
  321. package/types/router/transition/interface.d.ts +11 -0
  322. package/types/router/transition/reject-factory.d.ts +42 -0
  323. package/types/router/transition/transition-event-type.d.ts +24 -0
  324. package/types/router/transition/transition-hook.d.ts +86 -0
  325. package/types/router/transition/transition-service.d.ts +115 -0
  326. package/types/router/transition/transition.d.ts +390 -0
  327. package/types/router/url/url-config.d.ts +100 -0
  328. package/types/router/url/url-matcher.d.ts +175 -0
  329. package/types/router/url/url-rule.d.ts +146 -0
  330. package/types/router/url/url-rules.d.ts +229 -0
  331. package/types/router/url/url-service.d.ts +278 -0
  332. package/types/router/view/view.d.ts +137 -0
  333. package/types/router/view-scroll.d.ts +5 -0
  334. package/types/services/anchor-scroll.d.ts +11 -0
  335. package/types/services/browser.d.ts +150 -0
  336. package/types/services/cache-factory.d.ts +143 -0
  337. package/types/services/cookie-reader.d.ts +17 -0
  338. package/types/services/document.d.ts +38 -0
  339. package/types/services/http-backend.d.ts +78 -0
  340. package/types/services/http.d.ts +157 -0
  341. package/types/services/log.d.ts +63 -0
  342. package/types/services/template-request.d.ts +69 -0
  343. package/types/shared/common.d.ts +216 -0
  344. package/types/shared/hof.d.ts +131 -0
  345. package/types/shared/predicates.d.ts +15 -0
  346. package/types/shared/strings.d.ts +55 -0
  347. package/types/shared/utils.d.ts +630 -0
  348. package/types-back/README.md +2 -0
  349. package/{types → types-back}/index.d.ts +17 -12
  350. package/types-back/router/index.d.ts +17 -0
  351. package/types-back/router/services.d.ts +15 -0
  352. package/e2e/unit.spec.ts +0 -16
  353. package/public/my_other_directive.html +0 -1
  354. package/src/directive/if.md +0 -80
  355. package/test/build-test.html +0 -14
  356. package/test/mock-test.html +0 -13
  357. package/test/module-test.html +0 -58
  358. /package/{test → public}/jasmine/jasmine-5.1.2/boot0.js +0 -0
  359. /package/{test → public}/jasmine/jasmine-5.1.2/boot1.js +0 -0
  360. /package/{test → public}/jasmine/jasmine-5.1.2/jasmine-html.js +0 -0
  361. /package/{test → public}/jasmine/jasmine-5.1.2/jasmine.css +0 -0
  362. /package/{test → public}/jasmine/jasmine-5.1.2/jasmine.js +0 -0
  363. /package/{test → public}/jasmine/jasmine-5.1.2/jasmine_favicon.png +0 -0
  364. /package/{test → public}/jasmine/jasmine-browser.json +0 -0
  365. /package/{test → public}/jasmine/jasmine.json +0 -0
  366. /package/public/{README.md → public/README.md} +0 -0
  367. /package/public/{circle.html → public/circle.html} +0 -0
  368. /package/public/{my_child_directive.html → public/my_child_directive.html} +0 -0
  369. /package/public/{my_directive.html → public/my_directive.html} +0 -0
  370. /package/public/{test.html → public/test.html} +0 -0
  371. /package/src/core/{animate-css.js → animate/animate-css.js} +0 -0
  372. /package/src/core/{cache.js → cache/cache.js} +0 -0
  373. /package/src/core/{compile.md → compile/compile.md} +0 -0
  374. /package/src/core/{filter.md → filter/filter.md} +0 -0
  375. /package/src/core/{interval.md → interval/interval.md} +0 -0
  376. /package/src/core/{pubsub.js → pubsub/pubsub.js} +0 -0
  377. /package/src/directive/{bind.md → bind/bind.md} +0 -0
  378. /package/src/directive/{change.js → change/change.js} +0 -0
  379. /package/src/directive/{change.md → change/change.md} +0 -0
  380. /package/src/directive/{cloak.js → cloak/cloak.js} +0 -0
  381. /package/src/directive/{cloak.md → cloak/cloak.md} +0 -0
  382. /package/src/directive/{controller.js → controller/controller.js} +0 -0
  383. /package/src/directive/{controller.md → controller/controller.md} +0 -0
  384. /package/src/directive/{events.md → events/events.md} +0 -0
  385. /package/src/directive/{include.md → include/include.md} +0 -0
  386. /package/src/directive/{init.js → init/init.js} +0 -0
  387. /package/src/directive/{init.md → init/init.md} +0 -0
  388. /package/src/directive/{list.md → list/list.md} +0 -0
  389. /package/src/directive/{non-bindable.js → non-bindable/non-bindable.js} +0 -0
  390. /package/src/directive/{non-bindable.md → non-bindable/non-bindable.md} +0 -0
  391. /package/src/directive/{repeat.md → repeat/repeat.md} +0 -0
  392. /package/src/directive/{script.js → script/script.js} +0 -0
  393. /package/src/directive/{show-hide.js → show-hide/show-hide.js} +0 -0
  394. /package/src/directive/{style.js → style/style.js} +0 -0
  395. /package/src/directive/{style.md → style/style.md} +0 -0
  396. /package/src/directive/{switch.md → switch/switch.md} +0 -0
  397. /package/src/exts/{messages.md → messages/messages.md} +0 -0
  398. /package/{test/module-test.js → src/services/http/http.html} +0 -0
  399. /package/src/{constants.js → shared/constants.js} +0 -0
  400. /package/{types → types-back}/angular.d.ts +0 -0
  401. /package/{types → types-back}/global.d.ts +0 -0
  402. /package/{types → types-back}/jqlite.d.ts +0 -0
  403. /package/{types → types-back}/router/core/common/common.d.ts +0 -0
  404. /package/{types → types-back}/router/core/common/coreservices.d.ts +0 -0
  405. /package/{types → types-back}/router/core/common/glob.d.ts +0 -0
  406. /package/{types → types-back}/router/core/common/hof.d.ts +0 -0
  407. /package/{types → types-back}/router/core/common/index.d.ts +0 -0
  408. /package/{types → types-back}/router/core/common/predicates.d.ts +0 -0
  409. /package/{types → types-back}/router/core/common/queue.d.ts +0 -0
  410. /package/{types → types-back}/router/core/common/safeConsole.d.ts +0 -0
  411. /package/{types → types-back}/router/core/common/strings.d.ts +0 -0
  412. /package/{types → types-back}/router/core/common/trace.d.ts +0 -0
  413. /package/{types → types-back}/router/core/globals.d.ts +0 -0
  414. /package/{types → types-back}/router/core/hooks/coreResolvables.d.ts +0 -0
  415. /package/{types → types-back}/router/core/hooks/ignoredTransition.d.ts +0 -0
  416. /package/{types → types-back}/router/core/hooks/invalidTransition.d.ts +0 -0
  417. /package/{types → types-back}/router/core/hooks/lazyLoad.d.ts +0 -0
  418. /package/{types → types-back}/router/core/hooks/onEnterExitRetain.d.ts +0 -0
  419. /package/{types → types-back}/router/core/hooks/redirectTo.d.ts +0 -0
  420. /package/{types → types-back}/router/core/hooks/resolve.d.ts +0 -0
  421. /package/{types → types-back}/router/core/hooks/updateGlobals.d.ts +0 -0
  422. /package/{types → types-back}/router/core/hooks/url.d.ts +0 -0
  423. /package/{types → types-back}/router/core/hooks/views.d.ts +0 -0
  424. /package/{types → types-back}/router/core/index.d.ts +0 -0
  425. /package/{types → types-back}/router/core/interface.d.ts +0 -0
  426. /package/{types → types-back}/router/core/params/index.d.ts +0 -0
  427. /package/{types → types-back}/router/core/params/interface.d.ts +0 -0
  428. /package/{types → types-back}/router/core/params/param.d.ts +0 -0
  429. /package/{types → types-back}/router/core/params/paramType.d.ts +0 -0
  430. /package/{types → types-back}/router/core/params/paramTypes.d.ts +0 -0
  431. /package/{types → types-back}/router/core/params/stateParams.d.ts +0 -0
  432. /package/{types → types-back}/router/core/path/index.d.ts +0 -0
  433. /package/{types → types-back}/router/core/path/pathNode.d.ts +0 -0
  434. /package/{types → types-back}/router/core/path/pathUtils.d.ts +0 -0
  435. /package/{types → types-back}/router/core/resolve/index.d.ts +0 -0
  436. /package/{types → types-back}/router/core/resolve/interface.d.ts +0 -0
  437. /package/{types → types-back}/router/core/resolve/resolvable.d.ts +0 -0
  438. /package/{types → types-back}/router/core/resolve/resolveContext.d.ts +0 -0
  439. /package/{types → types-back}/router/core/router.d.ts +0 -0
  440. /package/{types → types-back}/router/core/state/index.d.ts +0 -0
  441. /package/{types → types-back}/router/core/state/interface.d.ts +0 -0
  442. /package/{types → types-back}/router/core/state/stateBuilder.d.ts +0 -0
  443. /package/{types → types-back}/router/core/state/stateMatcher.d.ts +0 -0
  444. /package/{types → types-back}/router/core/state/stateObject.d.ts +0 -0
  445. /package/{types → types-back}/router/core/state/stateQueueManager.d.ts +0 -0
  446. /package/{types → types-back}/router/core/state/stateRegistry.d.ts +0 -0
  447. /package/{types → types-back}/router/core/state/stateService.d.ts +0 -0
  448. /package/{types → types-back}/router/core/state/targetState.d.ts +0 -0
  449. /package/{types → types-back}/router/core/transition/hookBuilder.d.ts +0 -0
  450. /package/{types → types-back}/router/core/transition/hookRegistry.d.ts +0 -0
  451. /package/{types → types-back}/router/core/transition/index.d.ts +0 -0
  452. /package/{types → types-back}/router/core/transition/interface.d.ts +0 -0
  453. /package/{types → types-back}/router/core/transition/rejectFactory.d.ts +0 -0
  454. /package/{types → types-back}/router/core/transition/transition.d.ts +0 -0
  455. /package/{types → types-back}/router/core/transition/transitionEventType.d.ts +0 -0
  456. /package/{types → types-back}/router/core/transition/transitionHook.d.ts +0 -0
  457. /package/{types → types-back}/router/core/transition/transitionService.d.ts +0 -0
  458. /package/{types → types-back}/router/core/url/index.d.ts +0 -0
  459. /package/{types → types-back}/router/core/url/interface.d.ts +0 -0
  460. /package/{types → types-back}/router/core/url/urlConfig.d.ts +0 -0
  461. /package/{types → types-back}/router/core/url/urlMatcher.d.ts +0 -0
  462. /package/{types → types-back}/router/core/url/urlMatcherFactory.d.ts +0 -0
  463. /package/{types → types-back}/router/core/url/urlRouter.d.ts +0 -0
  464. /package/{types → types-back}/router/core/url/urlRule.d.ts +0 -0
  465. /package/{types → types-back}/router/core/url/urlRules.d.ts +0 -0
  466. /package/{types → types-back}/router/core/url/urlService.d.ts +0 -0
  467. /package/{types → types-back}/router/core/view/index.d.ts +0 -0
  468. /package/{types → types-back}/router/core/view/interface.d.ts +0 -0
  469. /package/{types → types-back}/router/core/view/view.d.ts +0 -0
  470. /package/{types → types-back}/router/directives/viewDirective.d.ts +0 -0
  471. /package/{types → types-back}/router/interface.d.ts +0 -0
  472. /package/{types → types-back}/router/legacy/resolveService.d.ts +0 -0
  473. /package/{types → types-back}/router/legacy/stateEvents.d.ts +0 -0
  474. /package/{types → types-back}/router/stateFilters.d.ts +0 -0
  475. /package/{types → types-back}/router/stateProvider.d.ts +0 -0
  476. /package/{types → types-back}/router/statebuilders/onEnterExitRetain.d.ts +0 -0
  477. /package/{types → types-back}/router/statebuilders/views.d.ts +0 -0
  478. /package/{types → types-back}/router/templateFactory.d.ts +0 -0
  479. /package/{types → types-back}/router/viewScroll.d.ts +0 -0
  480. /package/{test/server → utils}/express.js +0 -0
@@ -0,0 +1,123 @@
1
+ /**
2
+ * The Angular 1 `StateProvider`
3
+ *
4
+ * The `$stateProvider` works similar to Angular's v1 router, but it focuses purely
5
+ * on state.
6
+ *
7
+ * A state corresponds to a "place" in the application in terms of the overall UI and
8
+ * navigation. A state describes (via the controller / template / view properties) what
9
+ * the UI looks like and does at that place.
10
+ *
11
+ * States often have things in common, and the primary way of factoring out these
12
+ * commonalities in this model is via the state hierarchy, i.e. parent/child states aka
13
+ * nested states.
14
+ *
15
+ * The `$stateProvider` provides interfaces to declare these states for your app.
16
+ */
17
+ export class StateProvider {
18
+ constructor(stateRegistry: any, stateService: any);
19
+ stateRegistry: any;
20
+ stateService: any;
21
+ /**
22
+ * Decorates states when they are registered
23
+ *
24
+ * Allows you to extend (carefully) or override (at your own peril) the
25
+ * `stateBuilder` object used internally by [[StateRegistry]].
26
+ * This can be used to add custom functionality to ui-router,
27
+ * for example inferring templateUrl based on the state name.
28
+ *
29
+ * When passing only a name, it returns the current (original or decorated) builder
30
+ * function that matches `name`.
31
+ *
32
+ * The builder functions that can be decorated are listed below. Though not all
33
+ * necessarily have a good use case for decoration, that is up to you to decide.
34
+ *
35
+ * In addition, users can attach custom decorators, which will generate new
36
+ * properties within the state's internal definition. There is currently no clear
37
+ * use-case for this beyond accessing internal states (i.e. $state.$current),
38
+ * however, expect this to become increasingly relevant as we introduce additional
39
+ * meta-programming features.
40
+ *
41
+ * **Warning**: Decorators should not be interdependent because the order of
42
+ * execution of the builder functions in non-deterministic. Builder functions
43
+ * should only be dependent on the state definition object and super function.
44
+ *
45
+ *
46
+ * Existing builder functions and current return values:
47
+ *
48
+ * - **parent** `{object}` - returns the parent state object.
49
+ * - **data** `{object}` - returns state data, including any inherited data that is not
50
+ * overridden by own values (if any).
51
+ * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher}
52
+ * or `null`.
53
+ * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is
54
+ * navigable).
55
+ * - **params** `{object}` - returns an array of state params that are ensured to
56
+ * be a super-set of parent's params.
57
+ * - **views** `{object}` - returns a views object where each key is an absolute view
58
+ * name (i.e. "viewName@stateName") and each value is the config object
59
+ * (template, controller) for the view. Even when you don't use the views object
60
+ * explicitly on a state config, one is still created for you internally.
61
+ * So by decorating this builder function you have access to decorating template
62
+ * and controller properties.
63
+ * - **ownParams** `{object}` - returns an array of params that belong to the state,
64
+ * not including any params defined by ancestor states.
65
+ * - **path** `{string}` - returns the full path from the root down to this state.
66
+ * Needed for state activation.
67
+ * - **includes** `{object}` - returns an object that includes every state that
68
+ * would pass a `$state.includes()` test.
69
+ *
70
+ * #### Example:
71
+ * Override the internal 'views' builder with a function that takes the state
72
+ * definition, and a reference to the internal function being overridden:
73
+ * ```js
74
+ * $stateProvider.decorator('views', function (state, parent) {
75
+ * let result = {},
76
+ * views = parent(state);
77
+ *
78
+ * angular.forEach(views, function (config, name) {
79
+ * let autoName = (state.name + '.' + name).replace('.', '/');
80
+ * config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html';
81
+ * result[name] = config;
82
+ * });
83
+ * return result;
84
+ * });
85
+ *
86
+ * $stateProvider.state('home', {
87
+ * views: {
88
+ * 'contact.list': { controller: 'ListController' },
89
+ * 'contact.item': { controller: 'ItemController' }
90
+ * }
91
+ * });
92
+ * ```
93
+ *
94
+ *
95
+ * ```js
96
+ * // Auto-populates list and item views with /partials/home/contact/list.html,
97
+ * // and /partials/home/contact/item.html, respectively.
98
+ * $state.go('home');
99
+ * ```
100
+ *
101
+ * @param {string} name The name of the builder function to decorate.
102
+ * @param {object} func A function that is responsible for decorating the original
103
+ * builder function. The function receives two parameters:
104
+ *
105
+ * - `{object}` - state - The state config object.
106
+ * - `{object}` - super - The original builder function.
107
+ *
108
+ * @return {object} $stateProvider - $stateProvider instance
109
+ */
110
+ decorator(name: string, func: object): object;
111
+ /**
112
+ *
113
+ * @param {angular.Ng1StateDeclaration} definition
114
+ * @returns {StateProvider}
115
+ */
116
+ state(definition: angular.Ng1StateDeclaration): StateProvider;
117
+ /**
118
+ * Registers an invalid state handler
119
+ *
120
+ * This is a passthrough to [[StateService.onInvalid]] for ng1.
121
+ */
122
+ onInvalid(callback: any): any;
123
+ }
@@ -0,0 +1,124 @@
1
+ /**
2
+ * @typedef BindingTuple
3
+ * @property {string} name
4
+ * @property {string} type
5
+ */
6
+ /**
7
+ * Service which manages loading of templates from a ViewConfig.
8
+ */
9
+ export class TemplateFactory {
10
+ /** @type {boolean} */
11
+ _useHttp: boolean;
12
+ $get: (
13
+ | string
14
+ | ((
15
+ $http: angular.IHttpService,
16
+ $templateCache: angular.ITemplateCacheService,
17
+ $templateRequest: angular.ITemplateRequestService,
18
+ $q: angular.IQService,
19
+ $injector: angular.auto.IInjectorService,
20
+ ) => this)
21
+ )[];
22
+ $templateRequest: angular.ITemplateRequestService;
23
+ $http: angular.IHttpService;
24
+ $templateCache: angular.ITemplateCacheService;
25
+ $q: angular.IQService;
26
+ $injector: angular.auto.IInjectorService;
27
+ /**
28
+ * Forces the provider to use $http service directly
29
+ * @param {boolean} value
30
+ */
31
+ useHttpService(value: boolean): void;
32
+ /**
33
+ * Creates a template from a configuration object.
34
+ *
35
+ * @param config Configuration object for which to load a template.
36
+ * The following properties are search in the specified order, and the first one
37
+ * that is defined is used to create the template:
38
+ *
39
+ * @param {angular.Ng1ViewDeclaration} config
40
+ * @param {any} params Parameters to pass to the template function.
41
+ * @param {angular.ResolveContext} context The resolve context associated with the template's view
42
+ *
43
+ * @return {string|object} The template html as a string, or a promise for
44
+ * that string,or `null` if no template is configured.
45
+ */
46
+ fromConfig(
47
+ config: angular.Ng1ViewDeclaration,
48
+ params: any,
49
+ context: angular.ResolveContext,
50
+ ): string | object;
51
+ /**
52
+ * Creates a template from a string or a function returning a string.
53
+ *
54
+ * @param {string | Function} template html template as a string or function that returns an html template as a string.
55
+ * @param {angular.RawParams} [params] Parameters to pass to the template function.
56
+ *
57
+ * @return {string|object} The template html as a string, or a promise for that
58
+ * string.
59
+ */
60
+ fromString(
61
+ template: string | Function,
62
+ params?: angular.RawParams,
63
+ ): string | object;
64
+ /**
65
+ * Loads a template from the a URL via `$http` and `$templateCache`.
66
+ *
67
+ * @param {string|Function} url url of the template to load, or a function
68
+ * that returns a url.
69
+ * @param {Object} params Parameters to pass to the url function.
70
+ * @return {string|Promise.<string>} The template html as a string, or a promise
71
+ * for that string.
72
+ */
73
+ fromUrl(url: string | Function, params: any): string | Promise<string>;
74
+ /**
75
+ * Creates a template by invoking an injectable provider function.
76
+ *
77
+ * @param {angular.IInjectable} provider Function to invoke via `locals`
78
+ * @param {Function} injectFn a function used to invoke the template provider
79
+ * @param {angular.ResolveContext} context
80
+ * @return {string|Promise.<string>} The template html as a string, or a promise
81
+ * for that string.
82
+ */
83
+ fromProvider(
84
+ provider: angular.IInjectable,
85
+ params: any,
86
+ context: angular.ResolveContext,
87
+ ): string | Promise<string>;
88
+ /**
89
+ * Creates a component's template by invoking an injectable provider function.
90
+ *
91
+ * @param {angular.IInjectable} provider Function to invoke via `locals`
92
+ * @param {Function} injectFn a function used to invoke the template provider
93
+ * @return {string} The template html as a string: "<component-name input1='::$resolve.foo'></component-name>".
94
+ */
95
+ fromComponentProvider(
96
+ provider: angular.IInjectable,
97
+ params: any,
98
+ context: any,
99
+ ): string;
100
+ /**
101
+ * Creates a template from a component's name
102
+ *
103
+ * This implements route-to-component.
104
+ * It works by retrieving the component (directive) metadata from the injector.
105
+ * It analyses the component's bindings, then constructs a template that instantiates the component.
106
+ * The template wires input and output bindings to resolves or from the parent component.
107
+ *
108
+ * @param {angular.IAugmentedJQuery} ngView {object} The parent ui-view (for binding outputs to callbacks)
109
+ * @param {angular.ResolveContext} context The ResolveContext (for binding outputs to callbacks returned from resolves)
110
+ * @param {string} component {string} Component's name in camel case.
111
+ * @param {any} [bindings] An object defining the component's bindings: {foo: '<'}
112
+ * @return {string} The template as a string: "<component-name input1='::$resolve.foo'></component-name>".
113
+ */
114
+ makeComponentTemplate(
115
+ ngView: angular.IAugmentedJQuery,
116
+ context: angular.ResolveContext,
117
+ component: string,
118
+ bindings?: any,
119
+ ): string;
120
+ }
121
+ export type BindingTuple = {
122
+ name: string;
123
+ type: string;
124
+ };
@@ -0,0 +1,40 @@
1
+ /**
2
+ * This class returns applicable TransitionHooks for a specific Transition instance.
3
+ *
4
+ * Hooks ([[RegisteredHook]]) may be registered globally, e.g., $transitions.onEnter(...), or locally, e.g.
5
+ * myTransition.onEnter(...). The HookBuilder finds matching RegisteredHooks (where the match criteria is
6
+ * determined by the type of hook)
7
+ *
8
+ * The HookBuilder also converts RegisteredHooks objects to TransitionHook objects, which are used to run a Transition.
9
+ *
10
+ * The HookBuilder constructor is given the $transitions service and a Transition instance. Thus, a HookBuilder
11
+ * instance may only be used for one specific Transition object. (side note: the _treeChanges accessor is private
12
+ * in the Transition class, so we must also provide the Transition's _treeChanges)
13
+ */
14
+ export class HookBuilder {
15
+ constructor(transition: any);
16
+ transition: any;
17
+ buildHooksForPhase(phase: any): any;
18
+ /**
19
+ * Returns an array of newly built TransitionHook objects.
20
+ *
21
+ * - Finds all RegisteredHooks registered for the given `hookType` which matched the transition's [[TreeChanges]].
22
+ * - Finds [[PathNode]] (or `PathNode[]`) to use as the TransitionHook context(s)
23
+ * - For each of the [[PathNode]]s, creates a TransitionHook
24
+ *
25
+ * @param hookType the type of the hook registration function, e.g., 'onEnter', 'onFinish'.
26
+ */
27
+ buildHooks(hookType: any): any;
28
+ /**
29
+ * Finds all RegisteredHooks from:
30
+ * - The Transition object instance hook registry
31
+ * - The TransitionService ($transitions) global hook registry
32
+ *
33
+ * which matched:
34
+ * - the eventType
35
+ * - the matchCriteria (to, from, exiting, retained, entering)
36
+ *
37
+ * @returns an array of matched [[RegisteredHook]]s
38
+ */
39
+ getMatchingHooks(hookType: any, treeChanges: any, transition: any): any;
40
+ }
@@ -0,0 +1,102 @@
1
+ /**
2
+ * Determines if the given state matches the matchCriteria
3
+ *
4
+ * @internal
5
+ *
6
+ * @param state a State Object to test against
7
+ * @param criterion
8
+ * - If a string, matchState uses the string as a glob-matcher against the state name
9
+ * - If an array (of strings), matchState uses each string in the array as a glob-matchers against the state name
10
+ * and returns a positive match if any of the globs match.
11
+ * - If a function, matchState calls the function with the state and returns true if the function's result is truthy.
12
+ * @returns {boolean}
13
+ */
14
+ export function matchState(
15
+ state: any,
16
+ criterion: any,
17
+ transition: any,
18
+ ): boolean;
19
+ /** Return a registration function of the requested type. */
20
+ export function makeEvent(
21
+ registry: any,
22
+ transitionService: any,
23
+ eventType: any,
24
+ ): (matchObject: any, callback: any, options?: {}) => any;
25
+ /**
26
+ * The registration data for a registered transition hook
27
+ */
28
+ export class RegisteredHook {
29
+ constructor(
30
+ tranSvc: any,
31
+ eventType: any,
32
+ callback: any,
33
+ matchCriteria: any,
34
+ removeHookFromRegistry: any,
35
+ options?: {},
36
+ );
37
+ tranSvc: any;
38
+ eventType: any;
39
+ callback: any;
40
+ matchCriteria: any;
41
+ removeHookFromRegistry: any;
42
+ invokeCount: number;
43
+ _deregistered: boolean;
44
+ priority: any;
45
+ bind: any;
46
+ invokeLimit: any;
47
+ /**
48
+ * Gets the matching [[PathNode]]s
49
+ *
50
+ * Given an array of [[PathNode]]s, and a [[HookMatchCriterion]], returns an array containing
51
+ * the [[PathNode]]s that the criteria matches, or `null` if there were no matching nodes.
52
+ *
53
+ * Returning `null` is significant to distinguish between the default
54
+ * "match-all criterion value" of `true` compared to a `() => true` function,
55
+ * when the nodes is an empty array.
56
+ *
57
+ * This is useful to allow a transition match criteria of `entering: true`
58
+ * to still match a transition, even when `entering === []`. Contrast that
59
+ * with `entering: (state) => true` which only matches when a state is actually
60
+ * being entered.
61
+ */
62
+ _matchingNodes(nodes: any, criterion: any, transition: any): any;
63
+ /**
64
+ * Gets the default match criteria (all `true`)
65
+ *
66
+ * Returns an object which has all the criteria match paths as keys and `true` as values, i.e.:
67
+ *
68
+ * ```js
69
+ * {
70
+ * to: true,
71
+ * from: true,
72
+ * entering: true,
73
+ * exiting: true,
74
+ * retained: true,
75
+ * }
76
+ */
77
+ _getDefaultMatchCriteria(): any;
78
+ /**
79
+ * Gets matching nodes as [[IMatchingNodes]]
80
+ *
81
+ * Create a IMatchingNodes object from the TransitionHookTypes that is roughly equivalent to:
82
+ *
83
+ * ```js
84
+ * let matches: IMatchingNodes = {
85
+ * to: _matchingNodes([tail(treeChanges.to)], mc.to),
86
+ * from: _matchingNodes([tail(treeChanges.from)], mc.from),
87
+ * exiting: _matchingNodes(treeChanges.exiting, mc.exiting),
88
+ * retained: _matchingNodes(treeChanges.retained, mc.retained),
89
+ * entering: _matchingNodes(treeChanges.entering, mc.entering),
90
+ * };
91
+ * ```
92
+ */
93
+ _getMatchingNodes(treeChanges: any, transition: any): any;
94
+ /**
95
+ * Determines if this hook's [[matchCriteria]] match the given [[TreeChanges]]
96
+ *
97
+ * @returns an IMatchingNodes object, or null. If an IMatchingNodes object is returned, its values
98
+ * are the matching [[PathNode]]s for each [[HookMatchCriterion]] (to, from, exiting, retained, entering)
99
+ */
100
+ matches(treeChanges: any, transition: any): any;
101
+ deregister(): void;
102
+ }
@@ -0,0 +1,11 @@
1
+ export namespace TransitionHookPhase {
2
+ let CREATE: number;
3
+ let BEFORE: number;
4
+ let RUN: number;
5
+ let SUCCESS: number;
6
+ let ERROR: number;
7
+ }
8
+ export namespace TransitionHookScope {
9
+ let TRANSITION: number;
10
+ let STATE: number;
11
+ }
@@ -0,0 +1,42 @@
1
+ /**
2
+ * An object for Transition Rejection reasons.
3
+ */
4
+ export type RejectType = number;
5
+ export namespace RejectType {
6
+ let SUPERSEDED: number;
7
+ let ABORTED: number;
8
+ let INVALID: number;
9
+ let IGNORED: number;
10
+ let ERROR: number;
11
+ }
12
+ export class Rejection {
13
+ /** Returns a Rejection due to transition superseded */
14
+ static superseded(detail: any, options: any): Rejection;
15
+ /** Returns a Rejection due to redirected transition */
16
+ static redirected(detail: any): Rejection;
17
+ /** Returns a Rejection due to invalid transition */
18
+ static invalid(detail: any): Rejection;
19
+ /** Returns a Rejection due to ignored transition */
20
+ static ignored(detail: any): Rejection;
21
+ /** Returns a Rejection due to aborted transition */
22
+ static aborted(detail: any): Rejection;
23
+ /** Returns a Rejection due to aborted transition */
24
+ static errored(detail: any): Rejection;
25
+ /**
26
+ * Returns a Rejection
27
+ *
28
+ * Normalizes a value as a Rejection.
29
+ * If the value is already a Rejection, returns it.
30
+ * Otherwise, wraps and returns the value as a Rejection (Rejection type: ERROR).
31
+ *
32
+ * @returns `detail` if it is already a `Rejection`, else returns an ERROR Rejection.
33
+ */
34
+ static normalize(detail: any): any;
35
+ constructor(type: any, message: any, detail: any);
36
+ $id: number;
37
+ type: any;
38
+ message: any;
39
+ detail: any;
40
+ toString(): string;
41
+ toPromise(): any;
42
+ }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * This class defines a type of hook, such as `onBefore` or `onEnter`.
3
+ * Plugins can define custom hook types, such as sticky states does for `onInactive`.
4
+ */
5
+ export class TransitionEventType {
6
+ constructor(
7
+ name: any,
8
+ hookPhase: any,
9
+ hookOrder: any,
10
+ criteriaMatchPath: any,
11
+ reverseSort?: boolean,
12
+ getResultHandler?: (hook: any) => (result: any) => any,
13
+ getErrorHandler?: () => (error: any) => any,
14
+ synchronous?: boolean,
15
+ );
16
+ name: any;
17
+ hookPhase: any;
18
+ hookOrder: any;
19
+ criteriaMatchPath: any;
20
+ reverseSort: boolean;
21
+ getResultHandler: (hook: any) => (result: any) => any;
22
+ getErrorHandler: () => (error: any) => any;
23
+ synchronous: boolean;
24
+ }
@@ -0,0 +1,86 @@
1
+ export class TransitionHook {
2
+ /**
3
+ * Chains together an array of TransitionHooks.
4
+ *
5
+ * Given a list of [[TransitionHook]] objects, chains them together.
6
+ * Each hook is invoked after the previous one completes.
7
+ *
8
+ * #### Example:
9
+ * ```js
10
+ * var hooks: TransitionHook[] = getHooks();
11
+ * let promise: Promise<any> = TransitionHook.chain(hooks);
12
+ *
13
+ * promise.then(handleSuccess, handleError);
14
+ * ```
15
+ *
16
+ * @param hooks the list of hooks to chain together
17
+ * @param waitFor if provided, the chain is `.then()`'ed off this promise
18
+ * @returns a `Promise` for sequentially invoking the hooks (in order)
19
+ */
20
+ static chain(hooks: any, waitFor: any): any;
21
+ /**
22
+ * Invokes all the provided TransitionHooks, in order.
23
+ * Each hook's return value is checked.
24
+ * If any hook returns a promise, then the rest of the hooks are chained off that promise, and the promise is returned.
25
+ * If no hook returns a promise, then all hooks are processed synchronously.
26
+ *
27
+ * @param hooks the list of TransitionHooks to invoke
28
+ * @param doneCallback a callback that is invoked after all the hooks have successfully completed
29
+ *
30
+ * @returns a promise for the async result, or the result of the callback
31
+ */
32
+ static invokeHooks(hooks: any, doneCallback: any): any;
33
+ /**
34
+ * Run all TransitionHooks, ignoring their return value.
35
+ */
36
+ static runAllHooks(hooks: any): void;
37
+ constructor(
38
+ transition: any,
39
+ stateContext: any,
40
+ registeredHook: any,
41
+ options: any,
42
+ );
43
+ transition: any;
44
+ stateContext: any;
45
+ registeredHook: any;
46
+ options: any;
47
+ isSuperseded: () => boolean;
48
+ type: any;
49
+ logError(err: any): void;
50
+ invokeHook(): any;
51
+ /**
52
+ * This method handles the return value of a Transition Hook.
53
+ *
54
+ * A hook can return false (cancel), a TargetState (redirect),
55
+ * or a promise (which may later resolve to false or a redirect)
56
+ *
57
+ * This also handles "transition superseded" -- when a new transition
58
+ * was started while the hook was still running
59
+ */
60
+ handleHookResult(result: any): any;
61
+ /**
62
+ * Return a Rejection promise if the transition is no longer current due
63
+ * a new transition has started and superseded this one.
64
+ */
65
+ getNotCurrentRejection(): any;
66
+ toString(): string;
67
+ }
68
+ export namespace TransitionHook {
69
+ /**
70
+ * These GetResultHandler(s) are used by [[invokeHook]] below
71
+ * Each HookType chooses a GetResultHandler (See: [[TransitionService._defineCoreEvents]])
72
+ */
73
+ function HANDLE_RESULT(hook: any): (result: any) => any;
74
+ /**
75
+ * If the result is a promise rejection, log it.
76
+ * Otherwise, ignore the result.
77
+ */
78
+ function LOG_REJECTED_RESULT(hook: any): (result: any) => any;
79
+ /**
80
+ * These GetErrorHandler(s) are used by [[invokeHook]] below
81
+ * Each HookType chooses a GetErrorHandler (See: [[TransitionService._defineCoreEvents]])
82
+ */
83
+ function LOG_ERROR(hook: any): (error: any) => any;
84
+ function REJECT_ERROR(): (error: any) => any;
85
+ function THROW_ERROR(): (error: any) => never;
86
+ }
@@ -0,0 +1,115 @@
1
+ export namespace defaultTransOpts {
2
+ let location: boolean;
3
+ let relative: any;
4
+ let inherit: boolean;
5
+ let notify: boolean;
6
+ let reload: boolean;
7
+ let supercede: boolean;
8
+ let custom: {};
9
+ function current(): any;
10
+ let source: string;
11
+ }
12
+ /**
13
+ * This class provides services related to Transitions.
14
+ *
15
+ * - Most importantly, it allows global Transition Hooks to be registered.
16
+ * - It allows the default transition error handler to be set.
17
+ * - It also has a factory function for creating new [[Transition]] objects, (used internally by the [[StateService]]).
18
+ *
19
+ * At bootstrap, [[UIRouter]] creates a single instance (singleton) of this class.
20
+ *
21
+ * This API is located at `router.transitionService` ([[UIRouter.transitionService]])
22
+ */
23
+ export class TransitionService {
24
+ static $inject: string[];
25
+ /**
26
+ * @param {import('../globals').UIRouterGlobals} globals
27
+ */
28
+ constructor(globals: import("../globals").UIRouterGlobals, viewService: any);
29
+ _transitionCount: number;
30
+ /** The transition hook types, such as `onEnter`, `onStart`, etc */
31
+ _eventTypes: any[];
32
+ /** @internal The registered transition hooks */
33
+ _registeredHooks: {};
34
+ /** The paths on a criteria object */
35
+ _criteriaPaths: {};
36
+ globals: import("../globals").UIRouterGlobals;
37
+ $view: any;
38
+ _deregisterHookFns: {};
39
+ _pluginapi: any;
40
+ $get: (
41
+ | string
42
+ | ((
43
+ stateService: any,
44
+ urlService: any,
45
+ stateRegistry: any,
46
+ viewService: any,
47
+ ) => this)
48
+ )[];
49
+ /**
50
+ * Registers a [[TransitionHookFn]], called *while a transition is being constructed*.
51
+ *
52
+ * Registers a transition lifecycle hook, which is invoked during transition construction.
53
+ *
54
+ * This low level hook should only be used by plugins.
55
+ * This can be a useful time for plugins to add resolves or mutate the transition as needed.
56
+ * The Sticky States plugin uses this hook to modify the treechanges.
57
+ *
58
+ * ### Lifecycle
59
+ *
60
+ * `onCreate` hooks are invoked *while a transition is being constructed*.
61
+ *
62
+ * ### Return value
63
+ *
64
+ * The hook's return value is ignored
65
+ *
66
+ * @internal
67
+ * @param criteria defines which Transitions the Hook should be invoked for.
68
+ * @param callback the hook function which will be invoked.
69
+ * @param options the registration options
70
+ * @returns a function which deregisters the hook.
71
+ */
72
+ /**
73
+ * Creates a new [[Transition]] object
74
+ *
75
+ * This is a factory function for creating new Transition objects.
76
+ * It is used internally by the [[StateService]] and should generally not be called by application code.
77
+ *
78
+ * @internal
79
+ * @param fromPath the path to the current state (the from state)
80
+ * @param targetState the target state (destination)
81
+ * @returns a Transition
82
+ */
83
+ create(fromPath: any, targetState: any): Transition;
84
+ _defineCoreEvents(): void;
85
+ _defineCorePaths(): void;
86
+ _defineEvent(
87
+ name: any,
88
+ hookPhase: any,
89
+ hookOrder: any,
90
+ criteriaMatchPath: any,
91
+ reverseSort?: boolean,
92
+ getResultHandler?: (hook: any) => (result: any) => any,
93
+ getErrorHandler?: () => (error: any) => any,
94
+ synchronous?: boolean,
95
+ ): void;
96
+ _getEvents(phase: any): any[];
97
+ /**
98
+ * Adds a Path to be used as a criterion against a TreeChanges path
99
+ *
100
+ * For example: the `exiting` path in [[HookMatchCriteria]] is a STATE scoped path.
101
+ * It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)`
102
+ * Each state in the exiting path is checked against the criteria and returned as part of the match.
103
+ *
104
+ * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path.
105
+ * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)`
106
+ * Only the tail of the `to` path is checked against the criteria and returned as part of the match.
107
+ *
108
+ * @internal
109
+ */
110
+ _definePathType(name: any, hookScope: any): void;
111
+ _getPathTypes(): {};
112
+ getHooks(hookName: any): any;
113
+ _registerCoreTransitionHooks(): void;
114
+ }
115
+ import { Transition } from "./transition";