@azrico/webobject 1.4.193 → 1.4.195
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.
|
@@ -1264,6 +1264,7 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
1264
1264
|
key: "get_single",
|
|
1265
1265
|
value: (function () {
|
|
1266
1266
|
var _get_single = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23() {
|
|
1267
|
+
var _p$shift;
|
|
1267
1268
|
var _len10,
|
|
1268
1269
|
p,
|
|
1269
1270
|
_key10,
|
|
@@ -1281,7 +1282,7 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
1281
1282
|
p[_key10] = _args23[_key10];
|
|
1282
1283
|
}
|
|
1283
1284
|
search = p.shift();
|
|
1284
|
-
readonly = p.shift();
|
|
1285
|
+
readonly = (_p$shift = p.shift()) !== null && _p$shift !== void 0 ? _p$shift : false;
|
|
1285
1286
|
fetchID = p.shift();
|
|
1286
1287
|
if (!(0, _object.object_isEmpty)(search)) {
|
|
1287
1288
|
_context23.next = 6;
|
|
@@ -1343,6 +1344,7 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
1343
1344
|
key: "get_list",
|
|
1344
1345
|
value: (function () {
|
|
1345
1346
|
var _get_list = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24() {
|
|
1347
|
+
var _p$shift2;
|
|
1346
1348
|
var _len11,
|
|
1347
1349
|
p,
|
|
1348
1350
|
_key11,
|
|
@@ -1360,7 +1362,7 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
1360
1362
|
p[_key11] = _args24[_key11];
|
|
1361
1363
|
}
|
|
1362
1364
|
search = p.shift();
|
|
1363
|
-
readonly = p.shift();
|
|
1365
|
+
readonly = (_p$shift2 = p.shift()) !== null && _p$shift2 !== void 0 ? _p$shift2 : false;
|
|
1364
1366
|
fetchID = p.shift();
|
|
1365
1367
|
if (!search) search = {};
|
|
1366
1368
|
_context24.next = 7;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { ClassType } from "@azrico/types";
|
|
1
2
|
import { WebObject, sendChangesType } from "../index";
|
|
2
3
|
import ObjectManager from "../structs/ObjectManager";
|
|
3
4
|
/**
|
|
4
5
|
* This class manages the events of an Simple Object
|
|
5
6
|
*/
|
|
6
7
|
export declare class WebObjectManager<ObjType extends WebObject> extends ObjectManager<ObjType> {
|
|
7
|
-
protected static readonly __object_type: () => typeof WebObject
|
|
8
|
+
protected static readonly __object_type: () => typeof WebObject | ClassType<WebObject>;
|
|
8
9
|
static readonly __save_message: boolean;
|
|
9
10
|
constructor(defaultObject?: ObjType);
|
|
10
11
|
setObject(toObj: ObjType | undefined): boolean;
|
|
@@ -61,6 +62,6 @@ export declare class WebObjectManager<ObjType extends WebObject> extends ObjectM
|
|
|
61
62
|
onSave(...p: any): Promise<any>;
|
|
62
63
|
onAfterSave(...p: any): Promise<any>;
|
|
63
64
|
getObjectType(): typeof WebObject;
|
|
64
|
-
static getObjectType(): typeof WebObject
|
|
65
|
+
static getObjectType(): typeof WebObject | ClassType<WebObject>;
|
|
65
66
|
}
|
|
66
67
|
export default WebObjectManager;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PropOf, WriteablePropOf } from "@azrico/types";
|
|
2
2
|
import SimpleObject, { WithManager } from "./SimpleObject";
|
|
3
3
|
import { saveResultType, sendChangesType } from "./SimpleObject";
|
|
4
|
+
import { ClassType } from "@azrico/types";
|
|
4
5
|
import RawObject from "./MapableObject";
|
|
5
6
|
/**
|
|
6
7
|
* This class manages the events of an Simple Object
|
|
@@ -9,7 +10,7 @@ export declare class ObjectManager<ObjType extends SimpleObject> extends RawObje
|
|
|
9
10
|
__eventList: any;
|
|
10
11
|
__eventPrefix?: string;
|
|
11
12
|
__stopEvents?: boolean;
|
|
12
|
-
protected static readonly __object_type: () => typeof SimpleObject
|
|
13
|
+
protected static readonly __object_type: () => typeof SimpleObject | ClassType<SimpleObject>;
|
|
13
14
|
protected __last_object_data: {
|
|
14
15
|
[key: string]: string;
|
|
15
16
|
};
|
|
@@ -130,6 +131,6 @@ export declare class ObjectManager<ObjType extends SimpleObject> extends RawObje
|
|
|
130
131
|
static getErrors(o: ObjectManager<any>): any[];
|
|
131
132
|
static clearErrors(o: ObjectManager<any>): boolean;
|
|
132
133
|
getObjectType(): typeof SimpleObject;
|
|
133
|
-
static getObjectType(): typeof SimpleObject
|
|
134
|
+
static getObjectType(): typeof SimpleObject | ClassType<SimpleObject>;
|
|
134
135
|
}
|
|
135
136
|
export default ObjectManager;
|
|
@@ -1256,7 +1256,7 @@ var SimpleObject = exports.SimpleObject = /*#__PURE__*/function (_MapableObject)
|
|
|
1256
1256
|
if (!Array.isArray(objs)) checkObjs = [objs];else checkObjs = objs;
|
|
1257
1257
|
for (var index = 0; index < checkObjs.length; index++) {
|
|
1258
1258
|
var obj = checkObjs[index];
|
|
1259
|
-
obj.__is_readonly = readonlyval;
|
|
1259
|
+
obj.__is_readonly = Boolean(readonlyval);
|
|
1260
1260
|
if (obj instanceof SimpleObject) {
|
|
1261
1261
|
if (obj.canModify) {
|
|
1262
1262
|
if (!obj.getOriginal()) obj.setOriginal();
|