@angular-wave/angular.ts 0.14.3 → 0.15.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.
Files changed (69) hide show
  1. package/@types/angular.d.ts +26 -24
  2. package/@types/animations/animate-cache.d.ts +46 -2
  3. package/@types/animations/animate-children-directive.d.ts +4 -4
  4. package/@types/animations/animate-js.d.ts +1 -10
  5. package/@types/animations/animate.d.ts +6 -1
  6. package/@types/animations/interface.d.ts +15 -0
  7. package/@types/animations/runner/animate-runner.d.ts +73 -52
  8. package/@types/animations/shared.d.ts +0 -16
  9. package/@types/core/compile/attributes.d.ts +12 -6
  10. package/@types/core/compile/compile.d.ts +1 -1
  11. package/@types/core/controller/controller.d.ts +1 -1
  12. package/@types/core/interpolate/interface.d.ts +1 -0
  13. package/@types/core/parse/interface.d.ts +1 -1
  14. package/@types/core/parse/interpreter.d.ts +5 -3
  15. package/@types/core/scope/scope.d.ts +13 -13
  16. package/@types/directive/attrs/attrs.d.ts +2 -5
  17. package/@types/directive/class/class.d.ts +3 -3
  18. package/@types/directive/controller/controller.d.ts +2 -2
  19. package/@types/directive/form/form.d.ts +4 -4
  20. package/@types/directive/include/include.d.ts +4 -4
  21. package/@types/directive/messages/messages.d.ts +9 -8
  22. package/@types/directive/model/model.d.ts +5 -5
  23. package/@types/directive/ref/ref.d.ts +5 -8
  24. package/@types/directive/repeat/repeat.d.ts +2 -4
  25. package/@types/directive/script/script.d.ts +2 -2
  26. package/@types/directive/select/select.d.ts +7 -8
  27. package/@types/directive/validators/validators.d.ts +2 -2
  28. package/@types/injection-tokens.d.ts +3 -2
  29. package/@types/interface.d.ts +50 -22
  30. package/@types/namespace.d.ts +42 -6
  31. package/@types/router/directives/state-directives.d.ts +26 -24
  32. package/@types/router/directives/view-directive.d.ts +27 -131
  33. package/@types/router/glob/glob.d.ts +2 -6
  34. package/@types/router/router.d.ts +1 -1
  35. package/@types/router/scroll/interface.d.ts +3 -0
  36. package/@types/router/scroll/view-scroll.d.ts +8 -0
  37. package/@types/router/state/interface.d.ts +25 -126
  38. package/@types/router/state/state-builder.d.ts +4 -1
  39. package/@types/router/state/state-object.d.ts +2 -2
  40. package/@types/router/state/state-queue-manager.d.ts +4 -4
  41. package/@types/router/state/state-registry.d.ts +16 -11
  42. package/@types/router/state/state-service.d.ts +18 -12
  43. package/@types/router/template-factory.d.ts +2 -2
  44. package/@types/router/transition/interface.d.ts +9 -9
  45. package/@types/router/transition/transition-hook.d.ts +11 -0
  46. package/@types/router/transition/transition-service.d.ts +12 -5
  47. package/@types/router/transition/transition.d.ts +17 -13
  48. package/@types/router/url/url-rule.d.ts +12 -9
  49. package/@types/router/url/url-service.d.ts +14 -10
  50. package/@types/router/view/view.d.ts +4 -4
  51. package/@types/services/anchor-scroll/anchor-scroll.d.ts +2 -17
  52. package/@types/services/anchor-scroll/interface.d.ts +15 -0
  53. package/@types/services/cookie/cookie.d.ts +6 -4
  54. package/@types/services/exception/interface.d.ts +3 -3
  55. package/@types/services/log/log.d.ts +7 -3
  56. package/@types/services/pubsub/pubsub.d.ts +18 -13
  57. package/@types/services/rest/rest.d.ts +7 -5
  58. package/@types/services/sce/sce.d.ts +9 -1
  59. package/@types/shared/noderef.d.ts +3 -3
  60. package/@types/shared/strings.d.ts +18 -6
  61. package/@types/shared/utils.d.ts +88 -39
  62. package/@types/shared/validate.d.ts +13 -0
  63. package/dist/angular-ts.esm.js +1522 -1527
  64. package/dist/angular-ts.umd.js +1522 -1527
  65. package/dist/angular-ts.umd.min.js +1 -1
  66. package/dist/angular-ts.umd.min.js.gz +0 -0
  67. package/dist/angular-ts.umd.min.js.map +1 -1
  68. package/package.json +1 -1
  69. package/@types/router/view-scroll.d.ts +0 -12
