93 Commits

Author SHA1 Message Date
2405cd56d6 test: don't mount modeler for service testing 2024-11-06 10:55:59 +01:00
583195a4fa fix(viewer): remove outline module from default modules
Closes #2135
2024-11-04 22:34:17 +01:00
fcc38bacc4 deps: replace axe-core with @bpmn-io/a11y 2024-06-25 09:43:47 +02:00
4689b35bce test: setup accessibility tests with axe 2024-04-10 13:21:49 +02:00
e557145435 chore: drop deprecated context member
This removes the long deprecated `import.parse.complete` member `context`.

BREAKING CHANGES:

* `import.parse.complete` member `context` removed. Use the actual
  event to retrieve error, warning, and references information.
2023-08-11 09:15:02 +02:00
b7be98b649 chore: drop node-style callback support from public API
BREAKING CHANGES:

* use promise based support, available since 7.0.0
2023-08-10 16:45:52 +02:00
c42dbf8a70 style: update code style
Apply latest bpmn-io code style.
2022-08-18 10:57:23 +00:00
7478388070 deps: replace inherits with inherits-browser
This increase the safety of our build; external consumers
do no longer need to account for the `browser` field to
bundle bpmn-js (or otherwise bundle a Node shim, unintentionally).
2022-05-18 10:15:53 +00:00
069b1902c9 fix(viewer): use active plane for svg export 2022-02-07 10:39:55 +00:00
bd180e3977 test(drilldown): add integration test for multi-di planes 2022-02-03 09:11:06 +01:00
f2b47e17f3 test: verify drill down into legacy sub-processes 2022-01-12 09:14:15 +01:00
b2fd342054 feat(drilldown): make breadcrumbs reactive
* react to palette state
* expose own state to djs-container
2021-11-18 10:27:48 +00:00
946a0ecdb8 test: add drill down spec for Modeler and Viewer 2021-10-21 11:05:08 +02:00
597c417dce chore: throw error when accessing DI from business object
Related to https://github.com/bpmn-io/bpmn-js/issues/1472
2021-09-03 15:14:00 +02:00
ca8488b2c9 test: adjust to use getDi utility function
Related to https://github.com/bpmn-io/bpmn-js/issues/1472
2021-09-03 15:14:00 +02:00
58e1801f52 test: pacify PhantomJS 2021-03-03 23:50:44 +01:00
f7a4a3db7b style: pacify eslint 2021-03-03 23:45:11 +01:00
a7522ac5b1 test(Viewer): verify saveXML.done on no definitions loaded 2021-03-03 22:37:43 +00:00
3567565514 fix(BaseViewer): always emit saveXML.done
This ensures we emit saveXML.done on error, too.
2021-03-03 22:37:43 +00:00
44301d1830 chore: add <npm start> script
This script is the one stop utility that allows users to open a modeler
or viewer instance, directly within your browser.

Works via a custom launcher that openes the {KARMA_BASE}/debug.html
page in your default web browser.

Closes https://github.com/bpmn-io/bpmn-js/issues/1396
2020-12-21 22:43:43 +01:00
3d84aa486e test(Viewer): verify error on missing process/collaboration 2020-11-03 20:39:20 +00:00
157aec6ed6 feat(lib): deprecate import.parse.complete <context> payload
The <import.parse.complete> event is now invoked with

{
 error,
 definitions,
 elementsById,
 references,
 warnings
}

The old payload is deprecated:

{
  error,
  definitions,
  context: { elementsById, references, warnings }
}
2020-04-29 11:12:23 +02:00
04ca31fac9 feat(lib): Promisify public APIs
This commit promisifies following APIs:

   BaseViewer#importXML
   BaseViewer#importDefinitions
   BaseViewer#open
   BaseViewer#saveXML
   BaseViewer#saveSVG
   Modeler#createDiagram

Related to https://github.com/bpmn-io/bpmn-js/issues/812

BREAKING CHANGES:

