@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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
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(
|
|
172
|
-
return (_setMetaValue = _setMetaValue || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
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
|
-
|
|
176
|
-
return _regeneratorRuntime().wrap(function
|
|
177
|
-
while (1) switch (
|
|
209
|
+
_args5 = arguments;
|
|
210
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
211
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
178
212
|
case 0:
|
|
179
|
-
sendChange =
|
|
180
|
-
|
|
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
|
|
217
|
+
return _context5.abrupt("return", _context5.sent);
|
|
184
218
|
case 4:
|
|
185
219
|
case "end":
|
|
186
|
-
return
|
|
220
|
+
return _context5.stop();
|
|
187
221
|
}
|
|
188
|
-
},
|
|
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
|
|
235
|
+
return (_get_deltaObject = _get_deltaObject || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
202
236
|
var _this$obj3;
|
|
203
|
-
return _regeneratorRuntime().wrap(function
|
|
204
|
-
while (1) switch (
|
|
237
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
238
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
205
239
|
case 0:
|
|
206
|
-
|
|
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
|
-
|
|
210
|
-
if (
|
|
211
|
-
|
|
243
|
+
_context6.t0 = _context6.sent;
|
|
244
|
+
if (_context6.t0) {
|
|
245
|
+
_context6.next = 5;
|
|
212
246
|
break;
|
|
213
247
|
}
|
|
214
|
-
|
|
248
|
+
_context6.t0 = {};
|
|
215
249
|
case 5:
|
|
216
|
-
return
|
|
250
|
+
return _context6.abrupt("return", _context6.t0);
|
|
217
251
|
case 6:
|
|
218
252
|
case "end":
|
|
219
|
-
return
|
|
253
|
+
return _context6.stop();
|
|
220
254
|
}
|
|
221
|
-
},
|
|
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
|
|
261
|
+
return (_Save = _Save || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
228
262
|
var _this$obj4;
|
|
229
|
-
return _regeneratorRuntime().wrap(function
|
|
230
|
-
while (1) switch (
|
|
263
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
264
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
231
265
|
case 0:
|
|
232
|
-
|
|
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
|
-
|
|
236
|
-
if (
|
|
237
|
-
|
|
269
|
+
_context7.t0 = _context7.sent;
|
|
270
|
+
if (_context7.t0) {
|
|
271
|
+
_context7.next = 5;
|
|
238
272
|
break;
|
|
239
273
|
}
|
|
240
|
-
|
|
274
|
+
_context7.t0 = false;
|
|
241
275
|
case 5:
|
|
242
|
-
return
|
|
276
|
+
return _context7.abrupt("return", _context7.t0);
|
|
243
277
|
case 6:
|
|
244
278
|
case "end":
|
|
245
|
-
return
|
|
279
|
+
return _context7.stop();
|
|
246
280
|
}
|
|
247
|
-
},
|
|
281
|
+
}, _callee7, this);
|
|
248
282
|
}))).apply(this, arguments);
|
|
249
283
|
}
|
|
250
284
|
}, {
|
|
251
285
|
key: "Load",
|
|
252
|
-
value: function Load(
|
|
253
|
-
return (_Load = _Load || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
254
|
-
return _regeneratorRuntime().wrap(function
|
|
255
|
-
while (1) switch (
|
|
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
|
|
294
|
+
return _context8.stop();
|
|
261
295
|
}
|
|
262
|
-
},
|
|
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
|
|
332
|
+
return (_onNew = _onNew || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
299
333
|
var _this$obj9;
|
|
300
|
-
return _regeneratorRuntime().wrap(function
|
|
301
|
-
while (1) switch (
|
|
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
|
-
|
|
340
|
+
_context9.next = 3;
|
|
307
341
|
return this.event_run("on_new");
|
|
308
342
|
case 3:
|
|
309
|
-
|
|
343
|
+
_context9.next = 5;
|
|
310
344
|
return this.event_run("on_change", true);
|
|
311
345
|
case 5:
|
|
312
|
-
|
|
346
|
+
_context9.next = 7;
|
|
313
347
|
return this.event_run("on_after_new");
|
|
314
348
|
case 7:
|
|
315
|
-
|
|
349
|
+
_context9.next = 9;
|
|
316
350
|
return Promise.resolve(true);
|
|
317
351
|
case 9:
|
|
318
|
-
return
|
|
352
|
+
return _context9.abrupt("return", _context9.sent);
|
|
319
353
|
case 10:
|
|
320
354
|
case "end":
|
|
321
|
-
return
|
|
355
|
+
return _context9.stop();
|
|
322
356
|
}
|
|
323
|
-
},
|
|
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
|
|
368
|
+
return (_onDelete = _onDelete || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
|
|
335
369
|
var srt;
|
|
336
|
-
return _regeneratorRuntime().wrap(function
|
|
337
|
-
while (1) switch (
|
|
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
|
-
|
|
374
|
+
_context10.next = 3;
|
|
341
375
|
return this.event_run("on_delete", srt);
|
|
342
376
|
case 3:
|
|
343
|
-
|
|
377
|
+
_context10.next = 5;
|
|
344
378
|
return this.event_run("on_after_delete", srt);
|
|
345
379
|
case 5:
|
|
346
|
-
return
|
|
380
|
+
return _context10.abrupt("return", true);
|
|
347
381
|
case 6:
|
|
348
382
|
case "end":
|
|
349
|
-
return
|
|
383
|
+
return _context10.stop();
|
|
350
384
|
}
|
|
351
|
-
},
|
|
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
|
|
391
|
+
return (_onArchive = _onArchive || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
358
392
|
var srt;
|
|
359
|
-
return _regeneratorRuntime().wrap(function
|
|
360
|
-
while (1) switch (
|
|
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
|
-
|
|
397
|
+
_context11.next = 3;
|
|
364
398
|
return this.event_run("on_archive", srt);
|
|
365
399
|
case 3:
|
|
366
|
-
|
|
400
|
+
_context11.next = 5;
|
|
367
401
|
return this.event_run("on_after_archive", srt);
|
|
368
402
|
case 5:
|
|
369
|
-
return
|
|
403
|
+
return _context11.abrupt("return", true);
|
|
370
404
|
case 6:
|
|
371
405
|
case "end":
|
|
372
|
-
return
|
|
406
|
+
return _context11.stop();
|
|
373
407
|
}
|
|
374
|
-
},
|
|
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
|
|
414
|
+
return (_onUnArchive = _onUnArchive || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
|
|
381
415
|
var srt;
|
|
382
|
-
return _regeneratorRuntime().wrap(function
|
|
383
|
-
while (1) switch (
|
|
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
|
-
|
|
420
|
+
_context12.next = 3;
|
|
387
421
|
return this.event_run("on_unarchive", srt);
|
|
388
422
|
case 3:
|
|
389
|
-
|
|
423
|
+
_context12.next = 5;
|
|
390
424
|
return this.event_run("on_after_unarchive", srt);
|
|
391
425
|
case 5:
|
|
392
|
-
return
|
|
426
|
+
return _context12.abrupt("return", true);
|
|
393
427
|
case 6:
|
|
394
428
|
case "end":
|
|
395
|
-
return
|
|
429
|
+
return _context12.stop();
|
|
396
430
|
}
|
|
397
|
-
},
|
|
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
|
|
409
|
-
return _regeneratorRuntime().wrap(function
|
|
410
|
-
while (1) switch (
|
|
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
|
-
|
|
450
|
+
_context13.next = 3;
|
|
417
451
|
return this.event_run("on_load");
|
|
418
452
|
case 3:
|
|
419
|
-
|
|
453
|
+
_context13.next = 5;
|
|
420
454
|
return this.event_run("on_change", true);
|
|
421
455
|
case 5:
|
|
422
|
-
|
|
456
|
+
_context13.next = 7;
|
|
423
457
|
return this.event_run("on_after_load");
|
|
424
458
|
case 7:
|
|
425
|
-
|
|
459
|
+
_context13.next = 9;
|
|
426
460
|
return this.event_run("on_load_finished");
|
|
427
461
|
case 9:
|
|
428
|
-
return
|
|
462
|
+
return _context13.abrupt("return", true);
|
|
429
463
|
case 10:
|
|
430
464
|
case "end":
|
|
431
|
-
return
|
|
465
|
+
return _context13.stop();
|
|
432
466
|
}
|
|
433
|
-
},
|
|
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
|
|
478
|
+
return (_onSave = _onSave || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
|
|
445
479
|
var srt;
|
|
446
|
-
return _regeneratorRuntime().wrap(function
|
|
447
|
-
while (1) switch (
|
|
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
|
-
|
|
484
|
+
_context14.next = 3;
|
|
451
485
|
return this.event_run("on_save", srt);
|
|
452
486
|
case 3:
|
|
453
|
-
|
|
487
|
+
_context14.next = 5;
|
|
454
488
|
return this.event_run("on_change", true);
|
|
455
489
|
case 5:
|
|
456
|
-
|
|
490
|
+
_context14.next = 7;
|
|
457
491
|
return Promise.resolve(true);
|
|
458
492
|
case 7:
|
|
459
|
-
return
|
|
493
|
+
return _context14.abrupt("return", _context14.sent);
|
|
460
494
|
case 8:
|
|
461
495
|
case "end":
|
|
462
|
-
return
|
|
496
|
+
return _context14.stop();
|
|
463
497
|
}
|
|
464
|
-
},
|
|
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
|
|
504
|
+
return (_onAfterSave = _onAfterSave || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
|
|
471
505
|
var srt;
|
|
472
|
-
return _regeneratorRuntime().wrap(function
|
|
473
|
-
while (1) switch (
|
|
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
|
-
|
|
510
|
+
_context15.next = 3;
|
|
477
511
|
return this.event_run("on_after_save", srt);
|
|
478
512
|
case 3:
|
|
479
|
-
|
|
513
|
+
_context15.next = 5;
|
|
480
514
|
return this.event_run("on_save_finished", srt);
|
|
481
515
|
case 5:
|
|
482
|
-
|
|
516
|
+
_context15.next = 7;
|
|
483
517
|
return Promise.resolve(true);
|
|
484
518
|
case 7:
|
|
485
|
-
return
|
|
519
|
+
return _context15.abrupt("return", _context15.sent);
|
|
486
520
|
case 8:
|
|
487
521
|
case "end":
|
|
488
|
-
return
|
|
522
|
+
return _context15.stop();
|
|
489
523
|
}
|
|
490
|
-
},
|
|
524
|
+
}, _callee15, this);
|
|
491
525
|
}))).apply(this, arguments);
|
|
492
526
|
}
|
|
493
527
|
}]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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?:
|
|
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.
|
|
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.
|
|
74
|
+
"@azrico/convert": "^1.0.5",
|
|
75
75
|
"@azrico/event": "^1.2.17",
|
|
76
|
-
"@azrico/global": "^1.3.
|
|
77
|
-
"@azrico/math": "^1.0.
|
|
78
|
-
"@azrico/object": "^1.4.
|
|
79
|
-
"@azrico/string": "^1.2.
|
|
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
|
},
|