In the diagram `di` is now accessed via the diagram element, not the
business object. This has the benefit that elements in multiple diagrams
can easily be represented.
Related to https://github.com/bpmn-io/bpmn-js/issues/1472
BREAKING CHANGE:
* Instead of referencing the `di` from the business object, reference it
from the diagram element representing it.
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 }
}
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.