@angular-wave/angular.ts 0.6.3 → 0.6.5

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 (187) hide show
  1. package/dist/angular-ts.esm.js +2 -2
  2. package/dist/angular-ts.umd.js +2 -2
  3. package/package.json +1 -1
  4. package/src/angular.spec.js +2 -2
  5. package/src/animations/animate-children-directive.js +1 -1
  6. package/src/animations/animate-css-driver.js +2 -2
  7. package/src/animations/animate-css.js +1 -1
  8. package/src/animations/animate-js.js +2 -2
  9. package/src/animations/animate-queue.js +2 -2
  10. package/src/animations/animate.js +2 -2
  11. package/src/animations/animate.spec.js +3 -3
  12. package/src/animations/animation.js +3 -3
  13. package/src/binding.spec.js +1 -1
  14. package/src/core/cache/cache.js +1 -1
  15. package/src/core/compile/attributes.js +24 -7
  16. package/src/core/compile/compile.js +79 -249
  17. package/src/core/compile/compile.md +0 -8
  18. package/src/core/compile/compile.spec.js +38 -640
  19. package/src/core/controller/controller.js +2 -2
  20. package/src/core/di/injector.js +1 -1
  21. package/src/core/di/injector.spec.js +1 -1
  22. package/src/core/di/internal-injector.js +2 -2
  23. package/src/core/di/ng-module.js +1 -1
  24. package/src/core/filter/filter.js +2 -2
  25. package/src/core/interpolate/interpolate.js +1 -1
  26. package/src/core/interval/interval-factory.js +1 -1
  27. package/src/core/interval/interval.js +1 -1
  28. package/src/core/location/location.js +3 -3
  29. package/src/core/on.spec.js +1 -1
  30. package/src/core/parse/interpreter.js +1 -1
  31. package/src/core/prop.spec.js +2 -2
  32. package/src/core/q/q.js +2 -2
  33. package/src/core/root-element.spec.js +1 -1
  34. package/src/core/sanitize/sanitize-uri.js +1 -1
  35. package/src/core/sce/sce.js +3 -3
  36. package/src/core/sce/sce.spec.js +1 -1
  37. package/src/core/scope/scope.js +3 -3
  38. package/src/core/scope/scope.spec.js +1 -1
  39. package/src/core/timeout/timeout.js +2 -2
  40. package/src/core/url-utils/url-utils.js +1 -1
  41. package/src/directive/aria/aria.js +1 -1
  42. package/src/directive/aria/aria.spec.js +1 -1
  43. package/src/directive/attrs/attrs.js +3 -3
  44. package/src/directive/attrs/attrs.spec.js +1 -1
  45. package/src/directive/attrs/boolean.spec.js +1 -1
  46. package/src/directive/attrs/element-style.spec.js +1 -1
  47. package/src/directive/attrs/src.spec.js +1 -1
  48. package/src/directive/bind/bind.js +1 -1
  49. package/src/directive/bind/bind.spec.js +1 -1
  50. package/src/directive/bind/bing-html.spec.js +1 -1
  51. package/src/directive/change/change.spec.js +1 -1
  52. package/src/directive/channel/channel.js +25 -7
  53. package/src/directive/channel/channel.spec.js +17 -0
  54. package/src/directive/class/class.js +1 -1
  55. package/src/directive/class/class.spec.js +2 -2
  56. package/src/directive/cloak/cloak.spec.js +1 -1
  57. package/src/directive/controller/controller.spec.js +2 -2
  58. package/src/directive/events/click.spec.js +1 -1
  59. package/src/directive/events/event.spec.js +1 -1
  60. package/src/directive/events/events.js +3 -3
  61. package/src/directive/form/form.js +2 -2
  62. package/src/directive/form/form.spec.js +1 -1
  63. package/src/directive/if/if.js +2 -3
  64. package/src/directive/if/if.md +0 -1
  65. package/src/directive/if/if.spec.js +2 -2
  66. package/src/directive/include/include.js +3 -3
  67. package/src/directive/include/include.spec.js +2 -2
  68. package/src/directive/init/init.spec.js +1 -1
  69. package/src/directive/input/input.js +1 -1
  70. package/src/directive/input/input.spec.js +1 -1
  71. package/src/directive/messages/messages.js +1 -1
  72. package/src/directive/messages/messages.spec.js +3 -3
  73. package/src/directive/model/model.js +7 -7
  74. package/src/directive/model/model.spec.js +2 -2
  75. package/src/directive/model-options/model-options.js +1 -1
  76. package/src/directive/model-options/model-options.spec.js +2 -2
  77. package/src/directive/non-bindable/non-bindable.spec.js +1 -1
  78. package/src/directive/observe/observe.spec.js +1 -1
  79. package/src/directive/options/options.js +6 -2
  80. package/src/directive/options/options.spec.js +2 -2
  81. package/src/directive/ref/href.spec.js +2 -2
  82. package/src/directive/ref/ref.js +1 -1
  83. package/src/directive/repeat/repeat.js +263 -255
  84. package/src/directive/repeat/repeat.md +0 -22
  85. package/src/directive/repeat/repeat.spec.js +2 -115
  86. package/src/directive/script/script.spec.js +1 -1
  87. package/src/directive/select/select.js +2 -2
  88. package/src/directive/select/select.spec.js +2 -2
  89. package/src/directive/show-hide/show-hide.js +1 -3
  90. package/src/directive/show-hide/show-hide.md +0 -2
  91. package/src/directive/show-hide/show-hide.spec.js +1 -1
  92. package/src/directive/style/style.spec.js +1 -1
  93. package/src/directive/switch/switch.js +2 -4
  94. package/src/directive/switch/switch.spec.js +1 -51
  95. package/src/directive/transclude/transclude.js +2 -2
  96. package/src/directive/validators/validators.js +2 -2
  97. package/src/directive/validators/validators.spec.js +1 -1
  98. package/src/filters/filter.js +1 -1
  99. package/src/filters/filter.spec.js +2 -2
  100. package/src/filters/filters.js +1 -1
  101. package/src/filters/filters.spec.js +1 -1
  102. package/src/filters/limit-to.js +1 -1
  103. package/src/filters/limit-to.spec.js +1 -1
  104. package/src/filters/order-by.js +1 -1
  105. package/src/index.js +3 -9
  106. package/src/loader.js +12 -16
  107. package/src/router/common/coreservices.js +1 -1
  108. package/src/router/common/trace.js +1 -1
  109. package/src/router/directives/state-directives.js +1 -1
  110. package/src/router/directives/state-directives.spec.js +1 -1
  111. package/src/router/directives/view-directive.js +2 -2
  112. package/src/router/directives/view-directive.spec.js +1 -1
  113. package/src/router/hooks/redirect-to.js +1 -1
  114. package/src/router/params/param-type.js +1 -1
  115. package/src/router/params/param-types.js +1 -1
  116. package/src/router/params/param.js +1 -1
  117. package/src/router/resolve/resolvable.js +1 -1
  118. package/src/router/resolve/resolve-context.js +1 -1
  119. package/src/router/state/state-builder.js +1 -1
  120. package/src/router/state/state-matcher.js +1 -1
  121. package/src/router/state/state-object.js +1 -1
  122. package/src/router/state/state-queue-manager.js +1 -1
  123. package/src/router/state/state-registry.js +2 -2
  124. package/src/router/state/state-service.js +1 -1
  125. package/src/router/state/state.spec.js +2 -2
  126. package/src/router/state/target-state.js +1 -1
  127. package/src/router/state/views.js +1 -1
  128. package/src/router/state-provider.js +1 -1
  129. package/src/router/template-factory.js +9 -8
  130. package/src/router/template-factory.spec.js +1 -1
  131. package/src/router/transition/hook-registry.js +1 -1
  132. package/src/router/transition/transition-service.js +1 -1
  133. package/src/router/transition/transition.js +1 -1
  134. package/src/router/url/url-config.js +1 -1
  135. package/src/router/url/url-matcher.js +2 -2
  136. package/src/router/url/url-rule.js +1 -1
  137. package/src/router/url/url-rules.js +1 -1
  138. package/src/router/url/url-service.js +6 -1
  139. package/src/router/url/url-service.spec.js +1 -1
  140. package/src/router/view/view.spec.js +1 -1
  141. package/src/router/view-hook.spec.js +1 -1
  142. package/src/router/view-scroll.spec.js +1 -1
  143. package/src/services/anchor-scroll.js +1 -1
  144. package/src/services/browser.js +2 -2
  145. package/src/services/cookie-reader.js +1 -1
  146. package/src/services/http/http.js +3 -3
  147. package/src/services/http/http.spec.js +1 -1
  148. package/src/services/http-backend/http-backend.js +1 -1
  149. package/src/services/log.js +1 -1
  150. package/src/services/template-request.js +2 -2
  151. package/src/shared/common.js +1 -1
  152. package/src/shared/jqlite/jqlite.js +9 -9
  153. package/src/shared/jqlite/jqlite.spec.js +11 -11
  154. package/src/shared/min-err.spec.js +6 -1
  155. package/src/shared/predicates.js +1 -1
  156. package/src/shared/strings.js +1 -1
  157. package/src/shared/test-utils.js +1 -1
  158. package/src/shared/utils.js +1 -1
  159. package/src/shared/utils.spec.js +1 -1
  160. package/src/types.js +0 -2
  161. package/types/animations/animate-css-driver.d.ts +1 -1
  162. package/types/animations/animate-js.d.ts +1 -1
  163. package/types/animations/animate.d.ts +1 -1
  164. package/types/animations/animation.d.ts +1 -1
  165. package/types/core/cache/cache.d.ts +1 -1
  166. package/types/core/compile/attributes.d.ts +2 -2
  167. package/types/core/compile/compile.d.ts +3 -2
  168. package/types/core/controller/controller.d.ts +1 -1
  169. package/types/core/filter/filter.d.ts +1 -1
  170. package/types/core/location/location.d.ts +1 -1
  171. package/types/core/q/q.d.ts +1 -1
  172. package/types/core/sce/sce.d.ts +1 -1
  173. package/types/core/scope/scope.d.ts +1 -1
  174. package/types/core/timeout/timeout.d.ts +1 -1
  175. package/types/directive/channel/channel.d.ts +13 -4
  176. package/types/directive/model/model.d.ts +9 -9
  177. package/types/directive/repeat/repeat.d.ts +10 -8
  178. package/types/loader.d.ts +5 -6
  179. package/types/router/common/coreservices.d.ts +1 -1
  180. package/types/router/state/state-registry.d.ts +2 -2
  181. package/types/router/template-factory.d.ts +2 -2
  182. package/types/services/browser.d.ts +1 -1
  183. package/types/services/http/http.d.ts +1 -1
  184. package/types/services/template-request.d.ts +1 -1
  185. package/types/shared/jqlite/jqlite.d.ts +1 -1
  186. package/types/shared/test-utils.d.ts +1 -1
  187. package/types/types.d.ts +1 -5
