@angular-wave/angular.ts 0.14.2 → 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 (85) hide show
  1. package/@types/angular.d.ts +28 -25
  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 +17 -2
  7. package/@types/animations/queue/animate-queue.d.ts +0 -1
  8. package/@types/animations/raf-scheduler.d.ts +3 -3
  9. package/@types/animations/runner/animate-runner.d.ts +81 -57
  10. package/@types/animations/shared.d.ts +0 -16
  11. package/@types/core/compile/attributes.d.ts +13 -10
  12. package/@types/core/compile/compile.d.ts +2 -2
  13. package/@types/core/controller/controller.d.ts +1 -1
  14. package/@types/core/di/ng-module/ng-module.d.ts +8 -7
  15. package/@types/core/filter/filter.d.ts +1 -1
  16. package/@types/core/interpolate/interface.d.ts +1 -0
  17. package/@types/core/parse/ast/ast.d.ts +30 -39
  18. package/@types/core/parse/ast-type.d.ts +16 -16
  19. package/@types/core/parse/interface.d.ts +1 -1
  20. package/@types/core/parse/interpreter.d.ts +6 -29
  21. package/@types/core/parse/lexer/lexer.d.ts +19 -19
  22. package/@types/core/parse/parser/parser.d.ts +4 -9
  23. package/@types/core/scope/interface.d.ts +0 -6
  24. package/@types/core/scope/scope.d.ts +13 -13
  25. package/@types/directive/attrs/attrs.d.ts +2 -5
  26. package/@types/directive/class/class.d.ts +3 -3
  27. package/@types/directive/controller/controller.d.ts +2 -2
  28. package/@types/directive/form/form.d.ts +4 -4
  29. package/@types/directive/include/include.d.ts +4 -4
  30. package/@types/directive/messages/messages.d.ts +9 -8
  31. package/@types/directive/model/model.d.ts +5 -5
  32. package/@types/directive/ref/ref.d.ts +5 -8
  33. package/@types/directive/repeat/repeat.d.ts +2 -4
  34. package/@types/directive/script/script.d.ts +2 -2
  35. package/@types/directive/select/select.d.ts +7 -8
  36. package/@types/directive/validators/validators.d.ts +2 -2
  37. package/@types/injection-tokens.d.ts +3 -2
  38. package/@types/interface.d.ts +50 -22
  39. package/@types/namespace.d.ts +42 -6
  40. package/@types/router/common/trace.d.ts +5 -5
  41. package/@types/router/directives/state-directives.d.ts +26 -24
  42. package/@types/router/directives/view-directive.d.ts +27 -131
  43. package/@types/router/glob/glob.d.ts +2 -6
  44. package/@types/router/params/interface.d.ts +2 -2
  45. package/@types/router/params/param.d.ts +3 -3
  46. package/@types/router/router.d.ts +1 -1
  47. package/@types/router/scroll/interface.d.ts +3 -0
  48. package/@types/router/scroll/view-scroll.d.ts +8 -0
  49. package/@types/router/state/interface.d.ts +25 -126
  50. package/@types/router/state/state-builder.d.ts +4 -1
  51. package/@types/router/state/state-object.d.ts +2 -2
  52. package/@types/router/state/state-queue-manager.d.ts +4 -4
  53. package/@types/router/state/state-registry.d.ts +16 -11
  54. package/@types/router/state/state-service.d.ts +18 -12
  55. package/@types/router/template-factory.d.ts +2 -2
  56. package/@types/router/transition/interface.d.ts +9 -9
  57. package/@types/router/transition/reject-factory.d.ts +5 -5
  58. package/@types/router/transition/transition-hook.d.ts +22 -23
  59. package/@types/router/transition/transition-service.d.ts +12 -5
  60. package/@types/router/transition/transition.d.ts +17 -13
  61. package/@types/router/url/url-rule.d.ts +12 -9
  62. package/@types/router/url/url-service.d.ts +14 -10
  63. package/@types/router/view/view.d.ts +4 -4
  64. package/@types/services/anchor-scroll/anchor-scroll.d.ts +2 -17
  65. package/@types/services/anchor-scroll/interface.d.ts +15 -0
  66. package/@types/services/cookie/cookie.d.ts +6 -4
  67. package/@types/services/exception/interface.d.ts +3 -3
  68. package/@types/services/http/http.d.ts +8 -7
  69. package/@types/services/log/log.d.ts +7 -3
  70. package/@types/services/pubsub/pubsub.d.ts +18 -14
  71. package/@types/services/rest/rest.d.ts +12 -10
  72. package/@types/services/sce/sce.d.ts +9 -1
  73. package/@types/services/sse/sse.d.ts +1 -1
  74. package/@types/shared/node.d.ts +8 -0
  75. package/@types/shared/noderef.d.ts +11 -14
  76. package/@types/shared/strings.d.ts +18 -6
  77. package/@types/shared/utils.d.ts +111 -73
  78. package/@types/shared/validate.d.ts +49 -0
  79. package/dist/angular-ts.esm.js +2581 -2619
  80. package/dist/angular-ts.umd.js +2581 -2619
  81. package/dist/angular-ts.umd.min.js +2 -1
  82. package/dist/angular-ts.umd.min.js.gz +0 -0
  83. package/dist/angular-ts.umd.min.js.map +1 -0
  84. package/package.json +1 -1
  85. package/@types/router/view-scroll.d.ts +0 -12
