Commit Graph

223 Commits (development)

Author SHA1 Message Date
Thomas Bouffard 92759df232
feat: include default css and images in the npm package (#225)
Providing these resources simplify the `maxGraph` integration.

Use the default CSS in ts-example to illustrate how to override defaults
Initiate a documentation to start guiding users.
2023-07-13 12:25:10 +02:00
Thomas Bouffard 03f59aa130
refactor: improve examples in README and ts-example (#223)
ts-example
  - improve the position of the ellipse labels
  - introduce a shared style for ellipse vertices
  - bump vite from 4.3.9 to 4.4.2
  - work when not deployed in the "root" context of the site

README
  - improve the position of the ellipse label
  - display rounded orthogonal edge
  - fix the style configuration to match the rendering shown in the gif
2023-07-10 07:07:19 +02:00
Thomas Bouffard c422ca35ee chore(release): prepare version 0.3.0 2023-07-07 12:19:14 +02:00
Thomas Bouffard e82abd6da3
feat: improve the EdgeMixin type (#212)
The methods defined in the `EdgeMixin` type were not documented.
The signature of the `insertEdge` method was using a spread `any`
parameter, so it provided no guidance nor guard.
Instead, the type now declares the various form of the methods with the
right signature.
2023-07-07 07:56:01 +02:00
Thomas Bouffard cdd8830b5c
feat: improve the VertexMixin type (#211)
The methods defined in the `VertexMixin` type were not documented.
The signature of the `insertVertex` method was using a spread `any`
parameter, so it provided no guidance nor guard.

Instead, the type now declares the various form of the methods with the
right signature.
2023-07-07 07:41:49 +02:00
Thomas Bouffard 4a79be5499
docs: add keywords in package.json (#216)
For the `@maxgraph/core` package.
2023-07-07 07:39:30 +02:00
Thomas Bouffard d5c1d4dc21
docs(release): add task for the "examples" repository (#215)
Also improve the main README
  - improve the paragraph about how to build the npm package locally
  - use the "application" wording instead "project" when required
  - highlight mxGraph and maxGraph
2023-07-07 07:06:09 +02:00
Thomas Bouffard 711db920da
fix: export EditorToolbarCodec and StylesheetCodec (#218)
These 2 classes were previously not exported as they generated runtime
errors when applications integrating `maxGraph` used the Vite dev
server.

Bump vite from 4.3.1 to 4.3.9. This is probably what fixed the problem.
No need to export Stylesheet and EditorToolbar as default as they are
already exported.
2023-07-07 06:54:31 +02:00
Thomas Bouffard d7646d6405
docs: improve JSDoc of GraphLayout and CompositeLayout (#217)
Improve wording
Remove references to mxGraph code
Use modern JS code in examples
2023-07-06 16:59:45 +02:00
Thomas Bouffard 992f3af63d
feat: add GraphDataModel.batchUpdate method (#213)
The method already exists in the `Graph` class. It needs to be made
available in `GraphDataModel` as well, to simplify the transaction
syntax.
Start using it in some places to simplify the syntax and also use
`Graph.batchUpdate`.
2023-07-06 07:02:20 +02:00
Thomas Bouffard 0c7a68bcc1
fix: compute the current style of ShadowRoot element (#214)
`ShadowRoot` element cannot be passed to the `window.getComputedStyle`
method.
Otherwise, errors occur, in particular, it prevents the mouse and
gesture events to be propagated.
2023-07-06 06:50:51 +02:00
Thomas Bouffard fd0d47ad4a
refactor!: remove unused CellMap type (#210) 2023-07-03 11:13:10 +02:00
Thomas Bouffard 3d71f15347
refactor(type)!: don't return 'undefined' in getDefaultXXXStyle (#209)
The default edge and vertex styles are always defined. Updating the
signature of the two methods returning default styles simplifies the
code for callers, who don't have to deal with "undefined" values.

Improve the ts-example
  - rely on no `undefined` style
  - bump vite from 3.2.3 to 4.3.1 and increase the file size warning
  - improve the use of types
- better explain why we cannot use enum to define the 'edgeStyle'
CellStyle property

BREAKING CHANGE: `Stylesheet.getDefaultVertexStyle` and
`Stylesheet.getDefaultEdgeStyle` no longer return `undefined`.
2023-07-02 20:19:51 +02:00
Thomas Bouffard 926596722c
docs: improve the mxGraph migration guide (#206)
Added paragraphs
  - classes renames
  - moved methods
  - how-to migrating styles

---------

Co-authored-by: Souchet Céline <celine.souchet@bonitasoft.com>
2023-06-19 15:28:15 +02:00
Thomas Bouffard 452698660b chore(release): prepare version 0.2.1 2023-06-08 17:03:33 +02:00
Thomas Bouffard 1ec9b723c9
fix: update the `labelPosition` property to restore "no align" (#203)
Allow a special value to be passed to avoid calculating the alignment.
2023-06-08 16:56:03 +02:00
Thomas Bouffard 900593572b
docs: add JSDoc to Graph.batchUpdate (#199) 2023-06-08 16:54:59 +02:00
Arash Rostami 7c696bb31f
fix: update the signature of gestureUtils.makeDraggable (#198)
The fourth argument of the `makeDraggable` function was not declared as optional.
2023-06-06 11:50:46 +02:00
Thomas Bouffard 487e4b767e chore(release): prepare version 0.2.0 2023-05-22 16:17:25 +02:00
Thomas Bouffard 13211edb28
docs: improve the release process (#177)
Clarify some git operations.
Also
- move an image to the packages/docs for future reuse in the
documentation.
- don't run the GitHub "build" workflow when the docs package or some
markdown files change.
2023-05-22 16:13:33 +02:00
CD Yang fc0b1b77b5
docs: fix some JSDoc errors in `VertexHandler` (#191) 2023-05-22 13:58:34 +02:00
Thomas Bouffard 30bdbe5322
test(ts-support): only check maxGraph types (#193)
Previously, all types development types needed by maxGraph at
development time were checked. Some of them require a newer version of
TypeScript that the one used in the TS support test (to check the
minimum version required to integrate maxGraph in applications). This
made the checks fail. The configuration of the tests has been updated to
only check the maxGraph types used by applications.
2023-05-22 13:51:42 +02:00
Thomas Bouffard 193d4bfe9b
test: introduce tests for model encode/decode (#183)
The code managing the "model encode/decode" is not yet fully
operational.
This set of changes adds tests to replicate current behavior and provide
the infrastructure for problem resolution. In particular, the tests show
that some errors occur on import because some Codecs are not registered.
There is no error if an export has already been performed.

**Other info**
The tests are done using both the model alone or a model linked to a
Graph instance.
Using only the model shows that some properties of objects in the model
are not set correctly: they are not decoded and are stored as `Element`
instances.
The test involving the Graph instance shows the behavior seen in "real"
application which are the consequences of the issue during the import.
2023-04-04 09:28:13 +02:00
Thomas Bouffard 0b4df83923
chore: fix TS2365 build errors (#186)
In the core package, TypeScript v5 is resolved instead of TypeScript v4.
As a workaround, declares TypeScript v4 in `package.json`.
2023-04-04 09:17:39 +02:00
Thomas Bouffard d33769fad5
fix: declare default parameter values in xmlUtils.prettyXml (#181) 2023-03-05 12:03:24 +01:00
Thomas Bouffard 1447fd29fc
docs: reorganize the "migration from mxGraph" documentation (#171)
Move everything from the README to the dedicated migration doc.
Clarify the existing content.

Co-authored-by: Souchet Céline <4921914+csouchet@users.noreply.github.com>
2023-01-30 15:01:55 +01:00
Thomas Bouffard c4efba2952
docs: add the release process (#176)
It includes
  - code update
  - milestone and release notes management
  - npm package publish

Co-authored-by: Souchet Céline <4921914+csouchet@users.noreply.github.com>
2023-01-30 14:19:01 +01:00
Thomas Bouffard 3095aef7e6
refactor(CellState): simplify expressions and improve JSDoc (#170)
Improve the JSDoc of methods under the "appearance" group
2023-01-30 11:55:37 +01:00
Thomas Bouffard ca1914b582
refactor(style)!: rename/remove properties and types (#165)
Remove the `StyleMap` class. It is not used anymore since the
introduction of the `CellStateStyle` interface.

Changes in `CellStateStyle`
- remove `defaultEdge` and `defaultVertex` that have been introduced by
mistake. They have never been used.
- rename `autosize` into `autoSize` for naming consistency. All
properties use camelCase.
- change types from "number" to "boolean" + fix default management in
the Shape classes
    - `backgroundOutline`
    - `absoluteArcSize`

Other `CellStateStyle` changes: remove a property in favor of another
property
The following properties were introduced by mistake while removing
mxConstants.STYLE_* references in
707605cedd (2021-05-02). Their counterpart
was used in `mxGraph` and is used in all
`maxGraph` examples
- `backgroundColor` in favor of `labelBackgroundColor`. The
`STYLE_LABEL_BACKGROUNDCOLOR` constant was replaced by
  'backgroundColor' instead of 'labelBackgroundColor'
- `loop` in favor of `loopStyle`. The `STYLE_LOOP` constant was replaced
by 'loop' instead of 'loopStyle'

Other types that changed
- `CellStateStyle`: better type guidance for the `indicatorShape`
property
- `CanvasState`: order properties alphabetically + add JSDoc on some
properties
- Rename `ArrowType` into `ArrowValue` for consistency with other types
(they all end with the 'Value' post-fix)

Documentation update
  - CHANGELOG.md: mention the breaking changes
- Initiate a specific document to help migration from mxGraph: start by
adding the changes on style


--------------------------------------------------------------------------------

**BREAKING CHANGES**: some `CellStateStyle` properties and types have
been removed/renamed.
2023-01-30 11:44:06 +01:00
Thomas Bouffard 5ecfda6b2b
refactor!: remove helpers function processing string style (#173)
Helper functions involving "style in the string form" have been removed
from `styleUtils`. Styles are defined using the `CellStateStyle` and it
is no longer necessary to process strings.

Removed functions
  - addStylename
  - getStylename
  - getStylenames
  - indexOfStylename
  - removeStylename
  - removeAllStylenames
  - setStyle

**BREAKING CHANGES**: some `styleUtils` functions have been removed.
2023-01-17 12:18:33 +01:00
Thomas Bouffard 6fc05a3876
refactor: simplify fontStyle code checking binary mask (#174)
Introduce the `styleUtils.matchBinaryMask` function to remove
duplication in the code checking binary mask on `fontStyle`.
2023-01-17 12:08:32 +01:00
Thomas Bouffard ed2ae41428
refactor(docs): move all docs sources to a dedicated docs package (#168)
Keep the former mxGraph documentation to allow a later documentation
migration.
Remove both the former mxGraph and the new maxGraph API docs as they can
be generated.
Remove the former mxGraph examples home page as it has been replaced by
Storybook.

Update the configuration to generate the maxGraph API docs
  - remove jsdoc resources as it is not used anymore
- configure the core package to generate the API docs in the docs
package
- add a GitHub workflow to ensure we can generate the API docs without
errors
2023-01-09 16:03:52 +01:00
Thomas Bouffard 3d1d68afd7
refactor: remove scripts used to migrate from mxGraph (#167) 2023-01-08 15:16:02 +01:00
Thomas Bouffard 171c8f8134
fix: SwimlaneMixin handles the 'style.horizontal' `undefined` value (#156)
The horizontal value was considered as true only if was set to true.
It is now also considered as true when set to undefined, as everywhere
else in maxGraph.

SwimLanes.stories.js: update configuration to display nodes.
This update is just a starting point. There is still much to do to match the previous mxGraph example.
2023-01-06 16:59:18 +01:00
Thomas Bouffard 3fff754cd6
fix: correctly manage the markers fill style (#157)
Previously, when setting startFill/endFill, the display was inverted
comparing to the configuration.
The marker was filled when set to false, not filled when set to true.
When not set, the marker was filled, which is the expected default.

The issue came from a wrong condition to manage the default value and
was reproduced with the Markers Story.

In addition to the code fix, update the Markers.stories.js to fix style
configurations
  - use number instead of string for markers size
  - use boolean instead of number for start/end fill
2023-01-06 16:53:54 +01:00
Filip Wróbel a247b38268
fix: use the right convertPoints function in Stories (#166)
Changed `mathUtils` -> `styleUtils` in affected stories.
2023-01-06 14:16:46 +01:00
Thomas Bouffard ee7d0fce6c
fix: Graph importCells/moveCells declare optional parameters (#160)
Also move the JSDoc from implementation to the type declaration. The
documentation is thus made available to consumers.
2023-01-06 14:12:17 +01:00
Thomas Bouffard 5c53465c8e
fix: improve style configuration extensibility (#163)
The type of the `endArrow`, `startArrow` and `shape` properties in
`CellStateStyle` were too strict. They prevented to
use custom registered shapes in the style configuration without using a
cast.

Markers of the arrow and custom shapes can be registered by using
methods in `MarkerShape` and `CellRenderer` respectively.
The key to identify the shapes is a string so the types of the
properties in `CellStateStyle` now allow `string` as well.
These offer both the type guidance for standard maxGraph registered
shapes (via a dedicated type) and the extensibility
for custom shapes.
2023-01-06 10:52:53 +01:00
Thomas Bouffard 097cd90d50
docs: add JSDOc to CellStateStyle properties (#162)
These properties were not documented after the style configuration was
changed (move from the string-based to the object-based configuration).
In mxGraph, the properties were documented in `mxConstants`.
The documentation is created based on `mxGraph`, `typed-mxgraph` and the
current `maxGraph` implementation.

Some properties remains undocumented because they are not used, some
have a wrong type (mainly number instead of boolean). This will be managed
in a next commit.

Co-authored-by: Souchet Céline <4921914+csouchet@users.noreply.github.com>
2023-01-05 11:10:31 +01:00
Thomas Bouffard 5a346079b5
fix: consider default style when computing effective style properties (#152)
`StyleSheet.getCellStyle` didn't keep the properties of the default
style when `baseStyleNames` was set in the `cellStyle` parameter.

The JSDoc was incorrect (it came from mxGraph) about how the style is
computed, in particular about the default style. It probably leads to
the erroneous implementation during migration. It is now fixed and
clearly describe the rules followed to merge style properties.

The 'Stylesheet' story has been updated to correctly use the maxGraph
API. It also includes more examples involving `baseStyleNames` to
show the 'properties merge' in action.
2022-12-17 09:16:26 +01:00
Thomas Bouffard b7a322b36f
fix: CellOverlay constructor use all parameters to set properties (#159)
The `align` and `verticalAlign` values passed to the constructor weren't
set, so the overlay position was always set to
the default one.

The `align` and `verticalAlign` properties are now using the AlignValue
and VAlignValue types respectively instead of
defining inline types. This improves the consistent in the whole code.

To demonstrate the fix, the Overlays story now set 'align' and
'verticalAlign' randomly.


Also introduce `jest` to test the fix and the whole
implementation of the changed method. Types check support is provided by
`ts-jest`. As maxGraph uses a lot of browser objects, also setup
`jest-jsdom-environment`.
2022-12-16 16:51:51 +01:00
Анатолий Майоров 3954001a84
fix: fire selection `CHANGE` event to correct listener (#118)
The `CHANGE` event is now fired to `GraphSelectionModel` instead of `Graph`.
This is the behavior of mxGraph that was mistakenly modified during the migration of the code.
2022-12-08 08:49:02 +01:00
Анатолий Майоров a3b5a60c60
fix: Fix for cells not removed (#115)
There was a logical error in processing `ChildChange` in `Graph`. When cell was removed, `ChildChange` created to change parent of removed cell to `null`. But in code, if parent is null, code to destroy child cell state was not called, so cell stayed rendered on canvas.

The fix add a check for "falsy" parent, so correct branch of code is executed and cells are destroyed.
2022-12-08 08:27:11 +01:00
Thomas Bouffard 36c775bc37
docs: include License and Readme files in the npm package (#144)
The README included in the npm package contains mainly an extract of the
README of the repository and a link to it to avoid too many duplicates.
2022-11-22 07:49:05 +01:00
bihua 92aef9bf11
fix: TouchEvent is not available in Safari and Firefox Desktop (#127)
Add the `window.TouchEvent` guard prior code involving `TouchEvent`.
`TouchEvent` is not available in Safari and Firefox Desktop.

Co-authored-by: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com>
Co-authored-by: Анатолий Майоров <mayorov.ad@outlook.com>
2022-11-20 21:06:03 +01:00
Thomas Bouffard 9e7a6034c7
Apply eslint and prettier autofixes on codebase (#133)
Refactor code based on eslint and prettier rules
2022-11-20 17:03:20 +01:00
Anatoliy Mayorov 53eb5c91a9 fix: typescript transpile error (#138) 2022-11-20 15:00:16 +03:00
Anatoliy Mayorov a3102afa74 refactor: abstract classes, empty methods
Add abstract definition to abstract classes
Fill empty methods blocks with return
Remove unnecessary escapes in regexes
2022-11-20 14:05:46 +03:00
Anatoliy Mayorov 5a29d2fa1a refactor: fix eslint errors
Eliminate unnecessary code
Eliminate var usage
2022-11-20 14:02:48 +03:00
Thomas Bouffard d30e3a239d
Fix edge segment handles not being rendered (#120)
Fixed rendering of handles on segments of edges
2022-11-14 07:23:34 +01:00
Thomas Bouffard 27f75a59f3
docs: set the minimum TypeScript requirement to 3.8 (#128)
We use a recent TypeScript version to build maxGraph but applications
that integrates it may be forced to use old TypeScript versions.
We never explain what is the minimum TypeScript version requires to use
`maxGraph`. The changes proposed here are a first step to make this
information available.
It is only informative for now (mentioned in the README) and the minimum
TypeScript version is tested in the `ts-support` package (part of the
'build' GitHub workflow).
2022-11-07 18:31:40 +01:00
Anatoliy Mayorov 2ad1395aab refactor: run eslint and prettier on codebase 2022-10-29 22:53:09 +03:00
Анатолий Майоров 9428ba2a4a
fix: DynamicLoading story, Codec and parseXml (#125)
Fix `DynamicLoading` story
Restored backward compatibility when using `parseXml`
Possible fix for `Codec.decode` method issue
2022-10-28 15:37:02 +02:00
Anatoliy Mayorov d53ea1ad2b chore(tsconfig): move baseUrl to base tsconfig 2022-10-23 11:56:07 +03:00
Anatoliy Mayorov 7e5360ad97 chore(tsconfig): add base tsconfig.json 2022-10-23 10:33:45 +03:00
Thomas Bouffard ef76a1db87
Merge branch 'development' into development 2022-10-22 10:41:32 +02:00
Thomas Bouffard 5b1369b019
Merge pull request #119 from mayorovad/edge-mixin-typo
Fix wrong method signature in EdgeMixin (resetEdgesOnMove).
2022-10-10 07:22:42 +02:00
Thomas Bouffard f08b041c3d
Merge pull request #121 from mayorovad/overlays-stories-fix
Fix stories with overlays usage
2022-10-10 07:14:30 +02:00
Thomas Bouffard 4622527af8
Merge pull request #124 from mayorovad/issue-96 2022-10-09 22:32:39 +02:00
Thomas Bouffard a617bb644a
Merge pull request #113 from mayorovad/visibility-story-fix
Fixed `Visibility` story
2022-10-09 20:05:57 +02:00
Thomas Bouffard 4804767baf
Merge pull request #117 from mayorovad/guides-fix
Fixed `Guides` story.
2022-10-09 20:05:29 +02:00
Thomas Bouffard 57a8d63ff3
Merge pull request #108 from maxGraph/svgcanvas
Fixes null checks in SvgCanvas2D.
2022-10-09 19:39:49 +02:00
Thomas Bouffard c4f537203b Move layout types to a dedicated types file
These types are only used in the layout classes, so keep them located closed in the folder where they are used.
2022-10-09 19:08:12 +02:00
Thomas Bouffard 7c4b1111ee Apply prettier rules on layout types 2022-10-09 19:02:24 +02:00
Thomas Bouffard b16fa54411
Merge branch 'development' into development 2022-10-09 18:31:25 +02:00
Thomas Bouffard d0a01c2d44
Merge branch 'development' into edge-mixin-typo 2022-10-09 18:30:35 +02:00
Anatoliy Mayorov 1603729a9b fix: types of Hierarchical and Swimlane Layout #96 2022-10-08 21:43:35 +03:00
Anatoliy Mayorov deda3ec03f Fix absolute import path to relative (PR #109) 2022-10-06 16:38:08 +03:00
Anatoliy Mayorov eee2fc8509 Fix stories with overlays usage 2022-10-06 10:58:33 +03:00
Anatoliy Mayorov 572af8c459 Fix edge segment handles not being rendered
Combination of side-effects when porting broke
edge segment handles rendering, fixed some of them
2022-10-05 18:43:29 +03:00
Anatoliy Mayorov 19273293a1 Fixed typo in typings of EdgeMixin 2022-10-05 16:50:46 +03:00
mayorovad 38117aefb2 Fixed Guides story 2022-10-04 11:47:03 +03:00
mayorovad 699fbc9590 Fixed Visibility story 2022-10-03 11:07:39 +03:00
mayorovad f84a4a5836 Changed the type of cells map in GraphDataModel 2022-09-26 11:54:20 +03:00
Anatoliy Mayorov b62eb538f7 deps: bump typescript to 4.8.3, fix Dictionary typings
When running `generate-types` script in core package
there is typescript error TS2345 in src/util/Dictionary.ts,
added changes to fix it.

- Moved types IdentityObject and IdentityFunction to types.ts
- Renamed const FIELD_NAME to IDENTITY_FIELD_NAME and
moved it to util/Constants.ts
- Set Cell and CellOverlay to implement IdentityObject
2022-09-24 14:20:53 +03:00
Thomas Bouffard b7cfeebd23 ts-example: restore the rounded shape in the custom rectangle 2022-09-24 11:16:26 +02:00
Thomas Bouffard 8c29223b98 Remove remaining commented method signatures including types (dated from the JS to TS migration) 2022-09-24 11:10:04 +02:00
Junsik Shim e986c8ea31 Fixes null checks in SvgCanvas2D #107 2022-09-24 10:58:41 +09:00
Junsik Shim 0a1e797bbc Remove CellArray leftovers. 2022-09-17 19:33:16 +09:00
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
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
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
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
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 b2bb10ea7e Fixed the 'Anchors' example. 2022-01-22 13:08: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