@azrico/webobject 1.4.117 → 1.4.118

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.
@@ -751,6 +751,7 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
751
751
  }], [{
752
752
  key: "getAllUsers",
753
753
  value: function getAllUsers(obj) {
754
+ if (_typeof(obj) != "object") return [];
754
755
  return (0, _object.array_remove_duplicates)((0, _object.array_merge)(obj._creator, (0, _object.wrap_array)(obj._users), (0, _object.wrap_array)(obj.attentions)).map(function (r) {
755
756
  return String(_typeof(r) === "object" ? WebObject.getID(r) : r);
756
757
  }).filter(function (s) {
@@ -52,6 +52,8 @@ export declare class SimpleObject extends MapableObject {
52
52
  setValue(key: WriteablePropOf<this>, value: any, sendChanges?: sendChangesType): Promise<boolean>;
53
53
  set: (key: WriteablePropOf<this>, value: any, sendChanges?: sendChangesType) => Promise<boolean>;
54
54
  setTemp(key: string, value: any, sendChanges?: sendChangesType): Promise<boolean>;
55
+ setRefreshFunction(v: any): Promise<void>;
56
+ runRefreshFunction(...params: any): Promise<any>;
55
57
  setAll<K extends WriteablePropOf<this>>(setObj: {
56
58
  [key in K]: any;
57
59
  }): Promise<boolean>;
@@ -46,7 +46,7 @@ var _setProperty = /*#__PURE__*/new WeakSet();
46
46
  var _setDefaultProperty = /*#__PURE__*/new WeakSet();
47
47
  var _getProperty = /*#__PURE__*/new WeakSet();
48
48
  var _setSaveResultObject = /*#__PURE__*/new WeakSet();
49
- var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setTemp, _setAll, _setSubValue, _pushValue, _notifyChanged, _reset, _resetAll, _event_run, _event_add, _setTemp2, _delete_cache) {
49
+ var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setTemp, _setRefreshFunction, _runRefreshFunction, _setAll, _setSubValue, _pushValue, _notifyChanged, _reset, _resetAll, _event_run, _event_add, _setTemp2, _delete_cache) {
50
50
  _inherits(SimpleObject, _MapableObject);
51
51
  var _super = _createSuper(SimpleObject);
52
52
  function SimpleObject() {
@@ -213,41 +213,82 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setTemp, _
213
213
  }
214
214
  }, _callee2, this);
215
215
  }))).apply(this, arguments);
216
+ } /* ---------------------------- refresh functions --------------------------- */
217
+ }, {
218
+ key: "setRefreshFunction",
219
+ value: function setRefreshFunction(_x5) {
220
+ return (_setRefreshFunction = _setRefreshFunction || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(v) {
221
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
222
+ while (1) switch (_context3.prev = _context3.next) {
223
+ case 0:
224
+ _context3.next = 2;
225
+ return this.setTemp("refresh_function", v);
226
+ case 2:
227
+ case "end":
228
+ return _context3.stop();
229
+ }
230
+ }, _callee3, this);
231
+ }))).apply(this, arguments);
216
232
  }
