This commit is contained in:
2026-04-07 15:16:19 +03:00
parent 953b39d433
commit 0fa388abeb
25 changed files with 1370 additions and 38 deletions

15
editor/dist/index.js vendored
View File

@@ -258,6 +258,15 @@ function inferMethodReturnType(method) {
// depends on input type
case "join":
return "String";
// List methods
case "map":
return null;
// depends on field type (NumberList, StringList, or List)
case "filter":
return "List";
case "find":
return null;
// returns single element
default:
return null;
}
@@ -291,7 +300,7 @@ function dexprCompletion(info) {
}
const objectFieldCompletions = /* @__PURE__ */ new Map();
for (const v of info.variables ?? []) {
if (v.type === "Object" && v.fields) {
if ((v.type === "Object" || v.type === "List") && v.fields) {
const fieldItems = [];
for (const f of v.fields) {
configVarTypes.set(`${v.name}.${f.name}`, f.type);
@@ -365,6 +374,10 @@ function dexprCompletion(info) {
const fieldItems = objectFieldCompletions.get(rootVarName) ?? [];
const objMethods = methodsByType["Object"] ?? [];
options = [...fieldItems, ...objMethods];
} else if (finalType === "List") {
const rootVarName = path[0];
const listMethods = methodsByType["List"] ?? [];
options = [...listMethods];
} else if (finalType) {
options = methodsByType[finalType] ?? allMethods;
} else {