@angular-wave/angular.ts 0.0.37 → 0.0.39

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 (191) hide show
  1. package/Makefile +6 -5
  2. package/dist/angular-ts.esm.js +2 -1
  3. package/dist/angular-ts.umd.js +1 -1
  4. package/package.json +2 -4
  5. package/rollup.config.js +5 -1
  6. package/src/binding.spec.js +4 -4
  7. package/src/core/location/location.js +1 -1
  8. package/src/core/scope/scope.js +4 -7
  9. package/src/exts/aria/aria.html +1 -4
  10. package/src/exts/messages/messages.html +1 -4
  11. package/src/index.js +307 -1
  12. package/src/loader.js +13 -6
  13. package/src/public.js +7 -2
  14. package/src/router/directives/directives.test.js +19 -0
  15. package/src/router/directives/state-directives.html +21 -0
  16. package/src/router/{state-directives.spec.js → directives/state-directives.spec.js} +2 -1
  17. package/src/router/{view-directive.spec.js → directives/view-directive.spec.js} +2 -1
  18. package/src/router/directives/view-directives.html +21 -0
  19. package/src/router/router.html +22 -0
  20. package/src/router/router.test.js +11 -0
  21. package/src/router/services.spec.js +2 -2
  22. package/src/router/{state-builder.spec.js → state/state-builder.spec.js} +9 -12
  23. package/src/router/state/state.html +22 -0
  24. package/src/router/{state.spec.js → state/state.spec.js} +1 -1
  25. package/src/router/state/state.test.js +11 -0
  26. package/src/router/state-filter.spec.js +2 -2
  27. package/src/router/template-factory.spec.js +4 -4
  28. package/src/router/url/url.html +18 -0
  29. package/src/router/url/url.test.js +11 -0
  30. package/src/router/view/view.html +18 -0
  31. package/src/router/{view.spec.js → view/view.spec.js} +1 -1
  32. package/src/router/view/view.test.js +11 -0
  33. package/src/router/view-hook.spec.js +4 -4
  34. package/src/router/view-scroll.spec.js +4 -4
  35. package/src/services/http/http.html +22 -0
  36. package/src/services/http/http.test.js +11 -0
  37. package/src/services/http-backend/http-backend.html +21 -0
  38. package/src/services/http-backend/http-backend.js +1 -1
  39. package/src/services/http-backend/http-backend.spec.js +1 -1
  40. package/src/services/http-backend/http-backend.test.js +11 -0
  41. package/src/shared/common.spec.js +4 -4
  42. package/src/shared/hof.spec.js +1 -1
  43. package/src/shared/min-err.spec.js +2 -2
  44. package/src/shared/shared.html +22 -0
  45. package/src/shared/shared.test.js +11 -0
  46. package/src/shared/test-utils.js +2 -2
  47. package/src/shared/utils.spec.js +1 -1
  48. package/src/src.html +22 -0
  49. package/src/src.test.js +10 -0
  50. package/tsconfig.json +1 -1
  51. package/tsconfig.types.json +11 -0
  52. package/types/animations/animate-cache.d.ts +7 -7
  53. package/types/animations/animate-children-directive.d.ts +3 -6
  54. package/types/animations/animate-swap.d.ts +7 -16
  55. package/types/animations/animation.d.ts +2 -11
  56. package/types/animations/raf-scheduler.d.ts +3 -3
  57. package/types/animations/shared.d.ts +8 -23
  58. package/types/core/{animate-css.d.ts → animate/animate-css.d.ts} +2 -8
  59. package/types/core/{cache.d.ts → cache/cache.d.ts} +5 -5
  60. package/types/core/compile/compile.d.ts +173 -0
  61. package/types/core/controller/controller.d.ts +32 -0
  62. package/types/core/exception-handler.d.ts +1 -1
  63. package/types/core/filter/filter.d.ts +9 -0
  64. package/types/core/{interpolate.d.ts → interpolate/interpolate.d.ts} +23 -39
  65. package/types/core/interval/interval-factory.d.ts +4 -0
  66. package/types/core/{interval.d.ts → interval/interval.d.ts} +1 -1
  67. package/types/core/location/location.d.ts +209 -0
  68. package/types/core/pubsub/pubsub.d.ts +156 -0
  69. package/types/core/q/q.d.ts +31 -0
  70. package/types/core/sanitize/sanitize-uri.d.ts +53 -0
  71. package/types/core/{sce.d.ts → sce/sce.d.ts} +80 -86
  72. package/types/core/scope/scope.d.ts +727 -0
  73. package/types/core/task-tracker-factory.d.ts +29 -29
  74. package/types/core/timeout/timeout.d.ts +20 -0
  75. package/types/core/{urlUtils.d.ts → url-utils/url-utils.d.ts} +2 -7
  76. package/types/directive/{bind.d.ts → bind/bind.d.ts} +4 -10
  77. package/types/directive/{class.d.ts → class/class.d.ts} +12 -21
  78. package/types/directive/controller/controller.d.ts +6 -0
  79. package/types/directive/events/events.d.ts +5 -0
  80. package/types/directive/form/form.d.ts +200 -0
  81. package/types/directive/if/if.d.ts +8 -0
  82. package/types/directive/include/include.d.ts +14 -0
  83. package/types/directive/{input.d.ts → input/input.d.ts} +20 -69
  84. package/types/directive/{model.d.ts → model/model.d.ts} +256 -279
  85. package/types/directive/options/options.d.ts +9 -0
  86. package/types/directive/ref/ref.d.ts +5 -0
  87. package/types/directive/repeat/repeat.d.ts +8 -0
  88. package/types/directive/{script.d.ts → script/script.d.ts} +5 -8
  89. package/types/directive/{show-hide.d.ts → show-hide/show-hide.d.ts} +10 -16
  90. package/types/directive/switch/switch.d.ts +17 -0
  91. package/types/directive/transclude/transclude.d.ts +4 -0
  92. package/types/directive/{validators.d.ts → validators/validators.d.ts} +20 -35
  93. package/types/filters/filters.d.ts +10 -16
  94. package/types/filters/order-by.d.ts +2 -4
  95. package/types/index.d.ts +117 -0
  96. package/types/injector.d.ts +12 -0
  97. package/types/public.d.ts +5 -0
  98. package/types/router/common/coreservices.d.ts +2 -2
  99. package/types/router/common/glob.d.ts +9 -9
  100. package/types/router/common/queue.d.ts +13 -13
  101. package/types/router/common/trace.d.ts +43 -43
  102. package/types/router/directives/view-directive.d.ts +13 -32
  103. package/types/router/globals.d.ts +20 -20
  104. package/types/router/hooks/lazy-load.d.ts +2 -11
  105. package/types/router/hooks/redirect-to.d.ts +1 -4
  106. package/types/router/hooks/url.d.ts +1 -5
  107. package/types/router/hooks/views.d.ts +1 -4
  108. package/types/router/params/param-factory.d.ts +5 -5
  109. package/types/router/params/param-type.d.ts +35 -35
  110. package/types/router/params/param-types.d.ts +11 -11
  111. package/types/router/params/param.d.ts +38 -38
  112. package/types/router/params/state-params.d.ts +10 -10
  113. package/types/router/path/path-node.d.ts +34 -34
  114. package/types/router/path/path-utils.d.ts +73 -77
  115. package/types/router/resolve/resolvable.d.ts +32 -32
  116. package/types/router/resolve/resolve-context.d.ts +84 -84
  117. package/types/router/services.d.ts +4 -9
  118. package/types/router/state/state-builder.d.ts +27 -27
  119. package/types/router/state/state-matcher.d.ts +5 -5
  120. package/types/router/state/state-object.d.ts +58 -58
  121. package/types/router/state/state-queue-manager.d.ts +10 -16
  122. package/types/router/state/state-registry.d.ts +100 -107
  123. package/types/router/state/state-service.d.ts +411 -411
  124. package/types/router/state/target-state.d.ts +64 -69
  125. package/types/router/state/views.d.ts +31 -37
  126. package/types/router/state-filters.d.ts +7 -7
  127. package/types/router/state-provider.d.ts +105 -105
  128. package/types/router/template-factory.d.ts +83 -112
  129. package/types/router/transition/hook-builder.d.ts +25 -25
  130. package/types/router/transition/hook-registry.d.ts +68 -83
  131. package/types/router/transition/interface.d.ts +7 -7
  132. package/types/router/transition/reject-factory.d.ts +34 -34
  133. package/types/router/transition/transition-event-type.d.ts +9 -18
  134. package/types/router/transition/transition-hook.d.ts +77 -82
  135. package/types/router/transition/transition-service.d.ts +82 -99
  136. package/types/router/transition/transition.d.ts +369 -377
  137. package/types/router/url/url-config.d.ts +84 -84
  138. package/types/router/url/url-matcher.d.ts +115 -119
  139. package/types/router/url/url-rule.d.ts +114 -124
  140. package/types/router/url/url-rules.d.ts +217 -217
  141. package/types/router/url/url-service.d.ts +264 -269
  142. package/types/router/view/view.d.ts +114 -117
  143. package/types/router/view-scroll.d.ts +2 -2
  144. package/types/services/anchor-scroll.d.ts +2 -8
  145. package/types/services/browser.d.ts +122 -130
  146. package/types/services/cache-factory.d.ts +25 -25
  147. package/types/services/cookie-reader.d.ts +2 -2
  148. package/types/services/document.d.ts +2 -2
  149. package/types/services/http/http.d.ts +145 -0
  150. package/types/services/{http-backend.d.ts → http-backend/http-backend.d.ts} +3 -35
  151. package/types/services/log.d.ts +49 -49
  152. package/types/services/template-request.d.ts +44 -53
  153. package/types/shared/common.d.ts +4 -19
  154. package/types/{constants.d.ts → shared/constants.d.ts} +6 -6
  155. package/types/shared/hof.d.ts +1 -1
  156. package/types/{jqLite.d.ts → shared/jqlite/jqlite.d.ts} +11 -11
  157. package/types/shared/test-utils.d.ts +11 -0
  158. package/types/shared/utils.d.ts +7 -24
  159. package/types-back/global.d.ts +3 -1
  160. package/types-back/index.d.ts +2 -221
  161. package/types/core/compile.d.ts +0 -206
  162. package/types/core/controller.d.ts +0 -42
  163. package/types/core/filter.d.ts +0 -9
  164. package/types/core/interval-factory.d.ts +0 -21
  165. package/types/core/location.d.ts +0 -234
  166. package/types/core/pubsub.d.ts +0 -164
  167. package/types/core/q.d.ts +0 -33
  168. package/types/core/root-scope.d.ts +0 -754
  169. package/types/core/sanitize-uri.d.ts +0 -57
  170. package/types/core/timeout.d.ts +0 -31
  171. package/types/directive/controller.d.ts +0 -6
  172. package/types/directive/events.d.ts +0 -12
  173. package/types/directive/form.d.ts +0 -230
  174. package/types/directive/if.d.ts +0 -17
  175. package/types/directive/include.d.ts +0 -33
  176. package/types/directive/options.d.ts +0 -16
  177. package/types/directive/ref.d.ts +0 -11
  178. package/types/directive/repeat.d.ts +0 -23
  179. package/types/directive/switch.d.ts +0 -23
  180. package/types/directive/transclude.d.ts +0 -15
  181. package/types/services/http.d.ts +0 -157
  182. /package/src/router/{url-service.spec.js → url/url-service.spec.js} +0 -0
  183. /package/types/directive/{attrs.d.ts → attrs/attrs.d.ts} +0 -0
  184. /package/types/directive/{change.d.ts → change/change.d.ts} +0 -0
  185. /package/types/directive/{cloak.d.ts → cloak/cloak.d.ts} +0 -0
  186. /package/types/directive/{init.d.ts → init/init.d.ts} +0 -0
  187. /package/types/directive/{list.d.ts → list/list.d.ts} +0 -0
  188. /package/types/directive/{non-bindable.d.ts → non-bindable/non-bindable.d.ts} +0 -0
  189. /package/types/directive/{style.d.ts → style/style.d.ts} +0 -0
  190. /package/types/exts/{aria.d.ts → aria/aria.d.ts} +0 -0
  191. /package/types/exts/{messages.d.ts → messages/messages.d.ts} +0 -0
