98 Commits

Author SHA1 Message Date
9f41690c22 fix(Modeler): re-add outline feature
Turns out our custom outlines got missing with 583195a,
time to restore them (for modeling).

Related to #2135
2024-11-06 10:55:59 +01:00
edfec4cdc8 feat: allow to type services and events
This PR builds on upon diagram-js provided service and event typing:

* https://github.com/bpmn-io/diagram-js/pull/862

It allows you to specify (public) types exposed by your BPMN toolkit
trough a ServiceMap. Events exposed are parsed from the EventBus
dynamic types.

Closes #2121
2024-04-30 10:12:09 +02:00
0d79ceb6fb fix: add outline module to viewer modules
Closes #2133
2024-04-10 15:39:16 +02:00
9b2b6a65d8 feat: remove touch interaction module
BREAKING CHANGE: Migrated to `diagram-js@14` which removes touch interaction module, and dependency on unsupported `hammerjs` package. If you rely on touch interaction, you need to support touch interaction on your own.

deps: update to `diagram-js@14`

feat: allow to add to selection via lasso tool

Closes #2053
2024-02-06 11:13:04 +01:00
c3fed8e09b feat: provide selection outlines
Closes #1996
2023-10-31 14:26:15 +01:00
b528a865a7 chore: extract modeling feedback into dedicated module
It is a UI component that shall be used in interactive environments only.
2023-08-14 12:36:33 +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
208d1fd691 fix(modeler): fix JSDoc 2023-04-19 12:18:42 +02:00
5e898a9e2a chore: wrap methods for compatibility after assigning them 2023-04-19 12:18:42 +02:00
42042fc62d feat: remove create-append-anything module 2023-03-23 12:30:49 +01:00
ab130b0d1f feat: add type declarations for viewer and modeler
Related to #1829
2023-03-09 09:02:01 +01:00
0fd908cddb docs: improve core entry points JSDoc 2023-02-06 17:26:41 +01:00
bfc33f36e7 feat(popup-menu): add create menu provider
Closes #1798
2023-01-23 11:53:52 +01:00
befe8b82c8 feat: add alignment and distribution menu multi-element context pad
Closes #1680
Closes #1691
2022-07-07 11:01:24 +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
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
fcb11a60f7 chore(documentation): fix JSDoc number types 2020-04-07 06:52:55 +00:00
7a67ff95b2 chore(documentation): fix JSDoc string types 2020-04-07 06:52:55 +00:00
bb94b206a7 feat(project): provide Base{Viewer|Modeler} distributions
This allows users to use the viewer / modeler features without
inheriting our modules.

Related to #258
2019-12-11 13:28:35 +01:00
33156e43be chore(project): fix linting errors 2019-08-19 14:27:33 +00:00
ab56fc21ad feat(modeling): prevent accidential dragging of container elements
This implements custom hit areas for participants, lanes and
expanded subprocesses.

Given these changes, users need to grab container elements
on the boarder or the label area to move them.

Closes https://github.com/bpmn-io/bpmn-js/issues/957
2019-07-18 15:42:05 +02:00
23505a4783 Revert "feat(modeling): prevent accidential dragging of container elements"
This reverts commit 7b0e304062637348201506d262d83ddcfd28178e.

Related to https://github.com/camunda/camunda-modeler/issues/1416
Opens https://github.com/bpmn-io/bpmn-js/issues/957
2019-07-02 08:12:41 +00:00
7b0e304062 feat(modeling): prevent accidential dragging of container elements
This implements custom hit areas for participants, lanes and
expanded subprocesses.

Given these changes, users need to grab container elements
on the boarder or the label area to move them.

Closes https://github.com/bpmn-io/bpmn-js/issues/957
2019-06-25 18:01:40 +02:00
bc4b6cbfd8 fix(tests): fix custom elements tests
* in the context of bpmn-js returning true when asked wether two elements can be connected is not sufficient
* remove BpmnConnectionPreview since it's not needed after tests are fixed

