@azrico/webobject 1.3.23 → 1.3.24

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,7 +1,5 @@
1
1
  import { MapableObject } from "./MapableObject";
2
2
  import ObjectManager from "./ObjectManager";
3
- import WebObject from "../WebObjects/WebObject";
4
- import WebObjectManager from "../WebObjects/WebObjectManager";
5
3
  export type saveResultType = "normal" | "nothing" | "error" | "canceled";
6
4
  export type saveType = "normal" | "quick";
7
5
  export type sendChangesType = boolean | "auto";
@@ -79,7 +77,7 @@ export declare class SimpleObject extends MapableObject {
79
77
  * @param subvalue
80
78
  * @return true if changed , false otherwise
81
79
  */
82
- setSubValue(key: PropOf<this>, objKey: string, subvalue: any, sendChanges?: sendChangesType): Promise<boolean>;
80
+ setSubValue<MKey extends PropOf<this>>(key: MKey, objKey: string, subvalue: any, sendChanges?: sendChangesType): Promise<boolean>;
83
81
  /**
84
82
  * Push value on array
85
83
  * @param key
@@ -88,6 +86,14 @@ export declare class SimpleObject extends MapableObject {
88
86
  * @returns
89
87
  */
90
88
  pushValue<MKey extends PropOf<this>>(key: MKey, value: any, sendChanges?: sendChangesType): Promise<this[MKey] | false>;
89
+ /**
90
+ * notify the manager class when a meta value is changed on this object
91
+ * @param type
92
+ * @param key
93
+ * @param value
94
+ * @param subvalue
95
+ */
96
+ notifyChanged<MKey extends PropOf<this>>(type: "meta", key: string, value: any, subvalue?: any): any;
91
97
  /**
92
98
  * notify the manager class when a value is changed on this object
93
99
  * @param type
@@ -95,7 +101,7 @@ export declare class SimpleObject extends MapableObject {
95
101
  * @param value
96
102
  * @param subvalue
97
103
  */
98
- notifyChanged(type: string, key: string, value: any, subvalue?: any): Promise<void>;
104
+ notifyChanged<MKey extends PropOf<this>>(type: string, key: MKey, value: any, subvalue?: any): any;
99
105
  /**
100
106
  * check if a key can be changed on an object
101
107
  * @param object
@@ -139,8 +145,9 @@ export declare class SimpleObject extends MapableObject {
139
145
  get isSaved(): boolean;
140
146
  get isNew(): boolean;
141
147
  get lastChanged(): string;
142
- get manager(): (this extends WebObject ? WebObjectManager<any> : ObjectManager<any>) | undefined;
143
- set_managerClass(mng: (this extends WebObject ? WebObjectManager<any> : ObjectManager<any>) | any): void;
148
+ get manager(): ObjectManager<any> | undefined;
149
+ get_managerClass: () => ObjectManager<any> | undefined;
150
+ set_managerClass(mng: any): void;
144
151
  static isDeleted<T extends SimpleObject>(obj: T): boolean;
145
152
  getIndexOrID(): number | string;
146
153
  getIndex(): number;