@angular-wave/angular.ts 0.17.0 → 0.19.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 (113) hide show
  1. package/@types/angular.d.ts +18 -6
  2. package/@types/animations/animate-css-driver.d.ts +2 -2
  3. package/@types/animations/animate-js-driver.d.ts +21 -3
  4. package/@types/animations/animate-js.d.ts +10 -2
  5. package/@types/animations/animate-swap.d.ts +4 -1
  6. package/@types/animations/animate.d.ts +11 -5
  7. package/@types/animations/animation.d.ts +8 -2
  8. package/@types/animations/css/animate-css.d.ts +16 -0
  9. package/@types/animations/interface.d.ts +315 -21
  10. package/@types/animations/queue/animate-queue.d.ts +17 -8
  11. package/@types/animations/queue/interface.d.ts +14 -7
  12. package/@types/animations/shared.d.ts +1 -1
  13. package/@types/core/compile/attributes.d.ts +5 -5
  14. package/@types/core/compile/compile.d.ts +28 -18
  15. package/@types/core/compile/interface.d.ts +209 -34
  16. package/@types/core/controller/controller.d.ts +30 -38
  17. package/@types/core/controller/interface.d.ts +12 -3
  18. package/@types/core/interpolate/interpolate.d.ts +1 -1
  19. package/@types/core/parse/interface.d.ts +2 -2
  20. package/@types/core/parse/interpreter.d.ts +110 -58
  21. package/@types/core/scope/interface.d.ts +6 -0
  22. package/@types/core/scope/scope.d.ts +2 -1
  23. package/@types/directive/aria/aria.d.ts +67 -27
  24. package/@types/directive/aria/interface.d.ts +9 -0
  25. package/@types/directive/class/class.d.ts +31 -0
  26. package/@types/directive/form/form.d.ts +54 -18
  27. package/@types/directive/input/input.d.ts +59 -18
  28. package/@types/directive/input/interface.d.ts +10 -0
  29. package/@types/directive/messages/messages.d.ts +73 -22
  30. package/@types/directive/model/interface.d.ts +19 -0
  31. package/@types/directive/model/model.d.ts +70 -33
  32. package/@types/directive/model-options/model-options.d.ts +1 -23
  33. package/@types/directive/repeat/repeat.d.ts +2 -3
  34. package/@types/directive/validators/validators.d.ts +1 -5
  35. package/@types/directive/worker/interface.d.ts +9 -0
  36. package/@types/docs.d.ts +24 -0
  37. package/@types/filters/json.d.ts +4 -0
  38. package/@types/interface.d.ts +22 -70
  39. package/@types/namespace.d.ts +73 -53
  40. package/@types/router/common/trace.d.ts +150 -42
  41. package/@types/router/directives/state-directives.d.ts +4 -4
  42. package/@types/router/directives/view-directive.d.ts +4 -7
  43. package/@types/router/hooks/core-resolvables.d.ts +11 -2
  44. package/@types/router/hooks/ignored-transition.d.ts +3 -1
  45. package/@types/router/hooks/invalid-transition.d.ts +3 -1
  46. package/@types/router/hooks/lazy-load.d.ts +17 -13
  47. package/@types/router/hooks/on-enter-exit-retain.d.ts +9 -3
  48. package/@types/router/hooks/redirect-to.d.ts +3 -3
  49. package/@types/router/hooks/resolve.d.ts +11 -3
  50. package/@types/router/hooks/views.d.ts +6 -4
  51. package/@types/router/params/interface.d.ts +3 -2
  52. package/@types/router/params/param-factory.d.ts +24 -3
  53. package/@types/router/params/param-type.d.ts +47 -11
  54. package/@types/router/params/param-types.d.ts +52 -0
  55. package/@types/router/params/param.d.ts +52 -28
  56. package/@types/router/params/state-params.d.ts +5 -3
  57. package/@types/router/path/interface.d.ts +3 -0
  58. package/@types/router/path/path-node.d.ts +34 -14
  59. package/@types/router/path/path-utils.d.ts +75 -25
  60. package/@types/router/resolve/resolvable.d.ts +34 -7
  61. package/@types/router/resolve/resolve-context.d.ts +52 -34
  62. package/@types/router/router.d.ts +10 -12
  63. package/@types/router/state/interface.d.ts +194 -31
  64. package/@types/router/state/state-builder.d.ts +29 -29
  65. package/@types/router/state/state-matcher.d.ts +29 -11
  66. package/@types/router/state/state-object.d.ts +68 -22
  67. package/@types/router/state/state-queue-manager.d.ts +19 -10
  68. package/@types/router/state/state-registry.d.ts +80 -28
  69. package/@types/router/state/state-service.d.ts +182 -123
  70. package/@types/router/state/target-state.d.ts +36 -27
  71. package/@types/router/state/views.d.ts +48 -19
  72. package/@types/router/template-factory.d.ts +8 -15
  73. package/@types/router/transition/hook-builder.d.ts +17 -6
  74. package/@types/router/transition/hook-registry.d.ts +80 -46
  75. package/@types/router/transition/interface.d.ts +138 -118
  76. package/@types/router/transition/reject-factory.d.ts +58 -22
  77. package/@types/router/transition/transition-event-type.d.ts +19 -8
  78. package/@types/router/transition/transition-hook.d.ts +50 -29
  79. package/@types/router/transition/transition-service.d.ts +186 -30
  80. package/@types/router/transition/transition.d.ts +201 -70
  81. package/@types/router/url/interface.d.ts +140 -0
  82. package/@types/router/url/url-config.d.ts +19 -16
  83. package/@types/router/url/url-matcher.d.ts +66 -46
  84. package/@types/router/url/url-rule.d.ts +58 -35
  85. package/@types/router/url/url-rules.d.ts +38 -28
  86. package/@types/router/url/url-service.d.ts +68 -41
  87. package/@types/router/view/interface.d.ts +10 -30
  88. package/@types/router/view/view.d.ts +35 -21
  89. package/@types/services/anchor-scroll/anchor-scroll.d.ts +1 -1
  90. package/@types/services/anchor-scroll/interface.d.ts +5 -8
  91. package/@types/services/http/http.d.ts +20 -23
  92. package/@types/services/http/interface.d.ts +11 -23
  93. package/@types/services/location/interface.d.ts +1 -4
  94. package/@types/services/location/location.d.ts +14 -14
  95. package/@types/services/sce/interface.d.ts +2 -2
  96. package/@types/services/sce/sce.d.ts +16 -10
  97. package/@types/services/template-request/template-request.d.ts +21 -4
  98. package/@types/shared/common.d.ts +5 -32
  99. package/@types/shared/dom.d.ts +10 -5
  100. package/@types/shared/interface.d.ts +4 -0
  101. package/@types/shared/utils.d.ts +17 -6
  102. package/dist/angular-ts.esm.js +6643 -3107
  103. package/dist/angular-ts.umd.js +6643 -3107
  104. package/dist/angular-ts.umd.min.js +1 -1
  105. package/dist/angular-ts.umd.min.js.gz +0 -0
  106. package/dist/angular-ts.umd.min.js.map +1 -1
  107. package/package.json +1 -2
  108. package/@types/animations/animate-css.d.ts +0 -11
  109. package/@types/filters/filters.d.ts +0 -38
  110. package/@types/router/hooks/update-globals.d.ts +0 -1
  111. package/@types/router/hooks/url.d.ts +0 -5
  112. package/@types/router/scroll/interface.d.ts +0 -3
  113. package/@types/router/scroll/view-scroll.d.ts +0 -8
