@azrico/webobject 1.2.31 → 1.2.33
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.
- package/README.md +52 -52
- package/dist/index.js +0 -2
- package/dist/src/WebObjects/ParentWebObject.js +5 -29
- package/dist/src/WebObjects/WebObject.d.ts +1 -1
- package/dist/src/WebObjects/WebObject.js +284 -462
- package/dist/src/WebObjects/WebObjectManager.d.ts +1 -0
- package/dist/src/WebObjects/WebObjectManager.js +134 -209
- package/dist/src/index.js +0 -18
- package/dist/src/structs/DummyObject.js +3 -22
- package/dist/src/structs/MapableObject.js +4 -35
- package/dist/src/structs/MetaObject.js +28 -74
- package/dist/src/structs/ObjectArray.d.ts +1 -1
- package/dist/src/structs/ObjectArray.js +5 -17
- package/dist/src/structs/ObjectManager.d.ts +4 -4
- package/dist/src/structs/ObjectManager.js +152 -295
- package/dist/src/structs/SimpleObject.d.ts +10 -10
- package/dist/src/structs/SimpleObject.js +190 -414
- package/package.json +1 -1
|
@@ -4,96 +4,58 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = exports.WebObject = void 0;
|
|
7
|
-
|
|
8
7
|
var _SimpleObject2 = _interopRequireDefault(require("../structs/SimpleObject"));
|
|
9
|
-
|
|
10
8
|
var _object = require("@azrico/object");
|
|
11
|
-
|
|
12
9
|
var _global = require("@azrico/global");
|
|
13
|
-
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
-
|
|
16
11
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
17
|
-
|
|
18
12
|
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; } } }; }
|
|
19
|
-
|
|
20
13
|
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); }
|
|
21
|
-
|
|
22
|
-
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; }
|
|
23
|
-
|
|
14
|
+
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; }
|
|
24
15
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25
|
-
|
|
26
16
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
27
|
-
|
|
28
|
-
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 exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
29
|
-
|
|
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 exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
30
18
|
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); } }
|
|
31
|
-
|
|
32
19
|
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); }); }; }
|
|
33
|
-
|
|
34
20
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
35
|
-
|
|
36
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
37
|
-
|
|
21
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
38
22
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
39
|
-
|
|
40
23
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
41
|
-
|
|
42
24
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
43
|
-
|
|
44
25
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
45
|
-
|
|
46
26
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
47
|
-
|
|
48
27
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
49
|
-
|
|
50
28
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
51
|
-
|
|
52
29
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
53
|
-
|
|
54
|
-
function
|
|
55
|
-
|
|
30
|
+
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; }
|
|
31
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
32
|
+
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); }
|
|
56
33
|
var WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
57
34
|
_inherits(WebObject, _SimpleObject);
|
|
58
|
-
|
|
59
35
|
var _super = _createSuper(WebObject);
|
|
60
|
-
|
|
61
36
|
function WebObject() {
|
|
62
37
|
var _this;
|
|
63
|
-
|
|
64
38
|
var is_readonly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
65
|
-
|
|
66
39
|
_classCallCheck(this, WebObject);
|
|
67
|
-
|
|
68
40
|
_this = _super.call(this, is_readonly);
|
|
69
|
-
|
|
70
41
|
_defineProperty(_assertThisInitialized(_this), "meta_data", void 0);
|
|
71
|
-
|
|
72
42
|
_defineProperty(_assertThisInitialized(_this), "_id", "");
|
|
73
|
-
|
|
74
43
|
_defineProperty(_assertThisInitialized(_this), "_created_date", "");
|
|
75
|
-
|
|
76
44
|
_defineProperty(_assertThisInitialized(_this), "get_webtype", function () {
|
|
77
45
|
return _this.__web_type || _this.get_webpath();
|
|
78
46
|
});
|
|
79
|
-
|
|
80
47
|
_defineProperty(_assertThisInitialized(_this), "get_webpath", function () {
|
|
81
48
|
return _this.__web_path;
|
|
82
49
|
});
|
|
83
|
-
|
|
84
50
|
_defineProperty(_assertThisInitialized(_this), "get_managerClass", function () {
|
|
85
51
|
return null;
|
|
86
52
|
});
|
|
87
|
-
|
|
88
53
|
_this.meta_data = [];
|
|
89
54
|
return _this;
|
|
90
55
|
}
|
|
91
56
|
/* -------------------------------------------------------------------------- */
|
|
92
|
-
|
|
93
57
|
/* Meta data */
|
|
94
|
-
|
|
95
58
|
/* -------------------------------------------------------------------------- */
|
|
96
|
-
|
|
97
59
|
/**
|
|
98
60
|
* Update meta value of this object , meta data is stored in meta_data variable
|
|
99
61
|
* @param key
|
|
@@ -102,25 +64,19 @@ var WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
102
64
|
* @param sendChange
|
|
103
65
|
* @returns
|
|
104
66
|
*/
|
|
105
|
-
|
|
106
|
-
|
|
107
67
|
_createClass(WebObject, [{
|
|
108
68
|
key: "setMetaValue",
|
|
109
69
|
value: function setMetaValue(key, value) {
|
|
110
70
|
var createIfNotExists = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
111
71
|
var sendChange = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "auto";
|
|
112
|
-
|
|
113
72
|
if (!this.canModify) {
|
|
114
73
|
if (this.__throw_errors) throw Error("Cant use setMetaValue on ".concat(key, " when on readonly mode"));else return false;
|
|
115
74
|
}
|
|
116
|
-
|
|
117
75
|
if (!key || typeof key != "string") {
|
|
118
76
|
if (this.__throw_errors) throw Error("Bad key at setMetaValue");else return false;
|
|
119
77
|
}
|
|
120
|
-
|
|
121
78
|
var old_value = WebObject.getMetaValue(this, key);
|
|
122
79
|
if ((0, _object.object_equals)(old_value, value)) return false; //same value, no changes
|
|
123
|
-
|
|
124
80
|
var old_metalist = (0, _object.to_array)(this.getValue("meta_data")).map(function (s) {
|
|
125
81
|
return (0, _object.object_shallow_clone)(s);
|
|
126
82
|
});
|
|
@@ -134,7 +90,6 @@ var WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
134
90
|
* @param key
|
|
135
91
|
* @returns meta object
|
|
136
92
|
*/
|
|
137
|
-
|
|
138
93
|
}, {
|
|
139
94
|
key: "getMeta",
|
|
140
95
|
value: function getMeta(key) {
|
|
@@ -145,7 +100,6 @@ var WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
145
100
|
* @param key
|
|
146
101
|
* @returns value or undefined
|
|
147
102
|
*/
|
|
148
|
-
|
|
149
103
|
}, {
|
|
150
104
|
key: "getMetaValue",
|
|
151
105
|
value: function getMetaValue(key) {
|
|
@@ -157,45 +111,35 @@ var WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
157
111
|
* @param key
|
|
158
112
|
* @returns meta object
|
|
159
113
|
*/
|
|
160
|
-
|
|
161
114
|
}, {
|
|
162
115
|
key: "Save",
|
|
163
116
|
value:
|
|
164
117
|
/* -------------------------------------------------------------------------- */
|
|
165
|
-
|
|
166
118
|
/* Save */
|
|
167
|
-
|
|
168
119
|
/* -------------------------------------------------------------------------- */
|
|
169
120
|
function () {
|
|
170
121
|
var _Save = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
171
122
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
172
|
-
while (1) {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
case 5:
|
|
188
|
-
case "end":
|
|
189
|
-
return _context.stop();
|
|
190
|
-
}
|
|
123
|
+
while (1) switch (_context.prev = _context.next) {
|
|
124
|
+
case 0:
|
|
125
|
+
if (!this.__throw_errors) {
|
|
126
|
+
_context.next = 2;
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
throw new Error("Save not implented");
|
|
130
|
+
case 2:
|
|
131
|
+
WebObject.addError(this, "Save not implented", "NOSAVE", true);
|
|
132
|
+
this.setSaveResult(false, "canceled");
|
|
133
|
+
return _context.abrupt("return", false);
|
|
134
|
+
case 5:
|
|
135
|
+
case "end":
|
|
136
|
+
return _context.stop();
|
|
191
137
|
}
|
|
192
138
|
}, _callee, this);
|
|
193
139
|
}));
|
|
194
|
-
|
|
195
140
|
function Save() {
|
|
196
141
|
return _Save.apply(this, arguments);
|
|
197
142
|
}
|
|
198
|
-
|
|
199
143
|
return Save;
|
|
200
144
|
}()
|
|
201
145
|
}, {
|
|
@@ -203,37 +147,28 @@ var WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
203
147
|
value: function () {
|
|
204
148
|
var _Delete = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
205
149
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
206
|
-
while (1) {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
case 5:
|
|
222
|
-
case "end":
|
|
223
|
-
return _context2.stop();
|
|
224
|
-
}
|
|
150
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
151
|
+
case 0:
|
|
152
|
+
if (!this.__throw_errors) {
|
|
153
|
+
_context2.next = 2;
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
throw new Error("Delete not implented");
|
|
157
|
+
case 2:
|
|
158
|
+
WebObject.addError(this, "Delete not implented", "NOSAVE", true);
|
|
159
|
+
this.setSaveResult(false, "canceled");
|
|
160
|
+
return _context2.abrupt("return", false);
|
|
161
|
+
case 5:
|
|
162
|
+
case "end":
|
|
163
|
+
return _context2.stop();
|
|
225
164
|
}
|
|
226
165
|
}, _callee2, this);
|
|
227
166
|
}));
|
|
228
|
-
|
|
229
167
|
function Delete() {
|
|
230
168
|
return _Delete.apply(this, arguments);
|
|
231
169
|
}
|
|
232
|
-
|
|
233
170
|
return Delete;
|
|
234
|
-
}()
|
|
235
|
-
/* -------------------------------------------------------------------------- */
|
|
236
|
-
|
|
171
|
+
}() /* -------------------------------------------------------------------------- */
|
|
237
172
|
}, {
|
|
238
173
|
key: "canSave",
|
|
239
174
|
value: function canSave(deltaObj) {
|
|
@@ -257,184 +192,137 @@ var WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
257
192
|
function () {
|
|
258
193
|
var _get_deltaObject = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(p) {
|
|
259
194
|
var _this2 = this;
|
|
260
|
-
|
|
261
195
|
var final_object, isChild, useDelta, allProperties, chkChangables, useExtraProps, dlt, allkeys, changableKeys, parseObj, _parseObj, _iterator, _step, key;
|
|
262
|
-
|
|
263
196
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
264
|
-
while (1) {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
_parseObj = function
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
_context4.next = 2;
|
|
276
|
-
break;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
return _context4.abrupt("return", undefined);
|
|
280
|
-
|
|
281
|
-
case 2:
|
|
282
|
-
if (!Array.isArray(obj)) {
|
|
283
|
-
_context4.next = 6;
|
|
284
|
-
break;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
_context4.next = 5;
|
|
288
|
-
return Promise.all(obj.map( /*#__PURE__*/function () {
|
|
289
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(r) {
|
|
290
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
291
|
-
while (1) {
|
|
292
|
-
switch (_context3.prev = _context3.next) {
|
|
293
|
-
case 0:
|
|
294
|
-
_context3.next = 2;
|
|
295
|
-
return parseObj(r);
|
|
296
|
-
|
|
297
|
-
case 2:
|
|
298
|
-
return _context3.abrupt("return", _context3.sent);
|
|
299
|
-
|
|
300
|
-
case 3:
|
|
301
|
-
case "end":
|
|
302
|
-
return _context3.stop();
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
}, _callee3);
|
|
306
|
-
}));
|
|
307
|
-
|
|
308
|
-
return function (_x3) {
|
|
309
|
-
return _ref.apply(this, arguments);
|
|
310
|
-
};
|
|
311
|
-
}()));
|
|
312
|
-
|
|
313
|
-
case 5:
|
|
314
|
-
return _context4.abrupt("return", _context4.sent);
|
|
315
|
-
|
|
316
|
-
case 6:
|
|
317
|
-
if (!(obj instanceof WebObject && typeof obj.get_deltaObject === "function")) {
|
|
318
|
-
_context4.next = 15;
|
|
319
|
-
break;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
_context4.next = 9;
|
|
323
|
-
return obj.get_deltaObject(_objectSpread(_objectSpread({}, p), {}, {
|
|
324
|
-
isChild: true
|
|
325
|
-
}));
|
|
326
|
-
|
|
327
|
-
case 9:
|
|
328
|
-
newobj_dlt = _context4.sent;
|
|
329
|
-
|
|
330
|
-
if ((0, _object.object_isEmpty)(newobj_dlt)) {
|
|
331
|
-
_context4.next = 14;
|
|
332
|
-
break;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
return _context4.abrupt("return", newobj_dlt);
|
|
336
|
-
|
|
337
|
-
case 14:
|
|
338
|
-
return _context4.abrupt("return", obj);
|
|
339
|
-
|
|
340
|
-
case 15:
|
|
341
|
-
return _context4.abrupt("return", obj);
|
|
342
|
-
|
|
343
|
-
case 16:
|
|
344
|
-
case "end":
|
|
345
|
-
return _context4.stop();
|
|
197
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
198
|
+
case 0:
|
|
199
|
+
_parseObj = function _parseObj3() {
|
|
200
|
+
_parseObj = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(obj) {
|
|
201
|
+
var newobj_dlt;
|
|
202
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
203
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
204
|
+
case 0:
|
|
205
|
+
if (!(obj == null)) {
|
|
206
|
+
_context4.next = 2;
|
|
207
|
+
break;
|
|
346
208
|
}
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
209
|
+
return _context4.abrupt("return", undefined);
|
|
210
|
+
case 2:
|
|
211
|
+
if (!Array.isArray(obj)) {
|
|
212
|
+
_context4.next = 6;
|
|
213
|
+
break;
|
|
214
|
+
}
|
|
215
|
+
_context4.next = 5;
|
|
216
|
+
return Promise.all(obj.map( /*#__PURE__*/function () {
|
|
217
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(r) {
|
|
218
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
219
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
220
|
+
case 0:
|
|
221
|
+
_context3.next = 2;
|
|
222
|
+
return parseObj(r);
|
|
223
|
+
case 2:
|
|
224
|
+
return _context3.abrupt("return", _context3.sent);
|
|
225
|
+
case 3:
|
|
226
|
+
case "end":
|
|
227
|
+
return _context3.stop();
|
|
228
|
+
}
|
|
229
|
+
}, _callee3);
|
|
230
|
+
}));
|
|
231
|
+
return function (_x3) {
|
|
232
|
+
return _ref.apply(this, arguments);
|
|
233
|
+
};
|
|
234
|
+
}()));
|
|
235
|
+
case 5:
|
|
236
|
+
return _context4.abrupt("return", _context4.sent);
|
|
237
|
+
case 6:
|
|
238
|
+
if (!(obj instanceof WebObject && typeof obj.get_deltaObject === "function")) {
|
|
239
|
+
_context4.next = 15;
|
|
240
|
+
break;
|
|
241
|
+
}
|
|
242
|
+
_context4.next = 9;
|
|
243
|
+
return obj.get_deltaObject(_objectSpread(_objectSpread({}, p), {}, {
|
|
244
|
+
isChild: true
|
|
245
|
+
}));
|
|
246
|
+
case 9:
|
|
247
|
+
newobj_dlt = _context4.sent;
|
|
248
|
+
if ((0, _object.object_isEmpty)(newobj_dlt)) {
|
|
249
|
+
_context4.next = 14;
|
|
250
|
+
break;
|
|
251
|
+
}
|
|
252
|
+
return _context4.abrupt("return", newobj_dlt);
|
|
253
|
+
case 14:
|
|
254
|
+
return _context4.abrupt("return", obj);
|
|
255
|
+
case 15:
|
|
256
|
+
return _context4.abrupt("return", obj);
|
|
257
|
+
case 16:
|
|
258
|
+
case "end":
|
|
259
|
+
return _context4.stop();
|
|
260
|
+
}
|
|
261
|
+
}, _callee4);
|
|
262
|
+
}));
|
|
263
|
+
return _parseObj.apply(this, arguments);
|
|
264
|
+
};
|
|
265
|
+
parseObj = function _parseObj2(_x2) {
|
|
266
|
+
return _parseObj.apply(this, arguments);
|
|
267
|
+
};
|
|
268
|
+
if (!p) p = {};
|
|
269
|
+
final_object = {}; //@ts-ignore
|
|
270
|
+
isChild = Boolean(p.isChild || p.ischild); //@ts-ignore
|
|
271
|
+
useDelta = this.__use_delta || Boolean(p.useDelta || p.usedelta); //@ts-ignore
|
|
272
|
+
allProperties = Boolean(p.allProperties || p.allproperties);
|
|
273
|
+
chkChangables = this.__changeables != null || this.__unchangeables != null;
|
|
274
|
+
useExtraProps = Boolean(p.extraProperties); //child objects usually dont update their __delta, so we read info from all of its properties
|
|
275
|
+
dlt = allProperties || !useDelta && isChild && chkChangables ? _objectSpread({}, this.allproperties) : _objectSpread({}, this.__delta);
|
|
276
|
+
allkeys = Object.keys(dlt);
|
|
277
|
+
changableKeys = chkChangables ? allkeys.filter(function (s) {
|
|
278
|
+
return _SimpleObject2["default"].canChangeKey(_this2, s, useExtraProps);
|
|
279
|
+
}) : allkeys;
|
|
280
|
+
_iterator = _createForOfIteratorHelper(changableKeys);
|
|
281
|
+
_context5.prev = 13;
|
|
282
|
+
_iterator.s();
|
|
283
|
+
case 15:
|
|
284
|
+
if ((_step = _iterator.n()).done) {
|
|
285
|
+
_context5.next = 22;
|
|
397
286
|
break;
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
287
|
+
}
|
|
288
|
+
key = _step.value;
|
|
289
|
+
_context5.next = 19;
|
|
290
|
+
return parseObj(dlt[key]);
|
|
291
|
+
case 19:
|
|
292
|
+
final_object[key] = _context5.sent;
|
|
293
|
+
case 20:
|
|
294
|
+
_context5.next = 15;
|
|
295
|
+
break;
|
|
296
|
+
case 22:
|
|
297
|
+
_context5.next = 27;
|
|
298
|
+
break;
|
|
299
|
+
case 24:
|
|
300
|
+
_context5.prev = 24;
|
|
301
|
+
_context5.t0 = _context5["catch"](13);
|
|
302
|
+
_iterator.e(_context5.t0);
|
|
303
|
+
case 27:
|
|
304
|
+
_context5.prev = 27;
|
|
305
|
+
_iterator.f();
|
|
306
|
+
return _context5.finish(27);
|
|
307
|
+
case 30:
|
|
308
|
+
if (allProperties) {
|
|
309
|
+
final_object["_id"] = this.getID();
|
|
310
|
+
final_object["_index_value"] = this.getIndex();
|
|
311
|
+
final_object["_index_key"] = this["_index_key"];
|
|
312
|
+
final_object["_created_date"] = this["_created_date"];
|
|
313
|
+
}
|
|
314
|
+
return _context5.abrupt("return", final_object);
|
|
315
|
+
case 32:
|
|
316
|
+
case "end":
|
|
317
|
+
return _context5.stop();
|
|
426
318
|
}
|
|
427
319
|
}, _callee5, this, [[13, 24, 27, 30]]);
|
|
428
320
|
}));
|
|
429
|
-
|
|
430
321
|
function get_deltaObject(_x) {
|
|
431
322
|
return _get_deltaObject.apply(this, arguments);
|
|
432
323
|
}
|
|
433
|
-
|
|
434
324
|
return get_deltaObject;
|
|
435
|
-
}()
|
|
436
|
-
/* --------------------------------- Getters -------------------------------- */
|
|
437
|
-
|
|
325
|
+
}() /* --------------------------------- Getters -------------------------------- */
|
|
438
326
|
}, {
|
|
439
327
|
key: "__web_path",
|
|
440
328
|
get: function get() {
|
|
@@ -452,43 +340,32 @@ var WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
452
340
|
}
|
|
453
341
|
}, {
|
|
454
342
|
key: "onLoad",
|
|
455
|
-
value:
|
|
456
|
-
/* -------------------------------------------------------------------------- */
|
|
457
|
-
function () {
|
|
343
|
+
value: /* -------------------------------------------------------------------------- */function () {
|
|
458
344
|
var _onLoad = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
459
345
|
var _this$manager;
|
|
460
|
-
|
|
461
346
|
var _len,
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
347
|
+
p,
|
|
348
|
+
_key,
|
|
349
|
+
_args6 = arguments;
|
|
466
350
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
467
|
-
while (1) {
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
case 4:
|
|
481
|
-
case "end":
|
|
482
|
-
return _context6.stop();
|
|
483
|
-
}
|
|
351
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
352
|
+
case 0:
|
|
353
|
+
for (_len = _args6.length, p = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
354
|
+
p[_key] = _args6[_key];
|
|
355
|
+
}
|
|
356
|
+
_context6.next = 3;
|
|
357
|
+
return (_this$manager = this.manager) === null || _this$manager === void 0 ? void 0 : _this$manager.onLoad.apply(_this$manager, p);
|
|
358
|
+
case 3:
|
|
359
|
+
return _context6.abrupt("return", _context6.sent);
|
|
360
|
+
case 4:
|
|
361
|
+
case "end":
|
|
362
|
+
return _context6.stop();
|
|
484
363
|
}
|
|
485
364
|
}, _callee6, this);
|
|
486
365
|
}));
|
|
487
|
-
|
|
488
366
|
function onLoad() {
|
|
489
367
|
return _onLoad.apply(this, arguments);
|
|
490
368
|
}
|
|
491
|
-
|
|
492
369
|
return onLoad;
|
|
493
370
|
}()
|
|
494
371
|
}, {
|
|
@@ -496,38 +373,29 @@ var WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
496
373
|
value: function () {
|
|
497
374
|
var _onSave = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
498
375
|
var _this$manager2;
|
|
499
|
-
|
|
500
376
|
var _len2,
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
377
|
+
p,
|
|
378
|
+
_key2,
|
|
379
|
+
_args7 = arguments;
|
|
505
380
|
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
506
|
-
while (1) {
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
case 4:
|
|
520
|
-
case "end":
|
|
521
|
-
return _context7.stop();
|
|
522
|
-
}
|
|
381
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
382
|
+
case 0:
|
|
383
|
+
for (_len2 = _args7.length, p = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
384
|
+
p[_key2] = _args7[_key2];
|
|
385
|
+
}
|
|
386
|
+
_context7.next = 3;
|
|
387
|
+
return (_this$manager2 = this.manager) === null || _this$manager2 === void 0 ? void 0 : _this$manager2.onSave.apply(_this$manager2, p);
|
|
388
|
+
case 3:
|
|
389
|
+
return _context7.abrupt("return", _context7.sent);
|
|
390
|
+
case 4:
|
|
391
|
+
case "end":
|
|
392
|
+
return _context7.stop();
|
|
523
393
|
}
|
|
524
394
|
}, _callee7, this);
|
|
525
395
|
}));
|
|
526
|
-
|
|
527
396
|
function onSave() {
|
|
528
397
|
return _onSave.apply(this, arguments);
|
|
529
398
|
}
|
|
530
|
-
|
|
531
399
|
return onSave;
|
|
532
400
|
}()
|
|
533
401
|
}, {
|
|
@@ -535,58 +403,45 @@ var WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
535
403
|
value: function () {
|
|
536
404
|
var _onNew = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
537
405
|
var _this$manager3;
|
|
538
|
-
|
|
539
406
|
var _len3,
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
407
|
+
p,
|
|
408
|
+
_key3,
|
|
409
|
+
_args8 = arguments;
|
|
544
410
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
545
|
-
while (1) {
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
case 4:
|
|
559
|
-
case "end":
|
|
560
|
-
return _context8.stop();
|
|
561
|
-
}
|
|
411
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
412
|
+
case 0:
|
|
413
|
+
for (_len3 = _args8.length, p = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
414
|
+
p[_key3] = _args8[_key3];
|
|
415
|
+
}
|
|
416
|
+
_context8.next = 3;
|
|
417
|
+
return (_this$manager3 = this.manager) === null || _this$manager3 === void 0 ? void 0 : _this$manager3.onNew.apply(_this$manager3, p);
|
|
418
|
+
case 3:
|
|
419
|
+
return _context8.abrupt("return", _context8.sent);
|
|
420
|
+
case 4:
|
|
421
|
+
case "end":
|
|
422
|
+
return _context8.stop();
|
|
562
423
|
}
|
|
563
424
|
}, _callee8, this);
|
|
564
425
|
}));
|
|
565
|
-
|
|
566
426
|
function onNew() {
|
|
567
427
|
return _onNew.apply(this, arguments);
|
|
568
428
|
}
|
|
569
|
-
|
|
570
429
|
return onNew;
|
|
571
430
|
}()
|
|
572
431
|
/* -------------------------------------------------------------------------- */
|
|
573
|
-
|
|
574
432
|
/**
|
|
575
433
|
* get a single web object
|
|
576
434
|
* default order of parameters : search,readonly,fetchID
|
|
577
435
|
*/
|
|
578
|
-
|
|
579
436
|
}], [{
|
|
580
437
|
key: "getMeta",
|
|
581
438
|
value: function getMeta(o, key) {
|
|
582
439
|
if (o == null) return null;
|
|
583
440
|
if (!key || typeof key != "string") return undefined;
|
|
584
441
|
var metalist = [];
|
|
585
|
-
|
|
586
442
|
if (_typeof(o) === "object") {
|
|
587
443
|
metalist = typeof o.getValue === "function" ? o.getValue("meta_data") : o.meta_data;
|
|
588
444
|
}
|
|
589
|
-
|
|
590
445
|
return (0, _object.getInArray)(metalist, "key", key);
|
|
591
446
|
}
|
|
592
447
|
/**
|
|
@@ -595,23 +450,19 @@ var WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
595
450
|
* @param key
|
|
596
451
|
* @returns value or undefined
|
|
597
452
|
*/
|
|
598
|
-
|
|
599
453
|
}, {
|
|
600
454
|
key: "getMetaValue",
|
|
601
455
|
value: function getMetaValue(o, key) {
|
|
602
456
|
var _WebObject$getMeta;
|
|
603
|
-
|
|
604
457
|
return (_WebObject$getMeta = WebObject.getMeta(o, key)) === null || _WebObject$getMeta === void 0 ? void 0 : _WebObject$getMeta.value;
|
|
605
458
|
}
|
|
606
459
|
}, {
|
|
607
460
|
key: "isResultValid",
|
|
608
461
|
value: function isResultValid(result_object) {
|
|
609
462
|
if ((0, _object.object_isEmpty)(result_object)) return false;
|
|
610
|
-
|
|
611
463
|
if ((0, _object.object_isTrue)(result_object.acknowledged)) {
|
|
612
464
|
return true;
|
|
613
465
|
}
|
|
614
|
-
|
|
615
466
|
return false;
|
|
616
467
|
}
|
|
617
468
|
}, {
|
|
@@ -624,151 +475,122 @@ var WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
624
475
|
value: function () {
|
|
625
476
|
var _get_single = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
626
477
|
var _len4,
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
478
|
+
p,
|
|
479
|
+
_key4,
|
|
480
|
+
search,
|
|
481
|
+
readonly,
|
|
482
|
+
fetchID,
|
|
483
|
+
res,
|
|
484
|
+
params,
|
|
485
|
+
_args9 = arguments;
|
|
636
486
|
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
637
|
-
while (1) {
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
if (!(0, _object.object_isEmpty)(search)) {
|
|
649
|
-
_context9.next = 6;
|
|
650
|
-
break;
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
return _context9.abrupt("return", undefined);
|
|
654
|
-
|
|
655
|
-
case 6:
|
|
656
|
-
params = {};
|
|
657
|
-
params.context = readonly ? "view" : "edit";
|
|
658
|
-
_context9.t0 = _typeof(search);
|
|
659
|
-
_context9.next = _context9.t0 === "string" ? 11 : _context9.t0 === "number" ? 11 : _context9.t0 === "object" ? 19 : 19;
|
|
487
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
488
|
+
case 0:
|
|
489
|
+
for (_len4 = _args9.length, p = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
490
|
+
p[_key4] = _args9[_key4];
|
|
491
|
+
}
|
|
492
|
+
search = p.shift();
|
|
493
|
+
readonly = p.shift();
|
|
494
|
+
fetchID = p.shift();
|
|
495
|
+
if (!(0, _object.object_isEmpty)(search)) {
|
|
496
|
+
_context9.next = 6;
|
|
660
497
|
break;
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
498
|
+
}
|
|
499
|
+
return _context9.abrupt("return", undefined);
|
|
500
|
+
case 6:
|
|
501
|
+
params = {};
|
|
502
|
+
params.context = readonly ? "view" : "edit";
|
|
503
|
+
_context9.t0 = _typeof(search);
|
|
504
|
+
_context9.next = _context9.t0 === "string" ? 11 : _context9.t0 === "number" ? 11 : _context9.t0 === "object" ? 19 : 19;
|
|
505
|
+
break;
|
|
506
|
+
case 11:
|
|
507
|
+
search = String(search);
|
|
508
|
+
_context9.t1 = this;
|
|
509
|
+
_context9.t2 = this;
|
|
510
|
+
_context9.next = 16;
|
|
511
|
+
return _global.gfunc.run_action("get", this.__web_path + "/" + search, params, {
|
|
512
|
+
fetchID: fetchID
|
|
513
|
+
});
|
|
514
|
+
case 16:
|
|
515
|
+
_context9.t3 = _context9.sent;
|
|
516
|
+
res = _context9.t1.ensure.call(_context9.t1, _context9.t2, _context9.t3);
|
|
517
|
+
return _context9.abrupt("break", 25);
|
|
518
|
+
case 19:
|
|
519
|
+
_context9.t4 = _object.object_first;
|
|
520
|
+
_context9.next = 22;
|
|
521
|
+
return this.get_list(search, readonly, fetchID);
|
|
522
|
+
case 22:
|
|
523
|
+
_context9.t5 = _context9.sent;
|
|
524
|
+
res = (0, _context9.t4)(_context9.t5);
|
|
525
|
+
return _context9.abrupt("break", 25);
|
|
526
|
+
case 25:
|
|
527
|
+
WebObject.setReadonly(res, readonly);
|
|
528
|
+
return _context9.abrupt("return", res);
|
|
529
|
+
case 27:
|
|
530
|
+
case "end":
|
|
531
|
+
return _context9.stop();
|
|
694
532
|
}
|
|
695
533
|
}, _callee9, this);
|
|
696
534
|
}));
|
|
697
|
-
|
|
698
535
|
function get_single() {
|
|
699
536
|
return _get_single.apply(this, arguments);
|
|
700
537
|
}
|
|
701
|
-
|
|
702
538
|
return get_single;
|
|
703
539
|
}()
|
|
704
540
|
/**
|
|
705
541
|
* Get a list of web objects
|
|
706
542
|
* default order of parameters : search,readonly,fetchID
|
|
707
543
|
*/
|
|
708
|
-
|
|
709
544
|
}, {
|
|
710
545
|
key: "get_list",
|
|
711
546
|
value: function () {
|
|
712
547
|
var _get_list = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
|
|
713
548
|
var _len5,
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
549
|
+
p,
|
|
550
|
+
_key5,
|
|
551
|
+
search,
|
|
552
|
+
readonly,
|
|
553
|
+
fetchID,
|
|
554
|
+
result_items,
|
|
555
|
+
selftype,
|
|
556
|
+
res,
|
|
557
|
+
_args10 = arguments;
|
|
724
558
|
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
725
|
-
while (1) {
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
case 12:
|
|
749
|
-
case "end":
|
|
750
|
-
return _context10.stop();
|
|
751
|
-
}
|
|
559
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
560
|
+
case 0:
|
|
561
|
+
for (_len5 = _args10.length, p = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
562
|
+
p[_key5] = _args10[_key5];
|
|
563
|
+
}
|
|
564
|
+
search = p.shift();
|
|
565
|
+
readonly = p.shift();
|
|
566
|
+
fetchID = p.shift();
|
|
567
|
+
if (!search) search = {};
|
|
568
|
+
_context10.next = 7;
|
|
569
|
+
return _global.gfunc.run_action("get", this.__web_path, search, {
|
|
570
|
+
fetchID: fetchID
|
|
571
|
+
});
|
|
572
|
+
case 7:
|
|
573
|
+
result_items = _context10.sent;
|
|
574
|
+
selftype = this.prototype;
|
|
575
|
+
res = WebObject.map_rowindex(WebObject.mapto(selftype, result_items, readonly));
|
|
576
|
+
WebObject.setReadonly(res, readonly);
|
|
577
|
+
return _context10.abrupt("return", res);
|
|
578
|
+
case 12:
|
|
579
|
+
case "end":
|
|
580
|
+
return _context10.stop();
|
|
752
581
|
}
|
|
753
582
|
}, _callee10, this);
|
|
754
583
|
}));
|
|
755
|
-
|
|
756
584
|
function get_list() {
|
|
757
585
|
return _get_list.apply(this, arguments);
|
|
758
586
|
}
|
|
759
|
-
|
|
760
587
|
return get_list;
|
|
761
588
|
}()
|
|
762
589
|
}]);
|
|
763
|
-
|
|
764
590
|
return WebObject;
|
|
765
591
|
}(_SimpleObject2["default"]);
|
|
766
|
-
|
|
767
592
|
exports.WebObject = WebObject;
|
|
768
|
-
|
|
769
593
|
_defineProperty(WebObject, "__web_path", "");
|
|
770
|
-
|
|
771
594
|
_defineProperty(WebObject, "__web_type", "");
|
|
772
|
-
|
|
773
595
|
var _default = WebObject;
|
|
774
596
|
exports["default"] = _default;
|