233
+ }, {
234
+ key: "runRefreshFunction",
235
+ value: function runRefreshFunction() {
236
+ return (_runRefreshFunction = _runRefreshFunction || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
237
+ var _len,
238
+ params,
239
+ _key,
240
+ _args4 = arguments;
241
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
242
+ while (1) switch (_context4.prev = _context4.next) {
243
+ case 0:
244
+ for (_len = _args4.length, params = new Array(_len), _key = 0; _key < _len; _key++) {
245
+ params[_key] = _args4[_key];
246
+ }
247
+ _context4.next = 3;
248
+ return _object.fn_eval.apply(void 0, [this.getTemp("refresh_function")].concat(params));
249
+ case 3:
250
+ return _context4.abrupt("return", _context4.sent);
251
+ case 4:
252
+ case "end":
253
+ return _context4.stop();
254
+ }
255
+ }, _callee4, this);
256
+ }))).apply(this, arguments);
257
+ } /* -------------------------------------------------------------------------- */
217
258
  }, {
218
259
  key: "setAll",
219
- value: function setAll(_x5) {
220
- return (_setAll = _setAll || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(setObj) {
260
+ value: function setAll(_x6) {
261
+ return (_setAll = _setAll || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(setObj) {
221
262
  var finalRes, key;
222
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
223
- while (1) switch (_context3.prev = _context3.next) {
263
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
264
+ while (1) switch (_context5.prev = _context5.next) {
224
265
  case 0:
225
266
  finalRes = true;
226
- _context3.t0 = _regeneratorRuntime().keys(setObj);
267
+ _context5.t0 = _regeneratorRuntime().keys(setObj);
227
268
  case 2:
228
- if ((_context3.t1 = _context3.t0()).done) {
229
- _context3.next = 10;
269
+ if ((_context5.t1 = _context5.t0()).done) {
270
+ _context5.next = 10;
230
271
  break;
231
272
  }
232
- key = _context3.t1.value;
233
- _context3.next = 6;
273
+ key = _context5.t1.value;
274
+ _context5.next = 6;
234
275
  return this.setValue(key, setObj[key]);
235
276
  case 6:
236
- if (_context3.sent) {
237
- _context3.next = 8;
277
+ if (_context5.sent) {
278
+ _context5.next = 8;
238
279
  break;
239
280
  }
240
281
  finalRes = false;
241
282
  case 8:
242
- _context3.next = 2;
283
+ _context5.next = 2;
243
284
  break;
244
285
  case 10:
245
- return _context3.abrupt("return", finalRes);
286
+ return _context5.abrupt("return", finalRes);
246
287
  case 11:
247
288
  case "end":
248
- return _context3.stop();
289
+ return _context5.stop();
249
290
  }
250
- }, _callee3, this);
291
+ }, _callee5, this);
251
292
  }))).apply(this, arguments);
252
293
  }
253
294
  /**
@@ -271,30 +312,30 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setTemp, _
271
312
  * @param subvalue
272
313
  * @return true if changed , false otherwise
273
314
  */
274
- function setSubValue(_x6, _x7, _x8) {
275
- return (_setSubValue = _setSubValue || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(key, objKey, subvalue) {
315
+ function setSubValue(_x7, _x8, _x9) {
316
+ return (_setSubValue = _setSubValue || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(key, objKey, subvalue) {
276
317
  var sendChanges,
277
318
  isValueChanged,
278
319
  subval,
279
- _args4 = arguments;
280
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
281
- while (1) switch (_context4.prev = _context4.next) {
320
+ _args6 = arguments;
321
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
322
+ while (1) switch (_context6.prev = _context6.next) {
282
323
  case 0:
283
- sendChanges = _args4.length > 3 && _args4[3] !== undefined ? _args4[3] : "auto";
324
+ sendChanges = _args6.length > 3 && _args6[3] !== undefined ? _args6[3] : "auto";
284
325
  if (this.canModify) {
285
- _context4.next = 7;
326
+ _context6.next = 7;
286
327
  break;
287
328
  }
288
329
  if (!(this.__throw_errors !== false)) {
289
- _context4.next = 6;
330
+ _context6.next = 6;
290
331
  break;
291
332
  }
292
333
  throw Error("Cant use setValue when on readonly mode");
293
334
  case 6:
294
- return _context4.abrupt("return", false);
335
+ return _context6.abrupt("return", false);
295
336
  case 7:
296
337
  isValueChanged = false;
297
- _context4.prev = 8;
338
+ _context6.prev = 8;
298
339
  //if accessing subval of an object, make sure the object is not null
299
340
  subval = _classPrivateMethodGet(this, _getSubProperty, _getSubProperty2).call(this, key, objKey);
300
341
  if (!(0, _object.object_equals)(subval, subvalue, {
@@ -305,22 +346,22 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setTemp, _
305
346
  isValueChanged = true;
306
347
  } else isValueChanged = false;
307
348
  case 11:
308
- _context4.prev = 11;
349
+ _context6.prev = 11;
309
350
  if (!(sendChanges === true || sendChanges === "auto" && isValueChanged)) {
310
- _context4.next = 15;
351
+ _context6.next = 15;
311
352
  break;
312
353
  }
313
- _context4.next = 15;
354
+ _context6.next = 15;
314
355
  return this.notifyChanged("", key, objKey, subvalue);
315
356
  case 15:
316
- return _context4.finish(11);
357
+ return _context6.finish(11);
317
358
  case 16:
318
- return _context4.abrupt("return", isValueChanged);
359
+ return _context6.abrupt("return", isValueChanged);
319
360
  case 17:
320
361
  case "end":
321
- return _context4.stop();
362
+ return _context6.stop();
322
363
  }
323
- }, _callee4, this, [[8,, 11, 16]]);
364
+ }, _callee6, this, [[8,, 11, 16]]);
324
365
  }))).apply(this, arguments);
325
366
  }
326
367
  }, {
@@ -333,72 +374,72 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setTemp, _
333
374
  * @param sendChanges
334
375
  * @returns
335
376
  */
336
- function pushValue(_x9, _x10) {
337
- return (_pushValue = _pushValue || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(key, value) {
377
+ function pushValue(_x10, _x11) {
378
+ return (_pushValue = _pushValue || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(key, value) {
338
379
  var sendChanges,
339
380
  tempArray,
340
- _args5 = arguments;
341
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
342
- while (1) switch (_context5.prev = _context5.next) {
381
+ _args7 = arguments;
382
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
383
+ while (1) switch (_context7.prev = _context7.next) {
343
384
  case 0:
344
- sendChanges = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : "auto";
385
+ sendChanges = _args7.length > 2 && _args7[2] !== undefined ? _args7[2] : "auto";
345
386
  if (!(value == null)) {
346
- _context5.next = 3;
387
+ _context7.next = 3;
347
388
  break;
348
389
  }
349
- return _context5.abrupt("return", false);
390
+ return _context7.abrupt("return", false);
350
391
  case 3:
351
392
  if (this.canModify) {
352
- _context5.next = 9;
393
+ _context7.next = 9;
353
394
  break;
354
395
  }
355
396
  if (!(this.__throw_errors !== false)) {
356
- _context5.next = 8;
397
+ _context7.next = 8;
357
398
  break;
358
399
  }
359
400
  throw Error("Cant use pushValue when on readonly mode");
360
401
  case 8:
361
- return _context5.abrupt("return", false);
402
+ return _context7.abrupt("return", false);
362
403
  case 9:
363
404
  if (_classPrivateMethodGet(this, _getProperty, _getProperty2).call(this, key) == null) {
364
405
  _classPrivateMethodGet(this, _setProperty, _setProperty2).call(this, key, []);
365
406
  }
366
407
  tempArray = _classPrivateMethodGet(this, _getProperty, _getProperty2).call(this, key);
367
408
  if (Array.isArray(tempArray)) {
368
- _context5.next = 17;
409
+ _context7.next = 17;
369
410
  break;
370
411
  }
371
412
  if (!(this.__throw_errors !== false)) {
372
- _context5.next = 16;
413
+ _context7.next = 16;
373
414
  break;
374
415
  }
375
416
  throw Error("Cant use pushValue on non Array keys");
376
417
  case 16:
377
- return _context5.abrupt("return", false);
418
+ return _context7.abrupt("return", false);
378
419
  case 17:
379
420
  _classPrivateMethodGet(this, _setProperty, _setProperty2).call(this, key, [].concat(_toConsumableArray(tempArray), [value]));
380
421
  if (!(sendChanges === true || sendChanges === "auto")) {
381
- _context5.next = 21;
422
+ _context7.next = 21;
382
423
  break;
383
424
  }
384
- _context5.next = 21;
425
+ _context7.next = 21;
385
426
  return this.notifyChanged("", key, value);
386
427
  case 21:
387
- return _context5.abrupt("return", tempArray);
428
+ return _context7.abrupt("return", tempArray);
388
429
  case 22:
389
430
  case "end":
390
- return _context5.stop();
431
+ return _context7.stop();
391
432
  }
392
- }, _callee5, this);
433
+ }, _callee7, this);
393
434
  }))).apply(this, arguments);
