@azrico/webobject 1.4.28 → 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.
@@ -16,7 +16,7 @@ export declare class SimpleObject extends MapableObject {
16
16
  static readonly __extraProperties?: string[];
17
17
  static readonly __childTypes?: any[];
18
18
  static readonly __importColumns?: string[];
19
- static readonly __checkFields?: string[];
19
+ static readonly __checkProperties?: string[];
20
20
  static readonly __use_delta: boolean;
21
21
  _static(): Function;
22
22
  __originalobject?: this;
@@ -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) {
@@ -1145,8 +1152,8 @@ _defineProperty(SimpleObject, "__extraProperties", void 0);
1145
1152
  _defineProperty(SimpleObject, "__childTypes", void 0);
1146
1153
  //these fields are used when importing
1147
1154
  _defineProperty(SimpleObject, "__importColumns", void 0);
1148
- //these fields are used when importing and checking if an item exists
1149
- _defineProperty(SimpleObject, "__checkFields", void 0);
1155
+ //these fields can be used when importing and checking if an item exists
1156
+ _defineProperty(SimpleObject, "__checkProperties", void 0);
1150
1157
  _defineProperty(SimpleObject, "__use_delta", true);
1151
1158
  var _default = SimpleObject;
1152
1159
  exports["default"] = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/webobject",
3
- "version": "1.4.28",
3
+ "version": "1.4.30",
4
4
  "description": "Stateful object",
5
5
  "author": "Azrideus",
6
6
  "license": "MIT",