@azrico/webobject 1.5.69 → 1.5.71

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.
Files changed (31) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/src/WebObjects/ParentWebObject.d.ts +24 -24
  3. package/dist/src/WebObjects/ParentWebObject.js +7 -7
  4. package/dist/src/WebObjects/WebObject.d.ts +153 -153
  5. package/dist/src/WebObjects/WebObject.js +476 -561
  6. package/dist/src/WebObjects/WebObjectHelper.d.ts +9 -9
  7. package/dist/src/WebObjects/WebObjectHelper.js +4 -4
  8. package/dist/src/WebObjects/WebObjectHelper.test.d.ts +1 -1
  9. package/dist/src/WebObjects/WebObjectHelper.test.js +1 -1
  10. package/dist/src/WebObjects/WebObjectManager.d.ts +68 -68
  11. package/dist/src/WebObjects/WebObjectManager.js +303 -350
  12. package/dist/src/WebObjects/WebObjectPathHelper.d.ts +36 -36
  13. package/dist/src/WebObjects/WebObjectPathHelper.js +31 -39
  14. package/dist/src/WebObjects/WebObjectPathHelper.test.d.ts +1 -1
  15. package/dist/src/WebObjects/WebObjectPathHelper.test.js +55 -61
  16. package/dist/src/index.d.ts +10 -10
  17. package/dist/src/structs/DummyObject.d.ts +5 -5
  18. package/dist/src/structs/DummyObject.js +1 -1
  19. package/dist/src/structs/MapableObject.d.ts +43 -43
  20. package/dist/src/structs/MapableObject.js +3 -3
  21. package/dist/src/structs/MetaObject.d.ts +15 -15
  22. package/dist/src/structs/MetaObject.js +19 -25
  23. package/dist/src/structs/ObjectArray.d.ts +10 -10
  24. package/dist/src/structs/ObjectArray.js +1 -1
  25. package/dist/src/structs/ObjectManager.d.ts +140 -140
  26. package/dist/src/structs/ObjectManager.js +202 -223
  27. package/dist/src/structs/ObjectWithTemp.d.ts +17 -17
  28. package/dist/src/structs/ObjectWithTemp.js +13 -17
  29. package/dist/src/structs/SimpleObject.d.ts +318 -303
  30. package/dist/src/structs/SimpleObject.js +423 -467
  31. package/package.json +63 -82
@@ -12,11 +12,13 @@ var _convert = _interopRequireDefault(require("@azrico/convert"));
12
12
  var _WebObjectPathHelper = _interopRequireDefault(require("./WebObjectPathHelper"));
13
13
  var _WebObjectHelper = _interopRequireDefault(require("./WebObjectHelper"));
14
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
15
+ function _regeneratorKeys(e) { var n = Object(e), r = []; for (var t in n) r.unshift(t); return function e() { for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; return e.done = !0, e; }; }
15
16
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
16
17
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
17
18
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
18
19
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
19
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return r; }; var t, r = {}, e = Object.prototype, n = e.hasOwnProperty, o = "function" == typeof Symbol ? Symbol : {}, i = o.iterator || "@@iterator", a = o.asyncIterator || "@@asyncIterator", u = o.toStringTag || "@@toStringTag"; function c(t, r, e, n) { return Object.defineProperty(t, r, { value: e, enumerable: !n, configurable: !n, writable: !n }); } try { c({}, ""); } catch (t) { c = function c(t, r, e) { return t[r] = e; }; } function h(r, e, n, o) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype); return c(a, "_invoke", function (r, e, n) { var o = 1; return function (i, a) { if (3 === o) throw Error("Generator is already running"); if (4 === o) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var u = n.delegate; if (u) { var c = d(u, n); if (c) { if (c === f) continue; return c; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (1 === o) throw o = 4, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = 3; var h = s(r, e, n); if ("normal" === h.type) { if (o = n.done ? 4 : 2, h.arg === f) continue; return { value: h.arg, done: n.done }; } "throw" === h.type && (o = 4, n.method = "throw", n.arg = h.arg); } }; }(r, n, new Context(o || [])), !0), a; } function s(t, r, e) { try { return { type: "normal", arg: t.call(r, e) }; } catch (t) { return { type: "throw", arg: t }; } } r.wrap = h; var f = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var l = {}; c(l, i, function () { return this; }); var p = Object.getPrototypeOf, y = p && p(p(x([]))); y && y !== e && n.call(y, i) && (l = y); var v = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(l); function g(t) { ["next", "throw", "return"].forEach(function (r) { c(t, r, function (t) { return this._invoke(r, t); }); }); } function AsyncIterator(t, r) { function e(o, i, a, u) { var c = s(t[o], t, i); if ("throw" !== c.type) { var h = c.arg, f = h.value; return f && "object" == _typeof(f) && n.call(f, "__await") ? r.resolve(f.__await).then(function (t) { e("next", t, a, u); }, function (t) { e("throw", t, a, u); }) : r.resolve(f).then(function (t) { h.value = t, a(h); }, function (t) { return e("throw", t, a, u); }); } u(c.arg); } var o; c(this, "_invoke", function (t, n) { function i() { return new r(function (r, o) { e(t, n, r, o); }); } return o = o ? o.then(i, i) : i(); }, !0); } function d(r, e) { var n = e.method, o = r.i[n]; if (o === t) return e.delegate = null, "throw" === n && r.i["return"] && (e.method = "return", e.arg = t, d(r, e), "throw" === e.method) || "return" !== n && (e.method = "throw", e.arg = new TypeError("The iterator does not provide a '" + n + "' method")), f; var i = s(o, r.i, e.arg); if ("throw" === i.type) return e.method = "throw", e.arg = i.arg, e.delegate = null, f; var a = i.arg; return a ? a.done ? (e[r.r] = a.value, e.next = r.n, "return" !== e.method && (e.method = "next", e.arg = t), e.delegate = null, f) : a : (e.method = "throw", e.arg = new TypeError("iterator result is not an object"), e.delegate = null, f); } function w(t) { this.tryEntries.push(t); } function m(r) { var e = r[4] || {}; e.type = "normal", e.arg = t, r[4] = e; } function Context(t) { this.tryEntries = [[-1]], t.forEach(w, this), this.reset(!0); } function x(r) { if (null != r) { var e = r[i]; if (e) return e.call(r); if ("function" == typeof r.next) return r; if (!isNaN(r.length)) { var o = -1, a = function e() { for (; ++o < r.length;) if (n.call(r, o)) return e.value = r[o], e.done = !1, e; return e.value = t, e.done = !0, e; }; return a.next = a; } } throw new TypeError(_typeof(r) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, c(v, "constructor", GeneratorFunctionPrototype), c(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = c(GeneratorFunctionPrototype, u, "GeneratorFunction"), r.isGeneratorFunction = function (t) { var r = "function" == typeof t && t.constructor; return !!r && (r === GeneratorFunction || "GeneratorFunction" === (r.displayName || r.name)); }, r.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, c(t, u, "GeneratorFunction")), t.prototype = Object.create(v), t; }, r.awrap = function (t) { return { __await: t }; }, g(AsyncIterator.prototype), c(AsyncIterator.prototype, a, function () { return this; }), r.AsyncIterator = AsyncIterator, r.async = function (t, e, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(h(t, e, n, o), i); return r.isGeneratorFunction(e) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, g(v), c(v, u, "Generator"), c(v, i, function () { return this; }), c(v, "toString", function () { return "[object Generator]"; }), r.keys = function (t) { var r = Object(t), e = []; for (var n in r) e.unshift(n); return function t() { for (; e.length;) if ((n = e.pop()) in r) return t.value = n, t.done = !1, t; return t.done = !0, t; }; }, r.values = x, Context.prototype = { constructor: Context, reset: function reset(r) { if (this.prev = this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(m), !r) for (var e in this) "t" === e.charAt(0) && n.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0][4]; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(r) { if (this.done) throw r; var e = this; function n(t) { a.type = "throw", a.arg = r, e.next = t; } for (var o = e.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i[4], u = this.prev, c = i[1], h = i[2]; if (-1 === i[0]) return n("end"), !1; if (!c && !h) throw Error("try statement without catch or finally"); if (null != i[0] && i[0] <= u) { if (u < c) return this.method = "next", this.arg = t, n(c), !0; if (u < h) return n(h), !1; } } }, abrupt: function abrupt(t, r) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var n = this.tryEntries[e]; if (n[0] > -1 && n[0] <= this.prev && this.prev < n[2]) { var o = n; break; } } o && ("break" === t || "continue" === t) && o[0] <= r && r <= o[2] && (o = null); var i = o ? o[4] : {}; return i.type = t, i.arg = r, o ? (this.method = "next", this.next = o[2], f) : this.complete(i); }, complete: function complete(t, r) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && r && (this.next = r), f; }, finish: function finish(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[2] === t) return this.complete(e[4], e[3]), m(e), f; } }, "catch": function _catch(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[0] === t) { var n = e[4]; if ("throw" === n.type) { var o = n.arg; m(e); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(r, e, n) { return this.delegate = { i: x(r), r: e, n: n }, "next" === this.method && (this.arg = t), f; } }, r; }
20
+ function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
21
+ function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
20
22
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
21
23
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
22
24
  function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
@@ -36,7 +38,7 @@ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new T
36
38
  function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
37
39
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
38
40
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
39
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
41
+ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); }
40
42
  var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
41
43
  function WebObject() {
42
44
  var _this;
@@ -53,11 +55,11 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
53
55
  _this.meta_data = {};
54
56
  return _this;
55
57
  }