@@ -352,7 +352,7 @@ export interface StateDeclaration {
352
352
  * Note: [State] objects require unique names.
353
353
  * The name is used like an id.
354
354
  */
355
- name?: string;
355
+ name: string;
356
356
  /**
357
357
  * Abstract state indicator
358
358
  *
@@ -385,131 +385,6 @@ export interface StateDeclaration {
385
385
  * ```
386
386
  */
387
387
  parent?: string | StateDeclaration;
388
- /**
389
- * Resolve - a mechanism to asynchronously fetch data, participating in the Transition lifecycle
390
- *
391
- * The `resolve:` property defines data (or other dependencies) to be fetched asynchronously when the state is being entered.
392
- * After the data is fetched, it may be used in views, transition hooks or other resolves that belong to this state.
393
- * The data may also be used in any views or resolves that belong to nested states.
394
- *
395
- * ### As an array
396
- *
397
- * Each array element should be a [[ResolvableLiteral]] object.
398
- *
399
- * #### Example:
400
- * The `user` resolve injects the current `Transition` and the `UserService` (using its token, which is a string).
401
- * The [[ResolvableLiteral.resolvePolicy]] sets how the resolve is processed.
402
- * The `user` data, fetched asynchronously, can then be used in a view.
403
- * ```js
404
- * var state = {
405
- * name: 'user',
406
- * url: '/user/:userId
407
- * resolve: [
408
- * {
409
- * token: 'user',
410
- * policy: { when: 'EAGER' },
411
- * deps: ['UserService', Transition],
412
- * resolveFn: (userSvc, trans) => userSvc.fetchUser(trans.params().userId) },
413
- * }
414
- * ]
415
- * }
416
- * ```
417
- *
418
- * Note: an Angular 2 style [`useFactory` provider literal](https://angular.io/docs/ts/latest/cookbook/dependency-injection.html#!#provide)
419
- * may also be used. See [[ProviderLike]].
420
- * #### Example:
421
- * ```
422
- * resolve: [
423
- * { provide: 'token', useFactory: (http) => http.get('/'), deps: [ Http ] },
424
- * ]
425
- * ```
426
- *
427
- * ### As an object
428
- *
429
- * The `resolve` property may be an object where:
430
- * - Each key (string) is the name of the dependency.
431
- * - Each value (function) is an injectable function which returns the dependency, or a promise for the dependency.
432
- *
433
- * This style is based on AngularTS injectable functions, but can be used with any UI-Router implementation.
434
- * If your code will be minified, the function should be ["annotated" in the AngularTS manner](https://docs.angularjs.org/guide/di#dependency-annotation).
435
- *
436
- * #### AngularTS Example:
437
- * ```js
438
- * resolve: {
439
- * // If you inject `myStateDependency` into a controller, you'll get "abc"
440
- * myStateDependency: function() {
441
- * return "abc";
442
- * },
443
- * // Dependencies are annotated in "Inline Array Annotation"
444
- * myAsyncData: ['$http', '$transition$' function($http, $transition$) {
445
- * // Return a promise (async) for the data
446
- * return $http.get("/foos/" + $transition$.params().foo);
447
- * }]
448
- * }
449
- * ```
450
- *
451
- * Note: You cannot specify a policy for each Resolvable, nor can you use non-string
452
- * tokens when using the object style `resolve:` block.
453
- *
454
- * ### Lifecycle
455
- *
456
- * Since a resolve function can return a promise, the router will delay entering the state until the promises are ready.
457
- * If any of the promises are rejected, the Transition is aborted with an Error.
458
- *
459
- * By default, resolves for a state are fetched just before that state is entered.
460
- * Note that only states which are being *entered* during the `Transition` have their resolves fetched.
461
- * States that are "retained" do not have their resolves re-fetched.
462
- *
463
- * If you are currently in a parent state `parent` and are transitioning to a child state `parent.child`, the
464
- * previously resolved data for state `parent` can be injected into `parent.child` without delay.
465
- *
466
- * Any resolved data for `parent.child` is retained until `parent.child` is exited, e.g., by transitioning back to the `parent` state.
467
- *
468
- * Because of this scoping and lifecycle, resolves are a great place to fetch your application's primary data.
469
- *
470
- * ### Injecting resolves into other things
471
- *
472
- * During a transition, Resolve data can be injected into:
473
- *
474
- * - Views (the components which fill a `ui-view` tag)
475
- * - Transition Hooks
476
- * - Other resolves (a resolve may depend on asynchronous data from a different resolve)
477
- *
478
- * ### Injecting other things into resolves
479
- *
480
- * Resolve functions usually have dependencies on some other API(s).
481
- * The dependencies are usually declared and injected into the resolve function.
482
- * A common pattern is to inject a custom service such as `UserService`.
483
- * The resolve then delegates to a service method, such as `UserService.list()`;
484
- *
485
- * #### Special injectable tokens
486
- *
487
- * - `UIRouter`: The [[UIRouter]] instance which has references to all the UI-Router services.
488
- * - `Transition`: The current [[Transition]] object; information and API about the current transition, such as
489
- * "to" and "from" State Parameters and transition options.
490
- * - `'$transition$'`: A string alias for the `Transition` injectable
491
- * - `'$state$'`: For `onEnter`/`onExit`/`onRetain`, the state being entered/exited/retained.
492
- * - Other resolve tokens: A resolve can depend on another resolve, either from the same state, or from any parent state.
493
- *
494
- * #### Example:
495
- * ```js
496
- * // Injecting a resolve into another resolve
497
- * resolve: [
498
- * // Define a resolve 'allusers' which delegates to the UserService.list()
499
- * // which returns a promise (async) for all the users
500
- * { provide: 'allusers', useFactory: (UserService) => UserService.list(), deps: [UserService] },
501
- *
502
- * // Define a resolve 'user' which depends on the allusers resolve.
503
- * // This resolve function is not called until 'allusers' is ready.
504
- * { provide: 'user', (allusers, trans) => _.find(allusers, trans.params().userId, deps: ['allusers', Transition] }
505
- * }
506
- * ```
507
- */
508
- resolve?:
509
- | ResolveTypes[]
510
- | {
511
- [key: string]: Injectable<any>;
512
- };
513
388
  /**
514
389
  * Sets the resolve policy defaults for all resolves on this state
515
390
  *
@@ -928,6 +803,30 @@ export interface StateDeclaration {
928
803
  */
929
804
  reloadOnSearch?: boolean;
930
805
  }
