@angular-wave/angular.ts 0.0.60 → 0.0.61

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 (119) hide show
  1. package/README.md +1 -1
  2. package/dist/angular-ts.esm.js +2 -2
  3. package/dist/angular-ts.umd.js +2 -2
  4. package/package.json +1 -1
  5. package/src/core/parser/parse.js +14 -0
  6. package/src/core/parser/parser.js +1 -1
  7. package/src/core/q/q.js +46 -289
  8. package/src/core/q/q.md +229 -0
  9. package/src/core/sanitize/sanitize-uri.js +2 -3
  10. package/src/core/scope/scope.js +18 -8
  11. package/src/directive/if/if.js +6 -1
  12. package/src/filters/limit-to.js +5 -2
  13. package/src/loader.js +1 -5
  14. package/src/router/params/param-type.js +2 -1
  15. package/src/router/state/views.js +3 -0
  16. package/src/router/transition/reject-factory.js +1 -0
  17. package/src/router/url/url-rule.js +1 -1
  18. package/src/router/url/url-service.js +4 -4
  19. package/src/services/http/http.js +7 -5
  20. package/src/services/template-request.js +2 -7
  21. package/src/shared/common.js +1 -1
  22. package/src/shared/utils.js +1 -1
  23. package/src/types.js +9 -1
  24. package/types/core/parser/parse.d.ts +3 -4
  25. package/types/core/parser/parser.d.ts +1 -1
  26. package/types/core/q/q.d.ts +2 -2
  27. package/types/core/sanitize/sanitize-uri.d.ts +4 -5
  28. package/types/core/scope/scope.d.ts +19 -7
  29. package/types/loader.d.ts +0 -4
  30. package/types/router/params/param-type.d.ts +2 -1
  31. package/types/router/state/views.d.ts +2 -0
  32. package/types/router/transition/reject-factory.d.ts +1 -0
  33. package/types/router/url/url-rule.d.ts +0 -1
  34. package/types/router/url/url-service.d.ts +7 -7
  35. package/types/services/template-request.d.ts +4 -9
  36. package/types/types.d.ts +6 -1
  37. package/types-back/README.md +0 -2
  38. package/types-back/angular.d.ts +0 -146
  39. package/types-back/index.d.ts +0 -2126
  40. package/types-back/jqlite.d.ts +0 -374
  41. package/types-back/router/core/common/common.d.ts +0 -416
  42. package/types-back/router/core/common/coreservices.d.ts +0 -77
  43. package/types-back/router/core/common/glob.d.ts +0 -60
  44. package/types-back/router/core/common/hof.d.ts +0 -168
  45. package/types-back/router/core/common/index.d.ts +0 -8
  46. package/types-back/router/core/common/predicates.d.ts +0 -25
  47. package/types-back/router/core/common/queue.d.ts +0 -15
  48. package/types-back/router/core/common/safeConsole.d.ts +0 -5
  49. package/types-back/router/core/common/strings.d.ts +0 -66
  50. package/types-back/router/core/common/trace.d.ts +0 -126
  51. package/types-back/router/core/globals.d.ts +0 -43
  52. package/types-back/router/core/hooks/coreResolvables.d.ts +0 -6
  53. package/types-back/router/core/hooks/ignoredTransition.d.ts +0 -4
  54. package/types-back/router/core/hooks/invalidTransition.d.ts +0 -4
  55. package/types-back/router/core/hooks/lazyLoad.d.ts +0 -17
  56. package/types-back/router/core/hooks/onEnterExitRetain.d.ts +0 -10
  57. package/types-back/router/core/hooks/redirectTo.d.ts +0 -4
  58. package/types-back/router/core/hooks/resolve.d.ts +0 -11
  59. package/types-back/router/core/hooks/updateGlobals.d.ts +0 -4
  60. package/types-back/router/core/hooks/url.d.ts +0 -4
  61. package/types-back/router/core/hooks/views.d.ts +0 -7
  62. package/types-back/router/core/index.d.ts +0 -11
  63. package/types-back/router/core/interface.d.ts +0 -91
  64. package/types-back/router/core/params/index.d.ts +0 -12
  65. package/types-back/router/core/params/interface.d.ts +0 -606
  66. package/types-back/router/core/params/param.d.ts +0 -77
  67. package/types-back/router/core/params/paramType.d.ts +0 -65
  68. package/types-back/router/core/params/paramTypes.d.ts +0 -193
  69. package/types-back/router/core/params/stateParams.d.ts +0 -15
  70. package/types-back/router/core/path/index.d.ts +0 -2
  71. package/types-back/router/core/path/pathNode.d.ts +0 -60
  72. package/types-back/router/core/path/pathUtils.d.ts +0 -105
  73. package/types-back/router/core/resolve/index.d.ts +0 -3
  74. package/types-back/router/core/resolve/interface.d.ts +0 -210
  75. package/types-back/router/core/resolve/resolvable.d.ts +0 -75
  76. package/types-back/router/core/resolve/resolveContext.d.ts +0 -97
  77. package/types-back/router/core/router.d.ts +0 -57
  78. package/types-back/router/core/state/index.d.ts +0 -28
  79. package/types-back/router/core/state/interface.d.ts +0 -732
  80. package/types-back/router/core/state/stateBuilder.d.ts +0 -107
  81. package/types-back/router/core/state/stateMatcher.d.ts +0 -13
  82. package/types-back/router/core/state/stateObject.d.ts +0 -170
  83. package/types-back/router/core/state/stateQueueManager.d.ts +0 -27
  84. package/types-back/router/core/state/stateRegistry.d.ts +0 -138
  85. package/types-back/router/core/state/stateService.d.ts +0 -386
  86. package/types-back/router/core/state/targetState.d.ts +0 -105
  87. package/types-back/router/core/transition/hookBuilder.d.ts +0 -49
  88. package/types-back/router/core/transition/hookRegistry.d.ts +0 -115
  89. package/types-back/router/core/transition/index.d.ts +0 -20
  90. package/types-back/router/core/transition/interface.d.ts +0 -862
  91. package/types-back/router/core/transition/rejectFactory.d.ts +0 -103
  92. package/types-back/router/core/transition/transition.d.ts +0 -575
  93. package/types-back/router/core/transition/transitionEventType.d.ts +0 -26
  94. package/types-back/router/core/transition/transitionHook.d.ts +0 -96
  95. package/types-back/router/core/transition/transitionService.d.ts +0 -253
  96. package/types-back/router/core/url/index.d.ts +0 -8
  97. package/types-back/router/core/url/interface.d.ts +0 -169
  98. package/types-back/router/core/url/urlConfig.d.ts +0 -144
  99. package/types-back/router/core/url/urlMatcher.d.ts +0 -185
  100. package/types-back/router/core/url/urlMatcherFactory.d.ts +0 -56
  101. package/types-back/router/core/url/urlRouter.d.ts +0 -101
  102. package/types-back/router/core/url/urlRule.d.ts +0 -143
  103. package/types-back/router/core/url/urlRules.d.ts +0 -251
  104. package/types-back/router/core/url/urlService.d.ts +0 -205
  105. package/types-back/router/core/view/index.d.ts +0 -2
  106. package/types-back/router/core/view/interface.d.ts +0 -46
  107. package/types-back/router/core/view/view.d.ts +0 -176
  108. package/types-back/router/directives/viewDirective.d.ts +0 -144
  109. package/types-back/router/index.d.ts +0 -17
  110. package/types-back/router/interface.d.ts +0 -500
  111. package/types-back/router/legacy/resolveService.d.ts +0 -47
  112. package/types-back/router/legacy/stateEvents.d.ts +0 -124
  113. package/types-back/router/services.d.ts +0 -15
  114. package/types-back/router/stateFilters.d.ts +0 -10
  115. package/types-back/router/stateProvider.d.ts +0 -258
  116. package/types-back/router/statebuilders/onEnterExitRetain.d.ts +0 -13
  117. package/types-back/router/statebuilders/views.d.ts +0 -53
  118. package/types-back/router/templateFactory.d.ts +0 -104
  119. package/types-back/router/viewScroll.d.ts +0 -9
