@azrico/webobject 1.2.32 → 1.2.33
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.
|
@@ -33,7 +33,7 @@ export declare class ObjectManager<ObjType extends SimpleObject> {
|
|
|
33
33
|
getSaveResult(): any;
|
|
34
34
|
getSaveResultType(): saveResultType | null;
|
|
35
35
|
setSaveResult(toObj: any, type: saveResultType): void | undefined;
|
|
36
|
-
apply_changes():
|
|
36
|
+
apply_changes(): boolean | undefined;
|
|
37
37
|
getValue(key: PropOf<ObjType>, original?: boolean): import("./SimpleObject").PropType<ObjType, any> | undefined;
|
|
38
38
|
get: (key: PropOf<ObjType>, original?: boolean) => import("./SimpleObject").PropType<ObjType, any> | undefined;
|
|
39
39
|
/**
|
|
@@ -60,9 +60,9 @@ export declare class SimpleObject extends MapableObject {
|
|
|
60
60
|
/**
|
|
61
61
|
* Apply the changes and empty the delta object
|
|
62
62
|
*/
|
|
63
|
-
apply_changes():
|
|
64
|
-
clear_changes():
|
|
65
|
-
clear_cache():
|
|
63
|
+
apply_changes(): boolean;
|
|
64
|
+
clear_changes(): boolean;
|
|
65
|
+
clear_cache(): boolean;
|
|
66
66
|
/**
|
|
67
67
|
* Sets readonly property on given objects
|
|
68
68
|
* @param objs array of given objects or a single object
|
|
@@ -362,23 +362,28 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject) {
|
|
|
362
362
|
}
|
|
363
363
|
if (!this.isChanged) {
|
|
364
364
|
console.warn("No changes to apply");
|
|
365
|
+
this.clear_changes();
|
|
366
|
+
return false;
|
|
365
367
|
}
|
|
366
368
|
for (var key in this.__delta) {
|
|
367
369
|
var nv = this.__delta[key];
|
|
368
370
|
this[key] = nv;
|
|
369
371
|
}
|
|
370
372
|
this.clear_changes();
|
|
373
|
+
return true;
|
|
371
374
|
}
|
|
372
375
|
}, {
|
|
373
376
|
key: "clear_changes",
|
|
374
377
|
value: function clear_changes() {
|
|
375
378
|
this.__delta = {};
|
|
376
379
|
this.__changed = false;
|
|
380
|
+
return true;
|
|
377
381
|
}
|
|
378
382
|
}, {
|
|
379
383
|
key: "clear_cache",
|
|
380
384
|
value: function clear_cache() {
|
|
381
385
|
this.__temp = {};
|
|
386
|
+
return true;
|
|
382
387
|
}
|
|
383
388
|
/**
|
|
384
389
|
* Sets readonly property on given objects
|