@azrico/webobject 1.3.1 → 1.3.3
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.
|
@@ -194,10 +194,13 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager) {
|
|
|
194
194
|
return this.event_run("on_change", true);
|
|
195
195
|
case 5:
|
|
196
196
|
_context4.next = 7;
|
|
197
|
-
return
|
|
197
|
+
return this.event_run("on_after_new");
|
|
198
198
|
case 7:
|
|
199
|
+
_context4.next = 9;
|
|
200
|
+
return Promise.resolve(true);
|
|
201
|
+
case 9:
|
|
199
202
|
return _context4.abrupt("return", _context4.sent);
|
|
200
|
-
case
|
|
203
|
+
case 10:
|
|
201
204
|
case "end":
|
|
202
205
|
return _context4.stop();
|
|
203
206
|
}
|
|
@@ -231,10 +234,13 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager) {
|
|
|
231
234
|
return this.event_run("on_change", true);
|
|
232
235
|
case 5:
|
|
233
236
|
_context5.next = 7;
|
|
234
|
-
return
|
|
237
|
+
return this.event_run("on_after_load");
|
|
235
238
|
case 7:
|
|
239
|
+
_context5.next = 9;
|
|
240
|
+
return Promise.resolve(true);
|
|
241
|
+
case 9:
|
|
236
242
|
return _context5.abrupt("return", _context5.sent);
|
|
237
|
-
case
|
|
243
|
+
case 10:
|
|
238
244
|
case "end":
|
|
239
245
|
return _context5.stop();
|
|
240
246
|
}
|
|
@@ -264,10 +270,13 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager) {
|
|
|
264
270
|
return this.event_run("on_change", true);
|
|
265
271
|
case 4:
|
|
266
272
|
_context6.next = 6;
|
|
267
|
-
return
|
|
273
|
+
return this.event_run("on_after_save");
|
|
268
274
|
case 6:
|
|
275
|
+
_context6.next = 8;
|
|
276
|
+
return Promise.resolve(true);
|
|
277
|
+
case 8:
|
|
269
278
|
return _context6.abrupt("return", _context6.sent);
|
|
270
|
-
case
|
|
279
|
+
case 9:
|
|
271
280
|
case "end":
|
|
272
281
|
return _context6.stop();
|
|
273
282
|
}
|
|
@@ -10,7 +10,7 @@ export declare class ObjectManager<ObjType extends SimpleObject> {
|
|
|
10
10
|
__sendEvents: boolean;
|
|
11
11
|
__currentObject?: ObjType | null;
|
|
12
12
|
__options?: object;
|
|
13
|
-
notifyChanged(type: string, key: PropOf<ObjType>, value?: any, subvalue?: string): Promise<false |
|
|
13
|
+
notifyChanged(type: string, key: PropOf<ObjType>, value?: any, subvalue?: string): Promise<false | any[] | undefined>;
|
|
14
14
|
get obj(): ObjType | undefined;
|
|
15
15
|
/**
|
|
16
16
|
* Get the object this manager is managing
|
|
@@ -55,7 +55,7 @@ export declare class ObjectManager<ObjType extends SimpleObject> {
|
|
|
55
55
|
getIndexOrID(): number | string;
|
|
56
56
|
getIndex(): number;
|
|
57
57
|
getID(): string;
|
|
58
|
-
event_run(eventName: string, ...params: any): Promise<
|
|
58
|
+
event_run(eventName: string, ...params: any): Promise<any[] | undefined>;
|
|
59
59
|
event_use(name: string, runEvent: (...inputdata: any) => any, onlyOn?: any, runOnce?: boolean): any;
|
|
60
60
|
event_remove(name: string, uname: string): boolean;
|
|
61
61
|
event_add(name: string, uname: string, runEvent: (...inputdata: any) => any, onlyOn?: any, runOnce?: boolean): Promise<void>;
|
|
@@ -69,7 +69,7 @@ export declare class ObjectManager<ObjType extends SimpleObject> {
|
|
|
69
69
|
* @returns
|
|
70
70
|
*/
|
|
71
71
|
toggleOption(key: string, value: any): Promise<void>;
|
|
72
|
-
setOption(key: string, value: any): Promise<
|
|
72
|
+
setOption(key: string, value: any): Promise<any[] | undefined>;
|
|
73
73
|
/**
|
|
74
74
|
* Sets an option then does an action,
|
|
75
75
|
* after the action is run, updates the option again
|
|
@@ -321,6 +321,8 @@ var ObjectManager = /*#__PURE__*/function () {
|
|
|
321
321
|
_context5.next = 5;
|
|
322
322
|
return _event.EventManager.run.apply(_event.EventManager, [this, eventName].concat(params));
|
|
323
323
|
case 5:
|
|
324
|
+
return _context5.abrupt("return", _context5.sent);
|
|
325
|
+
case 6:
|
|
324
326
|
case "end":
|
|
325
327
|
return _context5.stop();
|
|
326
328
|
}
|