@angular-wave/angular.ts 0.15.2 → 0.16.1
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/animations/interface.d.ts +4 -0
- package/@types/animations/runner/animate-runner.d.ts +2 -1
- package/@types/animations/shared.d.ts +100 -44
- package/@types/core/compile/attributes.d.ts +34 -18
- package/@types/core/compile/compile.d.ts +4 -5
- package/@types/core/controller/interface.d.ts +1 -1
- package/@types/core/di/di.d.ts +0 -10
- package/@types/core/di/interface.d.ts +28 -0
- package/@types/core/di/internal-injector.d.ts +28 -19
- package/@types/core/di/ng-module/ng-module.d.ts +35 -4
- package/@types/core/interpolate/interpolate.d.ts +1 -1
- package/@types/core/parse/ast/ast-node.d.ts +75 -38
- package/@types/core/parse/ast/ast.d.ts +6 -15
- package/@types/core/parse/ast-type.d.ts +1 -1
- package/@types/core/parse/interface.d.ts +9 -41
- package/@types/core/parse/interpreter.d.ts +26 -13
- package/@types/core/parse/lexer/lexer.d.ts +2 -30
- package/@types/core/parse/parse.d.ts +1 -34
- package/@types/core/parse/parser/parser.d.ts +2 -13
- package/@types/core/sanitize/sanitize-uri.d.ts +2 -2
- package/@types/core/scope/interface.d.ts +1 -0
- package/@types/core/scope/scope.d.ts +17 -5
- package/@types/directive/form/form.d.ts +8 -40
- package/@types/directive/model/model.d.ts +34 -30
- package/@types/directive/model-options/model-options.d.ts +1 -2
- package/@types/directive/validators/validators.d.ts +5 -7
- package/@types/filters/order-by.d.ts +2 -1
- package/@types/interface.d.ts +3 -2
- package/@types/namespace.d.ts +18 -2
- package/@types/router/state/state-object.d.ts +2 -2
- package/@types/router/state/state-service.d.ts +1 -0
- package/@types/router/template-factory.d.ts +4 -5
- package/@types/router/transition/reject-factory.d.ts +32 -9
- package/@types/router/transition/transition-event-type.d.ts +2 -2
- package/@types/router/transition/transition-hook.d.ts +5 -2
- package/@types/router/transition/transition-service.d.ts +2 -2
- package/@types/router/transition/transition.d.ts +2 -2
- package/@types/router/view/view.d.ts +4 -4
- package/@types/services/http/http.d.ts +1 -1
- package/@types/services/pubsub/pubsub.d.ts +2 -2
- package/@types/services/sce/interface.d.ts +8 -0
- package/@types/services/sce/sce.d.ts +10 -7
- package/@types/services/sse/interface.d.ts +5 -20
- package/@types/services/storage/storage.d.ts +2 -2
- package/@types/services/stream/interface.d.ts +1 -0
- package/@types/services/stream/stream.d.ts +1 -1
- package/@types/services/template-request/template-request.d.ts +0 -1
- package/@types/services/websocket/interface.d.ts +16 -0
- package/@types/services/websocket/websocket.d.ts +20 -0
- package/@types/shared/common.d.ts +48 -27
- package/@types/shared/constants.d.ts +2 -8
- package/@types/shared/dom.d.ts +33 -19
- package/@types/shared/utils.d.ts +8 -8
- package/README.md +15 -7
- package/dist/angular-ts.esm.js +4438 -4364
- package/dist/angular-ts.umd.js +4438 -4364
- package/dist/angular-ts.umd.min.js +1 -1
- package/dist/angular-ts.umd.min.js.gz +0 -0
- package/dist/angular-ts.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/@types/core/di/inteface.d.ts +0 -11
- /package/@types/core/compile/{inteface.d.ts → interface.d.ts} +0 -0
|
@@ -71,7 +71,7 @@ export class NgModelController {
|
|
|
71
71
|
/** @type {any} The value in the model that the control is bound to. */
|
|
72
72
|
$modelValue: any;
|
|
73
73
|
/** @type {any} */
|
|
74
|
-
|
|
74
|
+
_rawModelValue: any;
|
|
75
75
|
/** @type {import("./interface.ts").ModelValidators} */
|
|
76
76
|
$validators: import("./interface.ts").ModelValidators;
|
|
77
77
|
/** @type {import("./interface.ts").AsyncModelValidators} */
|
|
@@ -95,10 +95,10 @@ export class NgModelController {
|
|
|
95
95
|
/** @type {boolean} */
|
|
96
96
|
$invalid: boolean;
|
|
97
97
|
$error: {};
|
|
98
|
-
|
|
98
|
+
_success: {};
|
|
99
99
|
$pending: any;
|
|
100
100
|
$name: string;
|
|
101
|
-
|
|
101
|
+
_parentForm: {
|
|
102
102
|
$nonscope: boolean;
|
|
103
103
|
$addControl: Function;
|
|
104
104
|
$getControls: () => any[];
|
|
@@ -113,7 +113,7 @@ export class NgModelController {
|
|
|
113
113
|
_setSubmitted: Function;
|
|
114
114
|
};
|
|
115
115
|
$options: {
|
|
116
|
-
|
|
116
|
+
_options: import("../model-options/model-options.js").ModelOptionsConfig;
|
|
117
117
|
getOption(name: string):
|
|
118
118
|
| string
|
|
119
119
|
| boolean
|
|
@@ -123,8 +123,8 @@ export class NgModelController {
|
|
|
123
123
|
};
|
|
124
124
|
createChild(options: ModelOptionsConfig): /*elided*/ any;
|
|
125
125
|
};
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
_updateEvents: string;
|
|
127
|
+
_updateEventHandler(ev: any): void;
|
|
128
128
|
_parsedNgModel: import("../../core/parse/interface.ts").CompiledExpression;
|
|
129
129
|
_parsedNgModelAssign: (context: any, value: any) => any;
|
|
130
130
|
/**
|
|
@@ -135,26 +135,26 @@ export class NgModelController {
|
|
|
135
135
|
| import("../../core/parse/interface.ts").CompiledExpression
|
|
136
136
|
| ((arg0: ng.Scope) => any);
|
|
137
137
|
_ngModelSet: (context: any, value: any) => any;
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
_pendingDebounce: number;
|
|
139
|
+
_parserValid: boolean;
|
|
140
140
|
/** @type {string} */
|
|
141
|
-
|
|
141
|
+
_parserName: string;
|
|
142
142
|
/** @type {number} */
|
|
143
|
-
|
|
143
|
+
_currentValidationRunId: number;
|
|
144
144
|
/** @type {ng.Scope} */
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
145
|
+
_scope: ng.Scope;
|
|
146
|
+
_attr: ng.Attributes;
|
|
147
|
+
_element: Element;
|
|
148
|
+
_animate: import("../../animations/interface.ts").AnimateService;
|
|
149
|
+
_parse: import("../../core/parse/interface.ts").ParseService;
|
|
150
|
+
_exceptionHandler: import("../../services/exception/interface.ts").ExceptionHandler;
|
|
151
|
+
_hasNativeValidators: boolean;
|
|
152
|
+
_classCache: {};
|
|
153
|
+
_eventRemovers: Set<any>;
|
|
154
154
|
set(object: any, property: any): void;
|
|
155
155
|
unset(object: any, property: any): void;
|
|
156
156
|
$setValidity(validationErrorKey: any, state: any): void;
|
|
157
|
-
|
|
157
|
+
_initGetterSetters(): void;
|
|
158
158
|
/**
|
|
159
159
|
* Called when the view needs to be updated. It is expected that the user of the ng-model
|
|
160
160
|
* directive will implement this method.
|
|
@@ -187,7 +187,7 @@ export class NgModelController {
|
|
|
187
187
|
* @returns {boolean} True if `value` is "empty".
|
|
188
188
|
*/
|
|
189
189
|
$isEmpty(value: any): boolean;
|
|
190
|
-
|
|
190
|
+
_updateEmptyClasses(value: any): void;
|
|
191
191
|
/**
|
|
192
192
|
* Sets the control to its pristine state.
|
|
193
193
|
*
|
|
@@ -316,7 +316,7 @@ export class NgModelController {
|
|
|
316
316
|
* `$modelValue`, i.e. either the last parsed value or the last value set from the scope.
|
|
317
317
|
*/
|
|
318
318
|
$validate(): void;
|
|
319
|
-
|
|
319
|
+
_runValidators(modelValue: any, viewValue: any, doneCallback: any): void;
|
|
320
320
|
/**
|
|
321
321
|
* Commit a pending update to the `$modelValue`.
|
|
322
322
|
*
|
|
@@ -325,9 +325,9 @@ export class NgModelController {
|
|
|
325
325
|
* usually handles calling this in response to input events.
|
|
326
326
|
*/
|
|
327
327
|
$commitViewValue(): void;
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
328
|
+
_lastCommittedViewValue: any;
|
|
329
|
+
_parseAndValidate(): void;
|
|
330
|
+
_writeModelToScope(): void;
|
|
331
331
|
/**
|
|
332
332
|
* Update the view value.
|
|
333
333
|
*
|
|
@@ -376,7 +376,7 @@ export class NgModelController {
|
|
|
376
376
|
* @param {string} [trigger] Event that triggered the update.
|
|
377
377
|
*/
|
|
378
378
|
$setViewValue(value: any, trigger?: string): void;
|
|
379
|
-
|
|
379
|
+
_debounceViewValueCommit(trigger: any): void;
|
|
380
380
|
/**
|
|
381
381
|
*
|
|
382
382
|
* Override the current model options settings programmatically.
|
|
@@ -513,11 +513,15 @@ export class NgModelController {
|
|
|
513
513
|
/**
|
|
514
514
|
* This method is called internally to run the $formatters on the $modelValue
|
|
515
515
|
*/
|
|
516
|
-
|
|
516
|
+
_format(): any;
|
|
517
517
|
/**
|
|
518
|
+
* @ignore
|
|
518
519
|
* This method is called internally when the bound scope value changes.
|
|
519
520
|
*/
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
521
|
+
_setModelValue(modelValue: any): void;
|
|
522
|
+
/**
|
|
523
|
+
* @ignore
|
|
524
|
+
*/
|
|
525
|
+
_removeAllEventListeners(): void;
|
|
526
|
+
_setUpdateOnEvents(): void;
|
|
523
527
|
}
|
|
@@ -27,7 +27,6 @@ export type ModelOptionsConfig = {
|
|
|
27
27
|
updateOnDefault?: boolean;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* @description
|
|
31
30
|
* A container for the options set by the {@link ngModelOptions} directive
|
|
32
31
|
*/
|
|
33
32
|
declare class ModelOptions {
|
|
@@ -37,7 +36,7 @@ declare class ModelOptions {
|
|
|
37
36
|
*/
|
|
38
37
|
constructor(options: ModelOptionsConfig);
|
|
39
38
|
/** @type {ModelOptionsConfig} */
|
|
40
|
-
|
|
39
|
+
_options: ModelOptionsConfig;
|
|
41
40
|
/**
|
|
42
41
|
* Returns the value of the given option
|
|
43
42
|
* @param {string} name the name of the option to retrieve
|
|
@@ -32,7 +32,7 @@ export const requiredDirective: (
|
|
|
32
32
|
* parsable into a `RegExp`, or a `RegExp` literal. See above for
|
|
33
33
|
* more details.
|
|
34
34
|
*
|
|
35
|
-
*
|
|
35
|
+
*
|
|
36
36
|
*
|
|
37
37
|
* ngPattern adds the pattern {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.
|
|
38
38
|
* It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls.
|
|
@@ -68,16 +68,14 @@ export const requiredDirective: (
|
|
|
68
68
|
*/
|
|
69
69
|
export const patternDirective: (
|
|
70
70
|
| string
|
|
71
|
-
| ((
|
|
72
|
-
$parse: import("../../core/parse/interface.ts").ParseService,
|
|
73
|
-
) => ng.Directive)
|
|
71
|
+
| (($parse: ng.ParseService) => ng.Directive)
|
|
74
72
|
)[];
|
|
75
73
|
/**
|
|
76
74
|
* @param {string} ngMaxlength AngularTS expression that must evaluate to a `Number` or `String`
|
|
77
75
|
* parsable into a `Number`. Used as value for the `maxlength`
|
|
78
76
|
* {@link ngModel.NgModelController#$validators validator}.
|
|
79
77
|
*
|
|
80
|
-
*
|
|
78
|
+
*
|
|
81
79
|
*
|
|
82
80
|
* ngMaxlength adds the maxlength {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.
|
|
83
81
|
* It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls.
|
|
@@ -112,7 +110,7 @@ export const maxlengthDirective: (
|
|
|
112
110
|
* parsable into a `Number`. Used as value for the `minlength`
|
|
113
111
|
* {@link ngModel.NgModelController#$validators validator}.
|
|
114
112
|
*
|
|
115
|
-
*
|
|
113
|
+
*
|
|
116
114
|
*
|
|
117
115
|
* ngMinlength adds the minlength {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.
|
|
118
116
|
* It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls.
|
|
@@ -139,7 +137,7 @@ export const maxlengthDirective: (
|
|
|
139
137
|
*/
|
|
140
138
|
export const minlengthDirective: (
|
|
141
139
|
| string
|
|
142
|
-
| (($parse:
|
|
140
|
+
| (($parse: ng.ParseService) => {
|
|
143
141
|
restrict: string;
|
|
144
142
|
require: string;
|
|
145
143
|
link(scope: any, elm: any, attr: any, ctrl: any): void;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @param {ng.ParseService} $parse
|
|
2
3
|
* @returns {ng.FilterFn}
|
|
3
4
|
*/
|
|
4
|
-
export function orderByFilter($parse:
|
|
5
|
+
export function orderByFilter($parse: ng.ParseService): ng.FilterFn;
|
|
5
6
|
export namespace orderByFilter {
|
|
6
7
|
let $inject: string[];
|
|
7
8
|
}
|
package/@types/interface.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export declare const PublicInjectionTokens: {
|
|
|
44
44
|
readonly $url: "$url";
|
|
45
45
|
readonly $view: "$view";
|
|
46
46
|
readonly $window: "$window";
|
|
47
|
+
readonly $websocket: "$websocket";
|
|
47
48
|
readonly $provide: "$provide";
|
|
48
49
|
readonly $injector: "$injector";
|
|
49
50
|
readonly $compileProvider: "$compileProvider";
|
|
@@ -429,9 +430,9 @@ export interface Directive<TController = any> {
|
|
|
429
430
|
templateUrl?: string | ((element: Element, attrs: Attributes) => string);
|
|
430
431
|
/** Enables transclusion or configures named slots */
|
|
431
432
|
transclude?: boolean | string | Record<string, string>;
|
|
432
|
-
/** Internal hook for directive compilation state */
|
|
433
|
-
$$addStateInfo?: (...args: any[]) => any;
|
|
434
433
|
count?: number;
|
|
434
|
+
/** Internal hook for directive compilation state */
|
|
435
|
+
_addStateInfo?: (...args: any[]) => any;
|
|
435
436
|
}
|
|
436
437
|
export type DirectiveFactoryFn = (
|
|
437
438
|
...args: any[]
|
package/@types/namespace.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { angular } from "./index.js";
|
|
|
2
2
|
import { Angular as TAngular } from "./angular.js";
|
|
3
3
|
import { Attributes as TAttributes } from "./core/compile/attributes.js";
|
|
4
4
|
import { Scope as TScope } from "./core/scope/scope.js";
|
|
5
|
+
import { ProviderCache as TProviderCache } from "./core/di/interface.ts";
|
|
5
6
|
import {
|
|
6
7
|
ListenerFn as TListenerFn,
|
|
7
8
|
Listener as TListener,
|
|
@@ -46,6 +47,7 @@ import {
|
|
|
46
47
|
PubSub as TPubSub,
|
|
47
48
|
} from "./services/pubsub/pubsub.js";
|
|
48
49
|
import {
|
|
50
|
+
AnnotatedFactory as TAnnotatedFactory,
|
|
49
51
|
Directive as TDirective,
|
|
50
52
|
DirectiveFactory as TDirectiveFactory,
|
|
51
53
|
AnnotatedDirectiveFactory as TAnnotatedDirectiveFactory,
|
|
@@ -73,14 +75,17 @@ import {
|
|
|
73
75
|
TranscludeFn as TTranscludeFn,
|
|
74
76
|
LinkFnMapping as TLinkFnMapping,
|
|
75
77
|
CompositeLinkFn as TCompositeLinkFn,
|
|
76
|
-
} from "./core/compile/
|
|
78
|
+
} from "./core/compile/interface.ts";
|
|
77
79
|
import {
|
|
78
80
|
WorkerConnection as TWorkerConnection,
|
|
79
81
|
WorkerConfig as TWorkerConfig,
|
|
80
82
|
} from "./directive/worker/interface.ts";
|
|
81
83
|
import { Provider as TProvideService } from "./interface.ts";
|
|
82
84
|
import { Location as TLocationService } from "./services/location/location.js";
|
|
83
|
-
import {
|
|
85
|
+
import {
|
|
86
|
+
AnimateService as TAnimateService,
|
|
87
|
+
AnimationOptions as TAnimationOptions,
|
|
88
|
+
} from "./animations/interface.ts";
|
|
84
89
|
import {
|
|
85
90
|
StorageBackend as TStorageBackend,
|
|
86
91
|
StorageType as TStorageType,
|
|
@@ -116,9 +121,14 @@ import {
|
|
|
116
121
|
SCEService as TSCEService,
|
|
117
122
|
SCEDelegateService as TSCEDelegateService,
|
|
118
123
|
} from "./services/sce/interface.ts";
|
|
124
|
+
import {
|
|
125
|
+
WebSocketConfig as TWebSocketConfig,
|
|
126
|
+
WebSocketService as TWebSocketService,
|
|
127
|
+
} from "./services/websocket/interface.ts";
|
|
119
128
|
declare global {
|
|
120
129
|
interface Function {
|
|
121
130
|
$inject?: readonly string[] | undefined;
|
|
131
|
+
$nonscope?: readonly string[] | boolean | undefined;
|
|
122
132
|
}
|
|
123
133
|
interface Window {
|
|
124
134
|
angular: TAngular;
|
|
@@ -185,6 +195,7 @@ declare global {
|
|
|
185
195
|
type UrlService = TUrlService;
|
|
186
196
|
type ViewService = TViewService;
|
|
187
197
|
type ViewScrollService = TViewScrollService;
|
|
198
|
+
type AnimationOptions = TAnimationOptions;
|
|
188
199
|
type ErrorHandlingConfig = TErrorHandlingConfig;
|
|
189
200
|
type ListenerFn = TListenerFn;
|
|
190
201
|
type Listener = TListener;
|
|
@@ -198,6 +209,8 @@ declare global {
|
|
|
198
209
|
| ((...args: any[]) => any)
|
|
199
210
|
| (abstract new (...args: any[]) => any),
|
|
200
211
|
> = TInjectable<T>;
|
|
212
|
+
type AnnotatedFactory<T extends (...args: any[]) => any> =
|
|
213
|
+
TAnnotatedFactory<T>;
|
|
201
214
|
type StorageBackend = TStorageBackend;
|
|
202
215
|
type StorageType = TStorageType;
|
|
203
216
|
type StreamConnectionConfig = TStreamConnectionConfig;
|
|
@@ -220,5 +233,8 @@ declare global {
|
|
|
220
233
|
type ScopeEvent = TScopeEvent;
|
|
221
234
|
type RequestShortcutConfig = TRequestShortcutConfig;
|
|
222
235
|
type HttpProviderDefaults = THttpProviderDefaults;
|
|
236
|
+
type ProviderCache = TProviderCache;
|
|
237
|
+
type WebSocketConfig = TWebSocketConfig;
|
|
238
|
+
type WebSocketService = TWebSocketService;
|
|
223
239
|
}
|
|
224
240
|
}
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
*
|
|
8
8
|
* This class prototypally inherits from the corresponding [[StateDeclaration]].
|
|
9
9
|
* Each of its own properties (i.e., `hasOwnProperty`) are built using builders from the [[StateBuilder]].
|
|
10
|
-
* @
|
|
10
|
+
* @extends {ng.StateDeclaration}
|
|
11
11
|
*/
|
|
12
|
-
export class StateObject
|
|
12
|
+
export class StateObject {
|
|
13
13
|
/**
|
|
14
14
|
* @param {import('./interface.ts').StateDeclaration} config
|
|
15
15
|
*/
|
|
@@ -14,11 +14,11 @@ export class TemplateFactoryProvider {
|
|
|
14
14
|
| ((
|
|
15
15
|
$http: ng.HttpService,
|
|
16
16
|
$templateCache: ng.TemplateCacheService,
|
|
17
|
-
$templateRequest:
|
|
17
|
+
$templateRequest: ng.TemplateRequestService,
|
|
18
18
|
$injector: import("../core/di/internal-injector.js").InjectorService,
|
|
19
19
|
) => this)
|
|
20
20
|
)[];
|
|
21
|
-
$templateRequest:
|
|
21
|
+
$templateRequest: import("../services/template-request/interface.ts").TemplateRequestService;
|
|
22
22
|
$http: import("../services/http/interface.ts").HttpService;
|
|
23
23
|
$templateCache: ng.TemplateCacheService;
|
|
24
24
|
$injector: import("../core/di/internal-injector.js").InjectorService;
|
|
@@ -62,10 +62,9 @@ export class TemplateFactoryProvider {
|
|
|
62
62
|
* @param {string|Function} url url of the template to load, or a function
|
|
63
63
|
* that returns a url.
|
|
64
64
|
* @param {Object} params Parameters to pass to the url function.
|
|
65
|
-
* @return {
|
|
66
|
-
* for that string.
|
|
65
|
+
* @return {Promise<string>}
|
|
67
66
|
*/
|
|
68
|
-
fromUrl(url: string | Function, params: any):
|
|
67
|
+
fromUrl(url: string | Function, params: any): Promise<string>;
|
|
69
68
|
/**
|
|
70
69
|
* Creates a template by invoking an injectable provider function.
|
|
71
70
|
*
|
|
@@ -12,15 +12,26 @@ export namespace RejectType {
|
|
|
12
12
|
export class Rejection {
|
|
13
13
|
/** Returns a Rejection due to transition superseded */
|
|
14
14
|
static superseded(detail: any, options: any): Rejection;
|
|
15
|
-
/** Returns a Rejection due to redirected transition
|
|
15
|
+
/** Returns a Rejection due to redirected transition
|
|
16
|
+
* @param {any} detail @returns {Rejection}
|
|
17
|
+
*/
|
|
16
18
|
static redirected(detail: any): Rejection;
|
|
17
|
-
/** Returns a Rejection due to invalid transition
|
|
19
|
+
/** Returns a Rejection due to invalid transition
|
|
20
|
+
* @param {any} detail @returns {Rejection}
|
|
21
|
+
*/
|
|
18
22
|
static invalid(detail: any): Rejection;
|
|
19
|
-
/** Returns a Rejection due to ignored transition
|
|
23
|
+
/** Returns a Rejection due to ignored transition
|
|
24
|
+
* @param {any} detail @returns {Rejection}
|
|
25
|
+
*/
|
|
20
26
|
static ignored(detail: any): Rejection;
|
|
21
|
-
/** Returns a Rejection due to aborted transition
|
|
27
|
+
/** Returns a Rejection due to aborted transition
|
|
28
|
+
* @param {any} detail @returns {Rejection}
|
|
29
|
+
*/
|
|
22
30
|
static aborted(detail: any): Rejection;
|
|
23
|
-
/** Returns a Rejection due to aborted transition
|
|
31
|
+
/** Returns a Rejection due to aborted transition
|
|
32
|
+
* @param detail
|
|
33
|
+
* @returns {Rejection}
|
|
34
|
+
*/
|
|
24
35
|
static errored(detail: any): Rejection;
|
|
25
36
|
/**
|
|
26
37
|
* Returns a Rejection
|
|
@@ -32,12 +43,24 @@ export class Rejection {
|
|
|
32
43
|
* @returns `detail` if it is already a `Rejection`, else returns an ERROR Rejection.
|
|
33
44
|
*/
|
|
34
45
|
static normalize(detail: any): any;
|
|
35
|
-
|
|
46
|
+
/**
|
|
47
|
+
* @param {number} type
|
|
48
|
+
* @param {string} message
|
|
49
|
+
* @param {any} detail
|
|
50
|
+
*/
|
|
51
|
+
constructor(type: number, message: string, detail: any);
|
|
52
|
+
/** @type {number} */
|
|
36
53
|
$id: number;
|
|
37
|
-
type:
|
|
38
|
-
message:
|
|
54
|
+
type: number;
|
|
55
|
+
message: string;
|
|
39
56
|
detail: any;
|
|
40
57
|
redirected: boolean;
|
|
58
|
+
/** @returns {string} */
|
|
41
59
|
toString(): string;
|
|
42
|
-
|
|
60
|
+
/**
|
|
61
|
+
* @returns {Promise<any> & {_transitionRejection: Rejection}}
|
|
62
|
+
*/
|
|
63
|
+
toPromise(): Promise<any> & {
|
|
64
|
+
_transitionRejection: Rejection;
|
|
65
|
+
};
|
|
43
66
|
}
|
|
@@ -10,7 +10,7 @@ export class TransitionEventType {
|
|
|
10
10
|
criteriaMatchPath: any,
|
|
11
11
|
reverseSort?: boolean,
|
|
12
12
|
getResultHandler?: (hook: any) => (result: any) => any,
|
|
13
|
-
getErrorHandler?: () => (error: any) =>
|
|
13
|
+
getErrorHandler?: () => (error: any) => Promise<never>,
|
|
14
14
|
synchronous?: boolean,
|
|
15
15
|
);
|
|
16
16
|
name: any;
|
|
@@ -19,6 +19,6 @@ export class TransitionEventType {
|
|
|
19
19
|
criteriaMatchPath: any;
|
|
20
20
|
reverseSort: boolean;
|
|
21
21
|
getResultHandler: (hook: any) => (result: any) => any;
|
|
22
|
-
getErrorHandler: () => (error: any) =>
|
|
22
|
+
getErrorHandler: () => (error: any) => Promise<never>;
|
|
23
23
|
synchronous: boolean;
|
|
24
24
|
}
|
|
@@ -92,7 +92,9 @@ export class TransitionHook {
|
|
|
92
92
|
* Return a Rejection promise if the transition is no longer current due
|
|
93
93
|
* a new transition has started and superseded this one.
|
|
94
94
|
*/
|
|
95
|
-
getNotCurrentRejection(): any
|
|
95
|
+
getNotCurrentRejection(): Promise<any> & {
|
|
96
|
+
_transitionRejection: Rejection;
|
|
97
|
+
};
|
|
96
98
|
toString(): string;
|
|
97
99
|
}
|
|
98
100
|
export namespace TransitionHook {
|
|
@@ -111,6 +113,7 @@ export namespace TransitionHook {
|
|
|
111
113
|
* Each HookType chooses a GetErrorHandler (See: [[TransitionService._defineCoreEvents]])
|
|
112
114
|
*/
|
|
113
115
|
function LOG_ERROR(hook: any): (error: any) => any;
|
|
114
|
-
function REJECT_ERROR(): (error: any) =>
|
|
116
|
+
function REJECT_ERROR(): (error: any) => Promise<never>;
|
|
115
117
|
function THROW_ERROR(): (error: any) => never;
|
|
116
118
|
}
|
|
119
|
+
import { Rejection } from "./reject-factory.js";
|
|
@@ -43,7 +43,7 @@ export class TransitionProvider {
|
|
|
43
43
|
$view: import("../view/view.js").ViewService;
|
|
44
44
|
_deregisterHookFns: {};
|
|
45
45
|
/** @type {ng.ExceptionHandlerService} */
|
|
46
|
-
|
|
46
|
+
_exceptionHandler: ng.ExceptionHandlerService;
|
|
47
47
|
$get: (
|
|
48
48
|
| string
|
|
49
49
|
| ((
|
|
@@ -97,7 +97,7 @@ export class TransitionProvider {
|
|
|
97
97
|
criteriaMatchPath: any,
|
|
98
98
|
reverseSort?: boolean,
|
|
99
99
|
getResultHandler?: (hook: any) => (result: any) => any,
|
|
100
|
-
getErrorHandler?: () => (error: any) =>
|
|
100
|
+
getErrorHandler?: () => (error: any) => Promise<never>,
|
|
101
101
|
synchronous?: boolean,
|
|
102
102
|
): void;
|
|
103
103
|
/**
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*
|
|
6
6
|
* This object contains all contextual information about the to/from states, parameters, resolves.
|
|
7
7
|
* It has information about all states being entered and exited as a result of the transition.
|
|
8
|
-
* @
|
|
8
|
+
* @extends {HookRegistry}
|
|
9
9
|
*/
|
|
10
|
-
export class Transition
|
|
10
|
+
export class Transition {
|
|
11
11
|
/**
|
|
12
12
|
* Creates a new Transition object.
|
|
13
13
|
*
|
|
@@ -51,15 +51,15 @@ export class ViewService {
|
|
|
51
51
|
/**
|
|
52
52
|
* Returns the list of views currently available on the page, by fully-qualified name.
|
|
53
53
|
*
|
|
54
|
-
* @return {Array} Returns an array of fully-qualified view names.
|
|
54
|
+
* @return {Array<any>} Returns an array of fully-qualified view names.
|
|
55
55
|
*/
|
|
56
|
-
available(): any
|
|
56
|
+
available(): Array<any>;
|
|
57
57
|
/**
|
|
58
58
|
* Returns the list of views on the page containing loaded content.
|
|
59
59
|
*
|
|
60
|
-
* @return {Array} Returns an array of fully-qualified view names.
|
|
60
|
+
* @return {Array<any>} Returns an array of fully-qualified view names.
|
|
61
61
|
*/
|
|
62
|
-
active(): any
|
|
62
|
+
active(): Array<any>;
|
|
63
63
|
}
|
|
64
64
|
export namespace ViewService {
|
|
65
65
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Configurable provider for an injectable event bus
|
|
3
|
-
* @
|
|
3
|
+
* @extends {ng.ServiceProvider}
|
|
4
4
|
*/
|
|
5
|
-
export class PubSubProvider
|
|
5
|
+
export class PubSubProvider {
|
|
6
6
|
static $inject: string[];
|
|
7
7
|
/**
|
|
8
8
|
* @param {ng.ExceptionHandlerProvider} $exceptionHandler
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
export interface SCEService {
|
|
2
|
+
HTML: string;
|
|
3
|
+
CSS: string;
|
|
4
|
+
JS: string;
|
|
5
|
+
URL: string;
|
|
6
|
+
RESOURCE_URL: string;
|
|
7
|
+
MEDIA_URL: string;
|
|
2
8
|
getTrusted(type: string, mayBeTrusted: any): any;
|
|
3
9
|
getTrustedCss(value: any): any;
|
|
4
10
|
getTrustedHtml(value: any): any;
|
|
5
11
|
getTrustedJs(value: any): any;
|
|
6
12
|
getTrustedResourceUrl(value: any): any;
|
|
7
13
|
getTrustedUrl(value: any): any;
|
|
14
|
+
getTrustedMediaUrl(value: any): any;
|
|
8
15
|
parse(type: string, expression: string): (context: any, locals: any) => any;
|
|
9
16
|
parseAsCss(expression: string): (context: any, locals: any) => any;
|
|
10
17
|
parseAsHtml(expression: string): (context: any, locals: any) => any;
|
|
@@ -17,6 +24,7 @@ export interface SCEService {
|
|
|
17
24
|
trustAsResourceUrl(value: any): any;
|
|
18
25
|
trustAsUrl(value: any): any;
|
|
19
26
|
isEnabled(): boolean;
|
|
27
|
+
valueOf(value?: any): any;
|
|
20
28
|
}
|
|
21
29
|
export interface SCEDelegateService {
|
|
22
30
|
getTrusted(type: string, mayBeTrusted: any): any;
|
|
@@ -14,7 +14,7 @@ export class SceProvider {
|
|
|
14
14
|
* @param {boolean=} value If provided, then enables/disables SCE application-wide.
|
|
15
15
|
* @return {boolean} True if SCE is enabled, false otherwise.
|
|
16
16
|
*
|
|
17
|
-
*
|
|
17
|
+
*
|
|
18
18
|
* Enables/disables SCE and returns the current value.
|
|
19
19
|
*/
|
|
20
20
|
enabled: (value?: boolean | undefined, ...args: any[]) => boolean;
|
|
@@ -115,9 +115,9 @@ export class SceDelegateProvider {
|
|
|
115
115
|
* Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items
|
|
116
116
|
* allowed in this array.
|
|
117
117
|
*
|
|
118
|
-
* @return {Array} The currently set trusted resource URL array.
|
|
118
|
+
* @return {Array<any>} The currently set trusted resource URL array.
|
|
119
|
+
*
|
|
119
120
|
*
|
|
120
|
-
* @description
|
|
121
121
|
* Sets/Gets the list trusted of resource URLs.
|
|
122
122
|
*
|
|
123
123
|
* The **default value** when no `trustedResourceUrlList` has been explicitly set is `['self']`
|
|
@@ -128,7 +128,10 @@ export class SceDelegateProvider {
|
|
|
128
128
|
* its origin with other apps! It is a good idea to limit it to only your application's directory.
|
|
129
129
|
* </div>
|
|
130
130
|
*/
|
|
131
|
-
trustedResourceUrlList: (
|
|
131
|
+
trustedResourceUrlList: (
|
|
132
|
+
value?: any[] | undefined,
|
|
133
|
+
...args: any[]
|
|
134
|
+
) => Array<any>;
|
|
132
135
|
/**
|
|
133
136
|
*
|
|
134
137
|
* @param {Array=} bannedResourceUrlList When provided, replaces the `bannedResourceUrlList` with
|
|
@@ -143,15 +146,15 @@ export class SceDelegateProvider {
|
|
|
143
146
|
* Finally, **the banned resource URL list overrides the trusted resource URL list** and has
|
|
144
147
|
* the final say.
|
|
145
148
|
*
|
|
146
|
-
* @return {Array} The currently set `bannedResourceUrlList` array.
|
|
149
|
+
* @return {Array<any>} The currently set `bannedResourceUrlList` array.
|
|
150
|
+
*
|
|
147
151
|
*
|
|
148
|
-
* @description
|
|
149
152
|
* Sets/Gets the `bannedResourceUrlList` of trusted resource URLs.
|
|
150
153
|
*
|
|
151
154
|
* The **default value** when no trusted resource URL list has been explicitly set is the empty
|
|
152
155
|
* array (i.e. there is no `bannedResourceUrlList`.)
|
|
153
156
|
*/
|
|
154
|
-
bannedResourceUrlList: (value: any, ...args: any[]) => any
|
|
157
|
+
bannedResourceUrlList: (value: any, ...args: any[]) => Array<any>;
|
|
155
158
|
$get: (
|
|
156
159
|
| string
|
|
157
160
|
| ((
|
|
@@ -1,29 +1,14 @@
|
|
|
1
|
+
import { StreamConnectionConfig } from "../stream/interface.ts";
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
+
* SSE-specific configuration
|
|
3
4
|
*/
|
|
4
|
-
export interface SseConfig {
|
|
5
|
+
export interface SseConfig extends StreamConnectionConfig {
|
|
5
6
|
/** Include cookies/credentials when connecting */
|
|
6
7
|
withCredentials?: boolean;
|
|
7
|
-
/** Custom headers (Note: EventSource doesn't natively support headers; handled at app level if needed) */
|
|
8
|
-
headers?: Record<string, string>;
|
|
9
|
-
/** Called when the connection is successfully opened */
|
|
10
|
-
onOpen?: (event: Event) => void;
|
|
11
|
-
/** Called when a message event is received */
|
|
12
|
-
onMessage?: (data: any, event: MessageEvent) => void;
|
|
13
|
-
/** Called on connection error */
|
|
14
|
-
onError?: (err: Event) => void;
|
|
15
|
-
/** Transform raw SSE message data (default: JSON.parse if possible) */
|
|
16
|
-
transformMessage?: (data: string) => any;
|
|
17
8
|
/** Optional query parameters appended to the URL */
|
|
18
9
|
params?: Record<string, any>;
|
|
19
|
-
/**
|
|
20
|
-
|
|
21
|
-
/** Delay in milliseconds before attempting to reconnect (default: 1000ms) */
|
|
22
|
-
retryDelay?: number;
|
|
23
|
-
/** Maximum number of reconnect attempts (default: Infinity) */
|
|
24
|
-
maxRetries?: number;
|
|
25
|
-
/** Heartbeat timeout in milliseconds; reconnect if no message within this time */
|
|
26
|
-
heartbeatTimeout?: number;
|
|
10
|
+
/** Custom headers (EventSource doesn't natively support headers) */
|
|
11
|
+
headers?: Record<string, string>;
|
|
27
12
|
}
|
|
28
13
|
/**
|
|
29
14
|
* Managed SSE connection object returned by $sse.
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @param {Record<PropertyKey, any>} target - The object to wrap
|
|
6
6
|
* @param {string} key - The storage key
|
|
7
|
-
* @param {import("../../core/di/
|
|
7
|
+
* @param {import("../../core/di/interface.ts").StorageLike & import("../../core/di/interface").PersistentStoreConfig} storage - Any storage-like object with getItem/setItem/removeItem
|
|
8
8
|
* @param {{serialize?: function, deserialize?: function}} [options] - Optional custom (de)serialization
|
|
9
9
|
* @returns {Record<PropertyKey, any>}
|
|
10
10
|
*/
|
|
11
11
|
export function createPersistentProxy(
|
|
12
12
|
target: Record<PropertyKey, any>,
|
|
13
13
|
key: string,
|
|
14
|
-
storage:
|
|
14
|
+
storage: import("../../core/di/interface.ts").StorageLike & any,
|
|
15
15
|
options?: {
|
|
16
16
|
serialize?: Function;
|
|
17
17
|
deserialize?: Function;
|