@azrico/webobject 1.4.133 → 1.4.136

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.
@@ -23,6 +23,11 @@ export declare class WebObjectManager<T extends WebObject> extends ObjectManager
23
23
  getMetaValue(key: string): any;
24
24
  get_deltaObject(): Promise<any>;
25
25
  Save(): Promise<boolean>;
26
+ Delete(): Promise<any>;
27
+ Lock(): Promise<any>;
28
+ UnLock(): Promise<any>;
29
+ Archive(): Promise<any>;
30
+ UnArchive(): Promise<any>;
26
31
  Load(search: any, ...p: any[]): Promise<WebObject | undefined>;
27
32
  get __web_path(): string;
28
33
  get __web_type(): string;
@@ -41,6 +46,8 @@ export declare class WebObjectManager<T extends WebObject> extends ObjectManager
41
46
  onDelete(...p: any): Promise<any>;
42
47
  onArchive(...p: any): Promise<any>;
43
48
  onUnArchive(...p: any): Promise<any>;
49
+ onLock(...p: any): Promise<any>;
50
+ onUnLock(...p: any): Promise<any>;
44
51
  /**
45
52
  * Use this when you load data to the object
46
53
  * @param p
@@ -304,18 +304,168 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
304
304
  return Save;
305
305
  }())
306
306
  }, {
307
- key: "Load",
307
+ key: "Delete",
308
308
  value: function () {
309
- var _Load = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(search) {
309
+ var _Delete = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
310
+ var _this$obj5;
310
311
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
311
312
  while (1) switch (_context8.prev = _context8.next) {
313
+ case 0:
314
+ _context8.next = 2;
315
+ return (_this$obj5 = this.obj) === null || _this$obj5 === void 0 ? void 0 : _this$obj5.Delete();
316
+ case 2:
317
+ _context8.t0 = _context8.sent;
318
+ if (_context8.t0) {
319
+ _context8.next = 5;
320
+ break;
321
+ }
322
+ _context8.t0 = false;
323
+ case 5:
324
+ return _context8.abrupt("return", _context8.t0);
325
+ case 6:
326
+ case "end":
327
+ return _context8.stop();
328
+ }
329
+ }, _callee8, this);
330
+ }));
331
+ function Delete() {
332
+ return _Delete.apply(this, arguments);
333
+ }
334
+ return Delete;
335
+ }()
336
+ }, {
337
+ key: "Lock",
338
+ value: function () {
339
+ var _Lock = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
340
+ var _this$obj6;
341
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
342
+ while (1) switch (_context9.prev = _context9.next) {
343
+ case 0:
344
+ _context9.next = 2;
345
+ return (_this$obj6 = this.obj) === null || _this$obj6 === void 0 ? void 0 : _this$obj6.Lock();
346
+ case 2:
347
+ _context9.t0 = _context9.sent;
348
+ if (_context9.t0) {
349
+ _context9.next = 5;
350
+ break;
351
+ }
352
+ _context9.t0 = false;
353
+ case 5:
354
+ return _context9.abrupt("return", _context9.t0);
355
+ case 6:
356
+ case "end":
357
+ return _context9.stop();
358
+ }
359
+ }, _callee9, this);
360
+ }));
361
+ function Lock() {
362
+ return _Lock.apply(this, arguments);
363
+ }
364
+ return Lock;
365
+ }()
366
+ }, {
367
+ key: "UnLock",
368
+ value: function () {
369
+ var _UnLock = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
370
+ var _this$obj7;
371
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
372
+ while (1) switch (_context10.prev = _context10.next) {
373
+ case 0:
374
+ _context10.next = 2;
375
+ return (_this$obj7 = this.obj) === null || _this$obj7 === void 0 ? void 0 : _this$obj7.UnLock();
376
+ case 2:
377
+ _context10.t0 = _context10.sent;
378
+ if (_context10.t0) {
379
+ _context10.next = 5;
380
+ break;
381
+ }
382
+ _context10.t0 = false;
383
+ case 5:
384
+ return _context10.abrupt("return", _context10.t0);
385
+ case 6:
386
+ case "end":
387
+ return _context10.stop();
388
+ }
389
+ }, _callee10, this);
390
+ }));
391
+ function UnLock() {
392
+ return _UnLock.apply(this, arguments);
393
+ }
394
+ return UnLock;
395
+ }()
396
+ }, {
397
+ key: "Archive",
398
+ value: function () {
399
+ var _Archive = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
400
+ var _this$obj8;
401
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
402
+ while (1) switch (_context11.prev = _context11.next) {
403
+ case 0:
404
+ _context11.next = 2;
405
+ return (_this$obj8 = this.obj) === null || _this$obj8 === void 0 ? void 0 : _this$obj8.Archive();
406
+ case 2:
407
+ _context11.t0 = _context11.sent;
408
+ if (_context11.t0) {
409
+ _context11.next = 5;
410
+ break;
411
+ }
412
+ _context11.t0 = false;
413
+ case 5:
414
+ return _context11.abrupt("return", _context11.t0);
415
+ case 6:
416
+ case "end":
417
+ return _context11.stop();
418
+ }
419
+ }, _callee11, this);
420
+ }));
421
+ function Archive() {
422
+ return _Archive.apply(this, arguments);
423
+ }
424
+ return Archive;
425
+ }()
426
+ }, {
427
+ key: "UnArchive",
428
+ value: function () {
429
+ var _UnArchive = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
430
+ var _this$obj9;
431
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
432
+ while (1) switch (_context12.prev = _context12.next) {
433
+ case 0:
434
+ _context12.next = 2;
435
+ return (_this$obj9 = this.obj) === null || _this$obj9 === void 0 ? void 0 : _this$obj9.UnArchive();
436
+ case 2:
437
+ _context12.t0 = _context12.sent;
438
+ if (_context12.t0) {
439
+ _context12.next = 5;
440
+ break;
441
+ }
442
+ _context12.t0 = false;
443
+ case 5:
444
+ return _context12.abrupt("return", _context12.t0);
445
+ case 6:
446
+ case "end":
447
+ return _context12.stop();
448
+ }
449
+ }, _callee12, this);
450
+ }));
451
+ function UnArchive() {
452
+ return _UnArchive.apply(this, arguments);
453
+ }
454
+ return UnArchive;
455
+ }() /* -------------------------------------------------------------------------- */
456
+ }, {
457
+ key: "Load",
458
+ value: (function () {
459
+ var _Load = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(search) {
460
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
461
+ while (1) switch (_context13.prev = _context13.next) {
312
462
  case 0:
313
463
  throw Error("load not implented");
314
464
  case 1:
315
465
  case "end":
316
- return _context8.stop();
466
+ return _context13.stop();
317
467
  }
318
- }, _callee8);
468
+ }, _callee13);
319
469
  }));