394
435
  }
395
436
  }, {
396
437
  key: "notifyChanged",
397
- value: function notifyChanged(_x11, _x12, _x13, _x14) {
398
- return (_notifyChanged = _notifyChanged || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(type, key, value, subvalue) {
438
+ value: function notifyChanged(_x12, _x13, _x14, _x15) {
439
+ return (_notifyChanged = _notifyChanged || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(type, key, value, subvalue) {
399
440
  var lc, manager_class;
400
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
401
- while (1) switch (_context6.prev = _context6.next) {
441
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
442
+ while (1) switch (_context8.prev = _context8.next) {
402
443
  case 0:
403
444
  if (value === undefined && type == "") value = this.getValue(key);
404
445
  this.__changed = true;
@@ -413,16 +454,16 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setTemp, _
413
454
  /* --------------------------- notify the manager --------------------------- */
414
455
  manager_class = this.manager;
415
456
  if (!(manager_class instanceof _ObjectManager["default"])) {
416
- _context6.next = 10;
457
+ _context8.next = 10;
417
458
  break;
418
459
  }
419
- _context6.next = 10;
460
+ _context8.next = 10;
420
461
  return manager_class.notifyChanged(type, key, value, subvalue);
421
462
  case 10:
422
463
  case "end":
423
- return _context6.stop();
464
+ return _context8.stop();
424
465
  }
425
- }, _callee6, this);
466
+ }, _callee8, this);
426
467
  }))).apply(this, arguments);