@@ -7,26 +7,19 @@
7
7
  * Service which manages loading of templates from a ViewConfig.
8
8
  */
9
9
  export class TemplateFactoryProvider {
10
- /** @type {boolean} */
11
- _useHttp: boolean;
12
10
  $get: (
13
11
  | string
14
12
  | ((
15
13
  $http: ng.HttpService,
16
14
  $templateCache: ng.TemplateCacheService,
17
15
  $templateRequest: ng.TemplateRequestService,
18
- $injector: import("../core/di/internal-injector.js").InjectorService,
19
- ) => this)
16
+ $injector: ng.InjectorService,
17
+ ) => TemplateFactoryProvider)
20
18
  )[];
21
19
  $templateRequest: import("../services/template-request/interface.ts").TemplateRequestService;
22
- $http: import("../services/http/interface.ts").HttpService;
20
+ $http: import("../docs.ts").HttpService;
23
21
  $templateCache: ng.TemplateCacheService;
24
- $injector: import("../core/di/internal-injector.js").InjectorService;
25
- /**
26
- * Forces the provider to use $http service directly
27
- * @param {boolean} value
28
- */
29
- useHttpService(value: boolean): void;
22
+ $injector: import("../docs.ts").InjectorService;
30
23
  /**
31
24
  * Creates a template from a configuration object.
32
25
  *
@@ -62,9 +55,9 @@ export class TemplateFactoryProvider {
62
55
  * @param {string|Function} url url of the template to load, or a function
63
56
  * that returns a url.
64
57
  * @param {Object} params Parameters to pass to the url function.
65
- * @return {Promise<string>}
58
+ * @return {Promise<string> | null}
66
59
  */