806
+ /**
807
+ * Represents a fully built StateObject, after registration in the StateRegistry
808
+ * and application of all StateBuilder decorators.
809
+ */
810
+ export type BuiltStateDeclaration = StateDeclaration & {
811
+ /** Reference to the original StateDeclaration */
812
+ self: StateDeclaration;
813
+ /** Array of Resolvables built from the resolve / resolvePolicy */
814
+ resolvables: Resolvable[];
815
+ /** Full path from root down to this state */
816
+ path: BuiltStateDeclaration[];
817
+ /** Fast lookup of included states for $state.includes() */
818
+ includes: Record<string, boolean>;
819
+ /** Closest ancestor state that has a URL (navigable) */
820
+ navigable?: BuiltStateDeclaration | null;
821
+ /** URL object built from url / parent / root */
822
+ url?: any;
823
+ /** Computed parameters of this state */
824
+ params?: Record<string, any>;
825
+ /** Optional parent state */
826
+ parent?: BuiltStateDeclaration | null;
827
+ /** Optional inherited data */
828
+ data?: any;
829
+ };
931
830
  /**
932
831
  * The return type of a [[StateDeclaration.lazyLoad]] function
933
832
  *
@@ -38,8 +38,11 @@
38
38
  * new Resolvable("myBarResolve", function(dep) { return dep.fetchSomethingAsPromise() }, [ "DependencyName" ]),
39
39
  * { provide: "myBazResolve", useFactory: function(dep) { dep.fetchSomethingAsPromise() }, deps: [ "DependencyName" ] }
40
40
  * ]
41
+ * @param {ng.StateObject & ng.StateDeclaration} state
41
42
  */
