@azrico/webobject 1.4.96 → 1.4.98

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.
@@ -42,105 +42,139 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager, _setMetaValue, _ge
42
42
  _defineProperty(_assertThisInitialized(_this), "__last_web_path", "");
43
43
  _defineProperty(_assertThisInitialized(_this), "__last_web_type", "");
44
44
  if (_this.constructor["__save_message"]) {
45
- _this.event_add("on_save", "on_save-sendmsg", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
46
- return _regeneratorRuntime().wrap(function _callee$(_context) {
47
- while (1) switch (_context.prev = _context.next) {
48
- case 0:
49
- _context.t0 = _this.getSaveResultType();
50
- _context.next = _context.t0 === "nothing" ? 3 : _context.t0 === "normal" ? 6 : 9;
51
- break;
52
- case 3:
53
- _context.next = 5;
54
- return _global.gfunc.run_action("show_message", {
55
- message: "Nothing to save",
56
- type: "info"
57
- });
58
- case 5:
59
- return _context.abrupt("return", _context.sent);
60
- case 6:
61
- _context.next = 8;
62
- return _global.gfunc.run_action("show_message", {
63
- message: "Saved",
64
- type: "success"
65
- });
66
- case 8:
67
- return _context.abrupt("return", _context.sent);
68
- case 9:
69
- _context.next = 11;
70
- return _global.gfunc.run_action("show_message", {
71
- message: "Not saved",
72
- type: "error"
73
- });
74
- case 11:
75
- return _context.abrupt("return", _context.sent);
76
- case 12:
77
- case "end":
78
- return _context.stop();
79
- }
80
- }, _callee);
81
- })));
82
- _this.event_add("on_{archive,unarchive}", "on_archive-sendmsg", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
83
- var srType;
84
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
85
- while (1) switch (_context2.prev = _context2.next) {
86
- case 0:
87
- srType = _this.getSaveResultType();
88
- _context2.t0 = srType;
89
- _context2.next = _context2.t0 === "normal" ? 4 : 7;
90
- break;
91
- case 4:
92
- _context2.next = 6;
93
- return _global.gfunc.run_action("show_message", {
94
- message: _this.isArchived ? "Archived" : "Restored",
95
- type: "success"
96
- });
97
- case 6:
98
- return _context2.abrupt("return", _context2.sent);
99
- case 7:
100
- _context2.next = 9;
101
- return _global.gfunc.run_action("show_message", {
102
- message: "Not archived (".concat(srType, ")"),
103
- type: "error"
104
- });
105
- case 9:
106
- return _context2.abrupt("return", _context2.sent);
107
- case 10:
108
- case "end":
109
- return _context2.stop();
110
- }
111
- }, _callee2);
112
- })));
113
- _this.event_add("on_delete", "on_delete-sendmsg", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
114
- var srType;
115
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
116
- while (1) switch (_context3.prev = _context3.next) {
117
- case 0:
118
- srType = _this.getSaveResultType();
119
- _context3.t0 = srType;
120
- _context3.next = _context3.t0 === "normal" ? 4 : 7;
121
- break;
122
- case 4:
123
- _context3.next = 6;
124
- return _global.gfunc.run_action("show_message", {
125
- message: "Deleted",
126
- type: "success"
127
- });
128
- case 6:
129
- return _context3.abrupt("return", _context3.sent);
130
- case 7:
131
- _context3.next = 9;
132
- return _global.gfunc.run_action("show_message", {
133
- message: "Not deleted (".concat(srType, ")"),
134
- type: "error"
135
- });
136
- case 9:
137
- return _context3.abrupt("return", _context3.sent);
138
- case 10:
139
- case "end":
140
- return _context3.stop();
141
- }
142
- }, _callee3);
143
- })));
45
+ var _ref, _ref2, _ref3, _ref4;
46
+ _this.event_add("on_save", "on_save-sendmsg", function (_x) {
47
+ return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(srt) {
48
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
49
+ while (1) switch (_context.prev = _context.next) {
50
+ case 0:
51
+ _context.t0 = srt;
52
+ _context.next = _context.t0 === "nothing" ? 3 : _context.t0 === "normal" ? 6 : 9;
53
+ break;
54
+ case 3:
55
+ _context.next = 5;
56
+ return _global.gfunc.run_action("show_message", {
57
+ message: "Nothing to save",
58
+ type: "info"
59
+ });
60
+ case 5:
61
+ return _context.abrupt("return", _context.sent);
62
+ case 6:
63
+ _context.next = 8;
64
+ return _global.gfunc.run_action("show_message", {
65
+ message: "Saved",
66
+ type: "success"
67
+ });
68
+ case 8:
69
+ return _context.abrupt("return", _context.sent);
70
+ case 9:
71
+ _context.next = 11;
72
+ return _global.gfunc.run_action("show_message", {
73
+ message: "Not saved",
74
+ type: "error"
75
+ });
76
+ case 11:
77
+ return _context.abrupt("return", _context.sent);
78
+ case 12:
79
+ case "end":
80
+ return _context.stop();
81
+ }
82
+ }, _callee);
83
+ }))).apply(this, arguments);
84
+ });
85
+ _this.event_add("on_archive", "on_archive-sendmsg", function (_x2) {
86
+ return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(srType) {
87
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
88
+ while (1) switch (_context2.prev = _context2.next) {
89
+ case 0:
90
+ _context2.t0 = srType;
91
+ _context2.next = _context2.t0 === "normal" ? 3 : 6;
92
+ break;
93
+ case 3:
94
+ _context2.next = 5;
95
+ return _global.gfunc.run_action("show_message", {
96
+ message: "Archived",
97
+ type: "success"
98
+ });
99
+ case 5:
100
+ return _context2.abrupt("return", _context2.sent);
101
+ case 6:
102
+ _context2.next = 8;
103
+ return _global.gfunc.run_action("show_message", {
104
+ message: "Not archived (".concat(srType, ")"),
105
+ type: "error"
106
+ });
107
+ case 8:
108
+ return _context2.abrupt("return", _context2.sent);
109
+ case 9:
110
+ case "end":
111
+ return _context2.stop();
112
+ }
113
+ }, _callee2);
114
+ }))).apply(this, arguments);
115
+ });
116
+ _this.event_add("on_unarchive", "on_unarchive-sendmsg", function (_x3) {
117
+ return (_ref3 = _ref3 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(srType) {
118
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
119
+ while (1) switch (_context3.prev = _context3.next) {
120
+ case 0:
121
+ _context3.t0 = srType;
122
+ _context3.next = _context3.t0 === "normal" ? 3 : 6;
123
+ break;
124
+ case 3:
125
+ _context3.next = 5;
126
+ return _global.gfunc.run_action("show_message", {
127
+ message: "Restored",
128
+ type: "success"
129
+ });
130
+ case 5:
131
+ return _context3.abrupt("return", _context3.sent);
132
+ case 6:
133
+ _context3.next = 8;
134
+ return _global.gfunc.run_action("show_message", {
135
+ message: "Not restored (".concat(srType, ")"),
136
+ type: "error"
137
+ });
138
+ case 8:
139
+ return _context3.abrupt("return", _context3.sent);
140
+ case 9:
141
+ case "end":
142
+ return _context3.stop();
143
+ }
144
+ }, _callee3);
145
+ }))).apply(this, arguments);
146
+ });
147
+ _this.event_add("on_delete", "on_delete-sendmsg", function (_x4) {
148
+ return (_ref4 = _ref4 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(srType) {
149
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
150
+ while (1) switch (_context4.prev = _context4.next) {
151
+ case 0:
152
+ _context4.t0 = srType;
153
+ _context4.next = _context4.t0 === "normal" ? 3 : 6;
154
+ break;
155
+ case 3:
156
+ _context4.next = 5;
157
+ return _global.gfunc.run_action("show_message", {
158
+ message: "Deleted",
159
+ type: "success"
160
+ });
161
+ case 5:
162
+ return _context4.abrupt("return", _context4.sent);
163
+ case 6:
164
+ _context4.next = 8;
165
+ return _global.gfunc.run_action("show_message", {
166
+ message: "Not deleted (".concat(srType, ")"),
167
+ type: "error"
168
+ });
169
+ case 8:
170
+ return _context4.abrupt("return", _context4.sent);
171
+ case 9:
172
+ case "end":
173
+ return _context4.stop();
174
+ }
175
+ }, _callee4);
176
+ }))).apply(this, arguments);
177
+ });
144
178
  }