67
- fromUrl(url: string | Function, params: any): Promise<string>;
60
+ fromUrl(url: string | Function, params: any): Promise<string> | null;
68
61
  /**
69
62
  * Creates a template by invoking an injectable provider function.
70
63
  *
@@ -81,13 +74,13 @@ export class TemplateFactoryProvider {
81
74
  ): string | Promise<string>;
82
75
  /**
83
76
  * Creates a component's template by invoking an injectable provider function.
84
- *
85
77
  * @param {import('../interface.ts').Injectable<any>} provider Function to invoke via `locals`
78
+ * @param {import("./resolve/resolve-context.js").ResolveContext} context
86
79
  * @return {Promise<any>} The template html as a string: "<component-name input1='::$resolve.foo'></component-name>".
87
80
  */
88
81
  fromComponentProvider(
89
82
  provider: import("../interface.ts").Injectable<any>,
90
- context: any,
83
+ context: import("./resolve/resolve-context.js").ResolveContext,
91
84
  ): Promise<any>;
92
85
  /**
93
86
  * Creates a template from a component's name
@@ -1,3 +1,4 @@
1
+ /** @typedef {import("./transition-event-type.js").TransitionEventType} TransitionEventType */
1
2
  /**
2
3
  * This class returns applicable TransitionHooks for a specific Transition instance.
3
4
  *
@@ -19,9 +20,9 @@ export class HookBuilder {
19
20
  transition: import("./transition.js").Transition;
20
21
  /**
21
22
  * @param {TransitionHookPhase} phase
22
- * @returns
23
+ * @returns {TransitionHook[]}
23
24
  */
24
- buildHooksForPhase(phase: TransitionHookPhase): any;
25
+ buildHooksForPhase(phase: TransitionHookPhase): TransitionHook[];
25
26
  /**
26
27
  * Returns an array of newly built TransitionHook objects.
27
28
  *
@@ -29,9 +30,10 @@ export class HookBuilder {
29
30
  * - Finds [[PathNode]] (or `PathNode[]`) to use as the TransitionHook context(s)
30
31
  * - For each of the [[PathNode]]s, creates a TransitionHook
31
32
  *
32
- * @param hookType the type of the hook registration function, e.g., 'onEnter', 'onFinish'.
33
+ * @param {TransitionEventType} hookType the type of the hook registration function, e.g., 'onEnter', 'onFinish'.
34
+ * @returns {TransitionHook[]} an array of TransitionHook objects
33
35
  */
34
- buildHooks(hookType: any): any;
36
+ buildHooks(hookType: TransitionEventType): TransitionHook[];
35
37
  /**
36
38
  * Finds all RegisteredHooks from:
37
39
  * - The Transition object instance hook registry
@@ -40,9 +42,18 @@ export class HookBuilder {
40
42
  * which matched:
41
43
  * - the eventType
42
44
  * - the matchCriteria (to, from, exiting, retained, entering)
43
- *
44
45
  * @returns an array of matched [[RegisteredHook]]s
46
+ * @param {import("./transition-event-type.js").TransitionEventType} hookType
47
+ * @param {import("./interface.ts").TreeChanges} treeChanges
48
+ * @param {import("./transition.js").Transition} transition
45
49
  */
46
- getMatchingHooks(hookType: any, treeChanges: any, transition: any): any;
50
+ getMatchingHooks(
51
+ hookType: import("./transition-event-type.js").TransitionEventType,
52
+ treeChanges: import("./interface.ts").TreeChanges,
53
+ transition: import("./transition.js").Transition,
54
+ ): any;
47
55
  }
56
+ export type TransitionEventType =
57
+ import("./transition-event-type.js").TransitionEventType;
48
58
  import { TransitionHookPhase } from "./transition-hook.js";
