@azrico/webobject 1.4.173 → 1.4.175

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.
@@ -1,11 +1,10 @@
1
- import { ClassType } from "@azrico/types";
2
1
  import { WebObject, sendChangesType } from "../index";
3
2
  import ObjectManager from "../structs/ObjectManager";
4
3
  /**
5
4
  * This class manages the events of an Simple Object
6
5
  */
7
6
  export declare class WebObjectManager<T extends WebObject> extends ObjectManager<T> {
8
- static readonly __object_type: () => ClassType<WebObject>;
7
+ protected static readonly __object_type: () => typeof WebObject;
9
8
  static readonly __save_message: boolean;
10
9
  constructor(defaultObject?: T);
11
10
  setObject(toObj: T | undefined): boolean;
@@ -61,7 +60,7 @@ export declare class WebObjectManager<T extends WebObject> extends ObjectManager
61
60
  */
62
61
  onSave(...p: any): Promise<any>;
63
62
  onAfterSave(...p: any): Promise<any>;
64
- getObjectType(): ClassType<WebObject>;
65
- static getObjectType(): ClassType<WebObject>;
63
+ getObjectType(): typeof WebObject;
64
+ static getObjectType(): typeof WebObject;
66
65
  }
67
66
  export default WebObjectManager;
@@ -472,7 +472,7 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
472
472
  case 2:
473
473
  _context13.prev = 2;
474
474
  this.event_run("on_process_start", true);
475
- classType = (0, _object.object_getStatic)(this, "__object_type");
475
+ classType = this.getObjectType();
476
476
  if (!classType) {
477
477
  console.error("[webobjectmanager]", "(Load) -> classType is not defined", this, this.constructor["__object_type"]);
478
478
  }
@@ -1,7 +1,6 @@
1
1
  import { PropOf, WriteablePropOf } from "@azrico/types";
2
2
  import SimpleObject, { WithManager } from "./SimpleObject";
3
3
  import { saveResultType, sendChangesType } from "./SimpleObject";
4
- import { ClassType } from "@azrico/types";
5
4
  import RawObject from "./MapableObject";
6
5
  /**
7
6
  * This class manages the events of an Simple Object
@@ -10,7 +9,7 @@ export declare class ObjectManager<ObjType extends SimpleObject> extends RawObje
10
9
  __eventList: any;
11
10
  __eventPrefix?: string;
12
11
  __stopEvents?: boolean;
13
- static readonly __object_type: () => ClassType<SimpleObject>;
12
+ protected static readonly __object_type: () => typeof SimpleObject;
14
13
  protected __last_object_data: {
15
14
  [key: string]: string;
16
15
  };
@@ -130,7 +129,7 @@ export declare class ObjectManager<ObjType extends SimpleObject> extends RawObje
130
129
  static addError(o?: ObjectManager<any>, title?: string, message?: string, sendToRegister?: boolean | "auto"): any[] | undefined;
131
130
  static getErrors(o: ObjectManager<any>): any[];
132
131
  static clearErrors(o: ObjectManager<any>): boolean;
133
- getObjectType(): ClassType<SimpleObject>;
134
- static getObjectType(): ClassType<SimpleObject>;
132
+ getObjectType(): typeof SimpleObject;
133
+ static getObjectType(): typeof SimpleObject;
135
134
  }
136
135
  export default ObjectManager;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/webobject",
3
- "version": "1.4.173",
3
+ "version": "1.4.175",
4
4
  "description": "Stateful object",
5
5
  "author": "Azrideus",
6
6
  "license": "MIT",