@azrico/webobject 1.4.109 → 1.4.111
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.
|
@@ -61,7 +61,7 @@ export declare class WebObject extends SimpleObject {
|
|
|
61
61
|
[key: string]: any;
|
|
62
62
|
}): Promise<boolean>;
|
|
63
63
|
Save(): Promise<any>;
|
|
64
|
-
Delete(): Promise<
|
|
64
|
+
Delete(): Promise<any>;
|
|
65
65
|
Archive(): Promise<boolean>;
|
|
66
66
|
UnArchive(): Promise<boolean>;
|
|
67
67
|
canSave(deltaObj?: any): true | string;
|
|
@@ -219,19 +219,26 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
219
219
|
key: "Delete",
|
|
220
220
|
value: function Delete() {
|
|
221
221
|
return (_Delete = _Delete || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
222
|
+
var resultObject;
|
|
222
223
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
223
224
|
while (1) switch (_context3.prev = _context3.next) {
|
|
224
225
|
case 0:
|
|
225
|
-
if (!
|
|
226
|
+
if (!this.isNew) {
|
|
226
227
|
_context3.next = 2;
|
|
227
228
|
break;
|
|
228
229
|
}
|
|
229
|
-
|
|
230
|
+
return _context3.abrupt("return");
|
|
230
231
|
case 2:
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
232
|
+
_context3.next = 4;
|
|
233
|
+
return _global.gfunc.run_action("delete", "".concat(this.__web_path, "/").concat(this.getID()));
|
|
234
|
+
case 4:
|
|
235
|
+
resultObject = _context3.sent;
|
|
236
|
+
this.setSaveResult(resultObject, "auto", true);
|
|
237
|
+
_context3.next = 8;
|
|
238
|
+
return this.onDelete();
|
|
239
|
+
case 8:
|
|
240
|
+
return _context3.abrupt("return", resultObject);
|
|
241
|
+
case 9:
|
|
235
242
|
case "end":
|
|
236
243
|
return _context3.stop();
|
|
237
244
|
}
|
|
@@ -60,8 +60,8 @@ export declare class ObjectManager<ObjType extends SimpleObject> {
|
|
|
60
60
|
*/
|
|
61
61
|
setSubValue(key: PropOf<ObjType>, objKey: string, subvalue: any): Promise<boolean>;
|
|
62
62
|
pushValue(key: PropOf<ObjType>, value: any): Promise<false | NonNullable<Awaited<ObjType[any]>>>;
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
setObjectTemp(key: string, value: any, sendChanges?: sendChangesType): Promise<boolean>;
|
|
64
|
+
getObjectTemp(key: string): any;
|
|
65
65
|
getIndexOrID(): number | string;
|
|
66
66
|
getIndex(): number;
|
|
67
67
|
getID(): string;
|
|
@@ -23,7 +23,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
23
23
|
/**
|
|
24
24
|
* This class manages the events of an Simple Object
|
|
25
25
|
*/
|
|
26
|
-
var ObjectManager = /*#__PURE__*/function (_notifyChanged, _setValue, _setSubValue, _pushValue,
|
|
26
|
+
var ObjectManager = /*#__PURE__*/function (_notifyChanged, _setValue, _setSubValue, _pushValue, _setObjectTemp, _event_run, _event_add, _toggleOption, _setOption, _holdOption) {
|
|
27
27
|
function ObjectManager() {
|
|
28
28
|
_classCallCheck(this, ObjectManager);
|
|
29
29
|
_defineProperty(this, "__eventList", void 0);
|
|
@@ -304,11 +304,11 @@ var ObjectManager = /*#__PURE__*/function (_notifyChanged, _setValue, _setSubVal
|
|
|
304
304
|
}
|
|
305
305
|
}, _callee4, this);
|
|
306
306
|
}))).apply(this, arguments);
|
|
307
|
-
} //set temp value
|
|
307
|
+
} //set temp value of object
|
|
308
308
|
}, {
|
|
309
|
-
key: "
|
|
310
|
-
value: function
|
|
311
|
-
return (
|
|
309
|
+
key: "setObjectTemp",
|
|
310
|
+
value: function setObjectTemp(_x12, _x13) {
|
|
311
|
+
return (_setObjectTemp = _setObjectTemp || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(key, value) {
|
|
312
312
|
var _yield$this$obj$setTe, _this$obj11;
|
|
313
313
|
var sendChanges,
|
|
314
314
|
_args5 = arguments;
|
|
@@ -344,10 +344,10 @@ var ObjectManager = /*#__PURE__*/function (_notifyChanged, _setValue, _setSubVal
|
|
|
344
344
|
}
|
|
345
345
|
}, _callee5, this);
|
|
346
346
|
}))).apply(this, arguments);
|
|
347
|
-
} //get temp value
|
|
347
|
+
} //get temp value of object
|
|
348
348
|
}, {
|
|
349
|
-
key: "
|
|
350
|
-
value: function
|
|
349
|
+
key: "getObjectTemp",
|
|
350
|
+
value: function getObjectTemp(key) {
|
|
351
351
|
var _this$obj$getTemp, _this$obj12;
|
|
352
352
|
return (_this$obj$getTemp = (_this$obj12 = this.obj) === null || _this$obj12 === void 0 ? void 0 : _this$obj12.getTemp(key)) !== null && _this$obj$getTemp !== void 0 ? _this$obj$getTemp : undefined;
|
|
353
353
|
}
|