@azrico/webobject 1.4.128 → 1.4.130
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 +9 -9
- package/dist/src/WebObjects/ParentWebObject.js +10 -13
- package/dist/src/WebObjects/WebObject.js +177 -109
- package/dist/src/WebObjects/WebObjectManager.js +128 -74
- package/dist/src/structs/DummyObject.js +9 -12
- package/dist/src/structs/MapableObject.js +10 -13
- package/dist/src/structs/MetaObject.js +34 -25
- package/dist/src/structs/ObjectArray.js +4 -6
- package/dist/src/structs/ObjectManager.d.ts +3 -3
- package/dist/src/structs/ObjectManager.js +102 -59
- package/dist/src/structs/ObjectWithTemp.js +12 -10
- package/dist/src/structs/SimpleObject.d.ts +3 -4
- package/dist/src/structs/SimpleObject.js +155 -86
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
# deus-object
|
|
2
|
-
|
|
3
|
-
> Some useful object functions
|
|
4
|
-
|
|
5
|
-
## Install
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
yarn add @azrico/webobject
|
|
9
|
-
```
|
|
1
|
+
# deus-object
|
|
2
|
+
|
|
3
|
+
> Some useful object functions
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
yarn add @azrico/webobject
|
|
9
|
+
```
|
|
@@ -10,27 +10,26 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
10
10
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11
11
|
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); } }
|
|
12
12
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
13
|
-
function
|
|
14
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
15
|
-
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); }; }
|
|
13
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
16
14
|
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); }
|
|
17
|
-
function
|
|
18
|
-
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; } }
|
|
15
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
16
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
17
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
18
|
+
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); }
|
|
19
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
20
20
|
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; }
|
|
21
|
-
function _toPropertyKey(
|
|
22
|
-
function _toPrimitive(
|
|
21
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
22
|
+
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); }
|
|
23
23
|
/**
|
|
24
24
|
* This web object contains some more webobjects
|
|
25
25
|
*/
|
|
26
|
-
var ParentWebObject = /*#__PURE__*/function (_WebObject) {
|
|
26
|
+
var ParentWebObject = exports.ParentWebObject = /*#__PURE__*/function (_WebObject) {
|
|
27
27
|
_inherits(ParentWebObject, _WebObject);
|
|
28
|
-
var _super = _createSuper(ParentWebObject);
|
|
29
28
|
function ParentWebObject() {
|
|
30
29
|
var _this;
|
|
31
30
|
var is_readonly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
32
31
|
_classCallCheck(this, ParentWebObject);
|
|
33
|
-
_this =
|
|
32
|
+
_this = _callSuper(this, ParentWebObject, [is_readonly]);
|
|
34
33
|
_defineProperty(_assertThisInitialized(_this), "__children", undefined);
|
|
35
34
|
return _this;
|
|
36
35
|
}
|
|
@@ -48,6 +47,4 @@ var ParentWebObject = /*#__PURE__*/function (_WebObject) {
|
|
|
48
47
|
}]);
|
|
49
48
|
return ParentWebObject;
|
|
50
49
|
}(_WebObject2["default"]);
|
|
51
|
-
exports
|
|
52
|
-
var _default = ParentWebObject;
|
|
53
|
-
exports["default"] = _default;
|
|
50
|
+
var _default = exports["default"] = ParentWebObject;
|
|
@@ -22,26 +22,25 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|
|
22
22
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23
23
|
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); } }
|
|
24
24
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
25
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
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); }
|
|
27
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
28
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
25
29
|
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
|
|
26
30
|
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
|
31
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
27
32
|
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); }
|
|
28
33
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
29
|
-
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); }; }
|
|
30
|
-
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); }
|
|
31
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
32
|
-
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; } }
|
|
33
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
34
34
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
35
|
-
function _toPropertyKey(
|
|
36
|
-
function _toPrimitive(
|
|
37
|
-
var WebObject = /*#__PURE__*/function (_SimpleObject
|
|
35
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
36
|
+
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); }
|
|
37
|
+
var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
38
38
|
_inherits(WebObject, _SimpleObject);
|
|
39
|
-
var _super = _createSuper(WebObject);
|
|
40
39
|
function WebObject() {
|
|
41
40
|
var _this;
|
|
42
41
|
var is_readonly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
43
42
|
_classCallCheck(this, WebObject);
|
|
44
|
-
_this =
|
|
43
|
+
_this = _callSuper(this, WebObject, [is_readonly]);
|
|
45
44
|
_defineProperty(_assertThisInitialized(_this), "meta_data", void 0);
|
|
46
45
|
_defineProperty(_assertThisInitialized(_this), "_id", "");
|
|
47
46
|
_defineProperty(_assertThisInitialized(_this), "_created_date", void 0);
|
|
@@ -71,7 +70,7 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
71
70
|
*/
|
|
72
71
|
}, {
|
|
73
72
|
key: "setMetaValue",
|
|
74
|
-
value:
|
|
73
|
+
value: (
|
|
75
74
|
/* -------------------------------------------------------------------------- */
|
|
76
75
|
/* Meta data */
|
|
77
76
|
/* -------------------------------------------------------------------------- */
|
|
@@ -82,8 +81,8 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
82
81
|
* @param sendChange
|
|
83
82
|
* @returns
|
|
84
83
|
*/
|
|
85
|
-
function
|
|
86
|
-
|
|
84
|
+
function () {
|
|
85
|
+
var _setMetaValue = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(key, value) {
|
|
87
86
|
var sendChange,
|
|
88
87
|
old_value,
|
|
89
88
|
new_metalist,
|
|
@@ -142,13 +141,18 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
142
141
|
return _context.stop();
|
|
143
142
|
}
|
|
144
143
|
}, _callee, this);
|
|
145
|
-
}))
|
|
146
|
-
|
|
144
|
+
}));
|
|
145
|
+
function setMetaValue(_x, _x2) {
|
|
146
|
+
return _setMetaValue.apply(this, arguments);
|
|
147
|
+
}
|
|
148
|
+
return setMetaValue;
|
|
149
|
+
}()
|
|
147
150
|
/**
|
|
148
151
|
* Get meta value by key
|
|
149
152
|
* @param key
|
|
150
153
|
* @returns value or undefined
|
|
151
154
|
*/
|
|
155
|
+
)
|
|
152
156
|
}, {
|
|
153
157
|
key: "getMetaValue",
|
|
154
158
|
value: function getMetaValue(key) {
|
|
@@ -162,8 +166,8 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
162
166
|
*/
|
|
163
167
|
}, {
|
|
164
168
|
key: "Save",
|
|
165
|
-
value: function
|
|
166
|
-
|
|
169
|
+
value: function () {
|
|
170
|
+
var _Save = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
167
171
|
var deltaObject, putAction, putAddress, canSaveResult, resultObject;
|
|
168
172
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
169
173
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -215,12 +219,16 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
215
219
|
return _context2.stop();
|
|
216
220
|
}
|
|
217
221
|
}, _callee2, this);
|
|
218
|
-
}))
|
|
219
|
-
|
|
222
|
+
}));
|
|
223
|
+
function Save() {
|
|
224
|
+
return _Save.apply(this, arguments);
|
|
225
|
+
}
|
|
226
|
+
return Save;
|
|
227
|
+
}()
|
|
220
228
|
}, {
|
|
221
229
|
key: "Delete",
|
|
222
|
-
value: function
|
|
223
|
-
|
|
230
|
+
value: function () {
|
|
231
|
+
var _Delete = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
224
232
|
var resultObject;
|
|
225
233
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
226
234
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -245,12 +253,16 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
245
253
|
return _context3.stop();
|
|
246
254
|
}
|
|
247
255
|
}, _callee3, this);
|
|
248
|
-
}))
|
|
249
|
-
|
|
256
|
+
}));
|
|
257
|
+
function Delete() {
|
|
258
|
+
return _Delete.apply(this, arguments);
|
|
259
|
+
}
|
|
260
|
+
return Delete;
|
|
261
|
+
}()
|
|
250
262
|
}, {
|
|
251
263
|
key: "Archive",
|
|
252
|
-
value: function
|
|
253
|
-
|
|
264
|
+
value: function () {
|
|
265
|
+
var _Archive = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
254
266
|
var resultObject;
|
|
255
267
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
256
268
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -275,12 +287,16 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
275
287
|
return _context4.stop();
|
|
276
288
|
}
|
|
277
289
|
}, _callee4, this);
|
|
278
|
-
}))
|
|
279
|
-
|
|
290
|
+
}));
|
|
291
|
+
function Archive() {
|
|
292
|
+
return _Archive.apply(this, arguments);
|
|
293
|
+
}
|
|
294
|
+
return Archive;
|
|
295
|
+
}()
|
|
280
296
|
}, {
|
|
281
297
|
key: "UnArchive",
|
|
282
|
-
value: function
|
|
283
|
-
|
|
298
|
+
value: function () {
|
|
299
|
+
var _UnArchive = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
284
300
|
var resultObject;
|
|
285
301
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
286
302
|
while (1) switch (_context5.prev = _context5.next) {
|
|
@@ -305,8 +321,12 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
305
321
|
return _context5.stop();
|
|
306
322
|
}
|
|
307
323
|
}, _callee5, this);
|
|
308
|
-
}))
|
|
309
|
-
|
|
324
|
+
}));
|
|
325
|
+
function UnArchive() {
|
|
326
|
+
return _UnArchive.apply(this, arguments);
|
|
327
|
+
}
|
|
328
|
+
return UnArchive;
|
|
329
|
+
}() /* -------------------------------------------------------------------------- */
|
|
310
330
|
}, {
|
|
311
331
|
key: "canSave",
|
|
312
332
|
value: function canSave(deltaObj) {
|
|
@@ -336,17 +356,15 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
336
356
|
*/
|
|
337
357
|
}, {
|
|
338
358
|
key: "get_deltaObject",
|
|
339
|
-
value: function
|
|
340
|
-
|
|
341
|
-
var _this2 = this
|
|
342
|
-
|
|
343
|
-
var final_object, isChild, useDelta, allProperties, needId, chkChangables, useExtraProps, dlt, allkeys, changableKeys, functionProps, index, fp, parseObj, _iterator, _step, key, tempusers;
|
|
359
|
+
value: (function () {
|
|
360
|
+
var _get_deltaObject = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(p) {
|
|
361
|
+
var _this2 = this;
|
|
362
|
+
var final_object, isChild, useDelta, allProperties, needId, chkChangables, useExtraProps, dlt, allkeys, changableKeys, functionProps, index, fp, parseObj, _parseObj, _iterator, _step, key, tempusers;
|
|
344
363
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
345
364
|
while (1) switch (_context8.prev = _context8.next) {
|
|
346
365
|
case 0:
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
var _ref;
|
|
366
|
+
_parseObj = function _parseObj3() {
|
|
367
|
+
_parseObj = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(obj) {
|
|
350
368
|
var newobj_dlt;
|
|
351
369
|
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
352
370
|
while (1) switch (_context7.prev = _context7.next) {
|
|
@@ -362,8 +380,8 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
362
380
|
break;
|
|
363
381
|
}
|
|
364
382
|
_context7.next = 5;
|
|
365
|
-
return Promise.all(obj.map(function (
|
|
366
|
-
|
|
383
|
+
return Promise.all(obj.map( /*#__PURE__*/function () {
|
|
384
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(r) {
|
|
367
385
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
368
386
|
while (1) switch (_context6.prev = _context6.next) {
|
|
369
387
|
case 0:
|
|
@@ -376,8 +394,11 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
376
394
|
return _context6.stop();
|
|
377
395
|
}
|
|
378
396
|
}, _callee6);
|
|
379
|
-
}))
|
|
380
|
-
|
|
397
|
+
}));
|
|
398
|
+
return function (_x5) {
|
|
399
|
+
return _ref.apply(this, arguments);
|
|
400
|
+
};
|
|
401
|
+
}()));
|
|
381
402
|
case 5:
|
|
382
403
|
return _context7.abrupt("return", _context7.sent);
|
|
383
404
|
case 6:
|
|
@@ -405,7 +426,11 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
405
426
|
return _context7.stop();
|
|
406
427
|
}
|
|
407
428
|
}, _callee7);
|
|
408
|
-
}))
|
|
429
|
+
}));
|
|
430
|
+
return _parseObj.apply(this, arguments);
|
|
431
|
+
};
|
|
432
|
+
parseObj = function _parseObj2(_x4) {
|
|
433
|
+
return _parseObj.apply(this, arguments);
|
|
409
434
|
};
|
|
410
435
|
if (!p) p = {};
|
|
411
436
|
final_object = {}; //@ts-ignore
|
|
@@ -423,13 +448,13 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
423
448
|
ignoreProtected: allProperties
|
|
424
449
|
});
|
|
425
450
|
}) : allkeys;
|
|
426
|
-
_context8.next =
|
|
451
|
+
_context8.next = 15;
|
|
427
452
|
return _convert["default"].applyFormats({
|
|
428
453
|
inputobject: dlt,
|
|
429
454
|
formats: (0, _object.object_getStatic)(this, "__formatList"),
|
|
430
455
|
changableKeys: changableKeys
|
|
431
456
|
});
|
|
432
|
-
case
|
|
457
|
+
case 15:
|
|
433
458
|
/* -------------------------------------------------------------------------- */
|
|
434
459
|
/* __functionProperties */
|
|
435
460
|
/* -------------------------------------------------------------------------- */
|
|
@@ -444,33 +469,33 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
444
469
|
/* parse all changableKeys */
|
|
445
470
|
/* -------------------------------------------------------------------------- */
|
|
446
471
|
_iterator = _createForOfIteratorHelper(changableKeys);
|
|
447
|
-
_context8.prev =
|
|
472
|
+
_context8.prev = 18;
|
|
448
473
|
_iterator.s();
|
|
449
|
-
case
|
|
474
|
+
case 20:
|
|
450
475
|
if ((_step = _iterator.n()).done) {
|
|
451
|
-
_context8.next =
|
|
476
|
+
_context8.next = 27;
|
|
452
477
|
break;
|
|
453
478
|
}
|
|
454
479
|
key = _step.value;
|
|
455
|
-
_context8.next =
|
|
480
|
+
_context8.next = 24;
|
|
456
481
|
return parseObj(dlt[key]);
|
|
457
|
-
case 23:
|
|
458
|
-
final_object[key] = _context8.sent;
|
|
459
482
|
case 24:
|
|
460
|
-
|
|
483
|
+
final_object[key] = _context8.sent;
|
|
484
|
+
case 25:
|
|
485
|
+
_context8.next = 20;
|
|
461
486
|
break;
|
|
462
|
-
case
|
|
463
|
-
_context8.next =
|
|
487
|
+
case 27:
|
|
488
|
+
_context8.next = 32;
|
|
464
489
|
break;
|
|
465
|
-
case
|
|
466
|
-
_context8.prev =
|
|
467
|
-
_context8.t0 = _context8["catch"](
|
|
490
|
+
case 29:
|
|
491
|
+
_context8.prev = 29;
|
|
492
|
+
_context8.t0 = _context8["catch"](18);
|
|
468
493
|
_iterator.e(_context8.t0);
|
|
469
|
-
case
|
|
470
|
-
_context8.prev =
|
|
494
|
+
case 32:
|
|
495
|
+
_context8.prev = 32;
|
|
471
496
|
_iterator.f();
|
|
472
|
-
return _context8.finish(
|
|
473
|
-
case
|
|
497
|
+
return _context8.finish(32);
|
|
498
|
+
case 35:
|
|
474
499
|
/* -------------------------------------------------------------------------- */
|
|
475
500
|
/* add id properties */
|
|
476
501
|
/* -------------------------------------------------------------------------- */
|
|
@@ -495,13 +520,17 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
495
520
|
final_object["_users"] = (0, _object.wrap_array)(tempusers);
|
|
496
521
|
}
|
|
497
522
|
return _context8.abrupt("return", final_object);
|
|
498
|
-
case
|
|
523
|
+
case 39:
|
|
499
524
|
case "end":
|
|
500
525
|
return _context8.stop();
|
|
501
526
|
}
|
|
502
|
-
}, _callee8, this, [[
|
|
503
|
-
}))
|
|
504
|
-
|
|
527
|
+
}, _callee8, this, [[18, 29, 32, 35]]);
|
|
528
|
+
}));
|
|
529
|
+
function get_deltaObject(_x3) {
|
|
530
|
+
return _get_deltaObject.apply(this, arguments);
|
|
531
|
+
}
|
|
532
|
+
return get_deltaObject;
|
|
533
|
+
}() /* --------------------------------- Getters -------------------------------- */)
|
|
505
534
|
}, {
|
|
506
535
|
key: "__web_path",
|
|
507
536
|
get: function get() {
|
|
@@ -524,8 +553,8 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
524
553
|
}
|
|
525
554
|
}, {
|
|
526
555
|
key: "onDelete",
|
|
527
|
-
value: /* -------------------------------------------------------------------------- */function
|
|
528
|
-
|
|
556
|
+
value: ( /* -------------------------------------------------------------------------- */function () {
|
|
557
|
+
var _onDelete = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
529
558
|
var _this$manager;
|
|
530
559
|
var _len,
|
|
531
560
|
p,
|
|
@@ -547,12 +576,16 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
547
576
|
return _context9.stop();
|
|
548
577
|
}
|
|
549
578
|
}, _callee9, this);
|
|
550
|
-
}))
|
|
551
|
-
|
|
579
|
+
}));
|
|
580
|
+
function onDelete() {
|
|
581
|
+
return _onDelete.apply(this, arguments);
|
|
582
|
+
}
|
|
583
|
+
return onDelete;
|
|
584
|
+
}())
|
|
552
585
|
}, {
|
|
553
586
|
key: "onArchive",
|
|
554
|
-
value: function
|
|
555
|
-
|
|
587
|
+
value: function () {
|
|
588
|
+
var _onArchive = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
|
|
556
589
|
var _this$manager2;
|
|
557
590
|
var _len2,
|
|
558
591
|
p,
|
|
@@ -574,12 +607,16 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
574
607
|
return _context10.stop();
|
|
575
608
|
}
|
|
576
609
|
}, _callee10, this);
|
|
577
|
-
}))
|
|
578
|
-
|
|
610
|
+
}));
|
|
611
|
+
function onArchive() {
|
|
612
|
+
return _onArchive.apply(this, arguments);
|
|
613
|
+
}
|
|
614
|
+
return onArchive;
|
|
615
|
+
}()
|
|
579
616
|
}, {
|
|
580
617
|
key: "onUnArchive",
|
|
581
|
-
value: function
|
|
582
|
-
|
|
618
|
+
value: function () {
|
|
619
|
+
var _onUnArchive = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
583
620
|
var _this$manager3;
|
|
584
621
|
var _len3,
|
|
585
622
|
p,
|
|
@@ -601,12 +638,16 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
601
638
|
return _context11.stop();
|
|
602
639
|
}
|
|
603
640
|
}, _callee11, this);
|
|
604
|
-
}))
|
|
605
|
-
|
|
641
|
+
}));
|
|
642
|
+
function onUnArchive() {
|
|
643
|
+
return _onUnArchive.apply(this, arguments);
|
|
644
|
+
}
|
|
645
|
+
return onUnArchive;
|
|
646
|
+
}()
|
|
606
647
|
}, {
|
|
607
648
|
key: "onLoad",
|
|
608
|
-
value: function
|
|
609
|
-
|
|
649
|
+
value: function () {
|
|
650
|
+
var _onLoad = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
|
|
610
651
|
var _this$manager4;
|
|
611
652
|
var _len4,
|
|
612
653
|
p,
|
|
@@ -628,12 +669,16 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
628
669
|
return _context12.stop();
|
|
629
670
|
}
|
|
630
671
|
}, _callee12, this);
|
|
631
|
-
}))
|
|
632
|
-
|
|
672
|
+
}));
|
|
673
|
+
function onLoad() {
|
|
674
|
+
return _onLoad.apply(this, arguments);
|
|
675
|
+
}
|
|
676
|
+
return onLoad;
|
|
677
|
+
}()
|
|
633
678
|
}, {
|
|
634
679
|
key: "onSave",
|
|
635
|
-
value: function
|
|
636
|
-
|
|
680
|
+
value: function () {
|
|
681
|
+
var _onSave = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
|
|
637
682
|
var _this$manager6;
|
|
638
683
|
var srObject,
|
|
639
684
|
_this$manager5,
|
|
@@ -674,12 +719,16 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
674
719
|
return _context13.stop();
|
|
675
720
|
}
|
|
676
721
|
}, _callee13, this);
|
|
677
|
-
}))
|
|
678
|
-
|
|
722
|
+
}));
|
|
723
|
+
function onSave() {
|
|
724
|
+
return _onSave.apply(this, arguments);
|
|
725
|
+
}
|
|
726
|
+
return onSave;
|
|
727
|
+
}()
|
|
679
728
|
}, {
|
|
680
729
|
key: "onAfterSave",
|
|
681
|
-
value: function
|
|
682
|
-
|
|
730
|
+
value: function () {
|
|
731
|
+
var _onAfterSave = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
|
|
683
732
|
var _this$manager7;
|
|
684
733
|
var _len6,
|
|
685
734
|
p,
|
|
@@ -700,8 +749,12 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
700
749
|
return _context14.stop();
|
|
701
750
|
}
|
|
702
751
|
}, _callee14, this);
|
|
703
|
-
}))
|
|
704
|
-
|
|
752
|
+
}));
|
|
753
|
+
function onAfterSave() {
|
|
754
|
+
return _onAfterSave.apply(this, arguments);
|
|
755
|
+
}
|
|
756
|
+
return onAfterSave;
|
|
757
|
+
}()
|
|
705
758
|
}, {
|
|
706
759
|
key: "getSaveResult",
|
|
707
760
|
value: function getSaveResult() {
|
|
@@ -719,8 +772,8 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
719
772
|
}
|
|
720
773
|
}, {
|
|
721
774
|
key: "onNew",
|
|
722
|
-
value: function
|
|
723
|
-
|
|
775
|
+
value: function () {
|
|
776
|
+
var _onNew = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
|
|
724
777
|
var _this$manager8;
|
|
725
778
|
var _len7,
|
|
726
779
|
p,
|
|
@@ -741,8 +794,12 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
741
794
|
return _context15.stop();
|
|
742
795
|
}
|
|
743
796
|
}, _callee15, this);
|
|
744
|
-
}))
|
|
745
|
-
|
|
797
|
+
}));
|
|
798
|
+
function onNew() {
|
|
799
|
+
return _onNew.apply(this, arguments);
|
|
800
|
+
}
|
|
801
|
+
return onNew;
|
|
802
|
+
}() /* -------------------------------------------------------------------------- */
|
|
746
803
|
}, {
|
|
747
804
|
key: "saveResultHasID",
|
|
748
805
|
value: function saveResultHasID(s) {
|
|
@@ -791,8 +848,8 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
791
848
|
}
|
|
792
849
|
}, {
|
|
793
850
|
key: "saveList",
|
|
794
|
-
value: function
|
|
795
|
-
|
|
851
|
+
value: function () {
|
|
852
|
+
var _saveList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(itemList) {
|
|
796
853
|
var _extraOptions$chunksi;
|
|
797
854
|
var extraOptions,
|
|
798
855
|
chunks,
|
|
@@ -904,8 +961,12 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
904
961
|
return _context16.stop();
|
|
905
962
|
}
|
|
906
963
|
}, _callee16, this);
|
|
907
|
-
}))
|
|
908
|
-
|
|
964
|
+
}));
|
|
965
|
+
function saveList(_x6) {
|
|
966
|
+
return _saveList.apply(this, arguments);
|
|
967
|
+
}
|
|
968
|
+
return saveList;
|
|
969
|
+
}()
|
|
909
970
|
}, {
|
|
910
971
|
key: "get_webname",
|
|
911
972
|
value: function get_webname() {
|
|
@@ -948,8 +1009,8 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
948
1009
|
*/
|
|
949
1010
|
}, {
|
|
950
1011
|
key: "get_single",
|
|
951
|
-
value: function
|
|
952
|
-
|
|
1012
|
+
value: (function () {
|
|
1013
|
+
var _get_single = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
|
|
953
1014
|
var _len8,
|
|
954
1015
|
p,
|
|
955
1016
|
_key8,
|
|
@@ -1007,16 +1068,21 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
1007
1068
|
return _context17.stop();
|
|
1008
1069
|
}
|
|
1009
1070
|
}, _callee17, this);
|
|
1010
|
-
}))
|
|
1011
|
-
|
|
1071
|
+
}));
|
|
1072
|
+
function get_single() {
|
|
1073
|
+
return _get_single.apply(this, arguments);
|
|
1074
|
+
}
|
|
1075
|
+
return get_single;
|
|
1076
|
+
}()
|
|
1012
1077
|
/**
|
|
1013
1078
|
* Get a list of web objects
|
|
1014
1079
|
* default order of parameters : search,readonly,fetchID
|
|
1015
1080
|
*/
|
|
1081
|
+
)
|
|
1016
1082
|
}, {
|
|
1017
1083
|
key: "get_list",
|
|
1018
|
-
value: function
|
|
1019
|
-
|
|
1084
|
+
value: (function () {
|
|
1085
|
+
var _get_list = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
|
|
1020
1086
|
var _len9,
|
|
1021
1087
|
p,
|
|
1022
1088
|
_key9,
|
|
@@ -1052,16 +1118,18 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
1052
1118
|
return _context18.stop();
|
|
1053
1119
|
}
|
|
1054
1120
|
}, _callee18, this);
|
|
1055
|
-
}))
|
|
1056
|
-
|
|
1121
|
+
}));
|
|
1122
|
+
function get_list() {
|
|
1123
|
+
return _get_list.apply(this, arguments);
|
|
1124
|
+
}
|
|
1125
|
+
return get_list;
|
|
1126
|
+
}())
|
|
1057
1127
|
}]);
|
|
1058
1128
|
return WebObject;
|
|
1059
1129
|
}(_index3.SimpleObject);
|
|
1060
|
-
exports.WebObject = WebObject;
|
|
1061
1130
|
_defineProperty(WebObject, "__web_path", "");
|
|
1062
1131
|
_defineProperty(WebObject, "__web_type", "");
|
|
1063
1132
|
_defineProperty(WebObject, "__protectedProperties", ["_users"]);
|
|
1064
1133
|
//you cant create a new weboject without these properties
|
|
1065
1134
|
_defineProperty(WebObject, "__requiredProperties", []);
|
|
1066
|
-
var _default = WebObject;
|
|
1067
|
-
exports["default"] = _default;
|
|
1135
|
+
var _default = exports["default"] = WebObject;
|