@@ -1,7 +1,7 @@
1
1
  import { defaults, find } from "../../shared/common";
2
2
  import { propEq } from "../../shared/hof";
3
3
  import { Glob } from "../common/glob";
4
- import { isFunction, isObject } from "../../shared/utils";
4
+ import { isFunction, isObject } from "../../shared/utils.js";
5
5
  /**
6
6
  * Internal representation of a ng-router state.
7
7
  *
@@ -1,4 +1,4 @@
1
- import { isString } from "../../shared/utils";
1
+ import { isString } from "../../shared/utils.js";
2
2
  import { StateObject } from "./state-object";
3
3
 
4
4
  export class StateQueueManager {
@@ -5,7 +5,7 @@ import { applyPairs, removeFrom } from "../../shared/common";
5
5
  import { propEq } from "../../shared/hof";
6
6
  import { ResolveContext } from "../resolve/resolve-context";
7
7
  import { ng1ViewsBuilder } from "./views";
8
- import { isString } from "../../shared/utils";
8
+ import { isString } from "../../shared/utils.js";
9
9
 
10
10
  /**
11
11
  * A registry for all of the application's [[StateDeclaration]]s
@@ -54,7 +54,7 @@ export class StateRegistryProvider {
54
54
  "$injector",
55
55
  /**
56
56
  *
57
- * @param {import("../../core/di/internal-injector").InjectorService} $injector
57
+ * @param {import("../../core/di/internal-injector.js").InjectorService} $injector
58
58
  * @returns
59
59
  */
