@azrico/webobject 1.4.68 → 1.4.70

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.
@@ -14,9 +14,9 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
14
14
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
15
15
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
16
16
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
17
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { 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 && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
17
18
  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; }
18
19
  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; }
19
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { 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 && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
20
20
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
21
21
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
22
22
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -34,7 +34,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
34
34
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
35
35
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
36
36
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
37
- var WebObject = /*#__PURE__*/function (_SimpleObject, _Save, _Delete, _get_deltaObject, _onDelete, _onLoad, _onSave, _onAfterSave, _onNew, _saveList, _get_single, _get_list) {
37
+ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Delete, _get_deltaObject, _onDelete, _onLoad, _onSave, _onAfterSave, _onNew, _saveList, _get_single, _get_list) {
38
38
  _inherits(WebObject, _SimpleObject);
39
39
  var _super = _createSuper(WebObject);
40
40
  function WebObject() {
@@ -55,7 +55,7 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _Save, _Delete, _get_delta
55
55
  _defineProperty(_assertThisInitialized(_this), "get_webpath", function () {
56
56
  return _this.__web_path;
57
57
  });
58
- _this.meta_data = [];
58
+ _this.meta_data = {};
59
59
  return _this;
60
60
  }
61
61
  /**
@@ -75,45 +75,78 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _Save, _Delete, _get_delta
75
75
  */
76
76
  }, {
77
77
  key: "setMetaValue",
78
- value: /* -------------------------------------------------------------------------- */
78
+ value:
79
+ /* -------------------------------------------------------------------------- */
79
80
  /* Meta data */
80
81
  /* -------------------------------------------------------------------------- */
81
82
  /**
82
83
  * Update meta value of this object , meta data is stored in meta_data variable
83
84
  * @param key
84
85
  * @param value
85
- * @param createIfNotExists should we create a new meta if key does not exist
86
86
  * @param sendChange
87
87
  * @returns
88
88
  */
89
- function setMetaValue(key, value) {
90
- var createIfNotExists = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
91
- var sendChange = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "auto";
92
- if (!this.canModify) {
93
- if (this.__throw_errors !== false) throw Error("Cant use setMetaValue on ".concat(key, " when on readonly mode"));else return false;
94
- }
95
- if (!key || typeof key != "string") {
96
- if (this.__throw_errors !== false) throw Error("Bad key at setMetaValue");else return false;
97
- }
98
- var old_value = WebObject.getMetaValue(this, key);
99
- if ((0, _object.object_equals)(old_value, value)) return false; //same value, no changes
100
- var old_metalist = (0, _object.to_array)(this.getValue("meta_data")).map(function (s) {
101
- return (0, _object.object_shallow_clone)(s);
102
- });
103
- var new_metalist = (0, _object.setInArray)(old_metalist, "key", key, "value", value, createIfNotExists);
104
- this.setValue("meta_data", new_metalist);
105
- if (sendChange !== false) this.notifyChanged("meta", key, value);
106
- return true;
107
- }
108
- /**
109
- * Get meta object by key
110
- * @param key
111
- * @returns meta object
112
- */
113
- }, {
114
- key: "getMeta",
115
- value: function getMeta(key) {
116
- return WebObject.getMeta(this, key);
89
+ function setMetaValue(_x, _x2) {
90
+ return (_setMetaValue = _setMetaValue || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(key, value) {
91
+ var sendChange,
92
+ old_value,
93
+ new_metalist,
94
+ _args = arguments;
95
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
96
+ while (1) switch (_context.prev = _context.next) {
97
+ case 0:
98
+ sendChange = _args.length > 2 && _args[2] !== undefined ? _args[2] : "auto";
99
+ if (this.canModify) {
100
+ _context.next = 7;
101
+ break;
102
+ }
103
+ if (!(this.__throw_errors !== false)) {
104
+ _context.next = 6;
105
+ break;
106
+ }
107
+ throw Error("Cant use setMetaValue on ".concat(key, " when on readonly mode"));
108
+ case 6:
109
+ return _context.abrupt("return", false);
110
+ case 7:
111
+ if (!(!key || typeof key != "string")) {
112
+ _context.next = 13;
113
+ break;
114
+ }
115
+ if (!(this.__throw_errors !== false)) {
116
+ _context.next = 12;
117
+ break;
118
+ }
119
+ throw Error("Bad key at setMetaValue");
120
+ case 12:
121
+ return _context.abrupt("return", false);
122
+ case 13:
123
+ old_value = WebObject.getMetaValue(this, key);
124
+ if (!(0, _object.object_equals)(old_value, value)) {
125
+ _context.next = 16;
126
+ break;
127
+ }
128
+ return _context.abrupt("return", false);
129
+ case 16:
130
+ //same value, no changes
131
+ new_metalist = _objectSpread({}, this.getValue("meta_data"));
132
+ new_metalist[key] = value;
133
+ _context.next = 20;
134
+ return this.setValue("meta_data", new_metalist);
135
+ case 20:
136
+ if (!(sendChange !== false)) {
137
+ _context.next = 23;
138
+ break;
139
+ }
140
+ _context.next = 23;
141
+ return this.notifyChanged("meta", key, value);
142
+ case 23:
143
+ return _context.abrupt("return", true);
144
+ case 24:
145
+ case "end":
146
+ return _context.stop();
147
+ }
148
+ }, _callee, this);
149
+ }))).apply(this, arguments);
117
150
  }
