spyne 0.17.3 → 0.18.0

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 (70) hide show
  1. package/karma.conf.js +5 -61
  2. package/lib/spyne.js +554 -1221
  3. package/lib/spyne.min.js +1 -1
  4. package/lib/spyne.min.js.LICENSE.txt +1 -1
  5. package/package.json +1 -1
  6. package/src/spyne/channels/channel-fetch-class.js +1 -4
  7. package/src/spyne/channels/channel-payload-class.js +8 -9
  8. package/src/spyne/channels/channel-proxy.js +1 -1
  9. package/src/spyne/channels/channel.js +3 -26
  10. package/src/spyne/channels/channels-config.js +0 -2
  11. package/src/spyne/channels/channels-map.js +1 -18
  12. package/src/spyne/channels/spyne-channel-lifecycle.js +1 -2
  13. package/src/spyne/channels/spyne-channel-route.js +7 -47
  14. package/src/spyne/channels/spyne-channel-ui.js +0 -2
  15. package/src/spyne/channels/spyne-channel-window.js +2 -53
  16. package/src/spyne/spyne-app.js +5 -23
  17. package/src/spyne/spyne-plugins.js +29 -61
  18. package/src/spyne/spyne.js +0 -1
  19. package/src/spyne/utils/channel-config-validator.js +0 -1
  20. package/src/spyne/utils/channel-fetch-util.js +1 -2
  21. package/src/spyne/utils/channel-payload-filter.js +4 -73
  22. package/src/spyne/utils/gc.js +1 -1
  23. package/src/spyne/utils/route-channel-updater.js +0 -4
  24. package/src/spyne/utils/spyne-app-properties.js +42 -72
  25. package/src/spyne/utils/spyne-plugins-methods.js +1 -9
  26. package/src/spyne/utils/spyne-trait.js +2 -5
  27. package/src/spyne/utils/spyne-utils-channel-route-url.js +1 -7
  28. package/src/spyne/utils/spyne-utils-channel-route.js +3 -13
  29. package/src/spyne/utils/spyne-utils-channel-window.js +1 -3
  30. package/src/spyne/utils/viewstream-observables.js +2 -3
  31. package/src/spyne/views/dom-element-template.js +1 -6
  32. package/src/spyne/views/dom-element.js +0 -19
  33. package/src/spyne/views/view-stream-broadcaster.js +2 -7
  34. package/src/spyne/views/view-stream-element.js +1 -18
  35. package/src/spyne/views/view-stream-payload.js +2 -69
  36. package/src/spyne/views/view-stream-selector.js +1 -6
  37. package/src/spyne/views/view-stream.js +255 -292
  38. package/webpack.config.js +0 -29
  39. package/lib/channel-action-filter.test.2418910233.js +0 -20
  40. package/lib/channel-dom.test.1490741340.js +0 -20
  41. package/lib/channel-fetch-util.test.3681936279.js +0 -20
  42. package/lib/channel-fetch.test.380764798.js +0 -20
  43. package/lib/channel-payload-class.test.2325155642.js +0 -20
  44. package/lib/channel-payload-filter.test.1598505124.js +0 -20
  45. package/lib/channel-route.test.921296320.js +0 -20
  46. package/lib/channel-stream-item.test.159699696.js +0 -20
  47. package/lib/channel-ui.test.291129654.js +0 -20
  48. package/lib/channel-util-dom.test.181212370.js +0 -20
  49. package/lib/channel.test.706832124.js +0 -20
  50. package/lib/commons.js +0 -50363
  51. package/lib/dom-el-selectors.test.3296414834.js +0 -20
  52. package/lib/dom-el-template.test.1459850380.js +0 -20
  53. package/lib/dom-el.test.2449130808.js +0 -20
  54. package/lib/frp-tools.test.1620088187.js +0 -20
  55. package/lib/import.test.723835576.js +0 -20
  56. package/lib/index.test.2146503294.js +0 -20
  57. package/lib/plugins-methods.test.3482246428.js +0 -20
  58. package/lib/route-utils.test.2932649409.js +0 -20
  59. package/lib/runtime.js +0 -174
  60. package/lib/spyne-app-properties.test.485192211.js +0 -20
  61. package/lib/spyne-app.test.4150724251.js +0 -20
  62. package/lib/spyne-plugin.test.3993976219.js +0 -20
  63. package/lib/url-utils.test.3668806082.js +0 -20
  64. package/lib/view-stream-broadcaster.test.2534955231.js +0 -20
  65. package/lib/view-stream-enhancer-loader.test.3395418180.js +0 -20
  66. package/lib/view-stream-enhancer.test.1043626253.js +0 -20
  67. package/lib/view-stream.test.1765314964.js +0 -20
  68. package/src/spyne/channels/lifestream-payload.js +0 -56
  69. package/src/spyne/utils/spyne-scroll-lock.js +0 -95
  70. package/src/spyne/views/view-stream-enhancer-loader.js +0 -70
