@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
@@ -22,10 +22,10 @@ xdescribe("$animate", () => {
22
22
 
23
23
  it("should enter the element to the start of the parent container", () => {
24
24
  for (let i = 0; i < 5; i++) {
25
- element.append(jqLite(`<div> ${i}</div>`));
25
+ element.append(JQLite(`<div> ${i}</div>`));
26
26
  }
27
27
 
28
- const child = jqLite("<div>first</div>");
28
+ const child = JQLite("<div>first</div>");
29
29
  $animate.enter(child, element);
30
30
 
31
31
  expect(element.text()).toEqual("first 0 1 2 3 4");
@@ -70,9 +70,9 @@ xdescribe("$animate", () => {
70
70
  });
71
71
 
72
72
  it("should run each method and return a promise", () => {
73
- const element = jqLite("<div></div>");
74
- const move = jqLite("<div></div>");
75
- const parent = jqLite($document[0].body);
73
+ const element = JQLite("<div></div>");
74
+ const move = JQLite("<div></div>");
75
+ const parent = JQLite($document[0].body);
76
76
  parent.append(move);
77
77
 
78
78
  expect($animate.enter(element, parent)).toBeAPromise();
@@ -95,7 +95,7 @@ xdescribe("$animate", () => {
95
95
 
96
96
  it("should add and remove classes on SVG elements", () => {
97
97
  if (!window.SVGElement) return;
98
- const svg = jqLite("<svg><rect></rect></svg>");
98
+ const svg = JQLite("<svg><rect></rect></svg>");
99
99
  const rect = svg.children();
100
100
  $animate.enabled(false);
101
101
  expect(rect).toBeShown();
@@ -137,9 +137,9 @@ xdescribe("$animate", () => {
137
137
  });
138
138
 
139
139
  it("should apply and retain inline styles on the element that is animated", () => {
140
- const element = jqLite("<div></div>");
141
- const parent = jqLite("<div></div>");
142
- const other = jqLite("<div></div>");
140
+ const element = JQLite("<div></div>");
141
+ const parent = JQLite("<div></div>");
142
+ const other = JQLite("<div></div>");
143
143
  parent.append(other);
144
144
  $animate.enabled(true);
145
145
 
@@ -183,7 +183,7 @@ xdescribe("$animate", () => {
183
183
  });
184
184
 
185
185
  it("should merge the from and to styles that are provided", () => {
186
- const element = jqLite("<div></div>");
186
+ const element = JQLite("<div></div>");
187
187
 
188
188
  element[0].style.color = "red";
189
189
  $animate.addClass(element, "on", {
@@ -198,7 +198,7 @@ xdescribe("$animate", () => {
198
198
  });
199
199
 
200
200
  it("should avoid cancelling out add/remove when the element already contains the class", () => {
201
- const element = jqLite('<div class="ng-hide"></div>');
201
+ const element = JQLite('<div class="ng-hide"></div>');
202
202
 
203
203
  $animate.addClass(element, "ng-hide");
204
204
  $animate.removeClass(element, "ng-hide");
@@ -208,7 +208,7 @@ xdescribe("$animate", () => {
208
208
  });
209
209
 
210
210
  it("should avoid cancelling out remove/add if the element does not contain the class", () => {
211
- const element = jqLite("<div></div>");
211
+ const element = JQLite("<div></div>");
212
212
 
213
213
  $animate.removeClass(element, "ng-hide");
214
214
  $animate.addClass(element, "ng-hide");
@@ -219,7 +219,7 @@ xdescribe("$animate", () => {
219
219
 
220
220
  ["enter", "move"].forEach((method) => {
221
221
  it('should accept an unwrapped "parent" element for the $prop event', () => {
222
- const element = jqLite("<div></div>");
222
+ const element = JQLite("<div></div>");
223
223
  const parent = $document[0].createElement("div");
224
224
  $rootElement.append(parent);
225
225
 
@@ -230,7 +230,7 @@ xdescribe("$animate", () => {
230
230
 
231
231
  ["enter", "move"].forEach((method) => {
232
232
  it('should accept an unwrapped "after" element for the $prop event', () => {
233
- const element = jqLite("<div></div>");
233
+ const element = JQLite("<div></div>");
234
234
  const after = $document[0].createElement("div");
235
235
  $rootElement.append(after);
236
236
 
@@ -257,8 +257,8 @@ xdescribe("$animate", () => {
257
257
  });
258
258
  });
259
259
 
260
- const element = jqLite("<div></div>");
261
- const parent2 = jqLite("<div></div>");
260
+ const element = JQLite("<div></div>");
261
+ const parent2 = JQLite("<div></div>");
262
262
  const parent = $rootElement;
263
263
  parent.append(parent2);
264
264
 
@@ -327,7 +327,7 @@ xdescribe("$animate", () => {
327
327
  () => {
328
328
  const spy = spyOn(window, "jqLiteAddClass").and.callThrough();
329
329
 
330
- const element = jqLite("<div></div>");
330
+ const element = JQLite("<div></div>");
331
331
  const parent = $rootElement;
332
332
 
333
333
  $animate.enter(element, parent, null, { addClass: () => {} });
@@ -345,8 +345,8 @@ xdescribe("$animate", () => {
345
345
  });
346
346
 
347
347
  it("should not break postDigest for subsequent elements if addClass contains non-valid CSS class names", () => {
348
- const element1 = jqLite("<div></div>");
349
- const element2 = jqLite("<div></div>");
348
+ const element1 = JQLite("<div></div>");
349
+ const element2 = JQLite("<div></div>");
350
350
 
351
351
  $animate.enter(element1, $rootElement, null, { addClass: " " });
352
352
  $animate.enter(element2, $rootElement, null, { addClass: "valid-name" });
@@ -361,7 +361,7 @@ xdescribe("$animate", () => {
361
361
  () => {
362
362
  const spy = spyOn(window, "jqLiteRemoveClass").and.callThrough();
363
363
 
364
- const element = jqLite("<div></div>");
364
+ const element = JQLite("<div></div>");
365
365
  const parent = $rootElement;
366
366
 
367
367
  $animate.enter(element, parent, null, { removeClass: () => {} });
@@ -380,7 +380,7 @@ xdescribe("$animate", () => {
380
380
  });
381
381
 
382
382
  it("should not alter the provided options input in any way throughout the animation", () => {
383
- const element = jqLite("<div></div>");
383
+ const element = JQLite("<div></div>");
384
384
  const parent = $rootElement;
385
385
 
386
386
  const initialOptions = {
@@ -418,7 +418,7 @@ xdescribe("$animate", () => {
418
418
 
419
419
  function setupClassManipulationLogger(log) {
420
420
  () => {
421
- const _addClass = jqLiteAddClass;
421
+ const _addClass = JQLiteAddClass;
422
422
  addClass = spyOn(window, "jqLiteAddClass").and.callFake(
423
423
  (element, classes) => {
424
424
  let names = classes;
@@ -429,7 +429,7 @@ xdescribe("$animate", () => {
429
429
  },
430
430
  );
431
431
 
432
- const _removeClass = jqLiteRemoveClass;
432
+ const _removeClass = JQLiteRemoveClass;
433
433
  removeClass = spyOn(window, "jqLiteRemoveClass").and.callFake(
434
434
  (element, classes) => {
435
435
  let names = classes;
@@ -444,7 +444,7 @@ xdescribe("$animate", () => {
444
444
 
445
445
  it("should defer class manipulation until end of digest", () => {
446
446
  setupClassManipulationLogger(log);
447
- element = jqLite("<p>test</p>");
447
+ element = JQLite("<p>test</p>");
448
448
 
449
449
  $rootScope.$apply(() => {
450
450
  $animate.addClass(element, "test-class1");
@@ -472,7 +472,7 @@ xdescribe("$animate", () => {
472
472
 
473
473
  it("should defer class manipulation until postDigest when outside of digest", () => {
474
474
  setupClassManipulationLogger(log);
475
- element = jqLite('<p class="test-class4">test</p>');
475
+ element = JQLite('<p class="test-class4">test</p>');
476
476
 
477
477
  $animate.addClass(element, "test-class1");
478
478
  $animate.removeClass(element, "test-class1");
@@ -494,7 +494,7 @@ xdescribe("$animate", () => {
494
494
  });
495
495
 
496
496
  it("should perform class manipulation in expected order at end of digest", () => {
497
- element = jqLite('<p class="test-class3">test</p>');
497
+ element = JQLite('<p class="test-class3">test</p>');
498
498
 
499
499
  setupClassManipulationLogger(log);
500
500
 
@@ -509,7 +509,7 @@ xdescribe("$animate", () => {
509
509
  });
510
510
 
511
511
  it("should return a promise which is resolved on a different turn", () => {
512
- element = jqLite('<p class="test2">test</p>');
512
+ element = JQLite('<p class="test2">test</p>');
513
513
 
514
514
  $animate.addClass(element, "test1").then(log.fn("addClass(test1)"));
515
515
  $animate.removeClass(element, "test2").then(log.fn("removeClass(test2)"));
@@ -521,7 +521,7 @@ xdescribe("$animate", () => {
521
521
  expect(log).toEqual(["addClass(test1)", "removeClass(test2)"]);
522
522
 
523
523
  log.reset();
524
- element = jqLite('<p class="test4">test</p>');
524
+ element = JQLite('<p class="test4">test</p>');
525
525
 
526
526
  $rootScope.$apply(() => {
527
527
  $animate.addClass(element, "test3").then(log.fn("addClass(test3)"));
@@ -538,7 +538,7 @@ xdescribe("$animate", () => {
538
538
  it("should defer class manipulation until end of digest for SVG", () => {
539
539
  if (!window.SVGElement) return;
540
540
  setupClassManipulationSpies();
541
- element = jqLite("<svg><g></g></svg>");
541
+ element = JQLite("<svg><g></g></svg>");
542
542
  const target = element.children().eq(0);
543
543
 
544
544
  $rootScope.$apply(() => {
@@ -564,7 +564,7 @@ xdescribe("$animate", () => {
564
564
  it("should defer class manipulation until postDigest when outside of digest for SVG", () => {
565
565
  if (!window.SVGElement) return;
566
566
  setupClassManipulationLogger(log);
567
- element = jqLite('<svg><g class="test-class4"></g></svg>');
567
+ element = JQLite('<svg><g class="test-class4"></g></svg>');
568
568
  const target = element.children().eq(0);
569
569
 
570
570
  $animate.addClass(target, "test-class1");
@@ -588,7 +588,7 @@ xdescribe("$animate", () => {
588
588
 
589
589
  it("should perform class manipulation in expected order at end of digest for SVG", () => {
590
590
  if (!window.SVGElement) return;
591
- element = jqLite('<svg><g class="test-class3"></g></svg>');
591
+ element = JQLite('<svg><g class="test-class3"></g></svg>');
592
592
  const target = element.children().eq(0);
593
593
 
594
594
  setupClassManipulationLogger(log);
@@ -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/cache/cache-factory.spec.js"></script>
14
+ </head>
15
+ <body>
16
+ <div id="dummy"></div>
17
+ </body>
18
+ </html>
@@ -1,6 +1,6 @@
1
1
  import { test, expect } from "@playwright/test";
2
2
 
3
- const TEST_URL = "src/core/cache/cache-factor.html";
3
+ const TEST_URL = "src/core/cache/cache-factory.html";
4
4
 
5
5
  test("unit tests contain no errors", async ({ page }) => {
6
6
  await page.goto(TEST_URL);
@@ -1,5 +1,5 @@
1
1
  import {
2
- jqLite,
2
+ JQLite,
3
3
  getBooleanAttrName,
4
4
  isTextNode,
5
5
  startingTag,
@@ -229,6 +229,12 @@ export function $CompileProvider($provide, $$sanitizeUriProvider) {
229
229
  $provide.factory(name + Suffix, [
230
230
  "$injector",
231
231
  "$exceptionHandler",
232
+ /**
233
+ *
234
+ * @param {*} $injector
235
+ * @param {import('../exception-handler').angular.ErrorHandler} $exceptionHandler
236
+ * @returns
237
+ */
232
238
  function ($injector, $exceptionHandler) {
233
239
  const directives = [];
234
240
  forEach(hasDirectives[name], (directiveFactory, index) => {
@@ -1001,11 +1007,11 @@ export function $CompileProvider($provide, $$sanitizeUriProvider) {
1001
1007
  ignoreDirective,
1002
1008
  previousCompileContext,
1003
1009
  ) {
1004
- if (!($compileNodes instanceof jqLite)) {
1010
+ if (!($compileNodes instanceof JQLite)) {
1005
1011
  // jquery always rewraps, whereas we need to preserve the original selector so that we can
1006
1012
  // modify it.
1007
1013
 
1008
- $compileNodes = jqLite($compileNodes);
1014
+ $compileNodes = JQLite($compileNodes);
1009
1015
  }
1010
1016
 
1011
1017
  /**
@@ -1066,14 +1072,14 @@ export function $CompileProvider($provide, $$sanitizeUriProvider) {
1066
1072
  // might change, so we need to recreate the namespace adapted compileNodes
1067
1073
  // for call to the link function.
1068
1074
  // Note: This will already clone the nodes...
1069
- $linkNode = jqLite(
1075
+ $linkNode = JQLite(
1070
1076
  wrapTemplate(
1071
1077
  namespace,
1072
- jqLite("<div></div>").append($compileNodes).html(),
1078
+ JQLite("<div></div>").append($compileNodes).html(),
1073
1079
  ),
1074
1080
  );
1075
1081
  } else if (cloneConnectFn) {
1076
- $linkNode = jqLite(
1082
+ $linkNode = JQLite(
1077
1083
  Array.from($compileNodes).map((element) =>
1078
1084
  element.cloneNode(true),
1079
1085
  ),
@@ -1128,8 +1134,8 @@ export function $CompileProvider($provide, $$sanitizeUriProvider) {
1128
1134
  * @param {function(ng.IScope, cloneAttachFn=)} transcludeFn A linking function, where the
1129
1135
  * scope argument is auto-generated to the new child of the transcluded parent scope.
1130
1136
  * @param {Element=} $rootElement If the nodeList is the root of the compilation tree then
1131
- * the rootElement must be set the jqLite collection of the compile root. This is
1132
- * needed so that the jqLite collection items can be replaced with widgets.
1137
+ * the rootElement must be set the JQLite collection of the compile root. This is
1138
+ * needed so that the JQLite collection items can be replaced with widgets.
1133
1139
  * @param {number=} maxPriority Max directive priority.
1134
1140
  * @returns {Function} A composite linking function of all of the matched directives or null.
1135
1141
  */
@@ -1510,7 +1516,7 @@ export function $CompileProvider($provide, $$sanitizeUriProvider) {
1510
1516
  nodes.push(node);
1511
1517
  }
1512
1518
 
1513
- return jqLite(nodes);
1519
+ return JQLite(nodes);
1514
1520
  }
1515
1521
 
1516
1522
  /**
@@ -1595,7 +1601,7 @@ export function $CompileProvider($provide, $$sanitizeUriProvider) {
1595
1601
  * scope argument is auto-generated to the new
1596
1602
  * child of the transcluded parent scope.
1597
1603
  * @param {JQLite} jqCollection If we are working on the root of the compile tree then this
1598
- * argument has the root jqLite array so that we can replace nodes
1604
+ * argument has the root JQLite array so that we can replace nodes
1599
1605
  * on it.
1600
1606
  * @param {Object=} originalReplaceDirective An optional directive that will be ignored when
1601
1607
  * compiling the transclusion.
@@ -1627,7 +1633,7 @@ export function $CompileProvider($provide, $$sanitizeUriProvider) {
1627
1633
  let hasTranscludeDirective = false;
1628
1634
  let hasTemplate = false;
1629
1635
  let { hasElementTranscludeDirective } = previousCompileContext;
1630
- let $compileNode = (templateAttrs.$$element = jqLite(compileNode));
1636
+ let $compileNode = (templateAttrs.$$element = JQLite(compileNode));
1631
1637
  let directive;
1632
1638
  let directiveName;
1633
1639
  let $template;
@@ -1755,7 +1761,7 @@ export function $CompileProvider($provide, $$sanitizeUriProvider) {
1755
1761
  hasElementTranscludeDirective = true;
1756
1762
  terminalPriority = directive.priority;
1757
1763
  $template = $compileNode;
1758
- $compileNode = templateAttrs.$$element = jqLite(
1764
+ $compileNode = templateAttrs.$$element = JQLite(
1759
1765
  document.createComment(""),
1760
1766
  );
1761
1767
  compileNode = $compileNode[0];
@@ -1813,7 +1819,7 @@ export function $CompileProvider($provide, $$sanitizeUriProvider) {
1813
1819
 
1814
1820
  // Add the matching elements into their slot
1815
1821
 
1816
- forEach(jqLite($compileNode[0].childNodes), (node) => {
1822
+ forEach(JQLite($compileNode[0].childNodes), (node) => {
1817
1823
  const slotName = slotMap[directiveNormalize(nodeName_(node))];
1818
1824
  if (slotName) {
1819
1825
  filledSlots[slotName] = true;
@@ -1840,7 +1846,7 @@ export function $CompileProvider($provide, $$sanitizeUriProvider) {
1840
1846
  for (const slotName in slots) {
1841
1847
  if (slots[slotName]) {
1842
1848
  // Only define a transclusion function if the slot was filled
1843
- const slotCompileNodes = jqLite(slots[slotName].childNodes);
1849
+ const slotCompileNodes = JQLite(slots[slotName].childNodes);
1844
1850
  slots[slotName] = compilationGenerator(
1845
1851
  mightHaveMultipleTransclusionError,
1846
1852
  slotCompileNodes,
@@ -1849,7 +1855,7 @@ export function $CompileProvider($provide, $$sanitizeUriProvider) {
1849
1855
  }
1850
1856
  }
1851
1857
 
1852
- $template = jqLite($template.childNodes);
1858
+ $template = JQLite($template.childNodes);
1853
1859
  }
1854
1860
 
1855
1861
  $compileNode.empty(); // clear contents
@@ -2076,7 +2082,7 @@ export function $CompileProvider($provide, $$sanitizeUriProvider) {
2076
2082
  attrs = templateAttrs;
2077
2083
  $element = templateAttrs.$$element;
2078
2084
  } else {
2079
- $element = jqLite(linkNode);
2085
+ $element = JQLite(linkNode);
2080
2086
  attrs = new Attributes($element, templateAttrs);
2081
2087
  }
2082
2088
 
@@ -2714,7 +2720,7 @@ export function $CompileProvider($provide, $$sanitizeUriProvider) {
2714
2720
  }
2715
2721
  replaceWith(
2716
2722
  linkRootElement,
2717
- jqLite(beforeTemplateLinkNode),
2723
+ JQLite(beforeTemplateLinkNode),
2718
2724
  linkNode,
2719
2725
  );
2720
2726
 
@@ -3044,12 +3050,12 @@ export function $CompileProvider($provide, $$sanitizeUriProvider) {
3044
3050
  }
3045
3051
 
3046
3052
  /**
3047
- * This is a special jqLite.replaceWith, which can replace items which
3048
- * have no parents, provided that the containing jqLite collection is provided.
3053
+ * This is a special JQLite.replaceWith, which can replace items which
3054
+ * have no parents, provided that the containing JQLite collection is provided.
3049
3055
  *
3050
3056
  * @param {JQLite} $rootElement The root of the compile tree. Used so that we can replace nodes
3051
3057
  * in the root of the tree.
3052
- * @param {JQLite} elementsToRemove The jqLite element which we are going to replace. We keep
3058
+ * @param {JQLite} elementsToRemove The JQLite element which we are going to replace. We keep
3053
3059
  * the shell, but replace its DOM node reference.
3054
3060
  * @param {Node} newNode The new DOM node.
3055
3061
  */
@@ -3105,17 +3111,17 @@ export function $CompileProvider($provide, $$sanitizeUriProvider) {
3105
3111
  // Copy over user data (that includes AngularJS's $scope etc.). Don't copy private
3106
3112
  // data here because there's no public interface in jQuery to do that and copying over
3107
3113
  // event listeners (which is the main use of private data) wouldn't work anyway.
3108
- jqLite.data(newNode, jqLite.data(firstElementToRemove));
3114
+ JQLite.data(newNode, JQLite.data(firstElementToRemove));
3109
3115
 
3110
3116
  // Remove $destroy event listeners from `firstElementToRemove`
3111
- jqLite(firstElementToRemove).off("$destroy");
3117
+ JQLite(firstElementToRemove).off("$destroy");
3112
3118
  }
3113
3119
 
3114
3120
  // Cleanup any data/listeners on the elements and children.
3115
3121
  // This includes invoking the $destroy event on any elements with listeners.
3116
- jqLite.cleanData(fragment.querySelectorAll("*"));
3122
+ JQLite.cleanData(fragment.querySelectorAll("*"));
3117
3123
 
3118
- // Update the jqLite collection to only contain the `newNode`
3124
+ // Update the JQLite collection to only contain the `newNode`
3119
3125
  for (i = 1; i < removeCount; i++) {
3120
3126
  delete elementsToRemove[i];
3121
3127
  }
@@ -3402,7 +3408,7 @@ function tokenDifference(str1, str2) {
3402
3408
  }
3403
3409
 
3404
3410
  function removeComments(jqNodes) {
3405
- jqNodes = jqLite(jqNodes);
3411
+ jqNodes = JQLite(jqNodes);
3406
3412
  let i = jqNodes.length;
3407
3413
 
3408
3414
  if (i <= 1) {
@@ -5,7 +5,7 @@
5
5
  -
6
6
  - - "node" - DOM Node
7
7
  - - "element" - DOM Element or Node
8
- - - "$node" or "$element" - jqLite-wrapped node or element
8
+ - - "$node" or "$element" - JQLite-wrapped node or element
9
9
  -
10
10
  -
11
11
  - Compiler related stuff:
@@ -728,7 +728,7 @@
728
728
  - </div>
729
729
  -
730
730
  - If you want to manually control the insertion and removal of the transcluded content in your directive
731
- - then you must use this transclude function. When you call a transclude function it returns a jqLite/JQuery
731
+ - then you must use this transclude function. When you call a transclude function it returns a JQLite/JQuery
732
732
  - object that contains the compiled DOM, which is linked to the correct transclusion scope.
733
733
  -
734
734
  - When you call a transclusion function you can pass in a **clone attach function**. This function accepts
@@ -1,5 +1,5 @@
1
- import { publishExternalAPI } from "../../public";
2
- import { createInjector } from "../../injector";
1
+ import { publishExternalAPI } from "../public";
2
+ import { createInjector } from "../injector";
3
3
 
4
4
  describe("$$cookieReader", () => {
5
5
  let $$cookieReader;
@@ -0,0 +1,22 @@
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/cookie-reader.spec.js"></script>
14
+ <script type="module" src="/src/core/document.spec.js"></script>
15
+ <script type="module" src="/src/core/on.spec.js"></script>
16
+ <script type="module" src="/src/core/prop.spec.js"></script>
17
+ <script type="module" src="/src/core/root-element.spec.js"></script>
18
+ </head>
19
+ <body>
20
+ <div id="dummy"></div>
21
+ </body>
22
+ </html>
@@ -0,0 +1,12 @@
1
+ import { test, expect } from "@playwright/test";
2
+
3
+ const TEST_URL = "src/core/core.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 { jqLite } from "../../shared/jqlite/jqlite";
1
+ import { publishExternalAPI } from "../public";
2
+ import { createInjector } from "../injector";
3
+ import { JQLite } from "../shared/jqlite/jqlite";
4
4
 
5
5
  describe("$document", () => {
6
6
  let $document, $httpBackend, $http, $$isDocumentHidden;
@@ -15,7 +15,7 @@ describe("$document", () => {
15
15
  });
16
16
 
17
17
  it("should inject $document", () => {
18
- expect($document).toEqual(jqLite(window.document));
18
+ expect($document).toEqual(JQLite(window.document));
19
19
  });
20
20
  });
21
21
 
@@ -1,9 +1,5 @@
1
- /* eslint-disable no-use-before-define */
2
1
  /**
3
- * @ngdoc service
4
2
  * @name $exceptionHandler
5
- * @requires ng.$log
6
- *
7
3
  *
8
4
  * @description
9
5
  * Any uncaught exception in AngularJS expressions is delegated to this service.
@@ -29,35 +25,46 @@
29
25
  * ```
30
26
  *
31
27
  * <hr />
32
- * Note, that code executed in event-listeners (even those registered using jqLite's `on`/`bind`
33
- * methods) does not delegate exceptions to the {@link ng.$exceptionHandler $exceptionHandler}
28
+ * Note, that code executed in event-listeners (even those registered using JQLite's `on`/`bind`
29
+ * methods) does not delegate exceptions to the {@link angular.ErrorHandler }
34
30
  * (unless executed during a digest).
35
31
  *
36
32
  * If you wish, you can manually delegate exceptions, e.g.
37
33
  * `try { ... } catch(e) { $exceptionHandler(e); }`
38
34
  *
39
- * @param {Error} exception Exception associated with the error.
40
- * @param {string=} cause Optional information about the context in which
41
- * the error was thrown.
42
- *
35
+ */
36
+
37
+ /**
38
+ * @typedef {import('../index').angular.ServiceProvider} angular.ExceptionHandlerProvider
39
+ */
40
+
41
+ /** @type {import('../services/log').angular.LogService} */
42
+ let log;
43
+
44
+ /**
45
+ * @callback angular.ErrorHandler
46
+ * @param {Error} exception - Exception associated with the error.
47
+ * @param {string} [cause] - Optional information about the context in which the error was thrown.
48
+ * @returns {void}
49
+ */
50
+ export const errorHandler = (exception, cause) => {
51
+ log.error(exception, cause);
52
+ };
53
+
54
+ /**
55
+ * @constructor
56
+ * @this {angular.ExceptionHandlerProvider}
43
57
  */
44
58
  export function $ExceptionHandlerProvider() {
45
59
  this.$get = [
46
60
  "$log",
61
+ /**
62
+ * @param {import('../services/log').angular.LogService} $log
63
+ * @returns {angular.ErrorHandler}
64
+ */
47
65
  function ($log) {
48
- return function () {
49
- $log.error.apply($log, arguments);
50
- };
66
+ log = $log;
67
+ return errorHandler;
51
68
  },
52
69
  ];
53
70
  }
54
-
55
- // let $log;
56
-
57
- // export function ExceptionHandler(log) {
58
- // $log = log || window.console;
59
-
60
- // return function(exception, cause) {
61
- // $log.error.apply($log, arguments);
62
- // };
63
- // }
@@ -86,6 +86,13 @@ export function $InterpolateProvider() {
86
86
  "$parse",
87
87
  "$exceptionHandler",
88
88
  "$sce",
89
+ /**
90
+ *
91
+ * @param {*} $parse
92
+ * @param {import('../exception-handler').angular.ErrorHandler} $exceptionHandler
93
+ * @param {*} $sce
94
+ * @returns
95
+ */
89
96
  function ($parse, $exceptionHandler, $sce) {
90
97
  const startSymbolLength = startSymbol.length;
91
98
  const endSymbolLength = endSymbol.length;
@@ -10,7 +10,7 @@
10
10
  <script src="/jasmine/jasmine-5.1.2/jasmine-html.js"></script>
11
11
  <script src="/jasmine/jasmine-5.1.2/boot0.js"></script>
12
12
  <script src="/jasmine/jasmine-5.1.2/boot1.js"></script>
13
- <script type="module" src="/src/core/cache/cache-factor.spec.js"></script>
13
+ <script type="module" src="/src/core/location/location.spec.js"></script>
14
14
  </head>
15
15
  <body>
16
16
  <div id="dummy"></div>
@@ -1,4 +1,4 @@
1
- import { jqLite } from "../../shared/jqlite/jqlite";
1
+ import { JQLite } from "../../shared/jqlite/jqlite";
2
2
  import { urlResolve } from "../url-utils/url-utils";
3
3
  import {
4
4
  encodeUriSegment,
@@ -929,7 +929,7 @@ export function $LocationProvider() {
929
929
  )
930
930
  return;
931
931
 
932
- let elm = jqLite(event.target);
932
+ let elm = JQLite(event.target);
933
933
 
934
934
  // traverse the DOM up to find first A tag
935
935
  while (elm[0].nodeName.toLowerCase() !== "a") {