@azrico/webobject 1.4.65 → 1.4.67
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.
|
@@ -53,6 +53,9 @@ export declare class SimpleObject extends MapableObject {
|
|
|
53
53
|
setValue(key: WriteablePropOf<this>, value: any, sendChanges?: sendChangesType): Promise<boolean>;
|
|
54
54
|
set: (key: WriteablePropOf<this>, value: any, sendChanges?: sendChangesType) => Promise<boolean>;
|
|
55
55
|
setTemp: (key: string, value: any) => any;
|
|
56
|
+
setAll<K extends WriteablePropOf<this>>(setObj: {
|
|
57
|
+
[key in K]: any;
|
|
58
|
+
}): Promise<boolean>;
|
|
56
59
|
/**
|
|
57
60
|
* set value of a key only if the value is empty
|
|
58
61
|
* @param key
|
|
@@ -46,7 +46,7 @@ var _getProperty = /*#__PURE__*/new WeakSet();
|
|
|
46
46
|
var _getTempProperty = /*#__PURE__*/new WeakSet();
|
|
47
47
|
var _setTempProperty = /*#__PURE__*/new WeakSet();
|
|
48
48
|
var _setSaveResultObject = /*#__PURE__*/new WeakSet();
|
|
49
|
-
var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setSubValue, _pushValue, _notifyChanged, _reset, _resetAll, _event_run, _event_add) {
|
|
49
|
+
var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setAll, _setSubValue, _pushValue, _notifyChanged, _reset, _resetAll, _event_run, _event_add) {
|
|
50
50
|
_inherits(SimpleObject, _MapableObject);
|
|
51
51
|
var _super = _createSuper(SimpleObject);
|
|
52
52
|
function SimpleObject() {
|
|
@@ -189,15 +189,50 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setSubValu
|
|
|
189
189
|
}))).apply(this, arguments);
|
|
190
190
|
}
|
|
191
191
|
}, {
|
|
192
|
-
key: "
|
|
193
|
-
value:
|
|
192
|
+
key: "setAll",
|
|
193
|
+
value: function setAll(_x3) {
|
|
194
|
+
return (_setAll = _setAll || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(setObj) {
|
|
195
|
+
var finalRes, key;
|
|
196
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
197
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
198
|
+
case 0:
|
|
199
|
+
finalRes = true;
|
|
200
|
+
_context2.t0 = _regeneratorRuntime().keys(setObj);
|
|
201
|
+
case 2:
|
|
202
|
+
if ((_context2.t1 = _context2.t0()).done) {
|
|
203
|
+
_context2.next = 10;
|
|
204
|
+
break;
|
|
205
|
+
}
|
|
206
|
+
key = _context2.t1.value;
|
|
207
|
+
_context2.next = 6;
|
|
208
|
+
return this.setValue(key, setObj[key]);
|
|
209
|
+
case 6:
|
|
210
|
+
if (_context2.sent) {
|
|
211
|
+
_context2.next = 8;
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
214
|
+
finalRes = false;
|
|
215
|
+
case 8:
|
|
216
|
+
_context2.next = 2;
|
|
217
|
+
break;
|
|
218
|
+
case 10:
|
|
219
|
+
return _context2.abrupt("return", finalRes);
|
|
220
|
+
case 11:
|
|
221
|
+
case "end":
|
|
222
|
+
return _context2.stop();
|
|
223
|
+
}
|
|
224
|
+
}, _callee2, this);
|
|
225
|
+
}))).apply(this, arguments);
|
|
226
|
+
}
|
|
194
227
|
/**
|
|
195
228
|
* set value of a key only if the value is empty
|
|
196
229
|
* @param key
|
|
197
230
|
* @param value
|
|
198
231
|
* @returns
|
|
199
232
|
*/
|
|
200
|
-
|
|
233
|
+
}, {
|
|
234
|
+
key: "setDefaultValue",
|
|
235
|
+
value: function setDefaultValue(key, value) {
|
|
201
236
|
return _classPrivateMethodGet(this, _setDefaultProperty, _setDefaultProperty2).call(this, key, value);
|
|
202
237
|
}
|
|
203
238
|
}, {
|
|
@@ -210,30 +245,30 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setSubValu
|
|
|
210
245
|
* @param subvalue
|
|
211
246
|
* @return true if changed , false otherwise
|
|
212
247
|
*/
|
|
213
|
-
function setSubValue(
|
|
214
|
-
return (_setSubValue = _setSubValue || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
248
|
+
function setSubValue(_x4, _x5, _x6) {
|
|
249
|
+
return (_setSubValue = _setSubValue || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(key, objKey, subvalue) {
|
|
215
250
|
var sendChanges,
|
|
216
251
|
isValueChanged,
|
|
217
252
|
subval,
|
|
218
|
-
|
|
219
|
-
return _regeneratorRuntime().wrap(function
|
|
220
|
-
while (1) switch (
|
|
253
|
+
_args3 = arguments;
|
|
254
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
255
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
221
256
|
case 0:
|
|
222
|
-
sendChanges =
|
|
257
|
+
sendChanges = _args3.length > 3 && _args3[3] !== undefined ? _args3[3] : "auto";
|
|
223
258
|
if (this.canModify) {
|
|
224
|
-
|
|
259
|
+
_context3.next = 7;
|
|
225
260
|
break;
|
|
226
261
|
}
|
|
227
262
|
if (!(this.__throw_errors !== false)) {
|
|
228
|
-
|
|
263
|
+
_context3.next = 6;
|
|
229
264
|
break;
|
|
230
265
|
}
|
|
231
266
|
throw Error("Cant use setValue when on readonly mode");
|
|
232
267
|
case 6:
|
|
233
|
-
return
|
|
268
|
+
return _context3.abrupt("return", false);
|
|
234
269
|
case 7:
|
|
235
270
|
isValueChanged = false;
|
|
236
|
-
|
|
271
|
+
_context3.prev = 8;
|
|
237
272
|
//if accessing subval of an object, make sure the object is not null
|
|
238
273
|
subval = _classPrivateMethodGet(this, _getSubProperty, _getSubProperty2).call(this, key, objKey);
|
|
239
274
|
if (!(0, _object.object_equals)(subval, subvalue, {
|
|
@@ -244,22 +279,22 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setSubValu
|
|
|
244
279
|
isValueChanged = true;
|
|
245
280
|
} else isValueChanged = false;
|
|
246
281
|
case 11:
|
|
247
|
-
|
|
282
|
+
_context3.prev = 11;
|
|
248
283
|
if (!(sendChanges === true || sendChanges === "auto" && isValueChanged)) {
|
|
249
|
-
|
|
284
|
+
_context3.next = 15;
|
|
250
285
|
break;
|
|
251
286
|
}
|
|
252
|
-
|
|
287
|
+
_context3.next = 15;
|
|
253
288
|
return this.notifyChanged("", key, objKey, subvalue);
|
|
254
289
|
case 15:
|
|
255
|
-
return
|
|
290
|
+
return _context3.finish(11);
|
|
256
291
|
case 16:
|
|
257
|
-
return
|
|
292
|
+
return _context3.abrupt("return", isValueChanged);
|
|
258
293
|
case 17:
|
|
259
294
|
case "end":
|
|
260
|
-
return
|
|
295
|
+
return _context3.stop();
|
|
261
296
|
}
|
|
262
|
-
},
|
|
297
|
+
}, _callee3, this, [[8,, 11, 16]]);
|
|
263
298
|
}))).apply(this, arguments);
|
|
264
299
|
}
|
|
265
300
|
}, {
|
|
@@ -272,72 +307,72 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setSubValu
|
|
|
272
307
|
* @param sendChanges
|
|
273
308
|
* @returns
|
|
274
309
|
*/
|
|
275
|
-
function pushValue(
|
|
276
|
-
return (_pushValue = _pushValue || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
310
|
+
function pushValue(_x7, _x8) {
|
|
311
|
+
return (_pushValue = _pushValue || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(key, value) {
|
|
277
312
|
var sendChanges,
|
|
278
313
|
tempArray,
|
|
279
|
-
|
|
280
|
-
return _regeneratorRuntime().wrap(function
|
|
281
|
-
while (1) switch (
|
|
314
|
+
_args4 = arguments;
|
|
315
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
316
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
282
317
|
case 0:
|
|
283
|
-
sendChanges =
|
|
318
|
+
sendChanges = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : "auto";
|
|
284
319
|
if (!(value == null)) {
|
|
285
|
-
|
|
320
|
+
_context4.next = 3;
|
|
286
321
|
break;
|
|
287
322
|
}
|
|
288
|
-
return
|
|
323
|
+
return _context4.abrupt("return", false);
|
|
289
324
|
case 3:
|
|
290
325
|
if (this.canModify) {
|
|
291
|
-
|
|
326
|
+
_context4.next = 9;
|
|
292
327
|
break;
|
|
293
328
|
}
|
|
294
329
|
if (!(this.__throw_errors !== false)) {
|
|
295
|
-
|
|
330
|
+
_context4.next = 8;
|
|
296
331
|
break;
|
|
297
332
|
}
|
|
298
333
|
throw Error("Cant use pushValue when on readonly mode");
|
|
299
334
|
case 8:
|
|
300
|
-
return
|
|
335
|
+
return _context4.abrupt("return", false);
|
|
301
336
|
case 9:
|
|
302
337
|
if (_classPrivateMethodGet(this, _getProperty, _getProperty2).call(this, key) == null) {
|
|
303
338
|
_classPrivateMethodGet(this, _setProperty, _setProperty2).call(this, key, []);
|
|
304
339
|
}
|
|
305
340
|
tempArray = _classPrivateMethodGet(this, _getProperty, _getProperty2).call(this, key);
|
|
306
341
|
if (Array.isArray(tempArray)) {
|
|
307
|
-
|
|
342
|
+
_context4.next = 17;
|
|
308
343
|
break;
|
|
309
344
|
}
|
|
310
345
|
if (!(this.__throw_errors !== false)) {
|
|
311
|
-
|
|
346
|
+
_context4.next = 16;
|
|
312
347
|
break;
|
|
313
348
|
}
|
|
314
349
|
throw Error("Cant use pushValue on non Array keys");
|
|
315
350
|
case 16:
|
|
316
|
-
return
|
|
351
|
+
return _context4.abrupt("return", false);
|
|
317
352
|
case 17:
|
|
318
353
|
_classPrivateMethodGet(this, _setProperty, _setProperty2).call(this, key, [].concat(_toConsumableArray(tempArray), [value]));
|
|
319
354
|
if (!(sendChanges === true || sendChanges === "auto")) {
|
|
320
|
-
|
|
355
|
+
_context4.next = 21;
|
|
321
356
|
break;
|
|
322
357
|
}
|
|
323
|
-
|
|
358
|
+
_context4.next = 21;
|
|
324
359
|
return this.notifyChanged("", key, value);
|
|
325
360
|
case 21:
|
|
326
|
-
return
|
|
361
|
+
return _context4.abrupt("return", tempArray);
|
|
327
362
|
case 22:
|
|
328
363
|
case "end":
|
|
329
|
-
return
|
|
364
|
+
return _context4.stop();
|
|
330
365
|
}
|
|
331
|
-
},
|
|
366
|
+
}, _callee4, this);
|
|
332
367
|
}))).apply(this, arguments);
|
|
333
368
|
}
|
|
334
369
|
}, {
|
|
335
370
|
key: "notifyChanged",
|
|
336
|
-
value: function notifyChanged(
|
|
337
|
-
return (_notifyChanged = _notifyChanged || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
371
|
+
value: function notifyChanged(_x9, _x10, _x11, _x12) {
|
|
372
|
+
return (_notifyChanged = _notifyChanged || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(type, key, value, subvalue) {
|
|
338
373
|
var lc, manager_class;
|
|
339
|
-
return _regeneratorRuntime().wrap(function
|
|
340
|
-
while (1) switch (
|
|
374
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
375
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
341
376
|
case 0:
|
|
342
377
|
if (value === undefined && type != "meta") value = this.getValue(key);
|
|
343
378
|
this.__changed = true;
|
|
@@ -352,16 +387,16 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setSubValu
|
|
|
352
387
|
/* --------------------------- notify the manager --------------------------- */
|
|
353
388
|
manager_class = this.manager;
|
|
354
389
|
if (!(manager_class instanceof _ObjectManager["default"])) {
|
|
355
|
-
|
|
390
|
+
_context5.next = 10;
|
|
356
391
|
break;
|
|
357
392
|
}
|
|
358
|
-
|
|
393
|
+
_context5.next = 10;
|
|
359
394
|
return manager_class.notifyChanged(type, key, value, subvalue);
|
|
360
395
|
case 10:
|
|
361
396
|
case "end":
|
|
362
|
-
return
|
|
397
|
+
return _context5.stop();
|
|
363
398
|
}
|
|
364
|
-
},
|
|
399
|
+
}, _callee5, this);
|
|
365
400
|
}))).apply(this, arguments);
|
|
366
401
|
}
|
|
367
402
|
/**
|
|
@@ -405,23 +440,23 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setSubValu
|
|
|
405
440
|
*/
|
|
406
441
|
}, {
|
|
407
442
|
key: "reset",
|
|
408
|
-
value: function reset(
|
|
409
|
-
return (_reset = _reset || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
443
|
+
value: function reset(_x13) {
|
|
444
|
+
return (_reset = _reset || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(key) {
|
|
410
445
|
var notifyChanged,
|
|
411
|
-
|
|
412
|
-
return _regeneratorRuntime().wrap(function
|
|
413
|
-
while (1) switch (
|
|
446
|
+
_args6 = arguments;
|
|
447
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
448
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
414
449
|
case 0:
|
|
415
|
-
notifyChanged =
|
|
416
|
-
|
|
450
|
+
notifyChanged = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : "auto";
|
|
451
|
+
_context6.next = 3;
|
|
417
452
|
return this.setValue(key, this[key], notifyChanged);
|
|
418
453
|
case 3:
|
|
419
|
-
return
|
|
454
|
+
return _context6.abrupt("return", _context6.sent);
|
|
420
455
|
case 4:
|
|
421
456
|
case "end":
|
|
422
|
-
return
|
|
457
|
+
return _context6.stop();
|
|
423
458
|
}
|
|
424
|
-
},
|
|
459
|
+
}, _callee6, this);
|
|
425
460
|
}))).apply(this, arguments);
|
|
426
461
|
}
|
|
427
462
|
/**
|
|
@@ -432,43 +467,43 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setSubValu
|
|
|
432
467
|
}, {
|
|
433
468
|
key: "resetAll",
|
|
434
469
|
value: function resetAll() {
|
|
435
|
-
return (_resetAll = _resetAll || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
470
|
+
return (_resetAll = _resetAll || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
436
471
|
var notifyChanged,
|
|
437
472
|
fr,
|
|
438
473
|
key,
|
|
439
|
-
|
|
440
|
-
return _regeneratorRuntime().wrap(function
|
|
441
|
-
while (1) switch (
|
|
474
|
+
_args7 = arguments;
|
|
475
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
476
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
442
477
|
case 0:
|
|
443
|
-
notifyChanged =
|
|
478
|
+
notifyChanged = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : "auto";
|
|
444
479
|
fr = true;
|
|
445
|
-
|
|
480
|
+
_context7.t0 = _regeneratorRuntime().keys(this.__delta);
|
|
446
481
|
case 3:
|
|
447
|
-
if ((
|
|
448
|
-
|
|
482
|
+
if ((_context7.t1 = _context7.t0()).done) {
|
|
483
|
+
_context7.next = 13;
|
|
449
484
|
break;
|
|
450
485
|
}
|
|
451
|
-
key =
|
|
452
|
-
|
|
453
|
-
if (!
|
|
454
|
-
|
|
486
|
+
key = _context7.t1.value;
|
|
487
|
+
_context7.t2 = fr;
|
|
488
|
+
if (!_context7.t2) {
|
|
489
|
+
_context7.next = 10;
|
|
455
490
|
break;
|
|
456
491
|
}
|
|
457
|
-
|
|
492
|
+
_context7.next = 9;
|
|
458
493
|
return this.reset(key, notifyChanged);
|
|
459
494
|
case 9:
|
|
460
|
-
|
|
495
|
+
_context7.t2 = _context7.sent;
|
|
461
496
|
case 10:
|
|
462
|
-
fr =
|
|
463
|
-
|
|
497
|
+
fr = _context7.t2;
|
|
498
|
+
_context7.next = 3;
|
|
464
499
|
break;
|
|
465
500
|
case 13:
|
|
466
|
-
return
|
|
501
|
+
return _context7.abrupt("return", fr);
|
|
467
502
|
case 14:
|
|
468
503
|
case "end":
|
|
469
|
-
return
|
|
504
|
+
return _context7.stop();
|
|
470
505
|
}
|
|
471
|
-
},
|
|
506
|
+
}, _callee7, this);
|
|
472
507
|
}))).apply(this, arguments);
|
|
473
508
|
}
|
|
474
509
|
/**
|
|
@@ -632,35 +667,35 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setSubValu
|
|
|
632
667
|
/* -------------------------------------------------------------------------- */
|
|
633
668
|
/* Events */
|
|
634
669
|
/* -------------------------------------------------------------------------- */
|
|
635
|
-
function event_run(
|
|
636
|
-
return (_event_run = _event_run || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
670
|
+
function event_run(_x14) {
|
|
671
|
+
return (_event_run = _event_run || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(eventName) {
|
|
637
672
|
var _this$manager;
|
|
638
673
|
var _len,
|
|
639
674
|
params,
|
|
640
675
|
_key,
|
|
641
|
-
|
|
642
|
-
return _regeneratorRuntime().wrap(function
|
|
643
|
-
while (1) switch (
|
|
676
|
+
_args8 = arguments;
|
|
677
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
678
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
644
679
|
case 0:
|
|
645
680
|
if (this.manager) {
|
|
646
|
-
|
|
681
|
+
_context8.next = 3;
|
|
647
682
|
break;
|
|
648
683
|
}
|
|
649
684
|
if (this.__showErrors === true) console.error("you cant use events if your object has no manager");
|
|
650
|
-
return
|
|
685
|
+
return _context8.abrupt("return");
|
|
651
686
|
case 3:
|
|
652
|
-
for (_len =
|
|
653
|
-
params[_key - 1] =
|
|
687
|
+
for (_len = _args8.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
688
|
+
params[_key - 1] = _args8[_key];
|
|
654
689
|
}
|
|
655
|
-
|
|
690
|
+
_context8.next = 6;
|
|
656
691
|
return (_this$manager = this.manager).event_run.apply(_this$manager, [eventName].concat(params));
|
|
657
692
|
case 6:
|
|
658
|
-
return
|
|
693
|
+
return _context8.abrupt("return", _context8.sent);
|
|
659
694
|
case 7:
|
|
660
695
|
case "end":
|
|
661
|
-
return
|
|
696
|
+
return _context8.stop();
|
|
662
697
|
}
|
|
663
|
-
},
|
|
698
|
+
}, _callee8, this);
|
|
664
699
|
}))).apply(this, arguments);
|
|
665
700
|
}
|
|
666
701
|
}, {
|
|
@@ -685,30 +720,30 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setSubValu
|
|
|
685
720
|
}
|
|
686
721
|
}, {
|
|
687
722
|
key: "event_add",
|
|
688
|
-
value: function event_add(
|
|
689
|
-
return (_event_add = _event_add || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
723
|
+
value: function event_add(_x15, _x16, _x17) {
|
|
724
|
+
return (_event_add = _event_add || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(name, uname, runEvent) {
|
|
690
725
|
var onlyOn,
|
|
691
726
|
runOnce,
|
|
692
|
-
|
|
693
|
-
return _regeneratorRuntime().wrap(function
|
|
694
|
-
while (1) switch (
|
|
727
|
+
_args9 = arguments;
|
|
728
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
729
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
695
730
|
case 0:
|
|
696
|
-
onlyOn =
|
|
697
|
-
runOnce =
|
|
731
|
+
onlyOn = _args9.length > 3 && _args9[3] !== undefined ? _args9[3] : null;
|
|
732
|
+
runOnce = _args9.length > 4 && _args9[4] !== undefined ? _args9[4] : false;
|
|
698
733
|
if (this.manager) {
|
|
699
|
-
|
|
734
|
+
_context9.next = 5;
|
|
700
735
|
break;
|
|
701
736
|
}
|
|
702
737
|
if (this.__showErrors === true) console.error("you cant use events if your object has no manager");
|
|
703
|
-
return
|
|
738
|
+
return _context9.abrupt("return");
|
|
704
739
|
case 5:
|
|
705
|
-
|
|
740
|
+
_context9.next = 7;
|
|
706
741
|
return this.manager.event_add(name, uname, runEvent, onlyOn, runOnce);
|
|
707
742
|
case 7:
|
|
708
743
|
case "end":
|
|
709
|
-
return
|
|
744
|
+
return _context9.stop();
|
|
710
745
|
}
|
|
711
|
-
},
|
|
746
|
+
}, _callee9, this);
|
|
712
747
|
}))).apply(this, arguments);
|
|
713
748
|
}
|
|
714
749
|
/* -------------------------------------------------------------------------- */
|
|
@@ -939,7 +974,7 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject, _setValue, _setSubValu
|
|
|
939
974
|
if (o._bsontype == "ObjectID" && typeof o.toString === "function") {
|
|
940
975
|
return o.toString();
|
|
941
976
|
}
|
|
942
|
-
return String(o._id || o.
|
|
977
|
+
return String(o._id || o.insertedId || o.ID || o.id || o.__data_id || "");
|
|
943
978
|
case "string":
|
|
944
979
|
case "number":
|
|
945
980
|
return String(o);
|