This commit adds more life-cycle events users can
plug into during xml parsing and rendering:
* import.parse.start
* import.parse.complete
* import.render.start
* import.render.complete
* import.done
Some other events had to go because of that, namely
* import.start
* import.(success|error)
BREAKING CHANGE:
* the event import.start got renamed to import.render.start
* the events import.success and import.error got removed
in favour of import.render.complete (passing err, warnings)
This enables users to instantiate Viewers/Modelers via
```
new Viewer({
additionalModules: [ ... ]
});
```
to bootstrap their own modules with the viewer without overriding the
existing ones.
This commit ensures we pipe invisible root elements (Process,
Collaboration) through our import infrastructure, too.
This way we we receive proper events for them.
Related to #6
This commit extracts the main import logic found in import/Importer into
the core/BpmnImporter module. By doing so we we are able to reuse it
during modeling.
Related to #6
Instead of failing hard when we parse invalid flow elements (i.e.
TextAnnotation) we log a warning that may be handled by the diagram
import.
Related to #74
This commit upgrades the code base to the latest diagram-js changes and
adds a component called BpmnRegistry that can be used to retrieve a
certain BPMN/DI element from a shape/connection id.
Related to #19