@azrico/webobject 1.4.29 → 1.4.30

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,7 @@ 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;
160
161
  static addError(o?: SimpleObject, title?: string, message?: string, sendToRegister?: boolean | "auto"): any[] | undefined;
161
162
  static getErrors(o: SimpleObject): any[];
162
163
  static clearErrors(o: SimpleObject): boolean;
@@ -8,6 +8,7 @@ var _object = require("@azrico/object");
8
8
  var _global = require("@azrico/global");
9
9
  var _MapableObject2 = require("./MapableObject");
10
10
  var _ObjectManager = _interopRequireDefault(require("./ObjectManager"));
11
+ var _WebObject = _interopRequireDefault(require("../WebObjects/WebObject"));
11
12
  var _string = require("@azrico/string");
12
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
14
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
@@ -766,6 +767,15 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject) {
766
767
  this.__originalobject = (0, _object.object_removeKeys)(cloneObject, ["__"]);
767
768
  return this;
768
769
  }
770
+ }, {
771
+ key: "addError",
772
+ value: /* -------------------------------------------------------------------------- */
773
+ /* Errors */
774
+ /* -------------------------------------------------------------------------- */
775
+ function addError(title, message) {
776
+ var sendToRegister = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "auto";
777
+ return _WebObject["default"].addError(this, title, message, sendToRegister);
778
+ }
769
779
  }, {
770
780
  key: "setSaveResult",
771
781
  value:
@@ -970,9 +980,6 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject) {
970
980
  if (obj instanceof SimpleObject) return obj.getOriginal();
971
981
  return obj === null || obj === void 0 ? void 0 : obj.__originalobject;
972
982
  }
973
- /* -------------------------------------------------------------------------- */
974
- /* Errors */
975
- /* -------------------------------------------------------------------------- */
976
983
  }, {
977
984
  key: "addError",
978
985
  value: function addError(o, title, message) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/webobject",
3
- "version": "1.4.29",
3
+ "version": "1.4.30",
4
4
  "description": "Stateful object",
5
5
  "author": "Azrideus",
6
6
  "license": "MIT",