Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync main branch with Apache main branch #75

Merged
merged 10 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion devbox.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://raw.githubusercontent.com/jetpack-io/devbox/0.10.4/.schema/devbox.schema.json",
"packages": {
"temurin-bin-17": "17.0.9",
"nodejs": "20.12.2",
"nodejs": "22.11.0",
"maven": "3.9.6",
"kubernetes-helm": "3.13.3",
"gnumake": "4.4.1",
Expand Down
60 changes: 52 additions & 8 deletions devbox.lock
Original file line number Diff line number Diff line change
Expand Up @@ -129,24 +129,68 @@
}
}
},
"nodejs@20.12.2": {
"last_modified": "2024-06-12T20:55:33Z",
"nodejs@22.11.0": {
"last_modified": "2024-12-23T21:10:33Z",
"plugin_version": "0.0.2",
"resolved": "github:NixOS/nixpkgs/a9858885e197f984d92d7fe64e9fff6b2e488d40#nodejs_20",
"resolved": "github:NixOS/nixpkgs/de1864217bfa9b5845f465e771e0ecb48b30e02d#nodejs_22",
"source": "devbox-search",
"version": "20.12.2",
"version": "22.11.0",
"systems": {
"aarch64-darwin": {
"store_path": "/nix/store/ridvrr7dsnxpvh3f1sr41xiwvwk1nnkg-nodejs-20.12.2"
"outputs": [
{
"name": "out",
"path": "/nix/store/9vkabbbbyfn8hv5l1r8fm59d27imq460-nodejs-22.11.0",
"default": true
},
{
"name": "libv8",
"path": "/nix/store/m3rxxwm6jp95kjmh4rklqn0d76biz6wm-nodejs-22.11.0-libv8"
}
],
"store_path": "/nix/store/9vkabbbbyfn8hv5l1r8fm59d27imq460-nodejs-22.11.0"
},
"aarch64-linux": {
"store_path": "/nix/store/ybhzncvkslqd0b9c3lp91l0wphjzczc8-nodejs-20.12.2"
"outputs": [
{
"name": "out",
"path": "/nix/store/z2lznj5fq0wagkhj7nkgmb5yr4gyv0ws-nodejs-22.11.0",
"default": true
},
{
"name": "libv8",
"path": "/nix/store/0xiwppqyszilzy9cg71c26fxg5qcxh89-nodejs-22.11.0-libv8"
}
],
"store_path": "/nix/store/z2lznj5fq0wagkhj7nkgmb5yr4gyv0ws-nodejs-22.11.0"
},
"x86_64-darwin": {
"store_path": "/nix/store/gxi71m2y8x1rl83dpr1g0x9yz3klrcb0-nodejs-20.12.2"
"outputs": [
{
"name": "out",
"path": "/nix/store/s81s2z275wnjazk4ij3zvn6kslfa5ipf-nodejs-22.11.0",
"default": true
},
{
"name": "libv8",
"path": "/nix/store/mm87n14lp5akdjlfwh1yg4l93zm8gv9h-nodejs-22.11.0-libv8"
}
],
"store_path": "/nix/store/s81s2z275wnjazk4ij3zvn6kslfa5ipf-nodejs-22.11.0"
},
"x86_64-linux": {
"store_path": "/nix/store/74a6mmrgxzcg9axl1gmdz3j2y1bjd13f-nodejs-20.12.2"
"outputs": [
{
"name": "out",
"path": "/nix/store/fkyp1bm5gll9adnfcj92snyym524mdrj-nodejs-22.11.0",
"default": true
},
{
"name": "libv8",
"path": "/nix/store/fyaac3q8qn3zfxy72airfabm3dakmgf5-nodejs-22.11.0-libv8"
}
],
"store_path": "/nix/store/fkyp1bm5gll9adnfcj92snyym524mdrj-nodejs-22.11.0"
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion examples/process-compact-architecture/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command",
"start": "run-script-os",
"start:darwin:linux": "mvn quarkus:dev -DskipTests -Pdevelopment",
"start:win32": "mvn quarkus:dev `-DskipTests `-Pdevelopment",
"start:win32": "pnpm powershell mvn quarkus:dev `-DskipTests `-Pdevelopment",
"startContainers": "run-script-os || pnpm run stopContainers",
"startContainers:darwin:linux": "mvn clean install -Pcontainer && cd ./docker-compose && sh startContainers.sh",
"startContainers:win32": "echo Running containers example is not supported on Windows",
Expand Down
6 changes: 6 additions & 0 deletions examples/process-compact-architecture/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@
<groupId>org.kie</groupId>
<artifactId>kogito-addons-quarkus-data-audit</artifactId>
</dependency>

<!-- User Task persistence -->
<dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-addons-quarkus-usertask-storage-jpa</artifactId>
</dependency>
</dependencies>

<profiles>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@kie/lock-treatment-tool": "^0.2.4",
"@nice-move/prettier-plugin-package-json": "^0.8.0",
"@prettier/plugin-xml": "^3.4.1",
"@types/node": "^20.14.2",
"@types/node": "^22.10.7",
"husky": "^6.0.0",
"postinstall-postinstall": "^2.1.0",
"prettier": "^3.3.2",
Expand Down
10 changes: 0 additions & 10 deletions packages/boxed-expression-component/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@ This editor provides the possibility to edit the expression related to a Decisio
The main component is `src/components/BoxedExpressionEditor/BoxedExpressionEditor.tsx`.
It represents the entry point for using the editor.

In the `showcase` folder, there is a tiny React application, which represent the Proof Of Value about how it is possible to integrate the `BoxedExpressionEditor` component inside another existing application.

Once the showcase application gets launched, you can see on the right side of the page the JSON that is actually produced for the corresponding selected logic type.
Such JSON represents the model data that must be adopted to initialize the `BoxedExpressionEditor` component, by populating its props.

The retrieval of the updated expression is performed by making usage of global functions, belonging to `beeApiWrapper` object, that must be available in the `Window` namespace and used by the `BoxedExpressionEditor` component.
All exposed function expected to exist, are defined in `src/api/BoxedExpressionEditor.ts`.

Consider that the showcase app is able to display the most updated JSON representing an expression, because uses such APIs (please refer to `showcase/src/index.tsx`).

## Scripts

In the main project (where the components actually live), it is possible to execute, from the root folder, the following scripts (`pnpm` is recommended):
Expand Down
2 changes: 1 addition & 1 deletion packages/boxed-expression-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"@kie-tools/root-env": "workspace:*",
"@kie-tools/storybook-base": "workspace:*",
"@kie-tools/tsconfig": "workspace:*",
"@microlink/react-json-view": "^1.24.0",
"@playwright/test": "^1.45.2",
"@storybook/addon-links": "^7.3.2",
"@storybook/blocks": "^7.3.2",
Expand All @@ -72,7 +73,6 @@
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"jest-when": "^3.6.0",
"react-json-view": "^1.21.3",
"rimraf": "^3.0.2",
"run-script-os": "^1.1.6",
"storybook": "^7.3.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/cors-proxy-image/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ARG CORS_PROXY_DEFAULT_VERBOSE=false

ENV HOME /home/kie-sandbox
ENV NVM_DIR $HOME/.nvm
ENV NODE_VERSION v20.14.0
ENV NODE_VERSION v22.13.1

RUN mkdir $HOME \
&& chgrp -R 0 $HOME \
Expand Down
2 changes: 1 addition & 1 deletion packages/cors-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@types/cors": "^2.8.13",
"@types/express": "^4.17.17",
"@types/jest": "^29.5.12",
"@types/node": "^20.14.2",
"@types/node": "^22.10.7",
"cross-env": "^7.0.3",
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/dmn-editor-envelope/src/DmnEditorFactory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class DmnEditorFactory implements EditorFactory<Editor, KogitoEditorChann
}

export class DmnEditorInterface implements Editor {
private self: DmnEditorRoot;
protected self: DmnEditorRoot;
public af_isReact = true;
public af_componentId: "dmn-editor";
public af_componentTitle: "DMN Editor";
Expand Down
4 changes: 4 additions & 0 deletions packages/dmn-editor-envelope/src/DmnEditorRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ export class DmnEditorRoot extends React.Component<DmnEditorRootProps, DmnEditor

// Exposed API

public openBoxedExpressionEditor(nodeId: string): void {
this.dmnEditorRef.current?.openBoxedExpressionEditor(nodeId);
}

public async undo(): Promise<void> {
this.setState((prev) => ({ ...prev, pointer: Math.max(0, prev.pointer - 1) }));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
* under the License.
*/

.section-body {
--pf-c-page__main-section--PaddingTop: 0px;
--pf-c-page__main-section--PaddingRight: 0px;
--pf-c-page__main-section--PaddingBottom: 0px;
--pf-c-page__main-section--PaddingLeft: 0px;
}
import { KogitoEditorChannelApi } from "@kie-tools-core/editor/dist/api";

export interface NewDmnEditorChannelApi extends KogitoEditorChannelApi {}
28 changes: 28 additions & 0 deletions packages/dmn-editor-envelope/src/NewDmnEditorEnvelopeApi.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* 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 { KogitoEditorEnvelopeApi } from "@kie-tools-core/editor/dist/api";

export interface NewDmnEditorEnvelopeApi extends KogitoEditorEnvelopeApi {
/**
* Open boxed expression editor for given node
* @param nodeId id of the node to open
*/
dmnEditor_openBoxedExpressionEditor(nodeId: string): void;
}
46 changes: 46 additions & 0 deletions packages/dmn-editor-envelope/src/NewDmnEditorEnvelopeApiFactory.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* 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 { EnvelopeApiFactoryArgs } from "@kie-tools-core/envelope";
import { EditorEnvelopeViewApi, KogitoEditorEnvelopeApiImpl } from "@kie-tools-core/editor/dist/envelope";
import { KogitoEditorEnvelopeContextType } from "@kie-tools-core/editor/dist/api";
import { NewDmnEditorInterface } from "./NewDmnEditorFactory";
import { NewDmnEditorEnvelopeApi } from "./NewDmnEditorEnvelopeApi";
import { NewDmnEditorChannelApi } from "./NewDmnEditorChannelApi";
import { NewDmnEditorFactory } from "./NewDmnEditorFactory";

export type NewDmnEnvelopeApiFactoryArgs = EnvelopeApiFactoryArgs<
NewDmnEditorEnvelopeApi,
NewDmnEditorChannelApi,
EditorEnvelopeViewApi<NewDmnEditorInterface>,
KogitoEditorEnvelopeContextType<NewDmnEditorChannelApi>
>;

export class NewDmnEditorEnvelopeApiImpl
extends KogitoEditorEnvelopeApiImpl<NewDmnEditorInterface, NewDmnEditorEnvelopeApi, NewDmnEditorChannelApi>
implements NewDmnEditorEnvelopeApi
{
constructor(readonly dmnArgs: NewDmnEnvelopeApiFactoryArgs) {
super(dmnArgs, new NewDmnEditorFactory());
}

public dmnEditor_openBoxedExpressionEditor(nodeId: string): void {
this.getEditorOrThrowError().openBoxedExpressionEditor(nodeId);
}
}
42 changes: 42 additions & 0 deletions packages/dmn-editor-envelope/src/NewDmnEditorFactory.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* 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 { EditorFactory, EditorInitArgs, KogitoEditorEnvelopeContextType } from "@kie-tools-core/editor/dist/api";
import { NewDmnEditorChannelApi } from "./NewDmnEditorChannelApi";
import { DmnEditorInterface } from "./DmnEditorFactory";

export class NewDmnEditorFactory implements EditorFactory<NewDmnEditorInterface, NewDmnEditorChannelApi> {
public createEditor(
envelopeContext: KogitoEditorEnvelopeContextType<NewDmnEditorChannelApi>,
initArgs: EditorInitArgs
): Promise<NewDmnEditorInterface> {
return Promise.resolve(new NewDmnEditorInterface(envelopeContext, initArgs));
}
}

export class NewDmnEditorInterface extends DmnEditorInterface {
/**
* Open boxed expression editor for given node
* @param nodeId id of the node to open
*/
public openBoxedExpressionEditor(nodeId: string): void {
this.self.openBoxedExpressionEditor(nodeId);
}
}
4 changes: 2 additions & 2 deletions packages/dmn-editor-standalone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@patternfly/react-core": "^4.276.6",
"@playwright/test": "^1.45.2",
"@storybook/addon-links": "^7.3.2",
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
"@storybook/addon-webpack5-compiler-babel": "^3.0.5",
"@storybook/blocks": "^7.3.2",
"@storybook/manager-api": "^7.3.2",
"@storybook/preview-api": "^7.3.2",
Expand All @@ -62,7 +62,7 @@
"@types/jest-when": "^3.5.5",
"@types/lodash": "^4.14.168",
"@types/minimatch": "^3.0.5",
"@types/node": "^20.14.2",
"@types/node": "^22.10.7",
"@types/react": "^17.0.6",
"@types/react-dom": "^17.0.5",
"buffer": "^6.0.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/dmn-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"@kie-tools/tsconfig": "workspace:*",
"@playwright/test": "^1.45.2",
"@storybook/addon-links": "^7.3.2",
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
"@storybook/addon-webpack5-compiler-babel": "^3.0.5",
"@storybook/blocks": "^7.3.2",
"@storybook/manager-api": "^7.3.2",
"@storybook/preview-api": "^7.3.2",
Expand All @@ -84,7 +84,7 @@
"@types/jest": "^29.5.12",
"@types/jest-when": "^3.5.5",
"@types/lodash": "^4.14.168",
"@types/node": "^20.14.2",
"@types/node": "^22.10.7",
"@types/react": "^17.0.6",
"@types/react-dom": "^17.0.5",
"@types/uuid": "^8.3.0",
Expand Down
6 changes: 6 additions & 0 deletions packages/dmn-editor/src/DmnEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const SVG_PADDING = 20;
export type DmnEditorRef = {
reset: (mode: DmnLatestModel) => void;
getDiagramSvg: () => Promise<string | undefined>;
openBoxedExpressionEditor: (nodeId: string) => void;
getCommands: () => Commands;
};

Expand Down Expand Up @@ -203,6 +204,11 @@ export const DmnEditorInternal = ({
const state = dmnEditorStoreApi.getState();
return state.dispatch(state).dmn.reset(normalize(model));
},
openBoxedExpressionEditor: (nodeId: string) => {
dmnEditorStoreApi.setState((state) => {
state.dispatch(state).boxedExpressionEditor.open(nodeId);
});
},
getDiagramSvg: async () => {
const nodes = diagramRef.current?.getReactFlowInstance()?.getNodes();
const edges = diagramRef.current?.getReactFlowInstance()?.getEdges();
Expand Down
2 changes: 1 addition & 1 deletion packages/dmn-vscode-extension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

Create and edit DMN and SceSim files.

> NOTE: This extension provides two DMN Editors. The classic one will be removed in future versions. See the details of the new DMN Editor [here](https://github.com/apache/incubator-kie-issues/issues/439).
> NOTE: This extension provides two sets of DMN and Test Scenario Editors. The classic ones are currently the default choice, but you can switch to the new Editor based on your need. The classic editors will be removed in future versions. See the details of the new DMN Editor [here](https://github.com/apache/incubator-kie-issues/issues/439) and the new Test Scenario Editor [here](https://github.com/apache/incubator-kie-issues/issues/453).

## Features

Expand Down
Loading
Loading