This is an automated email from the ASF dual-hosted git repository.

tiagobento pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git


The following commit(s) were added to refs/heads/main by this push:
     new d1d7067fb8c kie-issues#204: Decision Tables input header cells on DMN 
Editor's Boxed Expression Editor should not have a "Name", but rather an 
"Expression" (#2920)
d1d7067fb8c is described below

commit d1d7067fb8ca9dafff5060ba2a4e6e6a55fd1a7d
Author: Daniel José dos Santos <[email protected]>
AuthorDate: Thu Feb 27 20:06:27 2025 -0300

    kie-issues#204: Decision Tables input header cells on DMN Editor's Boxed 
Expression Editor should not have a "Name", but rather an "Expression" (#2920)
---
 .../src/@types/react-table.ts                      |   2 +
 .../expressionVariable/ExpressionVariableCell.tsx  |   5 +-
 .../expressionVariable/ExpressionVariableMenu.tsx  |  38 ++++---
 .../src/expressionVariable/FeelInputTextbox.css    |  51 ++++++++++
 .../src/expressionVariable/FeelInputTextbox.tsx    | 111 +++++++++++++++++++++
 .../DecisionTableExpression.tsx                    |   1 +
 .../src/i18n/BoxedExpressionEditorI18n.ts          |   1 +
 .../src/i18n/locales/de.ts                         |   1 +
 .../src/i18n/locales/en.ts                         |   1 +
 .../src/table/BeeTable/BeeTableThResizable.tsx     |   1 +
 .../tests-e2e/__fixtures__/monaco.ts               |   6 +-
 .../expressions/decisionTableExpressionElement.ts  |   5 +-
 .../tests-e2e/api/nameAndDataTypeCell.ts           |  16 ++-
 .../boxedExpressions/function/populate.spec.ts     |   8 +-
 .../tests-e2e/features/resizing/resizing.spec.ts   |   8 +-
 .../src/parser/IdentifiersRepository.ts            |   5 +
 packages/feel-input-component/package.json         |   3 +-
 packages/feel-input-component/src/FeelConfigs.ts   |   1 +
 packages/pmml-editor/package.json                  |   1 -
 packages/text-editor/package.json                  |   2 +-
 packages/text-editor/src/editor/TextEditor.tsx     |   6 +-
 .../text-editor/src/editor/monaco/MonacoEditor.tsx |   2 +-
 .../src/editor/monaco/MonacoEditorController.ts    |   2 +-
 pnpm-lock.yaml                                     |  23 +----
 repo/graph.dot                                     |   1 +
 repo/graph.json                                    |   5 +
 26 files changed, 251 insertions(+), 55 deletions(-)

diff --git a/packages/boxed-expression-component/src/@types/react-table.ts 
b/packages/boxed-expression-component/src/@types/react-table.ts
index e122fa95fa8..c673d341eb3 100644
--- a/packages/boxed-expression-component/src/@types/react-table.ts
+++ b/packages/boxed-expression-component/src/@types/react-table.ts
@@ -58,6 +58,8 @@ declare module "react-table" {
     dataType: string;
     /** It tells whether column is of type counter or not */
     isRowIndexColumn: boolean;
+    /** It tells if a header is a Feel Expression or just plain text */
+    isHeaderAFeelExpression?: boolean;
 
     cellDelegate?: (id: string) => React.ReactNode;
 
diff --git 
a/packages/boxed-expression-component/src/expressionVariable/ExpressionVariableCell.tsx
 
b/packages/boxed-expression-component/src/expressionVariable/ExpressionVariableCell.tsx
index bd6c880e2e4..c02f2fae758 100644
--- 
a/packages/boxed-expression-component/src/expressionVariable/ExpressionVariableCell.tsx
+++ 
b/packages/boxed-expression-component/src/expressionVariable/ExpressionVariableCell.tsx
@@ -52,13 +52,13 @@ export type OnExpressionWithVariableUpdated = (
 ) => void;
 
 export const ExpressionVariableCell: React.FunctionComponent<
-  BeeTableCellProps<ExpressionWithVariable & { index: number }> & {
+  BeeTableCellProps<ExpressionWithVariable & { index: number; 
isContentAFeelExpression?: boolean }> & {
     onExpressionWithVariableUpdated: OnExpressionWithVariableUpdated;
   }
 > = ({ data, rowIndex, columnIndex, onExpressionWithVariableUpdated }) => {
   const ref = React.useRef<HTMLDivElement>(null);
   const { isReadOnly } = useBoxedExpressionEditor();
-  const { expression, variable, index } = data[rowIndex];
+  const { expression, variable, index, isContentAFeelExpression } = 
data[rowIndex];
 
   const onVariableUpdated = useCallback<OnExpressionVariableUpdated>(
     ({ name = DEFAULT_EXPRESSION_VARIABLE_NAME, typeRef = undefined }) => {
@@ -180,6 +180,7 @@ export const ExpressionVariableCell: 
React.FunctionComponent<
             selectedDataType={variable["@_typeRef"]}
             onVariableUpdated={onVariableUpdated}
             variableUuid={variable["@_id"]}
+            isContentAFeelExpression={isContentAFeelExpression}
           >
             {cellContent}
           </ExpressionVariableMenu>
diff --git 
a/packages/boxed-expression-component/src/expressionVariable/ExpressionVariableMenu.tsx
 
b/packages/boxed-expression-component/src/expressionVariable/ExpressionVariableMenu.tsx
index 7d4afbe4d1c..0664da443cf 100644
--- 
a/packages/boxed-expression-component/src/expressionVariable/ExpressionVariableMenu.tsx
+++ 
b/packages/boxed-expression-component/src/expressionVariable/ExpressionVariableMenu.tsx
@@ -30,6 +30,7 @@ import { PopoverPosition } from 
"@patternfly/react-core/dist/js/components/Popov
 import "./ExpressionVariableMenu.css";
 import { Action, ExpressionChangedArgs, VariableChangedArgs } from "../api";
 import { getOperatingSystem, OperatingSystem } from 
"@kie-tools-core/operating-system";
+import { FeelInputTextbox } from "./FeelInputTextbox";
 
 export type OnExpressionVariableUpdated = (args: {
   name: string;
@@ -59,6 +60,8 @@ export interface ExpressionVariableMenuProps {
   position?: PopoverPosition;
   /** The UUID of the variable. */
   variableUuid: string;
+  /** If instead of plain text the content is a FEEL expression. */
+  isContentAFeelExpression?: boolean;
 }
 
 export const DEFAULT_EXPRESSION_VARIABLE_NAME = "Expression Name";
@@ -74,11 +77,12 @@ export function ExpressionVariableMenu({
   onVariableUpdated,
   position,
   variableUuid,
+  isContentAFeelExpression = false,
 }: ExpressionVariableMenuProps) {
   const { editorRef, beeGwtService } = useBoxedExpressionEditor();
   const { i18n } = useBoxedExpressionEditorI18n();
 
-  nameField = nameField ?? i18n.name;
+  nameField = nameField ?? isContentAFeelExpression ? i18n.expression : 
i18n.name;
   dataTypeField = dataTypeField ?? i18n.dataType;
   appendTo = appendTo ?? editorRef?.current ?? undefined;
 
@@ -199,18 +203,26 @@ export function ExpressionVariableMenu({
         <div className="edit-expression-menu" onKeyDown={onKeyDown} 
onMouseDown={(e) => e.stopPropagation()}>
           <div className="expression-name">
             <label>{nameField}</label>
-            <input
-              ref={expressionNameRef}
-              type="text"
-              id="expression-name"
-              data-ouia-component-id="edit-expression-name"
-              value={expressionName}
-              onChange={onExpressionNameChange}
-              onBlur={onExpressionNameChange}
-              className="form-control pf-c-form-control"
-              placeholder={DEFAULT_EXPRESSION_VARIABLE_NAME}
-              onKeyDown={onKeyDown}
-            />
+            {isContentAFeelExpression ? (
+              <FeelInputTextbox
+                value={expressionName}
+                onChange={(e) => setExpressionName(e)}
+                expressionId={variableUuid}
+              />
+            ) : (
+              <input
+                ref={expressionNameRef}
+                type="text"
+                id="expression-name"
+                data-ouia-component-id="edit-expression-name"
+                value={expressionName}
+                onChange={onExpressionNameChange}
+                onBlur={onExpressionNameChange}
+                className="form-control pf-c-form-control"
+                placeholder={DEFAULT_EXPRESSION_VARIABLE_NAME}
+                onKeyDown={onKeyDown}
+              />
+            )}
           </div>
           <div className="expression-data-type">
             <label>{dataTypeField}</label>
diff --git 
a/packages/boxed-expression-component/src/expressionVariable/FeelInputTextbox.css
 
b/packages/boxed-expression-component/src/expressionVariable/FeelInputTextbox.css
new file mode 100644
index 00000000000..df0a824c163
--- /dev/null
+++ 
b/packages/boxed-expression-component/src/expressionVariable/FeelInputTextbox.css
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+.feel-input-textbox {
+  overflow: hidden;
+}
+
+.feel-input-textbox .feel-input {
+  width: 100%;
+}
+
+/* This is a workaround for an issue when the Monaco editor is inside an 
object that have its position changed by a
+ transform. In our case, the Popup uses transform: translate() to position. So 
we are manual position the
+  suggest widget and its details just bellow the Textbox. */
+.feel-input-textbox .feel-input .suggest-widget {
+  top: 60px !important;
+  left: 14px !important;
+}
+.feel-input-textbox .feel-input .suggest-details-container {
+  top: 60px !important;
+  left: 430px !important;
+}
+
+.feel-input-textbox .feel-input {
+  position: relative;
+  top: 0;
+  left: 0;
+}
+
+.feel-input-textbox .feel-input,
+.feel-input-textbox .feel-input > div {
+  position: relative;
+  height: 100%;
+  text-align: left;
+}
diff --git 
a/packages/boxed-expression-component/src/expressionVariable/FeelInputTextbox.tsx
 
b/packages/boxed-expression-component/src/expressionVariable/FeelInputTextbox.tsx
new file mode 100644
index 00000000000..2dbf7e2b2e8
--- /dev/null
+++ 
b/packages/boxed-expression-component/src/expressionVariable/FeelInputTextbox.tsx
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import * as React from "react";
+import { useBoxedExpressionEditor } from "../BoxedExpressionEditorContext";
+import { useCallback, useMemo, useRef } from "react";
+import { NavigationKeysUtils } from "../keysUtils/keyUtils";
+import "./FeelInputTextbox.css";
+import { FeelInput, FeelInputRef } from "@kie-tools/feel-input-component";
+import * as Monaco from "@kie-tools-core/monaco-editor";
+
+export interface FeelInputComponentProps {
+  value: string;
+  onChange: (value: string) => void;
+  expressionId?: string;
+}
+
+export function FeelInputTextbox({ value, onChange, expressionId }: 
FeelInputComponentProps) {
+  const feelInputRef = useRef<FeelInputRef>(null);
+
+  const MONACO_OPTIONS: Monaco.editor.IStandaloneEditorConstructionOptions = {
+    fixedOverflowWidgets: true,
+    lineNumbers: "off",
+    fontSize: 13,
+    renderLineHighlight: "none",
+    lineDecorationsWidth: 1,
+    automaticLayout: true,
+    "semanticHighlighting.enabled": true,
+  };
+
+  const { onRequestFeelIdentifiers } = useBoxedExpressionEditor();
+
+  const feelIdentifiers = useMemo(() => {
+    return onRequestFeelIdentifiers?.();
+  }, [onRequestFeelIdentifiers]);
+
+  const updateValue = useCallback(
+    (newValue: string) => {
+      if (value !== newValue) {
+        onChange(newValue);
+      }
+    },
+    [value, onChange]
+  );
+
+  const onFeelKeyDown = useCallback(
+    (e: Monaco.IKeyboardEvent, newValue: string) => {
+      const eventKey = e?.code ?? "";
+
+      if (NavigationKeysUtils.isTab(eventKey) || 
NavigationKeysUtils.isEnter(eventKey)) {
+        if (feelInputRef.current?.isSuggestionWidgetOpen()) {
+          // Do nothing.
+        } else {
+          updateValue(newValue);
+          e.preventDefault();
+        }
+      }
+
+      if (NavigationKeysUtils.isEsc(eventKey)) {
+        if (feelInputRef.current?.isSuggestionWidgetOpen()) {
+          // Do nothing.
+        } else {
+          // We need to restore the content on Monaco, because when
+          // we disable it, it changes the cell content with the
+          // last value it had.
+          feelInputRef.current?.setMonacoValue(value);
+          updateValue(value);
+        }
+      }
+    },
+    [updateValue, value]
+  );
+
+  const onFeelBlur = useCallback(
+    (valueOnBlur: string) => {
+      updateValue(valueOnBlur);
+    },
+    [updateValue]
+  );
+
+  return (
+    <div className="form-control pf-c-form-control feel-input-textbox">
+      <FeelInput
+        ref={feelInputRef}
+        enabled={true}
+        value={value}
+        onKeyDown={onFeelKeyDown}
+        options={MONACO_OPTIONS}
+        onBlur={onFeelBlur}
+        feelIdentifiers={feelIdentifiers}
+        expressionId={expressionId}
+      />
+    </div>
+  );
+}
diff --git 
a/packages/boxed-expression-component/src/expressions/DecisionTableExpression/DecisionTableExpression.tsx
 
b/packages/boxed-expression-component/src/expressions/DecisionTableExpression/DecisionTableExpression.tsx
index 8513e258530..77ed5b95736 100644
--- 
a/packages/boxed-expression-component/src/expressions/DecisionTableExpression/DecisionTableExpression.tsx
+++ 
b/packages/boxed-expression-component/src/expressions/DecisionTableExpression/DecisionTableExpression.tsx
@@ -344,6 +344,7 @@ export function DecisionTableExpression({
         groupType: DecisionTableColumnType.InputClause,
         cssClasses: "decision-table--input",
         isRowIndexColumn: false,
+        isHeaderAFeelExpression: true,
       })
     );
 
diff --git 
a/packages/boxed-expression-component/src/i18n/BoxedExpressionEditorI18n.ts 
b/packages/boxed-expression-component/src/i18n/BoxedExpressionEditorI18n.ts
index 9d249970ef7..257ba04d7be 100644
--- a/packages/boxed-expression-component/src/i18n/BoxedExpressionEditorI18n.ts
+++ b/packages/boxed-expression-component/src/i18n/BoxedExpressionEditorI18n.ts
@@ -57,6 +57,7 @@ interface BoxedExpressionEditorDictionary extends 
ReferenceDictionary {
   editRelation: string;
   enterFunction: string;
   enterText: string;
+  expression: string;
   delete: string;
   function: string;
   hitPolicy: string;
diff --git a/packages/boxed-expression-component/src/i18n/locales/de.ts 
b/packages/boxed-expression-component/src/i18n/locales/de.ts
index a087a2747c1..e1fc5f271aa 100644
--- a/packages/boxed-expression-component/src/i18n/locales/de.ts
+++ b/packages/boxed-expression-component/src/i18n/locales/de.ts
@@ -62,6 +62,7 @@ export const de: BoxedExpressionEditorI18n = {
   editRelation: "Relation bearbeiten",
   enterFunction: "Funktionsname",
   enterText: "Text eingeben",
+  expression: "Ausdruck",
   function: "Funktion",
   hitPolicy: "Hit Policy",
   hitPolicyHelp: {
diff --git a/packages/boxed-expression-component/src/i18n/locales/en.ts 
b/packages/boxed-expression-component/src/i18n/locales/en.ts
index b5bb912e6f1..9331e61820f 100644
--- a/packages/boxed-expression-component/src/i18n/locales/en.ts
+++ b/packages/boxed-expression-component/src/i18n/locales/en.ts
@@ -62,6 +62,7 @@ export const en: BoxedExpressionEditorI18n = {
   editRelation: "Edit Relation",
   enterFunction: "Function name",
   enterText: "Enter Text",
+  expression: "Expression",
   function: "Function",
   hitPolicy: "Hit Policy",
   hitPolicyHelp: {
diff --git 
a/packages/boxed-expression-component/src/table/BeeTable/BeeTableThResizable.tsx
 
b/packages/boxed-expression-component/src/table/BeeTable/BeeTableThResizable.tsx
index da0e0e462cf..9e0bb54abc9 100644
--- 
a/packages/boxed-expression-component/src/table/BeeTable/BeeTableThResizable.tsx
+++ 
b/packages/boxed-expression-component/src/table/BeeTable/BeeTableThResizable.tsx
@@ -223,6 +223,7 @@ export function BeeTableThResizable<R extends object>({
             onVariableUpdated={onExpressionHeaderUpdated}
             appendTo={getAppendToElement}
             variableUuid={column.id}
+            isContentAFeelExpression={column.isHeaderAFeelExpression ?? false}
           >
             {headerCellInfo}
           </ExpressionVariableMenu>
diff --git 
a/packages/boxed-expression-component/tests-e2e/__fixtures__/monaco.ts 
b/packages/boxed-expression-component/tests-e2e/__fixtures__/monaco.ts
index 10b149aedba..7e550f35ec7 100644
--- a/packages/boxed-expression-component/tests-e2e/__fixtures__/monaco.ts
+++ b/packages/boxed-expression-component/tests-e2e/__fixtures__/monaco.ts
@@ -26,7 +26,7 @@ export class Monaco {
     public projectName: ProjectName
   ) {}
 
-  public async fill(args: { monacoParentLocator: Locator | Page; content: 
string; nth?: number }) {
+  public async fill(args: { monacoParentLocator: Locator | Page; content: 
string; nth?: number; submit?: boolean }) {
     if (args.nth !== undefined) {
       await 
args.monacoParentLocator.getByTestId("monaco-container").nth(args.nth).dblclick();
     } else {
@@ -42,7 +42,9 @@ export class Monaco {
     // FEEL text input selector when the monaco editor is selected.
     await this.page.getByLabel("Editor content;Press Alt+F1 for Accessibility 
Options.").fill(args.content);
     await this.page.keyboard.press("Home");
-    await this.page.keyboard.press("Enter");
+    if (args.submit === undefined || args.submit) {
+      await this.page.keyboard.press("Enter");
+    }
   }
 
   public async canFill(args: { monacoParentLocator: Locator | Page; nth?: 
number }) {
diff --git 
a/packages/boxed-expression-component/tests-e2e/api/expressions/decisionTableExpressionElement.ts
 
b/packages/boxed-expression-component/tests-e2e/api/expressions/decisionTableExpressionElement.ts
index 84f6438e1de..01f370a139c 100644
--- 
a/packages/boxed-expression-component/tests-e2e/api/expressions/decisionTableExpressionElement.ts
+++ 
b/packages/boxed-expression-component/tests-e2e/api/expressions/decisionTableExpressionElement.ts
@@ -277,7 +277,10 @@ export class DecisionTableExpressionElement {
   }
 
   public inputHeaderAt(index: number) {
-    return new 
NameAndDataTypeCell(this.locator.getByTestId("kie-tools--bee--table-header-input").nth(index));
+    return new NameAndDataTypeCell(
+      
this.locator.getByTestId("kie-tools--bee--table-header-input").nth(index),
+      this.monaco
+    );
   }
 
   public outputHeaderAt(index: number) {
diff --git 
a/packages/boxed-expression-component/tests-e2e/api/nameAndDataTypeCell.ts 
b/packages/boxed-expression-component/tests-e2e/api/nameAndDataTypeCell.ts
index b693bdfe7c6..df71ed7608a 100644
--- a/packages/boxed-expression-component/tests-e2e/api/nameAndDataTypeCell.ts
+++ b/packages/boxed-expression-component/tests-e2e/api/nameAndDataTypeCell.ts
@@ -19,9 +19,13 @@
 
 import { Locator } from "@playwright/test";
 import { ContextMenu } from "./expressionContainer";
+import { Monaco } from "../__fixtures__/monaco";
 
 export class NameAndDataTypeCell {
-  constructor(private locator: Locator) {}
+  constructor(
+    private locator: Locator,
+    private monaco?: Monaco
+  ) {}
 
   public async open() {
     await this.locator.nth(0).click();
@@ -32,9 +36,13 @@ export class NameAndDataTypeCell {
   }
 
   public async setName(params: { name: string; close: boolean }) {
-    await this.locator.getByRole("textbox").fill(params.name);
-    if (params.close) {
-      await this.locator.getByRole("textbox").press("Enter");
+    if (this.monaco) {
+      return await this.monaco.fill({ monacoParentLocator: this.locator, 
content: params.name, submit: params.close });
+    } else {
+      await this.locator.getByRole("textbox").fill(params.name);
+      if (params.close) {
+        await this.locator.getByRole("textbox").press("Enter");
+      }
     }
   }
 
diff --git 
a/packages/boxed-expression-component/tests-e2e/boxedExpressions/function/populate.spec.ts
 
b/packages/boxed-expression-component/tests-e2e/boxedExpressions/function/populate.spec.ts
index ed995046508..3d607b41cbb 100644
--- 
a/packages/boxed-expression-component/tests-e2e/boxedExpressions/function/populate.spec.ts
+++ 
b/packages/boxed-expression-component/tests-e2e/boxedExpressions/function/populate.spec.ts
@@ -26,6 +26,7 @@ test.describe("Populate Boxed Function", () => {
 
     await page.getByRole("columnheader", { name: "Expression Name 
(<Undefined>)" }).click();
     await page.getByPlaceholder("Expression Name").fill("Affordability 
calculation");
+
     await page.getByLabel("<Undefined>").click();
     await page.getByRole("option", { name: "boolean" }).click();
     await page.keyboard.press("Enter");
@@ -99,8 +100,11 @@ test.describe("Populate Boxed Function", () => {
       .addRowAtBottomOfIndex(1);
 
     await page.getByRole("columnheader", { name: "input-1 (<Undefined>)" 
}).click();
-    await page.getByPlaceholder("Expression Name").fill("Risk category");
-    await page.keyboard.press("Enter");
+    await monaco.fill({
+      monacoParentLocator: 
page.getByTestId("kie-tools--bee--expression-popover-menu"),
+      content: "Risk category",
+      submit: true,
+    });
 
     await bee.expression.asDecisionTable().fill({
       startAtCell: 1,
diff --git 
a/packages/boxed-expression-component/tests-e2e/features/resizing/resizing.spec.ts
 
b/packages/boxed-expression-component/tests-e2e/features/resizing/resizing.spec.ts
index 9e72f472613..97a49eaec36 100644
--- 
a/packages/boxed-expression-component/tests-e2e/features/resizing/resizing.spec.ts
+++ 
b/packages/boxed-expression-component/tests-e2e/features/resizing/resizing.spec.ts
@@ -288,10 +288,12 @@ test.describe("Resizing", () => {
       expect(await annotationsHeader.boundingBox()).toHaveProperty("width", 
240);
     });
 
-    test("should change input column name and reset size", async ({ page, 
resizing, browserName }) => {
+    test("should change input column name and reset size", async ({ page, 
resizing, browserName, monaco }) => {
       await page.getByRole("columnheader", { name: "input-1 (<Undefined>)" 
}).click();
-      await page.getByPlaceholder("Expression Name").fill("Installment 
Calculation");
-      await page.keyboard.press("Enter");
+      await monaco.fill({
+        monacoParentLocator: 
page.getByTestId("kie-tools--bee--expression-popover-menu"),
+        content: "Installment Calculation",
+      });
 
       const inputHeader = page.getByRole("columnheader", { name: "Installment 
Calculation (<Undefined>)" });
       const outputHeader = page.getByRole("columnheader", { name: "Expression 
Name (<Undefined>)" });
diff --git 
a/packages/dmn-feel-antlr4-parser/src/parser/IdentifiersRepository.ts 
b/packages/dmn-feel-antlr4-parser/src/parser/IdentifiersRepository.ts
index c37d34186f5..0ace6f72d4d 100644
--- a/packages/dmn-feel-antlr4-parser/src/parser/IdentifiersRepository.ts
+++ b/packages/dmn-feel-antlr4-parser/src/parser/IdentifiersRepository.ts
@@ -783,6 +783,11 @@ export class IdentifiersRepository {
         ruleElement.outputEntry?.forEach((outputElement) => 
this.addDecisionTableEntryNode(parent, outputElement));
       }
     }
+    if (decisionTable.input) {
+      for (const inputClause of decisionTable.input) {
+        this.addDecisionTableEntryNode(parent, inputClause);
+      }
+    }
     this.addIdentifier({
       uuid: variableNode.uuid,
       name: "",
diff --git a/packages/feel-input-component/package.json 
b/packages/feel-input-component/package.json
index da5dc24036d..78c7100a7d1 100644
--- a/packages/feel-input-component/package.json
+++ b/packages/feel-input-component/package.json
@@ -22,8 +22,7 @@
     "@kie-tools-core/patternfly-base": "workspace:*",
     "@kie-tools/dmn-feel-antlr4-parser": "workspace:*",
     "@kie-tools/dmn-language-service": "workspace:*",
-    "@kie-tools/i18n-common-dictionary": "workspace:*",
-    "monaco-editor": "^0.39.0"
+    "@kie-tools/i18n-common-dictionary": "workspace:*"
   },
   "devDependencies": {
     "@babel/core": "^7.16.0",
diff --git a/packages/feel-input-component/src/FeelConfigs.ts 
b/packages/feel-input-component/src/FeelConfigs.ts
index 80429ef3001..147e82e453d 100644
--- a/packages/feel-input-component/src/FeelConfigs.ts
+++ b/packages/feel-input-component/src/FeelConfigs.ts
@@ -86,6 +86,7 @@ export const feelDefaultConfig = (
     },
     wordBasedSuggestions: false,
     "semanticHighlighting.enabled": true,
+
     ...options,
   };
 };
diff --git a/packages/pmml-editor/package.json 
b/packages/pmml-editor/package.json
index 00216054233..96030c6b37f 100644
--- a/packages/pmml-editor/package.json
+++ b/packages/pmml-editor/package.json
@@ -48,7 +48,6 @@
     "csstype": "^3.0.11",
     "immer": "^10.0.3",
     "lodash": "^4.17.21",
-    "monaco-editor": "^0.39.0",
     "react-cool-onclickoutside": "^1.6.1",
     "react-monaco-editor": "^0.49.0",
     "react-redux": "^7.2.4",
diff --git a/packages/text-editor/package.json 
b/packages/text-editor/package.json
index b7f0b778304..06d9ffa8c89 100644
--- a/packages/text-editor/package.json
+++ b/packages/text-editor/package.json
@@ -25,12 +25,12 @@
   "dependencies": {
     "@kie-tools-core/editor": "workspace:*",
     "@kie-tools-core/envelope-bus": "workspace:*",
+    "@kie-tools-core/monaco-editor": "workspace:*",
     "@kie-tools-core/notifications": "workspace:*",
     "@kie-tools-core/operating-system": "workspace:*",
     "@kie-tools-core/patternfly-base": "workspace:*",
     "@kie-tools-core/workspace": "workspace:*",
     "@patternfly/react-core": "^4.276.6",
-    "monaco-editor": "^0.39.0",
     "monaco-yaml": "^4.0.4"
   },
   "devDependencies": {
diff --git a/packages/text-editor/src/editor/TextEditor.tsx 
b/packages/text-editor/src/editor/TextEditor.tsx
index 93473785243..df038b3c28a 100644
--- a/packages/text-editor/src/editor/TextEditor.tsx
+++ b/packages/text-editor/src/editor/TextEditor.tsx
@@ -20,11 +20,11 @@
 import { ChannelType, EditorTheme, StateControlCommand } from 
"@kie-tools-core/editor/dist/api";
 import { Notification } from "@kie-tools-core/notifications/dist/api";
 import { WorkspaceEdit } from "@kie-tools-core/workspace/dist/api";
-import { editor } from "monaco-editor";
+import { editor } from "@kie-tools-core/monaco-editor";
 import * as React from "react";
 import { useCallback, useImperativeHandle, useRef, useState } from "react";
-import { MonacoEditor } from "./monaco/MonacoEditor";
-import { MonacoEditorApi, MonacoEditorOperation } from 
"./monaco/MonacoEditorController";
+import { MonacoEditor } from "./monaco";
+import { MonacoEditorApi, MonacoEditorOperation } from "./monaco";
 
 interface Props {
   onStateControlCommandUpdate: (command: StateControlCommand) => void;
diff --git a/packages/text-editor/src/editor/monaco/MonacoEditor.tsx 
b/packages/text-editor/src/editor/monaco/MonacoEditor.tsx
index ae71b4c64e4..85d223cd26a 100644
--- a/packages/text-editor/src/editor/monaco/MonacoEditor.tsx
+++ b/packages/text-editor/src/editor/monaco/MonacoEditor.tsx
@@ -24,7 +24,7 @@ import {
   useKogitoEditorEnvelopeContext,
 } from "@kie-tools-core/editor/dist/api";
 import { useSharedValue } from "@kie-tools-core/envelope-bus/dist/hooks";
-import { editor } from "monaco-editor";
+import { editor } from "@kie-tools-core/monaco-editor";
 import { extname } from "path";
 import * as React from "react";
 import { useEffect, useImperativeHandle, useMemo, useRef } from "react";
diff --git a/packages/text-editor/src/editor/monaco/MonacoEditorController.ts 
b/packages/text-editor/src/editor/monaco/MonacoEditorController.ts
index bad937ff7bf..b739a22d4e6 100644
--- a/packages/text-editor/src/editor/monaco/MonacoEditorController.ts
+++ b/packages/text-editor/src/editor/monaco/MonacoEditorController.ts
@@ -19,7 +19,7 @@
 
 import { EditorTheme } from "@kie-tools-core/editor/dist/api";
 import { OperatingSystem } from "@kie-tools-core/operating-system";
-import { editor, KeyCode, KeyMod } from "monaco-editor";
+import { editor, KeyCode, KeyMod } from "@kie-tools-core/monaco-editor";
 
 export interface MonacoEditorApi {
   show: (container: HTMLDivElement, theme?: EditorTheme) => 
editor.IStandaloneCodeEditor;
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 84ab4ade60e..eec6a7b4caf 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -5375,9 +5375,6 @@ importers:
       '@kie-tools/i18n-common-dictionary':
         specifier: workspace:*
         version: link:../i18n-common-dictionary
-      monaco-editor:
-        specifier: ^0.39.0
-        version: 0.39.0
       react:
         specifier: '>=17.0.2 <19.0.0'
         version: 17.0.2
@@ -8102,9 +8099,6 @@ importers:
       lodash:
         specifier: ^4.17.21
         version: 4.17.21
-      monaco-editor:
-        specifier: ^0.39.0
-        version: 0.39.0
       react:
         specifier: '>=17.0.2 <19.0.0'
         version: 17.0.2
@@ -12890,6 +12884,9 @@ importers:
       '@kie-tools-core/envelope-bus':
         specifier: workspace:*
         version: link:../envelope-bus
+      '@kie-tools-core/monaco-editor':
+        specifier: workspace:*
+        version: link:../monaco-editor
       '@kie-tools-core/notifications':
         specifier: workspace:*
         version: link:../notifications
@@ -12905,9 +12902,6 @@ importers:
       '@patternfly/react-core':
         specifier: ^4.276.6
         version: 4.276.6([email protected]([email protected]))([email protected])
-      monaco-editor:
-        specifier: ^0.39.0
-        version: 0.39.0
       monaco-yaml:
         specifier: ^4.0.4
         version: 4.0.4([email protected])
@@ -31530,7 +31524,7 @@ snapshots:
     dependencies:
       '@ampproject/remapping': 2.3.0
       '@angular-devkit/architect': 0.1801.3([email protected])
-      '@angular-devkit/build-webpack': 
0.1801.3([email protected])([email protected]([email protected]([email protected])))([email protected]([email protected]))
+      '@angular-devkit/build-webpack': 
0.1801.3([email protected])([email protected]([email protected]))([email protected]([email protected]))
       '@angular-devkit/core': 18.1.3([email protected])
       '@angular/build': 
18.1.3(@angular/[email protected](@angular/[email protected](@angular/[email protected]([email protected])([email protected])))([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])
       '@angular/compiler-cli': 
18.1.3(@angular/[email protected](@angular/[email protected]([email protected])([email protected])))([email protected])
@@ -31616,15 +31610,6 @@ snapshots:
       - utf-8-validate
       - webpack-cli
 
-  
'@angular-devkit/[email protected]([email protected])([email protected]([email protected]([email protected])))([email protected]([email protected]))':
-    dependencies:
-      '@angular-devkit/architect': 0.1801.3([email protected])
-      rxjs: 7.8.1
-      webpack: 5.92.1([email protected])
-      webpack-dev-server: 5.0.4([email protected]([email protected]))
-    transitivePeerDependencies:
-      - chokidar
-
   
'@angular-devkit/[email protected]([email protected])([email protected]([email protected]))([email protected]([email protected]))':
     dependencies:
       '@angular-devkit/architect': 0.1801.3([email protected])
diff --git a/repo/graph.dot b/repo/graph.dot
index ef224db0011..2b68ff4712b 100644
--- a/repo/graph.dot
+++ b/repo/graph.dot
@@ -663,6 +663,7 @@ digraph G {
   "@kie-tools-core/switch-expression-ts" -> "@kie-tools/jest-base" [ style = 
"dashed", color = "purple" ];
   "@kie-tools-core/switch-expression-ts" -> "@kie-tools/tsconfig" [ style = 
"dashed", color = "purple" ];
   "@kie-tools/text-editor" -> "@kie-tools-core/editor" [ style = "solid", 
color = "blue" ];
+  "@kie-tools/text-editor" -> "@kie-tools-core/monaco-editor" [ style = 
"solid", color = "blue" ];
   "@kie-tools/uniforms-patternfly" -> "@kie-tools/eslint" [ style = "dashed", 
color = "blue" ];
   "@kie-tools/uniforms-patternfly" -> "@kie-tools/jest-base" [ style = 
"dashed", color = "blue" ];
   "@kie-tools/uniforms-patternfly" -> "@kie-tools/tsconfig" [ style = 
"dashed", color = "blue" ];
diff --git a/repo/graph.json b/repo/graph.json
index 7bdca5ea30a..66694a3ffe4 100644
--- a/repo/graph.json
+++ b/repo/graph.json
@@ -2413,6 +2413,11 @@
         "target": "@kie-tools-core/editor",
         "weight": 1
       },
+      {
+        "source": "@kie-tools/text-editor",
+        "target": "@kie-tools-core/monaco-editor",
+        "weight": 1
+      },
       {
         "source": "@kie-tools/yard-editor",
         "target": "@kie-tools-core/editor",


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to