* Users are now expected to have Promises either by default or
polyfilled as the APIs return a Promise now.
2020-04-29 11:12:23 +02:00
98bc96caac test(Viewer): move missing diagram spec 2020-02-10 19:33:50 +01:00
1b576cda17 test(project): make sinon an allowed global 2019-12-09 12:52:35 +01:00
a1be2ea631 test(project): register BpmnJS in integration tests 2019-12-09 08:32:04 +00:00
f177a462ea fix(viewer): do not clear diagram if no diagram to clear
Closes #1181
2019-09-20 11:11:49 +00:00
33156e43be chore(project): fix linting errors 2019-08-19 14:27:33 +00:00
9c063f867b feat(Viewer): restore Viewer#importDefinitions
This was removed in f8f9334, but it occurred that
the method is used productively  by some of the clients.
This commit restores the method as part of public API.

Use `Viewer#importDefinitions` to import previously
parsed definitions. Now it is also possible to pass
the diagram or diagram id to be rendered during
graphical import.
2019-06-28 10:26:58 +02:00
ff45cab7c1 test(Viewer): correctly call done 2019-06-28 10:26:58 +02:00
0affb3b3bc test(Viewer): simplify multiple-diagrams test cases 2019-04-16 15:20:12 +02:00
87c1d2d142 test(Viewer): expect no warnings when DIs use same elements 2019-04-16 15:20:12 +02:00
a7c0bb8f57 test(Viewer): make sure it opens only selected diagram 2019-04-16 15:20:12 +02:00
7b03e5289a test(import): verify duplicate DI import behavior 2019-04-16 15:20:12 +02:00
ba987734f8 test(Viewer): make diagram names human readable 2019-04-16 15:20:12 +02:00
2f99cff34a test(Viewer): verify non-args #open 2019-04-16 15:20:12 +02:00
b1ee678fe3 test(Viewer): split config -> container handling into own describe 2019-04-16 15:20:12 +02:00
a78f8037c7 test(Viewer): group multiple diagram handling 2019-04-16 15:20:12 +02:00
3f0583ad5f feat(Viewer): add #open method
This adds a method to switch displayed diagram without reimporting
xml via

```
var viewer = new Viewer({ container: container });
viewer.importXML(xml, diagramId, done);

var diagrams = viewer.getDefinitions().diagrams;
viewer.open(diagrams[1], done);
```
2019-04-16 15:20:12 +02:00
1c0585aaaf feat(Viewer): allow to select diagram to view
This introduces a new parameter to `Viewer#importXML`
which enables to choose the diagram to display.

```
var viewer = new Viewer({ container: container });
viewer.importXML(xml, diagramId, done);
```

Closes #87
2019-04-16 15:20:12 +02:00
0c71ad30a0 feat(Viewer): remove businessObject#di binding on #clear
Closes #978
2019-04-16 15:10:43 +02:00
b60feba531 test(Viewer): verify editor action support 2018-10-29 14:52:41 +00:00
3c87716895 feat(viewer): emit export events
This makes the viewer emit events during SVG and XML export.

These events allow others to hook in, i.e. to trigger additional _save_
actions.

Closes #811
2018-06-12 15:44:52 +02:00
6c9d37da12 fix(project): correct library default export 2018-04-05 09:47:37 +02:00
9be61259bd chore(project): drop 'use strict'
We use ES modules, so 'use strict' is not necessary anymore.
2018-04-03 18:09:53 +02:00
d3449ca87c chore(project): es6ify source code
* use ES6 import / export
* UTILS: export individual utilities
* TESTS: localize TestHelper includes

BREAKING CHANGE:

* all utilities export independent functions
* library sources got ported to ES6. You must now use
  a ES module bundler such as Browserify + babelify or
  Webpack to consume this library (or parts of it).
2018-04-03 16:32:14 +02:00
8c92800bd2 test(Viewer): bump SVG export timeout 2018-02-14 22:22:30 +01:00
37a06a378d chore(tests): use absolute lib requires 2018-01-24 11:41:21 +01:00
7ffb865023 chore(project): consistent async error handling
Async utilities properly propagate _all_ errors to the
specified _done_ callback. Failing in _done_ does not
re-invoke it.

Adjustments made in

* Viewer#importXML
* Viewer#saveSVG
* Importer#importBpmnDiagram

Tests cleaned up to remove un-necessary `if (err) { ...` snippets.
2017-12-09 22:31:15 +01:00
50da47e1e1 fix(Viewer): trigger resized on attach
Ensure components get notified on `canvas.resized`, whenever
the Viewer instance gets attached.
2017-12-07 11:59:25 +01:00