@player-ui/data-change-listener-plugin 0.3.1-next.0 → 0.4.0-next.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.
- package/dist/index.cjs.js +4 -1
- package/dist/index.esm.js +4 -1
- package/package.json +2 -2
- package/src/index.ts +3 -1
package/dist/index.cjs.js
CHANGED
|
@@ -95,7 +95,10 @@ class DataChangeListenerPlugin {
|
|
|
95
95
|
});
|
|
96
96
|
});
|
|
97
97
|
};
|
|
98
|
-
player.hooks.dataController.tap(this.name, (dc) => dc.hooks.onUpdate.tap(this.name, (updates) => {
|
|
98
|
+
player.hooks.dataController.tap(this.name, (dc) => dc.hooks.onUpdate.tap(this.name, (updates, options) => {
|
|
99
|
+
const { silent = false } = options || {};
|
|
100
|
+
if (silent)
|
|
101
|
+
return;
|
|
99
102
|
onFieldUpdateHandler(updates.map((t) => t.binding));
|
|
100
103
|
}));
|
|
101
104
|
const resolveViewInterceptor = {
|
package/dist/index.esm.js
CHANGED
|
@@ -91,7 +91,10 @@ class DataChangeListenerPlugin {
|
|
|
91
91
|
});
|
|
92
92
|
});
|
|
93
93
|
};
|
|
94
|
-
player.hooks.dataController.tap(this.name, (dc) => dc.hooks.onUpdate.tap(this.name, (updates) => {
|
|
94
|
+
player.hooks.dataController.tap(this.name, (dc) => dc.hooks.onUpdate.tap(this.name, (updates, options) => {
|
|
95
|
+
const { silent = false } = options || {};
|
|
96
|
+
if (silent)
|
|
97
|
+
return;
|
|
95
98
|
onFieldUpdateHandler(updates.map((t) => t.binding));
|
|
96
99
|
}));
|
|
97
100
|
const resolveViewInterceptor = {
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@player-ui/data-change-listener-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0-next.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
7
7
|
},
|
|
8
8
|
"peerDependencies": {
|
|
9
|
-
"@player-ui/player": "0.
|
|
9
|
+
"@player-ui/player": "0.4.0-next.0"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@babel/runtime": "7.15.4"
|
package/src/index.ts
CHANGED
|
@@ -227,7 +227,9 @@ export class DataChangeListenerPlugin implements PlayerPlugin {
|
|
|
227
227
|
};
|
|
228
228
|
|
|
229
229
|
player.hooks.dataController.tap(this.name, (dc: DataController) =>
|
|
230
|
-
dc.hooks.onUpdate.tap(this.name, (updates) => {
|
|
230
|
+
dc.hooks.onUpdate.tap(this.name, (updates, options) => {
|
|
231
|
+
const { silent = false } = options || {};
|
|
232
|
+
if (silent) return;
|
|
231
233
|
onFieldUpdateHandler(updates.map((t) => t.binding));
|
|
232
234
|
})
|
|
233
235
|
);
|