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 #36

Merged
merged 23 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d894745
kie-tools#2428: [serverless-workflow-dev-ui-webapp] The reload button…
kumaradityaraj Aug 8, 2024
8ade505
NO-ISSUE: Temporarily disable failing stunner-editors tests (#2523)
thiagoelg Aug 8, 2024
ec84b2d
kie-issues#1161: Add end-to-end tests for Conditional Expression on t…
jomarko Aug 8, 2024
50cde81
kie-issues#1418: Remove "prod" dependencies from Standalone Editors p…
thiagoelg Aug 9, 2024
a99f44c
kie-issues#947: Playwright expansion phase - part 2 - Decision Servic…
jomarko Aug 9, 2024
6f5c8e8
kie-issues#1416: On the DMN Editor's Boxed Expression Editor, FEEL au…
danielzhe Aug 9, 2024
6f9dca5
kie-issues#982: On the DMN Editor it should be possible Associate a T…
jomarko Aug 9, 2024
19694da
kie-issues#1337: kn-plugin-workflow should verify if the cluster has …
treblereel Aug 12, 2024
01e01b2
kie-issues#1335: kn workflow build output log should be saved in the …
treblereel Aug 12, 2024
19901c9
Add monitoring add-on for SonataFlow build images (#2535)
jianrongzhang89 Aug 16, 2024
416d18b
kie-issues#1391: Sandbox: Gist Integration announce unsuccessful forc…
jomarko Aug 19, 2024
7e2a58b
kie-issues#1147: DMN Editor Filter expression resize handler is at wr…
danielzhe Aug 19, 2024
fde68d3
NO-ISSUE: Add option to disable the Extended Services wizard on KIE S…
kbowers-ibm Aug 19, 2024
745be5d
kie-issues#981: On the DMN Editor it should be possible to create or …
jomarko Aug 20, 2024
b9ee5e4
incubator-kie-issues#1334: kn workflow create should preserve the ind…
treblereel Aug 20, 2024
8084877
NO-ISSUE: upgrade axios to version 1.7.4 (fixes CVE-2024-39338) (#2540)
rgdoliveira Aug 20, 2024
0cb8f85
NO-ISSUE: Upgrade webpack to 5.92.1 (#2539)
thiagoelg Aug 20, 2024
2bac324
kie-issues#1443: Change JBPM DevUI to not use current host origin to …
thiagoelg Aug 20, 2024
002d90d
kie-issues#1417: Helm Charts for Task and Management Consoles (#2526)
rodrigonull Aug 21, 2024
0460d0a
kie-issues#1445: New DMN Editor: Support read-only mode (#2538)
thiagoelg Aug 21, 2024
1ac7fb7
[kie-issues#1446] BPMN Editor - Decision name UI field removal (#2541)
LightGuard Aug 21, 2024
7467950
kie-issues#1447: Create a new example package on kie-tools to showcas…
thiagoelg Aug 22, 2024
35458de
Merge main-apache and exclude white-listed changes from the merge
fantonangeli Aug 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ The Apache KIE Tools project contains several applications. To develop each one

1. After you've successfully built the project following the instructions above, open the `packages/kie-editors-dev-vscode-extension` folder on VS Code. Use a new VS Code window so that the `packages/kie-editors-dev-vscode-extension` folder shows up as root in the VS Code explorer.
2. From there, you can Run the extension or the end-to-end tests by using the `Debug` menu/section. You can also use the respective shortcuts (F5 to start debugging, for instance).
3. **NOTE:** To run the VS Code extension in development mode, you need `webpack` and `webpack-cli` to be globally installed on NPM. Normally you can do that with `npm install -g webpack@^5.88.2 webpack-cli@^4.10.0`, but `sudo` may be required depending on your installation.
3. **NOTE:** To run the VS Code extension in development mode, you need `webpack` and `webpack-cli` to be globally installed on NPM. Normally you can do that with `npm install -g webpack@^5.92.1 webpack-cli@^4.10.0`, but `sudo` may be required depending on your installation.
4. **Remember!** If you make changes to any package other than `packages/kie-editors-dev-vscode-extension`, you have to manually rebuild them before relaunching the extension on VS Code.

#### VS Code Extension (Serverless Workflow Editor)
Expand Down
2 changes: 1 addition & 1 deletion examples/base64png-editor-chrome-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"copy-webpack-plugin": "^11.0.0",
"rimraf": "^3.0.2",
"typescript": "^5.5.3",
"webpack": "^5.88.2",
"webpack": "^5.92.1",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/base64png-editor-vscode-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@vscode/vsce": "^2.22.0",
"rimraf": "^3.0.2",
"typescript": "^5.5.3",
"webpack": "^5.88.2",
"webpack": "^5.92.1",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
Expand Down
75 changes: 75 additions & 0 deletions examples/dmn-editor-standalone-examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<!--
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.
-->

## DMN Editor Standalone Examples

A series of examples on how to use the DMN Editor Standalone in different applications.

### Examples

- [State Control]("src/stateControl/index.ts"): Shows how to leverage the Editor API to undo/redo changes to a decision, get its contents and download an SVG of the diagram.
- [Read Only]("src/readOnly/index.ts"): Loads the editor in "Read Only" mode, where a decision can be displayed and navigated but not changed.
- [With Included Models]("src/withIncludedModels/index.ts"): Displays how Decisions can be imported into other Decisions as "Included Models", using the `resources` parameter from the DMN Editor.

### Build

To build the examples, execute one of the following commands on the root folder of the project:

```shell script
KIE_TOOLS_BUILD__buildExamples=true pnpm -F @kie-tools-examples/dmn-editor-standalone-examples... build:dev
KIE_TOOLS_BUILD__buildExamples=true pnpm -F @kie-tools-examples/dmn-editor-standalone-examples... build:prod
```

### Run

To start the examples application, execute the following command on the root folder of the project:

```shell script
pnpm -F @kie-tools-examples/dmn-editor-standalone-examples start
```

Open http://localhost:9102 to see the list of files bundled by webpack, then choose an example:

- State Control: http://localhost:9102/state_control.html
- Read Only: http://localhost:9102/read_only.html
- With Included Models: http://localhost:9102/with_included_models.html

---

Apache KIE (incubating) is an effort undergoing incubation at The Apache Software
Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is
required of all newly accepted projects until a further review indicates that
the infrastructure, communications, and decision making process have stabilized
in a manner consistent with other successful ASF projects. While incubation
status is not necessarily a reflection of the completeness or stability of the
code, it does indicate that the project has yet to be fully endorsed by the ASF.

Some of the incubating project’s releases may not be fully compliant with ASF
policy. For example, releases may have incomplete or un-reviewed licensing
conditions. What follows is a list of known issues the project is currently
aware of (note that this list, by definition, is likely to be incomplete):

- Hibernate, an LGPL project, is being used. Hibernate is in the process of
relicensing to ASL v2
- Some files, particularly test files, and those not supporting comments, may
be missing the ASF Licensing Header

If you are planning to incorporate this work into your product/project, please
be aware that you will need to conduct a thorough licensing review to determine
the overall implications of including this work. For the current status of this
project through the Apache Incubator visit:
https://incubator.apache.org/projects/kie.html
31 changes: 31 additions & 0 deletions examples/dmn-editor-standalone-examples/env/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* 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.
*/

const { varsWithName, composeEnv } = require("@kie-tools-scripts/build-env");

module.exports = composeEnv([require("@kie-tools/root-env/env")], {
vars: varsWithName({}),
get env() {
return {
dmnEditorStandaloneExamples: {
port: 9102,
},
};
},
});
45 changes: 45 additions & 0 deletions examples/dmn-editor-standalone-examples/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"private": true,
"name": "@kie-tools-examples/dmn-editor-standalone-examples",
"version": "0.0.0",
"description": "",
"license": "Apache-2.0",
"homepage": "https://github.com/apache/incubator-kie-tools",
"repository": {
"type": "git",
"url": "https://github.com/apache/incubator-kie-tools.git"
},
"bugs": {
"url": "https://github.com/apache/incubator-kie-tools/issues"
},
"scripts": {
"build:dev": "rimraf dist && webpack --env dev",
"build:prod": "rimraf dist && webpack --env prod",
"start": "webpack serve --host 0.0.0.0 --env dev"
},
"dependencies": {
"@kie-tools/dmn-editor-standalone": "workspace:*"
},
"devDependencies": {
"@kie-tools-core/webpack-base": "workspace:*",
"@kie-tools/root-env": "workspace:*",
"@kie-tools/tsconfig": "workspace:*",
"copy-webpack-plugin": "^11.0.0",
"html-webpack-plugin": "^5.3.2",
"process": "^0.11.10",
"raw-loader": "^4.0.2",
"rimraf": "^3.0.2",
"typescript": "^5.5.3",
"webpack": "^5.92.1",
"webpack-bundle-analyzer": "^4.10.2",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
},
"kieTools": {
"requiredPreinstalledCliCommands": [
"java",
"mvn"
]
}
}
32 changes: 32 additions & 0 deletions examples/dmn-editor-standalone-examples/src/fileLoader.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* 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 { DmnEditorStandaloneApi } from "@kie-tools/dmn-editor-standalone/dist";

export function loadFile(fileName: string) {
return fetch(`/static/models/${fileName}`).then((value) => value.text());
}

export function initFileLoader(files: Array<string>, editor: DmnEditorStandaloneApi) {
files.map((fileName) => {
document.getElementById(fileName)?.addEventListener("click", () => {
loadFile(fileName).then((fileContent) => editor.setContent(fileName, fileContent));
});
});
}
45 changes: 45 additions & 0 deletions examples/dmn-editor-standalone-examples/src/readOnly/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!--
~ 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.
-->

<!-- This file is used for test purposes only -->

<!doctype html>
<html lang="en">
<head>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
#dmn-editor-container {
height: calc(100vh - 6px);
}
</style>

<title></title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>

<body>
<div id="dmn-editor-container" />
</body>
</html>
43 changes: 43 additions & 0 deletions examples/dmn-editor-standalone-examples/src/readOnly/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* 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 DmnEditor from "@kie-tools/dmn-editor-standalone/dist";
import { loadFile } from "../fileLoader";

document.addEventListener("DOMContentLoaded", function () {
loadEditor();
});

function loadEditor() {
// Loads the DMN Editor in the `<div id="dmn-editor-container" />` element.
// Initializes with an existing file called `loan-pre-qualification.dmn` on the root of the
// workspace.
// The `loadFile` function loads the file from the /static/models directory and returns
// a Promise that resolves into a string.
// The `readOnly` flag changes the editor, locking all changes to the model, making it
// useful for displaying diagrams without editing the Decision.
const editor = DmnEditor.open({
container: document.getElementById("dmn-editor-container")!,
initialFileNormalizedPosixPathRelativeToTheWorkspaceRoot: "loan-pre-qualification.dmn",
initialContent: loadFile("loan-pre-qualification.dmn"),
readOnly: true,
});

console.log({ editor });
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<!--
~ 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.
-->

<!-- This file is used for test purposes only -->

<!doctype html>
<html lang="en">
<head>
<style>
* {
margin: 0;
}

#dmn-editor-container {
height: calc(100vh - 36px);
}

.toolbar {
height: 30px;
display: flex;
font-size: 16px;
border-bottom: 1px solid #d2d2d2;
box-sizing: border-box;
align-items: center;
}

.toolbar button {
font-size: 16px;
}

.toolbar .toolbar-items {
flex: 1 1;
}

.toolbar .load-files {
text-align: right;
}

.hidden {
display: none;
}
</style>

<title></title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>

<body>
<div class="toolbar">
<div class="toolbar-items actions">
<button id="undo">Undo</button>
<button id="redo">Redo</button>
<button id="download">Download</button>
<button id="downloadSvg">Download SVG</button>
<span id="unsavedChanges" class="hidden">File contains unsaved changes.</span>
</div>
<br />
<div class="toolbar-items load-files">
Load DMN:
<button id="empty.dmn">Empty</button>
<button id="empty-drd.dmn">Empty DRD</button>
<button id="find-employees.dmn">Find Employees</button>
<button id="loan-pre-qualification.dmn">Loan Pre Qualification</button>
</div>
</div>
<div id="dmn-editor-container" />
</body>
</html>
Loading
Loading