@@ -22,44 +22,44 @@
22
22
  * ```
23
23
  */
24
24
  export class ParamType {
25
- /**
26
- * @param def A configuration object which contains the custom type definition. The object's
27
- * properties will override the default methods and/or pattern in `ParamType`'s public interface.
28
- * @returns a new ParamType object
29
- */
30
- constructor(def: any);
31
- /** @inheritdoc */
32
- pattern: RegExp;
33
- /** @inheritdoc */
34
- inherit: boolean;
35
- /** @inheritdoc */
36
- is(val: any, key: any): boolean;
37
- /** @inheritdoc */
38
- encode(val: any, key: any): any;
39
- /** @inheritdoc */
40
- decode(val: any, key: any): any;
41
- /** @inheritdoc */
42
- equals(a: any, b: any): boolean;
43
- $subPattern(): string;
44
- toString(): string;
45
- /** Given an encoded string, or a decoded object, returns a decoded object */
46
- $normalize(val: any): any;
47
- /**
48
- * Wraps an existing custom ParamType as an array of ParamType, depending on 'mode'.
49
- * e.g.:
50
- * - urlmatcher pattern "/path?{queryParam[]:int}"
51
- * - url: "/path?queryParam=1&queryParam=2
52
- * - $stateParams.queryParam will be [1, 2]
53
- * if `mode` is "auto", then
54
- * - url: "/path?queryParam=1 will create $stateParams.queryParam: 1
55
- * - url: "/path?queryParam=1&queryParam=2 will create $stateParams.queryParam: [1, 2]
56
- */
57
- $asArray(mode: any, isSearch: any): ArrayType;
25
+ /**
26
+ * @param def A configuration object which contains the custom type definition. The object's
27
+ * properties will override the default methods and/or pattern in `ParamType`'s public interface.
28
+ * @returns a new ParamType object
29
+ */
30
+ constructor(def: any);
31
+ /** @inheritdoc */
32
+ pattern: RegExp;
33
+ /** @inheritdoc */
34
+ inherit: boolean;
35
+ /** @inheritdoc */
36
+ is(val: any, key: any): boolean;
37
+ /** @inheritdoc */
38
+ encode(val: any, key: any): any;
39
+ /** @inheritdoc */
40
+ decode(val: any, key: any): any;
41
+ /** @inheritdoc */
42
+ equals(a: any, b: any): boolean;
43
+ $subPattern(): string;
44
+ toString(): string;
45
+ /** Given an encoded string, or a decoded object, returns a decoded object */
46
+ $normalize(val: any): any;
47
+ /**
48
+ * Wraps an existing custom ParamType as an array of ParamType, depending on 'mode'.
49
+ * e.g.:
50
+ * - urlmatcher pattern "/path?{queryParam[]:int}"
51
+ * - url: "/path?queryParam=1&queryParam=2
52
+ * - $stateParams.queryParam will be [1, 2]
53
+ * if `mode` is "auto", then
54
+ * - url: "/path?queryParam=1 will create $stateParams.queryParam: 1
55
+ * - url: "/path?queryParam=1&queryParam=2 will create $stateParams.queryParam: [1, 2]
56
+ */
57
+ $asArray(mode: any, isSearch: any): ArrayType;
58
58
  }
59
59
  /** Wraps up a `ParamType` object to handle array values. */
60
60
  declare function ArrayType(type: any, mode: any): void;
61
61
  declare class ArrayType {
62
- /** Wraps up a `ParamType` object to handle array values. */
63
- constructor(type: any, mode: any);
62
+ /** Wraps up a `ParamType` object to handle array values. */
63
+ constructor(type: any, mode: any);
64
64
  }
65
65
  export {};
@@ -22,15 +22,15 @@
22
22
  * ```