56
- /**
57
- * get a list of all user ids that work on the given object
58
- * _creator + _users + attentions(old)
59
- * removes duplicates
60
- * @returns array of ids
58
+ /**
59
+ * get a list of all user ids that work on the given object
60
+ * _creator + _users + attentions(old)
61
+ * removes duplicates
62
+ * @returns array of ids
61
63
  */
62
64
  _inherits(WebObject, _SimpleObject);
63
65
  return _createClass(WebObject, [{
@@ -65,10 +67,10 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
65
67
  value: function getAllUsers() {
66
68
  return WebObject.getAllUsers(this);
67
69
  }
68
- /**
69
- * get a unique list of all user ids that work on the given object
70
- * `_creator + _users + attentions`
71
- * @returns array of ids
70
+ /**
71
+ * get a unique list of all user ids that work on the given object
72
+ * `_creator + _users + attentions`
73
+ * @returns array of ids
72
74
  */
73
75
  }, {
74
76
  key: "setMetaValue",
@@ -76,71 +78,68 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
76
78
  /* -------------------------------------------------------------------------- */
77
79
  /* Meta data */
78
80
  /* -------------------------------------------------------------------------- */
79
- /**
80
- * Update meta value of this object , meta data is stored in meta_data variable
81
- * @param key
82
- * @param value
83
- * @param sendChange
84
- * @returns
81
+ /**
82
+ * Update meta value of this object , meta data is stored in meta_data variable
83
+ * @param key
84
+ * @param value
85
+ * @param sendChange
86
+ * @returns
85
87
  */
86
88
  function () {
87
- var _setMetaValue = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(key, value) {
89
+ var _setMetaValue = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(key, value) {
88
90
  var sendChange,
89
91
  old_value,
90
92
  new_metalist,
91
93
  _args = arguments;
92
- return _regeneratorRuntime().wrap(function _callee$(_context) {
93
- while (1) switch (_context.prev = _context.next) {
94
+ return _regenerator().w(function (_context) {
95
+ while (1) switch (_context.n) {
94
96
  case 0:
95
97
  sendChange = _args.length > 2 && _args[2] !== undefined ? _args[2] : "auto";
96
98
  if (this.canModify) {
97
- _context.next = 7;
99
+ _context.n = 2;
98
100
  break;
99
101
  }
100
102
  if (!(this.__throw_errors !== false)) {
101
- _context.next = 6;
103
+ _context.n = 1;
102
104
  break;
103
105
  }
104
106
  throw Error("Cant use setMetaValue on ".concat(key, " when on readonly mode"));
105
- case 6:
106
- return _context.abrupt("return", false);
107
- case 7:
107
+ case 1:
108
+ return _context.a(2, false);
109
+ case 2:
108
110
  if (!(!key || typeof key != "string")) {
109
- _context.next = 13;
111
+ _context.n = 4;
110
112
  break;
111
113
  }
112
114
  if (!(this.__throw_errors !== false)) {
113
- _context.next = 12;
115
+ _context.n = 3;
114
116
  break;
115
117
  }
116
118
  throw Error("Bad key at setMetaValue");
117
- case 12:
118
- return _context.abrupt("return", false);
119
- case 13:
119
+ case 3:
120
+ return _context.a(2, false);
121
+ case 4:
120
122
  old_value = WebObject.getMetaValue(this, key);
121
123
  if (!(0, _object.object_equals)(old_value, value)) {
122
- _context.next = 16;
124
+ _context.n = 5;
123
125
  break;
124
126
  }
125
- return _context.abrupt("return", false);
126
- case 16:
127
+ return _context.a(2, false);
128
+ case 5:
127
129
  //same value, no changes
128
130
  new_metalist = _objectSpread({}, this.get("meta_data"));
129
131
  new_metalist[key] = value;
130
- _context.next = 20;
132
+ _context.n = 6;
131
133
  return this.set("meta_data", new_metalist);
132
- case 20:
134
+ case 6:
133
135
  if (!(sendChange !== false)) {
134
- _context.next = 23;
136
+ _context.n = 7;
135
137
  break;
136
138
  }
137
- _context.next = 23;
139
+ _context.n = 7;
138
140
  return this.notifyChanged("meta", key, value);
139
- case 23:
140
- return _context.abrupt("return", true);
141
- case 24:
142
- case "end":
143
- return _context.stop();
141
+ case 7:
142
+ return _context.a(2, true);
144
143
  }
145
144
  }, _callee, this);
146
145
  }));
@@ -149,10 +148,10 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
149
148
  }
150
149
  return setMetaValue;
151
150
  }()
152
- /**
153
- * Get meta value by key
154
- * @param key
155
- * @returns value or undefined
151
+ /**
152
+ * Get meta value by key
153
+ * @param key
154
+ * @returns value or undefined
156
155
  */
157
156
  )
158
157
  }, {
@@ -160,90 +159,89 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
160
159
  value: function getMetaValue(key) {
161
160
  return WebObject.getMetaValue(this, key);
162
161
  }
163
- /**
164
- * Get meta value by key
165
- * @param o
166
- * @param key
167
- * @returns value or undefined
162
+ /**
163
+ * Get meta value by key
164
+ * @param o
165
+ * @param key
166
+ * @returns value or undefined
168
167
  */
169
168
  }, {
170
169
  key: "Save",
171
170
  value: function () {
172
- var _Save = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
171
+ var _Save = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
173
172
  var deltaObject, putAction, usepath, canSaveResult, resultObject;
174
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
175
- while (1) switch (_context2.prev = _context2.next) {
173
+ return _regenerator().w(function (_context2) {
174
+ while (1) switch (_context2.p = _context2.n) {
176
175
  case 0:
177
- _context2.prev = 0;
176
+ _context2.p = 0;
178
177
  if (!this.manager) {
179
- _context2.next = 6;
178
+ _context2.n = 2;
180
179
  break;
181
180
  }
182
- _context2.next = 4;
181
+ _context2.n = 1;
183
182
  return this.manager.setOption("saving", true);
184
- case 4:
185
- _context2.next = 6;
183
+ case 1:
184
+ _context2.n = 2;
186
185
  return this.manager.setOption("loading", true);
187
- case 6:
188
- _context2.next = 8;
186
+ case 2:
187
+ _context2.n = 3;
189
188
  return this.get_deltaObject();
190
- case 8:
191
- deltaObject = _context2.sent;
189
+ case 3:
190
+ deltaObject = _context2.v;
192
191
  putAction = "post";
193
- _context2.next = 12;
192
+ _context2.n = 4;
194
193
  return _WebObjectPathHelper["default"].get_path(this, this.isNew ? "new" : "save");
195
- case 12:
196
- usepath = _context2.sent;
194
+ case 4:
195
+ usepath = _context2.v;
197
196
  if ((0, _object.object_isEmpty)(deltaObject)) {
198
- _context2.next = 25;
197
+ _context2.n = 7;
199
198
  break;
200
199
  }
201
200
  canSaveResult = this.canSave(deltaObject);
202
201
  if (!(canSaveResult !== true)) {
203
- _context2.next = 19;
202
+ _context2.n = 5;
204
203
  break;
205
204
  }
206
205
  WebObject.addError(this, "Save not allowed", String(canSaveResult), true);
207
206
  this.setSaveResult(false, "canceled");
208
- return _context2.abrupt("return", false);
209
- case 19:
210
- _context2.next = 21;
207
+ return _context2.a(2, false);
208
+ case 5:
209
+ _context2.n = 6;
211
210
  return _global.gfunc.run_action(putAction, usepath, deltaObject);
212
- case 21:
213
- resultObject = _context2.sent;
211
+ case 6:
212
+ resultObject = _context2.v;
214
213
  this.setSaveResult(resultObject, "auto", true);
215
- _context2.next = 26;
214
+ _context2.n = 8;
216
215
  break;
217
- case 25:
216
+ case 7:
218
217
  /* nothing to save */
219
218
  this.setSaveResult(null, "nothing");
220
- case 26:
219
+ case 8:
221
220
  if (!this.isSaved) {
222
- _context2.next = 30;
221
+ _context2.n = 10;
223
222
  break;
224
223
  }
225
- _context2.next = 29;
224
+ _context2.n = 9;
226
225
  return this.onSave();
227
- case 29:
228
- return _context2.abrupt("return", this.getSaveResult());
229
- case 30:
230
- _context2.prev = 30;
226
+ case 9:
227
+ return _context2.a(2, this.getSaveResult());
228
+ case 10:
229
+ _context2.p = 10;
231
230
  if (!this.manager) {
232
- _context2.next = 36;
231
+ _context2.n = 12;
233
232
  break;
234
233
  }
235
- _context2.next = 34;
234
+ _context2.n = 11;
236
235
  return this.manager.setOption("saving", false);
237
- case 34:
238
- _context2.next = 36;
236
+ case 11:
237
+ _context2.n = 12;
239
238
  return this.manager.setOption("loading", false);
240
- case 36:
241
- return _context2.finish(30);
242
- case 37:
243
- case "end":
244
- return _context2.stop();
239
+ case 12:
240
+ return _context2.f(10);
241
+ case 13:
242
+ return _context2.a(2);
245
243
  }
246
- }, _callee2, this, [[0,, 30, 37]]);
244
+ }, _callee2, this, [[0,, 10, 13]]);
247
245
  }));
