myoperator-ui 0.0.223-beta.1 → 0.0.224
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.
- package/dist/index.js +4 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19074,17 +19074,18 @@ export const CreateFunctionModal = React.forwardRef(
|
|
|
19074
19074
|
|
|
19075
19075
|
const handleEditVariableClick = (variableName: string) => {
|
|
19076
19076
|
setVarInsertContext(null);
|
|
19077
|
+
const rawName = variableName.startsWith("function.") ? variableName.slice(9) : variableName;
|
|
19077
19078
|
const variable = variableGroups
|
|
19078
19079
|
?.flatMap((g) => g.items)
|
|
19079
|
-
.find((item) => item.name ===
|
|
19080
|
+
.find((item) => item.name === rawName);
|
|
19080
19081
|
setVarModalMode("edit");
|
|
19081
|
-
setVarModalInitialData(variable ?? { name:
|
|
19082
|
+
setVarModalInitialData(variable ?? { name: rawName, editable: true });
|
|
19082
19083
|
setVarModalOpen(true);
|
|
19083
19084
|
};
|
|
19084
19085
|
|
|
19085
19086
|
const handleVariableSave = (data: VariableFormData) => {
|
|
19086
19087
|
const trimmedName = data.name.trim();
|
|
19087
|
-
const insertToken = \`{{
|
|
19088
|
+
const insertToken = \`{{function.\${trimmedName}}}\`;
|
|
19088
19089
|
|
|
19089
19090
|
if (varModalMode === "create" && varInsertContext) {
|
|
19090
19091
|
const ctx = varInsertContext;
|