320
470
  function Load(_x7) {
321
471
  return _Load.apply(this, arguments);
@@ -325,19 +475,20 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
325
475
  /* -------------------------------------------------------------------------- */
326
476
  /* Child Functions */
327
477
  /* -------------------------------------------------------------------------- */
478
+ )
328
479
  }, {
329
480
  key: "__web_path",
330
481
  get: function get() {
331
- var _this$obj5, _this$constructor$__o, _this$obj6, _this$constructor$__o2;
332
- return ((_this$obj5 = this.obj) === null || _this$obj5 === void 0 ? void 0 : _this$obj5.__web_path) || ((_this$constructor$__o = this.constructor["__object_type"]) === null || _this$constructor$__o === void 0 ? void 0 : _this$constructor$__o.__web_path) || this.__last_web_path || ( //alternative
333
- (_this$obj6 = this.obj) === null || _this$obj6 === void 0 ? void 0 : _this$obj6.__web_type) || ((_this$constructor$__o2 = this.constructor["__object_type"]) === null || _this$constructor$__o2 === void 0 ? void 0 : _this$constructor$__o2.__web_type) || this.__last_web_type || "";
482
+ var _this$obj10, _this$constructor$__o, _this$obj11, _this$constructor$__o2;
483
+ return ((_this$obj10 = this.obj) === null || _this$obj10 === void 0 ? void 0 : _this$obj10.__web_path) || ((_this$constructor$__o = this.constructor["__object_type"]) === null || _this$constructor$__o === void 0 ? void 0 : _this$constructor$__o.__web_path) || this.__last_web_path || ( //alternative
484
+ (_this$obj11 = this.obj) === null || _this$obj11 === void 0 ? void 0 : _this$obj11.__web_type) || ((_this$constructor$__o2 = this.constructor["__object_type"]) === null || _this$constructor$__o2 === void 0 ? void 0 : _this$constructor$__o2.__web_type) || this.__last_web_type || "";
334
485
  }
335
486
  }, {
336
487
  key: "__web_type",
337
488
  get: function get() {
338
- var _this$obj7, _this$constructor$__o3, _this$obj8, _this$constructor$__o4;
339
- return ((_this$obj7 = this.obj) === null || _this$obj7 === void 0 ? void 0 : _this$obj7.__web_type) || ((_this$constructor$__o3 = this.constructor["__object_type"]) === null || _this$constructor$__o3 === void 0 ? void 0 : _this$constructor$__o3.__web_type) || this.__last_web_type || ( //alternative
340
- (_this$obj8 = this.obj) === null || _this$obj8 === void 0 ? void 0 : _this$obj8.__web_path) || ((_this$constructor$__o4 = this.constructor["__object_type"]) === null || _this$constructor$__o4 === void 0 ? void 0 : _this$constructor$__o4.__web_path) || this.__last_web_path || "";
489
+ var _this$obj12, _this$constructor$__o3, _this$obj13, _this$constructor$__o4;
490
+ return ((_this$obj12 = this.obj) === null || _this$obj12 === void 0 ? void 0 : _this$obj12.__web_type) || ((_this$constructor$__o3 = this.constructor["__object_type"]) === null || _this$constructor$__o3 === void 0 ? void 0 : _this$constructor$__o3.__web_type) || this.__last_web_type || ( //alternative
491
+ (_this$obj13 = this.obj) === null || _this$obj13 === void 0 ? void 0 : _this$obj13.__web_path) || ((_this$constructor$__o4 = this.constructor["__object_type"]) === null || _this$constructor$__o4 === void 0 ? void 0 : _this$constructor$__o4.__web_path) || this.__last_web_path || "";
341
492
  }
342
493
  }, {
343
494
  key: "get_webname",
@@ -355,32 +506,32 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
355
506
  }, {
356
507
  key: "onNew",
357
508
  value: (function () {
358
- var _onNew = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
359
- var _this$obj9;
360
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
361
- while (1) switch (_context9.prev = _context9.next) {
509
+ var _onNew = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
510
+ var _this$obj14;
511
+ return _regeneratorRuntime().wrap(function _callee14$(_context14) {
512
+ while (1) switch (_context14.prev = _context14.next) {
362
513
  case 0:
363
514
  if (this.canModify) {
364
- (_this$obj9 = this.obj) === null || _this$obj9 === void 0 || _this$obj9.setOriginal();
515
+ (_this$obj14 = this.obj) === null || _this$obj14 === void 0 || _this$obj14.setOriginal();
365
516
  }
366
- _context9.next = 3;
517
+ _context14.next = 3;
367
518
  return this.event_run("on_new");
368
519
  case 3:
369
- _context9.next = 5;
520
+ _context14.next = 5;
370
521
  return this.event_run("on_change", true);
371
522
  case 5:
372
- _context9.next = 7;
523
+ _context14.next = 7;
373
524
  return this.event_run("on_after_new");
374
525
  case 7:
375
- _context9.next = 9;
526
+ _context14.next = 9;
376
527
  return Promise.resolve(true);
377
528
  case 9:
378
- return _context9.abrupt("return", _context9.sent);
529
+ return _context14.abrupt("return", _context14.sent);
379
530
  case 10:
380
531
  case "end":
381
- return _context9.stop();
532
+ return _context14.stop();
382
533
  }
383
- }, _callee9, this);
534
+ }, _callee14, this);
384
535
  }));