59
+ import { TransitionHook } from "./transition-hook.js";
@@ -1,68 +1,83 @@
1
1
  /**
2
2
  * Determines if the given state matches the matchCriteria
3
- *
4
3
  * @internal
5
- *
6
- * @param state a State Object to test against
7
- * @param criterion
8
- * - If a string, matchState uses the string as a glob-matcher against the state name
9
- * - If an array (of strings), matchState uses each string in the array as a glob-matchers against the state name
10
- * and returns a positive match if any of the globs match.
11
- * - If a function, matchState calls the function with the state and returns true if the function's result is truthy.
4
+ * @param {import("../state/state-object.js").StateObject} state a State Object to test against
5
+ * @param {import("./interface.ts").HookMatchCriterion} criterion - If a string, matchState uses the string as a glob-matcher against the state name
6
+ - If an array (of strings), matchState uses each string in the array as a glob-matchers against the state name
7
+ and returns a positive match if any of the globs match.
8
+ - If a function, matchState calls the function with the state and returns true if the function's result is truthy.
9
+ * @param {ng.Transition} transition
12
10
  * @returns {boolean}
13
11
  */
14
12
  export function matchState(
15
- state: any,
16
- criterion: any,
17
- transition: any,
13
+ state: import("../state/state-object.js").StateObject,
14
+ criterion: import("./interface.ts").HookMatchCriterion,
15
+ transition: ng.Transition,
18
16
  ): boolean;
19
17
  /**
20
- * Return a registration function of the requested type.
18
+ * Register a transition hook without mutating the hookSource surface.
21
19
  * @param {ng.TransitionProvider| import("./transition.js").Transition} hookSource
22
20
  * @param {ng.TransitionProvider} transitionService
23
21
  * @param {import("./transition-event-type.js").TransitionEventType} eventType
24
- * @returns {( matchObject: any, callback: Function, options?: Record<string, any> ) => () => void }
22
+ * @param {import("./interface.ts").HookMatchCriteria} matchCriteria
23
+ * @param {import("./interface.ts").HookFn} callback
24
+ * @param {import("./interface.ts").HookRegOptions} options
25
+ * @returns {import("./interface.ts").DeregisterFn}
25
26
  */
26
- export function makeEvent(
27
+ export function registerHook(
27
28
  hookSource: ng.TransitionProvider | import("./transition.js").Transition,
28
29
  transitionService: ng.TransitionProvider,
29
30
  eventType: import("./transition-event-type.js").TransitionEventType,
31
+ matchCriteria: import("./interface.ts").HookMatchCriteria,
32
+ callback: import("./interface.ts").HookFn,
33
+ options?: import("./interface.ts").HookRegOptions,
34
+ ): import("./interface.ts").DeregisterFn;
35
+ /**
36
+ * Return a registration function of the requested type.
37
+ * @param {ng.TransitionProvider| import("./transition.js").Transition} hookSource
38
+ * @param {ng.TransitionService} transitionService
39
+ * @param {import("./transition-event-type.js").TransitionEventType} eventType
40
+ * @returns {function(import("./interface.ts").HookMatchCriteria, import("./interface.ts").HookFn, {}=): (function(): void)|*}
41
+ */
42
+ export function makeEvent(
43
+ hookSource: ng.TransitionProvider | import("./transition.js").Transition,
44
+ transitionService: ng.TransitionService,
45
+ eventType: import("./transition-event-type.js").TransitionEventType,
30
46
  ): (
31
- matchObject: any,
32
- callback: Function,
33
- options?: Record<string, any>,
34
- ) => () => void;
47
+ arg0: import("./interface.ts").HookMatchCriteria,
48
+ arg1: import("./interface.ts").HookFn,
49
+ arg2: {} | undefined,
50
+ ) => (() => void) | any;
35
51
  /**
36
52
  * The registration data for a registered transition hook
37
53
  */
