@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
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { isInjectable, isNull, isPromise } from "./predicates";
9
9
  import { isUndefined, isFunction, isString, isObject } from "./utils";
10
- import { identity, pushR, tail } from "./common";
10
+ import { pushR, tail } from "./common";
11
11
  import { pattern, val } from "./hof";
12
12
  /**
13
13
  * Returns a string shortened to a maximum length
@@ -75,7 +75,7 @@ export function stringify(o) {
75
75
  [isRejection, (x) => x._transitionRejection.toString()],
76
76
  [hasToString, (x) => x.toString()],
77
77
  [isInjectable, functionToString],
78
- [val(true), identity],
78
+ [val(true), (x) => x],
79
79
  ]);
80
80
  function format(value) {
81
81
  if (isObject(value)) {
@@ -1,11 +1,11 @@
1
- import { jqLite } from "./jqlite/jqlite";
1
+ import { JQLite } from "./jqlite/jqlite";
2
2
 
3
3
  /**
4
4
  * @param {HTMLElement} element
5
5
  * @param {string} event
6
6
  */
7
7
  export function browserTrigger(element, event) {
8
- jqLite(element)[0].dispatchEvent(
8
+ JQLite(element)[0].dispatchEvent(
9
9
  new Event(event, { bubbles: true, cancelable: true }),
10
10
  );
11
11
  }
@@ -52,8 +52,8 @@ export function isArrayLike(obj) {
52
52
  if (obj == null || isWindow(obj)) return false;
53
53
 
54
54
  // arrays, strings and jQuery/jqLite objects are array like
55
- // * we have to check the existence of jqLite first as this method is called
56
- // via the forEach method when constructing the jqLite object in the first place
55
+ // * we have to check the existence of JQLite first as this method is called
56
+ // via the forEach method when constructing the JQLite object in the first place
57
57
  if (Array.isArray(obj) || obj instanceof Array || isString(obj)) return true;
58
58
 
59
59
  // Support: iOS 8.2 (not reproducible in simulator)
@@ -1174,6 +1174,8 @@ export function assertArgFn(arg, name, acceptArrayAnnotation) {
1174
1174
  return arg;
1175
1175
  }
1176
1176
 
1177
+ export const minErrConfig = {};
1178
+
1177
1179
  /**
1178
1180
  * @description
1179
1181
  *
@@ -1201,21 +1203,16 @@ export function assertArgFn(arg, name, acceptArrayAnnotation) {
1201
1203
  * @param {string} module The namespace to use for the new minErr instance.
1202
1204
  * @returns {function(string, string, ...*): Error} minErr instance
1203
1205
  */
1204
-
1205
- export const minErrConfig = {};
1206
-
1207
1206
  export function minErr(module) {
1208
1207
  const url = 'https://errors.angularjs.org/"NG_VERSION_FULL"/';
1209
1208
  const regex = `${url.replace(".", "\\.")}[\\s\\S]*`;
1210
1209
  const errRegExp = new RegExp(regex, "g");
1211
1210
 
1212
- return function () {
1213
- const code = arguments[0];
1214
- const template = arguments[1];
1211
+ return function (...args) {
1212
+ const code = args[0];
1213
+ const template = args[1];
1215
1214
  let message = `[${module ? `${module}:` : ""}${code}] `;
1216
- const templateArgs = sliceArgs(arguments, 2).map((arg) =>
1217
- toDebugString(arg),
1218
- );
1215
+ const templateArgs = sliceArgs(args, 2).map((arg) => toDebugString(arg));
1219
1216
  let paramPrefix;
1220
1217
  let i;
1221
1218
 
@@ -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;
@@ -62,4 +47,4 @@ export const ANIMATION_DELAY_PROP: string;
62
47
  export const ANIMATION_DURATION_PROP: string;
63
48
  export const TRANSITION_DELAY_PROP: string;
64
49
  export const TRANSITION_DURATION_PROP: string;
65
- export const ngMinErr: (...args: any[]) => Error;
50
+ export const ngMinErr: (arg0: string, arg1: string, ...arg2: any[]) => Error;
@@ -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
  };
@@ -0,0 +1,173 @@
1
+ export function $CompileProvider($provide: any, $$sanitizeUriProvider: any): void;
2
+ export class $CompileProvider {
3
+ constructor($provide: any, $$sanitizeUriProvider: any);
4
+ /**
5
+ * @ngdoc method
6
+ * @name $compileProvider#directive
7
+ * @kind function
8
+ *
9
+ * @description
10
+ * Register a new directive with the compiler.
11
+ *
12
+ * @param {string|Object} name Name of the directive in camel-case (i.e. `ngBind` which will match
13
+ * as `ng-bind`), or an object map of directives where the keys are the names and the values
14
+ * are the factories.
15
+ * @param {Function|Array} directiveFactory An injectable directive factory function. See the
16
+ * {@link guide/directive directive guide} and the {@link $compile compile API} for more info.
17
+ * @returns {ng.ICompileProvider} Self for chaining.
18
+ */
19
+ directive: (name: string | any, directiveFactory: Function | any[]) => ng.ICompileProvider;
20
+ /**
21
+ * @ngdoc method
22
+ * @name $compileProvider#component
23
+ * @module ng
24
+ * @param {string|Object} name Name of the component in camelCase (i.e. `myComp` which will match `<my-comp>`),
25
+ * or an object map of components where the keys are the names and the values are the component definition objects.
26
+ * @param {Object} options Component definition object (a simplified
27
+ * {@link ng.$compile#directive-definition-object directive definition object}),
28
+ * with the following properties (all optional):
29
+ *
30
+ * - `controller` – `{(string|function()=}` – controller constructor function that should be
31
+ * associated with newly created scope or the name of a {@link ng.$compile#-controller-
32
+ * registered controller} if passed as a string. An empty `noop` function by default.
33
+ * - `controllerAs` – `{string=}` – identifier name for to reference the controller in the component's scope.
34
+ * If present, the controller will be published to scope under the `controllerAs` name.
35
+ * If not present, this will default to be `$ctrl`.
36
+ * - `template` – `{string=|function()=}` – html template as a string or a function that
37
+ * returns an html template as a string which should be used as the contents of this component.
38
+ * Empty string by default.
39
+ *
40
+ * If `template` is a function, then it is {@link auto.$injector#invoke injected} with
41
+ * the following locals:
42
+ *
43
+ * - `$element` - Current element
44
+ * - `$attrs` - Current attributes object for the element
45
+ *
46
+ * - `templateUrl` – `{string=|function()=}` – path or function that returns a path to an html
47
+ * template that should be used as the contents of this component.
48
+ *
49
+ * If `templateUrl` is a function, then it is {@link auto.$injector#invoke injected} with
50
+ * the following locals:
51
+ *
52
+ * - `$element` - Current element
53
+ * - `$attrs` - Current attributes object for the element
54
+ *
55
+ * - `bindings` – `{object=}` – defines bindings between DOM attributes and component properties.
56
+ * Component properties are always bound to the component controller and not to the scope.
57
+ * See {@link ng.$compile#-bindtocontroller- `bindToController`}.
58
+ * - `transclude` – `{boolean=}` – whether {@link $compile#transclusion content transclusion} is enabled.
59
+ * Disabled by default.
60
+ * - `require` - `{Object<string, string>=}` - requires the controllers of other directives and binds them to
61
+ * this component's controller. The object keys specify the property names under which the required
62
+ * controllers (object values) will be bound. See {@link ng.$compile#-require- `require`}.
63
+ * - `$...` – additional properties to attach to the directive factory function and the controller
64
+ * constructor function. (This is used by the component router to annotate)
65
+ *
66
+ * @returns {ng.$compileProvider} the compile provider itself, for chaining of function calls.
67
+ * @description
68
+ * Register a **component definition** with the compiler. This is a shorthand for registering a special
69
+ * type of directive, which represents a self-contained UI component in your application. Such components
70
+ * are always isolated (i.e. `scope: {}`) and are always restricted to elements (i.e. `restrict: 'E'`).
71
+ *
72
+ * Component definitions are very simple and do not require as much configuration as defining general
73
+ * directives. Component definitions usually consist only of a template and a controller backing it.
74
+ *
75
+ * In order to make the definition easier, components enforce best practices like use of `controllerAs`,
76
+ * `bindToController`. They always have **isolate scope** and are restricted to elements.
77
+ *
78
+ * Here are a few examples of how you would usually define components:
79
+ *
80
+ * ```js
81
+ * let myMod = angular.module(...);
82
+ * myMod.component('myComp', {
83
+ * template: '<div>My name is {{$ctrl.name}}</div>',
84
+ * controller: function() {
85
+ * this.name = 'shahar';
86
+ * }
87
+ * });
88
+ *
89
+ * myMod.component('myComp', {
90
+ * template: '<div>My name is {{$ctrl.name}}</div>',
91
+ * bindings: {name: '@'}
92
+ * });
93
+ *
94
+ * myMod.component('myComp', {
95
+ * templateUrl: 'views/my-comp.html',
96
+ * controller: 'MyCtrl',
97
+ * controllerAs: 'ctrl',
98
+ * bindings: {name: '@'}
99
+ * });
100
+ *
101
+ * ```
102
+ * For more examples, and an in-depth guide, see the {@link guide/component component guide}.
103
+ *
104
+ * <br />
105
+ * See also {@link ng.$compileProvider#directive $compileProvider.directive()}.
106
+ */
107
+ component: (name: string | any, options: any) => ng.$compileProvider;
108
+ /**
109
+ * @ngdoc method
110
+ * @name $compileProvider#aHrefSanitizationTrustedUrlList
111
+ * @kind function
112
+ *
113
+ * @description
114
+ * Retrieves or overrides the default regular expression that is used for determining trusted safe
115
+ * urls during a[href] sanitization.
116
+ *
117
+ * The sanitization is a security measure aimed at preventing XSS attacks via html links.
118
+ *
119
+ * Any url about to be assigned to a[href] via data-binding is first normalized and turned into
120
+ * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationTrustedUrlList`
121
+ * regular expression. If a match is found, the original url is written into the dom. Otherwise,
122
+ * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
123
+ *
124
+ * @param {RegExp=} regexp New regexp to trust urls with.
125
+ * @returns {RegExp|ng.ICompileProvider} Current RegExp if called without value or self for
126
+ * chaining otherwise.
127
+ */
128
+ aHrefSanitizationTrustedUrlList: (regexp?: RegExp | undefined) => RegExp | ng.ICompileProvider;
129
+ /**
130
+ * @ngdoc method
131
+ * @name $compileProvider#imgSrcSanitizationTrustedUrlList
132
+ * @kind function
133
+ *
134
+ * @description
135
+ * Retrieves or overrides the default regular expression that is used for determining trusted safe
136
+ * urls during img[src] sanitization.
137
+ *
138
+ * The sanitization is a security measure aimed at prevent XSS attacks via html links.
139
+ *
140
+ * Any url about to be assigned to img[src] via data-binding is first normalized and turned into
141
+ * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationTrustedUrlList`
142
+ * regular expression. If a match is found, the original url is written into the dom. Otherwise,
143
+ * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
144
+ *
145
+ * @param {RegExp=} regexp New regexp to trust urls with.
146
+ * @returns {RegExp|ng.ICompileProvider} Current RegExp if called without value or self for
147
+ * chaining otherwise.
148
+ */
149
+ imgSrcSanitizationTrustedUrlList: (regexp?: RegExp | undefined) => RegExp | ng.ICompileProvider;
150
+ debugInfoEnabled: (enabled: any) => boolean | this;
151
+ strictComponentBindingsEnabled: (enabled: any) => boolean | this;
152
+ /**
153
+ * @ngdoc method
154
+ * @name $compileProvider#addPropertySecurityContext
155
+ * @description
156
+ *
157
+ * Defines the security context for DOM properties bound by ng-prop-*.
158
+ *
159
+ * @param {string} elementName The element name or '*' to match any element.
160
+ * @param {string} propertyName The DOM property name.
161
+ * @param {string} ctx The {@link $sce} security context in which this value is safe for use, e.g. `$sce.URL`
162
+ * @returns {object} `this` for chaining
163
+ */
164
+ addPropertySecurityContext: (elementName: string, propertyName: string, ctx: string) => object;
165
+ $get: (string | (($injector: any, $interpolate: any, $exceptionHandler: any, $templateRequest: any, $parse: any, $controller: any, $rootScope: any, $sce: any, $animate: any) => ($compileNodes: string | NodeList, transcludeFn: any, maxPriority: any, ignoreDirective: any, previousCompileContext: any) => (scope: any, cloneConnectFn: any, options: any) => any))[];
166
+ }
167
+ export namespace $CompileProvider {
168
+ let $inject: string[];
169
+ }
170
+ /**
171
+ * Function that aggregates all linking fns for a compilation root (nodeList)
172
+ */
173
+ export type CompositeLinkFn = Function;
@@ -0,0 +1,32 @@
1
+ export function identifierForController(controller: any, ident: any): any;
2
+ /**
3
+ * @ngdoc provider
4
+ * @name $controllerProvider
5
+ *
6
+ *
7
+ * @description
8
+ * The {@link ng.$controller $controller service} is used by AngularJS to create new
9
+ * controllers.
10
+ *
11
+ * This provider allows controller registration via the
12
+ * {@link ng.$controllerProvider#register register} method.
13
+ */
14
+ export function $ControllerProvider(): void;
15
+ export class $ControllerProvider {
16
+ /**
17
+ * @ngdoc method
18
+ * @name $controllerProvider#has
19
+ * @param {string} name Controller name to check.
20
+ */
21
+ has: (name: string) => any;
22
+ /**
23
+ * @ngdoc method
24
+ * @name $controllerProvider#register
25
+ * @param {string|Object} name Controller name, or an object map of controllers where the keys are
26
+ * the names and the values are the constructors.
27
+ * @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI
28
+ * annotations in the array notation).
29
+ */
30
+ register: (name: string | any, constructor: Function | any[]) => void;
31
+ $get: (string | (($injector: any) => (expression: Function | string, locals: any, later: any, ident: any) => any))[];
32
+ }
@@ -1,46 +1,13 @@
1
1
  /**
2
- * @ngdoc service
3
- * @name $exceptionHandler
4
- * @requires ng.$log
5
- *
6
- *
7
- * @description
8
- * Any uncaught exception in AngularJS expressions is delegated to this service.
9
- * The default implementation simply delegates to `$log.error` which logs it into
10
- * the browser console.
11
- *
12
- *
13
- * ## Example:
14
- *
15
- * The example below will overwrite the default `$exceptionHandler` in order to (a) log uncaught
16
- * errors to the backend for later inspection by the developers and (b) to use `$log.warn()` instead
17
- * of `$log.error()`.
18
- *
19
- * ```js
20
- * angular.
21
- * module('exceptionOverwrite', []).
22
- * factory('$exceptionHandler', ['$log', 'logErrorsToBackend', function($log, logErrorsToBackend) {
23
- * return function myExceptionHandler(exception, cause) {
24
- * logErrorsToBackend(exception, cause);
25
- * $log.warn(exception, cause);
26
- * };
27
- * }]);
28
- * ```
29
- *
30
- * <hr />
31
- * Note, that code executed in event-listeners (even those registered using jqLite's `on`/`bind`
32
- * methods) does not delegate exceptions to the {@link ng.$exceptionHandler $exceptionHandler}
33
- * (unless executed during a digest).
34
- *
35
- * If you wish, you can manually delegate exceptions, e.g.
36
- * `try { ... } catch(e) { $exceptionHandler(e); }`
37
- *
38
- * @param {Error} exception Exception associated with the error.
39
- * @param {string=} cause Optional information about the context in which
40
- * the error was thrown.
41
- *
2
+ * @constructor
3
+ * @this {angular.ExceptionHandlerProvider}
42
4
  */
43
- export function $ExceptionHandlerProvider(): void;
5
+ export function $ExceptionHandlerProvider(this: import("../index").angular.ServiceProvider): void;
44
6
  export class $ExceptionHandlerProvider {
45
- $get: (string | (($log: any) => (...args: any[]) => void))[];
7
+ $get: (string | (($log: import("../services/log").angular.LogService) => angular.ErrorHandler))[];
8
+ }
9
+ export function errorHandler(exception: any, cause: any): void;
10
+ export namespace angular {
11
+ type ExceptionHandlerProvider = import("../index").angular.ServiceProvider;
12
+ type ErrorHandler = (exception: Error, cause?: string) => void;
46
13
  }
@@ -0,0 +1,9 @@
1
+ export function $FilterProvider($provide: any): void;
2
+ export class $FilterProvider {
3
+ constructor($provide: any);
4
+ register: (name: any, factory: any) => any;
5
+ $get: (string | (($injector: any) => (name: any) => any))[];
6
+ }
7
+ export namespace $FilterProvider {
8
+ let $inject: string[];
9
+ }
@@ -17,43 +17,28 @@
17
17
  */
18
18
  export function $InterpolateProvider(): void;
19
19
  export class $InterpolateProvider {
20
- /**
21
- * @ngdoc method
22
- * @name $interpolateProvider#startSymbol
23
- * @description
24
- * Symbol to denote start of expression in the interpolated string. Defaults to `{{`.
25
- *
26
- * @param {string=} value new value to set the starting symbol to.
27
- * @returns {string|self} Returns the symbol when used as getter and self if used as setter.
28
- */
29
- startSymbol: (
30
- value?: string | undefined,
31
- ) => string | (Window & typeof globalThis);
32
- /**
33
- * @ngdoc method
34
- * @name $interpolateProvider#endSymbol
35
- * @description
36
- * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.
37
- *
38
- * @param {string=} value new value to set the ending symbol to.
39
- * @returns {string|self} Returns the symbol when used as getter and self if used as setter.
40
- */
41
- endSymbol: (
42
- value?: string | undefined,
43
- ) => string | (Window & typeof globalThis);
44
- $get: (
45
- | string
46
- | ((
47
- $parse: any,
48
- $exceptionHandler: any,
49
- $sce: any,
50
- ) => {
51
- (
52
- text: string,
53
- mustHaveExpression?: boolean | undefined,
54
- trustedContext?: string | undefined,
55
- allOrNothing?: boolean | undefined,
56
- ): (arg0: context) => any;
20
+ /**
21
+ * @ngdoc method
22
+ * @name $interpolateProvider#startSymbol
23
+ * @description
24
+ * Symbol to denote start of expression in the interpolated string. Defaults to `{{`.
25
+ *
26
+ * @param {string=} value new value to set the starting symbol to.
27
+ * @returns {string|self} Returns the symbol when used as getter and self if used as setter.
28
+ */
29
+ startSymbol: (value?: string | undefined) => string | (Window & typeof globalThis);
30
+ /**
31
+ * @ngdoc method
32
+ * @name $interpolateProvider#endSymbol
33
+ * @description
34
+ * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.
35
+ *
36
+ * @param {string=} value new value to set the ending symbol to.
37
+ * @returns {string|self} Returns the symbol when used as getter and self if used as setter.
38
+ */
39
+ endSymbol: (value?: string | undefined) => string | (Window & typeof globalThis);
40
+ $get: (string | (($parse: any, $exceptionHandler: import("../exception-handler").angular.ErrorHandler, $sce: any) => {
41
+ (text: string, mustHaveExpression?: boolean | undefined, trustedContext?: string | undefined, allOrNothing?: boolean | undefined): (arg0: context) => any;
57
42
  /**
58
43
  * @ngdoc method
59
44
  * @name $interpolate#startSymbol
@@ -78,6 +63,5 @@ export class $InterpolateProvider {
78
63
  * @returns {string} end symbol.
79
64
  */
80
65
  endSymbol(): string;
81
- })
82
- )[];
66
+ }))[];
83
67
  }
@@ -0,0 +1,4 @@
1
+ export function $$IntervalFactoryProvider(): void;
2
+ export class $$IntervalFactoryProvider {
3
+ $get: (string | (($browser: any, $q: any, $$q: any, $rootScope: any) => (setIntervalFn: any, clearIntervalFn: any) => (fn: any, delay: any, count: any, invokeApply: any, ...args: any[]) => any))[];
4
+ }
@@ -1,4 +1,4 @@
1
1
  export function $IntervalProvider(): void;
2
2
  export class $IntervalProvider {
3
- $get: (string | (($$intervalFactory: any) => any))[];
3
+ $get: (string | (($$intervalFactory: any) => any))[];
4
4
  }