145
179
  return _this;
146
180
  }
@@ -168,24 +202,24 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager, _setMetaValue, _ge
168
202
  */
169
203
  }, {
170
204
  key: "setMetaValue",
171
- value: function setMetaValue(_x, _x2) {
172
- return (_setMetaValue = _setMetaValue || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(key, value) {
205
+ value: function setMetaValue(_x5, _x6) {
206
+ return (_setMetaValue = _setMetaValue || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(key, value) {
173
207
  var _this$obj;
174
208
  var sendChange,
175
- _args4 = arguments;
176
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
177
- while (1) switch (_context4.prev = _context4.next) {
209
+ _args5 = arguments;
210
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
211
+ while (1) switch (_context5.prev = _context5.next) {
178
212
  case 0:
179
- sendChange = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : "auto";
180
- _context4.next = 3;
213
+ sendChange = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : "auto";
214
+ _context5.next = 3;
181
215
  return (_this$obj = this.obj) === null || _this$obj === void 0 ? void 0 : _this$obj.setMetaValue(key, value, sendChange);
182
216
  case 3:
183
- return _context4.abrupt("return", _context4.sent);
217
+ return _context5.abrupt("return", _context5.sent);
184
218
  case 4:
185
219
  case "end":
186
- return _context4.stop();
220
+ return _context5.stop();
187
221
  }
188
- }, _callee4, this);
222
+ }, _callee5, this);
189
223
  }))).apply(this, arguments);