@@ -31,6 +31,18 @@ export type TTL = number;
31
31
  * @property {Function} fn
32
32
  * @property {Object} locals
33
33
  */
34
+ /**
35
+ * @typedef {function(any, any, Scope): any} WatchListener
36
+ * Callback function triggered whenever the value of `watchExpression` changes.
37
+ *
38
+ * @param {any} newVal - The current value of the `watchExpression`.
39
+ * @param {any} oldVal - The previous value of the `watchExpression`.
40
+ * @param {Scope} scope - The current scope in which the `watchExpression` is evaluated.
41
+ *
42
+ */
43
+ /**
44
+ * @typedef {string | ((scope: Scope) => any)} WatchExpression
45
+ */
34
46
  /**
35
47
  *
36
48
  * The default number of `$digest` iterations the scope should attempt to execute before giving up and
@@ -272,17 +284,12 @@ export class Scope {
272
284
  *
273
285
  * - `string`: Evaluated as {@link guide/expression expression}
274
286
  * - `function(scope)`: called with current `scope` as a parameter.
275
- * @param {(newVal: any, oldVal: any, scope: Scope) => any} listener Callback called whenever the value
276
- * of `watchExpression` changes.
277
- *
278
- * - `newVal` contains the current value of the `watchExpression`
279
- * - `oldVal` contains the previous value of the `watchExpression`
280
- * - `scope` refers to the current scope
287
+ * @param {WatchListener} listener
281
288
  * @param {boolean=} [objectEquality=false] Compare for object equality using {@link angular.equals} instead of
282
289
  * comparing for reference equality.
283
290
  * @returns {function()} Returns a deregistration function for this listener.
284
291
  */
