@azrico/webobject 1.4.80 → 1.4.82

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.
@@ -424,12 +424,12 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
424
424
  }, {
425
425
  key: "__web_path",
426
426
  get: function get() {
427
- return this.constructor["__web_path"] || this.__web_type;
427
+ return this.constructor["__web_path"] || this.constructor["__web_type"];
428
428
  }
429
429
  }, {
430
430
  key: "__web_type",
431
431
  get: function get() {
432
- return this.constructor["__web_type"];
432
+ return this.constructor["__web_type"] || this.constructor["__web_path"];
433
433
  }
434
434
  }, {
435
435
  key: "manager",
@@ -1,9 +1,11 @@
1
+ import { ClassType } from "@azrico/types";
1
2
  import { WebObject, sendChangesType } from "../index";
2
3
  import ObjectManager from "../structs/ObjectManager";
3
4
  /**
4
5
  * This class manages the events of an Simple Object
5
6
  */
6
7
  export declare class WebObjectManager<T extends WebObject> extends ObjectManager<T> {
8
+ static readonly __object_type: ClassType<WebObject>;
7
9
  static readonly __save_message: boolean;
8
10
  protected __last_web_path: string;
9
11
  protected __last_web_type: string;
@@ -206,14 +206,16 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager, _setMetaValue, _ge
206
206
  }, {
207
207
  key: "__web_path",
208
208
  get: function get() {
209
- var _this$obj5;
210
- return ((_this$obj5 = this.obj) === null || _this$obj5 === void 0 ? void 0 : _this$obj5.__web_path) || this.__last_web_path || this.__web_type;
209
+ var _this$obj5, _this$constructor$__o, _this$obj6, _this$constructor$__o2;
210
+ return ((_this$obj5 = this.obj) === null || _this$obj5 === void 0 ? void 0 : _this$obj5.__web_path) || ((_this$constructor$__o = this.constructor["__object_type"]) === null || _this$constructor$__o === void 0 ? void 0 : _this$constructor$__o.__web_path) || this.__last_web_path || ( //alternative
211
+ (_this$obj6 = this.obj) === null || _this$obj6 === void 0 ? void 0 : _this$obj6.__web_type) || ((_this$constructor$__o2 = this.constructor["__object_type"]) === null || _this$constructor$__o2 === void 0 ? void 0 : _this$constructor$__o2.__web_type) || this.__last_web_type || "";
211
212
  }
212
213
  }, {
213
214
  key: "__web_type",
214
215
  get: function get() {
215
- var _this$obj6;
216
- return ((_this$obj6 = this.obj) === null || _this$obj6 === void 0 ? void 0 : _this$obj6.__web_type) || this.__last_web_type || "";
216
+ var _this$obj7, _this$constructor$__o3, _this$obj8, _this$constructor$__o4;
217
+ return ((_this$obj7 = this.obj) === null || _this$obj7 === void 0 ? void 0 : _this$obj7.__web_type) || ((_this$constructor$__o3 = this.constructor["__object_type"]) === null || _this$constructor$__o3 === void 0 ? void 0 : _this$constructor$__o3.__web_type) || this.__last_web_type || ( //alternative
218
+ (_this$obj8 = this.obj) === null || _this$obj8 === void 0 ? void 0 : _this$obj8.__web_path) || ((_this$constructor$__o4 = this.constructor["__object_type"]) === null || _this$constructor$__o4 === void 0 ? void 0 : _this$constructor$__o4.__web_path) || this.__last_web_path || "";
217
219
  }
218
220
  }, {
219
221
  key: "get_webname",
@@ -232,12 +234,12 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager, _setMetaValue, _ge
232
234
  key: "onNew",
233
235
  value: function onNew() {
234
236
  return (_onNew = _onNew || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
235
- var _this$obj7;
237
+ var _this$obj9;
236
238
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
237
239
  while (1) switch (_context6.prev = _context6.next) {
238
240
  case 0:
239
241
  if (this.canModify) {
240
- (_this$obj7 = this.obj) === null || _this$obj7 === void 0 || _this$obj7.setOriginal();
242
+ (_this$obj9 = this.obj) === null || _this$obj9 === void 0 || _this$obj9.setOriginal();
241
243
  }
242
244
  _context6.next = 3;
243
245
  return this.event_run("on_new");
@@ -387,7 +389,7 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager, _setMetaValue, _ge
387
389
  return WebObjectManager;
388
390
  }(_ObjectManager2["default"]);
389
391
  exports.WebObjectManager = WebObjectManager;
390
- //we use this as backup
392
+ _defineProperty(WebObjectManager, "__object_type", void 0);
391
393
  _defineProperty(WebObjectManager, "__save_message", true);
392
394
  var _default = WebObjectManager;
393
395
  exports["default"] = _default;
@@ -1,6 +1,7 @@
1
1
  import { PropOf, WriteablePropOf } from "./SimpleObject";
2
2
  import SimpleObject from "./SimpleObject";
3
3
  import { saveResultType, sendChangesType } from "./SimpleObject";
4
+ import { ClassType } from "@azrico/types";
4
5
  /**
5
6
  * This class manages the events of an Simple Object
6
7
  */
@@ -8,6 +9,7 @@ export declare class ObjectManager<ObjType extends SimpleObject> {
8
9
  __eventList: any;
9
10
  __eventPrefix?: string;
10
11
  __stopEvents?: boolean;
12
+ static readonly __object_type: ClassType<SimpleObject>;
11
13
  protected __currentObject?: ObjType | null;
12
14
  protected __options?: object;
13
15
  __object_nullable: boolean;
@@ -134,8 +134,8 @@ var ObjectManager = /*#__PURE__*/function (_notifyChanged, _setValue, _setSubVal
134
134
  }, {
135
135
  key: "__cache_name",
136
136
  get: function get() {
137
- var _this$obj4;
138
- return ((_this$obj4 = this.obj) === null || _this$obj4 === void 0 ? void 0 : _this$obj4.__cache_name) || "";
137
+ var _this$obj4, _this$constructor$__o;
138
+ return ((_this$obj4 = this.obj) === null || _this$obj4 === void 0 ? void 0 : _this$obj4.__cache_name) || ((_this$constructor$__o = this.constructor["__object_type"]) === null || _this$constructor$__o === void 0 ? void 0 : _this$constructor$__o.__cache_name) || "";
139
139
  }
140
140
  }, {
141
141
  key: "getSaveResult",
@@ -635,5 +635,6 @@ var ObjectManager = /*#__PURE__*/function (_notifyChanged, _setValue, _setSubVal
635
635
  return ObjectManager;
636
636
  }();
637
637
  exports.ObjectManager = ObjectManager;
638
+ _defineProperty(ObjectManager, "__object_type", void 0);
638
639
  var _default = ObjectManager;
639
640
  exports["default"] = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/webobject",
3
- "version": "1.4.80",
3
+ "version": "1.4.82",
4
4
  "description": "Stateful object",
5
5
  "author": "Azrideus",
6
6
  "license": "MIT",