427
468
  }
428
469
  /**
@@ -486,23 +527,23 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setTemp, _
486
527
  */
487
528
  }, {
488
529
  key: "reset",
489
- value: function reset(_x15) {
490
- return (_reset = _reset || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(key) {
530
+ value: function reset(_x16) {
531
+ return (_reset = _reset || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(key) {
491
532
  var notifyChanged,
492
- _args7 = arguments;
493
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
494
- while (1) switch (_context7.prev = _context7.next) {
533
+ _args9 = arguments;
534
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
535
+ while (1) switch (_context9.prev = _context9.next) {
495
536
  case 0:
496
- notifyChanged = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : "auto";
497
- _context7.next = 3;
537
+ notifyChanged = _args9.length > 1 && _args9[1] !== undefined ? _args9[1] : "auto";
538
+ _context9.next = 3;
498
539
  return this.setValue(key, this[key], notifyChanged);
499
540
  case 3:
500
- return _context7.abrupt("return", _context7.sent);
541
+ return _context9.abrupt("return", _context9.sent);
501
542
  case 4:
502
543
  case "end":
503
- return _context7.stop();
544
+ return _context9.stop();
504
545
  }
505
- }, _callee7, this);
546
+ }, _callee9, this);
506
547
  }))).apply(this, arguments);
507
548
  }
508
549
  /**
@@ -513,43 +554,43 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setTemp, _
513
554
  }, {
514
555
  key: "resetAll",
515
556
  value: function resetAll() {
516
- return (_resetAll = _resetAll || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
557
+ return (_resetAll = _resetAll || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
517
558
  var notifyChanged,
518
559
  fr,
519
560
  key,
520
- _args8 = arguments;
521
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
522
- while (1) switch (_context8.prev = _context8.next) {
561
+ _args10 = arguments;
562
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
563
+ while (1) switch (_context10.prev = _context10.next) {
523
564
  case 0:
524
- notifyChanged = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : "auto";
565
+ notifyChanged = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : "auto";
525
566
  fr = true;
526
- _context8.t0 = _regeneratorRuntime().keys(this.__delta);
567
+ _context10.t0 = _regeneratorRuntime().keys(this.__delta);
527
568
  case 3:
528
- if ((_context8.t1 = _context8.t0()).done) {
529
- _context8.next = 13;
569
+ if ((_context10.t1 = _context10.t0()).done) {
570
+ _context10.next = 13;
530
571
  break;
531
572
  }
532
- key = _context8.t1.value;
533
- _context8.t2 = fr;
534
- if (!_context8.t2) {
535
- _context8.next = 10;
573
+ key = _context10.t1.value;
574
+ _context10.t2 = fr;
575
+ if (!_context10.t2) {
576
+ _context10.next = 10;
536
577
  break;
537
578
  }
538
- _context8.next = 9;
579
+ _context10.next = 9;
539
580
  return this.reset(key, notifyChanged);
540
581
  case 9:
541
- _context8.t2 = _context8.sent;
582
+ _context10.t2 = _context10.sent;
542
583
  case 10:
543
- fr = _context8.t2;
544
- _context8.next = 3;
584
+ fr = _context10.t2;
585
+ _context10.next = 3;
545
586
  break;
546
587
  case 13:
547
- return _context8.abrupt("return", fr);
588
+ return _context10.abrupt("return", fr);
548
589
  case 14:
549
590
  case "end":
550
- return _context8.stop();
591
+ return _context10.stop();
551
592
  }
552
- }, _callee8, this);
593
+ }, _callee10, this);
553
594
  }))).apply(this, arguments);
554
595
  }
555
596
  /**
@@ -721,35 +762,35 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setTemp, _
721
762
  /* -------------------------------------------------------------------------- */
722
763
  /* Events */
723
764
  /* -------------------------------------------------------------------------- */