23
23
  */
24
24
  export class ParamTypes {
25
- enqueue: boolean;
26
- typeQueue: any[];
27
- defaultTypes: {};
28
- types: any;
29
- /**
30
- * Registers a parameter type
31
- *
32
- * End users should call [[UrlMatcherFactory.type]], which delegates to this method.
33
- */
34
- type(name: any, definition: any, definitionFn: any): any;
35
- _flushTypeQueue(): void;
25
+ enqueue: boolean;
26
+ typeQueue: any[];
27
+ defaultTypes: {};
28
+ types: any;
29
+ /**
30
+ * Registers a parameter type
31
+ *
32
+ * End users should call [[UrlMatcherFactory.type]], which delegates to this method.
33
+ */
34
+ type(name: any, definition: any, definitionFn: any): any;
35
+ _flushTypeQueue(): void;
36
36
  }
@@ -1,41 +1,41 @@
1
1
  export class Param {
2
- static values(params: any, values?: {}): {};
3
- /**
4
- * Finds [[Param]] objects which have different param values
5
- *
6
- * Filters a list of [[Param]] objects to only those whose parameter values differ in two param value objects
7
- *
8
- * @param params: The list of Param objects to filter
9
- * @param values1: The first set of parameter values
10
- * @param values2: the second set of parameter values
11
- *
12
- * @returns any Param objects whose values were different between values1 and values2
13
- */
14
- static changed(params: any, values1?: {}, values2?: {}): any;
15
- /**
16
- * Checks if two param value objects are equal (for a set of [[Param]] objects)
17
- *
18
- * @param params The list of [[Param]] objects to check
19
- * @param values1 The first set of param values
20
- * @param values2 The second set of param values
21
- *
22
- * @returns true if the param values in values1 and values2 are equal
23
- */
24
- static equals(params: any, values1?: {}, values2?: {}): boolean;
25
- /** Returns true if a the parameter values are valid, according to the Param definitions */
26
- static validates(params: any, values?: {}): any;
27
- constructor(id: any, type: any, location: any, urlConfig: any, state: any);
28
- isDefaultValue(value: any): any;
29
- /**
30
- * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the
31
- * default value, which may be the result of an injectable function.
32
- */
33
- value(value: any): any;
34
- _defaultValueCache: {
35
- defaultValue: any;
36
- };
37
- isSearch(): boolean;
38
- validates(value: any): boolean;
39
- toString(): string;
2
+ static values(params: any, values?: {}): {};
3
+ /**
4
+ * Finds [[Param]] objects which have different param values
5
+ *
6
+ * Filters a list of [[Param]] objects to only those whose parameter values differ in two param value objects
7
+ *
8
+ * @param params: The list of Param objects to filter
9
+ * @param values1: The first set of parameter values
10
+ * @param values2: the second set of parameter values
11
+ *
12
+ * @returns any Param objects whose values were different between values1 and values2
13
+ */
14
+ static changed(params: any, values1?: {}, values2?: {}): any;
15
+ /**
16
+ * Checks if two param value objects are equal (for a set of [[Param]] objects)
17
+ *
18
+ * @param params The list of [[Param]] objects to check
19
+ * @param values1 The first set of param values
20
+ * @param values2 The second set of param values
21
+ *
22
+ * @returns true if the param values in values1 and values2 are equal
23
+ */
24
+ static equals(params: any, values1?: {}, values2?: {}): boolean;
25
+ /** Returns true if a the parameter values are valid, according to the Param definitions */
26
+ static validates(params: any, values?: {}): any;
27
+ constructor(id: any, type: any, location: any, urlConfig: any, state: any);
28
+ isDefaultValue(value: any): any;
29
+ /**
30
+ * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the
31
+ * default value, which may be the result of an injectable function.
32
+ */
33
+ value(value: any): any;
34
+ _defaultValueCache: {
35
+ defaultValue: any;
36
+ };
37
+ isSearch(): boolean;
38
+ validates(value: any): boolean;
39
+ toString(): string;
40
40
  }