190
224
  }
191
225
  }, {
@@ -198,68 +232,68 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager, _setMetaValue, _ge
198
232
  }, {
199
233
  key: "get_deltaObject",
200
234
  value: function get_deltaObject() {
201
- return (_get_deltaObject = _get_deltaObject || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
235
+ return (_get_deltaObject = _get_deltaObject || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
202
236
  var _this$obj3;
203
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
204
- while (1) switch (_context5.prev = _context5.next) {
237
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
238
+ while (1) switch (_context6.prev = _context6.next) {
205
239
  case 0:
206
- _context5.next = 2;
240
+ _context6.next = 2;
207
241
  return (_this$obj3 = this.obj) === null || _this$obj3 === void 0 ? void 0 : _this$obj3.get_deltaObject();
208
242
  case 2:
209
- _context5.t0 = _context5.sent;
210
- if (_context5.t0) {
211
- _context5.next = 5;
243
+ _context6.t0 = _context6.sent;
244
+ if (_context6.t0) {
245
+ _context6.next = 5;
212
246
  break;
213
247
  }
214
- _context5.t0 = {};
248
+ _context6.t0 = {};
215
249
  case 5:
216
- return _context5.abrupt("return", _context5.t0);
250
+ return _context6.abrupt("return", _context6.t0);
217
251
  case 6:
218
252
  case "end":
219
- return _context5.stop();
253
+ return _context6.stop();
220
254
  }
221
- }, _callee5, this);
255
+ }, _callee6, this);
222
256
  }))).apply(this, arguments);
223
257
  } /* ------------------------------ save and load ----------------------------- */
224
258
  }, {
225
259
  key: "Save",
226
260
  value: function Save() {
227
- return (_Save = _Save || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
261
+ return (_Save = _Save || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
228
262
  var _this$obj4;
229
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
230
- while (1) switch (_context6.prev = _context6.next) {
263
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
264
+ while (1) switch (_context7.prev = _context7.next) {
231
265
  case 0:
232
- _context6.next = 2;
266
+ _context7.next = 2;
233
267
  return (_this$obj4 = this.obj) === null || _this$obj4 === void 0 ? void 0 : _this$obj4.Save();
234
268
  case 2:
235
- _context6.t0 = _context6.sent;
236
- if (_context6.t0) {
237
- _context6.next = 5;
269
+ _context7.t0 = _context7.sent;
270
+ if (_context7.t0) {
271
+ _context7.next = 5;
238
272
  break;
239
273
  }
240
- _context6.t0 = false;
274
+ _context7.t0 = false;
241
275
  case 5:
242
- return _context6.abrupt("return", _context6.t0);
276
+ return _context7.abrupt("return", _context7.t0);
243
277
  case 6:
244
278
  case "end":
245
- return _context6.stop();
279
+ return _context7.stop();
246
280
  }
247
- }, _callee6, this);
281
+ }, _callee7, this);
248
282
  }))).apply(this, arguments);
