pull/5388/merge
Dave Conway-Jones 2026-03-24 10:15:09 -04:00 committed by GitHub
commit 25e6f84b5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 22 additions and 6 deletions

View File

@ -73,7 +73,7 @@
if(match.post) { els.push($('<span/>').text(match.post)); }
return els;
}
const msgAutoComplete = function(options) {
return function(val) {
var matches = [];
@ -230,7 +230,7 @@
contextKnownKeys[scope][store].set(keyPrefix + key, keyInfo)
} else {
contextKnownKeys[scope][store].set(searchKey + "[\""+key.replace(/"/,"\\\"")+"\"]", keyInfo)
}
}
})
done()
})
@ -257,7 +257,7 @@
}
const store = (contextStoreOptions.length === 1) ? contextStoreOptions[0].value : that.optionValue
const searchKey = keyParts.join('.')
getContextKeysFromRuntime(scope, store, searchKey, function() {
if (contextKnownKeys[scope][store].has(key) || key.endsWith(']')) {
getContextKeysFromRuntime(scope, store, key, function() {
@ -424,7 +424,23 @@
})
}
},
re: { value: "re", label: "regular expression", icon: "red/images/typedInput/re.svg" },
re: { value: "re", label: "regular expression", icon: "red/images/typedInput/re.svg",
expand: function () {
var that = this;
var value = this.value();
RED.editor.editText({
value: value,
title: "Regex editor",
stateId: RED.editor.generateViewStateId("typedInput", that, "regex"),
focus: true,
complete: function (v) {
try { new RegExp(v); }
catch(err) { }
that.value(v);
}
})
}
},
date: {
value: "date",
label: "timestamp",
@ -668,7 +684,7 @@
const row1Name = $('<div>').text(def.type)
const row2Module = $('<div style="font-size: 0.8em; color: var(--red-ui-tertiary-text-color);">').text(def.set.module)
container.append(row1Name, row2Module)
return {
value: def.type,
name: def.type,
@ -685,7 +701,7 @@
}
};
// For a type with options, check value is a valid selection
// If !opt.multiple, returns the valid option object
// if opt.multiple, returns an array of valid option objects