@angular-wave/angular.ts 0.10.0 → 0.12.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 +84 -58
- package/@types/animations/animate-css-driver.d.ts +0 -1
- package/@types/animations/animate-css.d.ts +0 -1
- package/@types/animations/animate-js-driver.d.ts +1 -7
- package/@types/animations/animate-js.d.ts +1 -4
- package/@types/animations/animate.d.ts +5 -355
- package/@types/animations/animation.d.ts +4 -4
- package/@types/animations/interface.d.ts +84 -0
- package/@types/animations/queue/animate-queue.d.ts +21 -0
- package/@types/animations/queue/interface.d.ts +50 -0
- package/@types/animations/runner/animate-runner.d.ts +99 -0
- package/@types/core/compile/attributes.d.ts +5 -5
- package/@types/core/compile/compile.d.ts +4 -4
- 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 +197 -0
- package/@types/core/filter/filter.d.ts +2 -2
- 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 +10 -2
- package/@types/directive/class/class.d.ts +3 -3
- 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 +4 -4
- package/@types/directive/inject/inject.d.ts +2 -2
- package/@types/directive/input/input.d.ts +10 -10
- package/@types/directive/messages/messages.d.ts +19 -23
- package/@types/directive/model/model.d.ts +3 -3
- 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 +49 -21
- package/@types/namespace.d.ts +29 -4
- package/@types/ng.d.ts +3 -5
- package/@types/router/params/interface.d.ts +0 -25
- package/@types/router/state/interface.d.ts +0 -9
- package/@types/router/template-factory.d.ts +1 -1
- package/@types/router/transition/interface.d.ts +0 -33
- package/@types/services/log/log.d.ts +2 -2
- 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 +5 -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 +25 -10
- package/@types/shared/strings.d.ts +0 -6
- package/@types/shared/utils.d.ts +24 -14
- package/dist/angular-ts.esm.js +1867 -1506
- package/dist/angular-ts.umd.js +1867 -1506
- package/dist/angular-ts.umd.min.js +1 -1
- package/dist/angular.css +1 -1
- package/package.json +1 -2
- package/@types/animations/animate-queue.d.ts +0 -27
- package/@types/animations/animate-runner.d.ts +0 -31
- package/@types/core/di/ng-module.d.ts +0 -156
- package/@types/services/worker/worker.d.ts +0 -31
|
@@ -24,85 +24,7 @@ export namespace SCE_CONTEXTS {
|
|
|
24
24
|
* `$sceDelegate` is a service that is used by the `$sce` service to provide {@link ng.$sce Strict
|
|
25
25
|
* Contextual Escaping (SCE)} services to AngularTS.
|
|
26
26
|
*
|
|
27
|
-
* For an overview of this service and the
|
|
28
|
-
* page for {@link ng.$sce SCE}. The current page is targeted for developers who need to alter how
|
|
29
|
-
* SCE works in their application, which shouldn't be needed in most cases.
|
|
30
|
-
*
|
|
31
|
-
* <div class="alert alert-danger">
|
|
32
|
-
* AngularTS strongly relies on contextual escaping for the security of bindings: disabling or
|
|
33
|
-
* modifying this might cause cross site scripting (XSS) vulnerabilities. For libraries owners,
|
|
34
|
-
* changes to this service will also influence users, so be extra careful and document your changes.
|
|
35
|
-
* </div>
|
|
36
|
-
*
|
|
37
|
-
* Typically, you would configure or override the {@link ng.$sceDelegate $sceDelegate} instead of
|
|
38
|
-
* the `$sce` service to customize the way Strict Contextual Escaping works in AngularTS. This is
|
|
39
|
-
* because, while the `$sce` provides numerous shorthand methods, etc., you really only need to
|
|
40
|
-
* override 3 core functions (`trustAs`, `getTrusted` and `valueOf`) to replace the way things
|
|
41
|
-
* work because `$sce` delegates to `$sceDelegate` for these operations.
|
|
42
|
-
*
|
|
43
|
-
* Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} to configure this service.
|
|
44
|
-
*
|
|
45
|
-
* The default instance of `$sceDelegate` should work out of the box with little pain. While you
|
|
46
|
-
* can override it completely to change the behavior of `$sce`, the common case would
|
|
47
|
-
* involve configuring the {@link ng.$sceDelegateProvider $sceDelegateProvider} instead by setting
|
|
48
|
-
* your own trusted and banned resource lists for trusting URLs used for loading AngularTS resources
|
|
49
|
-
* such as templates. Refer {@link ng.$sceDelegateProvider#trustedResourceUrlList
|
|
50
|
-
* $sceDelegateProvider.trustedResourceUrlList} and {@link
|
|
51
|
-
* ng.$sceDelegateProvider#bannedResourceUrlList $sceDelegateProvider.bannedResourceUrlList}
|
|
52
|
-
*/
|
|
53
|
-
/**
|
|
54
|
-
*
|
|
55
|
-
* The `$sceDelegateProvider` provider allows developers to configure the {@link ng.$sceDelegate
|
|
56
|
-
* $sceDelegate service}, used as a delegate for {@link ng.$sce Strict Contextual Escaping (SCE)}.
|
|
57
|
-
*
|
|
58
|
-
* The `$sceDelegateProvider` allows one to get/set the `trustedResourceUrlList` and
|
|
59
|
-
* `bannedResourceUrlList` used to ensure that the URLs used for sourcing AngularTS templates and
|
|
60
|
-
* other script-running URLs are safe (all places that use the `$sce.RESOURCE_URL` context). See
|
|
61
|
-
* {@link ng.$sceDelegateProvider#trustedResourceUrlList
|
|
62
|
-
* $sceDelegateProvider.trustedResourceUrlList} and
|
|
63
|
-
* {@link ng.$sceDelegateProvider#bannedResourceUrlList $sceDelegateProvider.bannedResourceUrlList},
|
|
64
|
-
*
|
|
65
|
-
* For the general details about this service in AngularTS, read the main page for {@link ng.$sce
|
|
66
|
-
* Strict Contextual Escaping (SCE)}.
|
|
67
|
-
*
|
|
68
|
-
* **Example**: Consider the following case. <a name="example"></a>
|
|
69
|
-
*
|
|
70
|
-
* - your app is hosted at url `http://myapp.example.com/`
|
|
71
|
-
* - but some of your templates are hosted on other domains you control such as
|
|
72
|
-
* `http://srv01.assets.example.com/`, `http://srv02.assets.example.com/`, etc.
|
|
73
|
-
* - and you have an open redirect at `http://myapp.example.com/clickThru?...`.
|
|
74
|
-
*
|
|
75
|
-
* Here is what a secure configuration for this scenario might look like:
|
|
76
|
-
*
|
|
77
|
-
* ```
|
|
78
|
-
* angular.module('myApp', []).config(function($sceDelegateProvider) {
|
|
79
|
-
* $sceDelegateProvider.trustedResourceUrlList([
|
|
80
|
-
* // Allow same origin resource loads.
|
|
81
|
-
* 'self',
|
|
82
|
-
* // Allow loading from our assets domain. Notice the difference between * and **.
|
|
83
|
-
* 'http://srv*.assets.example.com/**'
|
|
84
|
-
* ]);
|
|
85
|
-
*
|
|
86
|
-
* // The banned resource URL list overrides the trusted resource URL list so the open redirect
|
|
87
|
-
* // here is blocked.
|
|
88
|
-
* $sceDelegateProvider.bannedResourceUrlList([
|
|
89
|
-
* 'http://myapp.example.com/clickThru**'
|
|
90
|
-
* ]);
|
|
91
|
-
* });
|
|
92
|
-
* ```
|
|
93
|
-
* Note that an empty trusted resource URL list will block every resource URL from being loaded, and will require
|
|
94
|
-
* you to manually mark each one as trusted with `$sce.trustAsResourceUrl`. However, templates
|
|
95
|
-
* requested by {@link ng.$templateRequest $templateRequest} that are present in
|
|
96
|
-
* {@link ng.$templateCache $templateCache} will not go through this check. If you have a mechanism
|
|
97
|
-
* to populate your templates in that cache at config time, then it is a good idea to remove 'self'
|
|
98
|
-
* from the trusted resource URL lsit. This helps to mitigate the security impact of certain types
|
|
99
|
-
* of issues, like for instance attacker-controlled `ng-includes`.
|
|
100
|
-
*/
|
|
101
|
-
/**
|
|
102
|
-
* `$sceDelegate` is a service that is used by the `$sce` service to provide {@link ng.$sce Strict
|
|
103
|
-
* Contextual Escaping (SCE)} services to AngularTS.
|
|
104
|
-
*
|
|
105
|
-
* For an overview of this service and the functionnality it provides in AngularTS, see the main
|
|
27
|
+
* For an overview of this service and the functionality it provides in AngularTS, see the main
|
|
106
28
|
* page for {@link ng.$sce SCE}. The current page is targeted for developers who need to alter how
|
|
107
29
|
* SCE works in their application, which shouldn't be needed in most cases.
|
|
108
30
|
*
|
|
@@ -179,7 +101,7 @@ export namespace SCE_CONTEXTS {
|
|
|
179
101
|
export class SceDelegateProvider {
|
|
180
102
|
/**
|
|
181
103
|
*
|
|
182
|
-
* @param {Array=}
|
|
104
|
+
* @param {Array=} value When provided, replaces the trustedResourceUrlList with
|
|
183
105
|
* the value provided. This must be an array or null. A snapshot of this array is used so
|
|
184
106
|
* further changes to the array are ignored.
|
|
185
107
|
* Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items
|
|
@@ -198,7 +120,7 @@ export class SceDelegateProvider {
|
|
|
198
120
|
* its origin with other apps! It is a good idea to limit it to only your application's directory.
|
|
199
121
|
* </div>
|
|
200
122
|
*/
|
|
201
|
-
trustedResourceUrlList: (value
|
|
123
|
+
trustedResourceUrlList: (value?: any[] | undefined, ...args: any[]) => any[];
|
|
202
124
|
/**
|
|
203
125
|
*
|
|
204
126
|
* @param {Array=} bannedResourceUrlList When provided, replaces the `bannedResourceUrlList` with
|
|
@@ -226,7 +148,7 @@ export class SceDelegateProvider {
|
|
|
226
148
|
| string
|
|
227
149
|
| ((
|
|
228
150
|
$injector: ng.InjectorService,
|
|
229
|
-
$$sanitizeUri:
|
|
151
|
+
$$sanitizeUri: import("../../core/sanitize/interface.ts").SanitizerFn,
|
|
230
152
|
$exceptionHandler: ng.ExceptionHandlerService,
|
|
231
153
|
) => {
|
|
232
154
|
trustAs: (type: string, trustedValue: any) => any;
|
|
@@ -17,11 +17,7 @@ export class SseProvider {
|
|
|
17
17
|
* @type {ng.SseConfig}
|
|
18
18
|
*/
|
|
19
19
|
defaults: ng.SseConfig;
|
|
20
|
-
|
|
21
|
-
* Returns the $sse service function
|
|
22
|
-
* @returns {ng.SseService}
|
|
23
|
-
*/
|
|
24
|
-
$get: any[];
|
|
20
|
+
$get: (string | ((log: ng.LogService) => ng.SseService))[];
|
|
25
21
|
$log: import("../log/interface.ts").LogService;
|
|
26
22
|
#private;
|
|
27
23
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a proxy that automatically persists an object's state
|
|
3
|
+
* into a storage backend whenever a property is set.
|
|
4
|
+
*
|
|
5
|
+
* @param {object} target - The object to wrap
|
|
6
|
+
* @param {string} key - The storage key
|
|
7
|
+
* @param {object} storage - Any storage-like object with getItem/setItem/removeItem
|
|
8
|
+
* @param {{serialize?: function, deserialize?: function}} [options] - Optional custom (de)serialization
|
|
9
|
+
* @returns {Proxy}
|
|
10
|
+
*/
|
|
11
|
+
export function createPersistentProxy(
|
|
12
|
+
target: object,
|
|
13
|
+
key: string,
|
|
14
|
+
storage: object,
|
|
15
|
+
options?: {
|
|
16
|
+
serialize?: Function;
|
|
17
|
+
deserialize?: Function;
|
|
18
|
+
},
|
|
19
|
+
): ProxyConstructor;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface StreamConnectionConfig {
|
|
2
|
+
/** Called when the connection opens */
|
|
3
|
+
onOpen?: (event: Event) => void;
|
|
4
|
+
/** Called when a message is received */
|
|
5
|
+
onMessage?: (data: any, event: Event) => void;
|
|
6
|
+
/** Called when an error occurs */
|
|
7
|
+
onError?: (err: any) => void;
|
|
8
|
+
/** Called when a reconnect attempt happens */
|
|
9
|
+
onReconnect?: (attempt: number) => void;
|
|
10
|
+
/** Delay between reconnect attempts in milliseconds */
|
|
11
|
+
retryDelay?: number;
|
|
12
|
+
/** Maximum number of reconnect attempts */
|
|
13
|
+
maxRetries?: number;
|
|
14
|
+
/** Timeout in milliseconds to detect heartbeat inactivity */
|
|
15
|
+
heartbeatTimeout?: number;
|
|
16
|
+
/** Function to transform incoming messages */
|
|
17
|
+
transformMessage?: (data: any) => any;
|
|
18
|
+
}
|
package/@types/shared/dom.d.ts
CHANGED
|
@@ -99,9 +99,9 @@ export function deleteCacheData(element: Element, key: string): void;
|
|
|
99
99
|
* Gets scope for a given element.
|
|
100
100
|
*
|
|
101
101
|
* @param {Element} element - The DOM element to get data from.
|
|
102
|
-
* @returns {
|
|
102
|
+
* @returns {ng.Scope} - The retrieved data for the given key or all data if no key is provided.
|
|
103
103
|
*/
|
|
104
|
-
export function getScope(element: Element):
|
|
104
|
+
export function getScope(element: Element): ng.Scope;
|
|
105
105
|
/**
|
|
106
106
|
* Set scope for a given element.
|
|
107
107
|
*
|
|
@@ -133,7 +133,7 @@ export function setIsolateScope(
|
|
|
133
133
|
* Gets the controller instance for a given element, if exists. Defaults to "ngControllerController"
|
|
134
134
|
*
|
|
135
135
|
* @param {Element} element - The DOM element to get data from.
|
|
136
|
-
* @param {string} [name] -
|
|
136
|
+
* @param {string} [name] - Controller name.
|
|
137
137
|
* @returns {import("../core/scope/scope.js").Scope|undefined} - The retrieved data
|
|
138
138
|
*/
|
|
139
139
|
export function getController(
|
|
@@ -198,11 +198,9 @@ export function cleanElementData(nodes: NodeListOf<Element> | Element[]): void;
|
|
|
198
198
|
/**
|
|
199
199
|
* Return instance of InjectorService attached to element
|
|
200
200
|
* @param {Element} element
|
|
201
|
-
* @returns {
|
|
201
|
+
* @returns {ng.InjectorService}
|
|
202
202
|
*/
|
|
203
|
-
export function getInjector(
|
|
204
|
-
element: Element,
|
|
205
|
-
): import("../core/di/internal-injector.js").InjectorService;
|
|
203
|
+
export function getInjector(element: Element): ng.InjectorService;
|
|
206
204
|
/**
|
|
207
205
|
* Creates a DOM element from an HTML string.
|
|
208
206
|
* @param {string} htmlString - A string representing the HTML to parse. Must have only one root element.
|
|
@@ -235,11 +233,28 @@ export function emptyElement(element: Element): void;
|
|
|
235
233
|
* @returns {boolean}
|
|
236
234
|
*/
|
|
237
235
|
export function isRoot(element: Element): boolean;
|
|
236
|
+
/**
|
|
237
|
+
* Inserts a DOM element before or at the beginning of a parent element.
|
|
238
|
+
*
|
|
239
|
+
* @param {HTMLElement | Element} element
|
|
240
|
+
* The element to insert into the DOM.
|
|
241
|
+
*
|
|
242
|
+
* @param {HTMLElement | Element} parentElement
|
|
243
|
+
* The parent element that will receive the inserted element.
|
|
244
|
+
*
|
|
245
|
+
* @param {HTMLElement | Element | null} [afterElement]
|
|
246
|
+
* An optional sibling element — if present and valid, `element`
|
|
247
|
+
* will be inserted after it. If omitted or invalid, `element`
|
|
248
|
+
* is prepended to `parentElement`.
|
|
249
|
+
*
|
|
250
|
+
* @returns {void}
|
|
251
|
+
*/
|
|
238
252
|
export function domInsert(
|
|
239
|
-
element:
|
|
240
|
-
parentElement:
|
|
241
|
-
afterElement
|
|
253
|
+
element: HTMLElement | Element,
|
|
254
|
+
parentElement: HTMLElement | Element,
|
|
255
|
+
afterElement?: HTMLElement | Element | null,
|
|
242
256
|
): void;
|
|
257
|
+
export function animatedomInsert(element: any, parent: any, after: any): void;
|
|
243
258
|
/**
|
|
244
259
|
* Returns the base href of the document.
|
|
245
260
|
*
|
|
@@ -49,10 +49,4 @@ export function splitOnDelim(delim: any): (str: any) => any;
|
|
|
49
49
|
* ```
|
|
50
50
|
*/
|
|
51
51
|
export function joinNeighborsR(acc: any, x: any): any;
|
|
52
|
-
export function beforeAfterSubstr(char: any): (str: any) => any[];
|
|
53
|
-
export const hostRegex: RegExp;
|
|
54
52
|
export function stripLastPathElement(str: any): any;
|
|
55
|
-
export function splitHash(str: any): any[];
|
|
56
|
-
export function splitQuery(str: any): any[];
|
|
57
|
-
export function splitEqual(str: any): any[];
|
|
58
|
-
export function trimHashVal(str: any): any;
|
package/@types/shared/utils.d.ts
CHANGED
|
@@ -208,19 +208,6 @@ export function isNumberNaN(num: any): boolean;
|
|
|
208
208
|
*/
|
|
209
209
|
export function inherit(parent: any, extra: any): any;
|
|
210
210
|
export function hasCustomToString(obj: any): boolean;
|
|
211
|
-
/**
|
|
212
|
-
* @module angular
|
|
213
|
-
* @function isElement
|
|
214
|
-
|
|
215
|
-
* @function
|
|
216
|
-
*
|
|
217
|
-
* @description
|
|
218
|
-
* Determines if a reference is a DOM element (or wrapped jQuery element).
|
|
219
|
-
*
|
|
220
|
-
* @param {*} node Reference to check.
|
|
221
|
-
* @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element).
|
|
222
|
-
*/
|
|
223
|
-
export function isElement(node: any): boolean;
|
|
224
211
|
/**
|
|
225
212
|
* Returns a string appropriate for the type of node.
|
|
226
213
|
*
|
|
@@ -488,7 +475,18 @@ export function toDebugString(obj: any): any;
|
|
|
488
475
|
* The resulting string key is in 'type:hashKey' format.
|
|
489
476
|
*/
|
|
490
477
|
export function hashKey(obj: any): string;
|
|
491
|
-
|
|
478
|
+
/**
|
|
479
|
+
* Merges two class name values into a single space-separated string.
|
|
480
|
+
* Accepts strings, arrays of strings, or null/undefined values.
|
|
481
|
+
*
|
|
482
|
+
* @param {string | string[] | null | undefined} a - The first class name(s).
|
|
483
|
+
* @param {string | string[] | null | undefined} b - The second class name(s).
|
|
484
|
+
* @returns {string} A single string containing all class names separated by spaces.
|
|
485
|
+
*/
|
|
486
|
+
export function mergeClasses(
|
|
487
|
+
a: string | string[] | null | undefined,
|
|
488
|
+
b: string | string[] | null | undefined,
|
|
489
|
+
): string;
|
|
492
490
|
/**
|
|
493
491
|
* Converts all accepted directives format into proper directive name.
|
|
494
492
|
* @param {string} name Name to normalize
|
|
@@ -571,5 +569,17 @@ export function wait(t?: number): Promise<void>;
|
|
|
571
569
|
* // returns false
|
|
572
570
|
*/
|
|
573
571
|
export function startsWith(str: string, search: string): boolean;
|
|
572
|
+
/**
|
|
573
|
+
* Loads and instantiates a WebAssembly module.
|
|
574
|
+
* Tries streaming first, then falls back.
|
|
575
|
+
*/
|
|
576
|
+
export function instantiateWasm(
|
|
577
|
+
src: any,
|
|
578
|
+
imports?: {},
|
|
579
|
+
): Promise<{
|
|
580
|
+
instance: WebAssembly.Instance;
|
|
581
|
+
exports: WebAssembly.Exports;
|
|
582
|
+
module: WebAssembly.Module;
|
|
583
|
+
}>;
|
|
574
584
|
export const isProxySymbol: unique symbol;
|
|
575
585
|
export const ngAttrPrefixes: string[];
|