118
151
  /**
119
152
  * Get meta value by key
@@ -126,55 +159,55 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _Save, _Delete, _get_delta
126
159
  return WebObject.getMetaValue(this, key);
127
160
  }
128
161
  /**
129
- * Get meta object by key
162
+ * Get meta value by key
130
163
  * @param o
131
164
  * @param key
132
- * @returns meta object
165
+ * @returns value or undefined
133
166
  */
134
167
  }, {
135
168
  key: "Save",
136
169
  value: function Save() {
137
- return (_Save = _Save || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
138
- return _regeneratorRuntime().wrap(function _callee$(_context) {
139
- while (1) switch (_context.prev = _context.next) {
170
+ return (_Save = _Save || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
171
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
172
+ while (1) switch (_context2.prev = _context2.next) {
140
173
  case 0:
141
174
  if (!(this.__throw_errors !== false)) {
142
- _context.next = 2;
175
+ _context2.next = 2;
143
176
  break;
144
177
  }
145
178
  throw new Error("Save not implented");
146
179
  case 2:
147
180
  WebObject.addError(this, "Save not implented", "NOSAVE", true);
148
181
  this.setSaveResult(false, "canceled");
149
- return _context.abrupt("return", false);
182
+ return _context2.abrupt("return", false);
150
183
  case 5:
151
184
  case "end":
152
- return _context.stop();
185
+ return _context2.stop();
153
186
  }
154
- }, _callee, this);
187
+ }, _callee2, this);
155
188
  }))).apply(this, arguments);
156
189
  }
157
190
  }, {
158
191
  key: "Delete",
159
192
  value: function Delete() {
160
- return (_Delete = _Delete || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
161
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
162
- while (1) switch (_context2.prev = _context2.next) {
193
+ return (_Delete = _Delete || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
194
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
195
+ while (1) switch (_context3.prev = _context3.next) {
163
196
  case 0:
164
197
  if (!(this.__throw_errors !== false)) {
165
- _context2.next = 2;
198
+ _context3.next = 2;
166
199
  break;
167
200
  }
168
201
  throw new Error("Delete not implented");
169
202
  case 2:
170
203
  WebObject.addError(this, "Delete not implented", "NOSAVE", true);
171
204
  this.setSaveResult(false, "canceled");
172
- return _context2.abrupt("return", false);
205
+ return _context3.abrupt("return", false);
173
206
  case 5:
174
207
  case "end":
175
- return _context2.stop();
208
+ return _context3.stop();
176
209
  }
177
- }, _callee2, this);
210
+ }, _callee3, this);
178
211
  }))).apply(this, arguments);
179
212
  } /* -------------------------------------------------------------------------- */
