@angular-wave/angular.ts 0.0.40 → 0.0.42
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.
- package/README.md +28 -0
- package/dist/angular-ts.esm.js +2 -2
- package/dist/angular-ts.umd.js +2 -2
- package/package.json +1 -1
- package/src/animations/animate-queue.js +7 -4
- package/src/core/compile/compile.js +5 -3
- package/src/core/compile/compile.md +2 -5
- package/src/core/compile/compile.spec.js +2 -43
- package/src/core/exception-handler.js +6 -6
- package/src/core/interpolate/interpolate.js +1 -1
- package/src/core/location/location.spec.js +0 -4
- package/src/core/q/q.js +1 -1
- package/src/core/scope/scope.js +1 -1
- package/src/core/task-tracker-factory.js +2 -2
- package/src/core/timeout/timeout.js +1 -1
- package/src/core/url-utils/url-utils.js +0 -2
- package/src/directive/bind/bind.js +2 -2
- package/src/directive/change/change.js +1 -1
- package/src/directive/cloak/cloak.js +1 -1
- package/src/directive/events/events.js +1 -1
- package/src/directive/form/form.js +2 -2
- package/src/directive/include/include.js +5 -7
- package/src/directive/init/init.js +1 -1
- package/src/directive/list/list.js +1 -1
- package/src/directive/model/model.js +1 -1
- package/src/directive/model-options/model-options.js +56 -421
- package/src/directive/model-options/model-options.md +407 -0
- package/src/directive/model-options/model-options.spec.js +1 -1
- package/src/directive/non-bindable/non-bindable.js +1 -2
- package/src/directive/options/options.js +3 -3
- package/src/directive/style/style.js +1 -1
- package/src/directive/switch/switch.js +2 -2
- package/src/directive/transclude/transclude.js +2 -2
- package/src/index.js +0 -461
- package/src/loader.js +1 -1
- package/src/public.js +1 -1
- package/src/router/template-factory.js +2 -2
- package/src/router/view-scroll.js +1 -1
- package/src/services/browser.js +1 -1
- package/src/services/document.js +2 -2
- package/src/services/http/http.js +11 -7
- package/src/services/log.js +1 -1
- package/src/services/template-request.js +1 -1
- package/src/shared/jqlite/jqlite.js +380 -351
- package/src/shared/jqlite/jqlite.spec.js +73 -82
- package/src/shared/utils.js +1 -1
- package/src/types.js +451 -0
- package/tsconfig.json +1 -1
- package/types/animations/shared.d.ts +7 -2
- package/types/core/compile/compile.d.ts +2 -1
- package/types/core/exception-handler.d.ts +5 -7
- package/types/core/interpolate/interpolate.d.ts +1 -1
- package/types/core/q/q.d.ts +1 -1
- package/types/core/task-tracker-factory.d.ts +5 -5
- package/types/core/timeout/timeout.d.ts +2 -2
- package/types/directive/bind/bind.d.ts +4 -4
- package/types/directive/change/change.d.ts +2 -2
- package/types/directive/cloak/cloak.d.ts +2 -2
- package/types/directive/include/include.d.ts +2 -2
- package/types/directive/init/init.d.ts +2 -2
- package/types/directive/list/list.d.ts +2 -2
- package/types/directive/model/model.d.ts +13 -7
- package/types/directive/model-options/model-options.d.ts +49 -0
- package/types/directive/non-bindable/non-bindable.d.ts +2 -3
- package/types/directive/style/style.d.ts +2 -2
- package/types/directive/switch/switch.d.ts +4 -4
- package/types/index.d.ts +1 -702
- package/types/public.d.ts +2 -2
- package/types/router/template-factory.d.ts +4 -4
- package/types/services/browser.d.ts +3 -3
- package/types/services/document.d.ts +6 -7
- package/types/services/log.d.ts +2 -2
- package/types/services/template-request.d.ts +1 -1
- package/types/shared/jqlite/jqlite.d.ts +91 -21
- package/types/shared/utils.d.ts +2 -2
- package/types/types.d.ts +438 -0
- package/types-back/index.d.ts +1 -83
- package/types-back/jqlite.d.ts +1 -121
- package/types-back/global.d.ts +0 -11
package/types/public.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Initializes `ng`, `animate`, `message`, `aria` and `router` modules.
|
|
3
|
-
* @returns {import('./index').
|
|
3
|
+
* @returns {import('./index').Module} `ng`module
|
|
4
4
|
*/
|
|
5
|
-
export function publishExternalAPI(): import("./index").
|
|
5
|
+
export function publishExternalAPI(): import("./index").Module;
|
|
@@ -58,21 +58,21 @@ export class TemplateFactory {
|
|
|
58
58
|
/**
|
|
59
59
|
* Creates a template by invoking an injectable provider function.
|
|
60
60
|
*
|
|
61
|
-
* @param {
|
|
61
|
+
* @param {import('../types').Injectable<any>} provider Function to invoke via `locals`
|
|
62
62
|
* @param {Function} injectFn a function used to invoke the template provider
|
|
63
63
|
* @param {angular.ResolveContext} context
|
|
64
64
|
* @return {string|Promise.<string>} The template html as a string, or a promise
|
|
65
65
|
* for that string.
|
|
66
66
|
*/
|
|
67
|
-
fromProvider(provider:
|
|
67
|
+
fromProvider(provider: import("../types").Injectable<any>, params: any, context: angular.ResolveContext): string | Promise<string>;
|
|
68
68
|
/**
|
|
69
69
|
* Creates a component's template by invoking an injectable provider function.
|
|
70
70
|
*
|
|
71
|
-
* @param {
|
|
71
|
+
* @param {import('../types').Injectable<any>} provider Function to invoke via `locals`
|
|
72
72
|
* @param {Function} injectFn a function used to invoke the template provider
|
|
73
73
|
* @return {string} The template html as a string: "<component-name input1='::$resolve.foo'></component-name>".
|
|
74
74
|
*/
|
|
75
|
-
fromComponentProvider(provider:
|
|
75
|
+
fromComponentProvider(provider: import("../types").Injectable<any>, params: any, context: any): string;
|
|
76
76
|
/**
|
|
77
77
|
* Creates a template from a component's name
|
|
78
78
|
*
|
|
@@ -149,7 +149,7 @@ export class Browser {
|
|
|
149
149
|
cancel: (deferId: number) => boolean;
|
|
150
150
|
}
|
|
151
151
|
/**
|
|
152
|
-
* @typedef {import('../
|
|
152
|
+
* @typedef {import('../types').ServiceProvider} angular.BrowserProvider
|
|
153
153
|
* @description
|
|
154
154
|
* This object has two goals:
|
|
155
155
|
*
|
|
@@ -162,11 +162,11 @@ export class Browser {
|
|
|
162
162
|
* @constructor
|
|
163
163
|
* @this {angular.BrowserProvider}
|
|
164
164
|
*/
|
|
165
|
-
export function BrowserProvider(this: import("../
|
|
165
|
+
export function BrowserProvider(this: import("../types").ServiceProvider): void;
|
|
166
166
|
export class BrowserProvider {
|
|
167
167
|
$get: (string | (($$taskTrackerFactory: import("../core/task-tracker-factory").TaskTracker) => Browser))[];
|
|
168
168
|
}
|
|
169
169
|
export type UrlChangeListener = (arg0: string, arg1: string | null) => any;
|
|
170
170
|
export namespace angular {
|
|
171
|
-
type BrowserProvider = import("../
|
|
171
|
+
type BrowserProvider = import("../types").ServiceProvider;
|
|
172
172
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @typedef {import('../
|
|
2
|
+
* @typedef {import('../types').ServiceProvider} DocumentProvider
|
|
3
3
|
* @description
|
|
4
4
|
* A {@link angular.element jQuery or JQLite} wrapper for the browser's `window.document` object.
|
|
5
5
|
*
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
*/
|
|
23
23
|
/**
|
|
24
24
|
* @constructor
|
|
25
|
-
* @this {
|
|
25
|
+
* @this {DocumentProvider}
|
|
26
26
|
*/
|
|
27
|
-
export function $DocumentProvider(this: import("../
|
|
27
|
+
export function $DocumentProvider(this: import("../types").ServiceProvider): void;
|
|
28
28
|
export class $DocumentProvider {
|
|
29
|
-
$get: () =>
|
|
29
|
+
$get: () => JQLite;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* @private
|
|
@@ -37,6 +37,5 @@ export function $$IsDocumentHiddenProvider(): void;
|
|
|
37
37
|
export class $$IsDocumentHiddenProvider {
|
|
38
38
|
$get: (string | (($document: import("../shared/jqlite/jqlite").JQLite, $rootScope: import("../core/scope/scope").Scope) => () => boolean))[];
|
|
39
39
|
}
|
|
40
|
-
export
|
|
41
|
-
|
|
42
|
-
}
|
|
40
|
+
export type DocumentProvider = import("../types").ServiceProvider;
|
|
41
|
+
import { JQLite } from "../shared/jqlite/jqlite";
|
package/types/services/log.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
export let LogService: angular.LogService;
|
|
16
16
|
/**
|
|
17
|
-
* @typedef {import('../
|
|
17
|
+
* @typedef {import('../types').ServiceProvider} angular.LogProvider
|
|
18
18
|
* @property {function(): boolean} debugEnabled - Function to get the current debug state.
|
|
19
19
|
* @property {function(boolean): angular.LogProvider} debugEnabled - Function to enable or disable debug.
|
|
20
20
|
*/
|
|
@@ -62,5 +62,5 @@ export namespace angular {
|
|
|
62
62
|
*/
|
|
63
63
|
warn: LogCall;
|
|
64
64
|
};
|
|
65
|
-
type LogProvider =
|
|
65
|
+
type LogProvider = import("../types").ServiceProvider;
|
|
66
66
|
}
|
|
@@ -53,7 +53,7 @@ export class TemplateRequestProvider {
|
|
|
53
53
|
*
|
|
54
54
|
* @property {number} totalPendingRequests total amount of pending template requests being downloaded.
|
|
55
55
|
*/
|
|
56
|
-
$get: (string | (($exceptionHandler: import("../core/exception-handler").
|
|
56
|
+
$get: (string | (($exceptionHandler: import("../core/exception-handler").ErrorHandler, $templateCache: any, $http: any, $q: any, $sce: any) => {
|
|
57
57
|
(tpl: any, ignoreRequestError: any): any;
|
|
58
58
|
totalPendingRequests: number;
|
|
59
59
|
}))[];
|
|
@@ -11,35 +11,107 @@ export function kebabToCamel(name: string): string;
|
|
|
11
11
|
*/
|
|
12
12
|
export function snakeToCamel(name: string): string;
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
14
|
+
* JQLite both a function and an array-like data structure for manipulation of DOM, linking elements to expando cache,
|
|
15
|
+
* and execution of chain functions.
|
|
16
|
+
*
|
|
17
|
+
* @param {string|Element|Document|Window|JQLite|ArrayLike<Element>|(() => void)} element
|
|
18
|
+
* @returns {JQLite}
|
|
17
19
|
*/
|
|
18
|
-
export function
|
|
19
|
-
export function JQLiteBuildFragment(html: any, context: any): any;
|
|
20
|
-
export function JQLite(element: any): any;
|
|
20
|
+
export function JQLite(element: string | Element | Document | Window | JQLite | ArrayLike<Element> | (() => void)): JQLite;
|
|
21
21
|
export class JQLite {
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
/**
|
|
23
|
+
* JQLite both a function and an array-like data structure for manipulation of DOM, linking elements to expando cache,
|
|
24
|
+
* and execution of chain functions.
|
|
25
|
+
*
|
|
26
|
+
* @param {string|Element|Document|Window|JQLite|ArrayLike<Element>|(() => void)} element
|
|
27
|
+
* @returns {JQLite}
|
|
28
|
+
*/
|
|
29
|
+
constructor(element: string | Element | Document | Window | JQLite | ArrayLike<Element> | (() => void));
|
|
30
|
+
/**
|
|
31
|
+
* Remove all child nodes of the set of matched elements from the DOM and clears CACHE data, associated with the node.
|
|
32
|
+
* @returns {JQLite} The current instance of JQLite.
|
|
33
|
+
*/
|
|
34
|
+
empty(): JQLite;
|
|
35
|
+
/**
|
|
36
|
+
* Returns the `$scope` of the element.
|
|
37
|
+
* @returns {import("../../core/scope/scope").Scope}
|
|
38
|
+
*/
|
|
39
|
+
scope(): import("../../core/scope/scope").Scope;
|
|
40
|
+
/**
|
|
41
|
+
* Returns the isolate `$scope` of the element.
|
|
42
|
+
* @returns {import("../../core/scope/scope").Scope}
|
|
43
|
+
*/
|
|
44
|
+
isolateScope(): import("../../core/scope/scope").Scope;
|
|
45
|
+
/**
|
|
46
|
+
* Return instance of controller attached to element
|
|
47
|
+
* @param {string} [name] - Controller name
|
|
48
|
+
* @returns {any}
|
|
49
|
+
*/
|
|
50
|
+
controller(name?: string): any;
|
|
51
|
+
/**
|
|
52
|
+
* Return instance of injector attached to element
|
|
53
|
+
* @returns {import('../../types').InjectorService}
|
|
54
|
+
*/
|
|
55
|
+
injector(): import("../../types").InjectorService;
|
|
56
|
+
/**
|
|
57
|
+
* Adds an event listener to each element in the JQLite collection.
|
|
58
|
+
*
|
|
59
|
+
* @param {string} type - The event type(s) to listen for. Multiple event types can be specified, separated by a space.
|
|
60
|
+
* @param {Function} fn - The function to execute when the event is triggered.
|
|
61
|
+
* @returns {JQLite} The JQLite collection for chaining.
|
|
62
|
+
*/
|
|
63
|
+
on(type: string, fn: Function): JQLite;
|
|
24
64
|
toString(): string;
|
|
25
|
-
eq(index: any):
|
|
65
|
+
eq(index: any): JQLite;
|
|
26
66
|
length: number;
|
|
27
|
-
push: (...items: undefined[]) => number;
|
|
28
|
-
sort: (compareFn?: (a: undefined, b: undefined) => number) => undefined[];
|
|
29
|
-
splice: {
|
|
30
|
-
(start: number, deleteCount?: number): undefined[];
|
|
31
|
-
(start: number, deleteCount: number, ...items: undefined[]): undefined[];
|
|
32
|
-
};
|
|
33
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Removes expando data from this element. If key is provided, only
|
|
70
|
+
* its field is removed. If data is empty, also removes `ExpandoStore`
|
|
71
|
+
* from cache.
|
|
72
|
+
* @param {Element} element
|
|
73
|
+
* @param {string} [name] - key of field to remove
|
|
74
|
+
*/
|
|
75
|
+
export function removeElementData(element: Element, name?: string): void;
|
|
76
|
+
/**
|
|
77
|
+
* Checks if the string contains HTML tags or entities.
|
|
78
|
+
* @param {string} html
|
|
79
|
+
* @returns {boolean} True if the string is plain text, false if it contains HTML tags or entities.
|
|
80
|
+
*/
|
|
81
|
+
export function isTextNode(html: string): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* @param {string} html
|
|
84
|
+
* @returns {DocumentFragment}
|
|
85
|
+
*/
|
|
86
|
+
export function buildFragment(html: string): DocumentFragment;
|
|
34
87
|
/**
|
|
35
88
|
* @param {Element} element
|
|
36
89
|
* @param {boolean} [onlyDescendants]
|
|
37
90
|
* @returns {void}
|
|
38
91
|
*/
|
|
39
92
|
export function dealoc(element: Element, onlyDescendants?: boolean): void;
|
|
40
|
-
|
|
93
|
+
/**
|
|
94
|
+
* Gets or sets cache data for a given element.
|
|
95
|
+
*
|
|
96
|
+
* @param {Element} element - The DOM element to get or set data on.
|
|
97
|
+
* @param {string|Object} key - The key (as a string) to get/set or an object for mass-setting.
|
|
98
|
+
* @param {*} [value] - The value to set. If not provided, the function acts as a getter.
|
|
99
|
+
* @returns {*} - The retrieved data if acting as a getter. Otherwise, returns undefined.
|
|
100
|
+
*/
|
|
101
|
+
export function getOrSetCacheData(element: Element, key: string | any, value?: any): any;
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @param {Element} element
|
|
105
|
+
* @param {boolean} keepData
|
|
106
|
+
*/
|
|
107
|
+
export function removeElement(element: Element, keepData?: boolean): void;
|
|
41
108
|
export function getBooleanAttrName(element: any, name: any): any;
|
|
42
|
-
|
|
109
|
+
/**
|
|
110
|
+
* Takes an array of elements, calls any `$destroy` event handlers, removes any data in cache, and finally removes any
|
|
111
|
+
* listeners.
|
|
112
|
+
* @param {NodeListOf<Element>} nodes
|
|
113
|
+
*/
|
|
114
|
+
export function cleanElementData(nodes: NodeListOf<Element>): void;
|
|
43
115
|
/**
|
|
44
116
|
* @param {string} elementStr
|
|
45
117
|
* @returns {string} Returns the string representation of the element.
|
|
@@ -48,9 +120,7 @@ export function startingTag(elementStr: string): string;
|
|
|
48
120
|
/**
|
|
49
121
|
* Return the DOM siblings between the first and last node in the given array.
|
|
50
122
|
* @param {Array} nodes An array-like object
|
|
51
|
-
* @returns {
|
|
123
|
+
* @returns {JQLite} the inputted object or a JQLite collection containing the nodes
|
|
52
124
|
*/
|
|
53
|
-
export function getBlockNodes(nodes: any[]):
|
|
125
|
+
export function getBlockNodes(nodes: any[]): JQLite;
|
|
54
126
|
export const BOOLEAN_ATTR: {};
|
|
55
|
-
declare function JQLiteReady(fn: any): void;
|
|
56
|
-
export {};
|
package/types/shared/utils.d.ts
CHANGED
|
@@ -586,9 +586,9 @@ export function assertArgFn(arg: any, name: any, acceptArrayAnnotation: any): an
|
|
|
586
586
|
* should all be static strings, not variables or general expressions.
|
|
587
587
|
*
|
|
588
588
|
* @param {string} module The namespace to use for the new minErr instance.
|
|
589
|
-
* @returns {function(string,
|
|
589
|
+
* @returns {function(string, ...*): Error} minErr instance
|
|
590
590
|
*/
|
|
591
|
-
export function minErr(module: string): (arg0: string,
|
|
591
|
+
export function minErr(module: string): (arg0: string, ...args: any[]) => Error;
|
|
592
592
|
export function toDebugString(obj: any): any;
|
|
593
593
|
/**
|
|
594
594
|
* Computes a hash of an 'obj'.
|