@azrico/webobject 1.4.132 → 1.4.135
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/README.md +9 -9
- package/dist/src/WebObjects/WebObject.d.ts +6 -0
- package/dist/src/WebObjects/WebObject.js +348 -216
- package/dist/src/WebObjects/WebObjectManager.d.ts +2 -0
- package/dist/src/WebObjects/WebObjectManager.js +82 -28
- package/dist/src/structs/SimpleObject.d.ts +3 -0
- package/dist/src/structs/SimpleObject.js +18 -8
- package/package.json +2 -2
|
@@ -260,9 +260,9 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
260
260
|
return Delete;
|
|
261
261
|
}()
|
|
262
262
|
}, {
|
|
263
|
-
key: "
|
|
263
|
+
key: "Lock",
|
|
264
264
|
value: function () {
|
|
265
|
-
var
|
|
265
|
+
var _Lock = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
266
266
|
var resultObject;
|
|
267
267
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
268
268
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -274,12 +274,12 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
274
274
|
return _context4.abrupt("return");
|
|
275
275
|
case 2:
|
|
276
276
|
_context4.next = 4;
|
|
277
|
-
return _global.gfunc.run_action("post", "".concat(this.get_webname(), "/").concat(this.getID(), "/
|
|
277
|
+
return _global.gfunc.run_action("post", "".concat(this.get_webname(), "/").concat(this.getID(), "/lock"));
|
|
278
278
|
case 4:
|
|
279
279
|
resultObject = _context4.sent;
|
|
280
280
|
this.setSaveResult(resultObject, "auto", true);
|
|
281
281
|
_context4.next = 8;
|
|
282
|
-
return this.
|
|
282
|
+
return this.onLock();
|
|
283
283
|
case 8:
|
|
284
284
|
return _context4.abrupt("return", resultObject);
|
|
285
285
|
case 9:
|
|
@@ -288,32 +288,32 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
288
288
|
}
|
|
289
289
|
}, _callee4, this);
|
|
290
290
|
}));
|
|
291
|
-
function
|
|
292
|
-
return
|
|
291
|
+
function Lock() {
|
|
292
|
+
return _Lock.apply(this, arguments);
|
|
293
293
|
}
|
|
294
|
-
return
|
|
294
|
+
return Lock;
|
|
295
295
|
}()
|
|
296
296
|
}, {
|
|
297
|
-
key: "
|
|
297
|
+
key: "UnLock",
|
|
298
298
|
value: function () {
|
|
299
|
-
var
|
|
299
|
+
var _UnLock = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
300
300
|
var resultObject;
|
|
301
301
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
302
302
|
while (1) switch (_context5.prev = _context5.next) {
|
|
303
303
|
case 0:
|
|
304
|
-
if (!(this.isNew ||
|
|
304
|
+
if (!(this.isNew || this.isArchived)) {
|
|
305
305
|
_context5.next = 2;
|
|
306
306
|
break;
|
|
307
307
|
}
|
|
308
308
|
return _context5.abrupt("return");
|
|
309
309
|
case 2:
|
|
310
310
|
_context5.next = 4;
|
|
311
|
-
return _global.gfunc.run_action("post", "".concat(this.get_webname(), "/").concat(this.getID(), "/
|
|
311
|
+
return _global.gfunc.run_action("post", "".concat(this.get_webname(), "/").concat(this.getID(), "/unlock"));
|
|
312
312
|
case 4:
|
|
313
313
|
resultObject = _context5.sent;
|
|
314
314
|
this.setSaveResult(resultObject, "auto", true);
|
|
315
315
|
_context5.next = 8;
|
|
316
|
-
return this.
|
|
316
|
+
return this.onUnLock();
|
|
317
317
|
case 8:
|
|
318
318
|
return _context5.abrupt("return", resultObject);
|
|
319
319
|
case 9:
|
|
@@ -322,6 +322,74 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
322
322
|
}
|
|
323
323
|
}, _callee5, this);
|
|
324
324
|
}));
|
|
325
|
+
function UnLock() {
|
|
326
|
+
return _UnLock.apply(this, arguments);
|
|
327
|
+
}
|
|
328
|
+
return UnLock;
|
|
329
|
+
}()
|
|
330
|
+
}, {
|
|
331
|
+
key: "Archive",
|
|
332
|
+
value: function () {
|
|
333
|
+
var _Archive = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
334
|
+
var resultObject;
|
|
335
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
336
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
337
|
+
case 0:
|
|
338
|
+
if (!(this.isNew || this.isArchived)) {
|
|
339
|
+
_context6.next = 2;
|
|
340
|
+
break;
|
|
341
|
+
}
|
|
342
|
+
return _context6.abrupt("return");
|
|
343
|
+
case 2:
|
|
344
|
+
_context6.next = 4;
|
|
345
|
+
return _global.gfunc.run_action("post", "".concat(this.get_webname(), "/").concat(this.getID(), "/archive"));
|
|
346
|
+
case 4:
|
|
347
|
+
resultObject = _context6.sent;
|
|
348
|
+
this.setSaveResult(resultObject, "auto", true);
|
|
349
|
+
_context6.next = 8;
|
|
350
|
+
return this.onArchive();
|
|
351
|
+
case 8:
|
|
352
|
+
return _context6.abrupt("return", resultObject);
|
|
353
|
+
case 9:
|
|
354
|
+
case "end":
|
|
355
|
+
return _context6.stop();
|
|
356
|
+
}
|
|
357
|
+
}, _callee6, this);
|
|
358
|
+
}));
|
|
359
|
+
function Archive() {
|
|
360
|
+
return _Archive.apply(this, arguments);
|
|
361
|
+
}
|
|
362
|
+
return Archive;
|
|
363
|
+
}()
|
|
364
|
+
}, {
|
|
365
|
+
key: "UnArchive",
|
|
366
|
+
value: function () {
|
|
367
|
+
var _UnArchive = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
368
|
+
var resultObject;
|
|
369
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
370
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
371
|
+
case 0:
|
|
372
|
+
if (!(this.isNew || !this.isArchived)) {
|
|
373
|
+
_context7.next = 2;
|
|
374
|
+
break;
|
|
375
|
+
}
|
|
376
|
+
return _context7.abrupt("return");
|
|
377
|
+
case 2:
|
|
378
|
+
_context7.next = 4;
|
|
379
|
+
return _global.gfunc.run_action("post", "".concat(this.get_webname(), "/").concat(this.getID(), "/unarchive"));
|
|
380
|
+
case 4:
|
|
381
|
+
resultObject = _context7.sent;
|
|
382
|
+
this.setSaveResult(resultObject, "auto", true);
|
|
383
|
+
_context7.next = 8;
|
|
384
|
+
return this.onUnArchive();
|
|
385
|
+
case 8:
|
|
386
|
+
return _context7.abrupt("return", resultObject);
|
|
387
|
+
case 9:
|
|
388
|
+
case "end":
|
|
389
|
+
return _context7.stop();
|
|
390
|
+
}
|
|
391
|
+
}, _callee7, this);
|
|
392
|
+
}));
|
|
325
393
|
function UnArchive() {
|
|
326
394
|
return _UnArchive.apply(this, arguments);
|
|
327
395
|
}
|
|
@@ -351,27 +419,29 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
351
419
|
}
|
|
352
420
|
/**
|
|
353
421
|
* calls the `get_deltaObject` with `allProperties=true` `extraProperties=true`
|
|
422
|
+
*
|
|
423
|
+
* useful in server applications
|
|
354
424
|
* @returns
|
|
355
425
|
*/
|
|
356
426
|
}, {
|
|
357
427
|
key: "get_fullDeltaObject",
|
|
358
428
|
value: (function () {
|
|
359
|
-
var _get_fullDeltaObject = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
360
|
-
return _regeneratorRuntime().wrap(function
|
|
361
|
-
while (1) switch (
|
|
429
|
+
var _get_fullDeltaObject = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(p) {
|
|
430
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
431
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
362
432
|
case 0:
|
|
363
|
-
|
|
433
|
+
_context8.next = 2;
|
|
364
434
|
return this.get_deltaObject({
|
|
365
435
|
allProperties: true,
|
|
366
436
|
extraProperties: true
|
|
367
437
|
});
|
|
368
438
|
case 2:
|
|
369
|
-
return
|
|
439
|
+
return _context8.abrupt("return", _context8.sent);
|
|
370
440
|
case 3:
|
|
371
441
|
case "end":
|
|
372
|
-
return
|
|
442
|
+
return _context8.stop();
|
|
373
443
|
}
|
|
374
|
-
},
|
|
444
|
+
}, _callee8, this);
|
|
375
445
|
}));
|
|
376
446
|
function get_fullDeltaObject(_x3) {
|
|
377
447
|
return _get_fullDeltaObject.apply(this, arguments);
|
|
@@ -387,75 +457,75 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
387
457
|
}, {
|
|
388
458
|
key: "get_deltaObject",
|
|
389
459
|
value: (function () {
|
|
390
|
-
var _get_deltaObject = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
460
|
+
var _get_deltaObject = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(p) {
|
|
391
461
|
var _this2 = this;
|
|
392
462
|
var final_object, isChild, useDelta, allProperties, needId, chkChangables, useExtraProps, dlt, allkeys, changableKeys, functionProps, index, fp, parseObj, _parseObj, _iterator, _step, key, tempusers;
|
|
393
|
-
return _regeneratorRuntime().wrap(function
|
|
394
|
-
while (1) switch (
|
|
463
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
464
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
395
465
|
case 0:
|
|
396
466
|
_parseObj = function _parseObj3() {
|
|
397
|
-
_parseObj = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
467
|
+
_parseObj = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(obj) {
|
|
398
468
|
var newobj_dlt;
|
|
399
|
-
return _regeneratorRuntime().wrap(function
|
|
400
|
-
while (1) switch (
|
|
469
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
470
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
401
471
|
case 0:
|
|
402
472
|
if (!(obj == null)) {
|
|
403
|
-
|
|
473
|
+
_context10.next = 2;
|
|
404
474
|
break;
|
|
405
475
|
}
|
|
406
|
-
return
|
|
476
|
+
return _context10.abrupt("return", undefined);
|
|
407
477
|
case 2:
|
|
408
478
|
if (!Array.isArray(obj)) {
|
|
409
|
-
|
|
479
|
+
_context10.next = 6;
|
|
410
480
|
break;
|
|
411
481
|
}
|
|
412
|
-
|
|
482
|
+
_context10.next = 5;
|
|
413
483
|
return Promise.all(obj.map( /*#__PURE__*/function () {
|
|
414
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
415
|
-
return _regeneratorRuntime().wrap(function
|
|
416
|
-
while (1) switch (
|
|
484
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(r) {
|
|
485
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
486
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
417
487
|
case 0:
|
|
418
|
-
|
|
488
|
+
_context9.next = 2;
|
|
419
489
|
return parseObj(r);
|
|
420
490
|
case 2:
|
|
421
|
-
return
|
|
491
|
+
return _context9.abrupt("return", _context9.sent);
|
|
422
492
|
case 3:
|
|
423
493
|
case "end":
|
|
424
|
-
return
|
|
494
|
+
return _context9.stop();
|
|
425
495
|
}
|
|
426
|
-
},
|
|
496
|
+
}, _callee9);
|
|
427
497
|
}));
|
|
428
498
|
return function (_x6) {
|
|
429
499
|
return _ref.apply(this, arguments);
|
|
430
500
|
};
|
|
431
501
|
}()));
|
|
432
502
|
case 5:
|
|
433
|
-
return
|
|
503
|
+
return _context10.abrupt("return", _context10.sent);
|
|
434
504
|
case 6:
|
|
435
505
|
if (!(obj instanceof WebObject && typeof obj.get_deltaObject === "function")) {
|
|
436
|
-
|
|
506
|
+
_context10.next = 15;
|
|
437
507
|
break;
|
|
438
508
|
}
|
|
439
|
-
|
|
509
|
+
_context10.next = 9;
|
|
440
510
|
return obj.get_deltaObject(_objectSpread(_objectSpread({}, p), {}, {
|
|
441
511
|
isChild: true
|
|
442
512
|
}));
|
|
443
513
|
case 9:
|
|
444
|
-
newobj_dlt =
|
|
514
|
+
newobj_dlt = _context10.sent;
|
|
445
515
|
if ((0, _object.object_isEmpty)(newobj_dlt)) {
|
|
446
|
-
|
|
516
|
+
_context10.next = 14;
|
|
447
517
|
break;
|
|
448
518
|
}
|
|
449
|
-
return
|
|
519
|
+
return _context10.abrupt("return", newobj_dlt);
|
|
450
520
|
case 14:
|
|
451
|
-
return
|
|
521
|
+
return _context10.abrupt("return", obj);
|
|
452
522
|
case 15:
|
|
453
|
-
return
|
|
523
|
+
return _context10.abrupt("return", obj);
|
|
454
524
|
case 16:
|
|
455
525
|
case "end":
|
|
456
|
-
return
|
|
526
|
+
return _context10.stop();
|
|
457
527
|
}
|
|
458
|
-
},
|
|
528
|
+
}, _callee10);
|
|
459
529
|
}));
|
|
460
530
|
return _parseObj.apply(this, arguments);
|
|
461
531
|
};
|
|
@@ -478,7 +548,7 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
478
548
|
ignoreProtected: allProperties
|
|
479
549
|
});
|
|
480
550
|
}) : allkeys;
|
|
481
|
-
|
|
551
|
+
_context11.next = 15;
|
|
482
552
|
return _convert["default"].applyFormats({
|
|
483
553
|
inputobject: dlt,
|
|
484
554
|
formats: (0, _object.object_getStatic)(this, "__formatList"),
|
|
@@ -499,32 +569,32 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
499
569
|
/* parse all changableKeys */
|
|
500
570
|
/* -------------------------------------------------------------------------- */
|
|
501
571
|
_iterator = _createForOfIteratorHelper(changableKeys);
|
|
502
|
-
|
|
572
|
+
_context11.prev = 18;
|
|
503
573
|
_iterator.s();
|
|
504
574
|
case 20:
|
|
505
575
|
if ((_step = _iterator.n()).done) {
|
|
506
|
-
|
|
576
|
+
_context11.next = 27;
|
|
507
577
|
break;
|
|
508
578
|
}
|
|
509
579
|
key = _step.value;
|
|
510
|
-
|
|
580
|
+
_context11.next = 24;
|
|
511
581
|
return parseObj(dlt[key]);
|
|
512
582
|
case 24:
|
|
513
|
-
final_object[key] =
|
|
583
|
+
final_object[key] = _context11.sent;
|
|
514
584
|
case 25:
|
|
515
|
-
|
|
585
|
+
_context11.next = 20;
|
|
516
586
|
break;
|
|
517
587
|
case 27:
|
|
518
|
-
|
|
588
|
+
_context11.next = 32;
|
|
519
589
|
break;
|
|
520
590
|
case 29:
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
_iterator.e(
|
|
591
|
+
_context11.prev = 29;
|
|
592
|
+
_context11.t0 = _context11["catch"](18);
|
|
593
|
+
_iterator.e(_context11.t0);
|
|
524
594
|
case 32:
|
|
525
|
-
|
|
595
|
+
_context11.prev = 32;
|
|
526
596
|
_iterator.f();
|
|
527
|
-
return
|
|
597
|
+
return _context11.finish(32);
|
|
528
598
|
case 35:
|
|
529
599
|
/* -------------------------------------------------------------------------- */
|
|
530
600
|
/* add id properties */
|
|
@@ -549,12 +619,12 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
549
619
|
});
|
|
550
620
|
final_object["_users"] = (0, _object.wrap_array)(tempusers);
|
|
551
621
|
}
|
|
552
|
-
return
|
|
622
|
+
return _context11.abrupt("return", final_object);
|
|
553
623
|
case 39:
|
|
554
624
|
case "end":
|
|
555
|
-
return
|
|
625
|
+
return _context11.stop();
|
|
556
626
|
}
|
|
557
|
-
},
|
|
627
|
+
}, _callee11, this, [[18, 29, 32, 35]]);
|
|
558
628
|
}));
|
|
559
629
|
function get_deltaObject(_x4) {
|
|
560
630
|
return _get_deltaObject.apply(this, arguments);
|
|
@@ -584,28 +654,28 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
584
654
|
}, {
|
|
585
655
|
key: "onDelete",
|
|
586
656
|
value: ( /* -------------------------------------------------------------------------- */function () {
|
|
587
|
-
var _onDelete = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
657
|
+
var _onDelete = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
|
|
588
658
|
var _this$manager;
|
|
589
659
|
var _len,
|
|
590
660
|
p,
|
|
591
661
|
_key,
|
|
592
|
-
|
|
593
|
-
return _regeneratorRuntime().wrap(function
|
|
594
|
-
while (1) switch (
|
|
662
|
+
_args12 = arguments;
|
|
663
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
664
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
595
665
|
case 0:
|
|
596
666
|
if (this.isSaved) this.isDeleted = true;
|
|
597
|
-
for (_len =
|
|
598
|
-
p[_key] =
|
|
667
|
+
for (_len = _args12.length, p = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
668
|
+
p[_key] = _args12[_key];
|
|
599
669
|
}
|
|
600
|
-
|
|
670
|
+
_context12.next = 4;
|
|
601
671
|
return (_this$manager = this.manager) === null || _this$manager === void 0 ? void 0 : _this$manager.onDelete.apply(_this$manager, p);
|
|
602
672
|
case 4:
|
|
603
|
-
return
|
|
673
|
+
return _context12.abrupt("return", _context12.sent);
|
|
604
674
|
case 5:
|
|
605
675
|
case "end":
|
|
606
|
-
return
|
|
676
|
+
return _context12.stop();
|
|
607
677
|
}
|
|
608
|
-
},
|
|
678
|
+
}, _callee12, this);
|
|
609
679
|
}));
|
|
610
680
|
function onDelete() {
|
|
611
681
|
return _onDelete.apply(this, arguments);
|
|
@@ -615,28 +685,28 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
615
685
|
}, {
|
|
616
686
|
key: "onArchive",
|
|
617
687
|
value: function () {
|
|
618
|
-
var _onArchive = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
688
|
+
var _onArchive = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
|
|
619
689
|
var _this$manager2;
|
|
620
690
|
var _len2,
|
|
621
691
|
p,
|
|
622
692
|
_key2,
|
|
623
|
-
|
|
624
|
-
return _regeneratorRuntime().wrap(function
|
|
625
|
-
while (1) switch (
|
|
693
|
+
_args13 = arguments;
|
|
694
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
695
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
626
696
|
case 0:
|
|
627
697
|
if (this.isSaved) this.isArchived = true;
|
|
628
|
-
for (_len2 =
|
|
629
|
-
p[_key2] =
|
|
698
|
+
for (_len2 = _args13.length, p = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
699
|
+
p[_key2] = _args13[_key2];
|
|
630
700
|
}
|
|
631
|
-
|
|
701
|
+
_context13.next = 4;
|
|
632
702
|
return (_this$manager2 = this.manager) === null || _this$manager2 === void 0 ? void 0 : _this$manager2.onArchive.apply(_this$manager2, p);
|
|
633
703
|
case 4:
|
|
634
|
-
return
|
|
704
|
+
return _context13.abrupt("return", _context13.sent);
|
|
635
705
|
case 5:
|
|
636
706
|
case "end":
|
|
637
|
-
return
|
|
707
|
+
return _context13.stop();
|
|
638
708
|
}
|
|
639
|
-
},
|
|
709
|
+
}, _callee13, this);
|
|
640
710
|
}));
|
|
641
711
|
function onArchive() {
|
|
642
712
|
return _onArchive.apply(this, arguments);
|
|
@@ -646,28 +716,28 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
646
716
|
}, {
|
|
647
717
|
key: "onUnArchive",
|
|
648
718
|
value: function () {
|
|
649
|
-
var _onUnArchive = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
719
|
+
var _onUnArchive = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
|
|
650
720
|
var _this$manager3;
|
|
651
721
|
var _len3,
|
|
652
722
|
p,
|
|
653
723
|
_key3,
|
|
654
|
-
|
|
655
|
-
return _regeneratorRuntime().wrap(function
|
|
656
|
-
while (1) switch (
|
|
724
|
+
_args14 = arguments;
|
|
725
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
726
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
657
727
|
case 0:
|
|
658
728
|
if (this.isSaved) this.isArchived = false;
|
|
659
|
-
for (_len3 =
|
|
660
|
-
p[_key3] =
|
|
729
|
+
for (_len3 = _args14.length, p = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
730
|
+
p[_key3] = _args14[_key3];
|
|
661
731
|
}
|
|
662
|
-
|
|
732
|
+
_context14.next = 4;
|
|
663
733
|
return (_this$manager3 = this.manager) === null || _this$manager3 === void 0 ? void 0 : _this$manager3.onUnArchive.apply(_this$manager3, p);
|
|
664
734
|
case 4:
|
|
665
|
-
return
|
|
735
|
+
return _context14.abrupt("return", _context14.sent);
|
|
666
736
|
case 5:
|
|
667
737
|
case "end":
|
|
668
|
-
return
|
|
738
|
+
return _context14.stop();
|
|
669
739
|
}
|
|
670
|
-
},
|
|
740
|
+
}, _callee14, this);
|
|
671
741
|
}));
|
|
672
742
|
function onUnArchive() {
|
|
673
743
|
return _onUnArchive.apply(this, arguments);
|
|
@@ -675,30 +745,92 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
675
745
|
return onUnArchive;
|
|
676
746
|
}()
|
|
677
747
|
}, {
|
|
678
|
-
key: "
|
|
748
|
+
key: "onLock",
|
|
679
749
|
value: function () {
|
|
680
|
-
var
|
|
750
|
+
var _onLock = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
|
|
681
751
|
var _this$manager4;
|
|
682
752
|
var _len4,
|
|
683
753
|
p,
|
|
684
754
|
_key4,
|
|
685
|
-
|
|
686
|
-
return _regeneratorRuntime().wrap(function
|
|
687
|
-
while (1) switch (
|
|
755
|
+
_args15 = arguments;
|
|
756
|
+
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
|
757
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
758
|
+
case 0:
|
|
759
|
+
if (this.isSaved) this.isLocked = true;
|
|
760
|
+
for (_len4 = _args15.length, p = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
761
|
+
p[_key4] = _args15[_key4];
|
|
762
|
+
}
|
|
763
|
+
_context15.next = 4;
|
|
764
|
+
return (_this$manager4 = this.manager) === null || _this$manager4 === void 0 ? void 0 : _this$manager4.onLock.apply(_this$manager4, p);
|
|
765
|
+
case 4:
|
|
766
|
+
return _context15.abrupt("return", _context15.sent);
|
|
767
|
+
case 5:
|
|
768
|
+
case "end":
|
|
769
|
+
return _context15.stop();
|
|
770
|
+
}
|
|
771
|
+
}, _callee15, this);
|
|
772
|
+
}));
|
|
773
|
+
function onLock() {
|
|
774
|
+
return _onLock.apply(this, arguments);
|
|
775
|
+
}
|
|
776
|
+
return onLock;
|
|
777
|
+
}()
|
|
778
|
+
}, {
|
|
779
|
+
key: "onUnLock",
|
|
780
|
+
value: function () {
|
|
781
|
+
var _onUnLock = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
|
|
782
|
+
var _this$manager5;
|
|
783
|
+
var _len5,
|
|
784
|
+
p,
|
|
785
|
+
_key5,
|
|
786
|
+
_args16 = arguments;
|
|
787
|
+
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
|
788
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
789
|
+
case 0:
|
|
790
|
+
if (this.isSaved) this.isLocked = false;
|
|
791
|
+
for (_len5 = _args16.length, p = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
792
|
+
p[_key5] = _args16[_key5];
|
|
793
|
+
}
|
|
794
|
+
_context16.next = 4;
|
|
795
|
+
return (_this$manager5 = this.manager) === null || _this$manager5 === void 0 ? void 0 : _this$manager5.onUnLock.apply(_this$manager5, p);
|
|
796
|
+
case 4:
|
|
797
|
+
return _context16.abrupt("return", _context16.sent);
|
|
798
|
+
case 5:
|
|
799
|
+
case "end":
|
|
800
|
+
return _context16.stop();
|
|
801
|
+
}
|
|
802
|
+
}, _callee16, this);
|
|
803
|
+
}));
|
|
804
|
+
function onUnLock() {
|
|
805
|
+
return _onUnLock.apply(this, arguments);
|
|
806
|
+
}
|
|
807
|
+
return onUnLock;
|
|
808
|
+
}()
|
|
809
|
+
}, {
|
|
810
|
+
key: "onLoad",
|
|
811
|
+
value: function () {
|
|
812
|
+
var _onLoad = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
|
|
813
|
+
var _this$manager6;
|
|
814
|
+
var _len6,
|
|
815
|
+
p,
|
|
816
|
+
_key6,
|
|
817
|
+
_args17 = arguments;
|
|
818
|
+
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
|
819
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
688
820
|
case 0:
|
|
689
821
|
this.isDeleted = false;
|
|
690
|
-
for (
|
|
691
|
-
p[
|
|
822
|
+
for (_len6 = _args17.length, p = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
|
|
823
|
+
p[_key6] = _args17[_key6];
|
|
692
824
|
}
|
|
693
|
-
|
|
694
|
-
return (_this$
|
|
825
|
+
_context17.next = 4;
|
|
826
|
+
return (_this$manager6 = this.manager) === null || _this$manager6 === void 0 ? void 0 : _this$manager6.onLoad.apply(_this$manager6, p);
|
|
695
827
|
case 4:
|
|
696
|
-
return
|
|
828
|
+
return _context17.abrupt("return", _context17.sent);
|
|
697
829
|
case 5:
|
|
698
830
|
case "end":
|
|
699
|
-
return
|
|
831
|
+
return _context17.stop();
|
|
700
832
|
}
|
|
701
|
-
},
|
|
833
|
+
}, _callee17, this);
|
|
702
834
|
}));
|
|
703
835
|
function onLoad() {
|
|
704
836
|
return _onLoad.apply(this, arguments);
|
|
@@ -708,47 +840,47 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
708
840
|
}, {
|
|
709
841
|
key: "onSave",
|
|
710
842
|
value: function () {
|
|
711
|
-
var _onSave = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
712
|
-
var _this$
|
|
843
|
+
var _onSave = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
|
|
844
|
+
var _this$manager8;
|
|
713
845
|
var srObject,
|
|
714
|
-
_this$
|
|
715
|
-
|
|
846
|
+
_this$manager7,
|
|
847
|
+
_len7,
|
|
716
848
|
p,
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
return _regeneratorRuntime().wrap(function
|
|
720
|
-
while (1) switch (
|
|
849
|
+
_key7,
|
|
850
|
+
_args18 = arguments;
|
|
851
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
852
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
721
853
|
case 0:
|
|
722
854
|
if (!this.isSaved) {
|
|
723
|
-
|
|
855
|
+
_context18.next = 7;
|
|
724
856
|
break;
|
|
725
857
|
}
|
|
726
858
|
this.apply_changes();
|
|
727
859
|
srObject = this.getSaveResult(true);
|
|
728
860
|
if (!this.saveResultHasID(srObject)) {
|
|
729
|
-
|
|
861
|
+
_context18.next = 7;
|
|
730
862
|
break;
|
|
731
863
|
}
|
|
732
864
|
/* -------------------------------------------------------------------------- */
|
|
733
865
|
WebObject.LoadIdsFromSaveResult(this, srObject);
|
|
734
|
-
|
|
735
|
-
return (_this$
|
|
866
|
+
_context18.next = 7;
|
|
867
|
+
return (_this$manager7 = this.manager) === null || _this$manager7 === void 0 ? void 0 : _this$manager7.event_run("on_id_change");
|
|
736
868
|
case 7:
|
|
737
|
-
for (
|
|
738
|
-
p[
|
|
869
|
+
for (_len7 = _args18.length, p = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
|
|
870
|
+
p[_key7] = _args18[_key7];
|
|
739
871
|
}
|
|
740
|
-
|
|
741
|
-
return (_this$
|
|
872
|
+
_context18.next = 10;
|
|
873
|
+
return (_this$manager8 = this.manager) === null || _this$manager8 === void 0 ? void 0 : _this$manager8.onSave.apply(_this$manager8, p);
|
|
742
874
|
case 10:
|
|
743
|
-
|
|
875
|
+
_context18.next = 12;
|
|
744
876
|
return this.onAfterSave();
|
|
745
877
|
case 12:
|
|
746
|
-
return
|
|
878
|
+
return _context18.abrupt("return", true);
|
|
747
879
|
case 13:
|
|
748
880
|
case "end":
|
|
749
|
-
return
|
|
881
|
+
return _context18.stop();
|
|
750
882
|
}
|
|
751
|
-
},
|
|
883
|
+
}, _callee18, this);
|
|
752
884
|
}));
|
|
753
885
|
function onSave() {
|
|
754
886
|
return _onSave.apply(this, arguments);
|
|
@@ -758,27 +890,27 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
758
890
|
}, {
|
|
759
891
|
key: "onAfterSave",
|
|
760
892
|
value: function () {
|
|
761
|
-
var _onAfterSave = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
762
|
-
var _this$
|
|
763
|
-
var
|
|
893
|
+
var _onAfterSave = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
|
|
894
|
+
var _this$manager9;
|
|
895
|
+
var _len8,
|
|
764
896
|
p,
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
return _regeneratorRuntime().wrap(function
|
|
768
|
-
while (1) switch (
|
|
897
|
+
_key8,
|
|
898
|
+
_args19 = arguments;
|
|
899
|
+
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
|
|
900
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
769
901
|
case 0:
|
|
770
|
-
for (
|
|
771
|
-
p[
|
|
902
|
+
for (_len8 = _args19.length, p = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
|
|
903
|
+
p[_key8] = _args19[_key8];
|
|
772
904
|
}
|
|
773
|
-
|
|
774
|
-
return (_this$
|
|
905
|
+
_context19.next = 3;
|
|
906
|
+
return (_this$manager9 = this.manager) === null || _this$manager9 === void 0 ? void 0 : _this$manager9.onAfterSave.apply(_this$manager9, p);
|
|
775
907
|
case 3:
|
|
776
|
-
return
|
|
908
|
+
return _context19.abrupt("return", true);
|
|
777
909
|
case 4:
|
|
778
910
|
case "end":
|
|
779
|
-
return
|
|
911
|
+
return _context19.stop();
|
|
780
912
|
}
|
|
781
|
-
},
|
|
913
|
+
}, _callee19, this);
|
|
782
914
|
}));
|
|
783
915
|
function onAfterSave() {
|
|
784
916
|
return _onAfterSave.apply(this, arguments);
|
|
@@ -803,27 +935,27 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
803
935
|
}, {
|
|
804
936
|
key: "onNew",
|
|
805
937
|
value: function () {
|
|
806
|
-
var _onNew = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
807
|
-
var _this$
|
|
808
|
-
var
|
|
938
|
+
var _onNew = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20() {
|
|
939
|
+
var _this$manager10;
|
|
940
|
+
var _len9,
|
|
809
941
|
p,
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
return _regeneratorRuntime().wrap(function
|
|
813
|
-
while (1) switch (
|
|
942
|
+
_key9,
|
|
943
|
+
_args20 = arguments;
|
|
944
|
+
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
|
|
945
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
814
946
|
case 0:
|
|
815
|
-
for (
|
|
816
|
-
p[
|
|
947
|
+
for (_len9 = _args20.length, p = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
|
|
948
|
+
p[_key9] = _args20[_key9];
|
|
817
949
|
}
|
|
818
|
-
|
|
819
|
-
return (_this$
|
|
950
|
+
_context20.next = 3;
|
|
951
|
+
return (_this$manager10 = this.manager) === null || _this$manager10 === void 0 ? void 0 : _this$manager10.onNew.apply(_this$manager10, p);
|
|
820
952
|
case 3:
|
|
821
|
-
return
|
|
953
|
+
return _context20.abrupt("return", _context20.sent);
|
|
822
954
|
case 4:
|
|
823
955
|
case "end":
|
|
824
|
-
return
|
|
956
|
+
return _context20.stop();
|
|
825
957
|
}
|
|
826
|
-
},
|
|
958
|
+
}, _callee20, this);
|
|
827
959
|
}));
|
|
828
960
|
function onNew() {
|
|
829
961
|
return _onNew.apply(this, arguments);
|
|
@@ -879,7 +1011,7 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
879
1011
|
}, {
|
|
880
1012
|
key: "saveList",
|
|
881
1013
|
value: function () {
|
|
882
|
-
var _saveList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1014
|
+
var _saveList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(itemList) {
|
|
883
1015
|
var _extraOptions$chunksi;
|
|
884
1016
|
var extraOptions,
|
|
885
1017
|
chunks,
|
|
@@ -896,11 +1028,11 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
896
1028
|
_item,
|
|
897
1029
|
_index2,
|
|
898
1030
|
_item2,
|
|
899
|
-
|
|
900
|
-
return _regeneratorRuntime().wrap(function
|
|
901
|
-
while (1) switch (
|
|
1031
|
+
_args21 = arguments;
|
|
1032
|
+
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
|
|
1033
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
902
1034
|
case 0:
|
|
903
|
-
extraOptions =
|
|
1035
|
+
extraOptions = _args21.length > 1 && _args21[1] !== undefined ? _args21[1] : {};
|
|
904
1036
|
if (!extraOptions) extraOptions = {};
|
|
905
1037
|
chunks = (0, _object.array_chunks)(itemList, (_extraOptions$chunksi = extraOptions.chunksize) !== null && _extraOptions$chunksi !== void 0 ? _extraOptions$chunksi : 50);
|
|
906
1038
|
delete extraOptions.chunksize;
|
|
@@ -908,7 +1040,7 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
908
1040
|
index = 0;
|
|
909
1041
|
case 6:
|
|
910
1042
|
if (!(index < chunks.length)) {
|
|
911
|
-
|
|
1043
|
+
_context21.next = 36;
|
|
912
1044
|
break;
|
|
913
1045
|
}
|
|
914
1046
|
items_to_save = chunks[index];
|
|
@@ -916,81 +1048,81 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
916
1048
|
k = 0;
|
|
917
1049
|
case 10:
|
|
918
1050
|
if (!(k < items_to_save.length)) {
|
|
919
|
-
|
|
1051
|
+
_context21.next = 19;
|
|
920
1052
|
break;
|
|
921
1053
|
}
|
|
922
1054
|
item = items_to_save[k];
|
|
923
|
-
|
|
1055
|
+
_context21.next = 14;
|
|
924
1056
|
return item.get_deltaObject();
|
|
925
1057
|
case 14:
|
|
926
|
-
dlt =
|
|
1058
|
+
dlt = _context21.sent;
|
|
927
1059
|
save_array.push(item.isNew ? _objectSpread({}, dlt) : _objectSpread({
|
|
928
1060
|
_id: item.getID()
|
|
929
1061
|
}, dlt));
|
|
930
1062
|
case 16:
|
|
931
1063
|
k++;
|
|
932
|
-
|
|
1064
|
+
_context21.next = 10;
|
|
933
1065
|
break;
|
|
934
1066
|
case 19:
|
|
935
|
-
|
|
1067
|
+
_context21.next = 21;
|
|
936
1068
|
return _global.gfunc.run_action("post", putAddress, _objectSpread({
|
|
937
1069
|
__save_list: WebObject.zipSaveList(save_array)
|
|
938
1070
|
}, extraOptions));
|
|
939
1071
|
case 21:
|
|
940
|
-
resultObject =
|
|
1072
|
+
resultObject = _context21.sent;
|
|
941
1073
|
if (!Array.isArray(resultObject)) {
|
|
942
|
-
|
|
1074
|
+
_context21.next = 33;
|
|
943
1075
|
break;
|
|
944
1076
|
}
|
|
945
1077
|
_index = 0;
|
|
946
1078
|
case 24:
|
|
947
1079
|
if (!(_index < Math.min(resultObject.length, items_to_save.length))) {
|
|
948
|
-
|
|
1080
|
+
_context21.next = 33;
|
|
949
1081
|
break;
|
|
950
1082
|
}
|
|
951
1083
|
res = resultObject[_index];
|
|
952
1084
|
_item = items_to_save[_index];
|
|
953
1085
|
_item.setSaveResult(res);
|
|
954
|
-
|
|
1086
|
+
_context21.next = 30;
|
|
955
1087
|
return _item.onSave();
|
|
956
1088
|
case 30:
|
|
957
1089
|
_index++;
|
|
958
|
-
|
|
1090
|
+
_context21.next = 24;
|
|
959
1091
|
break;
|
|
960
1092
|
case 33:
|
|
961
1093
|
index++;
|
|
962
|
-
|
|
1094
|
+
_context21.next = 6;
|
|
963
1095
|
break;
|
|
964
1096
|
case 36:
|
|
965
1097
|
_index2 = 0;
|
|
966
1098
|
case 37:
|
|
967
1099
|
if (!(_index2 < itemList.length)) {
|
|
968
|
-
|
|
1100
|
+
_context21.next = 46;
|
|
969
1101
|
break;
|
|
970
1102
|
}
|
|
971
1103
|
_item2 = itemList[_index2];
|
|
972
1104
|
if (_item2.isSaved) {
|
|
973
|
-
|
|
1105
|
+
_context21.next = 41;
|
|
974
1106
|
break;
|
|
975
1107
|
}
|
|
976
|
-
return
|
|
1108
|
+
return _context21.abrupt("return", false);
|
|
977
1109
|
case 41:
|
|
978
1110
|
if (!(_item2.getSaveResultType() != "normal")) {
|
|
979
|
-
|
|
1111
|
+
_context21.next = 43;
|
|
980
1112
|
break;
|
|
981
1113
|
}
|
|
982
|
-
return
|
|
1114
|
+
return _context21.abrupt("return", false);
|
|
983
1115
|
case 43:
|
|
984
1116
|
_index2++;
|
|
985
|
-
|
|
1117
|
+
_context21.next = 37;
|
|
986
1118
|
break;
|
|
987
1119
|
case 46:
|
|
988
|
-
return
|
|
1120
|
+
return _context21.abrupt("return", true);
|
|
989
1121
|
case 47:
|
|
990
1122
|
case "end":
|
|
991
|
-
return
|
|
1123
|
+
return _context21.stop();
|
|
992
1124
|
}
|
|
993
|
-
},
|
|
1125
|
+
}, _callee21, this);
|
|
994
1126
|
}));
|
|
995
1127
|
function saveList(_x7) {
|
|
996
1128
|
return _saveList.apply(this, arguments);
|
|
@@ -1040,64 +1172,64 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
1040
1172
|
}, {
|
|
1041
1173
|
key: "get_single",
|
|
1042
1174
|
value: (function () {
|
|
1043
|
-
var _get_single = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1044
|
-
var
|
|
1175
|
+
var _get_single = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22() {
|
|
1176
|
+
var _len10,
|
|
1045
1177
|
p,
|
|
1046
|
-
|
|
1178
|
+
_key10,
|
|
1047
1179
|
search,
|
|
1048
1180
|
readonly,
|
|
1049
1181
|
fetchID,
|
|
1050
1182
|
res,
|
|
1051
1183
|
params,
|
|
1052
|
-
|
|
1053
|
-
return _regeneratorRuntime().wrap(function
|
|
1054
|
-
while (1) switch (
|
|
1184
|
+
_args22 = arguments;
|
|
1185
|
+
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
|
|
1186
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
1055
1187
|
case 0:
|
|
1056
|
-
for (
|
|
1057
|
-
p[
|
|
1188
|
+
for (_len10 = _args22.length, p = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
|
|
1189
|
+
p[_key10] = _args22[_key10];
|
|
1058
1190
|
}
|
|
1059
1191
|
search = p.shift();
|
|
1060
1192
|
readonly = p.shift();
|
|
1061
1193
|
fetchID = p.shift();
|
|
1062
1194
|
if (!(0, _object.object_isEmpty)(search)) {
|
|
1063
|
-
|
|
1195
|
+
_context22.next = 6;
|
|
1064
1196
|
break;
|
|
1065
1197
|
}
|
|
1066
|
-
return
|
|
1198
|
+
return _context22.abrupt("return", undefined);
|
|
1067
1199
|
case 6:
|
|
1068
1200
|
params = {};
|
|
1069
1201
|
params.context = readonly ? "view" : "edit";
|
|
1070
|
-
|
|
1071
|
-
|
|
1202
|
+
_context22.t0 = _typeof(search);
|
|
1203
|
+
_context22.next = _context22.t0 === "string" ? 11 : _context22.t0 === "number" ? 11 : _context22.t0 === "object" ? 19 : 19;
|
|
1072
1204
|
break;
|
|
1073
1205
|
case 11:
|
|
1074
1206
|
search = String(search);
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1207
|
+
_context22.t1 = this;
|
|
1208
|
+
_context22.t2 = this;
|
|
1209
|
+
_context22.next = 16;
|
|
1078
1210
|
return _global.gfunc.run_action("get", this.__web_path + "/" + search, params, {
|
|
1079
1211
|
fetchID: fetchID
|
|
1080
1212
|
});
|
|
1081
1213
|
case 16:
|
|
1082
|
-
|
|
1083
|
-
res =
|
|
1084
|
-
return
|
|
1214
|
+
_context22.t3 = _context22.sent;
|
|
1215
|
+
res = _context22.t1.ensure.call(_context22.t1, _context22.t2, _context22.t3);
|
|
1216
|
+
return _context22.abrupt("break", 25);
|
|
1085
1217
|
case 19:
|
|
1086
|
-
|
|
1087
|
-
|
|
1218
|
+
_context22.t4 = _object.object_first;
|
|
1219
|
+
_context22.next = 22;
|
|
1088
1220
|
return this.get_list(search, readonly, fetchID);
|
|
1089
1221
|
case 22:
|
|
1090
|
-
|
|
1091
|
-
res = (0,
|
|
1092
|
-
return
|
|
1222
|
+
_context22.t5 = _context22.sent;
|
|
1223
|
+
res = (0, _context22.t4)(_context22.t5);
|
|
1224
|
+
return _context22.abrupt("break", 25);
|
|
1093
1225
|
case 25:
|
|
1094
1226
|
WebObject.setReadonly(res, readonly);
|
|
1095
|
-
return
|
|
1227
|
+
return _context22.abrupt("return", res);
|
|
1096
1228
|
case 27:
|
|
1097
1229
|
case "end":
|
|
1098
|
-
return
|
|
1230
|
+
return _context22.stop();
|
|
1099
1231
|
}
|
|
1100
|
-
},
|
|
1232
|
+
}, _callee22, this);
|
|
1101
1233
|
}));
|
|
1102
1234
|
function get_single() {
|
|
1103
1235
|
return _get_single.apply(this, arguments);
|
|
@@ -1112,42 +1244,42 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
1112
1244
|
}, {
|
|
1113
1245
|
key: "get_list",
|
|
1114
1246
|
value: (function () {
|
|
1115
|
-
var _get_list = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1116
|
-
var
|
|
1247
|
+
var _get_list = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23() {
|
|
1248
|
+
var _len11,
|
|
1117
1249
|
p,
|
|
1118
|
-
|
|
1250
|
+
_key11,
|
|
1119
1251
|
search,
|
|
1120
1252
|
readonly,
|
|
1121
1253
|
fetchID,
|
|
1122
1254
|
result_items,
|
|
1123
1255
|
res,
|
|
1124
|
-
|
|
1125
|
-
return _regeneratorRuntime().wrap(function
|
|
1126
|
-
while (1) switch (
|
|
1256
|
+
_args23 = arguments;
|
|
1257
|
+
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
|
|
1258
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
1127
1259
|
case 0:
|
|
1128
|
-
for (
|
|
1129
|
-
p[
|
|
1260
|
+
for (_len11 = _args23.length, p = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
|
|
1261
|
+
p[_key11] = _args23[_key11];
|
|
1130
1262
|
}
|
|
1131
1263
|
search = p.shift();
|
|
1132
1264
|
readonly = p.shift();
|
|
1133
1265
|
fetchID = p.shift();
|
|
1134
1266
|
if (!search) search = {};
|
|
1135
|
-
|
|
1267
|
+
_context23.next = 7;
|
|
1136
1268
|
return _global.gfunc.run_action("get", this.get_webname(), search, {
|
|
1137
1269
|
fetchID: fetchID
|
|
1138
1270
|
});
|
|
1139
1271
|
case 7:
|
|
1140
|
-
result_items =
|
|
1272
|
+
result_items = _context23.sent;
|
|
1141
1273
|
// const selftype = (this.constructor ||
|
|
1142
1274
|
// Object.getPrototypeOf(this)) as any;
|
|
1143
1275
|
res = WebObject.map_rowindex(WebObject.mapto(this, result_items, readonly));
|
|
1144
1276
|
WebObject.setReadonly(res, readonly);
|
|
1145
|
-
return
|
|
1277
|
+
return _context23.abrupt("return", res);
|
|
1146
1278
|
case 11:
|
|
1147
1279
|
case "end":
|
|
1148
|
-
return
|
|
1280
|
+
return _context23.stop();
|
|
1149
1281
|
}
|
|
1150
|
-
},
|
|
1282
|
+
}, _callee23, this);
|
|
1151
1283
|
}));
|
|
1152
1284
|
function get_list() {
|
|
1153
1285
|
return _get_list.apply(this, arguments);
|