285
- $watch(watchExp: string | ((scope: Scope) => any), listener: (newVal: any, oldVal: any, scope: Scope) => any, objectEquality?: boolean | undefined): () => any;
292
+ $watch(watchExp: string | ((scope: Scope) => any), listener: WatchListener, objectEquality?: boolean | undefined): () => any;
286
293
  /**
287
294
  * @ngdoc method
288
295
  * @name $rootScope.Scope#$watchGroup
@@ -732,3 +739,8 @@ export type AsyncQueueTask = {
732
739
  fn: Function;
733
740
  locals: any;
734
741
  };
742
+ /**
743
+ * Callback function triggered whenever the value of `watchExpression` changes.
744
+ */
745
+ export type WatchListener = (arg0: any, arg1: any, arg2: Scope) => any;
746
+ export type WatchExpression = string | ((scope: Scope) => any);
package/types/loader.d.ts CHANGED
@@ -303,10 +303,6 @@ export class Angular {
303
303
  */
304
304
  injector(modules: any[], strictDi: boolean | null): angular.auto.IInjectorService;
305
305
  /**
306
- * @ngdoc function
307
- * @name angular.module
308
- * @module ng
309
- * @description
310
306
  *
311
307
  * The `angular.module` is a global place for creating, registering and retrieving AngularJS
312
308
  * modules.
@@ -32,8 +32,9 @@ export class ParamType {
32
32
  pattern: RegExp;
33
33
  /** @inheritdoc */
34
34
  inherit: boolean;
35
+ name: any;
35
36
  /** @inheritdoc */
36
- is(): boolean;
37
+ is(_val: any): boolean;
37
38
  /** @inheritdoc */
38
39
  encode(val: any): any;
39
40
  /** @inheritdoc */
@@ -30,6 +30,8 @@ export class Ng1ViewConfig {
30
30
  path: any;
31
31
  viewDecl: any;
32
32
  factory: any;
33
+ component: any;
34
+ template: any;
33
35
  /** @type {Number} */ $id: number;
34
36
  loaded: boolean;
35
37
  getTemplate: (ngView: any, context: any) => any;
@@ -37,6 +37,7 @@ export class Rejection {
37
37
  type: any;
38
38
  message: any;
39
39
  detail: any;
40
+ redirected: boolean;
40
41
  toString(): string;
41
42
  toPromise(): any;
42
43
  }
@@ -124,7 +124,6 @@ export namespace UrlRuleFactory {
124
124
  * A base rule which calls `match`
125
125
  *
126
126
  * The value from the `match` function is passed through to the `handler`.
127
- * @type {angular.BaseUrlRule}
128
127
  */
129
128
  export class BaseUrlRule {
130
129
  constructor(match: any, handler: any);
@@ -4,11 +4,11 @@
4
4
  export class UrlService {
5
5
  static $inject: string[];
6
6
  /**
7
- * @param {angular.ILocationProvider} $locationProvider
7
+ * @param {import("../../core/location/location").$LocationProvider} $locationProvider
8
8
  */
9
- constructor($locationProvider: angular.ILocationProvider, stateService: any, globals: any, urlConfigProvider: any);
9
+ constructor($locationProvider: import("../../core/location/location").$LocationProvider, stateService: any, globals: any, urlConfigProvider: any);
10
10
  stateService: any;
11
- $locationProvider: angular.ILocationProvider;
11
+ $locationProvider: import("../../core/location/location").$LocationProvider;
12
12
  $location: any;
13
13
  $browser: any;
14
14
  /** @type {boolean} */
@@ -26,9 +26,9 @@ export class UrlService {
26
26
  * The nested [[UrlConfig]] API to configure the URL and retrieve URL information
27
27
  *
28
28
  * See: [[UrlConfig]] for details
29
- * @type {angular.UrlConfig}
29
+ * @type {import("./url-config").UrlConfigProvider}
30
30
  */
31
- config: angular.UrlConfig;
31
+ config: import("./url-config").UrlConfigProvider;
32
32
  /** Creates a new [[Param]] for a given location (DefType) */
33
33
  paramFactory: ParamFactory;
34
34
  /**
@@ -214,9 +214,9 @@ export class UrlService {
214
214
  *
215
215
  * Given a URL (as a [[UrlParts]] object), check all rules and determine the best matching rule.
216
216
  * Return the result as a [[MatchResult]].
217
- * @returns {angular.MatchResult}
217
+ * @returns {any}
218
218
  */
219
- match(url: any): angular.MatchResult;
219
+ match(url: any): any;
220
220
  update(read: any): void;
221
221
  location: any;
222
222
  /**
@@ -1,15 +1,10 @@
1
1
  /**
2
- * @ngdoc provider
3
- * @name $templateRequestProvider
4
- * @this
5
- *
6
- * @description
7
2
  * Used to configure the options passed to the {@link $http} service when making a template request.
8
3
  *
9
4
  * For example, it can be used for specifying the "Accept" header that is sent to the server, when
10
5
  * requesting a template.
11
6
  */
12
- export function TemplateRequestProvider(this: any): void;
7
+ export function TemplateRequestProvider(): void;
13
8
  export class TemplateRequestProvider {
14
9
  /**
15
10
  * @ngdoc method
@@ -21,10 +16,10 @@ export class TemplateRequestProvider {
21
16
  * The {@link $templateRequest} will set the `cache` and the `transformResponse` properties of the
22
17
  * options if not overridden here.
23
18
  *
24
- * @param {string=} value new value for the {@link $http} options.
25
- * @returns {string|self} Returns the {@link $http} options when used as getter and self if used as setter.
19
+ * @param {string=} val new value for the {@link $http} options.
20
+ * @returns {string|TemplateRequestProvider} Returns the {@link $http} options when used as getter and self if used as setter.
26
21
  */
27
- httpOptions: (val: any) => string | (Window & typeof globalThis);
22
+ httpOptions: (val?: string | undefined) => string | TemplateRequestProvider;
28
23
  /**
29
24
  * @ngdoc service
30
25
  * @name $templateRequest
package/types/types.d.ts CHANGED
@@ -29,7 +29,7 @@ export type CloneAttachFunction = (clonedElement?: import("./shared/jqlite/jqlit
29
29
  * https://docs.angularjs.org/api/ng/service/$compile#-controller-
30
30
  * http://teropa.info/blog/2015/06/09/transclusion.html
31
31
  */
32
- export type TranscludeFunction = {
32
+ export type TranscludeFunctionObject = {
33
33
  transcludeWithScope: (arg0: TScope, arg1: CloneAttachFunction, arg2: import("./shared/jqlite/jqlite").JQLite | undefined, arg3: string | undefined) => import("./shared/jqlite/jqlite").JQLite;
34
34
  transcludeWithoutScope: (arg0: CloneAttachFunction | undefined, arg1: import("./shared/jqlite/jqlite").JQLite | undefined, arg2: string | undefined) => import("./shared/jqlite/jqlite").JQLite;
35
35
  /**
@@ -37,6 +37,7 @@ export type TranscludeFunction = {
37
37
  */
38
38
  isSlotFilled: (arg0: string) => boolean;
39
39
  };
40
+ export type TranscludeFunction = (arg0: TScope, arg1: CloneAttachFunction, arg2: import("./shared/jqlite/jqlite").JQLite | undefined, arg3: string | undefined) => import("./shared/jqlite/jqlite").JQLite;
40
41
  export type transcludeWithScope = (arg0: TScope, arg1: CloneAttachFunction, arg2: import("./shared/jqlite/jqlite").JQLite | undefined, arg3: string | undefined) => import("./shared/jqlite/jqlite").JQLite;
41
42
  export type transcludeWithoutScope = (arg0: CloneAttachFunction | undefined, arg1: import("./shared/jqlite/jqlite").JQLite | undefined, arg2: string | undefined) => import("./shared/jqlite/jqlite").JQLite;
42
43
  /**
@@ -128,6 +129,10 @@ export type Directive = {
128
129
  transclude?: boolean | "element" | {
129
130
  [slot: string]: string;
130
131
  } | undefined;
132
+ /**
133
+ * Hidden properties added by router
134
+ */
135
+ $$addStateInfo?: (...args: any[]) => any;
131
136
  };
132
137
  /**
133
138
  * Factory function for creating directives.
@@ -1,2 +0,0 @@
1
- Keep these for reference only but TODO(Remove in future).
2
- Instead of decorating existing implementation with *.d.ts definitions, AngularTS uses JSDoc types as the source of truth for generating *.d.ts files.
@@ -1,146 +0,0 @@
1
- ///////////////////////////////////////////////////////////////////////////
2
- // AngularStatic
3
- // see http://docs.angularjs.org/api
4
-
5
- import {
6
- IAngularBootstrapConfig,
7
- IErrorHandlingConfig,
8
- IModule,
9
- Injectable,
10
- auto,
11
- } from ".";
12
-
13
- ///////////////////////////////////////////////////////////////////////////
14
- interface IAngularStatic {
15
- /**
16
- * Expando cache for adding properties to DOM nodes.
17
- */
18
- cache: Map<number, any>;
19
-
20
- bind(context: any, fn: Function, ...args: any[]): Function;
21
-
22
- /**
23
- * Use this function to manually start up angular application.
24
- *
25
- * @param element DOM element which is the root of angular application.
26
- * @param modules An array of modules to load into the application.
27
- * Each item in the array should be the name of a predefined module or a (DI annotated)
28
- * function that will be invoked by the injector as a config block.
29
- * @param config an object for defining configuration options for the application. The following keys are supported:
30
- * - `strictDi`: disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code.
31
- */
32
- bootstrap(
33
- element: string | Element | JQLite | Document,
34
- modules?: Array<string | Function | any[]>,
35
- config?: IAngularBootstrapConfig,
36
- ): auto.IInjectorService;
37
-
38
- /**
39
- * Wraps a raw DOM element or HTML string in JQLite.
40
- */
41
- element: JQLite;
42
- /**
43
- * Configure several aspects of error handling in AngularJS if used as a setter
44
- * or return the current configuration if used as a getter
45
- */
46
- errorHandlingConfig(): IErrorHandlingConfig;
47
- errorHandlingConfig(config: IErrorHandlingConfig): void;
48
- equals(value1: any, value2: any): boolean;
49
- extend(destination: any, ...sources: any[]): any;
50
-
51
- /**
52
- * Invokes the iterator function once for each item in obj collection, which can be either an object or an array. The iterator function is invoked with iterator(value, key), where value is the value of an object property or an array element and key is the object property key or array element index. Specifying a context for the function is optional.
53
- *
54
- * It is worth noting that .forEach does not iterate over inherited properties because it filters using the hasOwnProperty method.
55
- *
56
- * @param obj Object to iterate over.
57
- * @param iterator Iterator function.
58
- * @param context Object to become context (this) for the iterator function.
59
- */
60
- forEach<T, U extends ArrayLike<T> = T[]>(
61
- obj: U,
62
- iterator: (value: U[number], key: number, obj: U) => void,
63
- context?: any,
64
- ): U;
65
- /**
66
- * Invokes the iterator function once for each item in obj collection, which can be either an object or an array. The iterator function is invoked with iterator(value, key), where value is the value of an object property or an array element and key is the object property key or array element index. Specifying a context for the function is optional.
67
- *
68
- * It is worth noting that .forEach does not iterate over inherited properties because it filters using the hasOwnProperty method.
69
- *
70
- * @param obj Object to iterate over.
71
- * @param iterator Iterator function.
72
- * @param context Object to become context (this) for the iterator function.
73
- */
74
- forEach<T>(
75
- obj: { [index: string]: T },
76
- iterator: (value: T, key: string, obj: { [index: string]: T }) => void,
77
- context?: any,
78
- ): { [index: string]: T };
79
- /**
80
- * Invokes the iterator function once for each item in obj collection, which can be either an object or an array. The iterator function is invoked with iterator(value, key), where value is the value of an object property or an array element and key is the object property key or array element index. Specifying a context for the function is optional.
81
- *
82
- * It is worth noting that .forEach does not iterate over inherited properties because it filters using the hasOwnProperty method.
83
- *
84
- * @param obj Object to iterate over.
85
- * @param iterator Iterator function.
86
- * @param context Object to become context (this) for the iterator function.
87
- */
88
- forEach(
89
- obj: any,
90
- iterator: (value: any, key: any, obj: any) => void,
91
- context?: any,
92
- ): any;
93
-
94
- fromJson(json: string): any;
95
- identity<T>(arg?: T): T;
96
- injector(modules?: any[], strictDi?: boolean): auto.IInjectorService;
97
- isDate(value: any): boolean;
98
- isDefined(value: any): boolean;
99
- isElement(value: any): boolean;
100
- isFunction(value: any): boolean;
101
- isNumber(value: any): boolean;
102
- isObject(value: any): boolean;
103
- isString(value: any): boolean;
104
- isUndefined(value: any): boolean;
105
-
106
- /**
107
- * Deeply extends the destination object dst by copying own enumerable properties from the src object(s) to dst. You can specify multiple src objects. If you want to preserve original objects, you can do so by passing an empty object as the target: var object = angular.merge({}, object1, object2).
108
- *
109
- * Unlike extend(), merge() recursively descends into object properties of source objects, performing a deep copy.
110
- *
111
- * @param dst Destination object.
112
- * @param src Source object(s).
113
- */
114
- merge(dst: any, ...src: any[]): any;
115
-
116
- /**
117
- * The angular.module is a global place for creating, registering and retrieving Angular modules. All modules (angular core or 3rd party) that should be available to an application must be registered using this mechanism.
118
- *
119
- * When passed two or more arguments, a new module is created. If passed only one argument, an existing module (the name passed as the first argument to module) is retrieved.
120
- *
121
- * @param name The name of the module to create or retrieve.
122
- * @param requires The names of modules this module depends on. If specified then new module is being created. If unspecified then the module is being retrieved for further configuration.
123
- * @param configFn Optional configuration function for the module.
124
- */
125
- module(
126
- name: string,
127
- requires?: string[],
128
- configFn?: Injectable<Function>,
129
- ): IModule;
130
-
131
- reloadWithDebugInfo(): void;
132
- toJson(obj: any, pretty?: boolean | number): string;
133
- version: {
134
- full: string;
135
- major: number;
136
- minor: number;
137
- dot: number;
138
- codeName: string;
139
- };
140
-
141
- /**
142
- * If window.name contains prefix NG_DEFER_BOOTSTRAP! when angular.bootstrap is called, the bootstrap process will be paused until angular.resumeBootstrap() is called.
143
- * @param extraModules An optional array of modules that should be added to the original list of modules that the app was about to be bootstrapped with.
144
- */
145
- resumeBootstrap?(extraModules?: string[]): ng.auto.IInjectorService;
146
- }