42
- export function resolvablesBuilder(state: any): any[];
43
+ export function resolvablesBuilder(
44
+ state: ng.StateObject & ng.StateDeclaration,
45
+ ): any[];
43
46
  /**
44
47
  * A internal global service
45
48
  *
@@ -24,9 +24,9 @@ export class StateObject implements StateDeclaration {
24
24
  includes: any;
25
25
  $$state: () => this;
26
26
  /**
27
- * @type {import('./interface.ts').StateDeclaration}
27
+ * @type {ng.StateDeclaration|ng.BuiltStateDeclaration}
28
28
  */
29
- self: import("./interface.ts").StateDeclaration;
29
+ self: ng.StateDeclaration | ng.BuiltStateDeclaration;
30
30
  __stateObjectCache: {
31
31
  nameGlob: Glob;
32
32
  };
@@ -2,20 +2,20 @@ export class StateQueueManager {
2
2
  /**
3
3
  * @param {import("./state-registry.js").StateRegistryProvider} stateRegistry
4
4
  * @param {*} urlServiceRules
5
- * @param {*} states
5
+ * @param {Record<string, ng.StateObject>} states
6
6
  * @param {*} builder
7
7
  * @param {*} listeners
8
8
  */
9
9
  constructor(
10
10
  stateRegistry: import("./state-registry.js").StateRegistryProvider,
11
11
  urlServiceRules: any,
12
- states: any,
12
+ states: Record<string, ng.StateObject>,
13
13
  builder: any,
14
14
  listeners: any,
15
15
  );
16
16
  stateRegistry: import("./state-registry.js").StateRegistryProvider;
17
17
  urlServiceRules: any;
18
- states: any;
18
+ states: Record<string, StateObject>;
19
19
  builder: any;
20
20
  listeners: any;
21
21
  /**
@@ -23,7 +23,7 @@ export class StateQueueManager {
23
23
  */
24
24
  queue: Array<StateObject>;
25
25
  register(stateDecl: any): StateObject;
26
- flush(): any;
26
+ flush(): Record<string, StateObject>;
27
27
  attachRoute(state: any): void;
28
28
  }
29
29
  import { StateObject } from "./state-object.js";
