@angular-wave/angular.ts 0.0.38 → 0.0.40

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 (263) hide show
  1. package/Makefile +8 -5
  2. package/README.md +1 -1
  3. package/dist/angular-ts.esm.js +2 -1
  4. package/dist/angular-ts.umd.js +2 -1
  5. package/package.json +2 -4
  6. package/rollup.config.js +11 -2
  7. package/src/angular.spec.js +25 -26
  8. package/src/animations/animate-css-driver.js +3 -3
  9. package/src/animations/animate-queue.js +7 -7
  10. package/src/animations/animation.js +2 -2
  11. package/src/animations/shared.js +6 -6
  12. package/src/binding.spec.js +7 -7
  13. package/src/core/animate/animate.js +5 -5
  14. package/src/core/animate/animate.spec.js +31 -31
  15. package/src/core/cache/cache-factory.html +18 -0
  16. package/src/core/cache/{cache-factor.test.js → cache-factory.test.js} +1 -1
  17. package/src/core/compile/compile.js +31 -25
  18. package/src/core/compile/compile.md +2 -2
  19. package/src/core/cookie-reader.spec.js +2 -2
  20. package/src/core/core.html +22 -0
  21. package/src/core/core.test.js +12 -0
  22. package/src/core/document.spec.js +4 -4
  23. package/src/core/exception-handler.js +30 -23
  24. package/src/core/interpolate/interpolate.js +7 -0
  25. package/src/core/{cache/cache-factor.html → location/location.html} +1 -1
  26. package/src/core/location/location.js +2 -2
  27. package/src/core/location/location.spec.js +17 -17
  28. package/src/core/location/location.test.js +12 -0
  29. package/src/core/on.spec.js +3 -3
  30. package/src/core/parser/parse.html +18 -0
  31. package/src/core/parser/parse.spec.js +1 -1
  32. package/src/core/parser/parse.test.js +12 -0
  33. package/src/core/prop.spec.js +3 -4
  34. package/src/core/pubsub/pubsub.html +18 -0
  35. package/src/core/pubsub/pubsub.spec.js +1 -1
  36. package/src/core/pubsub/pubsub.test.js +12 -0
  37. package/src/core/q/q.html +18 -0
  38. package/src/core/q/q.js +33 -0
  39. package/src/core/q/q.test.js +0 -0
  40. package/src/core/root-element.spec.js +4 -4
  41. package/src/core/sanitize/sanitize-uri.spec.js +1 -1
  42. package/src/core/sanitize/sanitize-uri.test.js +12 -0
  43. package/src/core/sanitize/sanitize.html +21 -0
  44. package/src/core/sce/sce.html +18 -0
  45. package/src/core/sce/sce.spec.js +2 -1
  46. package/src/core/sce/sce.test.js +12 -0
  47. package/src/core/scope/scope.html +18 -0
  48. package/src/core/scope/scope.js +5 -8
  49. package/src/core/scope/scope.spec.js +1 -1
  50. package/src/core/scope/scope.test.js +12 -0
  51. package/src/core/task-tracker-factory.js +9 -11
  52. package/src/core/timeout/timeout.html +18 -0
  53. package/src/core/timeout/timeout.js +9 -0
  54. package/src/core/timeout/timeout.spec.js +2 -2
  55. package/src/core/timeout/timout.test.js +12 -0
  56. package/src/core/url-utils/url-utils.html +18 -0
  57. package/src/core/url-utils/url-utils.spec.js +4 -2
  58. package/src/core/url-utils/url-utils.test.js +12 -0
  59. package/src/directive/attrs/attrs.spec.js +1 -2
  60. package/src/directive/attrs/boolean.spec.js +1 -2
  61. package/src/directive/attrs/element-style.spec.js +6 -7
  62. package/src/directive/attrs/src.spec.js +1 -2
  63. package/src/directive/bind/bind.spec.js +1 -2
  64. package/src/directive/class/class.spec.js +15 -16
  65. package/src/directive/cloak/cloak.spec.js +3 -4
  66. package/src/directive/controller/controller.spec.js +4 -5
  67. package/src/directive/events/click.spec.js +1 -2
  68. package/src/directive/events/event.spec.js +1 -1
  69. package/src/directive/events/events.js +7 -0
  70. package/src/directive/form/form.spec.js +17 -17
  71. package/src/directive/if/if.spec.js +2 -2
  72. package/src/directive/include/include.js +2 -2
  73. package/src/directive/include/include.spec.js +32 -32
  74. package/src/directive/init/init.spec.js +2 -3
  75. package/src/directive/input/input.spec.js +3 -3
  76. package/src/directive/list/list.spec.js +1 -2
  77. package/src/directive/model/model.js +13 -0
  78. package/src/directive/model/model.spec.js +4 -5
  79. package/src/directive/model-options/model-options.spec.js +3 -3
  80. package/src/directive/non-bindable/non-bindable.spec.js +1 -2
  81. package/src/directive/options/options.js +5 -5
  82. package/src/directive/options/options.spec.js +13 -13
  83. package/src/directive/ref/href.spec.js +1 -2
  84. package/src/directive/repeat/repeat.spec.js +12 -12
  85. package/src/directive/script/script.spec.js +2 -3
  86. package/src/directive/select/select.js +6 -6
  87. package/src/directive/select/select.spec.js +5 -5
  88. package/src/directive/show-hide/show-hide.spec.js +12 -13
  89. package/src/directive/style/style.spec.js +3 -4
  90. package/src/directive/switch/switch.spec.js +2 -3
  91. package/src/directive/validators/validators.spec.js +1 -1
  92. package/src/exts/aria/aria.spec.js +1 -2
  93. package/src/exts/messages/messages.spec.js +5 -5
  94. package/src/filters/filter.spec.js +5 -5
  95. package/src/filters/filters.html +21 -0
  96. package/src/filters/filters.spec.js +3 -3
  97. package/src/filters/filters.test.js +12 -0
  98. package/src/filters/limit-to.md +1 -1
  99. package/src/filters/limit-to.spec.js +4 -4
  100. package/src/filters/order-by.spec.js +2 -2
  101. package/src/index.js +462 -1
  102. package/src/loader.js +62 -17
  103. package/src/public.js +6 -2
  104. package/src/router/directives/state-directives.spec.js +90 -90
  105. package/src/router/directives/view-directive.js +2 -2
  106. package/src/router/directives/view-directive.spec.js +9 -9
  107. package/src/router/state/state.spec.js +2 -4
  108. package/src/router/template-factory.spec.js +2 -2
  109. package/src/router/transition/hook-registry.js +2 -2
  110. package/src/router/view/view.spec.js +1 -1
  111. package/src/services/browser.js +56 -39
  112. package/src/services/document.js +16 -13
  113. package/src/services/log.js +39 -43
  114. package/src/services/template-request.js +9 -0
  115. package/src/shared/common.js +0 -3
  116. package/src/shared/jqlite/jqlite.js +83 -89
  117. package/src/shared/jqlite/jqlite.spec.js +218 -222
  118. package/src/shared/strings.js +2 -2
  119. package/src/shared/test-utils.js +2 -2
  120. package/src/shared/utils.js +8 -11
  121. package/src/src.test.js +10 -0
  122. package/tsconfig.json +1 -1
  123. package/tsconfig.types.json +11 -0
  124. package/types/animations/animate-cache.d.ts +7 -7
  125. package/types/animations/animate-children-directive.d.ts +3 -6
  126. package/types/animations/animate-swap.d.ts +7 -16
  127. package/types/animations/animation.d.ts +2 -11
  128. package/types/animations/raf-scheduler.d.ts +3 -3
  129. package/types/animations/shared.d.ts +9 -24
  130. package/types/core/{animate-css.d.ts → animate/animate-css.d.ts} +2 -8
  131. package/types/core/{cache.d.ts → cache/cache.d.ts} +5 -5
  132. package/types/core/compile/compile.d.ts +173 -0
  133. package/types/core/controller/controller.d.ts +32 -0
  134. package/types/core/exception-handler.d.ts +9 -42
  135. package/types/core/filter/filter.d.ts +9 -0
  136. package/types/core/{interpolate.d.ts → interpolate/interpolate.d.ts} +23 -39
  137. package/types/core/interval/interval-factory.d.ts +4 -0
  138. package/types/core/{interval.d.ts → interval/interval.d.ts} +1 -1
  139. package/types/core/location/location.d.ts +209 -0
  140. package/types/core/pubsub/pubsub.d.ts +156 -0
  141. package/types/core/q/q.d.ts +65 -0
  142. package/types/core/sanitize/sanitize-uri.d.ts +53 -0
  143. package/types/core/{sce.d.ts → sce/sce.d.ts} +80 -86
  144. package/types/core/scope/scope.d.ts +727 -0
  145. package/types/core/task-tracker-factory.d.ts +45 -38
  146. package/types/core/timeout/timeout.d.ts +29 -0
  147. package/types/core/{urlUtils.d.ts → url-utils/url-utils.d.ts} +2 -7
  148. package/types/directive/{bind.d.ts → bind/bind.d.ts} +4 -10
  149. package/types/directive/{class.d.ts → class/class.d.ts} +12 -21
  150. package/types/directive/controller/controller.d.ts +6 -0
  151. package/types/directive/events/events.d.ts +5 -0
  152. package/types/directive/form/form.d.ts +200 -0
  153. package/types/directive/if/if.d.ts +8 -0
  154. package/types/directive/include/include.d.ts +14 -0
  155. package/types/directive/{input.d.ts → input/input.d.ts} +20 -69
  156. package/types/directive/{model.d.ts → model/model.d.ts} +281 -280
  157. package/types/directive/options/options.d.ts +9 -0
  158. package/types/directive/ref/ref.d.ts +5 -0
  159. package/types/directive/repeat/repeat.d.ts +8 -0
  160. package/types/directive/{script.d.ts → script/script.d.ts} +5 -8
  161. package/types/directive/{show-hide.d.ts → show-hide/show-hide.d.ts} +10 -16
  162. package/types/directive/switch/switch.d.ts +17 -0
  163. package/types/directive/transclude/transclude.d.ts +4 -0
  164. package/types/directive/{validators.d.ts → validators/validators.d.ts} +20 -35
  165. package/types/filters/filters.d.ts +10 -16
  166. package/types/filters/order-by.d.ts +2 -4
  167. package/types/index.d.ts +702 -0
  168. package/types/injector.d.ts +12 -0
  169. package/types/public.d.ts +5 -0
  170. package/types/router/common/coreservices.d.ts +2 -2
  171. package/types/router/common/glob.d.ts +9 -9
  172. package/types/router/common/queue.d.ts +13 -13
  173. package/types/router/common/trace.d.ts +43 -43
  174. package/types/router/directives/view-directive.d.ts +13 -32
  175. package/types/router/globals.d.ts +20 -20
  176. package/types/router/hooks/lazy-load.d.ts +2 -11
  177. package/types/router/hooks/redirect-to.d.ts +1 -4
  178. package/types/router/hooks/url.d.ts +1 -5
  179. package/types/router/hooks/views.d.ts +1 -4
  180. package/types/router/params/param-factory.d.ts +5 -5
  181. package/types/router/params/param-type.d.ts +35 -35
  182. package/types/router/params/param-types.d.ts +11 -11
  183. package/types/router/params/param.d.ts +38 -38
  184. package/types/router/params/state-params.d.ts +10 -10
  185. package/types/router/path/path-node.d.ts +34 -34
  186. package/types/router/path/path-utils.d.ts +73 -77
  187. package/types/router/resolve/resolvable.d.ts +32 -32
  188. package/types/router/resolve/resolve-context.d.ts +84 -84
  189. package/types/router/services.d.ts +4 -9
  190. package/types/router/state/state-builder.d.ts +27 -27
  191. package/types/router/state/state-matcher.d.ts +5 -5
  192. package/types/router/state/state-object.d.ts +58 -58
  193. package/types/router/state/state-queue-manager.d.ts +10 -16
  194. package/types/router/state/state-registry.d.ts +100 -107
  195. package/types/router/state/state-service.d.ts +411 -411
  196. package/types/router/state/target-state.d.ts +64 -69
  197. package/types/router/state/views.d.ts +31 -37
  198. package/types/router/state-filters.d.ts +7 -7
  199. package/types/router/state-provider.d.ts +105 -105
  200. package/types/router/template-factory.d.ts +83 -112
  201. package/types/router/transition/hook-builder.d.ts +25 -25
  202. package/types/router/transition/hook-registry.d.ts +68 -83
  203. package/types/router/transition/interface.d.ts +7 -7
  204. package/types/router/transition/reject-factory.d.ts +34 -34
  205. package/types/router/transition/transition-event-type.d.ts +9 -18
  206. package/types/router/transition/transition-hook.d.ts +77 -82
  207. package/types/router/transition/transition-service.d.ts +82 -99
  208. package/types/router/transition/transition.d.ts +369 -377
  209. package/types/router/url/url-config.d.ts +84 -84
  210. package/types/router/url/url-matcher.d.ts +115 -119
  211. package/types/router/url/url-rule.d.ts +114 -124
  212. package/types/router/url/url-rules.d.ts +217 -217
  213. package/types/router/url/url-service.d.ts +264 -269
  214. package/types/router/view/view.d.ts +114 -117
  215. package/types/router/view-scroll.d.ts +2 -2
  216. package/types/services/anchor-scroll.d.ts +2 -8
  217. package/types/services/browser.d.ts +157 -135
  218. package/types/services/cache-factory.d.ts +25 -25
  219. package/types/services/cookie-reader.d.ts +2 -2
  220. package/types/services/document.d.ts +13 -9
  221. package/types/services/http/http.d.ts +145 -0
  222. package/types/services/{http-backend.d.ts → http-backend/http-backend.d.ts} +3 -35
  223. package/types/services/log.d.ts +55 -52
  224. package/types/services/template-request.d.ts +44 -53
  225. package/types/shared/common.d.ts +4 -20
  226. package/types/{constants.d.ts → shared/constants.d.ts} +6 -6
  227. package/types/shared/hof.d.ts +1 -1
  228. package/types/{jqLite.d.ts → shared/jqlite/jqlite.d.ts} +16 -17
  229. package/types/shared/test-utils.d.ts +11 -0
  230. package/types/shared/utils.d.ts +29 -46
  231. package/types-back/global.d.ts +3 -1
  232. package/types-back/index.d.ts +3 -296
  233. package/types/core/compile.d.ts +0 -206
  234. package/types/core/controller.d.ts +0 -42
  235. package/types/core/filter.d.ts +0 -9
  236. package/types/core/interval-factory.d.ts +0 -21
  237. package/types/core/location.d.ts +0 -234
  238. package/types/core/pubsub.d.ts +0 -164
  239. package/types/core/q.d.ts +0 -33
  240. package/types/core/root-scope.d.ts +0 -754
  241. package/types/core/sanitize-uri.d.ts +0 -57
  242. package/types/core/timeout.d.ts +0 -31
  243. package/types/directive/controller.d.ts +0 -6
  244. package/types/directive/events.d.ts +0 -12
  245. package/types/directive/form.d.ts +0 -230
  246. package/types/directive/if.d.ts +0 -17
  247. package/types/directive/include.d.ts +0 -33
  248. package/types/directive/options.d.ts +0 -16
  249. package/types/directive/ref.d.ts +0 -11
  250. package/types/directive/repeat.d.ts +0 -23
  251. package/types/directive/switch.d.ts +0 -23
  252. package/types/directive/transclude.d.ts +0 -15
  253. package/types/services/http.d.ts +0 -157
  254. /package/src/core/cache/{cache-factor.spec.js → cache-factory.spec.js} +0 -0
  255. /package/types/directive/{attrs.d.ts → attrs/attrs.d.ts} +0 -0
  256. /package/types/directive/{change.d.ts → change/change.d.ts} +0 -0
  257. /package/types/directive/{cloak.d.ts → cloak/cloak.d.ts} +0 -0
  258. /package/types/directive/{init.d.ts → init/init.d.ts} +0 -0
  259. /package/types/directive/{list.d.ts → list/list.d.ts} +0 -0
  260. /package/types/directive/{non-bindable.d.ts → non-bindable/non-bindable.d.ts} +0 -0
  261. /package/types/directive/{style.d.ts → style/style.d.ts} +0 -0
  262. /package/types/exts/{aria.d.ts → aria/aria.d.ts} +0 -0
  263. /package/types/exts/{messages.d.ts → messages/messages.d.ts} +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  LocationHashbangUrl,
