spyne 0.19.1 → 0.20.1

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 (132) hide show
  1. package/.eslintignore +2 -0
  2. package/.eslintrc.js +4 -3
  3. package/.travis.yml +24 -11
  4. package/karma.conf.js +77 -87
  5. package/lib/spyne.esm.js +15 -0
  6. package/lib/spyne.esm.js.map +1 -0
  7. package/lib/spyne.js +248 -248
  8. package/lib/spyne.umd.js +3 -0
  9. package/lib/spyne.umd.js.LICENSE.txt +16 -0
  10. package/package.json +48 -27
  11. package/rollup.config.js +26 -0
  12. package/src/spyne/channels/channel-fetch-class.js +39 -43
  13. package/src/spyne/channels/channel-payload-class.js +61 -74
  14. package/src/spyne/channels/channel-proxy.js +25 -26
  15. package/src/spyne/channels/channel.js +141 -149
  16. package/src/spyne/channels/channels-config.js +46 -47
  17. package/src/spyne/channels/channels-map.js +61 -65
  18. package/src/spyne/channels/spyne-channel-lifecycle.js +12 -12
  19. package/src/spyne/channels/spyne-channel-route.js +241 -250
  20. package/src/spyne/channels/spyne-channel-ui.js +213 -75
  21. package/src/spyne/channels/spyne-channel-window.js +157 -157
  22. package/src/spyne/spyne-app.js +32 -19
  23. package/src/spyne/spyne-plugins.js +55 -70
  24. package/src/spyne/spyne.js +23 -23
  25. package/src/spyne/utils/channel-config-validator.js +10 -10
  26. package/src/spyne/utils/channel-fetch-util.js +72 -55
  27. package/src/spyne/utils/channel-payload-filter.js +89 -100
  28. package/src/spyne/utils/deep-merge.js +31 -29
  29. package/src/spyne/utils/frp-tools.js +108 -92
  30. package/src/spyne/utils/gc.js +6 -6
  31. package/src/spyne/utils/mixins/base-core-mixins.js +17 -15
  32. package/src/spyne/utils/mixins/base-streams-mixins.js +9 -9
  33. package/src/spyne/utils/route-channel-updater.js +23 -29
  34. package/src/spyne/utils/safe-clone.js +40 -58
  35. package/src/spyne/utils/sanitize-html.js +35 -0
  36. package/src/spyne/utils/security-policy.js +11 -0
  37. package/src/spyne/utils/spyne-app-properties.js +110 -114
  38. package/src/spyne/utils/spyne-logger.js +4 -11
  39. package/src/spyne/utils/spyne-plugins-methods.js +38 -63
  40. package/src/spyne/utils/spyne-trait.js +33 -33
  41. package/src/spyne/utils/spyne-utils-channel-route-url.js +229 -153
  42. package/src/spyne/utils/spyne-utils-channel-route.js +128 -138
  43. package/src/spyne/utils/spyne-utils-channel-window.js +39 -39
  44. package/src/spyne/utils/viewstream-animations.js +12 -12
  45. package/src/spyne/utils/viewstream-observables.js +45 -45
  46. package/src/spyne/views/dom-element-template.js +111 -114
  47. package/src/spyne/views/dom-element.js +82 -84
  48. package/src/spyne/views/view-stream-broadcaster.js +66 -62
  49. package/src/spyne/views/view-stream-element.js +105 -106
  50. package/src/spyne/views/view-stream-payload.js +25 -27
  51. package/src/spyne/views/view-stream-selector.js +157 -163
  52. package/src/spyne/views/view-stream.js +416 -640
  53. package/src/tests/channels/channel-dom.test.js +15 -15
  54. package/src/tests/channels/channel-fetch.test.js +51 -62
  55. package/src/tests/channels/channel-payload-class.test.js +50 -63
  56. package/src/tests/channels/channel-payload-filter.test.js +133 -193
  57. package/src/tests/channels/channel-route.test.js +102 -112
  58. package/src/tests/channels/channel-stream-item.test.js +19 -19
  59. package/src/tests/channels/channel-ui.test.js +15 -27
  60. package/src/tests/channels/channel-util-dom.test.js +31 -31
  61. package/src/tests/channels/channel.test.js +20 -25
  62. package/src/tests/channels/route-utils.test.js +61 -66
  63. package/src/tests/channels/url-utils.test.js +151 -151
  64. package/src/tests/channels/view-stream-broadcaster.test.js +7 -7
  65. package/src/tests/import.test.js +5 -5
  66. package/src/tests/index.js +6 -7
  67. package/src/tests/index.test.js +6 -8
  68. package/src/tests/mocks/channel-payload-data.js +218 -220
  69. package/src/tests/mocks/enhancer.test.js +5 -5
  70. package/src/tests/mocks/payload-ui.js +87 -90
  71. package/src/tests/mocks/routes-data.js +264 -266
  72. package/src/tests/mocks/spyne-docs.mocks.js +3 -3
  73. package/src/tests/mocks/template-renderer.mocks.js +47 -47
  74. package/src/tests/mocks/utils-data.js +78 -79
  75. package/src/tests/mocks/viewstream-internal-payload.mocks.js +50 -50
  76. package/src/tests/mocks/window-events-arr.js +1 -1
  77. package/src/tests/package-json.spec.test.js +9 -0
  78. package/src/tests/spyne-app.test.js +15 -18
  79. package/src/tests/spyne-plugin.test.js +16 -20
  80. package/src/tests/utils/channel-action-filter.test.js +84 -86
  81. package/src/tests/utils/channel-data-packet-generator.unused.js +62 -86
  82. package/src/tests/utils/channel-fetch-util.test.js +64 -66
  83. package/src/tests/utils/frp-tools.test.js +19 -19
  84. package/src/tests/utils/plugins-methods.test.js +31 -55
  85. package/src/tests/utils/security.test.js +10 -0
  86. package/src/tests/utils/spyne-app-properties.test.js +4 -8
  87. package/src/tests/views/dom-el-selectors.test.js +112 -119
  88. package/src/tests/views/dom-el-template-proxy.test.js +7 -0
  89. package/src/tests/views/dom-el-template.test.js +186 -156
  90. package/src/tests/views/dom-el.test.js +58 -56
  91. package/src/tests/views/view-stream-enhancer-loader.test.js +2 -2
  92. package/src/tests/views/view-stream-enhancer.test.js +11 -11
  93. package/src/tests/views/view-stream.test.js +22 -33
  94. package/webpack.config.js +76 -67
  95. package/docs/-_%20Solves%20equations%20of%20the%20form%20a%20_%20x%20=%20b.html +0 -487
  96. package/docs/DomItem.html +0 -298
  97. package/docs/DomItem_DomItem.html +0 -314
  98. package/docs/ViewStream.html +0 -2249
  99. package/docs/ViewStream_ViewStream.html +0 -503
  100. package/docs/custom/css/jsdoc-viewstream.css +0 -377
  101. package/docs/custom/layout.tmpl +0 -47
  102. package/docs/dom-item.js.html +0 -213
  103. package/docs/fonts/OpenSans-Bold-webfont.eot +0 -0
  104. package/docs/fonts/OpenSans-Bold-webfont.svg +0 -1830
  105. package/docs/fonts/OpenSans-Bold-webfont.woff +0 -0
  106. package/docs/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  107. package/docs/fonts/OpenSans-BoldItalic-webfont.svg +0 -1830
  108. package/docs/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  109. package/docs/fonts/OpenSans-Italic-webfont.eot +0 -0
  110. package/docs/fonts/OpenSans-Italic-webfont.svg +0 -1830
  111. package/docs/fonts/OpenSans-Italic-webfont.woff +0 -0
  112. package/docs/fonts/OpenSans-Light-webfont.eot +0 -0
  113. package/docs/fonts/OpenSans-Light-webfont.svg +0 -1831
  114. package/docs/fonts/OpenSans-Light-webfont.woff +0 -0
  115. package/docs/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  116. package/docs/fonts/OpenSans-LightItalic-webfont.svg +0 -1835
  117. package/docs/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  118. package/docs/fonts/OpenSans-Regular-webfont.eot +0 -0
  119. package/docs/fonts/OpenSans-Regular-webfont.svg +0 -1831
  120. package/docs/fonts/OpenSans-Regular-webfont.woff +0 -0
  121. package/docs/global.html +0 -548
  122. package/docs/index-custom.html +0 -79
  123. package/docs/index.html +0 -82
  124. package/docs/jsdoc.config.json +0 -22
  125. package/docs/scripts/linenumber.js +0 -25
  126. package/docs/scripts/prettify/Apache-License-2.0.txt +0 -202
  127. package/docs/scripts/prettify/lang-css.js +0 -2
  128. package/docs/scripts/prettify/prettify.js +0 -28
  129. package/docs/styles/jsdoc-default.css +0 -358
  130. package/docs/styles/prettify-jsdoc.css +0 -111
  131. package/docs/styles/prettify-tomorrow.css +0 -132
  132. package/docs/view-stream.js.html +0 -767
