@azrico/webobject 1.4.29 → 1.4.32
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.
|
@@ -157,6 +157,9 @@ export declare class SimpleObject extends MapableObject {
|
|
|
157
157
|
setOriginal(toObj?: null | 0 | any): this | undefined;
|
|
158
158
|
static setOriginal<T>(obj: T, toObj?: null | 0 | any): T | undefined;
|
|
159
159
|
static getOriginal<T extends SimpleObject>(obj: T): T | undefined;
|
|
160
|
+
addError(title?: string, message?: string, sendToRegister?: boolean | "auto"): any[] | undefined;
|
|
161
|
+
clearErrors(): boolean;
|
|
162
|
+
getErrors(): any[];
|
|
160
163
|
static addError(o?: SimpleObject, title?: string, message?: string, sendToRegister?: boolean | "auto"): any[] | undefined;
|
|
161
164
|
static getErrors(o: SimpleObject): any[];
|
|
162
165
|
static clearErrors(o: SimpleObject): boolean;
|
|
@@ -766,6 +766,25 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject) {
|
|
|
766
766
|
this.__originalobject = (0, _object.object_removeKeys)(cloneObject, ["__"]);
|
|
767
767
|
return this;
|
|
768
768
|
}
|
|
769
|
+
}, {
|
|
770
|
+
key: "addError",
|
|
771
|
+
value: /* -------------------------------------------------------------------------- */
|
|
772
|
+
/* Errors */
|
|
773
|
+
/* -------------------------------------------------------------------------- */
|
|
774
|
+
function addError(title, message) {
|
|
775
|
+
var sendToRegister = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "auto";
|
|
776
|
+
return SimpleObject.addError(this, title, message, sendToRegister);
|
|
777
|
+
}
|
|
778
|
+
}, {
|
|
779
|
+
key: "clearErrors",
|
|
780
|
+
value: function clearErrors() {
|
|
781
|
+
return SimpleObject.clearErrors(this);
|
|
782
|
+
}
|
|
783
|
+
}, {
|
|
784
|
+
key: "getErrors",
|
|
785
|
+
value: function getErrors() {
|
|
786
|
+
return SimpleObject.getErrors(this);
|
|
787
|
+
}
|
|
769
788
|
}, {
|
|
770
789
|
key: "setSaveResult",
|
|
771
790
|
value:
|
|
@@ -970,9 +989,6 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject) {
|
|
|
970
989
|
if (obj instanceof SimpleObject) return obj.getOriginal();
|
|
971
990
|
return obj === null || obj === void 0 ? void 0 : obj.__originalobject;
|
|
972
991
|
}
|
|
973
|
-
/* -------------------------------------------------------------------------- */
|
|
974
|
-
/* Errors */
|
|
975
|
-
/* -------------------------------------------------------------------------- */
|
|
976
992
|
}, {
|
|
977
993
|
key: "addError",
|
|
978
994
|
value: function addError(o, title, message) {
|