4
4
  $LocationProvider,
5
5
  LocationHashbangInHtml5Url,
6
- } from "../../core/location";
6
+ } from "./location";
7
7
  import { publishExternalAPI } from "../../public";
8
8
  import { createInjector } from "../../injector";
9
9
 
@@ -883,7 +883,7 @@ describe("$location", () => {
883
883
  // $rootScope.$digest();
884
884
  // $window.location.href = "http://localhost:9876/?q='";
885
885
  // expect(() => {
886
- // jqLite($window).triggerHandler("popstate");
886
+ // JQLite($window).triggerHandler("popstate");
887
887
  // }).not.toThrow();
888
888
  // });
889
889
  // });
@@ -939,7 +939,7 @@ describe("$location", () => {
939
939
  // });
940
940
  // });
941
941
 
942
- // jqLite($window).triggerHandler("hashchange");
942
+ // JQLite($window).triggerHandler("hashchange");
943
943
 
944
944
  // expect($browser.url()).toBe("http://foo.bar/#!/baz/qux");
945
945
  // expect($location.absUrl()).toBe("http://foo.bar/#!/baz/qux");
@@ -1378,7 +1378,7 @@ describe("$location", () => {
1378
1378
  // $rootScope.$digest(); // allow $location initialization to finish
1379
1379
 
1380
1380
  // $window.location.href = "http://server/app/Home?q='";
1381
- // jqLite($window).triggerHandler("popstate");
1381
+ // JQLite($window).triggerHandler("popstate");
1382
1382
 
1383
1383
  // expect($location.absUrl()).toEqual("http://server/app/Home?q='");
1384
1384
  // expect($location.path()).toEqual("/Home");
@@ -1756,9 +1756,9 @@ describe("$location", () => {
1756
1756
  // }
1757
1757
 
1758
1758
  // if (linkHref) {
1759
- // link = jqLite(`<a href="${linkHref}"${attrs}>${content}</a>`)[0];
1759
+ // link = JQLite(`<a href="${linkHref}"${attrs}>${content}</a>`)[0];
1760
1760
  // } else {
1761
- // link = jqLite(`<a ${attrs}>${content}</a>`)[0];
1761
+ // link = JQLite(`<a ${attrs}>${content}</a>`)[0];
1762
1762
  // }
1763
1763
 
1764
1764
  // module(
@@ -1828,15 +1828,15 @@ describe("$location", () => {
1828
1828
  // browserTrigger(link, "click");
1829
1829
  // expectRewriteTo($browser, "http://host.com/base/");
1830
1830
 
1831
- // jqLite(link).attr("href", "http://host.com/base/foo");
1831
+ // JQLite(link).attr("href", "http://host.com/base/foo");
1832
1832
  // browserTrigger(link, "click");
1833
1833
  // expectRewriteTo($browser, "http://host.com/base/foo");
1834
1834
 
1835
- // jqLite(link).attr("href", "http://host.com/base/");
1835
+ // JQLite(link).attr("href", "http://host.com/base/");
1836
1836
  // browserTrigger(link, "click");
1837
1837
  // expectRewriteTo($browser, "http://host.com/base/");
1838
1838
 
1839
- // jqLite(link)
1839
+ // JQLite(link)
1840
1840
  // .attr("href", "http://host.com/base/foo")
1841
1841
  // .on("click", (e) => {
1842
1842
  // e.preventDefault();
@@ -2113,7 +2113,7 @@ describe("$location", () => {
2113
2113
  // }),
2114
2114
  // setupRewriteChecks(),
2115
2115
  // ($browser) => {
2116
- // const span = jqLite(link).find("span");
2116
+ // const span = JQLite(link).find("span");
2117
2117
 
2118
2118
  // browserTrigger(span, "click");
2119
2119
  // expectRewriteTo($browser, "http://host.com/base/some/link");
@@ -2441,12 +2441,12 @@ describe("$location", () => {
2441
2441
  // });
2442
2442
  // inject(($location) => {
2443
2443
  // // make IE happy
2444
- // jqLite(window.document.body).html(
2444
+ // JQLite(window.document.body).html(
2445
2445
  // '<a href="http://server/test.html">link</a>',
2446
2446
  // );
2447
2447
 
2448
2448
  // const event = {
2449
- // target: jqLite(window.document.body).find("a")[0],
2449
+ // target: JQLite(window.document.body).find("a")[0],
2450
2450
  // preventDefault: jasmine.createSpy("preventDefault"),
2451
2451
  // isDefaultPrevented: jasmine.createSpy().and.returnValue(false),
2452
2452
  // };
@@ -2481,12 +2481,12 @@ describe("$location", () => {
2481
2481
  // $location,
2482
2482
  // ) => {
2483
2483
  // // make IE happy
2484
- // jqLite(window.document.body).html(
2484
+ // JQLite(window.document.body).html(
2485
2485
  // '<a href="http://server/index.html#test">link</a>',
2486
2486
  // );
2487
2487
 
2488
2488
  // const event = {
2489
- // target: jqLite(window.document.body).find("a")[0],
2489
+ // target: JQLite(window.document.body).find("a")[0],
2490
2490
  // preventDefault: jasmine.createSpy("preventDefault"),
2491
2491
  // isDefaultPrevented: jasmine.createSpy().and.returnValue(false),
2492
2492
  // };
@@ -2920,7 +2920,7 @@ describe("$location", () => {
2920
2920
  // function ($rootElement, $compile, $rootScope) {
2921
2921
  // $rootElement.html('<a href="http://server/#!/somePath">link</a>');
2922
2922
  // $compile($rootElement)($rootScope);
2923
- // jqLite(window.document.body).append($rootElement);
2923
+ // JQLite(window.document.body).append($rootElement);
2924
2924
  // },
2925
2925
  // );
2926
2926
 
@@ -2951,7 +2951,7 @@ describe("$location", () => {
2951
2951
  // return function ($rootElement, $compile, $rootScope) {
2952
2952
  // $rootElement.html('<a href="http://server/somePath">link</a>');
2953
2953
  // $compile($rootElement)($rootScope);
2954
- // jqLite(window.document.body).append($rootElement);
2954
+ // JQLite(window.document.body).append($rootElement);
2955
2955
  // };
2956
2956
  // });
2957
2957
 
@@ -3399,7 +3399,7 @@ describe("$location", () => {
3399
3399
  // const win = {};
3400
3400
  // angular.extend(win, window);
3401
3401
  // // Ensure `window` is a reference to the mock global object, so that
3402
- // // jqLite does the right thing.
3402
+ // // JQLite does the right thing.
3403
3403
  // win.window = win;
3404
3404
  // win.history = {
3405
3405
  // state: options.state || null,
@@ -0,0 +1,12 @@
1
+ import { test, expect } from "@playwright/test";
2
+
3
+ const TEST_URL = "src/core/location/location.html";
4
+
5
+ test("unit tests contain no errors", async ({ page }) => {
6
+ await page.goto(TEST_URL);
7
+ await page.content();
8
+ await page.waitForTimeout(100);
9
+ await expect(page.locator(".jasmine-overall-result")).toHaveText(
10
+ /0 failures/,
11
+ );
12
+ });
@@ -1,6 +1,6 @@
1
- import { publishExternalAPI } from "../../public";
2
- import { createInjector } from "../../injector";
3
- import { valueFn } from "../../shared/utils";
1
+ import { publishExternalAPI } from "../public";
2
+ import { createInjector } from "../injector";
3
+ import { valueFn } from "../shared/utils";
4
4
 
5
5
  describe("ngOn* event binding", () => {
6
6
  let $rootScope, module, injector, $compile;
@@ -0,0 +1,18 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>AngularTS Test Runner</title>
6
+
7
+ <link rel="shortcut icon" type="image/png" href="/images/favicon.ico" />
8
+ <link rel="stylesheet" href="/jasmine/jasmine-5.1.2/jasmine.css" />
9
+ <script src="/jasmine/jasmine-5.1.2/jasmine.js"></script>
10
+ <script src="/jasmine/jasmine-5.1.2/jasmine-html.js"></script>
11
+ <script src="/jasmine/jasmine-5.1.2/boot0.js"></script>
12
+ <script src="/jasmine/jasmine-5.1.2/boot1.js"></script>
13
+ <script type="module" src="/src/core/parser/parse.spec.js"></script>
14
+ </head>
15
+ <body>
16
+ <div id="dummy"></div>
17
+ </body>
18
+ </html>
@@ -1,4 +1,4 @@
1
- import { AST, Lexer } from "../../core/parser/parse";
1
+ import { AST, Lexer } from "./parse";
2
2
  import {
3
3
  forEach,
4
4
  isFunction,
@@ -0,0 +1,12 @@
1
+ import { test, expect } from "@playwright/test";
2
+
3
+ const TEST_URL = "src/core/parser/parse.html";
4
+
5
+ test("unit tests contain no errors", async ({ page }) => {
6
+ await page.goto(TEST_URL);
7
+ await page.content();
8
+ await page.waitForTimeout(100);
9
+ await expect(page.locator(".jasmine-overall-result")).toHaveText(
10
+ /0 failures/,
11
+ );
12
+ });
@@ -1,7 +1,6 @@
1
- import { publishExternalAPI } from "../../public";
2
- import { createInjector } from "../../injector";
3
- import { jqLite } from "../../shared/jqlite/jqlite";
4
- import { valueFn } from "../../shared/utils";
1
+ import { publishExternalAPI } from "../public";
2
+ import { createInjector } from "../injector";
3
+ import { valueFn } from "../shared/utils";
5
4
 
6
5
  describe("ngProp*", () => {
7
6
  let $compile, $rootScope, compileProvider, $sce;
@@ -0,0 +1,18 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>AngularTS Test Runner</title>
6
+
7
+ <link rel="shortcut icon" type="image/png" href="/images/favicon.ico" />
8
+ <link rel="stylesheet" href="/jasmine/jasmine-5.1.2/jasmine.css" />
9
+ <script src="/jasmine/jasmine-5.1.2/jasmine.js"></script>
10
+ <script src="/jasmine/jasmine-5.1.2/jasmine-html.js"></script>
11
+ <script src="/jasmine/jasmine-5.1.2/boot0.js"></script>
12
+ <script src="/jasmine/jasmine-5.1.2/boot1.js"></script>
13
+ <script type="module" src="/src/core/pubsub/pubsub.spec.js"></script>
14
+ </head>
15
+ <body>
16
+ <div id="dummy"></div>
17
+ </body>
18
+ </html>
@@ -1,4 +1,4 @@
1
- import { PubSub } from "../../core/pubsub";
1
+ import { PubSub } from "./pubsub";
2
2
 
3
3
  describe("PubSub", function () {
4
4
  let pubsub;
@@ -0,0 +1,12 @@
1
+ import { test, expect } from "@playwright/test";
2
+
3
+ const TEST_URL = "src/core/pubsub/pubsub.html";
4
+
5
+ test("unit tests contain no errors", async ({ page }) => {
6
+ await page.goto(TEST_URL);
7
+ await page.content();
8
+ await page.waitForTimeout(100);
9
+ await expect(page.locator(".jasmine-overall-result")).toHaveText(
10
+ /0 failures/,
11
+ );
12
+ });
@@ -0,0 +1,18 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>AngularTS Test Runner</title>
6
+
7
+ <link rel="shortcut icon" type="image/png" href="/images/favicon.ico" />
8
+ <link rel="stylesheet" href="/jasmine/jasmine-5.1.2/jasmine.css" />
9
+ <script src="/jasmine/jasmine-5.1.2/jasmine.js"></script>
10
+ <script src="/jasmine/jasmine-5.1.2/jasmine-html.js"></script>
11
+ <script src="/jasmine/jasmine-5.1.2/boot0.js"></script>
12
+ <script src="/jasmine/jasmine-5.1.2/boot1.js"></script>
13
+ <script type="module" src="/src/core/q/q.spec.js"></script>
14
+ </head>
15
+ <body>
16
+ <div id="dummy"></div>
17
+ </body>
18
+ </html>
package/src/core/q/q.js CHANGED
@@ -216,6 +216,33 @@
216
216
  * @returns {Promise} The newly created promise.
217
217
  */
218
218
 
219
+ /**
220
+ * @template T
221
+ * @typedef {Object} angular.QPromise
222
+ * @property {function(
223
+ * ((value: T) => (PromiseLike<never>|PromiseLike<T>|T))|null,
224
+ * ((reason: any) => (PromiseLike<never>|PromiseLike<T>|T))|null,
225
+ * ((state: any) => any)
226
+ * ): angular.QPromise<T|never>} then - Calls one of the success or error callbacks asynchronously as soon as the result is available.
227
+ * @property {function(
228
+ * ((value: T) => (angular.QPromise<never>|angular.QPromise<T>|T))|null,
229
+ * ((reason: any) => (angular.QPromise<never>|angular.QPromise<never>|never))|null,
230
+ * ((state: any) => any)
231
+ * ): angular.QPromise<T|never>} then - Calls one of the success or error callbacks asynchronously as soon as the result is available.
232
+ * @property {function(((reason: any) => (PromiseLike<never>|PromiseLike<T>|T))|null): angular.QPromise<T>|T} catch - Shorthand for promise.then(null, errorCallback).
233
+ * @property {function(((reason: any) => (angular.QPromise<never>|angular.QPromise<T>|T))|null): angular.QPromise<T>|T} catch - Shorthand for promise.then(null, errorCallback).
234
+ * @property {function(function(): void): angular.QPromise<T>} finally - Allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value.
235
+ */
236
+
237
+ /**
238
+ *@template T
239
+ * @typedef {Object} angular.Deferred
240
+ * @property {function(T|angular.QPromise<T>): void} resolve - Resolves the promise with a value or another promise.
241
+ * @property {function(any): void} reject - Rejects the promise with a reason.
242
+ * @property {function(any): void} notify - Provides a progress notification.
243
+ * @property {angular.QPromise<T>} promise - The promise associated with this deferred object.
244
+ */
245
+
219
246
  import {
220
247
  forEach,
221
248
  minErr,
@@ -241,6 +268,12 @@ export function $QProvider() {
241
268
  this.$get = [
242
269
  "$rootScope",
243
270
  "$exceptionHandler",
271
+ /**
272
+ *
273
+ * @param {*} $rootScope
274
+ * @param {import('../exception-handler').angular.ErrorHandler} $exceptionHandler
275
+ * @returns
276
+ */
244
277
  function ($rootScope, $exceptionHandler) {
245
278
  return qFactory(
246
279
  (callback) => {
File without changes
@@ -1,13 +1,13 @@
1
- import { jqLite, dealoc } from "../../shared/jqlite/jqlite";
2
- import { Angular } from "../../loader";
3
- import { publishExternalAPI } from "../../public";
1
+ import { JQLite, dealoc } from "../shared/jqlite/jqlite";
2
+ import { Angular } from "../loader";
3
+ import { publishExternalAPI } from "../public";
4
4
 
5
5
  describe("$rootElement", () => {
6
6
  let angular = new Angular();
7
7
  publishExternalAPI();
8
8
 
9
9
  it("should publish the bootstrap element into $rootElement", () => {
10
- const element = jqLite("<div></div>");
10
+ const element = JQLite("<div></div>");
11
11
  const injector = angular.bootstrap(element);
12
12
 
13
13
  expect(injector.get("$rootElement")[0]).toBe(element[0]);
@@ -1,4 +1,4 @@
1
- import { SanitizeUriProvider } from "../../core/sanitize-uri";
1
+ import { SanitizeUriProvider } from "./sanitize-uri";
2
2
 
3
3
  describe("sanitizeUri", () => {
4
4
  let sanitizeHref;
@@ -0,0 +1,12 @@
1
+ import { test, expect } from "@playwright/test";
2
+
3
+ const TEST_URL = "src/core/sanitize/sanitize.html";
4
+
5
+ test("unit tests contain no errors", async ({ page }) => {
6
+ await page.goto(TEST_URL);
7
+ await page.content();
8
+ await page.waitForTimeout(100);
9
+ await expect(page.locator(".jasmine-overall-result")).toHaveText(
10
+ /0 failures/,
11
+ );
12
+ });
@@ -0,0 +1,21 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>AngularTS Test Runner</title>
6
+
7
+ <link rel="shortcut icon" type="image/png" href="/images/favicon.ico" />
8
+ <link rel="stylesheet" href="/jasmine/jasmine-5.1.2/jasmine.css" />
9
+ <script src="/jasmine/jasmine-5.1.2/jasmine.js"></script>
10
+ <script src="/jasmine/jasmine-5.1.2/jasmine-html.js"></script>
11
+ <script src="/jasmine/jasmine-5.1.2/boot0.js"></script>
12
+ <script src="/jasmine/jasmine-5.1.2/boot1.js"></script>
13
+ <script
14
+ type="module"
15
+ src="/src/core/sanitize/sanitize-uri.spec.js"
16
+ ></script>
17
+ </head>
18
+ <body>
19
+ <div id="dummy"></div>
20
+ </body>
21
+ </html>
@@ -0,0 +1,18 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>AngularTS Test Runner</title>
6
+
7
+ <link rel="shortcut icon" type="image/png" href="/images/favicon.ico" />
8
+ <link rel="stylesheet" href="/jasmine/jasmine-5.1.2/jasmine.css" />
9
+ <script src="/jasmine/jasmine-5.1.2/jasmine.js"></script>
10
+ <script src="/jasmine/jasmine-5.1.2/jasmine-html.js"></script>
11
+ <script src="/jasmine/jasmine-5.1.2/boot0.js"></script>
12
+ <script src="/jasmine/jasmine-5.1.2/boot1.js"></script>
13
+ <script type="module" src="/src/core/sce/sce.spec.js"></script>
14
+ </head>
15
+ <body>
16
+ <div id="dummy"></div>
17
+ </body>
18
+ </html>
@@ -1,7 +1,7 @@
1
1
  import { createInjector } from "../../injector";
2
2
 
3
3
  import { publishExternalAPI } from "../../public";
4
- import { adjustMatcher } from "../../core/sce";
4
+ import { adjustMatcher } from "./sce";
5
5
 
6
6
  describe("SCE", () => {
7
7
  let $sce, $rootScope;
@@ -175,6 +175,7 @@ describe("SCE", () => {
175
175
  });
176
176
 
177
177
  describe("$sce.parseAs", () => {
178
+ publishExternalAPI();
178
179
  beforeEach(function () {
179
180
  createInjector(["ng"]).invoke((_$sce_, _$rootScope_) => {
180
181
  $sce = _$sce_;
@@ -0,0 +1,12 @@
1
+ import { test, expect } from "@playwright/test";
2
+
3
+ const TEST_URL = "src/core/sce/sce.html";
4
+
5
+ test("unit tests contain no errors", async ({ page }) => {
6
+ await page.goto(TEST_URL);
7
+ await page.content();
8
+ await page.waitForTimeout(100);
9
+ await expect(page.locator(".jasmine-overall-result")).toHaveText(
10
+ /0 failures/,
11
+ );
12
+ });
@@ -0,0 +1,18 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>AngularTS Test Runner</title>
6
+
7
+ <link rel="shortcut icon" type="image/png" href="/images/favicon.ico" />
8
+ <link rel="stylesheet" href="/jasmine/jasmine-5.1.2/jasmine.css" />
9
+ <script src="/jasmine/jasmine-5.1.2/jasmine.js"></script>
10
+ <script src="/jasmine/jasmine-5.1.2/jasmine-html.js"></script>
11
+ <script src="/jasmine/jasmine-5.1.2/boot0.js"></script>
12
+ <script src="/jasmine/jasmine-5.1.2/boot1.js"></script>
13
+ <script type="module" src="/src/core/scope/scope.spec.js"></script>
14
+ </head>
15
+ <body>
16
+ <div id="dummy"></div>
17
+ </body>
18
+ </html>
@@ -53,9 +53,9 @@ let applyAsyncId = null;
53
53
  /** Services required by each scope instance */
54
54
  /** @type {angular.IParseService} */
55
55
  let $parse;
56
- /** @type {import('../services/browser').Browser} */
56
+ /** @type {import('../../services/browser').Browser} */
57
57
  let $browser;
58
- /** @type {angular.IExceptionHandlerService} */
58
+ /**@type {import('../exception-handler').angular.ErrorHandler} */
59
59
  let $exceptionHandler;
60
60
 
61
61
  /**
@@ -123,10 +123,7 @@ export class $RootScopeProvider {
123
123
  * to construct.
124
124
  */
125
125
 
126
- /**
127
- * @type {angular.Scope}
128
- */
129
- class Scope {
126
+ export class Scope {
130
127
  constructor() {
131
128
  /**
132
129
  * @type {number} Unique scope ID (monotonically increasing) useful for debugging.
@@ -142,7 +139,7 @@ class Scope {
142
139
  this.$parent = null;
143
140
 
144
141
  /**
145
- * @type {?angular.Scope}
142
+ * @type {?Scope}
146
143
  */
147
144
  this.$root = this;
148
145
 
@@ -377,7 +374,7 @@ class Scope {
377
374
  *
378
375
  * - `string`: Evaluated as {@link guide/expression expression}
379
376
  * - `function(scope)`: called with current `scope` as a parameter.
380
- * @param {(newVal: any, oldVal: any, scope: angular.Scope) => any} listener Callback called whenever the value
377
+ * @param {(newVal: any, oldVal: any, scope: Scope) => any} listener Callback called whenever the value
381
378
  * of `watchExpression` changes.
382
379
  *
383
380
  * - `newVal` contains the current value of the `watchExpression`
@@ -1,4 +1,4 @@
1
- import { $$asyncQueue } from "../../core/root-scope";
1
+ import { $$asyncQueue } from "./scope";
2
2
  import { extend, sliceArgs } from "../../shared/utils";
3
3
  import { publishExternalAPI } from "../../public";
4
4
  import { createInjector } from "../../injector";
@@ -0,0 +1,12 @@
1
+ import { test, expect } from "@playwright/test";
2
+
3
+ const TEST_URL = "src/core/scope/scope.html";
4
+
5
+ test("unit tests contain no errors", async ({ page }) => {
6
+ await page.goto(TEST_URL);
7
+ await page.content();
8
+ await page.waitForTimeout(100);
9
+ await expect(page.locator(".jasmine-overall-result")).toHaveText(
10
+ /0 failures/,
11
+ );
12
+ });
@@ -1,4 +1,11 @@
1
- import { valueFn } from "../shared/utils";
1
+ export function $$TaskTrackerFactoryProvider() {
2
+ // eslint-disable-next-line no-use-before-define
3
+ this.$get = [
4
+ "$log",
5
+ /** @param {import('../services/log').angular.LogService} log */
6
+ (log) => new TaskTracker(log),
7
+ ];
8
+ }
2
9
 
3
10
  /**
4
11
  * ! This is a private undocumented service !
@@ -9,17 +16,8 @@ import { valueFn } from "../shared/utils";
9
16
  *
10
17
  * A `TaskTracker` can keep track of pending tasks (grouped by type) and can notify interested
11
18
  * parties when all pending tasks (or tasks of a specific type) have been completed.
12
- *
13
- * @param {$log} log - A logger instance (such as `$log`). Used to log error during callback
14
- * execution.
15
- *
16
- *
19
+ * @param {import('../services/log').angular.LogService} log
17
20
  */
18
- export function $$TaskTrackerFactoryProvider() {
19
- // eslint-disable-next-line no-use-before-define
20
- this.$get = valueFn((log) => new TaskTracker(log));
21
- }
22
-
23
21
  export function TaskTracker(log) {
24
22
  const self = this;
25
23
  const taskCounts = {};
@@ -0,0 +1,18 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>AngularTS Test Runner</title>
6
+
7
+ <link rel="shortcut icon" type="image/png" href="/images/favicon.ico" />
8
+ <link rel="stylesheet" href="/jasmine/jasmine-5.1.2/jasmine.css" />
9
+ <script src="/jasmine/jasmine-5.1.2/jasmine.js"></script>
10
+ <script src="/jasmine/jasmine-5.1.2/jasmine-html.js"></script>
11
+ <script src="/jasmine/jasmine-5.1.2/boot0.js"></script>
12
+ <script src="/jasmine/jasmine-5.1.2/boot1.js"></script>
13
+ <script type="module" src="/src/core/timeout/timeout.spec.js"></script>
14
+ </head>
15
+ <body>
16
+ <div id="dummy"></div>
17
+ </body>
18
+ </html>
@@ -3,6 +3,15 @@ import { isDefined, isFunction, minErr, sliceArgs } from "../../shared/utils";
3
3
 
4
4
  const $timeoutMinErr = minErr("$timeout");
5
5
 
6
+ /**
7
+ *
8
+ * @param {*} $rootScope
9
+ * @param {*} $browser
10
+ * @param {*} $q
11
+ * @param {*} $$q
12
+ * @param {import('../exception-handler').angular.ErrorHandler} $exceptionHandler
13
+ * @returns
14
+ */
6
15
  export function $timeout($rootScope, $browser, $q, $$q, $exceptionHandler) {
7
16
  const deferreds = {};
8
17
 
@@ -1,6 +1,6 @@
1
1
  import { publishExternalAPI } from "../../public";
2
2
  import { createInjector } from "../../injector";
3
- import { wait } from "../test-utils";
3
+ import { wait } from "../../shared/test-utils";
4
4
 
5
5
  describe("$timeout", () => {
6
6
  let injector;
@@ -326,7 +326,7 @@ describe("$timeout", () => {
326
326
 
327
327
  it("should forget references to relevant deferred", () => {
328
328
  // $browser.cancel is only called on cancel if the deferred object is still referenced
329
- const cancelSpy = spyOn($browser.defer, "cancel").and.callThrough();
329
+ const cancelSpy = spyOn($browser, "cancel").and.callThrough();
330
330
 
331
331
  const promise = $timeout(() => {}, 0, false);
332
332
 
@@ -0,0 +1,12 @@
1
+ import { test, expect } from "@playwright/test";
2
+
3
+ const TEST_URL = "src/core/interval/interval.html";
4
+
5
+ test("unit tests contain no errors", async ({ page }) => {
6
+ await page.goto(TEST_URL);
7
+ await page.content();
8
+ await page.waitForTimeout(100);
9
+ await expect(page.locator(".jasmine-overall-result")).toHaveText(
10
+ /0 failures/,
11
+ );
12
+ });
@@ -0,0 +1,18 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>AngularTS Test Runner</title>
6
+
7
+ <link rel="shortcut icon" type="image/png" href="/images/favicon.ico" />
8
+ <link rel="stylesheet" href="/jasmine/jasmine-5.1.2/jasmine.css" />
9
+ <script src="/jasmine/jasmine-5.1.2/jasmine.js"></script>
10
+ <script src="/jasmine/jasmine-5.1.2/jasmine-html.js"></script>
11
+ <script src="/jasmine/jasmine-5.1.2/boot0.js"></script>
12
+ <script src="/jasmine/jasmine-5.1.2/boot1.js"></script>
13
+ <script type="module" src="/src/core/url-utils/url-utils.spec.js"></script>
14
+ </head>
15
+ <body>
16
+ <div id="dummy"></div>
17
+ </body>
18
+ </html>