@angular-wave/angular.ts 0.14.3 → 0.15.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/angular.d.ts +27 -25
- package/@types/animations/animate-cache.d.ts +46 -2
- package/@types/animations/animate-children-directive.d.ts +4 -4
- package/@types/animations/animate-js.d.ts +1 -10
- package/@types/animations/animate.d.ts +6 -1
- package/@types/animations/interface.d.ts +15 -0
- package/@types/animations/runner/animate-runner.d.ts +73 -52
- package/@types/animations/shared.d.ts +0 -16
- package/@types/core/compile/attributes.d.ts +40 -10
- package/@types/core/compile/compile.d.ts +1 -1
- package/@types/core/compile/inteface.d.ts +5 -1
- package/@types/core/controller/controller.d.ts +1 -1
- package/@types/core/di/inteface.d.ts +11 -0
- package/@types/core/interpolate/interface.d.ts +1 -0
- package/@types/core/parse/ast/ast-node.d.ts +2 -0
- package/@types/core/parse/interface.d.ts +1 -1
- package/@types/core/parse/interpreter.d.ts +5 -3
- package/@types/core/parse/parse.d.ts +4 -1
- package/@types/core/scope/interface.d.ts +26 -0
- package/@types/core/scope/scope.d.ts +13 -13
- package/@types/directive/attrs/attrs.d.ts +2 -5
- package/@types/directive/bind/bind.d.ts +5 -7
- package/@types/directive/class/class.d.ts +3 -3
- package/@types/directive/controller/controller.d.ts +2 -2
- package/@types/directive/form/form.d.ts +16 -13
- package/@types/directive/include/include.d.ts +4 -4
- package/@types/directive/init/init.d.ts +2 -2
- package/@types/directive/input/input.d.ts +16 -0
- package/@types/directive/listener/listener.d.ts +4 -0
- package/@types/directive/messages/messages.d.ts +9 -8
- package/@types/directive/model/interface.d.ts +18 -0
- package/@types/directive/model/model.d.ts +25 -23
- package/@types/directive/non-bindable/non-bindable.d.ts +2 -2
- package/@types/directive/ref/ref.d.ts +5 -8
- package/@types/directive/repeat/repeat.d.ts +2 -4
- package/@types/directive/script/script.d.ts +2 -2
- package/@types/directive/select/select.d.ts +9 -10
- package/@types/directive/setter/setter.d.ts +2 -2
- package/@types/directive/show-hide/show-hide.d.ts +2 -4
- package/@types/directive/switch/switch.d.ts +4 -4
- package/@types/directive/validators/validators.d.ts +2 -2
- package/@types/injection-tokens.d.ts +3 -2
- package/@types/interface.d.ts +72 -23
- package/@types/namespace.d.ts +50 -6
- package/@types/router/directives/state-directives.d.ts +26 -24
- package/@types/router/directives/view-directive.d.ts +27 -131
- package/@types/router/glob/glob.d.ts +2 -6
- package/@types/router/router.d.ts +6 -4
- package/@types/router/scroll/interface.d.ts +3 -0
- package/@types/router/scroll/view-scroll.d.ts +8 -0
- package/@types/router/state/interface.d.ts +30 -126
- package/@types/router/state/state-builder.d.ts +14 -7
- package/@types/router/state/state-matcher.d.ts +11 -3
- package/@types/router/state/state-object.d.ts +5 -7
- package/@types/router/state/state-queue-manager.d.ts +14 -8
- package/@types/router/state/state-registry.d.ts +26 -12
- package/@types/router/state/state-service.d.ts +24 -12
- package/@types/router/template-factory.d.ts +2 -2
- package/@types/router/transition/hook-registry.d.ts +15 -5
- package/@types/router/transition/interface.d.ts +9 -9
- package/@types/router/transition/transition-hook.d.ts +11 -0
- package/@types/router/transition/transition-service.d.ts +12 -5
- package/@types/router/transition/transition.d.ts +20 -14
- package/@types/router/url/url-rule.d.ts +12 -9
- package/@types/router/url/url-rules.d.ts +3 -84
- package/@types/router/url/url-service.d.ts +23 -18
- package/@types/router/view/view.d.ts +4 -4
- package/@types/services/anchor-scroll/anchor-scroll.d.ts +2 -17
- package/@types/services/anchor-scroll/interface.d.ts +15 -0
- package/@types/services/cookie/cookie.d.ts +7 -13
- package/@types/services/exception/interface.d.ts +3 -3
- package/@types/services/http/http.d.ts +6 -31
- package/@types/services/http/interface.d.ts +22 -0
- package/@types/services/location/location.d.ts +14 -13
- package/@types/services/log/log.d.ts +7 -3
- package/@types/services/pubsub/pubsub.d.ts +18 -13
- package/@types/services/rest/rest.d.ts +7 -5
- package/@types/services/sce/interface.d.ts +25 -0
- package/@types/services/sce/sce.d.ts +9 -1
- package/@types/services/sse/interface.d.ts +8 -1
- package/@types/services/sse/sse.d.ts +10 -18
- package/@types/services/storage/storage.d.ts +6 -6
- package/@types/services/stream/interface.d.ts +1 -1
- package/@types/services/stream/stream.d.ts +98 -0
- package/@types/shared/common.d.ts +2 -2
- package/@types/shared/dom.d.ts +21 -42
- package/@types/shared/hof.d.ts +27 -37
- package/@types/shared/noderef.d.ts +3 -3
- package/@types/shared/strings.d.ts +31 -10
- package/@types/shared/utils.d.ts +207 -101
- package/@types/shared/validate.d.ts +20 -0
- package/dist/angular-ts.esm.js +2461 -2298
- package/dist/angular-ts.umd.js +2461 -2298
- 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/router/state-filters.d.ts +0 -39
- package/@types/router/view-scroll.d.ts +0 -12
- package/@types/shared/cache.d.ts +0 -7
package/@types/interface.d.ts
CHANGED
|
@@ -1,25 +1,56 @@
|
|
|
1
|
-
export * from "./animations/interface.ts";
|
|
2
|
-
export * from "./services/http/interface.ts";
|
|
3
|
-
export * from "./services/log/interface.ts";
|
|
4
|
-
export * from "./services/log/log.js";
|
|
5
|
-
export * from "./services/location/interface.ts";
|
|
6
|
-
export * from "./services/location/location.js";
|
|
7
|
-
export * from "./services/pubsub/pubsub.js";
|
|
8
|
-
export * from "./services/template-cache/template-cache.js";
|
|
9
|
-
export * from "./index.js";
|
|
10
|
-
export * from "./angular.js";
|
|
11
|
-
export * from "./core/di/internal-injector.js";
|
|
12
|
-
export * from "./core/scope/scope.js";
|
|
13
|
-
export * from "./services/cookie/cookie.js";
|
|
14
|
-
export * from "./services/cookie/interface.ts";
|
|
15
|
-
export * from "./services/exception/exception.ts";
|
|
16
|
-
export * from "./services/exception/interface.ts";
|
|
17
|
-
export * from "./core/parse/interface.ts";
|
|
18
|
-
export * from "./filters/interface.ts";
|
|
19
|
-
export * from "./core/filter/filter.js";
|
|
20
1
|
import { Attributes } from "./core/compile/attributes.js";
|
|
21
2
|
import { Scope } from "./core/scope/scope.js";
|
|
22
3
|
import { NgModelController } from "./directive/model/model.js";
|
|
4
|
+
export interface Constructor<T = any> {
|
|
5
|
+
new (...args: any[]): T;
|
|
6
|
+
}
|
|
7
|
+
export declare const PublicInjectionTokens: {
|
|
8
|
+
readonly $angular: "$angular";
|
|
9
|
+
readonly $attrs: "$attrs";
|
|
10
|
+
readonly $scope: "$scope";
|
|
11
|
+
readonly $element: "$element";
|
|
12
|
+
readonly $anchorScroll: "$anchorScroll";
|
|
13
|
+
readonly $animate: "$animate";
|
|
14
|
+
readonly $animateCss: "$animateCss";
|
|
15
|
+
readonly $aria: "$aria";
|
|
16
|
+
readonly $compile: "$compile";
|
|
17
|
+
readonly $cookie: "$cookie";
|
|
18
|
+
readonly $controller: "$controller";
|
|
19
|
+
readonly $document: "$document";
|
|
20
|
+
readonly $eventBus: "$eventBus";
|
|
21
|
+
readonly $exceptionHandler: "$exceptionHandler";
|
|
22
|
+
readonly $filter: "$filter";
|
|
23
|
+
readonly $http: "$http";
|
|
24
|
+
readonly $httpParamSerializer: "$httpParamSerializer";
|
|
25
|
+
readonly $interpolate: "$interpolate";
|
|
26
|
+
readonly $location: "$location";
|
|
27
|
+
readonly $log: "$log";
|
|
28
|
+
readonly $viewScroll: "$viewScroll";
|
|
29
|
+
readonly $parse: "$parse";
|
|
30
|
+
readonly $rest: "$rest";
|
|
31
|
+
readonly $rootScope: "$rootScope";
|
|
32
|
+
readonly $rootElement: "$rootElement";
|
|
33
|
+
readonly $router: "$router";
|
|
34
|
+
readonly $sce: "$sce";
|
|
35
|
+
readonly $sceDelegate: "$sceDelegate";
|
|
36
|
+
readonly $state: "$state";
|
|
37
|
+
readonly $stateRegistry: "$stateRegistry";
|
|
38
|
+
readonly $sse: "$sse";
|
|
39
|
+
readonly $templateCache: "$templateCache";
|
|
40
|
+
readonly $templateFactory: "$templateFactory";
|
|
41
|
+
readonly $templateRequest: "$templateRequest";
|
|
42
|
+
readonly $transitions: "$transitions";
|
|
43
|
+
readonly $urlConfig: "$urlConfig";
|
|
44
|
+
readonly $url: "$url";
|
|
45
|
+
readonly $view: "$view";
|
|
46
|
+
readonly $window: "$window";
|
|
47
|
+
readonly $provide: "$provide";
|
|
48
|
+
readonly $injector: "$injector";
|
|
49
|
+
readonly $compileProvider: "$compileProvider";
|
|
50
|
+
readonly $animateProvider: "$animateProvider";
|
|
51
|
+
readonly $filterProvider: "$filterProvider";
|
|
52
|
+
readonly $controllerProvider: "$controllerProvider";
|
|
53
|
+
};
|
|
23
54
|
/**
|
|
24
55
|
* Configuration options for the AngularTS bootstrap process.
|
|
25
56
|
*
|
|
@@ -348,9 +379,9 @@ export interface DirectivePrePost {
|
|
|
348
379
|
* A link function executed during directive linking.
|
|
349
380
|
*/
|
|
350
381
|
export type DirectiveLinkFn<T> = (
|
|
351
|
-
scope: Scope,
|
|
382
|
+
scope: ng.Scope,
|
|
352
383
|
element: HTMLElement,
|
|
353
|
-
attrs: Attributes
|
|
384
|
+
attrs: ng.Attributes,
|
|
354
385
|
controller?: TController<T>,
|
|
355
386
|
transclude?: (...args: any[]) => any,
|
|
356
387
|
) => void;
|
|
@@ -358,8 +389,8 @@ export type DirectiveLinkFn<T> = (
|
|
|
358
389
|
* A compile function used to prepare directives before linking.
|
|
359
390
|
*/
|
|
360
391
|
export type DirectiveCompileFn = (
|
|
361
|
-
templateElement
|
|
362
|
-
templateAttributes
|
|
392
|
+
templateElement: HTMLElement,
|
|
393
|
+
templateAttributes: Attributes & Record<string, any>,
|
|
363
394
|
transclude?: (...args: any[]) => any,
|
|
364
395
|
) => void | DirectiveLinkFn<any> | DirectivePrePost;
|
|
365
396
|
/**
|
|
@@ -434,6 +465,24 @@ export type CloneAttachFunction = (
|
|
|
434
465
|
clonedElement?: Element,
|
|
435
466
|
scope?: Scope,
|
|
436
467
|
) => any;
|
|
468
|
+
export interface TemplateLinkingFunction {
|
|
469
|
+
(
|
|
470
|
+
scope: ng.Scope,
|
|
471
|
+
cloneAttachFn?: CloneAttachFunction,
|
|
472
|
+
options?: TemplateLinkingFunctionOptions,
|
|
473
|
+
): Element;
|
|
474
|
+
}
|
|
475
|
+
export interface TemplateLinkingFunctionOptions {
|
|
476
|
+
parentBoundTranscludeFn?: TranscludeFunctionObject | undefined;
|
|
477
|
+
transcludeControllers?:
|
|
478
|
+
| {
|
|
479
|
+
[controller: string]: {
|
|
480
|
+
instance: Controller;
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
| undefined;
|
|
484
|
+
futureParentElement?: Element | undefined;
|
|
485
|
+
}
|
|
437
486
|
/**
|
|
438
487
|
* Configuration for ngModel behavior.
|
|
439
488
|
*/
|
package/@types/namespace.d.ts
CHANGED
|
@@ -5,15 +5,19 @@ import { Scope as TScope } from "./core/scope/scope.js";
|
|
|
5
5
|
import {
|
|
6
6
|
ListenerFn as TListenerFn,
|
|
7
7
|
Listener as TListener,
|
|
8
|
+
ScopeEvent as TScopeEvent,
|
|
8
9
|
} from "./core/scope/interface.ts";
|
|
9
10
|
import { NgModule as TNgModule } from "./core/di/ng-module/ng-module.js";
|
|
10
11
|
import { InjectorService as TInjectorService } from "./core/di/internal-injector.js";
|
|
12
|
+
import { AnchorScrollProvider as TAnchorScrollProvider } from "./services/anchor-scroll/anchor-scroll.js";
|
|
11
13
|
import {
|
|
12
|
-
|
|
14
|
+
AnchorScrollFunction as TAnchorScrollFunction,
|
|
13
15
|
AnchorScrollService as TAnchorScrollService,
|
|
14
|
-
|
|
16
|
+
AnchorScrollObject as TAnchorScrollObject,
|
|
17
|
+
} from "./services/anchor-scroll/interface.ts";
|
|
15
18
|
import { ControllerService as TControllerService } from "./core/controller/interface.ts";
|
|
16
19
|
import { ExceptionHandler as TExceptionHandler } from "./services/exception/interface.ts";
|
|
20
|
+
import { ExceptionHandlerProvider as TExceptionHandlerProvider } from "./services/exception/exception.js";
|
|
17
21
|
import { ParseService as TParseService } from "./core/parse/interface.ts";
|
|
18
22
|
import { TemplateRequestService as TTemplateRequestService } from "./services/template-request/interface.ts";
|
|
19
23
|
import { HttpParamSerializer as THttpParamSerializer } from "./services/http/interface.ts";
|
|
@@ -46,6 +50,7 @@ import {
|
|
|
46
50
|
ControllerConstructor as TControllerConstructor,
|
|
47
51
|
Injectable as TInjectable,
|
|
48
52
|
Expression as TExpression,
|
|
53
|
+
PublicInjectionTokens,
|
|
49
54
|
} from "./interface.ts";
|
|
50
55
|
import {
|
|
51
56
|
SseService as TSseService,
|
|
@@ -89,6 +94,24 @@ import {
|
|
|
89
94
|
import { RestService as TRestService } from "./services/rest/rest.js";
|
|
90
95
|
import { ServiceProvider as TServiceProvider } from "./interface.ts";
|
|
91
96
|
import { NgModelController as TNgModelController } from "./directive/model/model.js";
|
|
97
|
+
import { RouterProvider as TRouterProvider } from "./router/router.ts";
|
|
98
|
+
import { TransitionProvider as TTransitionProvider } from "./router/transition/transition-service.js";
|
|
99
|
+
import { AnimateProvider as TAnimateProvider } from "./animations/animate.js";
|
|
100
|
+
import { UrlService as TUrlService } from "./router/url/url-service.js";
|
|
101
|
+
import { LocationProvider as TLocationProvider } from "./services/location/location.js";
|
|
102
|
+
import { ViewService as TViewService } from "./router/view/view.js";
|
|
103
|
+
import {
|
|
104
|
+
BuiltStateDeclaration as TBuiltStateDeclaration,
|
|
105
|
+
StateDeclaration as TStateDeclaration,
|
|
106
|
+
} from "./router/state/interface.ts";
|
|
107
|
+
import { StateObject as TStateObject } from "./router/state/state-object.js";
|
|
108
|
+
import { StateRegistryProvider as TStateRegistryProvider } from "./router/state/state-registry.js";
|
|
109
|
+
import { ViewScrollService as TViewScrollService } from "./router/scroll/interface.ts";
|
|
110
|
+
import { HookRegistry } from "./router/transition/interface.ts";
|
|
111
|
+
import {
|
|
112
|
+
SCEService as TSCEService,
|
|
113
|
+
SCEDelegateService as TSCEDelegateService,
|
|
114
|
+
} from "./services/sce/interface.ts";
|
|
92
115
|
declare global {
|
|
93
116
|
interface Function {
|
|
94
117
|
$inject?: readonly string[] | undefined;
|
|
@@ -98,9 +121,9 @@ declare global {
|
|
|
98
121
|
}
|
|
99
122
|
export namespace ng {
|
|
100
123
|
type Angular = TAngular;
|
|
101
|
-
type Attributes = TAttributes & Record<string,
|
|
124
|
+
type Attributes = TAttributes & Record<string, string>;
|
|
102
125
|
type Directive<TController = any> = TDirective<TController>;
|
|
103
|
-
type DirectiveFactory = TDirectiveFactory
|
|
126
|
+
type DirectiveFactory = TDirectiveFactory;
|
|
104
127
|
type AnnotatedDirectiveFactory = TAnnotatedDirectiveFactory;
|
|
105
128
|
type Component = TComponent & Record<string, any>;
|
|
106
129
|
type Controller = TController;
|
|
@@ -115,11 +138,16 @@ declare global {
|
|
|
115
138
|
type BoundTranscludeFn = TBoundTranscludeFn;
|
|
116
139
|
type LinkFnMapping = TLinkFnMapping;
|
|
117
140
|
type AnchorScrollProvider = TAnchorScrollProvider;
|
|
118
|
-
type
|
|
141
|
+
type AnimateProvider = TAnimateProvider;
|
|
142
|
+
type FilterProvider = TFilterProvider;
|
|
143
|
+
type ExceptionHandlerProvider = TExceptionHandlerProvider;
|
|
119
144
|
type HttpParamSerializerProvider = THttpParamSerializerProvider;
|
|
145
|
+
type InterpolateProvider = TInterpolateProvider;
|
|
146
|
+
type LocationProvider = TLocationProvider;
|
|
120
147
|
type SceProvider = TSceProvider;
|
|
121
148
|
type SceDelegateProvider = TSceDelegateProvider;
|
|
122
|
-
type
|
|
149
|
+
type TransitionProvider = TTransitionProvider;
|
|
150
|
+
type RouterProvider = TRouterProvider;
|
|
123
151
|
type AnchorScrollService = TAnchorScrollService;
|
|
124
152
|
type AnimateService = TAnimateService;
|
|
125
153
|
type CompileService = TCompileFn;
|
|
@@ -140,16 +168,25 @@ declare global {
|
|
|
140
168
|
type PubSubService = TPubSub;
|
|
141
169
|
type RootElementService = Element;
|
|
142
170
|
type RootScopeService = TScope & Record<string, any>;
|
|
171
|
+
type RouterService = TRouterProvider;
|
|
143
172
|
type StateService = TStateProvider;
|
|
173
|
+
type StateRegistryService = TStateRegistryProvider;
|
|
174
|
+
type SCEService = TSCEService;
|
|
175
|
+
type SCEDelegateService = TSCEDelegateService;
|
|
144
176
|
type SseService = TSseService;
|
|
145
177
|
type SseConfig = TSseConfig;
|
|
178
|
+
type TransitionService = TransitionProvider & HookRegistry;
|
|
146
179
|
type TemplateCacheService = Map<string, string>;
|
|
147
180
|
type TemplateRequestService = TTemplateRequestService;
|
|
181
|
+
type UrlService = TUrlService;
|
|
182
|
+
type ViewService = TViewService;
|
|
183
|
+
type ViewScrollService = TViewScrollService;
|
|
148
184
|
type ErrorHandlingConfig = TErrorHandlingConfig;
|
|
149
185
|
type ListenerFn = TListenerFn;
|
|
150
186
|
type Listener = TListener;
|
|
151
187
|
type DocumentService = Document;
|
|
152
188
|
type WindowService = Window;
|
|
189
|
+
type AngularService = Angular;
|
|
153
190
|
type WorkerConfig = TWorkerConfig;
|
|
154
191
|
type WorkerConnection = TWorkerConnection;
|
|
155
192
|
type Injectable<
|
|
@@ -170,5 +207,12 @@ declare global {
|
|
|
170
207
|
type Expression = TExpression;
|
|
171
208
|
type NgModelController = TNgModelController;
|
|
172
209
|
type Validator = TValidator;
|
|
210
|
+
type StateDeclaration = TStateDeclaration;
|
|
211
|
+
type BuiltStateDeclaration = TBuiltStateDeclaration;
|
|
212
|
+
type StateObject = TStateObject;
|
|
213
|
+
type AnchorScrollFunction = TAnchorScrollFunction;
|
|
214
|
+
type AnchorScrollObject = TAnchorScrollObject;
|
|
215
|
+
type InjectionTokens = typeof PublicInjectionTokens;
|
|
216
|
+
type ScopeEvent = TScopeEvent;
|
|
173
217
|
}
|
|
174
218
|
}
|
|
@@ -1,45 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {ng.StateService} $stateService
|
|
3
|
+
* @param {ng.StateRegistryService} $stateRegistry
|
|
4
|
+
* @param {ng.TransitionService} $transitions
|
|
5
|
+
* @returns {ng.Directive}
|
|
6
|
+
*/
|
|
1
7
|
export function $StateRefDirective(
|
|
2
|
-
$stateService:
|
|
3
|
-
$stateRegistry:
|
|
4
|
-
$transitions:
|
|
5
|
-
):
|
|
6
|
-
restrict: string;
|
|
7
|
-
require: string[];
|
|
8
|
-
link: (scope: any, element: any, attrs: any, ngSrefActive: any) => void;
|
|
9
|
-
};
|
|
8
|
+
$stateService: ng.StateService,
|
|
9
|
+
$stateRegistry: ng.StateRegistryService,
|
|
10
|
+
$transitions: ng.TransitionService,
|
|
11
|
+
): ng.Directive;
|
|
10
12
|
export namespace $StateRefDirective {
|
|
11
13
|
let $inject: string[];
|
|
12
14
|
}
|
|
13
15
|
/**
|
|
14
|
-
* @param $state
|
|
15
|
-
* @param $stateRegistry
|
|
16
|
-
* @param $transitions
|
|
17
|
-
* @returns {
|
|
16
|
+
* @param {ng.StateService} $state
|
|
17
|
+
* @param {ng.StateRegistryService} $stateRegistry
|
|
18
|
+
* @param {ng.TransitionService} $transitions
|
|
19
|
+
* @returns {ng.Directive}
|
|
18
20
|
*/
|
|
19
21
|
export function $StateRefDynamicDirective(
|
|
20
|
-
$state:
|
|
21
|
-
$stateRegistry:
|
|
22
|
-
$transitions:
|
|
23
|
-
):
|
|
22
|
+
$state: ng.StateService,
|
|
23
|
+
$stateRegistry: ng.StateRegistryService,
|
|
24
|
+
$transitions: ng.TransitionService,
|
|
25
|
+
): ng.Directive;
|
|
24
26
|
export namespace $StateRefDynamicDirective {
|
|
25
27
|
let $inject_1: string[];
|
|
26
28
|
export { $inject_1 as $inject };
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
29
|
-
* @param {
|
|
30
|
-
* @param {
|
|
31
|
-
* @param {
|
|
31
|
+
* @param {ng.StateService} $state
|
|
32
|
+
* @param {ng.RouterService} $router
|
|
33
|
+
* @param {ng.InterpolateService} $interpolate
|
|
32
34
|
* @param {*} $stateRegistry
|
|
33
35
|
* @param {*} $transitions
|
|
34
|
-
* @returns {
|
|
36
|
+
* @returns {ng.Directive}
|
|
35
37
|
*/
|
|
36
38
|
export function $StateRefActiveDirective(
|
|
37
|
-
$state:
|
|
38
|
-
$router:
|
|
39
|
-
$interpolate:
|
|
39
|
+
$state: ng.StateService,
|
|
40
|
+
$router: ng.RouterService,
|
|
41
|
+
$interpolate: ng.InterpolateService,
|
|
40
42
|
$stateRegistry: any,
|
|
41
43
|
$transitions: any,
|
|
42
|
-
):
|
|
44
|
+
): ng.Directive;
|
|
43
45
|
export namespace $StateRefActiveDirective {
|
|
44
46
|
let $inject_2: string[];
|
|
45
47
|
export { $inject_2 as $inject };
|
|
@@ -1,138 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {ng.ViewService} $view
|
|
3
|
+
* @param {ng.AnimateService} $animate
|
|
4
|
+
* @param {ng.AnchorScrollService} $viewScroll
|
|
5
|
+
* @param {ng.InterpolateService} $interpolate
|
|
6
|
+
* @returns {ng.Directive}
|
|
7
|
+
*/
|
|
8
|
+
export function $ViewDirective(
|
|
9
|
+
$view: ng.ViewService,
|
|
10
|
+
$animate: ng.AnimateService,
|
|
11
|
+
$viewScroll: ng.AnchorScrollService,
|
|
12
|
+
$interpolate: ng.InterpolateService,
|
|
13
|
+
): ng.Directive;
|
|
14
|
+
export namespace $ViewDirective {
|
|
15
|
+
let $inject: string[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @param {ng.CompileService} $compile
|
|
19
|
+
* @param {ng.ControllerService} $controller
|
|
20
|
+
* @param {ng.TransitionService} $transitions
|
|
21
|
+
* @returns
|
|
22
|
+
*/
|
|
1
23
|
export function $ViewDirectiveFill(
|
|
2
|
-
$compile:
|
|
3
|
-
$controller:
|
|
4
|
-
$transitions:
|
|
24
|
+
$compile: ng.CompileService,
|
|
25
|
+
$controller: ng.ControllerService,
|
|
26
|
+
$transitions: ng.TransitionService,
|
|
5
27
|
): {
|
|
6
28
|
priority: number;
|
|
7
29
|
compile(tElement: any): (scope: any, $element: any) => void;
|
|
8
30
|
};
|
|
9
31
|
export namespace $ViewDirectiveFill {
|
|
10
|
-
let $
|
|
32
|
+
let $inject_1: string[];
|
|
33
|
+
export { $inject_1 as $inject };
|
|
11
34
|
}
|
|
12
|
-
/**
|
|
13
|
-
* `ng-view`: A viewport directive which is filled in by a view from the active state.
|
|
14
|
-
*
|
|
15
|
-
* ### Attributes
|
|
16
|
-
*
|
|
17
|
-
* - `name`: (Optional) A view name.
|
|
18
|
-
* The name should be unique amongst the other views in the same state.
|
|
19
|
-
* You can have views of the same name that live in different states.
|
|
20
|
-
* The ng-view can be targeted in a View using the name ([[StateDeclaration.views]]).
|
|
21
|
-
*
|
|
22
|
-
* - `autoscroll`: an expression. When it evaluates to true, the `ng-view` will be scrolled into view when it is activated.
|
|
23
|
-
* Uses [[$viewScroll]] to do the scrolling.
|
|
24
|
-
*
|
|
25
|
-
* - `onload`: Expression to evaluate whenever the view updates.
|
|
26
|
-
*
|
|
27
|
-
* #### Example:
|
|
28
|
-
* A view can be unnamed or named.
|
|
29
|
-
* ```html
|
|
30
|
-
* <!-- Unnamed -->
|
|
31
|
-
* <div ng-view></div>
|
|
32
|
-
*
|
|
33
|
-
* <!-- Named -->
|
|
34
|
-
* <div ng-view="viewName"></div>
|
|
35
|
-
*
|
|
36
|
-
* <!-- Named (different style) -->
|
|
37
|
-
* <ng-view name="viewName"></ng-view>
|
|
38
|
-
* ```
|
|
39
|
-
*
|
|
40
|
-
* You can only have one unnamed view within any template (or root html). If you are only using a
|
|
41
|
-
* single view and it is unnamed then you can populate it like so:
|
|
42
|
-
*
|
|
43
|
-
* ```html
|
|
44
|
-
* <div ng-view></div>
|
|
45
|
-
* $stateProvider.state("home", {
|
|
46
|
-
* template: "<h1>HELLO!</h1>"
|
|
47
|
-
* })
|
|
48
|
-
* ```
|
|
49
|
-
*
|
|
50
|
-
* The above is a convenient shortcut equivalent to specifying your view explicitly with the
|
|
51
|
-
* [[StateDeclaration.views]] config property, by name, in this case an empty name:
|
|
52
|
-
*
|
|
53
|
-
* ```js
|
|
54
|
-
* $stateProvider.state("home", {
|
|
55
|
-
* views: {
|
|
56
|
-
* "": {
|
|
57
|
-
* template: "<h1>HELLO!</h1>"
|
|
58
|
-
* }
|
|
59
|
-
* }
|
|
60
|
-
* })
|
|
61
|
-
* ```
|
|
62
|
-
*
|
|
63
|
-
* But typically you'll only use the views property if you name your view or have more than one view
|
|
64
|
-
* in the same template. There's not really a compelling reason to name a view if its the only one,
|
|
65
|
-
* but you could if you wanted, like so:
|
|
66
|
-
*
|
|
67
|
-
* ```html
|
|
68
|
-
* <div ng-view="main"></div>
|
|
69
|
-
* ```
|
|
70
|
-
*
|
|
71
|
-
* ```js
|
|
72
|
-
* $stateProvider.state("home", {
|
|
73
|
-
* views: {
|
|
74
|
-
* "main": {
|
|
75
|
-
* template: "<h1>HELLO!</h1>"
|
|
76
|
-
* }
|
|
77
|
-
* }
|
|
78
|
-
* })
|
|
79
|
-
* ```
|
|
80
|
-
*
|
|
81
|
-
* Really though, you'll use views to set up multiple views:
|
|
82
|
-
*
|
|
83
|
-
* ```html
|
|
84
|
-
* <div ng-view></div>
|
|
85
|
-
* <div ng-view="chart"></div>
|
|
86
|
-
* <div ng-view="data"></div>
|
|
87
|
-
* ```
|
|
88
|
-
*
|
|
89
|
-
* ```js
|
|
90
|
-
* $stateProvider.state("home", {
|
|
91
|
-
* views: {
|
|
92
|
-
* "": {
|
|
93
|
-
* template: "<h1>HELLO!</h1>"
|
|
94
|
-
* },
|
|
95
|
-
* "chart": {
|
|
96
|
-
* template: "<chart_thing/>"
|
|
97
|
-
* },
|
|
98
|
-
* "data": {
|
|
99
|
-
* template: "<data_thing/>"
|
|
100
|
-
* }
|
|
101
|
-
* }
|
|
102
|
-
* })
|
|
103
|
-
* ```
|
|
104
|
-
*
|
|
105
|
-
* #### Examples for `autoscroll`:
|
|
106
|
-
* ```html
|
|
107
|
-
* <!-- If autoscroll present with no expression,
|
|
108
|
-
* then scroll ng-view into view -->
|
|
109
|
-
* <ng-view autoscroll/>
|
|
110
|
-
*
|
|
111
|
-
* <!-- If autoscroll present with valid expression,
|
|
112
|
-
* then scroll ng-view into view if expression evaluates to true -->
|
|
113
|
-
* <ng-view autoscroll='true'/>
|
|
114
|
-
* <ng-view autoscroll='false'/>
|
|
115
|
-
* <ng-view autoscroll='scopeVariable'/>
|
|
116
|
-
* ```
|
|
117
|
-
*
|
|
118
|
-
* Resolve data:
|
|
119
|
-
*
|
|
120
|
-
* The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this
|
|
121
|
-
* can be customized using [[ViewDeclaration.resolveAs]]). This can be then accessed from the template.
|
|
122
|
-
*
|
|
123
|
-
* Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the
|
|
124
|
-
* controller is instantiated. The `$onInit()` hook can be used to perform initialization code which
|
|
125
|
-
* depends on `$resolve` data.
|
|
126
|
-
*
|
|
127
|
-
* #### Example:
|
|
128
|
-
* ```js
|
|
129
|
-
* $stateProvider.state('home', {
|
|
130
|
-
* template: '<my-component user="$resolve.user"></my-component>',
|
|
131
|
-
* resolve: {
|
|
132
|
-
* user: function(UserService) { return UserService.fetchUser(); }
|
|
133
|
-
* }
|
|
134
|
-
* });
|
|
135
|
-
* ```
|
|
136
|
-
*/
|
|
137
|
-
/** @type {import("../../interface.ts").AnnotatedDirectiveFactory} */
|
|
138
|
-
export const ngView: import("../../interface.ts").AnnotatedDirectiveFactory;
|
|
@@ -64,15 +64,11 @@ export class Glob {
|
|
|
64
64
|
/**
|
|
65
65
|
* @type {string}
|
|
66
66
|
*/
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* @type {string[]}
|
|
70
|
-
*/
|
|
71
|
-
glob: string[];
|
|
67
|
+
_text: string;
|
|
72
68
|
/**
|
|
73
69
|
* @type {RegExp}
|
|
74
70
|
*/
|
|
75
|
-
|
|
71
|
+
_regexp: RegExp;
|
|
76
72
|
/**
|
|
77
73
|
* @param {string} name
|
|
78
74
|
* @return {boolean}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* This is where we hold the global mutable state such as current state, current
|
|
6
6
|
* params, current transition, etc.
|
|
7
7
|
*/
|
|
8
|
-
export class
|
|
8
|
+
export class RouterProvider {
|
|
9
9
|
/**
|
|
10
10
|
* Current parameter values
|
|
11
11
|
*
|
|
@@ -16,15 +16,17 @@ export class Router {
|
|
|
16
16
|
/**
|
|
17
17
|
* @type {number}
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
_lastStartedTransitionId: number;
|
|
20
20
|
/**
|
|
21
21
|
* @type {Queue<import("./transition/transition.js").Transition>}
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
_transitionHistory: Queue<import("./transition/transition.js").Transition>;
|
|
24
24
|
/**
|
|
25
25
|
* @type {Queue<import("./transition/transition.js").Transition>}
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
_successfulTransitions: Queue<
|
|
28
|
+
import("./transition/transition.js").Transition
|
|
29
|
+
>;
|
|
28
30
|
/**
|
|
29
31
|
* @type {import("./state/interface.ts").StateDeclaration|undefined}
|
|
30
32
|
*/
|