@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
@@ -12,89 +12,89 @@
12
12
  * This API is found at `router.urlService.config` (see: [[UIRouter.urlService]], [[URLService.config]])
13
13
  */
14
14
  export class UrlConfigProvider {
15
- /** @type {ParamTypes} */
16
- paramTypes: ParamTypes;
17
- /** @type {boolean} */
18
- _isCaseInsensitive: boolean;
19
- /** @type {boolean} */
20
- _isStrictMode: boolean;
21
- /** @type {boolean} */
22
- _defaultSquashPolicy: boolean;
23
- $get: (() => any)[];
24
- /**
25
- * Defines whether URL matching should be case sensitive (the default behavior), or not.
26
- *
27
- * #### Example:
28
- * ```js
29
- * // Allow case insensitive url matches
30
- * urlService.config.caseInsensitive(true);
31
- * ```
32
- *
33
- * @param value `false` to match URL in a case sensitive manner; otherwise `true`;
34
- * @returns the current value of caseInsensitive
35
- */
36
- caseInsensitive(value: any): any;
37
- /**
38
- * Sets the default behavior when generating or matching URLs with default parameter values.
39
- *
40
- * #### Example:
41
- * ```js
42
- * // Remove default parameter values from the url
43
- * urlService.config.defaultSquashPolicy(true);
44
- * ```
45
- *
46
- * @param value A string that defines the default parameter URL squashing behavior.
47
- * - `nosquash`: When generating an href with a default parameter value, do not squash the parameter value from the URL
48
- * - `slash`: When generating an href with a default parameter value, squash (remove) the parameter value, and, if the
49
- * parameter is surrounded by slashes, squash (remove) one slash from the URL
50
- * - any other string, e.g. "~": When generating an href with a default parameter value, squash (remove)
51
- * the parameter value from the URL and replace it with this string.
52
- * @returns the current value of defaultSquashPolicy
53
- */
54
- defaultSquashPolicy(value: any): any;
55
- /**
56
- * Defines whether URLs should match trailing slashes, or not (the default behavior).
57
- *
58
- * #### Example:
59
- * ```js
60
- * // Allow optional trailing slashes
61
- * urlService.config.strictMode(false);
62
- * ```
63
- *
64
- * @param value `false` to match trailing slashes in URLs, otherwise `true`.
65
- * @returns the current value of strictMode
66
- */
67
- strictMode(value: any): any;
68
- /**
69
- * Creates and registers a custom [[ParamType]] object
70
- *
71
- * A custom parameter type can be used to generate URLs with typed parameters or custom encoding/decoding.
72
- *
73
- * #### Note: Register custom types *before using them* in a state definition.
74
- *
75
- * #### Example:
76
- * ```js
77
- * // Encode object parameter as JSON string
78
- * urlService.config.type('myjson', {
79
- * encode: (obj) => JSON.stringify(obj),
80
- * decode: (str) => JSON.parse(str),
81
- * is: (val) => typeof(val) === 'object',
82
- * pattern: /[^/]+/,
83
- * equals: (a, b) => _.isEqual(a, b),
84
- * });
85
- * ```
86
- *
87
- * See [[ParamTypeDefinition]] for more examples
88
- *
89
- * @param name The type name.
90
- * @param definition The type definition. See [[ParamTypeDefinition]] for information on the values accepted.
91
- * @param definitionFn A function that is injected before the app runtime starts.
92
- * The result of this function should be a [[ParamTypeDefinition]].
93
- * The result is merged into the existing `definition`.
94
- * See [[ParamType]] for information on the values accepted.
95
- *
96
- * @returns if only the `name` parameter was specified: the currently registered [[ParamType]] object, or undefined
97
- */
98
- type(name: any, definition: any, definitionFn: any): any;
15
+ /** @type {ParamTypes} */
16
+ paramTypes: ParamTypes;
17
+ /** @type {boolean} */
18
+ _isCaseInsensitive: boolean;
19
+ /** @type {boolean} */
20
+ _isStrictMode: boolean;
21
+ /** @type {boolean} */
22
+ _defaultSquashPolicy: boolean;
23
+ $get: (() => any)[];
24
+ /**
25
+ * Defines whether URL matching should be case sensitive (the default behavior), or not.
26
+ *
27
+ * #### Example:
28
+ * ```js
29
+ * // Allow case insensitive url matches
30
+ * urlService.config.caseInsensitive(true);
31
+ * ```
32
+ *
33
+ * @param value `false` to match URL in a case sensitive manner; otherwise `true`;
34
+ * @returns the current value of caseInsensitive
35
+ */
36
+ caseInsensitive(value: any): any;
37
+ /**
38
+ * Sets the default behavior when generating or matching URLs with default parameter values.
39
+ *
40
+ * #### Example:
41
+ * ```js
42
+ * // Remove default parameter values from the url
43
+ * urlService.config.defaultSquashPolicy(true);
44
+ * ```
45
+ *
46
+ * @param value A string that defines the default parameter URL squashing behavior.
47
+ * - `nosquash`: When generating an href with a default parameter value, do not squash the parameter value from the URL
48
+ * - `slash`: When generating an href with a default parameter value, squash (remove) the parameter value, and, if the
49
+ * parameter is surrounded by slashes, squash (remove) one slash from the URL
50
+ * - any other string, e.g. "~": When generating an href with a default parameter value, squash (remove)
51
+ * the parameter value from the URL and replace it with this string.
52
+ * @returns the current value of defaultSquashPolicy
53
+ */
54
+ defaultSquashPolicy(value: any): any;
55
+ /**
56
+ * Defines whether URLs should match trailing slashes, or not (the default behavior).
57
+ *
58
+ * #### Example:
59
+ * ```js
60
+ * // Allow optional trailing slashes
61
+ * urlService.config.strictMode(false);
62
+ * ```
63
+ *
64
+ * @param value `false` to match trailing slashes in URLs, otherwise `true`.
65
+ * @returns the current value of strictMode
66
+ */
67
+ strictMode(value: any): any;
68
+ /**
69
+ * Creates and registers a custom [[ParamType]] object
70
+ *
71
+ * A custom parameter type can be used to generate URLs with typed parameters or custom encoding/decoding.
72
+ *
73
+ * #### Note: Register custom types *before using them* in a state definition.
74
+ *
75
+ * #### Example:
76
+ * ```js
77
+ * // Encode object parameter as JSON string
78
+ * urlService.config.type('myjson', {
79
+ * encode: (obj) => JSON.stringify(obj),
80
+ * decode: (str) => JSON.parse(str),
81
+ * is: (val) => typeof(val) === 'object',
82
+ * pattern: /[^/]+/,
83
+ * equals: (a, b) => _.isEqual(a, b),
84
+ * });
85
+ * ```
86
+ *
87
+ * See [[ParamTypeDefinition]] for more examples
88
+ *
89
+ * @param name The type name.
90
+ * @param definition The type definition. See [[ParamTypeDefinition]] for information on the values accepted.
91
+ * @param definitionFn A function that is injected before the app runtime starts.
92
+ * The result of this function should be a [[ParamTypeDefinition]].
93
+ * The result is merged into the existing `definition`.
94
+ * See [[ParamType]] for information on the values accepted.
95
+ *
96
+ * @returns if only the `name` parameter was specified: the currently registered [[ParamType]] object, or undefined
97
+ */
98
+ type(name: any, definition: any, definitionFn: any): any;
99
99
  }
