@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,60 @@
1
+ /**
2
+ * Matches state names using glob-like pattern strings.
3
+ *
4
+ * Globs can be used in specific APIs including:
5
+ *
6
+ * - [[StateService.is]]
7
+ * - [[StateService.includes]]
8
+ * - The first argument to Hook Registration functions like [[TransitionService.onStart]]
9
+ * - [[HookMatchCriteria]] and [[HookMatchCriterion]]
10
+ *
11
+ * A `Glob` string is a pattern which matches state names.
12
+ * Nested state names are split into segments (separated by a dot) when processing.
13
+ * The state named `foo.bar.baz` is split into three segments ['foo', 'bar', 'baz']
14
+ *
15
+ * Globs work according to the following rules:
16
+ *
17
+ * ### Exact match:
18
+ *
19
+ * The glob `'A.B'` matches the state named exactly `'A.B'`.
20
+ *
21
+ * | Glob |Matches states named|Does not match state named|
22
+ * |:------------|:--------------------|:---------------------|
23
+ * | `'A'` | `'A'` | `'B'` , `'A.C'` |
24
+ * | `'A.B'` | `'A.B'` | `'A'` , `'A.B.C'` |
25
+ * | `'foo'` | `'foo'` | `'FOO'` , `'foo.bar'`|
26
+ *
27
+ * ### Single star (`*`)
28
+ *
29
+ * A single star (`*`) is a wildcard that matches exactly one segment.
30
+ *
31
+ * | Glob |Matches states named |Does not match state named |
32
+ * |:------------|:---------------------|:--------------------------|
33
+ * | `'*'` | `'A'` , `'Z'` | `'A.B'` , `'Z.Y.X'` |
34
+ * | `'A.*'` | `'A.B'` , `'A.C'` | `'A'` , `'A.B.C'` |
35
+ * | `'A.*.*'` | `'A.B.C'` , `'A.X.Y'`| `'A'`, `'A.B'` , `'Z.Y.X'`|
36
+ *
37
+ * ### Double star (`**`)
38
+ *
39
+ * A double star (`'**'`) is a wildcard that matches *zero or more segments*
40
+ *
41
+ * | Glob |Matches states named |Does not match state named |
42
+ * |:------------|:----------------------------------------------|:----------------------------------|
43
+ * | `'**'` | `'A'` , `'A.B'`, `'Z.Y.X'` | (matches all states) |
44
+ * | `'A.**'` | `'A'` , `'A.B'` , `'A.C.X'` | `'Z.Y.X'` |
45
+ * | `'**.X'` | `'X'` , `'A.X'` , `'Z.Y.X'` | `'A'` , `'A.login.Z'` |
46
+ * | `'A.**.X'` | `'A.X'` , `'A.B.X'` , `'A.B.C.X'` | `'A'` , `'A.B.C'` |
47
+ *
48
+ * @packageDocumentation
49
+ */
50
+ export class Glob {
51
+ /** Returns true if the string has glob-like characters in it */
52
+ static is(text: any): boolean;
53
+ /** Returns a glob from the string, or null if the string isn't Glob-like */
54
+ static fromString(text: any): Glob;
55
+ constructor(text: any);
56
+ text: any;
57
+ glob: any;
58
+ regexp: RegExp;
59
+ matches(name: any): boolean;
60
+ }
@@ -0,0 +1,15 @@
1
+ export class Queue {
2
+ constructor(_items?: any[], _limit?: any);
3
+ _items: any[];
4
+ _limit: any;
5
+ _evictListeners: any[];
6
+ onEvict: any;
7
+ enqueue(item: any): any;
8
+ evict(): any;
9
+ dequeue(): any;
10
+ clear(): any[];
11
+ size(): number;
12
+ remove(item: any): any;
13
+ peekTail(): any;
14
+ peekHead(): any;
15
+ }
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Prints ng-router Transition trace information to the console.
3
+ */
4
+ export class Trace {
5
+ _enabled: {};
6
+ approximateDigests: number;
7
+ _set(enabled: any, categories: any): void;
8
+ enable(...categories: any[]): void;
9
+ disable(...categories: any[]): void;
10
+ /**
11
+ * Retrieves the enabled stateus of a [[Category]]
12
+ *
13
+ * ```js
14
+ * trace.enabled("VIEWCONFIG"); // true or false
15
+ * ```
16
+ *
17
+ * @returns boolean true if the category is enabled
18
+ */
19
+ enabled(category: any): boolean;
20
+ /** @internal called by ui-router code */
21
+ traceTransitionStart(trans: any): void;
22
+ /** @internal called by ui-router code */
23
+ traceTransitionIgnored(trans: any): void;
24
+ /** @internal called by ui-router code */
25
+ traceHookInvocation(step: any, trans: any, options: any): void;
26
+ /** @internal called by ui-router code */
27
+ traceHookResult(hookResult: any, trans: any): void;
28
+ /** @internal called by ui-router code */
29
+ traceResolvePath(path: any, when: any, trans: any): void;
30
+ /** @internal called by ui-router code */
31
+ traceResolvableResolved(resolvable: any, trans: any): void;
32
+ /** @internal called by ui-router code */
33
+ traceError(reason: any, trans: any): void;
34
+ /** @internal called by ui-router code */
35
+ traceSuccess(finalState: any, trans: any): void;
36
+ /** @internal called by ui-router code */
37
+ traceUIViewEvent(event: any, viewData: any, extra?: string): void;
38
+ /** @internal called by ui-router code */
39
+ traceUIViewConfigUpdated(viewData: any, context: any): void;
40
+ /** @internal called by ui-router code */
41
+ traceUIViewFill(viewData: any, html: any): void;
42
+ /** @internal called by ui-router code */
43
+ traceViewSync(pairs: any): void;
44
+ /** @internal called by ui-router code */
45
+ traceViewServiceEvent(event: any, viewConfig: any): void;
46
+ /** @internal called by ui-router code */
47
+ traceViewServiceUIViewEvent(event: any, viewData: any): void;
48
+ }
49
+ /**
50
+ * The [[Trace]] singleton
51
+ *
52
+ * #### Example:
53
+ * ```js
54
+ * import {trace} from "@uirouter/core/index";
55
+ * trace.enable(1, 5);
56
+ * ```
57
+ */
58
+ export const trace: Trace;
59
+ /**
60
+ * Trace categories Enum
61
+ *
62
+ * Enable or disable a category using [[Trace.enable]] or [[Trace.disable]]
63
+ *
64
+ * `trace.enable(Category.TRANSITION)`
65
+ *
66
+ * These can also be provided using a matching string, or position ordinal
67
+ *
68
+ * `trace.enable("TRANSITION")`
69
+ *
70
+ * `trace.enable(1)`
71
+ */
72
+ export var Category: any;
@@ -0,0 +1,160 @@
1
+ export function $ViewDirectiveFill(
2
+ $compile: any,
3
+ $controller: any,
4
+ $transitions: any,
5
+ $view: any,
6
+ $q: any,
7
+ ): {
8
+ restrict: string;
9
+ priority: number;
10
+ compile: (tElement: any) => (scope: any, $element: any) => void;
11
+ };
12
+ export namespace $ViewDirectiveFill {
13
+ let $inject: string[];
14
+ }
15
+ /**
16
+ * `ui-view`: A viewport directive which is filled in by a view from the active state.
17
+ *
18
+ * ### Attributes
19
+ *
20
+ * - `name`: (Optional) A view name.
21
+ * The name should be unique amongst the other views in the same state.
22
+ * You can have views of the same name that live in different states.
23
+ * The ui-view can be targeted in a View using the name ([[Ng1StateDeclaration.views]]).
24
+ *
25
+ * - `autoscroll`: an expression. When it evaluates to true, the `ui-view` will be scrolled into view when it is activated.
26
+ * Uses [[$ngViewScroll]] to do the scrolling.
27
+ *
28
+ * - `onload`: Expression to evaluate whenever the view updates.
29
+ *
30
+ * #### Example:
31
+ * A view can be unnamed or named.
32
+ * ```html
33
+ * <!-- Unnamed -->
34
+ * <div ui-view></div>
35
+ *
36
+ * <!-- Named -->
37
+ * <div ui-view="viewName"></div>
38
+ *
39
+ * <!-- Named (different style) -->
40
+ * <ui-view name="viewName"></ui-view>
41
+ * ```
42
+ *
43
+ * You can only have one unnamed view within any template (or root html). If you are only using a
44
+ * single view and it is unnamed then you can populate it like so:
45
+ *
46
+ * ```html
47
+ * <div ui-view></div>
48
+ * $stateProvider.state("home", {
49
+ * template: "<h1>HELLO!</h1>"
50
+ * })
51
+ * ```
52
+ *
53
+ * The above is a convenient shortcut equivalent to specifying your view explicitly with the
54
+ * [[Ng1StateDeclaration.views]] config property, by name, in this case an empty name:
55
+ *
56
+ * ```js
57
+ * $stateProvider.state("home", {
58
+ * views: {
59
+ * "": {
60
+ * template: "<h1>HELLO!</h1>"
61
+ * }
62
+ * }
63
+ * })
64
+ * ```
65
+ *
66
+ * But typically you'll only use the views property if you name your view or have more than one view
67
+ * in the same template. There's not really a compelling reason to name a view if its the only one,
68
+ * but you could if you wanted, like so:
69
+ *
70
+ * ```html
71
+ * <div ui-view="main"></div>
72
+ * ```
73
+ *
74
+ * ```js
75
+ * $stateProvider.state("home", {
76
+ * views: {
77
+ * "main": {
78
+ * template: "<h1>HELLO!</h1>"
79
+ * }
80
+ * }
81
+ * })
82
+ * ```
83
+ *
84
+ * Really though, you'll use views to set up multiple views:
85
+ *
86
+ * ```html
87
+ * <div ui-view></div>
88
+ * <div ui-view="chart"></div>
89
+ * <div ui-view="data"></div>
90
+ * ```
91
+ *
92
+ * ```js
93
+ * $stateProvider.state("home", {
94
+ * views: {
95
+ * "": {
96
+ * template: "<h1>HELLO!</h1>"
97
+ * },
98
+ * "chart": {
99
+ * template: "<chart_thing/>"
100
+ * },
101
+ * "data": {
102
+ * template: "<data_thing/>"
103
+ * }
104
+ * }
105
+ * })
106
+ * ```
107
+ *
108
+ * #### Examples for `autoscroll`:
109
+ * ```html
110
+ * <!-- If autoscroll present with no expression,
111
+ * then scroll ui-view into view -->
112
+ * <ui-view autoscroll/>
113
+ *
114
+ * <!-- If autoscroll present with valid expression,
115
+ * then scroll ui-view into view if expression evaluates to true -->
116
+ * <ui-view autoscroll='true'/>
117
+ * <ui-view autoscroll='false'/>
118
+ * <ui-view autoscroll='scopeVariable'/>
119
+ * ```
120
+ *
121
+ * Resolve data:
122
+ *
123
+ * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this
124
+ * can be customized using [[Ng1ViewDeclaration.resolveAs]]). This can be then accessed from the template.
125
+ *
126
+ * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the
127
+ * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which
128
+ * depends on `$resolve` data.
129
+ *
130
+ * #### Example:
131
+ * ```js
132
+ * $stateProvider.state('home', {
133
+ * template: '<my-component user="$resolve.user"></my-component>',
134
+ * resolve: {
135
+ * user: function(UserService) { return UserService.fetchUser(); }
136
+ * }
137
+ * });
138
+ * ```
139
+ */
140
+ export let ngView: (
141
+ | string
142
+ | ((
143
+ $view: any,
144
+ $animate: any,
145
+ $ngViewScroll: any,
146
+ $interpolate: any,
147
+ $q: any,
148
+ ) => {
149
+ count: number;
150
+ restrict: string;
151
+ terminal: boolean;
152
+ priority: number;
153
+ transclude: string;
154
+ compile: (
155
+ tElement: any,
156
+ tAttrs: any,
157
+ $transclude: any,
158
+ ) => (scope: any, $element: any, attrs: any) => void;
159
+ })
160
+ )[];
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Global router state
3
+ *
4
+ * This is where we hold the global mutable state such as current state, current
5
+ * params, current transition, etc.
6
+ */
7
+ export class UIRouterGlobals {
8
+ /**
9
+ * Current parameter values
10
+ *
11
+ * The parameter values from the latest successful transition
12
+ * @type {StateParams}
13
+ */
14
+ params: StateParams;
15
+ /**
16
+ * @type {Number}
17
+ */
18
+ lastStartedTransitionId: number;
19
+ /**
20
+ * @type {Queue}
21
+ */
22
+ transitionHistory: Queue;
23
+ /**
24
+ * @type {Queue}
25
+ */
26
+ successfulTransitions: Queue;
27
+ $get: (() => this)[];
28
+ }
29
+ import { StateParams } from "./params/state-params";
30
+ import { Queue } from "./common/queue";
@@ -0,0 +1,2 @@
1
+ export function registerAddCoreResolvables(transitionService: any): void;
2
+ export function treeChangesCleanup(trans: any): void;
@@ -0,0 +1 @@
1
+ export function registerIgnoredTransitionHook(transitionService: any): any;
@@ -0,0 +1 @@
1
+ export function registerInvalidTransitionHook(transitionService: any): any;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * A [[TransitionHookFn]] that performs lazy loading
3
+ *
4
+ * When entering a state "abc" which has a `lazyLoad` function defined:
5
+ * - Invoke the `lazyLoad` function (unless it is already in process)
6
+ * - Flag the hook function as "in process"
7
+ * - The function should return a promise (that resolves when lazy loading is complete)
8
+ * - Wait for the promise to settle
9
+ * - If the promise resolves to a [[LazyLoadResult]], then register those states
10
+ * - Flag the hook function as "not in process"
11
+ * - If the hook was successful
12
+ * - Remove the `lazyLoad` function from the state declaration
13
+ * - If all the hooks were successful
14
+ * - Retry the transition (by returning a TargetState)
15
+ *
16
+ * ```
17
+ * .state('abc', {
18
+ * component: 'fooComponent',
19
+ * lazyLoad: () => import('./fooComponent')
20
+ * });
21
+ * ```
22
+ *
23
+ * See [[StateDeclaration.lazyLoad]]
24
+ */
25
+ export function registerLazyLoadHook(
26
+ transitionService: any,
27
+ stateService: any,
28
+ urlService: any,
29
+ stateRegistry: any,
30
+ ): any;
31
+ /**
32
+ * Invokes a state's lazy load function
33
+ *
34
+ * @param transition a Transition context
35
+ * @param state the state to lazy load
36
+ * @returns A promise for the lazy load result
37
+ */
38
+ export function lazyLoadState(
39
+ transition: any,
40
+ state: any,
41
+ stateRegistry: any,
42
+ ): any;
@@ -0,0 +1,3 @@
1
+ export function registerOnExitHook(transitionService: any): any;
2
+ export function registerOnRetainHook(transitionService: any): any;
3
+ export function registerOnEnterHook(transitionService: any): any;
@@ -0,0 +1,4 @@
1
+ export function registerRedirectToHook(
2
+ transitionService: any,
3
+ stateService: any,
4
+ ): void;
@@ -0,0 +1,4 @@
1
+ export const RESOLVE_HOOK_PRIORITY: 1000;
2
+ export function registerEagerResolvePath(transitionService: any): any;
3
+ export function registerLazyResolveState(transitionService: any): any;
4
+ export function registerResolveRemaining(transitionService: any): any;
@@ -0,0 +1 @@
1
+ export function registerUpdateGlobalState(transitionService: any): any;
@@ -0,0 +1,5 @@
1
+ export function registerUpdateUrl(
2
+ transitionService: any,
3
+ stateService: any,
4
+ urlService: any,
5
+ ): void;
@@ -0,0 +1,5 @@
1
+ export function registerLoadEnteringViews(transitionService: any): any;
2
+ export function registerActivateViews(
3
+ transitionService: any,
4
+ viewService: any,
5
+ ): void;
@@ -1,17 +1 @@
1
- /**
2
- * Main entry point for angular 1.x build
3
- */ /** */
4
- export * from "./interface";
5
- export * from "./services";
6
- export * from "./statebuilders/views";
7
- export * from "./stateProvider";
8
- import "./injectables";
9
- import "./directives/stateDirectives";
10
- import "./stateFilters";
11
- import "./directives/viewDirective";
12
- import "./viewScroll";
13
- declare const _default: "router";
14
- export default _default;
15
- import * as core from "./core/index";
16
- export { core };
17
- export * from "./core/index";
1
+ export function initRouter(): void;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ export class ParamFactory {
2
+ constructor(urlServiceConfig: any);
3
+ urlServiceConfig: any;
4
+ fromConfig(id: any, type: any, state: any): Param;
5
+ fromPath(id: any, type: any, state: any): Param;
6
+ fromSearch(id: any, type: any, state: any): Param;
7
+ }
8
+ import { Param } from "../params/param";
@@ -0,0 +1,65 @@
1
+ /**
2
+ * An internal class which implements [[ParamTypeDefinition]].
3
+ *
4
+ * A [[ParamTypeDefinition]] is a plain javascript object used to register custom parameter types.
5
+ * When a param type definition is registered, an instance of this class is created internally.
6
+ *
7
+ * This class has naive implementations for all the [[ParamTypeDefinition]] methods.
8
+ *
9
+ * Used by [[UrlMatcher]] when matching or formatting URLs, or comparing and validating parameter values.
10
+ *
11
+ * #### Example:
12
+ * ```js
13
+ * var paramTypeDef = {
14
+ * decode: function(val) { return parseInt(val, 10); },
15
+ * encode: function(val) { return val && val.toString(); },
16
+ * equals: function(a, b) { return this.is(a) && a === b; },
17
+ * is: function(val) { return angular.isNumber(val) && isFinite(val) && val % 1 === 0; },
18
+ * pattern: /\d+/
19
+ * }
20
+ *
21
+ * var paramType = new ParamType(paramTypeDef);
22
+ * ```
23
+ */
24
+ export class ParamType {
25
+ /**
26
+ * @param def A configuration object which contains the custom type definition. The object's
27
+ * properties will override the default methods and/or pattern in `ParamType`'s public interface.
28
+ * @returns a new ParamType object
29
+ */
30
+ constructor(def: any);
31
+ /** @inheritdoc */
32
+ pattern: RegExp;
33
+ /** @inheritdoc */
34
+ inherit: boolean;
35
+ /** @inheritdoc */
36
+ is(val: any, key: any): boolean;
37
+ /** @inheritdoc */
38
+ encode(val: any, key: any): any;
39
+ /** @inheritdoc */
40
+ decode(val: any, key: any): any;
41
+ /** @inheritdoc */
42
+ equals(a: any, b: any): boolean;
43
+ $subPattern(): string;
44
+ toString(): string;
45
+ /** Given an encoded string, or a decoded object, returns a decoded object */
46
+ $normalize(val: any): any;
47
+ /**
48
+ * Wraps an existing custom ParamType as an array of ParamType, depending on 'mode'.
49
+ * e.g.:
50
+ * - urlmatcher pattern "/path?{queryParam[]:int}"
51
+ * - url: "/path?queryParam=1&queryParam=2
52
+ * - $stateParams.queryParam will be [1, 2]
53
+ * if `mode` is "auto", then
54
+ * - url: "/path?queryParam=1 will create $stateParams.queryParam: 1
55
+ * - url: "/path?queryParam=1&queryParam=2 will create $stateParams.queryParam: [1, 2]
56
+ */
57
+ $asArray(mode: any, isSearch: any): ArrayType;
58
+ }
59
+ /** Wraps up a `ParamType` object to handle array values. */
60
+ declare function ArrayType(type: any, mode: any): void;
61
+ declare class ArrayType {
62
+ /** Wraps up a `ParamType` object to handle array values. */
63
+ constructor(type: any, mode: any);
64
+ }
65
+ export {};
@@ -0,0 +1,36 @@
1
+ /**
2
+ * A registry for parameter types.
3
+ *
4
+ * This registry manages the built-in (and custom) parameter types.
5
+ *
6
+ * The built-in parameter types are:
7
+ *
8
+ * - [[string]]
9
+ * - [[path]]
10
+ * - [[query]]
11
+ * - [[hash]]
12
+ * - [[int]]
13
+ * - [[bool]]
14
+ * - [[date]]
15
+ * - [[json]]
16
+ * - [[any]]
17
+ *
18
+ * To register custom parameter types, use [[UrlConfig.type]], i.e.,
19
+ *
20
+ * ```js
21
+ * router.urlService.config.type(customType)
22
+ * ```
23
+ */
24
+ export class ParamTypes {
25
+ enqueue: boolean;
26
+ typeQueue: any[];
27
+ defaultTypes: {};
28
+ types: any;
29
+ /**
30
+ * Registers a parameter type
31
+ *
32
+ * End users should call [[UrlMatcherFactory.type]], which delegates to this method.
33
+ */
34
+ type(name: any, definition: any, definitionFn: any): any;
35
+ _flushTypeQueue(): void;
36
+ }
@@ -0,0 +1,41 @@
1
+ export class Param {
2
+ static values(params: any, values?: {}): {};
3
+ /**
4
+ * Finds [[Param]] objects which have different param values
5
+ *
6
+ * Filters a list of [[Param]] objects to only those whose parameter values differ in two param value objects
7
+ *
8
+ * @param params: The list of Param objects to filter
9
+ * @param values1: The first set of parameter values
10
+ * @param values2: the second set of parameter values
11
+ *
12
+ * @returns any Param objects whose values were different between values1 and values2
13
+ */
14
+ static changed(params: any, values1?: {}, values2?: {}): any;
15
+ /**
16
+ * Checks if two param value objects are equal (for a set of [[Param]] objects)
17
+ *
18
+ * @param params The list of [[Param]] objects to check
19
+ * @param values1 The first set of param values
20
+ * @param values2 The second set of param values
21
+ *
22
+ * @returns true if the param values in values1 and values2 are equal
23
+ */
24
+ static equals(params: any, values1?: {}, values2?: {}): boolean;
25
+ /** Returns true if a the parameter values are valid, according to the Param definitions */
26
+ static validates(params: any, values?: {}): any;
27
+ constructor(id: any, type: any, location: any, urlConfig: any, state: any);
28
+ isDefaultValue(value: any): any;
29
+ /**
30
+ * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the
31
+ * default value, which may be the result of an injectable function.
32
+ */
33
+ value(value: any): any;
34
+ _defaultValueCache: {
35
+ defaultValue: any;
36
+ };
37
+ isSearch(): boolean;
38
+ validates(value: any): boolean;
39
+ toString(): string;
40
+ }
41
+ export var DefType: any;
@@ -0,0 +1,12 @@
1
+ export class StateParams {
2
+ constructor(params?: {});
3
+ /**
4
+ * Merges a set of parameters with all parameters inherited between the common parents of the
5
+ * current state and a given destination state.
6
+ *
7
+ * @param {Object} newParams The set of parameters which will be composited with inherited params.
8
+ * @param {Object} $current Internal definition of object representing the current state.
9
+ * @param {Object} $to Internal definition of object representing state to transition to.
10
+ */
11
+ $inherit(newParams: any, $current: any, $to: any): any;
12
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * A node in a [[TreeChanges]] path
3
+ *
4
+ * For a [[TreeChanges]] path, this class holds the stateful information for a single node in the path.
5
+ * Each PathNode corresponds to a state being entered, exited, or retained.
6
+ * The stateful information includes parameter values and resolve data.
7
+ */
8
+ export class PathNode {
9
+ constructor(stateOrNode: any);
10
+ state: any;
11
+ paramSchema: any;
12
+ paramValues: any;
13
+ resolvables: any;
14
+ views: any;
15
+ clone(): PathNode;
16
+ /** Sets [[paramValues]] for the node, from the values of an object hash */
17
+ applyRawParams(params: any): this;
18
+ /** Gets a specific [[Param]] metadata that belongs to the node */
19
+ parameter(name: any): undefined;
20
+ /**
21
+ * @returns true if the state and parameter values for another PathNode are
22
+ * equal to the state and param values for this PathNode
23
+ */
24
+ equals(node: any, paramsFn: any): boolean;
25
+ /**
26
+ * Finds Params with different parameter values on another PathNode.
27
+ *
28
+ * Given another node (of the same state), finds the parameter values which differ.
29
+ * Returns the [[Param]] (schema objects) whose parameter values differ.
30
+ *
31
+ * Given another node for a different state, returns `false`
32
+ *
33
+ * @param node The node to compare to
34
+ * @param paramsFn A function that returns which parameters should be compared.
35
+ * @returns The [[Param]]s which differ, or null if the two nodes are for different states
36
+ */
37
+ diff(node: any, paramsFn: any): any;
38
+ }
39
+ export namespace PathNode {
40
+ /**
41
+ * Returns a clone of the PathNode
42
+ * @deprecated use instance method `node.clone()`
43
+ */
44
+ function clone(node: any): any;
45
+ }