@angular-wave/angular.ts 0.0.37 → 0.0.39

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 (191) hide show
  1. package/Makefile +6 -5
  2. package/dist/angular-ts.esm.js +2 -1
  3. package/dist/angular-ts.umd.js +1 -1
  4. package/package.json +2 -4
  5. package/rollup.config.js +5 -1
  6. package/src/binding.spec.js +4 -4
  7. package/src/core/location/location.js +1 -1
  8. package/src/core/scope/scope.js +4 -7
  9. package/src/exts/aria/aria.html +1 -4
  10. package/src/exts/messages/messages.html +1 -4
  11. package/src/index.js +307 -1
  12. package/src/loader.js +13 -6
  13. package/src/public.js +7 -2
  14. package/src/router/directives/directives.test.js +19 -0
  15. package/src/router/directives/state-directives.html +21 -0
  16. package/src/router/{state-directives.spec.js → directives/state-directives.spec.js} +2 -1
  17. package/src/router/{view-directive.spec.js → directives/view-directive.spec.js} +2 -1
  18. package/src/router/directives/view-directives.html +21 -0
  19. package/src/router/router.html +22 -0
  20. package/src/router/router.test.js +11 -0
  21. package/src/router/services.spec.js +2 -2
  22. package/src/router/{state-builder.spec.js → state/state-builder.spec.js} +9 -12
  23. package/src/router/state/state.html +22 -0
  24. package/src/router/{state.spec.js → state/state.spec.js} +1 -1
  25. package/src/router/state/state.test.js +11 -0
  26. package/src/router/state-filter.spec.js +2 -2
  27. package/src/router/template-factory.spec.js +4 -4
  28. package/src/router/url/url.html +18 -0
  29. package/src/router/url/url.test.js +11 -0
  30. package/src/router/view/view.html +18 -0
  31. package/src/router/{view.spec.js → view/view.spec.js} +1 -1
  32. package/src/router/view/view.test.js +11 -0
  33. package/src/router/view-hook.spec.js +4 -4
  34. package/src/router/view-scroll.spec.js +4 -4
  35. package/src/services/http/http.html +22 -0
  36. package/src/services/http/http.test.js +11 -0
  37. package/src/services/http-backend/http-backend.html +21 -0
  38. package/src/services/http-backend/http-backend.js +1 -1
  39. package/src/services/http-backend/http-backend.spec.js +1 -1
  40. package/src/services/http-backend/http-backend.test.js +11 -0
  41. package/src/shared/common.spec.js +4 -4
  42. package/src/shared/hof.spec.js +1 -1
  43. package/src/shared/min-err.spec.js +2 -2
  44. package/src/shared/shared.html +22 -0
  45. package/src/shared/shared.test.js +11 -0
  46. package/src/shared/test-utils.js +2 -2
  47. package/src/shared/utils.spec.js +1 -1
  48. package/src/src.html +22 -0
  49. package/src/src.test.js +10 -0
  50. package/tsconfig.json +1 -1
  51. package/tsconfig.types.json +11 -0
  52. package/types/animations/animate-cache.d.ts +7 -7
  53. package/types/animations/animate-children-directive.d.ts +3 -6
  54. package/types/animations/animate-swap.d.ts +7 -16
  55. package/types/animations/animation.d.ts +2 -11
  56. package/types/animations/raf-scheduler.d.ts +3 -3
  57. package/types/animations/shared.d.ts +8 -23
  58. package/types/core/{animate-css.d.ts → animate/animate-css.d.ts} +2 -8
  59. package/types/core/{cache.d.ts → cache/cache.d.ts} +5 -5
  60. package/types/core/compile/compile.d.ts +173 -0
  61. package/types/core/controller/controller.d.ts +32 -0
  62. package/types/core/exception-handler.d.ts +1 -1
  63. package/types/core/filter/filter.d.ts +9 -0
  64. package/types/core/{interpolate.d.ts → interpolate/interpolate.d.ts} +23 -39
  65. package/types/core/interval/interval-factory.d.ts +4 -0
  66. package/types/core/{interval.d.ts → interval/interval.d.ts} +1 -1
  67. package/types/core/location/location.d.ts +209 -0
  68. package/types/core/pubsub/pubsub.d.ts +156 -0
  69. package/types/core/q/q.d.ts +31 -0
  70. package/types/core/sanitize/sanitize-uri.d.ts +53 -0
  71. package/types/core/{sce.d.ts → sce/sce.d.ts} +80 -86
  72. package/types/core/scope/scope.d.ts +727 -0
  73. package/types/core/task-tracker-factory.d.ts +29 -29
  74. package/types/core/timeout/timeout.d.ts +20 -0
  75. package/types/core/{urlUtils.d.ts → url-utils/url-utils.d.ts} +2 -7
  76. package/types/directive/{bind.d.ts → bind/bind.d.ts} +4 -10
  77. package/types/directive/{class.d.ts → class/class.d.ts} +12 -21
  78. package/types/directive/controller/controller.d.ts +6 -0
  79. package/types/directive/events/events.d.ts +5 -0
  80. package/types/directive/form/form.d.ts +200 -0
  81. package/types/directive/if/if.d.ts +8 -0
  82. package/types/directive/include/include.d.ts +14 -0
  83. package/types/directive/{input.d.ts → input/input.d.ts} +20 -69
  84. package/types/directive/{model.d.ts → model/model.d.ts} +256 -279
  85. package/types/directive/options/options.d.ts +9 -0
  86. package/types/directive/ref/ref.d.ts +5 -0
  87. package/types/directive/repeat/repeat.d.ts +8 -0
  88. package/types/directive/{script.d.ts → script/script.d.ts} +5 -8
  89. package/types/directive/{show-hide.d.ts → show-hide/show-hide.d.ts} +10 -16
  90. package/types/directive/switch/switch.d.ts +17 -0
  91. package/types/directive/transclude/transclude.d.ts +4 -0
  92. package/types/directive/{validators.d.ts → validators/validators.d.ts} +20 -35
  93. package/types/filters/filters.d.ts +10 -16
  94. package/types/filters/order-by.d.ts +2 -4
  95. package/types/index.d.ts +117 -0
  96. package/types/injector.d.ts +12 -0
  97. package/types/public.d.ts +5 -0
  98. package/types/router/common/coreservices.d.ts +2 -2
  99. package/types/router/common/glob.d.ts +9 -9
  100. package/types/router/common/queue.d.ts +13 -13
  101. package/types/router/common/trace.d.ts +43 -43
  102. package/types/router/directives/view-directive.d.ts +13 -32
  103. package/types/router/globals.d.ts +20 -20
  104. package/types/router/hooks/lazy-load.d.ts +2 -11
  105. package/types/router/hooks/redirect-to.d.ts +1 -4
  106. package/types/router/hooks/url.d.ts +1 -5
  107. package/types/router/hooks/views.d.ts +1 -4
  108. package/types/router/params/param-factory.d.ts +5 -5
  109. package/types/router/params/param-type.d.ts +35 -35
  110. package/types/router/params/param-types.d.ts +11 -11
  111. package/types/router/params/param.d.ts +38 -38
  112. package/types/router/params/state-params.d.ts +10 -10
  113. package/types/router/path/path-node.d.ts +34 -34
  114. package/types/router/path/path-utils.d.ts +73 -77
  115. package/types/router/resolve/resolvable.d.ts +32 -32
  116. package/types/router/resolve/resolve-context.d.ts +84 -84
  117. package/types/router/services.d.ts +4 -9
  118. package/types/router/state/state-builder.d.ts +27 -27
  119. package/types/router/state/state-matcher.d.ts +5 -5
  120. package/types/router/state/state-object.d.ts +58 -58
  121. package/types/router/state/state-queue-manager.d.ts +10 -16
  122. package/types/router/state/state-registry.d.ts +100 -107
  123. package/types/router/state/state-service.d.ts +411 -411
  124. package/types/router/state/target-state.d.ts +64 -69
  125. package/types/router/state/views.d.ts +31 -37
  126. package/types/router/state-filters.d.ts +7 -7
  127. package/types/router/state-provider.d.ts +105 -105
  128. package/types/router/template-factory.d.ts +83 -112
  129. package/types/router/transition/hook-builder.d.ts +25 -25
  130. package/types/router/transition/hook-registry.d.ts +68 -83
  131. package/types/router/transition/interface.d.ts +7 -7
  132. package/types/router/transition/reject-factory.d.ts +34 -34
  133. package/types/router/transition/transition-event-type.d.ts +9 -18
  134. package/types/router/transition/transition-hook.d.ts +77 -82
  135. package/types/router/transition/transition-service.d.ts +82 -99
  136. package/types/router/transition/transition.d.ts +369 -377
  137. package/types/router/url/url-config.d.ts +84 -84
  138. package/types/router/url/url-matcher.d.ts +115 -119
  139. package/types/router/url/url-rule.d.ts +114 -124
  140. package/types/router/url/url-rules.d.ts +217 -217
  141. package/types/router/url/url-service.d.ts +264 -269
  142. package/types/router/view/view.d.ts +114 -117
  143. package/types/router/view-scroll.d.ts +2 -2
  144. package/types/services/anchor-scroll.d.ts +2 -8
  145. package/types/services/browser.d.ts +122 -130
  146. package/types/services/cache-factory.d.ts +25 -25
  147. package/types/services/cookie-reader.d.ts +2 -2
  148. package/types/services/document.d.ts +2 -2
  149. package/types/services/http/http.d.ts +145 -0
  150. package/types/services/{http-backend.d.ts → http-backend/http-backend.d.ts} +3 -35
  151. package/types/services/log.d.ts +49 -49
  152. package/types/services/template-request.d.ts +44 -53
  153. package/types/shared/common.d.ts +4 -19
  154. package/types/{constants.d.ts → shared/constants.d.ts} +6 -6
  155. package/types/shared/hof.d.ts +1 -1
  156. package/types/{jqLite.d.ts → shared/jqlite/jqlite.d.ts} +11 -11
  157. package/types/shared/test-utils.d.ts +11 -0
  158. package/types/shared/utils.d.ts +7 -24
  159. package/types-back/global.d.ts +3 -1
  160. package/types-back/index.d.ts +2 -221
  161. package/types/core/compile.d.ts +0 -206
  162. package/types/core/controller.d.ts +0 -42
  163. package/types/core/filter.d.ts +0 -9
  164. package/types/core/interval-factory.d.ts +0 -21
  165. package/types/core/location.d.ts +0 -234
  166. package/types/core/pubsub.d.ts +0 -164
  167. package/types/core/q.d.ts +0 -33
  168. package/types/core/root-scope.d.ts +0 -754
  169. package/types/core/sanitize-uri.d.ts +0 -57
  170. package/types/core/timeout.d.ts +0 -31
  171. package/types/directive/controller.d.ts +0 -6
  172. package/types/directive/events.d.ts +0 -12
  173. package/types/directive/form.d.ts +0 -230
  174. package/types/directive/if.d.ts +0 -17
  175. package/types/directive/include.d.ts +0 -33
  176. package/types/directive/options.d.ts +0 -16
  177. package/types/directive/ref.d.ts +0 -11
  178. package/types/directive/repeat.d.ts +0 -23
  179. package/types/directive/switch.d.ts +0 -23
  180. package/types/directive/transclude.d.ts +0 -15
  181. package/types/services/http.d.ts +0 -157
  182. /package/src/router/{url-service.spec.js → url/url-service.spec.js} +0 -0
  183. /package/types/directive/{attrs.d.ts → attrs/attrs.d.ts} +0 -0
  184. /package/types/directive/{change.d.ts → change/change.d.ts} +0 -0
  185. /package/types/directive/{cloak.d.ts → cloak/cloak.d.ts} +0 -0
  186. /package/types/directive/{init.d.ts → init/init.d.ts} +0 -0
  187. /package/types/directive/{list.d.ts → list/list.d.ts} +0 -0
  188. /package/types/directive/{non-bindable.d.ts → non-bindable/non-bindable.d.ts} +0 -0
  189. /package/types/directive/{style.d.ts → style/style.d.ts} +0 -0
  190. /package/types/exts/{aria.d.ts → aria/aria.d.ts} +0 -0
  191. /package/types/exts/{messages.d.ts → messages/messages.d.ts} +0 -0