@@ -1,70 +0,0 @@
1
- import { getAllMethodNames } from '../utils/frp-tools';
2
- import {concat, includes, __, filter, map, dropWhile, forEach} from 'ramda';
3
-
4
- export class ViewStreamEnhancerLoader {
5
- constructor(parent, enhancersArr) {
6
- this.context = parent;
7
- this.enhancersMap = new Map();
8
- this.enhancersArr = enhancersArr;
9
-
10
- this.initMap();
11
- this.addAllEnhancerMethods();
12
- }
13
-
14
- initMap() {
15
- this.enhancersMap.set('ALL', []);
16
- let allMethodsArr = getAllMethodNames(this.context).allMethods;
17
- this.updateMap('LOCAL', allMethodsArr);
18
- }
19
-
20
- getEnhancersMap() {
21
- return this.enhancersMap;
22
- }
23
-
24
- updateMap(name, arr) {
25
- let allArr = concat(this.enhancersMap.get('ALL'), arr);
26
- this.enhancersMap.set(name, arr);
27
- this.enhancersMap.set('ALL', allArr);
28
- }
29
-
30
- getMethodsArr(str) {
31
- return this.enhancersMap.get(str);
32
- }
33
-
34
- createEnhancerMethodsObj(EnhancerClass) {
35
- const sendError = str => console.error(
36
- `Spyne Error: The following enhancer method, "${str}", already exists and cannot be added to the ${enhancer.name} Enhancer!`);
37
- let enhancer = new EnhancerClass(this.context);
38
-
39
- const validateMethods = arr => {
40
- let methodsExistsFilter = includes(__, this.getMethodsArr('ALL'));
41
- let dupedMethods = filter(methodsExistsFilter, arr);
42
- dupedMethods.forEach(sendError);
43
- return dupedMethods;
44
- };
45
-
46
- let enhancerMethodsObj = enhancer.getEnhancerMethods();
47
- let dupedMethodsArr = validateMethods(enhancerMethodsObj.allMethods);
48
- let dropDupedMethodsFromArr = dropWhile(
49
- includes(__, dupedMethodsArr));
50
-
51
- enhancerMethodsObj = map(dropDupedMethodsFromArr, enhancerMethodsObj);
52
-
53
- this.updateMap(enhancer.name, enhancerMethodsObj.allMethods);
54
-
55
- enhancerMethodsObj['enhancer'] = enhancer;
56
- enhancerMethodsObj['name'] = enhancer.name;
57
-
58
- return enhancerMethodsObj;
59
- }
60
-
61
- addAllEnhancerMethods() {
62
- const addEnhancerMethods = (enhancerClass) => {
63
- let enhancerMethodsObj = this.createEnhancerMethodsObj(enhancerClass);
64
- let enhancer = enhancerMethodsObj.enhancer;
65
- enhancer.bindParentViewStream(enhancerMethodsObj, this.context);
66
- };
67
-
68
- forEach(addEnhancerMethods, this.enhancersArr);
69
- }
70
- }