41
41
  export var DefType: any;
@@ -1,12 +1,12 @@
1
1
  export class StateParams {
2
- constructor(params?: {});
3
- /**
4
- * Merges a set of parameters with all parameters inherited between the common parents of the
5
- * current state and a given destination state.
6
- *
7
- * @param {Object} newParams The set of parameters which will be composited with inherited params.
8
- * @param {Object} $current Internal definition of object representing the current state.
9
- * @param {Object} $to Internal definition of object representing state to transition to.
10
- */
11
- $inherit(newParams: any, $current: any, $to: any): any;
2
+ constructor(params?: {});
3
+ /**
4
+ * Merges a set of parameters with all parameters inherited between the common parents of the
5
+ * current state and a given destination state.
6
+ *
7
+ * @param {Object} newParams The set of parameters which will be composited with inherited params.
8
+ * @param {Object} $current Internal definition of object representing the current state.
9
+ * @param {Object} $to Internal definition of object representing state to transition to.
10
+ */
11
+ $inherit(newParams: any, $current: any, $to: any): any;
12
12
  }
@@ -6,40 +6,40 @@
6
6
  * The stateful information includes parameter values and resolve data.
7
7
  */
8
8
  export class PathNode {
9
- constructor(stateOrNode: any);
10
- state: any;
11
- paramSchema: any;
12
- paramValues: any;
13
- resolvables: any;
14
- views: any;
15
- clone(): PathNode;
16
- /** Sets [[paramValues]] for the node, from the values of an object hash */
17
- applyRawParams(params: any): this;
18
- /** Gets a specific [[Param]] metadata that belongs to the node */
19
- parameter(name: any): undefined;
20
- /**
21
- * @returns true if the state and parameter values for another PathNode are
22
- * equal to the state and param values for this PathNode
23
- */
24
- equals(node: any, paramsFn: any): boolean;
25
- /**
26
- * Finds Params with different parameter values on another PathNode.
27
- *
28
- * Given another node (of the same state), finds the parameter values which differ.
29
- * Returns the [[Param]] (schema objects) whose parameter values differ.
30
- *
31
- * Given another node for a different state, returns `false`
32
- *
33
- * @param node The node to compare to
34
- * @param paramsFn A function that returns which parameters should be compared.
35
- * @returns The [[Param]]s which differ, or null if the two nodes are for different states
36
- */
37
- diff(node: any, paramsFn: any): any;
9
+ constructor(stateOrNode: any);
10
+ state: any;
11
+ paramSchema: any;
12
+ paramValues: any;
13
+ resolvables: any;
14
+ views: any;
15
+ clone(): PathNode;
16
+ /** Sets [[paramValues]] for the node, from the values of an object hash */
17
+ applyRawParams(params: any): this;
18
+ /** Gets a specific [[Param]] metadata that belongs to the node */
19
+ parameter(name: any): undefined;
20
+ /**
21
+ * @returns true if the state and parameter values for another PathNode are
22
+ * equal to the state and param values for this PathNode
23
+ */
24
+ equals(node: any, paramsFn: any): boolean;
25
+ /**
26
+ * Finds Params with different parameter values on another PathNode.
27
+ *
28
+ * Given another node (of the same state), finds the parameter values which differ.
29
+ * Returns the [[Param]] (schema objects) whose parameter values differ.
30
+ *
31
+ * Given another node for a different state, returns `false`
32
+ *
33
+ * @param node The node to compare to
34
+ * @param paramsFn A function that returns which parameters should be compared.
35
+ * @returns The [[Param]]s which differ, or null if the two nodes are for different states
36
+ */
37
+ diff(node: any, paramsFn: any): any;
38
38
  }