@@ -55,7 +55,7 @@ export class NgModelController {
55
55
  * @param {Element} $element
56
56
  * @param {ng.ParseService} $parse
57
57
  * @param {ng.AnimateService} $animate
58
- * @param {*} $interpolate
58
+ * @param {ng.InterpolateService} $interpolate
59
59
  */
60
60
  constructor(
61
61
  $scope: ng.Scope,
@@ -64,7 +64,7 @@ export class NgModelController {
64
64
  $element: Element,
65
65
  $parse: ng.ParseService,
66
66
  $animate: ng.AnimateService,
67
- $interpolate: any,
67
+ $interpolate: ng.InterpolateService,
68
68
  );
69
69
  /** @type {any} The actual value from the control's view */
70
70
  $viewValue: any;
@@ -97,7 +97,7 @@ export class NgModelController {
97
97
  $error: {};
98
98
  $$success: {};
99
99
  $pending: any;
100
- $name: any;
100
+ $name: string;
101
101
  $$parentForm: {
102
102
  $nonscope: boolean;
103
103
  $addControl: Function;
@@ -145,9 +145,9 @@ export class NgModelController {
145
145
  $$scope: ng.Scope;
146
146
  $$attr: ng.Attributes;
147
147
  $$element: Element;
148
- $$animate: import("../../interface.ts").AnimateService;
148
+ $$animate: import("../../animations/interface.ts").AnimateService;
149
149
  $$parse: import("../../core/parse/interface.ts").ParseService;
150
- $$exceptionHandler: import("../../interface.ts").ExceptionHandler;
150
+ $$exceptionHandler: import("../../services/exception/interface.ts").ExceptionHandler;
151
151
  $$hasNativeValidators: boolean;
152
152
  $$classCache: {};
153
153
  $$eventRemovers: Set<any>;
@@ -1,11 +1,8 @@
1
- export function ngRefDirective($parse: any): {
2
- priority: number;
3
- restrict: string;
4
- compile(
5
- tElement: any,
6
- tAttrs: any,
7
- ): (scope: any, element: any, attrs: any) => void;
8
- };
1
+ /**
2
+ * @param {ng.ParseService} $parse
3
+ * @return {ng.Directive}
4
+ */
5
+ export function ngRefDirective($parse: ng.ParseService): ng.Directive;
9
6
  export namespace ngRefDirective {
10
7
  let $inject: string[];
11
8
  }
@@ -1,11 +1,9 @@
1
1
  /**
2
2
  * TODO // Add type for animate service
3
3
  * @param {*} $animate
4
- * @returns {import("../../interface.ts").Directive}
4
+ * @returns {ng.Directive}
5
5
  */
6
- export function ngRepeatDirective(
7
- $animate: any,
8
- ): import("../../interface.ts").Directive;
6
+ export function ngRepeatDirective($animate: any): ng.Directive;
9
7
  export namespace ngRepeatDirective {
10
8
  let $inject: string[];
11
9
  }
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @param {ng.TemplateCacheService} $templateCache
3
- * @returns {import('../../interface.ts').Directive}
3
+ * @returns {ng.Directive}
4
4
  */
5
5
  export function scriptDirective(
6
6
  $templateCache: ng.TemplateCacheService,
7
- ): import("../../interface.ts").Directive;
7
+ ): ng.Directive;
8
8
  export namespace scriptDirective {
9
9
  let $inject: string[];
10
10
  }
@@ -2,14 +2,13 @@
2
2
  * @returns {import('../../interface.ts').Directive}
3
3
  */
4
4
  export function selectDirective(): import("../../interface.ts").Directive;
5
- export function optionDirective($interpolate: any): {
6
- restrict: string;
7
- priority: number;
8
- compile(
9
- element: any,
10
- attr: any,
11
- ): (scope: any, elemParam: any, attrParam: any) => void;
12
- };
5
+ /**
6
+ * @param {ng.InterpolateService} $interpolate
7
+ * @returns {ng.Directive}
8
+ */
9
+ export function optionDirective(
10
+ $interpolate: ng.InterpolateService,
11
+ ): ng.Directive;
13
12
  export namespace optionDirective {
14
13
  let $inject: string[];
15
14
  }
@@ -25,7 +25,7 @@ export const requiredDirective: (
25
25
  | string
26
26
  | ((
27
27
  $parse: import("../../core/parse/interface.ts").ParseService,
28
- ) => import("../../interface.ts").Directive)
28
+ ) => ng.Directive)
29
29
  )[];
30
30
  /**
31
31
  * @param {String|RegExp} ngPattern AngularTS expression that must evaluate to a `RegExp` or a `String`
@@ -70,7 +70,7 @@ export const patternDirective: (
70
70
  | string
71
71
  | ((
72
72
  $parse: import("../../core/parse/interface.ts").ParseService,
73
- ) => import("../../interface.ts").Directive)
73
+ ) => ng.Directive)
74
74
  )[];
75
75
  /**
76
76
  * @param {string} ngMaxlength AngularTS expression that must evaluate to a `Number` or `String`
@@ -11,13 +11,14 @@ export function provider(services: string[]): string[];
11
11
  * ```js
12
12
  *
13
13
  * myDirective.$inject = [
14
- * angular.$injectTokens.$animate,
15
- * angular.$injectTokens.$templateRequest,
14
+ * angular.$t.$animate,
15
+ * angular.$t.$templateRequest,
16
16
  * ];
17
17
  *
18
18
  * function myDirective($animate, $templateRequest) { ... }
19
19
  *
20
20
  * ```
21
+ * @private
21
22
  * @type Readonly<Record<string, string>>
22
23
  */
23
24
  export const $injectTokens: Readonly<Record<string, string>>;
@@ -1,25 +1,53 @@
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 declare const PublicInjectionTokens: {
5
+ readonly $angular: "$angular";
6
+ readonly $attrs: "$attrs";
7
+ readonly $scope: "$scope";
8
+ readonly $element: "$element";
9
+ readonly $anchorScroll: "$anchorScroll";
10
+ readonly $animate: "$animate";
11
+ readonly $animateCss: "$animateCss";
12
+ readonly $aria: "$aria";
13
+ readonly $compile: "$compile";
14
+ readonly $cookie: "$cookie";
15
+ readonly $controller: "$controller";
16
+ readonly $document: "$document";
17
+ readonly $eventBus: "$eventBus";
18
+ readonly $exceptionHandler: "$exceptionHandler";
19
+ readonly $filter: "$filter";
20
+ readonly $http: "$http";
21
+ readonly $httpParamSerializer: "$httpParamSerializer";
22
+ readonly $interpolate: "$interpolate";
23
+ readonly $location: "$location";
24
+ readonly $log: "$log";
25
+ readonly $viewScroll: "$viewScroll";
26
+ readonly $parse: "$parse";
27
+ readonly $rest: "$rest";
28
+ readonly $rootScope: "$rootScope";
29
+ readonly $rootElement: "$rootElement";
30
+ readonly $router: "$router";
31
+ readonly $sce: "$sce";
32
+ readonly $sceDelegate: "$sceDelegate";
33
+ readonly $state: "$state";
34
+ readonly $stateRegistry: "$stateRegistry";
35
+ readonly $sse: "$sse";
36
+ readonly $templateCache: "$templateCache";
37
+ readonly $templateFactory: "$templateFactory";
38
+ readonly $templateRequest: "$templateRequest";
39
+ readonly $transitions: "$transitions";
40
+ readonly $urlConfig: "$urlConfig";
41
+ readonly $url: "$url";
42
+ readonly $view: "$view";
43
+ readonly $window: "$window";
44
+ readonly $provide: "$provide";
45
+ readonly $injector: "$injector";
46
+ readonly $compileProvider: "$compileProvider";
47
+ readonly $animateProvider: "$animateProvider";
48
+ readonly $filterProvider: "$filterProvider";
49
+ readonly $controllerProvider: "$controllerProvider";
50
+ };
23
51
  /**
24
52
  * Configuration options for the AngularTS bootstrap process.
25
53
  *
@@ -350,7 +378,7 @@ export interface DirectivePrePost {
350
378
  export type DirectiveLinkFn<T> = (
351
379
  scope: Scope,
352
380
  element: HTMLElement,
353
- attrs: Attributes & Record<string, any>,
381
+ attrs: ng.Attributes,
354
382
  controller?: TController<T>,
355
383
  transclude?: (...args: any[]) => any,
356
384
  ) => void;
@@ -358,8 +386,8 @@ export type DirectiveLinkFn<T> = (
358
386
  * A compile function used to prepare directives before linking.
359
387
  */
360
388
  export type DirectiveCompileFn = (
361
- templateElement?: HTMLElement,
362
- templateAttributes?: Attributes & Record<string, any>,
389
+ templateElement: HTMLElement,
390
+ templateAttributes: Attributes & Record<string, any>,
363
391
  transclude?: (...args: any[]) => any,
364
392
  ) => void | DirectiveLinkFn<any> | DirectivePrePost;
365
393
  /**
@@ -8,12 +8,15 @@ import {
8
8
  } from "./core/scope/interface.ts";
9
9
  import { NgModule as TNgModule } from "./core/di/ng-module/ng-module.js";
10
10
  import { InjectorService as TInjectorService } from "./core/di/internal-injector.js";
11
+ import { AnchorScrollProvider as TAnchorScrollProvider } from "./services/anchor-scroll/anchor-scroll.js";
11
12
  import {
12
- AnchorScrollProvider as TAnchorScrollProvider,
13
+ AnchorScrollFunction as TAnchorScrollFunction,
13
14
  AnchorScrollService as TAnchorScrollService,
14
- } from "./services/anchor-scroll/anchor-scroll.js";
15
+ AnchorScrollObject as TAnchorScrollObject,
16
+ } from "./services/anchor-scroll/interface.ts";
15
17
  import { ControllerService as TControllerService } from "./core/controller/interface.ts";
16
18
  import { ExceptionHandler as TExceptionHandler } from "./services/exception/interface.ts";
19
+ import { ExceptionHandlerProvider as TExceptionHandlerProvider } from "./services/exception/exception.js";
17
20
  import { ParseService as TParseService } from "./core/parse/interface.ts";
18
21
  import { TemplateRequestService as TTemplateRequestService } from "./services/template-request/interface.ts";
19
22
  import { HttpParamSerializer as THttpParamSerializer } from "./services/http/interface.ts";
@@ -46,6 +49,7 @@ import {
46
49
  ControllerConstructor as TControllerConstructor,
47
50
  Injectable as TInjectable,
48
51
  Expression as TExpression,
52
+ PublicInjectionTokens,
49
53
  } from "./interface.ts";
50
54
  import {
51
55
  SseService as TSseService,
@@ -89,6 +93,20 @@ import {
89
93
  import { RestService as TRestService } from "./services/rest/rest.js";
90
94
  import { ServiceProvider as TServiceProvider } from "./interface.ts";
91
95
  import { NgModelController as TNgModelController } from "./directive/model/model.js";
96
+ import { RouterProvider as TRouterProvider } from "./router/router.ts";
97
+ import { TransitionProvider as TTransitionProvider } from "./router/transition/transition-service.js";
98
+ import { AnimateProvider as TAnimateProvider } from "./animations/animate.js";
99
+ import { UrlService as TUrlService } from "./router/url/url-service.js";
100
+ import { LocationProvider as TLocationProvider } from "./services/location/location.js";
101
+ import { ViewService as TViewService } from "./router/view/view.js";
102
+ import {
103
+ BuiltStateDeclaration as TBuiltStateDeclaration,
104
+ StateDeclaration as TStateDeclaration,
105
+ } from "./router/state/interface.ts";
106
+ import { StateObject as TStateObject } from "./router/state/state-object.js";
107
+ import { StateRegistryProvider as TStateRegistryProvider } from "./router/state/state-registry.js";
108
+ import { ViewScrollService as TViewScrollService } from "./router/scroll/interface.ts";
109
+ import { HookRegistry } from "./router/transition/interface.ts";
92
110
  declare global {
93
111
  interface Function {
94
112
  $inject?: readonly string[] | undefined;
@@ -98,9 +116,9 @@ declare global {
98
116
  }
99
117
  export namespace ng {
100
118
  type Angular = TAngular;
101
- type Attributes = TAttributes & Record<string, any>;
119
+ type Attributes = TAttributes & Record<string, string>;
102
120
  type Directive<TController = any> = TDirective<TController>;
103
- type DirectiveFactory = TDirectiveFactory & Function;
121
+ type DirectiveFactory = TDirectiveFactory;
104
122
  type AnnotatedDirectiveFactory = TAnnotatedDirectiveFactory;
105
123
  type Component = TComponent & Record<string, any>;
106
124
  type Controller = TController;
@@ -115,11 +133,16 @@ declare global {
115
133
  type BoundTranscludeFn = TBoundTranscludeFn;
116
134
  type LinkFnMapping = TLinkFnMapping;
117
135
  type AnchorScrollProvider = TAnchorScrollProvider;
118
- type InterpolateProvider = TInterpolateProvider;
136
+ type AnimateProvider = TAnimateProvider;
137
+ type FilterProvider = TFilterProvider;
138
+ type ExceptionHandlerProvider = TExceptionHandlerProvider;
119
139
  type HttpParamSerializerProvider = THttpParamSerializerProvider;
140
+ type InterpolateProvider = TInterpolateProvider;
141
+ type LocationProvider = TLocationProvider;
120
142
  type SceProvider = TSceProvider;
121
143
  type SceDelegateProvider = TSceDelegateProvider;
122
- type FilterProvider = TFilterProvider;
144
+ type TransitionProvider = TTransitionProvider;
145
+ type RouterProvider = TRouterProvider;
123
146
  type AnchorScrollService = TAnchorScrollService;
124
147
  type AnimateService = TAnimateService;
125
148
  type CompileService = TCompileFn;
@@ -140,16 +163,23 @@ declare global {
140
163
  type PubSubService = TPubSub;
141
164
  type RootElementService = Element;
142
165
  type RootScopeService = TScope & Record<string, any>;
166
+ type RouterService = TRouterProvider;
143
167
  type StateService = TStateProvider;
168
+ type StateRegistryService = TStateRegistryProvider;
144
169
  type SseService = TSseService;
145
170
  type SseConfig = TSseConfig;
171
+ type TransitionService = TransitionProvider & HookRegistry;
146
172
  type TemplateCacheService = Map<string, string>;
147
173
  type TemplateRequestService = TTemplateRequestService;
174
+ type UrlService = TUrlService;
175
+ type ViewService = TViewService;
176
+ type ViewScrollService = TViewScrollService;
148
177
  type ErrorHandlingConfig = TErrorHandlingConfig;
149
178
  type ListenerFn = TListenerFn;
150
179
  type Listener = TListener;
151
180
  type DocumentService = Document;
152
181
  type WindowService = Window;
182
+ type AngularServie = Angular;
153
183
  type WorkerConfig = TWorkerConfig;
154
184
  type WorkerConnection = TWorkerConnection;
155
185
  type Injectable<
@@ -170,5 +200,11 @@ declare global {
170
200
  type Expression = TExpression;
171
201
  type NgModelController = TNgModelController;
172
202
  type Validator = TValidator;
203
+ type StateDeclaration = TStateDeclaration;
204
+ type BuiltStateDeclaration = TBuiltStateDeclaration;
205
+ type StateObject = TStateObject;
206
+ type AnchorScrollFunction = TAnchorScrollFunction;
207
+ type AnchorScrollObject = TAnchorScrollObject;
208
+ type InjectionTokens = typeof PublicInjectionTokens;
173
209
  }
174
210
  }
@@ -1,10 +1,10 @@
1
1
  export type Category = number;
2
2
  export namespace Category {
3
- let RESOLVE: number;
4
- let TRANSITION: number;
5
- let HOOK: number;
6
- let UIVIEW: number;
7
- let VIEWCONFIG: number;
3
+ let _RESOLVE: number;
4
+ let _TRANSITION: number;
5
+ let _HOOK: number;
6
+ let _UIVIEW: number;
7
+ let _VIEWCONFIG: number;
8
8
  }
9
9
  /**
10
10
  * Prints ng-router Transition trace information to the console.
@@ -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: any,
3
- $stateRegistry: any,
4
- $transitions: any,
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 {import("../../interface.ts").Directive}
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: any,
21
- $stateRegistry: any,
22
- $transitions: any,
23
- ): import("../../interface.ts").Directive;
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 {*} $state
30
- * @param {import('../router.js').Router} $router
31
- * @param {*} $interpolate
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 {import("../../interface.ts").Directive}
36
+ * @returns {ng.Directive}
35
37
  */
36
38
  export function $StateRefActiveDirective(
37
- $state: any,
38
- $router: import("../router.js").Router,
39
- $interpolate: any,
39
+ $state: ng.StateService,
40
+ $router: ng.RouterService,
41
+ $interpolate: ng.InterpolateService,
40
42
  $stateRegistry: any,
41
43
  $transitions: any,
42
- ): import("../../interface.ts").Directive;
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: any,
3
- $controller: any,
4
- $transitions: any,
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 $inject: string[];
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
- text: string;
68
- /**
69
- * @type {string[]}
70
- */
71
- glob: string[];
67
+ _text: string;
72
68
  /**
73
69
  * @type {RegExp}
74
70
  */
75
- regexp: RegExp;
71
+ _regexp: RegExp;
76
72
  /**
77
73
  * @param {string} name
78
74
  * @return {boolean}
@@ -381,7 +381,7 @@ export interface Replace {
381
381
  * pattern: new RegExp("[0-9]+(?:-[0-9]+)*")
382
382
  *
383
383
  * // Ensure that the (decoded) object is an array, and that all its elements are numbers
384
- * is: (obj) => Array.isArray(obj) &&
384
+ * is: (obj) => isArray(obj) &&
385
385
  * obj.reduce((acc, item) => acc && typeof item === 'number', true),
386
386
  *
387
387
  * // Compare two arrays of integers
@@ -514,7 +514,7 @@ export interface ParamTypeDefinition {
514
514
  * input is an array of ints:
515
515
  *
516
516
  * ```
517
- * is: (val) => Array.isArray(val) && array.reduce((acc, x) => acc && parseInt(val, 10) === val, true)
517
+ * is: (val) => isArray(val) && array.reduce((acc, x) => acc && parseInt(val, 10) === val, true)
518
518
  * ```
519
519
  *
520
520
  * If your type decodes the URL parameter value to a custom string, check that the string matches
@@ -1,8 +1,8 @@
1
1
  export type DefType = number;
2
2
  export namespace DefType {
3
- let PATH: number;
4
- let SEARCH: number;
5
- let CONFIG: number;
3
+ let _PATH: number;
4
+ let _SEARCH: number;
5
+ let _CONFIG: number;
6
6
  }
7
7
  export class Param {
8
8
  static values(params: any, values?: {}): {};
@@ -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 Router {
8
+ export class RouterProvider {
9
9
  /**
10
10
  * Current parameter values
11
11
  *
@@ -0,0 +1,3 @@
1
+ export type ViewScrollService =
2
+ | ng.AnchorScrollService
3
+ | ((el: Element) => void | Promise<void>);