248
246
  function Save() {
249
247
  return _Save.apply(this, arguments);
@@ -253,33 +251,30 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
253
251
  }, {
254
252
  key: "Delete",
255
253
  value: function () {
256
- var _Delete = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
254
+ var _Delete = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
257
255
  var usepath, resultObject;
258
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
259
- while (1) switch (_context3.prev = _context3.next) {
256
+ return _regenerator().w(function (_context3) {
257
+ while (1) switch (_context3.n) {
260
258
  case 0:
261
259
  if (!this.isNew) {
262
- _context3.next = 2;
260
+ _context3.n = 1;
263
261
  break;
264
262
  }
265
- return _context3.abrupt("return");
266
- case 2:
267
- _context3.next = 4;
263
+ return _context3.a(2);
264
+ case 1:
265
+ _context3.n = 2;
268
266
  return _WebObjectPathHelper["default"].get_path(this, "delete");
269
- case 4:
270
- usepath = _context3.sent;
271
- _context3.next = 7;
267
+ case 2:
268
+ usepath = _context3.v;
269
+ _context3.n = 3;
272
270
  return _global.gfunc.run_action("delete", usepath);
273
- case 7:
274
- resultObject = _context3.sent;
271
+ case 3:
272
+ resultObject = _context3.v;
275
273
  this.setSaveResult(resultObject, "auto", true);
276
- _context3.next = 11;
274
+ _context3.n = 4;
277
275
  return this.onDelete();
278
- case 11:
279
- return _context3.abrupt("return", resultObject);
280
- case 12:
281
- case "end":
282
- return _context3.stop();
276
+ case 4:
277
+ return _context3.a(2, resultObject);
283
278
  }
284
279
  }, _callee3, this);
285
280
  }));
@@ -291,33 +286,30 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
291
286
  }, {
292
287
  key: "Lock",
293
288
  value: function () {
294
- var _Lock = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
289
+ var _Lock = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
295
290
  var usepath, resultObject;
296
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
297
- while (1) switch (_context4.prev = _context4.next) {
291
+ return _regenerator().w(function (_context4) {
292
+ while (1) switch (_context4.n) {
298
293
  case 0:
299
294
  if (!(this.isNew || this.isArchived)) {
300
- _context4.next = 2;
295
+ _context4.n = 1;
301
296
  break;
302
297
  }
303
- return _context4.abrupt("return");
304
- case 2:
305
- _context4.next = 4;
298
+ return _context4.a(2);
299
+ case 1:
300
+ _context4.n = 2;
306
301
  return _WebObjectPathHelper["default"].get_path(this, "lock");
307
- case 4:
308
- usepath = _context4.sent;
309
- _context4.next = 7;
302
+ case 2:
303
+ usepath = _context4.v;
304
+ _context4.n = 3;
310
305
  return _global.gfunc.run_action("post", usepath);
311
- case 7:
312
- resultObject = _context4.sent;
306
+ case 3:
307
+ resultObject = _context4.v;
313
308
  this.setSaveResult(resultObject, "auto", true);
314
- _context4.next = 11;
309
+ _context4.n = 4;
315
310
  return this.onLock();
316
- case 11:
317
- return _context4.abrupt("return", resultObject);
318
- case 12:
319
- case "end":
320
- return _context4.stop();
311
+ case 4:
312
+ return _context4.a(2, resultObject);
321
313
  }
322
314
  }, _callee4, this);
323
315
  }));
@@ -329,33 +321,30 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
329
321
  }, {
330
322
  key: "UnLock",
331
323
  value: function () {
332
- var _UnLock = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
324
+ var _UnLock = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5() {
333
325
  var usepath, resultObject;
334
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
335
- while (1) switch (_context5.prev = _context5.next) {
326
+ return _regenerator().w(function (_context5) {
327
+ while (1) switch (_context5.n) {
336
328
  case 0:
337
329
  if (!(this.isNew || this.isArchived)) {
338
- _context5.next = 2;
330
+ _context5.n = 1;
339
331
  break;
340
332
  }
341
- return _context5.abrupt("return");
342
- case 2:
343
- _context5.next = 4;
333
+ return _context5.a(2);
334
+ case 1:
335
+ _context5.n = 2;
344
336
  return _WebObjectPathHelper["default"].get_path(this, "unlock");
345
- case 4:
346
- usepath = _context5.sent;
347
- _context5.next = 7;
337
+ case 2:
338
+ usepath = _context5.v;
339
+ _context5.n = 3;
348
340
  return _global.gfunc.run_action("post", usepath);
349
- case 7:
350
- resultObject = _context5.sent;
341
+ case 3:
342
+ resultObject = _context5.v;
351
343
  this.setSaveResult(resultObject, "auto", true);
352
- _context5.next = 11;
344
+ _context5.n = 4;
353
345
  return this.onUnLock();
354
- case 11:
355
- return _context5.abrupt("return", resultObject);
356
- case 12:
357
- case "end":
358
- return _context5.stop();
346
+ case 4:
347
+ return _context5.a(2, resultObject);
359
348
  }
360
349
  }, _callee5, this);
361
350
  }));
@@ -367,33 +356,30 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
367
356
  }, {
368
357
  key: "Archive",
369
358
  value: function () {
370
- var _Archive = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
359
+ var _Archive = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6() {
371
360
  var usepath, resultObject;
372
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
373
- while (1) switch (_context6.prev = _context6.next) {
361
+ return _regenerator().w(function (_context6) {
362
+ while (1) switch (_context6.n) {
374
363
  case 0:
375
364
  if (!(this.isNew || this.isArchived)) {
376
- _context6.next = 2;
365
+ _context6.n = 1;
377
366
  break;
378
367
  }
379
- return _context6.abrupt("return");
380
- case 2:
381
- _context6.next = 4;
368
+ return _context6.a(2);
369
+ case 1:
370
+ _context6.n = 2;
382
371
  return _WebObjectPathHelper["default"].get_path(this, "archive");
383
- case 4:
384
- usepath = _context6.sent;
385
- _context6.next = 7;
372
+ case 2:
373
+ usepath = _context6.v;
374
+ _context6.n = 3;
386
375
  return _global.gfunc.run_action("post", usepath);
387
- case 7:
388
- resultObject = _context6.sent;
376
+ case 3:
377
+ resultObject = _context6.v;
389
378
  this.setSaveResult(resultObject, "auto", true);
390
- _context6.next = 11;
379
+ _context6.n = 4;
391
380
  return this.onArchive();
392
- case 11:
393
- return _context6.abrupt("return", resultObject);
394
- case 12:
395
- case "end":
396
- return _context6.stop();
381
+ case 4:
382
+ return _context6.a(2, resultObject);
397
383
  }
398
384
  }, _callee6, this);
399
385
  }));
@@ -405,32 +391,29 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
405
391
  }, {
406
392
  key: "UnArchive",
407
393
  value: function () {
408
- var _UnArchive = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
394
+ var _UnArchive = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7() {
409
395
  var usepath, resultObject;
410
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
411
- while (1) switch (_context7.prev = _context7.next) {
396
+ return _regenerator().w(function (_context7) {
397
+ while (1) switch (_context7.n) {
412
398
  case 0:
413
399
  if (!(this.isNew || !this.isArchived)) {
414
- _context7.next = 2;
400
+ _context7.n = 1;
415
401
  break;
416
402
  }
417
- return _context7.abrupt("return");
418
- case 2:
419
- _context7.next = 4;
403
+ return _context7.a(2);
404
+ case 1:
405
+ _context7.n = 2;
420
406
  return _WebObjectPathHelper["default"].get_path(this, "unarchive");
421
- case 4:
422
- usepath = _context7.sent;
423
- _context7.next = 7;
407
+ case 2:
408
+ usepath = _context7.v;
409
+ _context7.n = 3;
424
410
  return _global.gfunc.run_action("post", usepath);
425
- case 7:
426
- resultObject = _context7.sent;
427
- _context7.next = 10;
411
+ case 3:
412
+ resultObject = _context7.v;
413
+ _context7.n = 4;
428
414
  return this.onUnArchive();
429
- case 10:
430
- return _context7.abrupt("return", resultObject);
431
- case 11:
432
- case "end":
433
- return _context7.stop();
415
+ case 4:
416
+ return _context7.a(2, resultObject);
434
417
  }
435
418
  }, _callee7, this);
436
419
  }));
@@ -464,26 +447,26 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
464
447
  /* -------------------------------------------------------------------------- */
465
448
  /* get delta */
466
449
  /* -------------------------------------------------------------------------- */
467
- /**
468
- * converts this object to an basic object
469
- * that can be passed into client components from server components
470
- *
471
- * uses `get_fullDeltaObject`
472
- * @param p
473
- * @returns
450
+ /**
451
+ * converts this object to an basic object
452
+ * that can be passed into client components from server components
453
+ *
454
+ * uses `get_fullDeltaObject`
455
+ * @param p
456
+ * @returns
474
457
  */
475
458
  }, {
476
459
  key: "get_basicObject",
477
460
  value: (function () {
478
- var _get_basicObject = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
461
+ var _get_basicObject = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8() {
479
462
  var fullobject, key, element;
480
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
481
- while (1) switch (_context8.prev = _context8.next) {
463
+ return _regenerator().w(function (_context8) {
464
+ while (1) switch (_context8.n) {
482
465
  case 0:
483
- _context8.next = 2;
466
+ _context8.n = 1;
484
467
  return this.get_fullObject();
485
- case 2:
486
- fullobject = _context8.sent;
468
+ case 1:
469
+ fullobject = _context8.v;
487
470
  for (key in fullobject) {
488
471
  element = fullobject[key];
489
472
  /* --------------------------- check for id fields -------------------------- */
@@ -495,10 +478,7 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
495
478
  }
496
479
  }
497
480
  }
498
- return _context8.abrupt("return", fullobject);
499
- case 5:
500
- case "end":
501
- return _context8.stop();
481
+ return _context8.a(2, fullobject);
502
482
  }
503
483
  }, _callee8, this);
504
484
  }));