180
213
  }, {
@@ -196,75 +229,75 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _Save, _Delete, _get_delta
196
229
  */
197
230
  }, {
198
231
  key: "get_deltaObject",
199
- value: function get_deltaObject(_x) {
200
- return (_get_deltaObject = _get_deltaObject || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(p) {
232
+ value: function get_deltaObject(_x3) {
233
+ return (_get_deltaObject = _get_deltaObject || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(p) {
201
234
  var _this2 = this,
202
235
  _parseObj;
203
236
  var final_object, isChild, useDelta, allProperties, needId, chkChangables, useExtraProps, dlt, allkeys, changableKeys, functionProps, index, fp, parseObj, _iterator, _step, key, tempusers;
204
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
205
- while (1) switch (_context5.prev = _context5.next) {
237
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
238
+ while (1) switch (_context6.prev = _context6.next) {
206
239
  case 0:
207
- parseObj = function _parseObj2(_x2) {
208
- return (_parseObj = _parseObj || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(obj) {
240
+ parseObj = function _parseObj2(_x4) {
241
+ return (_parseObj = _parseObj || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(obj) {
209
242
  var _ref;
210
243
  var newobj_dlt;
211
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
212
- while (1) switch (_context4.prev = _context4.next) {
244
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
245
+ while (1) switch (_context5.prev = _context5.next) {
213
246
  case 0:
214
247
  if (!(obj == null)) {
215
- _context4.next = 2;
248
+ _context5.next = 2;
216
249
  break;
217
250
  }
218
- return _context4.abrupt("return", undefined);
251
+ return _context5.abrupt("return", undefined);
219
252
  case 2:
220
253
  if (!Array.isArray(obj)) {
221
- _context4.next = 6;
254
+ _context5.next = 6;
222
255
  break;
223
256
  }
224
- _context4.next = 5;
225
- return Promise.all(obj.map(function (_x3) {
226
- return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(r) {
227
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
228
- while (1) switch (_context3.prev = _context3.next) {
257
+ _context5.next = 5;
258
+ return Promise.all(obj.map(function (_x5) {
259
+ return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(r) {
260
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
261
+ while (1) switch (_context4.prev = _context4.next) {
229
262
  case 0:
230
- _context3.next = 2;
263
+ _context4.next = 2;
231
264
  return parseObj(r);
232
265
  case 2:
233
- return _context3.abrupt("return", _context3.sent);
266
+ return _context4.abrupt("return", _context4.sent);
234
267
  case 3:
235
268
  case "end":
236
- return _context3.stop();
269
+ return _context4.stop();
237
270
  }
238
- }, _callee3);
271
+ }, _callee4);
239
272
  }))).apply(this, arguments);
240
273
  }));
241
274
  case 5:
242
- return _context4.abrupt("return", _context4.sent);
275
+ return _context5.abrupt("return", _context5.sent);
243
276
  case 6:
244
277
  if (!(obj instanceof WebObject && typeof obj.get_deltaObject === "function")) {
245
- _context4.next = 15;
278
+ _context5.next = 15;
246
279
  break;
247
280
  }
248
- _context4.next = 9;
281
+ _context5.next = 9;
249
282
  return obj.get_deltaObject(_objectSpread(_objectSpread({}, p), {}, {
250
283
  isChild: true
251
284
  }));
252
285
  case 9:
253
- newobj_dlt = _context4.sent;
286
+ newobj_dlt = _context5.sent;
254
287
  if ((0, _object.object_isEmpty)(newobj_dlt)) {
255
- _context4.next = 14;
288
+ _context5.next = 14;
256
289
  break;
257
290
  }
258
- return _context4.abrupt("return", newobj_dlt);
291
+ return _context5.abrupt("return", newobj_dlt);
259
292
  case 14:
260
- return _context4.abrupt("return", obj);
293
+ return _context5.abrupt("return", obj);
261
294
  case 15:
262
- return _context4.abrupt("return", obj);
295
+ return _context5.abrupt("return", obj);
263
296
  case 16:
264
297
  case "end":
265
- return _context4.stop();
298
+ return _context5.stop();
266
299
  }
267
- }, _callee4);
300
+ }, _callee5);
268
301
  }))).apply(this, arguments);
269
302
  };
270
303
  if (!p) p = {};
@@ -283,7 +316,7 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _Save, _Delete, _get_delta
283
316
  ignoreProtected: allProperties
284
317
  });
285
318
  }) : allkeys;
286
- _context5.next = 14;
319
+ _context6.next = 14;
287
320
  return _convert["default"].applyFormats({
288
321
  inputobject: dlt,
289
322
  formats: (0, _object.object_getStatic)(this, "__formatList"),
@@ -304,32 +337,32 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _Save, _Delete, _get_delta
304
337
  /* parse all changableKeys */
305
338
  /* -------------------------------------------------------------------------- */
306
339
  _iterator = _createForOfIteratorHelper(changableKeys);
307
- _context5.prev = 17;
340
+ _context6.prev = 17;
308
341
  _iterator.s();
309
342
  case 19:
310
343
  if ((_step = _iterator.n()).done) {
311
- _context5.next = 26;
344
+ _context6.next = 26;
312
345
  break;
313
346
  }
314
347
  key = _step.value;
315
- _context5.next = 23;
348
+ _context6.next = 23;
316
349
  return parseObj(dlt[key]);
317
350
  case 23:
318
- final_object[key] = _context5.sent;
351
+ final_object[key] = _context6.sent;
319
352
  case 24:
320
- _context5.next = 19;
353
+ _context6.next = 19;
321
354
  break;
322
355
  case 26:
323
- _context5.next = 31;
356
+ _context6.next = 31;
324
357
  break;
325
358
  case 28:
326
- _context5.prev = 28;
327
- _context5.t0 = _context5["catch"](17);
328
- _iterator.e(_context5.t0);
359
+ _context6.prev = 28;
360
+ _context6.t0 = _context6["catch"](17);
361
+ _iterator.e(_context6.t0);
329
362
  case 31:
330
- _context5.prev = 31;
363
+ _context6.prev = 31;
331
364
  _iterator.f();
332
- return _context5.finish(31);
365
+ return _context6.finish(31);
333
366
  case 34:
334
367
  /* -------------------------------------------------------------------------- */
335
368
  /* add id properties */
@@ -352,12 +385,12 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _Save, _Delete, _get_delta
352
385
  });
353
386
  final_object["_users"] = (0, _object.wrap_array)(tempusers);
354
387
  }
