Commit Graph

641 Commits (28b391d4cfa6d416e0a13ca25ab3f342d7dc12d6)

Author SHA1 Message Date
Junsik Shim ec7a525ea0 Change CellArray to cellArrayUtils. 2022-09-17 18:58:30 +09:00
Junsik Shim 722021006d Fix CellArray related warnings. #96 2022-09-17 18:57:00 +09:00
Junsik Shim 3cc2713704 Change CellArray to cellArrayUtils. 2022-09-17 11:30:23 +09:00
Thomas Bouffard af9a0e148a
docs: introduce the maxGraph changelog (#103)
Remove mxGraph changelog as it is not accurate anymore, but put a link to archive versions in the new changelog.
2022-09-14 13:15:52 +02:00
Thomas Bouffard ea836a1fb5
chore: improve vite config in ts-example (#104)
bump vite from 2.9.12 to 3.1.0
add vite config to generate a dedicated chunk for maxgraph@core. It lets know the size the produced bundle in an
external application and if tree shaking works.
2022-09-14 13:15:04 +02:00
Thomas Bouffard f9d757548e
doc: update copyright and license in source file headers (#100)
Ensure that all source files contain the Apache-2.0 license and that the 'maxGraph Contributors' are mentioned.
2022-08-30 17:36:33 +02:00
Junsik Shim 0591c37a11 Fix CellArray related warnings. #96 2022-08-13 17:51:39 +09:00
Thomas Bouffard ea9a6dd260
chore: restore Apache 2.0 license + add a NOTICE file (#95)
- Create a NOTICE file. It references the list of contributors that re-licensed their commits to Apache License, Version 2.0.
- So we can restore the Apache-2.0 license.
- Also update the README and the Pull Request template as there is no more warning about the license.
2022-08-11 14:05:56 +02:00
Thomas Bouffard 311514dca3
refactor: clean the Client class (#94)
Remove unused static properties
  - mxForceIncludes: it was used to force loading the JavaScript files in development mode in mxGraph. We are not managing development mode in that way anymore.
  - mxLoadResource: not used anymore
  - mxLoadStylesheets: not used anymore
  - mxResourceExtension: it was only used in Translations, so only keep the Translations settings

Move and rename the link function. It is not a general function, so move it as `domUtils#addLinkToHead`

Fix documentation of static properties
2022-07-16 07:15:04 +02:00
Thomas Bouffard 893ad44ff2
chore: improve the configuration to build the npm package (#87)
Root and all package.json files
  - Fix license, version and authors
  - Remove the non-relevant .npmignore file at the project. It was designed for mxgraph, the whole directory structure
  changed, and we don't plan to publish the root package

`core` package
  - Generate type definition and javascript files for ESM output
    - dedicated folder for `esm` and `types` in the `dist` folder to clearly separate concerns
    - exported in the package.json
  - Add npm script for `npm pack` configuration
  - Drop the `postinstall` npm script that built the `core` bundle. It would have been run when the package is installed
  in dependent projects at dependencies install. And it would have failed as it tries to build the project from TypeScript
  sources that are not available in the npm package.

fix: ConstraintHandler now loads image as everywhere else in the code using `Client.imageBasePath`
Using import doesn't work as the image is not available in the npm package. It generated error like this in ViteJS
project:
Failed to resolve import "../../../images/point.gif" from "../core/dist/esm/view/handler/ConstraintHandler.js". Does the file exist?
This gif import had been introduced to make `Anchors.stories.js` retrieve the gif file. Configuring `imageBasePath` as
already done in other stories fixes the issue.

Don't export EditorCodec and StylesheetCodec as they generate errors.
This is a temporary solution to avoid error in dependent project (at least, with ViteJS projects).
2022-07-05 08:08:25 +02:00
Thomas Bouffard 6180434a5f
doc: explain the maxGraph mission and status in the README (#93)
The README is the main entry point of the lib. It should provide the main information about the project and should attract potential users.
Previously, it was a mix of technical information and outdated sentences about the good old mxGraph.

This is a first attempt to improve things. In short
- First present what the lib does and the project status.
- Then, provide a code example and a gif to let potential users see the rendering at a glance.
- Remove inaccurate content and refresh the project history.
2022-07-04 19:49:49 +02:00
Amine B. Hassouna c858f9413b
Add section about Apache 2.0 license transition to README.md (#90) 2022-06-07 06:16:31 +02:00
Amine B. Hassouna 4aa277cf9d
Add Apache 2.0 license note to PR template (#91) 2022-06-07 06:12:15 +02:00
Junsik Shim 3991e7ab1e
Merge pull request #82 from maxGraph/cellstyle
Changed the type of cell style from string to CellStyle.
2022-05-20 09:38:08 +09:00
Thomas Bouffard 760cbd3f05
chore: clean tsconfig.json (#86)
Remove `allowJs` (the whole code is now migrated to TypeScript) and `jsx` (we are not using it).
Don't `skipLibCheck` for stronger type checks.
2022-05-17 12:24:48 +02:00
Junsik Shim 8f80956d0e Changed baseStyleName to baseStyleNames. 2022-05-08 18:18:53 +09:00
Junsik Shim 91d9c13286 Changed baseStyleName to baseStyleNames. 2022-05-08 18:05:22 +09:00
Thomas Bouffard 3a1b08cd4c
chore: remove the stale bot configuration file
We are not using https://github.com/apps/stale in this repository, so remove this useless file.
Note: it was used in the original mxGraph GitHub repository.
2022-05-07 17:41:47 +02:00
Junsik Shim a284987daf Updated comments. 2022-04-28 20:42:12 +09:00
Junsik Shim 07565aae9b Changed the type of cell style from string to CellStyle. 2022-04-17 20:49:09 +09:00
Junsik Shim b51504d7bb Changed the type of cell style from string to CellStyle. 2022-04-17 15:58:35 +09:00
Junsik Shim 0340b72c10 Changed the type of cell style from string to CellStyle. 2022-04-14 14:23:37 +09:00
Thomas Bouffard 443ebf7a52
chore: GitHub workflow generates TypeScript declarations (#80)
This ensures we don't have type errors in the code.

Update tsconfig to only include source TS files.
Previous configuration prevented to run the type generation twice.
The generated d.ts files were considered as source files, so we got file override errors.

Add a dedicated npm script to generate scripts.
We cannot directly call the tsc or lerna commands on the macOS GH actions runner, so introduce the script.
2022-04-03 13:09:24 +02:00
CD Yang 7fa2b433c3
fix: edge handlers use style.edgeStyle (#78)
Use the `edgeStyle` property of `CellStateStyles` in `ElbowEdgeHandler` and `EdgeHandler`.
2022-02-20 17:44:37 +01:00
Junsik Shim aa22e83c15
Merge pull request #77 from maxGraph/anchors
Fixes the 'Anchors' example.
2022-01-27 19:01:10 +09:00
Thomas Bouffard a2a718b40f
feat(examples): activate the storybook source addon (#75)
This replicates what mxgraph examples previously provided: the source code directly accessible within the example.
It allows copy/paste for reuse in user applications and should improve the adoption.
The code used to manage the controls is easily identifiable and can help highlight certain parts of the example (ContextMenu, RubberBand, ...).

Also bump storybook from 6.4.0 to 6.4.13.
2022-01-25 07:19:17 +01:00
Junsik Shim 93e69cc5a3 Adds .vscode to .gitignore. 2022-01-22 13:30:20 +09:00
Junsik Shim e750c7e5bc Removed .vscode from repository. 2022-01-22 13:12:59 +09:00
Junsik Shim b2bb10ea7e Fixed the 'Anchors' example. 2022-01-22 13:08:56 +09:00
Junsik Shim 3494d0fb8a
Merge pull request #74 from maxGraph/fix/storybook_startup_and_warnings
chore(storybook): fix server start and warnings
2022-01-21 11:01:56 +09:00
Thomas Bouffard 14f5815149 chore(storybook): fix server start and warnings
Remove the extra NODE_OPTIONS in storybook server start script that generated an
error.
Remove cross-env devDependency which is then not used anymore.
Fix storybook deprecation warning (static dirs)
2022-01-19 21:13:05 +01:00
Dave Morrissey 73f5a5979c started refactor of currently unused stories in `stashed` folder 2022-01-18 18:46:56 +11:00
Thomas Bouffard fb7819f92a
chore: fix build error and introduce a build github workflow (#71)
Fix imports that are not respecting the case of the filenames.

The build often has errors and they are only detected after a developer pull the `development` branch on their local machine.
To early catch build failures, add a GitHub workflow that runs a build command.
2022-01-14 06:17:38 +01:00
Dave Morrissey 413796ad32
Finish converting core to ts, JSDoc conversion, consistency+convention changes, example bugfixes (#70)
* reorganised directories; removed mx prefix

* reduced directory hierarchies; removed mx prefix; type fixes

* convert remaining javascript to ts

* fix/add types

* add type defs

* type updates; moved codecs to where they're used

* reorganise constants into enums+type additions

* removed "Function:" and "Variable:" prefixes from comments, as they aren't needed in JSDoc

* removed "Function:", "Variable:" and "Class:" prefixes from comments, as they aren't needed in JSDoc

* removed "Function:" prefixes from comments, as they aren't needed in JSDoc

* minor changes

* convert code example blocks to markdown

* module casing updates

* converted parameter function documentation to JSDoc

* documentation+type updates

* removed react subdir (for now)

* reorganised various `utils` functions into different files

* type updates/bugfixes/workarounds

* rename Rubberband and CellEditor to be *Handler to match the other plugins

* move codec classes to where they're used to reduce cyclic dependencies

* move codec classes to where they're used to reduce cyclic dependencies

* type updates/reorganize layout file structure

* renamed various files for consistency

* import fixes

* renamed GraphHandler SelectionHander and various fixes

* convert EventObject parameters to objects

* add basic better-docs config

* update better-docs config

* bugfix for shared variables in Graph persisting across instances

* fixed accessing handlers in examples; renamed Model to GraphModel

* fixed accessing handlers in examples; renamed Model to GraphModel

* restored selection model

* bugfix

* renamed getModel to getDataModel

* changed to use graph.batchUpdate() to reduce lines of code

* changed to use graph.batchUpdate() to reduce lines of code

* finished annotations+added TypeDoc

* convert remaining Cell[] instances to CellArray

* convert NaturalDocs links to JSDoc
2022-01-08 12:49:35 +11:00
Thomas Bouffard 8d1c0de603
Merge pull request #58 from Seebiscuit/dev/fix-no-fo 2021-12-01 11:42:56 +01:00
Dave Morrissey 0114966be2 removed package-lock 2021-11-27 17:51:49 +11:00
Dave Morrissey bd70a74074 workarounds for node 17 2021-11-27 17:51:03 +11:00
Dave Morrissey c9753a2691 update packages and remove circular dependancies 2021-11-27 17:17:08 +11:00
Gary Kaganas 07d1b628ec fix(mxClient) Fixes NO_FO (foreignObject support is not available) test 2021-11-09 14:09:08 -05:00
Junsik Shim 74b67a60a4 Fixed some errors. 2021-10-20 10:28:27 +09:00
Junsik Shim 70f35a36ee Formatted some codes. 2021-10-18 16:58:40 +09:00
Junsik Shim 5242e3dbc3 Fixed edgestyle bug. 2021-10-18 10:40:21 +09:00
Junsik Shim 74fb23eb4e Fix Anchors story. 2021-10-18 10:22:04 +09:00
Junsik Shim 570dfaab7b Fix Anchors story. 2021-10-18 10:21:31 +09:00
Junsik Shim 88eee80173 Fixing stories... 2021-09-13 08:57:22 +09:00
Junsik Shim eda54946bb Fixing stories... 2021-09-12 23:39:02 +09:00
Junsik Shim e3562c8a08 Fixing stories... 2021-09-10 14:17:59 +09:00
Junsik Shim 4a624db9f7 Trying to run HelloWorld... 2021-09-09 14:40:34 +09:00
Junsik Shim a7429b2a54 Trying to run HelloWorld... 2021-09-09 10:14:59 +09:00
Junsik Shim 65d800d5be Trying to run HelloWorld... 2021-09-08 10:05:28 +09:00