@@ -8,20 +8,21 @@
8
8
  export class StateRegistryProvider {
9
9
  static $inject: string[];
10
10
  /**
11
- * @param urlService
12
- * @param stateService
13
- * @param {import('../router.js').Router} globals
14
- * @param viewService
11
+ * @param {ng.UrlService} urlService
12
+ * @param {ng.StateService} stateService
13
+ * @param {ng.RouterService} globals
14
+ * @param {ng.ViewService} viewService
15
15
  */
16
16
  constructor(
17
- urlService: any,
18
- stateService: any,
19
- globals: import("../router.js").Router,
20
- viewService: any,
17
+ urlService: ng.UrlService,
18
+ stateService: ng.StateService,
19
+ globals: ng.RouterService,
20
+ viewService: ng.ViewService,
21
21
  );
22
- states: {};
23
- urlService: any;
24
- urlServiceRules: any;
22
+ /** @type {Record<string, import("./state-object.js").StateObject>} */
23
+ states: Record<string, import("./state-object.js").StateObject>;
24
+ urlService: import("../url/url-service.js").UrlService;
25
+ urlServiceRules: import("../url/url-rules.js").UrlRules;
25
26
  $injector: any;
26
27
  listeners: any[];
27
28
  matcher: StateMatcher;
@@ -110,6 +111,10 @@ export class StateRegistryProvider {
110
111
  * @returns {import('./state-object').StateObject[]} a list of removed states
111
112
  */
112
113
  deregister(stateOrName: any): any[];
114
+ /**
115
+ * @return {ng.BuiltStateDeclaration[]}
116
+ */
117
+ getAll(): ng.BuiltStateDeclaration[];
113
118
  get(stateOrName: any, base: any, ...args: any[]): any;
114
119
  /**
115
120
  * Registers a [[BuilderFunction]] for a specific [[StateObject]] property (e.g., `parent`, `url`, or `path`).
@@ -7,14 +7,14 @@ export class StateProvider {
7
7
  static $inject: string[];
8
8
  /**
9
9
  *
10
- * @param {import('../router.js').Router} globals
11
- * @param {*} transitionService
12
- * @param {import('../../core/di/internal-injector.js').InjectorService} $injector
10
+ * @param {ng.RouterProvider} globals
11
+ * @param {ng.TransitionProvider} transitionService
12
+ * @param {ng.ExceptionHandlerProvider} exceptionHandlerProvider
13
13
  */
14
14
  constructor(
15
- globals: import("../router.js").Router,
16
- transitionService: any,
17
- $injector: import("../../core/di/internal-injector.js").InjectorService,
15
+ globals: ng.RouterProvider,
16
+ transitionService: ng.TransitionProvider,
17
+ exceptionHandlerProvider: ng.ExceptionHandlerProvider,
18
18
  );
19
19
  /**
20
20
  * The latest successful state parameters
@@ -34,14 +34,20 @@ export class StateProvider {
34
34
  * @deprecated This is a passthrough through to [[Router.$current]]
35
35
  */
36
36
  get $current(): import("./state-object.js").StateObject;
37
+ globals: import("../router.js").RouterProvider;
38
+ transitionService: import("../transition/transition-service.js").TransitionProvider;
37
39
  stateRegistry: any;
38
- urlService: any;
39
- globals: import("../router.js").Router;
40
- transitionService: any;
41
- $injector: import("../../core/di/internal-injector.js").InjectorService;
40
+ /** @type {ng.UrlService} */
41
+ urlService: ng.UrlService;
42
+ /** @type {ng.InjectorService} */
43
+ $injector: ng.InjectorService;
42
44
  invalidCallbacks: any[];
43
- _defaultErrorHandler: ($error$: any) => never;
44
- $get: () => this;
45
+ /** @type {ng.ExceptionHandlerService} */
46
+ _defaultErrorHandler: ng.ExceptionHandlerService;
47
+ $get: (
48
+ | string
49
+ | (($injector: ng.InjectorService, $url: any) => StateProvider)
50
+ )[];
45
51
  /**
46
52
  * Decorates states when they are registered
47
53
  *
@@ -19,9 +19,9 @@ export class TemplateFactoryProvider {
19
19
  ) => this)
20
20
  )[];
21
21
  $templateRequest: any;
22
- $http: import("../interface.ts").HttpService;
22
+ $http: import("../services/http/interface.ts").HttpService;
23
23
  $templateCache: ng.TemplateCacheService;
24
- $injector: import("../interface.ts").InjectorService;
24
+ $injector: import("../core/di/internal-injector.js").InjectorService;
25
25
  /**
26
26
  * Forces the provider to use $http service directly
27
27
  * @param {boolean} value
@@ -168,11 +168,11 @@ export type IHookRegistration = (
168
168
  *
169
169
  * #### See:
170
170
  *
171
- * - [[IHookRegistry.onBefore]]
172
- * - [[IHookRegistry.onStart]]
173
- * - [[IHookRegistry.onFinish]]
174
- * - [[IHookRegistry.onSuccess]]
175
- * - [[IHookRegistry.onError]]
171
+ * - [[HookRegistry.onBefore]]
172
+ * - [[HookRegistry.onStart]]
173
+ * - [[HookRegistry.onFinish]]
174
+ * - [[HookRegistry.onSuccess]]
175
+ * - [[HookRegistry.onError]]
176
176
  *
177
177
  * @param transition the current [[Transition]]
178
178
  * @param injector (for ng1 or ng2 only) the injector service
@@ -196,9 +196,9 @@ export interface TransitionHookFn {
196
196
  *
197
197
  * #### See also:
198
198
  *
199
- * - [[IHookRegistry.onExit]]
200
- * - [[IHookRegistry.onRetain]]
201
- * - [[IHookRegistry.onEnter]]
199
+ * - [[HookRegistry.onExit]]
200
+ * - [[HookRegistry.onRetain]]
201
+ * - [[HookRegistry.onEnter]]
202
202
  *
203
203
  * #### Example:
204
204
  * ```js
@@ -287,7 +287,7 @@ export interface HookRegOptions {
287
287
  * [[TransitionService]] and also the [[Transition]] object itself implement this interface.
288
288
  * Note: the Transition object only allows hooks to be registered before the Transition is started.
289
289
  */
290
- export interface IHookRegistry {
290
+ export interface HookRegistry {
291
291
  /**
292
292
  * Registers a [[TransitionHookFn]], called *before a transition starts*.
293
293
  *
@@ -53,11 +53,20 @@ export class TransitionHook {
53
53
  * Run all TransitionHooks, ignoring their return value.
54
54
  */
55
55
  static runAllHooks(hooks: any): void;
56
+ /**
57
+ *
58
+ * @param {*} transition
59
+ * @param {*} stateContext
60
+ * @param {*} registeredHook
61
+ * @param {*} options
62
+ * @param {ng.ExceptionHandlerService} exceptionHandler
63
+ */
56
64
  constructor(
57
65
  transition: any,
58
66
  stateContext: any,
59
67
  registeredHook: any,
60
68
  options: any,
69
+ exceptionHandler: ng.ExceptionHandlerService,
61
70
  );
62
71
  transition: any;
63
72
  stateContext: any;
@@ -65,6 +74,8 @@ export class TransitionHook {
65
74
  options: any;
66
75
  isSuperseded: () => boolean;
67
76
  type: any;
77
+ /** @type {ng.ExceptionHandlerService} */
78
+ _exceptionHandler: ng.ExceptionHandlerService;
68
79
  logError(err: any): void;
69
80
  invokeHook(): any;
70
81
  /**
@@ -23,10 +23,15 @@ export namespace defaultTransOpts {
23
23
  export class TransitionProvider {
24
24
  static $inject: string[];
25
25
  /**
26
- * @param {import('../router.js').Router} globals
27
- * @param viewService
26
+ * @param {ng.RouterService} globals
27
+ * @param {ng.ViewService} viewService
28
+ * @param {ng.ExceptionHandlerProvider} $exceptionHandler
28
29
  */
29
- constructor(globals: import("../router.js").Router, viewService: any);
30
+ constructor(
31
+ globals: ng.RouterService,
32
+ viewService: ng.ViewService,
33
+ $exceptionHandler: ng.ExceptionHandlerProvider,
34
+ );
30
35
  _transitionCount: number;
31
36
  /** The transition hook types, such as `onEnter`, `onStart`, etc */
32
37
  _eventTypes: any[];
@@ -34,9 +39,11 @@ export class TransitionProvider {
34
39
  _registeredHooks: {};
35
40
  /** The paths on a criteria object */
36
41
  _criteriaPaths: {};
37
- globals: import("../router.js").Router;
38
- $view: any;
42
+ globals: import("../router.js").RouterProvider;
43
+ $view: import("../view/view.js").ViewService;
39
44
  _deregisterHookFns: {};
45
+ /** @type {ng.ExceptionHandlerService} */
46
+ _$exceptionHandler: ng.ExceptionHandlerService;
40
47
  $get: (
41
48
  | string
42
49
  | ((
@@ -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
- * @implements {IHookRegistry}
8
+ * @implements {HookRegistry}
9
9
  */
10
- export class Transition implements IHookRegistry {
10
+ export class Transition implements HookRegistry {
11
11
  /**
12
12
  * Creates a new Transition object.
13
13
  *
@@ -16,20 +16,20 @@ export class Transition implements IHookRegistry {
16
16
  * @param {Array<import('../path/path-node.js').PathNode>} fromPath The path of [[PathNode]]s from which the transition is leaving. The last node in the `fromPath`
17
17
  * encapsulates the "from state".
18
18
  * @param {import('../state/target-state.js').TargetState} targetState The target state and parameters being transitioned to (also, the transition options)
19
- * @param {import('../transition/transition-service.js').TransitionProvider} transitionService The [[TransitionService]] instance
20
- * @param {import('../router.js').Router} globals
19
+ * @param {ng.TransitionProvider} transitionService The [[TransitionService]] instance
20
+ * @param {ng.RouterService} globals
21
21
  */
22
22
  constructor(
23
23
  fromPath: Array<import("../path/path-node.js").PathNode>,
24
24
  targetState: import("../state/target-state.js").TargetState,
25
- transitionService: import("../transition/transition-service.js").TransitionProvider,
26
- globals: import("../router.js").Router,
25
+ transitionService: ng.TransitionProvider,
26
+ globals: ng.RouterService,
27
27
  );
28
28
  /**
29
- * @type {import('../router.js').Router}
29
+ * @type {import('../router.js').RouterProvider}
30
30
  */
31
- globals: import("../router.js").Router;
32
- transitionService: import("../transition/transition-service.js").TransitionProvider;
31
+ _globals: import("../router.js").RouterProvider;
32
+ _transitionService: import("./transition-service.js").TransitionProvider;
33
33
  _deferred: any;
34
34
  /**
35
35
  * This promise is resolved or rejected based on the outcome of the Transition.
@@ -77,7 +77,9 @@ export class Transition implements IHookRegistry {
77
77
  *
78
78
  * @returns The state declaration object for the Transition's ("from state").
79
79
  */
80
- from(): import("../state/interface.ts").StateDeclaration;
80
+ from():
81
+ | import("../state/interface.ts").StateDeclaration
82
+ | import("../state/interface.ts").BuiltStateDeclaration;
81
83
  /**
82
84
  * Returns the "to state"
83
85
  *
@@ -85,7 +87,9 @@ export class Transition implements IHookRegistry {
85
87
  *
86
88
  * @returns The state declaration object for the Transition's target state ("to state").
87
89
  */
88
- to(): import("../state/interface.ts").StateDeclaration;
90
+ to():
91
+ | import("../state/interface.ts").StateDeclaration
92
+ | import("../state/interface.ts").BuiltStateDeclaration;
89
93
  /**
90
94
  * Gets the Target State
91
95
  *
@@ -280,7 +284,7 @@ export class Transition implements IHookRegistry {
280
284
  * @returns true if the Transition is ignored.
281
285
  */
282
286
  ignored(): boolean;
283
- _ignoredReason(): "SameAsCurrent" | "SameAsPending";
287
+ _ignoredReason(): "SameAsPending" | "SameAsCurrent";
284
288
  /**
285
289
  * Runs the transition
286
290
  *
@@ -326,5 +330,5 @@ export class Transition implements IHookRegistry {
326
330
  export namespace Transition {
327
331
  export { Transition as diToken };
328
332
  }
329
- export type IHookRegistry = import("./interface.ts").IHookRegistry;
333
+ export type HookRegistry = import("./interface.ts").HookRegistry;
330
334
  import { HookBuilder } from "./hook-builder.js";
@@ -1,17 +1,20 @@
1
1
  export class UrlRuleFactory {
2
2
  /**
3
- * @param {import('../url/url-service.js').UrlService} urlService
4
- * @param {import('../state/state-service.js').StateProvider} stateService
5
- * @param {import('../router.js').Router} routerGlobals
3
+ * @param {ng.UrlService} urlService
4
+ * @param {ng.StateService} stateService
5
+ * @param {ng.RouterService} routerGlobals
6
6
  */
7
7
  constructor(
8
- urlService: import("../url/url-service.js").UrlService,
9
- stateService: import("../state/state-service.js").StateProvider,
10
- routerGlobals: import("../router.js").Router,
8
+ urlService: ng.UrlService,
9
+ stateService: ng.StateService,
10
+ routerGlobals: ng.RouterService,
11
11
  );
12
- urlService: import("../url/url-service.js").UrlService;
13
- stateService: import("../state/state-service.js").StateProvider;
14
- routerGlobals: import("../router.js").Router;
12
+ /** @type {ng.UrlService} */
13
+ urlService: ng.UrlService;
14
+ /** @type {ng.StateService} */
15
+ stateService: ng.StateService;
16
+ /** @type {ng.RouterService} */
17
+ routerGlobals: ng.RouterService;
15
18
  /**
16
19
  *
17
20
  * @param {*} what
@@ -4,20 +4,21 @@
4
4
  export class UrlService {
5
5
  static $inject: string[];
6
6
  /**
7
- * @param {import("../../services/location/location").LocationProvider} $locationProvider
7
+ * @param {ng.LocationProvider} $locationProvider
8
8
  * @param {import("../../router/state/state-service.js").StateProvider} stateService
9
- * @param {import("../router.js").Router} globals
9
+ * @param {import("../router.js").RouterProvider} globals
10
10
  * @param {import("../../router/url/url-config.js").UrlConfigProvider} urlConfigProvider
11
11
  */
12
12
  constructor(
13
- $locationProvider: any,
13
+ $locationProvider: ng.LocationProvider,
14
14
  stateService: import("../../router/state/state-service.js").StateProvider,
15
- globals: import("../router.js").Router,
15
+ globals: import("../router.js").RouterProvider,
16
16
  urlConfigProvider: import("../../router/url/url-config.js").UrlConfigProvider,
17
17
  );
18
- /** @type {import("../../services/location/location").Location} */
19
- $location: any;
20
- $locationProvider: any;
18
+ /** @type {ng.LocationService} */
19
+ $location: ng.LocationService;
20
+ /** @private */
21
+ private _locationProvider;
21
22
  stateService: import("../../router/state/state-service.js").StateProvider;
22
23
  /** Provides services related to the URL */
23
24
  urlRuleFactory: UrlRuleFactory;
@@ -60,7 +61,10 @@ export class UrlService {
60
61
  getHash(): string;
61
62
  $get: (
62
63
  | string
63
- | (($location: ng.LocationService, $rootScope: ng.Scope) => UrlService)
64
+ | ((
65
+ $location: ng.LocationService,
66
+ $rootScope: ng.RootScopeService,
67
+ ) => ng.UrlService)
64
68
  )[];
65
69
  /**
66
70
  * @returns {string}
@@ -118,7 +122,7 @@ export class UrlService {
118
122
  *
119
123
  * @return the url (after potentially being processed)
120
124
  */
121
- url(newUrl?: string, state?: any): any;
125
+ url(newUrl?: string, state?: any): string;
122
126
  /**
123
127
  * @private
124
128
  *
@@ -196,7 +200,7 @@ export class UrlService {
196
200
  */
197
201
  match(url: any): any;
198
202
  update(read: any): void;
199
- location: any;
203
+ location: string;
200
204
  /**
201
205
  * Internal API.
202
206
  *
@@ -4,20 +4,20 @@ export class ViewService {
4
4
  _listeners: any[];
5
5
  $get: () => this;
6
6
  /**
7
- * @param {?import('../state/state-object.js').StateObject} context
7
+ * @param {?import('../state/state-object.js').StateObject} [context]
8
8
  * @return {?import('../state/state-object.js').StateObject}
9
9
  */
10
10
  rootViewContext(
11
- context: import("../state/state-object.js").StateObject | null,
11
+ context?: import("../state/state-object.js").StateObject | null,
12
12
  ): import("../state/state-object.js").StateObject | null;
13
13
  _rootContext: any;
14
- viewConfigFactory(factory: any): void;
14
+ _viewConfigFactory(factory: any): void;
15
15
  /**
16
16
  * @param path
17
17
  * @param decl
18
18
  * @return {import("../state/views.js").ViewConfig}
19
19
  */
20
- createViewConfig(
20
+ _createViewConfig(
21
21
  path: any,
22
22
  decl: any,
23
23
  ): import("../state/views.js").ViewConfig;
@@ -1,25 +1,10 @@
1
- /**
2
- * @typedef {Object} AnchorScrollObject
3
- * @property {number|function|Element} yOffset
4
- */
5
- /**
6
- * @typedef {(string) => void} AnchorScrollFunction
7
- */
8
- /**
9
- * @typedef {AnchorScrollFunction | AnchorScrollObject} AnchorScrollService
10
- */
11
1
  export class AnchorScrollProvider {
12
2
  autoScrollingEnabled: boolean;
13
3
  $get: (
14
4
  | string
15
5
  | ((
16
- $location: import("../../services/location/location.js").Location,
6
+ $location: ng.LocationService,
17
7
  $rootScope: ng.Scope,
18
- ) => AnchorScrollFunction)
8
+ ) => import("./interface.ts").AnchorScrollFunction)
19
9
  )[];
20
10
  }
21
- export type AnchorScrollObject = {
22
- yOffset: number | Function | Element;
23
- };
24
- export type AnchorScrollFunction = (string: any) => void;
25
- export type AnchorScrollService = AnchorScrollFunction | AnchorScrollObject;