@@ -507,31 +487,28 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
507
487
  }
508
488
  return get_basicObject;
509
489
  }()
510
- /**
511
- * calls the `get_deltaObject` with
512
- * `allProperties` `extraProperties`
513
- * set to true
514
- *
515
- * @returns
490
+ /**
491
+ * calls the `get_deltaObject` with
492
+ * `allProperties` `extraProperties`
493
+ * set to true
494
+ *
495
+ * @returns
516
496
  */
517
497
  )
518
498
  }, {
519
499
  key: "get_fullDeltaObject",
520
500
  value: (function () {
521
- var _get_fullDeltaObject = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(p) {
522
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
523
- while (1) switch (_context9.prev = _context9.next) {
501
+ var _get_fullDeltaObject = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9(p) {
502
+ return _regenerator().w(function (_context9) {
503
+ while (1) switch (_context9.n) {
524
504
  case 0:
525
- _context9.next = 2;
505
+ _context9.n = 1;
526
506
  return this.get_deltaObject(_objectSpread({
527
507
  allProperties: true,
528
508
  extraProperties: true
529
509
  }, p));
530
- case 2:
531
- return _context9.abrupt("return", _context9.sent);
532
- case 3:
533
- case "end":
534
- return _context9.stop();
510
+ case 1:
511
+ return _context9.a(2, _context9.v);
535
512
  }
536
513
  }, _callee9, this);
537
514
  }));
@@ -540,32 +517,29 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
540
517
  }
541
518
  return get_fullDeltaObject;
542
519
  }()
543
- /**
544
- * calls the `get_deltaObject` with
545
- * `allProperties` `extraProperties` `tempProperties`
546
- * set to true
547
- *
548
- * @returns
520
+ /**
521
+ * calls the `get_deltaObject` with
522
+ * `allProperties` `extraProperties` `tempProperties`
523
+ * set to true
524
+ *
525
+ * @returns
549
526
  */
550
527
  )