100
100
  import { ParamTypes } from "../params/param-types";
@@ -50,126 +50,122 @@
50
50
  *
51
51
  */
52
52
  export class UrlMatcher {
53
- static encodeDashes(str: any): string;
54
- /** @internal Given a matcher, return an array with the matcher's path segments and path params, in order */
55
- static pathSegmentsAndParams(matcher: any): any;
56
- /** @internal Given a matcher, return an array with the matcher's query params */
57
- static queryParams(matcher: any): any;
58
- /**
59
- * Compare two UrlMatchers
60
- *
61
- * This comparison function converts a UrlMatcher into static and dynamic path segments.
62
- * Each static path segment is a static string between a path separator (slash character).
63
- * Each dynamic segment is a path parameter.
64
- *
65
- * The comparison function sorts static segments before dynamic ones.
66
- */
67
- static compare(a: any, b: any): number;
68
- /**
69
- * @param pattern The pattern to compile into a matcher.
70
- * @param paramTypes The [[ParamTypes]] registry
71
- * @param paramFactory A [[ParamFactory]] object
72
- * @param config A [[UrlMatcherCompileConfig]] configuration object
73
- */
74
- constructor(pattern: any, paramTypes: any, paramFactory: any, config: any);
75
- _cache: {
76
- path: this[];
77
- };
78
- _children: any[];
79
- _params: any[];
80
- _segments: any[];
81
- _compiled: any[];
82
- config: any;
83
- pattern: any;
84
- /**
85
- * Creates a new concatenated UrlMatcher
86
- *
87
- * Builds a new UrlMatcher by appending another UrlMatcher to this one.
88
- *
89
- * @param url A `UrlMatcher` instance to append as a child of the current `UrlMatcher`.
90
- */
91
- append(url: any): any;
92
- isRoot(): boolean;
93
- /** Returns the input pattern string */
94
- toString(): any;
95
- _getDecodedParamValue(value: any, param: any): any;
96
- /**
97
- * Tests the specified url/path against this matcher.
98
- *
99
- * Tests if the given url matches this matcher's pattern, and returns an object containing the captured
100
- * parameter values. Returns null if the path does not match.
101
- *
102
- * The returned object contains the values
103
- * of any search parameters that are mentioned in the pattern, but their value may be null if
104
- * they are not present in `search`. This means that search parameters are always treated
105
- * as optional.
106
- *
107
- * #### Example:
108
- * ```js
109
- * new UrlMatcher('/user/{id}?q&r').exec('/user/bob', {
110
- * x: '1', q: 'hello'
111
- * });
112
- * // returns { id: 'bob', q: 'hello', r: null }
113
- * ```
114
- *
115
- * @param path The URL path to match, e.g. `$location.path()`.
116
- * @param search URL search parameters, e.g. `$location.search()`.
117
- * @param hash URL hash e.g. `$location.hash()`.
118
- *
119
- * @returns The captured parameter values.
120
- */
121
- exec(
122
- path: any,
123
- search: {},
124
- hash: any,
125
- ): {
126
- "#": any;
127
- };
128
- /**
129
- * @internal
130
- * Returns all the [[Param]] objects of all path and search parameters of this pattern in order of appearance.
131
- *
132
- * @returns {Array.<Param>} An array of [[Param]] objects. Must be treated as read-only. If the
133
- * pattern has no parameters, an empty array is returned.
134
- */
135
- parameters(opts?: {}): Array<Param>;
136
- /**
137
- * @internal
138
- * Returns a single parameter from this UrlMatcher by id
139
- *
140
- * @param id
141
- * @param opts
142
- * @returns {T|Param|any|boolean|UrlMatcher|null}
143
- */
144
- parameter(id: any, opts?: {}): T | Param | any | boolean | UrlMatcher | null;
145
- /**
146
- * Validates the input parameter values against this UrlMatcher
147
- *
148
- * Checks an object hash of parameters to validate their correctness according to the parameter
149
- * types of this `UrlMatcher`.
150
- *
151
- * @param params The object hash of parameters to validate.
152
- * @returns Returns `true` if `params` validates, otherwise `false`.
153
- */
154
- validates(params: any): any;
155
- /**
156
- * Given a set of parameter values, creates a URL from this UrlMatcher.
157
- *
158
- * Creates a URL that matches this pattern by substituting the specified values
159
- * for the path and search parameters.
160
- *
161
- * #### Example:
162
- * ```js
163
- * new UrlMatcher('/user/{id}?q').format({ id:'bob', q:'yes' });
164
- * // returns '/user/bob?q=yes'
165
- * ```
166
- *
167
- * @param values the values to substitute for the parameters in this pattern.
168
- * @returns the formatted URL (path and optionally search part).
169
- */
170
- format(values?: {}): string;
53
+ static encodeDashes(str: any): string;
54
+ /** @internal Given a matcher, return an array with the matcher's path segments and path params, in order */
55
+ static pathSegmentsAndParams(matcher: any): any;
56
+ /** @internal Given a matcher, return an array with the matcher's query params */
57
+ static queryParams(matcher: any): any;
58
+ /**
59
+ * Compare two UrlMatchers
60
+ *
61
+ * This comparison function converts a UrlMatcher into static and dynamic path segments.
62
+ * Each static path segment is a static string between a path separator (slash character).
63
+ * Each dynamic segment is a path parameter.
64
+ *
65
+ * The comparison function sorts static segments before dynamic ones.
66
+ */
67
+ static compare(a: any, b: any): number;
68
+ /**
69
+ * @param pattern The pattern to compile into a matcher.
70
+ * @param paramTypes The [[ParamTypes]] registry
71
+ * @param paramFactory A [[ParamFactory]] object
72
+ * @param config A [[UrlMatcherCompileConfig]] configuration object
73
+ */
74
+ constructor(pattern: any, paramTypes: any, paramFactory: any, config: any);
75
+ _cache: {
76
+ path: this[];
77
+ };
78
+ _children: any[];
79
+ _params: any[];
80
+ _segments: any[];
81
+ _compiled: any[];
82
+ config: any;
83
+ pattern: any;
84
+ /**
85
+ * Creates a new concatenated UrlMatcher
86
+ *
87
+ * Builds a new UrlMatcher by appending another UrlMatcher to this one.
88
+ *
89
+ * @param url A `UrlMatcher` instance to append as a child of the current `UrlMatcher`.
90
+ */
91
+ append(url: any): any;
92
+ isRoot(): boolean;
93
+ /** Returns the input pattern string */
94
+ toString(): any;
95
+ _getDecodedParamValue(value: any, param: any): any;
96
+ /**
97
+ * Tests the specified url/path against this matcher.
98
+ *
99
+ * Tests if the given url matches this matcher's pattern, and returns an object containing the captured
100
+ * parameter values. Returns null if the path does not match.
101
+ *
102
+ * The returned object contains the values
103
+ * of any search parameters that are mentioned in the pattern, but their value may be null if
104
+ * they are not present in `search`. This means that search parameters are always treated
105
+ * as optional.
106
+ *
107
+ * #### Example:
108
+ * ```js
109
+ * new UrlMatcher('/user/{id}?q&r').exec('/user/bob', {
110
+ * x: '1', q: 'hello'
111
+ * });
112
+ * // returns { id: 'bob', q: 'hello', r: null }
113
+ * ```
114
+ *
115
+ * @param path The URL path to match, e.g. `$location.path()`.
116
+ * @param search URL search parameters, e.g. `$location.search()`.
117
+ * @param hash URL hash e.g. `$location.hash()`.
118
+ *
119
+ * @returns The captured parameter values.
120
+ */
121
+ exec(path: any, search: {}, hash: any): {
122
+ "#": any;
123
+ };
124
+ /**
125
+ * @internal
126
+ * Returns all the [[Param]] objects of all path and search parameters of this pattern in order of appearance.
127
+ *
128
+ * @returns {Array.<Param>} An array of [[Param]] objects. Must be treated as read-only. If the
129
+ * pattern has no parameters, an empty array is returned.
130
+ */
131
+ parameters(opts?: {}): Array<Param>;
132
+ /**
133
+ * @internal
134
+ * Returns a single parameter from this UrlMatcher by id
135
+ *
136
+ * @param id
137
+ * @param opts
138
+ * @returns {T|Param|any|boolean|UrlMatcher|null}
139
+ */
140
+ parameter(id: any, opts?: {}): T | Param | any | boolean | UrlMatcher | null;
141
+ /**
142
+ * Validates the input parameter values against this UrlMatcher
143
+ *
144
+ * Checks an object hash of parameters to validate their correctness according to the parameter
145
+ * types of this `UrlMatcher`.
146
+ *
147
+ * @param params The object hash of parameters to validate.
148
+ * @returns Returns `true` if `params` validates, otherwise `false`.
149
+ */
150
+ validates(params: any): any;
151
+ /**
152
+ * Given a set of parameter values, creates a URL from this UrlMatcher.
153
+ *
154
+ * Creates a URL that matches this pattern by substituting the specified values
155
+ * for the path and search parameters.
156
+ *
157
+ * #### Example:
158
+ * ```js
159
+ * new UrlMatcher('/user/{id}?q').format({ id:'bob', q:'yes' });
160
+ * // returns '/user/bob?q=yes'
161
+ * ```
162
+ *
163
+ * @param values the values to substitute for the parameters in this pattern.
164
+ * @returns the formatted URL (path and optionally search part).
165
+ */
166
+ format(values?: {}): string;
171
167
  }
172
168
  export namespace UrlMatcher {
173
- let nameValidator: RegExp;
169
+ let nameValidator: RegExp;
174
170
  }
175
171
  import { Param } from "../params/param";