385
536
  function onNew() {
386
537
  return _onNew.apply(this, arguments);
@@ -396,24 +547,24 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
396
547
  }, {
397
548
  key: "onDelete",
398
549
  value: (function () {
399
- var _onDelete = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
550
+ var _onDelete = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
400
551
  var srt;
401
- return _regeneratorRuntime().wrap(function _callee10$(_context10) {
402
- while (1) switch (_context10.prev = _context10.next) {
552
+ return _regeneratorRuntime().wrap(function _callee15$(_context15) {
553
+ while (1) switch (_context15.prev = _context15.next) {
403
554
  case 0:
404
555
  srt = this.getSaveResultType();
405
- _context10.next = 3;
556
+ _context15.next = 3;
406
557
  return this.event_run("on_delete", srt);
407
558
  case 3:
408
- _context10.next = 5;
559
+ _context15.next = 5;
409
560
  return this.event_run("on_after_delete", srt);
410
561
  case 5:
411
- return _context10.abrupt("return", true);
562
+ return _context15.abrupt("return", true);
412
563
  case 6:
413
564
  case "end":
414
- return _context10.stop();
565
+ return _context15.stop();
415
566
  }
416
- }, _callee10, this);
567
+ }, _callee15, this);
417
568
  }));
418
569
  function onDelete() {
419
570
  return _onDelete.apply(this, arguments);
@@ -423,24 +574,24 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
423
574
  }, {
424
575
  key: "onArchive",
425
576
  value: function () {
426
- var _onArchive = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
577
+ var _onArchive = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
427
578
  var srt;
428
- return _regeneratorRuntime().wrap(function _callee11$(_context11) {
429
- while (1) switch (_context11.prev = _context11.next) {
579
+ return _regeneratorRuntime().wrap(function _callee16$(_context16) {
580
+ while (1) switch (_context16.prev = _context16.next) {
430
581
  case 0:
431
582
  srt = this.getSaveResultType();
432
- _context11.next = 3;
583
+ _context16.next = 3;
433
584
  return this.event_run("on_archive", srt);
434
585
  case 3:
435
- _context11.next = 5;
586
+ _context16.next = 5;
436
587
  return this.event_run("on_after_archive", srt);
437
588
  case 5:
438
- return _context11.abrupt("return", true);
589
+ return _context16.abrupt("return", true);
439
590
  case 6:
440
591
  case "end":
441
- return _context11.stop();
592
+ return _context16.stop();
442
593
  }
443
- }, _callee11, this);
594
+ }, _callee16, this);
444
595
  }));
445
596
  function onArchive() {
446
597
  return _onArchive.apply(this, arguments);
@@ -450,30 +601,84 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
450
601
  }, {
451
602
  key: "onUnArchive",
452
603
  value: function () {
453
- var _onUnArchive = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
604
+ var _onUnArchive = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
454
605
  var srt;
455
- return _regeneratorRuntime().wrap(function _callee12$(_context12) {
456
- while (1) switch (_context12.prev = _context12.next) {
606
+ return _regeneratorRuntime().wrap(function _callee17$(_context17) {
607
+ while (1) switch (_context17.prev = _context17.next) {
457
608
  case 0:
458
609
  srt = this.getSaveResultType();
459
- _context12.next = 3;
610
+ _context17.next = 3;
460
611
  return this.event_run("on_unarchive", srt);
461
612
  case 3:
462
- _context12.next = 5;
613
+ _context17.next = 5;
463
614
  return this.event_run("on_after_unarchive", srt);
464
615
  case 5:
465
- return _context12.abrupt("return", true);
616
+ return _context17.abrupt("return", true);
466
617
  case 6:
467
618
  case "end":
468
- return _context12.stop();
619
+ return _context17.stop();
469
620
  }
470
- }, _callee12, this);
621
+ }, _callee17, this);
471
622
  }));
472
623
  function onUnArchive() {
473
624
  return _onUnArchive.apply(this, arguments);
474
625
  }
475
626
  return onUnArchive;
476
627
  }()