@@ -1,6 +1,7 @@
1
- import { StateBuilder } from "../../router/state/stateBuilder";
1
+ import { StateBuilder } from "../../router/state/state-builder";
2
2
 
3
- describe("Ng1 StateBuilder", function () {
3
+ // TODO refactor this to url service
4
+ xdescribe("StateBuilder", function () {
4
5
  const parent = { name: "" };
5
6
  let builder,
6
7
  matcher,
@@ -15,7 +16,7 @@ describe("Ng1 StateBuilder", function () {
15
16
  builder.builder("views", ng1ViewsBuilder);
16
17
  });
17
18
 
18
- it("should use the state object to build a default view, when no `views` property is found", function () {
19
+ xit("should use the state object to build a default view, when no `views` property is found", function () {
19
20
  const config = {
20
21
  url: "/foo",
21
22
  templateUrl: "/foo.html",
@@ -34,7 +35,7 @@ describe("Ng1 StateBuilder", function () {
34
35
  );
35
36
  });
36
37
 
37
- it("It should use the views object to build views, when defined", function () {
38
+ xit("It should use the views object to build views, when defined", function () {
38
39
  const config = { a: { foo: "bar", controller: "FooController" } };
39
40
  const builtViews = builder.builder("views")({
40
41
  parent: parent,
@@ -44,9 +45,7 @@ describe("Ng1 StateBuilder", function () {
44
45
  expect(builtViews.a.controller).toEqual(config.a.controller);
45
46
  });
46
47
 
47
- it("should not allow a view config with both component and template keys", inject(function (
48
- $injector,
49
- ) {
48
+ xit("should not allow a view config with both component and template keys", function () {
50
49
  const config = {
51
50
  name: "foo",
52
51
  url: "/foo",
@@ -68,14 +67,12 @@ describe("Ng1 StateBuilder", function () {
68
67
  expect(() =>
69
68
  builder.builder("views")(Object.assign({ bindings: {} }, config)),
70
69
  ).toThrow();
71
- }));
70
+ });
72
71
 
73
- it("should replace a resolve: string value with a function that injects the service of the same name", inject(function (
74
- $injector,
75
- ) {
72
+ it("should replace a resolve: string value with a function that injects the service of the same name", function () {
76
73
  const config = { resolve: { foo: "bar" } };
77
74
  expect(builder.builder("resolvables")).toBeDefined();
78
75
  const built = builder.builder("resolvables")(config);
79
76
  expect(built[0].deps).toEqual(["bar"]);
80
- }));
77
+ });
81
78
  });
@@ -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
14
+ type="module"
15
+ src="/src/router/state/state-builder.spec.js"
16
+ ></script>
17
+ <script type="module" src="/src/router/state/state.spec.js"></script>
18
+ </head>
19
+ <body>
20
+ <div id="dummy"></div>
21
+ </body>
22
+ </html>
@@ -2,7 +2,7 @@ import { dealoc, jqLite } from "../../shared/jqlite/jqlite";
2
2
  import { Angular } from "../../loader";
3
3
  import { publishExternalAPI } from "../../public";
4
4
  import { isFunction } from "../../shared/utils";
5
- import { wait } from "../test-utils";
5
+ import { wait } from "../../shared/test-utils";
6
6
 
7
7
  describe("$state", () => {
8
8
  let $injector, template, ctrlName, $provide, $compile, module, $stateRegistry;
@@ -0,0 +1,11 @@
1
+ import { test, expect } from "@playwright/test";
2
+
3
+ const TEST_URL = "src/router/state/state.html";
4
+
5
+ test("unit tests contain no errors", async ({ page }) => {
6
+ await page.goto(TEST_URL);
7
+ await page.content();
8
+ await expect(page.locator(".jasmine-overall-result")).toHaveText(
9
+ /0 failures/,
10
+ );
11
+ });
@@ -1,5 +1,5 @@
1
- import { Angular } from "../../loader";
2
- import { publishExternalAPI } from "../../public";
1
+ import { Angular } from "../loader";
2
+ import { publishExternalAPI } from "../public";
3
3
 
4
4
  describe("router filters", function () {
5
5
  let module, $parse, $state, $q, $rootScope, $location;
@@ -1,7 +1,7 @@
1
- import { dealoc, jqLite } from "../../shared/jqlite/jqlite";
2
- import { Angular } from "../../loader";
3
- import { publishExternalAPI } from "../../public";
4
- import { wait } from "../test-utils";
1
+ import { dealoc, jqLite } from "../shared/jqlite/jqlite";
2
+ import { Angular } from "../loader";
3
+ import { publishExternalAPI } from "../public";
4
+ import { wait } from "../shared/test-utils";
5
5
 
6
6
  describe("templateFactory", () => {
7
7
  let $injector,
@@ -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/router/url/url-service.spec.js"></script>
14
+ </head>
15
+ <body>
16
+ <div id="dummy"></div>
17
+ </body>
18
+ </html>
@@ -0,0 +1,11 @@
1
+ import { test, expect } from "@playwright/test";
2
+
3
+ const TEST_URL = "src/router/url/url.html";
4
+
5
+ test("unit tests contain no errors", async ({ page }) => {
6
+ await page.goto(TEST_URL);
7
+ await page.content();
8
+ await expect(page.locator(".jasmine-overall-result")).toHaveText(
9
+ /0 failures/,
10
+ );
11
+ });
@@ -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/router/view/view.spec.js"></script>
14
+ </head>
15
+ <body>
16
+ <div id="dummy"></div>
17
+ </body>
18
+ </html>
@@ -13,7 +13,7 @@ import {
13
13
  import { PathNode } from "../../router/path/path-node";
14
14
  import { PathUtils } from "../../router/path/path-utils";
15
15
  import { tail } from "../../shared/common";
16
- import { wait } from "../test-utils";
16
+ import { wait } from "../../shared/test-utils";
17
17
 
18
18
  describe("view", () => {
19
19
  let scope,
@@ -0,0 +1,11 @@
1
+ import { test, expect } from "@playwright/test";
2
+
3
+ const TEST_URL = "src/router/view/view.html";
4
+
5
+ test("unit tests contain no errors", async ({ page }) => {
6
+ await page.goto(TEST_URL);
7
+ await page.content();
8
+ await expect(page.locator(".jasmine-overall-result")).toHaveText(
9
+ /0 failures/,
10
+ );
11
+ });
@@ -1,7 +1,7 @@
1
- import { dealoc, jqLite } from "../../shared/jqlite/jqlite";
2
- import { Angular } from "../../loader";
3
- import { publishExternalAPI } from "../../public";
4
- import { wait } from "../test-utils";
1
+ import { dealoc } from "../shared/jqlite/jqlite";
2
+ import { Angular } from "../loader";
3
+ import { publishExternalAPI } from "../public";
4
+ import { wait } from "../shared/test-utils";
5
5
 
6
6
  describe("view hooks", () => {
7
7
  let app,
@@ -1,7 +1,7 @@
1
- import { dealoc, jqLite } from "../../shared/jqlite/jqlite";
2
- import { Angular } from "../../loader";
3
- import { publishExternalAPI } from "../../public";
4
- import { wait } from "../test-utils";
1
+ import { dealoc } from "../shared/jqlite/jqlite";
2
+ import { Angular } from "../loader";
3
+ import { publishExternalAPI } from "../public";
4
+ import { wait } from "../shared/test-utils";
5
5
 
6
6
  describe("ngView", () => {
7
7
  describe("scrollIntoView", () => {
@@ -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/services/http/http.spec.js"></script>
14
+ <script
15
+ type="module"
16
+ src="/src/services/http/template-request.spec.js"
17
+ ></script>
18
+ </head>
19
+ <body>
20
+ <div id="dummy"></div>
21
+ </body>
22
+ </html>
@@ -0,0 +1,11 @@
1
+ import { test, expect } from "@playwright/test";
2
+
3
+ const TEST_URL = "src/services/http/http.html";
4
+
5
+ test("unit tests contain no errors", async ({ page }) => {
6
+ await page.goto(TEST_URL);
7
+ await page.content();
8
+ await expect(page.locator(".jasmine-overall-result")).toHaveText(
9
+ /0 failures/,
10
+ );
11
+ });
@@ -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/services/http-backend/http-backend.spec.js"
16
+ ></script>
17
+ </head>
18
+ <body>
19
+ <div id="dummy"></div>
20
+ </body>
21
+ </html>
@@ -201,7 +201,7 @@ export function createHttpBackend($browser, createXhr, $browserDefer) {
201
201
  ) {
202
202
  // cancel timeout and subsequent timeout promise resolution
203
203
  if (isDefined(timeoutId)) {
204
- $browserDefer.cancel(timeoutId);
204
+ $browser.cancel(timeoutId);
205
205
  }
206
206
  xhr = null;
207
207
 
@@ -1,6 +1,6 @@
1
1
  import { createInjector } from "../../injector";
2
2
  import { publishExternalAPI } from "../../public";
3
- import { createHttpBackend } from "../../services/http-backend";
3
+ import { createHttpBackend } from "./http-backend";
4
4
  import sinon from "sinon";
5
5
 
6
6
  describe("$httpBackend", () => {
@@ -0,0 +1,11 @@
1
+ import { test, expect } from "@playwright/test";
2
+
3
+ const TEST_URL = "src/services/http-backend/http-backend.html";
4
+
5
+ test("unit tests contain no errors", async ({ page }) => {
6
+ await page.goto(TEST_URL);
7
+ await page.content();
8
+ await expect(page.locator(".jasmine-overall-result")).toHaveText(
9
+ /0 failures/,
10
+ );
11
+ });
@@ -1,7 +1,7 @@
1
- import { defaults, filter, map, mapObj, pick } from "../../shared/common";
2
- import { is, eq, not, pattern, val } from "../../shared/hof";
3
- import { isInjectable } from "../../shared/predicates";
4
- import { Queue } from "../../router/common/queue";
1
+ import { defaults, filter, map, mapObj, pick } from "./common";
2
+ import { is, eq, not, pattern, val } from "./hof";
3
+ import { isInjectable } from "./predicates";
4
+ import { Queue } from "../router/common/queue";
5
5
 
6
6
  describe("common", function () {
7
7
  describe("filter", function () {
@@ -1,4 +1,4 @@
1
- import { curry } from "../../shared/hof";
1
+ import { curry } from "./hof";
2
2
 
3
3
  describe("curry", () => {
4
4
  let original;
@@ -1,5 +1,5 @@
1
- import { minErr, isDefined, toDebugString } from "./shared/utils";
2
- import { errorHandlingConfig } from "./loader";
1
+ import { minErr, isDefined, toDebugString } from "./utils";
2
+ import { errorHandlingConfig } from "../loader";
3
3
 
4
4
  describe("errors", () => {
5
5
  afterEach(() => {});
@@ -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/shared/common.spec.js"></script>
14
+ <script type="module" src="/src/shared/hof.spec.js"></script>
15
+ <script type="module" src="/src/shared/min-err.spec.js"></script>
16
+ <script type="module" src="/src/shared/strings.spec.js"></script>
17
+ <script type="module" src="/src/shared/utils.spec.js"></script>
18
+ </head>
19
+ <body>
20
+ <div id="dummy"></div>
21
+ </body>
22
+ </html>
@@ -0,0 +1,11 @@
1
+ import { test, expect } from "@playwright/test";
2
+
3
+ const TEST_URL = "src/shared/shared.html";
4
+
5
+ test("unit tests contain no errors", async ({ page }) => {
6
+ await page.goto(TEST_URL);
7
+ await page.content();
8
+ await expect(page.locator(".jasmine-overall-result")).toHaveText(
9
+ /0 failures/,
10
+ );
11
+ });
@@ -1,4 +1,4 @@
1
- import { jqLite } from "../shared/jqlite/jqlite";
1
+ import { jqLite } from "./jqlite/jqlite";
2
2
 
3
3
  /**
4
4
  * @param {HTMLElement} element
@@ -16,5 +16,5 @@ export function browserTrigger(element, event) {
16
16
  * @returns
17
17
  */
18
18
  export function wait(t) {
19
- return new Promise((resolve, _) => setTimeout(resolve, t));
19
+ return new Promise((resolve) => setTimeout(resolve, t));
20
20
  }
@@ -1,4 +1,4 @@
1
- import { hashKey } from "../../shared/utils";
1
+ import { hashKey } from "./utils";
2
2
 
3
3
  describe("api", () => {
4
4
  describe("hashKey()", () => {
package/src/src.html ADDED
@@ -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/angular.spec.js"></script>
14
+ <script type="module" src="/src/binding.spec.js"></script>
15
+ <script type="module" src="/src/injector.spec.js"></script>
16
+ <script type="module" src="/src/loader.spec.js"></script>
17
+ <script type="module" src="/src/public.spec.js"></script>
18
+ </head>
19
+ <body>
20
+ <div id="dummy"></div>
21
+ </body>
22
+ </html>
@@ -0,0 +1,10 @@
1
+ import { test, expect } from "@playwright/test";
2
+
3
+ test("unitstate-directives tests contain no errors", async ({ page }) => {
4
+ await page.goto("src/src.html");
5
+ await page.content();
6
+ await page.waitForTimeout(6000);
7
+ await expect(page.locator(".jasmine-overall-result")).toHaveText(
8
+ /0 failures/,
9
+ );
10
+ });
package/tsconfig.json CHANGED
@@ -13,5 +13,5 @@
13
13
  "typeRoots": ["node_modules/@types"]
14
14
  },
15
15
  "include": ["./src/*.js", "./**/*.ts"],
16
- "exclude": []
16
+ "exclude": ["**/*.test.js", "**/*.spec.js"]
17
17
  }
@@ -0,0 +1,11 @@
1
+ {
2
+ "compilerOptions": {
3
+ "declaration": true,
4
+ "allowJs": true,
5
+ "emitDeclarationOnly": true,
6
+ "outDir": "types"
7
+ },
8
+ "include": ["src/**/*.js"],
9
+ "exclude": ["**/*.spec.js", "**/*.test.js"]
10
+ }
11
+
@@ -1,12 +1,12 @@
1
1
  export function animateCache(): {
2
- cacheKey(node: any, method: any, addClass: any, removeClass: any): string;
3
- containsCachedAnimationWithoutDuration(key: any): boolean;
4
- flush(): void;
5
- count(key: any): any;
6
- get(key: any): any;
7
- put(key: any, value: any, isValid: any): void;
2
+ cacheKey(node: any, method: any, addClass: any, removeClass: any): string;
3
+ containsCachedAnimationWithoutDuration(key: any): boolean;
4
+ flush(): void;
5
+ count(key: any): any;
6
+ get(key: any): any;
7
+ put(key: any, value: any, isValid: any): void;
8
8
  };
9
9
  export function $$AnimateCacheProvider(): void;
10
10
  export class $$AnimateCacheProvider {
11
- $get: (typeof animateCache)[];
11
+ $get: (typeof animateCache)[];
12
12
  }
@@ -76,9 +76,6 @@
76
76
  </file>
77
77
  </example>
78
78
  */
79
- export const $$AnimateChildrenDirective: (
80
- | string
81
- | (($interpolate: any) => {
82
- link(scope: any, element: any, attrs: any): void;
83
- })
84
- )[];
79
+ export const $$AnimateChildrenDirective: (string | (($interpolate: any) => {
80
+ link(scope: any, element: any, attrs: any): void;
81
+ }))[];
@@ -85,19 +85,10 @@
85
85
  * </file>
86
86
  * </example>
87
87
  */
88
- export const ngAnimateSwapDirective: (
89
- | string
90
- | (($animate: any) => {
91
- restrict: string;
92
- transclude: string;
93
- terminal: boolean;
94
- priority: number;
95
- link(
96
- scope: any,
97
- $element: any,
98
- attrs: any,
99
- ctrl: any,
100
- $transclude: any,
101
- ): void;
102
- })
103
- )[];
88
+ export const ngAnimateSwapDirective: (string | (($animate: any) => {
89
+ restrict: string;
90
+ transclude: string;
91
+ terminal: boolean;
92
+ priority: number;
93
+ link(scope: any, $element: any, attrs: any, ctrl: any, $transclude: any): void;
94
+ }))[];
@@ -1,14 +1,5 @@
1
1
  export function $$AnimationProvider(): void;
2
2
  export class $$AnimationProvider {
3
- drivers: any[];
4
- $get: (
5
- | string
6
- | ((
7
- $rootScope: any,
8
- $injector: any,
9
- $$AnimateRunner: any,
10
- $$rAFScheduler: any,
11
- $$animateCache: any,
12
- ) => (element: any, event: any, options: any) => any)
13
- )[];
3
+ drivers: any[];
4
+ $get: (string | (($rootScope: any, $injector: any, $$AnimateRunner: any, $$rAFScheduler: any, $$animateCache: any) => (element: any, event: any, options: any) => any))[];
14
5
  }
@@ -1,5 +1,5 @@
1
1
  export const $$rAFSchedulerFactory: (() => {
2
- (tasks: any): void;
3
- queue: any[];
4
- waitUntilQuiet(fn: any): void;
2
+ (tasks: any): void;
3
+ queue: any[];
4
+ waitUntilQuiet(fn: any): void;
5
5
  })[];
@@ -1,40 +1,25 @@
1
1
  export function assertArg(arg: any, name: any, reason: any): any;
2
2
  export function mergeClasses(a: any, b: any): any;
3
3
  export function packageStyles(options: any): {
4
- to: any;
5
- from: any;
4
+ to: any;
5
+ from: any;
6
6
  };
7
7
  export function pendClasses(classes: any, fix: any, isPrefix: any): string;
8
8
  export function removeFromArray(arr: any, val: any): void;
9
9
  export function stripCommentsFromElement(element: any): any;
10
10
  export function extractElementNode(element: any): any;
11
- export function applyAnimationClassesFactory(): (
12
- element: any,
13
- options: any,
14
- ) => void;
11
+ export function applyAnimationClassesFactory(): (element: any, options: any) => void;
15
12
  export function prepareAnimationOptions(options: any): any;
16
13
  export function applyAnimationStyles(element: any, options: any): void;
17
14
  export function applyAnimationFromStyles(element: any, options: any): void;
18
15
  export function applyAnimationToStyles(element: any, options: any): void;
19
- export function mergeAnimationDetails(
20
- element: any,
21
- oldAnimation: any,
22
- newAnimation: any,
23
- ): any;
24
- export function resolveElementClasses(
25
- existing: any,
26
- toAdd: any,
27
- toRemove: any,
28
- ): {
29
- addClass: string;
30
- removeClass: string;
16
+ export function mergeAnimationDetails(element: any, oldAnimation: any, newAnimation: any): any;
17
+ export function resolveElementClasses(existing: any, toAdd: any, toRemove: any): {
18
+ addClass: string;
19
+ removeClass: string;
31
20
  };
32
21
  export function getDomNode(element: any): any;
33
- export function applyGeneratedPreparationClasses(
34
- element: any,
35
- event: any,
36
- options: any,
37
- ): void;
22
+ export function applyGeneratedPreparationClasses(element: any, event: any, options: any): void;
38
23
  export function clearGeneratedClasses(element: any, options: any): void;
39
24
  export function blockKeyframeAnimations(node: any, applyBlock: any): string[];
40
25
  export function applyInlineStyle(node: any, styleTuple: any): void;
@@ -12,14 +12,8 @@
12
12
  */
13
13
  export function CoreAnimateCssProvider(): void;
14
14
  export class CoreAnimateCssProvider {
15
- $get: (
16
- | string
17
- | (($$AnimateRunner: any) => (
18
- element: any,
19
- initialOptions: any,
20
- ) => {
15
+ $get: (string | (($$AnimateRunner: any) => (element: any, initialOptions: any) => {
21
16
  start: () => any;
22
17
  end: () => any;
23
- })
24
- )[];
18
+ }))[];
25
19
  }
@@ -17,9 +17,9 @@ export const EXPANDO: "ngId";
17
17
  */
18
18
  export const CACHE: Map<number, ExpandoStore>;
19
19
  export type ExpandoStore = {
20
- data: {
21
- [x: string]: any;
22
- };
23
- events: any;
24
- handle: Function | null;
20
+ data: {
21
+ [x: string]: any;
22
+ };
23
+ events: any;
24
+ handle: Function | null;
25
25
  };