@angular-wave/angular.ts 0.11.0 → 0.13.0
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/@types/angular.d.ts +66 -53
- package/@types/animations/animate.d.ts +1 -351
- package/@types/animations/animation.d.ts +2 -2
- package/@types/animations/interface.d.ts +72 -0
- package/@types/animations/{animate-queue.d.ts → queue/animate-queue.d.ts} +2 -7
- package/@types/animations/queue/interface.d.ts +50 -0
- package/@types/animations/raf-scheduler.d.ts +1 -3
- package/@types/core/compile/attributes.d.ts +6 -6
- package/@types/core/compile/compile.d.ts +6 -6
- package/@types/core/controller/controller.d.ts +1 -1
- package/@types/core/di/di.d.ts +26 -0
- package/@types/core/di/injector.d.ts +0 -11
- package/@types/core/di/internal-injector.d.ts +2 -2
- package/@types/core/di/ng-module/ng-module.d.ts +209 -0
- package/@types/core/sanitize/interface.d.ts +8 -0
- package/@types/core/sanitize/sanitize-uri.d.ts +5 -2
- package/@types/core/scope/interface.d.ts +2 -2
- package/@types/core/scope/scope.d.ts +5 -2
- package/@types/directive/bind/bind.d.ts +2 -2
- package/@types/directive/form/form.d.ts +7 -7
- package/@types/directive/if/if.d.ts +2 -2
- package/@types/directive/include/include.d.ts +8 -8
- package/@types/directive/messages/messages.d.ts +18 -22
- package/@types/directive/model/model.d.ts +17 -17
- package/@types/directive/options/options.d.ts +4 -4
- package/@types/directive/scope/scope.d.ts +4 -0
- package/@types/directive/show-hide/show-hide.d.ts +3 -4
- package/@types/directive/switch/switch.d.ts +3 -5
- package/@types/directive/wasm/wasm.d.ts +4 -0
- package/@types/{services → directive}/worker/interface.d.ts +1 -0
- package/@types/directive/worker/worker.d.ts +18 -8
- package/@types/interface.d.ts +76 -15
- package/@types/namespace.d.ts +49 -6
- package/@types/router/url/url-service.d.ts +1 -4
- package/@types/services/cookie/cookie.d.ts +78 -0
- package/@types/services/cookie/interface.d.ts +12 -0
- package/@types/services/exception/exception.d.ts +56 -0
- package/@types/services/exception/interface.d.ts +2 -3
- package/@types/services/log/log.d.ts +2 -2
- package/@types/services/rest/interface.d.ts +17 -0
- package/@types/services/rest/rest.d.ts +110 -0
- package/@types/services/rest/rfc.d.ts +40 -0
- package/@types/services/sce/sce.d.ts +4 -82
- package/@types/services/sse/sse.d.ts +1 -5
- package/@types/services/storage/interface.d.ts +6 -0
- package/@types/services/storage/storage.d.ts +19 -0
- package/@types/services/stream/interface.d.ts +18 -0
- package/@types/shared/dom.d.ts +27 -14
- package/@types/shared/strings.d.ts +0 -6
- package/@types/shared/utils.d.ts +27 -14
- package/README.md +3 -90
- package/dist/angular-ts.esm.js +2539 -1542
- package/dist/angular-ts.umd.js +2539 -1542
- package/dist/angular-ts.umd.min.js +1 -1
- package/package.json +1 -1
- package/@types/core/di/ng-module.d.ts +0 -156
- package/@types/services/exception/exception-handler.d.ts +0 -58
- package/@types/services/worker/worker.d.ts +0 -31
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@angular-wave/angular.ts",
|
|
3
3
|
"description": "A modern, optimized and type-safe version of AngularJS",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.13.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/angular-ts.esm.js",
|
|
8
8
|
"module": "dist/angular-ts.esm.js",
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
/** @private */
|
|
2
|
-
export const INJECTOR_LITERAL: "$injector";
|
|
3
|
-
/** @private */
|
|
4
|
-
export const COMPILE_LITERAL: "$compileProvider";
|
|
5
|
-
/** @private */
|
|
6
|
-
export const ANIMATION_LITERAL: "$animateProvider";
|
|
7
|
-
/** @private */
|
|
8
|
-
export const FILTER_LITERAL: "$filterProvider";
|
|
9
|
-
/** @private */
|
|
10
|
-
export const CONTROLLER_LITERAL: "$controllerProvider";
|
|
11
|
-
/**
|
|
12
|
-
* Modules are collections of application configuration information for components:
|
|
13
|
-
* controllers, directives, filters, etc. They provide recipes for the injector
|
|
14
|
-
* to do the actual instantiation. A module itself has no behaviour but only state.
|
|
15
|
-
* A such, it acts as a data structure between the Angular instance and the injector service.
|
|
16
|
-
*
|
|
17
|
-
* Since this is an internal structure that is exposed only via the Angular instance,
|
|
18
|
-
* it contains no validation of the items it receives. It is up to the instantiator on
|
|
19
|
-
* modules to do the actual validation.
|
|
20
|
-
*/
|
|
21
|
-
export class NgModule {
|
|
22
|
-
/**
|
|
23
|
-
* @param {string} name - Name of the module
|
|
24
|
-
* @param {Array<string>} requires - List of modules which the injector will load before the current module
|
|
25
|
-
* @param {import("../../interface.ts").Injectable<any>} [configFn]
|
|
26
|
-
*/
|
|
27
|
-
constructor(
|
|
28
|
-
name: string,
|
|
29
|
-
requires: Array<string>,
|
|
30
|
-
configFn?: import("../../interface.ts").Injectable<any>,
|
|
31
|
-
);
|
|
32
|
-
/**
|
|
33
|
-
* Name of the current module.
|
|
34
|
-
* @type {string}
|
|
35
|
-
*/
|
|
36
|
-
name: string;
|
|
37
|
-
/**
|
|
38
|
-
* Array of module names that this module depends on.
|
|
39
|
-
* @type {string[]}
|
|
40
|
-
*/
|
|
41
|
-
requires: string[];
|
|
42
|
-
/**
|
|
43
|
-
* Holds a collection of tasks, required to instantiate an angular component
|
|
44
|
-
* @type {!Array<Array<*>>}
|
|
45
|
-
*/
|
|
46
|
-
invokeQueue: Array<Array<any>>;
|
|
47
|
-
/** @type {!Array<Array<*>>} */
|
|
48
|
-
configBlocks: Array<Array<any>>;
|
|
49
|
-
/** @type {!Array.<import("../../interface.ts").Injectable<any>>} */
|
|
50
|
-
runBlocks: Array<import("../../interface.ts").Injectable<any>>;
|
|
51
|
-
services: any[];
|
|
52
|
-
/**
|
|
53
|
-
* @param {string} name
|
|
54
|
-
* @param {any} object
|
|
55
|
-
* @returns {NgModule}
|
|
56
|
-
*/
|
|
57
|
-
value(name: string, object: any): NgModule;
|
|
58
|
-
/**
|
|
59
|
-
* @param {string} name
|
|
60
|
-
* @param {any} object
|
|
61
|
-
* @returns {NgModule}
|
|
62
|
-
*/
|
|
63
|
-
constant(name: string, object: any): NgModule;
|
|
64
|
-
/**
|
|
65
|
-
*
|
|
66
|
-
* @param {import("../../interface.ts").Injectable<any>} configFn
|
|
67
|
-
* @returns {NgModule}
|
|
68
|
-
*/
|
|
69
|
-
config(configFn: import("../../interface.ts").Injectable<any>): NgModule;
|
|
70
|
-
/**
|
|
71
|
-
* @param {import("../../interface.ts").Injectable<any>} block
|
|
72
|
-
* @returns {NgModule}
|
|
73
|
-
*/
|
|
74
|
-
run(block: import("../../interface.ts").Injectable<any>): NgModule;
|
|
75
|
-
/**
|
|
76
|
-
* @param {string} name
|
|
77
|
-
* @param {import("../../interface.ts").Component} options
|
|
78
|
-
* @returns {NgModule}
|
|
79
|
-
*/
|
|
80
|
-
component(
|
|
81
|
-
name: string,
|
|
82
|
-
options: import("../../interface.ts").Component,
|
|
83
|
-
): NgModule;
|
|
84
|
-
/**
|
|
85
|
-
* @param {string} name
|
|
86
|
-
* @param {import("../../interface.ts").Injectable<any>} providerFunction
|
|
87
|
-
* @returns {NgModule}
|
|
88
|
-
*/
|
|
89
|
-
factory(
|
|
90
|
-
name: string,
|
|
91
|
-
providerFunction: import("../../interface.ts").Injectable<any>,
|
|
92
|
-
): NgModule;
|
|
93
|
-
/**
|
|
94
|
-
* @param {string} name
|
|
95
|
-
* @param {import("../../interface.ts").Injectable<any>} serviceFunction
|
|
96
|
-
* @returns {NgModule}
|
|
97
|
-
*/
|
|
98
|
-
service(
|
|
99
|
-
name: string,
|
|
100
|
-
serviceFunction: import("../../interface.ts").Injectable<any>,
|
|
101
|
-
): NgModule;
|
|
102
|
-
/**
|
|
103
|
-
* @param {string} name
|
|
104
|
-
* @param {import("../../interface.ts").Injectable<any>} providerType
|
|
105
|
-
* @returns {NgModule}
|
|
106
|
-
*/
|
|
107
|
-
provider(
|
|
108
|
-
name: string,
|
|
109
|
-
providerType: import("../../interface.ts").Injectable<any>,
|
|
110
|
-
): NgModule;
|
|
111
|
-
/**
|
|
112
|
-
* @param {string} name
|
|
113
|
-
* @param {import("../../interface.ts").Injectable<any>} decorFn
|
|
114
|
-
* @returns {NgModule}
|
|
115
|
-
*/
|
|
116
|
-
decorator(
|
|
117
|
-
name: string,
|
|
118
|
-
decorFn: import("../../interface.ts").Injectable<any>,
|
|
119
|
-
): NgModule;
|
|
120
|
-
/**
|
|
121
|
-
* @param {string} name
|
|
122
|
-
* @param {import("../../interface.ts").Injectable<any>} directiveFactory
|
|
123
|
-
* @returns {NgModule}
|
|
124
|
-
*/
|
|
125
|
-
directive(
|
|
126
|
-
name: string,
|
|
127
|
-
directiveFactory: import("../../interface.ts").Injectable<any>,
|
|
128
|
-
): NgModule;
|
|
129
|
-
/**
|
|
130
|
-
* @param {string} name
|
|
131
|
-
* @param {import("../../interface.ts").Injectable<any>} animationFactory
|
|
132
|
-
* @returns {NgModule}
|
|
133
|
-
*/
|
|
134
|
-
animation(
|
|
135
|
-
name: string,
|
|
136
|
-
animationFactory: import("../../interface.ts").Injectable<any>,
|
|
137
|
-
): NgModule;
|
|
138
|
-
/**
|
|
139
|
-
* @param {string} name
|
|
140
|
-
* @param {import("../../interface.ts").Injectable<any>} filterFn
|
|
141
|
-
* @return {NgModule}
|
|
142
|
-
*/
|
|
143
|
-
filter(
|
|
144
|
-
name: string,
|
|
145
|
-
filterFn: import("../../interface.ts").Injectable<any>,
|
|
146
|
-
): NgModule;
|
|
147
|
-
/**
|
|
148
|
-
* @param {string} name
|
|
149
|
-
* @param {import("../../interface.ts").Injectable<any>} ctlFn
|
|
150
|
-
* @returns {NgModule}
|
|
151
|
-
*/
|
|
152
|
-
controller(
|
|
153
|
-
name: string,
|
|
154
|
-
ctlFn: import("../../interface.ts").Injectable<any>,
|
|
155
|
-
): NgModule;
|
|
156
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Handles uncaught exceptions thrown in AngularTS expressions.
|
|
3
|
-
*
|
|
4
|
-
* By default, this service delegates to `$log.error()`, logging the exception to the browser console.
|
|
5
|
-
* You can override this behavior to provide custom exception handling—such as reporting errors
|
|
6
|
-
* to a backend server, or altering the log level used.
|
|
7
|
-
*
|
|
8
|
-
* ## Default Behavior
|
|
9
|
-
*
|
|
10
|
-
* Uncaught exceptions within AngularTS expressions are intercepted and passed to this service.
|
|
11
|
-
* The default implementation logs the error using `$log.error(exception, cause)`.
|
|
12
|
-
*
|
|
13
|
-
* ## Custom Implementation
|
|
14
|
-
*
|
|
15
|
-
* You can override the default `$exceptionHandler` by providing your own factory. This allows you to:
|
|
16
|
-
* - Log errors to a remote server
|
|
17
|
-
* - Change the log level (e.g., from `error` to `warn`)
|
|
18
|
-
* - Trigger custom error-handling workflows
|
|
19
|
-
*
|
|
20
|
-
* ### Example: Overriding `$exceptionHandler`
|
|
21
|
-
*
|
|
22
|
-
* ```js
|
|
23
|
-
* angular
|
|
24
|
-
* .module('exceptionOverwrite', [])
|
|
25
|
-
* .factory('$exceptionHandler', ['$log', 'logErrorsToBackend', function($log, logErrorsToBackend) {
|
|
26
|
-
* return function myExceptionHandler(exception, cause) {
|
|
27
|
-
* logErrorsToBackend(exception, cause);
|
|
28
|
-
* $log.warn(exception, cause); // Use warn instead of error
|
|
29
|
-
* };
|
|
30
|
-
* }]);
|
|
31
|
-
* ```
|
|
32
|
-
* - You may also manually invoke the exception handler:
|
|
33
|
-
*
|
|
34
|
-
* ```js
|
|
35
|
-
* try {
|
|
36
|
-
* // Some code that might throw
|
|
37
|
-
* } catch (e) {
|
|
38
|
-
* $exceptionHandler(e, 'optional context');
|
|
39
|
-
* }
|
|
40
|
-
* ```
|
|
41
|
-
*
|
|
42
|
-
* @see {@link angular.ErrorHandler AngularTS ErrorHandler}
|
|
43
|
-
*/
|
|
44
|
-
/** @typedef {import('../log/interface.ts').LogService} LogService */
|
|
45
|
-
/** @typedef {import("./interface.ts").ErrorHandler} ErrorHandler */
|
|
46
|
-
/**
|
|
47
|
-
* Provider for `$exceptionHandler` service. Delegates uncaught exceptions to `$log.error()` by default.
|
|
48
|
-
* Can be overridden to implement custom error-handling logic.
|
|
49
|
-
*/
|
|
50
|
-
export class ExceptionHandlerProvider {
|
|
51
|
-
/** @type {LogService} */
|
|
52
|
-
log: LogService;
|
|
53
|
-
/** @type {ErrorHandler} */
|
|
54
|
-
errorHandler: ErrorHandler;
|
|
55
|
-
$get: (string | (($log: LogService) => ErrorHandler))[];
|
|
56
|
-
}
|
|
57
|
-
export type LogService = import("../log/interface.ts").LogService;
|
|
58
|
-
export type ErrorHandler = import("./interface.ts").ErrorHandler;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Worker Provider
|
|
3
|
-
*
|
|
4
|
-
* Usage:
|
|
5
|
-
* const worker = $worker('./math.worker.js', {
|
|
6
|
-
* onMessage: (data) => console.log('Result:', data),
|
|
7
|
-
* onError: (err) => console.error('Worker error:', err),
|
|
8
|
-
* autoTerminate: false,
|
|
9
|
-
* transformMessage: (d) => d,
|
|
10
|
-
* });
|
|
11
|
-
*
|
|
12
|
-
* worker.post({ action: 'fib', n: 20 });
|
|
13
|
-
* worker.terminate();
|
|
14
|
-
*/
|
|
15
|
-
export class WorkerProvider {
|
|
16
|
-
/**
|
|
17
|
-
* @type {ng.LogService}
|
|
18
|
-
*/
|
|
19
|
-
$log: ng.LogService;
|
|
20
|
-
/**
|
|
21
|
-
* Optional provider-level defaults
|
|
22
|
-
* @type {ng.WorkerConfig}
|
|
23
|
-
*/
|
|
24
|
-
defaults: ng.WorkerConfig;
|
|
25
|
-
/**
|
|
26
|
-
* Returns the $worker service function
|
|
27
|
-
* @returns {ng.WorkerService}
|
|
28
|
-
*/
|
|
29
|
-
$get: any[];
|
|
30
|
-
#private;
|
|
31
|
-
}
|