@angular-wave/angular.ts 0.15.1 → 0.15.2

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.
@@ -1,4 +1,7 @@
1
1
  export class Angular extends EventTarget {
2
+ constructor(submodule?: boolean);
3
+ /** @private @type {boolean} */
4
+ private _submodule;
2
5
  /** @private @type {!Array<string|any>} */
3
6
  private _bootsrappedModules;
4
7
  /** @public @type {ng.PubSubService} */
@@ -5,10 +5,10 @@
5
5
  *
6
6
  * @param {Object} target - The object to be wrapped in a proxy.
7
7
  * @param {Scope} [context] - The context for the handler, used to track listeners.
8
- * @returns {Scope} - A proxy that intercepts operations on the target object,
8
+ * @returns {Scope|Object} - A proxy that intercepts operations on the target object,
9
9
  * or the original value if the target is not an object.
10
10
  */
11
- export function createScope(target?: any, context?: Scope): Scope;
11
+ export function createScope(target?: any, context?: Scope): Scope | any;
12
12
  /**
13
13
  * @ignore
14
14
  * Checks if a target should be excluded from scope observability
@@ -19,13 +19,13 @@ export function isNonScope(target: any): boolean;
19
19
  /** @ignore @type {Function[]}*/
20
20
  export const $postUpdateQueue: Function[];
21
21
  export class RootScopeProvider {
22
- rootScope: Scope;
22
+ rootScope: any;
23
23
  $get: (
24
24
  | string
25
25
  | ((
26
26
  exceptionHandler: ng.ExceptionHandlerService,
27
27
  parse: ng.ParseService,
28
- ) => Scope)
28
+ ) => any)
29
29
  )[];
30
30
  }
31
31
  /**
@@ -45,22 +45,14 @@ export class Scope {
45
45
  context: Scope;
46
46
  /** @type {Map<string, Array<import('./interface.ts').Listener>>} Watch listeners */
47
47
  watchers: Map<string, Array<import("./interface.ts").Listener>>;
48
- /** @type {Map<String, Function[]>} Event listeners */
49
- $$listeners: Map<string, Function[]>;
50
- /** @type {Map<string, Array<import('./interface.ts').Listener>>} Watch listeners from other proxies */
51
- foreignListeners: Map<string, Array<import("./interface.ts").Listener>>;
52
- /** @type {Set<Proxy<ng.Scope>>} */
53
- foreignProxies: Set<ProxyConstructor>;
54
- /** @type {WeakMap<Object, Array<string>>} */
55
- objectListeners: WeakMap<any, Array<string>>;
56
- /** @type {Map<Function, {oldValue: any, fn: Function}>} */
57
- functionListeners: Map<
58
- Function,
59
- {
60
- oldValue: any;
61
- fn: Function;
62
- }
63
- >;
48
+ /** @private @type {Map<String, Function[]>} Event listeners */
49
+ private _listeners;
50
+ /** @private @type {Map<string, Array<import('./interface.ts').Listener>>} Watch listeners from other proxies */
51
+ private _foreignListeners;
52
+ /** @private @type {Set<Proxy<ng.Scope>>} */
53
+ private _foreignProxies;
54
+ /** @private @type {WeakMap<Object, Array<string>>} */
55
+ private _objectListeners;
64
56
  /** @type {Proxy<Scope>} Current proxy being operated on */
65
57
  $proxy: ProxyConstructor;
66
58
  /** @type {Scope} The actual proxy */