355
- return _context5.abrupt("return", final_object);
388
+ return _context6.abrupt("return", final_object);
356
389
  case 38:
357
390
  case "end":
358
- return _context5.stop();
391
+ return _context6.stop();
359
392
  }
360
- }, _callee5, this, [[17, 28, 31, 34]]);
393
+ }, _callee6, this, [[17, 28, 31, 34]]);
361
394
  }))).apply(this, arguments);
362
395
  } /* --------------------------------- Getters -------------------------------- */
363
396
  }, {
@@ -379,127 +412,127 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _Save, _Delete, _get_delta
379
412
  }, {
380
413
  key: "onDelete",
381
414
  value: function onDelete() {
382
- return (_onDelete = _onDelete || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
415
+ return (_onDelete = _onDelete || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
383
416
  var _this$manager;
384
417
  var _len,
385
418
  p,
386
419
  _key,
387
- _args6 = arguments;
388
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
389
- while (1) switch (_context6.prev = _context6.next) {
420
+ _args7 = arguments;
421
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
422
+ while (1) switch (_context7.prev = _context7.next) {
390
423
  case 0:
391
424
  this.isDeleted = true;
392
- for (_len = _args6.length, p = new Array(_len), _key = 0; _key < _len; _key++) {
393
- p[_key] = _args6[_key];
425
+ for (_len = _args7.length, p = new Array(_len), _key = 0; _key < _len; _key++) {
426
+ p[_key] = _args7[_key];
394
427
  }
395
- _context6.next = 4;
428
+ _context7.next = 4;
396
429
  return (_this$manager = this.manager) === null || _this$manager === void 0 ? void 0 : _this$manager.onDelete.apply(_this$manager, p);
397
430
  case 4:
398
- return _context6.abrupt("return", _context6.sent);
431
+ return _context7.abrupt("return", _context7.sent);
399
432
  case 5:
400
433
  case "end":
401
- return _context6.stop();
434
+ return _context7.stop();
402
435
  }
403
- }, _callee6, this);
436
+ }, _callee7, this);
404
437
  }))).apply(this, arguments);
405
438
  }
406
439
  }, {
407
440
  key: "onLoad",
408
441
  value: function onLoad() {
409
- return (_onLoad = _onLoad || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
442
+ return (_onLoad = _onLoad || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
410
443
  var _this$manager2;
411
444
  var _len2,
412
445
  p,
413
446
  _key2,
414
- _args7 = arguments;
415
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
416
- while (1) switch (_context7.prev = _context7.next) {
447
+ _args8 = arguments;
448
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
449
+ while (1) switch (_context8.prev = _context8.next) {
417
450
  case 0:
418
451
  this.isDeleted = false;
419
- for (_len2 = _args7.length, p = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
420
- p[_key2] = _args7[_key2];
452
+ for (_len2 = _args8.length, p = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
453
+ p[_key2] = _args8[_key2];
421
454
  }
422
- _context7.next = 4;
455
+ _context8.next = 4;
423
456
  return (_this$manager2 = this.manager) === null || _this$manager2 === void 0 ? void 0 : _this$manager2.onLoad.apply(_this$manager2, p);
424
457
  case 4:
425
- return _context7.abrupt("return", _context7.sent);
458
+ return _context8.abrupt("return", _context8.sent);
426
459
  case 5:
427
460
  case "end":
428
- return _context7.stop();
461
+ return _context8.stop();
429
462
  }
430
- }, _callee7, this);
463
+ }, _callee8, this);
431
464
  }))).apply(this, arguments);
