@azrico/webobject 1.3.6 → 1.3.8
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.
- package/dist/src/WebObjects/WebObject.d.ts +1 -0
- package/dist/src/WebObjects/WebObject.js +105 -73
- package/dist/src/WebObjects/WebObjectManager.d.ts +6 -0
- package/dist/src/WebObjects/WebObjectManager.js +58 -22
- package/dist/src/structs/SimpleObject.d.ts +2 -0
- package/dist/src/structs/SimpleObject.js +6 -1
- package/package.json +1 -1
|
@@ -69,6 +69,7 @@ export declare class WebObject extends SimpleObject {
|
|
|
69
69
|
static get_webname(): string | undefined;
|
|
70
70
|
get manager(): WebObjectManager<any> | null;
|
|
71
71
|
get_managerClass: () => WebObjectManager<any> | null;
|
|
72
|
+
onDelete(...p: any): Promise<any>;
|
|
72
73
|
onLoad(...p: any): Promise<any>;
|
|
73
74
|
onSave(...p: any): Promise<any>;
|
|
74
75
|
onNew(...p: any): Promise<any>;
|
|
@@ -344,9 +344,9 @@ var WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
344
344
|
return this.get_managerClass();
|
|
345
345
|
}
|
|
346
346
|
}, {
|
|
347
|
-
key: "
|
|
347
|
+
key: "onDelete",
|
|
348
348
|
value: /* -------------------------------------------------------------------------- */function () {
|
|
349
|
-
var
|
|
349
|
+
var _onDelete = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
350
350
|
var _this$manager;
|
|
351
351
|
var _len,
|
|
352
352
|
p,
|
|
@@ -355,19 +355,51 @@ var WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
355
355
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
356
356
|
while (1) switch (_context6.prev = _context6.next) {
|
|
357
357
|
case 0:
|
|
358
|
+
this.isDeleted = true;
|
|
358
359
|
for (_len = _args6.length, p = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
359
360
|
p[_key] = _args6[_key];
|
|
360
361
|
}
|
|
361
|
-
_context6.next =
|
|
362
|
-
return (_this$manager = this.manager) === null || _this$manager === void 0 ? void 0 : _this$manager.
|
|
363
|
-
case 3:
|
|
364
|
-
return _context6.abrupt("return", _context6.sent);
|
|
362
|
+
_context6.next = 4;
|
|
363
|
+
return (_this$manager = this.manager) === null || _this$manager === void 0 ? void 0 : _this$manager.onDelete.apply(_this$manager, p);
|
|
365
364
|
case 4:
|
|
365
|
+
return _context6.abrupt("return", _context6.sent);
|
|
366
|
+
case 5:
|
|
366
367
|
case "end":
|
|
367
368
|
return _context6.stop();
|
|
368
369
|
}
|
|
369
370
|
}, _callee6, this);
|
|
370
371
|
}));
|
|
372
|
+
function onDelete() {
|
|
373
|
+
return _onDelete.apply(this, arguments);
|
|
374
|
+
}
|
|
375
|
+
return onDelete;
|
|
376
|
+
}()
|
|
377
|
+
}, {
|
|
378
|
+
key: "onLoad",
|
|
379
|
+
value: function () {
|
|
380
|
+
var _onLoad = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
381
|
+
var _this$manager2;
|
|
382
|
+
var _len2,
|
|
383
|
+
p,
|
|
384
|
+
_key2,
|
|
385
|
+
_args7 = arguments;
|
|
386
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
387
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
388
|
+
case 0:
|
|
389
|
+
this.isDeleted = false;
|
|
390
|
+
for (_len2 = _args7.length, p = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
391
|
+
p[_key2] = _args7[_key2];
|
|
392
|
+
}
|
|
393
|
+
_context7.next = 4;
|
|
394
|
+
return (_this$manager2 = this.manager) === null || _this$manager2 === void 0 ? void 0 : _this$manager2.onLoad.apply(_this$manager2, p);
|
|
395
|
+
case 4:
|
|
396
|
+
return _context7.abrupt("return", _context7.sent);
|
|
397
|
+
case 5:
|
|
398
|
+
case "end":
|
|
399
|
+
return _context7.stop();
|
|
400
|
+
}
|
|
401
|
+
}, _callee7, this);
|
|
402
|
+
}));
|
|
371
403
|
function onLoad() {
|
|
372
404
|
return _onLoad.apply(this, arguments);
|
|
373
405
|
}
|
|
@@ -376,17 +408,17 @@ var WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
376
408
|
}, {
|
|
377
409
|
key: "onSave",
|
|
378
410
|
value: function () {
|
|
379
|
-
var _onSave = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
411
|
+
var _onSave = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
380
412
|
var _this3 = this,
|
|
381
|
-
_this$
|
|
413
|
+
_this$manager3;
|
|
382
414
|
var srObject,
|
|
383
415
|
actual_sr,
|
|
384
|
-
|
|
416
|
+
_len3,
|
|
385
417
|
p,
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
return _regeneratorRuntime().wrap(function
|
|
389
|
-
while (1) switch (
|
|
418
|
+
_key3,
|
|
419
|
+
_args8 = arguments;
|
|
420
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
421
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
390
422
|
case 0:
|
|
391
423
|
if (this.isSaved) {
|
|
392
424
|
this.apply_changes();
|
|
@@ -410,18 +442,18 @@ var WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
410
442
|
}
|
|
411
443
|
}
|
|
412
444
|
}
|
|
413
|
-
for (
|
|
414
|
-
p[
|
|
445
|
+
for (_len3 = _args8.length, p = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
446
|
+
p[_key3] = _args8[_key3];
|
|
415
447
|
}
|
|
416
|
-
|
|
417
|
-
return (_this$
|
|
448
|
+
_context8.next = 4;
|
|
449
|
+
return (_this$manager3 = this.manager) === null || _this$manager3 === void 0 ? void 0 : _this$manager3.onSave.apply(_this$manager3, p);
|
|
418
450
|
case 4:
|
|
419
|
-
return
|
|
451
|
+
return _context8.abrupt("return", _context8.sent);
|
|
420
452
|
case 5:
|
|
421
453
|
case "end":
|
|
422
|
-
return
|
|
454
|
+
return _context8.stop();
|
|
423
455
|
}
|
|
424
|
-
},
|
|
456
|
+
}, _callee8, this);
|
|
425
457
|
}));
|
|
426
458
|
function onSave() {
|
|
427
459
|
return _onSave.apply(this, arguments);
|
|
@@ -431,27 +463,27 @@ var WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
431
463
|
}, {
|
|
432
464
|
key: "onNew",
|
|
433
465
|
value: function () {
|
|
434
|
-
var _onNew = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
435
|
-
var _this$
|
|
436
|
-
var
|
|
466
|
+
var _onNew = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
467
|
+
var _this$manager4;
|
|
468
|
+
var _len4,
|
|
437
469
|
p,
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
return _regeneratorRuntime().wrap(function
|
|
441
|
-
while (1) switch (
|
|
470
|
+
_key4,
|
|
471
|
+
_args9 = arguments;
|
|
472
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
473
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
442
474
|
case 0:
|
|
443
|
-
for (
|
|
444
|
-
p[
|
|
475
|
+
for (_len4 = _args9.length, p = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
476
|
+
p[_key4] = _args9[_key4];
|
|
445
477
|
}
|
|
446
|
-
|
|
447
|
-
return (_this$
|
|
478
|
+
_context9.next = 3;
|
|
479
|
+
return (_this$manager4 = this.manager) === null || _this$manager4 === void 0 ? void 0 : _this$manager4.onNew.apply(_this$manager4, p);
|
|
448
480
|
case 3:
|
|
449
|
-
return
|
|
481
|
+
return _context9.abrupt("return", _context9.sent);
|
|
450
482
|
case 4:
|
|
451
483
|
case "end":
|
|
452
|
-
return
|
|
484
|
+
return _context9.stop();
|
|
453
485
|
}
|
|
454
|
-
},
|
|
486
|
+
}, _callee9, this);
|
|
455
487
|
}));
|
|
456
488
|
function onNew() {
|
|
457
489
|
return _onNew.apply(this, arguments);
|
|
@@ -503,64 +535,64 @@ var WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
503
535
|
}, {
|
|
504
536
|
key: "get_single",
|
|
505
537
|
value: function () {
|
|
506
|
-
var _get_single = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
507
|
-
var
|
|
538
|
+
var _get_single = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
|
|
539
|
+
var _len5,
|
|
508
540
|
p,
|
|
509
|
-
|
|
541
|
+
_key5,
|
|
510
542
|
search,
|
|
511
543
|
readonly,
|
|
512
544
|
fetchID,
|
|
513
545
|
res,
|
|
514
546
|
params,
|
|
515
|
-
|
|
516
|
-
return _regeneratorRuntime().wrap(function
|
|
517
|
-
while (1) switch (
|
|
547
|
+
_args10 = arguments;
|
|
548
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
549
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
518
550
|
case 0:
|
|
519
|
-
for (
|
|
520
|
-
p[
|
|
551
|
+
for (_len5 = _args10.length, p = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
552
|
+
p[_key5] = _args10[_key5];
|
|
521
553
|
}
|
|
522
554
|
search = p.shift();
|
|
523
555
|
readonly = p.shift();
|
|
524
556
|
fetchID = p.shift();
|
|
525
557
|
if (!(0, _object.object_isEmpty)(search)) {
|
|
526
|
-
|
|
558
|
+
_context10.next = 6;
|
|
527
559
|
break;
|
|
528
560
|
}
|
|
529
|
-
return
|
|
561
|
+
return _context10.abrupt("return", undefined);
|
|
530
562
|
case 6:
|
|
531
563
|
params = {};
|
|
532
564
|
params.context = readonly ? "view" : "edit";
|
|
533
|
-
|
|
534
|
-
|
|
565
|
+
_context10.t0 = _typeof(search);
|
|
566
|
+
_context10.next = _context10.t0 === "string" ? 11 : _context10.t0 === "number" ? 11 : _context10.t0 === "object" ? 19 : 19;
|
|
535
567
|
break;
|
|
536
568
|
case 11:
|
|
537
569
|
search = String(search);
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
570
|
+
_context10.t1 = this;
|
|
571
|
+
_context10.t2 = this;
|
|
572
|
+
_context10.next = 16;
|
|
541
573
|
return _global.gfunc.run_action("get", this.__web_path + "/" + search, params, {
|
|
542
574
|
fetchID: fetchID
|
|
543
575
|
});
|
|
544
576
|
case 16:
|
|
545
|
-
|
|
546
|
-
res =
|
|
547
|
-
return
|
|
577
|
+
_context10.t3 = _context10.sent;
|
|
578
|
+
res = _context10.t1.ensure.call(_context10.t1, _context10.t2, _context10.t3);
|
|
579
|
+
return _context10.abrupt("break", 25);
|
|
548
580
|
case 19:
|
|
549
|
-
|
|
550
|
-
|
|
581
|
+
_context10.t4 = _object.object_first;
|
|
582
|
+
_context10.next = 22;
|
|
551
583
|
return this.get_list(search, readonly, fetchID);
|
|
552
584
|
case 22:
|
|
553
|
-
|
|
554
|
-
res = (0,
|
|
555
|
-
return
|
|
585
|
+
_context10.t5 = _context10.sent;
|
|
586
|
+
res = (0, _context10.t4)(_context10.t5);
|
|
587
|
+
return _context10.abrupt("break", 25);
|
|
556
588
|
case 25:
|
|
557
589
|
WebObject.setReadonly(res, readonly);
|
|
558
|
-
return
|
|
590
|
+
return _context10.abrupt("return", res);
|
|
559
591
|
case 27:
|
|
560
592
|
case "end":
|
|
561
|
-
return
|
|
593
|
+
return _context10.stop();
|
|
562
594
|
}
|
|
563
|
-
},
|
|
595
|
+
}, _callee10, this);
|
|
564
596
|
}));
|
|
565
597
|
function get_single() {
|
|
566
598
|
return _get_single.apply(this, arguments);
|
|
@@ -574,42 +606,42 @@ var WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
574
606
|
}, {
|
|
575
607
|
key: "get_list",
|
|
576
608
|
value: function () {
|
|
577
|
-
var _get_list = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
578
|
-
var
|
|
609
|
+
var _get_list = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
610
|
+
var _len6,
|
|
579
611
|
p,
|
|
580
|
-
|
|
612
|
+
_key6,
|
|
581
613
|
search,
|
|
582
614
|
readonly,
|
|
583
615
|
fetchID,
|
|
584
616
|
result_items,
|
|
585
617
|
selftype,
|
|
586
618
|
res,
|
|
587
|
-
|
|
588
|
-
return _regeneratorRuntime().wrap(function
|
|
589
|
-
while (1) switch (
|
|
619
|
+
_args11 = arguments;
|
|
620
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
621
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
590
622
|
case 0:
|
|
591
|
-
for (
|
|
592
|
-
p[
|
|
623
|
+
for (_len6 = _args11.length, p = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
|
|
624
|
+
p[_key6] = _args11[_key6];
|
|
593
625
|
}
|
|
594
626
|
search = p.shift();
|
|
595
627
|
readonly = p.shift();
|
|
596
628
|
fetchID = p.shift();
|
|
597
629
|
if (!search) search = {};
|
|
598
|
-
|
|
630
|
+
_context11.next = 7;
|
|
599
631
|
return _global.gfunc.run_action("get", this.__web_path, search, {
|
|
600
632
|
fetchID: fetchID
|
|
601
633
|
});
|
|
602
634
|
case 7:
|
|
603
|
-
result_items =
|
|
635
|
+
result_items = _context11.sent;
|
|
604
636
|
selftype = this.prototype;
|
|
605
637
|
res = WebObject.map_rowindex(WebObject.mapto(selftype, result_items, readonly));
|
|
606
638
|
WebObject.setReadonly(res, readonly);
|
|
607
|
-
return
|
|
639
|
+
return _context11.abrupt("return", res);
|
|
608
640
|
case 12:
|
|
609
641
|
case "end":
|
|
610
|
-
return
|
|
642
|
+
return _context11.stop();
|
|
611
643
|
}
|
|
612
|
-
},
|
|
644
|
+
}, _callee11, this);
|
|
613
645
|
}));
|
|
614
646
|
function get_list() {
|
|
615
647
|
return _get_list.apply(this, arguments);
|
|
@@ -32,6 +32,12 @@ export declare class WebObjectManager<T extends WebObject> extends ObjectManager
|
|
|
32
32
|
* @returns
|
|
33
33
|
*/
|
|
34
34
|
onNew(...p: any): Promise<any>;
|
|
35
|
+
/**
|
|
36
|
+
* Use this when you delete Object
|
|
37
|
+
* @param p
|
|
38
|
+
* @returns
|
|
39
|
+
*/
|
|
40
|
+
onDelete(...p: any): Promise<any>;
|
|
35
41
|
/**
|
|
36
42
|
* Use this when you load data to the object
|
|
37
43
|
* @param p
|
|
@@ -254,39 +254,75 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager) {
|
|
|
254
254
|
return onNew;
|
|
255
255
|
}()
|
|
256
256
|
/**
|
|
257
|
-
* Use this when you
|
|
257
|
+
* Use this when you delete Object
|
|
258
258
|
* @param p
|
|
259
259
|
* @returns
|
|
260
260
|
*/
|
|
261
261
|
}, {
|
|
262
|
-
key: "
|
|
262
|
+
key: "onDelete",
|
|
263
263
|
value: function () {
|
|
264
|
-
var
|
|
265
|
-
var _this$obj9;
|
|
264
|
+
var _onDelete = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
266
265
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
267
266
|
while (1) switch (_context6.prev = _context6.next) {
|
|
268
267
|
case 0:
|
|
269
|
-
if (this.
|
|
270
|
-
|
|
268
|
+
if (this.obj) {
|
|
269
|
+
this.obj.isDeleted = true;
|
|
271
270
|
}
|
|
272
271
|
_context6.next = 3;
|
|
273
|
-
return this.event_run("
|
|
272
|
+
return this.event_run("on_delete");
|
|
274
273
|
case 3:
|
|
275
274
|
_context6.next = 5;
|
|
276
|
-
return this.event_run("
|
|
275
|
+
return this.event_run("on_after_delete");
|
|
277
276
|
case 5:
|
|
278
277
|
_context6.next = 7;
|
|
278
|
+
return Promise.resolve(true);
|
|
279
|
+
case 7:
|
|
280
|
+
return _context6.abrupt("return", _context6.sent);
|
|
281
|
+
case 8:
|
|
282
|
+
case "end":
|
|
283
|
+
return _context6.stop();
|
|
284
|
+
}
|
|
285
|
+
}, _callee6, this);
|
|
286
|
+
}));
|
|
287
|
+
function onDelete() {
|
|
288
|
+
return _onDelete.apply(this, arguments);
|
|
289
|
+
}
|
|
290
|
+
return onDelete;
|
|
291
|
+
}()
|
|
292
|
+
/**
|
|
293
|
+
* Use this when you load data to the object
|
|
294
|
+
* @param p
|
|
295
|
+
* @returns
|
|
296
|
+
*/
|
|
297
|
+
}, {
|
|
298
|
+
key: "onLoad",
|
|
299
|
+
value: function () {
|
|
300
|
+
var _onLoad = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
301
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
302
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
303
|
+
case 0:
|
|
304
|
+
if (this.canModify && this.obj) {
|
|
305
|
+
this.obj.isDeleted = false;
|
|
306
|
+
this.obj.setOriginal();
|
|
307
|
+
}
|
|
308
|
+
_context7.next = 3;
|
|
309
|
+
return this.event_run("on_load");
|
|
310
|
+
case 3:
|
|
311
|
+
_context7.next = 5;
|
|
312
|
+
return this.event_run("on_change", true);
|
|
313
|
+
case 5:
|
|
314
|
+
_context7.next = 7;
|
|
279
315
|
return this.event_run("on_after_load");
|
|
280
316
|
case 7:
|
|
281
|
-
|
|
317
|
+
_context7.next = 9;
|
|
282
318
|
return Promise.resolve(true);
|
|
283
319
|
case 9:
|
|
284
|
-
return
|
|
320
|
+
return _context7.abrupt("return", _context7.sent);
|
|
285
321
|
case 10:
|
|
286
322
|
case "end":
|
|
287
|
-
return
|
|
323
|
+
return _context7.stop();
|
|
288
324
|
}
|
|
289
|
-
},
|
|
325
|
+
}, _callee7, this);
|
|
290
326
|
}));
|
|
291
327
|
function onLoad() {
|
|
292
328
|
return _onLoad.apply(this, arguments);
|
|
@@ -301,28 +337,28 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager) {
|
|
|
301
337
|
}, {
|
|
302
338
|
key: "onSave",
|
|
303
339
|
value: function () {
|
|
304
|
-
var _onSave = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
305
|
-
return _regeneratorRuntime().wrap(function
|
|
306
|
-
while (1) switch (
|
|
340
|
+
var _onSave = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
341
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
342
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
307
343
|
case 0:
|
|
308
|
-
|
|
344
|
+
_context8.next = 2;
|
|
309
345
|
return this.event_run("on_save");
|
|
310
346
|
case 2:
|
|
311
|
-
|
|
347
|
+
_context8.next = 4;
|
|
312
348
|
return this.event_run("on_change", true);
|
|
313
349
|
case 4:
|
|
314
|
-
|
|
350
|
+
_context8.next = 6;
|
|
315
351
|
return this.event_run("on_after_save");
|
|
316
352
|
case 6:
|
|
317
|
-
|
|
353
|
+
_context8.next = 8;
|
|
318
354
|
return Promise.resolve(true);
|
|
319
355
|
case 8:
|
|
320
|
-
return
|
|
356
|
+
return _context8.abrupt("return", _context8.sent);
|
|
321
357
|
case 9:
|
|
322
358
|
case "end":
|
|
323
|
-
return
|
|
359
|
+
return _context8.stop();
|
|
324
360
|
}
|
|
325
|
-
},
|
|
361
|
+
}, _callee8, this);
|
|
326
362
|
}));
|
|
327
363
|
function onSave() {
|
|
328
364
|
return _onSave.apply(this, arguments);
|
|
@@ -21,6 +21,7 @@ export declare class SimpleObject extends MapableObject {
|
|
|
21
21
|
__lastChanged: string;
|
|
22
22
|
__is_readonly: boolean;
|
|
23
23
|
__throw_errors: boolean;
|
|
24
|
+
__deleted: boolean;
|
|
24
25
|
__errors?: any[];
|
|
25
26
|
__showErrors?: boolean;
|
|
26
27
|
__saveResultObject?: any;
|
|
@@ -73,6 +74,7 @@ export declare class SimpleObject extends MapableObject {
|
|
|
73
74
|
static setThrowErrors(objs?: SimpleObject[] | SimpleObject, throwErr?: boolean): void;
|
|
74
75
|
get isChanged(): boolean;
|
|
75
76
|
get isDeleted(): boolean;
|
|
77
|
+
set isDeleted(v: boolean);
|
|
76
78
|
get d(): Partial<this>;
|
|
77
79
|
get allproperties(): this & Partial<this>;
|
|
78
80
|
get canModify(): boolean;
|
|
@@ -68,6 +68,7 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject) {
|
|
|
68
68
|
_defineProperty(_assertThisInitialized(_this), "__lastChanged", "");
|
|
69
69
|
_defineProperty(_assertThisInitialized(_this), "__is_readonly", void 0);
|
|
70
70
|
_defineProperty(_assertThisInitialized(_this), "__throw_errors", void 0);
|
|
71
|
+
_defineProperty(_assertThisInitialized(_this), "__deleted", void 0);
|
|
71
72
|
//errors
|
|
72
73
|
_defineProperty(_assertThisInitialized(_this), "__errors", void 0);
|
|
73
74
|
_defineProperty(_assertThisInitialized(_this), "__showErrors", void 0);
|
|
@@ -88,6 +89,7 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject) {
|
|
|
88
89
|
_defineProperty(_assertThisInitialized(_this), "get_managerClass", function () {
|
|
89
90
|
return null;
|
|
90
91
|
});
|
|
92
|
+
_this.__deleted = false;
|
|
91
93
|
_this.__delta = {};
|
|
92
94
|
_this.__temp = {};
|
|
93
95
|
_this.__is_readonly = is_readonly;
|
|
@@ -435,7 +437,10 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject) {
|
|
|
435
437
|
}, {
|
|
436
438
|
key: "isDeleted",
|
|
437
439
|
get: function get() {
|
|
438
|
-
return false;
|
|
440
|
+
return this.__deleted || false;
|
|
441
|
+
},
|
|
442
|
+
set: function set(v) {
|
|
443
|
+
this.__deleted = v;
|
|
439
444
|
}
|
|
440
445
|
}, {
|
|
441
446
|
key: "d",
|