38
54
  export class RegisteredHook {
39
55
  /**
40
- * @param {import("./transition-service.js").TransitionProvider} tranSvc
41
- * @param eventType
42
- * @param callback
43
- * @param matchCriteria
44
- * @param removeHookFromRegistry
45
- * @param options
56
+ * @param {ng.TransitionService} tranSvc
57
+ * @param {import("./transition-event-type.js").TransitionEventType} eventType
58
+ * @param {import("./interface.ts").HookFn} callback
59
+ * @param {import("./interface.ts").HookMatchCriteria} matchCriteria
60
+ * @param {(hook: RegisteredHook) => void} removeHookFromRegistry
61
+ * @param {import("./interface.ts").HookRegOptions} options
46
62
  */
47
63
  constructor(
48
- tranSvc: import("./transition-service.js").TransitionProvider,
49
- eventType: any,
50
- callback: any,
51
- matchCriteria: any,
52
- removeHookFromRegistry: any,
53
- options?: {},
64
+ tranSvc: ng.TransitionService,
65
+ eventType: import("./transition-event-type.js").TransitionEventType,
66
+ callback: import("./interface.ts").HookFn,
67
+ matchCriteria: import("./interface.ts").HookMatchCriteria,
68
+ removeHookFromRegistry: (hook: RegisteredHook) => void,
69
+ options?: import("./interface.ts").HookRegOptions,
54
70
  );
55
- /** @type {import("./transition-service.js").TransitionProvider} */
56
- tranSvc: import("./transition-service.js").TransitionProvider;
57
- eventType: any;
58
- callback: any;
59
- matchCriteria: any;
60
- removeHookFromRegistry: any;
71
+ tranSvc: import("./interface.ts").TransitionService;
72
+ eventType: import("./transition-event-type.js").TransitionEventType;
73
+ callback: import("./interface.ts").HookFn;
74
+ matchCriteria: import("./interface.ts").HookMatchCriteria;
75
+ removeHookFromRegistry: (hook: RegisteredHook) => void;
61
76
  invokeCount: number;
62
77
  _deregistered: boolean;
63
- priority: any;
64
- bind: any;
65
- invokeLimit: any;
78
+ priority: number;
79
+ bind: unknown;
80
+ invokeLimit: number;
66
81
  /**
67
82
  * Gets the matching [[PathNode]]s
68
83
  *
@@ -77,8 +92,16 @@ export class RegisteredHook {
77
92
  * to still match a transition, even when `entering === []`. Contrast that
78
93
  * with `entering: (state) => true` which only matches when a state is actually
79
94
  * being entered.
95
+ * @param {import("../resolve/resolve-context.js").PathNode[]} nodes
96
+ * @param {import("./interface.ts").HookMatchCriterion} criterion
97
+ * @param {ng.Transition} transition
98
+ * @return {import("../resolve/resolve-context.js").PathNode[] | null}
80
99
  */
81
- _matchingNodes(nodes: any, criterion: any, transition: any): any;
100
+ _matchingNodes(
101
+ nodes: import("../resolve/resolve-context.js").PathNode[],
102
+ criterion: import("./interface.ts").HookMatchCriterion,
103
+ transition: ng.Transition,
104
+ ): import("../resolve/resolve-context.js").PathNode[] | null;
82
105
  /**
83
106
  * Gets the default match criteria (all `true`)
84
107
  *
@@ -92,8 +115,9 @@ export class RegisteredHook {
92
115
  * exiting: true,
93
116
  * retained: true,
94
117
  * }
118
+ * @returns {import("./interface.ts").HookMatchCriteria}
95
119
  */
96
- _getDefaultMatchCriteria(): boolean[] | Record<string, boolean>;
120
+ _getDefaultMatchCriteria(): import("./interface.ts").HookMatchCriteria;
97
121
  /**
98
122
  * Gets matching nodes as [[IMatchingNodes]]
99
123
  *
@@ -108,14 +132,24 @@ export class RegisteredHook {
108
132
  * entering: _matchingNodes(treeChanges.entering, mc.entering),
109
133
  * };
110
134
  * ```
135
+ * @param {import("./interface.ts").TreeChanges} treeChanges
136
+ * @param {ng.Transition} transition
137
+ * @returns {{}}
111
138
  */
112
- _getMatchingNodes(treeChanges: any, transition: any): any;
139
+ _getMatchingNodes(
140
+ treeChanges: import("./interface.ts").TreeChanges,
141
+ transition: ng.Transition,
142
+ ): {};
113
143
  /**
114
144
  * Determines if this hook's [[matchCriteria]] match the given [[TreeChanges]]
115
- *
116
- * @returns an IMatchingNodes object, or null. If an IMatchingNodes object is returned, its values
117
- * are the matching [[PathNode]]s for each [[HookMatchCriterion]] (to, from, exiting, retained, entering)
145
+ * @param {import("./interface.ts").TreeChanges} treeChanges
146
+ * @param {ng.Transition} transition
147
+ * @returns {import("./interface.ts").IMatchingNodes | null} an IMatchingNodes object, or null. If an IMatchingNodes object is returned,
148
+ * its values are the matching [[PathNode]]s for each [[HookMatchCriterion]] (to, from, exiting, retained, entering)
118
149
  */
119
- matches(treeChanges: any, transition: any): any;
150
+ matches(
151
+ treeChanges: import("./interface.ts").TreeChanges,
152
+ transition: ng.Transition,
153
+ ): import("./interface.ts").IMatchingNodes | null;
120
154
  deregister(): void;
121
155
  }