432
465
  }
433
466
  }, {
434
467
  key: "onSave",
435
468
  value: function onSave() {
436
- return (_onSave = _onSave || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
469
+ return (_onSave = _onSave || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
437
470
  var _this$manager4;
438
471
  var srObject,
439
472
  _this$manager3,
440
473
  _len3,
441
474
  p,
442
475
  _key3,
443
- _args8 = arguments;
444
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
445
- while (1) switch (_context8.prev = _context8.next) {
476
+ _args9 = arguments;
477
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
478
+ while (1) switch (_context9.prev = _context9.next) {
446
479
  case 0:
447
480
  if (!this.isSaved) {
448
- _context8.next = 7;
481
+ _context9.next = 7;
449
482
  break;
450
483
  }
451
484
  this.apply_changes();
452
485
  srObject = this.getSaveResult(true);
453
486
  if (!this.saveResultHasID(srObject)) {
454
- _context8.next = 7;
487
+ _context9.next = 7;
455
488
  break;
456
489
  }
457
490
  /* -------------------------------------------------------------------------- */
458
491
  WebObject.LoadIdsFromSaveResult(this, srObject);
459
- _context8.next = 7;
492
+ _context9.next = 7;
460
493
  return (_this$manager3 = this.manager) === null || _this$manager3 === void 0 ? void 0 : _this$manager3.event_run("on_id_change");
461
494
  case 7:
462
- for (_len3 = _args8.length, p = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
463
- p[_key3] = _args8[_key3];
495
+ for (_len3 = _args9.length, p = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
496
+ p[_key3] = _args9[_key3];
464
497
  }
465
- _context8.next = 10;
498
+ _context9.next = 10;
466
499
  return (_this$manager4 = this.manager) === null || _this$manager4 === void 0 ? void 0 : _this$manager4.onSave.apply(_this$manager4, p);
467
500
  case 10:
468
- _context8.next = 12;
501
+ _context9.next = 12;
469
502
  return this.onAfterSave();
470
503
  case 12:
471
- return _context8.abrupt("return", true);
504
+ return _context9.abrupt("return", true);
472
505
  case 13:
473
506
  case "end":
474
- return _context8.stop();
507
+ return _context9.stop();
475
508
  }
476
- }, _callee8, this);
509
+ }, _callee9, this);
477
510
  }))).apply(this, arguments);
478
511
  }
479
512
  }, {
480
513
  key: "onAfterSave",
481
514
  value: function onAfterSave() {
482
- return (_onAfterSave = _onAfterSave || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
515
+ return (_onAfterSave = _onAfterSave || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
483
516
  var _this$manager5;
484
517
  var _len4,
485
518
  p,
486
519
  _key4,
487
- _args9 = arguments;
488
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
489
- while (1) switch (_context9.prev = _context9.next) {
520
+ _args10 = arguments;
521
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
522
+ while (1) switch (_context10.prev = _context10.next) {
490
523
  case 0:
491
- for (_len4 = _args9.length, p = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
492
- p[_key4] = _args9[_key4];
524
+ for (_len4 = _args10.length, p = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
525
+ p[_key4] = _args10[_key4];
493
526
  }
494
- _context9.next = 3;
527
+ _context10.next = 3;
495
528
  return (_this$manager5 = this.manager) === null || _this$manager5 === void 0 ? void 0 : _this$manager5.onAfterSave.apply(_this$manager5, p);
496
529
  case 3:
497
- return _context9.abrupt("return", true);
530
+ return _context10.abrupt("return", true);
498
531
  case 4:
499
532
  case "end":
500
- return _context9.stop();
533
+ return _context10.stop();
501
534
  }
502
- }, _callee9, this);
535
+ }, _callee10, this);
503
536
  }))).apply(this, arguments);
504
537
  }