39
39
  export namespace PathNode {
40
- /**
41
- * Returns a clone of the PathNode
42
- * @deprecated use instance method `node.clone()`
43
- */
44
- function clone(node: any): any;
40
+ /**
41
+ * Returns a clone of the PathNode
42
+ * @deprecated use instance method `node.clone()`
43
+ */
44
+ function clone(node: any): any;
45
45
  }
@@ -2,82 +2,78 @@
2
2
  * This class contains functions which convert TargetStates, Nodes and paths from one type to another.
3
3
  */
4
4
  export class PathUtils {
5
- /** Given a PathNode[], create an TargetState */
6
- static makeTargetState(registry: any, path: any): TargetState;
7
- static buildPath(targetState: any): any;
8
- /** Given a fromPath: PathNode[] and a TargetState, builds a toPath: PathNode[] */
9
- static buildToPath(fromPath: any, targetState: any): any;
10
- /**
11
- * Creates ViewConfig objects and adds to nodes.
12
- *
13
- * On each [[PathNode]], creates ViewConfig objects from the views: property of the node's state
14
- */
15
- static applyViewConfigs($view: any, path: any, states: any): void;
16
- /**
17
- * Given a fromPath and a toPath, returns a new to path which inherits parameters from the fromPath
18
- *
19
- * For a parameter in a node to be inherited from the from path:
20
- * - The toPath's node must have a matching node in the fromPath (by state).
21
- * - The parameter name must not be found in the toKeys parameter array.
22
- *
23
- * Note: the keys provided in toKeys are intended to be those param keys explicitly specified by some
24
- * caller, for instance, $state.transitionTo(..., toParams). If a key was found in toParams,
25
- * it is not inherited from the fromPath.
26
- */
27
- static inheritParams(fromPath: any, toPath: any, toKeys?: any[]): any;
28
- /**
29
- * Computes the tree changes (entering, exiting) between a fromPath and toPath.
30
- */
31
- static treeChanges(
32
- fromPath: any,
33
- toPath: any,
34
- reloadState: any,
35
- ): {
36
- from: any;
37
- to: any;
38
- retained: any;
39
- retainedWithToParams: any;
40
- exiting: any;
41
- entering: any;
42
- };
43
- /**
44
- * Returns a new path which is: the subpath of the first path which matches the second path.
45
- *
46
- * The new path starts from root and contains any nodes that match the nodes in the second path.
47
- * It stops before the first non-matching node.
48
- *
49
- * Nodes are compared using their state property and their parameter values.
50
- * If a `paramsFn` is provided, only the [[Param]] returned by the function will be considered when comparing nodes.
51
- *
52
- * @param pathA the first path
53
- * @param pathB the second path
54
- * @param paramsFn a function which returns the parameters to consider when comparing
55
- *
56
- * @returns an array of PathNodes from the first path which match the nodes in the second path
57
- */
58
- static matching(pathA: any, pathB: any, paramsFn: any): any[];
59
- /**
60
- * Returns true if two paths are identical.
61
- *
62
- * @param pathA
63
- * @param pathB
64
- * @param paramsFn a function which returns the parameters to consider when comparing
65
- * @returns true if the the states and parameter values for both paths are identical
66
- */
67
- static equals(pathA: any, pathB: any, paramsFn: any): boolean;
68
- /**
69
- * Return a subpath of a path, which stops at the first matching node
70
- *
71
- * Given an array of nodes, returns a subset of the array starting from the first node,
72
- * stopping when the first node matches the predicate.
73
- *
74
- * @param path a path of [[PathNode]]s
75
- * @param predicate a [[Predicate]] fn that matches [[PathNode]]s
76
- * @returns a subpath up to the matching node, or undefined if no match is found
77
- */
78
- static subPath(path: any, predicate: any): any;
79
- static nonDynamicParams(node: any): any;
80
- /** Gets the raw parameter values from a path */
81
- static paramValues(path: any): any;
5
+ /** Given a PathNode[], create an TargetState */
6
+ static makeTargetState(registry: any, path: any): TargetState;
7
+ static buildPath(targetState: any): any;
8
+ /** Given a fromPath: PathNode[] and a TargetState, builds a toPath: PathNode[] */
9
+ static buildToPath(fromPath: any, targetState: any): any;
10
+ /**
11
+ * Creates ViewConfig objects and adds to nodes.
12
+ *
13
+ * On each [[PathNode]], creates ViewConfig objects from the views: property of the node's state
14
+ */
15
+ static applyViewConfigs($view: any, path: any, states: any): void;
16
+ /**
17
+ * Given a fromPath and a toPath, returns a new to path which inherits parameters from the fromPath
18
+ *
19
+ * For a parameter in a node to be inherited from the from path:
20
+ * - The toPath's node must have a matching node in the fromPath (by state).
21
+ * - The parameter name must not be found in the toKeys parameter array.
22
+ *
23
+ * Note: the keys provided in toKeys are intended to be those param keys explicitly specified by some
24
+ * caller, for instance, $state.transitionTo(..., toParams). If a key was found in toParams,
25
+ * it is not inherited from the fromPath.
26
+ */
27
+ static inheritParams(fromPath: any, toPath: any, toKeys?: any[]): any;
28
+ /**
29
+ * Computes the tree changes (entering, exiting) between a fromPath and toPath.
30
+ */
31
+ static treeChanges(fromPath: any, toPath: any, reloadState: any): {
32
+ from: any;
33
+ to: any;
34
+ retained: any;
35
+ retainedWithToParams: any;
36
+ exiting: any;
37
+ entering: any;
38
+ };
39
+ /**
40
+ * Returns a new path which is: the subpath of the first path which matches the second path.
41
+ *
42
+ * The new path starts from root and contains any nodes that match the nodes in the second path.
43
+ * It stops before the first non-matching node.
44
+ *
45
+ * Nodes are compared using their state property and their parameter values.
46
+ * If a `paramsFn` is provided, only the [[Param]] returned by the function will be considered when comparing nodes.
47
+ *
48
+ * @param pathA the first path
49
+ * @param pathB the second path
50
+ * @param paramsFn a function which returns the parameters to consider when comparing
51
+ *
52
+ * @returns an array of PathNodes from the first path which match the nodes in the second path
53
+ */
54
+ static matching(pathA: any, pathB: any, paramsFn: any): any[];
55
+ /**
56
+ * Returns true if two paths are identical.
57
+ *
58
+ * @param pathA
59
+ * @param pathB
60
+ * @param paramsFn a function which returns the parameters to consider when comparing
61
+ * @returns true if the the states and parameter values for both paths are identical
62
+ */
63
+ static equals(pathA: any, pathB: any, paramsFn: any): boolean;
64
+ /**
65
+ * Return a subpath of a path, which stops at the first matching node
66
+ *
67
+ * Given an array of nodes, returns a subset of the array starting from the first node,
68
+ * stopping when the first node matches the predicate.
69
+ *
70
+ * @param path a path of [[PathNode]]s
71
+ * @param predicate a [[Predicate]] fn that matches [[PathNode]]s
72
+ * @returns a subpath up to the matching node, or undefined if no match is found
73
+ */
74
+ static subPath(path: any, predicate: any): any;
75
+ static nonDynamicParams(node: any): any;
76
+ /** Gets the raw parameter values from a path */
77
+ static paramValues(path: any): any;
82
78
  }
