Skip to content

Commit

Permalink
Development: Update Apollon to version 3.0.0 (#57)
Browse files Browse the repository at this point in the history
* Update Apollon to version 1.5.2

* Add package lock file

* Update Apollon version to beta 3 and mark BPMN diagrams as beta

* Update missing Apollon version

* fix schema issues (and apollon version issue)

* Update package version to indicate a breaking change

* fix versioning issues

* Update apollon version

* Update Apollon versions

* fix readme

---------

Co-authored-by: Eugene Ghanizadeh Khoub <[email protected]>
  • Loading branch information
matthiaslehnertum and loreanvictor authored Oct 27, 2023
1 parent 5b92616 commit ca94f34
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 49 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ npm install
npm run build:local
# start webpack dev server
npm run start
npm start
# accessible via localhost:8888 (webpack dev server with proxy to application server)
# accesible via localhost:8080 (application server with static files)
Expand Down
56 changes: 24 additions & 32 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apollon_standalone",
"version": "1.7.3",
"version": "2.0.0",
"private": true,
"main": "index.js",
"repository": "[email protected]:ls1intum/Apollon_standalone.git",
Expand Down Expand Up @@ -32,11 +32,10 @@
"update": "npm run upgrade-interactive --latest"
},
"devDependencies": {
"concurrently": "8.2.1",
"@stylelint/postcss-css-in-js": "0.38.0",
"concurrently": "8.2.1",
"postcss": "8.4.31"
},
"dependencies": {},
"resolutions": {
"semver": "7.5.4",
"word-wrap": "1.2.5",
Expand Down
4 changes: 2 additions & 2 deletions packages/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "server",
"version": "1.7.3",
"version": "2.0.0",
"license": "MIT",
"scripts": {
"clean": "rm -rf ../../build/server",
Expand All @@ -16,7 +16,7 @@
"global-jsdom": "9.1.0",
"jsdom": "22.1.0",
"pdfmake": "0.2.7",
"shared": "1.7.3"
"shared": "2.0.0"
},
"devDependencies": {
"@types/cors": "2.8.14",
Expand Down
4 changes: 2 additions & 2 deletions packages/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "shared",
"version": "1.7.3",
"version": "2.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"@ls1intum/apollon": "2.15.0",
"@ls1intum/apollon": "3.0.0",
"moment": "2.29.4",
"ws": "8.14.2"
}
Expand Down
8 changes: 4 additions & 4 deletions packages/webapp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webapp",
"version": "1.7.3",
"version": "2.0.0",
"private": true,
"scripts": {
"clean": "rm -rf ../../build/webapp",
Expand All @@ -15,7 +15,7 @@
"node": ">=18.14.0"
},
"dependencies": {
"@ls1intum/apollon": "2.15.0",
"@ls1intum/apollon": "3.0.0",
"bootstrap": "5.3.1",
"moment": "2.29.4",
"postcss-syntax": "0.36.2",
Expand All @@ -28,7 +28,7 @@
"redux": "4.2.1",
"redux-observable": "2.0.0",
"rxjs": "7.8.1",
"shared": "1.7.3",
"shared": "2.0.0",
"styled-components": "5.3.11",
"tslib": "2.6.2",
"typesafe-actions": "5.1.0",
Expand All @@ -38,7 +38,7 @@
"devDependencies": {
"@stylelint/postcss-css-in-js": "0.38.0",
"@svgr/webpack": "8.1.0",
"@types/react": "18.0.27",
"@types/react": "^18.2.25",
"@types/react-bootstrap": "0.32.33",
"@types/react-dom": "18.0.10",
"@types/react-redux": "7.1.27",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ class ApollonEditorComponent extends Component<Props, State> {
if (this.client) {
const { collaborationName, collaborationColor } = this.props;
const { token } = this.props.params;
const selElemIds = selection.elements;
const elements = this.props.diagram?.model?.elements;
const selElemIds = Object.keys(selection.elements);
const elements = Object.values(this.props.diagram?.model?.elements || {});
const updatedElement = updateSelectedByArray(selElemIds, elements!, collaborationName, collaborationColor);
const diagram = this.props.diagram;
if (diagram && diagram.model && diagram.model.elements) {
diagram.model.elements = updatedElement!;
diagram.model.elements = updatedElement!.reduce((acc, curr) => ({ ...acc, [curr.id]: curr }), {});
}

this.client.send(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const enhance = compose<ComponentClass<OwnProps>>(
}),
);

const diagramsInBeta: string[] = [];
const diagramsInBeta: string[] = ['BPMN'];

class CreateDiagramModalComponent extends Component<Props, State> {
state = getInitialState();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class ShareModalComponent extends Component<Props, State> {
};

publishDiagram = () => {
if (this.props.diagram && this.props.diagram.model && this.props.diagram.model.elements.length > 0) {
if (this.props.diagram && this.props.diagram.model && Object.keys(this.props.diagram.model.elements).length > 0) {
DiagramRepository.publishDiagramOnServer(this.props.diagram)
.then((token: string) => {
this.setState({ token }, () => {
Expand Down

0 comments on commit ca94f34

Please sign in to comment.