@angular-wave/angular.ts 0.0.39 → 0.0.41
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/Makefile +2 -0
- package/README.md +2 -1
- package/dist/angular-ts.esm.js +2 -2
- package/dist/angular-ts.umd.js +2 -1
- package/package.json +1 -1
- package/rollup.config.js +10 -5
- package/src/angular.spec.js +25 -26
- package/src/animations/animate-css-driver.js +3 -3
- package/src/animations/animate-queue.js +10 -7
- package/src/animations/animation.js +2 -2
- package/src/animations/shared.js +6 -6
- package/src/binding.spec.js +7 -7
- package/src/core/animate/animate.js +5 -5
- package/src/core/animate/animate.spec.js +31 -31
- package/src/core/cache/cache-factory.html +18 -0
- package/src/core/cache/{cache-factor.test.js → cache-factory.test.js} +1 -1
- package/src/core/compile/compile.js +33 -25
- package/src/core/compile/compile.md +2 -2
- package/src/core/compile/compile.spec.js +2 -43
- package/src/core/cookie-reader.spec.js +2 -2
- package/src/core/core.html +22 -0
- package/src/core/core.test.js +12 -0
- package/src/core/document.spec.js +4 -4
- package/src/core/exception-handler.js +30 -23
- package/src/core/interpolate/interpolate.js +7 -0
- package/src/core/{cache/cache-factor.html → location/location.html} +1 -1
- package/src/core/location/location.js +2 -2
- package/src/core/location/location.spec.js +17 -17
- package/src/core/location/location.test.js +12 -0
- package/src/core/on.spec.js +3 -3
- package/src/core/parser/parse.html +18 -0
- package/src/core/parser/parse.spec.js +1 -1
- package/src/core/parser/parse.test.js +12 -0
- package/src/core/prop.spec.js +3 -4
- package/src/core/pubsub/pubsub.html +18 -0
- package/src/core/pubsub/pubsub.spec.js +1 -1
- package/src/core/pubsub/pubsub.test.js +12 -0
- package/src/core/q/q.html +18 -0
- package/src/core/q/q.js +33 -0
- package/src/core/q/q.test.js +0 -0
- package/src/core/root-element.spec.js +4 -4
- package/src/core/sanitize/sanitize-uri.spec.js +1 -1
- package/src/core/sanitize/sanitize-uri.test.js +12 -0
- package/src/core/sanitize/sanitize.html +21 -0
- package/src/core/sce/sce.html +18 -0
- package/src/core/sce/sce.spec.js +2 -1
- package/src/core/sce/sce.test.js +12 -0
- package/src/core/scope/scope.html +18 -0
- package/src/core/scope/scope.js +1 -1
- package/src/core/scope/scope.spec.js +1 -1
- package/src/core/scope/scope.test.js +12 -0
- package/src/core/task-tracker-factory.js +9 -11
- package/src/core/timeout/timeout.html +18 -0
- package/src/core/timeout/timeout.js +9 -0
- package/src/core/timeout/timeout.spec.js +2 -2
- package/src/core/timeout/timout.test.js +12 -0
- package/src/core/url-utils/url-utils.html +18 -0
- package/src/core/url-utils/url-utils.spec.js +4 -2
- package/src/core/url-utils/url-utils.test.js +12 -0
- package/src/directive/attrs/attrs.spec.js +1 -2
- package/src/directive/attrs/boolean.spec.js +1 -2
- package/src/directive/attrs/element-style.spec.js +6 -7
- package/src/directive/attrs/src.spec.js +1 -2
- package/src/directive/bind/bind.spec.js +1 -2
- package/src/directive/class/class.spec.js +15 -16
- package/src/directive/cloak/cloak.spec.js +3 -4
- package/src/directive/controller/controller.spec.js +4 -5
- package/src/directive/events/click.spec.js +1 -2
- package/src/directive/events/event.spec.js +1 -1
- package/src/directive/events/events.js +7 -0
- package/src/directive/form/form.spec.js +17 -17
- package/src/directive/if/if.spec.js +2 -2
- package/src/directive/include/include.js +5 -7
- package/src/directive/include/include.spec.js +32 -32
- package/src/directive/init/init.spec.js +2 -3
- package/src/directive/input/input.spec.js +3 -3
- package/src/directive/list/list.spec.js +1 -2
- package/src/directive/model/model.js +13 -0
- package/src/directive/model/model.spec.js +4 -5
- package/src/directive/model-options/model-options.spec.js +3 -3
- package/src/directive/non-bindable/non-bindable.spec.js +1 -2
- package/src/directive/options/options.js +5 -5
- package/src/directive/options/options.spec.js +13 -13
- package/src/directive/ref/href.spec.js +1 -2
- package/src/directive/repeat/repeat.spec.js +12 -12
- package/src/directive/script/script.spec.js +2 -3
- package/src/directive/select/select.js +6 -6
- package/src/directive/select/select.spec.js +5 -5
- package/src/directive/show-hide/show-hide.spec.js +12 -13
- package/src/directive/style/style.spec.js +3 -4
- package/src/directive/switch/switch.spec.js +2 -3
- package/src/directive/validators/validators.spec.js +1 -1
- package/src/exts/aria/aria.spec.js +1 -2
- package/src/exts/messages/messages.spec.js +5 -5
- package/src/filters/filter.spec.js +5 -5
- package/src/filters/filters.html +21 -0
- package/src/filters/filters.spec.js +3 -3
- package/src/filters/filters.test.js +12 -0
- package/src/filters/limit-to.md +1 -1
- package/src/filters/limit-to.spec.js +4 -4
- package/src/filters/order-by.spec.js +2 -2
- package/src/index.js +186 -31
- package/src/loader.js +49 -11
- package/src/public.js +2 -3
- package/src/router/directives/state-directives.spec.js +90 -90
- package/src/router/directives/view-directive.js +2 -2
- package/src/router/directives/view-directive.spec.js +9 -9
- package/src/router/state/state.spec.js +2 -4
- package/src/router/template-factory.spec.js +2 -2
- package/src/router/transition/hook-registry.js +2 -2
- package/src/router/view/view.spec.js +1 -1
- package/src/services/browser.js +56 -39
- package/src/services/document.js +16 -13
- package/src/services/http/http.js +11 -7
- package/src/services/log.js +39 -43
- package/src/services/template-request.js +9 -0
- package/src/shared/common.js +0 -3
- package/src/shared/jqlite/jqlite.js +370 -355
- package/src/shared/jqlite/jqlite.spec.js +260 -272
- package/src/shared/strings.js +2 -2
- package/src/shared/test-utils.js +2 -2
- package/src/shared/utils.js +8 -11
- package/src/types.js +13 -0
- package/types/animations/shared.d.ts +7 -2
- package/types/core/compile/compile.d.ts +2 -1
- package/types/core/exception-handler.d.ts +9 -42
- package/types/core/interpolate/interpolate.d.ts +1 -1
- package/types/core/q/q.d.ts +35 -1
- package/types/core/task-tracker-factory.d.ts +18 -11
- package/types/core/timeout/timeout.d.ts +10 -1
- package/types/directive/include/include.d.ts +2 -2
- package/types/directive/model/model.d.ts +28 -4
- package/types/index.d.ts +664 -79
- package/types/services/browser.d.ts +50 -20
- package/types/services/document.d.ts +14 -9
- package/types/services/log.d.ts +37 -34
- package/types/services/template-request.d.ts +1 -1
- package/types/shared/common.d.ts +0 -1
- package/types/shared/jqlite/jqlite.d.ts +83 -22
- package/types/shared/utils.d.ts +22 -22
- package/types/types.d.ts +34 -0
- package/types-back/index.d.ts +0 -130
- package/types-back/jqlite.d.ts +1 -40
- /package/src/core/cache/{cache-factor.spec.js → cache-factory.spec.js} +0 -0
|
@@ -1,36 +1,48 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Removes a trailing hash ('#') from the given URL if it exists.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} url
|
|
5
|
+
* @returns {string}
|
|
6
|
+
*/
|
|
7
|
+
export function trimEmptyHash(url: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* @typedef {function(string, string|null): any} UrlChangeListener
|
|
10
|
+
*/
|
|
2
11
|
/**
|
|
3
12
|
* @name $browser
|
|
4
|
-
* @requires $log
|
|
5
13
|
* @description
|
|
6
14
|
* This object has two goals:
|
|
7
15
|
*
|
|
8
16
|
* - hide all the global state in the browser caused by the window object
|
|
9
17
|
* - abstract away all the browser specific features and inconsistencies
|
|
10
18
|
*
|
|
19
|
+
*
|
|
11
20
|
*/
|
|
12
21
|
/**
|
|
13
|
-
* @param {
|
|
22
|
+
* @param {import('../core/task-tracker-factory').TaskTracker} taskTracker
|
|
14
23
|
*/
|
|
15
|
-
export function Browser(
|
|
24
|
+
export function Browser(taskTracker: import("../core/task-tracker-factory").TaskTracker): void;
|
|
16
25
|
export class Browser {
|
|
26
|
+
/**
|
|
27
|
+
* @typedef {function(string, string|null): any} UrlChangeListener
|
|
28
|
+
*/
|
|
17
29
|
/**
|
|
18
30
|
* @name $browser
|
|
19
|
-
* @requires $log
|
|
20
31
|
* @description
|
|
21
32
|
* This object has two goals:
|
|
22
33
|
*
|
|
23
34
|
* - hide all the global state in the browser caused by the window object
|
|
24
35
|
* - abstract away all the browser specific features and inconsistencies
|
|
25
36
|
*
|
|
37
|
+
*
|
|
26
38
|
*/
|
|
27
39
|
/**
|
|
28
|
-
* @param {
|
|
40
|
+
* @param {import('../core/task-tracker-factory').TaskTracker} taskTracker
|
|
29
41
|
*/
|
|
30
|
-
constructor(
|
|
31
|
-
$$completeOutstandingRequest: any;
|
|
32
|
-
$$incOutstandingRequestCount: any;
|
|
33
|
-
notifyWhenNoOutstandingRequests: any;
|
|
42
|
+
constructor(taskTracker: import("../core/task-tracker-factory").TaskTracker);
|
|
43
|
+
$$completeOutstandingRequest: (fn: any, taskType: any) => void;
|
|
44
|
+
$$incOutstandingRequestCount: (taskType: any) => void;
|
|
45
|
+
notifyWhenNoOutstandingRequests: (callback: any, taskType: any) => void;
|
|
34
46
|
/**
|
|
35
47
|
* @name $browser#url
|
|
36
48
|
*
|
|
@@ -48,11 +60,11 @@ export class Browser {
|
|
|
48
60
|
* NOTE: this api is intended for use only by the `$location` service. Please use the
|
|
49
61
|
* {@link ng.$location $location service} to change url.
|
|
50
62
|
*
|
|
51
|
-
* @param {string} url New url (when used as setter)
|
|
63
|
+
* @param {string=} url New url (when used as setter)
|
|
52
64
|
* @param {boolean=} replace Should new url replace current history record?
|
|
53
65
|
* @param {object=} state State object to use with `pushState`/`replaceState`
|
|
54
66
|
*/
|
|
55
|
-
url: (url
|
|
67
|
+
url: (url?: string | undefined, replace?: boolean | undefined, state?: object | undefined) => string | this;
|
|
56
68
|
/**
|
|
57
69
|
* @name $browser#state
|
|
58
70
|
*
|
|
@@ -82,10 +94,10 @@ export class Browser {
|
|
|
82
94
|
* NOTE: this api is intended for use only by the $location service. Please use the
|
|
83
95
|
* {@link ng.$location $location service} to monitor url changes in AngularJS apps.
|
|
84
96
|
*
|
|
85
|
-
* @param {
|
|
86
|
-
* @return {
|
|
97
|
+
* @param {UrlChangeListener} callback Listener function to be called when url changes.
|
|
98
|
+
* @return {UrlChangeListener} Returns the registered listener fn - handy if the fn is anonymous.
|
|
87
99
|
*/
|
|
88
|
-
onUrlChange: (callback:
|
|
100
|
+
onUrlChange: (callback: UrlChangeListener) => UrlChangeListener;
|
|
89
101
|
/**
|
|
90
102
|
* Remove popstate and hashchange handler from window.
|
|
91
103
|
*
|
|
@@ -110,7 +122,7 @@ export class Browser {
|
|
|
110
122
|
baseHref: () => string;
|
|
111
123
|
/**
|
|
112
124
|
* @name $browser#defer
|
|
113
|
-
* @param {function()} fn A function, who's execution should be deferred.
|
|
125
|
+
* @param {function():any} fn A function, who's execution should be deferred.
|
|
114
126
|
* @param {number=} [delay=0] Number of milliseconds to defer the function execution.
|
|
115
127
|
* @param {string=} [taskType=DEFAULT_TASK_TYPE] The type of task that is deferred.
|
|
116
128
|
* @returns {*} DeferId that can be used to cancel the task via `$browser.cancel()`.
|
|
@@ -130,13 +142,31 @@ export class Browser {
|
|
|
130
142
|
* @description
|
|
131
143
|
* Cancels a deferred task identified with `deferId`.
|
|
132
144
|
*
|
|
133
|
-
* @param {
|
|
145
|
+
* @param {number} deferId Token returned by the `$browser.defer` function.
|
|
134
146
|
* @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully
|
|
135
147
|
* canceled.
|
|
136
148
|
*/
|
|
137
|
-
cancel: (deferId:
|
|
149
|
+
cancel: (deferId: number) => boolean;
|
|
138
150
|
}
|
|
139
|
-
|
|
151
|
+
/**
|
|
152
|
+
* @typedef {import('../index').angular.ServiceProvider} angular.BrowserProvider
|
|
153
|
+
* @description
|
|
154
|
+
* This object has two goals:
|
|
155
|
+
*
|
|
156
|
+
* - hide all the global state in the browser caused by the window object
|
|
157
|
+
* - abstract away all the browser specific features and inconsistencies
|
|
158
|
+
*
|
|
159
|
+
* Remove this in the future
|
|
160
|
+
*/
|
|
161
|
+
/**
|
|
162
|
+
* @constructor
|
|
163
|
+
* @this {angular.BrowserProvider}
|
|
164
|
+
*/
|
|
165
|
+
export function BrowserProvider(this: import("../index").angular.ServiceProvider): void;
|
|
140
166
|
export class BrowserProvider {
|
|
141
|
-
$get: (string | ((
|
|
167
|
+
$get: (string | (($$taskTrackerFactory: import("../core/task-tracker-factory").TaskTracker) => Browser))[];
|
|
168
|
+
}
|
|
169
|
+
export type UrlChangeListener = (arg0: string, arg1: string | null) => any;
|
|
170
|
+
export namespace angular {
|
|
171
|
+
type BrowserProvider = import("../index").angular.ServiceProvider;
|
|
142
172
|
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
3
|
-
* @name $document
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* @typedef {import('../index').angular.ServiceProvider} angular.DocumentProvider
|
|
6
3
|
* @description
|
|
7
|
-
* A {@link angular.element jQuery or
|
|
4
|
+
* A {@link angular.element jQuery or JQLite} wrapper for the browser's `window.document` object.
|
|
8
5
|
*
|
|
9
6
|
* @example
|
|
10
7
|
<example module="documentExample" name="document">
|
|
@@ -23,16 +20,24 @@
|
|
|
23
20
|
</file>
|
|
24
21
|
</example>
|
|
25
22
|
*/
|
|
26
|
-
|
|
23
|
+
/**
|
|
24
|
+
* @constructor
|
|
25
|
+
* @this {angular.DocumentProvider}
|
|
26
|
+
*/
|
|
27
|
+
export function $DocumentProvider(this: import("../index").angular.ServiceProvider): void;
|
|
27
28
|
export class $DocumentProvider {
|
|
28
|
-
$get: (
|
|
29
|
+
$get: () => JQLite;
|
|
29
30
|
}
|
|
30
31
|
/**
|
|
31
32
|
* @private
|
|
32
33
|
*
|
|
33
|
-
|
|
34
|
+
* Listens for document visibility change and makes the current status accessible.
|
|
34
35
|
*/
|
|
35
36
|
export function $$IsDocumentHiddenProvider(): void;
|
|
36
37
|
export class $$IsDocumentHiddenProvider {
|
|
37
|
-
$get: (string | (($document:
|
|
38
|
+
$get: (string | (($document: import("../shared/jqlite/jqlite").JQLite, $rootScope: import("../core/scope/scope").Scope) => () => boolean))[];
|
|
39
|
+
}
|
|
40
|
+
export namespace angular {
|
|
41
|
+
type DocumentProvider = import("../index").angular.ServiceProvider;
|
|
38
42
|
}
|
|
43
|
+
import { JQLite } from "../shared/jqlite/jqlite";
|
package/types/services/log.d.ts
CHANGED
|
@@ -1,7 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @typedef {(...args: any[]) => void} LogCall
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @typedef {Object} angular.LogService
|
|
6
|
+
* @property {LogCall} debug - Log a debug messages
|
|
7
|
+
* @property {LogCall} error - Log a error message
|
|
8
|
+
* @property {LogCall} info - Log a info message
|
|
9
|
+
* @property {LogCall} log - Log a general message
|
|
10
|
+
* @property {LogCall} warn - Log a warning message
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* @type {angular.LogService}
|
|
14
|
+
*/
|
|
15
|
+
export let LogService: angular.LogService;
|
|
16
|
+
/**
|
|
17
|
+
* @typedef {import('../index').ServiceProvider} angular.LogProvider
|
|
18
|
+
* @property {function(): boolean} debugEnabled - Function to get the current debug state.
|
|
19
|
+
* @property {function(boolean): angular.LogProvider} debugEnabled - Function to enable or disable debug.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
3
22
|
* @name $logProvider
|
|
4
|
-
* @type {
|
|
23
|
+
* @type {angular.LogProvider}
|
|
5
24
|
*
|
|
6
25
|
* @description
|
|
7
26
|
* Use the `$logProvider` to configure how the application logs messages
|
|
@@ -9,7 +28,6 @@
|
|
|
9
28
|
export class $LogProvider {
|
|
10
29
|
debug: boolean;
|
|
11
30
|
/**
|
|
12
|
-
* @ngdoc method
|
|
13
31
|
* @name $logProvider#debugEnabled
|
|
14
32
|
* @description
|
|
15
33
|
* @param {boolean=} flag enable or disable debug level messages
|
|
@@ -18,46 +36,31 @@ export class $LogProvider {
|
|
|
18
36
|
debugEnabled(flag?: boolean | undefined): any;
|
|
19
37
|
formatError(arg: any): any;
|
|
20
38
|
consoleLog(type: any): (...args: any[]) => any;
|
|
21
|
-
$get():
|
|
39
|
+
$get(): angular.LogService;
|
|
40
|
+
}
|
|
41
|
+
export type LogCall = (...args: any[]) => void;
|
|
42
|
+
export namespace angular {
|
|
43
|
+
type LogService = {
|
|
22
44
|
/**
|
|
23
|
-
*
|
|
24
|
-
* @name $log#log
|
|
25
|
-
*
|
|
26
|
-
* @description
|
|
27
|
-
* Write a log message
|
|
45
|
+
* - Log a debug messages
|
|
28
46
|
*/
|
|
29
|
-
|
|
47
|
+
debug: LogCall;
|
|
30
48
|
/**
|
|
31
|
-
*
|
|
32
|
-
* @name $log#info
|
|
33
|
-
*
|
|
34
|
-
* @description
|
|
35
|
-
* Write an information message
|
|
49
|
+
* - Log a error message
|
|
36
50
|
*/
|
|
37
|
-
|
|
51
|
+
error: LogCall;
|
|
38
52
|
/**
|
|
39
|
-
*
|
|
40
|
-
* @name $log#warn
|
|
41
|
-
*
|
|
42
|
-
* @description
|
|
43
|
-
* Write a warning message
|
|
53
|
+
* - Log a info message
|
|
44
54
|
*/
|
|
45
|
-
|
|
55
|
+
info: LogCall;
|
|
46
56
|
/**
|
|
47
|
-
*
|
|
48
|
-
* @name $log#error
|
|
49
|
-
*
|
|
50
|
-
* @description
|
|
51
|
-
* Write an error message
|
|
57
|
+
* - Log a general message
|
|
52
58
|
*/
|
|
53
|
-
|
|
59
|
+
log: LogCall;
|
|
54
60
|
/**
|
|
55
|
-
*
|
|
56
|
-
* @name $log#debug
|
|
57
|
-
*
|
|
58
|
-
* @description
|
|
59
|
-
* Write a debug message
|
|
61
|
+
* - Log a warning message
|
|
60
62
|
*/
|
|
61
|
-
|
|
63
|
+
warn: LogCall;
|
|
62
64
|
};
|
|
65
|
+
type LogProvider = any;
|
|
63
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:
|
|
56
|
+
$get: (string | (($exceptionHandler: import("../core/exception-handler").angular.ErrorHandler, $templateCache: any, $http: any, $q: any, $sce: any) => {
|
|
57
57
|
(tpl: any, ignoreRequestError: any): any;
|
|
58
58
|
totalPendingRequests: number;
|
|
59
59
|
}))[];
|
package/types/shared/common.d.ts
CHANGED
|
@@ -11,35 +11,99 @@ 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').angular.InjectorService}
|
|
54
|
+
*/
|
|
55
|
+
injector(): import("../../types").angular.InjectorService;
|
|
24
56
|
toString(): string;
|
|
25
|
-
eq(index: any):
|
|
57
|
+
eq(index: any): JQLite;
|
|
26
58
|
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
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Removes expando data from this element. If key is provided, only
|
|
62
|
+
* its field is removed. If data is empty, also removes `ExpandoStore`
|
|
63
|
+
* from cache.
|
|
64
|
+
* @param {Element} element
|
|
65
|
+
* @param {string} [name] - key of field to remove
|
|
66
|
+
*/
|
|
67
|
+
export function removeElementData(element: Element, name?: string): void;
|
|
68
|
+
/**
|
|
69
|
+
* Checks if the string contains HTML tags or entities.
|
|
70
|
+
* @param {string} html
|
|
71
|
+
* @returns {boolean} True if the string is plain text, false if it contains HTML tags or entities.
|
|
72
|
+
*/
|
|
73
|
+
export function isTextNode(html: string): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* @param {string} html
|
|
76
|
+
* @returns {DocumentFragment}
|
|
77
|
+
*/
|
|
78
|
+
export function buildFragment(html: string): DocumentFragment;
|
|
34
79
|
/**
|
|
35
80
|
* @param {Element} element
|
|
36
81
|
* @param {boolean} [onlyDescendants]
|
|
37
82
|
* @returns {void}
|
|
38
83
|
*/
|
|
39
84
|
export function dealoc(element: Element, onlyDescendants?: boolean): void;
|
|
40
|
-
|
|
85
|
+
/**
|
|
86
|
+
* Gets or sets cache data for a given element.
|
|
87
|
+
*
|
|
88
|
+
* @param {Element} element - The DOM element to get or set data on.
|
|
89
|
+
* @param {string|Object} key - The key (as a string) to get/set or an object for mass-setting.
|
|
90
|
+
* @param {*} [value] - The value to set. If not provided, the function acts as a getter.
|
|
91
|
+
* @returns {*} - The retrieved data if acting as a getter. Otherwise, returns undefined.
|
|
92
|
+
*/
|
|
93
|
+
export function getOrSetCacheData(element: Element, key: string | any, value?: any): any;
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* @param {Element} element
|
|
97
|
+
* @param {boolean} keepData
|
|
98
|
+
*/
|
|
99
|
+
export function removeElement(element: Element, keepData?: boolean): void;
|
|
41
100
|
export function getBooleanAttrName(element: any, name: any): any;
|
|
42
|
-
|
|
101
|
+
/**
|
|
102
|
+
* Takes an array of elements, calls any `$destroy` event handlers, removes any data in cache, and finally removes any
|
|
103
|
+
* listeners.
|
|
104
|
+
* @param {NodeListOf<Element>} nodes
|
|
105
|
+
*/
|
|
106
|
+
export function cleanElementData(nodes: NodeListOf<Element>): void;
|
|
43
107
|
/**
|
|
44
108
|
* @param {string} elementStr
|
|
45
109
|
* @returns {string} Returns the string representation of the element.
|
|
@@ -48,10 +112,7 @@ export function startingTag(elementStr: string): string;
|
|
|
48
112
|
/**
|
|
49
113
|
* Return the DOM siblings between the first and last node in the given array.
|
|
50
114
|
* @param {Array} nodes An array-like object
|
|
51
|
-
* @returns {
|
|
115
|
+
* @returns {JQLite} the inputted object or a JQLite collection containing the nodes
|
|
52
116
|
*/
|
|
53
|
-
export function getBlockNodes(nodes: any[]):
|
|
54
|
-
export const jqLite: typeof JQLite;
|
|
117
|
+
export function getBlockNodes(nodes: any[]): JQLite;
|
|
55
118
|
export const BOOLEAN_ATTR: {};
|
|
56
|
-
declare function jqLiteReady(fn: any): void;
|
|
57
|
-
export {};
|
package/types/shared/utils.d.ts
CHANGED
|
@@ -561,28 +561,6 @@ export function shallowCopy(src: any, dst: any): any;
|
|
|
561
561
|
*/
|
|
562
562
|
export function assertArg(arg: any, name: any, reason: any): any;
|
|
563
563
|
export function assertArgFn(arg: any, name: any, acceptArrayAnnotation: any): any;
|
|
564
|
-
export function minErr(module: any): (...args: any[]) => Error;
|
|
565
|
-
export function toDebugString(obj: any): any;
|
|
566
|
-
/**
|
|
567
|
-
* Computes a hash of an 'obj'.
|
|
568
|
-
* Hash of a:
|
|
569
|
-
* string is string
|
|
570
|
-
* number is number as string
|
|
571
|
-
* object is either result of calling $$hashKey function on the object or uniquely generated id,
|
|
572
|
-
* that is also assigned to the $$hashKey property of the object.
|
|
573
|
-
*
|
|
574
|
-
* @param {*} obj
|
|
575
|
-
* @returns {string} hash string such that the same input will have the same hash string.
|
|
576
|
-
* The resulting string key is in 'type:hashKey' format.
|
|
577
|
-
*/
|
|
578
|
-
export function hashKey(obj: any): string;
|
|
579
|
-
export function mergeClasses(a: any, b: any): any;
|
|
580
|
-
/**
|
|
581
|
-
* Converts all accepted directives format into proper directive name.
|
|
582
|
-
* @param name Name to normalize
|
|
583
|
-
*/
|
|
584
|
-
export function directiveNormalize(name: any): any;
|
|
585
|
-
export const ngAttrPrefixes: string[];
|
|
586
564
|
/**
|
|
587
565
|
* @description
|
|
588
566
|
*
|
|
@@ -610,4 +588,26 @@ export const ngAttrPrefixes: string[];
|
|
|
610
588
|
* @param {string} module The namespace to use for the new minErr instance.
|
|
611
589
|
* @returns {function(string, string, ...*): Error} minErr instance
|
|
612
590
|
*/
|
|
591
|
+
export function minErr(module: string): (arg0: string, arg1: string, ...args: any[]) => Error;
|
|
592
|
+
export function toDebugString(obj: any): any;
|
|
593
|
+
/**
|
|
594
|
+
* Computes a hash of an 'obj'.
|
|
595
|
+
* Hash of a:
|
|
596
|
+
* string is string
|
|
597
|
+
* number is number as string
|
|
598
|
+
* object is either result of calling $$hashKey function on the object or uniquely generated id,
|
|
599
|
+
* that is also assigned to the $$hashKey property of the object.
|
|
600
|
+
*
|
|
601
|
+
* @param {*} obj
|
|
602
|
+
* @returns {string} hash string such that the same input will have the same hash string.
|
|
603
|
+
* The resulting string key is in 'type:hashKey' format.
|
|
604
|
+
*/
|
|
605
|
+
export function hashKey(obj: any): string;
|
|
606
|
+
export function mergeClasses(a: any, b: any): any;
|
|
607
|
+
/**
|
|
608
|
+
* Converts all accepted directives format into proper directive name.
|
|
609
|
+
* @param name Name to normalize
|
|
610
|
+
*/
|
|
611
|
+
export function directiveNormalize(name: any): any;
|
|
612
|
+
export const ngAttrPrefixes: string[];
|
|
613
613
|
export const minErrConfig: {};
|
package/types/types.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export namespace angular {
|
|
2
|
+
type InjectorService = {
|
|
3
|
+
/**
|
|
4
|
+
* Annotate a function or an array of inline annotations.
|
|
5
|
+
*/
|
|
6
|
+
annotate: (arg0: Function, arg1: boolean | undefined) => string[];
|
|
7
|
+
/**
|
|
8
|
+
* Get a service by name.
|
|
9
|
+
*/
|
|
10
|
+
get: (arg0: string, arg1: string | undefined) => T;
|
|
11
|
+
/**
|
|
12
|
+
* , any=): T} instantiate Instantiate a type constructor with optional locals.
|
|
13
|
+
*/
|
|
14
|
+
"": new () => (...args: any[]) => any;
|
|
15
|
+
/**
|
|
16
|
+
* Invoke a function with optional context and locals.
|
|
17
|
+
*/
|
|
18
|
+
invoke: (arg0: Injectable<Function | ((...args: any[]) => T)>, arg1: any | undefined, arg2: any | undefined) => T;
|
|
19
|
+
/**
|
|
20
|
+
* Add and load new modules to the injector.
|
|
21
|
+
*/
|
|
22
|
+
loadNewModules: (arg0: Array<IModule | string | Injectable<(...args: any[]) => void>>) => void;
|
|
23
|
+
/**
|
|
24
|
+
* A map of all the modules loaded into the injector.
|
|
25
|
+
*/
|
|
26
|
+
modules: {
|
|
27
|
+
[x: string]: IModule;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Indicates if strict dependency injection is enforced.
|
|
31
|
+
*/
|
|
32
|
+
strictDi: boolean;
|
|
33
|
+
};
|
|
34
|
+
}
|
package/types-back/index.d.ts
CHANGED
|
@@ -791,79 +791,6 @@ declare namespace angular {
|
|
|
791
791
|
register(name: string | {}): IServiceProvider;
|
|
792
792
|
}
|
|
793
793
|
|
|
794
|
-
///////////////////////////////////////////////////////////////////////////
|
|
795
|
-
// LocaleService
|
|
796
|
-
// see http://docs.angularjs.org/api/ng/service/$locale
|
|
797
|
-
///////////////////////////////////////////////////////////////////////////
|
|
798
|
-
interface ILocaleService {
|
|
799
|
-
id: string;
|
|
800
|
-
|
|
801
|
-
// These are not documented
|
|
802
|
-
// Check angular's i18n files for exemples
|
|
803
|
-
NUMBER_FORMATS: ILocaleNumberFormatDescriptor;
|
|
804
|
-
DATETIME_FORMATS: ILocaleDateTimeFormatDescriptor;
|
|
805
|
-
pluralCat(num: any): string;
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
interface ILocaleNumberFormatDescriptor {
|
|
809
|
-
DECIMAL_SEP: string;
|
|
810
|
-
GROUP_SEP: string;
|
|
811
|
-
PATTERNS: ILocaleNumberPatternDescriptor[];
|
|
812
|
-
CURRENCY_SYM: string;
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
interface ILocaleNumberPatternDescriptor {
|
|
816
|
-
minInt: number;
|
|
817
|
-
minFrac: number;
|
|
818
|
-
maxFrac: number;
|
|
819
|
-
posPre: string;
|
|
820
|
-
posSuf: string;
|
|
821
|
-
negPre: string;
|
|
822
|
-
negSuf: string;
|
|
823
|
-
gSize: number;
|
|
824
|
-
lgSize: number;
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
interface ILocaleDateTimeFormatDescriptor {
|
|
828
|
-
MONTH: string[];
|
|
829
|
-
SHORTMONTH: string[];
|
|
830
|
-
DAY: string[];
|
|
831
|
-
SHORTDAY: string[];
|
|
832
|
-
AMPMS: string[];
|
|
833
|
-
medium: string;
|
|
834
|
-
short: string;
|
|
835
|
-
fullDate: string;
|
|
836
|
-
longDate: string;
|
|
837
|
-
mediumDate: string;
|
|
838
|
-
shortDate: string;
|
|
839
|
-
mediumTime: string;
|
|
840
|
-
shortTime: string;
|
|
841
|
-
}
|
|
842
|
-
|
|
843
|
-
///////////////////////////////////////////////////////////////////////////
|
|
844
|
-
// LogService
|
|
845
|
-
// see http://docs.angularjs.org/api/ng/service/$log
|
|
846
|
-
// see http://docs.angularjs.org/api/ng/provider/$logProvider
|
|
847
|
-
///////////////////////////////////////////////////////////////////////////
|
|
848
|
-
interface ILogService {
|
|
849
|
-
debug: ILogCall;
|
|
850
|
-
error: ILogCall;
|
|
851
|
-
info: ILogCall;
|
|
852
|
-
log: ILogCall;
|
|
853
|
-
warn: ILogCall;
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
interface ILogProvider extends IServiceProvider {
|
|
857
|
-
debugEnabled(): boolean;
|
|
858
|
-
debugEnabled(enabled: boolean): ILogProvider;
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
// We define this as separate interface so we can reopen it later for
|
|
862
|
-
// the ngMock module.
|
|
863
|
-
interface ILogCall {
|
|
864
|
-
(...args: any[]): void;
|
|
865
|
-
}
|
|
866
|
-
|
|
867
794
|
///////////////////////////////////////////////////////////////////////////
|
|
868
795
|
// ParseService
|
|
869
796
|
// see http://docs.angularjs.org/api/ng/service/$parse
|
|
@@ -2194,63 +2121,6 @@ declare namespace angular {
|
|
|
2194
2121
|
// AUTO module (angular.js)
|
|
2195
2122
|
///////////////////////////////////////////////////////////////////////////
|
|
2196
2123
|
namespace auto {
|
|
2197
|
-
///////////////////////////////////////////////////////////////////////
|
|
2198
|
-
// InjectorService
|
|
2199
|
-
// see http://docs.angularjs.org/api/AUTO.$injector
|
|
2200
|
-
///////////////////////////////////////////////////////////////////////
|
|
2201
|
-
interface IInjectorService {
|
|
2202
|
-
annotate(fn: Function, strictDi?: boolean): string[];
|
|
2203
|
-
annotate(inlineAnnotatedFunction: any[]): string[];
|
|
2204
|
-
get<T>(name: string, caller?: string): T;
|
|
2205
|
-
get(name: "$anchorScroll"): IAnchorScrollService;
|
|
2206
|
-
get(name: "$cacheFactory"): ICacheFactoryService;
|
|
2207
|
-
get(name: "$compile"): ICompileService;
|
|
2208
|
-
get(name: "$controller"): IControllerService;
|
|
2209
|
-
get(name: "$document"): IDocumentService;
|
|
2210
|
-
get(name: "$exceptionHandler"): IExceptionHandlerService;
|
|
2211
|
-
get(name: "$filter"): IFilterService;
|
|
2212
|
-
get(name: "$http"): IHttpService;
|
|
2213
|
-
get(name: "$httpBackend"): IHttpBackendService;
|
|
2214
|
-
get(name: "$httpParamSerializer"): IHttpParamSerializer;
|
|
2215
|
-
get(name: "$httpParamSerializerJQLike"): IHttpParamSerializer;
|
|
2216
|
-
get(name: "$interpolate"): IInterpolateService;
|
|
2217
|
-
get(name: "$interval"): IIntervalService;
|
|
2218
|
-
get(name: "$locale"): ILocaleService;
|
|
2219
|
-
get(name: "$location"): ILocationService;
|
|
2220
|
-
get(name: "$log"): ILogService;
|
|
2221
|
-
get(name: "$parse"): IParseService;
|
|
2222
|
-
get(name: "$q"): IQService;
|
|
2223
|
-
get(name: "$rootElement"): IRootElementService;
|
|
2224
|
-
get(name: "$rootScope"): IRootScopeService;
|
|
2225
|
-
get(name: "$sce"): ISCEService;
|
|
2226
|
-
get(name: "$sceDelegate"): ISCEDelegateService;
|
|
2227
|
-
get(name: "$templateCache"): ITemplateCacheService;
|
|
2228
|
-
get(name: "$templateRequest"): ITemplateRequestService;
|
|
2229
|
-
get(name: "$timeout"): ITimeoutService;
|
|
2230
|
-
get(name: "$window"): IWindowService;
|
|
2231
|
-
get<T>(name: "$xhrFactory"): IXhrFactory<T>;
|
|
2232
|
-
has(name: string): boolean;
|
|
2233
|
-
instantiate<T>(
|
|
2234
|
-
typeConstructor: { new (...args: any[]): T },
|
|
2235
|
-
locals?: any,
|
|
2236
|
-
): T;
|
|
2237
|
-
invoke<T = any>(
|
|
2238
|
-
func: Injectable<Function | ((...args: any[]) => T)>,
|
|
2239
|
-
context?: any,
|
|
2240
|
-
locals?: any,
|
|
2241
|
-
): T;
|
|
2242
|
-
/**
|
|
2243
|
-
* Add the specified modules to the current injector.
|
|
2244
|
-
* This method will add each of the injectables to the injector and execute all of the config and run blocks for each module passed to the method.
|
|
2245
|
-
* @param modules A module, module name or annotated injection function.
|
|
2246
|
-
*/
|
|
2247
|
-
loadNewModules(
|
|
2248
|
-
modules: Array<IModule | string | Injectable<(...args: any[]) => void>>,
|
|
2249
|
-
): void;
|
|
2250
|
-
/** An object map of all the modules that have been loaded into the injector. */
|
|
2251
|
-
modules: { [moduleName: string]: IModule };
|
|
2252
|
-
strictDi: boolean;
|
|
2253
|
-
}
|
|
2254
2124
|
|
|
2255
2125
|
///////////////////////////////////////////////////////////////////////
|
|
2256
2126
|
// ProvideService
|