remult 0.27.14 → 0.27.16
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.
|
@@ -27,14 +27,18 @@ import { remultStatic } from '../remult-static.js';
|
|
|
27
27
|
*/
|
|
28
28
|
export function Entity(key, ...options) {
|
|
29
29
|
return (target, info) => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if (
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
let theClass = target;
|
|
31
|
+
while (theClass != null) {
|
|
32
|
+
for (const rawFilterMember in theClass) {
|
|
33
|
+
if (Object.prototype.hasOwnProperty.call(theClass, rawFilterMember)) {
|
|
34
|
+
const element = target[rawFilterMember];
|
|
35
|
+
if (element?.rawFilterInfo) {
|
|
36
|
+
if (!element.rawFilterInfo.key)
|
|
37
|
+
element.rawFilterInfo.key = rawFilterMember;
|
|
38
|
+
}
|
|
36
39
|
}
|
|
37
40
|
}
|
|
41
|
+
theClass = Object.getPrototypeOf(theClass);
|
|
38
42
|
}
|
|
39
43
|
let factory = (remult) => {
|
|
40
44
|
let r = {};
|
package/package.json
CHANGED
package/server/remult-admin.js
CHANGED
|
@@ -72,7 +72,7 @@ function buildEntityInfo(options) {
|
|
|
72
72
|
}
|
|
73
73
|
fields.push({
|
|
74
74
|
key: x.key,
|
|
75
|
-
readOnly:
|
|
75
|
+
readOnly: !x.apiUpdateAllowed(),
|
|
76
76
|
values: (0, RepositoryImplementation_js_1.getValueList)(x),
|
|
77
77
|
valFieldKey: valFieldKey,
|
|
78
78
|
caption: x.caption,
|
package/src/remult3/entity.js
CHANGED
|
@@ -35,14 +35,18 @@ function Entity(key) {
|
|
|
35
35
|
options[_i - 1] = arguments[_i];
|
|
36
36
|
}
|
|
37
37
|
return function (target, info) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
if (
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
var theClass = target;
|
|
39
|
+
while (theClass != null) {
|
|
40
|
+
for (var rawFilterMember in theClass) {
|
|
41
|
+
if (Object.prototype.hasOwnProperty.call(theClass, rawFilterMember)) {
|
|
42
|
+
var element = target[rawFilterMember];
|
|
43
|
+
if (element === null || element === void 0 ? void 0 : element.rawFilterInfo) {
|
|
44
|
+
if (!element.rawFilterInfo.key)
|
|
45
|
+
element.rawFilterInfo.key = rawFilterMember;
|
|
46
|
+
}
|
|
44
47
|
}
|
|
45
48
|
}
|
|
49
|
+
theClass = Object.getPrototypeOf(theClass);
|
|
46
50
|
}
|
|
47
51
|
var factory = function (remult) {
|
|
48
52
|
var e_1, _a;
|