505
538
  }, {
@@ -520,27 +553,27 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _Save, _Delete, _get_delta
520
553
  }, {
521
554
  key: "onNew",
522
555
  value: function onNew() {
523
- return (_onNew = _onNew || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
556
+ return (_onNew = _onNew || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
524
557
  var _this$manager6;
525
558
  var _len5,
526
559
  p,
527
560
  _key5,
528
- _args10 = arguments;
529
- return _regeneratorRuntime().wrap(function _callee10$(_context10) {
530
- while (1) switch (_context10.prev = _context10.next) {
561
+ _args11 = arguments;
562
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
563
+ while (1) switch (_context11.prev = _context11.next) {
531
564
  case 0:
532
- for (_len5 = _args10.length, p = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
533
- p[_key5] = _args10[_key5];
565
+ for (_len5 = _args11.length, p = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
566
+ p[_key5] = _args11[_key5];
534
567
  }
535
- _context10.next = 3;
568
+ _context11.next = 3;
536
569
  return (_this$manager6 = this.manager) === null || _this$manager6 === void 0 ? void 0 : _this$manager6.onNew.apply(_this$manager6, p);
537
570
  case 3:
538
- return _context10.abrupt("return", _context10.sent);
571
+ return _context11.abrupt("return", _context11.sent);
539
572
  case 4:
540
573
  case "end":
541
- return _context10.stop();
574
+ return _context11.stop();
542
575
  }
543
- }, _callee10, this);
576
+ }, _callee11, this);
544
577
  }))).apply(this, arguments);
545
578
  } /* -------------------------------------------------------------------------- */
546
579
  }, {
@@ -554,27 +587,15 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _Save, _Delete, _get_delta
554
587
  return (0, _object.array_remove_duplicates)((0, _object.array_merge)(obj._creator, (0, _object.wrap_array)(obj._users), (0, _object.wrap_array)(obj.attentions)));
555
588
  }
