saasufy-components 7.1.0 → 7.2.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.
@@ -361,8 +361,6 @@ class CollectionViewer extends SocketConsumer {
361
361
 
362
362
  (async () => {
363
363
  for await (let event of this.collection.listener('change')) {
364
- // Ignore change events which originate from this collection instance.
365
- if (!event.isRemote) continue;
366
364
  this.renderList();
367
365
  this.updatePageButtons();
368
366
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saasufy-components",
3
- "version": "7.1.0",
3
+ "version": "7.2.0",
4
4
  "description": "Components for Saasufy.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/utils.js CHANGED
@@ -63,32 +63,17 @@ export function createReactiveCollection(collectionOptions, callback) {
63
63
  collection.safeValue = [];
64
64
 
65
65
  (async () => {
66
- let changes = {};
67
66
  for await (let event of collection.listener('change')) {
68
- // Ignore change events which originate from this collection instance.
69
- if (!event.isRemote) continue;
70
-
71
- if (event.resourceId != null && changes[event.resourceId] !== false) {
72
- changes[event.resourceId] = event.isRemote;
73
- }
74
-
75
67
  if (!collection.isLoaded) continue;
76
-
77
68
  collection.safeValue = collection.value.map(toSafeModelValue);
78
-
79
- callback({
80
- changes
81
- });
82
- changes = {};
69
+ callback();
83
70
  }
84
71
  })();
85
72
 
86
73
  (async () => {
87
74
  for await (let event of collection.listener('load')) {
88
75
  if (collection.isLoaded && !collection.value.length) {
89
- callback({
90
- changes: {}
91
- });
76
+ callback();
92
77
  }
93
78
  }
94
79
  })();
@@ -114,17 +99,9 @@ export function createReactiveModel(modelOptions, callback) {
114
99
  })();
115
100
 
116
101
  (async () => {
117
- let changes = {};
118
102
  for await (let event of model.listener('change')) {
119
- if (changes[event.resourceField] !== false) {
120
- changes[event.resourceField] = event.isRemote;
121
- }
122
-
123
103
  model.safeValue = toSafeModelValue(model.value);
124
- callback({
125
- changes
126
- });
127
- changes = {};
104
+ callback();
128
105
  }
129
106
  })();
130
107