724
- function event_run(_x16) {
725
- return (_event_run = _event_run || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(eventName) {
765
+ function event_run(_x17) {
766
+ return (_event_run = _event_run || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(eventName) {
726
767
  var _this$manager;
727
- var _len,
768
+ var _len2,
728
769
  params,
729
- _key,
730
- _args9 = arguments;
731
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
732
- while (1) switch (_context9.prev = _context9.next) {
770
+ _key2,
771
+ _args11 = arguments;
772
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
773
+ while (1) switch (_context11.prev = _context11.next) {
733
774
  case 0:
734
775
  if (this.manager) {
735
- _context9.next = 3;
776
+ _context11.next = 3;
736
777
  break;
737
778
  }
738
779
  if (this.__showErrors === true) console.error("you cant use events if your object has no manager");
739
- return _context9.abrupt("return");
780
+ return _context11.abrupt("return");
740
781
  case 3:
741
- for (_len = _args9.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
742
- params[_key - 1] = _args9[_key];
782
+ for (_len2 = _args11.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
783
+ params[_key2 - 1] = _args11[_key2];
743
784
  }
744
- _context9.next = 6;
785
+ _context11.next = 6;
745
786
  return (_this$manager = this.manager).event_run.apply(_this$manager, [eventName].concat(params));
746
787
  case 6:
747
- return _context9.abrupt("return", _context9.sent);
788
+ return _context11.abrupt("return", _context11.sent);
748
789
  case 7:
749
790
  case "end":
750
- return _context9.stop();
791
+ return _context11.stop();
751
792
  }
752
- }, _callee9, this);
793
+ }, _callee11, this);
753
794
  }))).apply(this, arguments);
754
795
  }
755
796
  }, {
@@ -774,30 +815,30 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setTemp, _
774
815
  }
775
816
  }, {
776
817
  key: "event_add",
777
- value: function event_add(_x17, _x18, _x19) {
778
- return (_event_add = _event_add || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(name, uname, runEvent) {
818
+ value: function event_add(_x18, _x19, _x20) {
819
+ return (_event_add = _event_add || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(name, uname, runEvent) {
779
820
  var onlyOn,
780
821
  runOnce,
781
- _args10 = arguments;
782
- return _regeneratorRuntime().wrap(function _callee10$(_context10) {
783
- while (1) switch (_context10.prev = _context10.next) {
822
+ _args12 = arguments;
823
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
824
+ while (1) switch (_context12.prev = _context12.next) {
784
825
  case 0:
785
- onlyOn = _args10.length > 3 && _args10[3] !== undefined ? _args10[3] : null;
786
- runOnce = _args10.length > 4 && _args10[4] !== undefined ? _args10[4] : false;
826
+ onlyOn = _args12.length > 3 && _args12[3] !== undefined ? _args12[3] : null;
827
+ runOnce = _args12.length > 4 && _args12[4] !== undefined ? _args12[4] : false;
787
828
  if (this.manager) {
788
- _context10.next = 5;
829
+ _context12.next = 5;
789
830
  break;
790
831
  }
791
832
  if (this.__showErrors === true) console.error("you cant use events if your object has no manager");
792
- return _context10.abrupt("return");
833
+ return _context12.abrupt("return");
793
834
  case 5:
794
- _context10.next = 7;
835
+ _context12.next = 7;
795
836
  return this.manager.event_add(name, uname, runEvent, onlyOn, runOnce);
796
837
  case 7:
797
838
  case "end":
798
- return _context10.stop();
839
+ return _context12.stop();
799
840
  }
800
- }, _callee10, this);
841
+ }, _callee12, this);
801
842
  }))).apply(this, arguments);
802
843
  }
803
844
  /* -------------------------------------------------------------------------- */
@@ -905,10 +946,10 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setTemp, _
905
946
  delete obj[key];
906
947
  }
