Commit Graph

51 Commits (aeea27dcc87a8866be9f90cebffbb855eabe65bb)

Author SHA1 Message Date
Анатолий Майоров 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
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 a617bb644a
Merge pull request #113 from mayorovad/visibility-story-fix
Fixed `Visibility` story
2022-10-09 20:05:57 +02:00
Anatoliy Mayorov eee2fc8509 Fix stories with overlays usage 2022-10-06 10:58:33 +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
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 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 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 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 b51504d7bb Changed the type of cell style from string to CellStyle. 2022-04-17 15:58:35 +09: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
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
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
Junsik Shim 74b67a60a4 Fixed some errors. 2021-10-20 10:28:27 +09:00
Junsik Shim 570dfaab7b Fix Anchors story. 2021-10-18 10:21:31 +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 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
Junsik Shim 2482ec10e9 Trying to run HelloWorld... 2021-09-07 21:21:22 +09:00
Junsik Shim bdc50a9f48 Refactored everything... 2021-09-07 18:07:27 +09:00
Junsik Shim 4316d4f5e5 - Trying to get the stories working... 2021-09-01 23:04:33 +09:00
Junsik Shim 0adb9fa1d3 - Refactored the stories for storybook to work 2021-08-30 23:20:26 +09:00
mcyph 62c9dd8e34 fixed utils references 2021-07-31 19:55:25 +10:00
mcyph 92e446acb2 conversions to typescript and type fixes 2021-07-12 22:13:45 +10:00
mcyph 960813ca1b conversions to typescript and type fixes 2021-06-13 16:13:43 +10:00
mcyph f76a172cae started refactoring+reorganising core to not have mx prefix, and breaking up mxGraph into smaller classes for easier maintenance 2021-06-06 23:04:44 +10:00
mcyph 7cac8a2a86 bugfixes 2021-05-02 23:59:43 +10:00
mcyph fe7ac7e84d bugfixes 2021-05-02 23:56:17 +10:00
mcyph 707605cedd removed all mxConstants.STYLE_* references, now referring to keys directly 2021-05-02 16:04:34 +10:00
Junsik Shim 6658ff658f - Exports everything in mxConstants separately. 2021-04-30 20:05:49 +09:00
Junsik Shim aef7586beb - Removed unused imports. 2021-04-27 21:52:02 +09:00
Junsik Shim c5899e0955 - Removed mxUtils.indexOf(). 2021-04-27 21:40:09 +09:00
Junsik Shim 654736d23d - Removed mxUtils.bind(). 2021-04-27 21:23:17 +09:00
mcyph 2bcacecc7e various bugfixes 2021-04-25 20:47:53 +10:00
Junsik Shim e95ab5679d - Add more images.
- Convert the rest examples.
- src/ is removed.
2021-04-25 12:39:40 +09:00
Junsik Shim b5b12a225a - Add more images.
- Convert more examples.
2021-04-24 21:33:15 +09:00
Junsik Shim 9bdf0aac08 - Convert more examples. 2021-04-24 21:33:07 +09:00
Junsik Shim 59e39cb312 - Convert more examples. 2021-04-24 21:32:54 +09:00
Junsik Shim 8c3afdfc77 - Add images for the examples.
- Convert more examples to storybook.
2021-04-24 21:32:54 +09:00
Junsik Shim 1d05e161c9 - Add css support in storybook.
- Add icons to mxgraph.
- Convert some examples to storybook.
2021-04-24 21:30:30 +09:00