556
589
  }, {
557
- key: "getMeta",
558
- value: function getMeta(o, key) {
590
+ key: "getMetaValue",
591
+ value: function getMetaValue(o, key) {
559
592
  if (o == null) return null;
560
593
  if (!key || typeof key != "string") return undefined;
561
- var metalist = [];
594
+ var metalist = {};
562
595
  if (_typeof(o) === "object") {
563
596
  metalist = typeof o.getValue === "function" ? o.getValue("meta_data") : o.meta_data;
564
597
  }
565
- return (0, _object.getInArray)(metalist, "key", key);
566
- }
567
- /**
568
- * Get meta value by key
569
- * @param o
570
- * @param key
571
- * @returns value or undefined
572
- */
573
- }, {
574
- key: "getMetaValue",
575
- value: function getMetaValue(o, key) {
576
- var _WebObject$getMeta;
577
- return (_WebObject$getMeta = WebObject.getMeta(o, key)) === null || _WebObject$getMeta === void 0 ? void 0 : _WebObject$getMeta.value;
598
+ return metalist[key];
578
599
  }
579
600
  /* -------------------------------------------------------------------------- */
580
601
  /* Save */
@@ -598,8 +619,8 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _Save, _Delete, _get_delta
598
619
  }
599
620
  }, {
600
621
  key: "saveList",
601
- value: function saveList(_x4) {
602
- return (_saveList = _saveList || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(itemList) {
622
+ value: function saveList(_x6) {
623
+ return (_saveList = _saveList || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(itemList) {
603
624
  var _extraOptions$chunksi;
604
625
  var extraOptions,
605
626
  chunks,
@@ -616,11 +637,11 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _Save, _Delete, _get_delta
616
637
  _item,
617
638
  _index2,
618
639
  _item2,
619
- _args11 = arguments;
620
- return _regeneratorRuntime().wrap(function _callee11$(_context11) {
621
- while (1) switch (_context11.prev = _context11.next) {
640
+ _args12 = arguments;
641
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
642
+ while (1) switch (_context12.prev = _context12.next) {
622
643
  case 0:
623
- extraOptions = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : {};
644
+ extraOptions = _args12.length > 1 && _args12[1] !== undefined ? _args12[1] : {};
624
645
  if (!extraOptions) extraOptions = {};
625
646
  chunks = (0, _object.array_chunks)(itemList, (_extraOptions$chunksi = extraOptions.chunksize) !== null && _extraOptions$chunksi !== void 0 ? _extraOptions$chunksi : 50);
626
647
  delete extraOptions.chunksize;
@@ -628,7 +649,7 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _Save, _Delete, _get_delta
628
649
  index = 0;
629
650
  case 6:
630
651
  if (!(index < chunks.length)) {
631
- _context11.next = 36;
652
+ _context12.next = 36;
632
653
  break;
633
654
  }
634
655
  items_to_save = chunks[index];
@@ -636,81 +657,81 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _Save, _Delete, _get_delta
636
657
  k = 0;
637
658
  case 10:
638
659
  if (!(k < items_to_save.length)) {
639
- _context11.next = 19;
660
+ _context12.next = 19;
640
661
  break;
641
662
  }
642
663
  item = items_to_save[k];
643
- _context11.next = 14;
664
+ _context12.next = 14;
644
665
  return item.get_deltaObject();
645
666
  case 14:
646
- dlt = _context11.sent;
667
+ dlt = _context12.sent;
647
668
  save_array.push(item.isNew ? _objectSpread({}, dlt) : _objectSpread({
648
669
  _id: item.getID()
649
670
  }, dlt));
650
671
  case 16:
651
672
  k++;
652
- _context11.next = 10;
673
+ _context12.next = 10;
653
674
  break;
654
675
  case 19:
655
- _context11.next = 21;
676
+ _context12.next = 21;
656
677
  return _global.gfunc.run_action("post", putAddress, _objectSpread({
657
678
  __save_list: WebObject.zipSaveList(save_array)
658
679
  }, extraOptions));
659
680
  case 21:
660
- resultObject = _context11.sent;
681
+ resultObject = _context12.sent;
661
682
  if (!Array.isArray(resultObject)) {
662
- _context11.next = 33;
683
+ _context12.next = 33;
663
684
  break;
664
685
  }
665
686
  _index = 0;
666
687
  case 24:
667
688
  if (!(_index < Math.min(resultObject.length, items_to_save.length))) {
668
- _context11.next = 33;
689
+ _context12.next = 33;
669
690
  break;
670
691
  }
671
692
  res = resultObject[_index];
672
693
  _item = items_to_save[_index];
673
694
  _item.setSaveResult(res);
674
- _context11.next = 30;
695
+ _context12.next = 30;
675
696
  return _item.onSave();
676
697
  case 30:
677
698
  _index++;
678
- _context11.next = 24;
699
+ _context12.next = 24;
679
700
  break;
680
701
  case 33:
681
702
  index++;
682
- _context11.next = 6;
703
+ _context12.next = 6;
683
704
  break;
684
705
  case 36:
685
706
  _index2 = 0;
686
707
  case 37:
687
708
  if (!(_index2 < itemList.length)) {
688
- _context11.next = 46;
709
+ _context12.next = 46;
689
710
  break;
690
711
  }
691
712
  _item2 = itemList[_index2];
692
713
  if (_item2.isSaved) {
693
- _context11.next = 41;
714
+ _context12.next = 41;
694
715
  break;
695
716
  }
696
- return _context11.abrupt("return", false);
717
+ return _context12.abrupt("return", false);
697
718
  case 41:
698
719
  if (!(_item2.getSaveResultType() != "normal")) {
699
- _context11.next = 43;
720
+ _context12.next = 43;
700
721
  break;
701
722
  }
702
- return _context11.abrupt("return", false);
723
+ return _context12.abrupt("return", false);
703
724
  case 43:
704
725
  _index2++;
705
- _context11.next = 37;
726
+ _context12.next = 37;
706
727
  break;
707
728
  case 46:
708
- return _context11.abrupt("return", true);
729
+ return _context12.abrupt("return", true);
709
730
  case 47:
710
731
  case "end":
711
- return _context11.stop();
732
+ return _context12.stop();
712
733
  }
713
- }, _callee11, this);
734
+ }, _callee12, this);
714
735
  }))).apply(this, arguments);
715
736
  }
716
737
  }, {
@@ -756,7 +777,7 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _Save, _Delete, _get_delta
756
777
  }, {
757
778
  key: "get_single",
758
779
  value: function get_single() {
759
- return (_get_single = _get_single || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
780
+ return (_get_single = _get_single || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
760
781
  var _len6,
761
782
  p,
762
783
  _key6,
@@ -765,55 +786,55 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _Save, _Delete, _get_delta
765
786
  fetchID,
766
787
  res,
767
788
  params,
768
- _args12 = arguments;
769
- return _regeneratorRuntime().wrap(function _callee12$(_context12) {
770
- while (1) switch (_context12.prev = _context12.next) {
789
+ _args13 = arguments;
790
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
791
+ while (1) switch (_context13.prev = _context13.next) {
771
792
  case 0:
772
- for (_len6 = _args12.length, p = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
773
- p[_key6] = _args12[_key6];
793
+ for (_len6 = _args13.length, p = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
794
+ p[_key6] = _args13[_key6];
774
795
  }
775
796
  search = p.shift();
776
797
  readonly = p.shift();
777
798
  fetchID = p.shift();
778
799
  if (!(0, _object.object_isEmpty)(search)) {
779
- _context12.next = 6;
800
+ _context13.next = 6;
780
801
  break;
781
802
  }
782
- return _context12.abrupt("return", undefined);
803
+ return _context13.abrupt("return", undefined);
783
804
  case 6:
784
805
  params = {};
785
806
  params.context = readonly ? "view" : "edit";
786
- _context12.t0 = _typeof(search);
787
- _context12.next = _context12.t0 === "string" ? 11 : _context12.t0 === "number" ? 11 : _context12.t0 === "object" ? 19 : 19;
807
+ _context13.t0 = _typeof(search);
808
+ _context13.next = _context13.t0 === "string" ? 11 : _context13.t0 === "number" ? 11 : _context13.t0 === "object" ? 19 : 19;
788
809
  break;
789
810
  case 11:
790
811
  search = String(search);
791
- _context12.t1 = this;
792
- _context12.t2 = this;
793
- _context12.next = 16;
812
+ _context13.t1 = this;
813
+ _context13.t2 = this;
814
+ _context13.next = 16;
794
815
  return _global.gfunc.run_action("get", this.__web_path + "/" + search, params, {
795
816
  fetchID: fetchID
796
817
  });
797
818
  case 16:
798
- _context12.t3 = _context12.sent;
799
- res = _context12.t1.ensure.call(_context12.t1, _context12.t2, _context12.t3);
800
- return _context12.abrupt("break", 25);
819
+ _context13.t3 = _context13.sent;
820
+ res = _context13.t1.ensure.call(_context13.t1, _context13.t2, _context13.t3);
821
+ return _context13.abrupt("break", 25);
801
822
  case 19:
802
- _context12.t4 = _object.object_first;
803
- _context12.next = 22;
823
+ _context13.t4 = _object.object_first;
824
+ _context13.next = 22;
804
825
  return this.get_list(search, readonly, fetchID);
805
826
  case 22:
806
- _context12.t5 = _context12.sent;
807
- res = (0, _context12.t4)(_context12.t5);
808
- return _context12.abrupt("break", 25);
827
+ _context13.t5 = _context13.sent;
828
+ res = (0, _context13.t4)(_context13.t5);
829
+ return _context13.abrupt("break", 25);
809
830
  case 25:
810
831
  WebObject.setReadonly(res, readonly);
811
- return _context12.abrupt("return", res);
832
+ return _context13.abrupt("return", res);
812
833
  case 27:
813
834
  case "end":
814
- return _context12.stop();
835
+ return _context13.stop();
815
836
  }
816
- }, _callee12, this);
837
+ }, _callee13, this);
817
838
  }))).apply(this, arguments);
