##// END OF EJS Templates
js: migrate to polymer 3.x
ergo -
r3173:b3d618e2 default
parent child Browse files
Show More
@@ -45,6 +45,16 b''
45 "style-loader": "^0.21.0",
45 "style-loader": "^0.21.0",
46 "webpack-uglify-js-plugin": "^1.1.9",
46 "webpack-uglify-js-plugin": "^1.1.9",
47 "raw-loader": "1.0.0-beta.0",
47 "raw-loader": "1.0.0-beta.0",
48 "ts-loader": "^1.3.3"
48 "ts-loader": "^1.3.3",
49 "@webcomponents/webcomponentsjs": "^2.0.0",
50 "@polymer/polymer": "^3.0.0",
51 "@polymer/paper-button": "^3.0.0",
52 "@polymer/paper-spinner": "^3.0.0",
53 "@polymer/paper-tooltip": "^3.0.0",
54 "@polymer/paper-toast": "^3.0.0",
55 "@polymer/paper-toggle-button": "^3.0.0",
56 "@polymer/iron-ajax": "^3.0.0",
57 "@polymer/iron-autogrow-textarea": "^3.0.0",
58 "@polymer/iron-a11y-keys": "^3.0.0"
49 }
59 }
50 }
60 }
@@ -4,6 +4,222 b''
4
4
5 let
5 let
6 sources = {
6 sources = {
7 "@polymer/font-roboto-3.0.2" = {
8 name = "_at_polymer_slash_font-roboto";
9 packageName = "@polymer/font-roboto";
10 version = "3.0.2";
11 src = fetchurl {
12 url = "https://registry.npmjs.org/@polymer/font-roboto/-/font-roboto-3.0.2.tgz";
13 sha512 = "tx5TauYSmzsIvmSqepUPDYbs4/Ejz2XbZ1IkD7JEGqkdNUJlh+9KU85G56Tfdk/xjEZ8zorFfN09OSwiMrIQWA==";
14 };
15 };
16 "@polymer/iron-a11y-announcer-3.0.1" = {
17 name = "_at_polymer_slash_iron-a11y-announcer";
18 packageName = "@polymer/iron-a11y-announcer";
19 version = "3.0.1";
20 src = fetchurl {
21 url = "https://registry.npmjs.org/@polymer/iron-a11y-announcer/-/iron-a11y-announcer-3.0.1.tgz";
22 sha512 = "Xiqmpz0AEEbMNGYPpbrXBIrcI/xaR4tn77pmSLfxVKGGwjEUR/YrRgyIwXp4EN7lvst1dFC8kyl2hLga0uDIVQ==";
23 };
24 };
25 "@polymer/iron-a11y-keys-3.0.1" = {
26 name = "_at_polymer_slash_iron-a11y-keys";
27 packageName = "@polymer/iron-a11y-keys";
28 version = "3.0.1";
29 src = fetchurl {
30 url = "https://registry.npmjs.org/@polymer/iron-a11y-keys/-/iron-a11y-keys-3.0.1.tgz";
31 sha512 = "zmTi8xHeY4ZMJLAitW2hAmW5zXZ35hVy/eHQUFadAlOccuBK3oRRmoPRQRaZgpyJrCVFDAQRXXzzJtUDil/0CA==";
32 };
33 };
34 "@polymer/iron-a11y-keys-behavior-3.0.1" = {
35 name = "_at_polymer_slash_iron-a11y-keys-behavior";
36 packageName = "@polymer/iron-a11y-keys-behavior";
37 version = "3.0.1";
38 src = fetchurl {
39 url = "https://registry.npmjs.org/@polymer/iron-a11y-keys-behavior/-/iron-a11y-keys-behavior-3.0.1.tgz";
40 sha512 = "lnrjKq3ysbBPT/74l0Fj0U9H9C35Tpw2C/tpJ8a+5g8Y3YJs1WSZYnEl1yOkw6sEyaxOq/1DkzH0+60gGu5/PQ==";
41 };
42 };
43 "@polymer/iron-ajax-3.0.1" = {
44 name = "_at_polymer_slash_iron-ajax";
45 packageName = "@polymer/iron-ajax";
46 version = "3.0.1";
47 src = fetchurl {
48 url = "https://registry.npmjs.org/@polymer/iron-ajax/-/iron-ajax-3.0.1.tgz";
49 sha512 = "7+TPEAfWsRdhj1Y8UeF1759ktpVu+c3sG16rJiUC3wF9+woQ9xI1zUm2d59i7Yc3aDEJrR/Q8Y262KlOvyGVNg==";
50 };
51 };
52 "@polymer/iron-autogrow-textarea-3.0.1" = {
53 name = "_at_polymer_slash_iron-autogrow-textarea";
54 packageName = "@polymer/iron-autogrow-textarea";
55 version = "3.0.1";
56 src = fetchurl {
57 url = "https://registry.npmjs.org/@polymer/iron-autogrow-textarea/-/iron-autogrow-textarea-3.0.1.tgz";
58 sha512 = "FgSL7APrOSL9Vu812sBCFlQ17hvnJsBAV2C2e1UAiaHhB+dyfLq8gGdGUpqVWuGJ50q4Y/49QwCNnLf85AdVYA==";
59 };
60 };
61 "@polymer/iron-behaviors-3.0.1" = {
62 name = "_at_polymer_slash_iron-behaviors";
63 packageName = "@polymer/iron-behaviors";
64 version = "3.0.1";
65 src = fetchurl {
66 url = "https://registry.npmjs.org/@polymer/iron-behaviors/-/iron-behaviors-3.0.1.tgz";
67 sha512 = "IMEwcv1lhf1HSQxuyWOUIL0lOBwmeaoSTpgCJeP9IBYnuB1SPQngmfRuHKgK6/m9LQ9F9miC7p3HeQQUdKAE0w==";
68 };
69 };
70 "@polymer/iron-checked-element-behavior-3.0.1" = {
71 name = "_at_polymer_slash_iron-checked-element-behavior";
72 packageName = "@polymer/iron-checked-element-behavior";
73 version = "3.0.1";
74 src = fetchurl {
75 url = "https://registry.npmjs.org/@polymer/iron-checked-element-behavior/-/iron-checked-element-behavior-3.0.1.tgz";
76 sha512 = "aDr0cbCNVq49q+pOqa6CZutFh+wWpwPMLpEth9swx+GkAj+gCURhuQkaUYhIo5f2egDbEioR1aeHMnPlU9dQZA==";
77 };
78 };
79 "@polymer/iron-fit-behavior-3.0.1" = {
80 name = "_at_polymer_slash_iron-fit-behavior";
81 packageName = "@polymer/iron-fit-behavior";
82 version = "3.0.1";
83 src = fetchurl {
84 url = "https://registry.npmjs.org/@polymer/iron-fit-behavior/-/iron-fit-behavior-3.0.1.tgz";
85 sha512 = "/M0B1L30k31vmwNBaGuZcxzUAhJSHoGccb/DF0CDKI/hT8UlkTvcyemaWdOpmHHLgY52ceKIkRwA3AeXrKyvaQ==";
86 };
87 };
88 "@polymer/iron-flex-layout-3.0.1" = {
89 name = "_at_polymer_slash_iron-flex-layout";
90 packageName = "@polymer/iron-flex-layout";
91 version = "3.0.1";
92 src = fetchurl {
93 url = "https://registry.npmjs.org/@polymer/iron-flex-layout/-/iron-flex-layout-3.0.1.tgz";
94 sha512 = "7gB869czArF+HZcPTVSgvA7tXYFze9EKckvM95NB7SqYF+NnsQyhoXgKnpFwGyo95lUjUW9TFDLUwDXnCYFtkw==";
95 };
96 };
97 "@polymer/iron-form-element-behavior-3.0.1" = {
98 name = "_at_polymer_slash_iron-form-element-behavior";
99 packageName = "@polymer/iron-form-element-behavior";
100 version = "3.0.1";
101 src = fetchurl {
102 url = "https://registry.npmjs.org/@polymer/iron-form-element-behavior/-/iron-form-element-behavior-3.0.1.tgz";
103 sha512 = "G/e2KXyL5AY7mMjmomHkGpgS0uAf4ovNpKhkuUTRnMuMJuf589bKqE85KN4ovE1Tzhv2hJoh/igyD6ekHiYU1A==";
104 };
105 };
106 "@polymer/iron-meta-3.0.1" = {
107 name = "_at_polymer_slash_iron-meta";
108 packageName = "@polymer/iron-meta";
109 version = "3.0.1";
110 src = fetchurl {
111 url = "https://registry.npmjs.org/@polymer/iron-meta/-/iron-meta-3.0.1.tgz";
112 sha512 = "pWguPugiLYmWFV9UWxLWzZ6gm4wBwQdDy4VULKwdHCqR7OP7u98h+XDdGZsSlDPv6qoryV/e3tGHlTIT0mbzJA==";
113 };
114 };
115 "@polymer/iron-overlay-behavior-3.0.2" = {
116 name = "_at_polymer_slash_iron-overlay-behavior";
117 packageName = "@polymer/iron-overlay-behavior";
118 version = "3.0.2";
119 src = fetchurl {
120 url = "https://registry.npmjs.org/@polymer/iron-overlay-behavior/-/iron-overlay-behavior-3.0.2.tgz";
121 sha512 = "j1qmt6mJHCwpe1mKOvqK5kcCUPQr5LSrlqpgRDbUuLgUfNJ/vGTipjrkBlfbEUagm5FEQdc1VLPLSQP6WVuP9g==";
122 };
123 };
124 "@polymer/iron-resizable-behavior-3.0.1" = {
125 name = "_at_polymer_slash_iron-resizable-behavior";
126 packageName = "@polymer/iron-resizable-behavior";
127 version = "3.0.1";
128 src = fetchurl {
129 url = "https://registry.npmjs.org/@polymer/iron-resizable-behavior/-/iron-resizable-behavior-3.0.1.tgz";
130 sha512 = "FyHxRxFspVoRaeZSWpT3y0C9awomb4tXXolIJcZ7RvXhMP632V5lez+ch5G5SwK0LpnAPkg35eB0LPMFv+YMMQ==";
131 };
132 };
133 "@polymer/iron-validatable-behavior-3.0.1" = {
134 name = "_at_polymer_slash_iron-validatable-behavior";
135 packageName = "@polymer/iron-validatable-behavior";
136 version = "3.0.1";
137 src = fetchurl {
138 url = "https://registry.npmjs.org/@polymer/iron-validatable-behavior/-/iron-validatable-behavior-3.0.1.tgz";
139 sha512 = "wwpYh6wOa4fNI+jH5EYKC7TVPYQ2OfgQqocWat7GsNWcsblKYhLYbwsvEY5nO0n2xKqNfZzDLrUom5INJN7msQ==";
140 };
141 };
142 "@polymer/paper-behaviors-3.0.1" = {
143 name = "_at_polymer_slash_paper-behaviors";
144 packageName = "@polymer/paper-behaviors";
145 version = "3.0.1";
146 src = fetchurl {
147 url = "https://registry.npmjs.org/@polymer/paper-behaviors/-/paper-behaviors-3.0.1.tgz";
148 sha512 = "6knhj69fPJejv8qR0kCSUY+Q0XjaUf0OSnkjRjmTJPAwSrRYtgqE+l6P1FfA+py1X/cUjgne9EF5rMZAKJIg1g==";
149 };
150 };
151 "@polymer/paper-button-3.0.1" = {
152 name = "_at_polymer_slash_paper-button";
153 packageName = "@polymer/paper-button";
154 version = "3.0.1";
155 src = fetchurl {
156 url = "https://registry.npmjs.org/@polymer/paper-button/-/paper-button-3.0.1.tgz";
157 sha512 = "JRNBc+Oj9EWnmyLr7FcCr8T1KAnEHPh6mosln9BUdkM+qYaYsudSICh3cjTIbnj6AuF5OJidoLkM1dlyj0j6Zg==";
158 };
159 };
160 "@polymer/paper-ripple-3.0.1" = {
161 name = "_at_polymer_slash_paper-ripple";
162 packageName = "@polymer/paper-ripple";
163 version = "3.0.1";
164 src = fetchurl {
165 url = "https://registry.npmjs.org/@polymer/paper-ripple/-/paper-ripple-3.0.1.tgz";
166 sha512 = "dgOe12GyCF1VZBLUQqnzGWlf3xb255FajNCVB1VFj/AtskYtoamnafa7m3a+1vs+C8qbg4Benn5KwgxVDSW4cg==";
167 };
168 };
169 "@polymer/paper-spinner-3.0.1" = {
170 name = "_at_polymer_slash_paper-spinner";
171 packageName = "@polymer/paper-spinner";
172 version = "3.0.1";
173 src = fetchurl {
174 url = "https://registry.npmjs.org/@polymer/paper-spinner/-/paper-spinner-3.0.1.tgz";
175 sha512 = "MYIU6qWZnhZ5yNFOBzROPgBteGfxKEnDZ6bCgjrvUtJkBuQEz0MQZzSE/zmZc0oaJ9u5QK5xAFuYdudsGv7+sQ==";
176 };
177 };
178 "@polymer/paper-styles-3.0.1" = {
179 name = "_at_polymer_slash_paper-styles";
180 packageName = "@polymer/paper-styles";
181 version = "3.0.1";
182 src = fetchurl {
183 url = "https://registry.npmjs.org/@polymer/paper-styles/-/paper-styles-3.0.1.tgz";
184 sha512 = "y6hmObLqlCx602TQiSBKHqjwkE7xmDiFkoxdYGaNjtv4xcysOTdVJsDR/R9UHwIaxJ7gHlthMSykir1nv78++g==";
185 };
186 };
187 "@polymer/paper-toast-3.0.1" = {
188 name = "_at_polymer_slash_paper-toast";
189 packageName = "@polymer/paper-toast";
190 version = "3.0.1";
191 src = fetchurl {
192 url = "https://registry.npmjs.org/@polymer/paper-toast/-/paper-toast-3.0.1.tgz";
193 sha512 = "pizuogzObniDdICUc6dSLrnDt2VzzoRne1gCmbD6sfOATVv5tc8UfrqhA2iHngbNBEbniBiciS3iogdp5KTVUQ==";
194 };
195 };
196 "@polymer/paper-toggle-button-3.0.1" = {
197 name = "_at_polymer_slash_paper-toggle-button";
198 packageName = "@polymer/paper-toggle-button";
199 version = "3.0.1";
200 src = fetchurl {
201 url = "https://registry.npmjs.org/@polymer/paper-toggle-button/-/paper-toggle-button-3.0.1.tgz";
202 sha512 = "jadZB60fycT7YnSAH0H23LYo6/2HYmMZTtNr9LpdSIRFPLX6mqqxewex92cFz019bMKaRJgORn308hRlJo2u6A==";
203 };
204 };
205 "@polymer/paper-tooltip-3.0.1" = {
206 name = "_at_polymer_slash_paper-tooltip";
207 packageName = "@polymer/paper-tooltip";
208 version = "3.0.1";
209 src = fetchurl {
210 url = "https://registry.npmjs.org/@polymer/paper-tooltip/-/paper-tooltip-3.0.1.tgz";
211 sha512 = "yiUk09opTEnE1lK+tb501ENb+yQBi4p++Ep0eGJAHesVYKVMPNgPphVKkIizkDaU+n0SE+zXfTsRbYyOMDYXSg==";
212 };
213 };
214 "@polymer/polymer-3.1.0" = {
215 name = "_at_polymer_slash_polymer";
216 packageName = "@polymer/polymer";
217 version = "3.1.0";
218 src = fetchurl {
219 url = "https://registry.npmjs.org/@polymer/polymer/-/polymer-3.1.0.tgz";
220 sha512 = "hwN8IMERsFATz/9dSMxYHL+84J9uBkPuuarxJWlTsppZ4CAYTZKnepBfNrKoyNsafBmA3yXBiiKPPf+fJtza7A==";
221 };
222 };
7 "@types/clone-0.1.30" = {
223 "@types/clone-0.1.30" = {
8 name = "_at_types_slash_clone";
224 name = "_at_types_slash_clone";
9 packageName = "@types/clone";
225 packageName = "@types/clone";
@@ -193,6 +409,24 b' let'
193 sha512 = "mJ3QKWtCchL1vhU/kZlJnLPuQZnlDOdZsyP0bbLWPGdYsQDnSBvyTLhzwBA3QAMlzEL9V4JHygEmK6/OTEyytA==";
409 sha512 = "mJ3QKWtCchL1vhU/kZlJnLPuQZnlDOdZsyP0bbLWPGdYsQDnSBvyTLhzwBA3QAMlzEL9V4JHygEmK6/OTEyytA==";
194 };
410 };
195 };
411 };
412 "@webcomponents/shadycss-1.5.2" = {
413 name = "_at_webcomponents_slash_shadycss";
414 packageName = "@webcomponents/shadycss";
415 version = "1.5.2";
416 src = fetchurl {
417 url = "https://registry.npmjs.org/@webcomponents/shadycss/-/shadycss-1.5.2.tgz";
418 sha512 = "0OyrmVc7S+INtzoqP2ofAo+OdVn2Nj0Qvq4wD9FEGN7nMmLRxaD2mzy6hD6EslzxUSuGH302CDU4KXiY66SEqg==";
419 };
420 };
421 "@webcomponents/webcomponentsjs-2.1.3" = {
422 name = "_at_webcomponents_slash_webcomponentsjs";
423 packageName = "@webcomponents/webcomponentsjs";
424 version = "2.1.3";
425 src = fetchurl {
426 url = "https://registry.npmjs.org/@webcomponents/webcomponentsjs/-/webcomponentsjs-2.1.3.tgz";
427 sha512 = "0UHJNY88lR3pnEYtBVT7F8cuuxOiITQGWJa0LxoELqkBSB7IabzJFOj5K99PajD3CGAsWpjB0CAeijfe376Y1w==";
428 };
429 };
196 "@xtuc/ieee754-1.2.0" = {
430 "@xtuc/ieee754-1.2.0" = {
197 name = "_at_xtuc_slash_ieee754";
431 name = "_at_xtuc_slash_ieee754";
198 packageName = "@xtuc/ieee754";
432 packageName = "@xtuc/ieee754";
@@ -1454,13 +1688,13 b' let'
1454 sha1 = "b534e7c734c4f81ec5fbe8aca2ad24354b962c6c";
1688 sha1 = "b534e7c734c4f81ec5fbe8aca2ad24354b962c6c";
1455 };
1689 };
1456 };
1690 };
1457 "caniuse-db-1.0.30000899" = {
1691 "caniuse-db-1.0.30000900" = {
1458 name = "caniuse-db";
1692 name = "caniuse-db";
1459 packageName = "caniuse-db";
1693 packageName = "caniuse-db";
1460 version = "1.0.30000899";
1694 version = "1.0.30000900";
1461 src = fetchurl {
1695 src = fetchurl {
1462 url = "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000899.tgz";
1696 url = "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000900.tgz";
1463 sha512 = "MSCUohyoLU4/PGapapw/PLQkmQ+sFgzX6e3tM6ue8HX9HW9rBD5gRiAYKhC8r0QkvUE0pWTA8Ze6f3jrzBizVg==";
1697 sha512 = "fvicVRDlhHIQpt/bmbLl3hDHKUZb5ZP8O2OuZLz2fSEPlUBbvwwbhhqhGS617ldN6bDoo9A3+MQKQyFq0p7UXA==";
1464 };
1698 };
1465 };
1699 };
1466 "caniuse-lite-1.0.30000899" = {
1700 "caniuse-lite-1.0.30000899" = {
@@ -7482,6 +7716,30 b' let'
7482 version = "1.0.0";
7716 version = "1.0.0";
7483 src = ./..;
7717 src = ./..;
7484 dependencies = [
7718 dependencies = [
7719 sources."@polymer/font-roboto-3.0.2"
7720 sources."@polymer/iron-a11y-announcer-3.0.1"
7721 sources."@polymer/iron-a11y-keys-3.0.1"
7722 sources."@polymer/iron-a11y-keys-behavior-3.0.1"
7723 sources."@polymer/iron-ajax-3.0.1"
7724 sources."@polymer/iron-autogrow-textarea-3.0.1"
7725 sources."@polymer/iron-behaviors-3.0.1"
7726 sources."@polymer/iron-checked-element-behavior-3.0.1"
7727 sources."@polymer/iron-fit-behavior-3.0.1"
7728 sources."@polymer/iron-flex-layout-3.0.1"
7729 sources."@polymer/iron-form-element-behavior-3.0.1"
7730 sources."@polymer/iron-meta-3.0.1"
7731 sources."@polymer/iron-overlay-behavior-3.0.2"
7732 sources."@polymer/iron-resizable-behavior-3.0.1"
7733 sources."@polymer/iron-validatable-behavior-3.0.1"
7734 sources."@polymer/paper-behaviors-3.0.1"
7735 sources."@polymer/paper-button-3.0.1"
7736 sources."@polymer/paper-ripple-3.0.1"
7737 sources."@polymer/paper-spinner-3.0.1"
7738 sources."@polymer/paper-styles-3.0.1"
7739 sources."@polymer/paper-toast-3.0.1"
7740 sources."@polymer/paper-toggle-button-3.0.1"
7741 sources."@polymer/paper-tooltip-3.0.1"
7742 sources."@polymer/polymer-3.1.0"
7485 sources."@types/clone-0.1.30"
7743 sources."@types/clone-0.1.30"
7486 sources."@types/node-6.14.0"
7744 sources."@types/node-6.14.0"
7487 sources."@types/parse5-2.2.34"
7745 sources."@types/parse5-2.2.34"
@@ -7503,6 +7761,8 b' let'
7503 sources."@webassemblyjs/wasm-parser-1.7.10"
7761 sources."@webassemblyjs/wasm-parser-1.7.10"
7504 sources."@webassemblyjs/wast-parser-1.7.10"
7762 sources."@webassemblyjs/wast-parser-1.7.10"
7505 sources."@webassemblyjs/wast-printer-1.7.10"
7763 sources."@webassemblyjs/wast-printer-1.7.10"
7764 sources."@webcomponents/shadycss-1.5.2"
7765 sources."@webcomponents/webcomponentsjs-2.1.3"
7506 sources."@xtuc/ieee754-1.2.0"
7766 sources."@xtuc/ieee754-1.2.0"
7507 sources."@xtuc/long-4.2.1"
7767 sources."@xtuc/long-4.2.1"
7508 sources."abbrev-1.1.1"
7768 sources."abbrev-1.1.1"
@@ -7716,7 +7976,7 b' let'
7716 sources."browserslist-1.7.7"
7976 sources."browserslist-1.7.7"
7717 ];
7977 ];
7718 })
7978 })
7719 sources."caniuse-db-1.0.30000899"
7979 sources."caniuse-db-1.0.30000900"
7720 sources."caniuse-lite-1.0.30000899"
7980 sources."caniuse-lite-1.0.30000899"
7721 sources."caseless-0.12.0"
7981 sources."caseless-0.12.0"
7722 sources."center-align-0.1.3"
7982 sources."center-align-0.1.3"
@@ -1,38 +1,7 b''
1 <link rel="import" href="../../../../../../bower_components/polymer/polymer.html">
1 import {Polymer, html} from '@polymer/polymer/polymer-legacy';
2 <link rel="import" href="../../../../../../bower_components/iron-ajax/iron-ajax.html">
2 import '@polymer/iron-ajax/iron-ajax.js';
3
4 <!--
5
6 `<channelstream-connection>` allows you to connect and interact with channelstream server
7 abstracting websocket/long-polling connections from you.
8
9 In typical use, just slap some `<channelstream-connection>` at the top of your body:
10
3
11 <body>
4 const elemTemplate = html`
12 <channelstream-connection
13 username="{{user.username}}"
14 connect-url="http://127.0.0.1:8000/demo/connect"
15 disconnect-url="http://127.0.0.1:8000/disconnect"
16 subscribe-url="http://127.0.0.1:8000/demo/subscribe"
17 message-url="http://127.0.0.1:8000/demo/message"
18 long-poll-url="http://127.0.0.1:8000/listen"
19 websocket-url="http://127.0.0.1:8000/ws"
20 channels-url='["channel1", "channel2"]' />
21
22 Then you can do `channelstreamElem.connect()` to kick off your connection.
23 This element also handles automatic reconnections.
24
25 ## Default handlers
26
27 By default element has a listener attached that will fire `startListening()` handler on `channelstream-connected` event.
28
29 By default element has a listener attached that will fire `retryConnection()` handler on `channelstream-connect-error` event,
30 this handler will forever try to re-establish connection to the server incrementing intervals between retries up to 1 minute.
31
32 -->
33 <dom-module id="channelstream-connection">
34 <template>
35
36 <iron-ajax
5 <iron-ajax
37 id="ajaxConnect"
6 id="ajaxConnect"
38 url=""
7 url=""
@@ -100,12 +69,13 b' this handler will forever try to re-esta'
100 on-error="_handleListenError"
69 on-error="_handleListenError"
101 on-response="_handleListenMessageEvent"
70 on-response="_handleListenMessageEvent"
102 debounce-duration="100"></iron-ajax>
71 debounce-duration="100"></iron-ajax>
72 `
103
73
104 </template>
105 <script>
106 Polymer({
74 Polymer({
107 is: 'channelstream-connection',
75 is: 'channelstream-connection',
108
76
77 _template: elemTemplate,
78
109 /**
79 /**
110 * Fired when `channels` array changes.
80 * Fired when `channels` array changes.
111 *
81 *
@@ -605,6 +575,3 b' this handler will forever try to re-esta'
605 this.fire('channelstream-unsubscribe-error', event.detail);
575 this.fire('channelstream-unsubscribe-error', event.detail);
606 }
576 }
607 });
577 });
608
609 </script>
610 </dom-module>
@@ -1,7 +1,7 b''
1 import '../../../../../bower_components/iron-ajax/iron-ajax.html';
1 import '@polymer/iron-ajax/iron-ajax.js';
2 import './root-styles.gen.html';
2 import './root-styles.gen.html';
3 import './channelstream-connection/channelstream-connection.html';
3 import './channelstream-connection/channelstream-connection.js';
4 import './rhodecode-toast/rhodecode-toast.html';
4 import './rhodecode-toast/rhodecode-toast.js';
5 import './rhodecode-toggle/rhodecode-toggle.html';
5 import './rhodecode-toggle/rhodecode-toggle.js';
6 import './rhodecode-unsafe-html/rhodecode-unsafe-html.html';
6 import './rhodecode-unsafe-html/rhodecode-unsafe-html.js';
7 import './rhodecode-app/rhodecode-app.html';
7 import './rhodecode-app/rhodecode-app.js';
@@ -1,10 +1,19 b''
1 <link rel="import" href="../../../../../../bower_components/polymer/polymer.html">
1 import {PolymerElement, html} from '@polymer/polymer/polymer-element.js';
2 <link rel="import" href="../channelstream-connection/channelstream-connection.html">
2 import '../channelstream-connection/channelstream-connection.js';
3 <link rel="import" href="../rhodecode-toast/rhodecode-toast.html">
3 import '../rhodecode-toast/rhodecode-toast.js';
4 <link rel="import" href="../rhodecode-favicon/rhodecode-favicon.html">
4 import '../rhodecode-favicon/rhodecode-favicon.js';
5
6 var ccLog = Logger.get('RhodeCodeApp');
7 ccLog.setLevel(Logger.OFF);
5
8
6 <dom-module id="rhodecode-app">
9 export class RhodecodeApp extends PolymerElement {
7 <template>
10
11 static get is() {
12 return 'rhodecode-app';
13 }
14
15 static get template(){
16 return html`
8 <channelstream-connection
17 <channelstream-connection
9 id="channelstream-connection"
18 id="channelstream-connection"
10 on-channelstream-listen-message="receivedMessage"
19 on-channelstream-listen-message="receivedMessage"
@@ -12,15 +21,7 b''
12 on-channelstream-subscribed="handleSubscribed">
21 on-channelstream-subscribed="handleSubscribed">
13 </channelstream-connection>
22 </channelstream-connection>
14 <rhodecode-favicon></rhodecode-favicon>
23 <rhodecode-favicon></rhodecode-favicon>
15 </template>
24 `
16 <script>
17 var ccLog = Logger.get('RhodeCodeApp');
18 ccLog.setLevel(Logger.OFF);
19
20 class RhodecodeApp extends Polymer.Element {
21
22 static get is() {
23 return 'rhodecode-app';
24 }
25 }
25
26
26 connectedCallback() {
27 connectedCallback() {
@@ -191,5 +192,3 b''
191 }
192 }
192
193
193 customElements.define(RhodecodeApp.is, RhodecodeApp);
194 customElements.define(RhodecodeApp.is, RhodecodeApp);
194 </script>
195 </dom-module>
@@ -1,12 +1,10 b''
1 <link rel="import" href="../../../../../../bower_components/polymer/polymer.html">
1 import {PolymerElement, html} from '@polymer/polymer/polymer-element.js';
2
3 export class RhodecodeFavicon extends PolymerElement {
2
4
3 <dom-module id="rhodecode-favicon">
5 static get is() {
4 <template>
6 return 'rhodecode-favicon';
5 </template>
7 }
6 <script>
7 class RhodecodeFavicon extends Polymer.Element {
8
9 static get is() { return 'rhodecode-favicon'; }
10
8
11 static get properties() {
9 static get properties() {
12 return {
10 return {
@@ -31,8 +29,5 b''
31 }
29 }
32
30
33 }
31 }
32
34 customElements.define(RhodecodeFavicon.is, RhodecodeFavicon);
33 customElements.define(RhodecodeFavicon.is, RhodecodeFavicon);
35
36
37 </script>
38 </dom-module>
@@ -1,9 +1,17 b''
1 <link rel="import" href="../../../../../../bower_components/paper-button/paper-button.html">
1 import {PolymerElement, html} from '@polymer/polymer/polymer-element.js';
2 <link rel="import"
2 import '@polymer/paper-toggle-button/paper-toggle-button.js';
3 href="../../../../../../bower_components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html">
3 import {mixinBehaviors} from '@polymer/polymer/lib/legacy/class.js';
4 <link rel="import" href="../rhodecode-unsafe-html/rhodecode-unsafe-html.html">
4 import {IronA11yKeysBehavior} from '@polymer/iron-a11y-keys-behavior/iron-a11y-keys-behavior.js';
5 <dom-module id="rhodecode-toast">
5 import '../rhodecode-unsafe-html/rhodecode-unsafe-html.js';
6 <template>
6
7 export class RhodecodeToast extends mixinBehaviors([IronA11yKeysBehavior], PolymerElement) {
8
9 static get is() {
10 return 'rhodecode-toast';
11 }
12
13 static get template(){
14 return html`
7 <style include="shared-styles">
15 <style include="shared-styles">
8 /* inset border for buttons - does not work in ie */
16 /* inset border for buttons - does not work in ie */
9 /* rounded borders */
17 /* rounded borders */
@@ -107,14 +115,7 b''
107 </template>
115 </template>
108 </div>
116 </div>
109 </template>
117 </template>
110 </template>
118 `
111
112 <script>
113
114 class RhodecodeToast extends Polymer.mixinBehaviors([Polymer.IronA11yKeysBehavior], Polymer.Element) {
115
116 static get is() {
117 return 'rhodecode-toast';
118 }
119 }
119
120
120 static get properties() {
121 static get properties() {
@@ -228,6 +229,3 b''
228 }
229 }
229
230
230 customElements.define(RhodecodeToast.is, RhodecodeToast);
231 customElements.define(RhodecodeToast.is, RhodecodeToast);
231
232 </script>
233 </dom-module>
@@ -1,10 +1,16 b''
1 <link rel="import"
1 import {PolymerElement, html} from '@polymer/polymer/polymer-element.js';
2 href="../../../../../../bower_components/paper-toggle-button/paper-toggle-button.html">
2 import '@polymer/paper-toggle-button/paper-toggle-button.js';
3 <link rel="import" href="../../../../../../bower_components/paper-spinner/paper-spinner.html">
3 import '@polymer/paper-spinner/paper-spinner.js';
4 <link rel="import" href="../../../../../../bower_components/paper-tooltip/paper-tooltip.html">
4 import '@polymer/paper-tooltip/paper-tooltip.js';
5
6 export class RhodecodeToggle extends PolymerElement {
5
7
6 <dom-module id="rhodecode-toggle">
8 static get is() {
9 return 'rhodecode-toggle';
10 }
7
11
12 static get template() {
13 return html`
8 <style include="shared-styles">
14 <style include="shared-styles">
9 .rc-toggle {
15 .rc-toggle {
10 float: left;
16 float: left;
@@ -19,23 +25,15 b''
19 height: 20px;
25 height: 20px;
20 }
26 }
21 </style>
27 </style>
22
23 <template>
24 <div class="rc-toggle">
28 <div class="rc-toggle">
25 <paper-toggle-button checked={{checked}}>[[labelStatus(checked)]]</paper-toggle-button>
29 <paper-toggle-button checked={{checked}}>[[labelStatus(checked)]]
30 </paper-toggle-button>
26 <paper-tooltip>[[tooltipText]]</paper-tooltip>
31 <paper-tooltip>[[tooltipText]]</paper-tooltip>
27 <template is="dom-if" if="[[shouldShow(noSpinner)]]">
32 <template is="dom-if" if="[[shouldShow(noSpinner)]]">
28 <paper-spinner active=[[active]]></paper-spinner>
33 <paper-spinner active=[[active]]></paper-spinner>
29 </template>
34 </template>
30 </div>
35 </div>
31 </template>
36 `;
32
33 <script>
34
35 class RhodecodeToggle extends Polymer.Element {
36
37 static get is() {
38 return 'rhodecode-toggle';
39 }
37 }
40
38
41 static get properties() {
39 static get properties() {
@@ -57,5 +55,3 b''
57 }
55 }
58
56
59 customElements.define(RhodecodeToggle.is, RhodecodeToggle);
57 customElements.define(RhodecodeToggle.is, RhodecodeToggle);
60 </script>
61 </dom-module>
@@ -1,17 +1,18 b''
1 <link rel="import" href="../../../../../../bower_components/polymer/polymer-element.html">
1 import {PolymerElement, html} from '@polymer/polymer/polymer-element.js';
2
2
3 <dom-module id="rhodecode-unsafe-html">
3 export class RhodecodeUnsafeHtml extends PolymerElement {
4 <template>
5 <style include="shared-styles"></style>
6 <slot></slot>
7 </template>
8 <script>
9 class RhodecodeUnsafeHtml extends Polymer.Element {
10
4
11 static get is() {
5 static get is() {
12 return 'rhodecode-unsafe-html';
6 return 'rhodecode-unsafe-html';
13 }
7 }
14
8
9 static get template() {
10 return html`
11 <style include="shared-styles"></style>
12 <slot></slot>
13 `;
14 }
15
15 static get properties() {
16 static get properties() {
16 return {
17 return {
17 text: {
18 text: {
@@ -27,5 +28,3 b''
27 }
28 }
28
29
29 customElements.define(RhodecodeUnsafeHtml.is, RhodecodeUnsafeHtml);
30 customElements.define(RhodecodeUnsafeHtml.is, RhodecodeUnsafeHtml);
30 </script>
31 </dom-module>
General Comments 0
You need to be logged in to leave comments. Login now