@azrico/webobject 1.2.19 → 1.2.20
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.
|
@@ -19,6 +19,9 @@ export declare class WebObjectManager<T extends WebObject> extends ObjectManager
|
|
|
19
19
|
get_deltaObject(): Promise<any>;
|
|
20
20
|
Save(): Promise<boolean>;
|
|
21
21
|
Load(search: any, ...p: any[]): Promise<WebObject | undefined>;
|
|
22
|
+
get __web_path(): string;
|
|
23
|
+
get __web_type(): string;
|
|
24
|
+
get_webname(): string;
|
|
22
25
|
/**
|
|
23
26
|
* Use this when you load new Object
|
|
24
27
|
* @param p
|
|
@@ -201,6 +201,31 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager) {
|
|
|
201
201
|
}()
|
|
202
202
|
/* -------------------------------------------------------------------------- */
|
|
203
203
|
|
|
204
|
+
/* Child Functions */
|
|
205
|
+
|
|
206
|
+
/* -------------------------------------------------------------------------- */
|
|
207
|
+
|
|
208
|
+
}, {
|
|
209
|
+
key: "__web_path",
|
|
210
|
+
get: function get() {
|
|
211
|
+
var _this$obj6;
|
|
212
|
+
|
|
213
|
+
return ((_this$obj6 = this.obj) === null || _this$obj6 === void 0 ? void 0 : _this$obj6.__web_path) || "";
|
|
214
|
+
}
|
|
215
|
+
}, {
|
|
216
|
+
key: "__web_type",
|
|
217
|
+
get: function get() {
|
|
218
|
+
var _this$obj7;
|
|
219
|
+
|
|
220
|
+
return ((_this$obj7 = this.obj) === null || _this$obj7 === void 0 ? void 0 : _this$obj7.__web_type) || "";
|
|
221
|
+
}
|
|
222
|
+
}, {
|
|
223
|
+
key: "get_webname",
|
|
224
|
+
value: function get_webname() {
|
|
225
|
+
return this.__web_path || this.__web_type || this.__cache_name;
|
|
226
|
+
}
|
|
227
|
+
/* -------------------------------------------------------------------------- */
|
|
228
|
+
|
|
204
229
|
/* Default Events */
|
|
205
230
|
|
|
206
231
|
/* -------------------------------------------------------------------------- */
|
|
@@ -215,14 +240,14 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager) {
|
|
|
215
240
|
key: "onNew",
|
|
216
241
|
value: function () {
|
|
217
242
|
var _onNew = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
218
|
-
var _this$
|
|
243
|
+
var _this$obj8;
|
|
219
244
|
|
|
220
245
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
221
246
|
while (1) {
|
|
222
247
|
switch (_context4.prev = _context4.next) {
|
|
223
248
|
case 0:
|
|
224
249
|
if (this.canModify) {
|
|
225
|
-
(_this$
|
|
250
|
+
(_this$obj8 = this.obj) === null || _this$obj8 === void 0 ? void 0 : _this$obj8.setOriginal();
|
|
226
251
|
}
|
|
227
252
|
|
|
228
253
|
_context4.next = 3;
|
|
@@ -263,14 +288,14 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager) {
|
|
|
263
288
|
key: "onLoad",
|
|
264
289
|
value: function () {
|
|
265
290
|
var _onLoad = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
266
|
-
var _this$
|
|
291
|
+
var _this$obj9;
|
|
267
292
|
|
|
268
293
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
269
294
|
while (1) {
|
|
270
295
|
switch (_context5.prev = _context5.next) {
|
|
271
296
|
case 0:
|
|
272
297
|
if (this.canModify) {
|
|
273
|
-
(_this$
|
|
298
|
+
(_this$obj9 = this.obj) === null || _this$obj9 === void 0 ? void 0 : _this$obj9.setOriginal();
|
|
274
299
|
}
|
|
275
300
|
|
|
276
301
|
_context5.next = 3;
|
|
@@ -179,7 +179,9 @@ var ObjectManager = /*#__PURE__*/function () {
|
|
|
179
179
|
}, {
|
|
180
180
|
key: "__cache_name",
|
|
181
181
|
get: function get() {
|
|
182
|
-
|
|
182
|
+
var _this$obj4;
|
|
183
|
+
|
|
184
|
+
return ((_this$obj4 = this.obj) === null || _this$obj4 === void 0 ? void 0 : _this$obj4.__cache_name) || "";
|
|
183
185
|
}
|
|
184
186
|
}, {
|
|
185
187
|
key: "getSaveResult",
|
|
@@ -203,17 +205,17 @@ var ObjectManager = /*#__PURE__*/function () {
|
|
|
203
205
|
}, {
|
|
204
206
|
key: "apply_changes",
|
|
205
207
|
value: function apply_changes() {
|
|
206
|
-
var _this$
|
|
208
|
+
var _this$obj5;
|
|
207
209
|
|
|
208
|
-
return (_this$
|
|
210
|
+
return (_this$obj5 = this.obj) === null || _this$obj5 === void 0 ? void 0 : _this$obj5.apply_changes();
|
|
209
211
|
}
|
|
210
212
|
}, {
|
|
211
213
|
key: "getValue",
|
|
212
214
|
value: function getValue(key) {
|
|
213
|
-
var _this$
|
|
215
|
+
var _this$obj6;
|
|
214
216
|
|
|
215
217
|
var original = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
216
|
-
return (_this$
|
|
218
|
+
return (_this$obj6 = this.obj) === null || _this$obj6 === void 0 ? void 0 : _this$obj6.getValue(key, original);
|
|
217
219
|
}
|
|
218
220
|
}, {
|
|
219
221
|
key: "setValue",
|
|
@@ -226,14 +228,14 @@ var ObjectManager = /*#__PURE__*/function () {
|
|
|
226
228
|
*/
|
|
227
229
|
function () {
|
|
228
230
|
var _setValue = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(key, value) {
|
|
229
|
-
var _this$
|
|
231
|
+
var _this$obj7;
|
|
230
232
|
|
|
231
233
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
232
234
|
while (1) {
|
|
233
235
|
switch (_context2.prev = _context2.next) {
|
|
234
236
|
case 0:
|
|
235
237
|
_context2.next = 2;
|
|
236
|
-
return (_this$
|
|
238
|
+
return (_this$obj7 = this.obj) === null || _this$obj7 === void 0 ? void 0 : _this$obj7.setValue(key, value);
|
|
237
239
|
|
|
238
240
|
case 2:
|
|
239
241
|
_context2.t0 = _context2.sent;
|
|
@@ -274,14 +276,14 @@ var ObjectManager = /*#__PURE__*/function () {
|
|
|
274
276
|
key: "setSubValue",
|
|
275
277
|
value: function () {
|
|
276
278
|
var _setSubValue = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(key, objKey, subvalue) {
|
|
277
|
-
var _this$
|
|
279
|
+
var _this$obj8;
|
|
278
280
|
|
|
279
281
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
280
282
|
while (1) {
|
|
281
283
|
switch (_context3.prev = _context3.next) {
|
|
282
284
|
case 0:
|
|
283
285
|
_context3.next = 2;
|
|
284
|
-
return (_this$
|
|
286
|
+
return (_this$obj8 = this.obj) === null || _this$obj8 === void 0 ? void 0 : _this$obj8.setSubValue(key, objKey, subvalue);
|
|
285
287
|
|
|
286
288
|
case 2:
|
|
287
289
|
_context3.t0 = _context3.sent;
|
|
@@ -315,14 +317,14 @@ var ObjectManager = /*#__PURE__*/function () {
|
|
|
315
317
|
key: "pushValue",
|
|
316
318
|
value: function () {
|
|
317
319
|
var _pushValue = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(key, value) {
|
|
318
|
-
var _this$
|
|
320
|
+
var _this$obj9;
|
|
319
321
|
|
|
320
322
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
321
323
|
while (1) {
|
|
322
324
|
switch (_context4.prev = _context4.next) {
|
|
323
325
|
case 0:
|
|
324
326
|
_context4.next = 2;
|
|
325
|
-
return (_this$
|
|
327
|
+
return (_this$obj9 = this.obj) === null || _this$obj9 === void 0 ? void 0 : _this$obj9.pushValue(key, value);
|
|
326
328
|
|
|
327
329
|
case 2:
|
|
328
330
|
_context4.t0 = _context4.sent;
|
|
@@ -356,23 +358,23 @@ var ObjectManager = /*#__PURE__*/function () {
|
|
|
356
358
|
}, {
|
|
357
359
|
key: "getIndexOrID",
|
|
358
360
|
value: function getIndexOrID() {
|
|
359
|
-
var _this$
|
|
361
|
+
var _this$obj10;
|
|
360
362
|
|
|
361
|
-
return ((_this$
|
|
363
|
+
return ((_this$obj10 = this.obj) === null || _this$obj10 === void 0 ? void 0 : _this$obj10.getIndexOrID()) || -1;
|
|
362
364
|
}
|
|
363
365
|
}, {
|
|
364
366
|
key: "getIndex",
|
|
365
367
|
value: function getIndex() {
|
|
366
|
-
var _this$
|
|
368
|
+
var _this$obj11;
|
|
367
369
|
|
|
368
|
-
return ((_this$
|
|
370
|
+
return ((_this$obj11 = this.obj) === null || _this$obj11 === void 0 ? void 0 : _this$obj11.getIndex()) || -1;
|
|
369
371
|
}
|
|
370
372
|
}, {
|
|
371
373
|
key: "getID",
|
|
372
374
|
value: function getID() {
|
|
373
|
-
var _this$
|
|
375
|
+
var _this$obj12;
|
|
374
376
|
|
|
375
|
-
return ((_this$
|
|
377
|
+
return ((_this$obj12 = this.obj) === null || _this$obj12 === void 0 ? void 0 : _this$obj12.getID()) || "";
|
|
376
378
|
}
|
|
377
379
|
/* -------------------------------------------------------------------------- */
|
|
378
380
|
|