@@ -82,10 +74,10 @@ export class Scope {
82
74
  */
83
75
  $root: Scope;
84
76
  $parent: Scope;
85
- filters: any[];
86
- /** @type {boolean} */
87
- $$destroyed: boolean;
88
- scheduled: any[];
77
+ /** @ignore @type {boolean} */
78
+ _destroyed: boolean;
79
+ /** @private @type {import("./interface.ts").Listener[]} A list of scheduled Event listeners */
80
+ private _scheduled;
89
81
  $scopename: any;
90
82
  /** @private */
91
83
  private propertyMap;
@@ -1,20 +1,9 @@
1
- export function weekParser(isoWeek: any, existingDate: any): any;
2
- export function createDateParser(
3
- regexp: any,
4
- mapping: any,
5
- ): (iso: any, previousDate: any) => any;
6
- export function createDateInputType(
7
- type: any,
8
- regexp: any,
9
- parseDate: any,
10
- ): (
11
- scope: any,
12
- element: any,
13
- attr: any,
14
- ctrl: any,
15
- $filter: any,
16
- $parse: any,
17
- ) => void;
1
+ /**
2
+ * @param {string} type
3
+ * @param {RegExp} regexp
4
+ * @returns {*}
5
+ */
6
+ export function createStringDateInputType(type: string, regexp: RegExp): any;
18
7
  export function badInputChecker(
19
8
  scope: any,
20
9
  element: any,
@@ -35,7 +24,6 @@ export function numberInputType(
35
24
  element: any,
36
25
  attr: any,
37
26
  ctrl: any,
38
- $filter: any,
39
27
  $parse: any,
40
28
  ): void;
41
29
  export function rangeInputType(
@@ -45,41 +33,21 @@ export function rangeInputType(
45
33
  ctrl: any,
46
34
  ): void;
47
35
  /**
48
- * @param {ng.FilterFactory} $filter
49
36
  * @param {ng.ParseService} $parse
50
37
  * @returns {ng.Directive}
51
38
  */
52
- export function inputDirective(
53
- $filter: ng.FilterFactory,
54
- $parse: ng.ParseService,
55
- ): ng.Directive;
39
+ export function inputDirective($parse: ng.ParseService): ng.Directive;
56
40
  export namespace inputDirective {
57
41
  let $inject: string[];
58
42
  }
59
43
  /**
60
44
  * @returns {ng.Directive}
61
45
  */
62
- export function hiddenInputBrowserCacheDirective(): ng.Directive;
46
+ export function hiddenInputDirective(): ng.Directive;
63
47
  /**
64
48
  * @returns {ng.Directive}
65
49
  */
66
50
  export function ngValueDirective(): ng.Directive;
67
- /**
68
- * @param {Date} date
69
- * @param {any} timezone
70
- * @param {undefined} [reverse]
71
- */
72
- export function convertTimezoneToLocal(
73
- date: Date,
74
- timezone: any,
75
- reverse?: undefined,
76
- ): Date;
77
- /**
78
- * @param {any} timezone
79
- * @param {number} [fallback]
80
- * @returns {number}
81
- */
82
- export function timezoneToOffset(timezone: any, fallback?: number): number;
83
51
  export const ISO_DATE_REGEXP: RegExp;
84
52
  export const URL_REGEXP: RegExp;
85
53
  export const EMAIL_REGEXP: RegExp;
@@ -7,9 +7,10 @@ export namespace ngShowDirective {
7
7
  let $inject: string[];
8
8
  }
9
9
  /**
10
+ * @param {ng.AnimateService} $animate
10
11
  * @returns {ng.Directive}
11
12
  */
12
- export function ngHideDirective($animate: any): ng.Directive;
13
+ export function ngHideDirective($animate: ng.AnimateService): ng.Directive;
13
14
  export namespace ngHideDirective {
14
15
  let $inject_1: string[];
15
16
  export { $inject_1 as $inject };
@@ -20,7 +20,11 @@ import { ExceptionHandler as TExceptionHandler } from "./services/exception/inte
20
20
  import { ExceptionHandlerProvider as TExceptionHandlerProvider } from "./services/exception/exception.js";
21
21
  import { ParseService as TParseService } from "./core/parse/interface.ts";
22
22
  import { TemplateRequestService as TTemplateRequestService } from "./services/template-request/interface.ts";
23
- import { HttpParamSerializer as THttpParamSerializer } from "./services/http/interface.ts";
23
+ import {
24
+ HttpParamSerializer as THttpParamSerializer,
25
+ HttpProviderDefaults as THttpProviderDefaults,
26
+ RequestShortcutConfig as TRequestShortcutConfig,
27
+ } from "./services/http/interface.ts";
24
28
  import { HttpParamSerializerProvider as THttpParamSerializerProvider } from "./services/http/http.js";
25
29
  import {
26
30
  FilterFactory as TFilterFactory,
@@ -214,5 +218,7 @@ declare global {
214
218
  type AnchorScrollObject = TAnchorScrollObject;
215
219
  type InjectionTokens = typeof PublicInjectionTokens;
216
220
  type ScopeEvent = TScopeEvent;
221
+ type RequestShortcutConfig = TRequestShortcutConfig;
222
+ type HttpProviderDefaults = THttpProviderDefaults;
217
223
  }
218
224
  }
@@ -176,13 +176,6 @@ export interface HttpService {
176
176
  * @param config Optional configuration object
177
177
  */
178
178
  head<T>(url: string, config?: RequestShortcutConfig): HttpPromise<T>;
179
- /**
180
- * Shortcut method to perform JSONP request.
181
- *
182
- * @param url Relative or absolute URL specifying the destination of the request
183
- * @param config Optional configuration object
184
- */
185
- jsonp<T>(url: string, config?: RequestShortcutConfig): HttpPromise<T>;
186
179
  /**
187
180
  * Shortcut method to perform POST request.
188
181
  *
@@ -7,16 +7,9 @@ export interface TemplateRequestService {
7
7
  * empty then a $compile error will be thrown (unless
8
8
  * {ignoreRequestError} is set to true).
9
9
  *
10
- * @param tpl The template URL.
11
- * @param ignoreRequestError Whether or not to ignore the exception
12
- * when the request fails or the template is
13
- * empty.
10
+ * @param templateUrl The template URL.
14
11
  *
15
12
  * @return A promise whose value is the template content.
16
13
  */
17
- (tpl: string, ignoreRequestError?: boolean): Promise<string>;
18
- /**
19
- * total amount of pending template requests being downloaded.
20
- */
21
- totalPendingRequests: number;
14
+ (templateUrl: string): Promise<string>;
22
15
  }
@@ -1,52 +1,19 @@
1
1
  /**
2
- * Used to configure the options passed to the {@link $http} service when making a template request.
2
+ * Provider for the `$templateRequest` service.
3
3
  *
4
- * For example, it can be used for specifying the "Accept" header that is sent to the server, when
5
- * requesting a template.
4
+ * Fetches templates via HTTP and caches them in `$templateCache`.
5
+ * Templates are assumed trusted. This provider allows configuring
6
+ * per-request `$http` options such as headers, timeout, or transform functions.
6
7
  */
7
- export function TemplateRequestProvider(): void;
8
8
  export class TemplateRequestProvider {
9
- /**
10
- * The options to be passed to the {@link $http} service when making the request.
11
- * You can use this to override options such as the "Accept" header for template requests.
12
- * The {@link $templateRequest} will set the `cache` and the `transformResponse` properties of the
13
- * options if not overridden here.
14
- *
15
- * @param {string=} val new value for the {@link $http} options.
16
- * @returns {string|TemplateRequestProvider} Returns the {@link $http} options when used as getter and self if used as setter.
17
- */
18
- httpOptions: (val?: string | undefined) => string | TemplateRequestProvider;
19
- /**
20
- * The `$templateRequest` service runs security checks then downloads the provided template using
21
- * `$http` and, upon success, stores the contents inside of `$templateCache`. If the HTTP request
22
- * fails or the response data of the HTTP request is empty, a `$compile` error will be thrown (the
23
- * exception can be thwarted by setting the 2nd parameter of the function to true). Note that the
24
- * contents of `$templateCache` are trusted, so the call to `$sce.getTrustedUrl(tpl)` is omitted
25
- * when `tpl` is of type string and `$templateCache` has the matching entry.
26
- *
27
- * If you want to pass custom options to the `$http` service, such as setting the Accept header you
28
- * can configure this via {@link $templateRequestProvider#httpOptions}.
29
- *
30
- * `$templateRequest` is used internally by {@link $compile}, {@link ngRoute.$route}, and directives such
31
- * as {@link ngInclude} to download and cache templates.
32
- *
33
- * 3rd party modules should use `$templateRequest` if their services or directives are loading
34
- * templates.
35
- *
36
- * @param {string} tpl The HTTP request template URL
37
- * @param {boolean=} ignoreRequestError Whether or not to ignore the exception when the request fails or the template is empty
38
- *
39
- * @return {Promise} a promise for the HTTP response data of the given URL.
40
- *
41
- * @property {number} totalPendingRequests total amount of pending template requests being downloaded.
42
- */
9
+ /** @type {ng.RequestShortcutConfig|undefined} */
10
+ httpOptions: ng.RequestShortcutConfig | undefined;
11
+ /** @returns {Array} DI tokens for Angular.ts injection */
43
12
  $get: (
44
13
  | string
45
14
  | ((
46
- $exceptionHandler: ng.ExceptionHandlerService,
47
15
  $templateCache: ng.TemplateCacheService,
48
16
  $http: ng.HttpService,
49
- $sce: any,
50
17
  ) => ng.TemplateRequestService)
51
18
  )[];
52
19
  }
@@ -195,16 +195,6 @@ export function isBoolean(value: any): boolean;
195
195
  * @returns {boolean}
196
196
  */
197
197
  export function isPromiseLike(obj: any): boolean;
198
- /**
199
- * @param {*} value
200
- * @returns {boolean}
201
- */
202
- export function isTypedArray(value: any): boolean;
203
- /**
204
- * @param {*} obj
205
- * @returns {boolean}
206
- */
207
- export function isArrayBuffer(obj: any): boolean;
208
198
  /**
209
199
  * @param {*} value
210
200
  * @returns {string | *}