83
79
  import { TargetState } from "../state/target-state";
@@ -1,6 +1,6 @@
1
1
  export namespace defaultResolvePolicy {
2
- let when: string;
3
- let async: string;
2
+ let when: string;
3
+ let async: string;
4
4
  }
5
5
  /**
6
6
  * The basic building block for the resolve system.
@@ -15,36 +15,36 @@ export namespace defaultResolvePolicy {
15
15
  * parameter to those fns.
16
16
  */
17
17
  export class Resolvable {
18
- constructor(arg1: any, resolveFn: any, deps: any, policy: any, data: any);
19
- resolved: boolean;
20
- promise: any;
21
- token: any;
22
- policy: any;
23
- resolveFn: any;
24
- deps: any;
25
- data: any;
26
- getPolicy(state: any): {
27
- when: any;
28
- async: any;
29
- };
30
- /**
31
- * Asynchronously resolve this Resolvable's data
32
- *
33
- * Given a ResolveContext that this Resolvable is found in:
34
- * Wait for this Resolvable's dependencies, then invoke this Resolvable's function
35
- * and update the Resolvable's state
36
- */
37
- resolve(resolveContext: any, trans: any): any;
38
- /**
39
- * Gets a promise for this Resolvable's data.
40
- *
41
- * Fetches the data and returns a promise.
42
- * Returns the existing promise if it has already been fetched once.
43
- */
44
- get(resolveContext: any, trans: any): any;
45
- toString(): string;
46
- clone(): Resolvable;
18
+ constructor(arg1: any, resolveFn: any, deps: any, policy: any, data: any);
19
+ resolved: boolean;
20
+ promise: any;
21
+ token: any;
22
+ policy: any;
23
+ resolveFn: any;
24
+ deps: any;
25
+ data: any;
26
+ getPolicy(state: any): {
27
+ when: any;
28
+ async: any;
29
+ };
30
+ /**
31
+ * Asynchronously resolve this Resolvable's data
32
+ *
33
+ * Given a ResolveContext that this Resolvable is found in:
34
+ * Wait for this Resolvable's dependencies, then invoke this Resolvable's function
35
+ * and update the Resolvable's state
36
+ */
37
+ resolve(resolveContext: any, trans: any): any;
38
+ /**
39
+ * Gets a promise for this Resolvable's data.
40
+ *
41
+ * Fetches the data and returns a promise.
42
+ * Returns the existing promise if it has already been fetched once.
43
+ */
44
+ get(resolveContext: any, trans: any): any;
45
+ toString(): string;
46
+ clone(): Resolvable;
47
47
  }
48
48
  export namespace Resolvable {
49
- function fromData(token: any, data: any): Resolvable;
49
+ function fromData(token: any, data: any): Resolvable;
50
50
  }