Closes #1034
2019-05-23 18:26:12 +02:00
87bfe23ff8 feat(connection-preview): support general connection preview
Closes #744
2019-05-17 11:15:06 +02:00
2335282a82 fix(bpmn-create-connect-preview): override #getConnection 2019-05-09 14:12:37 +00:00
1958b2e81b fix(bpmn-connect-preview): override #getConnection 2019-05-09 14:12:37 +00:00
86506468ba feat(Modeler): re-integrate grid snapping 2019-04-26 18:31:36 +00:00
b72426834d chore(Modeler): disable grid snapping 2019-04-25 10:21:05 +02:00
b596c6dd06 feat(snapping): add grid snapping
Related to #973
2019-04-12 17:42:08 +02:00
921eeb4843 fix(Modeler): use correct copy-paste-module 2018-11-06 13:56:53 +00:00
a94406e423 feat(modeler): (re-)integrate selection moving via keyboard
Closes #376
2018-10-29 14:52:41 +00:00
645265ad7e chore(editor-actions): make dependencies optional
* Treat features as optional dependencies and register action
  only if feature exists
* Explicitly add features to the Modeler and NavigatedViewer types
2018-10-29 14:52:41 +00: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
ae96f3714d feat(modeling): add auto placement from context menu
Elements will automatically be created at appropriate
positions when context menu create entries are being
clicked (rather than dragged).

This marks a major step forward for mobile modeling,
too as dragging, especially dragging out from very small
controls is very cumbersome to do.

Things we take into account:

* for bpmn:FlowNodes, we try to compute the current
  distance between elements on the flow based on
  connections going in and out of the flow nodes
  source element
* for bpmn:TextAnnotation we assume placement of the
  element top right of the source shape
* for bpmn:DataObject and friends we assume a
  placement bottom right of the source shape
* for all elements, we try not to place elements on
  top of each other; i.e. new elements will be pushed
  up or down accordingly, if an element at a chosen
  position does already exist

Integration into other services:

* context pad provider works with autoPlace, if
  available and defaults to drag start without
* auto placed elements are selected and direct editing
  may conditionally be activated based on element type
  (LabelEditingProvider knows the rules)

Users can out out of autoPlace by specifying the configuration
property `config.contextPad.autoPlace = false`.

Closes #563

BREAKING CHANGE:

* This breaks the default interaction from the context
  pad; if you rely on clicking to start the drag
  you can opt out of autoPlace:

  ```
  new BpmnJS({ contextPad: { autoPlace: false } });
  ```
2017-12-22 10:30:44 +01:00
642d7b88af chore(Viewer+Modeler): consistently name private instance variables
BREAKING CHANGE:

* definitions, container and moddle have been prefixed with
  an underscore (_) to denote they are private use.
2017-11-20 15:28:29 +01:00
a9b68b69e0 feat(replace): clone properties when morphing to new element
Closes #647
2017-01-12 16:02:31 +01:00
3d0adc6493 feat(bpmn-clone): add ability to clone bpmn properties
This will allow a complete semantic copy/paste and replace of elements

Closes #646
2017-01-11 09:01:09 +01:00
e99214bb6a chore(editor-actions): factor out into own component
Related to bpmn-io/diagram-js#177
2016-06-21 15:29:03 +02:00
224fa6da61 feat(align-elements): elements can be aligned
Related to bpmn-io/bpmn-js#177
2016-06-21 15:29:03 +02:00
62d9b6f993 feat(Modeler): expose Viewer and NavigatedViewer constructors
This allows bundled users (f.ex without browserify)
to use the modeler + viewers easily without having to monkey patch or
load more than one bundled file.

Closes #541
2016-05-12 15:38:41 +02:00
2371a8da23 feat(border-scroll): adding auto-scrolling near borders
Closes #481
2016-04-27 15:39:41 +02:00
1b9ebfc993 feat(copy-paste): allow copying & pasting of elements
Closes #391
2016-04-22 09:34:53 +02:00
1923a6bdda feat(global-connect): connect distant elements
Closes #474, #394
2016-04-14 17:03:58 +02:00
bff19786b4 feat(search): be able to search bpmn elements
Closes #500
2016-04-12 16:50:23 +02:00
1a62e5925b fix(Modeler): clear ids on destroy 2016-03-18 13:10:07 +01:00
37eca38dac feat(Viewer): make importXML callback optional
People could be hooking up with import via events, too.
2016-03-17 17:44:56 +01:00
46d8abdd70 feat(import): allow users to hook into via events
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)
2016-03-17 17:44:56 +01:00
ff0d88bb90 chore(Viewer+Modeler): inherit from Diagram
* simplifies event handling
* relies on Diagram#clear to reset the diagram before
  successive imports
* allows diagram services to be re-used across imports
* allows diagram services to be injected (or retrieved)
  before import

Closes #237
2016-03-17 17:44:32 +01:00