blob: d6435419e0558e11bd0cfec2fb04cca99d821359 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
/**
* DO NOT EDIT
*
* This file was automatically generated by
* https://github.com/Polymer/gen-typescript-declarations
*
* To modify these typings, edit the source file(s):
* app-route-converter.html
*/
/// <reference path="../polymer/types/polymer.d.ts" />
/// <reference path="app-route-converter-behavior.d.ts" />
/**
* `app-route-converter` provides a means to convert a path and query
* parameters into a route object and vice versa. This produced route object
* is to be fed into route-consuming elements such as `app-route`.
*
* > n.b. This element is intended to be a primitive of the routing system and for
* creating bespoke routing solutions from scratch. To simply include routing in
* an app, please refer to [app-location](https://github.com/PolymerElements/app-route/blob/master/app-location.html)
* and [app-route](https://github.com/PolymerElements/app-route/blob/master/app-route.html).
*
* An example of a route object that describes
* `https://elements.polymer-project.org/elements/app-route-converter?foo=bar&baz=qux`
* and should be passed to other `app-route` elements:
*
* {
* prefix: '',
* path: '/elements/app-route-converter',
* __queryParams: {
* foo: 'bar',
* baz: 'qux'
* }
* }
*
* `__queryParams` is private to discourage directly data-binding to it. This is so
* that routing elements like `app-route` can intermediate changes to the query
* params and choose whether to propagate them upstream or not. `app-route` for
* example will not propagate changes to its `queryParams` property if it is not
* currently active. A public queryParams object will also be produced in which you
* should perform data-binding operations.
*
* Example Usage:
*
* <iron-location path="{{path}}" query="{{query}}"></iron-location>
* <iron-query-params
* params-string="{{query}}"
* params-object="{{queryParams}}">
* </iron-query-params>
* <app-route-converter
* path="{{path}}"
* query-params="{{queryParams}}"
* route="{{route}}">
* </app-route-converter>
* <app-route route='{{route}}' pattern='/:page' data='{{data}}'>
* </app-route>
*
* This is a simplified implementation of the `app-location` element. Here the
* `iron-location` produces a path and a query, the `iron-query-params` consumes
* the query and produces a queryParams object, and the `app-route-converter`
* consumes the path and the query params and converts it into a route which is in
* turn is consumed by the `app-route`.
*/
interface AppRouteConverterElement extends Polymer.Element, Polymer.AppRouteConverterBehavior {
}
interface HTMLElementTagNameMap {
"app-route-converter": AppRouteConverterElement;
}
|