@angular-wave/angular.ts 0.0.72 → 0.0.73

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 (42) 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/animations/animate-js.html +5 -2
  5. package/src/animations/animate-queue.js +1 -1
  6. package/src/animations/animate.js +0 -18
  7. package/src/core/compile/attributes.js +8 -1
  8. package/src/core/compile/compile.spec.js +0 -1
  9. package/src/core/controller/controller.js +9 -3
  10. package/src/core/q/q.js +2 -1
  11. package/src/directive/change/change.js +3 -1
  12. package/src/directive/form/form.js +4 -3
  13. package/src/directive/list/list.js +3 -3
  14. package/src/directive/messages/messages.js +177 -172
  15. package/src/directive/model/model.js +261 -471
  16. package/src/directive/switch/switch.js +4 -4
  17. package/src/router/directives/state-directives.js +2 -9
  18. package/src/router/hooks/core-resolvables.js +5 -3
  19. package/src/router/path/path-utils.js +1 -2
  20. package/src/router/resolve/resolve-context.js +14 -29
  21. package/src/router/state/state-queue-manager.js +1 -2
  22. package/src/router/state/state-service.js +2 -3
  23. package/src/router/transition/transition.js +2 -2
  24. package/src/router/view/view.js +2 -8
  25. package/src/shared/common.js +3 -8
  26. package/src/shared/common.spec.js +1 -19
  27. package/src/shared/hof.js +1 -8
  28. package/src/shared/jqlite/jqlite.js +1 -1
  29. package/src/shared/predicates.js +3 -2
  30. package/src/types.js +2 -3
  31. package/types/animations/animate-queue.d.ts +1 -1
  32. package/types/core/compile/attributes.d.ts +10 -1
  33. package/types/core/q/q.d.ts +4 -2
  34. package/types/directive/form/form.d.ts +3 -1
  35. package/types/directive/messages/messages.d.ts +76 -0
  36. package/types/directive/model/model.d.ts +101 -239
  37. package/types/router/resolve/resolve-context.d.ts +0 -2
  38. package/types/router/transition/transition.d.ts +0 -1
  39. package/types/shared/common.d.ts +0 -3
  40. package/types/shared/hof.d.ts +0 -1
  41. package/types/shared/jqlite/jqlite.d.ts +2 -2
  42. package/types/types.d.ts +4 -2
@@ -90,8 +90,8 @@ export function ngSwitchWhenDirective() {
90
90
  );
91
91
 