551
528
  }, {
552
529
  key: "get_fullObject",
553
530
  value: (function () {
554
- var _get_fullObject = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee0(p) {
555
- return _regeneratorRuntime().wrap(function _callee0$(_context0) {
556
- while (1) switch (_context0.prev = _context0.next) {
531
+ var _get_fullObject = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0(p) {
532
+ return _regenerator().w(function (_context0) {
533
+ while (1) switch (_context0.n) {
557
534
  case 0:
558
- _context0.next = 2;
535
+ _context0.n = 1;
559
536
  return this.get_deltaObject(_objectSpread({
560
537
  allProperties: true,
561
538
  extraProperties: true,
562
539
  tempProperties: true
563
540
  }, p));
564
- case 2:
565
- return _context0.abrupt("return", _context0.sent);
566
- case 3:
567
- case "end":
568
- return _context0.stop();
541
+ case 1:
542
+ return _context0.a(2, _context0.v);
569
543
  }
570
544
  }, _callee0, this);
571
545
  }));
@@ -574,49 +548,46 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
574
548
  }
575
549
  return get_fullObject;
576
550
  }()
577
- /**
578
- * You will post this to the server for saving
579
- * automatically removes unchangeable fields
580
- * @returns
551
+ /**
552
+ * You will post this to the server for saving
553
+ * automatically removes unchangeable fields
554
+ * @returns
581
555
  */
582
556
  )
583
557
  }, {
584
558
  key: "get_deltaObject",
585
559
  value: (function () {
586
- var _get_deltaObject = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(p) {
587
- var final_object, useDelta, changedFields, key, changeableKeys, functionProps, index, fp, parseObj, _parseObj, _iterator, _step, _key, gotIndex, gotId, tempusers;
588
- return _regeneratorRuntime().wrap(function _callee11$(_context11) {
589
- while (1) switch (_context11.prev = _context11.next) {
560
+ var _get_deltaObject = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee11(p) {
561
+ var final_object, useDelta, changedFields, key, changeableKeys, functionProps, index, fp, parseObj, _parseObj, _iterator, _step, _key, gotIndex, gotId, tempusers, _t, _t2, _t3;
562
+ return _regenerator().w(function (_context11) {
563
+ while (1) switch (_context11.p = _context11.n) {
590
564
  case 0:
591
565
  _parseObj = function _parseObj3() {
592
- _parseObj = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(key, obj) {
566
+ _parseObj = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee10(key, obj) {
593
567
  var _p, _child_changeableKeys, keydot, child_changeableKeys, newobj_dlt;
594
- return _regeneratorRuntime().wrap(function _callee10$(_context10) {
595
- while (1) switch (_context10.prev = _context10.next) {
568
+ return _regenerator().w(function (_context10) {
569
+ while (1) switch (_context10.n) {
596
570
  case 0:
597
571
  if (!(obj == null)) {
598
- _context10.next = 2;
572
+ _context10.n = 1;
599
573
  break;
600
574
  }
601
- return _context10.abrupt("return", undefined);
602
- case 2:
575
+ return _context10.a(2, undefined);
576
+ case 1:
603
577
  if (!Array.isArray(obj)) {
604
- _context10.next = 6;
578
+ _context10.n = 3;
605
579
  break;
606
580
  }
607
- _context10.next = 5;
581
+ _context10.n = 2;
608
582
  return Promise.all(obj.map(/*#__PURE__*/function () {
609
- var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee1(r, i) {
610
- return _regeneratorRuntime().wrap(function _callee1$(_context1) {
611
- while (1) switch (_context1.prev = _context1.next) {
583
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1(r, i) {
584
+ return _regenerator().w(function (_context1) {
585
+ while (1) switch (_context1.n) {
612
586
  case 0:
613
- _context1.next = 2;
587
+ _context1.n = 1;
614
588
  return parseObj(key, r);
615
- case 2:
616
- return _context1.abrupt("return", _context1.sent);
617
- case 3:
618
- case "end":
619
- return _context1.stop();
589
+ case 1:
590
+ return _context1.a(2, _context1.v);
620
591
  }
621
592
  }, _callee1);
622
593
  }));
@@ -624,11 +595,11 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
624
595
  return _ref.apply(this, arguments);
625
596
  };
626
597
  }()));
627
- case 5:
628
- return _context10.abrupt("return", _context10.sent);
629
- case 6:
598
+ case 2:
599
+ return _context10.a(2, _context10.v);
600
+ case 3:
630
601
  if (!(obj instanceof WebObject && typeof obj.get_deltaObject === "function")) {
631
- _context10.next = 18;
602
+ _context10.n = 6;
632
603
  break;
633
604
  }
634
605
  /* -------------------- parse changeableKeys for children -------------------- */
@@ -638,34 +609,31 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
638
609
  }).map(function (r) {
639
610
  return r.substring(keydot.length);
640
611
  });
641
- /**
642
- * if no key is set for children consider it as undefined
643
- * if we send the empty array to get_delta we get no keys
612
+ /**
613
+ * if no key is set for children consider it as undefined
614
+ * if we send the empty array to get_delta we get no keys
644
615
  */
645
616
  if (child_changeableKeys == null || ((_child_changeableKeys = child_changeableKeys) === null || _child_changeableKeys === void 0 ? void 0 : _child_changeableKeys.length) === 0) {
646
617
  child_changeableKeys = undefined;
647
618
  }
648
619
  /* -------------------------------------------------------------------------- */
649
620
  //child elements have different kind of delta
650
- _context10.next = 12;
621
+ _context10.n = 4;
651
622
  return obj.get_deltaObject(_objectSpread(_objectSpread({}, p), {}, {
652
623
  isChild: true,
653
624
  changeableKeys: child_changeableKeys
654
625
  }));
655
- case 12:
656
- newobj_dlt = _context10.sent;
626
+ case 4:
627
+ newobj_dlt = _context10.v;
657
628
  if ((0, _object.object_isEmpty)(newobj_dlt)) {
658
- _context10.next = 17;
629
+ _context10.n = 5;
659
630
  break;
660
631
  }
661
- return _context10.abrupt("return", newobj_dlt);
662
- case 17:
663
- return _context10.abrupt("return", obj);
664
- case 18:
665
- return _context10.abrupt("return", obj);
666
- case 19:
667
- case "end":
668
- return _context10.stop();
632
+ return _context10.a(2, newobj_dlt);
633
+ case 5:
634
+ return _context10.a(2, obj);
635
+ case 6:
636
+ return _context10.a(2, obj);
669
637
  }
670
638
  }, _callee10);
671
639
  }));
@@ -677,43 +645,43 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
677
645
  if (!p) p = {};
678
646
  final_object = {};
679
647
  useDelta = Boolean(this.__use_delta || p.useDelta);
680
- /**
681
- * child objects usually dont update their __delta
682
- * so we read info from all of its properties
648
+ /**
649
+ * child objects usually dont update their __delta
650
+ * so we read info from all of its properties
683
651
  */
684
- changedFields = Boolean(p.allProperties || p.isChild || !useDelta) ? _objectSpread({}, this.allproperties) : _objectSpread({}, this.__delta);
652
+ changedFields = p.allProperties || p.isChild || !useDelta ? _objectSpread({}, this.allproperties) : _objectSpread({}, this.__delta);
685
653
  /* ------------- parse children that have WebObject as delta ------------- */
686
- _context11.t0 = _regeneratorRuntime().keys(this);
687
- case 7:
688
- if ((_context11.t1 = _context11.t0()).done) {
689
- _context11.next = 14;
654
+ _t = _regeneratorKeys(this);
655
+ case 1:
656
+ if ((_t2 = _t()).done) {
657
+ _context11.n = 3;
690
658
  break;
691
659
  }
692
- key = _context11.t1.value;
660
+ key = _t2.value;
693
661
  if (!(key.startsWith("__") || key in changedFields)) {
694
- _context11.next = 11;
662
+ _context11.n = 2;
695
663
  break;
696
664
  }
697
- return _context11.abrupt("continue", 7);
698
- case 11:
665
+ return _context11.a(3, 1);
666
+ case 2:
699
667
  if (_WebObjectHelper["default"].isChangedWebObjectField(this[key])) {
700
- /**
701
- * if a child has any change we must add it into our delta
702
- * notice that the changes may not be saved to database depending on __changeables
703
- * but they are changes nevertheless
668
+ /**
669
+ * if a child has any change we must add it into our delta
670
+ * notice that the changes may not be saved to database depending on __changeables
671
+ * but they are changes nevertheless
704
672
  */
705
673
  changedFields[key] = this[key];
706
674
  }
707
- _context11.next = 7;
675
+ _context11.n = 1;
708
676
  break;
709
- case 14:
710
- /**
711
- * get keys that can be changed.
712
- * intersection of keys in delta and keys that are defined as changeable
677
+ case 3:
678
+ /**
679
+ * get keys that can be changed.
680
+ * intersection of keys in delta and keys that are defined as changeable
713
681
  */
714
682
  changeableKeys = (0, _object.array_intersection)(Object.keys(changedFields), WebObject.getChangeableKeys(this, p));
715
- /**
716
- * if parameter of changeableKeys is given, limit our keys with that param
683
+ /**
684
+ * if parameter of changeableKeys is given, limit our keys with that param
717
685
  */
718
686
  if (p.changeableKeys) {
719
687
  changeableKeys = (0, _object.array_intersection)(changeableKeys, p.changeableKeys);
@@ -739,33 +707,33 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
739
707
  /* parse all changeableKeys */
740
708
  /* -------------------------------------------------------------------------- */
741
709
  _iterator = _createForOfIteratorHelper(changeableKeys);
742
- _context11.prev = 20;
710
+ _context11.p = 4;
743
711
  _iterator.s();
744
- case 22:
712
+ case 5:
745
713
  if ((_step = _iterator.n()).done) {
746
- _context11.next = 29;
714
+ _context11.n = 8;
747
715
  break;
748
716
  }
749
717
  _key = _step.value;
750
- _context11.next = 26;
718
+ _context11.n = 6;
751
719
  return parseObj(_key, changedFields[_key]);
752
- case 26:
753
- final_object[_key] = _context11.sent;
754
- case 27:
755
- _context11.next = 22;
720
+ case 6:
721
+ final_object[_key] = _context11.v;
722
+ case 7:
723
+ _context11.n = 5;
756
724
  break;
757
- case 29:
758
- _context11.next = 34;
725
+ case 8:
726
+ _context11.n = 10;
759
727
  break;
760
- case 31:
761
- _context11.prev = 31;
762
- _context11.t2 = _context11["catch"](20);
763
- _iterator.e(_context11.t2);
764
- case 34:
765
- _context11.prev = 34;
728
+ case 9:
729
+ _context11.p = 9;
730
+ _t3 = _context11.v;
731
+ _iterator.e(_t3);
732
+ case 10:
733
+ _context11.p = 10;
766
734
  _iterator.f();
767
- return _context11.finish(34);
768
- case 37:
735
+ return _context11.f(10);
736
+ case 11:
769
737
  /* -------------------- add acrhived and date properties -------------------- */
770
738
  if (p.allProperties) {
771
739
  final_object["_created_date"] = this["_created_date"];
@@ -794,17 +762,14 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
794
762
  final_object["_users"] = (0, _object.wrap_array)(tempusers);
795
763
  }
796
764
  if (!p.clean) {
797
- _context11.next = 43;
765
+ _context11.n = 12;
798
766
  break;
799
767
  }
800
- return _context11.abrupt("return", (0, _object.object_clean)(final_object, false, true));
801
- case 43:
802
- return _context11.abrupt("return", final_object);
803
- case 44:
804
- case "end":
805
- return _context11.stop();
768
+ return _context11.a(2, (0, _object.object_clean)(final_object, false, true));
769
+ case 12:
770
+ return _context11.a(2, final_object);
806
771
  }
807
- }, _callee11, this, [[20, 31, 34, 37]]);
772
+ }, _callee11, this, [[4, 9, 10, 11]]);
808
773
  }));
809
774
  function get_deltaObject(_x5) {
810
775
  return _get_deltaObject.apply(this, arguments);
@@ -829,26 +794,23 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
829
794
  }, {
830
795
  key: "onDelete",
831
796
  value: (/* -------------------------------------------------------------------------- */function () {
832
- var _onDelete = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
797
+ var _onDelete = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee12() {
833
798
  var _this$manager;
834
799
  var _len,
835
800
  p,
836
801
  _key2,
837
802
  _args12 = arguments;
838
- return _regeneratorRuntime().wrap(function _callee12$(_context12) {
839
- while (1) switch (_context12.prev = _context12.next) {
803
+ return _regenerator().w(function (_context12) {
804
+ while (1) switch (_context12.n) {
840
805
  case 0:
841
806
  if (this.isSaved) this.isDeleted = true;
842
807
  for (_len = _args12.length, p = new Array(_len), _key2 = 0; _key2 < _len; _key2++) {
843
808
  p[_key2] = _args12[_key2];
844
809
  }
845
- _context12.next = 4;
810
+ _context12.n = 1;
846
811
  return (_this$manager = this.manager) === null || _this$manager === void 0 ? void 0 : _this$manager.onDelete.apply(_this$manager, p);
847
- case 4:
848
- return _context12.abrupt("return", _context12.sent);
849
- case 5:
850
- case "end":
851
- return _context12.stop();
812
+ case 1:
813
+ return _context12.a(2, _context12.v);
852
814
  }
853
815
  }, _callee12, this);
854
816
  }));
@@ -860,26 +822,23 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
860
822
  }, {
861
823
  key: "onArchive",
862
824
  value: function () {
863
- var _onArchive = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
825
+ var _onArchive = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee13() {
864
826
  var _this$manager2;
865
827
  var _len2,
866
828
  p,
867
829
  _key3,
868
830
  _args13 = arguments;
869
- return _regeneratorRuntime().wrap(function _callee13$(_context13) {
870
- while (1) switch (_context13.prev = _context13.next) {
831
+ return _regenerator().w(function (_context13) {
832
+ while (1) switch (_context13.n) {
871
833
  case 0:
872
834
  if (this.isSaved) this.isArchived = true;
873
835
  for (_len2 = _args13.length, p = new Array(_len2), _key3 = 0; _key3 < _len2; _key3++) {
874
836
  p[_key3] = _args13[_key3];
875
837
  }
876
- _context13.next = 4;
838
+ _context13.n = 1;
877
839
  return (_this$manager2 = this.manager) === null || _this$manager2 === void 0 ? void 0 : _this$manager2.onArchive.apply(_this$manager2, p);
878
- case 4:
879
- return _context13.abrupt("return", _context13.sent);
880
- case 5:
881
- case "end":
882
- return _context13.stop();
840
+ case 1:
841
+ return _context13.a(2, _context13.v);
883
842
  }
884
843
  }, _callee13, this);
885
844
  }));
@@ -891,26 +850,23 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
891
850
  }, {
892
851
  key: "onUnArchive",
893
852
  value: function () {
894
- var _onUnArchive = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
853
+ var _onUnArchive = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee14() {
895
854
  var _this$manager3;
896
855
  var _len3,
897
856
  p,
898
857
  _key4,
899
858
  _args14 = arguments;
900
- return _regeneratorRuntime().wrap(function _callee14$(_context14) {
901
- while (1) switch (_context14.prev = _context14.next) {
859
+ return _regenerator().w(function (_context14) {
860
+ while (1) switch (_context14.n) {
902
861
  case 0:
903
862
  if (this.isSaved) this.isArchived = false;
904
863
  for (_len3 = _args14.length, p = new Array(_len3), _key4 = 0; _key4 < _len3; _key4++) {
905
864
  p[_key4] = _args14[_key4];
906
865
  }
907
- _context14.next = 4;
866
+ _context14.n = 1;
908
867
  return (_this$manager3 = this.manager) === null || _this$manager3 === void 0 ? void 0 : _this$manager3.onUnArchive.apply(_this$manager3, p);
909
- case 4:
910
- return _context14.abrupt("return", _context14.sent);
911
- case 5:
912
- case "end":
913
- return _context14.stop();
868
+ case 1:
869
+ return _context14.a(2, _context14.v);
914
870
  }
915
871
  }, _callee14, this);
916
872
  }));
@@ -922,26 +878,23 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
922
878
  }, {
923
879
  key: "onLock",
924
880
  value: function () {
925
- var _onLock = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
881
+ var _onLock = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee15() {
926
882
  var _this$manager4;
927
883
  var _len4,
928
884
  p,
929
885
  _key5,
930
886
  _args15 = arguments;
931
- return _regeneratorRuntime().wrap(function _callee15$(_context15) {
932
- while (1) switch (_context15.prev = _context15.next) {
887
+ return _regenerator().w(function (_context15) {
888
+ while (1) switch (_context15.n) {
933
889
  case 0:
934
890
  if (this.isSaved) this.isLocked = true;
935
891
  for (_len4 = _args15.length, p = new Array(_len4), _key5 = 0; _key5 < _len4; _key5++) {
936
892
  p[_key5] = _args15[_key5];
937
893
  }
938
- _context15.next = 4;
894
+ _context15.n = 1;
939
895
  return (_this$manager4 = this.manager) === null || _this$manager4 === void 0 ? void 0 : _this$manager4.onLock.apply(_this$manager4, p);
940
- case 4:
941
- return _context15.abrupt("return", _context15.sent);
942
- case 5:
943
- case "end":
944
- return _context15.stop();
896
+ case 1:
897
+ return _context15.a(2, _context15.v);
945
898
  }
946
899
  }, _callee15, this);
947
900
  }));
@@ -953,26 +906,23 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
953
906
  }, {
954
907
  key: "onUnLock",
955
908
  value: function () {
956
- var _onUnLock = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
909
+ var _onUnLock = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee16() {
957
910
  var _this$manager5;
958
911
  var _len5,
959
912
  p,
960
913
  _key6,
961
914
  _args16 = arguments;
962
- return _regeneratorRuntime().wrap(function _callee16$(_context16) {
963
- while (1) switch (_context16.prev = _context16.next) {
915
+ return _regenerator().w(function (_context16) {
916
+ while (1) switch (_context16.n) {
964
917
  case 0:
965
918
  if (this.isSaved) this.isLocked = false;
966
919
  for (_len5 = _args16.length, p = new Array(_len5), _key6 = 0; _key6 < _len5; _key6++) {
967
920
  p[_key6] = _args16[_key6];
968
921
  }
969
- _context16.next = 4;
922
+ _context16.n = 1;
970
923
  return (_this$manager5 = this.manager) === null || _this$manager5 === void 0 ? void 0 : _this$manager5.onUnLock.apply(_this$manager5, p);
971
- case 4:
972
- return _context16.abrupt("return", _context16.sent);
973
- case 5:
974
- case "end":
975
- return _context16.stop();
924
+ case 1:
925
+ return _context16.a(2, _context16.v);
976
926
  }
977
927
  }, _callee16, this);
978
928
  }));
@@ -984,26 +934,23 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
984
934
  }, {
985
935
  key: "onLoad",
986
936
  value: function () {
987
- var _onLoad = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
937
+ var _onLoad = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee17() {
988
938
  var _this$manager6;
989
939
  var _len6,
990
940
  p,
991
941
  _key7,
992
942
  _args17 = arguments;
993
- return _regeneratorRuntime().wrap(function _callee17$(_context17) {
994
- while (1) switch (_context17.prev = _context17.next) {
943
+ return _regenerator().w(function (_context17) {
944
+ while (1) switch (_context17.n) {
995
945
  case 0:
996
946
  this.isDeleted = false;
997
947
  for (_len6 = _args17.length, p = new Array(_len6), _key7 = 0; _key7 < _len6; _key7++) {
998
948
  p[_key7] = _args17[_key7];
999
949
  }
1000
- _context17.next = 4;
950
+ _context17.n = 1;
1001
951
  return (_this$manager6 = this.manager) === null || _this$manager6 === void 0 ? void 0 : _this$manager6.onLoad.apply(_this$manager6, p);
1002
- case 4:
1003
- return _context17.abrupt("return", _context17.sent);
1004
- case 5:
1005
- case "end":
1006
- return _context17.stop();
952
+ case 1:
953
+ return _context17.a(2, _context17.v);
1007
954
  }
1008
955
  }, _callee17, this);
1009
956
  }));
@@ -1015,7 +962,7 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
1015
962
  }, {
1016
963
  key: "onSave",
1017
964
  value: function () {
1018
- var _onSave = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
965
+ var _onSave = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee18() {
1019
966
  var _this$manager8;
1020
967
  var srObject,
1021
968
  _this$manager7,
@@ -1023,37 +970,34 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
1023
970
  p,
1024
971
  _key8,
1025
972
  _args18 = arguments;
1026
- return _regeneratorRuntime().wrap(function _callee18$(_context18) {
1027
- while (1) switch (_context18.prev = _context18.next) {
973
+ return _regenerator().w(function (_context18) {
974
+ while (1) switch (_context18.n) {
1028
975
  case 0:
1029
976
  if (!this.isSaved) {
1030
- _context18.next = 7;
977
+ _context18.n = 1;
1031
978
  break;
1032
979
  }
1033
980
  this.apply_changes();
1034
981
  srObject = this.getSaveResult(true);
1035
982
  if (!this.saveResultHasID(srObject)) {
1036
- _context18.next = 7;
983
+ _context18.n = 1;
1037
984
  break;
1038
985
  }
1039
986
  /* -------------------------------------------------------------------------- */
1040
987
  WebObject.LoadIdsFromSaveResult(this, srObject);
1041
- _context18.next = 7;
988
+ _context18.n = 1;
1042
989
  return (_this$manager7 = this.manager) === null || _this$manager7 === void 0 ? void 0 : _this$manager7.event_run("on_id_change");
1043
- case 7:
990
+ case 1:
1044
991
  for (_len7 = _args18.length, p = new Array(_len7), _key8 = 0; _key8 < _len7; _key8++) {
1045
992
  p[_key8] = _args18[_key8];
1046
993
  }
1047
- _context18.next = 10;
994
+ _context18.n = 2;
1048
995
  return (_this$manager8 = this.manager) === null || _this$manager8 === void 0 ? void 0 : _this$manager8.onSave.apply(_this$manager8, p);
1049
- case 10:
1050
- _context18.next = 12;
996
+ case 2:
997
+ _context18.n = 3;
1051
998
  return this.onAfterSave();
1052
- case 12:
1053
- return _context18.abrupt("return", true);
1054
- case 13:
1055
- case "end":
1056
- return _context18.stop();
999
+ case 3:
1000
+ return _context18.a(2, true);
1057
1001
  }
1058
1002
  }, _callee18, this);
1059
1003
  }));
@@ -1065,25 +1009,22 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
1065
1009
  }, {
1066
1010
  key: "onAfterSave",
1067
1011
  value: function () {
1068
- var _onAfterSave = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
1012
+ var _onAfterSave = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee19() {
1069
1013
  var _this$manager9;
1070
1014
  var _len8,
1071
1015
  p,
1072
1016
  _key9,
1073
1017
  _args19 = arguments;
1074
- return _regeneratorRuntime().wrap(function _callee19$(_context19) {
1075
- while (1) switch (_context19.prev = _context19.next) {
1018
+ return _regenerator().w(function (_context19) {
1019
+ while (1) switch (_context19.n) {
1076
1020
  case 0:
1077
1021
  for (_len8 = _args19.length, p = new Array(_len8), _key9 = 0; _key9 < _len8; _key9++) {
1078
1022
  p[_key9] = _args19[_key9];
1079
1023
  }
1080
- _context19.next = 3;
1024
+ _context19.n = 1;
1081
1025
  return (_this$manager9 = this.manager) === null || _this$manager9 === void 0 ? void 0 : _this$manager9.onAfterSave.apply(_this$manager9, p);
1082
- case 3:
1083
- return _context19.abrupt("return", true);
1084
- case 4:
1085
- case "end":
1086
- return _context19.stop();
1026
+ case 1:
1027
+ return _context19.a(2, true);
1087
1028
  }
1088
1029
  }, _callee19, this);
1089
1030
  }));
@@ -1110,25 +1051,22 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
1110
1051
  }, {
1111
1052
  key: "onNew",
1112
1053
  value: function () {
1113
- var _onNew = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee20() {
1054
+ var _onNew = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee20() {
1114
1055
  var _this$manager0;
1115
1056
  var _len9,
1116
1057
  p,
1117
1058
  _key0,
1118
1059
  _args20 = arguments;
1119
- return _regeneratorRuntime().wrap(function _callee20$(_context20) {
1120
- while (1) switch (_context20.prev = _context20.next) {
1060
+ return _regenerator().w(function (_context20) {
1061
+ while (1) switch (_context20.n) {
1121
1062
  case 0:
1122
1063
  for (_len9 = _args20.length, p = new Array(_len9), _key0 = 0; _key0 < _len9; _key0++) {
1123
1064
  p[_key0] = _args20[_key0];
1124
1065
  }
1125
- _context20.next = 3;
1066
+ _context20.n = 1;
1126
1067
  return (_this$manager0 = this.manager) === null || _this$manager0 === void 0 ? void 0 : _this$manager0.onNew.apply(_this$manager0, p);
1127
- case 3:
1128
- return _context20.abrupt("return", _context20.sent);
1129
- case 4:
1130
- case "end":
1131
- return _context20.stop();
1068
+ case 1:
1069
+ return _context20.a(2, _context20.v);
1132
1070
  }
1133
1071
  }, _callee20, this);
1134
1072
  }));
@@ -1186,7 +1124,7 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
1186
1124
  }, {
1187
1125
  key: "saveList",
1188
1126
  value: function () {
1189
- var _saveList = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee21(itemList) {
1127
+ var _saveList = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee21(itemList) {
1190
1128
  var _extraOptions$chunksi;
1191
1129
  var extraOptions,
1192
1130
  chunks,
@@ -1204,8 +1142,8 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
1204
1142
  _index2,
1205
1143
  _item2,
1206
1144
  _args21 = arguments;
1207
- return _regeneratorRuntime().wrap(function _callee21$(_context21) {
1208
- while (1) switch (_context21.prev = _context21.next) {
1145
+ return _regenerator().w(function (_context21) {
1146
+ while (1) switch (_context21.n) {
1209
1147
  case 0:
1210
1148
  extraOptions = _args21.length > 1 && _args21[1] !== undefined ? _args21[1] : {};
1211
1149
  if (!extraOptions) extraOptions = {};
@@ -1213,89 +1151,86 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
1213
1151
  delete extraOptions.chunksize;
1214
1152
  putAddress = this.get_webpath();
1215
1153
  index = 0;
1216
- case 6:
1154
+ case 1:
1217
1155
  if (!(index < chunks.length)) {
1218
- _context21.next = 36;
1156
+ _context21.n = 10;
1219
1157
  break;
1220
1158
  }
1221
1159
  items_to_save = chunks[index];
1222
1160
  save_array = [];
1223
1161
  k = 0;
1224
- case 10:
1162
+ case 2:
1225
1163
  if (!(k < items_to_save.length)) {
1226
- _context21.next = 19;
1164
+ _context21.n = 5;
1227
1165
  break;
1228
1166
  }
1229
1167
  item = items_to_save[k];
1230
- _context21.next = 14;
1168
+ _context21.n = 3;
1231
1169
  return item.get_deltaObject();
1232
- case 14:
1233
- dlt = _context21.sent;
1170
+ case 3:
1171
+ dlt = _context21.v;
1234
1172
  save_array.push(item.isNew ? _objectSpread({}, dlt) : _objectSpread({
1235
1173
  _id: item.getID()
1236
1174
  }, dlt));
1237
- case 16:
1175
+ case 4:
1238
1176
  k++;
1239
- _context21.next = 10;
1177
+ _context21.n = 2;
1240
1178
  break;
1241
- case 19:
1242
- _context21.next = 21;
1179
+ case 5:
1180
+ _context21.n = 6;
1243
1181
  return _global.gfunc.run_action("post", putAddress, _objectSpread({
1244
1182
  __save_list: WebObject.zipSaveList(save_array)
1245
1183
  }, extraOptions));
1246
- case 21:
1247
- resultObject = _context21.sent;
1184
+ case 6:
1185
+ resultObject = _context21.v;
1248
1186
  if (!Array.isArray(resultObject)) {
1249
- _context21.next = 33;
1187
+ _context21.n = 9;
1250
1188
  break;
1251
1189
  }
1252
1190
  _index = 0;
1253
- case 24:
1191
+ case 7:
1254
1192
  if (!(_index < Math.min(resultObject.length, items_to_save.length))) {
1255
- _context21.next = 33;
1193
+ _context21.n = 9;
1256
1194
  break;
1257
1195
  }
1258
1196
  res = resultObject[_index];
1259
1197
  _item = items_to_save[_index];
1260
1198
  _item.setSaveResult(res);
1261
- _context21.next = 30;
1199
+ _context21.n = 8;
1262
1200
  return _item.onSave();
1263
- case 30:
1201
+ case 8:
1264
1202
  _index++;
1265
- _context21.next = 24;
1203
+ _context21.n = 7;
1266
1204
  break;
1267
- case 33:
1205
+ case 9:
1268
1206
  index++;
1269
- _context21.next = 6;
1207
+ _context21.n = 1;
1270
1208
  break;
1271
- case 36:
1209
+ case 10:
1272
1210
  _index2 = 0;
1273
- case 37:
1211
+ case 11:
1274
1212
  if (!(_index2 < itemList.length)) {
1275
- _context21.next = 46;
1213
+ _context21.n = 14;
1276
1214
  break;
1277
1215
  }
1278
1216
  _item2 = itemList[_index2];
1279
1217
  if (_item2.isSaved) {
1280
- _context21.next = 41;
1218
+ _context21.n = 12;
1281
1219
  break;
1282
1220
  }
1283
- return _context21.abrupt("return", false);
1284
- case 41:
1221
+ return _context21.a(2, false);
1222
+ case 12:
1285
1223
  if (!(_item2.getSaveResultType() != "normal")) {
1286
- _context21.next = 43;
1224
+ _context21.n = 13;
1287
1225
  break;
1288
1226
  }
1289
- return _context21.abrupt("return", false);
1290
- case 43:
1227
+ return _context21.a(2, false);
1228
+ case 13:
1291
1229
  _index2++;
1292
- _context21.next = 37;
1230
+ _context21.n = 11;
1293
1231
  break;
1294
- case 46:
1295
- return _context21.abrupt("return", true);
1296
- case 47:
1297
- case "end":
1298
- return _context21.stop();
1232
+ case 14:
1233
+ return _context21.a(2, true);
1299
1234
  }
1300
1235
  }, _callee21, this);
1301
1236
  }));
@@ -1320,11 +1255,11 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
1320
1255
  if (_typeof(s) !== "object" || s == null || !s) return false;
1321
1256
  return s.insertedId || s._id || s._index_value && !Number.isNaN(s._index_value);
1322
1257
  }
1323
- /**
1324
- * Load Id and _index_value from the given save result into our object
1325
- * @param o
1326
- * @param srObject
1327
- * @returns
1258
+ /**
1259
+ * Load Id and _index_value from the given save result into our object
1260
+ * @param o
1261
+ * @param srObject
1262
+ * @returns
1328
1263
  */
1329
1264
  }, {
1330
1265
  key: "LoadIdsFromSaveResult",
@@ -1345,14 +1280,14 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
1345
1280
  }
1346
1281
  }
1347
1282
  /* -------------------------------------------------------------------------- */
1348
- /**
1349
- * get a single web object
1350
- * default order of parameters : search,readonly,fetchID
1283
+ /**
1284
+ * get a single web object
1285
+ * default order of parameters : search,readonly,fetchID
1351
1286
  */
1352
1287
  }, {
1353
1288
  key: "get_single",
1354
1289
  value: (function () {
1355
- var _get_single = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee22() {
1290
+ var _get_single = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee22() {
1356
1291
  var _p$shift;
1357
1292
  var _len0,
1358
1293
  p,
@@ -1362,9 +1297,10 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
1362
1297
  fetchID,
1363
1298
  result,
1364
1299
  params,
1365
- _args22 = arguments;
1366
- return _regeneratorRuntime().wrap(function _callee22$(_context22) {
1367
- while (1) switch (_context22.prev = _context22.next) {
1300
+ _args22 = arguments,
1301
+ _t4;
1302
+ return _regenerator().w(function (_context22) {
1303
+ while (1) switch (_context22.n) {
1368
1304
  case 0:
1369
1305
  for (_len0 = _args22.length, p = new Array(_len0), _key1 = 0; _key1 < _len0; _key1++) {
1370
1306
  p[_key1] = _args22[_key1];
@@ -1373,17 +1309,17 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
1373
1309
  readonly = (_p$shift = p.shift()) !== null && _p$shift !== void 0 ? _p$shift : false;
1374
1310
  fetchID = p.shift();
1375
1311
  if (!(0, _object.object_isEmpty)(search)) {
1376
- _context22.next = 6;
1312
+ _context22.n = 1;
1377
1313
  break;
1378
1314
  }
1379
- return _context22.abrupt("return", undefined);
1380
- case 6:
1315
+ return _context22.a(2, undefined);
1316
+ case 1:
1381
1317
  params = {};
1382
1318
  params.__context = readonly ? "view" : "edit";
1383
- _context22.t0 = _typeof(search);
1384
- _context22.next = _context22.t0 === "string" ? 11 : _context22.t0 === "number" ? 11 : _context22.t0 === "object" ? 16 : 16;
1319
+ _t4 = _typeof(search);
1320
+ _context22.n = _t4 === "string" ? 2 : _t4 === "number" ? 2 : _t4 === "object" ? 4 : 4;
1385
1321
  break;
1386
- case 11:
1322
+ case 2:
1387
1323
  search = String(search);
1388
1324
  // const usepath =
1389
1325
  // (await WebObjectPathHelper.get_path(this, "get")) +
@@ -1392,29 +1328,26 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
1392
1328
  // res = await gfunc.run_action("get", usepath, params, {
1393
1329
  // fetchID: fetchID,
1394
1330
  // });
1395
- _context22.next = 14;
1331
+ _context22.n = 3;
1396
1332
  return this.get_list({
1397
1333
  __searchid: search
1398
1334
  }, readonly, fetchID);
1399
- case 14:
1400
- result = _context22.sent;
1401
- return _context22.abrupt("break", 20);
1402
- case 16:
1403
- _context22.next = 18;
1335
+ case 3:
1336
+ result = _context22.v;
1337
+ return _context22.a(3, 6);
1338
+ case 4:
1339
+ _context22.n = 5;
1404
1340
  return this.get_list(search, readonly, fetchID);
1405
- case 18:
1406
- result = _context22.sent;
1407
- return _context22.abrupt("break", 20);
1408
- case 20:
1341
+ case 5:
1342
+ result = _context22.v;
1343
+ return _context22.a(3, 6);
1344
+ case 6:
1409
1345
  if (result) result = (0, _object.array_first)(result);
1410
1346
  if (!(0, _object.object_isEmpty)(result)) {
1411
1347
  result = this.ensure(this, result);
1412
1348
  WebObject.setReadonly(result, readonly);
1413
1349
  }
1414
- return _context22.abrupt("return", result);
1415
- case 23:
1416
- case "end":
1417
- return _context22.stop();
1350
+ return _context22.a(2, result);
1418
1351
  }
1419
1352
  }, _callee22, this);
1420
1353
  }));
@@ -1423,15 +1356,15 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
1423
1356
  }
1424
1357
  return get_single;
1425
1358
  }()
1426
- /**
1427
- * Get a list of web objects
1428
- * default order of parameters : search,readonly,fetchID
1359
+ /**
1360
+ * Get a list of web objects
1361
+ * default order of parameters : search,readonly,fetchID
1429
1362
  */
1430
1363
  )
1431
1364
  }, {
1432
1365
  key: "get_list",
1433
1366
  value: (function () {
1434
- var _get_list = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee23() {
1367
+ var _get_list = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee23() {
1435
1368
  var _p$shift2;
1436
1369
  var _len1,
1437
1370
  p,
@@ -1443,8 +1376,8 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
1443
1376
  result_items,
1444
1377
  res,
1445
1378
  _args23 = arguments;
1446
- return _regeneratorRuntime().wrap(function _callee23$(_context23) {
1447
- while (1) switch (_context23.prev = _context23.next) {
1379
+ return _regenerator().w(function (_context23) {
1380
+ while (1) switch (_context23.n) {
1448
1381
  case 0:
1449
1382
  for (_len1 = _args23.length, p = new Array(_len1), _key10 = 0; _key10 < _len1; _key10++) {
1450
1383
  p[_key10] = _args23[_key10];
@@ -1453,24 +1386,21 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
1453
1386
  readonly = (_p$shift2 = p.shift()) !== null && _p$shift2 !== void 0 ? _p$shift2 : false;
1454
1387
  fetchID = p.shift();
1455
1388
  if (!search) search = {};
1456
- _context23.next = 7;
1389
+ _context23.n = 1;
1457
1390
  return _WebObjectPathHelper["default"].get_path(this, "get");
1458
- case 7:
1459
- usepath = _context23.sent;
1460
- _context23.next = 10;
1391
+ case 1:
1392
+ usepath = _context23.v;
1393
+ _context23.n = 2;
1461
1394
  return _global.gfunc.run_action("get", usepath, search, {
1462
1395
  fetchID: fetchID
1463
1396
  });
1464
- case 10:
1465
- result_items = _context23.sent;
1397
+ case 2:
1398
+ result_items = _context23.v;
1466
1399
  // const selftype = (this.constructor ||
1467
1400
  // Object.getPrototypeOf(this)) as any;
1468
1401
  res = WebObject.map_rowindex(WebObject.mapto(this, result_items, readonly));
1469
1402
  WebObject.setReadonly(res, readonly);
1470
- return _context23.abrupt("return", res);
1471
- case 14:
1472
- case "end":
1473
- return _context23.stop();
1403
+ return _context23.a(2, res);
1474
1404
  }
1475
1405
  }, _callee23, this);
1476
1406
  }));
@@ -1479,51 +1409,45 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
1479
1409
  }
1480
1410
  return get_list;
1481
1411
  }()
1482
- /**
1483
- * uses `get_list` and then saves the result to `gcache`
1484
- * then uses the `equals` function to return matched results
1485
- * @param search
1486
- * @returns
1412
+ /**
1413
+ * uses `get_list` and then saves the result to `gcache`
1414
+ * then uses the `equals` function to return matched results
1415
+ * @param search
1416
+ * @returns
1487
1417
  */
1488
1418
  )
1489
1419
  }, {
1490
1420
  key: "get_list_cache",
1491
1421
  value: (function () {
1492
- var _get_list_cache = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee25(search) {
1422
+ var _get_list_cache = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee25(search) {
1493
1423
  var _this3 = this;
1494
1424
  var all_data;
1495
- return _regeneratorRuntime().wrap(function _callee25$(_context25) {
1496
- while (1) switch (_context25.prev = _context25.next) {
1425
+ return _regenerator().w(function (_context25) {
1426
+ while (1) switch (_context25.n) {
1497
1427
  case 0:
1498
- _context25.next = 2;
1499
- return _global.gcache.get_temp_cache(this.get_webpath(), /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee24() {
1500
- return _regeneratorRuntime().wrap(function _callee24$(_context24) {
1501
- while (1) switch (_context24.prev = _context24.next) {
1428
+ _context25.n = 1;
1429
+ return _global.gcache.get_temp_cache(this.get_webpath(), /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee24() {
1430
+ return _regenerator().w(function (_context24) {
1431
+ while (1) switch (_context24.n) {
1502
1432
  case 0:
1503
- _context24.next = 2;
1433
+ _context24.n = 1;
1504
1434
  return _this3.get_list();
1505
- case 2:
1506
- return _context24.abrupt("return", _context24.sent);
1507
- case 3:
1508
- case "end":
1509
- return _context24.stop();
1435
+ case 1:
1436
+ return _context24.a(2, _context24.v);
1510
1437
  }
1511
1438
  }, _callee24);
1512
1439
  })));
1513
- case 2:
1514
- all_data = _context25.sent;
1440
+ case 1:
1441
+ all_data = _context25.v;
1515
1442
  if (search) {
1516
- _context25.next = 5;
1443
+ _context25.n = 2;
1517
1444
  break;
1518
1445
  }
1519
- return _context25.abrupt("return", all_data);
1520
- case 5:
1521
- return _context25.abrupt("return", all_data.filter(function (s) {
1446
+ return _context25.a(2, all_data);
1447
+ case 2:
1448
+ return _context25.a(2, all_data.filter(function (s) {
1522
1449
  return _this3.equals(s, search);
1523
1450
  }));
1524
- case 6:
1525
- case "end":
1526
- return _context25.stop();
1527
1451
  }
1528
1452
  }, _callee25, this);
1529
1453
  }));
@@ -1532,29 +1456,26 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
1532
1456
  }
1533
1457
  return get_list_cache;
1534
1458
  }()
1535
- /**
1536
- * uses `get_list_cache` then the `equals` function to return matched result
1537
- * @param search
1538
- * @returns
1459
+ /**
1460
+ * uses `get_list_cache` then the `equals` function to return matched result
1461
+ * @param search
1462
+ * @returns
1539
1463
  */
1540
1464
  )
1541
1465
  }, {
1542
1466
  key: "get_single_cache",
1543
1467
  value: (function () {
1544
- var _get_single_cache = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee26(search) {
1468
+ var _get_single_cache = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee26(search) {
1545
1469
  var _this4 = this;
1546
- return _regeneratorRuntime().wrap(function _callee26$(_context26) {
1547
- while (1) switch (_context26.prev = _context26.next) {
1470
+ return _regenerator().w(function (_context26) {
1471
+ while (1) switch (_context26.n) {
1548
1472
  case 0:
1549
- _context26.next = 2;
1473
+ _context26.n = 1;
1550
1474
  return this.get_list_cache();
1551
- case 2:
1552
- return _context26.abrupt("return", _context26.sent.find(function (s) {
1475
+ case 1:
1476
+ return _context26.a(2, _context26.v.find(function (s) {
1553
1477
  return _this4.equals(s, search);
1554
1478
  }));
1555
- case 3:
1556
- case "end":
1557
- return _context26.stop();
1558
1479
  }
1559
1480
  }, _callee26, this);
1560
1481
  }));
@@ -1563,38 +1484,35 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
1563
1484
  }
1564
1485
  return get_single_cache;
1565
1486
  }()
1566
- /**
1567
- * Get a list of web objects and convert them to basic objects
1568
- * can be passed to client components
1569
- * default order of parameters : search,readonly,fetchID
1487
+ /**
1488
+ * Get a list of web objects and convert them to basic objects
1489
+ * can be passed to client components
1490
+ * default order of parameters : search,readonly,fetchID
1570
1491
  */
1571
1492
  )
1572
1493
  }, {
1573
1494
  key: "get_basicList",
1574
1495
  value: (function () {
1575
- var _get_basicList = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee28() {
1496
+ var _get_basicList = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee28() {
1576
1497
  var itemlist,
1577
1498
  _args28 = arguments;
1578
- return _regeneratorRuntime().wrap(function _callee28$(_context28) {
1579
- while (1) switch (_context28.prev = _context28.next) {
1499
+ return _regenerator().w(function (_context28) {
1500
+ while (1) switch (_context28.n) {
1580
1501
  case 0:
1581
- _context28.next = 2;
1502
+ _context28.n = 1;
1582
1503
  return this.get_list.apply(this, _args28);
1583
- case 2:
1584
- itemlist = _context28.sent;
1585
- _context28.next = 5;
1504
+ case 1:
1505
+ itemlist = _context28.v;
1506
+ _context28.n = 2;
1586
1507
  return Promise.all(itemlist.map(/*#__PURE__*/function () {
1587
- var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee27(r) {
1588
- return _regeneratorRuntime().wrap(function _callee27$(_context27) {
1589
- while (1) switch (_context27.prev = _context27.next) {
1508
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee27(r) {
1509
+ return _regenerator().w(function (_context27) {
1510
+ while (1) switch (_context27.n) {
1590
1511
  case 0:
1591
- _context27.next = 2;
1512
+ _context27.n = 1;
1592
1513
  return r.get_basicObject();
1593
- case 2:
1594
- return _context27.abrupt("return", _context27.sent);
1595
- case 3:
1596
- case "end":
1597
- return _context27.stop();
1514
+ case 1:
1515
+ return _context27.a(2, _context27.v);
1598
1516
  }
1599
1517
  }, _callee27);
1600
1518
  }));
@@ -1602,11 +1520,8 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
1602
1520
  return _ref3.apply(this, arguments);
1603
1521
  };
1604
1522
  }()));
1605
- case 5:
1606
- return _context28.abrupt("return", _context28.sent);
1607
- case 6:
1608
- case "end":
1609
- return _context28.stop();
1523
+ case 2:
1524
+ return _context28.a(2, _context28.v);
1610
1525
  }
1611
1526
  }, _callee28, this);
1612
1527
  }));