@azrico/webobject 1.5.9 → 1.5.10
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.
|
@@ -85,7 +85,7 @@ export declare class WebObject extends SimpleObject {
|
|
|
85
85
|
* useful in server applications
|
|
86
86
|
* @returns
|
|
87
87
|
*/
|
|
88
|
-
|
|
88
|
+
get_fullObject(p?: deltaParams): Promise<any>;
|
|
89
89
|
/**
|
|
90
90
|
* You will post this to the server for saving
|
|
91
91
|
* automatically removes unchangable fields
|
|
@@ -480,26 +480,26 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
480
480
|
key: "get_basicObject",
|
|
481
481
|
value: (function () {
|
|
482
482
|
var _get_basicObject = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
483
|
-
var
|
|
483
|
+
var fullobject, key, element;
|
|
484
484
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
485
485
|
while (1) switch (_context8.prev = _context8.next) {
|
|
486
486
|
case 0:
|
|
487
487
|
_context8.next = 2;
|
|
488
|
-
return this.
|
|
488
|
+
return this.get_fullObject();
|
|
489
489
|
case 2:
|
|
490
|
-
|
|
491
|
-
for (key in
|
|
492
|
-
element =
|
|
490
|
+
fullobject = _context8.sent;
|
|
491
|
+
for (key in fullobject) {
|
|
492
|
+
element = fullobject[key];
|
|
493
493
|
/* --------------------------- check for id fields -------------------------- */
|
|
494
494
|
if (element != null && _typeof(element) === "object") {
|
|
495
495
|
if ((key === "id" || key.endsWith("_id")) && typeof element.toString === "function") {
|
|
496
|
-
|
|
496
|
+
fullobject[key] = String(element);
|
|
497
497
|
} else {
|
|
498
|
-
|
|
498
|
+
fullobject[key] = JSON.parse(JSON.stringify(element));
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
return _context8.abrupt("return",
|
|
502
|
+
return _context8.abrupt("return", fullobject);
|
|
503
503
|
case 5:
|
|
504
504
|
case "end":
|
|
505
505
|
return _context8.stop();
|
|
@@ -519,9 +519,9 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
519
519
|
*/
|
|
520
520
|
)
|
|
521
521
|
}, {
|
|
522
|
-
key: "
|
|
522
|
+
key: "get_fullObject",
|
|
523
523
|
value: (function () {
|
|
524
|
-
var
|
|
524
|
+
var _get_fullObject = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(p) {
|
|
525
525
|
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
526
526
|
while (1) switch (_context9.prev = _context9.next) {
|
|
527
527
|
case 0:
|
|
@@ -538,10 +538,10 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
538
538
|
}
|
|
539
539
|
}, _callee9, this);
|
|
540
540
|
}));
|
|
541
|
-
function
|
|
542
|
-
return
|
|
541
|
+
function get_fullObject(_x3) {
|
|
542
|
+
return _get_fullObject.apply(this, arguments);
|
|
543
543
|
}
|
|
544
|
-
return
|
|
544
|
+
return get_fullObject;
|
|
545
545
|
}()
|
|
546
546
|
/**
|
|
547
547
|
* You will post this to the server for saving
|
|
@@ -182,10 +182,11 @@ var SimpleObject = exports.SimpleObject = /*#__PURE__*/function (_MapableObject)
|
|
|
182
182
|
_context.next = 7;
|
|
183
183
|
break;
|
|
184
184
|
}
|
|
185
|
-
throw Error("Cant use set
|
|
185
|
+
throw Error("Cant use set(".concat(String(key), ") when on readonly mode"));
|
|
186
186
|
case 7:
|
|
187
187
|
return _context.abrupt("return", false);
|
|
188
188
|
case 8:
|
|
189
|
+
/* -------------------------------------------------------------------------- */
|
|
189
190
|
keyExists = false;
|
|
190
191
|
if (typeof key === "string" && key.includes(".")) {
|
|
191
192
|
/* -------------------------------------------------------------------------- */
|