package/docs/DomItem.html DELETED
@@ -1,298 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <title>JSDoc: Class: DomItem</title>
6
- <link href="https://fonts.googleapis.com/css?family=Roboto+Slab" rel="stylesheet">
7
-
8
- <script src="scripts/prettify/prettify.js"> </script>
9
- <script src="scripts/prettify/lang-css.js"> </script>
10
- <!--[if lt IE 9]>
11
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
12
- <![endif]-->
13
- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
14
- <!--
15
- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
16
- -->
17
- <link type="text/css" rel="stylesheet" href="custom/css/jsdoc-viewstream.css">
18
-
19
-
20
- </head>
21
-
22
- <body>
23
-
24
- <div id="main">
25
- <a class="page-title spyne" href='https://www.npmjs.com/package/spyne' target='blank'>spyne</a>
26
-
27
- <!--
28
- <h1 class="page-title">Class: DomItem</h1>
29
- -->
30
-
31
-
32
-
33
-
34
-
35
-
36
- <section>
37
-
38
- <header>
39
-
40
- <h2><span class="attribs"><span class="type-signature"></span></span>DomItem<span class="signature">(tagName, attributes, content, template)</span><span class="type-signature"></span></h2>
41
-
42
-
43
- </header>
44
-
45
- <article>
46
- <div class="container-overview">
47
-
48
-
49
-
50
-
51
-
52
-
53
- <h4 class="name" id="DomItem"><span class="type-signature"></span>new DomItem<span class="signature">(tagName, attributes, content, template)</span><span class="type-signature"></span></h4>
54
-
55
-
56
-
57
-
58
-
59
-
60
- <div class="description">
61
- <p>This class is mostly used internally by the ViewStream object, but it can be also used to generate a lightweight dom element that contains no props or parameters.</p>
62
- </div>
63
-
64
-
65
-
66
-
67
-
68
-
69
-
70
-
71
-
72
- <h5>Parameters:</h5>
73
-
74
-
75
- <table class="params">
76
- <thead>
77
- <tr>
78
-
79
- <th>Name</th>
80
-
81
-
82
- <th>Type</th>
83
-
84
-
85
-
86
-
87
-
88
- <th class="last">Description</th>
89
- </tr>
90
- </thead>
91
-
92
- <tbody>
93
-
94
-
95
- <tr>
96
-
97
- <td class="name"><code>tagName</code></td>
98
-
99
-
100
- <td class="type">
101
-
102
-
103
- <span class="param-type">string</span>
104
-
105
-
106
-
107
- </td>
108
-
109
-
110
-
111
-
112
-
113
- <td class="description last"><p>the tagname for this dom element.</p></td>
114
- </tr>
115
-
116
-
117
-
118
- <tr>
119
-
120
- <td class="name"><code>attributes</code></td>
121
-
122
-
123
- <td class="type">
124
-
125
-
126
- <span class="param-type">object</span>
127
-
128
-
129
-
130
- </td>
131
-
132
-
133
-
134
-
135
-
136
- <td class="description last"><p>any domElement attribute (except for class )</p></td>
137
- </tr>
138
-
139
-
140
-
141
- <tr>
142
-
143
- <td class="name"><code>content</code></td>
144
-
145
-
146
- <td class="type">
147
-
148
-
149
- <span class="param-type">string</span>
150
- |
151
-
152
- <span class="param-type">object</span>
153
-
154
-
155
-
156
- </td>
157
-
158
-
159
-
160
-
161
-
162
- <td class="description last"><p>string for text tags and json for templates</p></td>
163
- </tr>
164
-
165
-
166
-
167
- <tr>
168
-
169
- <td class="name"><code>template</code></td>
170
-
171
-
172
- <td class="type">
173
-
174
-
175
- <span class="param-type">tmpl</span>
176
-
177
-
178
-
179
- </td>
180
-
181
-
182
-
183
-
184
-
185
- <td class="description last"></td>
186
- </tr>
187
-
188
-
189
- </tbody>
190
- </table>
191
-
192
-
193
-
194
-
195
-
196
-
197
- <dl class="details">
198
-
199
-
200
-
201
-
202
-
203
-
204
-
205
-
206
-
207
-
208
-
209
-
210
-
211
-
212
-
213
-
214
-
215
-
216
-
217
-
218
-
219
-
220
-
221
-
222
-
223
-
224
- <dt class="tag-source">Source:</dt>
225
- <dd class="tag-source"><ul class="dummy"><li>
226
- <a href="dom-item.js.html">dom-element.js</a>, <a href="dom-item.js.html#line9">line 9</a>
227
- </li></ul></dd>
228
-
229
-
230
-
231
-
232
-
233
-
234
-
235
- </dl>
236
-
237
-
238
-
239
-
240
-
241
-
242
-
243
-
244
-
245
-
246
-
247
-
248
-
249
-
250
-
251
-
252
-
253
-
254
-
255
- </div>
256
-
257
-
258
-
259
-
260
-
261
-
262
-
263
-
264
-
265
-
266
-
267
-
268
-
269
-
270
-
271
-
272
-
273
-
274
-
275
-
276
- </article>
277
-
278
- </section>
279
-
280
-
281
-
282
-
283
- </div>
284
-
285
- <nav>
286
- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="DomItem.html">DomItem</a></li><li><a href="ViewStream.html">ViewStream</a></li></ul>
287
- </nav>
288
-
289
- <br class="clear">
290
-
291
- <footer>
292
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Dec 15 2017 22:34:55 GMT-0500 (EST)
293
- </footer>
294
-
295
- <script> prettyPrint(); </script>
296
- <script src="scripts/linenumber.js"> </script>
297
- </body>
298
- </html>
@@ -1,314 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <title>JSDoc: Class: DomItem</title>
6
-
7
- <script src="scripts/prettify/prettify.js"> </script>
8
- <script src="scripts/prettify/lang-css.js"> </script>
9
- <!--[if lt IE 9]>
10
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11
- <![endif]-->
12
- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
13
- <!--
14
- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
15
- -->
16
- <link type="text/css" rel="stylesheet" href="custom/css/jsdoc-viewstream.css">
17
-
18
-
19
- </head>
20
-
21
- <body>
22
-
23
- <div id="main">
24
-
25
- <h1 class="page-title">Class: DomItem</h1>
26
-
27
-
28
-
29
-
30
-
31
-
32
- <section>
33
-
34
- <header>
35
-
36
- <h2><span class="attribs"><span class="type-signature"></span></span>DomItem<span class="signature">(tagName, attributes, content, template)</span><span class="type-signature"></span></h2>
37
-
38
-
39
- </header>
40
-
41
- <article>
42
- <div class="container-overview">
43
-
44
-
45
-
46
-
47
-
48
-
49
- <h4 class="name" id="DomItem"><span class="type-signature"></span>new DomItem<span class="signature">(tagName, attributes, content, template)</span><span class="type-signature"></span></h4>
50
-
51
-
52
-
53
-
54
-
55
-
56
- <div class="description">
57
- <p>This class is mostly used internally by the ViewStream object, but it can be also used to generate a lightweight dom element that contains no props or parameters.</p>
58
- </div>
59
-
60
-
61
-
62
-
63
-
64
-
65
-
66
-
67
-
68
- <h5>Parameters:</h5>
69
-
70
-
71
- <table class="params">
72
- <thead>
73
- <tr>
74
-
75
- <th>Name</th>
76
-
77
-
78
- <th>Type</th>
79
-
80
-
81
-
82
-
83
- <th>Default</th>
84
-
85
-
86
- <th class="last">Description</th>
87
- </tr>
88
- </thead>
89
-
90
- <tbody>
91
-
92
-
93
- <tr>
94
-
95
- <td class="name"><code>tagName</code></td>
96
-
97
-
98
- <td class="type">
99
-
100
-
101
- <span class="param-type">string</span>
102
-
103
-
104
-
105
- </td>
106
-
107
-
108
-
109
-
110
- <td class="default">
111
-
112
- div
113
-
114
- </td>
115
-
116
-
117
- <td class="description last"><p>the tagname for this dom element.</p></td>
118
- </tr>
119
-
120
-
121
-
122
- <tr>
123
-
124
- <td class="name"><code>attributes</code></td>
125
-
126
-
127
- <td class="type">
128
-
129
-
130
- <span class="param-type">object</span>
131
-
132
-
133
-
134
- </td>
135
-
136
-
137
-
138
-
139
- <td class="default">
140
-
141
- </td>
142
-
143
-
144
- <td class="description last"><p>any domElement attribute (except for class )</p></td>
145
- </tr>
146
-
147
-
148
-
149
- <tr>
150
-
151
- <td class="name"><code>content</code></td>
152
-
153
-
154
- <td class="type">
155
-
156
-
157
- <span class="param-type">string</span>
158
- |
159
-
160
- <span class="param-type">object</span>
161
-
162
-
163
-
164
- </td>
165
-
166
-
167
-
168
-
169
- <td class="default">
170
-
171
- </td>
172
-
173
-
174
- <td class="description last"><p>string for text tags and json for templates</p></td>
175
- </tr>
176
-
177
-
178
-
179
- <tr>
180
-
181
- <td class="name"><code>template</code></td>
182
-
183
-
184
- <td class="type">
185
-
186
-
187
- <span class="param-type">tmpl</span>
188
-
189
-
190
-
191
- </td>
192
-
193
-
194
-
195
-
196
- <td class="default">
197
-
198
- </td>
199
-
200
-
201
- <td class="description last"></td>
202
- </tr>
203
-
204
-
205
- </tbody>
206
- </table>
207
-
208
-
209
-
210
-
211
-
212
-
213
- <dl class="details">
214
-
215
-
216
-
217
-
218
-
219
-
220
-
221
-
222
-
223
-
224
-
225
-
226
-
227
-
228
-
229
-
230
-
231
-
232
-
233
-
234
-
235
-
236
-
237
-
238
-
239
-
240
- <dt class="tag-source">Source:</dt>
241
- <dd class="tag-source"><ul class="dummy"><li>
242
- <a href="dom-item.js.html">dom-element.js</a>, <a href="dom-item.js.html#line17">line 17</a>
243
- </li></ul></dd>
244
-
245
-
246
-
247
-
248
-
249
-
250
-
251
- </dl>
252
-
253
-
254
-
255
-
256
-
257
-
258
-
259
-
260
-
261
-
262
-
263
-
264
-
265
-
266
-
267
-
268
-
269
-
270
-
271
- </div>
272
-
273
-
274
-
275
-
276
-
277
-
278
-
279
-
280
-
281
-
282
-
283
-
284
-
285
-
286
-
287
-
288
-
289
-
290
-
291
-
292
- </article>
293
-
294
- </section>
295
-
296
-
297
-
298
-
299
- </div>
300
-
301
- <nav>
302
- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="DomItem_DomItem.html">DomItem</a></li><li><a href="ViewStream.html">ViewStream</a></li></ul>
303
- </nav>
304
-
305
- <br class="clear">
306
-
307
- <footer>
308
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Dec 15 2017 22:18:31 GMT-0500 (EST)
309
- </footer>
310
-
311
- <script> prettyPrint(); </script>
312
- <script src="scripts/linenumber.js"> </script>
313
- </body>
314
- </html>