249
283
  }
250
284
  }, {
251
285
  key: "Load",
252
- value: function Load(_x3) {
253
- return (_Load = _Load || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(search) {
254
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
255
- while (1) switch (_context7.prev = _context7.next) {
286
+ value: function Load(_x7) {
287
+ return (_Load = _Load || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(search) {
288
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
289
+ while (1) switch (_context8.prev = _context8.next) {
256
290
  case 0:
257
291
  throw Error("load not implented");
258
292
  case 1:
259
293
  case "end":
260
- return _context7.stop();
294
+ return _context8.stop();
261
295
  }
262
- }, _callee7);
296
+ }, _callee8);
263
297
  }))).apply(this, arguments);
264
298
  }
265
299
  /* -------------------------------------------------------------------------- */
@@ -295,32 +329,32 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager, _setMetaValue, _ge
295
329
  }, {
296
330
  key: "onNew",
297
331
  value: function onNew() {
298
- return (_onNew = _onNew || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
332
+ return (_onNew = _onNew || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
299
333
  var _this$obj9;
300
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
301
- while (1) switch (_context8.prev = _context8.next) {
334
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
335
+ while (1) switch (_context9.prev = _context9.next) {
302
336
  case 0:
303
337
  if (this.canModify) {
304
338
  (_this$obj9 = this.obj) === null || _this$obj9 === void 0 || _this$obj9.setOriginal();
305
339
  }
306
- _context8.next = 3;
340
+ _context9.next = 3;
307
341
  return this.event_run("on_new");
308
342
  case 3:
309
- _context8.next = 5;
343
+ _context9.next = 5;
310
344
  return this.event_run("on_change", true);
311
345
  case 5:
312
- _context8.next = 7;
346
+ _context9.next = 7;
313
347
  return this.event_run("on_after_new");
314
348
  case 7:
315
- _context8.next = 9;
349
+ _context9.next = 9;
316
350
  return Promise.resolve(true);
317
351
  case 9:
318
- return _context8.abrupt("return", _context8.sent);
352
+ return _context9.abrupt("return", _context9.sent);
319
353
  case 10:
320
354
  case "end":
321
- return _context8.stop();
355
+ return _context9.stop();
322
356
  }
323
- }, _callee8, this);
357
+ }, _callee9, this);
324
358
  }))).apply(this, arguments);
325
359
  }