818
839
  }
819
840
  /**
@@ -823,7 +844,7 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _Save, _Delete, _get_delta
823
844
  }, {
824
845
  key: "get_list",
825
846
  value: function get_list() {
826
- return (_get_list = _get_list || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
847
+ return (_get_list = _get_list || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
827
848
  var _len7,
828
849
  p,
829
850
  _key7,
@@ -833,32 +854,32 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _Save, _Delete, _get_delta
833
854
  result_items,
834
855
  selftype,
835
856
  res,
836
- _args13 = arguments;
837
- return _regeneratorRuntime().wrap(function _callee13$(_context13) {
838
- while (1) switch (_context13.prev = _context13.next) {
857
+ _args14 = arguments;
858
+ return _regeneratorRuntime().wrap(function _callee14$(_context14) {
859
+ while (1) switch (_context14.prev = _context14.next) {
839
860
  case 0:
840
- for (_len7 = _args13.length, p = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
841
- p[_key7] = _args13[_key7];
861
+ for (_len7 = _args14.length, p = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
862
+ p[_key7] = _args14[_key7];
842
863
  }
843
864
  search = p.shift();
844
865
  readonly = p.shift();
845
866
  fetchID = p.shift();
846
867
  if (!search) search = {};
847
- _context13.next = 7;
868
+ _context14.next = 7;
848
869
  return _global.gfunc.run_action("get", this.__web_path, search, {
849
870
  fetchID: fetchID
850
871
  });
851
872
  case 7:
852
- result_items = _context13.sent;
873
+ result_items = _context14.sent;
853
874
  selftype = this.prototype;
854
875
  res = WebObject.map_rowindex(WebObject.mapto(selftype, result_items, readonly));
855
876
  WebObject.setReadonly(res, readonly);
856
- return _context13.abrupt("return", res);
877
+ return _context14.abrupt("return", res);
857
878
  case 12:
858
879
  case "end":
859
- return _context13.stop();
880
+ return _context14.stop();
860
881
  }
861
- }, _callee13, this);
882
+ }, _callee14, this);
862
883
  }))).apply(this, arguments);
863
884
  }
864
885
  }]);