@azrico/webobject 1.5.70 → 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
@@ -10,7 +10,8 @@ var _global = require("@azrico/global");
10
10
  var _object = require("@azrico/object");
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
12
12
  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); }
13
- 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; }
13
+ 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 }; })(); }
14
+ 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); }
14
15
  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); }
15
16
  function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
16
17
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
@@ -28,9 +29,9 @@ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new T
28
29
  function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
29
30
  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; }
30
31
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
31
- 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); }
32
- /**
33
- * This class manages the events of an Simple Object
32
+ 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); }
33
+ /**
34
+ * This class manages the events of an Simple Object
34
35
  */
35
36
  var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_ObjectManager) {
36
37
  /* -------------------------------------------------------------------------- */
@@ -41,40 +42,40 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
41
42
  if (_this.constructor["__save_message"]) {
42
43
  /* ---------------- should we display a message after saving ? -------------- */
43
44
  _this.event_add("on_save", "on_save-sendmsg", /*#__PURE__*/function () {
44
- var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(srt) {
45
- return _regeneratorRuntime().wrap(function _callee$(_context) {
46
- while (1) switch (_context.prev = _context.next) {
45
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(srt) {
46
+ var _t;
47
+ return _regenerator().w(function (_context) {
48
+ while (1) switch (_context.n) {
47
49
  case 0:
48
- _context.t0 = srt;
49
- _context.next = _context.t0 === "nothing" ? 3 : _context.t0 === "normal" ? 6 : 9;
50
+ _t = srt;
51
+ _context.n = _t === "nothing" ? 1 : _t === "normal" ? 3 : 5;
50
52
  break;
51
- case 3:
52
- _context.next = 5;
53
+ case 1:
54
+ _context.n = 2;
53
55
  return _global.gfunc.run_action("show_message", {
54
56
  message: "Nothing to save",
55
57
  type: "info"
56
58
  });
57
- case 5:
58
- return _context.abrupt("return", _context.sent);
59
- case 6:
60
- _context.next = 8;
59
+ case 2:
60
+ return _context.a(2, _context.v);
61
+ case 3:
62
+ _context.n = 4;
61
63
  return _global.gfunc.run_action("show_message", {
62
64
  message: "Saved",
63
65
  type: "success"
64
66
  });
65
- case 8:
66
- return _context.abrupt("return", _context.sent);
67
- case 9:
68
- _context.next = 11;
67
+ case 4:
68
+ return _context.a(2, _context.v);
69
+ case 5:
70
+ _context.n = 6;
69
71
  return _global.gfunc.run_action("show_message", {
70
72
  message: "Not saved",
71
73
  type: "error"
72
74
  });
73
- case 11:
74
- return _context.abrupt("return", _context.sent);
75
- case 12:
76
- case "end":
77
- return _context.stop();
75
+ case 6:
76
+ return _context.a(2, _context.v);
77
+ case 7:
78
+ return _context.a(2);
78
79
  }
79
80
  }, _callee);
80
81
  }));
@@ -83,32 +84,32 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
83
84
  };
84
85
  }());
85
86
  _this.event_add("on_archive", "on_archive-sendmsg", /*#__PURE__*/function () {
86
- var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(srType) {
87
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
88
- while (1) switch (_context2.prev = _context2.next) {
87
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(srType) {
88
+ var _t2;
89
+ return _regenerator().w(function (_context2) {
90
+ while (1) switch (_context2.n) {
89
91
  case 0:
90
- _context2.t0 = srType;
91
- _context2.next = _context2.t0 === "normal" ? 3 : 6;
92
+ _t2 = srType;
93
+ _context2.n = _t2 === "normal" ? 1 : 3;
92
94
  break;
93
- case 3:
94
- _context2.next = 5;
95
+ case 1:
96
+ _context2.n = 2;
95
97
  return _global.gfunc.run_action("show_message", {
96
98
  message: "Archived",
97
99
  type: "success"
98
100
  });
99
- case 5:
100
- return _context2.abrupt("return", _context2.sent);
101
- case 6:
102
- _context2.next = 8;
101
+ case 2:
102
+ return _context2.a(2, _context2.v);
103
+ case 3:
104
+ _context2.n = 4;
103
105
  return _global.gfunc.run_action("show_message", {
104
106
  message: "Not archived (".concat(srType, ")"),
105
107
  type: "error"
106
108
  });
107
- case 8:
108
- return _context2.abrupt("return", _context2.sent);
109
- case 9:
110
- case "end":
111
- return _context2.stop();
109
+ case 4:
110
+ return _context2.a(2, _context2.v);
111
+ case 5:
112
+ return _context2.a(2);
112
113
  }
113
114
  }, _callee2);
114
115
  }));
@@ -117,32 +118,32 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
117
118
  };
118
119
  }());
119
120
  _this.event_add("on_unarchive", "on_unarchive-sendmsg", /*#__PURE__*/function () {
120
- var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(srType) {
121
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
122
- while (1) switch (_context3.prev = _context3.next) {
121
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(srType) {
122
+ var _t3;
123
+ return _regenerator().w(function (_context3) {
124
+ while (1) switch (_context3.n) {
123
125
  case 0:
124
- _context3.t0 = srType;
125
- _context3.next = _context3.t0 === "normal" ? 3 : 6;
126
+ _t3 = srType;
127
+ _context3.n = _t3 === "normal" ? 1 : 3;
126
128
  break;
127
- case 3:
128
- _context3.next = 5;
129
+ case 1:
130
+ _context3.n = 2;
129
131
  return _global.gfunc.run_action("show_message", {
130
132
  message: "Restored",
131
133
  type: "success"
132
134
  });
133
- case 5:
134
- return _context3.abrupt("return", _context3.sent);
135
- case 6:
136
- _context3.next = 8;
135
+ case 2:
136
+ return _context3.a(2, _context3.v);
137
+ case 3:
138
+ _context3.n = 4;
137
139
  return _global.gfunc.run_action("show_message", {
138
140
  message: "Not restored (".concat(srType, ")"),
139
141
  type: "error"
140
142
  });
141
- case 8:
142
- return _context3.abrupt("return", _context3.sent);
143
- case 9:
144
- case "end":
145
- return _context3.stop();
143
+ case 4:
144
+ return _context3.a(2, _context3.v);
145
+ case 5:
146
+ return _context3.a(2);
146
147
  }
147
148
  }, _callee3);
148
149
  }));
@@ -151,32 +152,32 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
151
152
  };
152
153
  }());
153
154
  _this.event_add("on_delete", "on_delete-sendmsg", /*#__PURE__*/function () {
154
- var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(srType) {
155
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
156
- while (1) switch (_context4.prev = _context4.next) {
155
+ var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(srType) {
156
+ var _t4;
157
+ return _regenerator().w(function (_context4) {
158
+ while (1) switch (_context4.n) {
157
159
  case 0:
158
- _context4.t0 = srType;
159
- _context4.next = _context4.t0 === "normal" ? 3 : 6;
160
+ _t4 = srType;
161
+ _context4.n = _t4 === "normal" ? 1 : 3;
160
162
  break;
161
- case 3:
162
- _context4.next = 5;
163
+ case 1:
164
+ _context4.n = 2;
163
165
  return _global.gfunc.run_action("show_message", {
164
166
  message: "Deleted",
165
167
  type: "success"
166
168
  });
167
- case 5:
168
- return _context4.abrupt("return", _context4.sent);
169
- case 6:
170
- _context4.next = 8;
169
+ case 2:
170
+ return _context4.a(2, _context4.v);
171
+ case 3:
172
+ _context4.n = 4;
171
173
  return _global.gfunc.run_action("show_message", {
172
174
  message: "Not deleted (".concat(srType, ")"),
173
175
  type: "error"
174
176
  });
175
- case 8:
176
- return _context4.abrupt("return", _context4.sent);
177
- case 9:
178
- case "end":
179
- return _context4.stop();
177
+ case 4:
178
+ return _context4.a(2, _context4.v);
179
+ case 5:
180
+ return _context4.a(2);
180
181
  }
181
182
  }, _callee4);
182
183
  }));
@@ -206,32 +207,29 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
206
207
  /* -------------------------------------------------------------------------- */
207
208
  /* Meta data */
208
209
  /* -------------------------------------------------------------------------- */
209
- /**
210
- * Update meta value of this object , meta data is stored in meta_data variable
211
- * @param key
212
- * @param value
213
- * @param createIfNotExists should we create a new meta if key does not exist
214
- * @param sendChange
215
- * @returns
210
+ /**
211
+ * Update meta value of this object , meta data is stored in meta_data variable
212
+ * @param key
213
+ * @param value
214
+ * @param createIfNotExists should we create a new meta if key does not exist
215
+ * @param sendChange
216
+ * @returns
216
217
  */
217
218
  }, {
218
219
  key: "setMetaValue",
219
220
  value: (function () {
220
- var _setMetaValue = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(key, value) {
221
+ var _setMetaValue = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(key, value) {
221
222
  var _this$obj;
222
223
  var sendChange,
223
224
  _args5 = arguments;
224
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
225
- while (1) switch (_context5.prev = _context5.next) {
225
+ return _regenerator().w(function (_context5) {
226
+ while (1) switch (_context5.n) {
226
227
  case 0:
227
228
  sendChange = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : "auto";
228
- _context5.next = 3;
229
+ _context5.n = 1;
229
230
  return (_this$obj = this.obj) === null || _this$obj === void 0 ? void 0 : _this$obj.setMetaValue(key, value, sendChange);
230
- case 3:
231
- return _context5.abrupt("return", _context5.sent);
232
- case 4:
233
- case "end":
234
- return _context5.stop();
231
+ case 1:
232
+ return _context5.a(2, _context5.v);
235
233
  }
236
234
  }, _callee5, this);
237
235
  }));
@@ -250,25 +248,23 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
250
248
  }, {
251
249
  key: "get_deltaObject",
252
250
  value: (function () {
253
- var _get_deltaObject = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
251
+ var _get_deltaObject = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6() {
254
252
  var _this$obj3;
255
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
256
- while (1) switch (_context6.prev = _context6.next) {
253
+ var _t5;
254
+ return _regenerator().w(function (_context6) {
255
+ while (1) switch (_context6.n) {
257
256
  case 0:
258
- _context6.next = 2;
257
+ _context6.n = 1;
259
258
  return (_this$obj3 = this.obj) === null || _this$obj3 === void 0 ? void 0 : _this$obj3.get_deltaObject();
260
- case 2:
261
- _context6.t0 = _context6.sent;
262
- if (_context6.t0) {
263
- _context6.next = 5;
259
+ case 1:
260
+ _t5 = _context6.v;
261
+ if (_t5) {
262
+ _context6.n = 2;
264
263
  break;
265
264
  }
266
- _context6.t0 = {};
267
- case 5:
268
- return _context6.abrupt("return", _context6.t0);
269
- case 6:
270
- case "end":
271
- return _context6.stop();
265
+ _t5 = {};
266
+ case 2:
267
+ return _context6.a(2, _t5);
272
268
  }
273
269
  }, _callee6, this);
274
270
  }));
@@ -280,25 +276,23 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
280
276
  }, {
281
277
  key: "Save",
282
278
  value: (function () {
283
- var _Save = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
279
+ var _Save = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7() {
284
280
  var _this$obj4;
285
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
286
- while (1) switch (_context7.prev = _context7.next) {
281
+ var _t6;
282
+ return _regenerator().w(function (_context7) {
283
+ while (1) switch (_context7.n) {
287
284
  case 0:
288
- _context7.next = 2;
285
+ _context7.n = 1;
289
286
  return (_this$obj4 = this.obj) === null || _this$obj4 === void 0 ? void 0 : _this$obj4.Save();
290
- case 2:
291
- _context7.t0 = _context7.sent;
292
- if (_context7.t0) {
293
- _context7.next = 5;
287
+ case 1:
288
+ _t6 = _context7.v;
289
+ if (_t6) {
290
+ _context7.n = 2;
294
291
  break;
295
292
  }
296
- _context7.t0 = false;
297
- case 5:
298
- return _context7.abrupt("return", _context7.t0);
299
- case 6:
300
- case "end":
301
- return _context7.stop();
293
+ _t6 = false;
294
+ case 2:
295
+ return _context7.a(2, _t6);
302
296
  }
303
297
  }, _callee7, this);
304
298
  }));
@@ -310,18 +304,17 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
310
304
  }, {
311
305
  key: "New",
312
306
  value: function () {
313
- var _New = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
307
+ var _New = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8() {
314
308
  var cls;
315
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
316
- while (1) switch (_context8.prev = _context8.next) {
309
+ return _regenerator().w(function (_context8) {
310
+ while (1) switch (_context8.n) {
317
311
  case 0:
318
312
  cls = this.getObjectType();
319
313
  this.setObject(new cls());
320
- _context8.next = 4;
314
+ _context8.n = 1;
321
315
  return this.onNew();
322
- case 4:
323
- case "end":
324
- return _context8.stop();
316
+ case 1:
317
+ return _context8.a(2);
325
318
  }
326
319
  }, _callee8, this);
327
320
  }));
@@ -333,25 +326,23 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
333
326
  }, {
334
327
  key: "Delete",
335
328
  value: function () {
336
- var _Delete = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
329
+ var _Delete = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9() {
337
330
  var _this$obj5;
338
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
339
- while (1) switch (_context9.prev = _context9.next) {
331
+ var _t7;
332
+ return _regenerator().w(function (_context9) {
333
+ while (1) switch (_context9.n) {
340
334
  case 0:
341
- _context9.next = 2;
335
+ _context9.n = 1;
342
336
  return (_this$obj5 = this.obj) === null || _this$obj5 === void 0 ? void 0 : _this$obj5.Delete();
343
- case 2:
344
- _context9.t0 = _context9.sent;
345
- if (_context9.t0) {
346
- _context9.next = 5;
337
+ case 1:
338
+ _t7 = _context9.v;
339
+ if (_t7) {
340
+ _context9.n = 2;
347
341
  break;
348
342
  }
349
- _context9.t0 = false;
350
- case 5:
351
- return _context9.abrupt("return", _context9.t0);
352
- case 6:
353
- case "end":
354
- return _context9.stop();
343
+ _t7 = false;
344
+ case 2:
345
+ return _context9.a(2, _t7);
355
346
  }
356
347
  }, _callee9, this);
357
348
  }));
@@ -363,25 +354,23 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
363
354
  }, {
364
355
  key: "Lock",
365
356
  value: function () {
366
- var _Lock = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee0() {
357
+ var _Lock = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0() {
367
358
  var _this$obj6;
368
- return _regeneratorRuntime().wrap(function _callee0$(_context0) {
369
- while (1) switch (_context0.prev = _context0.next) {
359
+ var _t8;
360
+ return _regenerator().w(function (_context0) {
361
+ while (1) switch (_context0.n) {
370
362
  case 0:
371
- _context0.next = 2;
363
+ _context0.n = 1;
372
364
  return (_this$obj6 = this.obj) === null || _this$obj6 === void 0 ? void 0 : _this$obj6.Lock();
373
- case 2:
374
- _context0.t0 = _context0.sent;
375
- if (_context0.t0) {
376
- _context0.next = 5;
365
+ case 1:
366
+ _t8 = _context0.v;
367
+ if (_t8) {
368
+ _context0.n = 2;
377
369
  break;
378
370
  }
379
- _context0.t0 = false;
380
- case 5:
381
- return _context0.abrupt("return", _context0.t0);
382
- case 6:
383
- case "end":
384
- return _context0.stop();
371
+ _t8 = false;
372
+ case 2:
373
+ return _context0.a(2, _t8);
385
374
  }
386
375
  }, _callee0, this);
387
376
  }));
@@ -393,25 +382,23 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
393
382
  }, {
394
383
  key: "UnLock",
395
384
  value: function () {
396
- var _UnLock = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee1() {
385
+ var _UnLock = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1() {
397
386
  var _this$obj7;
398
- return _regeneratorRuntime().wrap(function _callee1$(_context1) {
399
- while (1) switch (_context1.prev = _context1.next) {
387
+ var _t9;
388
+ return _regenerator().w(function (_context1) {
389
+ while (1) switch (_context1.n) {
400
390
  case 0:
401
- _context1.next = 2;
391
+ _context1.n = 1;
402
392
  return (_this$obj7 = this.obj) === null || _this$obj7 === void 0 ? void 0 : _this$obj7.UnLock();
403
- case 2:
404
- _context1.t0 = _context1.sent;
405
- if (_context1.t0) {
406
- _context1.next = 5;
393
+ case 1:
394
+ _t9 = _context1.v;
395
+ if (_t9) {
396
+ _context1.n = 2;
407
397
  break;
408
398
  }
409
- _context1.t0 = false;
410
- case 5:
411
- return _context1.abrupt("return", _context1.t0);
412
- case 6:
413
- case "end":
414
- return _context1.stop();
399
+ _t9 = false;
400
+ case 2:
401
+ return _context1.a(2, _t9);
415
402
  }
416
403
  }, _callee1, this);
417
404
  }));
@@ -423,25 +410,23 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
423
410
  }, {
424
411
  key: "Archive",
425
412
  value: function () {
426
- var _Archive = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
413
+ var _Archive = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee10() {
427
414
  var _this$obj8;
428
- return _regeneratorRuntime().wrap(function _callee10$(_context10) {
429
- while (1) switch (_context10.prev = _context10.next) {
415
+ var _t0;
416
+ return _regenerator().w(function (_context10) {
417
+ while (1) switch (_context10.n) {
430
418
  case 0:
431
- _context10.next = 2;
419
+ _context10.n = 1;
432
420
  return (_this$obj8 = this.obj) === null || _this$obj8 === void 0 ? void 0 : _this$obj8.Archive();
433
- case 2:
434
- _context10.t0 = _context10.sent;
435
- if (_context10.t0) {
436
- _context10.next = 5;
421
+ case 1:
422
+ _t0 = _context10.v;
423
+ if (_t0) {
424
+ _context10.n = 2;
437
425
  break;
438
426
  }
439
- _context10.t0 = false;
440
- case 5:
441
- return _context10.abrupt("return", _context10.t0);
442
- case 6:
443
- case "end":
444
- return _context10.stop();
427
+ _t0 = false;
428
+ case 2:
429
+ return _context10.a(2, _t0);
445
430
  }
446
431
  }, _callee10, this);
447
432
  }));
@@ -453,25 +438,23 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
453
438
  }, {
454
439
  key: "UnArchive",
455
440
  value: function () {
456
- var _UnArchive = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
441
+ var _UnArchive = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee11() {
457
442
  var _this$obj9;
458
- return _regeneratorRuntime().wrap(function _callee11$(_context11) {
459
- while (1) switch (_context11.prev = _context11.next) {
443
+ var _t1;
444
+ return _regenerator().w(function (_context11) {
445
+ while (1) switch (_context11.n) {
460
446
  case 0:
461
- _context11.next = 2;
447
+ _context11.n = 1;
462
448
  return (_this$obj9 = this.obj) === null || _this$obj9 === void 0 ? void 0 : _this$obj9.UnArchive();
463
- case 2:
464
- _context11.t0 = _context11.sent;
465
- if (_context11.t0) {
466
- _context11.next = 5;
449
+ case 1:
450
+ _t1 = _context11.v;
451
+ if (_t1) {
452
+ _context11.n = 2;
467
453
  break;
468
454
  }
469
- _context11.t0 = false;
470
- case 5:
471
- return _context11.abrupt("return", _context11.t0);
472
- case 6:
473
- case "end":
474
- return _context11.stop();
455
+ _t1 = false;
456
+ case 2:
457
+ return _context11.a(2, _t1);
475
458
  }
476
459
  }, _callee11, this);
477
460
  }));
@@ -483,51 +466,48 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
483
466
  }, {
484
467
  key: "Load",
485
468
  value: (function () {
486
- var _Load = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(id) {
469
+ var _Load = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee12(id) {
487
470
  var classType, result_product;
488
- return _regeneratorRuntime().wrap(function _callee12$(_context12) {
489
- while (1) switch (_context12.prev = _context12.next) {
471
+ return _regenerator().w(function (_context12) {
472
+ while (1) switch (_context12.p = _context12.n) {
490
473
  case 0:
491
474
  if (id) {
492
- _context12.next = 2;
475
+ _context12.n = 1;
493
476
  break;
494
477
  }
495
- return _context12.abrupt("return");
496
- case 2:
497
- _context12.prev = 2;
478
+ return _context12.a(2);
479
+ case 1:
480
+ _context12.p = 1;
498
481
  this.event_run("on_process_start", true);
499
482
  classType = this.getObjectType();
500
483
  if (!classType) {
501
484
  console.error("[webobjectmanager]", "getObjectType failed to get the object_type.", "did you set the __object_type correctly ?");
502
485
  }
503
- _context12.next = 8;
486
+ _context12.n = 2;
504
487
  return classType.get_single(id, false);
505
- case 8:
506
- result_product = _context12.sent;
488
+ case 2:
489
+ result_product = _context12.v;
507
490
  if (!(result_product && _typeof(result_product) === "object" && _index.WebObject.getID(result_product))) {
508
- _context12.next = 15;
491
+ _context12.n = 4;
509
492
  break;
510
493
  }
511
494
  this.setObject(result_product);
512
- _context12.next = 13;
495
+ _context12.n = 3;
513
496
  return result_product.onLoad();
514
- case 13:
515
- _context12.next = 17;
497
+ case 3:
498
+ _context12.n = 5;
516
499
  break;
517
- case 15:
500
+ case 4:
518
501
  console.error("badobject:", id, result_product);
519
502
  _index.WebObject.addError(this.obj, "Invalid ".concat(this.__object_name), "The loaded ".concat(this.__object_name, " from website is invalid"), true);
520
- case 17:
521
- _context12.prev = 17;
503
+ case 5:
504
+ _context12.p = 5;
522
505
  this.event_run("on_process_end", true);
523
- return _context12.finish(17);
524
- case 20:
525
- return _context12.abrupt("return", this.getObject());
526
- case 21:
527
- case "end":
528
- return _context12.stop();
506
+ return _context12.f(5);
507
+ case 6:
508
+ return _context12.a(2, this.getObject());
529
509
  }
530
- }, _callee12, this, [[2,, 17, 20]]);
510
+ }, _callee12, this, [[1,, 5, 6]]);
531
511
  }));
532
512
  function Load(_x7) {
533
513
  return _Load.apply(this, arguments);
@@ -573,30 +553,27 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
573
553
  /* -------------------------------------------------------------------------- */
574
554
  /* Default Events */
575
555
  /* -------------------------------------------------------------------------- */
576
- /**
577
- * Use this when you delete Object
578
- * @param p
579
- * @returns
556
+ /**
557
+ * Use this when you delete Object
558
+ * @param p
559
+ * @returns
580
560
  */
581
561
  }, {
582
562
  key: "onDelete",
583
563
  value: (function () {
584
- var _onDelete = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
564
+ var _onDelete = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee13() {
585
565
  var srt;
586
- return _regeneratorRuntime().wrap(function _callee13$(_context13) {
587
- while (1) switch (_context13.prev = _context13.next) {
566
+ return _regenerator().w(function (_context13) {
567
+ while (1) switch (_context13.n) {
588
568
  case 0:
589
569
  srt = this.getSaveResultType();
590
- _context13.next = 3;
570
+ _context13.n = 1;
591
571
  return this.event_run("on_delete", srt);
592
- case 3:
593
- _context13.next = 5;
572
+ case 1:
573
+ _context13.n = 2;
594
574
  return this.event_run("on_after_delete", srt);
595
- case 5:
596
- return _context13.abrupt("return", true);
597
- case 6:
598
- case "end":
599
- return _context13.stop();
575
+ case 2:
576
+ return _context13.a(2, true);
600
577
  }
601
578
  }, _callee13, this);
602
579
  }));
@@ -608,22 +585,19 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
608
585
  }, {
609
586
  key: "onArchive",
610
587
  value: function () {
611
- var _onArchive = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
588
+ var _onArchive = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee14() {
612
589
  var srt;
613
- return _regeneratorRuntime().wrap(function _callee14$(_context14) {
614
- while (1) switch (_context14.prev = _context14.next) {
590
+ return _regenerator().w(function (_context14) {
591
+ while (1) switch (_context14.n) {
615
592
  case 0:
616
593
  srt = this.getSaveResultType();
617
- _context14.next = 3;
594
+ _context14.n = 1;
618
595
  return this.event_run("on_archive", srt);
619
- case 3:
620
- _context14.next = 5;
596
+ case 1:
597
+ _context14.n = 2;
621
598
  return this.event_run("on_after_archive", srt);
622
- case 5:
623
- return _context14.abrupt("return", true);
624
- case 6:
625
- case "end":
626
- return _context14.stop();
599
+ case 2:
600
+ return _context14.a(2, true);
627
601
  }
628
602
  }, _callee14, this);
629
603
  }));
@@ -635,22 +609,19 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
635
609
  }, {
636
610
  key: "onUnArchive",
637
611
  value: function () {
638
- var _onUnArchive = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
612
+ var _onUnArchive = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee15() {
639
613
  var srt;
640
- return _regeneratorRuntime().wrap(function _callee15$(_context15) {
641
- while (1) switch (_context15.prev = _context15.next) {
614
+ return _regenerator().w(function (_context15) {
615
+ while (1) switch (_context15.n) {
642
616
  case 0:
643
617
  srt = this.getSaveResultType();
644
- _context15.next = 3;
618
+ _context15.n = 1;
645
619
  return this.event_run("on_unarchive", srt);
646
- case 3:
647
- _context15.next = 5;
620
+ case 1:
621
+ _context15.n = 2;
648
622
  return this.event_run("on_after_unarchive", srt);
649
- case 5:
650
- return _context15.abrupt("return", true);
651
- case 6:
652
- case "end":
653
- return _context15.stop();
623
+ case 2:
624
+ return _context15.a(2, true);
654
625
  }
655
626
  }, _callee15, this);
656
627
  }));
@@ -662,22 +633,19 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
662
633
  }, {
663
634
  key: "onLock",
664
635
  value: function () {
665
- var _onLock = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
636
+ var _onLock = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee16() {
666
637
  var srt;
667
- return _regeneratorRuntime().wrap(function _callee16$(_context16) {
668
- while (1) switch (_context16.prev = _context16.next) {
638
+ return _regenerator().w(function (_context16) {
639
+ while (1) switch (_context16.n) {
669
640
  case 0:
670
641
  srt = this.getSaveResultType();
671
- _context16.next = 3;
642
+ _context16.n = 1;
672
643
  return this.event_run("on_lock", srt);
673
- case 3:
674
- _context16.next = 5;
644
+ case 1:
645
+ _context16.n = 2;
675
646
  return this.event_run("on_after_lock", srt);
676
- case 5:
677
- return _context16.abrupt("return", true);
678
- case 6:
679
- case "end":
680
- return _context16.stop();
647
+ case 2:
648
+ return _context16.a(2, true);
681
649
  }
682
650
  }, _callee16, this);
683
651
  }));
@@ -689,22 +657,19 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
689
657
  }, {
690
658
  key: "onUnLock",
691
659
  value: function () {
692
- var _onUnLock = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
660
+ var _onUnLock = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee17() {
693
661
  var srt;
694
- return _regeneratorRuntime().wrap(function _callee17$(_context17) {
695
- while (1) switch (_context17.prev = _context17.next) {
662
+ return _regenerator().w(function (_context17) {
663
+ while (1) switch (_context17.n) {
696
664
  case 0:
697
665
  srt = this.getSaveResultType();
698
- _context17.next = 3;
666
+ _context17.n = 1;
699
667
  return this.event_run("on_unlock", srt);
700
- case 3:
701
- _context17.next = 5;
668
+ case 1:
669
+ _context17.n = 2;
702
670
  return this.event_run("on_after_unlock", srt);
703
- case 5:
704
- return _context17.abrupt("return", true);
705
- case 6:
706
- case "end":
707
- return _context17.stop();
671
+ case 2:
672
+ return _context17.a(2, true);
708
673
  }
709
674
  }, _callee17, this);
710
675
  }));
@@ -713,41 +678,38 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
713
678
  }
714
679
  return onUnLock;
715
680
  }()
716
- /**
717
- * Use this when you load new Object
718
- * @param p
719
- * @returns
681
+ /**
682
+ * Use this when you load new Object
683
+ * @param p
684
+ * @returns
720
685
  */
721
686
  }, {
722
687
  key: "onNew",
723
688
  value: (function () {
724
- var _onNew = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
689
+ var _onNew = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee18() {
725
690
  var _this$obj1;
726
- return _regeneratorRuntime().wrap(function _callee18$(_context18) {
727
- while (1) switch (_context18.prev = _context18.next) {
691
+ return _regenerator().w(function (_context18) {
692
+ while (1) switch (_context18.n) {
728
693
  case 0:
729
694
  if (this.canModify) {
730
695
  (_this$obj1 = this.obj) === null || _this$obj1 === void 0 || _this$obj1.setOriginal();
731
696
  }
732
- _context18.next = 3;
697
+ _context18.n = 1;
733
698
  return this.event_run("on_new");
734
- case 3:
735
- _context18.next = 5;
699
+ case 1:
700
+ _context18.n = 2;
736
701
  return this.event_run("on_change", true);
737
- case 5:
738
- _context18.next = 7;
702
+ case 2:
703
+ _context18.n = 3;
739
704
  return this.event_run("on_after_new");
740
- case 7:
741
- _context18.next = 9;
705
+ case 3:
706
+ _context18.n = 4;
742
707
  return this.checkIsChanged();
743
- case 9:
744
- _context18.next = 11;
708
+ case 4:
709
+ _context18.n = 5;
745
710
  return Promise.resolve(true);
746
- case 11:
747
- return _context18.abrupt("return", _context18.sent);
748
- case 12:
749
- case "end":
750
- return _context18.stop();
711
+ case 5:
712
+ return _context18.a(2, _context18.v);
751
713
  }
752
714
  }, _callee18, this);
753
715
  }));
@@ -756,42 +718,39 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
756
718
  }
757
719
  return onNew;
758
720
  }()
759
- /**
760
- * Use this when you load data to the object
761
- * @param p
762
- * @returns
721
+ /**
722
+ * Use this when you load data to the object
723
+ * @param p
724
+ * @returns
763
725
  */
764
726
  )
765
727
  }, {
766
728
  key: "onLoad",
767
729
  value: (function () {
768
- var _onLoad = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
769
- return _regeneratorRuntime().wrap(function _callee19$(_context19) {
770
- while (1) switch (_context19.prev = _context19.next) {
730
+ var _onLoad = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee19() {
731
+ return _regenerator().w(function (_context19) {
732
+ while (1) switch (_context19.n) {
771
733
  case 0:
772
734
  if (this.canModify && this.obj) {
773
735
  this.obj.isDeleted = false;
774
736
  this.obj.setOriginal();
775
737
  }
776
- _context19.next = 3;
738
+ _context19.n = 1;
777
739
  return this.event_run("on_load");
778
- case 3:
779
- _context19.next = 5;
740
+ case 1:
741
+ _context19.n = 2;
780
742
  return this.event_run("on_change", true);
781
- case 5:
782
- _context19.next = 7;
743
+ case 2:
744
+ _context19.n = 3;
783
745
  return this.event_run("on_after_load");
784
- case 7:
785
- _context19.next = 9;
746
+ case 3:
747
+ _context19.n = 4;
786
748
  return this.event_run("on_load_finished");
787
- case 9:
788
- _context19.next = 11;
749
+ case 4:
750
+ _context19.n = 5;
789
751
  return this.checkIsChanged();
790
- case 11:
791
- return _context19.abrupt("return", true);
792
- case 12:
793
- case "end":
794
- return _context19.stop();
752
+ case 5:
753
+ return _context19.a(2, true);
795
754
  }
796
755
  }, _callee19, this);
797
756
  }));
@@ -800,37 +759,34 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
800
759
  }
801
760
  return onLoad;
802
761
  }()
803
- /**
804
- * Use this after succesful save to Database
805
- * @param p
806
- * @returns
762
+ /**
763
+ * Use this after succesful save to Database
764
+ * @param p
765
+ * @returns
807
766
  */
808
767
  )
809
768
  }, {
810
769
  key: "onSave",
811
770
  value: (function () {
812
- var _onSave = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee20() {
771
+ var _onSave = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee20() {
813
772
  var srt;
814
- return _regeneratorRuntime().wrap(function _callee20$(_context20) {
815
- while (1) switch (_context20.prev = _context20.next) {
773
+ return _regenerator().w(function (_context20) {
774
+ while (1) switch (_context20.n) {
816
775
  case 0:
817
776
  srt = this.getSaveResultType();
818
- _context20.next = 3;
777
+ _context20.n = 1;
819
778
  return this.event_run("on_save", srt);
820
- case 3:
821
- _context20.next = 5;
779
+ case 1:
780
+ _context20.n = 2;
822
781
  return this.event_run("on_change", true);
823
- case 5:
824
- _context20.next = 7;
782
+ case 2:
783
+ _context20.n = 3;
825
784
  return this.checkIsChanged();
826
- case 7:
827
- _context20.next = 9;
785
+ case 3:
786
+ _context20.n = 4;
828
787
  return Promise.resolve(true);
829
- case 9:
830
- return _context20.abrupt("return", _context20.sent);
831
- case 10:
832
- case "end":
833
- return _context20.stop();
788
+ case 4:
789
+ return _context20.a(2, _context20.v);
834
790
  }
835
791
  }, _callee20, this);
836
792
  }));
@@ -842,25 +798,22 @@ var WebObjectManager = exports.WebObjectManager = /*#__PURE__*/function (_Object
842
798
  }, {
843
799
  key: "onAfterSave",
844
800
  value: function () {
845
- var _onAfterSave = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee21() {
801
+ var _onAfterSave = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee21() {
846
802
  var srt;
847
- return _regeneratorRuntime().wrap(function _callee21$(_context21) {
848
- while (1) switch (_context21.prev = _context21.next) {
803
+ return _regenerator().w(function (_context21) {
804
+ while (1) switch (_context21.n) {
849
805
  case 0:
850
806
  srt = this.getSaveResultType();
851
- _context21.next = 3;
807
+ _context21.n = 1;
852
808
  return this.event_run("on_after_save", srt);
853
- case 3:
854
- _context21.next = 5;
809
+ case 1:
810
+ _context21.n = 2;
855
811
  return this.event_run("on_save_finished", srt);
856
- case 5:
857
- _context21.next = 7;
812
+ case 2:
813
+ _context21.n = 3;
858
814
  return Promise.resolve(true);
859
- case 7:
860
- return _context21.abrupt("return", _context21.sent);
861
- case 8:
862
- case "end":
863
- return _context21.stop();
815
+ case 3:
816
+ return _context21.a(2, _context21.v);
864
817
  }
865
818
  }, _callee21, this);
866
819
  }));