92
92
  cases.forEach((whenCase) => {
93
- ctrl.cases[`!${whenCase}`] = ctrl.cases[`!${whenCase}`] || [];
94
- ctrl.cases[`!${whenCase}`].push({
93
+ ctrl["cases"][`!${whenCase}`] = ctrl["cases"][`!${whenCase}`] || [];
94
+ ctrl["cases"][`!${whenCase}`].push({
95
95
  transclude: $transclude,
96
96
  element,
97
97
  });
@@ -111,8 +111,8 @@ export function ngSwitchDefaultDirective() {
111
111
  require: "^ngSwitch",
112
112
  multiElement: true,
113
113
  link(_scope, element, _attr, ctrl, $transclude) {
114
- ctrl.cases["?"] = ctrl.cases["?"] || [];
115
- ctrl.cases["?"].push({ transclude: $transclude, element });
114
+ ctrl["cases"]["?"] = ctrl["cases"]["?"] || [];
115
+ ctrl["cases"]["?"].push({ transclude: $transclude, element });
116
116
  },
117
117
  };
118
118
  }
@@ -1,11 +1,4 @@
1
- import {
2
- forEach,
3
- tail,
4
- unnestR,
5
- uniqR,
6
- inArray,
7
- removeFrom,
8
- } from "../../shared/common";
1
+ import { forEach, tail, unnestR, uniqR, removeFrom } from "../../shared/common";
9
2
  import { isString, isObject } from "../../shared/utils";
10
3
 
11
4
  import { parse } from "../../shared/hof";
@@ -362,7 +355,7 @@ export function $StateRefActiveDirective(
362
355
  : [];
363
356
  const addClasses = fuzzyClasses.concat(exactClasses).reduce(uniqR, []);
364
357
  const removeClasses = allClasses.filter(
365
- (cls) => !inArray(addClasses, cls),
358
+ (cls) => !addClasses.includes(cls),
366
359
  );
367
360
  $scope.$evalAsync(() => {
368
361
  addClasses.forEach((className) =>
@@ -1,6 +1,6 @@
1
1
  import { Transition } from "../transition/transition";
2
2
  import { Resolvable } from "../resolve/resolvable";
3
- import { inArray, uniqR, unnestR } from "../../shared/common";
3
+ import { uniqR, unnestR } from "../../shared/common";
4
4
 
5
5
  export function registerAddCoreResolvables(transitionService) {
6
6
  transitionService.onCreate({}, function addCoreResolvables(trans) {
@@ -17,7 +17,7 @@ export function registerAddCoreResolvables(transitionService) {
17
17
  }
18
18
 
19
19
  const TRANSITION_TOKENS = ["$transition$", Transition];
20
- const isTransition = inArray(TRANSITION_TOKENS);
20
+
21
21
  // References to Transition in the treeChanges pathnodes makes all
22
22
  // previous Transitions reachable in memory, causing a memory leak
23
23
  // This function removes resolves for '$transition$' and `Transition` from the treeChanges.
@@ -28,7 +28,9 @@ export function treeChangesCleanup(trans) {
28
28
  .reduce(uniqR, []);
29
29
  // If the resolvable is a Transition, return a new resolvable with null data
30
30
  const replaceTransitionWithNull = (r) => {
31
- return isTransition(r.token) ? Resolvable.fromData(r.token, null) : r;
31
+ return TRANSITION_TOKENS.includes(r.token)
32
+ ? Resolvable.fromData(r.token, null)
33
+ : r;
32
34
  };
33
35
  nodes.forEach((node) => {
34
36
  node.resolvables = node.resolvables.map(replaceTransitionWithNull);
@@ -5,7 +5,6 @@ import {
5
5
  tail,
6
6
  mergeR,
7
7
  unnestR,
8
- inArray,
9
8
  arrayTuples,
10
9
  } from "../../shared/common";
11
10
  import { prop, propEq } from "../../shared/hof";
@@ -51,7 +50,7 @@ export class PathUtils {
51
50
  static applyViewConfigs($view, path, states) {
52
51
  // Only apply the viewConfigs to the nodes for the given states
53
52
  path
54
- .filter((node) => inArray(states, node.state))
53
+ .filter((node) => states.includes(node.state))
55
54
  .forEach((node) => {
56
55
  const viewDecls = Object.values(node.state.views || {});
57
56
  const subPath = PathUtils.subPath(path, (n) => n === node);
@@ -1,5 +1,5 @@
1
- import { find, tail, uniqR, unnestR, inArray } from "../../shared/common";
2
- import { propEq, not } from "../../shared/hof";
1
+ import { find, tail, uniqR, unnestR } from "../../shared/common";
2
+ import { propEq } from "../../shared/hof";
3
3
  import { trace } from "../common/trace";
4
4
  import { services } from "../common/coreservices";
5
5
  import { Resolvable } from "./resolvable";
@@ -61,7 +61,7 @@ export class ResolveContext {
61
61
  /** Returns the [[ResolvePolicy]] for the given [[Resolvable]] */
62
62
  getPolicy(resolvable) {
63
63
  const node = this.findNode(resolvable);
64
- return resolvable.getPolicy(node.state);
64
+ return resolvable.getPolicy(node);
65
65
  }
66
66
  /**
67
67
  * Returns a ResolveContext that includes a portion of this one
@@ -122,7 +122,7 @@ export class ResolveContext {
122
122
  */
123
123
  resolvePath(when = "LAZY", trans) {
124
124
  // This option determines which 'when' policy Resolvables we are about to fetch.
125
- const whenOption = inArray(ALL_WHENS, when) ? when : "LAZY";
125
+ const whenOption = ALL_WHENS.includes(when) ? when : "LAZY";
126
126
  // If the caller specified EAGER, only the EAGER Resolvables are fetched.
127
127
  // if the caller specified LAZY, both EAGER and LAZY Resolvables are fetched.`
128
128
  const matchedWhens =
@@ -130,7 +130,7 @@ export class ResolveContext {
130
130
  // get the subpath to the state argument, if provided
131
131
  trace.traceResolvePath(this._path, when, trans);
132
132
  const matchesPolicy = (acceptedVals, whenOrAsync) => (resolvable) =>
133
- inArray(acceptedVals, this.getPolicy(resolvable)[whenOrAsync]);
133
+ acceptedVals.includes(this.getPolicy(resolvable)[whenOrAsync]);
134
134
  // Trigger all the (matching) Resolvables in the path
135
135
  // Reduce all the "WAIT" Resolvables into an array
136
136
  const promises = this._path.reduce((acc, node) => {
@@ -139,7 +139,7 @@ export class ResolveContext {
139
139
  );
140
140
  const nowait = nodeResolvables.filter(matchesPolicy(["NOWAIT"], "async"));
141
141
  const wait = nodeResolvables.filter(
142
- not(matchesPolicy(["NOWAIT"], "async")),
142
+ (x) => !matchesPolicy(["NOWAIT"], "async")(x),
143
143
  );
144
144
  // For the matching Resolvables, start their async fetch process.
145
145
  const subContext = this.subContext(node.state);
@@ -155,10 +155,10 @@ export class ResolveContext {
155
155
  return services.$q.all(promises);
156
156
  }
157
157
  injector() {
158
- return this._injector || (this._injector = new UIInjectorImpl(this));
158
+ return this._injector || (this._injector = new UIInjectorImpl());
159
159
  }
160
160
  findNode(resolvable) {
161
- return find(this._path, (node) => inArray(node.resolvables, resolvable));
161
+ return find(this._path, (node) => node.resolvables.includes(resolvable));
162
162
  }
163
163
  /**
164
164
  * Gets the async dependencies of a Resolvable
@@ -177,7 +177,7 @@ export class ResolveContext {
177
177
  const getDependency = (token) => {
178
178
  const matching = availableResolvables.filter((r) => r.token === token);
179
179
  if (matching.length) return tail(matching);
180
- const fromInjector = this.injector().getNative(token);
180
+ const fromInjector = services.$injector.get(token);
181
181
  if (isUndefined(fromInjector)) {
182
182
  throw new Error(
183
183
  "Could not find Dependency Injection token: " + stringify(token),
@@ -190,31 +190,16 @@ export class ResolveContext {
190
190
  }
191
191
 
192
192
  class UIInjectorImpl {
193
- constructor(context) {
194
- this.context = context;
195
- this.native = this.get(NATIVE_INJECTOR_TOKEN) || services.$injector;
193
+ constructor() {
194
+ this.native = services.$injector;
196
195
  }
197
196
  get(token) {
198
- const resolvable = this.context.getResolvable(token);
199
- if (resolvable) {
200
- if (this.context.getPolicy(resolvable).async === "NOWAIT") {
201
- return resolvable.get(this.context);
202
- }
203
- if (!resolvable.resolved) {
204
- throw new Error(
205
- "Resolvable async .get() not complete:" + stringify(resolvable.token),
206
- );
207
- }
208
- return resolvable.data;
209
- }
210
- return this.getNative(token);
197
+ return services.$injector.get(token);
211
198
  }
212
199
  getAsync(token) {
213
- const resolvable = this.context.getResolvable(token);
214
- if (resolvable) return resolvable.get(this.context);
215
- return services.$q.when(this.native.get(token));
200
+ return services.$q.when(services.$injector.get(token));
216
201
  }
217
202
  getNative(token) {
218
- return this.native && this.native.get(token);
203
+ return services.$injector.get(token);
219
204
  }
220
205
  }
@@ -1,4 +1,3 @@
1
- import { inArray } from "../../shared/common";
2
1
  import { prop } from "../../shared/hof";
3
2
  import { isString } from "../../shared/utils";
4
3
  import { StateObject } from "./state-object";
@@ -19,7 +18,7 @@ export class StateQueueManager {
19
18
  if (!isString(name)) throw new Error("State must have a valid name");
20
19
  if (
21
20
  Object.prototype.hasOwnProperty.call(this.states, name) ||
22
- inArray(queue.map(prop("name")), name)
21
+ queue.map(prop("name")).includes(name)
23
22
  )
24
23
  throw new Error(`State '${name}' is already defined`);
25
24
  queue.push(state);
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  createProxyFunctions,
3
3
  defaults,
4
- inArray,
5
4
  removeFrom,
6
5
  silenceUncaughtInPromise,
7
6
  silentRejection,
@@ -18,7 +17,7 @@ import { Param } from "../params/param";
18
17
  import { Glob } from "../common/glob";
19
18
  import { ResolveContext } from "../resolve/resolve-context";
20
19
  import { lazyLoadState } from "../hooks/lazy-load";
21
- import { not, val } from "../../shared/hof";
20
+ import { val } from "../../shared/hof";
22
21
  import { EventBus } from "../../core/pubsub/pubsub";
23
22
 
24
23
  const err = minErr("$stateProvider");
@@ -75,7 +74,7 @@ export class StateService {
75
74
  };
76
75
  const getters = ["current", "$current", "params", "transition"];
77
76
  const boundFns = Object.keys(StateService.prototype).filter(
78
- not(inArray(getters)),
77
+ (x) => !getters.includes(x),
79
78
  );
80
79
  createProxyFunctions(
81
80
  val(StateService.prototype),
@@ -14,7 +14,7 @@ import {
14
14
  uniqR,
15
15
  } from "../../shared/common";
16
16
  import { isUndefined, isObject } from "../../shared/utils";
17
- import { prop, propEq, val, not, is } from "../../shared/hof";
17
+ import { prop, propEq, val, is } from "../../shared/hof";
18
18
  import { TransitionHookPhase } from "./interface"; // has or is using
19
19
  import { TransitionHook } from "./transition-hook";
20
20
  import { matchState, makeEvent } from "./hook-registry";
@@ -500,7 +500,7 @@ export class Transition {
500
500
  redirectEnteringNodes,
501
501
  originalEnteringNodes,
502
502
  PathUtils.nonDynamicParams,
503
- ).filter(not(nodeIsReloading(targetState.options().reloadState)));
503
+ ).filter((x) => !nodeIsReloading(targetState.options().reloadState)(x));
504
504
  // Use the existing (possibly pre-resolved) resolvables for the matching entering nodes.
505
505
  matchingEnteringNodes.forEach((node, idx) => {
506
506
  node.resolvables = originalEnteringNodes[idx].resolvables;
@@ -1,10 +1,4 @@
1
- import {
2
- equals,
3
- applyPairs,
4
- removeFrom,
5
- inArray,
6
- find,
7
- } from "../../shared/common";
1
+ import { equals, applyPairs, removeFrom, find } from "../../shared/common";
8
2
  import { curry, prop } from "../../shared/hof";
9
3
  import { trace } from "../common/trace";
10
4
  import { getNg1ViewConfigFactory } from "../state/views";
@@ -133,7 +127,7 @@ export class ViewService {
133
127
  .map(matchingConfigPair);
134
128
  const matchedViewConfigs = ngViewTuples.map((tuple) => tuple.viewConfig);
135
129
  const unmatchedConfigTuples = this._viewConfigs
136
- .filter((config) => !inArray(matchedViewConfigs, config))
130
+ .filter((config) => !matchedViewConfigs.includes(config))
137
131
  .map((viewConfig) => ({ ngView: undefined, viewConfig }));
138
132
  ngViewTuples.forEach(configureUIView);
139
133
  const allTuples = ngViewTuples.concat(unmatchedConfigTuples);
@@ -1,5 +1,5 @@
1
1
  import { isDate, isFunction, isRegExp, isString } from "./utils";
2
- import { all, any, prop, curry, not } from "./hof";
2
+ import { all, any, prop, curry } from "./hof";
3
3
  import { services } from "../router/common/coreservices";
4
4
  export const fromJson = JSON.parse.bind(JSON);
5
5
  export const toJson = JSON.stringify.bind(JSON);
@@ -101,11 +101,6 @@ export function inherit(parent, extra) {
101
101
  return newObj;
102
102
  }
103
103
 
104
- /** Given an array, returns true if the object is found in the array, (using includes) */
105
- export const inArray = curry(_inArray);
106
- export function _inArray(array, obj) {
107
- return array.includes(obj);
108
- }
109
104
  /**
110
105
  * Given an array, and an item, if the item is found in the array, it removes it (in-place).
111
106
  * The same array is returned
@@ -188,7 +183,7 @@ export function pick(obj, propNames) {
188
183
  */
189
184
  export function omit(obj, propNames) {
190
185
  return Object.keys(obj)
191
- .filter(not(inArray(propNames)))
186
+ .filter((x) => !propNames.includes(x))
192
187
  .reduce((acc, key) => ((acc[key] = obj[key]), acc), {});
193
188
  }
194
189
  /**
@@ -287,7 +282,7 @@ export function pushR(arr, obj) {
287
282
  }
288
283
  /** Reduce function that filters out duplicates */
289
284
  export const uniqR = (acc, token) =>
290
- inArray(acc, token) ? acc : pushR(acc, token);
285
+ acc.includes(token) ? acc : pushR(acc, token);
291
286
  /**
292
287
  * Return a new array with a single level of arrays unnested.
293
288
  *
@@ -1,5 +1,5 @@
1
1
  import { defaults, filter, map, mapObj, pick } from "./common";
2
- import { is, eq, not, pattern, val } from "./hof";
2
+ import { is, eq, pattern, val } from "./hof";
3
3
  import { isInjectable } from "./predicates";
4
4
  import { Queue } from "../router/common/queue";
5
5
 
@@ -58,24 +58,6 @@ describe("common", function () {
58
58
  });
59
59
  });
60
60
 
61
- describe("not", function () {
62
- it("should allow double-negatives", function () {
63
- function T() {
64
- return true;
65
- }
66
- function F() {
67
- return false;
68
- }
69
- function empty() {
70
- return "";
71
- }
72
-
73
- expect(not(not(T))()).toBe(true);
74
- expect(not(not(F))()).toBe(false);
75
- expect(not(not(empty))()).toBe(false);
76
- });
77
- });
78
-
79
61
  describe("val", function () {
80
62
  it("should return identity", function () {
81
63
  const f = function () {},
package/src/shared/hof.js CHANGED
@@ -104,14 +104,7 @@ export const propEq = curry((name, _val, obj) => obj && obj[name] === _val);
104
104
  * propNotFound(obj) === undefined
105
105
  */
106
106
  export const parse = (name) => pipe.apply(null, name.split(".").map(prop));
107
- /**
108
- * Given a function that returns a truthy or falsey value, returns a
109
- * function that returns the opposite (falsey or truthy) value given the same inputs
110
- */
111
- export const not =
112
- (fn) =>
113
- (...args) =>
114
- !fn.apply(null, args);
107
+
115
108
  /**
116
109
  * Given two functions that return truthy or falsey values, returns a function that returns truthy
117
110
  * if both functions return truthy for the given arguments
@@ -1123,7 +1123,7 @@ function specialMouseHandlerWrapper(target, event, handler) {
1123
1123
  }
1124
1124
 
1125
1125
  /**
1126
- * @param {string} elementStr
1126
+ * @param {string|JQLite} elementStr
1127
1127
  * @returns {string} Returns the string representation of the element.
1128
1128
  */
1129
1129
  export function startingTag(elementStr) {
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * @packageDocumentation
8
8
  */
9
- import { and, not, pipe, prop, or } from "./hof";
9
+ import { and, pipe, prop, or } from "./hof";
10
10
  import { isFunction, isObject, isString, isUndefined } from "./utils";
11
11
  export const isNull = (o) => o === null;
12
12
  export const isNullOrUndefined = or(isNull, isUndefined);
@@ -21,7 +21,8 @@ export function isInjectable(val) {
21
21
  const head = val.slice(0, -1),
22
22
  tail = val.slice(-1);
23
23
  return !(
24
- head.filter(not(isString)).length || tail.filter(not(isFunction)).length
24
+ head.filter((x) => !isString(x)).length ||
25
+ tail.filter((x) => !isFunction(x)).length
25
26
  );
26
27
  }
27
28
  return isFunction(val);
package/src/types.js CHANGED
@@ -68,9 +68,8 @@
68
68
 
69
69
  /**
70
70
  * @typedef {Object} Controller
71
+ * @property {string} name
71
72
  * @description Interface representing the lifecycle hooks for AngularJS directive controllers.
72
- * @see {@link https://docs.angularjs.org/api/ng/service/$compile#life-cycle-hooks}
73
- * @see {@link https://docs.angularjs.org/guide/component}
74
73
  *
75
74
  * @property {function(): void} [$onInit]
76
75
  * Called on each controller after all the controllers on an element have been constructed and had their bindings
@@ -147,7 +146,7 @@
147
146
  */
148
147
 
149
148
  /**
150
- * @typedef {DirectiveController} TController
149
+ * @typedef {DirectiveController|NgModelController} TController
151
150
  */
152
151
 
153
152
  /**
@@ -6,7 +6,7 @@ export class $$AnimateQueueProvider {
6
6
  cancel: any[];
7
7
  join: any[];
8
8
  };
9
- $get: (string | (($rootScope: any, $injector: any, $$animation: any, $$AnimateRunner: any, $templateRequest: any) => {
9
+ $get: (string | (($rootScope: import("../core/scope/scope").Scope, $injector: any, $$animation: any, $$AnimateRunner: any, $templateRequest: any) => {
10
10
  on(event: any, container: any, callback: any): void;
11
11
  off(event: any, container: any, callback: any, ...args: any[]): void;
12
12
  pin(element: any, parentElement: any): void;
@@ -1,6 +1,12 @@
1
+ /**
2
+ * @typedef {Object} AnyStringKeyObject
3
+ * @property {Record<string, any>} [key]
4
+ */
5
+ /**
6
+ * @extends {AnyStringKeyObject}
7
+ */
1
8
  export class Attributes {
2
9
  /**
3
- *
4
10
  * @param {import('../scope/scope').Scope} $rootScope
5
11
  * @param {*} $animate
6
12
  * @param {import("../exception-handler").ExceptionHandlerProvider} $exceptionHandler
@@ -98,4 +104,7 @@ export class Attributes {
98
104
  sanitizeSrcset(value: any, invokeType: any): any;
99
105
  srcset: any;
100
106
  }
107
+ export type AnyStringKeyObject = {
108
+ key?: Record<string, any>;
109
+ };
101
110
  import { directiveNormalize } from "../../shared/utils";
@@ -4,7 +4,7 @@
4
4
  * @property {function(
5
5
  * ((value: T) => (PromiseLike<never>|PromiseLike<T>|T))|null,
6
6
  * ((reason: any) => (PromiseLike<never>|PromiseLike<T>|T))|null,
7
- * ((state: any) => any)
7
+ * ((state: any) => any)=
8
8
  * ): QPromise<T|never>} then - Calls one of the success or error callbacks asynchronously as soon as the result is available.
9
9
  * @property {function(
10
10
  * ((value: T) => (QPromise<never>|QPromise<T>|T))|null,
@@ -13,6 +13,7 @@
13
13
  * ): QPromise<T|never>} then - Calls one of the success or error callbacks asynchronously as soon as the result is available.
14
14
  * @property {function(((reason: any) => (PromiseLike<never>|PromiseLike<T>|T))|null): QPromise<T>|T} catch - Shorthand for promise.then(null, errorCallback).
15
15
  * @property {function(((reason: any) => (QPromise<never>|QPromise<T>|T))|null): QPromise<T>|T} catch - Shorthand for promise.then(null, errorCallback).
16
+ * @property {function(Array.<QPromise<T>>): QPromise<T>} all
16
17
  * @property {function(function(): void): QPromise<T>} finally - Allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value.
17
18
  * @property {number} [$$intervalId] - Internal id set by the $interval service for callback notifications
18
19
  * @property {number} [$$timeoutId] - Timeout id set by the $timeout service for cancelations
@@ -53,11 +54,12 @@ export type QPromise<T> = {
53
54
  /**
54
55
  * - Calls one of the success or error callbacks asynchronously as soon as the result is available.
55
56
  */
56
- then: (arg0: ((value: T) => (PromiseLike<never> | PromiseLike<T> | T)) | null, arg1: ((reason: any) => (PromiseLike<never> | PromiseLike<T> | T)) | null, arg2: ((state: any) => any)) => QPromise<T | never>;
57
+ then: (arg0: ((value: T) => (PromiseLike<never> | PromiseLike<T> | T)) | null, arg1: ((reason: any) => (PromiseLike<never> | PromiseLike<T> | T)) | null, arg2: ((state: any) => any) | undefined) => QPromise<T | never>;
57
58
  /**
58
59
  * - Shorthand for promise.then(null, errorCallback).
59
60
  */
60
61
  catch: (arg0: ((reason: any) => (PromiseLike<never> | PromiseLike<T> | T)) | null) => QPromise<T> | T;
62
+ all: (arg0: Array<QPromise<T>>) => QPromise<T>;
61
63
  /**
62
64
  * - Allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value.
63
65
  */
@@ -141,17 +141,19 @@ export namespace FormController {
141
141
  }
142
142
  export function setupValidity(instance: any): void;
143
143
  export function addSetValidityMethod(context: any): void;
144
+ export function isObjectEmpty(obj: any): boolean;
144
145
  export namespace nullFormCtrl {
145
146
  export function $addControl(): void;
146
147
  export let $getControls: () => any;
147
148
  export { nullFormRenameControl as $$renameControl };
148
149
  export function $removeControl(): void;
149
- export function $setValidity(): void;
150
+ export let $setValidity: (...any: any) => any;
150
151
  export function $setDirty(): void;
151
152
  export function $setPristine(): void;
152
153
  export function $setSubmitted(): void;
153
154
  export function $$setSubmitted(): void;
154
155
  }
156
+ export const PENDING_CLASS: "ng-pending";
155
157
  export const formDirective: (string | (($timeout: any, $parse: any) => {
156
158
  name: string;
157
159
  restrict: string;
@@ -0,0 +1,76 @@
1
+ export function ngMessagesDirective($animate: any): {
2
+ require: string;
3
+ restrict: string;
4
+ controller: ($element: any, $scope: any, $attrs: any) => NgMessageCtrl;
5
+ };
6
+ export namespace ngMessagesDirective {
7
+ let $inject: string[];
8
+ }
9
+ export function ngMessagesIncludeDirective($templateRequest: any, $compile: any): {
10
+ restrict: string;
11
+ require: string;
12
+ link($scope: any, element: any, attrs: any): void;
13
+ };
14
+ export namespace ngMessagesIncludeDirective {
15
+ let $inject_1: string[];
16
+ export { $inject_1 as $inject };
17
+ }
18
+ export function ngMessageDirective($animate: any): {
19
+ restrict: string;
20
+ transclude: string;
21
+ priority: number;
22
+ terminal: boolean;
23
+ require: string;
24
+ link(scope: any, element: any, attrs: any, ngMessagesCtrl: any, $transclude: any): void;
25
+ };
26
+ export namespace ngMessageDirective {
27
+ let $inject_2: string[];
28
+ export { $inject_2 as $inject };
29
+ }
30
+ export function ngMessageExpDirective($animate: any): {
31
+ restrict: string;
32
+ transclude: string;
33
+ priority: number;
34
+ terminal: boolean;
35
+ require: string;
36
+ link(scope: any, element: any, attrs: any, ngMessagesCtrl: any, $transclude: any): void;
37
+ };
38
+ export namespace ngMessageExpDirective { }
39
+ export function ngMessageDefaultDirective($animate: any): {
40
+ restrict: string;
41
+ transclude: string;
42
+ priority: number;
43
+ terminal: boolean;
44
+ require: string;
45
+ link(scope: any, element: any, attrs: any, ngMessagesCtrl: any, $transclude: any): void;
46
+ };
47
+ export namespace ngMessageDefaultDirective { }
48
+ declare class NgMessageCtrl {
49
+ /**
50
+ * @param {import('../../shared/jqlite/jqlite').JQLite} $element
51
+ * @param {import('../../core/scope/scope').Scope} $scope
52
+ * @param {import('../../core/compile/attributes').Attributes} $attrs
53
+ * @param {*} $animate
54
+ */
55
+ constructor($element: import("../../shared/jqlite/jqlite").JQLite, $scope: import("../../core/scope/scope").Scope, $attrs: import("../../core/compile/attributes").Attributes, $animate: any);
56
+ $element: import("../../shared/jqlite/jqlite").JQLite;
57
+ $scope: import("../../core/scope/scope").Scope;
58
+ $attrs: import("../../core/compile/attributes").Attributes;
59
+ $animate: any;
60
+ latestKey: number;
61
+ nextAttachId: number;
62
+ messages: {};
63
+ renderLater: boolean;
64
+ cachedCollection: {};
65
+ head: any;
66
+ default: any;
67
+ getAttachId(): number;
68
+ render(collection?: {}): void;
69
+ reRender(): void;
70
+ register(comment: any, messageCtrl: any, isDefault: any): void;
71
+ deregister(comment: any, isDefault: any): void;
72
+ findPreviousMessage(parent: any, comment: any): any;
73
+ insertMessageNode(parent: any, comment: any, key: any): void;
74
+ removeMessageNode(parent: any, comment: any, key: any): void;
75
+ }
76
+ export {};