628
+ }, {
629
+ key: "onLock",
630
+ value: function () {
631
+ var _onLock = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
632
+ var srt;
633
+ return _regeneratorRuntime().wrap(function _callee18$(_context18) {
634
+ while (1) switch (_context18.prev = _context18.next) {
635
+ case 0:
636
+ srt = this.getSaveResultType();
637
+ _context18.next = 3;
638
+ return this.event_run("on_lock", srt);
639
+ case 3:
640
+ _context18.next = 5;
641
+ return this.event_run("on_after_lock", srt);
642
+ case 5:
643
+ return _context18.abrupt("return", true);
644
+ case 6:
645
+ case "end":
646
+ return _context18.stop();
647
+ }
648
+ }, _callee18, this);
649
+ }));
650
+ function onLock() {
651
+ return _onLock.apply(this, arguments);
652
+ }
653
+ return onLock;
654
+ }()
655
+ }, {
656
+ key: "onUnLock",
657
+ value: function () {
658
+ var _onUnLock = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
659
+ var srt;
660
+ return _regeneratorRuntime().wrap(function _callee19$(_context19) {
661
+ while (1) switch (_context19.prev = _context19.next) {
662
+ case 0:
663
+ srt = this.getSaveResultType();
664
+ _context19.next = 3;
665
+ return this.event_run("on_unlock", srt);
666
+ case 3:
667
+ _context19.next = 5;
668
+ return this.event_run("on_after_unlock", srt);
669
+ case 5:
670
+ return _context19.abrupt("return", true);
671
+ case 6:
672
+ case "end":
673
+ return _context19.stop();
674
+ }
675
+ }, _callee19, this);
676
+ }));
677
+ function onUnLock() {
678
+ return _onUnLock.apply(this, arguments);
679
+ }
680
+ return onUnLock;
681
+ }()
477
682
  /**
478
683
  * Use this when you load data to the object
479
684
  * @param p
@@ -482,32 +687,32 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
482
687
  }, {
483
688
  key: "onLoad",
484
689
  value: (function () {
485
- var _onLoad = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
486
- return _regeneratorRuntime().wrap(function _callee13$(_context13) {
487
- while (1) switch (_context13.prev = _context13.next) {
690
+ var _onLoad = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20() {
691
+ return _regeneratorRuntime().wrap(function _callee20$(_context20) {
692
+ while (1) switch (_context20.prev = _context20.next) {
488
693
  case 0:
489
694
  if (this.canModify && this.obj) {
490
695
  this.obj.isDeleted = false;
491
696
  this.obj.setOriginal();
492
697
  }
493
- _context13.next = 3;
698
+ _context20.next = 3;
494
699
  return this.event_run("on_load");
495
700
  case 3:
496
- _context13.next = 5;
701
+ _context20.next = 5;
497
702
  return this.event_run("on_change", true);
498
703
  case 5:
499
- _context13.next = 7;
704
+ _context20.next = 7;
500
705
  return this.event_run("on_after_load");
501
706
  case 7:
502
- _context13.next = 9;
707
+ _context20.next = 9;
503
708
  return this.event_run("on_load_finished");
504
709
  case 9:
505
- return _context13.abrupt("return", true);
710
+ return _context20.abrupt("return", true);
506
711
  case 10:
507
712
  case "end":
508
- return _context13.stop();
713
+ return _context20.stop();
509
714
  }
510
- }, _callee13, this);
715
+ }, _callee20, this);
511
716
  }));
512
717
  function onLoad() {
513
718
  return _onLoad.apply(this, arguments);
@@ -523,27 +728,27 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
523
728
  }, {
524
729
  key: "onSave",
525
730
  value: (function () {
526
- var _onSave = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
731
+ var _onSave = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21() {
527
732
  var srt;
528
- return _regeneratorRuntime().wrap(function _callee14$(_context14) {
529
- while (1) switch (_context14.prev = _context14.next) {
733
+ return _regeneratorRuntime().wrap(function _callee21$(_context21) {
734
+ while (1) switch (_context21.prev = _context21.next) {
530
735
  case 0:
531
736
  srt = this.getSaveResultType();
532
- _context14.next = 3;
737
+ _context21.next = 3;
533
738
  return this.event_run("on_save", srt);
534
739
  case 3:
535
- _context14.next = 5;
740
+ _context21.next = 5;
536
741
  return this.event_run("on_change", true);
537
742
  case 5:
538
- _context14.next = 7;
743
+ _context21.next = 7;
539
744
  return Promise.resolve(true);
540
745
  case 7:
541
- return _context14.abrupt("return", _context14.sent);
746
+ return _context21.abrupt("return", _context21.sent);
542
747
  case 8:
543
748
  case "end":
544
- return _context14.stop();
749
+ return _context21.stop();
545
750
  }
546
- }, _callee14, this);
751
+ }, _callee21, this);
547
752
  }));
548
753
  function onSave() {
549
754
  return _onSave.apply(this, arguments);
@@ -553,27 +758,27 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
553
758
  }, {
554
759
  key: "onAfterSave",
555
760
  value: function () {
556
- var _onAfterSave = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
761
+ var _onAfterSave = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22() {
557
762
  var srt;
558
- return _regeneratorRuntime().wrap(function _callee15$(_context15) {
559
- while (1) switch (_context15.prev = _context15.next) {
763
+ return _regeneratorRuntime().wrap(function _callee22$(_context22) {
764
+ while (1) switch (_context22.prev = _context22.next) {
560
765
  case 0:
561
766
  srt = this.getSaveResultType();
562
- _context15.next = 3;
767
+ _context22.next = 3;
563
768
  return this.event_run("on_after_save", srt);
564
769
  case 3:
565
- _context15.next = 5;
770
+ _context22.next = 5;
566
771
  return this.event_run("on_save_finished", srt);
567
772
  case 5:
568
- _context15.next = 7;
773
+ _context22.next = 7;
569
774
  return Promise.resolve(true);
570
775
  case 7:
571
- return _context15.abrupt("return", _context15.sent);
776
+ return _context22.abrupt("return", _context22.sent);
572
777
  case 8:
573
778
  case "end":
574
- return _context15.stop();
779
+ return _context22.stop();
575
780
  }
576
- }, _callee15, this);
781
+ }, _callee22, this);
577
782
  }));
578
783
  function onAfterSave() {
579
784
  return _onAfterSave.apply(this, arguments);
@@ -29,6 +29,7 @@ export declare class SimpleObject extends MapableObject {
29
29
  _deleted?: boolean;
30
30
  _archived?: boolean;
31
31
  _deletedBy?: string;
32
+ _locked?: boolean;
32
33
  protected __errors?: any[];
33
34
  protected __showErrors?: boolean;
34
35
  protected __refresh_functions?: {
@@ -170,6 +171,8 @@ export declare class SimpleObject extends MapableObject {
170
171
  get isArchived(): boolean;
171
172
  set isArchived(v: boolean);
172
173
  get isDeleted(): boolean;
174
+ get isLocked(): boolean;
175
+ set isLocked(v: boolean);
173
176
  set isDeleted(v: boolean);
174
177
  get d(): Partial<this>;
175
178
  get allproperties(): Partial<this>;
@@ -75,6 +75,8 @@ var SimpleObject = exports.SimpleObject = /*#__PURE__*/function (_MapableObject)
75
75
  _defineProperty(_assertThisInitialized(_this), "_deleted", void 0);
76
76
  _defineProperty(_assertThisInitialized(_this), "_archived", void 0);
77
77
  _defineProperty(_assertThisInitialized(_this), "_deletedBy", void 0);
78
+ //is this object locked?
79
+ _defineProperty(_assertThisInitialized(_this), "_locked", void 0);
78
80
  //errors
79
81
  _defineProperty(_assertThisInitialized(_this), "__errors", void 0);
80
82
  _defineProperty(_assertThisInitialized(_this), "__showErrors", void 0);
@@ -836,6 +838,14 @@ var SimpleObject = exports.SimpleObject = /*#__PURE__*/function (_MapableObject)
836
838
  set: function set(v) {
837
839
  this._deleted = v;
838
840
  }
841
+ }, {
842
+ key: "isLocked",
843
+ get: function get() {
844
+ return this.get("_locked") || false;
845
+ },
846
+ set: function set(v) {
847
+ this._locked = v;
848
+ }
839
849
  }, {
840
850
  key: "d",
841
851
  get: function get() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/webobject",
3
- "version": "1.4.133",
3
+ "version": "1.4.136",
4
4
  "description": "Stateful object",
5
5
  "author": "Azrideus",
6
6
  "license": "MIT",