Skip to content

Commit

Permalink
Update DMN-js to 16.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
joleaf committed Apr 29, 2024
1 parent dced6be commit 43ffb54
Show file tree
Hide file tree
Showing 7 changed files with 158 additions and 145 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All changes to this plugin are listed here.

## 0.5.1 (2024-04-29)

### Changed

- Updated DMN-js to version 16.1.0

## 0.5.0 (2024-01-26)

### Changed
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "dmn-plugin",
"name": "DMN",
"version": "0.5.0",
"version": "0.5.1",
"minAppVersion": "0.15.0",
"description": "This plugin enables viewing DMNs using dmn-js.",
"author": "JoLeaf",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dmn",
"version": "0.5.0",
"version": "0.5.1",
"description": "This plugin enables viewing/editing DMNs using dmn-js.",
"main": "main.js",
"scripts": {
Expand All @@ -22,6 +22,6 @@
"typescript": "5.3.3"
},
"dependencies": {
"dmn-js": "^15.1.0"
"dmn-js": "^16.1.0"
}
}
11 changes: 6 additions & 5 deletions src/dmnModeler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@ export class DmnModelerView extends TextFileView {
this.dmnXml = data;
const thisRef = this;
this.dmnModeler.importXML(this.dmnXml).catch(function (err: { warnings: any; message: string; }) {
thisRef.clear();
thisRef.contentEl.createEl("div", {text: err.message});
console.error(err);
});
}

async onOpen() {
let dmnSave = this.contentEl.createEl("button", {text: "Save", placeholder:"Save"});
let contentEl = this.contentEl.createEl("div", {cls: "dmn-content"});
let buttonbar = contentEl.createEl("div");
let dmnSave = buttonbar.createEl("button", {text: "Save", placeholder: "Save"});
setIcon(dmnSave, "save");
this.dmnDiv = this.contentEl.createEl("div", {cls: "dmn-view dmn-fullscreen"});
this.dmnDiv = contentEl.createEl("div", {cls: "dmn-view dmn-view-modeler"});
this.dmnModeler = new Modeler({
container: this.dmnDiv,
keyboard: {
Expand Down Expand Up @@ -57,7 +58,7 @@ export class DmnModelerView extends TextFileView {
}

clear() {
this.contentEl.empty();

}

getViewType() {
Expand Down
22 changes: 19 additions & 3 deletions src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,22 @@
font-style: normal;
}

.dmn-view {
width: 100%;
.dmn-content {
display: flex;
flex-wrap: wrap;
flex-flow: column;
row-gap: 5px;
height: 100%;
}

.dmn-view {
cursor: pointer;
width: 100%;
}

.dmn-view-modeler {
flex: 1;
border: 1px dashed #212121;
}

/* Dark mode from system */
Expand All @@ -34,11 +45,12 @@
color: black !important;
}

.dmn-view textarea, .dmn-view .dms-input, .dmn-view input.metadata-input-text, .dmn-view input[type='date'], .dmn-view input[type='datetime-local'], .dmn-view input[type='text'], .dmn-view input[type='search'], .dmn-view input[type='email'], .dmn-view input[type='password'], .dmn-view input[type='number'], .dmn-view .bio-properties-panel-input {
.dmn-view textarea, .dmn-view .dms-input, .dmn-view input.metadata-input-text, .dmn-view input[type='date'], .dmn-view input[type='datetime-local'], .dmn-view input[type='text'], .dmn-view input[type='search'], .dmn-view input[type='email'], .dmn-view input[type='password'], .dmn-view input[type='number'], .dmn-view .bio-properties-panel-input {
background-color: white !important;
color: black !important;
}
}

.dmn-view .input-cell, .dmn-view .output-cell, .dmn-view .annotation {
background-color: white !important;
}
Expand All @@ -63,3 +75,7 @@
.dmn-definitions {
display: none;
}

.dmn-view > canvas {
pointer-events: none;
}
3 changes: 2 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"0.3.0": "0.15.0",
"0.4.0": "0.15.0",
"0.4.1": "0.15.0",
"0.5.0": "0.15.0"
"0.5.0": "0.15.0",
"0.5.1": "0.15.0"
}
Loading

0 comments on commit 43ffb54

Please sign in to comment.