-
Notifications
You must be signed in to change notification settings - Fork 1
/
demo.html
99 lines (84 loc) · 3.07 KB
/
demo.html
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>lens-data-join Demo</title>
<script src="../webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="lens-data-join.html">
<style>
body {
font-family: sans-serif;
font-size: 14px;
}
pre {
border: 1px solid #EEE;
font-size: 12px;
max-width: 300px;
max-height: 300px;
overflow: scroll;
}
#component {
border: 1px solid #BBB;
margin: 10px;
padding: 5px;
display: block;
width: 300px;
}
.component::before, .component::after {
content: '\2794';
position: absolute;
top: 50%;
}
.component::before {
right: -15px;
}
.component::after {
left: -15px;
}
section {
display: inline-block;
margin: 8px;
vertical-align: top;
position: relative;
}
html /deep/ input[is=core-input] {
border-bottom: 1px solid #E5E5E5 !important;
}
</style>
<script>
// helper function to stringify objects, used below like {{outputs | json}}
PolymerExpressions.prototype.json = function(object) {
return JSON.stringify(object, undefined, 2);
};
</script>
</head>
<body unresolved>
<template id="auto-bind-demo" is="auto-binding">
<section>
<label>Input:</label>
<pre id="input">{{myinput | json}}</pre>
</section>
<section class="component">
<label>Component:</label>
<lens-data-join id="component" input="{{myinput}}" output="{{myoutput}}"></lens-data-join>
</section>
<section>
<label>Output:</label>
<pre id="output">{{myoutput | json}}</pre>
</section>
<script>
// input data
var input = new Object([
{"index":1, "text":"Texas","dollar":"$139,000","text_number":"125 1ST ST","percent":"12.2%","date":"2-12-2015","date_unformat":"2-12-2015","billion":"1.2B"},
{"index":2, "text":"Vermont","dollar":"$15,300","text_number":"$126,000 Reward","percent":"0.6%","date":"2-12-2010","date_unformat":"12/25/1995","billion":".2B"},
{"index":3, "text":"New York","dollar":"$205,800","text_number":"2nd Place","percent":"1.5%","date":"5-12-2015","date_unformat":"February 20, 2015","billion":"1.2B"},
{"index":4, "text":"New Mexico","dollar":"$1,180,700","text_number":"only text","percent":"1.5%","date":"12-12-2012","date_unformat":"Jan 20, 2015","billion":"0.5B"},
{"index":5, "text":"California","dollar":"$188,400","text_number":"$ value","percent":"-0.4%","date":"1-1-2015","date_unformat":"3-3-2015","billion":"11B"},
{"index":6, "text":"Alaska","dollar":"$145,900","text_number":"Q3 2012","percent":"3.3%","date":"10-30-1915","date_unformat":"4/4/2015","billion":"9B"}
]);
//set the input
component.input = input;
</script>
</template>
</body>
</html>