60
60
  ($injector) => {
@@ -5,7 +5,7 @@ import {
5
5
  silenceUncaughtInPromise,
6
6
  silentRejection,
7
7
  } from "../../shared/common";
8
- import { isDefined, isObject, isString, minErr } from "../../shared/utils";
8
+ import { isDefined, isObject, isString, minErr } from "../../shared/utils.js";
9
9
  import { Queue } from "../common/queue";
10
10
  import { services } from "../common/coreservices";
11
11
  import { makeTargetState } from "../path/path-utils";
@@ -1,6 +1,6 @@
1
- import { dealoc } from "../../shared/jqlite/jqlite";
1
+ import { dealoc } from "../../shared/jqlite/jqlite.js";
2
2
  import { Angular } from "../../loader";
3
- import { isFunction } from "../../shared/utils";
3
+ import { isFunction } from "../../shared/utils.js";
4
4
  import { wait } from "../../shared/test-utils";
5
5
 
6
6
  describe("$state", () => {
@@ -1,4 +1,4 @@
1
- import { isObject, isString } from "../../shared/utils";
1
+ import { isObject, isString } from "../../shared/utils.js";
2
2
  import { stringify } from "../../shared/strings";
3
3
  /**
4
4
  * Encapsulate the target (destination) state/params/options of a [[Transition]].
@@ -1,5 +1,5 @@
1
1
  import { pick, tail } from "../../shared/common";
2
- import { isDefined, isString } from "../../shared/utils";
2
+ import { isDefined, isString } from "../../shared/utils.js";
3
3
  import { isInjectable } from "../../shared/predicates";
4
4
  import { services } from "../common/coreservices";
5
5
  import { trace } from "../common/trace";
@@ -1,6 +1,6 @@
1
1
  import { val } from "../shared/hof";
2
2
  import { createProxyFunctions } from "../shared/common";
3
- import { minErr } from "../shared/utils";
3
+ import { minErr } from "../shared/utils.js";
4
4
 
5
5
  const err = minErr("$stateProvider");
6
6
  // Right now this is a collection of all the properties we encounter in tests
@@ -1,9 +1,10 @@
1
- import { isDefined, isFunction, isObject } from "../shared/utils";
2
- import { services } from "./common/coreservices";
3
- import { tail, unnestR } from "../shared/common";
4
- import { Resolvable } from "./resolve/resolvable";
5
- import { kebobString } from "../shared/strings";
6
- import { annotate } from "../core/di/injector";
1
+ import { isDefined, isFunction, isObject } from "../shared/utils.js";
2
+ import { services } from "./common/coreservices.js";
3
+ import { tail, unnestR } from "../shared/common.js";
4
+ import { Resolvable } from "./resolve/resolvable.js";
5
+ import { kebobString } from "../shared/strings.js";
6
+ import { annotate } from "../core/di/injector.js";
7
+ import { DIRECTIVE_SUFFIX } from "../core/compile/compile.js";
7
8
 
8
9
  /**
9
10
  * @typedef BindingTuple
@@ -31,7 +32,7 @@ export class TemplateFactoryProvider {
31
32
  * @param {import("../core/cache/cache-factory").TemplateCache} $templateCache
32
33
  * @param {any} $templateRequest
33
34
  * @param {any} $q
34
- * @param {import("../core/di/internal-injector").InjectorService} $injector
35
+ * @param {import("../core/di/internal-injector.js").InjectorService} $injector
35
36
  * @returns
36
37
  */
37
38
  ($http, $templateCache, $templateRequest, $q, $injector) => {
@@ -230,7 +231,7 @@ export class TemplateFactoryProvider {
230
231
  * @returns
231
232
  */
232
233
  function getComponentBindings(name) {
233
- const cmpDefs = services.$injector.get(name + "Directive"); // could be multiple
234
+ const cmpDefs = services.$injector.get(name + DIRECTIVE_SUFFIX); // could be multiple
234
235
  if (!cmpDefs || !cmpDefs.length)
235
236
  throw new Error(`Unable to find component named '${name}'`);
236
237
  return cmpDefs.map(getBindings).reduce(unnestR, []);
@@ -1,4 +1,4 @@
1
- import { dealoc, JQLite } from "../shared/jqlite/jqlite";
1
+ import { dealoc, JQLite } from "../shared/jqlite/jqlite.js";
2
2
  import { Angular } from "../loader";
3
3
  import { wait } from "../shared/test-utils";
4
4
 
@@ -1,5 +1,5 @@
1
1
  import { removeFrom, tail, map } from "../../shared/common";
2
- import { isString, isFunction } from "../../shared/utils";
2
+ import { isString, isFunction } from "../../shared/utils.js";
3
3
  import { Glob } from "../common/glob";
4
4
  import { TransitionHookScope } from "./interface";
5
5
  /**
@@ -24,7 +24,7 @@ import { registerUpdateGlobalState } from "../hooks/update-globals";
24
24
  import { registerLazyLoadHook } from "../hooks/lazy-load";
25
25
  import { TransitionEventType } from "./transition-event-type";
26
26
  import { TransitionHook } from "./transition-hook";
27
- import { isDefined } from "../../shared/utils";
27
+ import { isDefined } from "../../shared/utils.js";
28
28
  import { createProxyFunctions } from "../../shared/common";
29
29
  import { val } from "../../shared/hof";
30
30
  import { registerIgnoredTransitionHook } from "../hooks/ignored-transition";
@@ -12,7 +12,7 @@ import {
12
12
  flattenR,
13
13
  uniqR,
14
14
  } from "../../shared/common";
15
- import { isUndefined, isObject, assert } from "../../shared/utils";
15
+ import { isUndefined, isObject, assert } from "../../shared/utils.js";
16
16
  import { propEq, val, is } from "../../shared/hof";
17
17
  import { TransitionHookPhase } from "./interface"; // has or is using
18
18
  import { TransitionHook } from "./transition-hook";
@@ -1,5 +1,5 @@
1
1
  import { ParamTypes } from "../params/param-types";
2
- import { isDefined, isString } from "../../shared/utils";
2
+ import { isDefined, isString } from "../../shared/utils.js";
3
3
  /**
4
4
  * An API to customize the URL behavior and retrieve URL configuration
5
5
  *
@@ -10,7 +10,7 @@ import {
10
10
  defaults,
11
11
  } from "../../shared/common";
12
12
  import { propEq } from "../../shared/hof";
13
- import { isDefined, isString } from "../../shared/utils";
13
+ import { isDefined, isString } from "../../shared/utils.js";
14
14
  import { Param, DefType } from "../params/param";
15
15
  import { joinNeighborsR, splitOnDelim } from "../../shared/strings";
16
16
  function quoteRegExp(str, param) {
@@ -209,7 +209,7 @@ export class UrlMatcher {
209
209
  const placeholder =
210
210
  /([:*])([\w[\]]+)|\{([\w[\]]+)(?::\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g;
211
211
  const searchPlaceholder =
212
- /([:]?)([\w[\].-]+)|\{([\w[\].-]+)(?::\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g;
212
+ /([:]?)([\w[\].-]+)|\{([\w[\].-]+)(?::\s*((?:[^{\\}]+|\\.|{(?:[^{\\}]+|\\.)*})+))?\}/g;
213
213
  const patterns = [];
214
214
  let last = 0;
215
215
  let matchArray;
@@ -5,7 +5,7 @@ import {
5
5
  isDefined,
6
6
  isUndefined,
7
7
  assert,
8
- } from "../../shared/utils";
8
+ } from "../../shared/utils.js";
9
9
  import { is, or, pattern } from "../../shared/hof";
10
10
  import { StateObject } from "../state/state-object";
11
11
  /**
@@ -1,7 +1,7 @@
1
1
  import { TargetState } from "../state/target-state";
2
2
  import { UrlMatcher } from "./url-matcher";
3
3
  import { is, val } from "../../shared/hof";
4
- import { isDefined, isFunction, isString } from "../../shared/utils";
4
+ import { isDefined, isFunction, isString } from "../../shared/utils.js";
5
5
  import { removeFrom } from "../../shared/common";
6
6
  import { UrlRuleFactory } from "./url-rule";
7
7
  const prioritySort = (a, b) => (b.priority || 0) - (a.priority || 0);
@@ -1,4 +1,9 @@
1
- import { isFunction, isDefined, isObject, isString } from "../../shared/utils";
1
+ import {
2
+ isFunction,
3
+ isDefined,
4
+ isObject,
5
+ isString,
6
+ } from "../../shared/utils.js";
2
7
  import { is, pattern } from "../../shared/hof";
3
8
  import { UrlRules } from "./url-rules";
4
9
  import { TargetState } from "../state/target-state";
@@ -1,4 +1,4 @@
1
- import { dealoc } from "../../shared/jqlite/jqlite";
1
+ import { dealoc } from "../../shared/jqlite/jqlite.js";
2
2
  import { Angular } from "../../loader";
3
3
  import { map, find } from "../../shared/common";
4
4
 
@@ -1,4 +1,4 @@
1
- import { dealoc } from "../../shared/jqlite/jqlite";
1
+ import { dealoc } from "../../shared/jqlite/jqlite.js";
2
2
  import { Angular } from "../../loader";
3
3
  import { curry } from "../../shared/hof";
4
4
  import { StateMatcher } from "../state/state-matcher";
@@ -1,4 +1,4 @@
1
- import { dealoc } from "../shared/jqlite/jqlite";
1
+ import { dealoc } from "../shared/jqlite/jqlite.js";
2
2
  import { Angular } from "../loader";
3
3
  import { wait } from "../shared/test-utils";
4
4
 
@@ -1,4 +1,4 @@
1
- import { dealoc } from "../shared/jqlite/jqlite";
1
+ import { dealoc } from "../shared/jqlite/jqlite.js";
2
2
  import { Angular } from "../loader";
3
3
  import { wait } from "../shared/test-utils";
4
4
 
@@ -4,7 +4,7 @@ import {
4
4
  isNumber,
5
5
  isString,
6
6
  getNodeName,
7
- } from "../shared/utils";
7
+ } from "../shared/utils.js";
8
8
 
9
9
  /**
10
10
  * @typedef {Object} AnchorScrollObject
@@ -1,6 +1,6 @@
1
- import { JQLite } from "../shared/jqlite/jqlite";
1
+ import { JQLite } from "../shared/jqlite/jqlite.js";
2
2
  import { urlResolve } from "../core/url-utils/url-utils";
3
- import { equals } from "../shared/utils";
3
+ import { equals } from "../shared/utils.js";
4
4
 
5
5
  /**
6
6
  * Removes a trailing hash ('#') from the given URL if it exists.
@@ -1,4 +1,4 @@
1
- import { isUndefined } from "../shared/utils";
1
+ import { isUndefined } from "../shared/utils.js";
2
2
 
3
3
  let lastCookies = {};
4
4
  let lastCookieString = "";
@@ -1,4 +1,4 @@
1
- import { ScopePhase } from "../../core/scope/scope";
1
+ import { ScopePhase } from "../../core/scope/scope.js";
2
2
  import { urlIsAllowedOriginFactory } from "../../core/url-utils/url-utils";
3
3
  import {
4
4
  minErr,
@@ -20,7 +20,7 @@ import {
20
20
  extend,
21
21
  uppercase,
22
22
  isPromiseLike,
23
- } from "../../shared/utils";
23
+ } from "../../shared/utils.js";
24
24
  import { getCookies } from "../cookie-reader";
25
25
 
26
26
  const APPLICATION_JSON = "application/json";
@@ -390,7 +390,7 @@ export function HttpProvider() {
390
390
  * @param {*} $httpBackend
391
391
  * @param {*} $rootScope
392
392
  * @param {*} $q
393
- * @param {import("../../core/di/internal-injector").InjectorService} $injector
393
+ * @param {import("../../core/di/internal-injector.js").InjectorService} $injector
394
394
  * @param {*} $sce
395
395
  * @returns
396
396
  */
@@ -1,5 +1,5 @@
1
1
  import { createInjector } from "../../core/di/injector";
2
- import { isObject } from "../../shared/utils";
2
+ import { isObject } from "../../shared/utils.js";
3
3
  import { Angular } from "../../loader";
4
4
 
5
5
  export function getLastAjaxRequest() {
@@ -1,5 +1,5 @@
1
1
  import { urlResolve } from "../../core/url-utils/url-utils";
2
- import { isDefined, isPromiseLike, isUndefined } from "../../shared/utils";
2
+ import { isDefined, isPromiseLike, isUndefined } from "../../shared/utils.js";
3
3
 
4
4
  /**
5
5
  * HTTP backend used by the {@link ng.$http service} that delegates to
@@ -1,4 +1,4 @@
1
- import { isError } from "../shared/utils";
1
+ import { isError } from "../shared/utils.js";
2
2
 
3
3
  ///////////////////////////////////////////////////////////////////////////
4
4
  // LogService
@@ -1,5 +1,5 @@
1
1
  import { defaultHttpResponseTransform } from "./http/http";
2
- import { extend, isString, minErr } from "../shared/utils";
2
+ import { extend, isString, minErr } from "../shared/utils.js";
3
3
 
4
4
  var $templateRequestMinErr = minErr("$templateRequest");
5
5
 
@@ -61,7 +61,7 @@ export function TemplateRequestProvider() {
61
61
  "$sce",
62
62
  /**
63
63
  *
64
- * @param {import('../core/exception-handler').ErrorHandler} $exceptionHandler
64
+ * @param {import('../core/exception-handler.js').ErrorHandler} $exceptionHandler
65
65
  * @param {import('../core/cache/cache-factory').TemplateCache} $templateCache
66
66
  * @param {*} $http
67
67
  * @param {*} $q
@@ -1,4 +1,4 @@
1
- import { isDate, isFunction, isRegExp, isString } from "./utils";
1
+ import { isDate, isFunction, isRegExp, isString } from "./utils.js";
2
2
  import { all, curry } from "./hof";
3
3
  import { services } from "../router/common/coreservices";
4
4
 
@@ -11,8 +11,8 @@ import {
11
11
  lowercase,
12
12
  getNodeName,
13
13
  shallowCopy,
14
- } from "../utils";
15
- import { CACHE, EXPANDO } from "../../core/cache/cache";
14
+ } from "../utils.js";
15
+ import { Cache, EXPANDO } from "../../core/cache/cache.js";
16
16
 
17
17
  /** @type {number} */
18
18
  let jqId = 1;
@@ -128,7 +128,7 @@ JQLite.prototype.elements = function () {
128
128
  };
129
129
 
130
130
  /**
131
- * Remove all child nodes of the set of matched elements from the DOM and clears CACHE data, associated with the node.
131
+ * Remove all child nodes of the set of matched elements from the DOM and clears Cache data, associated with the node.
132
132
  * @returns {JQLite} The current instance of JQLite.
133
133
  */
134
134
  JQLite.prototype.empty = function () {
@@ -750,7 +750,7 @@ export function snakeToCamel(name) {
750
750
  */
751
751
  export function removeElementData(element, name) {
752
752
  const expandoId = element[EXPANDO];
753
- const expandoStore = expandoId && CACHE.get(expandoId);
753
+ const expandoStore = expandoId && Cache.get(expandoId);
754
754
 
755
755
  if (expandoStore) {
756
756
  if (name) {
@@ -774,7 +774,7 @@ export function removeElementData(element, name) {
774
774
  */
775
775
  function getExpando(element, createIfNecessary = false) {
776
776
  let expandoId = element[EXPANDO];
777
- let expandoStore = expandoId && CACHE.get(expandoId);
777
+ let expandoStore = expandoId && Cache.get(expandoId);
778
778
 
779
779
  if (createIfNecessary && !expandoStore) {
780
780
  element[EXPANDO] = expandoId = jqNextId();
@@ -783,7 +783,7 @@ function getExpando(element, createIfNecessary = false) {
783
783
  data: {},
784
784
  handle: null,
785
785
  };
786
- CACHE.set(expandoId, expandoStore);
786
+ Cache.set(expandoId, expandoStore);
787
787
  }
788
788
 
789
789
  return expandoStore;
@@ -899,13 +899,13 @@ export function dealoc(element, onlyDescendants) {
899
899
  */
900
900
  function removeIfEmptyData(element) {
901
901
  const expandoId = element[EXPANDO];
902
- const { events, data } = CACHE.get(expandoId);
902
+ const { events, data } = Cache.get(expandoId);
903
903
 
904
904
  if (
905
905
  (!data || !Object.keys(data).length) &&
906
906
  (!events || !Object.keys(events).length)
907
907
  ) {
908
- CACHE.delete(expandoId);
908
+ Cache.delete(expandoId);
909
909
  element[EXPANDO] = undefined; // don't delete DOM expandos. Chrome don't like it
910
910
  }
911
911
  }
@@ -1179,7 +1179,7 @@ export function getBooleanAttrName(element, name) {
1179
1179
  */
1180
1180
  export function cleanElementData(nodes) {
1181
1181
  for (let i = 0, ii = nodes.length; i < ii; i++) {
1182
- const events = (CACHE.get(nodes[i][EXPANDO]) || {}).events;
1182
+ const events = (Cache.get(nodes[i][EXPANDO]) || {}).events;
1183
1183
  if (events && events.$destroy) {
1184
1184
  JQLite(nodes[i]).triggerHandler("$destroy");
1185
1185
  }
@@ -8,9 +8,9 @@ import {
8
8
  } from "./jqlite";
9
9
  import { Angular } from "../../loader";
10
10
  import { createInjector } from "../../core/di/injector";
11
- import { equals } from "../utils";
11
+ import { equals } from "../utils.js";
12
12
  import { browserTrigger } from "../test-utils";
13
- import { CACHE, EXPANDO } from "../../core/cache/cache";
13
+ import { Cache, EXPANDO } from "../../core/cache/cache.js";
14
14
 
15
15
  describe("jqLite", () => {
16
16
  let scope;
@@ -532,7 +532,7 @@ describe("jqLite", () => {
532
532
 
533
533
  it("should not break on cleanElementData(), if element has no data", () => {
534
534
  const selected = JQLite([a, b, c]);
535
- spyOn(CACHE, "get").and.returnValue(undefined);
535
+ spyOn(Cache, "get").and.returnValue(undefined);
536
536
  expect(() => {
537
537
  cleanElementData(selected);
538
538
  }).not.toThrow();
@@ -552,13 +552,13 @@ describe("jqLite", () => {
552
552
  });
553
553
 
554
554
  it("should not add to the cache if the node is a comment or text node", () => {
555
- const initial = CACHE.size;
555
+ const initial = Cache.size;
556
556
  const nodes = JQLite("<!-- some comment --> and some text");
557
- expect(CACHE.size).toEqual(initial);
557
+ expect(Cache.size).toEqual(initial);
558
558
  nodes.data("someKey");
559
- expect(CACHE.size).toEqual(initial);
559
+ expect(Cache.size).toEqual(initial);
560
560
  nodes.data("someKey", "someValue");
561
- expect(CACHE.size).toEqual(initial);
561
+ expect(Cache.size).toEqual(initial);
562
562
  });
563
563
 
564
564
  describe("removeElementData/getOrSetCacheData helpers", () => {
@@ -566,13 +566,13 @@ describe("jqLite", () => {
566
566
  const node = document.createElement("div");
567
567
  document.body.appendChild(node);
568
568
 
569
- expect(CACHE.has(node[EXPANDO])).toBe(false);
569
+ expect(Cache.has(node[EXPANDO])).toBe(false);
570
570
  expect(getOrSetCacheData(node, "foo")).toBeUndefined();
571
- expect(CACHE.has(node[EXPANDO])).toBe(false);
571
+ expect(Cache.has(node[EXPANDO])).toBe(false);
572
572
 
573
573
  getOrSetCacheData(node, "foo", "bar");
574
574
 
575
- expect(CACHE.has(node[EXPANDO])).toBe(true);
575
+ expect(Cache.has(node[EXPANDO])).toBe(true);
576
576
  expect(getOrSetCacheData(node, "foo")).toBe("bar");
577
577
  expect(JQLite(node).data("foo")).toBe("bar");
578
578
 
@@ -587,7 +587,7 @@ describe("jqLite", () => {
587
587
  expect(getOrSetCacheData(node, "bar")).toBeUndefined();
588
588
 
589
589
  JQLite(node).remove();
590
- expect(CACHE.has(node[EXPANDO])).toBe(false);
590
+ expect(Cache.has(node[EXPANDO])).toBe(false);
591
591
  });
592
592
  });
593
593
 
@@ -1,4 +1,9 @@
1
- import { minErr, isDefined, toDebugString, errorHandlingConfig } from "./utils";
1
+ import {
2
+ minErr,
3
+ isDefined,
4
+ toDebugString,
5
+ errorHandlingConfig,
6
+ } from "./utils.js";
2
7
 
3
8
  describe("errors", () => {
4
9
  afterEach(() => {});
@@ -1,4 +1,4 @@
1
- import { isFunction, isString } from "./utils";
1
+ import { isFunction, isString } from "./utils.js";
2
2
  export const isNull = (o) => o === null;
3
3
  export function isNullOrUndefined(obj) {
4
4
  return obj === null && typeof obj === "undefined";
@@ -6,7 +6,7 @@
6
6
  * @packageDocumentation
7
7
  */
8
8
  import { isInjectable, isNull, isPromise } from "./predicates";
9
- import { isUndefined, isFunction, isString, isObject } from "./utils";
9
+ import { isUndefined, isFunction, isString, isObject } from "./utils.js";
10
10
  import { pushR, tail } from "./common";
11
11
  import { pattern, val } from "./hof";
12
12
  /**
@@ -1,4 +1,4 @@
1
- import { JQLite } from "./jqlite/jqlite";
1
+ import { JQLite } from "./jqlite/jqlite.js";
2
2
 
3
3
  /**
4
4
  * @param {HTMLElement|JQLite} element
@@ -1,4 +1,4 @@
1
- import { PREFIX_REGEXP, SPECIAL_CHARS_REGEXP } from "./constants";
1
+ import { PREFIX_REGEXP, SPECIAL_CHARS_REGEXP } from "./constants.js";
2
2
 
3
3
  const ngMinErr = minErr("ng");
4
4
 
@@ -1,4 +1,4 @@
1
- import { hashKey } from "./utils";
1
+ import { hashKey } from "./utils.js";
2
2
 
3
3
  describe("api", () => {
4
4
  describe("hashKey()", () => {
package/src/types.js CHANGED
@@ -231,8 +231,6 @@
231
231
  * @property {boolean | { [boundProperty: string]: string } | undefined} [bindToController]
232
232
  * Bindings to controller.
233
233
  * @property {DirectiveLinkFn | DirectivePrePost | undefined} [link]
234
- * Link function.
235
- * @property {boolean | undefined} [multiElement]
236
234
  * Multi-element directive flag.
237
235
  * @property {number | undefined} [priority]
238
236
  * Skip all directives on element
@@ -9,4 +9,4 @@ export class AnimateCssDriverProvider {
9
9
  export namespace AnimateCssDriverProvider {
10
10
  let $inject: string[];
11
11
  }
12
- import { JQLite } from "../shared/jqlite/jqlite";
12
+ import { JQLite } from "../shared/jqlite/jqlite.js";
@@ -1,7 +1,7 @@
1
1
  export function AnimateJsProvider($animateProvider: any): void;
2
2
  export class AnimateJsProvider {
3
3
  constructor($animateProvider: any);
4
- $get: (string | (($injector: import("../core/di/internal-injector").InjectorService, $$AnimateRunner: any) => (element: any, event: any, classes: any, options: any, ...args: any[]) => {
4
+ $get: (string | (($injector: import("../core/di/internal-injector.js").InjectorService, $$AnimateRunner: any) => (element: any, event: any, classes: any, options: any, ...args: any[]) => {
5
5
  $$willAnimate: boolean;
6
6
  end(): any;
7
7
  start(): any;
@@ -401,4 +401,4 @@ export type AnimationOptions = {
401
401
  */
402
402
  to: string;
403
403
  };
404
- import { JQLite } from "../shared/jqlite/jqlite";
404
+ import { JQLite } from "../shared/jqlite/jqlite.js";
@@ -1,5 +1,5 @@
1
1
  export function AnimationProvider(): void;
2
2
  export class AnimationProvider {
3
3
  drivers: any[];
4
- $get: (string | (($rootScope: any, $injector: import("../core/di/internal-injector").InjectorService, $$AnimateRunner: any, $$rAFScheduler: import("./raf-scheduler").RafScheduler, $$animateCache: any) => (element: any, event: any, options: any) => any))[];
4
+ $get: (string | (($rootScope: any, $injector: import("../core/di/internal-injector.js").InjectorService, $$AnimateRunner: any, $$rAFScheduler: import("./raf-scheduler").RafScheduler, $$animateCache: any) => (element: any, event: any, options: any) => any))[];
5
5
  }
@@ -15,7 +15,7 @@ export const EXPANDO: "ng";
15
15
  *
16
16
  * @type {Map<number, ExpandoStore>}
17
17
  */
18
- export const CACHE: Map<number, ExpandoStore>;
18
+ export const Cache: Map<number, ExpandoStore>;
19
19
  export type ExpandoStore = {
20
20
  data: {
21
21
  [x: string]: any;
@@ -20,7 +20,7 @@ export class Attributes {
20
20
  $exceptionHandler: import("../exception-handler").ErrorHandler;
21
21
  $sce: any;
22
22
  $attr: {};
23
- $$element: import("../../shared/jqlite/jqlite").JQLite;
23
+ $$element: import("../../shared/jqlite/jqlite.js").JQLite;
24
24
  /**
25
25
  * Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with `x-` or
26
26
  * `data-`) to its normalized, camelCase form.
@@ -87,4 +87,4 @@ export class Attributes {
87
87
  export type AttributeLike = {
88
88
  $attr: any;
89
89
  };
90
- import { directiveNormalize } from "../../shared/utils";
90
+ import { directiveNormalize } from "../../shared/utils.js";
@@ -99,13 +99,14 @@ export class CompileProvider {
99
99
  * @returns {object} `this` for chaining
100
100
  */
101
101
  addPropertySecurityContext: (elementName: string, propertyName: string, ctx: string) => object;
102
- $get: (string | (($injector: import("../../core/di/internal-injector").InjectorService, $interpolate: any, $exceptionHandler: import("../exception-handler").ErrorHandler, $templateRequest: any, $parse: import("../parse/parse").ParseService, $controller: any, $rootScope: import("../scope/scope").Scope, $sce: any, $animate: any) => ($compileNodes: string | NodeList, transcludeFn: any, maxPriority: any, ignoreDirective: any, previousCompileContext: any) => (scope: any, cloneConnectFn: any, options: any) => JQLite))[];
102
+ $get: (string | (($injector: import("../../core/di/internal-injector.js").InjectorService, $interpolate: any, $exceptionHandler: import("../exception-handler").ErrorHandler, $templateRequest: any, $parse: import("../parse/parse").ParseService, $controller: any, $rootScope: import("../scope/scope").Scope, $sce: any, $animate: any) => ($compileNodes: string | NodeList, transcludeFn: any, maxPriority: any, ignoreDirective: any, previousCompileContext: any) => (scope: any, cloneConnectFn: any, options: any) => JQLite))[];
103
103
  }
104
104
  export namespace CompileProvider {
105
105
  let $inject: string[];
106
106
  }
107
+ export const DIRECTIVE_SUFFIX: "Directive";
107
108
  /**
108
109
  * Function that aggregates all linking fns for a compilation root (nodeList)
109
110
  */
110
111
  export type CompositeLinkFn = Function;
111
- import { JQLite } from "../../shared/jqlite/jqlite";
112
+ import { JQLite } from "../../shared/jqlite/jqlite.js";
@@ -31,7 +31,7 @@ export class ControllerProvider {
31
31
  /**
32
32
  * $get method for dependency injection.
33
33
  *
34
- * @param {import("../../core/di/internal-injector").InjectorService} $injector
34
+ * @param {import("../../core/di/internal-injector.js").InjectorService} $injector
35
35
  * @returns {Function} A service function that creates controllers.
36
36
  */
37
37
  $get: (string | (($injector: any) => (expression: any, locals: any, later: any, ident: any) => any))[];