@azrico/webobject 1.4.70 → 1.4.71
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.
|
@@ -104,6 +104,12 @@ export declare class SimpleObject extends MapableObject {
|
|
|
104
104
|
* Apply the changes and empty the delta object
|
|
105
105
|
*/
|
|
106
106
|
apply_changes(): boolean;
|
|
107
|
+
/**
|
|
108
|
+
* apply changes for the given field
|
|
109
|
+
* @param key
|
|
110
|
+
* @returns
|
|
111
|
+
*/
|
|
112
|
+
apply(key: string): boolean;
|
|
107
113
|
/**
|
|
108
114
|
* set the value to its original
|
|
109
115
|
* @param key
|
|
@@ -434,6 +434,26 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setAll, _s
|
|
|
434
434
|
this.clear_changes();
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
|
+
/**
|
|
438
|
+
* apply changes for the given field
|
|
439
|
+
* @param key
|
|
440
|
+
* @returns
|
|
441
|
+
*/
|
|
442
|
+
}, {
|
|
443
|
+
key: "apply",
|
|
444
|
+
value: function apply(key) {
|
|
445
|
+
try {
|
|
446
|
+
if (!this.__use_delta) {
|
|
447
|
+
//in this mode , we track changes by updating the original
|
|
448
|
+
return true;
|
|
449
|
+
}
|
|
450
|
+
if (this.__delta != null && key in this.__delta) {
|
|
451
|
+
this[key] = this.__delta[key];
|
|
452
|
+
delete this.__delta[key];
|
|
453
|
+
}
|
|
454
|
+
return true;
|
|
455
|
+
} finally {}
|
|
456
|
+
}
|
|
437
457
|
/**
|
|
438
458
|
* set the value to its original
|
|
439
459
|
* @param key
|