326
360
  /**
@@ -331,70 +365,70 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager, _setMetaValue, _ge
331
365
  }, {
332
366
  key: "onDelete",
333
367
  value: function onDelete() {
334
- return (_onDelete = _onDelete || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
368
+ return (_onDelete = _onDelete || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
335
369
  var srt;
336
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
337
- while (1) switch (_context9.prev = _context9.next) {
370
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
371
+ while (1) switch (_context10.prev = _context10.next) {
338
372
  case 0:
339
373
  srt = this.getSaveResultType();
340
- _context9.next = 3;
374
+ _context10.next = 3;
341
375
  return this.event_run("on_delete", srt);
342
376
  case 3:
343
- _context9.next = 5;
377
+ _context10.next = 5;
344
378
  return this.event_run("on_after_delete", srt);
345
379
  case 5:
346
- return _context9.abrupt("return", true);
380
+ return _context10.abrupt("return", true);
347
381
  case 6:
348
382
  case "end":
349
- return _context9.stop();
383
+ return _context10.stop();
350
384
  }
351
- }, _callee9, this);
385
+ }, _callee10, this);
352
386
  }))).apply(this, arguments);
353
387
  }
354
388
  }, {
355
389
  key: "onArchive",
356
390
  value: function onArchive() {
357
- return (_onArchive = _onArchive || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
391
+ return (_onArchive = _onArchive || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
358
392
  var srt;
359
- return _regeneratorRuntime().wrap(function _callee10$(_context10) {
360
- while (1) switch (_context10.prev = _context10.next) {
393
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
394
+ while (1) switch (_context11.prev = _context11.next) {
361
395
  case 0:
362
396
  srt = this.getSaveResultType();
363
- _context10.next = 3;
397
+ _context11.next = 3;
364
398
  return this.event_run("on_archive", srt);
365
399
  case 3:
366
- _context10.next = 5;
400
+ _context11.next = 5;
367
401
  return this.event_run("on_after_archive", srt);
368
402
  case 5:
369
- return _context10.abrupt("return", true);
403
+ return _context11.abrupt("return", true);
370
404
  case 6:
371
405
  case "end":
372
- return _context10.stop();
406
+ return _context11.stop();
373
407
  }
374
- }, _callee10, this);
408
+ }, _callee11, this);
375
409
  }))).apply(this, arguments);
376
410
  }
377
411
  }, {
378
412
  key: "onUnArchive",
379
413
  value: function onUnArchive() {
380
- return (_onUnArchive = _onUnArchive || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
414
+ return (_onUnArchive = _onUnArchive || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
381
415
  var srt;
382
- return _regeneratorRuntime().wrap(function _callee11$(_context11) {
383
- while (1) switch (_context11.prev = _context11.next) {
416
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
417
+ while (1) switch (_context12.prev = _context12.next) {
384
418
  case 0:
385
419
  srt = this.getSaveResultType();
386
- _context11.next = 3;
420
+ _context12.next = 3;
387
421
  return this.event_run("on_unarchive", srt);
388
422
  case 3:
389
- _context11.next = 5;
423
+ _context12.next = 5;
390
424
  return this.event_run("on_after_unarchive", srt);
391
425
  case 5:
392
- return _context11.abrupt("return", true);
426
+ return _context12.abrupt("return", true);
393
427
  case 6:
394
428
  case "end":
395
- return _context11.stop();
429
+ return _context12.stop();
396
430
  }
397
- }, _callee11, this);
431
+ }, _callee12, this);
398
432
  }))).apply(this, arguments);
399
433
  }
400
434
  /**
@@ -405,32 +439,32 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager, _setMetaValue, _ge
405
439
  }, {
406
440
  key: "onLoad",
407
441
  value: function onLoad() {
408
- return (_onLoad = _onLoad || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
409
- return _regeneratorRuntime().wrap(function _callee12$(_context12) {
410
- while (1) switch (_context12.prev = _context12.next) {
442
+ return (_onLoad = _onLoad || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
443
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
444
+ while (1) switch (_context13.prev = _context13.next) {
411
445
  case 0:
412
446
  if (this.canModify && this.obj) {
413
447
  this.obj.isDeleted = false;
414
448
  this.obj.setOriginal();
415
449
  }
416
- _context12.next = 3;
450
+ _context13.next = 3;
417
451
  return this.event_run("on_load");
418
452
  case 3:
419
- _context12.next = 5;
453
+ _context13.next = 5;
420
454
  return this.event_run("on_change", true);
421
455
  case 5:
422
- _context12.next = 7;
456
+ _context13.next = 7;
423
457
  return this.event_run("on_after_load");
424
458
  case 7:
425
- _context12.next = 9;
459
+ _context13.next = 9;
426
460
  return this.event_run("on_load_finished");
427
461
  case 9:
428
- return _context12.abrupt("return", true);
462
+ return _context13.abrupt("return", true);
429
463
  case 10:
430
464
  case "end":
431
- return _context12.stop();
465
+ return _context13.stop();
432
466
  }
433
- }, _callee12, this);
467
+ }, _callee13, this);
434
468
  }))).apply(this, arguments);
435
469
  }
436
470
  /**
@@ -441,53 +475,53 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager, _setMetaValue, _ge
441
475
  }, {
442
476
  key: "onSave",
443
477
  value: function onSave() {
444
- return (_onSave = _onSave || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
478
+ return (_onSave = _onSave || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
445
479
  var srt;
446
- return _regeneratorRuntime().wrap(function _callee13$(_context13) {
447
- while (1) switch (_context13.prev = _context13.next) {
480
+ return _regeneratorRuntime().wrap(function _callee14$(_context14) {
481
+ while (1) switch (_context14.prev = _context14.next) {
448
482
  case 0:
449
483
  srt = this.getSaveResultType();
450
- _context13.next = 3;
484
+ _context14.next = 3;
451
485
  return this.event_run("on_save", srt);
452
486
  case 3:
453
- _context13.next = 5;
487
+ _context14.next = 5;
454
488
  return this.event_run("on_change", true);
455
489
  case 5:
456
- _context13.next = 7;
490
+ _context14.next = 7;
457
491
  return Promise.resolve(true);
458
492
  case 7:
459
- return _context13.abrupt("return", _context13.sent);
493
+ return _context14.abrupt("return", _context14.sent);
460
494
  case 8:
461
495
  case "end":
462
- return _context13.stop();
496
+ return _context14.stop();
463
497
  }
464
- }, _callee13, this);
498
+ }, _callee14, this);
465
499
  }))).apply(this, arguments);
466
500
  }
467
501
  }, {
468
502
  key: "onAfterSave",
469
503
  value: function onAfterSave() {
470
- return (_onAfterSave = _onAfterSave || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
504
+ return (_onAfterSave = _onAfterSave || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
471
505
  var srt;
472
- return _regeneratorRuntime().wrap(function _callee14$(_context14) {
473
- while (1) switch (_context14.prev = _context14.next) {
506
+ return _regeneratorRuntime().wrap(function _callee15$(_context15) {
507
+ while (1) switch (_context15.prev = _context15.next) {
474
508
  case 0:
475
509
  srt = this.getSaveResultType();
476
- _context14.next = 3;
510
+ _context15.next = 3;
477
511
  return this.event_run("on_after_save", srt);
478
512
  case 3:
479
- _context14.next = 5;
513
+ _context15.next = 5;
480
514
  return this.event_run("on_save_finished", srt);
481
515
  case 5:
482
- _context14.next = 7;
516
+ _context15.next = 7;
483
517
  return Promise.resolve(true);
484
518
  case 7:
485
- return _context14.abrupt("return", _context14.sent);
519
+ return _context15.abrupt("return", _context15.sent);
486
520
  case 8:
487
521
  case "end":
488
- return _context14.stop();
522
+ return _context15.stop();
489
523
  }
490
- }, _callee14, this);
524
+ }, _callee15, this);
491
525
  }))).apply(this, arguments);
492
526
  }
493
527
  }]);
@@ -1,4 +1,4 @@
1
- import { convObject } from "@azrico/convert";
1
+ import { formatObject } from "@azrico/convert";
2
2
  import { MapableObject } from "./MapableObject";
3
3
  import ObjectManager from "./ObjectManager";
4
4
  export type saveResultType = "normal" | "nothing" | "error" | "canceled";
@@ -14,7 +14,7 @@ export declare class SimpleObject extends MapableObject {
14
14
  static readonly __changeables?: string[];
15
15
  static readonly __protectedProperties?: string[];
16
16
  static readonly __functionProperties?: string[];
17
- static readonly __formatList?: convObject;
17
+ static readonly __formatList?: formatObject;
18
18
  static readonly __extraProperties?: string[];
19
19
  static readonly __childTypes?: any[];
20
20
  static readonly __importColumns?: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/webobject",
3
- "version": "1.4.96",
3
+ "version": "1.4.98",
4
4
  "description": "Stateful object",
5
5
  "author": "Azrideus",
6
6
  "license": "MIT",
@@ -71,12 +71,12 @@
71
71
  "@azrico/uid": "*"
72
72
  },
73
73
  "dependencies": {
74
- "@azrico/convert": "^1.0.3",
74
+ "@azrico/convert": "^1.0.5",
75
75
  "@azrico/event": "^1.2.17",
76
- "@azrico/global": "^1.3.50",
77
- "@azrico/math": "^1.0.3",
78
- "@azrico/object": "^1.4.87",
79
- "@azrico/string": "^1.2.84",
76
+ "@azrico/global": "^1.3.65",
77
+ "@azrico/math": "^1.0.5",
78
+ "@azrico/object": "^1.4.91",
79
+ "@azrico/string": "^1.2.88",
80
80
  "@azrico/types": "^1.0.4",
81
81
  "@azrico/uid": "^1.0.5"
82
82
  },