907
948
  } else if (_typeof(initObject) == "object") {
908
- for (var _key2 in initObject) {
909
- if (_key2.startsWith("__")) continue;
910
- if (fullUpdate || Object.prototype.hasOwnProperty.call(obj, _key2)) {
911
- obj[_key2] = initObject[_key2];
949
+ for (var _key3 in initObject) {
950
+ if (_key3.startsWith("__")) continue;
951
+ if (fullUpdate || Object.prototype.hasOwnProperty.call(obj, _key3)) {
952
+ obj[_key3] = initObject[_key3];
912
953
  }
913
954
  }
914
955
  }
@@ -1137,37 +1178,37 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setTemp, _
1137
1178
  }
1138
1179
  }, {
1139
1180
  key: "setTemp",
1140
- value: function setTemp(_x20, _x21, _x22) {
1141
- return (_setTemp2 = _setTemp2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(obj, key, value) {
1181
+ value: function setTemp(_x21, _x22, _x23) {
1182
+ return (_setTemp2 = _setTemp2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(obj, key, value) {
1142
1183
  var sendChanges,
1143
- _args11 = arguments;
1144
- return _regeneratorRuntime().wrap(function _callee11$(_context11) {
1145
- while (1) switch (_context11.prev = _context11.next) {
1184
+ _args13 = arguments;
1185
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
1186
+ while (1) switch (_context13.prev = _context13.next) {
1146
1187
  case 0:
1147
- sendChanges = _args11.length > 3 && _args11[3] !== undefined ? _args11[3] : false;
1188
+ sendChanges = _args13.length > 3 && _args13[3] !== undefined ? _args13[3] : false;
1148
1189
  if (!(_typeof(obj) !== "object" || !obj || Array.isArray(obj))) {
1149
- _context11.next = 3;
1190
+ _context13.next = 3;
1150
1191
  break;
1151
1192
  }
1152
- return _context11.abrupt("return");
1193
+ return _context13.abrupt("return");
1153
1194
  case 3:
1154
1195
  if (!(obj instanceof SimpleObject)) {
1155
- _context11.next = 7;
1196
+ _context13.next = 7;
1156
1197
  break;
1157
1198
  }
1158
- _context11.next = 6;
1199
+ _context13.next = 6;
1159
1200
  return obj.setTemp(key, value, sendChanges);
1160
1201
  case 6:
1161
- return _context11.abrupt("return", _context11.sent);
1202
+ return _context13.abrupt("return", _context13.sent);
1162
1203
  case 7:
1163
1204
  //
1164
1205
  if (obj.__temp == null) obj.__temp = {};
1165
1206
  (0, _object.object_set)(obj.__temp, key, value);
1166
1207
  case 9:
1167
1208
  case "end":
1168
- return _context11.stop();
1209
+ return _context13.stop();
1169
1210
  }
1170
- }, _callee11);
1211
+ }, _callee13);
1171
1212
  }))).apply(this, arguments);
1172
1213
  }
1173
1214
  }, {
@@ -1178,36 +1219,36 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setTemp, _
1178
1219
  }
1179
1220
  }, {
1180
1221
  key: "delete_cache",
1181
- value: function delete_cache(_x23) {
1182
- return (_delete_cache = _delete_cache || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(context) {
1222
+ value: function delete_cache(_x24) {
1223
+ return (_delete_cache = _delete_cache || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(context) {
1183
1224
  var cacheKey;
1184
- return _regeneratorRuntime().wrap(function _callee12$(_context12) {
1185
- while (1) switch (_context12.prev = _context12.next) {
1225
+ return _regeneratorRuntime().wrap(function _callee14$(_context14) {
1226
+ while (1) switch (_context14.prev = _context14.next) {
1186
1227
  case 0:
1187
1228
  if (this.__cache_name) {
1188
- _context12.next = 2;
1229
+ _context14.next = 2;
1189
1230
  break;
1190
1231
  }
1191
- return _context12.abrupt("return");
1232
+ return _context14.abrupt("return");
1192
1233
  case 2:
1193
1234
  if (context) {
1194
- _context12.next = 7;
1235
+ _context14.next = 7;
1195
1236
  break;
1196
1237
  }
1197
- _context12.next = 5;
1238
+ _context14.next = 5;
1198
1239
  return _global.gcache.delete_session_cache(this.__cache_name);
1199
1240
  case 5:
1200
- _context12.next = 10;
1241
+ _context14.next = 10;
1201
1242
  break;
1202
1243
  case 7:
1203
1244
  cacheKey = "".concat(this.__cache_name, "-").concat(context);
1204
- _context12.next = 10;
1245
+ _context14.next = 10;
1205
1246
  return _global.gcache.delete_session_cache(cacheKey);
1206
1247
  case 10:
1207
1248
  case "end":
1208
- return _context12.stop();
1249
+ return _context14.stop();
1209
1250
  }
1210
- }, _callee12, this);
1251
+ }, _callee14, this);
1211
1252
  }))).apply(this, arguments);
1212
1253
  }
1213
1254
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/webobject",
3
- "version": "1.4.117",
3
+ "version": "1.4.118",
4
4
  "description": "Stateful object",
5
5
  "author": "Azrideus",
6
6
  "license": "MIT",