diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 00000000..c44e609d
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,43 @@
+---
+name: Bug Report
+about: Report a bug to help us improve
+title: '[Bug]: '
+labels: 'bug'
+assignees: ''
+
+---
+
+**Checked for duplicates**
+
+> Have you checked for duplicate issue tickets?
+
+- Ex. Yes - I've already checked
+- Ex. No - I haven't checked
+
+**Describe the bug**
+
+> A clear and concise description of what the bug is. Plain-text snippets preferred but screenshots welcome.
+
+Ex. When I did [...] action, I noticed [...]
+
+**What did you expect?**
+
+> A clear and concise description of what you expect to happen
+
+Ex. I expected [...]
+
+**Reproducible steps**
+
+> How would we reproduce this bug? Please walk us through it step by step. Plain-text snippets preferred but screenshots welcome.
+
+1.
+2.
+3.
+
+**What is your environment?**
+
+> Include any computer hardware, operating system, framework, browser, time-of-day or other contextual information related to your issue
+
+- Ex. Version of this software [e.g. vX.Y.Z]
+- Ex. Operating System: [e.g. MacOSX with Docker Desktop vX.Y]
+- ...
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 00000000..0b74a7aa
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,34 @@
+---
+name: New Feature
+about: Suggest a new feature for us to implement
+title: '[New Feature]: '
+labels: 'enhancement'
+assignees: ''
+
+---
+
+**Checked for duplicates**
+
+> Have you checked for duplicate issue tickets?
+
+- Ex. Yes - I've already checked
+- Ex. No - I haven't checked
+
+**Alternatives considered**
+
+> Have you considered alternative solutions to your feature request?
+
+- Ex. Yes - and alternatives don't suffice
+- Ex. No - I haven't considered
+
+**Related problems**
+
+> Is your feature request related to any problems? Please help us understand if so, including linking to any other issue tickets.
+
+Ex. I'm frustrated when [...] happens as documented in issue-XYZ
+
+**Describe the feature request**
+
+> A clear and concise description of your request.
+
+Ex. I need or want [...]
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 00000000..8ef73bbc
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,13 @@
+## Purpose
+- Clear, easy-to-understand sentences outlining the purpose of the PR
+## Proposed Changes
+- [ADD] ...
+- [CHANGE] ...
+- [FIX] ...
+## Issues
+- Links to relevant issues
+- Example: issue-XYZ
+## Testing
+- Provide some proof you've tested your changes
+- Example: test results available at ...
+- Example: tested on operating system ...
diff --git a/.github/workflows/README.md b/.github/workflows/README.md
index 1409eb80..b0f10bb1 100644
--- a/.github/workflows/README.md
+++ b/.github/workflows/README.md
@@ -37,7 +37,7 @@ The `publish-cws-image` job is the CD component of the workflow, triggered upon
- **Download Logstash**:
- [**download-file-action**](https://github.com/marketplace/actions/download-file-to-workspace): This action downloads a file from the internet into the workspace
- Downloads Logstash using a URL
- - Renames the file as `logstash-8.8.0.zip`
+ - Renames the file as `logstash-8.12.0.zip`
- Stores Logstash in appropriate directory
- **Check for Logstash**:
- List files in the directory where Logstash is expected
diff --git a/.github/workflows/camunda.yml b/.github/workflows/camunda.yml
index 1e5af4af..460f5a52 100644
--- a/.github/workflows/camunda.yml
+++ b/.github/workflows/camunda.yml
@@ -31,12 +31,12 @@ jobs:
--name mdb103
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- - name: Set up JDK 11
- uses: actions/setup-java@v3
+ - name: Set up JDK 17
+ uses: actions/setup-java@v4
with:
- java-version: '11'
+ java-version: '17'
distribution: 'temurin'
cache: maven
@@ -46,11 +46,18 @@ jobs:
chmod +x generate-certs.sh
./generate-certs.sh
+ - name: Set up Keystore storepass
+ run: |
+ mkdir ~/.cws/
+ chmod 700 ~/.cws/
+ echo ${{ secrets.KEYSTORE_PASSWORD }} > ~/.cws/creds
+ chmod 600 ~/.cws/creds
+
- name: Download Logstash
uses: carlosperate/download-file-action@v1
with:
- file-url: https://artifacts.elastic.co/downloads/logstash/logstash-8.8.0-windows-x86_64.zip
- file-name: logstash-8.8.0.zip
+ file-url: https://artifacts.elastic.co/downloads/logstash/logstash-8.12.0-windows-x86_64.zip
+ file-name: logstash-8.12.0.zip
location: install/logging/
- name: Check for Logstash
@@ -100,14 +107,14 @@ jobs:
shell: bash
- name: Upload Jacoco report
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: jacoco-report
path: jacoco-reports/aggregate/index.html
- name: Upload test screenshots
if: ${{ always() && steps.build.outcome == 'success' }}
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: test-screenshots
path: test-screenshots/
@@ -115,7 +122,7 @@ jobs:
- name: Send custom JSON data to Slack workflow
if: ${{ always() && contains(env.TEAM, github.actor) }}
id: slack
- uses: slackapi/slack-github-action@v1.19.0
+ uses: slackapi/slack-github-action@v1.25.0
with:
# This data can be any valid JSON from a previous step in the GitHub Action
payload: |
@@ -154,12 +161,12 @@ jobs:
--name mdb103
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- - name: Set up JDK 11
- uses: actions/setup-java@v3
+ - name: Set up JDK 17
+ uses: actions/setup-java@v4
with:
- java-version: '11'
+ java-version: '17'
distribution: 'temurin'
cache: maven
@@ -169,11 +176,18 @@ jobs:
chmod +x generate-certs.sh
./generate-certs.sh
+ - name: Set up Keystore storepass
+ run: |
+ mkdir ~/.cws/
+ chmod 700 ~/.cws/
+ echo ${{ secrets.KEYSTORE_PASSWORD }} > ~/.cws/creds
+ chmod 600 ~/.cws/creds
+
- name: Download Logstash
uses: carlosperate/download-file-action@v1
with:
- file-url: https://artifacts.elastic.co/downloads/logstash/logstash-8.8.0-windows-x86_64.zip
- file-name: logstash-8.8.0.zip
+ file-url: https://artifacts.elastic.co/downloads/logstash/logstash-8.12.0-windows-x86_64.zip
+ file-name: logstash-8.12.0.zip
location: install/logging/
- name: Check for Logstash
@@ -219,7 +233,7 @@ jobs:
- name: Upload test screenshots
if: ${{ always() && steps.build.outcome == 'success' }}
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: test-screenshots-advanced
path: test-screenshots/
@@ -227,7 +241,7 @@ jobs:
- name: Send custom JSON data to Slack workflow
if: ${{ always() && contains(env.TEAM, github.actor) }}
id: slack
- uses: slackapi/slack-github-action@v1.19.0
+ uses: slackapi/slack-github-action@v1.25.0
with:
# This data can be any valid JSON from a previous step in the GitHub Action
payload: |
@@ -255,10 +269,10 @@ jobs:
steps:
- name: Check out the repo
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Set up JDK 11
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
diff --git a/.github/workflows/ldap.yml b/.github/workflows/ldap.yml
index d2330e07..8359a3e1 100644
--- a/.github/workflows/ldap.yml
+++ b/.github/workflows/ldap.yml
@@ -31,12 +31,12 @@ jobs:
--name mdb103
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- - name: Set up JDK 11
- uses: actions/setup-java@v3
+ - name: Set up JDK 17
+ uses: actions/setup-java@v4
with:
- java-version: '11'
+ java-version: '17'
distribution: 'temurin'
cache: maven
@@ -46,11 +46,18 @@ jobs:
chmod +x generate-certs.sh
./generate-certs.sh
+ - name: Set up Keystore storepass
+ run: |
+ mkdir ~/.cws/
+ chmod 700 ~/.cws/
+ echo ${{ secrets.KEYSTORE_PASSWORD }} > ~/.cws/creds
+ chmod 600 ~/.cws/creds
+
- name: Download Logstash
- uses: carlosperate/download-file-action@v1
+ uses: carlosperate/download-file-action@v2
with:
- file-url: https://artifacts.elastic.co/downloads/logstash/logstash-8.8.0-windows-x86_64.zip
- file-name: logstash-8.8.0.zip
+ file-url: https://artifacts.elastic.co/downloads/logstash/logstash-8.12.0-windows-x86_64.zip
+ file-name: logstash-8.12.0.zip
location: install/logging/
- name: Check for Logstash
@@ -102,7 +109,7 @@ jobs:
- name: Send custom JSON data to Slack workflow
if: ${{ always() && contains(env.TEAM, github.actor) }}
id: slack
- uses: slackapi/slack-github-action@v1.19.0
+ uses: slackapi/slack-github-action@v1.25.0
with:
# This data can be any valid JSON from a previous step in the GitHub Action
payload: |
diff --git a/.gitignore b/.gitignore
index d3b907a3..e866a95a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,4 +34,4 @@ install/logging/logstash-*.zip
/jacoco-reports
/test-screenshots
-*.cnf
\ No newline at end of file
+*.cnf
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 00000000..fb130d61
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,13 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## [X.Y.Z](https://github.com/NASA-AMMOS//releases/tag/X.Y.Z) - 2023-MM-DD
+
+### Added
+
+-
+
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 00000000..211738d9
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,135 @@
+
+# Code of Conduct
+
+## Our Pledge
+
+We as members, contributors, and leaders pledge to make participation in our
+community a harassment-free experience for everyone, regardless of age, body
+size, visible or invisible disability, ethnicity, sex characteristics, gender
+identity and expression, level of experience, education, socio-economic status,
+nationality, personal appearance, race, caste, color, religion, or sexual
+identity and orientation.
+
+We pledge to act and interact in ways that contribute to an open, welcoming,
+diverse, inclusive, and healthy community.
+
+## Our Standards
+
+Examples of behavior that contributes to a positive environment for our
+community include:
+
+* Demonstrating empathy and kindness toward other people
+* Being respectful of differing opinions, viewpoints, and experiences
+* Giving and gracefully accepting constructive feedback
+* Accepting responsibility and apologizing to those affected by our mistakes,
+ and learning from the experience
+* Focusing on what is best not just for us as individuals, but for the overall
+ community
+
+Examples of unacceptable behavior include:
+
+* The use of sexualized language or imagery, and sexual attention or advances of
+ any kind
+* Trolling, insulting or derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or email address,
+ without their explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+ professional setting
+
+## Enforcement Responsibilities
+
+Community leaders are responsible for clarifying and enforcing our standards of
+acceptable behavior and will take appropriate and fair corrective action in
+response to any behavior that they deem inappropriate, threatening, offensive,
+or harmful.
+
+Community leaders have the right and responsibility to remove, edit, or reject
+comments, commits, code, wiki edits, issues, and other contributions that are
+not aligned to this Code of Conduct, and will communicate reasons for moderation
+decisions when appropriate.
+
+## Scope
+
+This Code of Conduct applies within all community spaces, and also applies when
+an individual is officially representing the community in public spaces.
+Examples of representing our community include using an official e-mail address,
+posting via an official social media account, or acting as an appointed
+representative at an online or offline event.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported to the community administrators responsible for enforcement at
+[@NikJPL (Aniwat.Nik.Sheurpukdi@jpl.nasa.gov)](https://github.com/NikJPL),
+[@snnjpl (Shawn.N.Nguyen@jpl.nasa.gov)](https://github.com/snnjpl) or
+[@sharimayer — Configuration Manager](https://github.com/sharimayer).
+All complaints will be reviewed and investigated promptly and fairly.
+
+All community leaders are obligated to respect the privacy and security of the
+reporter of any incident.
+
+## Enforcement Guidelines
+
+Community leaders will follow these Community Impact Guidelines in determining
+the consequences for any action they deem in violation of this Code of Conduct:
+
+### 1. Correction
+
+**Community Impact**: Use of inappropriate language or other behavior deemed
+unprofessional or unwelcome in the community.
+
+**Consequence**: A private, written warning from community leaders, providing
+clarity around the nature of the violation and an explanation of why the
+behavior was inappropriate. A public apology may be requested.
+
+### 2. Warning
+
+**Community Impact**: A violation through a single incident or series of
+actions.
+
+**Consequence**: A warning with consequences for continued behavior. No
+interaction with the people involved, including unsolicited interaction with
+those enforcing the Code of Conduct, for a specified period of time. This
+includes avoiding interactions in community spaces as well as external channels
+like social media. Violating these terms may lead to a temporary or permanent
+ban.
+
+### 3. Temporary Ban
+
+**Community Impact**: A serious violation of community standards, including
+sustained inappropriate behavior.
+
+**Consequence**: A temporary ban from any sort of interaction or public
+communication with the community for a specified period of time. No public or
+private interaction with the people involved, including unsolicited interaction
+with those enforcing the Code of Conduct, is allowed during this period.
+Violating these terms may lead to a permanent ban.
+
+### 4. Permanent Ban
+
+**Community Impact**: Demonstrating a pattern of violation of community
+standards, including sustained inappropriate behavior, harassment of an
+individual, or aggression toward or disparagement of classes of individuals.
+
+**Consequence**: A permanent ban from any sort of public interaction within the
+community.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage],
+version 2.1, available at
+[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
+
+Community Impact Guidelines were inspired by
+[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
+
+For answers to common questions about this code of conduct, see the FAQ at
+[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
+[https://www.contributor-covenant.org/translations][translations].
+
+[homepage]: https://www.contributor-covenant.org
+[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
+[Mozilla CoC]: https://github.com/mozilla/diversity
+[FAQ]: https://www.contributor-covenant.org/faq
+[translations]: https://www.contributor-covenant.org/translations
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 5119547a..d1874f1e 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,3 +1,329 @@
-# How to Contribute
+# Contributing to Common-workflow-service
+
+Thanks for taking the time to consider contributing! We very much appreciate your time and effort. This document outlines the many ways you can contribute to our project, and provides detailed guidance on best practices. We look forward to your help!
+
+## Prerequisites
+
+Before you begin contributing to our project, it'll be a good idea to ensure you've satisfied the below pre-requisites.
+
+### License
+
+Our project has our licensing terms, including rules governing redistribution, documented in our [LICENSE](LICENSE) file. Please take a look at that file and ensure you understand the terms. This will impact how we, or others, use your contributions.
+
+### Code of Conduct
+
+Our Code of Conduct helps facilitate a positive interaction environment for everyone involved with the team, and provides guidance on what to do if you experience problematic behavior. Read more in our [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md), and make sure you agree to its terms.
+
+### Developer Environment
+
+For patch contributions, see our [Developer Documentation](https://github.com/NASA-AMMOS/common-workflow-service/wiki) for more details on how to set up your local environment, to best contribute to our project.
+
+At a minimum however to submit patches (if using Git), you'll want to ensure you have:
+1. An account on the Version Control System our project uses (i.e. GitHub).
+2. The Version Control System client (i.e. Git) installed on your local machine.
+3. The ability to edit, build, and test our project on your local machine. Again, see our [README.md](README.md) or detailed developer guide for more details
+
+### Communication Channels
+
+Before contributing changes to our project, it's a great idea to be familiar with our communication channels and to socialize your potential contributions to get feedback early. This will help give you context for your contributions, no matter their form.
+
+Our communication channels are:
+- [Issue tracking system](https://github.com/NASA-AMMOS/common-workflow-service/issues) - a regularly monitored area to report issues with our software or propose changes
+- [Discussion board](https://github.com/NASA-AMMOS/common-workflow-service/discussions) - a permanently archived place to hold conversations related to our project, and to propose as well as show+tell topics to the contributor team. This resource can be searched for old discussions.
+
+## Our Development Process
+
+Our project integrates contributions from many people, and so we'd like to outline a process you can use to visualize how your contributions may be integrated if you provide something.
+
+```mermaid
+flowchart TD
+ repo_proj[(Our Repository)]-->|Fork|repo_fork[(Your Forked Repository)]
+ repo_fork-->|Make|patch(Your Changes)
+ patch-->|Submit|pr(Pull Request)
+ pr==>|Approved|repo_proj
+ pr-->|Changes Requested|repo_fork
+```
+
+### Fork our Repository
+
+Forking our repository, as opposed to directly committing to a branch is the preferred way to propose changes.
+
+See [this GitHub guide](https://docs.github.com/en/get-started/quickstart/fork-a-repo) on forking for information specific to GitHub.com
+
+#### Find or File an Issue
+
+Make sure people are aware you're working on a patch! Check out our [issue tracking system](https://github.com/NASA-AMMOS/common-workflow-service/issues) and find an open issue you'd like to work against, or alternatively file a new issue and mention you're working on a patch.
+
+#### Choose the Right Branch to Fork
+
+Our project typically has the following branches available, make sure to fork either the default branch or a branch someone else already tagged with a particular issue ticket you're working with.
+- `main` — release branch
+- `develop` — optional default branch, used primarily for new code development
+
+### Make your Modifications
+
+Within your local development environment, this is the stage at which you'll propose your changes, and commit those changes back to version control. See the [README.md](README.md) or development guide for more specifics on what you'll need as prerequisites to setup your local development environment.
+
+#### Commit Messages
+
+Commit messages to version control should reference a ticket in their title / summary line:
+
+```
+Issue #248 - Show an example commit message title
+```
+
+This makes sure that tickets are updated on GitHub with references to commits that are related to them.
+
+Commit should always be atomic. Keep solutions isolated whenever possible. Filler commits such as "clean up white space" or "fix typo" should be merged together before making a pull request, and significant sub-feature branches should be [rebased](https://www.youtube.com/results?search_query=git+rebase) to preserve commit history. Please ensure your commit history is clean and meaningful!
+
+### Submit a Pull Request
+
+Pull requests are the core way our project will receive your patch contributions. Navigate to your branch on your own fork within the version control system, and submit a pull request or submit the patch text to our project.
+
+Please make sure to provide a meaningful text description to your pull requests, whenever submitted. Our pull-request template will be auto-generated for you when you create your pull-request. See the template [here](.github/PULL_REQUEST_TEMPLATE.md).
+
+**Working on your first Pull Request?** See guide: [How to Contribute to an Open Source Project on GitHub](https://kcd.im/pull-request)
+
+### Reviewing your Pull Request
+
+Reviewing pull-requests, or any kinds of proposed patch changes, is an art. That being said, we follow the following best practices:
+- **Intent** - is the purpose of your pull-request clearly stated?
+- **Solution** - is your pull-request doing what you want it to?
+- **Correctness** - is your pull-request doing what you want it to *correctly*?
+- **Small Patches** - is your patch of a level of complexity and brevity that it can actually be reviewed by a human being? Or is does it involve too much content for one pull request?
+- **Coding best practices** - are you following best practices in the coding / contribution language being used?
+- **Readability** - is your patch readable, and ultimately maintainable, by others?
+- **Reproducibility** - is your patch reproducible by others?
+- **Tests** - do you have or have conducted meaningful tests?
+
+## Ways to Contribute
+
+### ⚠️ Issue Tickets
+
+> *Do you like to talk about new features, changes, requests?*
+
+Issue tickets are a very simple way to get involved in our project. It also helps new contributors get an understanding of the project more comprehensively. This is a great place to get started with the project if you're not sure where to start.
+
+See our list of issues at: https://github.com/NASA-AMMOS/common-workflow-service/issues
+
+#### Cleaning up Duplicate Issues
+
+Often we receive duplicate issues that can confuse project members on *which* issue ticket to hold conversations upon.
+
+Here's how you can help:
+1. Scan the list of *open* issue tickets for duplicate titles, or internal wording
+2. If you find duplicates, copy / paste the below message on the conversation thread of the issue ticket *that has less participants* involved
+
+```
+This is a duplicate issue. Please migrate conversations over to [issue-XYZ](hyperlink to issue)
+```
+
+#### Good First Issues
+
+Issue tickets can vary in complexity, and issues labeled with `good first issue` labels are often a great way to get started with the project as a newcomer.
+
+Take a look at our [issue tracking system](https://github.com/NASA-AMMOS/common-workflow-service/issues), and filter by `good first issue` for issues that are low-complexity, and that will help you get familiar with our issue tracking and patch submission process.
+
+#### Suggesting New Issue Labels
+
+Labels within our [issue tracking system](https://github.com/NASA-AMMOS/common-workflow-service/issues) are a great way to quickly sort through tickets. The project may not yet have labels to cover the full variety of issue tickets. Take a look through our list of issues, and if you notice a set of issue tickets that seem similar but are not categorized with an existing label, go ahead submit a request within one of the issues you've looked at with the following text:
+
+```
+I've noticed several other issues that are of the same category as this issue. Shall we make a new label for these types of issues?
+```
+
+#### Submitting Bug Issues
+
+Resolving bugs is a priority for our project. We welcome bug reports. However, please make sure to do the following prior to submitting a bug report:
+- **Check for duplicates** - there may be a bug report already describing your issue, so check the [issue tracking system](https://github.com/NASA-AMMOS/common-workflow-service/issues) first.
+
+Here's some guidance on submitting a bug issue:
+1. Navigate to our [issue tracking system](https://github.com/NASA-AMMOS/common-workflow-service/issues) and file a new issue
+2. Select a bug template (if available) for your issue
+ 1. Fill out the template fields to the best of your ability, including output snippets or screenshots where applicable
+3. Follow the general guidelines below for extra information about your bug
+ 1. Include a code snippet if you have it showcasing the bug
+ 2. Provide reproducible steps of how to recreate the bug
+ 3. If the bug triggers an exception or error message, include the *full message* or *stacktrace*
+ 4. Provide information about your operating system and the version of our project you're using
+
+#### Submitting New Feature Issues
+
+We welcome new feature requests to help grow our project. However, please make sure to do the following prior to submitting a new feature request:
+- **Check for duplicates** - there may be a new feature issue already describing your issue, so check the [issue tracking system](https://github.com/NASA-AMMOS/common-workflow-service/issues) first
+- **Consider alternatives** - is your feature really needed? Or is there a feature within our project or with a third-party that may help you achieve what you want?
+
+Here's some guidance on submitting a new feature issue:
+1. Navigate to our [issue tracking system](https://github.com/NASA-AMMOS/common-workflow-service/issues) and file a new issue
+2. Select a new feature template (if available) for your issue
+ 1. Fill out the template fields to the best of your ability
+
+#### Submitting Security Vulnerability Issues
+
+Security vulnerabilities should **not** be filed to the regular issue tracking system.
+
+Report your security vulnerabilities to (see contact links): [@jl-0](https://github.com/jl-0) or [@sharimayer](https://github.com/sharimayer)
+
+Please be sure to:
+* Indicate the severity of the vulnerability
+* Provide any workarounds, if you know them
+* Provide return-contact information to follow-up with you if needed
+
+#### Reviewing Pull Requests
+
+Reviewing others' contributions is a great way to learn about best practices in both contributions as well as software.
+
+Take a look at our [pull requests tracking system](https://github.com/NASA-AMMOS/common-workflow-service/pulls), and try the following options for providing a review:
+1. Read the code / patch associated with the pull-request, and take note of any coding, bug, or documentation issues if found
+2. Try to recreate the pull-request patch on your local machine, and report if it has issues with your system in particular
+3. Scan over suggested feedback from other contributors, and provide feedback if necessary
+
+### 💻 Code
+
+⚠️ It's **highly** advised that you take a look at our [issue tracking system](https://github.com/NASA-AMMOS/common-workflow-service/issues) before considering any code contributions. Here's some guidelines:
+1. Check if any duplicate issues exist that cover your code contribution idea / task, and add comments to those tickets with your thoughts.
+2. If no duplicates exist, create a new issue ticket and get a conversation started before making code changes using our [communication channels](#communication-channels).
+
+Once you have a solid issue ticket in hand and are ready to work on code, you'll want to:
+1. Ensure you have development [prerequisites](#prerequisites) cleared.
+2. Have your [development environment](#developer-environment) set up properly.
+3. Go through our [development process](#our-development-process), including proposing changes to our project.
+
+Some guidelines for code-specific contributions:
+- **Do your homework** - read-up on necessary documentation, like `README.md`s, developer documentation, and pre-existing code to see the intention and context necessary to make your contribution a success. It's important to _communicate_ what you're working on through our project [communication channels](#communication-channels) and get buy-in from frequent contributors - this will help the project be more receptive to your contributions!
+- **Ask questions** - its important to ask questions while you work on your contributions, to check-in with frequent contributors on the style and the set of expectations to make your code contribution work well with pre-existing project code. Use our [communication channels](#communication-channels)
+- **Keep positive** - code contributions, by their nature, have direct impacts on the output and functionality of the project. Keep a positive spirit as your code is reviewed, and take it in stride if core contributors take time to review, give you suggestions for your code or respectfully decline your contribution. This is all part of the process for quality open source development.
+- **Comments** - include *useful* comments throughout your code that explain the intention of a code block, not a step-by-step analysis. See our [inline code documentation](#inline-code-documentation) section for specifics.
+
+
+### 📖 Documentation
+
+Documentation is the core way our users and contributors learn about the project. We place a high value on the quality, thoroughness, and readability of our documentation. Writing or editing documentation is an excellent way to contribute to our project without performing active coding.
+
+⚠️ It's **highly** advised that you take a look at our [issue-tracking system](https://github.com/NASA-AMMOS/common-workflow-service/issues) before considering any documentation contributions. Here's some guidelines:
+1. Check if any duplicate issues exist that cover your documentation contribution idea / task, and add comments to those tickets with your thoughts.
+2. If no duplicates exist, create a new issue ticket and get a conversation started before making documentation changes.
+
+Some guidelines for documentation best practices (summarized from Google's [excellent documentation guide](https://google.github.io/styleguide/docguide/best_practices.html)):
+- **Minimum viable docs** - don't do less documentation than your users / developers need, but also don't do more
+- **Changed code = changed docs** - if your code has changed, remember to update your documentation
+- **Delete old docs** - continually clean your documentation tree, and remove outdated docs regularly
+
+#### Documentation Organization
+
+The overall structure of our project documentation is as follows:
+- Source-controlled documentation
+ - [README.md](README.md) - top-level information about how to run, build, and contribute to the project
+ - [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) - best practices and guidance on how to work well with other people in the project, and suggestions on dealing with interpersonal issues
+ - [CONTRIBUTING.md](CONTRIBUTING.md) - guidance on contributing to the project
+ - `*.java`, `*.py`, `*.sh`, etc. - inline documentation available inside code files
+- Hosted documentation
+ - [Wiki Main-page](https://github.com/NASA-AMMOS/common-workflow-service/wiki)
+- Discussion Boards
+ - [Discussions](https://github.com/NASA-AMMOS/common-workflow-service/discussions)
+
+
+
+For directions on contributing to our source-controlled documentation:
+1. Ensure you have development [prerequisites](#prerequisites) cleared.
+2. Have your [development environment](#developer-environment) set up properly.
+3. Go through our [development process](#our-development-process), including proposing changes to our project.
+
+
+
+#### Writing Style
+
+To ensure documentation is readable and consistent by newcomers and experts alike, here are some suggestions on writing style for English:
+- Use gender neutral pronouns (they/their/them) instead of he/she/his/her
+- Avoid qualifiers that minimize the difficulty of a task at hand, e.g. avoid words like “easily”, “simply”, “just”, “merely”, “straightforward”, etc. Readers' expertise may not match your own, and qualifying complexity may deter some readers if the task does not match their level of experience. That being said, if a particular task is difficult or complex, do mention that.
+
+#### Common Wording
+
+Below are some commonly used words you'll want to leverage in your documentation contributions:
+- **AMMOS** - Advanced Multi-Mission Operations System tool set. AMMOS is also the eponymous organization that sponsors this repository.
+- **Docker** - Containerization service used to perform automated build, release and deployment.
+- **GitHub** - one word, and capitalization of the 'G' and the 'H'
+- **GitHub Actions** - Continuous Integration (CI) services that facilitate build automation
+
+#### Inline Code Documentation
+
+For language-specific guidance on code documentation, including style guides, see [Google's list of language style guides](https://google.github.io/styleguide/) for a variety of languages.
+
+Additionally, take a look at Google's recommendations on [inline code documentation](https://google.github.io/styleguide/docguide/best_practices.html#documentation-is-the-story-of-your-code) for best practices.
+
+#### Media
+
+Media, such as images, videos, sound files, etc., are an excellent way to explain documentation to a wider audience more easily. Include media in your contributions as often as possible.
+
+When including media into our version-control system, it is recommended to use formats such as:
+- Diagrams: [Mermaid](https://mermaid-js.github.io/mermaid/#/) format
+- Images: JPEG format
+- Videos: H264 MPEG format
+- Sounds: MP3 format
+
+
+### ❓ Questions
+
+Answering questions is an excellent way to learn more about our project, as well as get better known in our project community.
+
+Here are just a few ways you can help answer questions for our project:
+- Answer open questions in our [discussion forum](https://github.com/NASA-AMMOS/common-workflow-service/discussions)
+- Answer open questions mentioned in our [issue tracking system](https://github.com/NASA-AMMOS/common-workflow-service/issues)
+
+
+When answering questions, keep the following in mind:
+- Be polite and friendly. See our [Code of Conduct](CODE_OF_CONDUCT.md) recommendations as you interact with others in the team.
+- Repeat the specific question you are answering, followed by your suggestion.
+- If suggesting code, repeat the line of code that needs to be altered, followed by your alteration
+- Include any post-steps or checks to verify your answer can be reproduced
+
+### 🎨 Design
+
+Design files can help to guide new features and new areas of expansion for our project. We welcome these kinds of contributions.
+
+Here are just a few ways you can help provide design recommendations for our project:
+- Create visual mockups or diagrams to increase usability of our project applications. This can apply to user interfaces, documentation structuring, or even code architecture diagrams.
+- Conduct user research to understand user needs better. Save your findings within spreadsheets that the project team / contributors can review.
+- Create art, such as logos or icons, to support the user experience for the project
+
+Each of the above can be contributed directly to repository code, and you should use our [development process](#our-development-process) to contribute your additions.
+
+### 🎟️ Meetups
+
+A great way to contribute towards our project goals is to socialize and encourage people to meet and learn more about each other. Consider ideas like:
+- Propose workshops or meetups regarding some topic within our project
+- Help point project contributors and community members to conferences and publications where they may socialize their unique innovations
+- Schedule in-person or virtual happy-hours to help create a more social atmosphere within the project community
+
+For the above ideas, use our [communication channels](#communication-channels) to propose get-togethers.
-TODO
\ No newline at end of file
diff --git a/LICENSE.txt b/LICENSE
similarity index 100%
rename from LICENSE.txt
rename to LICENSE
diff --git a/README.md b/README.md
index 7ea9dde6..8e81e1f9 100644
--- a/README.md
+++ b/README.md
@@ -17,6 +17,12 @@ See the [wiki](https://github.com/NASA-AMMOS/common-workflow-service/wiki) for m
## Prerequisites
+- [**Java 17 JDK**](https://formulae.brew.sh/formula/openjdk@17): CWS only runs on JDK 17. (NOTE: Cannot use JRE)
+ - For Homebrew users:
+ - Install OpenJDK 17 using: `brew install openjdk@17`
+ - Check the exact version installed using `/usr/libexec/java_home -V`
+ - Add to your Shell startup (e.g. .zprofile): `export JAVA_HOME=$(/usr/libexec/java_home -v X.X.X)`
+ - Replace the X.X.X version above with the OpenJDK 17 output from the `/usr/libexec/java_home -V` command.
- [**Maven**](https://maven.apache.org/download.cgi): Used to dynamically download libraries and other required project dependencies.
- For Home-brew users:
- Install Maven using: `brew install maven`
@@ -31,19 +37,17 @@ See the [wiki](https://github.com/NASA-AMMOS/common-workflow-service/wiki) for m
- A database for CWS to use. `cws_dev` is a good default name.
- A database user with full access to the above database.
- [**ITerm2**](https://iterm2.com/): Currently these build scripts include commands to open new terminal windows using ITerm2, so they are best run from that terminal.
-- **Logstash 8.8.0+**: Download Logstash for your platform. Uncompress it (only if it is a .tar.gz) and then ZIP back it up with the filename 'logstash-8.8.0.zip' and place in `install/logging/`. This is a temporary workaround while we clean up our installation process. You can find the zip download [here](https://www.elastic.co/downloads/logstash).
-- **Elasticsearch 8.8.0+**: CWS requires an externally-configured elasticsearch cluster to be set up. You can use an SSL Secure Elasticsearch with or without authentication, or an Insecure HTTP Elasticsearch.
+- **Logstash 8.12.0+**: Download Logstash for your platform. Uncompress it (only if it is a .tar.gz) and then ZIP back it up with the filename 'logstash-8.12.0.zip' and place in `install/logging/`. This is a temporary workaround while we clean up our installation process. You can find the zip download [here](https://www.elastic.co/downloads/logstash).
+- **Elasticsearch 8.12.0+**: CWS requires an externally-configured elasticsearch cluster to be set up. You can use an SSL Secure Elasticsearch with or without authentication, or an Insecure HTTP Elasticsearch.
- The "Elasticsearch Setup" instruction below provides a contained Dockerized way of running Elasticsearch. This serves as an alternative to installing Elasticsearch.
-- Tomcat **keystore and truststore files** (needed for CWS web console to work properly):
+- Tomcat **keystore, truststore, storepass files** (needed for CWS web console to work properly). To generate an open-source **.keystore** and **cws_truststore.jks** use the script `./generate-certs.sh` [here](https://github.com/NASA-AMMOS/common-workflow-service/tree/develop/cws-certs)
- You will need to add your own Tomcat keystore file to this path: `install/.keystore`
- You will need to add your own truststore file to this path: `install/tomcat_lib/cws_truststore.jks`
- See: https://tomcat.apache.org/tomcat-9.0-doc/ssl-howto.html
- - **Java 11 JDK**: CWS only runs on JDK 11 now, but planning for JDK 17 soon.
- - For Homebrew users:
- - Install OpenJDK 11 using: `brew install openjdk@11`
- - Check the exact version installed using `/usr/libexec/java_home -V`
- - Add to your Shell startup (e.g. .zprofile): `export JAVA_HOME=$(/usr/libexec/java_home -v X.X.X)`
- - Replace the X.X.X version above with the OpenJDK 11 output from the `/usr/libexec/java_home -V` command.
+- **Store Your Keystore Password**: You will need to add your own creds file, which carries the keystore password, to this path: `~/.cws/creds`
+ - Set the permissions for the **~/.cws/** directory and **creds** file as Owner-Only.
+ - **~/.cws/** directory: `chmod 700 ~/.cws/`
+ - **~/.cws/creds** file: `chmod 600 ~/.cws/creds`
### **Development Environment Configuration**
@@ -180,6 +184,8 @@ Start `test.sh` script by running:
This will produce jacoco reports with code coverage measurements.
+## [Adaptation Setup Guide](cws-adaptation/README.md)
+
# Contributing
Please see our [contribution guidelines](https://github.com/NASA-AMMOS/common-workflow-service/blob/main/CONTRIBUTING.md).
diff --git a/ci/ci.sh b/ci/ci.sh
index de585416..297156a1 100755
--- a/ci/ci.sh
+++ b/ci/ci.sh
@@ -36,26 +36,26 @@ function worker_conf_data() {
INSTALL_TYPE=${1}
if [[ "${INSTALL_TYPE}" == "worker1" ]]; then
- sed -i 's/__WORKER_TYPE__/run_all/' ${ROOT}/ci_worker.conf
- sed -i 's/__CWS_WEB_PORT__/37080/' ${ROOT}/ci_worker.conf
- sed -i 's/__CWS_SSL_PORT__/37443/' ${ROOT}/ci_worker.conf
- sed -i 's/__CWS_AJP_PORT__/37009/' ${ROOT}/ci_worker.conf
- sed -i 's/__CWS_SHUTDOWN_PORT__/37005/' ${ROOT}/ci_worker.conf
- sed -i 's/__CWS_JMX_PORT__/31098/' ${ROOT}/ci_worker.conf
+ sed -i '' -e 's/__WORKER_TYPE__/run_all/' ${ROOT}/ci_worker.conf
+ sed -i '' -e 's/__CWS_WEB_PORT__/37080/' ${ROOT}/ci_worker.conf
+ sed -i '' -e 's/__CWS_SSL_PORT__/37443/' ${ROOT}/ci_worker.conf
+ sed -i '' -e 's/__CWS_AJP_PORT__/37009/' ${ROOT}/ci_worker.conf
+ sed -i '' -e 's/__CWS_SHUTDOWN_PORT__/37005/' ${ROOT}/ci_worker.conf
+ sed -i '' -e 's/__CWS_JMX_PORT__/31098/' ${ROOT}/ci_worker.conf
elif [[ "${INSTALL_TYPE}" == "worker2" ]]; then
- sed -i 's/__WORKER_TYPE__/run_models_only/' ${ROOT}/ci_worker.conf
- sed -i 's/__CWS_WEB_PORT__/36080/' ${ROOT}/ci_worker.conf
- sed -i 's/__CWS_SSL_PORT__/36443/' ${ROOT}/ci_worker.conf
- sed -i 's/__CWS_AJP_PORT__/36009/' ${ROOT}/ci_worker.conf
- sed -i 's/__CWS_SHUTDOWN_PORT__/36005/' ${ROOT}/ci_worker.conf
- sed -i 's/__CWS_JMX_PORT__/31097/' ${ROOT}/ci_worker.conf
+ sed -i '' -e 's/__WORKER_TYPE__/run_models_only/' ${ROOT}/ci_worker.conf
+ sed -i '' -e 's/__CWS_WEB_PORT__/36080/' ${ROOT}/ci_worker.conf
+ sed -i '' -e 's/__CWS_SSL_PORT__/36443/' ${ROOT}/ci_worker.conf
+ sed -i '' -e 's/__CWS_AJP_PORT__/36009/' ${ROOT}/ci_worker.conf
+ sed -i '' -e 's/__CWS_SHUTDOWN_PORT__/36005/' ${ROOT}/ci_worker.conf
+ sed -i '' -e 's/__CWS_JMX_PORT__/31097/' ${ROOT}/ci_worker.conf
elif [[ "${INSTALL_TYPE}" == "worker3" ]]; then
- sed -i 's/__WORKER_TYPE__/run_external_tasks_only/' ${ROOT}/ci_worker.conf
- sed -i 's/__CWS_WEB_PORT__/33080/' ${ROOT}/ci_worker.conf
- sed -i 's/__CWS_SSL_PORT__/33443/' ${ROOT}/ci_worker.conf
- sed -i 's/__CWS_AJP_PORT__/33009/' ${ROOT}/ci_worker.conf
- sed -i 's/__CWS_SHUTDOWN_PORT__/33005/' ${ROOT}/ci_worker.conf
- sed -i 's/__CWS_JMX_PORT__/31096/' ${ROOT}/ci_worker.conf
+ sed -i '' -e 's/__WORKER_TYPE__/run_external_tasks_only/' ${ROOT}/ci_worker.conf
+ sed -i '' -e 's/__CWS_WEB_PORT__/33080/' ${ROOT}/ci_worker.conf
+ sed -i '' -e 's/__CWS_SSL_PORT__/33443/' ${ROOT}/ci_worker.conf
+ sed -i '' -e 's/__CWS_AJP_PORT__/33009/' ${ROOT}/ci_worker.conf
+ sed -i '' -e 's/__CWS_SHUTDOWN_PORT__/33005/' ${ROOT}/ci_worker.conf
+ sed -i '' -e 's/__CWS_JMX_PORT__/31096/' ${ROOT}/ci_worker.conf
else
print "ERROR: UNEXPECTED INSTALL TYPE VALUE: '${INSTALL_TYPE}'"
exit 1;
@@ -123,9 +123,6 @@ default_cws_auth_scheme=CAMUNDA
default_history_level=full
default_shutdown_port=38005
metrics_publishing_interval=10
-camunda_version=${CAMUNDA_VER}
-java_version=${JAVA_HOME_VERSION}
-java_home=${JAVA_HOME}
EOF
@@ -184,9 +181,6 @@ aws_cloudwatch_endpoint=monitoring.us-west-1.amazonaws.com
default_history_level=full
default_shutdown_port=38005
metrics_publishing_interval=10
-camunda_version=${CAMUNDA_VER}
-java_version=${JAVA_HOME_VERSION}
-java_home=${JAVA_HOME}
EOF
diff --git a/create_server_dist.sh b/create_server_dist.sh
index 7312733c..6c5f2f89 100755
--- a/create_server_dist.sh
+++ b/create_server_dist.sh
@@ -69,6 +69,7 @@ cp ${INSTALL_DIR}/tomcat_lib/css-jaas.cfg ${CONFIG_TEMPLATES
cp ${INSTALL_DIR}/tomcat_bin/setenv.sh ${CONFIG_TEMPLATES_DIR}/tomcat_bin
cp ${INSTALL_DIR}/tomcat_conf/bpm-platform.xml ${CONFIG_TEMPLATES_DIR}/tomcat_conf
cp ${INSTALL_DIR}/tomcat_conf/server.xml ${CONFIG_TEMPLATES_DIR}/tomcat_conf
+cp ${INSTALL_DIR}/tomcat_conf/server_adaptation.xml ${CONFIG_TEMPLATES_DIR}/tomcat_conf
cp ${INSTALL_DIR}/tomcat_conf/web.xml ${CONFIG_TEMPLATES_DIR}/tomcat_conf
cp ${INSTALL_DIR}/tomcat_conf/ldap_plugin_bean.xml ${CONFIG_TEMPLATES_DIR}/tomcat_conf
cp ${INSTALL_DIR}/tomcat_conf/ldap_plugin_ref.xml ${CONFIG_TEMPLATES_DIR}/tomcat_conf
@@ -186,6 +187,17 @@ awk 'NR==FNR { a[n++]=$0; next }
cp ${INSTALL_DIR}/sql/core.afterstartup.sql.template ${CWS}/sql/cws/core.afterstartup.sql
+if [[ -f ${INSTALL_DIR}/sql/adaptation.sql.template && -f ${INSTALL_DIR}/sql/adaptation_core.sql.template && -f ${INSTALL_DIR}/sql/adaptation_external.sql.template ]]; then
+ print "Building adaptation (external) sql..."
+ awk 'NR==FNR { a[n++]=$0; next }
+ /__CUSTOM_METHODS_JAVA__/ { for (i=0;i ${CWS}/sql/cws/adaptation.sql
+ awk 'NR==FNR { a[n++]=$0; next }
+ /__CUSTOM_METHODS_JAVA__/ { for (i=0;i ${CWS}/sql/cws/adaptation_core.sql
+ awk 'NR==FNR { a[n++]=$0; next }
+ /__CUSTOM_METHODS_JAVA__/ { for (i=0;i ${CWS}/sql/cws/adaptation_external.sql
+fi
+
+
rm ${DIST}/snippets.java
rm ${DIST}/snippets.java.bak
diff --git a/cws-adaptation-engine/pom.xml b/cws-adaptation-engine/pom.xml
index 1d7f6203..1dc22c83 100644
--- a/cws-adaptation-engine/pom.xml
+++ b/cws-adaptation-engine/pom.xml
@@ -3,7 +3,7 @@
gov.nasa.jpl.ammos.ids.cws
common-workflow-service
- 2.5.0
+ 2.6.0-pre.1
cws-adaptation-engine
diff --git a/cws-adaptation/README.md b/cws-adaptation/README.md
new file mode 100644
index 00000000..3ee90353
--- /dev/null
+++ b/cws-adaptation/README.md
@@ -0,0 +1,54 @@
+## Adaptation Setup Guide
+
+CWS can be adapted and tailored for a mission. This can be done by modifying certain resources and source code of CWS-CORE.
+
+Create new functionalities by adding:
+
+* External Database Config
+* Custom Java code
+* Custom Rest Service API
+* Custom Initiators
+* etc...
+
+### Adaptation Database
+
+Adaptation Database feature lets you connect to a external database separate from that of the main `cws_dev` database.
+
+**(1)** You must first include the following SQL Template files to the `install/sql/` directory:
+* `install/sql/adaptation.sql.template` **(Core Database: `cws_dev`)**
+* `install/sql/adaptation_core.sql.template` **(Core Database: `cws_dev`)**
+* `install/sql/adaptation_external.sql.template` **(Adaptation Database: `cws_external_db`)**
+
+**(2)** Create your schema/tables within the added Adaptation SQL Template files.
+* Example (`adaptation_external.sql.template`):
+```
+CREATE TABLE IF NOT EXISTS `cws_external_table` (
+ ...
+ ...
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+```
+
+**(3)** Write Custom Java Code.
+
+By referencing your adaptation tables, you can connect and communicate with your external database.
+
+Write Java custom code that extends from DbService and use the `jdbcTemplate` or `jdbcAdaptationTemplate` JDBC source to query the core and external databases.
+```
+jdbcAdaptationTemplate (adaptation external database)
+jdbcTemplate (core database)
+```
+
+### Adaptation Workers Modal
+
+Custom your Deployment page Workers view with add-ons and filters.
+
+The UI for the Worker listview is customizable with through the javascript `addAdaptationWorkersInfo` function.
+
+File: `cws-ui/src/main/webapp/js/adaptation-workers-modal.js`
+
+Write your custom code here:
+```
+function addAdaptationWorkersInfo(dataProcKey, listWorkers) {
+ return;
+}
+```
\ No newline at end of file
diff --git a/cws-adaptation/pom.xml b/cws-adaptation/pom.xml
index a6249342..15881661 100644
--- a/cws-adaptation/pom.xml
+++ b/cws-adaptation/pom.xml
@@ -3,7 +3,7 @@
gov.nasa.jpl.ammos.ids.cws
common-workflow-service
- 2.5.0
+ 2.6.0-pre.1
cws-adaptation
diff --git a/cws-core/pom.xml b/cws-core/pom.xml
index f24f422a..ba2d75e1 100644
--- a/cws-core/pom.xml
+++ b/cws-core/pom.xml
@@ -3,7 +3,7 @@
gov.nasa.jpl.ammos.ids.cws
common-workflow-service
- 2.5.0
+ 2.6.0-pre.1
cws-core
diff --git a/cws-core/src/main/java/jpl/cws/core/db/DbService.java b/cws-core/src/main/java/jpl/cws/core/db/DbService.java
index 5366bd04..59842a0a 100644
--- a/cws-core/src/main/java/jpl/cws/core/db/DbService.java
+++ b/cws-core/src/main/java/jpl/cws/core/db/DbService.java
@@ -9,6 +9,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
@@ -22,9 +23,15 @@
public class DbService {
private static final Logger log = LoggerFactory.getLogger(DbService.class);
- @Autowired protected JdbcTemplate jdbcTemplate;
- @Autowired protected NamedParameterJdbcTemplate namedJdbcTemplate;
-
+ @Autowired
+ protected JdbcTemplate jdbcTemplate;
+
+ @Autowired
+ protected NamedParameterJdbcTemplate namedJdbcTemplate;
+
+ @Autowired
+ protected JdbcTemplate jdbcAdaptationTemplate;
+
protected static final long SLOW_WARN_THRESHOLD = 100;
protected static final int IN_CLAUSE_MAX_ELEMENTS = 100;
diff --git a/cws-core/src/main/java/jpl/cws/core/db/SchedulerDbService.java b/cws-core/src/main/java/jpl/cws/core/db/SchedulerDbService.java
index 83d015bd..7dd9c353 100644
--- a/cws-core/src/main/java/jpl/cws/core/db/SchedulerDbService.java
+++ b/cws-core/src/main/java/jpl/cws/core/db/SchedulerDbService.java
@@ -398,6 +398,13 @@ public int getCountForClaimedProcInstPerKey(String procDefKey, List clai
return jdbcTemplate.queryForObject(query, Integer.class);
}
+ public List> getProcDefKeyLatestCompleteInst(String procDefKey) {
+ return jdbcTemplate.queryForList(
+ "SELECT proc_inst_id, start_time, end_time FROM cws_proc_inst_status WHERE proc_def_key=? AND status='complete' ORDER BY start_time DESC LIMIT 1",
+ new Object[]{procDefKey}
+ );
+ }
+
public String getProcDefKeyFromUuid(String uuid) {
String query = "SELECT proc_def_key FROM cws_sched_worker_proc_inst " + "WHERE uuid='" + uuid + "'";
diff --git a/cws-engine-service/pom.xml b/cws-engine-service/pom.xml
index 315042e5..3bc75c28 100644
--- a/cws-engine-service/pom.xml
+++ b/cws-engine-service/pom.xml
@@ -3,7 +3,7 @@
gov.nasa.jpl.ammos.ids.cws
common-workflow-service
- 2.5.0
+ 2.6.0-pre.1
cws-engine-service
@@ -123,6 +123,19 @@
junit
+
+ org.graalvm.js
+ js
+ 23.0.2
+ runtime
+
+
+ org.graalvm.js
+ js-scriptengine
+ 23.0.2
+ runtime
+
+
org.apache.tomcat
diff --git a/cws-engine-service/src/main/java/jpl/cws/engine/WorkerService.java b/cws-engine-service/src/main/java/jpl/cws/engine/WorkerService.java
index 17e58997..cebb0c1a 100644
--- a/cws-engine-service/src/main/java/jpl/cws/engine/WorkerService.java
+++ b/cws-engine-service/src/main/java/jpl/cws/engine/WorkerService.java
@@ -756,6 +756,13 @@ public List> claimWithCounter(String limitToProcDefKey) {
"(remainders = " + remainders +
", procMaxNumbers = " + workerMaxProcInstances.entrySet() +
", currentCounts = " + currentCounts + ")");
+
+ for (Entry entry : remainders.entrySet()) {
+ List> lastCompleteProcInst = schedulerDbService.getProcDefKeyLatestCompleteInst(entry.getKey().toString());
+ if (lastCompleteProcInst.size() > 0) {
+ log.debug("Last completed process instance for procDefKey '" + entry.getKey().toString() + "': " + lastCompleteProcInst);
+ }
+ }
}
@@ -895,7 +902,8 @@ public boolean syncCounters(String reason) {
public void setJobExecutorMaxPoolSize(Integer executorServiceMaxPoolSize, boolean doDbUpdate) {
if (executorServiceMaxPoolSize != null) {
try {
-
+ // we are getting errors if we go beyond 10?
+ executorServiceMaxPoolSize = Math.min(10, executorServiceMaxPoolSize);
// Log information about JMX remote interface
if (System.getProperty("com.sun.management.jmxremote") == null) {
log.warn("JMX remote appears to be disabled");
diff --git a/cws-engine/pom.xml b/cws-engine/pom.xml
index 612377a9..8a55fe72 100644
--- a/cws-engine/pom.xml
+++ b/cws-engine/pom.xml
@@ -4,7 +4,7 @@
gov.nasa.jpl.ammos.ids.cws
common-workflow-service
- 2.5.0
+ 2.6.0-pre.1
cws-engine
@@ -24,6 +24,18 @@
gov.nasa.jpl.ammos.ids.cws
cws-adaptation-engine
+
+ org.graalvm.js
+ js
+ 23.0.2
+ runtime
+
+
+ org.graalvm.js
+ js-scriptengine
+ 23.0.2
+ runtime
+
diff --git a/cws-installer/pom.xml b/cws-installer/pom.xml
index 332f7883..545c6caf 100644
--- a/cws-installer/pom.xml
+++ b/cws-installer/pom.xml
@@ -3,7 +3,7 @@
gov.nasa.jpl.ammos.ids.cws
common-workflow-service
- 2.5.0
+ 2.6.0-pre.1
cws-installer
diff --git a/cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java b/cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java
index 9cbd3fbd..560bd241 100755
--- a/cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java
+++ b/cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java
@@ -42,6 +42,9 @@
import org.w3c.dom.*;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
+import java.io.FileInputStream;
+import java.util.Enumeration;
+import java.io.IOException;
import java.io.BufferedReader;
import java.io.File;
@@ -49,6 +52,9 @@
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.Math;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+import java.util.*;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.sql.Connection;
@@ -65,8 +71,14 @@
import java.util.TimeZone;
import javax.naming.AuthenticationNotSupportedException;
import javax.naming.AuthenticationException;
-import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
+import java.security.cert.Certificate;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
+import java.security.KeyStore;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.UnrecoverableEntryException;
import javax.tools.ToolProvider;
@@ -155,6 +167,16 @@ public class CwsInstaller {
private static String cws_db_username;
private static String cws_db_password;
+ private static String cws_adapt_use_shared_db;
+ private static String cws_adapt_db_type;
+ private static String cws_adapt_db_host;
+ private static String cws_adapt_db_port;
+ private static String cws_adapt_db_name;
+ private static String cws_adapt_db_url;
+ private static String cws_adapt_db_driver;
+ private static String cws_adapt_db_username;
+ private static String cws_adapt_db_password;
+
private static String cws_auth_scheme;
private static String cws_user;
private static String cws_user_firstname;
@@ -167,6 +189,8 @@ public class CwsInstaller {
private static String cws_shutdown_port;
private static String cws_tomcat_ajp_port;
+ private static String cws_keystore_storepass;
+
private static String cws_smtp_hostname;
private static String cws_smtp_port;
@@ -212,11 +236,6 @@ public class CwsInstaller {
private static String aws_sqs_dispatcher_sqsUrl;
private static String aws_sqs_dispatcher_msgFetchLimit;
- private static String camunda_version;
-
- private static String java_version;
- private static String java_home = System.getenv("JAVA_HOME");
-
private static Boolean reconfigure = false;
@@ -258,6 +277,7 @@ public static void main(String args[]) {
setupNotificationEmails();
setupTokenExpirationHours();
setupPorts();
+ getKeystorePassword();
setupTaskAssigmentEmails();
setupSMTP();
setupElasticsearch();
@@ -349,9 +369,6 @@ private static void init() {
ldap_identity_plugin_class = getPreset(LDAP_IDENTITY_PLUGIN_CLASS);
ldap_security_filter_class = getPreset(LDAP_SECURITY_FILTER_CLASS);
camunda_security_filter_class = getPreset(CAMUNDA_SECURITY_FILTER_CLASS);
- camunda_version = getPreset("camunda_version");
-
- java_version = getPreset("java_version");
}
private static void exit(int status) {
@@ -1056,6 +1073,41 @@ private static void setupLimitToRemoveAbandonedWorkersByDays() {
}
+ private static void getKeystorePassword() {
+ cws_keystore_storepass = getPreset("cws_keystore_storepass");
+
+ if (cws_keystore_storepass == null) {
+ Path filePath;
+ filePath = Paths.get("~/.cws/creds");
+ String storepassFilePath = filePath.toString();
+ storepassFilePath = storepassFilePath.replaceFirst("^~", System.getProperty("user.home"));
+ File storepassReadFile = new File(storepassFilePath);
+ boolean fileExists = storepassReadFile.exists();
+
+ if (fileExists == true) {
+ if (!storepassReadFile.canRead()) {
+ print("ERROR: creds in path '" + "~/.cws/creds" + "' is NOT readable by system user.");
+ print(" ");
+ print("WARNING: Read and fulfill the Keystore/Truststore prerequisites before continuing installation: ");
+ print(" https://github.com/NASA-AMMOS/common-workflow-service?tab=readme-ov-file#prerequisites");
+ exit(1);
+ }
+ } else {
+ print("ERROR: creds does NOT exist in path '" + "~/.cws/creds" + "' ");
+ print(" ");
+ print("WARNING: Make sure to place creds in the correct path and satisfy the following Keystore/Truststore prerequisites: ");
+ print(" https://github.com/NASA-AMMOS/common-workflow-service?tab=readme-ov-file#prerequisites");
+ exit(1);
+ }
+
+ try {
+ cws_keystore_storepass = Files.readString(Paths.get(storepassFilePath)).trim();
+ } catch (IOException e) {
+ log.error("Read-in Keystore Storepass ERROR: " + e.getMessage());
+ }
+ }
+ }
+
private static void setupPorts() {
// PROMPT USER FOR CWS WEB PORT
cws_tomcat_connector_port = getPreset("cws_web_port");
@@ -1667,6 +1719,34 @@ private static void showInstallationInfo() {
print("Database User = " + cws_db_username);
print("Database Password = ****** (hidden) ");
print("....................................................................................");
+
+ cws_adapt_use_shared_db = getPreset("adaptation_use_shared_db");
+ cws_adapt_db_type = getPreset("adaptation_db_type");
+ cws_adapt_db_host = getPreset("adaptation_db_host");
+ cws_adapt_db_port = getPreset("adaptation_db_port");
+ cws_adapt_db_name = getPreset("adaptation_db_name");
+ cws_adapt_db_username = getPreset("adaptation_db_username");
+ cws_adapt_db_password = getPreset("adaptation_db_password");
+ cws_adapt_db_url = "jdbc:" + cws_adapt_db_type + "://" + cws_adapt_db_host + ":" + cws_adapt_db_port + "/" + cws_adapt_db_name + "?autoReconnect=true";
+
+ if (cws_adapt_use_shared_db != null) {
+ if (cws_adapt_use_shared_db.equalsIgnoreCase("y")) {
+
+ if (cws_adapt_db_type.equals("mariadb")) {
+ cws_adapt_db_driver = "org.mariadb.jdbc.Driver";
+ } else if (cws_adapt_db_type.equals("mysql")) {
+ cws_adapt_db_driver = "com.mysql.jdbc.Driver";
+ }
+ print(" CWS Adapt Database ");
+ print(" Database Type = " + cws_adapt_db_type);
+ print(" Database URL = " + cws_adapt_db_url);
+ print(" Database Driver = " + cws_adapt_db_driver);
+ print(" Database User = " + cws_adapt_db_username);
+ print(" Database Password = ****** (hidden) ");
+ print("....................................................................................");
+ }
+ }
+
if (cws_auth_scheme.equals("LDAP")) {
print("LDAP User = " + cws_user);
}
@@ -1678,6 +1758,7 @@ private static void showInstallationInfo() {
print("Admin Last Name = " + cws_user_lastname);
print("Admin Email = " + cws_user_email);
}
+ print("....................................................................................");
print("CWS web port = " + cws_tomcat_connector_port);
print("CWS SSL port = " + cws_tomcat_ssl_port);
print("CWS AJP port = " + cws_tomcat_ajp_port);
@@ -1774,6 +1855,9 @@ private static void validateConfig() {
// Check that user provided Elasticsearch service is up and healthy
warningCount += validateElasticsearch();
+ // Check that keystore and truststore is valid, not expired
+ warningCount += validateKeystoreTruststore();
+
if (installWorker && !installConsole) {
// Validate the AMQ host/port for worker only installations.
warningCount += validateAmqConfig();
@@ -2379,6 +2463,54 @@ private static int validateElasticsearch() {
}
}
+ /**
+ * Validates the .keystore file in tomcat_lab. Checks for correct file name and expiration
+ */
+ private static int validateKeystoreTruststore() {
+ print("checking that user provided valid .keystore file and certificate chain...");
+ Path filePath;
+ filePath = Paths.get(cws_tomcat_conf + SEP + ".keystore");
+ String keystoreFilePath = filePath.toString();
+ long ONE_DAY_MS = 24 * 60 * 60 * 1000; // 24 hours or 1 day
+ try {
+ KeyStore ks = KeyStore.getInstance("JKS");
+ ks.load(new FileInputStream(keystoreFilePath), cws_keystore_storepass.toCharArray());
+ Enumeration aliases = ks.aliases();
+ while(aliases.hasMoreElements()) {
+ String keystoreRoot = (String) aliases.nextElement();
+ Date expirationDate = ((X509Certificate) ks.getCertificate(keystoreRoot)).getNotAfter();
+ Date currentTime = new Date();
+ long daysInterval = expirationDate.getTime() - currentTime.getTime();
+ long numDays = daysInterval / (ONE_DAY_MS);
+ if (numDays <= 0) {
+ print(" [WARNING]");
+ print(" The Certificate Chain in Keystore '" + keystoreFilePath + "' is expired. ");
+ print(" Expiration Date: " + expirationDate);
+ print("");
+ return 1;
+ } else if (numDays > 0 && numDays < 90) {
+ print(" [OK]");
+ print(" NOTICE: Make sure to renew the certificates within the .keystore certificate chain soon.");
+ print(" Certificate(s): '" + keystoreFilePath + "' ");
+ print(" Expiration Date: " + expirationDate);
+ print(" Days Until expiration: " + numDays + " days");
+ print("");
+ return 0;
+ }
+ }
+ } catch (Exception e) {
+ print(" [WARNING]");
+ print(" The path '" + cws_tomcat_conf + SEP + "' ");
+ print(" may NOT contain .keystore file OR holds a keystore that is mismatched with password in '~/.cws/creds' or cws_keystore_storepass configuration.");
+ print("");
+ log.error("Keystore Storepass ERROR: " + e.getMessage());
+ return 1;
+ }
+ print(" [OK]");
+ print("");
+ return 0; // no warnings
+ }
+
/**
* Validates that some sort of time syncing service
* such as NTP or chrony is running on this installation machine.
@@ -2486,6 +2618,8 @@ private static void createFreshWorkDir() {
Paths.get(config_work_dir + SEP + "tomcat_conf" + SEP + "bpm-platform.xml"));
copy(Paths.get( config_templates_dir + SEP + "tomcat_conf" + SEP + "server.xml"),
Paths.get(config_work_dir + SEP + "tomcat_conf" + SEP + "server.xml"));
+ copy(Paths.get( config_templates_dir + SEP + "tomcat_conf" + SEP + "server_adaptation.xml"),
+ Paths.get(config_work_dir + SEP + "tomcat_conf" + SEP + "server_adaptation.xml"));
copy(Paths.get( config_templates_dir + SEP + "tomcat_conf" + SEP + "web.xml"),
Paths.get(config_work_dir + SEP + "tomcat_conf" + SEP + "web.xml"));
copy(Paths.get( config_templates_dir + SEP + "engine-rest_mods" + SEP + "web.xml"),
@@ -2554,6 +2688,29 @@ private static void updateFiles() throws IOException {
content = content.replace("__CWS_DB_DRIVER__", cws_db_driver);
content = content.replace("__CWS_DB_USERNAME__", cws_db_username);
content = content.replace("__CWS_DB_PASSWORD__", cws_db_password);
+
+ writeToFile(filePath, content);
+ copy(
+ Paths.get(config_work_dir + SEP + "tomcat_conf" + SEP + "server_adaptation.xml"),
+ Paths.get(cws_tomcat_root + SEP + "conf" + SEP + "server_adaptation.xml"));
+ if (cws_adapt_db_url != null && cws_adapt_db_driver != null &&
+ cws_adapt_db_username != null && cws_adapt_db_password != null) {
+
+ // Fill in the __ADAPTATION_SERVER_RESOURCE__
+ String serverAdaptationContent = getFileContents(
+ Paths.get(config_work_dir + SEP + "tomcat_conf" + SEP + "server_adaptation.xml"));
+ content = content.replace(" ");
+ content = content.replace("__CWS_ADAPTATION_BEAN__", "\n" +
+ "\t\t\n" +
+ "\t ");
+ } else {
+ content = content.replace("__CWS_ADAPTATION_JNDI__", "");
+ content = content.replace("__CWS_ADAPTATION_BEAN__", "");
+ }
+
content = content.replace("__CWS_DB_DRIVER__", cws_db_driver);
content = content.replace("__CWS_DB_URL__", cws_db_url);
content = content.replace("__CWS_DB_USERNAME__", cws_db_username);
@@ -2850,10 +3018,6 @@ private static void updateCwsUiProperties() throws IOException {
content = content.replace("__AWS_SQS_DISPATCHER_MSG_FETCH_LIMIT__", aws_sqs_dispatcher_msgFetchLimit);
}
- content = content.replace("__CWS_CAMUNDA_VERSION__", camunda_version);
- content = content.replace("__CWS_JAVA_VERSION__", java_version);
- content = content.replace("__CWS_JAVA_HOME__", java_home);
-
writeToFile(filePath, content);
copy(
Paths.get(config_work_dir + SEP + "cws-ui" + SEP + "cws-ui.properties"),
@@ -2865,6 +3029,18 @@ private static void updateCwsUiConfig() throws IOException {
print(" Updating cws-ui/applicationContext.xml...");
Path path = Paths.get(config_work_dir + SEP + "cws-ui" + SEP + "applicationContext.xml");
String content = getFileContents(path);
+
+ if (cws_adapt_db_url != null && cws_adapt_db_driver != null &&
+ cws_adapt_db_username != null && cws_adapt_db_password != null) {
+ content = content.replace("__CWS_ADAPTATION_JNDI__", " ");
+ content = content.replace("__CWS_ADAPTATION_BEAN__", "\n" +
+ "\t\t\n" +
+ "\t ");
+ } else {
+ content = content.replace("__CWS_ADAPTATION_JNDI__", "");
+ content = content.replace("__CWS_ADAPTATION_BEAN__", "");
+ }
+
content = content.replace("__CWS_DB_DRIVER__", cws_db_driver);
content = content.replace("__CWS_DB_URL__", cws_db_url);
content = content.replace("__CWS_DB_USERNAME__", cws_db_username);
@@ -3261,4 +3437,4 @@ private static void setPreset(String key, String value) {
}
}
-}
\ No newline at end of file
+}
diff --git a/cws-service/pom.xml b/cws-service/pom.xml
index 49d4311b..e2310289 100644
--- a/cws-service/pom.xml
+++ b/cws-service/pom.xml
@@ -4,7 +4,7 @@
gov.nasa.jpl.ammos.ids.cws
common-workflow-service
- 2.5.0
+ 2.6.0-pre.1
cws-service
diff --git a/cws-service/src/main/java/jpl/cws/controller/MvcCore.java b/cws-service/src/main/java/jpl/cws/controller/MvcCore.java
index 0c246098..fa2bd808 100755
--- a/cws-service/src/main/java/jpl/cws/controller/MvcCore.java
+++ b/cws-service/src/main/java/jpl/cws/controller/MvcCore.java
@@ -40,11 +40,6 @@ public class MvcCore {
@Value("${cws.history.days.to.live}") private String historyDaysToLive;
@Value("${cws.history.level}") private String historyLevel;
- @Value("${cws.camunda.version}") private String camundaVersion;
-
- @Value("${cws.java.home}") private String javaHome;
- @Value("${cws.java.version}") private String javaVersion;
-
public MvcCore() {}
protected ModelAndView buildModel(String page, String message) {
@@ -188,11 +183,9 @@ protected ModelAndView buildConfigurationModel(String message) {
model.addObject("tomcatWebapps", tomcatWebapps);
model.addObject("historyDaysToLive", historyDaysToLive);
model.addObject("historyLevel", historyLevel);
-
- model.addObject("camundaVersion", camundaVersion);
-
- model.addObject("javaHome", javaHome);
- model.addObject("javaVersion", javaVersion);
+ model.addObject("javaHome", System.getenv("JAVA_HOME"));
+ model.addObject("javaVersion", Runtime.version().toString());
+ model.addObject("camundaVersion", System.getenv("CAMUNDA_VER"));
DiskUsage diskUsage = cwsConsoleService.getDiskUsage();
diff --git a/cws-service/src/main/java/jpl/cws/scheduler/Scheduler.java b/cws-service/src/main/java/jpl/cws/scheduler/Scheduler.java
index 83bd9e15..f43e8745 100644
--- a/cws-service/src/main/java/jpl/cws/scheduler/Scheduler.java
+++ b/cws-service/src/main/java/jpl/cws/scheduler/Scheduler.java
@@ -3,9 +3,7 @@
import static jpl.cws.core.db.SchedulerDbService.FAILED_TO_SCHEDULE;
import static jpl.cws.core.db.SchedulerDbService.PENDING;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
+import java.io.*;
import java.net.URLDecoder;
import java.sql.Timestamp;
import java.util.HashMap;
@@ -129,8 +127,8 @@ public SchedulerJob scheduleProcess(String procDefKey,
String procBusinessKey, String initiationKey,
int priority) throws Exception {
- log.trace("Scheduling process definition '" + procDefKey + "' ...");
- log.trace(" with variables=" + processVariables);
+ log.info("Scheduling process definition '" + procDefKey + "' ...");
+ log.info(" with variables=" + processVariables);
String schedulerJobUuid = null;
boolean rowCreated = false;
diff --git a/cws-tasks/pom.xml b/cws-tasks/pom.xml
index 5a575d95..af11cd5a 100644
--- a/cws-tasks/pom.xml
+++ b/cws-tasks/pom.xml
@@ -4,7 +4,7 @@
gov.nasa.jpl.ammos.ids.cws
common-workflow-service
- 2.5.0
+ 2.6.0-pre.1
cws-tasks
diff --git a/cws-tasks/src/main/java/jpl/cws/task/CwsTask.java b/cws-tasks/src/main/java/jpl/cws/task/CwsTask.java
index f76473d6..a1f343b5 100644
--- a/cws-tasks/src/main/java/jpl/cws/task/CwsTask.java
+++ b/cws-tasks/src/main/java/jpl/cws/task/CwsTask.java
@@ -15,7 +15,7 @@
/**
* Abstract base class for all CWS built-in (and custom user-added) task
* implementations.
- *
+ *
*/
public abstract class CwsTask implements JavaDelegate {
@@ -55,32 +55,32 @@ public CwsTask() {
* 1) initializes parameters
* 2) runs the task implementation
* 3) throws any qualified exceptions
- *
+ *
*/
public void execute(final DelegateExecution execution) {
this.execution = execution;
-
+
// setup tags on logging
log.setProcTags(getProcDefKey(execution),
- execution.getProcessInstanceId(),
+ execution.getProcessInstanceId(),
execution.getActivityInstanceId());
-
+
try {
// setup base params
throwOnTruncatedVariableBoolean = getBooleanParam(
throwOnTruncatedVariable, "throwOnTruncatedVariable",
DEFAULT_THROW_ON_TRUNCATED_VARIABLE);
-
+
// Evaluate preCondition.
// If preCondition passes, then execute task,
// otherwise skip task execution.
if (evaluateTaskPreCondition()) {
setOutputVariable("preConditionPassed", true);
-
+
// get params
log.trace("INITIALIZING PARAMETERS FOR TASK: " + this);
initParams();
-
+
// execute the task
log.trace("EXECUTING TASK: " + this);
executeTask();
@@ -91,17 +91,17 @@ public void execute(final DelegateExecution execution) {
} catch (BpmnError e) {
log.warn("Propagating BpmnError(" + e.getErrorCode() + ")...");
setOutputVariable("bpmnErrorMessage", e.getErrorCode());
-
+
// We saw an error, but we want to check with Camunda because this is by-passing our end-event listener
notifyWorkerOfFailedProcess();
-
+
throw e; // propagate so engine can handle (if boundary catch defined)
} catch (Throwable t) {
log.error("Unexpected Throwable while executing " + this, t);
setOutputVariable("unexpectedErrorMessage", t.getMessage());
-
+
notifyWorkerOfFailedProcess();
-
+
// wrap and propagate so engine can (if boundary catch defined) handle
throw new BpmnError(UNEXPECTED_ERROR);
} finally {
@@ -109,7 +109,7 @@ public void execute(final DelegateExecution execution) {
this.execution = null;
}
}
-
+
private void notifyWorkerOfFailedProcess() {
log.debug("notifying workers of failed process...");
@@ -128,8 +128,8 @@ public void run() {
}
}).start();
}
-
-
+
+
private String getProcDefKey(final DelegateExecution execution) {
String procDefKey = "UNKNOWN";
@@ -159,34 +159,34 @@ private String getProcDefKey(final DelegateExecution execution) {
/**
* Implementation must be filled out by subclasses.
- *
+ *
*/
protected abstract void initParams() throws Exception;
/**
* Implementation must be filled out by subclasses.
- *
+ *
*/
protected abstract void executeTask() throws Exception;
/**
* Evaluates the task preCondition.
- *
+ *
* @return true if preCondition passes false if preCondition fails
- *
+ *
* @throws Exception if unexpected exception occurs
* @throws BpmnError if process is to be determined.
*/
private boolean evaluateTaskPreCondition() throws Exception {
-
+
if (!getBooleanParam(preCondition, "preCondition",
DEFAULT_PRE_CONDITION)) {
-
+
// Check special case for preCondition is "none" and pass as true
if (preCondition != null && preCondition.getValue(execution).equals("none")) {
return true;
}
-
+
log.warn("preCondition was not satisfied");
PreConditionFailBehavior failBehavior = PreConditionFailBehavior
.valueOf(getStringParam(onPreConditionFail,
@@ -269,7 +269,7 @@ protected String getStringParam(Expression expression, String paramName)
}
protected String getStringParam(Expression expression, String paramName,
- String defaultValue) throws Exception {
+ String defaultValue) throws Exception {
if (expression == null) {
// return default
return defaultValue;
@@ -292,7 +292,7 @@ protected Boolean getBooleanParam(Expression expression, String paramName)
}
protected Boolean getBooleanParam(Expression expression, String paramName,
- Boolean defaultValue) throws Exception {
+ Boolean defaultValue) throws Exception {
if (expression == null) {
// return default
return defaultValue;
@@ -322,7 +322,7 @@ protected Integer getIntegerParam(Expression expression, String paramName)
}
protected Integer getIntegerParam(Expression expression, String paramName,
- Integer defaultValue) throws Exception {
+ Integer defaultValue) throws Exception {
if (expression == null) {
// return default
return defaultValue;
@@ -352,7 +352,7 @@ protected Long getLongParam(Expression expression, String paramName)
}
protected Long getLongParam(Expression expression, String paramName,
- Long defaultValue) throws Exception {
+ Long defaultValue) throws Exception {
if (expression == null) {
// return default
return defaultValue;
@@ -384,7 +384,7 @@ protected Float getFloatParam(Expression expression, String paramName)
}
protected Float getFloatParam(Expression expression, String paramName,
- Float defaultValue) throws Exception {
+ Float defaultValue) throws Exception {
if (expression == null) {
// return default
return defaultValue;
@@ -414,7 +414,7 @@ protected Double getDoubleParam(Expression expression, String paramName)
}
protected Double getDoubleParam(Expression expression, String paramName,
- Double defaultValue) throws Exception {
+ Double defaultValue) throws Exception {
if (expression == null) {
// return default
return defaultValue;
@@ -437,10 +437,10 @@ private Double getDoubleValue(Object value, String paramName)
/**
* For now only supports Map but may want to support
* generics/others in future...
- *
+ *
*/
protected Map getMapParam(Expression expression,
- String paramName) throws Exception {
+ String paramName) throws Exception {
if (expression == null) {
// no default, so throw exception
throw new Exception("Mandatory parameter '" + paramName + "' not specified");
@@ -449,7 +449,7 @@ protected Map getMapParam(Expression expression,
}
protected Map getMapParam(Expression expression,
- String paramName, Map defaultValue)
+ String paramName, Map defaultValue)
throws Exception {
if (expression == null) {
// return default
@@ -482,4 +482,4 @@ private Map getMapValue(Object value, String paramName)
}
}
-}
+}
\ No newline at end of file
diff --git a/cws-test/pom.xml b/cws-test/pom.xml
index 4c388439..6f189183 100644
--- a/cws-test/pom.xml
+++ b/cws-test/pom.xml
@@ -3,7 +3,7 @@
gov.nasa.jpl.ammos.ids.cws
common-workflow-service
- 2.5.0
+ 2.6.0-pre.1
cws-test
diff --git a/cws-test/src/test/java/jpl/cws/test/WebTestUtil.java b/cws-test/src/test/java/jpl/cws/test/WebTestUtil.java
index f0b2330b..fa227def 100644
--- a/cws-test/src/test/java/jpl/cws/test/WebTestUtil.java
+++ b/cws-test/src/test/java/jpl/cws/test/WebTestUtil.java
@@ -28,6 +28,10 @@
import org.apache.commons.io.FileUtils;
+import org.openqa.selenium.JavascriptExecutor;
+import org.openqa.selenium.Point;
+
+
/**
*
@@ -289,20 +293,46 @@ public void startProcDef(String procDef, String procName, long procTime) {
public void enableWorkers(String procDef) {
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(30));
- TakesScreenshot screenshot = (TakesScreenshot)driver;
+ // wait.until(ExpectedConditions.elementToBeClickable(By.id("pv-"+procDef)));
+ sleep(5000);
+ WebElement enable = findElById("pv-"+procDef);
+ String elementHTML = enable.getAttribute("outerHTML");
+
+ JavascriptExecutor js = (JavascriptExecutor) driver;
+ js.executeScript("arguments[0].scrollIntoViewIfNeeded();", enable);
+
+ TakesScreenshot screenshot = (TakesScreenshot)driver;
//Saving the screenshot in desired location
File source = screenshot.getScreenshotAs(OutputType.FILE);
//Path to the location to save screenshot
- try{FileUtils.copyFile(source, new File("/tmp/Screen.png"));}
+ try{FileUtils.copyFile(source, new File("/tmp/Before-"+procDef+".png"));}
+
+catch(IOException e) {
+ e.printStackTrace();
+}
+ System.out.println("Src attribute is: "+ elementHTML);
+ sleep(5000);
+
+ // Point point = enable.getLocation();
+ // int xCoord = point.getX();
+ // int yCoord = point.getY();
+ // js.executeScript("arguments[0].scroll(arguments[1], arguments[2]);", enable, xCoord, yCoord - 50);
+ // sleep(5000);
+
+
+File source2 = screenshot.getScreenshotAs(OutputType.FILE);
+ try{FileUtils.copyFile(source2, new File("/tmp/After-"+procDef+".png"));}
catch(IOException e) {
e.printStackTrace();
}
- wait.until(ExpectedConditions.elementToBeClickable(By.id("pv-"+procDef)));
- WebElement enable = findElById("pv-"+procDef);
enable.click();
sleep(1000);
+
+
+
+
WebElement allWorkers = findElById("all-workers");
WebElement allWorkersDone = findElById("done-workers-btn");
log.info("Enabling workers.");
@@ -325,6 +355,11 @@ public void disableWorkers(String procDef) {
wait.until(ExpectedConditions.elementToBeClickable(By.id("pv-"+procDef)));
WebElement enable = findElById("pv-"+procDef);
+
+ JavascriptExecutor js = (JavascriptExecutor) driver;
+ js.executeScript("arguments[0].scrollIntoViewIfNeeded();", enable);
+ sleep(1000);
+
enable.click();
sleep(1000);
@@ -460,8 +495,25 @@ public void deleteProc(String procName) {
if(driver.getPageSource().contains(procName)) {
disableWorkers(procName);
- wait.until(ExpectedConditions.elementToBeClickable(By.id("delete-"+procName)));
WebElement delButton = driver.findElement(By.id("delete-"+procName));
+ JavascriptExecutor js = (JavascriptExecutor) driver;
+ js.executeScript("arguments[0].scrollIntoViewIfNeeded();", delButton);
+
+
+ TakesScreenshot screenshot = (TakesScreenshot)driver;
+ //Saving the screenshot in desired location
+ File source = screenshot.getScreenshotAs(OutputType.FILE);
+ //Path to the location to save screenshot
+ try{FileUtils.copyFile(source, new File("/tmp/Before-"+procName+".png"));}
+
+catch(IOException e) {
+ e.printStackTrace();
+}
+
+ String elementHTML = delButton.getAttribute("outerHTML");
+ System.out.println("Src attribute is: "+ elementHTML);
+
+
delButton.click();
waitForElementID("delete-proc-def");
diff --git a/cws-test/src/test/resources/configure_with_jacoco.sh b/cws-test/src/test/resources/configure_with_jacoco.sh
index 1f6c8156..e62af2a5 100755
--- a/cws-test/src/test/resources/configure_with_jacoco.sh
+++ b/cws-test/src/test/resources/configure_with_jacoco.sh
@@ -48,13 +48,13 @@ else
exit 1
fi
-if [[ "$java_version" > "11" && "$java_version" < "12" ]]; then
- echo " Java version == 11x [OK]"
+if [[ "$java_version" > "17" && "$java_version" < "18" ]]; then
+ echo " Java version == 17x [OK]"
else
echo " +-------+----------------------------------------------------"
echo " | ERROR | "
echo " +-------+ "
- echo " | Java version is less than 11. Must run with Java 11x "
+ echo " | Java version is not 17. Must run with Java 17x "
echo " | Aborting program... "
echo "--------------------------------------------------------------"
exit 1
@@ -264,7 +264,7 @@ rm -f ${ROOT}/config/my.cnf
sleep 1
if [ "$RECONFIGURE" = true ]; then
- ${JAVA_HOME}/bin/java -classpath "./installer/*" -javaagent:./server/apache-tomcat-${TOMCAT_VER}/lib/org.jacoco.agent-0.8.2-runtime.jar=destfile=./installer-jacoco.exec,append=false jpl.cws.task.CwsInstaller --reconfigure
+ ${JAVA_HOME}/bin/java -classpath "./installer/*" -javaagent:./server/apache-tomcat-${TOMCAT_VER}/lib/org.jacoco.agent-0.8.7-runtime.jar=destfile=./installer-jacoco.exec,append=false jpl.cws.task.CwsInstaller --reconfigure
else
- ${JAVA_HOME}/bin/java -classpath "./installer/*" -javaagent:./server/apache-tomcat-${TOMCAT_VER}/lib/org.jacoco.agent-0.8.2-runtime.jar=destfile=./installer-jacoco.exec,append=false jpl.cws.task.CwsInstaller
+ ${JAVA_HOME}/bin/java -classpath "./installer/*" -javaagent:./server/apache-tomcat-${TOMCAT_VER}/lib/org.jacoco.agent-0.8.7-runtime.jar=destfile=./installer-jacoco.exec,append=false jpl.cws.task.CwsInstaller
fi
diff --git a/cws-ui/pom.xml b/cws-ui/pom.xml
index 18693985..b986c342 100644
--- a/cws-ui/pom.xml
+++ b/cws-ui/pom.xml
@@ -5,7 +5,7 @@
gov.nasa.jpl.ammos.ids.cws
common-workflow-service
- 2.5.0
+ 2.6.0-pre.1
cws-ui
diff --git a/cws-ui/src/main/webapp/WEB-INF/springmvc-servlet.xml b/cws-ui/src/main/webapp/WEB-INF/springmvc-servlet.xml
index 2cac8eba..c63e7d1e 100644
--- a/cws-ui/src/main/webapp/WEB-INF/springmvc-servlet.xml
+++ b/cws-ui/src/main/webapp/WEB-INF/springmvc-servlet.xml
@@ -15,7 +15,9 @@
-
+
+
+
', i);
+ if (j === -1) {
+ return handleError('unclosed comment');
+ }
+ if (onComment) {
+ onComment(xml.substring(i + 4, j), decodeEntities, getContext);
+ if (parseStop) {
+ return;
+ }
+ }
+ j += 3;
+ continue;
+ }
+ }
+
+ // parse question ... ?>
+ if (w === 63) {
+ // "?"
+ j = xml.indexOf('?>', i);
+ if (j === -1) {
+ return handleError('unclosed question');
+ }
+ if (onQuestion) {
+ onQuestion(xml.substring(i, j + 2), getContext);
+ if (parseStop) {
+ return;
+ }
+ }
+ j += 2;
+ continue;
+ }
+
+ // find matching closing tag for attention or standard tags
+ // for that we must skip through attribute values
+ // (enclosed in single or double quotes)
+ for (x = i + 1;; x++) {
+ v = xml.charCodeAt(x);
+ if (isNaN(v)) {
+ j = -1;
+ return handleError('unclosed tag');
+ }
+
+ // [10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'"
+ // skips the quoted string
+ // (double quotes) does not appear in a literal enclosed by (double quotes)
+ // (single quote) does not appear in a literal enclosed by (single quote)
+ if (v === 34) {
+ // '"'
+ q = xml.indexOf('"', x + 1);
+ x = q !== -1 ? q : x;
+ } else if (v === 39) {
+ // "'"
+ q = xml.indexOf("'", x + 1);
+ x = q !== -1 ? q : x;
+ } else if (v === 62) {
+ // '>'
+ j = x;
+ break;
+ }
+ }
+
+ // parse attention
+ // previously comment and CDATA have already been parsed
+ if (w === 33) {
+ // "!"
+
+ if (onAttention) {
+ onAttention(xml.substring(i, j + 1), decodeEntities, getContext);
+ if (parseStop) {
+ return;
+ }
+ }
+ j += 1;
+ continue;
+ }
+
+ // don't process attributes;
+ // there are none
+ cachedAttrs = {};
+
+ // if (xml.charCodeAt(i+1) === 47) { // close tag match
+ x = elementName = nodeStack.pop();
+ q = i + 2 + x.length;
+ if (xml.substring(i + 2, q) !== x) {
+ return handleError('closing tag mismatch');
+ }
+
+ // verify chars in close tag
+ for (; q < j; q++) {
+ w = xml.charCodeAt(q);
+ if (w === 32 || w > 8 && w < 14) {
+ // \f\n\r\t\v space
+ continue;
+ }
+ return handleError('close tag');
+ }
+ } else {
+ if (xml.charCodeAt(j - 1) === 47) {
+ // .../>
+ x = elementName = xml.substring(i + 1, j - 1);
+ tagStart = true;
+ tagEnd = true;
+ } else {
+ x = elementName = xml.substring(i + 1, j);
+ tagStart = true;
+ tagEnd = false;
+ }
+ if (!(w > 96 && w < 123 || w > 64 && w < 91 || w === 95 || w === 58)) {
+ // char 95"_" 58":"
+ return handleError('illegal first char nodeName');
+ }
+ for (q = 1, y = x.length; q < y; q++) {
+ w = x.charCodeAt(q);
+ if (w > 96 && w < 123 || w > 64 && w < 91 || w > 47 && w < 59 || w === 45 || w === 95 || w == 46) {
+ continue;
+ }
+ if (w === 32 || w < 14 && w > 8) {
+ // \f\n\r\t\v space
+ elementName = x.substring(0, q);
+
+ // maybe there are attributes
+ cachedAttrs = null;
+ break;
+ }
+ return handleError('invalid nodeName');
+ }
+ if (!tagEnd) {
+ nodeStack.push(elementName);
+ }
+ }
+ if (isNamespace) {
+ _nsMatrix = nsMatrix;
+ if (tagStart) {
+ // remember old namespace
+ // unless we're self-closing
+ if (!tagEnd) {
+ nsMatrixStack.push(_nsMatrix);
+ }
+ if (cachedAttrs === null) {
+ // quick check, whether there may be namespace
+ // declarations on the node; if that is the case
+ // we need to eagerly parse the node attributes
+ if (maybeNS = x.indexOf('xmlns', q) !== -1) {
+ attrsStart = q;
+ attrsString = x;
+ getAttrs();
+ maybeNS = false;
+ }
+ }
+ }
+ _elementName = elementName;
+ w = elementName.indexOf(':');
+ if (w !== -1) {
+ xmlns = nsMatrix[elementName.substring(0, w)];
+
+ // prefix given; namespace must exist
+ if (!xmlns) {
+ return handleError('missing namespace on <' + _elementName + '>');
+ }
+ elementName = elementName.substr(w + 1);
+ } else {
+ xmlns = nsMatrix['xmlns'];
+
+ // if no default namespace is defined,
+ // we'll import the element as anonymous.
+ //
+ // it is up to users to correct that to the document defined
+ // targetNamespace, or whatever their undersanding of the
+ // XML spec mandates.
+ }
+
+ // adjust namespace prefixs as configured
+ if (xmlns) {
+ elementName = xmlns + ':' + elementName;
+ }
+ }
+ if (tagStart) {
+ attrsStart = q;
+ attrsString = x;
+ if (onOpenTag) {
+ if (proxy) {
+ onOpenTag(elementProxy, decodeEntities, tagEnd, getContext);
+ } else {
+ onOpenTag(elementName, getAttrs, decodeEntities, tagEnd, getContext);
+ }
+ if (parseStop) {
+ return;
+ }
+ }
+ }
+ if (tagEnd) {
+ if (onCloseTag) {
+ onCloseTag(proxy ? elementProxy : elementName, decodeEntities, tagStart, getContext);
+ if (parseStop) {
+ return;
+ }
+ }
+
+ // restore old namespace
+ if (isNamespace) {
+ if (!tagStart) {
+ nsMatrix = nsMatrixStack.pop();
+ } else {
+ nsMatrix = _nsMatrix;
+ }
+ }
+ }
+ j += 1;
+ }
+ } /** end parse */
+}
+
+function hasLowerCaseAlias(pkg) {
+ return pkg.xml && pkg.xml.tagAlias === 'lowerCase';
+}
+var DEFAULT_NS_MAP = {
+ 'xsi': 'http://www.w3.org/2001/XMLSchema-instance',
+ 'xml': 'http://www.w3.org/XML/1998/namespace'
+};
+var XSI_TYPE = 'xsi:type';
+function serializeFormat(element) {
+ return element.xml && element.xml.serialize;
+}
+function serializeAsType(element) {
+ return serializeFormat(element) === XSI_TYPE;
+}
+function serializeAsProperty(element) {
+ return serializeFormat(element) === 'property';
+}
+function capitalize(str) {
+ return str.charAt(0).toUpperCase() + str.slice(1);
+}
+function aliasToName(aliasNs, pkg) {
+ if (!hasLowerCaseAlias(pkg)) {
+ return aliasNs.name;
+ }
+ return aliasNs.prefix + ':' + capitalize(aliasNs.localName);
+}
+function prefixedToName(nameNs, pkg) {
+ var name = nameNs.name,
+ localName = nameNs.localName;
+ var typePrefix = pkg.xml && pkg.xml.typePrefix;
+ if (typePrefix && localName.indexOf(typePrefix) === 0) {
+ return nameNs.prefix + ':' + localName.slice(typePrefix.length);
+ } else {
+ return name;
+ }
+}
+function normalizeXsiTypeName(name, model) {
+ var nameNs = parseName(name);
+ var pkg = model.getPackage(nameNs.prefix);
+ return prefixedToName(nameNs, pkg);
+}
+function error(message) {
+ return new Error(message);
+}
+
+/**
+ * Get the moddle descriptor for a given instance or type.
+ *
+ * @param {ModdleElement|Function} element
+ *
+ * @return {Object} the moddle descriptor
+ */
+function getModdleDescriptor(element) {
+ return element.$descriptor;
+}
- module.exports.getRoot = getRoot;
+/**
+ * A parse context.
+ *
+ * @class
+ *
+ * @param {Object} options
+ * @param {ElementHandler} options.rootHandler the root handler for parsing a document
+ * @param {boolean} [options.lax=false] whether or not to ignore invalid elements
+ */
+function Context(options) {
+ /**
+ * @property {ElementHandler} rootHandler
+ */
+ /**
+ * @property {Boolean} lax
+ */
- /**
- * filters all elements in the list which have a given type.
- * removes a new list
- */
- function filterElementsByType(objectList, type) {
- var list = objectList || [];
- var result = [];
- forEach(list, function(obj) {
- if (is(obj, type)) {
- result.push(obj);
- }
- });
- return result;
- }
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.assign)(this, options);
+ this.elementsById = {};
+ this.references = [];
+ this.warnings = [];
- module.exports.filterElementsByType = filterElementsByType;
+ /**
+ * Add an unresolved reference.
+ *
+ * @param {Object} reference
+ */
+ this.addReference = function (reference) {
+ this.references.push(reference);
+ };
+ /**
+ * Add a processed element.
+ *
+ * @param {ModdleElement} element
+ */
+ this.addElement = function (element) {
+ if (!element) {
+ throw error('expected element');
+ }
+ var elementsById = this.elementsById;
+ var descriptor = getModdleDescriptor(element);
+ var idProperty = descriptor.idProperty,
+ id;
+ if (idProperty) {
+ id = element.get(idProperty.name);
+ if (id) {
+ // for QName validation as per http://www.w3.org/TR/REC-xml/#NT-NameChar
+ if (!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(id)) {
+ throw new Error('illegal ID <' + id + '>');
+ }
+ if (elementsById[id]) {
+ throw error('duplicate ID <' + id + '>');
+ }
+ elementsById[id] = element;
+ }
+ }
+ };
+
+ /**
+ * Add an import warning.
+ *
+ * @param {Object} warning
+ * @param {String} warning.message
+ * @param {Error} [warning.error]
+ */
+ this.addWarning = function (warning) {
+ this.warnings.push(warning);
+ };
+}
+function BaseHandler() {}
+BaseHandler.prototype.handleEnd = function () {};
+BaseHandler.prototype.handleText = function () {};
+BaseHandler.prototype.handleNode = function () {};
+
+/**
+ * A simple pass through handler that does nothing except for
+ * ignoring all input it receives.
+ *
+ * This is used to ignore unknown elements and
+ * attributes.
+ */
+function NoopHandler() {}
+NoopHandler.prototype = Object.create(BaseHandler.prototype);
+NoopHandler.prototype.handleNode = function () {
+ return this;
+};
+function BodyHandler() {}
+BodyHandler.prototype = Object.create(BaseHandler.prototype);
+BodyHandler.prototype.handleText = function (text) {
+ this.body = (this.body || '') + text;
+};
+function ReferenceHandler(property, context) {
+ this.property = property;
+ this.context = context;
+}
+ReferenceHandler.prototype = Object.create(BodyHandler.prototype);
+ReferenceHandler.prototype.handleNode = function (node) {
+ if (this.element) {
+ throw error('expected no sub nodes');
+ } else {
+ this.element = this.createReference(node);
+ }
+ return this;
+};
+ReferenceHandler.prototype.handleEnd = function () {
+ this.element.id = this.body;
+};
+ReferenceHandler.prototype.createReference = function (node) {
+ return {
+ property: this.property.ns.name,
+ id: ''
+ };
+};
+function ValueHandler(propertyDesc, element) {
+ this.element = element;
+ this.propertyDesc = propertyDesc;
+}
+ValueHandler.prototype = Object.create(BodyHandler.prototype);
+ValueHandler.prototype.handleEnd = function () {
+ var value = this.body || '',
+ element = this.element,
+ propertyDesc = this.propertyDesc;
+ value = coerceType(propertyDesc.type, value);
+ if (propertyDesc.isMany) {
+ element.get(propertyDesc.name).push(value);
+ } else {
+ element.set(propertyDesc.name, value);
+ }
+};
+function BaseElementHandler() {}
+BaseElementHandler.prototype = Object.create(BodyHandler.prototype);
+BaseElementHandler.prototype.handleNode = function (node) {
+ var parser = this,
+ element = this.element;
+ if (!element) {
+ element = this.element = this.createElement(node);
+ this.context.addElement(element);
+ } else {
+ parser = this.handleChild(node);
+ }
+ return parser;
+};
+
+/**
+ * @class Reader.ElementHandler
+ *
+ */
+function ElementHandler(model, typeName, context) {
+ this.model = model;
+ this.type = model.getType(typeName);
+ this.context = context;
+}
+ElementHandler.prototype = Object.create(BaseElementHandler.prototype);
+ElementHandler.prototype.addReference = function (reference) {
+ this.context.addReference(reference);
+};
+ElementHandler.prototype.handleText = function (text) {
+ var element = this.element,
+ descriptor = getModdleDescriptor(element),
+ bodyProperty = descriptor.bodyProperty;
+ if (!bodyProperty) {
+ throw error('unexpected body text <' + text + '>');
+ }
+ BodyHandler.prototype.handleText.call(this, text);
+};
+ElementHandler.prototype.handleEnd = function () {
+ var value = this.body,
+ element = this.element,
+ descriptor = getModdleDescriptor(element),
+ bodyProperty = descriptor.bodyProperty;
+ if (bodyProperty && value !== undefined) {
+ value = coerceType(bodyProperty.type, value);
+ element.set(bodyProperty.name, value);
+ }
+};
+
+/**
+ * Create an instance of the model from the given node.
+ *
+ * @param {Element} node the xml node
+ */
+ElementHandler.prototype.createElement = function (node) {
+ var attributes = node.attributes,
+ Type = this.type,
+ descriptor = getModdleDescriptor(Type),
+ context = this.context,
+ instance = new Type({}),
+ model = this.model,
+ propNameNs;
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.forEach)(attributes, function (value, name) {
+ var prop = descriptor.propertiesByName[name],
+ values;
+ if (prop && prop.isReference) {
+ if (!prop.isMany) {
+ context.addReference({
+ element: instance,
+ property: prop.ns.name,
+ id: value
+ });
+ } else {
+ // IDREFS: parse references as whitespace-separated list
+ values = value.split(' ');
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.forEach)(values, function (v) {
+ context.addReference({
+ element: instance,
+ property: prop.ns.name,
+ id: v
+ });
+ });
+ }
+ } else {
+ if (prop) {
+ value = coerceType(prop.type, value);
+ } else if (name !== 'xmlns') {
+ propNameNs = parseName(name, descriptor.ns.prefix);
+
+ // check whether attribute is defined in a well-known namespace
+ // if that is the case we emit a warning to indicate potential misuse
+ if (model.getPackage(propNameNs.prefix)) {
+ context.addWarning({
+ message: 'unknown attribute <' + name + '>',
+ element: instance,
+ property: name,
+ value: value
+ });
+ }
+ }
+ instance.set(name, value);
+ }
+ });
+ return instance;
+};
+ElementHandler.prototype.getPropertyForNode = function (node) {
+ var name = node.name;
+ var nameNs = parseName(name);
+ var type = this.type,
+ model = this.model,
+ descriptor = getModdleDescriptor(type);
+ var propertyName = nameNs.name,
+ property = descriptor.propertiesByName[propertyName],
+ elementTypeName,
+ elementType;
+
+ // search for properties by name first
+
+ if (property && !property.isAttr) {
+ if (serializeAsType(property)) {
+ elementTypeName = node.attributes[XSI_TYPE];
+
+ // xsi type is optional, if it does not exists the
+ // default type is assumed
+ if (elementTypeName) {
+ // take possible type prefixes from XML
+ // into account, i.e.: xsi:type="t{ActualType}"
+ elementTypeName = normalizeXsiTypeName(elementTypeName, model);
+ elementType = model.getType(elementTypeName);
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.assign)({}, property, {
+ effectiveType: getModdleDescriptor(elementType).name
+ });
+ }
+ }
+
+ // search for properties by name first
+ return property;
+ }
+ var pkg = model.getPackage(nameNs.prefix);
+ if (pkg) {
+ elementTypeName = aliasToName(nameNs, pkg);
+ elementType = model.getType(elementTypeName);
+
+ // search for collection members later
+ property = (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.find)(descriptor.properties, function (p) {
+ return !p.isVirtual && !p.isReference && !p.isAttribute && elementType.hasType(p.type);
+ });
+ if (property) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.assign)({}, property, {
+ effectiveType: getModdleDescriptor(elementType).name
+ });
+ }
+ } else {
+ // parse unknown element (maybe extension)
+ property = (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.find)(descriptor.properties, function (p) {
+ return !p.isReference && !p.isAttribute && p.type === 'Element';
+ });
+ if (property) {
+ return property;
+ }
+ }
+ throw error('unrecognized element <' + nameNs.name + '>');
+};
+ElementHandler.prototype.toString = function () {
+ return 'ElementDescriptor[' + getModdleDescriptor(this.type).name + ']';
+};
+ElementHandler.prototype.valueHandler = function (propertyDesc, element) {
+ return new ValueHandler(propertyDesc, element);
+};
+ElementHandler.prototype.referenceHandler = function (propertyDesc) {
+ return new ReferenceHandler(propertyDesc, this.context);
+};
+ElementHandler.prototype.handler = function (type) {
+ if (type === 'Element') {
+ return new GenericElementHandler(this.model, type, this.context);
+ } else {
+ return new ElementHandler(this.model, type, this.context);
+ }
+};
+
+/**
+ * Handle the child element parsing
+ *
+ * @param {Element} node the xml node
+ */
+ElementHandler.prototype.handleChild = function (node) {
+ var propertyDesc, type, element, childHandler;
+ propertyDesc = this.getPropertyForNode(node);
+ element = this.element;
+ type = propertyDesc.effectiveType || propertyDesc.type;
+ if (isSimple(type)) {
+ return this.valueHandler(propertyDesc, element);
+ }
+ if (propertyDesc.isReference) {
+ childHandler = this.referenceHandler(propertyDesc).handleNode(node);
+ } else {
+ childHandler = this.handler(type).handleNode(node);
+ }
+ var newElement = childHandler.element;
+
+ // child handles may decide to skip elements
+ // by not returning anything
+ if (newElement !== undefined) {
+ if (propertyDesc.isMany) {
+ element.get(propertyDesc.name).push(newElement);
+ } else {
+ element.set(propertyDesc.name, newElement);
+ }
+ if (propertyDesc.isReference) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.assign)(newElement, {
+ element: element
+ });
+ this.context.addReference(newElement);
+ } else {
+ // establish child -> parent relationship
+ newElement.$parent = element;
+ }
+ }
+ return childHandler;
+};
+
+/**
+ * An element handler that performs special validation
+ * to ensure the node it gets initialized with matches
+ * the handlers type (namespace wise).
+ *
+ * @param {Moddle} model
+ * @param {String} typeName
+ * @param {Context} context
+ */
+function RootElementHandler(model, typeName, context) {
+ ElementHandler.call(this, model, typeName, context);
+}
+RootElementHandler.prototype = Object.create(ElementHandler.prototype);
+RootElementHandler.prototype.createElement = function (node) {
+ var name = node.name,
+ nameNs = parseName(name),
+ model = this.model,
+ type = this.type,
+ pkg = model.getPackage(nameNs.prefix),
+ typeName = pkg && aliasToName(nameNs, pkg) || name;
+
+ // verify the correct namespace if we parse
+ // the first element in the handler tree
+ //
+ // this ensures we don't mistakenly import wrong namespace elements
+ if (!type.hasType(typeName)) {
+ throw error('unexpected element <' + node.originalName + '>');
+ }
+ return ElementHandler.prototype.createElement.call(this, node);
+};
+function GenericElementHandler(model, typeName, context) {
+ this.model = model;
+ this.context = context;
+}
+GenericElementHandler.prototype = Object.create(BaseElementHandler.prototype);
+GenericElementHandler.prototype.createElement = function (node) {
+ var name = node.name,
+ ns = parseName(name),
+ prefix = ns.prefix,
+ uri = node.ns[prefix + '$uri'],
+ attributes = node.attributes;
+ return this.model.createAny(name, uri, attributes);
+};
+GenericElementHandler.prototype.handleChild = function (node) {
+ var handler = new GenericElementHandler(this.model, 'Element', this.context).handleNode(node),
+ element = this.element;
+ var newElement = handler.element,
+ children;
+ if (newElement !== undefined) {
+ children = element.$children = element.$children || [];
+ children.push(newElement);
+
+ // establish child -> parent relationship
+ newElement.$parent = element;
+ }
+ return handler;
+};
+GenericElementHandler.prototype.handleEnd = function () {
+ if (this.body) {
+ this.element.$body = this.body;
+ }
+};
+
+/**
+ * A reader for a meta-model
+ *
+ * @param {Object} options
+ * @param {Model} options.model used to read xml files
+ * @param {Boolean} options.lax whether to make parse errors warnings
+ */
+function Reader(options) {
+ if (options instanceof Moddle) {
+ options = {
+ model: options
+ };
+ }
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.assign)(this, {
+ lax: false
+ }, options);
+}
+
+/**
+ * The fromXML result.
+ *
+ * @typedef {Object} ParseResult
+ *
+ * @property {ModdleElement} rootElement
+ * @property {Array} references
+ * @property {Array} warnings
+ * @property {Object} elementsById - a mapping containing each ID -> ModdleElement
+ */
- function findRootElementsByType(businessObject, referencedType) {
- var root = getRoot(businessObject);
+/**
+ * The fromXML result.
+ *
+ * @typedef {Error} ParseError
+ *
+ * @property {Array} warnings
+ */
- return filterElementsByType(root.rootElements, referencedType);
- }
+/**
+ * Parse the given XML into a moddle document tree.
+ *
+ * @param {String} xml
+ * @param {ElementHandler|Object} options or rootHandler
+ *
+ * @returns {Promise}
+ */
+Reader.prototype.fromXML = function (xml, options, done) {
+ var rootHandler = options.rootHandler;
+ if (options instanceof ElementHandler) {
+ // root handler passed via (xml, { rootHandler: ElementHandler }, ...)
+ rootHandler = options;
+ options = {};
+ } else {
+ if (typeof options === 'string') {
+ // rootHandler passed via (xml, 'someString', ...)
+ rootHandler = this.handler(options);
+ options = {};
+ } else if (typeof rootHandler === 'string') {
+ // rootHandler passed via (xml, { rootHandler: 'someString' }, ...)
+ rootHandler = this.handler(rootHandler);
+ }
+ }
+ var model = this.model,
+ lax = this.lax;
+ var context = new Context((0,min_dash__WEBPACK_IMPORTED_MODULE_13__.assign)({}, options, {
+ rootHandler: rootHandler
+ })),
+ parser = new Parser({
+ proxy: true
+ }),
+ stack = createStack();
+ rootHandler.context = context;
+
+ // push root handler
+ stack.push(rootHandler);
+
+ /**
+ * Handle error.
+ *
+ * @param {Error} err
+ * @param {Function} getContext
+ * @param {boolean} lax
+ *
+ * @return {boolean} true if handled
+ */
+ function handleError(err, getContext, lax) {
+ var ctx = getContext();
+ var line = ctx.line,
+ column = ctx.column,
+ data = ctx.data;
+
+ // we receive the full context data here,
+ // for elements trim down the information
+ // to the tag name, only
+ if (data.charAt(0) === '<' && data.indexOf(' ') !== -1) {
+ data = data.slice(0, data.indexOf(' ')) + '>';
+ }
+ var message = 'unparsable content ' + (data ? data + ' ' : '') + 'detected\n\t' + 'line: ' + line + '\n\t' + 'column: ' + column + '\n\t' + 'nested error: ' + err.message;
+ if (lax) {
+ context.addWarning({
+ message: message,
+ error: err
+ });
+ return true;
+ } else {
+ throw error(message);
+ }
+ }
+ function handleWarning(err, getContext) {
+ // just like handling errors in mode
+ return handleError(err, getContext, true);
+ }
+
+ /**
+ * Resolve collected references on parse end.
+ */
+ function resolveReferences() {
+ var elementsById = context.elementsById;
+ var references = context.references;
+ var i, r;
+ for (i = 0; r = references[i]; i++) {
+ var element = r.element;
+ var reference = elementsById[r.id];
+ var property = getModdleDescriptor(element).propertiesByName[r.property];
+ if (!reference) {
+ context.addWarning({
+ message: 'unresolved reference <' + r.id + '>',
+ element: r.element,
+ property: r.property,
+ value: r.id
+ });
+ }
+ if (property.isMany) {
+ var collection = element.get(property.name),
+ idx = collection.indexOf(r);
+
+ // we replace an existing place holder (idx != -1) or
+ // append to the collection instead
+ if (idx === -1) {
+ idx = collection.length;
+ }
+ if (!reference) {
+ // remove unresolvable reference
+ collection.splice(idx, 1);
+ } else {
+ // add or update reference in collection
+ collection[idx] = reference;
+ }
+ } else {
+ element.set(property.name, reference);
+ }
+ }
+ }
+ function handleClose() {
+ stack.pop().handleEnd();
+ }
+ var PREAMBLE_START_PATTERN = /^<\?xml /i;
+ var ENCODING_PATTERN = / encoding="([^"]+)"/i;
+ var UTF_8_PATTERN = /^utf-8$/i;
+ function handleQuestion(question) {
+ if (!PREAMBLE_START_PATTERN.test(question)) {
+ return;
+ }
+ var match = ENCODING_PATTERN.exec(question);
+ var encoding = match && match[1];
+ if (!encoding || UTF_8_PATTERN.test(encoding)) {
+ return;
+ }
+ context.addWarning({
+ message: 'unsupported document encoding <' + encoding + '>, ' + 'falling back to UTF-8'
+ });
+ }
+ function handleOpen(node, getContext) {
+ var handler = stack.peek();
+ try {
+ stack.push(handler.handleNode(node));
+ } catch (err) {
+ if (handleError(err, getContext, lax)) {
+ stack.push(new NoopHandler());
+ }
+ }
+ }
+ function handleCData(text, getContext) {
+ try {
+ stack.peek().handleText(text);
+ } catch (err) {
+ handleWarning(err, getContext);
+ }
+ }
+ function handleText(text, getContext) {
+ // strip whitespace only nodes, i.e. before
+ // sections and in between tags
+
+ if (!text.trim()) {
+ return;
+ }
+ handleCData(text, getContext);
+ }
+ var uriMap = model.getPackages().reduce(function (uriMap, p) {
+ uriMap[p.uri] = p.prefix;
+ return uriMap;
+ }, {
+ 'http://www.w3.org/XML/1998/namespace': 'xml' // add default xml ns
+ });
+ parser.ns(uriMap).on('openTag', function (obj, decodeStr, selfClosing, getContext) {
+ // gracefully handle unparsable attributes (attrs=false)
+ var attrs = obj.attrs || {};
+ var decodedAttrs = Object.keys(attrs).reduce(function (d, key) {
+ var value = decodeStr(attrs[key]);
+ d[key] = value;
+ return d;
+ }, {});
+ var node = {
+ name: obj.name,
+ originalName: obj.originalName,
+ attributes: decodedAttrs,
+ ns: obj.ns
+ };
+ handleOpen(node, getContext);
+ }).on('question', handleQuestion).on('closeTag', handleClose).on('cdata', handleCData).on('text', function (text, decodeEntities, getContext) {
+ handleText(decodeEntities(text), getContext);
+ }).on('error', handleError).on('warn', handleWarning);
+
+ // async XML parsing to make sure the execution environment
+ // (node or brower) is kept responsive and that certain optimization
+ // strategies can kick in.
+ return new Promise(function (resolve, reject) {
+ var err;
+ try {
+ parser.parse(xml);
+ resolveReferences();
+ } catch (e) {
+ err = e;
+ }
+ var rootElement = rootHandler.element;
+ if (!err && !rootElement) {
+ err = error('failed to parse document as <' + rootHandler.type.$descriptor.name + '>');
+ }
+ var warnings = context.warnings;
+ var references = context.references;
+ var elementsById = context.elementsById;
+ if (err) {
+ err.warnings = warnings;
+ return reject(err);
+ } else {
+ return resolve({
+ rootElement: rootElement,
+ elementsById: elementsById,
+ references: references,
+ warnings: warnings
+ });
+ }
+ });
+};
+Reader.prototype.handler = function (name) {
+ return new RootElementHandler(this.model, name);
+};
+
+// helpers //////////////////////////
+
+function createStack() {
+ var stack = [];
+ Object.defineProperty(stack, 'peek', {
+ value: function () {
+ return this[this.length - 1];
+ }
+ });
+ return stack;
+}
+var XML_PREAMBLE = '\n';
+var ESCAPE_ATTR_CHARS = /<|>|'|"|&|\n\r|\n/g;
+var ESCAPE_CHARS = /<|>|&/g;
+function Namespaces(parent) {
+ var prefixMap = {};
+ var uriMap = {};
+ var used = {};
+ var wellknown = [];
+ var custom = [];
+
+ // API
+
+ this.byUri = function (uri) {
+ return uriMap[uri] || parent && parent.byUri(uri);
+ };
+ this.add = function (ns, isWellknown) {
+ uriMap[ns.uri] = ns;
+ if (isWellknown) {
+ wellknown.push(ns);
+ } else {
+ custom.push(ns);
+ }
+ this.mapPrefix(ns.prefix, ns.uri);
+ };
+ this.uriByPrefix = function (prefix) {
+ return prefixMap[prefix || 'xmlns'];
+ };
+ this.mapPrefix = function (prefix, uri) {
+ prefixMap[prefix || 'xmlns'] = uri;
+ };
+ this.getNSKey = function (ns) {
+ return ns.prefix !== undefined ? ns.uri + '|' + ns.prefix : ns.uri;
+ };
+ this.logUsed = function (ns) {
+ var uri = ns.uri;
+ var nsKey = this.getNSKey(ns);
+ used[nsKey] = this.byUri(uri);
+
+ // Inform parent recursively about the usage of this NS
+ if (parent) {
+ parent.logUsed(ns);
+ }
+ };
+ this.getUsed = function (ns) {
+ function isUsed(ns) {
+ var nsKey = self.getNSKey(ns);
+ return used[nsKey];
+ }
+ var self = this;
+ var allNs = [].concat(wellknown, custom);
+ return allNs.filter(isUsed);
+ };
+}
+function lower(string) {
+ return string.charAt(0).toLowerCase() + string.slice(1);
+}
+function nameToAlias(name, pkg) {
+ if (hasLowerCaseAlias(pkg)) {
+ return lower(name);
+ } else {
+ return name;
+ }
+}
+function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor;
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+}
+function nsName(ns) {
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_13__.isString)(ns)) {
+ return ns;
+ } else {
+ return (ns.prefix ? ns.prefix + ':' : '') + ns.localName;
+ }
+}
+function getNsAttrs(namespaces) {
+ return namespaces.getUsed().filter(function (ns) {
+ // do not serialize built in namespace
+ return ns.prefix !== 'xml';
+ }).map(function (ns) {
+ var name = 'xmlns' + (ns.prefix ? ':' + ns.prefix : '');
+ return {
+ name: name,
+ value: ns.uri
+ };
+ });
+}
+function getElementNs(ns, descriptor) {
+ if (descriptor.isGeneric) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.assign)({
+ localName: descriptor.ns.localName
+ }, ns);
+ } else {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.assign)({
+ localName: nameToAlias(descriptor.ns.localName, descriptor.$pkg)
+ }, ns);
+ }
+}
+function getPropertyNs(ns, descriptor) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.assign)({
+ localName: descriptor.ns.localName
+ }, ns);
+}
+function getSerializableProperties(element) {
+ var descriptor = element.$descriptor;
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.filter)(descriptor.properties, function (p) {
+ var name = p.name;
+ if (p.isVirtual) {
+ return false;
+ }
+
+ // do not serialize defaults
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_13__.has)(element, name)) {
+ return false;
+ }
+ var value = element[name];
+
+ // do not serialize default equals
+ if (value === p.default) {
+ return false;
+ }
+
+ // do not serialize null properties
+ if (value === null) {
+ return false;
+ }
+ return p.isMany ? value.length : true;
+ });
+}
+var ESCAPE_ATTR_MAP = {
+ '\n': '#10',
+ '\n\r': '#10',
+ '"': '#34',
+ '\'': '#39',
+ '<': '#60',
+ '>': '#62',
+ '&': '#38'
+};
+var ESCAPE_MAP = {
+ '<': 'lt',
+ '>': 'gt',
+ '&': 'amp'
+};
+function escape(str, charPattern, replaceMap) {
+ // ensure we are handling strings here
+ str = (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.isString)(str) ? str : '' + str;
+ return str.replace(charPattern, function (s) {
+ return '&' + replaceMap[s] + ';';
+ });
+}
+
+/**
+ * Escape a string attribute to not contain any bad values (line breaks, '"', ...)
+ *
+ * @param {String} str the string to escape
+ * @return {String} the escaped string
+ */
+function escapeAttr(str) {
+ return escape(str, ESCAPE_ATTR_CHARS, ESCAPE_ATTR_MAP);
+}
+function escapeBody(str) {
+ return escape(str, ESCAPE_CHARS, ESCAPE_MAP);
+}
+function filterAttributes(props) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.filter)(props, function (p) {
+ return p.isAttr;
+ });
+}
+function filterContained(props) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.filter)(props, function (p) {
+ return !p.isAttr;
+ });
+}
+function ReferenceSerializer(tagName) {
+ this.tagName = tagName;
+}
+ReferenceSerializer.prototype.build = function (element) {
+ this.element = element;
+ return this;
+};
+ReferenceSerializer.prototype.serializeTo = function (writer) {
+ writer.appendIndent().append('<' + this.tagName + '>' + this.element.id + '' + this.tagName + '>').appendNewLine();
+};
+function BodySerializer() {}
+BodySerializer.prototype.serializeValue = BodySerializer.prototype.serializeTo = function (writer) {
+ writer.append(this.escape ? escapeBody(this.value) : this.value);
+};
+BodySerializer.prototype.build = function (prop, value) {
+ this.value = value;
+ if (prop.type === 'String' && value.search(ESCAPE_CHARS) !== -1) {
+ this.escape = true;
+ }
+ return this;
+};
+function ValueSerializer(tagName) {
+ this.tagName = tagName;
+}
+inherits(ValueSerializer, BodySerializer);
+ValueSerializer.prototype.serializeTo = function (writer) {
+ writer.appendIndent().append('<' + this.tagName + '>');
+ this.serializeValue(writer);
+ writer.append('' + this.tagName + '>').appendNewLine();
+};
+function ElementSerializer(parent, propertyDescriptor) {
+ this.body = [];
+ this.attrs = [];
+ this.parent = parent;
+ this.propertyDescriptor = propertyDescriptor;
+}
+ElementSerializer.prototype.build = function (element) {
+ this.element = element;
+ var elementDescriptor = element.$descriptor,
+ propertyDescriptor = this.propertyDescriptor;
+ var otherAttrs, properties;
+ var isGeneric = elementDescriptor.isGeneric;
+ if (isGeneric) {
+ otherAttrs = this.parseGeneric(element);
+ } else {
+ otherAttrs = this.parseNsAttributes(element);
+ }
+ if (propertyDescriptor) {
+ this.ns = this.nsPropertyTagName(propertyDescriptor);
+ } else {
+ this.ns = this.nsTagName(elementDescriptor);
+ }
+
+ // compute tag name
+ this.tagName = this.addTagName(this.ns);
+ if (!isGeneric) {
+ properties = getSerializableProperties(element);
+ this.parseAttributes(filterAttributes(properties));
+ this.parseContainments(filterContained(properties));
+ }
+ this.parseGenericAttributes(element, otherAttrs);
+ return this;
+};
+ElementSerializer.prototype.nsTagName = function (descriptor) {
+ var effectiveNs = this.logNamespaceUsed(descriptor.ns);
+ return getElementNs(effectiveNs, descriptor);
+};
+ElementSerializer.prototype.nsPropertyTagName = function (descriptor) {
+ var effectiveNs = this.logNamespaceUsed(descriptor.ns);
+ return getPropertyNs(effectiveNs, descriptor);
+};
+ElementSerializer.prototype.isLocalNs = function (ns) {
+ return ns.uri === this.ns.uri;
+};
+
+/**
+ * Get the actual ns attribute name for the given element.
+ *
+ * @param {Object} element
+ * @param {Boolean} [element.inherited=false]
+ *
+ * @return {Object} nsName
+ */
+ElementSerializer.prototype.nsAttributeName = function (element) {
+ var ns;
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_13__.isString)(element)) {
+ ns = parseName(element);
+ } else {
+ ns = element.ns;
+ }
+
+ // return just local name for inherited attributes
+ if (element.inherited) {
+ return {
+ localName: ns.localName
+ };
+ }
+
+ // parse + log effective ns
+ var effectiveNs = this.logNamespaceUsed(ns);
+
+ // LOG ACTUAL namespace use
+ this.getNamespaces().logUsed(effectiveNs);
+
+ // strip prefix if same namespace like parent
+ if (this.isLocalNs(effectiveNs)) {
+ return {
+ localName: ns.localName
+ };
+ } else {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.assign)({
+ localName: ns.localName
+ }, effectiveNs);
+ }
+};
+ElementSerializer.prototype.parseGeneric = function (element) {
+ var self = this,
+ body = this.body;
+ var attributes = [];
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.forEach)(element, function (val, key) {
+ var nonNsAttr;
+ if (key === '$body') {
+ body.push(new BodySerializer().build({
+ type: 'String'
+ }, val));
+ } else if (key === '$children') {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.forEach)(val, function (child) {
+ body.push(new ElementSerializer(self).build(child));
+ });
+ } else if (key.indexOf('$') !== 0) {
+ nonNsAttr = self.parseNsAttribute(element, key, val);
+ if (nonNsAttr) {
+ attributes.push({
+ name: key,
+ value: val
+ });
+ }
+ }
+ });
+ return attributes;
+};
+ElementSerializer.prototype.parseNsAttribute = function (element, name, value) {
+ var model = element.$model;
+ var nameNs = parseName(name);
+ var ns;
+
+ // parse xmlns:foo="http://foo.bar"
+ if (nameNs.prefix === 'xmlns') {
+ ns = {
+ prefix: nameNs.localName,
+ uri: value
+ };
+ }
+
+ // parse xmlns="http://foo.bar"
+ if (!nameNs.prefix && nameNs.localName === 'xmlns') {
+ ns = {
+ uri: value
+ };
+ }
+ if (!ns) {
+ return {
+ name: name,
+ value: value
+ };
+ }
+ if (model && model.getPackage(value)) {
+ // register well known namespace
+ this.logNamespace(ns, true, true);
+ } else {
+ // log custom namespace directly as used
+ var actualNs = this.logNamespaceUsed(ns, true);
+ this.getNamespaces().logUsed(actualNs);
+ }
+};
+
+/**
+ * Parse namespaces and return a list of left over generic attributes
+ *
+ * @param {Object} element
+ * @return {Array}
+ */
+ElementSerializer.prototype.parseNsAttributes = function (element, attrs) {
+ var self = this;
+ var genericAttrs = element.$attrs;
+ var attributes = [];
+
+ // parse namespace attributes first
+ // and log them. push non namespace attributes to a list
+ // and process them later
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.forEach)(genericAttrs, function (value, name) {
+ var nonNsAttr = self.parseNsAttribute(element, name, value);
+ if (nonNsAttr) {
+ attributes.push(nonNsAttr);
+ }
+ });
+ return attributes;
+};
+ElementSerializer.prototype.parseGenericAttributes = function (element, attributes) {
+ var self = this;
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.forEach)(attributes, function (attr) {
+ // do not serialize xsi:type attribute
+ // it is set manually based on the actual implementation type
+ if (attr.name === XSI_TYPE) {
+ return;
+ }
+ try {
+ self.addAttribute(self.nsAttributeName(attr.name), attr.value);
+ } catch (e) {
+ /* global console */
+
+ console.warn('missing namespace information for ', attr.name, '=', attr.value, 'on', element, e);
+ }
+ });
+};
+ElementSerializer.prototype.parseContainments = function (properties) {
+ var self = this,
+ body = this.body,
+ element = this.element;
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.forEach)(properties, function (p) {
+ var value = element.get(p.name),
+ isReference = p.isReference,
+ isMany = p.isMany;
+ if (!isMany) {
+ value = [value];
+ }
+ if (p.isBody) {
+ body.push(new BodySerializer().build(p, value[0]));
+ } else if (isSimple(p.type)) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.forEach)(value, function (v) {
+ body.push(new ValueSerializer(self.addTagName(self.nsPropertyTagName(p))).build(p, v));
+ });
+ } else if (isReference) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.forEach)(value, function (v) {
+ body.push(new ReferenceSerializer(self.addTagName(self.nsPropertyTagName(p))).build(v));
+ });
+ } else {
+ // allow serialization via type
+ // rather than element name
+ var asType = serializeAsType(p),
+ asProperty = serializeAsProperty(p);
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.forEach)(value, function (v) {
+ var serializer;
+ if (asType) {
+ serializer = new TypeSerializer(self, p);
+ } else if (asProperty) {
+ serializer = new ElementSerializer(self, p);
+ } else {
+ serializer = new ElementSerializer(self);
+ }
+ body.push(serializer.build(v));
+ });
+ }
+ });
+};
+ElementSerializer.prototype.getNamespaces = function (local) {
+ var namespaces = this.namespaces,
+ parent = this.parent,
+ parentNamespaces;
+ if (!namespaces) {
+ parentNamespaces = parent && parent.getNamespaces();
+ if (local || !parentNamespaces) {
+ this.namespaces = namespaces = new Namespaces(parentNamespaces);
+ } else {
+ namespaces = parentNamespaces;
+ }
+ }
+ return namespaces;
+};
+ElementSerializer.prototype.logNamespace = function (ns, wellknown, local) {
+ var namespaces = this.getNamespaces(local);
+ var nsUri = ns.uri,
+ nsPrefix = ns.prefix;
+ var existing = namespaces.byUri(nsUri);
+ if (!existing || local) {
+ namespaces.add(ns, wellknown);
+ }
+ namespaces.mapPrefix(nsPrefix, nsUri);
+ return ns;
+};
+ElementSerializer.prototype.logNamespaceUsed = function (ns, local) {
+ var element = this.element,
+ model = element.$model,
+ namespaces = this.getNamespaces(local);
+
+ // ns may be
+ //
+ // * prefix only
+ // * prefix:uri
+ // * localName only
+
+ var prefix = ns.prefix,
+ uri = ns.uri,
+ newPrefix,
+ idx,
+ wellknownUri;
+
+ // handle anonymous namespaces (elementForm=unqualified), cf. #23
+ if (!prefix && !uri) {
+ return {
+ localName: ns.localName
+ };
+ }
+ wellknownUri = DEFAULT_NS_MAP[prefix] || model && (model.getPackage(prefix) || {}).uri;
+ uri = uri || wellknownUri || namespaces.uriByPrefix(prefix);
+ if (!uri) {
+ throw new Error('no namespace uri given for prefix <' + prefix + '>');
+ }
+ ns = namespaces.byUri(uri);
+ if (!ns) {
+ newPrefix = prefix;
+ idx = 1;
+
+ // find a prefix that is not mapped yet
+ while (namespaces.uriByPrefix(newPrefix)) {
+ newPrefix = prefix + '_' + idx++;
+ }
+ ns = this.logNamespace({
+ prefix: newPrefix,
+ uri: uri
+ }, wellknownUri === uri);
+ }
+ if (prefix) {
+ namespaces.mapPrefix(prefix, uri);
+ }
+ return ns;
+};
+ElementSerializer.prototype.parseAttributes = function (properties) {
+ var self = this,
+ element = this.element;
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.forEach)(properties, function (p) {
+ var value = element.get(p.name);
+ if (p.isReference) {
+ if (!p.isMany) {
+ value = value.id;
+ } else {
+ var values = [];
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.forEach)(value, function (v) {
+ values.push(v.id);
+ });
- module.exports.findRootElementsByType = findRootElementsByType;
+ // IDREFS is a whitespace-separated list of references.
+ value = values.join(' ');
+ }
+ }
+ self.addAttribute(self.nsAttributeName(p), value);
+ });
+};
+ElementSerializer.prototype.addTagName = function (nsTagName) {
+ var actualNs = this.logNamespaceUsed(nsTagName);
+ this.getNamespaces().logUsed(actualNs);
+ return nsName(nsTagName);
+};
+ElementSerializer.prototype.addAttribute = function (name, value) {
+ var attrs = this.attrs;
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_13__.isString)(value)) {
+ value = escapeAttr(value);
+ }
+
+ // de-duplicate attributes
+ // https://github.com/bpmn-io/moddle-xml/issues/66
+ var idx = (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.findIndex)(attrs, function (element) {
+ return element.name.localName === name.localName && element.name.uri === name.uri && element.name.prefix === name.prefix;
+ });
+ var attr = {
+ name: name,
+ value: value
+ };
+ if (idx !== -1) {
+ attrs.splice(idx, 1, attr);
+ } else {
+ attrs.push(attr);
+ }
+};
+ElementSerializer.prototype.serializeAttributes = function (writer) {
+ var attrs = this.attrs,
+ namespaces = this.namespaces;
+ if (namespaces) {
+ attrs = getNsAttrs(namespaces).concat(attrs);
+ }
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.forEach)(attrs, function (a) {
+ writer.append(' ').append(nsName(a.name)).append('="').append(a.value).append('"');
+ });
+};
+ElementSerializer.prototype.serializeTo = function (writer) {
+ var firstBody = this.body[0],
+ indent = firstBody && firstBody.constructor !== BodySerializer;
+ writer.appendIndent().append('<' + this.tagName);
+ this.serializeAttributes(writer);
+ writer.append(firstBody ? '>' : ' />');
+ if (firstBody) {
+ if (indent) {
+ writer.appendNewLine().indent();
+ }
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.forEach)(this.body, function (b) {
+ b.serializeTo(writer);
+ });
+ if (indent) {
+ writer.unindent().appendIndent();
+ }
+ writer.append('' + this.tagName + '>');
+ }
+ writer.appendNewLine();
+};
+
+/**
+ * A serializer for types that handles serialization of data types
+ */
+function TypeSerializer(parent, propertyDescriptor) {
+ ElementSerializer.call(this, parent, propertyDescriptor);
+}
+inherits(TypeSerializer, ElementSerializer);
+TypeSerializer.prototype.parseNsAttributes = function (element) {
+ // extracted attributes
+ var attributes = ElementSerializer.prototype.parseNsAttributes.call(this, element);
+ var descriptor = element.$descriptor;
+
+ // only serialize xsi:type if necessary
+ if (descriptor.name === this.propertyDescriptor.type) {
+ return attributes;
+ }
+ var typeNs = this.typeNs = this.nsTagName(descriptor);
+ this.getNamespaces().logUsed(this.typeNs);
+
+ // add xsi:type attribute to represent the elements
+ // actual type
+
+ var pkg = element.$model.getPackage(typeNs.uri),
+ typePrefix = pkg.xml && pkg.xml.typePrefix || '';
+ this.addAttribute(this.nsAttributeName(XSI_TYPE), (typeNs.prefix ? typeNs.prefix + ':' : '') + typePrefix + descriptor.ns.localName);
+ return attributes;
+};
+TypeSerializer.prototype.isLocalNs = function (ns) {
+ return ns.uri === (this.typeNs || this.ns).uri;
+};
+function SavingWriter() {
+ this.value = '';
+ this.write = function (str) {
+ this.value += str;
+ };
+}
+function FormatingWriter(out, format) {
+ var indent = [''];
+ this.append = function (str) {
+ out.write(str);
+ return this;
+ };
+ this.appendNewLine = function () {
+ if (format) {
+ out.write('\n');
+ }
+ return this;
+ };
+ this.appendIndent = function () {
+ if (format) {
+ out.write(indent.join(' '));
+ }
+ return this;
+ };
+ this.indent = function () {
+ indent.push('');
+ return this;
+ };
+ this.unindent = function () {
+ indent.pop();
+ return this;
+ };
+}
+
+/**
+ * A writer for meta-model backed document trees
+ *
+ * @param {Object} options output options to pass into the writer
+ */
+function Writer(options) {
+ options = (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.assign)({
+ format: false,
+ preamble: true
+ }, options || {});
+ function toXML(tree, writer) {
+ var internalWriter = writer || new SavingWriter();
+ var formatingWriter = new FormatingWriter(internalWriter, options.format);
+ if (options.preamble) {
+ formatingWriter.append(XML_PREAMBLE);
+ }
+ new ElementSerializer().build(tree).serializeTo(formatingWriter);
+ if (!writer) {
+ return internalWriter.value;
+ }
+ }
+ return {
+ toXML: toXML
+ };
+}
+
+/**
+ * A sub class of {@link Moddle} with support for import and export of BPMN 2.0 xml files.
+ *
+ * @class BpmnModdle
+ * @extends Moddle
+ *
+ * @param {Object|Array} packages to use for instantiating the model
+ * @param {Object} [options] additional options to pass over
+ */
+function BpmnModdle(packages, options) {
+ Moddle.call(this, packages, options);
+}
+BpmnModdle.prototype = Object.create(Moddle.prototype);
+/**
+ * The fromXML result.
+ *
+ * @typedef {Object} ParseResult
+ *
+ * @property {ModdleElement} rootElement
+ * @property {Array} references
+ * @property {Array} warnings
+ * @property {Object} elementsById - a mapping containing each ID -> ModdleElement
+ */
- function removeAllChildren(domElement) {
- while (domElement.firstChild) {
- domElement.removeChild(domElement.firstChild);
- }
- }
+/**
+ * The fromXML error.
+ *
+ * @typedef {Error} ParseError
+ *
+ * @property {Array} warnings
+ */
- module.exports.removeAllChildren = removeAllChildren;
+/**
+ * Instantiates a BPMN model tree from a given xml string.
+ *
+ * @param {String} xmlStr
+ * @param {String} [typeName='bpmn:Definitions'] name of the root element
+ * @param {Object} [options] options to pass to the underlying reader
+ *
+ * @returns {Promise}
+ */
+BpmnModdle.prototype.fromXML = function (xmlStr, typeName, options) {
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_13__.isString)(typeName)) {
+ options = typeName;
+ typeName = 'bpmn:Definitions';
+ }
+ var reader = new Reader((0,min_dash__WEBPACK_IMPORTED_MODULE_13__.assign)({
+ model: this,
+ lax: true
+ }, options));
+ var rootHandler = reader.handler(typeName);
+ return reader.fromXML(xmlStr, rootHandler);
+};
+
+/**
+ * The toXML result.
+ *
+ * @typedef {Object} SerializationResult
+ *
+ * @property {String} xml
+ */
+/**
+ * Serializes a BPMN 2.0 object tree to XML.
+ *
+ * @param {String} element the root element, typically an instance of `bpmn:Definitions`
+ * @param {Object} [options] to pass to the underlying writer
+ *
+ * @returns {Promise}
+ */
+BpmnModdle.prototype.toXML = function (element, options) {
+ var writer = new Writer(options);
+ return new Promise(function (resolve, reject) {
+ try {
+ var result = writer.toXML(element);
+ return resolve({
+ xml: result
+ });
+ } catch (err) {
+ return reject(err);
+ }
+ });
+};
+var name$5 = "BPMN20";
+var uri$5 = "http://www.omg.org/spec/BPMN/20100524/MODEL";
+var prefix$5 = "bpmn";
+var associations$5 = [];
+var types$5 = [{
+ name: "Interface",
+ superClass: ["RootElement"],
+ properties: [{
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "operations",
+ type: "Operation",
+ isMany: true
+ }, {
+ name: "implementationRef",
+ isAttr: true,
+ type: "String"
+ }]
+}, {
+ name: "Operation",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "inMessageRef",
+ type: "Message",
+ isReference: true
+ }, {
+ name: "outMessageRef",
+ type: "Message",
+ isReference: true
+ }, {
+ name: "errorRef",
+ type: "Error",
+ isMany: true,
+ isReference: true
+ }, {
+ name: "implementationRef",
+ isAttr: true,
+ type: "String"
+ }]
+}, {
+ name: "EndPoint",
+ superClass: ["RootElement"]
+}, {
+ name: "Auditing",
+ superClass: ["BaseElement"]
+}, {
+ name: "GlobalTask",
+ superClass: ["CallableElement"],
+ properties: [{
+ name: "resources",
+ type: "ResourceRole",
+ isMany: true
+ }]
+}, {
+ name: "Monitoring",
+ superClass: ["BaseElement"]
+}, {
+ name: "Performer",
+ superClass: ["ResourceRole"]
+}, {
+ name: "Process",
+ superClass: ["FlowElementsContainer", "CallableElement"],
+ properties: [{
+ name: "processType",
+ type: "ProcessType",
+ isAttr: true
+ }, {
+ name: "isClosed",
+ isAttr: true,
+ type: "Boolean"
+ }, {
+ name: "auditing",
+ type: "Auditing"
+ }, {
+ name: "monitoring",
+ type: "Monitoring"
+ }, {
+ name: "properties",
+ type: "Property",
+ isMany: true
+ }, {
+ name: "laneSets",
+ isMany: true,
+ replaces: "FlowElementsContainer#laneSets",
+ type: "LaneSet"
+ }, {
+ name: "flowElements",
+ isMany: true,
+ replaces: "FlowElementsContainer#flowElements",
+ type: "FlowElement"
+ }, {
+ name: "artifacts",
+ type: "Artifact",
+ isMany: true
+ }, {
+ name: "resources",
+ type: "ResourceRole",
+ isMany: true
+ }, {
+ name: "correlationSubscriptions",
+ type: "CorrelationSubscription",
+ isMany: true
+ }, {
+ name: "supports",
+ type: "Process",
+ isMany: true,
+ isReference: true
+ }, {
+ name: "definitionalCollaborationRef",
+ type: "Collaboration",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "isExecutable",
+ isAttr: true,
+ type: "Boolean"
+ }]
+}, {
+ name: "LaneSet",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "lanes",
+ type: "Lane",
+ isMany: true
+ }, {
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }]
+}, {
+ name: "Lane",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "partitionElementRef",
+ type: "BaseElement",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "partitionElement",
+ type: "BaseElement"
+ }, {
+ name: "flowNodeRef",
+ type: "FlowNode",
+ isMany: true,
+ isReference: true
+ }, {
+ name: "childLaneSet",
+ type: "LaneSet",
+ xml: {
+ serialize: "xsi:type"
+ }
+ }]
+}, {
+ name: "GlobalManualTask",
+ superClass: ["GlobalTask"]
+}, {
+ name: "ManualTask",
+ superClass: ["Task"]
+}, {
+ name: "UserTask",
+ superClass: ["Task"],
+ properties: [{
+ name: "renderings",
+ type: "Rendering",
+ isMany: true
+ }, {
+ name: "implementation",
+ isAttr: true,
+ type: "String"
+ }]
+}, {
+ name: "Rendering",
+ superClass: ["BaseElement"]
+}, {
+ name: "HumanPerformer",
+ superClass: ["Performer"]
+}, {
+ name: "PotentialOwner",
+ superClass: ["HumanPerformer"]
+}, {
+ name: "GlobalUserTask",
+ superClass: ["GlobalTask"],
+ properties: [{
+ name: "implementation",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "renderings",
+ type: "Rendering",
+ isMany: true
+ }]
+}, {
+ name: "Gateway",
+ isAbstract: true,
+ superClass: ["FlowNode"],
+ properties: [{
+ name: "gatewayDirection",
+ type: "GatewayDirection",
+ "default": "Unspecified",
+ isAttr: true
+ }]
+}, {
+ name: "EventBasedGateway",
+ superClass: ["Gateway"],
+ properties: [{
+ name: "instantiate",
+ "default": false,
+ isAttr: true,
+ type: "Boolean"
+ }, {
+ name: "eventGatewayType",
+ type: "EventBasedGatewayType",
+ isAttr: true,
+ "default": "Exclusive"
+ }]
+}, {
+ name: "ComplexGateway",
+ superClass: ["Gateway"],
+ properties: [{
+ name: "activationCondition",
+ type: "Expression",
+ xml: {
+ serialize: "xsi:type"
+ }
+ }, {
+ name: "default",
+ type: "SequenceFlow",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "ExclusiveGateway",
+ superClass: ["Gateway"],
+ properties: [{
+ name: "default",
+ type: "SequenceFlow",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "InclusiveGateway",
+ superClass: ["Gateway"],
+ properties: [{
+ name: "default",
+ type: "SequenceFlow",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "ParallelGateway",
+ superClass: ["Gateway"]
+}, {
+ name: "RootElement",
+ isAbstract: true,
+ superClass: ["BaseElement"]
+}, {
+ name: "Relationship",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "type",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "direction",
+ type: "RelationshipDirection",
+ isAttr: true
+ }, {
+ name: "source",
+ isMany: true,
+ isReference: true,
+ type: "Element"
+ }, {
+ name: "target",
+ isMany: true,
+ isReference: true,
+ type: "Element"
+ }]
+}, {
+ name: "BaseElement",
+ isAbstract: true,
+ properties: [{
+ name: "id",
+ isAttr: true,
+ type: "String",
+ isId: true
+ }, {
+ name: "documentation",
+ type: "Documentation",
+ isMany: true
+ }, {
+ name: "extensionDefinitions",
+ type: "ExtensionDefinition",
+ isMany: true,
+ isReference: true
+ }, {
+ name: "extensionElements",
+ type: "ExtensionElements"
+ }]
+}, {
+ name: "Extension",
+ properties: [{
+ name: "mustUnderstand",
+ "default": false,
+ isAttr: true,
+ type: "Boolean"
+ }, {
+ name: "definition",
+ type: "ExtensionDefinition",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "ExtensionDefinition",
+ properties: [{
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "extensionAttributeDefinitions",
+ type: "ExtensionAttributeDefinition",
+ isMany: true
+ }]
+}, {
+ name: "ExtensionAttributeDefinition",
+ properties: [{
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "type",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "isReference",
+ "default": false,
+ isAttr: true,
+ type: "Boolean"
+ }, {
+ name: "extensionDefinition",
+ type: "ExtensionDefinition",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "ExtensionElements",
+ properties: [{
+ name: "valueRef",
+ isAttr: true,
+ isReference: true,
+ type: "Element"
+ }, {
+ name: "values",
+ type: "Element",
+ isMany: true
+ }, {
+ name: "extensionAttributeDefinition",
+ type: "ExtensionAttributeDefinition",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "Documentation",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "text",
+ type: "String",
+ isBody: true
+ }, {
+ name: "textFormat",
+ "default": "text/plain",
+ isAttr: true,
+ type: "String"
+ }]
+}, {
+ name: "Event",
+ isAbstract: true,
+ superClass: ["FlowNode", "InteractionNode"],
+ properties: [{
+ name: "properties",
+ type: "Property",
+ isMany: true
+ }]
+}, {
+ name: "IntermediateCatchEvent",
+ superClass: ["CatchEvent"]
+}, {
+ name: "IntermediateThrowEvent",
+ superClass: ["ThrowEvent"]
+}, {
+ name: "EndEvent",
+ superClass: ["ThrowEvent"]
+}, {
+ name: "StartEvent",
+ superClass: ["CatchEvent"],
+ properties: [{
+ name: "isInterrupting",
+ "default": true,
+ isAttr: true,
+ type: "Boolean"
+ }]
+}, {
+ name: "ThrowEvent",
+ isAbstract: true,
+ superClass: ["Event"],
+ properties: [{
+ name: "dataInputs",
+ type: "DataInput",
+ isMany: true
+ }, {
+ name: "dataInputAssociations",
+ type: "DataInputAssociation",
+ isMany: true
+ }, {
+ name: "inputSet",
+ type: "InputSet"
+ }, {
+ name: "eventDefinitions",
+ type: "EventDefinition",
+ isMany: true
+ }, {
+ name: "eventDefinitionRef",
+ type: "EventDefinition",
+ isMany: true,
+ isReference: true
+ }]
+}, {
+ name: "CatchEvent",
+ isAbstract: true,
+ superClass: ["Event"],
+ properties: [{
+ name: "parallelMultiple",
+ isAttr: true,
+ type: "Boolean",
+ "default": false
+ }, {
+ name: "dataOutputs",
+ type: "DataOutput",
+ isMany: true
+ }, {
+ name: "dataOutputAssociations",
+ type: "DataOutputAssociation",
+ isMany: true
+ }, {
+ name: "outputSet",
+ type: "OutputSet"
+ }, {
+ name: "eventDefinitions",
+ type: "EventDefinition",
+ isMany: true
+ }, {
+ name: "eventDefinitionRef",
+ type: "EventDefinition",
+ isMany: true,
+ isReference: true
+ }]
+}, {
+ name: "BoundaryEvent",
+ superClass: ["CatchEvent"],
+ properties: [{
+ name: "cancelActivity",
+ "default": true,
+ isAttr: true,
+ type: "Boolean"
+ }, {
+ name: "attachedToRef",
+ type: "Activity",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "EventDefinition",
+ isAbstract: true,
+ superClass: ["RootElement"]
+}, {
+ name: "CancelEventDefinition",
+ superClass: ["EventDefinition"]
+}, {
+ name: "ErrorEventDefinition",
+ superClass: ["EventDefinition"],
+ properties: [{
+ name: "errorRef",
+ type: "Error",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "TerminateEventDefinition",
+ superClass: ["EventDefinition"]
+}, {
+ name: "EscalationEventDefinition",
+ superClass: ["EventDefinition"],
+ properties: [{
+ name: "escalationRef",
+ type: "Escalation",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "Escalation",
+ properties: [{
+ name: "structureRef",
+ type: "ItemDefinition",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "escalationCode",
+ isAttr: true,
+ type: "String"
+ }],
+ superClass: ["RootElement"]
+}, {
+ name: "CompensateEventDefinition",
+ superClass: ["EventDefinition"],
+ properties: [{
+ name: "waitForCompletion",
+ isAttr: true,
+ type: "Boolean",
+ "default": true
+ }, {
+ name: "activityRef",
+ type: "Activity",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "TimerEventDefinition",
+ superClass: ["EventDefinition"],
+ properties: [{
+ name: "timeDate",
+ type: "Expression",
+ xml: {
+ serialize: "xsi:type"
+ }
+ }, {
+ name: "timeCycle",
+ type: "Expression",
+ xml: {
+ serialize: "xsi:type"
+ }
+ }, {
+ name: "timeDuration",
+ type: "Expression",
+ xml: {
+ serialize: "xsi:type"
+ }
+ }]
+}, {
+ name: "LinkEventDefinition",
+ superClass: ["EventDefinition"],
+ properties: [{
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "target",
+ type: "LinkEventDefinition",
+ isReference: true
+ }, {
+ name: "source",
+ type: "LinkEventDefinition",
+ isMany: true,
+ isReference: true
+ }]
+}, {
+ name: "MessageEventDefinition",
+ superClass: ["EventDefinition"],
+ properties: [{
+ name: "messageRef",
+ type: "Message",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "operationRef",
+ type: "Operation",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "ConditionalEventDefinition",
+ superClass: ["EventDefinition"],
+ properties: [{
+ name: "condition",
+ type: "Expression",
+ xml: {
+ serialize: "xsi:type"
+ }
+ }]
+}, {
+ name: "SignalEventDefinition",
+ superClass: ["EventDefinition"],
+ properties: [{
+ name: "signalRef",
+ type: "Signal",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "Signal",
+ superClass: ["RootElement"],
+ properties: [{
+ name: "structureRef",
+ type: "ItemDefinition",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }]
+}, {
+ name: "ImplicitThrowEvent",
+ superClass: ["ThrowEvent"]
+}, {
+ name: "DataState",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }]
+}, {
+ name: "ItemAwareElement",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "itemSubjectRef",
+ type: "ItemDefinition",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "dataState",
+ type: "DataState"
+ }]
+}, {
+ name: "DataAssociation",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "sourceRef",
+ type: "ItemAwareElement",
+ isMany: true,
+ isReference: true
+ }, {
+ name: "targetRef",
+ type: "ItemAwareElement",
+ isReference: true
+ }, {
+ name: "transformation",
+ type: "FormalExpression",
+ xml: {
+ serialize: "property"
+ }
+ }, {
+ name: "assignment",
+ type: "Assignment",
+ isMany: true
+ }]
+}, {
+ name: "DataInput",
+ superClass: ["ItemAwareElement"],
+ properties: [{
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "isCollection",
+ "default": false,
+ isAttr: true,
+ type: "Boolean"
+ }, {
+ name: "inputSetRef",
+ type: "InputSet",
+ isMany: true,
+ isVirtual: true,
+ isReference: true
+ }, {
+ name: "inputSetWithOptional",
+ type: "InputSet",
+ isMany: true,
+ isVirtual: true,
+ isReference: true
+ }, {
+ name: "inputSetWithWhileExecuting",
+ type: "InputSet",
+ isMany: true,
+ isVirtual: true,
+ isReference: true
+ }]
+}, {
+ name: "DataOutput",
+ superClass: ["ItemAwareElement"],
+ properties: [{
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "isCollection",
+ "default": false,
+ isAttr: true,
+ type: "Boolean"
+ }, {
+ name: "outputSetRef",
+ type: "OutputSet",
+ isMany: true,
+ isVirtual: true,
+ isReference: true
+ }, {
+ name: "outputSetWithOptional",
+ type: "OutputSet",
+ isMany: true,
+ isVirtual: true,
+ isReference: true
+ }, {
+ name: "outputSetWithWhileExecuting",
+ type: "OutputSet",
+ isMany: true,
+ isVirtual: true,
+ isReference: true
+ }]
+}, {
+ name: "InputSet",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "dataInputRefs",
+ type: "DataInput",
+ isMany: true,
+ isReference: true
+ }, {
+ name: "optionalInputRefs",
+ type: "DataInput",
+ isMany: true,
+ isReference: true
+ }, {
+ name: "whileExecutingInputRefs",
+ type: "DataInput",
+ isMany: true,
+ isReference: true
+ }, {
+ name: "outputSetRefs",
+ type: "OutputSet",
+ isMany: true,
+ isReference: true
+ }]
+}, {
+ name: "OutputSet",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "dataOutputRefs",
+ type: "DataOutput",
+ isMany: true,
+ isReference: true
+ }, {
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "inputSetRefs",
+ type: "InputSet",
+ isMany: true,
+ isReference: true
+ }, {
+ name: "optionalOutputRefs",
+ type: "DataOutput",
+ isMany: true,
+ isReference: true
+ }, {
+ name: "whileExecutingOutputRefs",
+ type: "DataOutput",
+ isMany: true,
+ isReference: true
+ }]
+}, {
+ name: "Property",
+ superClass: ["ItemAwareElement"],
+ properties: [{
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }]
+}, {
+ name: "DataInputAssociation",
+ superClass: ["DataAssociation"]
+}, {
+ name: "DataOutputAssociation",
+ superClass: ["DataAssociation"]
+}, {
+ name: "InputOutputSpecification",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "dataInputs",
+ type: "DataInput",
+ isMany: true
+ }, {
+ name: "dataOutputs",
+ type: "DataOutput",
+ isMany: true
+ }, {
+ name: "inputSets",
+ type: "InputSet",
+ isMany: true
+ }, {
+ name: "outputSets",
+ type: "OutputSet",
+ isMany: true
+ }]
+}, {
+ name: "DataObject",
+ superClass: ["FlowElement", "ItemAwareElement"],
+ properties: [{
+ name: "isCollection",
+ "default": false,
+ isAttr: true,
+ type: "Boolean"
+ }]
+}, {
+ name: "InputOutputBinding",
+ properties: [{
+ name: "inputDataRef",
+ type: "InputSet",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "outputDataRef",
+ type: "OutputSet",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "operationRef",
+ type: "Operation",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "Assignment",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "from",
+ type: "Expression",
+ xml: {
+ serialize: "xsi:type"
+ }
+ }, {
+ name: "to",
+ type: "Expression",
+ xml: {
+ serialize: "xsi:type"
+ }
+ }]
+}, {
+ name: "DataStore",
+ superClass: ["RootElement", "ItemAwareElement"],
+ properties: [{
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "capacity",
+ isAttr: true,
+ type: "Integer"
+ }, {
+ name: "isUnlimited",
+ "default": true,
+ isAttr: true,
+ type: "Boolean"
+ }]
+}, {
+ name: "DataStoreReference",
+ superClass: ["ItemAwareElement", "FlowElement"],
+ properties: [{
+ name: "dataStoreRef",
+ type: "DataStore",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "DataObjectReference",
+ superClass: ["ItemAwareElement", "FlowElement"],
+ properties: [{
+ name: "dataObjectRef",
+ type: "DataObject",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "ConversationLink",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "sourceRef",
+ type: "InteractionNode",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "targetRef",
+ type: "InteractionNode",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }]
+}, {
+ name: "ConversationAssociation",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "innerConversationNodeRef",
+ type: "ConversationNode",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "outerConversationNodeRef",
+ type: "ConversationNode",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "CallConversation",
+ superClass: ["ConversationNode"],
+ properties: [{
+ name: "calledCollaborationRef",
+ type: "Collaboration",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "participantAssociations",
+ type: "ParticipantAssociation",
+ isMany: true
+ }]
+}, {
+ name: "Conversation",
+ superClass: ["ConversationNode"]
+}, {
+ name: "SubConversation",
+ superClass: ["ConversationNode"],
+ properties: [{
+ name: "conversationNodes",
+ type: "ConversationNode",
+ isMany: true
+ }]
+}, {
+ name: "ConversationNode",
+ isAbstract: true,
+ superClass: ["InteractionNode", "BaseElement"],
+ properties: [{
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "participantRef",
+ type: "Participant",
+ isMany: true,
+ isReference: true
+ }, {
+ name: "messageFlowRefs",
+ type: "MessageFlow",
+ isMany: true,
+ isReference: true
+ }, {
+ name: "correlationKeys",
+ type: "CorrelationKey",
+ isMany: true
+ }]
+}, {
+ name: "GlobalConversation",
+ superClass: ["Collaboration"]
+}, {
+ name: "PartnerEntity",
+ superClass: ["RootElement"],
+ properties: [{
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "participantRef",
+ type: "Participant",
+ isMany: true,
+ isReference: true
+ }]
+}, {
+ name: "PartnerRole",
+ superClass: ["RootElement"],
+ properties: [{
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "participantRef",
+ type: "Participant",
+ isMany: true,
+ isReference: true
+ }]
+}, {
+ name: "CorrelationProperty",
+ superClass: ["RootElement"],
+ properties: [{
+ name: "correlationPropertyRetrievalExpression",
+ type: "CorrelationPropertyRetrievalExpression",
+ isMany: true
+ }, {
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "type",
+ type: "ItemDefinition",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "Error",
+ superClass: ["RootElement"],
+ properties: [{
+ name: "structureRef",
+ type: "ItemDefinition",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "errorCode",
+ isAttr: true,
+ type: "String"
+ }]
+}, {
+ name: "CorrelationKey",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "correlationPropertyRef",
+ type: "CorrelationProperty",
+ isMany: true,
+ isReference: true
+ }, {
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }]
+}, {
+ name: "Expression",
+ superClass: ["BaseElement"],
+ isAbstract: false,
+ properties: [{
+ name: "body",
+ isBody: true,
+ type: "String"
+ }]
+}, {
+ name: "FormalExpression",
+ superClass: ["Expression"],
+ properties: [{
+ name: "language",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "evaluatesToTypeRef",
+ type: "ItemDefinition",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "Message",
+ superClass: ["RootElement"],
+ properties: [{
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "itemRef",
+ type: "ItemDefinition",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "ItemDefinition",
+ superClass: ["RootElement"],
+ properties: [{
+ name: "itemKind",
+ type: "ItemKind",
+ isAttr: true
+ }, {
+ name: "structureRef",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "isCollection",
+ "default": false,
+ isAttr: true,
+ type: "Boolean"
+ }, {
+ name: "import",
+ type: "Import",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "FlowElement",
+ isAbstract: true,
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "auditing",
+ type: "Auditing"
+ }, {
+ name: "monitoring",
+ type: "Monitoring"
+ }, {
+ name: "categoryValueRef",
+ type: "CategoryValue",
+ isMany: true,
+ isReference: true
+ }]
+}, {
+ name: "SequenceFlow",
+ superClass: ["FlowElement"],
+ properties: [{
+ name: "isImmediate",
+ isAttr: true,
+ type: "Boolean"
+ }, {
+ name: "conditionExpression",
+ type: "Expression",
+ xml: {
+ serialize: "xsi:type"
+ }
+ }, {
+ name: "sourceRef",
+ type: "FlowNode",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "targetRef",
+ type: "FlowNode",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "FlowElementsContainer",
+ isAbstract: true,
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "laneSets",
+ type: "LaneSet",
+ isMany: true
+ }, {
+ name: "flowElements",
+ type: "FlowElement",
+ isMany: true
+ }]
+}, {
+ name: "CallableElement",
+ isAbstract: true,
+ superClass: ["RootElement"],
+ properties: [{
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "ioSpecification",
+ type: "InputOutputSpecification",
+ xml: {
+ serialize: "property"
+ }
+ }, {
+ name: "supportedInterfaceRef",
+ type: "Interface",
+ isMany: true,
+ isReference: true
+ }, {
+ name: "ioBinding",
+ type: "InputOutputBinding",
+ isMany: true,
+ xml: {
+ serialize: "property"
+ }
+ }]
+}, {
+ name: "FlowNode",
+ isAbstract: true,
+ superClass: ["FlowElement"],
+ properties: [{
+ name: "incoming",
+ type: "SequenceFlow",
+ isMany: true,
+ isReference: true
+ }, {
+ name: "outgoing",
+ type: "SequenceFlow",
+ isMany: true,
+ isReference: true
+ }, {
+ name: "lanes",
+ type: "Lane",
+ isMany: true,
+ isVirtual: true,
+ isReference: true
+ }]
+}, {
+ name: "CorrelationPropertyRetrievalExpression",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "messagePath",
+ type: "FormalExpression"
+ }, {
+ name: "messageRef",
+ type: "Message",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "CorrelationPropertyBinding",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "dataPath",
+ type: "FormalExpression"
+ }, {
+ name: "correlationPropertyRef",
+ type: "CorrelationProperty",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "Resource",
+ superClass: ["RootElement"],
+ properties: [{
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "resourceParameters",
+ type: "ResourceParameter",
+ isMany: true
+ }]
+}, {
+ name: "ResourceParameter",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "isRequired",
+ isAttr: true,
+ type: "Boolean"
+ }, {
+ name: "type",
+ type: "ItemDefinition",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "CorrelationSubscription",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "correlationKeyRef",
+ type: "CorrelationKey",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "correlationPropertyBinding",
+ type: "CorrelationPropertyBinding",
+ isMany: true
+ }]
+}, {
+ name: "MessageFlow",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "sourceRef",
+ type: "InteractionNode",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "targetRef",
+ type: "InteractionNode",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "messageRef",
+ type: "Message",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "MessageFlowAssociation",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "innerMessageFlowRef",
+ type: "MessageFlow",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "outerMessageFlowRef",
+ type: "MessageFlow",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "InteractionNode",
+ isAbstract: true,
+ properties: [{
+ name: "incomingConversationLinks",
+ type: "ConversationLink",
+ isMany: true,
+ isVirtual: true,
+ isReference: true
+ }, {
+ name: "outgoingConversationLinks",
+ type: "ConversationLink",
+ isMany: true,
+ isVirtual: true,
+ isReference: true
+ }]
+}, {
+ name: "Participant",
+ superClass: ["InteractionNode", "BaseElement"],
+ properties: [{
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "interfaceRef",
+ type: "Interface",
+ isMany: true,
+ isReference: true
+ }, {
+ name: "participantMultiplicity",
+ type: "ParticipantMultiplicity"
+ }, {
+ name: "endPointRefs",
+ type: "EndPoint",
+ isMany: true,
+ isReference: true
+ }, {
+ name: "processRef",
+ type: "Process",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "ParticipantAssociation",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "innerParticipantRef",
+ type: "Participant",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "outerParticipantRef",
+ type: "Participant",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "ParticipantMultiplicity",
+ properties: [{
+ name: "minimum",
+ "default": 0,
+ isAttr: true,
+ type: "Integer"
+ }, {
+ name: "maximum",
+ "default": 1,
+ isAttr: true,
+ type: "Integer"
+ }],
+ superClass: ["BaseElement"]
+}, {
+ name: "Collaboration",
+ superClass: ["RootElement"],
+ properties: [{
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "isClosed",
+ isAttr: true,
+ type: "Boolean"
+ }, {
+ name: "participants",
+ type: "Participant",
+ isMany: true
+ }, {
+ name: "messageFlows",
+ type: "MessageFlow",
+ isMany: true
+ }, {
+ name: "artifacts",
+ type: "Artifact",
+ isMany: true
+ }, {
+ name: "conversations",
+ type: "ConversationNode",
+ isMany: true
+ }, {
+ name: "conversationAssociations",
+ type: "ConversationAssociation"
+ }, {
+ name: "participantAssociations",
+ type: "ParticipantAssociation",
+ isMany: true
+ }, {
+ name: "messageFlowAssociations",
+ type: "MessageFlowAssociation",
+ isMany: true
+ }, {
+ name: "correlationKeys",
+ type: "CorrelationKey",
+ isMany: true
+ }, {
+ name: "choreographyRef",
+ type: "Choreography",
+ isMany: true,
+ isReference: true
+ }, {
+ name: "conversationLinks",
+ type: "ConversationLink",
+ isMany: true
+ }]
+}, {
+ name: "ChoreographyActivity",
+ isAbstract: true,
+ superClass: ["FlowNode"],
+ properties: [{
+ name: "participantRef",
+ type: "Participant",
+ isMany: true,
+ isReference: true
+ }, {
+ name: "initiatingParticipantRef",
+ type: "Participant",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "correlationKeys",
+ type: "CorrelationKey",
+ isMany: true
+ }, {
+ name: "loopType",
+ type: "ChoreographyLoopType",
+ "default": "None",
+ isAttr: true
+ }]
+}, {
+ name: "CallChoreography",
+ superClass: ["ChoreographyActivity"],
+ properties: [{
+ name: "calledChoreographyRef",
+ type: "Choreography",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "participantAssociations",
+ type: "ParticipantAssociation",
+ isMany: true
+ }]
+}, {
+ name: "SubChoreography",
+ superClass: ["ChoreographyActivity", "FlowElementsContainer"],
+ properties: [{
+ name: "artifacts",
+ type: "Artifact",
+ isMany: true
+ }]
+}, {
+ name: "ChoreographyTask",
+ superClass: ["ChoreographyActivity"],
+ properties: [{
+ name: "messageFlowRef",
+ type: "MessageFlow",
+ isMany: true,
+ isReference: true
+ }]
+}, {
+ name: "Choreography",
+ superClass: ["Collaboration", "FlowElementsContainer"]
+}, {
+ name: "GlobalChoreographyTask",
+ superClass: ["Choreography"],
+ properties: [{
+ name: "initiatingParticipantRef",
+ type: "Participant",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "TextAnnotation",
+ superClass: ["Artifact"],
+ properties: [{
+ name: "text",
+ type: "String"
+ }, {
+ name: "textFormat",
+ "default": "text/plain",
+ isAttr: true,
+ type: "String"
+ }]
+}, {
+ name: "Group",
+ superClass: ["Artifact"],
+ properties: [{
+ name: "categoryValueRef",
+ type: "CategoryValue",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "Association",
+ superClass: ["Artifact"],
+ properties: [{
+ name: "associationDirection",
+ type: "AssociationDirection",
+ isAttr: true
+ }, {
+ name: "sourceRef",
+ type: "BaseElement",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "targetRef",
+ type: "BaseElement",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "Category",
+ superClass: ["RootElement"],
+ properties: [{
+ name: "categoryValue",
+ type: "CategoryValue",
+ isMany: true
+ }, {
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }]
+}, {
+ name: "Artifact",
+ isAbstract: true,
+ superClass: ["BaseElement"]
+}, {
+ name: "CategoryValue",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "categorizedFlowElements",
+ type: "FlowElement",
+ isMany: true,
+ isVirtual: true,
+ isReference: true
+ }, {
+ name: "value",
+ isAttr: true,
+ type: "String"
+ }]
+}, {
+ name: "Activity",
+ isAbstract: true,
+ superClass: ["FlowNode"],
+ properties: [{
+ name: "isForCompensation",
+ "default": false,
+ isAttr: true,
+ type: "Boolean"
+ }, {
+ name: "default",
+ type: "SequenceFlow",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "ioSpecification",
+ type: "InputOutputSpecification",
+ xml: {
+ serialize: "property"
+ }
+ }, {
+ name: "boundaryEventRefs",
+ type: "BoundaryEvent",
+ isMany: true,
+ isReference: true
+ }, {
+ name: "properties",
+ type: "Property",
+ isMany: true
+ }, {
+ name: "dataInputAssociations",
+ type: "DataInputAssociation",
+ isMany: true
+ }, {
+ name: "dataOutputAssociations",
+ type: "DataOutputAssociation",
+ isMany: true
+ }, {
+ name: "startQuantity",
+ "default": 1,
+ isAttr: true,
+ type: "Integer"
+ }, {
+ name: "resources",
+ type: "ResourceRole",
+ isMany: true
+ }, {
+ name: "completionQuantity",
+ "default": 1,
+ isAttr: true,
+ type: "Integer"
+ }, {
+ name: "loopCharacteristics",
+ type: "LoopCharacteristics"
+ }]
+}, {
+ name: "ServiceTask",
+ superClass: ["Task"],
+ properties: [{
+ name: "implementation",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "operationRef",
+ type: "Operation",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "SubProcess",
+ superClass: ["Activity", "FlowElementsContainer", "InteractionNode"],
+ properties: [{
+ name: "triggeredByEvent",
+ "default": false,
+ isAttr: true,
+ type: "Boolean"
+ }, {
+ name: "artifacts",
+ type: "Artifact",
+ isMany: true
+ }]
+}, {
+ name: "LoopCharacteristics",
+ isAbstract: true,
+ superClass: ["BaseElement"]
+}, {
+ name: "MultiInstanceLoopCharacteristics",
+ superClass: ["LoopCharacteristics"],
+ properties: [{
+ name: "isSequential",
+ "default": false,
+ isAttr: true,
+ type: "Boolean"
+ }, {
+ name: "behavior",
+ type: "MultiInstanceBehavior",
+ "default": "All",
+ isAttr: true
+ }, {
+ name: "loopCardinality",
+ type: "Expression",
+ xml: {
+ serialize: "xsi:type"
+ }
+ }, {
+ name: "loopDataInputRef",
+ type: "ItemAwareElement",
+ isReference: true
+ }, {
+ name: "loopDataOutputRef",
+ type: "ItemAwareElement",
+ isReference: true
+ }, {
+ name: "inputDataItem",
+ type: "DataInput",
+ xml: {
+ serialize: "property"
+ }
+ }, {
+ name: "outputDataItem",
+ type: "DataOutput",
+ xml: {
+ serialize: "property"
+ }
+ }, {
+ name: "complexBehaviorDefinition",
+ type: "ComplexBehaviorDefinition",
+ isMany: true
+ }, {
+ name: "completionCondition",
+ type: "Expression",
+ xml: {
+ serialize: "xsi:type"
+ }
+ }, {
+ name: "oneBehaviorEventRef",
+ type: "EventDefinition",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "noneBehaviorEventRef",
+ type: "EventDefinition",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "StandardLoopCharacteristics",
+ superClass: ["LoopCharacteristics"],
+ properties: [{
+ name: "testBefore",
+ "default": false,
+ isAttr: true,
+ type: "Boolean"
+ }, {
+ name: "loopCondition",
+ type: "Expression",
+ xml: {
+ serialize: "xsi:type"
+ }
+ }, {
+ name: "loopMaximum",
+ type: "Integer",
+ isAttr: true
+ }]
+}, {
+ name: "CallActivity",
+ superClass: ["Activity", "InteractionNode"],
+ properties: [{
+ name: "calledElement",
+ type: "String",
+ isAttr: true
+ }]
+}, {
+ name: "Task",
+ superClass: ["Activity", "InteractionNode"]
+}, {
+ name: "SendTask",
+ superClass: ["Task"],
+ properties: [{
+ name: "implementation",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "operationRef",
+ type: "Operation",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "messageRef",
+ type: "Message",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "ReceiveTask",
+ superClass: ["Task"],
+ properties: [{
+ name: "implementation",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "instantiate",
+ "default": false,
+ isAttr: true,
+ type: "Boolean"
+ }, {
+ name: "operationRef",
+ type: "Operation",
+ isAttr: true,
+ isReference: true
+ }, {
+ name: "messageRef",
+ type: "Message",
+ isAttr: true,
+ isReference: true
+ }]
+}, {
+ name: "ScriptTask",
+ superClass: ["Task"],
+ properties: [{
+ name: "scriptFormat",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "script",
+ type: "String"
+ }]
+}, {
+ name: "BusinessRuleTask",
+ superClass: ["Task"],
+ properties: [{
+ name: "implementation",
+ isAttr: true,
+ type: "String"
+ }]
+}, {
+ name: "AdHocSubProcess",
+ superClass: ["SubProcess"],
+ properties: [{
+ name: "completionCondition",
+ type: "Expression",
+ xml: {
+ serialize: "xsi:type"
+ }
+ }, {
+ name: "ordering",
+ type: "AdHocOrdering",
+ isAttr: true
+ }, {
+ name: "cancelRemainingInstances",
+ "default": true,
+ isAttr: true,
+ type: "Boolean"
+ }]
+}, {
+ name: "Transaction",
+ superClass: ["SubProcess"],
+ properties: [{
+ name: "protocol",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "method",
+ isAttr: true,
+ type: "String"
+ }]
+}, {
+ name: "GlobalScriptTask",
+ superClass: ["GlobalTask"],
+ properties: [{
+ name: "scriptLanguage",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "script",
+ isAttr: true,
+ type: "String"
+ }]
+}, {
+ name: "GlobalBusinessRuleTask",
+ superClass: ["GlobalTask"],
+ properties: [{
+ name: "implementation",
+ isAttr: true,
+ type: "String"
+ }]
+}, {
+ name: "ComplexBehaviorDefinition",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "condition",
+ type: "FormalExpression"
+ }, {
+ name: "event",
+ type: "ImplicitThrowEvent"
+ }]
+}, {
+ name: "ResourceRole",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "resourceRef",
+ type: "Resource",
+ isReference: true
+ }, {
+ name: "resourceParameterBindings",
+ type: "ResourceParameterBinding",
+ isMany: true
+ }, {
+ name: "resourceAssignmentExpression",
+ type: "ResourceAssignmentExpression"
+ }, {
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }]
+}, {
+ name: "ResourceParameterBinding",
+ properties: [{
+ name: "expression",
+ type: "Expression",
+ xml: {
+ serialize: "xsi:type"
+ }
+ }, {
+ name: "parameterRef",
+ type: "ResourceParameter",
+ isAttr: true,
+ isReference: true
+ }],
+ superClass: ["BaseElement"]
+}, {
+ name: "ResourceAssignmentExpression",
+ properties: [{
+ name: "expression",
+ type: "Expression",
+ xml: {
+ serialize: "xsi:type"
+ }
+ }],
+ superClass: ["BaseElement"]
+}, {
+ name: "Import",
+ properties: [{
+ name: "importType",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "location",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "namespace",
+ isAttr: true,
+ type: "String"
+ }]
+}, {
+ name: "Definitions",
+ superClass: ["BaseElement"],
+ properties: [{
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "targetNamespace",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "expressionLanguage",
+ "default": "http://www.w3.org/1999/XPath",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "typeLanguage",
+ "default": "http://www.w3.org/2001/XMLSchema",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "imports",
+ type: "Import",
+ isMany: true
+ }, {
+ name: "extensions",
+ type: "Extension",
+ isMany: true
+ }, {
+ name: "rootElements",
+ type: "RootElement",
+ isMany: true
+ }, {
+ name: "diagrams",
+ isMany: true,
+ type: "bpmndi:BPMNDiagram"
+ }, {
+ name: "exporter",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "relationships",
+ type: "Relationship",
+ isMany: true
+ }, {
+ name: "exporterVersion",
+ isAttr: true,
+ type: "String"
+ }]
+}];
+var enumerations$3 = [{
+ name: "ProcessType",
+ literalValues: [{
+ name: "None"
+ }, {
+ name: "Public"
+ }, {
+ name: "Private"
+ }]
+}, {
+ name: "GatewayDirection",
+ literalValues: [{
+ name: "Unspecified"
+ }, {
+ name: "Converging"
+ }, {
+ name: "Diverging"
+ }, {
+ name: "Mixed"
+ }]
+}, {
+ name: "EventBasedGatewayType",
+ literalValues: [{
+ name: "Parallel"
+ }, {
+ name: "Exclusive"
+ }]
+}, {
+ name: "RelationshipDirection",
+ literalValues: [{
+ name: "None"
+ }, {
+ name: "Forward"
+ }, {
+ name: "Backward"
+ }, {
+ name: "Both"
+ }]
+}, {
+ name: "ItemKind",
+ literalValues: [{
+ name: "Physical"
+ }, {
+ name: "Information"
+ }]
+}, {
+ name: "ChoreographyLoopType",
+ literalValues: [{
+ name: "None"
+ }, {
+ name: "Standard"
+ }, {
+ name: "MultiInstanceSequential"
+ }, {
+ name: "MultiInstanceParallel"
+ }]
+}, {
+ name: "AssociationDirection",
+ literalValues: [{
+ name: "None"
+ }, {
+ name: "One"
+ }, {
+ name: "Both"
+ }]
+}, {
+ name: "MultiInstanceBehavior",
+ literalValues: [{
+ name: "None"
+ }, {
+ name: "One"
+ }, {
+ name: "All"
+ }, {
+ name: "Complex"
+ }]
+}, {
+ name: "AdHocOrdering",
+ literalValues: [{
+ name: "Parallel"
+ }, {
+ name: "Sequential"
+ }]
+}];
+var xml$1 = {
+ tagAlias: "lowerCase",
+ typePrefix: "t"
+};
+var BpmnPackage = {
+ name: name$5,
+ uri: uri$5,
+ prefix: prefix$5,
+ associations: associations$5,
+ types: types$5,
+ enumerations: enumerations$3,
+ xml: xml$1
+};
+var name$4 = "BPMNDI";
+var uri$4 = "http://www.omg.org/spec/BPMN/20100524/DI";
+var prefix$4 = "bpmndi";
+var types$4 = [{
+ name: "BPMNDiagram",
+ properties: [{
+ name: "plane",
+ type: "BPMNPlane",
+ redefines: "di:Diagram#rootElement"
+ }, {
+ name: "labelStyle",
+ type: "BPMNLabelStyle",
+ isMany: true
+ }],
+ superClass: ["di:Diagram"]
+}, {
+ name: "BPMNPlane",
+ properties: [{
+ name: "bpmnElement",
+ isAttr: true,
+ isReference: true,
+ type: "bpmn:BaseElement",
+ redefines: "di:DiagramElement#modelElement"
+ }],
+ superClass: ["di:Plane"]
+}, {
+ name: "BPMNShape",
+ properties: [{
+ name: "bpmnElement",
+ isAttr: true,
+ isReference: true,
+ type: "bpmn:BaseElement",
+ redefines: "di:DiagramElement#modelElement"
+ }, {
+ name: "isHorizontal",
+ isAttr: true,
+ type: "Boolean"
+ }, {
+ name: "isExpanded",
+ isAttr: true,
+ type: "Boolean"
+ }, {
+ name: "isMarkerVisible",
+ isAttr: true,
+ type: "Boolean"
+ }, {
+ name: "label",
+ type: "BPMNLabel"
+ }, {
+ name: "isMessageVisible",
+ isAttr: true,
+ type: "Boolean"
+ }, {
+ name: "participantBandKind",
+ type: "ParticipantBandKind",
+ isAttr: true
+ }, {
+ name: "choreographyActivityShape",
+ type: "BPMNShape",
+ isAttr: true,
+ isReference: true
+ }],
+ superClass: ["di:LabeledShape"]
+}, {
+ name: "BPMNEdge",
+ properties: [{
+ name: "label",
+ type: "BPMNLabel"
+ }, {
+ name: "bpmnElement",
+ isAttr: true,
+ isReference: true,
+ type: "bpmn:BaseElement",
+ redefines: "di:DiagramElement#modelElement"
+ }, {
+ name: "sourceElement",
+ isAttr: true,
+ isReference: true,
+ type: "di:DiagramElement",
+ redefines: "di:Edge#source"
+ }, {
+ name: "targetElement",
+ isAttr: true,
+ isReference: true,
+ type: "di:DiagramElement",
+ redefines: "di:Edge#target"
+ }, {
+ name: "messageVisibleKind",
+ type: "MessageVisibleKind",
+ isAttr: true,
+ "default": "initiating"
+ }],
+ superClass: ["di:LabeledEdge"]
+}, {
+ name: "BPMNLabel",
+ properties: [{
+ name: "labelStyle",
+ type: "BPMNLabelStyle",
+ isAttr: true,
+ isReference: true,
+ redefines: "di:DiagramElement#style"
+ }],
+ superClass: ["di:Label"]
+}, {
+ name: "BPMNLabelStyle",
+ properties: [{
+ name: "font",
+ type: "dc:Font"
+ }],
+ superClass: ["di:Style"]
+}];
+var enumerations$2 = [{
+ name: "ParticipantBandKind",
+ literalValues: [{
+ name: "top_initiating"
+ }, {
+ name: "middle_initiating"
+ }, {
+ name: "bottom_initiating"
+ }, {
+ name: "top_non_initiating"
+ }, {
+ name: "middle_non_initiating"
+ }, {
+ name: "bottom_non_initiating"
+ }]
+}, {
+ name: "MessageVisibleKind",
+ literalValues: [{
+ name: "initiating"
+ }, {
+ name: "non_initiating"
+ }]
+}];
+var associations$4 = [];
+var BpmnDiPackage = {
+ name: name$4,
+ uri: uri$4,
+ prefix: prefix$4,
+ types: types$4,
+ enumerations: enumerations$2,
+ associations: associations$4
+};
+var name$3 = "DC";
+var uri$3 = "http://www.omg.org/spec/DD/20100524/DC";
+var prefix$3 = "dc";
+var types$3 = [{
+ name: "Boolean"
+}, {
+ name: "Integer"
+}, {
+ name: "Real"
+}, {
+ name: "String"
+}, {
+ name: "Font",
+ properties: [{
+ name: "name",
+ type: "String",
+ isAttr: true
+ }, {
+ name: "size",
+ type: "Real",
+ isAttr: true
+ }, {
+ name: "isBold",
+ type: "Boolean",
+ isAttr: true
+ }, {
+ name: "isItalic",
+ type: "Boolean",
+ isAttr: true
+ }, {
+ name: "isUnderline",
+ type: "Boolean",
+ isAttr: true
+ }, {
+ name: "isStrikeThrough",
+ type: "Boolean",
+ isAttr: true
+ }]
+}, {
+ name: "Point",
+ properties: [{
+ name: "x",
+ type: "Real",
+ "default": "0",
+ isAttr: true
+ }, {
+ name: "y",
+ type: "Real",
+ "default": "0",
+ isAttr: true
+ }]
+}, {
+ name: "Bounds",
+ properties: [{
+ name: "x",
+ type: "Real",
+ "default": "0",
+ isAttr: true
+ }, {
+ name: "y",
+ type: "Real",
+ "default": "0",
+ isAttr: true
+ }, {
+ name: "width",
+ type: "Real",
+ isAttr: true
+ }, {
+ name: "height",
+ type: "Real",
+ isAttr: true
+ }]
+}];
+var associations$3 = [];
+var DcPackage = {
+ name: name$3,
+ uri: uri$3,
+ prefix: prefix$3,
+ types: types$3,
+ associations: associations$3
+};
+var name$2 = "DI";
+var uri$2 = "http://www.omg.org/spec/DD/20100524/DI";
+var prefix$2 = "di";
+var types$2 = [{
+ name: "DiagramElement",
+ isAbstract: true,
+ properties: [{
+ name: "id",
+ isAttr: true,
+ isId: true,
+ type: "String"
+ }, {
+ name: "extension",
+ type: "Extension"
+ }, {
+ name: "owningDiagram",
+ type: "Diagram",
+ isReadOnly: true,
+ isVirtual: true,
+ isReference: true
+ }, {
+ name: "owningElement",
+ type: "DiagramElement",
+ isReadOnly: true,
+ isVirtual: true,
+ isReference: true
+ }, {
+ name: "modelElement",
+ isReadOnly: true,
+ isVirtual: true,
+ isReference: true,
+ type: "Element"
+ }, {
+ name: "style",
+ type: "Style",
+ isReadOnly: true,
+ isVirtual: true,
+ isReference: true
+ }, {
+ name: "ownedElement",
+ type: "DiagramElement",
+ isReadOnly: true,
+ isMany: true,
+ isVirtual: true
+ }]
+}, {
+ name: "Node",
+ isAbstract: true,
+ superClass: ["DiagramElement"]
+}, {
+ name: "Edge",
+ isAbstract: true,
+ superClass: ["DiagramElement"],
+ properties: [{
+ name: "source",
+ type: "DiagramElement",
+ isReadOnly: true,
+ isVirtual: true,
+ isReference: true
+ }, {
+ name: "target",
+ type: "DiagramElement",
+ isReadOnly: true,
+ isVirtual: true,
+ isReference: true
+ }, {
+ name: "waypoint",
+ isUnique: false,
+ isMany: true,
+ type: "dc:Point",
+ xml: {
+ serialize: "xsi:type"
+ }
+ }]
+}, {
+ name: "Diagram",
+ isAbstract: true,
+ properties: [{
+ name: "id",
+ isAttr: true,
+ isId: true,
+ type: "String"
+ }, {
+ name: "rootElement",
+ type: "DiagramElement",
+ isReadOnly: true,
+ isVirtual: true
+ }, {
+ name: "name",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "documentation",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "resolution",
+ isAttr: true,
+ type: "Real"
+ }, {
+ name: "ownedStyle",
+ type: "Style",
+ isReadOnly: true,
+ isMany: true,
+ isVirtual: true
+ }]
+}, {
+ name: "Shape",
+ isAbstract: true,
+ superClass: ["Node"],
+ properties: [{
+ name: "bounds",
+ type: "dc:Bounds"
+ }]
+}, {
+ name: "Plane",
+ isAbstract: true,
+ superClass: ["Node"],
+ properties: [{
+ name: "planeElement",
+ type: "DiagramElement",
+ subsettedProperty: "DiagramElement-ownedElement",
+ isMany: true
+ }]
+}, {
+ name: "LabeledEdge",
+ isAbstract: true,
+ superClass: ["Edge"],
+ properties: [{
+ name: "ownedLabel",
+ type: "Label",
+ isReadOnly: true,
+ subsettedProperty: "DiagramElement-ownedElement",
+ isMany: true,
+ isVirtual: true
+ }]
+}, {
+ name: "LabeledShape",
+ isAbstract: true,
+ superClass: ["Shape"],
+ properties: [{
+ name: "ownedLabel",
+ type: "Label",
+ isReadOnly: true,
+ subsettedProperty: "DiagramElement-ownedElement",
+ isMany: true,
+ isVirtual: true
+ }]
+}, {
+ name: "Label",
+ isAbstract: true,
+ superClass: ["Node"],
+ properties: [{
+ name: "bounds",
+ type: "dc:Bounds"
+ }]
+}, {
+ name: "Style",
+ isAbstract: true,
+ properties: [{
+ name: "id",
+ isAttr: true,
+ isId: true,
+ type: "String"
+ }]
+}, {
+ name: "Extension",
+ properties: [{
+ name: "values",
+ isMany: true,
+ type: "Element"
+ }]
+}];
+var associations$2 = [];
+var xml$2 = {
+ tagAlias: "lowerCase"
+};
+var DiPackage = {
+ name: name$2,
+ uri: uri$2,
+ prefix: prefix$2,
+ types: types$2,
+ associations: associations$2,
+ xml: xml$2
+};
+var name$1 = "bpmn.io colors for BPMN";
+var uri$1 = "http://bpmn.io/schema/bpmn/biocolor/1.0";
+var prefix$1 = "bioc";
+var types$1 = [{
+ name: "ColoredShape",
+ "extends": ["bpmndi:BPMNShape"],
+ properties: [{
+ name: "stroke",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "fill",
+ isAttr: true,
+ type: "String"
+ }]
+}, {
+ name: "ColoredEdge",
+ "extends": ["bpmndi:BPMNEdge"],
+ properties: [{
+ name: "stroke",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "fill",
+ isAttr: true,
+ type: "String"
+ }]
+}];
+var enumerations$1 = [];
+var associations$1 = [];
+var BiocPackage = {
+ name: name$1,
+ uri: uri$1,
+ prefix: prefix$1,
+ types: types$1,
+ enumerations: enumerations$1,
+ associations: associations$1
+};
+var name$6 = "BPMN in Color";
+var uri$6 = "http://www.omg.org/spec/BPMN/non-normative/color/1.0";
+var prefix$6 = "color";
+var types$6 = [{
+ name: "ColoredLabel",
+ "extends": ["bpmndi:BPMNLabel"],
+ properties: [{
+ name: "color",
+ isAttr: true,
+ type: "String"
+ }]
+}, {
+ name: "ColoredShape",
+ "extends": ["bpmndi:BPMNShape"],
+ properties: [{
+ name: "background-color",
+ isAttr: true,
+ type: "String"
+ }, {
+ name: "border-color",
+ isAttr: true,
+ type: "String"
+ }]
+}, {
+ name: "ColoredEdge",
+ "extends": ["bpmndi:BPMNEdge"],
+ properties: [{
+ name: "border-color",
+ isAttr: true,
+ type: "String"
+ }]
+}];
+var enumerations = [];
+var associations$6 = [];
+var BpmnInColorPackage = {
+ name: name$6,
+ uri: uri$6,
+ prefix: prefix$6,
+ types: types$6,
+ enumerations: enumerations,
+ associations: associations$6
+};
+var packages = {
+ bpmn: BpmnPackage,
+ bpmndi: BpmnDiPackage,
+ dc: DcPackage,
+ di: DiPackage,
+ bioc: BiocPackage,
+ color: BpmnInColorPackage
+};
+function simple(additionalPackages, options) {
+ var pks = (0,min_dash__WEBPACK_IMPORTED_MODULE_13__.assign)({}, packages, additionalPackages);
+ return new BpmnModdle(pks, options);
+}
+
+var name = "zeebe";
+var prefix = "zeebe";
+var uri = "http://camunda.org/schema/zeebe/1.0";
+var xml = {
+ tagAlias: "lowerCase"
+};
+var associations = [
+];
+var types = [
+ {
+ name: "ZeebeServiceTask",
+ "extends": [
+ "bpmn:ServiceTask",
+ "bpmn:BusinessRuleTask",
+ "bpmn:ScriptTask",
+ "bpmn:SendTask",
+ "bpmn:EndEvent",
+ "bpmn:IntermediateThrowEvent"
+ ],
+ properties: [
+ {
+ name: "retryCounter",
+ type: "String",
+ isAttr: true
+ }
+ ]
+ },
+ {
+ name: "IoMapping",
+ superClass: [
+ "Element"
+ ],
+ properties: [
+ {
+ name: "ioMapping",
+ type: "IoMapping"
+ },
+ {
+ name: "inputParameters",
+ isMany: true,
+ type: "Input"
+ },
+ {
+ name: "outputParameters",
+ isMany: true,
+ type: "Output"
+ }
+ ],
+ meta: {
+ allowedIn: [
+ "bpmn:CallActivity",
+ "bpmn:Event",
+ "bpmn:ReceiveTask",
+ "zeebe:ZeebeServiceTask",
+ "bpmn:SubProcess",
+ "bpmn:UserTask"
+ ]
+ }
+ },
+ {
+ name: "InputOutputParameter",
+ properties: [
+ {
+ name: "source",
+ isAttr: true,
+ type: "String"
+ },
+ {
+ name: "target",
+ isAttr: true,
+ type: "String"
+ }
+ ]
+ },
+ {
+ name: "Subscription",
+ superClass: [
+ "Element"
+ ],
+ properties: [
+ {
+ name: "correlationKey",
+ isAttr: true,
+ type: "String"
+ }
+ ]
+ },
+ {
+ name: "Input",
+ superClass: [
+ "InputOutputParameter"
+ ],
+ meta: {
+ allowedIn: [
+ "bpmn:CallActivity",
+ "zeebe:ZeebeServiceTask",
+ "bpmn:SubProcess",
+ "bpmn:UserTask"
+ ]
+ }
+ },
+ {
+ name: "Output",
+ superClass: [
+ "InputOutputParameter"
+ ],
+ meta: {
+ allowedIn: [
+ "bpmn:CallActivity",
+ "bpmn:Event",
+ "bpmn:ReceiveTask",
+ "zeebe:ZeebeServiceTask",
+ "bpmn:SubProcess",
+ "bpmn:UserTask"
+ ]
+ }
+ },
+ {
+ name: "TaskHeaders",
+ superClass: [
+ "Element"
+ ],
+ meta: {
+ allowedIn: [
+ "zeebe:ZeebeServiceTask",
+ "bpmn:UserTask"
+ ]
+ },
+ properties: [
+ {
+ name: "values",
+ type: "Header",
+ isMany: true
+ }
+ ]
+ },
+ {
+ name: "Header",
+ superClass: [
+ "Element"
+ ],
+ properties: [
+ {
+ name: "id",
+ type: "String",
+ isAttr: true
+ },
+ {
+ name: "key",
+ type: "String",
+ isAttr: true
+ },
+ {
+ name: "value",
+ type: "String",
+ isAttr: true
+ }
+ ]
+ },
+ {
+ name: "TaskDefinition",
+ superClass: [
+ "Element"
+ ],
+ meta: {
+ allowedIn: [
+ "zeebe:ZeebeServiceTask"
+ ]
+ },
+ properties: [
+ {
+ name: "type",
+ type: "String",
+ isAttr: true
+ },
+ {
+ name: "retries",
+ type: "String",
+ isAttr: true
+ }
+ ]
+ },
+ {
+ name: "LoopCharacteristics",
+ superClass: [
+ "Element"
+ ],
+ meta: {
+ allowedIn: [
+ "zeebe:ZeebeServiceTask",
+ "bpmn:ReceiveTask",
+ "bpmn:SubProcess"
+ ]
+ },
+ properties: [
+ {
+ name: "inputCollection",
+ type: "String",
+ isAttr: true
+ },
+ {
+ name: "inputElement",
+ type: "String",
+ isAttr: true
+ },
+ {
+ name: "outputCollection",
+ type: "String",
+ isAttr: true
+ },
+ {
+ name: "outputElement",
+ type: "String",
+ isAttr: true
+ }
+ ]
+ },
+ {
+ name: "CalledElement",
+ superClass: [
+ "Element"
+ ],
+ meta: {
+ allowedIn: [
+ "bpmn:CallActivity"
+ ]
+ },
+ properties: [
+ {
+ name: "processId",
+ type: "String",
+ isAttr: true
+ },
+ {
+ name: "processIdExpression",
+ type: "String",
+ isAttr: true
+ },
+ {
+ name: "propagateAllChildVariables",
+ isAttr: true,
+ type: "Boolean"
+ },
+ {
+ name: "propagateAllParentVariables",
+ isAttr: true,
+ type: "Boolean",
+ "default": true
+ }
+ ]
+ },
+ {
+ name: "UserTaskForm",
+ superClass: [
+ "Element"
+ ],
+ meta: {
+ allowedIn: [
+ "bpmn:Process"
+ ]
+ },
+ properties: [
+ {
+ name: "id",
+ type: "String",
+ isAttr: true
+ },
+ {
+ name: "body",
+ type: "String",
+ isBody: true
+ }
+ ]
+ },
+ {
+ name: "FormDefinition",
+ superClass: [
+ "Element"
+ ],
+ meta: {
+ allowedIn: [
+ "bpmn:UserTask"
+ ]
+ },
+ properties: [
+ {
+ name: "formKey",
+ type: "String",
+ isAttr: true
+ },
+ {
+ name: "formId",
+ type: "String",
+ isAttr: true
+ }
+ ]
+ },
+ {
+ name: "CalledDecision",
+ superClass: [
+ "Element"
+ ],
+ meta: {
+ allowedIn: [
+ "bpmn:BusinessRuleTask"
+ ]
+ },
+ properties: [
+ {
+ name: "decisionId",
+ type: "String",
+ isAttr: true
+ },
+ {
+ name: "resultVariable",
+ type: "String",
+ isAttr: true
+ }
+ ]
+ },
+ {
+ name: "AssignmentDefinition",
+ superClass: [
+ "Element"
+ ],
+ meta: {
+ allowedIn: [
+ "bpmn:UserTask"
+ ]
+ },
+ properties: [
+ {
+ name: "assignee",
+ type: "String",
+ isAttr: true
+ },
+ {
+ name: "candidateGroups",
+ type: "String",
+ isAttr: true
+ },
+ {
+ name: "candidateUsers",
+ type: "String",
+ isAttr: true
+ }
+ ]
+ },
+ {
+ name: "TaskSchedule",
+ superClass: [
+ "Element"
+ ],
+ meta: {
+ allowedIn: [
+ "bpmn:UserTask"
+ ]
+ },
+ properties: [
+ {
+ name: "dueDate",
+ type: "String",
+ isAttr: true
+ },
+ {
+ name: "followUpDate",
+ type: "String",
+ isAttr: true
+ }
+ ]
+ },
+ {
+ name: "Properties",
+ superClass: [
+ "Element"
+ ],
+ properties: [
+ {
+ name: "properties",
+ type: "Property",
+ isMany: true
+ }
+ ]
+ },
+ {
+ name: "Property",
+ properties: [
+ {
+ name: "name",
+ type: "String",
+ isAttr: true
+ },
+ {
+ name: "value",
+ type: "String",
+ isAttr: true
+ }
+ ]
+ },
+ {
+ name: "TemplateSupported",
+ isAbstract: true,
+ "extends": [
+ "bpmn:Collaboration",
+ "bpmn:Process",
+ "bpmn:FlowElement"
+ ],
+ properties: [
+ {
+ name: "modelerTemplate",
+ isAttr: true,
+ type: "String"
+ },
+ {
+ name: "modelerTemplateVersion",
+ isAttr: true,
+ type: "Integer"
+ },
+ {
+ name: "modelerTemplateIcon",
+ isAttr: true,
+ type: "String"
+ }
+ ]
+ },
+ {
+ name: "TemplatedRootElement",
+ isAbstract: true,
+ "extends": [
+ "bpmn:Error",
+ "bpmn:Escalation",
+ "bpmn:Message",
+ "bpmn:Signal"
+ ],
+ properties: [
+ {
+ name: "modelerTemplate",
+ isAttr: true,
+ type: "String"
+ }
+ ]
+ },
+ {
+ name: "Script",
+ superClass: [
+ "Element"
+ ],
+ meta: {
+ allowedIn: [
+ "bpmn:ScriptTask"
+ ]
+ },
+ properties: [
+ {
+ name: "expression",
+ type: "String",
+ isAttr: true
+ },
+ {
+ name: "resultVariable",
+ type: "String",
+ isAttr: true
+ }
+ ]
+ }
+];
+var zeebeModdle = {
+ name: name,
+ prefix: prefix,
+ uri: uri,
+ xml: xml,
+ associations: associations,
+ types: types
+};
+
+/**
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+ * under one or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright
+ * ownership.
+ *
+ * Camunda licenses this file to you under the MIT; you may not use this file
+ * except in compliance with the MIT License.
+ */
- /**
- * adds an empty option to the list
- */
- function addEmptyParameter(list) {
- return list.push({ 'label': '', 'value': '', 'name': '' });
- }
+const elementTemplateLintRule = ({
+ templates = []
+}) => {
+ const moddle = new simple({
+ zeebe: zeebeModdle
+ });
+ const validator = new Validator(moddle).addAll(templates);
+ const validTemplates = validator.getValidTemplates();
+
+ // We use the ElementTemplates Module without the required bpmn-js modules
+ // As we only use it to facilitate template ID and version lookup,
+ // access to commandstack etc. is not required
+ const elementTemplates = new ElementTemplates();
+ elementTemplates.set(validTemplates);
+ function check(node, reporter) {
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_11__.is)(node, 'bpmn:FlowElement')) {
+ return;
+ }
+ let template = elementTemplates.get(node);
+ const templateId = elementTemplates._getTemplateId(node);
+
+ // Handle missing template
+ if (templateId && !template) {
+ reporter.report(node.id, 'Linked element template not found', {
+ name: node.name
+ });
+ return;
+ }
+ if (!template) {
+ return;
+ }
+ template = applyConditions(node, template);
+
+ // Check attributes
+ template.properties.forEach(property => {
+ const value = getPropertyValue(node, property);
+ const error = validateProperty(value, property);
+ if (!error) {
+ return;
+ }
+ reporter.report(node.id, error, {
+ propertiesPanel: {
+ entryIds: [getEntryId(property, template)]
+ },
+ name: node.name
+ });
+ });
+ }
+ return {
+ check
+ };
+};
+const ElementTemplateLinterPlugin = function (templates) {
+ return {
+ config: {
+ rules: {
+ 'element-templates/validate': ['error', {
+ templates
+ }]
+ }
+ },
+ resolver: new (bpmnlint_lib_resolver_static_resolver__WEBPACK_IMPORTED_MODULE_10___default())({
+ 'rule:bpmnlint-plugin-element-templates/validate': elementTemplateLintRule
+ })
+ };
+};
+
+// helpers //////////////////////
+
+function getEntryId(property, template) {
+ const index = template.properties.filter(p => p.group === property.group).indexOf(property);
+ const path = ['custom-entry', template.id];
+ if (property.group) {
+ path.push(property.group);
+ }
+ path.push(index);
+ return path.join('-');
+}
+
+
+//# sourceMappingURL=index.esm.js.map
+
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js-properties-panel/dist/index.esm.js":
+/*!******************************************************************!*\
+ !*** ../node_modules/bpmn-js-properties-panel/dist/index.esm.js ***!
+ \******************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ BpmnPropertiesPanelModule: () => (/* binding */ index$3),
+/* harmony export */ BpmnPropertiesProviderModule: () => (/* binding */ index$2),
+/* harmony export */ CamundaPlatformPropertiesProviderModule: () => (/* binding */ index),
+/* harmony export */ ZeebePropertiesProviderModule: () => (/* binding */ index$1),
+/* harmony export */ ZeebeTooltipProvider: () => (/* binding */ TooltipProvider),
+/* harmony export */ useService: () => (/* binding */ useService)
+/* harmony export */ });
+/* harmony import */ var _bpmn_io_properties_panel_preact_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @bpmn-io/properties-panel/preact/hooks */ "../node_modules/@bpmn-io/properties-panel/preact/hooks/dist/hooks.module.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @bpmn-io/properties-panel */ "../node_modules/@bpmn-io/properties-panel/dist/index.esm.js");
+/* harmony import */ var _bpmn_io_properties_panel_preact__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @bpmn-io/properties-panel/preact */ "../node_modules/@bpmn-io/properties-panel/preact/dist/preact.module.js");
+/* harmony import */ var bpmn_js_lib_features_label_editing_LabelUtil__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! bpmn-js/lib/features/label-editing/LabelUtil */ "../node_modules/bpmn-js/lib/util/LabelUtil.js");
+/* harmony import */ var bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! bpmn-js/lib/features/modeling/util/ModelingUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var bpmn_js_lib_util_DiUtil__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! bpmn-js/lib/util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
+/* harmony import */ var _bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @bpmn-io/properties-panel/preact/compat */ "../node_modules/@bpmn-io/properties-panel/preact/compat/dist/compat.module.js");
+/* harmony import */ var _bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @bpmn-io/properties-panel/preact/jsx-runtime */ "../node_modules/@bpmn-io/properties-panel/preact/jsx-runtime/dist/jsxRuntime.module.js");
+/* harmony import */ var diagram_js_lib_features_keyboard_KeyboardUtil__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! diagram-js/lib/features/keyboard/KeyboardUtil */ "../node_modules/diagram-js/lib/features/keyboard/KeyboardUtil.js");
+/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! min-dom */ "../node_modules/min-dom/dist/index.esm.js");
+/* harmony import */ var ids__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ids */ "../node_modules/ids/dist/index.esm.js");
+/* harmony import */ var diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! diagram-js/lib/util/Collections */ "../node_modules/diagram-js/lib/util/Collections.js");
+/* harmony import */ var _bpmn_io_extract_process_variables_zeebe__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @bpmn-io/extract-process-variables/zeebe */ "../node_modules/@bpmn-io/extract-process-variables/zeebe/index.js");
+/* harmony import */ var array_move__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! array-move */ "../node_modules/array-move/index.js");
+/* harmony import */ var _bpmn_io_extract_process_variables__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @bpmn-io/extract-process-variables */ "../node_modules/@bpmn-io/extract-process-variables/dist/index.js");
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+const BpmnPropertiesPanelContext = (0,_bpmn_io_properties_panel_preact__WEBPACK_IMPORTED_MODULE_2__.createContext)({
+ selectedElement: null,
+ injector: null,
+ getService() {
+ return null;
+ }
+});
+
+function useService(type, strict) {
+ const {
+ getService
+ } = (0,_bpmn_io_properties_panel_preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useContext)(BpmnPropertiesPanelContext);
+ return getService(type, strict);
+}
+
+function _extends$1o() { _extends$1o = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1o.apply(this, arguments); }
+var AssociationIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$1o({
+ width: "32",
+ height: "32",
+ xmlns: "http://www.w3.org/2000/svg"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ stroke: "#000",
+ strokeWidth: "2",
+ fill: "none",
+ strokeDasharray: "3.3,6",
+ strokeLinecap: "square",
+ d: "M1.5 30.5l29-29"
+})));
+
+function _extends$1n() { _extends$1n = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1n.apply(this, arguments); }
+var BusinessRuleTaskIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$1n({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M6.494 3C2.916 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.012C28.015 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5zM5.296 7.398v12.665h16.87V7.398H5.296zm.718 4.386h15.433v3.44H9.985v-3.432h-.719v3.431H6.014v-3.44zm0 4.158h3.252v3.403H6.014v-3.403zm3.97 0h11.463v3.403H9.985v-3.403z"
+}), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M6.079 8.209v3.587H21.44V8.209z"
+})));
+
+function _extends$1m() { _extends$1m = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1m.apply(this, arguments); }
+var CallActivityIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$1m({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M24.978 3c3.761 0 6.89 2.979 7.018 6.695l.004.238V22.4c0 3.747-3.05 6.804-6.783 6.93l-.24.003H7.023c-3.761 0-6.89-2.978-7.018-6.695L0 22.4V9.933C0 6.187 3.05 3.13 6.783 3.004L7.023 3h17.955zm0 3.667H7.022c-1.842 0-3.255 1.344-3.35 3.079l-.005.187V22.4c0 1.761 1.35 3.167 3.16 3.262l.195.005L10 25.666V15h12v10.666h2.978c1.842 0 3.255-1.344 3.35-3.079l.005-.187V9.933c0-1.761-1.35-3.166-3.16-3.261l-.195-.005zm-3.732 9.087H10.754v9.912h10.491v-9.912zm-4.475 1.817v2.658h2.658v1.542H16.77v2.658H15.23V21.77H12.57V20.23h2.658V17.57h1.542z"
+})));
+
+function _extends$1l() { _extends$1l = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1l.apply(this, arguments); }
+var CollaborationIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$1l({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("g", {
+ fillRule: "evenodd"
+}, /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ fillRule: "nonzero",
+ d: "M0 0v8.62h32V0H0zm1.655 7.054v-5.37h28.62v5.37H1.656zM0 23.38V32h32v-8.62H0zm1.655 7.054v-5.37h28.62v5.37H1.656z"
+}), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M24 8l4 7h-8l4-7zm0 2l-2.28 4h4.56L24 10zM23.5 21h1v3h-1zM23.5 15h1v3h-1zM8 24l-4-7h8l-4 7zm0-2l2.28-4H5.72L8 22zM7.5 8h1v3h-1zM7.5 14h1v3h-1z"
+}))));
+
+function _extends$1k() { _extends$1k = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1k.apply(this, arguments); }
+var ConditionalFlowIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$1k({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M32 .041S20.42 5.95 14.537 8.713c1.26 1.15 2.432 2.392 3.648 3.588-5.703 5.78-3.15 3.303-8.087 8.316l-8.472 1.377L0 32l10.006-1.626.098-.598 1.279-7.873c4.975-5.052 2.403-2.555 8.118-8.346 1.218 1.214 2.43 2.435 3.648 3.648C26.29 11.018 32 .041 32 .041zM9.603 22.397L8.54 28.91 2.03 29.97l1.061-6.515 6.512-1.058z"
+})));
+
+function _extends$1j() { _extends$1j = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1j.apply(this, arguments); }
+var ConnectionIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$1j({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M32 .06S20.33 6.014 14.403 8.798c1.27 1.16 2.451 2.41 3.676 3.616L0 30.734 1.325 32l18.08-18.32c1.227 1.223 2.448 2.453 3.676 3.676C26.247 11.12 32 .06 32 .06z"
+})));
+
+function _extends$1i() { _extends$1i = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1i.apply(this, arguments); }
+var DataInputOutputAssociationIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$1i({
+ width: "32",
+ height: "32",
+ xmlns: "http://www.w3.org/2000/svg"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ stroke: "#000",
+ strokeWidth: "2",
+ strokeLinecap: "round",
+ strokeDasharray: "1.1,4.3",
+ d: "M1.5 30.5L27 5"
+}), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M31.803.197L26.5 16.107l-1.52-1.52 3.783-11.35-11.35 3.783-1.52-1.52z"
+})));
+
+function _extends$1h() { _extends$1h = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1h.apply(this, arguments); }
+var DataInputIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$1h({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M20.833 0H3.488v32H28V7.36L20.833 0zm-2.105 1.818v7.507h7.454v20.857H5.306V1.818h13.422zm1.818.493l5.06 5.196h-5.06V2.311zm-9.182.86v3.744H7.081v3.222h4.283v3.743l5.7-5.354-5.7-5.354zm.808 1.868l3.711 3.487-3.71 3.487V9.329H7.888V7.723h4.283V5.039z"
+})));
+
+function _extends$1g() { _extends$1g = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1g.apply(this, arguments); }
+var DataObjectIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$1g({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M21.345 0H4v32h24.512V7.36L21.345 0zM19.24 1.818v7.507h7.454v20.857H5.818V1.818H19.24zm1.818.493l5.06 5.196h-5.06V2.311z"
+})));
+
+function _extends$1f() { _extends$1f = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1f.apply(this, arguments); }
+var DataOutputIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$1f({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M20.833 0H3.488v32H28V7.36L20.833 0zm-2.105 1.818v7.507h7.454v20.857H5.306V1.818h13.422zm1.818.493l5.06 5.196h-5.06V2.311zm-9.182.86v3.744H7.081v3.222h4.283v3.743l5.7-5.354-5.7-5.354z"
+})));
+
+function _extends$1e() { _extends$1e = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1e.apply(this, arguments); }
+var DataStoreIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$1e({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M16.008 1c-3.712 0-7.417.306-10.319.939-1.45.316-2.7.71-3.68 1.226C1.065 3.662.297 4.304.061 5.23a.823.823 0 00-.035.15L0 5.502l.017.084c-.012 7.41 0 14.46 0 22.08l.017.082c.203.985.995 1.656 1.975 2.172.98.517 2.23.91 3.68 1.226 2.902.633 6.607.94 10.319.94 3.711 0 7.416-.307 10.318-.94 1.451-.316 2.701-.71 3.68-1.226.98-.516 1.772-1.187 1.975-2.172l.017-.082V5.541a.825.825 0 000-.106v-.016l-.002-.013a.823.823 0 00-.046-.197c-.244-.916-1.007-1.55-1.943-2.044-.98-.516-2.23-.91-3.68-1.226C23.423 1.306 19.718 1 16.006 1zm0 1.646c3.62 0 7.245.308 9.968.901 1.36.297 2.497.67 3.263 1.074.612.323.932.643 1.063.882-.131.24-.451.56-1.063.882-.766.404-1.902.777-3.263 1.074-2.723.594-6.349.901-9.968.901-3.62 0-7.245-.307-9.968-.901-1.361-.297-2.497-.67-3.264-1.074-.611-.322-.931-.642-1.062-.882.13-.24.451-.56 1.062-.882.767-.403 1.903-.777 3.264-1.074 2.723-.593 6.348-.9 9.968-.9zM1.664 7.647c.112.067.227.132.345.194.98.517 2.23.91 3.68 1.226 2.902.633 6.607.94 10.319.94 3.711 0 7.416-.307 10.318-.94 1.451-.316 2.701-.71 3.68-1.226.119-.062.234-.127.346-.194v1.93c-.08.245-.398.619-1.113.995-.766.404-1.902.777-3.263 1.074-2.723.594-6.349.901-9.968.901-3.62 0-7.245-.307-9.968-.9-1.361-.298-2.497-.671-3.264-1.075-.714-.376-1.032-.75-1.112-.995v-1.93zm0 4.187c.112.067.227.132.345.195.98.516 2.23.91 3.68 1.226 2.902.632 6.607.938 10.319.938 3.711 0 7.416-.306 10.318-.938 1.451-.317 2.701-.71 3.68-1.226.119-.063.234-.128.346-.195v1.93c-.08.245-.398.619-1.113.995-.766.404-1.902.777-3.263 1.074-2.723.594-6.349.901-9.968.901-3.62 0-7.245-.307-9.968-.9-1.361-.298-2.497-.67-3.264-1.075-.714-.376-1.032-.75-1.112-.995v-1.93zm0 4.188c.112.067.227.131.345.194.98.516 2.23.91 3.68 1.226 2.902.633 6.607.939 10.319.939 3.711 0 7.416-.306 10.318-.94 1.451-.316 2.701-.709 3.68-1.225.119-.063.234-.127.346-.194V27.47c-.08.245-.398.618-1.113.995-.766.404-1.902.777-3.263 1.074-2.723.594-6.349.9-9.968.9-3.62 0-7.245-.306-9.968-.9-1.361-.297-2.497-.67-3.264-1.074-.714-.377-1.032-.75-1.112-.995V16.022z"
+})));
+
+function _extends$1d() { _extends$1d = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1d.apply(this, arguments); }
+var DefaultFlowIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$1d({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M32 .06S20.33 6.014 14.403 8.798c1.27 1.16 2.451 2.41 3.676 3.616L6.84 23.804H.046v1.755h5.063L0 30.735 1.325 32l6.357-6.441h7.145v-1.756H9.414l9.99-10.123c1.228 1.223 2.45 2.453 3.677 3.676C26.247 11.12 32 .06 32 .06z"
+})));
+
+function _extends$1c() { _extends$1c = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1c.apply(this, arguments); }
+var EndEventCancelIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$1c({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.676.051C7.943.058.834 6.501.104 14.21c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 5.009 23.394.364 16.978.083A18.532 18.532 0 0015.676.05zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm-3.955 3.918L8.94 12.072l3.985 3.985-3.913 3.913 3.048 3.047 3.913-3.913 3.987 3.987 3.096-3.096-3.987-3.987 3.913-3.913-3.047-3.048-3.913 3.913-3.985-3.985z"
+})));
+
+function _extends$1b() { _extends$1b = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1b.apply(this, arguments); }
+var EndEventCompensationIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$1b({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.676.051C7.943.058.834 6.501.104 14.21c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 5.009 23.394.364 16.978.083A18.532 18.532 0 0015.676.05zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm-.56 5.744l-7.407 5.23 7.408 5.234v-5.057c2.384 1.687 4.771 3.371 7.157 5.057V10.801l-7.157 5.054v-5.054z"
+})));
+
+function _extends$1a() { _extends$1a = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1a.apply(this, arguments); }
+var EndEventErrorIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$1a({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.676.051C7.943.058.834 6.501.104 14.21c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 5.009 23.394.364 16.978.083A18.532 18.532 0 0015.676.05zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm6.132 4.166l-3.633 7.363-4.516-5.874-4.102 12.131 4.599-5.91 4.743 5.427 2.909-13.137z"
+})));
+
+function _extends$19() { _extends$19 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$19.apply(this, arguments); }
+var EndEventEscalationIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$19({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.676.051C7.943.058.834 6.501.104 14.21c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 5.009 23.394.364 16.978.083A18.532 18.532 0 0015.676.05zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm.006 3.9c-1.672 4.653-2.733 9.5-4.406 14.153 1.535-1.525 2.872-3.234 4.406-4.759l4.406 4.76c-1.497-4.71-2.91-9.445-4.406-14.155z"
+})));
+
+function _extends$18() { _extends$18 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$18.apply(this, arguments); }
+var EndEventLinkIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$18({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.676 0C7.943.007.834 6.45.104 14.16c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 4.958 23.394.313 16.978.032A18.532 18.532 0 0015.676 0zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm1.78 4.065v3.555H9.779v6.713h7.994v3.554l5.828-6.91-5.828-6.912z"
+})));
+
+function _extends$17() { _extends$17 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$17.apply(this, arguments); }
+var EndEventMessageIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$17({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.676 0C7.943.007.834 6.45.104 14.16c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 4.958 23.394.313 16.978.032A18.532 18.532 0 0015.676 0zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm-5.91 5.448l6.041 4.9 6.04-4.9H10.084zm-1.34 1.137v9.92h14.513v-9.718l-7.132 5.786-7.381-5.988z"
+})));
+
+function _extends$16() { _extends$16 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$16.apply(this, arguments); }
+var EndEventMultipleIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$16({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.676 0C7.943.007.834 6.45.104 14.16c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 4.958 23.394.313 16.978.032A18.529 18.529 0 0015.676 0zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm.011 3.039l-7.619 5.53 2.91 8.95h9.418l2.91-8.95-7.619-5.53z"
+})));
+
+function _extends$15() { _extends$15 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$15.apply(this, arguments); }
+var EndEventNoneIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$15({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.84.042C8.654-.01 1.913 5.437.4 12.454-1.057 18.62 1.554 25.495 6.784 29.09c5.076 3.636 12.31 3.92 17.59.544 5.309-3.251 8.435-9.744 7.445-15.921C30.91 7.307 25.795 1.738 19.442.422a16.064 16.064 0 00-3.602-.38zm.382 5.01c5.28-.017 10.13 4.353 10.669 9.61.687 5.025-2.552 10.281-7.423 11.792-4.754 1.617-10.486-.447-12.962-4.856-2.74-4.575-1.574-11.094 2.768-14.27a11.05 11.05 0 016.948-2.276z"
+})));
+
+function _extends$14() { _extends$14 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$14.apply(this, arguments); }
+var EndEventSignalIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$14({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.676.051C7.943.058.834 6.501.104 14.21c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 5.009 23.394.364 16.978.083A18.532 18.532 0 0015.676.05zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm.006 3.492c-2.261 4.07-4.532 8.136-6.797 12.204h13.595L15.999 8.55z"
+})));
+
+function _extends$13() { _extends$13 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$13.apply(this, arguments); }
+var EndEventTerminateIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$13({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.676.051C7.943.058.834 6.501.104 14.21c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 5.009 23.394.364 16.978.083A18.532 18.532 0 0015.676.05zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm.006 2.859c-5.264-.2-9.495 5.551-7.755 10.516 1.366 5.085 8.108 7.436 12.339 4.301 4.455-2.807 4.708-9.943.462-13.058A8.128 8.128 0 0016 7.915z"
+})));
+
+function _extends$12() { _extends$12 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$12.apply(this, arguments); }
+var EventSubProcessExpandedIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$12({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M7.295 4.78h1.779V3.003h-1.78V4.78zm3.558 0h1.779V3.003h-1.78V4.78zm3.557 0h1.78V3.003h-1.78V4.78zm3.558 0h1.78V3.003h-1.78V4.78zm3.558 0h1.779V3.003h-1.779V4.78zm3.558 0c.55.014 1.106-.034 1.654.045l.245-1.762c-.629-.096-1.266-.05-1.9-.061V4.78zM5.732 3.004a5.933 5.933 0 00-.915.093c.111.582.226 1.164.315 1.75.358-.101.947.098.746-.483-.096-.382.164-1.208-.146-1.36zm22.372 2.281c.427.234.812.547 1.13.915.42-.4 1.002-.777 1.33-1.18a5.863 5.863 0 00-1.593-1.289l-.867 1.554zm-25.27-1.44c-.587.354-1.11.811-1.539 1.345.47.333.96.86 1.417 1.077.299-.362.66-.673 1.065-.913-.328-.493-.55-1.055-.944-1.509zM30.515 7.26c-.563.046-.557.342-.378.784.154.25-.097.862.25.85.525-.023 1.14.043 1.612-.032a5.891 5.891 0 00-.362-2.027l-1.122.425zM.268 7.114A6.042 6.042 0 000 9.052h1.78c-.013-.5.047-1.003.208-1.478L.296 7.027l-.026.079-.002.008zM30.22 12.45H32v-1.779h-1.779v1.779zm-30.22.16h1.78v-1.779H0v1.78zm30.22 3.398H32v-1.78h-1.779v1.78zm-30.22.16h1.78v-1.779H0v1.779zm30.22 3.398H32v-1.78h-1.779v1.78zm-30.22.16h1.78v-1.78H0v1.78zm30.22 3.397H32v-1.779h-1.779v1.78zm-30.22.16h1.78v-1.778H0v1.778zm30.137 1.47a4.059 4.059 0 01-.522 1.32c.506.283 1.046.715 1.53.908a5.836 5.836 0 00.744-1.918c-.576-.094-1.209-.264-1.752-.31zm-29.984.51c.157.676.435 1.325.82 1.904l1.486-.977a4.065 4.065 0 01-.577-1.347l-1.73.42zm28.427 1.943c-.371.277-.79.49-1.234.627l.548 1.693a5.84 5.84 0 001.835-.96l-1.082-1.412-.066.05-.001.002zm-26.164 1.47c.567.413 1.21.722 1.886.907.14-.569.343-1.175.444-1.722a4.062 4.062 0 01-1.283-.624l-1.047 1.438zm3.88 1.119h1.779v-1.78h-1.78v1.78zm3.55 0h1.787v-1.78H9.846v1.78zm3.565 0h1.78v-1.78h-1.78v1.78zm3.558 0h1.78v-1.78h-1.78v1.78zm3.451 0h1.743v-1.78h-1.743v1.78zm3.665 0h1.779v-1.78h-1.78v1.78zm-1.922-.545V16.776H9.846V29.25h12.318zM10.967 17.905h10.068V27.97H10.967V17.905zm1.336 3.998v1.711h7.396v-1.711h-7.396z",
+ opacity: ".97"
+})));
+
+function _extends$11() { _extends$11 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$11.apply(this, arguments); }
+var GatewayComplexIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$11({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M16.001 0a1.29 1.29 0 00-.917.373L.373 15.084a1.316 1.316 0 00.002 1.834l14.71 14.709a1.313 1.313 0 001.833 0l14.711-14.711a1.316 1.316 0 00-.002-1.834L16.917.372A1.294 1.294 0 0016.002 0zM16 2.181l13.821 13.821L16 29.823 2.179 16.003 16 2.18zm-.327 6.79v.007l-.145.027-.118.08-.083.123-.028.145v4.954L11.793 10.8l-.125-.08-.14-.029-.144.027-.122.082-.46.46-.085.125-.026.142.028.14.08.125 3.505 3.505H9.347l-.001-.002-.145.032-.118.08-.083.122-.028.146v.652l.029.147.082.119.12.08.144.032h4.956L10.8 20.207v-.001l-.084.124-.026.142.028.14.08.124.46.461.126.082.14.029.143-.027.124-.084L15.3 17.69v4.964-.001l.028.147.082.12.12.08.144.031h.652l.148-.03.118-.08.083-.12.028-.146v-4.962l3.505 3.505.126.082.14.027.142-.027.124-.084.461-.46.083-.123s.028-.144.027-.146l-.028-.14-.082-.126-3.496-3.496h4.948l.148-.03.119-.08.082-.12.028-.147v-.652l-.028-.145-.083-.122-.119-.08s-.147-.033-.147-.031h-4.964l3.512-3.512.082-.122.029-.144-.028-.14-.084-.124-.46-.461-.123-.082-.14-.027-.145.027-.122.082-3.507 3.507V9.348l-.028-.146-.082-.122-.12-.08-.147-.029h-.652z"
+})));
+
+function _extends$10() { _extends$10 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$10.apply(this, arguments); }
+var GatewayEventBasedIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$10({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M16 0a1.29 1.29 0 00-.918.373L.371 15.084a1.316 1.316 0 00.002 1.834l14.71 14.709a1.313 1.313 0 001.833 0l14.711-14.711a1.316 1.316 0 00-.002-1.834L16.915.372A1.294 1.294 0 0016 0zm-.002 2.181l13.821 13.821-13.821 13.821-13.821-13.82L15.998 2.18zm0 5.876l-.254.185-7.377 5.355 2.915 8.964h9.433l2.915-8.964-7.631-5.54zm0 1.07l6.614 4.8-2.526 7.769h-8.175l-2.526-7.768 6.614-4.802z"
+})));
+
+function _extends$$() { _extends$$ = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$$.apply(this, arguments); }
+var GatewayNoneIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$$({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M.373 15.084a1.316 1.316 0 00.002 1.834l14.71 14.709a1.313 1.313 0 001.833 0l14.711-14.711a1.316 1.316 0 00-.002-1.834L16.917.373a1.313 1.313 0 00-1.833 0L.373 15.084zm1.806.918L16 2.182l13.821 13.82L16 29.823 2.179 16.003z"
+})));
+
+function _extends$_() { _extends$_ = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$_.apply(this, arguments); }
+var GatewayOrIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$_({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M16.001 0a1.29 1.29 0 00-.917.373L.373 15.084a1.316 1.316 0 00.002 1.834l14.71 14.709a1.313 1.313 0 001.833 0l14.711-14.711a1.316 1.316 0 00-.002-1.834L16.917.372A1.294 1.294 0 0016.002 0zM16 2.181l13.821 13.821L16 29.823 2.179 16.003 16 2.18zm0 6.379a7.447 7.447 0 00-7.44 7.441A7.447 7.447 0 0016 23.443 7.447 7.447 0 0023.443 16a7.447 7.447 0 00-7.441-7.441zm0 .825a6.61 6.61 0 016.617 6.616A6.61 6.61 0 0116 22.618 6.61 6.61 0 019.385 16 6.61 6.61 0 0116 9.385z"
+})));
+
+function _extends$Z() { _extends$Z = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$Z.apply(this, arguments); }
+var GatewayParallelIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$Z({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M16.001 0a1.29 1.29 0 00-.917.373L.373 15.084a1.316 1.316 0 00.002 1.834l14.71 14.709a1.313 1.313 0 001.833 0l14.711-14.711a1.316 1.316 0 00-.002-1.834L16.917.372A1.294 1.294 0 0016.002 0zM16 2.181l13.821 13.821L16 29.823 2.179 16.003 16 2.18zm-.377 5.708l-.168.032-.136.092-.096.14-.032.168v6.868h-6.87l-.002-.002-.166.037-.137.092v-.002l-.095.141-.033.167v.753s.032.169.034.17l.094.138.138.092.167.036h6.87v6.867l-.001-.001.033.17.095.138.138.092s.166.035.167.037h.752l.17-.036.137-.092.095-.137.033-.17v-6.867h6.868l.17-.035.137-.092.095-.137.033-.17v-.753s-.033-.165-.032-.167l-.096-.14-.138-.093s-.17-.037-.17-.035H16.81V8.323l-.033-.168-.094-.14-.138-.092-.17-.034h-.752z"
+})));
+
+function _extends$Y() { _extends$Y = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$Y.apply(this, arguments); }
+var GatewayXorIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$Y({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M16 0a1.29 1.29 0 00-.918.373L.371 15.084a1.316 1.316 0 00.002 1.834l14.71 14.709a1.313 1.313 0 001.833 0l14.711-14.711a1.316 1.316 0 00-.002-1.834L16.915.372A1.294 1.294 0 0016 0zm-.002 2.181l13.821 13.821-13.821 13.821-13.821-13.82L15.998 2.18zm-5.162 7.69l-.166.032-.141.096-.532.532s-.097.142-.097.144l-.03.164.032.162.093.144 4.857 4.858-4.855 4.855v-.001L9.9 21l-.03.164.032.162s.093.142.093.144l.531.532.146.095.162.032.164-.03.144-.097 4.855-4.856 4.857 4.857.145.095.162.032.164-.03.144-.097.531-.532.095-.14.033-.168-.033-.162-.095-.146L17.144 16 22 11.144l.095-.14.033-.166-.033-.163-.097-.144-.532-.532-.14-.095-.163-.032-.166.032-.141.095L16 14.855l-4.858-4.858v-.002l-.144-.092-.162-.032z"
+})));
+
+function _extends$X() { _extends$X = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$X.apply(this, arguments); }
+var GroupIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$X({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M6.34.016c-2.333.025-4.684 1.77-5.29 4.17C.608 5.848.88 7.608.804 9.314v2.922h2.041c.038-2.332-.076-4.673.062-7C3.14 3.355 4.869 1.938 6.643 2.04h8.956V.009c-3.086 0-6.173-.02-9.258 0v.007zm13.094 2.023h1.92V.009h-1.92v2.03zm5.756 0c1.265-.069 2.66.045 3.602 1.055 1.036.983 1.201 2.523 1.122 3.91v6.313h2.078c-.03-2.677.062-5.36-.047-8.032-.17-2.743-2.62-5.111-5.215-5.236-.511-.064-1.027-.02-1.54-.033v2.023zM.803 18.319h2.041v-2.026H.804v2.026zm29.11 1.084h2.08v-2.03h-2.08v2.03zM.804 26.148c.004 2.218 1.393 4.366 3.313 5.28 1.728.853 3.681.448 5.521.544.43-.112 1.29.231 1.435-.183v-1.847c-1.788-.043-3.584.094-5.365-.082-1.67-.354-2.919-2.048-2.863-3.844v-3.644H.804v3.777zm29.11-.068c.04 1.961-1.508 3.787-3.381 3.842-1.954.06-3.914.02-5.87.026v2.03c2.118-.042 4.242.08 6.355-.063 2.524-.264 4.818-2.644 4.94-5.323.08-1.039.014-2.085.035-3.126h-2.078v2.613zm-15.006 5.898h1.92v-2.03h-1.92v2.03z"
+})));
+
+function _extends$W() { _extends$W = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$W.apply(this, arguments); }
+var IntermediateEventCatchCancelIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$W({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.975.049C8.195-.111.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.454 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.215-2.282-2.022-5.3-3.217-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.082 11.082 0 0116 5.021zm-3.956 3.946l-3.096 3.097 3.985 3.985-3.913 3.913 3.047 3.048 3.913-3.913 3.988 3.987 3.097-3.096L19.076 16l3.914-3.913-3.048-3.048-3.913 3.913-3.986-3.985zm-.002 1.222l3.988 3.987 3.913-3.913 1.826 1.826-3.913 3.913 3.985 3.986-1.873 1.873-3.985-3.985-3.913 3.913-1.827-1.827 3.914-3.913-3.988-3.987 1.873-1.873z"
+})));
+
+function _extends$V() { _extends$V = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$V.apply(this, arguments); }
+var IntermediateEventCatchCompensationIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$V({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm-.56 5.772l-7.408 5.231 7.409 5.234v-5.057c2.385 1.687 4.771 3.371 7.157 5.057V10.793l-7.157 5.055v-5.055zm-.865 1.665v7.125l-5.048-3.562 5.048-3.563zm7.161 0v7.132l-5.048-3.566 5.048-3.566z"
+})));
+
+function _extends$U() { _extends$U = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$U.apply(this, arguments); }
+var IntermediateEventCatchConditionIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$U({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.97.04h-.127C8.713-.018 2.003 5.334.437 12.286c-1.51 6.123.98 13.005 6.136 16.665 5.125 3.788 12.546 4.105 17.912.623 5.272-3.276 8.33-9.766 7.325-15.916-.904-6.241-5.79-11.7-11.95-13.143A16.082 16.082 0 0015.97.04zm-.181 1.724c.115 0 .23 0 .347.003 6.625-.066 12.823 5.149 13.89 11.69 1.13 5.91-1.908 12.349-7.262 15.138-5.473 3.013-12.866 1.884-17.116-2.726C1.291 21.372.444 13.914 3.802 8.602c2.493-4.112 7.169-6.819 11.987-6.838zm.283 1.554c-.117 0-.234.002-.351.005-6.1 0-11.691 5.049-12.346 11.114-.78 5.684 2.795 11.612 8.218 13.52 5.139 1.943 11.416.101 14.624-4.38 3.461-4.583 3.262-11.538-.596-15.831-2.36-2.747-5.924-4.423-9.549-4.428zm-.078 1.695c.078 0 .156 0 .234.003 5.4 0 10.321 4.556 10.734 9.942.563 5.13-2.958 10.364-7.971 11.678-4.832 1.41-10.457-.935-12.746-5.446-2.463-4.559-1.2-10.795 3.014-13.883a11.072 11.072 0 016.735-2.294zm-5.352 4.266V22.761h10.716V9.279H10.642zm.863.866h8.987v11.75h-8.987v-11.75zm.927 1.323v.862h7.133v-.862h-7.133zm0 2.602v.866h7.133v-.866h-7.133zm0 3.008v.862h7.133v-.862h-7.133zm0 2.717v.863h7.133v-.863h-7.133z"
+})));
+
+function _extends$T() { _extends$T = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$T.apply(this, arguments); }
+var IntermediateEventCatchErrorIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$T({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm6.132 4.194c-1.21 2.455-2.422 4.91-3.633 7.364l-4.516-5.875-4.103 12.133 4.6-5.912c1.58 1.81 3.162 3.619 4.744 5.429L22.13 9.215zM14.383 13.1l4.295 5.445 1.073-2.387-1.027 4.131-4.384-5.157-1.778 2.75 1.821-4.782z"
+})));
+
+function _extends$S() { _extends$S = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$S.apply(this, arguments); }
+var IntermediateEventCatchEscalationIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$S({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm.006 3.927c-1.672 4.654-2.734 9.502-4.406 14.155 1.534-1.525 2.872-3.234 4.406-4.759l4.406 4.76c-1.496-4.71-2.91-9.446-4.406-14.156zm.032 2.929c.822 2.586 1.598 5.186 2.42 7.771l-2.42-2.612c-.682.597-2.452 2.884-2.338 2.388.87-2.487 1.447-5.067 2.338-7.547z"
+})));
+
+function _extends$R() { _extends$R = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$R.apply(this, arguments); }
+var IntermediateEventCatchLinkIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$R({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm1.78 4.093v3.555H9.785v6.714h7.994v3.554l5.829-6.911-5.83-6.912zm.974 2.584l3.61 4.295-3.61 4.294v-1.933h-7.88v-4.688h7.88v-1.968z"
+})));
+
+function _extends$Q() { _extends$Q = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$Q.apply(this, arguments); }
+var IntermediateEventCatchMessageIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$Q({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm-7.245 5.475v11.06h14.502v-11.06H8.754zm3.222 1.728h8.057c-1.427.878-2.854 2.806-4.281 3.016l-3.776-3.016zm9.554 1.017v6.587H10.48V13.24l5.524 4.414 5.526-4.414z"
+})));
+
+function _extends$P() { _extends$P = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$P.apply(this, arguments); }
+var IntermediateEventCatchMultipleIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$P({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.975.003C8.195-.156.935 6.24.125 13.985c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.884 23.445.407 17.201.049c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.174.872 11.679 4.985 6.916c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 4.975c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 4.975zm.006 3.073l-7.62 5.531 2.91 8.95h9.42l2.91-8.95-7.62-5.53zm0 1.067l6.604 4.794-2.523 7.757h-8.162l-2.522-7.757 6.603-4.794z"
+})));
+
+function _extends$O() { _extends$O = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$O.apply(this, arguments); }
+var IntermediateEventCatchNonInterruptingConditionIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$O({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M10.638 9.563V23.056h10.724V9.563H10.638zm.863.866h8.995v11.76H11.5V10.43zm.928 1.324v.862h7.139v-.862h-7.14zm0 2.605v.866h7.139v-.866h-7.14zm0 3.01v.863h7.139v-.863h-7.14zm0 2.72v.863h7.139v-.864h-7.14zM15.999.308h-.004l-.188.001h-.011l-.188.004h-.011L15.41.32h-.011l-.187.008h-.005L15.2.33l-.187.01h-.005l-.005.001-.187.013h-.011L14.62.37h-.01l-.186.018h-.011l-.185.02-.005.001h-.006l-.185.022-.005.001h-.005l-.185.025h-.005l-.005.001-.185.027h-.005l-.005.001-.184.029h-.005l-.005.001-.183.031-.006.001-.005.001-.182.033-.006.001-.005.001-.182.035-.005.001-.005.001-.182.038h-.005l-.005.002-.181.04h-.005l-.005.002-.18.042-.006.001-.005.001-.18.044-.005.002h-.005l-.17.045-.152.054-.139.082-.121.106-.1.127-.074.143-.046.155-.017.16.013.16.043.156.07.145.097.13.119.108.137.085.15.058.159.03.16-.001.133-.023.165-.043.168-.041.171-.04.171-.037.172-.036.17-.033.173-.03.17-.03.177-.027.171-.025.175-.022.175-.02.175-.02.176-.016.175-.014.177-.012.176-.01.177-.007.174-.006.177-.003.178-.001h.177l.178.004.174.006.177.007.176.01.177.012.175.014.176.017.175.018.175.02.175.023.171.025.176.027.17.03.174.03.17.033.171.036.154.033.16.02.161-.01.156-.04.146-.069.131-.094.111-.117.087-.135.061-.15.032-.158.002-.16-.027-.16-.057-.15L20 1.023l-.108-.12-.128-.097-.145-.073-.128-.038-.158-.035-.005-.001-.005-.001L19.14.62h-.005l-.005-.002-.182-.035h-.006L18.938.58l-.182-.033h-.006l-.005-.002-.183-.03-.005-.001-.006-.001-.183-.029h-.005l-.006-.001-.184-.027h-.005l-.005-.001-.185-.024h-.005L17.968.43 17.783.41l-.006-.001h-.005l-.185-.02h-.006l-.005-.001L17.39.37h-.005L17.38.368l-.187-.015h-.005l-.005-.001-.187-.013h-.011L16.8.328h-.011L16.6.32h-.011l-.187-.006h-.011L16.204.31h-.011L16.005.31H16zm9.016 2.935l-.16.004-.158.033-.15.062-.134.09-.116.111-.093.132-.067.147-.038.156-.01.161.022.16.05.153.078.141.103.124.102.087.045.034.142.106.137.105.14.11.136.11.135.112.134.115.134.117.13.115.132.122.128.12.127.122.126.125.124.126.124.128.121.13.118.128.118.132.117.133.113.134.113.136.11.136.109.137.109.142.104.14.103.14.101.142.1.144.099.146.095.145.094.147.093.15.092.15.087.149.087.15.084.152.084.155.08.152.08.155.04.081.084.138.11.119.128.096.145.072.155.043.16.013.16-.016.155-.046.144-.074.127-.099.106-.12.083-.14.055-.151.026-.16-.004-.16-.034-.158-.05-.124-.042-.085-.002-.004-.003-.005-.084-.165-.002-.004-.003-.005-.086-.164-.002-.004-.003-.005-.088-.162-.002-.005-.003-.005-.09-.161-.002-.005-.003-.004-.092-.16-.003-.005-.002-.005-.094-.16-.003-.004-.003-.004-.096-.159-.002-.004-.003-.005-.098-.157-.003-.004-.003-.005-.1-.156-.003-.004-.003-.005-.101-.154-.003-.005-.003-.004-.104-.154-.003-.004-.003-.005-.106-.152-.003-.005-.003-.004-.108-.151-.003-.004-.003-.005-.11-.15-.003-.004-.003-.004-.111-.15-.004-.003-.003-.005-.113-.147-.004-.004-.003-.005-.115-.146-.004-.004-.003-.004-.117-.145-.004-.004-.003-.004-.12-.144-.003-.004-.003-.004-.121-.142-.004-.004-.003-.004-.123-.141-.003-.004-.004-.004-.125-.14-.003-.004-.004-.004-.127-.138-.003-.004-.004-.004-.128-.136-.004-.004-.004-.004-.13-.135-.004-.004-.004-.004-.132-.134-.003-.004-.004-.003-.134-.133-.004-.003-.004-.004-.135-.13-.004-.004-.004-.004-.136-.128-.004-.004-.004-.004-.138-.126-.004-.004-.004-.003-.14-.125-.004-.004-.004-.003-.14-.123-.005-.004-.004-.003-.142-.121-.004-.004-.004-.003-.144-.12-.004-.003-.004-.003-.145-.117-.004-.004-.004-.003-.147-.115-.004-.004-.004-.003-.148-.113-.004-.003-.004-.004-.149-.111-.004-.003-.004-.004-.05-.036-.14-.083-.15-.055-.16-.027zm-18.381.344l-.161.008-.157.037-.147.066-.111.074-.04.032-.005.003-.004.004-.145.117-.004.003-.004.004-.144.119-.004.003-.004.004-.142.12-.004.004-.004.004-.141.123-.004.003-.004.004-.14.125-.004.003-.004.004-.138.126-.004.004-.004.004-.136.128-.004.004-.004.004-.135.13-.004.004-.004.003-.134.133-.004.003L4.682 5l-.132.134-.003.004-.004.004-.13.135-.004.004-.004.004-.128.136-.004.004-.004.004-.126.138-.004.004-.003.004-.125.14-.004.004-.003.004-.123.14-.004.005-.003.004-.121.142-.004.004-.003.004-.12.144-.003.004-.003.004-.117.145-.004.004-.003.004-.115.146-.004.005-.003.004-.113.147-.003.005-.004.004-.111.149-.003.004-.004.004-.11.15-.002.005-.003.004-.108.151-.003.004-.003.005-.106.152-.003.005-.003.004-.104.154-.003.004-.003.005-.102.154-.003.005-.002.004-.1.156-.003.005-.003.004-.098.157-.003.005-.003.004-.096.159-.002.004-.003.005-.094.16-.003.004-.002.004-.092.16-.003.005-.003.005-.09.161-.002.005-.003.005-.088.162-.002.005-.003.004-.086.164-.002.005-.002.004-.084.165-.003.005-.002.004-.082.166-.002.004-.003.005-.08.167-.002.004-.002.005-.078.168-.002.004-.002.005-.045.1-.053.153-.023.16.007.16.037.157.065.148.092.132.114.114.134.09.148.064.157.035.161.006.16-.025.152-.054.14-.08.121-.106.1-.126.065-.118.043-.095.074-.16.075-.155.077-.157.08-.155.08-.152.083-.155.085-.152.086-.15.088-.149.091-.15.094-.15.094-.147.095-.145.099-.146.1-.144.1-.142.104-.14.104-.14.11-.142.107-.137.11-.136.114-.136.113-.134.117-.133.118-.132.117-.129.122-.13.124-.127.123-.126.127-.125.127-.122.128-.12.132-.122.13-.115.133-.117.135-.115.135-.111.136-.11.037-.03.117-.11.094-.132.068-.146.04-.156.01-.161-.02-.16-.05-.154-.076-.141-.102-.125-.123-.104-.14-.08-.153-.051-.16-.023zM16 3.595h-.005l-.148.001h-.01l-.147.003h-.011l-.147.005h-.011l-.146.007h-.011l-.146.009h-.011l-.146.01h-.005l-.005.001-.146.012h-.011l-.145.014h-.006l-.005.001-.05.006-.158.031-.15.06-.135.088-.117.111-.094.13-.069.147-.04.156-.01.16.019.16.049.154.076.142.102.125.123.105.14.08.152.051.16.023.134-.003.045-.005.135-.013.133-.01.136-.01.135-.007.137-.006.136-.004.136-.003h.274l.136.003.136.004.136.006.136.007.136.01.133.01.135.013.135.014.135.016.134.018.132.018.134.021.133.023.133.024.133.025.13.027.132.03.132.03.129.031.13.034.129.035.129.036.13.04.126.038.128.042.126.042.128.045.127.047.126.047.12.048.127.051.123.052.006.002.147.048.16.021.16-.009.157-.038.147-.067.131-.093.112-.116.089-.135.062-.149.033-.158.004-.16-.027-.16-.055-.151-.083-.139-.107-.12-.127-.099-.118-.063-.004-.001-.005-.003-.005-.002-.133-.056-.005-.002-.005-.002-.134-.054-.004-.002-.005-.002-.135-.053-.005-.002-.005-.002-.135-.051-.005-.002-.005-.002-.135-.05-.005-.001-.005-.002-.137-.048-.005-.001-.005-.002-.137-.046-.005-.002-.005-.002-.137-.044-.005-.002-.005-.001-.138-.043-.006-.002-.005-.001-.138-.042-.005-.001-.005-.002-.14-.04H19.4l-.005-.002-.14-.038-.005-.001-.005-.002-.14-.036-.005-.001-.005-.001-.141-.035-.005-.001-.005-.001-.142-.033-.005-.001-.005-.001-.142-.031-.005-.002h-.005l-.142-.03-.005-.001-.005-.001-.143-.028h-.005l-.005-.002-.143-.025-.006-.001-.005-.001-.143-.024-.005-.001-.006-.001-.143-.022-.006-.001h-.005l-.144-.022h-.005l-.006-.001-.144-.019h-.005l-.006-.001-.144-.017h-.006l-.005-.001-.145-.016h-.011l-.145-.014H17.1l-.005-.001-.146-.012h-.01l-.146-.01-.006-.001h-.005l-.146-.009h-.011l-.147-.006h-.01L16.32 3.6h-.011l-.147-.003h-.011l-.147-.001H16zm-5.482 1.366l-.16.008-.157.037-.123.053-.06.032-.005.002-.004.003-.128.069-.004.002-.005.003-.126.07-.005.003-.004.002-.126.072-.005.003-.004.003-.125.073-.004.003-.005.003-.124.075-.004.003-.005.002-.123.077-.004.003-.005.003-.122.078-.004.003-.005.003-.121.08-.004.002-.005.003-.12.082-.005.003-.004.003-.12.083-.004.003-.004.003-.118.084-.005.003-.004.003-.118.086-.004.003-.004.003-.117.088-.004.003-.004.003-.116.089-.004.003-.004.004-.114.09-.005.003-.004.003-.113.092-.004.004-.004.003-.113.093-.004.004-.004.003-.111.095-.005.003-.004.004-.11.096-.004.004-.004.003-.11.098-.003.003-.004.004-.108.1-.004.003-.004.003-.107.101-.004.004-.004.003-.106.102-.004.004-.003.004-.105.103-.004.004-.004.004-.103.105-.004.004-.004.003-.102.106-.003.004-.004.004-.1.107-.004.004-.004.004-.099.108-.004.004-.003.004-.098.11-.003.003-.004.004-.096.11-.004.005-.003.004-.095.111-.003.004-.004.004-.093.113-.003.004-.004.004-.092.113-.003.004-.003.005-.09.114-.004.004-.003.004-.089.116-.003.004-.003.004-.088.117-.003.004-.003.004-.086.118-.003.004-.003.005-.084.118-.003.004-.003.005-.083.12-.003.003-.003.005-.082.12-.003.005-.002.004-.068.103-.076.142-.048.154-.018.16.011.161.041.156.07.146.095.13.117.11.136.086.15.06.158.03.162.002.158-.03.15-.057.138-.085.119-.109.082-.105.065-.099.075-.11.077-.113.077-.107.08-.11.08-.108.084-.108.083-.105.086-.106.086-.104.088-.104.089-.101.09-.102.093-.101.093-.099.094-.097.095-.096.098-.097.098-.095.099-.093.1-.092.103-.091.101-.089.104-.088.104-.086.106-.086.106-.083.106-.082.109-.082.108-.079.11-.078.11-.076.112-.076.112-.074.113-.072.113-.071.115-.07.115-.068.118-.067.117-.065.12-.065.054-.029.135-.088.116-.111.094-.132.068-.146.04-.156.009-.161-.02-.16-.05-.153-.078-.142-.102-.125-.123-.103-.141-.079-.153-.051-.16-.022zm13.91 2.116l-.162.008-.157.037-.147.066-.132.092-.113.116-.09.134-.063.148-.034.157-.005.162.025.159.055.152.082.138.086.103.09.09.094.098.092.099.093.1.091.103.089.101.088.104.086.104.086.106.083.105.083.108.08.108.081.11.077.107.077.112.075.111.075.114.072.113.071.113.07.114.068.118.067.115.065.118.064.117.062.117.061.121.059.119.059.122.056.121.054.12.055.125.051.123.051.125.048.123.048.127.047.126.044.125.043.128.042.129.039.126.038.13.022.076.058.15.085.137.11.119.129.096.145.07.155.043.16.013.161-.017.154-.046.144-.075.126-.1.106-.12.082-.14.055-.151.025-.16-.005-.16-.026-.132-.023-.082-.002-.005-.001-.005-.042-.139-.001-.005-.002-.005-.043-.138-.001-.005-.002-.005-.044-.137-.002-.005-.002-.005-.046-.137-.002-.005-.001-.005-.048-.137-.002-.005-.002-.005-.05-.135-.001-.005-.002-.005-.051-.135-.002-.005-.002-.005-.053-.135-.002-.005-.002-.005-.054-.133-.002-.005-.002-.005-.057-.133-.002-.005-.002-.005-.057-.132-.003-.005-.002-.005-.06-.132-.001-.005-.002-.004-.061-.132-.003-.004-.002-.005-.063-.13-.002-.005-.002-.005-.064-.13-.003-.004-.002-.005-.066-.129-.002-.004-.003-.005-.067-.128-.002-.005-.003-.004-.069-.128-.002-.004-.003-.005-.07-.126-.003-.005-.003-.004-.072-.126-.002-.005-.003-.004-.074-.125-.002-.004-.003-.005-.075-.124-.003-.004-.003-.005-.076-.123-.003-.004-.003-.005-.078-.122-.003-.004-.003-.005-.08-.121-.003-.004-.003-.005-.081-.12-.003-.005-.003-.004-.083-.12-.003-.004-.003-.004-.084-.118-.003-.005-.003-.004-.086-.118-.003-.004-.004-.004-.087-.117-.003-.004-.003-.004-.09-.116-.002-.004-.004-.004-.09-.114-.003-.005-.004-.004-.091-.113-.004-.004-.003-.004-.094-.113-.003-.004-.003-.004-.095-.111-.004-.004-.003-.004-.096-.11-.004-.005-.003-.004-.098-.11-.004-.003-.003-.004-.1-.108-.003-.004-.004-.004-.1-.107-.004-.004-.004-.004-.102-.106-.003-.003-.004-.004-.093-.095-.124-.103-.14-.08-.153-.05-.16-.023zM4.45 13.135l-.161.002-.158.032-.15.06-.135.088-.118.11-.094.131-.069.146-.035.129-.026.132v.005l-.002.005-.025.143-.001.005-.001.006-.024.143-.001.005-.001.006-.022.143-.001.006-.001.005-.02.144-.001.005-.001.005-.019.145v.005l-.001.006-.017.144v.006l-.001.005-.016.145v.011l-.014.145v.005l-.001.006-.012.146v.01l-.01.146-.001.006v.005l-.009.146v.011l-.007.146v.011l-.004.147v.011l-.003.147v.01l-.002.148v.01l.001.148v.01l.003.147v.011l.005.147v.01l.007.147v.011l.009.146v.011l.01.146v.01l.013.146v.011l.014.145v.005l.001.006.016.145v.011l.018.144v.006l.001.005.019.144v.006l.001.005.021.144v.005l.002.006.022.143v.006l.002.005.024.143v.005l.002.006.025.143.001.005.001.005.028.143.001.005.001.005.03.142v.005l.002.006.03.141.002.005.001.005.033.142v.005l.002.005.035.14v.006l.002.005.036.14.002.005.001.005.038.14.001.005.002.005.04.14v.005l.002.005.042.138.001.006.002.005.042.138.002.005.002.005.017.054.064.148.09.134.114.114.132.092.148.065.157.037.16.007.16-.023.153-.052.14-.08.123-.104.102-.125.076-.142.049-.153.02-.16-.011-.161-.031-.13-.017-.051-.039-.126-.038-.13-.037-.128-.035-.13-.033-.128-.033-.134-.03-.13-.029-.131-.026-.13-.026-.133-.024-.133-.023-.133-.02-.132-.02-.136-.017-.132-.016-.135-.014-.135-.012-.133-.012-.138-.009-.133-.007-.136-.006-.138-.004-.134-.003-.136v-.274l.003-.136.004-.134.006-.139.007-.136.01-.133.01-.138.013-.132.014-.135.016-.135.017-.132.02-.137.02-.13.023-.134.024-.133.024-.126.016-.16-.014-.161-.044-.155-.072-.145-.098-.128-.12-.108-.137-.084-.15-.057-.16-.029zm26.698 1.601l-.161.01-.157.04-.146.067-.131.093-.112.117-.088.135-.061.149-.033.157-.005.134.006.14.006.176.003.177.001.178-.001.177-.003.178-.006.177-.007.176-.01.177-.012.176-.015.176-.016.173-.018.175-.02.175-.024.174-.025.175-.026.17-.03.174-.03.173-.033.17-.036.172-.037.17-.04.17-.042.172-.043.168-.045.166-.048.169-.05.167-.052.168-.053.164-.056.166-.058.166-.06.16-.062.165-.062.158-.066.165-.068.16-.07.16-.07.158-.075.159-.074.155-.079.158-.08.158-.06.15-.03.158-.001.161.029.159.058.15.085.137.108.119.13.097.144.07.156.044.16.013.16-.017.155-.046.143-.074.127-.1.107-.12.07-.115.083-.164.003-.005.002-.004.082-.166.002-.005.003-.004.08-.167.002-.005.002-.004.078-.168.002-.005.002-.004.076-.169.002-.004.002-.005.074-.17.002-.004.002-.005.072-.17.002-.005.002-.005.07-.171.001-.005.002-.005.068-.172.002-.004.002-.005.065-.173.002-.005.002-.005.063-.173.002-.005.002-.005.06-.174.003-.005.001-.005.06-.175.001-.005.002-.005.057-.176.001-.005.002-.005.055-.177.001-.005.002-.005.052-.177.002-.005.001-.005.051-.178.001-.005.002-.005.048-.179.002-.005v-.005l.047-.179.001-.005.002-.005.044-.18v-.005l.002-.005.042-.18.001-.006.001-.005.04-.181.001-.005.001-.005.037-.182.002-.005v-.005l.036-.182v-.006l.002-.005.033-.182v-.006l.002-.005.03-.183.001-.005.001-.005.029-.184v-.005l.001-.006.027-.184v-.005l.001-.005.024-.185v-.005l.001-.005.022-.185v-.006l.001-.005.02-.185v-.006l.001-.005.017-.186v-.005l.001-.005.015-.187v-.005l.001-.005.013-.187v-.01l.01-.187.001-.006v-.005l.009-.187v-.011l.006-.187V16.7l.004-.188v-.011l.001-.188v-.01l-.001-.188v-.011l-.004-.188v-.011l-.006-.187v-.011l-.007-.145-.022-.16-.05-.152-.08-.141-.103-.124-.125-.102-.141-.077-.153-.05-.16-.02zm-30.21.572l-.161.001-.158.032-.15.06-.136.087-.117.11-.095.131-.068.146-.04.156-.012.133-.001.14v.01l.001.188v.011l.004.188v.011l.006.187v.011l.008.187v.011l.011.187v.005l.001.005.013.187v.01l.016.187v.01l.018.186v.011l.02.185.001.005v.006l.022.185.001.005v.005l.025.185v.005l.001.005.027.184v.006l.001.005.029.184v.005l.001.005.031.183.001.005.001.006.033.182.001.005.001.006.035.182.001.005.001.005.038.182v.005l.002.005.04.181v.005l.002.005.042.18.001.006.001.005.044.18.002.005v.005l.047.18.001.004.002.005.048.179.002.005.001.005.05.178.002.005.001.005.053.177.002.005.001.005.055.177.002.005.001.005.057.176.002.005.001.005.06.175.001.005.002.005.061.174.002.005.002.005.063.173.002.005.002.005.065.173.002.005.002.004.067.172.002.005.002.005.07.171.002.005.002.005.072.17.002.005.002.004.074.17.002.005.002.004.076.169.002.004.002.005.078.168.002.004.002.005.08.167.003.004.002.005.082.166.002.004.003.005.02.04.086.136.11.118.13.095.146.07.156.041.16.012.16-.019.155-.048.142-.075.126-.1.105-.123.08-.14.054-.152.024-.16-.006-.16-.036-.158-.051-.123-.018-.034-.078-.158-.074-.155-.074-.16-.071-.157-.07-.16-.068-.16-.067-.165-.062-.158-.062-.164-.059-.161-.058-.166-.056-.166-.053-.164-.052-.168-.05-.167-.048-.17-.045-.165-.043-.168-.043-.172-.039-.17-.037-.17-.036-.172-.033-.17-.03-.173-.03-.174-.027-.17-.025-.175-.022-.174-.021-.175-.018-.175-.017-.173-.014-.176-.012-.176-.01-.177-.007-.176-.006-.177-.003-.178-.001-.177v-.134l-.013-.16-.044-.156-.072-.144-.097-.129-.12-.108-.137-.085-.15-.057-.159-.028zm26.798 2.024l-.16.007-.157.038-.148.066-.132.092-.113.115-.09.134-.062.148-.03.127-.001.004-.023.134-.024.133-.026.133-.026.13-.03.132-.03.129-.032.134-.033.128-.035.13-.037.128-.038.13-.04.126-.04.128-.044.128-.044.126-.046.126-.048.126-.05.125-.05.125-.051.122-.054.123-.055.122-.056.12-.058.122-.06.12-.061.12-.063.119-.062.116-.067.119-.066.116-.069.115-.069.115-.07.113-.073.113-.074.112-.076.113-.077.112-.077.107-.08.11-.08.107-.085.11-.044.056-.088.135-.06.15-.033.158-.002.16.027.16.057.15.083.138.108.12.128.098.144.072.155.045.16.015.161-.016.155-.044.144-.073.128-.098.09-.099.05-.061.003-.004.003-.005.089-.115.003-.004.003-.005.088-.116.003-.004.003-.005.086-.117.003-.004.003-.005.084-.118.003-.004.003-.005.083-.12.003-.004.003-.004.081-.12.003-.005.003-.004.08-.121.003-.005.003-.004.078-.122.003-.005.003-.004.077-.123.002-.005.003-.004.075-.124.003-.005.003-.004.073-.125.003-.005.003-.004.072-.126.002-.004.003-.005.07-.126.003-.005.002-.005.07-.127.002-.004.002-.005.068-.128.002-.005.002-.004.066-.13.003-.004.002-.005.064-.13.002-.004.003-.005.062-.13.002-.005.003-.005.06-.13.003-.005.002-.005.06-.132.002-.005.002-.005.057-.132.003-.005.002-.005.056-.133.002-.005.002-.005.054-.134.002-.004.002-.005.053-.135.002-.005.002-.005.051-.135.002-.005.002-.005.05-.135.001-.005.002-.005.048-.137.001-.005.002-.005.046-.137.002-.005.002-.005.044-.137.002-.005.002-.005.042-.138.002-.005.001-.006.042-.138.001-.005.002-.005.04-.14v-.005l.002-.005.038-.14.001-.005.002-.005.036-.14.001-.005.001-.005.035-.141.001-.005.001-.005.033-.142.001-.005.001-.005.031-.141.001-.006.002-.005.029-.142v-.005l.002-.005.028-.143v-.005l.002-.005.025-.143.001-.006.001-.005.024-.143.001-.005.001-.006.001-.006.01-.161-.02-.16-.05-.154-.077-.141-.102-.125-.123-.104-.141-.079-.153-.051-.16-.022zM6.841 23.019l-.16.024-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.018.16.011.161.041.156.07.146.077.109.04.048.003.004.003.004.095.111.003.004.004.004.096.11.004.005.003.004.098.109.003.004.004.004.1.108.003.004.003.004.101.107.004.004.003.004.102.105.004.004.004.004.103.105.004.004.004.003.105.104.003.004.004.003.106.102.004.004.004.004.107.1.004.004.004.004.108.099.004.003.004.004.11.098.003.003.004.004.11.096.004.003.005.004.11.095.005.003.004.004.113.093.004.003.004.004.113.091.004.004.005.003.114.09.004.004.004.003.116.089.004.003.004.003.117.088.004.003.004.003.118.086.004.003.005.003.118.084.004.003.005.003.119.083.004.003.005.003.12.081.005.003.004.003.121.08.005.003.004.003.122.078.005.003.004.003.123.076.005.003.004.003.124.075.005.003.004.003.125.073.004.003.005.002.126.073.004.002.005.003.126.07.005.003.004.002.128.07.004.002.005.002.128.067.005.003.004.002.13.066.004.002.005.003.13.064.004.002.005.003.13.062.005.002.004.003.132.06.004.003.005.002.132.06.005.002.005.002.132.057.005.002.005.002.133.057.005.002.005.002.133.054.005.002.005.002.13.05.154.045.16.016.16-.015.156-.045.144-.072.128-.098.108-.12.083-.138.057-.15.028-.16-.003-.16-.032-.159-.061-.149-.088-.135-.11-.117-.132-.094-.12-.058-.124-.049-.126-.051-.122-.051-.122-.054-.12-.054-.126-.058-.119-.057-.12-.06-.12-.06-.118-.063-.117-.064-.119-.066-.116-.066-.115-.068-.115-.07-.113-.07-.115-.074-.112-.074-.11-.075-.11-.076-.112-.08-.11-.08-.109-.081-.106-.082-.104-.082-.106-.086-.105-.087-.101-.086-.105-.091-.1-.09-.1-.091-.1-.094-.097-.094-.1-.098-.093-.095-.096-.1-.093-.098-.092-.101-.089-.1-.09-.102-.088-.104-.036-.043-.114-.114-.133-.091-.148-.065-.157-.036-.161-.006zm15.063 2.701l-.16.014-.156.044-.12.057-.06.034-.12.066-.117.064-.118.062-.12.061-.12.06-.118.057-.126.058-.12.054-.122.054-.122.05-.126.052-.125.05-.124.046-.127.047-.125.044-.129.043-.126.04-.13.042-.128.038-.127.035-.13.036-.131.034-.129.031-.132.03-.13.03-.135.027-.133.026-.13.023-.13.022-.137.021-.132.02-.134.017-.132.015-.138.015-.135.013-.133.01-.138.01-.136.007-.134.006-.136.004-.14.003-.16.018-.155.047-.142.076-.127.1-.105.122-.08.14-.054.151-.025.16.006.16.035.158.064.148.09.134.114.114.133.092.147.065.157.036.134.008.145-.002h.011l.147-.005h.01l.147-.007h.011l.146-.009h.011l.146-.01h.005l.005-.001.146-.012h.011l.145-.014h.005l.006-.001.145-.016h.011l.144-.018h.006l.005-.001.144-.02h.011l.144-.021.005-.001h.006l.143-.023.006-.001h.005l.143-.025h.005l.006-.002.143-.026h.005l.005-.002.143-.027.005-.001.005-.001.142-.03h.005l.005-.002.142-.03.005-.002.005-.001.142-.033.005-.001.005-.001.14-.035.006-.001.005-.001.14-.037h.005l.005-.002.14-.038.005-.002h.005l.14-.04.005-.002.005-.001.138-.042.005-.001.006-.002.138-.043.005-.001.005-.002.137-.044.005-.002.005-.002.137-.046.005-.002.005-.001.137-.048.005-.002.005-.002.135-.05.005-.001.005-.002.135-.051.005-.002.005-.002.135-.053.005-.002.004-.002.134-.054.005-.002.005-.002.133-.057.005-.002.005-.002.132-.057.005-.003.005-.002.132-.06.005-.001.004-.002.131-.061.005-.003.005-.002.13-.062.005-.003.005-.002.13-.064.004-.003.005-.002.128-.066.005-.002.005-.003.128-.067.005-.002.004-.003.127-.069.005-.002.005-.003.126-.07.005-.003.004-.003.065-.037.132-.093.112-.115.089-.135.062-.149.034-.157.003-.161-.026-.16-.055-.15-.082-.14-.107-.12-.127-.1-.144-.073-.154-.046-.16-.016zM6.33 27.127l-.16.023-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.02.16.012.161.041.156.07.146.094.13.096.093.032.026.004.003.004.004.145.117.004.003.004.004.146.115.005.003.004.004.147.113.005.003.004.004.149.111.004.003.004.003.15.11.005.003.004.003.151.108.004.003.005.003.152.106.005.003.004.003.154.104.004.003.005.003.154.102.005.002.004.003.156.1.005.003.004.003.157.098.005.003.004.002.159.096.004.003.005.003.16.094.004.003.004.002.16.092.005.003.005.002.161.09.005.003.005.002.162.088.005.003.004.002.164.086.005.003.004.002.165.084.005.003.004.002.166.082.004.002.005.003.167.08.004.002.005.002.168.078.004.002.005.002.168.076.005.002.005.002.17.074.004.002.005.002.17.072.005.002.005.002.17.07.006.002.005.001.171.068.005.002.005.002.173.065.005.002.005.002.173.063.005.002.005.002.174.06.005.003.005.001.175.06.005.001.005.002.176.057.005.001.005.002.176.055.006.001.005.002.177.052.005.002.005.001.178.05.005.002.005.002.178.048.006.001.005.002.179.046.005.001.005.002.18.044h.005l.005.002.18.042.006.001.005.001.159.035.16.02.16-.01.157-.04.146-.069.13-.094.112-.117.087-.136.06-.149.033-.158.002-.161-.028-.159-.057-.15-.084-.138-.108-.12-.128-.098-.144-.072-.128-.039-.154-.033-.168-.04-.171-.041-.17-.044-.168-.046-.167-.047-.168-.05-.165-.051-.166-.054-.166-.056-.163-.057-.165-.06-.161-.062-.164-.064-.16-.065-.16-.068-.162-.07-.157-.07-.157-.074-.157-.075-.156-.077-.153-.079-.156-.082-.153-.082-.154-.086-.15-.086-.152-.09-.148-.09-.147-.092-.149-.095-.145-.095-.144-.098-.145-.1-.143-.102-.14-.103-.14-.104-.14-.108-.139-.11-.136-.11-.027-.022-.133-.091-.148-.065-.157-.036-.161-.006zm19.215.087l-.16.01-.157.039-.146.067-.11.076-.064.051-.139.11-.14.108-.14.104-.14.103-.143.101-.145.101-.144.098-.145.095-.149.095-.148.093-.147.089-.152.09-.15.086-.154.086-.153.082-.156.082-.153.079-.156.077-.157.075-.158.073-.157.071-.16.07-.16.068-.161.065-.164.064-.161.061-.165.06-.163.058-.166.056-.166.054-.166.051-.167.05-.167.047-.17.046-.168.044-.171.042-.168.039-.17.037-.11.023-.154.047-.143.075-.126.1-.106.122-.081.139-.054.152-.025.16.006.16.035.158.063.148.09.133.114.115.132.092.148.065.157.037.16.007.133-.016.115-.024.005-.001.005-.001.181-.04h.005l.005-.002.18-.042.006-.001.005-.001.18-.044.005-.002.005-.001.18-.046.004-.002h.005l.179-.05h.005l.005-.002.178-.05.005-.002.005-.002.177-.052.005-.002.005-.001.177-.055.005-.002.005-.001.176-.057.005-.002.005-.002.175-.059.005-.001.005-.002.174-.061.005-.002.005-.002.173-.063.005-.002.005-.002.173-.065.004-.002.005-.002.172-.068.005-.002.005-.002.171-.07.005-.001.005-.002.17-.072.005-.002.004-.002.17-.074.005-.002.004-.002.169-.076.004-.002.005-.002.168-.078.004-.002.005-.003.167-.08.004-.002.005-.002.166-.082.004-.002.005-.003.165-.084.004-.002.005-.003.163-.086.005-.002.005-.003.162-.088.005-.002.005-.003.161-.09.005-.002.004-.003.16-.092.005-.003.005-.002.16-.094.004-.003.004-.003.158-.096.005-.002.004-.003.158-.098.004-.003.005-.003.156-.1.004-.003.004-.003.155-.101.005-.003.004-.003.154-.104.004-.003.004-.003.153-.106.004-.003.005-.003.151-.108.004-.003.005-.003.15-.11.004-.003.004-.003.149-.112.004-.003.004-.003.148-.113.004-.004.004-.003.147-.115.004-.004.004-.003.068-.055.116-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.05-.153-.08-.14-.103-.125-.124-.102-.142-.077-.153-.05-.16-.02z"
+})));
+
+function _extends$N() { _extends$N = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$N.apply(this, arguments); }
+var IntermediateEventCatchNonInterruptingEscalationIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$N({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M16.012 9.222c-1.673 4.657-2.735 9.508-4.409 14.164 1.536-1.526 2.874-3.236 4.41-4.762l4.408 4.762c-1.497-4.712-2.911-9.451-4.409-14.164zm.032 2.93c.823 2.588 1.599 5.19 2.421 7.777l-2.42-2.614c-.683.598-2.454 2.886-2.34 2.39.871-2.489 1.448-5.07 2.34-7.552zM16.012.312c-1.448.02-2.93.157-4.302.628-.852.447-.255 1.863.66 1.574 2.255-.608 4.648-.607 6.922-.108.934.075 1.228-1.376.338-1.67C18.451.44 17.227.317 16.012.311zm9.012 2.934c-.913-.104-1.272 1.258-.454 1.648 1.834 1.36 3.293 3.185 4.31 5.22.526.776 1.842.098 1.515-.78a15.522 15.522 0 00-5.06-6.006c-.1-.044-.203-.07-.31-.082zM6.65 3.59c-.762.089-1.24.809-1.805 1.267C3.38 6.295 2.163 8.007 1.37 9.905c-.266.898 1.094 1.484 1.564.675a14.825 14.825 0 014.327-5.56c.476-.515.09-1.419-.612-1.431zm9.362.007c-.698.066-1.689-.16-2.033.635-.282.733.535 1.358 1.217 1.125 1.806-.147 3.63.203 5.293.907.902.255 1.472-1.112.656-1.573-1.6-.735-3.374-1.089-5.133-1.094zm-5.479 1.365c-.835.15-1.517.76-2.21 1.226-1.203.94-2.318 2.061-3.057 3.402-.33.904 1.063 1.552 1.547.723 1.045-1.656 2.596-2.925 4.285-3.873.545-.499.171-1.463-.565-1.478zm13.903 2.115c-.875-.07-1.22 1.173-.501 1.627 1.325 1.34 2.188 3.062 2.748 4.84.468.84 1.869.21 1.557-.699-.604-2.118-1.751-4.097-3.351-5.615a.93.93 0 00-.453-.153zM4.467 13.132c-.822-.07-.996.826-1.046 1.455-.256 1.93-.094 3.933.562 5.769.406.844 1.807.365 1.612-.551a11.498 11.498 0 01-.334-5.808.874.874 0 00-.794-.865zm26.687 1.6c-.746-.037-1.014.785-.879 1.395.043 2.393-.57 4.771-1.66 6.894-.31.884 1.02 1.536 1.53.75a15.632 15.632 0 001.821-8.372.876.876 0 00-.812-.667zm-30.197.571c-.782-.073-1.044.775-.933 1.404.068 2.414.661 4.833 1.809 6.962.534.77 1.842.076 1.505-.798a14.833 14.833 0 01-1.603-6.861.876.876 0 00-.778-.707zm26.787 2.024c-.777-.048-.952.797-1.021 1.392-.354 1.692-1.202 3.231-2.216 4.608-.407.872.925 1.638 1.48.852 1.361-1.733 2.296-3.827 2.582-6.017a.874.874 0 00-.825-.835zM6.857 23.012c-.808.018-1.082 1.122-.47 1.59 1.393 1.607 3.187 2.886 5.194 3.599.91.222 1.43-1.165.598-1.596a11.495 11.495 0 01-4.723-3.396.899.899 0 00-.599-.197zm15.057 2.7c-.81.194-1.504.76-2.325.972-1.203.458-2.5.536-3.758.664-.869.307-.573 1.728.346 1.663 2.201-.034 4.412-.626 6.293-1.778.604-.495.227-1.532-.556-1.521zM6.346 27.118c-.833.008-1.11 1.218-.395 1.617 1.986 1.602 4.358 2.749 6.868 3.226.933.076 1.227-1.376.338-1.67a14.838 14.838 0 01-6.345-3.066.929.929 0 00-.466-.107zm19.208.087c-.766.09-1.241.841-1.922 1.158-1.516.991-3.251 1.58-4.996 2.005-.872.405-.346 1.849.584 1.604 2.543-.526 4.98-1.66 6.963-3.344.47-.52.072-1.42-.63-1.423z"
+})));
+
+function _extends$M() { _extends$M = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$M.apply(this, arguments); }
+var IntermediateEventCatchNonInterruptingMessageIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$M({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M8.742 10.464v11.072h14.516V10.464H8.742zm3.224 1.73h8.066a69569 69569 0 00-4.034 3.22l-4.032-3.22zm9.565 1.018v6.594H10.469v-6.593L16 17.63l5.532-4.419zM16 0h-.005l-.188.001h-.011l-.188.004h-.011l-.187.006h-.011l-.187.008h-.005L15.2.02l-.187.01h-.005l-.005.001-.187.013h-.011L14.62.06h-.01l-.186.018h-.011l-.185.02-.005.001h-.006l-.185.022-.005.001h-.005l-.185.025h-.005l-.005.001-.185.027h-.005l-.005.001-.184.029h-.005l-.005.001-.183.031-.006.001-.005.001-.182.033-.006.001-.005.001-.182.035-.005.001-.005.001-.182.038h-.005l-.005.002-.181.04h-.005l-.005.002-.18.042-.006.001-.005.001-.18.044-.005.002h-.005l-.17.045-.152.054-.139.082-.121.106-.1.127-.074.143-.046.155-.017.16.013.16.043.156.07.145.097.13.119.108.137.085.15.058.159.03.16-.001.133-.023.165-.043.168-.041.171-.04.171-.037.172-.036.17-.033.173-.03.17-.03.177-.027.171-.025.175-.022.175-.02.175-.02.176-.016.175-.014.177-.012.176-.01.177-.007.174-.006.177-.003L16 1.73h.177l.178.004.174.006.177.007.176.01.177.012.175.014.176.017.175.018.175.02.175.023.171.025.176.027.17.03.174.03.17.033.171.036.154.033.16.02.161-.01.156-.04.146-.069.131-.094.111-.117.087-.135.061-.15.032-.158.002-.16-.027-.16-.057-.15L20 .714l-.108-.12-.128-.097-.145-.073-.128-.038-.158-.035-.005-.001-.005-.001L19.14.31h-.005l-.005-.002-.182-.035h-.006l-.005-.002-.182-.033h-.006l-.005-.002-.183-.03-.005-.001-.006-.001-.183-.029h-.005l-.006-.001-.184-.027h-.005l-.005-.001-.185-.024h-.005L17.968.12 17.783.1l-.006-.001h-.005l-.185-.02h-.006l-.005-.001L17.39.06h-.005L17.38.06l-.187-.015h-.005l-.005-.001-.187-.013h-.011L16.8.02h-.011L16.6.01h-.011l-.187-.006h-.011L16.204 0h-.011L16.005 0H16zm9.015 2.935l-.16.004-.158.033-.15.062-.134.09-.116.111-.093.132-.067.147-.038.156-.01.161.022.16.05.153.078.141.103.124.102.087.045.034.142.106.137.105.14.11.136.11.135.112.134.115.134.117.13.115.132.122.128.12.127.122.126.125.124.126.124.128.121.13.118.128.118.132.117.133.113.134.113.136.11.136.109.137.109.142.104.14.103.14.101.142.1.144.099.146.095.145.094.147.093.15.092.15.087.149.087.15.084.152.084.155.08.152.08.155.04.081.084.138.11.119.128.096.145.072.155.043.16.013.16-.016.155-.046.144-.074.127-.099.106-.12.083-.14.055-.151.026-.16-.004-.16-.034-.158-.05-.124-.042-.085-.002-.004-.003-.005-.084-.165-.002-.004-.003-.005-.086-.164-.002-.004-.003-.005-.088-.162-.002-.005-.003-.005-.09-.161-.002-.005-.003-.004-.092-.16-.003-.005-.002-.005-.094-.16-.003-.004-.003-.004-.096-.159-.002-.004-.003-.005-.098-.157-.003-.004-.003-.005-.1-.156-.003-.004-.003-.005-.101-.154-.003-.005-.003-.004-.104-.154-.003-.004-.003-.005-.106-.152-.003-.005-.003-.004-.108-.151-.003-.004-.003-.005-.11-.15-.003-.004-.003-.004-.111-.15-.004-.003-.003-.005-.113-.147-.004-.004-.003-.005-.115-.146-.004-.004-.003-.004-.117-.145-.004-.004-.003-.004-.12-.144-.003-.004-.003-.004-.121-.142-.004-.004-.003-.004-.123-.141-.003-.004-.004-.004-.125-.14-.003-.004-.004-.004-.127-.138-.003-.004-.004-.004-.128-.136-.004-.004-.004-.004-.13-.135-.004-.004-.004-.004-.132-.134-.003-.004-.004-.003-.134-.133-.004-.003-.004-.004-.135-.13-.004-.004-.004-.004-.136-.128-.004-.004-.004-.004-.138-.126-.004-.004-.004-.003-.14-.125-.004-.004-.004-.003-.14-.123-.005-.004-.004-.003-.142-.121-.004-.004-.004-.003-.144-.12-.004-.003-.004-.003-.145-.117-.004-.004-.004-.003-.147-.115-.004-.004-.004-.003-.148-.113-.004-.003-.004-.004-.149-.111-.004-.003-.004-.004-.05-.036-.14-.083-.15-.055-.16-.027zM6.634 3.28l-.161.008-.157.037-.147.066-.111.074-.04.032-.005.003-.004.004-.145.117-.004.003-.004.004-.144.119-.004.003-.004.004-.142.12-.004.004-.004.004-.141.123-.004.003-.004.004-.14.125-.004.003-.004.004-.138.126-.004.004-.004.004-.136.128-.004.004-.004.004-.135.13-.004.004-.004.003-.134.133-.004.003-.004.004-.132.134-.003.004-.004.004-.13.135-.004.004-.004.004-.128.136-.004.004-.004.004-.126.138-.004.004-.003.004-.125.14-.004.004-.003.004-.123.14-.004.005-.003.004-.121.142-.004.004-.003.004-.12.144-.003.004-.003.004-.117.145-.004.004-.003.004-.115.146-.004.005-.003.004-.113.147-.003.005-.004.004-.111.149-.003.004-.004.004-.11.15-.002.005-.003.004-.108.151-.003.004-.003.005-.106.152-.003.005-.003.004-.104.154-.003.004-.003.005-.102.154-.003.005-.002.004-.1.156-.003.005-.003.004-.098.157-.003.005-.003.004-.096.159-.002.004-.003.005-.094.16-.003.004-.002.004-.092.16-.003.005-.003.005-.09.161-.002.005-.003.005-.088.162-.002.005-.003.004-.086.164-.002.005-.002.004-.084.165-.003.005-.002.004-.082.166-.002.004-.003.005-.08.167-.002.004-.002.005-.078.168-.002.004-.002.005-.045.1-.053.153-.023.16.007.16.037.157.065.148.092.132.114.114.134.09.148.064.157.035.161.006.16-.025.152-.054.14-.08.121-.106.1-.126.065-.118.043-.095.074-.16.075-.155.077-.157.08-.155.08-.152.083-.155.085-.152.086-.15.088-.149.091-.15.094-.15.094-.147.095-.145.099-.146.1-.144.1-.142.104-.14.104-.14.11-.142.107-.137.11-.136.114-.136.113-.134.117-.133.118-.132.117-.129.122-.13.124-.127.123-.126.127-.125.127-.122.128-.12.132-.122.13-.115.133-.117.135-.115.135-.111.136-.11.037-.03.117-.11.094-.132.068-.146.04-.156.01-.161-.02-.16-.05-.154-.076-.141-.102-.125-.123-.104-.14-.08-.153-.051-.16-.023zM16 3.286h-.005l-.148.001h-.01l-.147.003h-.011l-.147.005h-.011l-.146.007h-.011l-.146.009h-.011l-.146.01h-.005l-.005.001-.146.012h-.011l-.145.014h-.006l-.005.001-.05.006-.158.031-.15.06-.135.088-.117.111-.094.13-.069.147-.04.156-.01.16.019.16.049.154.076.142.102.125.123.105.14.08.152.051.16.023.134-.003.045-.005.135-.013.133-.01.136-.01.135-.007.137-.006.136-.004.136-.003h.274l.136.003.136.004.136.006.136.007.136.01.133.01.135.013.135.014.135.016.134.018.132.018.134.021.133.023.133.024.133.025.13.027.132.03.132.03.129.031.13.034.129.035.129.036.13.04.126.038.128.042.126.042.128.045.127.047.126.047.12.048.127.051.123.052.006.002.147.048.16.021.16-.009.157-.038.147-.067.131-.093.112-.116.089-.135.062-.149.033-.158.004-.16-.027-.16-.055-.151-.083-.139-.107-.12-.127-.099-.118-.063-.004-.001-.005-.003-.005-.002-.133-.056-.005-.002-.005-.002-.134-.054-.004-.002-.005-.002-.135-.053-.005-.002-.005-.002-.135-.051-.005-.002-.005-.002-.135-.05-.005-.001-.005-.002-.137-.048-.005-.001-.005-.002-.137-.046-.005-.002-.005-.002-.137-.044-.005-.002-.005-.001-.138-.043-.006-.002-.005-.001-.138-.042-.005-.001-.005-.002-.14-.04H19.4l-.005-.002-.14-.038-.005-.001-.005-.002-.14-.036-.005-.001-.005-.001-.141-.035-.005-.001-.005-.001-.142-.033-.005-.001-.005-.001-.142-.031-.005-.002h-.005l-.142-.03-.005-.001-.005-.001-.143-.028h-.005l-.005-.002-.143-.025-.006-.001-.005-.001-.143-.024-.005-.001-.006-.001-.143-.022-.006-.001h-.005l-.144-.022h-.005l-.006-.001-.144-.019h-.005l-.006-.001-.144-.017h-.006l-.005-.001-.145-.016h-.011l-.145-.014H17.1l-.005-.001-.146-.012h-.01l-.146-.01-.006-.001h-.005l-.146-.009h-.011l-.147-.006h-.01l-.147-.005h-.011l-.147-.003h-.011l-.147-.001H16zm-5.482 1.366l-.16.008-.157.037-.123.053-.06.032-.005.002-.004.003-.128.069-.004.002-.005.003-.126.07-.005.003-.004.002-.126.072-.005.003-.004.003-.125.073-.004.003-.005.003-.124.075-.004.003-.005.002-.123.077-.004.003-.005.003-.122.078-.004.003-.005.003-.121.08-.004.002-.005.003-.12.082-.005.003-.004.003-.12.083-.004.003-.004.003-.118.084-.005.003-.004.003-.118.086-.004.003-.004.003-.117.088-.004.003-.004.003-.116.089-.004.003-.004.004-.114.09-.005.003-.004.003-.113.092-.004.004-.004.003-.113.093-.004.004-.004.003-.111.095-.005.003-.004.004-.11.096-.004.004-.004.003-.11.098-.003.003-.004.004-.108.1-.004.003-.004.003-.107.101-.004.004-.004.003-.106.102-.004.004-.003.004-.105.103-.004.004-.004.004-.103.105-.004.004-.004.003-.102.106-.003.004-.004.004-.1.107-.004.004-.004.004-.099.108-.004.004-.003.004-.098.11-.003.003-.004.004-.096.11-.004.005-.003.004-.095.111-.003.004-.004.004-.093.113-.003.004-.004.004-.092.113-.003.004-.003.005-.09.114-.004.004-.003.004-.089.116-.003.004-.003.004-.088.117-.003.004-.003.004-.086.118-.003.004-.003.005-.084.118-.003.004-.003.005-.083.12-.003.003-.003.005-.082.12-.003.005-.002.004-.068.103-.076.142-.048.154-.018.16.011.161.041.156.07.146.095.13.117.11.136.086.15.06.158.03.162.002.158-.03.15-.057.138-.085.119-.109.082-.105.065-.099.075-.11.077-.113.077-.107.08-.11.08-.108.084-.108.083-.105.086-.106.086-.104.088-.104.089-.101.09-.102.093-.101.093-.099.094-.097.095-.096.098-.097.098-.095.099-.093.1-.092.103-.091.101-.089.104-.088.104-.086.106-.086.106-.083.106-.082.109-.082.108-.079.11-.078.11-.076.112-.076.112-.074.113-.072.113-.071.115-.07.115-.068.118-.067.117-.065.12-.065.054-.029.135-.088.116-.111.094-.132.068-.146.04-.156.009-.161-.02-.16-.05-.153-.078-.142-.102-.125-.123-.103-.141-.079-.153-.051-.16-.022zm13.91 2.116l-.162.008-.157.037-.147.066-.132.092-.113.116-.09.134-.063.148-.034.157-.005.162.025.159.055.152.082.138.086.103.09.09.094.098.092.099.093.1.091.103.089.101.088.104.086.104.086.106.083.105.083.108.08.108.081.11.077.107.077.112.075.111.075.114.072.113.071.113.07.114.068.118.067.115.065.118.064.117.062.117.061.121.059.119.059.122.056.121.054.12.055.125.051.123.051.125.048.123.048.127.047.126.044.125.043.128.042.129.039.126.038.13.022.076.058.15.085.137.11.119.129.096.145.07.155.043.16.013.161-.017.154-.046.144-.075.126-.1.106-.12.082-.14.055-.151.025-.16-.005-.16-.026-.132-.023-.082-.002-.005-.001-.005-.042-.139-.001-.005-.002-.005-.043-.138-.001-.005-.002-.005-.044-.137-.002-.005-.002-.005-.046-.137-.002-.005-.001-.005-.048-.137-.002-.005-.002-.005-.05-.135-.001-.005-.002-.005-.051-.135-.002-.005-.002-.005-.053-.135-.002-.005-.002-.005-.054-.133-.002-.005-.002-.005-.057-.133-.002-.005-.002-.005-.057-.132-.003-.005-.002-.005-.06-.132-.001-.005-.002-.004-.061-.132-.003-.004-.002-.005-.063-.13-.002-.005-.002-.005-.064-.13-.003-.004-.002-.005-.066-.129-.002-.004-.003-.005-.067-.128-.002-.005-.003-.004-.069-.128-.002-.004-.003-.005-.07-.126-.003-.005-.003-.004-.072-.126-.002-.005-.003-.004-.074-.125-.002-.004-.003-.005-.075-.124-.003-.004-.003-.005-.076-.123-.003-.004-.003-.005-.078-.122-.003-.004-.003-.005-.08-.121-.003-.004-.003-.005-.081-.12-.003-.005-.003-.004-.083-.12-.003-.004-.003-.004-.084-.118-.003-.005-.003-.004-.086-.118-.003-.004-.004-.004-.087-.117-.003-.004-.003-.004-.09-.116-.002-.004-.004-.004-.09-.114-.003-.005-.004-.004-.091-.113-.004-.004-.003-.004-.094-.113-.003-.004-.003-.004-.095-.111-.004-.004-.003-.004-.096-.11-.004-.005-.003-.004-.098-.11-.004-.003-.003-.004-.1-.108-.003-.004-.004-.004-.1-.107-.004-.004-.004-.004-.102-.106-.003-.003-.004-.004-.093-.095-.124-.103-.14-.08-.153-.05-.16-.023zM4.45 12.826l-.161.002-.158.032-.15.06-.135.088-.118.11-.094.131-.069.146-.035.129-.026.132v.005l-.002.005-.025.143-.001.005-.001.006-.024.143-.001.005-.001.006-.022.143-.001.006-.001.005-.02.144-.001.005-.001.005-.019.145v.005l-.001.006-.017.144v.006l-.001.005-.016.145v.011l-.014.145v.005l-.001.006-.012.146v.01l-.01.146-.001.006v.005l-.009.146v.011l-.007.146v.011l-.004.147v.011l-.003.147v.01l-.002.148v.01l.001.148v.01l.003.147v.011l.005.147v.01l.007.147v.011l.009.146v.011l.01.146v.01l.013.146v.011l.014.145v.005l.001.006.016.145v.011l.018.144v.006l.001.005.019.144v.006l.001.005.021.144v.005l.002.006.022.143v.006l.002.005.024.143v.005l.002.006.025.143.001.005.001.005.028.143.001.005.001.005.03.142v.005l.002.006.03.141.002.005.001.005.033.142v.005l.002.005.035.14v.006l.002.005.036.14.002.005.001.005.038.14.001.005.002.005.04.14v.005l.002.005.042.138.001.006.002.005.042.138.002.005.002.005.017.054.064.148.09.134.114.114.132.092.148.065.157.037.16.007.16-.023.153-.052.14-.08.123-.104.102-.125.076-.142.049-.153.02-.16-.011-.161-.031-.13-.017-.051-.039-.126-.038-.13-.037-.128-.035-.13-.033-.128-.033-.134-.03-.13-.029-.131-.026-.13-.026-.133-.024-.133-.023-.133-.02-.132-.02-.136-.017-.132-.016-.135-.014-.135-.012-.133-.012-.138-.009-.133-.007-.136-.006-.138-.004-.134-.003-.136v-.274l.003-.136.004-.134.006-.139.007-.136.01-.133.01-.138.013-.132.014-.135.016-.135.017-.132.02-.137.02-.13.023-.134.024-.133.024-.126.016-.16-.014-.161-.044-.155-.072-.145-.098-.128-.12-.108-.137-.084-.15-.057-.16-.029zm26.698 1.601l-.161.01-.157.04-.146.067-.131.093-.112.117-.088.135-.061.149-.033.157-.005.134.006.14.006.176.003.177.001.178-.001.177-.003.178-.006.177-.007.176-.01.177-.012.176-.015.176-.016.173-.018.175-.02.175-.024.174-.025.175-.026.17-.03.174-.03.173-.033.17-.036.172-.037.17-.04.17-.042.172-.043.168-.045.166-.048.169-.05.167-.052.168-.053.164-.056.166-.058.166-.06.16-.062.165-.062.158-.066.165-.068.16-.07.16-.07.158-.075.159-.074.155-.079.158-.08.158-.06.15-.03.158-.001.161.029.159.058.15.085.137.108.119.13.097.144.07.156.044.16.013.16-.017.155-.046.143-.074.127-.1.107-.12.07-.115.083-.164.003-.005.002-.004.082-.166.002-.005.003-.004.08-.167.002-.005.002-.004.078-.168.002-.005.002-.004.076-.169.002-.004.002-.005.074-.17.002-.004.002-.005.072-.17.002-.005.002-.005.07-.171.001-.005.002-.005.068-.172.002-.004.002-.005.065-.173.002-.005.002-.005.063-.173.002-.005.002-.005.06-.174.003-.005.001-.005.06-.175.001-.005.002-.005.057-.176.001-.005.002-.005.055-.177.001-.005.002-.005.052-.177.002-.005.001-.005.051-.178.001-.005.002-.005.048-.179.002-.005v-.005l.047-.179.001-.005.002-.005.044-.18v-.005l.002-.005.042-.18.001-.006.001-.005.04-.181.001-.005.001-.005.037-.182.002-.005v-.005l.036-.182v-.006l.002-.005.033-.182v-.006l.002-.005.03-.183.001-.005.001-.005.029-.184v-.005l.001-.006.027-.184v-.005l.001-.005.024-.185v-.005l.001-.005.022-.185v-.006l.001-.005.02-.185v-.006l.001-.005.017-.186v-.005l.001-.005.015-.187v-.005l.001-.005.013-.187v-.01l.01-.187.001-.006v-.005l.009-.187v-.011l.006-.187v-.011l.004-.188v-.011l.001-.188v-.01l-.001-.188v-.011l-.004-.188v-.011l-.006-.187v-.011l-.007-.145-.022-.16-.05-.152-.08-.141-.103-.124-.125-.102-.141-.077-.153-.05-.16-.02zM.938 15L.777 15l-.158.032-.15.06-.136.087-.117.11-.095.131-.068.146-.04.156-.012.133-.001.14v.01l.001.188v.011l.004.188v.011l.006.187v.011l.008.187v.011l.011.187v.005l.001.005.013.187v.01l.016.187v.01l.018.186v.011l.02.185.001.005v.006l.022.185.001.005v.005l.025.185v.005l.001.005.027.184v.006l.001.005.029.184v.005l.001.005.031.183.001.005.001.006.033.182.001.005.001.006.035.182.001.005.001.005.038.182v.005l.002.005.04.181v.005l.002.005.042.18.001.006.001.005.044.18.002.005v.005l.047.18.001.004.002.005.048.179.002.005.001.005.05.178.002.005.001.005.053.177.002.005.001.005.055.177.002.005.001.005.057.176.002.005.001.005.06.175.001.005.002.005.061.174.002.005.002.005.063.173.002.005.002.005.065.173.002.005.002.004.067.172.002.005.002.005.07.171.002.005.002.005.072.17.002.005.002.004.074.17.002.005.002.004.076.169.002.004.002.005.078.168.002.004.002.005.08.167.003.004.002.005.082.166.002.004.003.005.02.04.086.136.11.118.13.095.146.07.156.041.16.012.16-.019.155-.048.142-.075.126-.1.105-.123.08-.14.054-.152.024-.16-.006-.16-.036-.158-.051-.123-.018-.034-.078-.158L3.1 22.1l-.074-.16-.071-.157-.07-.16-.068-.16-.067-.165-.062-.158-.062-.164-.059-.161-.058-.166-.056-.166-.053-.164-.052-.168-.05-.167-.048-.17-.045-.165-.043-.168-.043-.172-.039-.17-.037-.17-.036-.172-.033-.17-.03-.173-.03-.174-.027-.17-.025-.175-.022-.174-.021-.175-.018-.175-.017-.173-.014-.176-.012-.176-.01-.177-.007-.176-.006-.177-.003-.178L1.73 16v-.134l-.013-.16-.044-.156-.072-.144-.097-.129-.12-.108-.137-.085-.15-.057L.938 15zm26.798 2.024l-.16.007-.157.038-.148.066-.132.092-.113.115-.09.134-.062.148-.03.127-.001.004-.023.134-.024.133-.026.133-.026.13-.03.132-.03.129-.032.134-.033.128-.035.13-.037.128-.038.13-.04.126-.04.128-.044.128-.044.126-.046.126-.048.126-.05.125-.05.125-.051.122-.054.123-.055.122-.056.12-.058.122-.06.12-.061.12-.063.119-.062.116-.067.119-.066.116-.069.115-.069.115-.07.113-.073.113-.074.112-.076.113-.077.112-.077.107-.08.11-.08.107-.085.11-.044.056-.088.135-.06.15-.033.158-.002.16.027.16.057.15.083.138.108.12.128.098.144.072.155.045.16.015.161-.016.155-.044.144-.073.128-.098.09-.099.05-.061.003-.004.003-.005.089-.115.003-.004.003-.005.088-.116.003-.004.003-.005.086-.117.003-.004.003-.005.084-.118.003-.004.003-.005.083-.12.003-.004.003-.004.081-.12.003-.005.003-.004.08-.121.003-.005.003-.004.078-.122.003-.005.003-.004.077-.123.002-.005.003-.004.075-.124.003-.005.003-.004.073-.125.003-.005.003-.004.072-.126.002-.004.003-.005.07-.126.003-.005.002-.005.07-.127.002-.004.002-.005.068-.128.002-.005.002-.004.066-.13.003-.004.002-.005.064-.13.002-.004.003-.005.062-.13.002-.005.003-.005.06-.13.003-.005.002-.005.06-.132.002-.005.002-.005.057-.132.003-.005.002-.005.056-.133.002-.005.002-.005.054-.134.002-.004.002-.005.053-.135.002-.005.002-.005.051-.135.002-.005.002-.005.05-.135.001-.005.002-.005.048-.137.001-.005.002-.005.046-.137.002-.005.002-.005.044-.137.002-.005.002-.005.042-.138.002-.005.001-.006.042-.138.001-.005.002-.005.04-.14V19.4l.002-.005.038-.14.001-.005.002-.005.036-.14.001-.005.001-.005.035-.141.001-.005.001-.005.033-.142.001-.005.001-.005.031-.141.001-.006.002-.005.029-.142v-.005l.002-.005.028-.143v-.005l.002-.005.025-.143.001-.006.001-.005.024-.143.001-.005.001-.006.001-.006.01-.161-.02-.16-.05-.154-.077-.141-.102-.125-.123-.104-.141-.079-.153-.051-.16-.022zM6.841 22.71l-.16.024-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.018.16.011.161.041.156.07.146.077.109.04.048.003.004.003.004.095.111.003.004.004.004.096.11.004.005.003.004.098.109.003.004.004.004.1.108.003.004.003.004.101.107.004.004.003.004.102.105.004.004.004.004.103.105.004.004.004.003.105.104.003.004.004.003.106.102.004.004.004.004.107.1.004.004.004.004.108.099.004.003.004.004.11.098.003.003.004.004.11.096.004.003.005.004.11.095.005.003.004.004.113.093.004.003.004.004.113.091.004.004.005.003.114.09.004.004.004.003.116.089.004.003.004.003.117.088.004.003.004.003.118.086.004.003.005.003.118.084.004.003.005.003.119.083.004.003.005.003.12.081.005.003.004.003.121.08.005.003.004.003.122.078.005.003.004.003.123.076.005.003.004.003.124.075.005.003.004.003.125.073.004.003.005.002.126.073.004.002.005.003.126.07.005.003.004.002.128.07.004.002.005.002.128.067.005.003.004.002.13.066.004.002.005.003.13.064.004.002.005.003.13.062.005.002.004.003.132.06.004.003.005.002.132.06.005.002.005.002.132.057.005.002.005.002.133.057.005.002.005.002.133.054.005.002.005.002.13.05.154.045.16.016.16-.015.156-.045.144-.072.128-.098.108-.12.083-.138.057-.15.028-.16-.003-.16-.032-.159-.061-.149-.088-.135-.11-.117-.132-.094-.12-.058-.124-.049-.126-.051-.122-.051-.122-.054-.12-.054-.126-.058-.119-.057-.12-.06-.12-.06-.118-.063-.117-.064-.119-.066-.116-.066-.115-.068-.115-.07-.113-.07-.115-.074-.112-.074-.11-.075-.11-.076-.112-.08-.11-.08-.109-.081-.106-.082-.104-.082-.106-.086-.105-.087-.101-.086-.105-.091-.1-.09-.1-.091-.1-.094-.097-.094-.1-.098-.093-.095-.096-.1-.093-.098-.092-.101-.089-.1-.09-.102-.088-.104-.036-.043-.114-.114-.133-.091-.148-.065-.157-.036-.161-.006zm15.063 2.701l-.16.014-.156.044-.12.057-.06.034-.12.066-.117.064-.118.062-.12.061-.12.06-.118.057-.126.058-.12.054-.122.054-.122.05-.126.052-.125.05-.124.046-.127.047-.125.044-.129.043-.126.04-.13.042-.128.038-.127.035-.13.036-.131.034-.129.031-.132.03-.13.03-.135.027-.133.026-.13.023-.13.022-.137.021-.132.02-.134.017-.132.015-.138.015-.135.013-.133.01-.138.01-.136.007-.134.006-.136.004-.14.003-.16.018-.155.047-.142.076-.127.1-.105.122-.08.14-.054.151-.025.16.006.16.035.158.064.148.09.134.114.114.133.092.147.065.157.036.134.008.145-.002h.011l.147-.005h.01l.147-.007h.011l.146-.009h.011l.146-.01h.005l.005-.001.146-.012h.011l.145-.014h.005l.006-.001.145-.016h.011l.144-.018h.006l.005-.001.144-.02h.011l.144-.021.005-.001h.006l.143-.023.006-.001h.005l.143-.025h.005l.006-.002.143-.026h.005l.005-.002.143-.027.005-.001.005-.001.142-.03h.005l.005-.002.142-.03.005-.002.005-.001.142-.033.005-.001.005-.001.14-.035.006-.001.005-.001.14-.037h.005l.005-.002.14-.038.005-.002h.005l.14-.04.005-.002.005-.001.138-.042.005-.001.006-.002.138-.043.005-.001.005-.002.137-.044.005-.002.005-.002.137-.046.005-.002.005-.001.137-.048.005-.002.005-.002.135-.05.005-.001.005-.002.135-.051.005-.002.005-.002.135-.053.005-.002.004-.002.134-.054.005-.002.005-.002.133-.057.005-.002.005-.002.132-.057.005-.003.005-.002.132-.06.005-.001.004-.002.131-.061.005-.003.005-.002.13-.062.005-.003.005-.002.13-.064.004-.003.005-.002.128-.066.005-.002.005-.003.128-.067.005-.002.004-.003.127-.069.005-.002.005-.003.126-.07.005-.003.004-.003.065-.037.132-.093.112-.115.089-.135.062-.149.034-.157.003-.161-.026-.16-.055-.15-.082-.14-.107-.12-.127-.1-.144-.073-.154-.046-.16-.016zM6.33 26.818l-.16.023-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.02.16.012.161.041.156.07.146.094.13.096.093.032.026.004.003.004.004.145.117.004.003.004.004.146.115.005.003.004.004.147.113.005.003.004.004.149.111.004.003.004.003.15.11.005.003.004.003.151.108.004.003.005.003.152.106.005.003.004.003.154.104.004.003.005.003.154.102.005.002.004.003.156.1.005.003.004.003.157.098.005.003.004.002.159.096.004.003.005.003.16.094.004.003.004.002.16.092.005.003.005.002.161.09.005.003.005.002.162.088.005.003.004.002.164.086.005.003.004.002.165.084.005.003.004.002.166.082.004.002.005.003.167.08.004.002.005.002.168.078.004.002.005.002.168.076.005.002.005.002.17.074.004.002.005.002.17.072.005.002.005.002.17.07.006.002.005.001.171.068.005.002.005.002.173.065.005.002.005.002.173.063.005.002.005.002.174.06.005.003.005.001.175.06.005.001.005.002.176.057.005.001.005.002.176.055.006.001.005.002.177.052.005.002.005.001.178.05.005.002.005.002.178.048.006.001.005.002.179.046.005.001.005.002.18.044h.005l.005.002.18.042.006.001.005.001.159.035.16.02.16-.01.157-.04.146-.069.13-.094.112-.117.087-.136.06-.149.033-.158.002-.161-.028-.159-.057-.15-.084-.138-.108-.12-.128-.098-.144-.072-.128-.039-.154-.033-.168-.04-.171-.041-.17-.044-.168-.046-.167-.047-.168-.05-.165-.051-.166-.054-.166-.056-.163-.057-.165-.06-.161-.062-.164-.064-.16-.065-.16-.068-.162-.07-.157-.07-.157-.074-.157-.075-.156-.077-.153-.079-.156-.082-.153-.082-.154-.086-.15-.086-.152-.09-.148-.09-.147-.092-.149-.095-.145-.095-.144-.098-.145-.1-.143-.102-.14-.103-.14-.104-.14-.108-.139-.11-.136-.11-.027-.022-.133-.091-.148-.065-.157-.036-.161-.006zm19.215.087l-.16.01-.157.039-.146.067-.11.076-.064.051-.139.11-.14.108-.14.104-.14.103-.143.101-.145.101-.144.098-.145.095-.149.095-.148.093-.147.089-.152.09-.15.086-.154.086-.153.082-.156.082-.153.079-.156.077-.157.075-.158.073-.157.071-.16.07-.16.068-.161.065-.164.064-.161.061-.165.06-.163.058-.166.056-.166.054-.166.051-.167.05-.167.047-.17.046-.168.044-.171.042-.168.039-.17.037-.11.023-.154.047-.143.075-.126.1-.106.122-.081.139-.054.152-.025.16.006.16.035.158.063.148.09.133.114.115.132.092.148.065.157.037.16.007.133-.016.115-.024.005-.001.005-.001.181-.04h.005l.005-.002.18-.042.006-.001.005-.001.18-.044.005-.002.005-.001.18-.046.004-.002h.005l.179-.05h.005l.005-.002.178-.05.005-.002.005-.002.177-.052.005-.002.005-.001.177-.055.005-.002.005-.001.176-.057.005-.002.005-.002.175-.059.005-.001.005-.002.174-.061.005-.002.005-.002.173-.063.005-.002.005-.002.173-.065.004-.002.005-.002.172-.068.005-.002.005-.002.171-.07.005-.001.005-.002.17-.072.005-.002.004-.002.17-.074.005-.002.004-.002.169-.076.004-.002.005-.002.168-.078.004-.002.005-.003.167-.08.004-.002.005-.002.166-.082.004-.002.005-.003.165-.084.004-.002.005-.003.163-.086.005-.002.005-.003.162-.088.005-.002.005-.003.161-.09.005-.002.004-.003.16-.092.005-.003.005-.002.16-.094.004-.003.004-.003.158-.096.005-.002.004-.003.158-.098.004-.003.005-.003.156-.1.004-.003.004-.003.155-.101.005-.003.004-.003.154-.104.004-.003.004-.003.153-.106.004-.003.005-.003.151-.108.004-.003.005-.003.15-.11.004-.003.004-.003.149-.112.004-.003.004-.003.148-.113.004-.004.004-.003.147-.115.004-.004.004-.003.068-.055.116-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.05-.153-.08-.14-.103-.125-.124-.102-.142-.077-.153-.05-.16-.02z"
+})));
+
+function _extends$L() { _extends$L = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$L.apply(this, arguments); }
+var IntermediateEventCatchNonInterruptingMultipleIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$L({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M23.637 13.902l-7.625-5.535-7.624 5.535 2.912 8.956h9.425l2.912-8.956zm-1.017.33l-2.524 7.762H11.93l-2.524-7.762 6.607-4.796 6.608 4.796zM16.012.311c-1.448.02-2.93.157-4.302.628-.852.447-.255 1.863.66 1.574 2.255-.608 4.648-.607 6.922-.108.934.075 1.228-1.376.338-1.67C18.451.44 17.227.317 16.012.311zm9.012 2.934c-.913-.104-1.272 1.258-.454 1.648 1.834 1.36 3.293 3.185 4.31 5.22.526.776 1.842.098 1.515-.78a15.522 15.522 0 00-5.06-6.006c-.1-.044-.203-.07-.31-.082zM6.65 3.59c-.762.089-1.24.809-1.805 1.267C3.38 6.295 2.163 8.007 1.37 9.905c-.266.898 1.094 1.484 1.564.675a14.825 14.825 0 014.327-5.56c.476-.515.09-1.419-.612-1.431zm9.362.007c-.698.066-1.689-.16-2.033.635-.282.733.535 1.358 1.217 1.125 1.806-.147 3.63.203 5.293.907.902.255 1.472-1.112.656-1.573-1.6-.735-3.374-1.089-5.133-1.094zm-5.479 1.365c-.835.15-1.517.76-2.21 1.226-1.203.94-2.318 2.061-3.057 3.402-.33.904 1.063 1.552 1.547.723 1.045-1.656 2.596-2.925 4.285-3.873.545-.499.171-1.463-.565-1.478zm13.903 2.115c-.875-.07-1.22 1.173-.501 1.627 1.325 1.34 2.188 3.062 2.748 4.84.468.84 1.869.21 1.557-.699-.604-2.118-1.751-4.097-3.351-5.615a.93.93 0 00-.453-.153zM4.467 13.132c-.822-.07-.996.826-1.046 1.455-.256 1.93-.094 3.933.562 5.769.406.844 1.807.365 1.612-.551a11.498 11.498 0 01-.334-5.808.874.874 0 00-.794-.865zm26.687 1.6c-.746-.037-1.014.785-.879 1.395.043 2.393-.57 4.771-1.66 6.894-.31.884 1.02 1.536 1.53.75a15.632 15.632 0 001.821-8.372.876.876 0 00-.812-.667zm-30.197.571c-.782-.073-1.044.775-.933 1.404.068 2.414.661 4.833 1.809 6.962.534.77 1.842.076 1.505-.798a14.833 14.833 0 01-1.603-6.861.876.876 0 00-.778-.707zm26.787 2.024c-.777-.048-.952.797-1.021 1.392-.354 1.692-1.202 3.231-2.216 4.608-.407.872.925 1.638 1.48.852 1.361-1.733 2.296-3.827 2.582-6.017a.874.874 0 00-.825-.835zM6.857 23.012c-.808.018-1.082 1.122-.47 1.59 1.393 1.607 3.187 2.886 5.194 3.599.91.222 1.43-1.165.598-1.596a11.495 11.495 0 01-4.723-3.396.899.899 0 00-.599-.197zm15.057 2.7c-.81.194-1.504.76-2.325.972-1.203.458-2.5.536-3.758.664-.869.307-.573 1.728.346 1.663 2.201-.034 4.412-.626 6.293-1.778.604-.495.227-1.532-.556-1.521zM6.346 27.118c-.833.008-1.11 1.218-.395 1.617 1.986 1.602 4.358 2.749 6.868 3.226.933.076 1.227-1.376.338-1.67a14.838 14.838 0 01-6.345-3.066.929.929 0 00-.466-.107zm19.208.087c-.766.09-1.241.841-1.922 1.158-1.516.991-3.251 1.58-4.996 2.005-.872.405-.346 1.849.584 1.604 2.543-.526 4.98-1.66 6.963-3.344.47-.52.072-1.42-.63-1.423z"
+})));
+
+function _extends$K() { _extends$K = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$K.apply(this, arguments); }
+var IntermediateEventCatchNonInterruptingParallelIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$K({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M13.51 9.081v4.428H9.08v4.982h4.428v4.428h4.982V18.49h4.428v-4.982H18.49V9.081h-4.982zm.83.83h3.32v4.428h4.429v3.322H17.66v4.428h-3.32v-4.454H9.91v-3.296h4.428V9.911zM16 0h-.005l-.188.001h-.011l-.188.004h-.011l-.187.006h-.011l-.187.008h-.005L15.2.02l-.187.01h-.005l-.005.001-.187.013h-.011L14.62.06h-.01l-.186.018h-.011l-.185.02-.005.001h-.006l-.185.022-.005.001h-.005l-.185.025h-.005l-.005.001-.185.027h-.005l-.005.001-.184.029h-.005l-.005.001-.183.031-.006.001-.005.001-.182.033-.006.001-.005.001-.182.035-.005.001-.005.001-.182.038h-.005l-.005.002-.181.04h-.005l-.005.002-.18.042-.006.001-.005.001-.18.044-.005.002h-.005l-.17.045-.152.054-.139.082-.121.106-.1.127-.074.143-.046.155-.017.16.013.16.043.156.07.145.097.13.119.108.137.085.15.058.159.03.16-.001.133-.023.165-.043.168-.041.171-.04.171-.037.172-.036.17-.033.173-.03.17-.03.177-.027.171-.025.175-.022.175-.02.175-.02.176-.016.175-.014.177-.012.176-.01.177-.007.174-.006.177-.003L16 1.73h.177l.178.004.174.006.177.007.176.01.177.012.175.014.176.017.175.018.175.02.175.023.171.025.176.027.17.03.174.03.17.033.171.036.154.033.16.02.161-.01.156-.04.146-.069.131-.094.111-.117.087-.135.061-.15.032-.158.002-.16-.027-.16-.057-.15L20 .714l-.108-.12-.128-.097-.145-.073-.128-.038-.158-.035-.005-.001-.005-.001L19.14.31h-.005l-.005-.002-.182-.035h-.006l-.005-.002-.182-.033h-.006l-.005-.002-.183-.03-.005-.001-.006-.001-.183-.029h-.005l-.006-.001-.184-.027h-.005l-.005-.001-.185-.024h-.005L17.968.12 17.783.1l-.006-.001h-.005l-.185-.02h-.006l-.005-.001L17.39.06h-.005L17.38.06l-.187-.015h-.005l-.005-.001-.187-.013h-.011L16.8.02h-.011L16.6.01h-.011l-.187-.006h-.011L16.204 0h-.011L16.005 0H16zm9.015 2.935l-.16.004-.158.033-.15.062-.134.09-.116.111-.093.132-.067.147-.038.156-.01.161.022.16.05.153.078.141.103.124.102.087.045.034.142.106.137.105.14.11.136.11.135.112.134.115.134.117.13.115.132.122.128.12.127.122.126.125.124.126.124.128.121.13.118.128.118.132.117.133.113.134.113.136.11.136.109.137.109.142.104.14.103.14.101.142.1.144.099.146.095.145.094.147.093.15.092.15.087.149.087.15.084.152.084.155.08.152.08.155.04.081.084.138.11.119.128.096.145.072.155.043.16.013.16-.016.155-.046.144-.074.127-.099.106-.12.083-.14.055-.151.026-.16-.004-.16-.034-.158-.05-.124-.042-.085-.002-.004-.003-.005-.084-.165-.002-.004-.003-.005-.086-.164-.002-.004-.003-.005-.088-.162-.002-.005-.003-.005-.09-.161-.002-.005-.003-.004-.092-.16-.003-.005-.002-.005-.094-.16-.003-.004-.003-.004-.096-.159-.002-.004-.003-.005-.098-.157-.003-.004-.003-.005-.1-.156-.003-.004-.003-.005-.101-.154-.003-.005-.003-.004-.104-.154-.003-.004-.003-.005-.106-.152-.003-.005-.003-.004-.108-.151-.003-.004-.003-.005-.11-.15-.003-.004-.003-.004-.111-.15-.004-.003-.003-.005-.113-.147-.004-.004-.003-.005-.115-.146-.004-.004-.003-.004-.117-.145-.004-.004-.003-.004-.12-.144-.003-.004-.003-.004-.121-.142-.004-.004-.003-.004-.123-.141-.003-.004-.004-.004-.125-.14-.003-.004-.004-.004-.127-.138-.003-.004-.004-.004-.128-.136-.004-.004-.004-.004-.13-.135-.004-.004-.004-.004-.132-.134-.003-.004-.004-.003-.134-.133-.004-.003-.004-.004-.135-.13-.004-.004-.004-.004-.136-.128-.004-.004-.004-.004-.138-.126-.004-.004-.004-.003-.14-.125-.004-.004-.004-.003-.14-.123-.005-.004-.004-.003-.142-.121-.004-.004-.004-.003-.144-.12-.004-.003-.004-.003-.145-.117-.004-.004-.004-.003-.147-.115-.004-.004-.004-.003-.148-.113-.004-.003-.004-.004-.149-.111-.004-.003-.004-.004-.05-.036-.14-.083-.15-.055-.16-.027zM6.634 3.28l-.161.008-.157.037-.147.066-.111.074-.04.032-.005.003-.004.004-.145.117-.004.003-.004.004-.144.119-.004.003-.004.004-.142.12-.004.004-.004.004-.141.123-.004.003-.004.004-.14.125-.004.003-.004.004-.138.126-.004.004-.004.004-.136.128-.004.004-.004.004-.135.13-.004.004-.004.003-.134.133-.004.003-.004.004-.132.134-.003.004-.004.004-.13.135-.004.004-.004.004-.128.136-.004.004-.004.004-.126.138-.004.004-.003.004-.125.14-.004.004-.003.004-.123.14-.004.005-.003.004-.121.142-.004.004-.003.004-.12.144-.003.004-.003.004-.117.145-.004.004-.003.004-.115.146-.004.005-.003.004-.113.147-.003.005-.004.004-.111.149-.003.004-.004.004-.11.15-.002.005-.003.004-.108.151-.003.004-.003.005-.106.152-.003.005-.003.004-.104.154-.003.004-.003.005-.102.154-.003.005-.002.004-.1.156-.003.005-.003.004-.098.157-.003.005-.003.004-.096.159-.002.004-.003.005-.094.16-.003.004-.002.004-.092.16-.003.005-.003.005-.09.161-.002.005-.003.005-.088.162-.002.005-.003.004-.086.164-.002.005-.002.004-.084.165-.003.005-.002.004-.082.166-.002.004-.003.005-.08.167-.002.004-.002.005-.078.168-.002.004-.002.005-.045.1-.053.153-.023.16.007.16.037.157.065.148.092.132.114.114.134.09.148.064.157.035.161.006.16-.025.152-.054.14-.08.121-.106.1-.126.065-.118.043-.095.074-.16.075-.155.077-.157.08-.155.08-.152.083-.155.085-.152.086-.15.088-.149.091-.15.094-.15.094-.147.095-.145.099-.146.1-.144.1-.142.104-.14.104-.14.11-.142.107-.137.11-.136.114-.136.113-.134.117-.133.118-.132.117-.129.122-.13.124-.127.123-.126.127-.125.127-.122.128-.12.132-.122.13-.115.133-.117.135-.115.135-.111.136-.11.037-.03.117-.11.094-.132.068-.146.04-.156.01-.161-.02-.16-.05-.154-.076-.141-.102-.125-.123-.104-.14-.08-.153-.051-.16-.023zM16 3.286h-.005l-.148.001h-.01l-.147.003h-.011l-.147.005h-.011l-.146.007h-.011l-.146.009h-.011l-.146.01h-.005l-.005.001-.146.012h-.011l-.145.014h-.006l-.005.001-.05.006-.158.031-.15.06-.135.088-.117.111-.094.13-.069.147-.04.156-.01.16.019.16.049.154.076.142.102.125.123.105.14.08.152.051.16.023.134-.003.045-.005.135-.013.133-.01.136-.01.135-.007.137-.006.136-.004.136-.003h.274l.136.003.136.004.136.006.136.007.136.01.133.01.135.013.135.014.135.016.134.018.132.018.134.021.133.023.133.024.133.025.13.027.132.03.132.03.129.031.13.034.129.035.129.036.13.04.126.038.128.042.126.042.128.045.127.047.126.047.12.048.127.051.123.052.006.002.147.048.16.021.16-.009.157-.038.147-.067.131-.093.112-.116.089-.135.062-.149.033-.158.004-.16-.027-.16-.055-.151-.083-.139-.107-.12-.127-.099-.118-.063-.004-.001-.005-.003-.005-.002-.133-.056-.005-.002-.005-.002-.134-.054-.004-.002-.005-.002-.135-.053-.005-.002-.005-.002-.135-.051-.005-.002-.005-.002-.135-.05-.005-.001-.005-.002-.137-.048-.005-.001-.005-.002-.137-.046-.005-.002-.005-.002-.137-.044-.005-.002-.005-.001-.138-.043-.006-.002-.005-.001-.138-.042-.005-.001-.005-.002-.14-.04H19.4l-.005-.002-.14-.038-.005-.001-.005-.002-.14-.036-.005-.001-.005-.001-.141-.035-.005-.001-.005-.001-.142-.033-.005-.001-.005-.001-.142-.031-.005-.002h-.005l-.142-.03-.005-.001-.005-.001-.143-.028h-.005l-.005-.002-.143-.025-.006-.001-.005-.001-.143-.024-.005-.001-.006-.001-.143-.022-.006-.001h-.005l-.144-.022h-.005l-.006-.001-.144-.019h-.005l-.006-.001-.144-.017h-.006l-.005-.001-.145-.016h-.011l-.145-.014H17.1l-.005-.001-.146-.012h-.01l-.146-.01-.006-.001h-.005l-.146-.009h-.011l-.147-.006h-.01l-.147-.005h-.011l-.147-.003h-.011l-.147-.001H16zm-5.482 1.366l-.16.008-.157.037-.123.053-.06.032-.005.002-.004.003-.128.069-.004.002-.005.003-.126.07-.005.003-.004.002-.126.072-.005.003-.004.003-.125.073-.004.003-.005.003-.124.075-.004.003-.005.002-.123.077-.004.003-.005.003-.122.078-.004.003-.005.003-.121.08-.004.002-.005.003-.12.082-.005.003-.004.003-.12.083-.004.003-.004.003-.118.084-.005.003-.004.003-.118.086-.004.003-.004.003-.117.088-.004.003-.004.003-.116.089-.004.003-.004.004-.114.09-.005.003-.004.003-.113.092-.004.004-.004.003-.113.093-.004.004-.004.003-.111.095-.005.003-.004.004-.11.096-.004.004-.004.003-.11.098-.003.003-.004.004-.108.1-.004.003-.004.003-.107.101-.004.004-.004.003-.106.102-.004.004-.003.004-.105.103-.004.004-.004.004-.103.105-.004.004-.004.003-.102.106-.003.004-.004.004-.1.107-.004.004-.004.004-.099.108-.004.004-.003.004-.098.11-.003.003-.004.004-.096.11-.004.005-.003.004-.095.111-.003.004-.004.004-.093.113-.003.004-.004.004-.092.113-.003.004-.003.005-.09.114-.004.004-.003.004-.089.116-.003.004-.003.004-.088.117-.003.004-.003.004-.086.118-.003.004-.003.005-.084.118-.003.004-.003.005-.083.12-.003.003-.003.005-.082.12-.003.005-.002.004-.068.103-.076.142-.048.154-.018.16.011.161.041.156.07.146.095.13.117.11.136.086.15.06.158.03.162.002.158-.03.15-.057.138-.085.119-.109.082-.105.065-.099.075-.11.077-.113.077-.107.08-.11.08-.108.084-.108.083-.105.086-.106.086-.104.088-.104.089-.101.09-.102.093-.101.093-.099.094-.097.095-.096.098-.097.098-.095.099-.093.1-.092.103-.091.101-.089.104-.088.104-.086.106-.086.106-.083.106-.082.109-.082.108-.079.11-.078.11-.076.112-.076.112-.074.113-.072.113-.071.115-.07.115-.068.118-.067.117-.065.12-.065.054-.029.135-.088.116-.111.094-.132.068-.146.04-.156.009-.161-.02-.16-.05-.153-.078-.142-.102-.125-.123-.103-.141-.079-.153-.051-.16-.022zm13.91 2.116l-.162.008-.157.037-.147.066-.132.092-.113.116-.09.134-.063.148-.034.157-.005.162.025.159.055.152.082.138.086.103.09.09.094.098.092.099.093.1.091.103.089.101.088.104.086.104.086.106.083.105.083.108.08.108.081.11.077.107.077.112.075.111.075.114.072.113.071.113.07.114.068.118.067.115.065.118.064.117.062.117.061.121.059.119.059.122.056.121.054.12.055.125.051.123.051.125.048.123.048.127.047.126.044.125.043.128.042.129.039.126.038.13.022.076.058.15.085.137.11.119.129.096.145.07.155.043.16.013.161-.017.154-.046.144-.075.126-.1.106-.12.082-.14.055-.151.025-.16-.005-.16-.026-.132-.023-.082-.002-.005-.001-.005-.042-.139-.001-.005-.002-.005-.043-.138-.001-.005-.002-.005-.044-.137-.002-.005-.002-.005-.046-.137-.002-.005-.001-.005-.048-.137-.002-.005-.002-.005-.05-.135-.001-.005-.002-.005-.051-.135-.002-.005-.002-.005-.053-.135-.002-.005-.002-.005-.054-.133-.002-.005-.002-.005-.057-.133-.002-.005-.002-.005-.057-.132-.003-.005-.002-.005-.06-.132-.001-.005-.002-.004-.061-.132-.003-.004-.002-.005-.063-.13-.002-.005-.002-.005-.064-.13-.003-.004-.002-.005-.066-.129-.002-.004-.003-.005-.067-.128-.002-.005-.003-.004-.069-.128-.002-.004-.003-.005-.07-.126-.003-.005-.003-.004-.072-.126-.002-.005-.003-.004-.074-.125-.002-.004-.003-.005-.075-.124-.003-.004-.003-.005-.076-.123-.003-.004-.003-.005-.078-.122-.003-.004-.003-.005-.08-.121-.003-.004-.003-.005-.081-.12-.003-.005-.003-.004-.083-.12-.003-.004-.003-.004-.084-.118-.003-.005-.003-.004-.086-.118-.003-.004-.004-.004-.087-.117-.003-.004-.003-.004-.09-.116-.002-.004-.004-.004-.09-.114-.003-.005-.004-.004-.091-.113-.004-.004-.003-.004-.094-.113-.003-.004-.003-.004-.095-.111-.004-.004-.003-.004-.096-.11-.004-.005-.003-.004-.098-.11-.004-.003-.003-.004-.1-.108-.003-.004-.004-.004-.1-.107-.004-.004-.004-.004-.102-.106-.003-.003-.004-.004-.093-.095-.124-.103-.14-.08-.153-.05-.16-.023zM4.45 12.826l-.161.002-.158.032-.15.06-.135.088-.118.11-.094.131-.069.146-.035.129-.026.132v.005l-.002.005-.025.143-.001.005-.001.006-.024.143-.001.005-.001.006-.022.143-.001.006-.001.005-.02.144-.001.005-.001.005-.019.145v.005l-.001.006-.017.144v.006l-.001.005-.016.145v.011l-.014.145v.005l-.001.006-.012.146v.01l-.01.146-.001.006v.005l-.009.146v.011l-.007.146v.011l-.004.147v.011l-.003.147v.01l-.002.148v.01l.001.148v.01l.003.147v.011l.005.147v.01l.007.147v.011l.009.146v.011l.01.146v.01l.013.146v.011l.014.145v.005l.001.006.016.145v.011l.018.144v.006l.001.005.019.144v.006l.001.005.021.144v.005l.002.006.022.143v.006l.002.005.024.143v.005l.002.006.025.143.001.005.001.005.028.143.001.005.001.005.03.142v.005l.002.006.03.141.002.005.001.005.033.142v.005l.002.005.035.14v.006l.002.005.036.14.002.005.001.005.038.14.001.005.002.005.04.14v.005l.002.005.042.138.001.006.002.005.042.138.002.005.002.005.017.054.064.148.09.134.114.114.132.092.148.065.157.037.16.007.16-.023.153-.052.14-.08.123-.104.102-.125.076-.142.049-.153.02-.16-.011-.161-.031-.13-.017-.051-.039-.126-.038-.13-.037-.128-.035-.13-.033-.128-.033-.134-.03-.13-.029-.131-.026-.13-.026-.133-.024-.133-.023-.133-.02-.132-.02-.136-.017-.132-.016-.135-.014-.135-.012-.133-.012-.138-.009-.133-.007-.136-.006-.138-.004-.134-.003-.136v-.274l.003-.136.004-.134.006-.139.007-.136.01-.133.01-.138.013-.132.014-.135.016-.135.017-.132.02-.137.02-.13.023-.134.024-.133.024-.126.016-.16-.014-.161-.044-.155-.072-.145-.098-.128-.12-.108-.137-.084-.15-.057-.16-.029zm26.698 1.601l-.161.01-.157.04-.146.067-.131.093-.112.117-.088.135-.061.149-.033.157-.005.134.006.14.006.176.003.177.001.178-.001.177-.003.178-.006.177-.007.176-.01.177-.012.176-.015.176-.016.173-.018.175-.02.175-.024.174-.025.175-.026.17-.03.174-.03.173-.033.17-.036.172-.037.17-.04.17-.042.172-.043.168-.045.166-.048.169-.05.167-.052.168-.053.164-.056.166-.058.166-.06.16-.062.165-.062.158-.066.165-.068.16-.07.16-.07.158-.075.159-.074.155-.079.158-.08.158-.06.15-.03.158-.001.161.029.159.058.15.085.137.108.119.13.097.144.07.156.044.16.013.16-.017.155-.046.143-.074.127-.1.107-.12.07-.115.083-.164.003-.005.002-.004.082-.166.002-.005.003-.004.08-.167.002-.005.002-.004.078-.168.002-.005.002-.004.076-.169.002-.004.002-.005.074-.17.002-.004.002-.005.072-.17.002-.005.002-.005.07-.171.001-.005.002-.005.068-.172.002-.004.002-.005.065-.173.002-.005.002-.005.063-.173.002-.005.002-.005.06-.174.003-.005.001-.005.06-.175.001-.005.002-.005.057-.176.001-.005.002-.005.055-.177.001-.005.002-.005.052-.177.002-.005.001-.005.051-.178.001-.005.002-.005.048-.179.002-.005v-.005l.047-.179.001-.005.002-.005.044-.18v-.005l.002-.005.042-.18.001-.006.001-.005.04-.181.001-.005.001-.005.037-.182.002-.005v-.005l.036-.182v-.006l.002-.005.033-.182v-.006l.002-.005.03-.183.001-.005.001-.005.029-.184v-.005l.001-.006.027-.184v-.005l.001-.005.024-.185v-.005l.001-.005.022-.185v-.006l.001-.005.02-.185v-.006l.001-.005.017-.186v-.005l.001-.005.015-.187v-.005l.001-.005.013-.187v-.01l.01-.187.001-.006v-.005l.009-.187v-.011l.006-.187v-.011l.004-.188v-.011l.001-.188v-.01l-.001-.188v-.011l-.004-.188v-.011l-.006-.187v-.011l-.007-.145-.022-.16-.05-.152-.08-.141-.103-.124-.125-.102-.141-.077-.153-.05-.16-.02zM.938 15L.777 15l-.158.032-.15.06-.136.087-.117.11-.095.131-.068.146-.04.156-.012.133-.001.14v.01l.001.188v.011l.004.188v.011l.006.187v.011l.008.187v.011l.011.187v.005l.001.005.013.187v.01l.016.187v.01l.018.186v.011l.02.185.001.005v.006l.022.185.001.005v.005l.025.185v.005l.001.005.027.184v.006l.001.005.029.184v.005l.001.005.031.183.001.005.001.006.033.182.001.005.001.006.035.182.001.005.001.005.038.182v.005l.002.005.04.181v.005l.002.005.042.18.001.006.001.005.044.18.002.005v.005l.047.18.001.004.002.005.048.179.002.005.001.005.05.178.002.005.001.005.053.177.002.005.001.005.055.177.002.005.001.005.057.176.002.005.001.005.06.175.001.005.002.005.061.174.002.005.002.005.063.173.002.005.002.005.065.173.002.005.002.004.067.172.002.005.002.005.07.171.002.005.002.005.072.17.002.005.002.004.074.17.002.005.002.004.076.169.002.004.002.005.078.168.002.004.002.005.08.167.003.004.002.005.082.166.002.004.003.005.02.04.086.136.11.118.13.095.146.07.156.041.16.012.16-.019.155-.048.142-.075.126-.1.105-.123.08-.14.054-.152.024-.16-.006-.16-.036-.158-.051-.123-.018-.034-.078-.158L3.1 22.1l-.074-.16-.071-.157-.07-.16-.068-.16-.067-.165-.062-.158-.062-.164-.059-.161-.058-.166-.056-.166-.053-.164-.052-.168-.05-.167-.048-.17-.045-.165-.043-.168-.043-.172-.039-.17-.037-.17-.036-.172-.033-.17-.03-.173-.03-.174-.027-.17-.025-.175-.022-.174-.021-.175-.018-.175-.017-.173-.014-.176-.012-.176-.01-.177-.007-.176-.006-.177-.003-.178L1.73 16v-.134l-.013-.16-.044-.156-.072-.144-.097-.129-.12-.108-.137-.085-.15-.057L.938 15zm26.798 2.024l-.16.007-.157.038-.148.066-.132.092-.113.115-.09.134-.062.148-.03.127-.001.004-.023.134-.024.133-.026.133-.026.13-.03.132-.03.129-.032.134-.033.128-.035.13-.037.128-.038.13-.04.126-.04.128-.044.128-.044.126-.046.126-.048.126-.05.125-.05.125-.051.122-.054.123-.055.122-.056.12-.058.122-.06.12-.061.12-.063.119-.062.116-.067.119-.066.116-.069.115-.069.115-.07.113-.073.113-.074.112-.076.113-.077.112-.077.107-.08.11-.08.107-.085.11-.044.056-.088.135-.06.15-.033.158-.002.16.027.16.057.15.083.138.108.12.128.098.144.072.155.045.16.015.161-.016.155-.044.144-.073.128-.098.09-.099.05-.061.003-.004.003-.005.089-.115.003-.004.003-.005.088-.116.003-.004.003-.005.086-.117.003-.004.003-.005.084-.118.003-.004.003-.005.083-.12.003-.004.003-.004.081-.12.003-.005.003-.004.08-.121.003-.005.003-.004.078-.122.003-.005.003-.004.077-.123.002-.005.003-.004.075-.124.003-.005.003-.004.073-.125.003-.005.003-.004.072-.126.002-.004.003-.005.07-.126.003-.005.002-.005.07-.127.002-.004.002-.005.068-.128.002-.005.002-.004.066-.13.003-.004.002-.005.064-.13.002-.004.003-.005.062-.13.002-.005.003-.005.06-.13.003-.005.002-.005.06-.132.002-.005.002-.005.057-.132.003-.005.002-.005.056-.133.002-.005.002-.005.054-.134.002-.004.002-.005.053-.135.002-.005.002-.005.051-.135.002-.005.002-.005.05-.135.001-.005.002-.005.048-.137.001-.005.002-.005.046-.137.002-.005.002-.005.044-.137.002-.005.002-.005.042-.138.002-.005.001-.006.042-.138.001-.005.002-.005.04-.14V19.4l.002-.005.038-.14.001-.005.002-.005.036-.14.001-.005.001-.005.035-.141.001-.005.001-.005.033-.142.001-.005.001-.005.031-.141.001-.006.002-.005.029-.142v-.005l.002-.005.028-.143v-.005l.002-.005.025-.143.001-.006.001-.005.024-.143.001-.005.001-.006.001-.006.01-.161-.02-.16-.05-.154-.077-.141-.102-.125-.123-.104-.141-.079-.153-.051-.16-.022zM6.841 22.71l-.16.024-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.018.16.011.161.041.156.07.146.077.109.04.048.003.004.003.004.095.111.003.004.004.004.096.11.004.005.003.004.098.109.003.004.004.004.1.108.003.004.003.004.101.107.004.004.003.004.102.105.004.004.004.004.103.105.004.004.004.003.105.104.003.004.004.003.106.102.004.004.004.004.107.1.004.004.004.004.108.099.004.003.004.004.11.098.003.003.004.004.11.096.004.003.005.004.11.095.005.003.004.004.113.093.004.003.004.004.113.091.004.004.005.003.114.09.004.004.004.003.116.089.004.003.004.003.117.088.004.003.004.003.118.086.004.003.005.003.118.084.004.003.005.003.119.083.004.003.005.003.12.081.005.003.004.003.121.08.005.003.004.003.122.078.005.003.004.003.123.076.005.003.004.003.124.075.005.003.004.003.125.073.004.003.005.002.126.073.004.002.005.003.126.07.005.003.004.002.128.07.004.002.005.002.128.067.005.003.004.002.13.066.004.002.005.003.13.064.004.002.005.003.13.062.005.002.004.003.132.06.004.003.005.002.132.06.005.002.005.002.132.057.005.002.005.002.133.057.005.002.005.002.133.054.005.002.005.002.13.05.154.045.16.016.16-.015.156-.045.144-.072.128-.098.108-.12.083-.138.057-.15.028-.16-.003-.16-.032-.159-.061-.149-.088-.135-.11-.117-.132-.094-.12-.058-.124-.049-.126-.051-.122-.051-.122-.054-.12-.054-.126-.058-.119-.057-.12-.06-.12-.06-.118-.063-.117-.064-.119-.066-.116-.066-.115-.068-.115-.07-.113-.07-.115-.074-.112-.074-.11-.075-.11-.076-.112-.08-.11-.08-.109-.081-.106-.082-.104-.082-.106-.086-.105-.087-.101-.086-.105-.091-.1-.09-.1-.091-.1-.094-.097-.094-.1-.098-.093-.095-.096-.1-.093-.098-.092-.101-.089-.1-.09-.102-.088-.104-.036-.043-.114-.114-.133-.091-.148-.065-.157-.036-.161-.006zm15.063 2.701l-.16.014-.156.044-.12.057-.06.034-.12.066-.117.064-.118.062-.12.061-.12.06-.118.057-.126.058-.12.054-.122.054-.122.05-.126.052-.125.05-.124.046-.127.047-.125.044-.129.043-.126.04-.13.042-.128.038-.127.035-.13.036-.131.034-.129.031-.132.03-.13.03-.135.027-.133.026-.13.023-.13.022-.137.021-.132.02-.134.017-.132.015-.138.015-.135.013-.133.01-.138.01-.136.007-.134.006-.136.004-.14.003-.16.018-.155.047-.142.076-.127.1-.105.122-.08.14-.054.151-.025.16.006.16.035.158.064.148.09.134.114.114.133.092.147.065.157.036.134.008.145-.002h.011l.147-.005h.01l.147-.007h.011l.146-.009h.011l.146-.01h.005l.005-.001.146-.012h.011l.145-.014h.005l.006-.001.145-.016h.011l.144-.018h.006l.005-.001.144-.02h.011l.144-.021.005-.001h.006l.143-.023.006-.001h.005l.143-.025h.005l.006-.002.143-.026h.005l.005-.002.143-.027.005-.001.005-.001.142-.03h.005l.005-.002.142-.03.005-.002.005-.001.142-.033.005-.001.005-.001.14-.035.006-.001.005-.001.14-.037h.005l.005-.002.14-.038.005-.002h.005l.14-.04.005-.002.005-.001.138-.042.005-.001.006-.002.138-.043.005-.001.005-.002.137-.044.005-.002.005-.002.137-.046.005-.002.005-.001.137-.048.005-.002.005-.002.135-.05.005-.001.005-.002.135-.051.005-.002.005-.002.135-.053.005-.002.004-.002.134-.054.005-.002.005-.002.133-.057.005-.002.005-.002.132-.057.005-.003.005-.002.132-.06.005-.001.004-.002.131-.061.005-.003.005-.002.13-.062.005-.003.005-.002.13-.064.004-.003.005-.002.128-.066.005-.002.005-.003.128-.067.005-.002.004-.003.127-.069.005-.002.005-.003.126-.07.005-.003.004-.003.065-.037.132-.093.112-.115.089-.135.062-.149.034-.157.003-.161-.026-.16-.055-.15-.082-.14-.107-.12-.127-.1-.144-.073-.154-.046-.16-.016zM6.33 26.818l-.16.023-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.02.16.012.161.041.156.07.146.094.13.096.093.032.026.004.003.004.004.145.117.004.003.004.004.146.115.005.003.004.004.147.113.005.003.004.004.149.111.004.003.004.003.15.11.005.003.004.003.151.108.004.003.005.003.152.106.005.003.004.003.154.104.004.003.005.003.154.102.005.002.004.003.156.1.005.003.004.003.157.098.005.003.004.002.159.096.004.003.005.003.16.094.004.003.004.002.16.092.005.003.005.002.161.09.005.003.005.002.162.088.005.003.004.002.164.086.005.003.004.002.165.084.005.003.004.002.166.082.004.002.005.003.167.08.004.002.005.002.168.078.004.002.005.002.168.076.005.002.005.002.17.074.004.002.005.002.17.072.005.002.005.002.17.07.006.002.005.001.171.068.005.002.005.002.173.065.005.002.005.002.173.063.005.002.005.002.174.06.005.003.005.001.175.06.005.001.005.002.176.057.005.001.005.002.176.055.006.001.005.002.177.052.005.002.005.001.178.05.005.002.005.002.178.048.006.001.005.002.179.046.005.001.005.002.18.044h.005l.005.002.18.042.006.001.005.001.159.035.16.02.16-.01.157-.04.146-.069.13-.094.112-.117.087-.136.06-.149.033-.158.002-.161-.028-.159-.057-.15-.084-.138-.108-.12-.128-.098-.144-.072-.128-.039-.154-.033-.168-.04-.171-.041-.17-.044-.168-.046-.167-.047-.168-.05-.165-.051-.166-.054-.166-.056-.163-.057-.165-.06-.161-.062-.164-.064-.16-.065-.16-.068-.162-.07-.157-.07-.157-.074-.157-.075-.156-.077-.153-.079-.156-.082-.153-.082-.154-.086-.15-.086-.152-.09-.148-.09-.147-.092-.149-.095-.145-.095-.144-.098-.145-.1-.143-.102-.14-.103-.14-.104-.14-.108-.139-.11-.136-.11-.027-.022-.133-.091-.148-.065-.157-.036-.161-.006zm19.215.087l-.16.01-.157.039-.146.067-.11.076-.064.051-.139.11-.14.108-.14.104-.14.103-.143.101-.145.101-.144.098-.145.095-.149.095-.148.093-.147.089-.152.09-.15.086-.154.086-.153.082-.156.082-.153.079-.156.077-.157.075-.158.073-.157.071-.16.07-.16.068-.161.065-.164.064-.161.061-.165.06-.163.058-.166.056-.166.054-.166.051-.167.05-.167.047-.17.046-.168.044-.171.042-.168.039-.17.037-.11.023-.154.047-.143.075-.126.1-.106.122-.081.139-.054.152-.025.16.006.16.035.158.063.148.09.133.114.115.132.092.148.065.157.037.16.007.133-.016.115-.024.005-.001.005-.001.181-.04h.005l.005-.002.18-.042.006-.001.005-.001.18-.044.005-.002.005-.001.18-.046.004-.002h.005l.179-.05h.005l.005-.002.178-.05.005-.002.005-.002.177-.052.005-.002.005-.001.177-.055.005-.002.005-.001.176-.057.005-.002.005-.002.175-.059.005-.001.005-.002.174-.061.005-.002.005-.002.173-.063.005-.002.005-.002.173-.065.004-.002.005-.002.172-.068.005-.002.005-.002.171-.07.005-.001.005-.002.17-.072.005-.002.004-.002.17-.074.005-.002.004-.002.169-.076.004-.002.005-.002.168-.078.004-.002.005-.003.167-.08.004-.002.005-.002.166-.082.004-.002.005-.003.165-.084.004-.002.005-.003.163-.086.005-.002.005-.003.162-.088.005-.002.005-.003.161-.09.005-.002.004-.003.16-.092.005-.003.005-.002.16-.094.004-.003.004-.003.158-.096.005-.002.004-.003.158-.098.004-.003.005-.003.156-.1.004-.003.004-.003.155-.101.005-.003.004-.003.154-.104.004-.003.004-.003.153-.106.004-.003.005-.003.151-.108.004-.003.005-.003.15-.11.004-.003.004-.003.149-.112.004-.003.004-.003.148-.113.004-.004.004-.003.147-.115.004-.004.004-.003.068-.055.116-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.05-.153-.08-.14-.103-.125-.124-.102-.142-.077-.153-.05-.16-.02z",
+ opacity: ".98"
+})));
+
+function _extends$J() { _extends$J = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$J.apply(this, arguments); }
+var IntermediateEventCatchNonInterruptingSignalIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$J({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M16.012 8.816L9.21 21.026h13.606l-6.803-12.21zm0 1.776l5.332 9.57H10.681l5.331-9.57zm0-10.281c-1.448.02-2.93.157-4.302.628-.852.447-.255 1.863.66 1.574 2.255-.608 4.648-.607 6.922-.108.934.075 1.228-1.376.338-1.67C18.451.44 17.227.317 16.012.311zm9.012 2.934c-.913-.104-1.272 1.258-.454 1.648 1.834 1.36 3.293 3.185 4.31 5.22.526.776 1.842.098 1.515-.78a15.522 15.522 0 00-5.06-6.006c-.1-.044-.203-.07-.31-.082zM6.65 3.59c-.762.089-1.24.809-1.805 1.267C3.38 6.295 2.163 8.007 1.37 9.905c-.266.898 1.094 1.484 1.564.675a14.825 14.825 0 014.327-5.56c.476-.515.09-1.419-.612-1.431zm9.362.007c-.698.066-1.689-.16-2.033.635-.282.733.535 1.358 1.217 1.125 1.806-.147 3.63.203 5.293.907.902.255 1.472-1.112.656-1.573-1.6-.735-3.374-1.089-5.133-1.094zm-5.479 1.365c-.835.15-1.517.76-2.21 1.226-1.203.94-2.318 2.061-3.057 3.402-.33.904 1.063 1.552 1.547.723 1.045-1.656 2.596-2.925 4.285-3.873.545-.499.171-1.463-.565-1.478zm13.903 2.115c-.875-.07-1.22 1.173-.501 1.627 1.325 1.34 2.188 3.062 2.748 4.84.468.84 1.869.21 1.557-.699-.604-2.118-1.751-4.097-3.351-5.615a.93.93 0 00-.453-.153zM4.467 13.132c-.822-.07-.996.826-1.046 1.455-.256 1.93-.094 3.933.562 5.769.406.844 1.807.365 1.612-.551a11.498 11.498 0 01-.334-5.808.874.874 0 00-.794-.865zm26.687 1.6c-.746-.037-1.014.785-.879 1.395.043 2.393-.57 4.771-1.66 6.894-.31.884 1.02 1.536 1.53.75a15.632 15.632 0 001.821-8.372.876.876 0 00-.812-.667zm-30.197.571c-.782-.073-1.044.775-.933 1.404.068 2.414.661 4.833 1.809 6.962.534.77 1.842.076 1.505-.798a14.833 14.833 0 01-1.603-6.861.876.876 0 00-.778-.707zm26.787 2.024c-.777-.048-.952.797-1.021 1.392-.354 1.692-1.202 3.231-2.216 4.608-.407.872.925 1.638 1.48.852 1.361-1.733 2.296-3.827 2.582-6.017a.874.874 0 00-.825-.835zM6.857 23.012c-.808.018-1.082 1.122-.47 1.59 1.393 1.607 3.187 2.886 5.194 3.599.91.222 1.43-1.165.598-1.596a11.495 11.495 0 01-4.723-3.396.899.899 0 00-.599-.197zm15.057 2.7c-.81.194-1.504.76-2.325.972-1.203.458-2.5.536-3.758.664-.869.307-.573 1.728.346 1.663 2.201-.034 4.412-.626 6.293-1.778.604-.495.227-1.532-.556-1.521zM6.346 27.118c-.833.008-1.11 1.218-.395 1.617 1.986 1.602 4.358 2.749 6.868 3.226.933.076 1.227-1.376.338-1.67a14.838 14.838 0 01-6.345-3.066.929.929 0 00-.466-.107zm19.208.087c-.766.09-1.241.841-1.922 1.158-1.516.991-3.251 1.58-4.996 2.005-.872.405-.346 1.849.584 1.604 2.543-.526 4.98-1.66 6.963-3.344.47-.52.072-1.42-.63-1.423z"
+})));
+
+function _extends$I() { _extends$I = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$I.apply(this, arguments); }
+var IntermediateEventCatchNonInterruptingTimerIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$I({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.998 8.406c-3.018-.041-5.92 1.926-7.031 4.727-1.138 2.695-.51 6.012 1.537 8.103 1.99 2.141 5.268 2.93 8.014 1.927 2.878-.98 4.992-3.827 5.068-6.87.153-2.957-1.624-5.88-4.3-7.137a7.552 7.552 0 00-3.288-.75zm0 1.384c2.759-.052 5.373 1.973 6.015 4.655.704 2.578-.482 5.517-2.791 6.867-2.358 1.48-5.682 1.086-7.618-.918-2.043-1.971-2.407-5.381-.84-7.745 1.11-1.763 3.15-2.88 5.234-2.86zm1.962 1.765l-2.074 3.762c-.64.068-.793 1.04-.202 1.3.39.27.696-.18 1.052-.165h3.17v-.865h-3.182l1.993-3.615c-.252-.14-.505-.278-.757-.417zm-1.965-8.268h-.158l-.147.003h-.011l-.147.005h-.011l-.146.007h-.011l-.146.009h-.011l-.146.01h-.005l-.005.001-.146.012h-.011l-.145.014h-.006l-.005.001-.05.006-.158.031-.15.06-.135.088-.117.111-.094.13-.069.147-.04.156-.01.16.019.16.049.154.076.142.102.125.123.105.14.08.152.051.16.023.134-.003.045-.005.135-.013.133-.01.136-.01.135-.007.137-.006.136-.004.136-.003h.274l.136.003.136.004.136.006.136.007.136.01.133.01.135.013.135.014.135.016.134.018.132.018.134.021.133.023.133.024.133.025.13.027.132.03.132.03.129.031.13.034.129.035.129.036.13.04.126.038.128.042.126.042.128.045.127.047.126.048.12.047.127.051.123.052.006.002.147.048.16.021.16-.009.157-.038.147-.067.131-.093.112-.116.089-.135.062-.149.033-.158.004-.16-.027-.16-.055-.151-.083-.138-.107-.121-.127-.099-.118-.063-.004-.001-.005-.003-.005-.002-.133-.056-.005-.002-.005-.002-.134-.054-.004-.002-.005-.002-.135-.053-.005-.002-.005-.002-.135-.051-.005-.002-.005-.002-.135-.05-.005-.001-.005-.002-.137-.048-.005-.001-.005-.002-.137-.046-.005-.002-.005-.002-.137-.044-.005-.002-.005-.001-.138-.043-.005-.002-.006-.001-.138-.042-.005-.001-.005-.002-.14-.04H19.4l-.005-.002-.14-.038-.005-.001-.005-.002-.14-.036-.005-.001-.005-.001-.141-.035-.005-.001-.005-.001-.142-.033-.005-.001-.005-.001-.141-.031-.006-.002h-.005l-.142-.03-.005-.001-.005-.001-.143-.028h-.005l-.005-.001-.143-.026-.006-.001-.005-.001-.143-.024-.005-.001-.006-.001-.143-.022-.006-.001h-.005l-.144-.022h-.005l-.006-.001-.144-.019h-.005l-.006-.001-.144-.017h-.006l-.005-.001-.145-.016h-.011l-.145-.014H17.1l-.005-.001-.146-.012h-.01l-.146-.01-.006-.001h-.005l-.146-.009h-.011l-.147-.006h-.01l-.147-.005h-.011l-.147-.003h-.01l-.148-.001h-.01zM10.357 4.66l-.156.037-.123.053-.06.032-.005.002-.004.003-.128.069-.004.002-.005.003-.126.07-.005.003-.004.002-.126.072-.005.003-.004.003-.125.073-.004.003-.005.003-.124.075-.004.003-.005.002-.123.077-.004.003-.005.003-.122.078-.004.003-.005.003-.121.08-.004.002-.005.003-.12.082-.005.003-.004.003-.12.083-.004.003-.004.003-.118.084-.005.003-.004.003-.118.086-.004.003-.004.003-.117.088-.004.003-.004.003-.116.089-.004.003-.004.004-.114.09-.005.003-.004.003-.113.092-.004.004-.004.003-.113.093-.004.004-.004.003-.111.095-.004.003-.005.004-.11.096-.004.004-.004.003-.109.098-.004.003-.004.004-.108.1-.004.003-.004.003-.107.101-.004.004-.004.003-.106.102-.003.004-.004.004-.105.103-.004.004-.004.004-.103.105-.004.004-.004.003-.102.106-.003.004-.004.004-.1.107-.004.004-.004.004-.099.108-.004.004-.003.004-.098.11-.003.003-.004.004-.096.11-.004.005-.003.004-.095.111-.003.004-.004.004-.093.113-.003.004-.004.004-.092.113-.003.004-.003.005-.09.114-.004.004-.003.004-.089.116-.003.004-.003.004-.088.117-.003.004-.003.005-.086.117-.003.004-.003.005-.084.118-.003.004-.003.005-.083.12-.003.003-.003.005-.082.12-.003.005-.002.004-.068.103-.076.142-.048.154-.018.16.011.161.041.156.07.146.095.13.117.11.136.086.15.06.158.03.162.002.158-.029.15-.058.138-.085.119-.108.082-.106.065-.099.075-.11.077-.113.077-.107.08-.11.08-.108.084-.108.083-.105.086-.106.086-.104.088-.104.089-.101.09-.102.093-.101.093-.099.094-.097.095-.096.098-.097.098-.095.099-.093.1-.092.103-.091.101-.089.104-.088.104-.086.106-.086.106-.083.106-.082.109-.082.108-.079.11-.078.11-.076.112-.076.112-.074.113-.072.113-.071.115-.07.115-.068.118-.067.117-.065.12-.065.054-.029.135-.088.116-.111.094-.132.068-.146.04-.156.009-.161-.02-.16-.05-.153-.078-.142-.102-.125-.123-.103-.141-.079-.153-.051-.16-.022-.16.008zm13.91 2.116l-.158.037-.147.066-.132.092-.113.116-.09.134-.063.148-.034.157-.005.162.026.159.054.152.082.139.086.102.09.09.094.098.093.099.092.1.091.103.089.101.088.104.086.104.086.106.083.105.083.108.08.108.081.11.077.107.077.112.075.111.075.114.072.113.071.113.07.115.068.117.067.115.065.118.064.117.062.118.061.12.059.119.059.122.056.121.054.12.055.125.051.123.051.125.048.123.049.127.046.126.044.125.043.128.042.129.039.126.038.13.022.076.058.15.086.137.109.119.129.096.145.07.155.043.16.013.161-.017.155-.046.143-.074.126-.1.106-.122.082-.138.055-.152.025-.16-.005-.16-.026-.132-.023-.082-.002-.005-.001-.005-.042-.139-.001-.005-.002-.005-.043-.138-.001-.005-.002-.005-.044-.137-.002-.005-.002-.005-.046-.137-.002-.005-.001-.005-.048-.137-.002-.005-.002-.005-.05-.135-.001-.005-.002-.005-.051-.135-.002-.005-.002-.005-.053-.135-.002-.005-.002-.005-.054-.133-.002-.005-.002-.005-.057-.133-.002-.005-.002-.005-.057-.132-.003-.005-.002-.005-.059-.132-.002-.005-.002-.004-.061-.132-.003-.004-.002-.005-.062-.13-.003-.005-.002-.005-.064-.13-.003-.004-.002-.005-.066-.129-.002-.004-.003-.005-.067-.128-.002-.005-.003-.004-.069-.128-.002-.004-.003-.005-.07-.126-.003-.005-.003-.004-.072-.126-.002-.005-.003-.004-.073-.125-.003-.004-.003-.005-.075-.124-.003-.004-.003-.005-.076-.123-.003-.004-.003-.005-.078-.122-.003-.004-.003-.005-.08-.121-.003-.004-.003-.005-.08-.12-.004-.005-.003-.004-.083-.12-.003-.004-.003-.004-.084-.118-.003-.005-.003-.004-.086-.117-.003-.005-.003-.004-.088-.117-.003-.004-.003-.004-.09-.116-.002-.004-.004-.004-.09-.114-.003-.005-.004-.004-.091-.113-.004-.004-.003-.004-.093-.113-.004-.004-.003-.004-.095-.111-.004-.004-.003-.004-.096-.11-.004-.005-.003-.004-.098-.109-.004-.004-.003-.004-.1-.108-.003-.004-.004-.004-.1-.107-.004-.004-.004-.004-.102-.106-.003-.003-.004-.004-.093-.095-.124-.103-.14-.08-.153-.05-.16-.023-.16.008zM4.288 12.828l-.158.032-.15.06-.135.088-.117.11-.095.131-.069.146-.035.129-.026.132v.005l-.002.005-.025.143-.001.005-.001.006-.024.143-.001.005-.001.006-.022.143-.001.006-.001.005-.02.144-.001.005-.001.006-.019.144v.005l-.001.006-.017.144v.006l-.001.005-.016.145v.011l-.014.145v.006l-.001.005-.012.146v.01l-.01.146-.001.006v.005l-.009.146v.011l-.007.146v.011l-.004.147v.011l-.003.147v.01l-.002.148v.01l.001.148v.01l.003.147v.011l.005.147v.01l.007.147v.011l.009.146v.011l.01.146v.01l.013.146v.011l.014.145v.005l.001.006.016.145v.011l.018.144v.006l.001.005.019.144v.006l.001.005.021.144v.005l.002.006.022.143v.006l.002.005.024.143v.005l.002.006.025.143.001.005.001.005.028.143.001.005.001.005.03.142v.005l.002.006.03.141.002.005.001.006.033.14v.006l.002.005.035.14v.006l.002.005.036.14.002.005.001.005.038.14.001.005.002.005.04.14v.005l.002.005.042.138.001.006.002.005.042.138.002.005.002.005.017.054.064.148.09.134.114.114.132.092.148.065.157.037.16.007.16-.023.153-.052.14-.08.123-.103.102-.126.076-.142.049-.153.02-.16-.01-.161-.032-.13-.017-.051-.039-.126-.038-.13-.037-.128-.035-.13-.033-.128-.033-.134-.03-.13-.029-.131-.026-.13-.026-.132-.024-.134-.023-.133-.02-.132-.02-.136-.017-.132-.016-.135-.014-.135-.012-.133-.012-.138-.009-.133-.007-.136-.006-.138-.004-.134-.003-.136v-.274l.003-.136.004-.134.006-.139.007-.136.01-.132.01-.139.013-.132.014-.135.016-.135.017-.132.02-.137.02-.13.023-.134.024-.133.024-.126.016-.16-.014-.161-.044-.155-.072-.145-.098-.128-.12-.108-.137-.084-.15-.057-.16-.029-.16.002zm23.286 4.202l-.156.038-.148.066-.132.092-.113.115-.09.134-.062.148-.03.127-.001.004-.023.134-.024.134-.026.132-.026.13-.03.132-.03.129-.032.134-.033.128-.035.13-.037.128-.038.13-.04.126-.04.128-.044.128-.044.126-.046.126-.048.126-.05.125-.05.125-.051.122-.054.123-.055.122-.056.12-.058.122-.06.12-.061.12-.062.119-.063.116-.067.119-.066.116-.068.115-.07.115-.07.113-.073.113-.074.112-.076.113-.077.112-.077.107-.08.11-.08.108-.085.109-.044.056-.088.135-.06.15-.033.158-.002.16.027.16.057.15.083.138.108.12.128.098.144.072.155.045.16.015.161-.016.155-.044.144-.073.128-.098.09-.099.05-.061.003-.004.003-.005.089-.115.003-.004.003-.005.088-.116.003-.004.003-.005.086-.117.003-.004.003-.005.084-.118.003-.004.003-.005.083-.12.003-.004.003-.004.082-.12.003-.005.002-.004.08-.121.003-.005.003-.004.078-.122.003-.005.003-.004.077-.123.002-.005.003-.004.075-.124.003-.005.003-.004.073-.125.003-.004.003-.005.072-.126.002-.004.003-.005.07-.126.003-.005.002-.005.07-.127.002-.004.002-.005.068-.128.002-.005.002-.004.066-.13.003-.004.002-.005.064-.13.002-.004.003-.005.062-.13.003-.005.002-.005.06-.13.003-.005.002-.005.06-.132.002-.005.002-.005.057-.132.003-.005.002-.005.056-.133.002-.005.002-.005.054-.134.002-.004.002-.005.053-.135.002-.005.002-.005.051-.135.002-.005.002-.005.05-.135.001-.005.002-.005.048-.137.001-.005.002-.005.046-.137.002-.005.002-.005.044-.137.002-.005.002-.005.042-.138.002-.005.002-.006.04-.138.002-.005.002-.005.04-.14V19.4l.002-.005.038-.14.001-.005.002-.005.036-.14.001-.005.001-.005.035-.141.001-.005.001-.005.033-.141.001-.006.001-.005.031-.141.002-.006v-.005l.03-.142.001-.005.001-.005.028-.143v-.005l.002-.005.025-.143.001-.006.001-.005.024-.143.001-.005.001-.006.001-.006.01-.161-.02-.16-.05-.154-.077-.141-.102-.125-.123-.104-.141-.079-.153-.051-.16-.022-.16.007zM6.681 22.734l-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.018.16.011.161.041.156.07.146.077.11.04.047.003.004.003.004.095.111.003.004.004.004.096.11.004.005.003.004.098.109.003.004.004.004.1.108.003.004.003.004.101.107.004.004.003.004.102.106.004.003.004.004.103.105.004.004.004.004.105.103.004.004.003.003.106.102.004.004.004.004.107.1.004.004.004.004.108.099.004.003.004.004.11.098.003.003.004.004.11.096.005.004.004.003.11.095.005.003.004.004.113.093.004.003.004.004.113.091.004.004.005.003.114.09.004.004.004.003.116.089.004.003.004.003.117.088.004.003.004.003.118.086.004.003.005.003.118.084.004.003.005.003.119.083.004.003.005.003.12.081.005.003.004.003.121.08.005.003.004.003.122.078.005.003.004.003.123.076.005.003.004.003.124.075.005.003.004.003.125.073.004.003.005.003.126.072.004.002.005.003.126.07.005.003.004.002.128.07.004.002.005.002.128.068.005.002.004.002.13.066.004.003.005.002.13.064.004.002.005.003.13.062.005.002.004.003.132.06.004.003.005.002.132.06.005.002.005.002.132.057.005.002.005.003.133.056.005.002.005.002.133.054.005.002.005.002.13.05.154.045.16.016.161-.015.155-.045.144-.072.128-.098.108-.12.083-.138.057-.15.028-.16-.003-.16-.032-.158-.061-.15-.088-.135-.11-.117-.132-.094-.12-.058-.124-.049-.126-.051-.122-.051-.122-.054-.12-.054-.126-.058-.119-.057-.12-.06-.12-.06-.118-.063-.117-.064-.119-.066-.116-.066-.115-.068-.115-.07-.113-.07-.115-.074-.112-.074-.11-.075-.11-.076-.112-.079-.11-.08-.109-.082-.106-.082-.104-.082-.106-.086-.105-.087-.101-.086-.105-.091-.1-.09-.1-.091-.1-.094-.097-.094-.1-.098-.093-.095-.096-.1-.093-.098-.092-.101-.089-.1-.09-.102-.088-.104-.036-.043-.114-.114-.133-.091-.148-.065-.157-.036-.161-.006-.16.024zm15.063 2.691l-.156.044-.12.057-.06.034-.12.066-.116.064-.119.062-.12.061-.12.06-.118.057-.126.058-.12.054-.122.054-.122.05-.126.052-.125.05-.124.046-.127.047-.125.044-.129.043-.126.04-.13.042-.128.038-.127.036-.13.035-.131.034-.129.031-.132.03-.13.03-.135.027-.133.026-.13.023-.13.022-.137.021-.132.02-.134.017-.132.015-.138.015-.135.013-.133.01-.138.01-.136.007-.134.006-.136.004-.14.003-.16.018-.155.047-.142.076-.127.1-.105.122-.08.14-.054.151-.025.16.006.16.035.158.064.148.09.134.114.114.133.092.147.065.157.036.134.008.145-.002h.011l.147-.005h.01l.147-.007h.011l.146-.009h.011l.146-.01h.005l.005-.001.146-.012h.011l.145-.014h.005l.006-.001.145-.016h.011l.144-.018h.006l.005-.001.144-.02h.011l.144-.021h.005l.006-.002.143-.022h.006l.005-.002.143-.024h.005l.006-.002.143-.026h.005l.005-.002.143-.027.005-.001.005-.001.142-.03h.005l.005-.002.142-.03.005-.002.005-.001.142-.033.005-.001.005-.001.14-.035.006-.001.005-.001.14-.036.005-.002.005-.001.14-.038.005-.001.005-.002.14-.04h.005l.005-.002.138-.042.005-.001.006-.002.138-.043.005-.001.005-.002.137-.044.005-.002.005-.002.137-.046.005-.002.005-.001.137-.048.005-.002.005-.002.135-.05.005-.001.005-.002.135-.051.005-.002.005-.002.135-.053.005-.002.004-.002.134-.054.005-.002.005-.002.133-.056.005-.003.005-.002.132-.057.005-.002.005-.003.132-.059.005-.002.004-.002.131-.061.005-.003.005-.002.13-.062.005-.003.005-.002.13-.064.004-.002.005-.003.129-.066.004-.002.005-.003.128-.067.005-.002.004-.003.127-.069.005-.002.005-.003.126-.07.005-.003.004-.002.065-.038.132-.093.112-.115.089-.135.062-.149.034-.157.004-.161-.027-.16-.055-.15-.082-.14-.107-.12-.127-.1-.144-.073-.154-.045-.16-.017-.161.014zM15.994 0l-.187.001h-.011l-.188.004h-.011l-.187.006h-.011l-.187.008h-.005L15.2.02l-.187.01h-.005l-.005.001-.187.013h-.01L14.62.06h-.01l-.186.018h-.011l-.185.02-.005.001h-.006l-.185.022-.005.001h-.005l-.185.025h-.005l-.005.001-.184.027h-.006l-.005.001-.184.029h-.005l-.005.001-.183.031-.005.001-.006.001-.182.033-.006.001-.005.001-.182.035-.005.001-.005.001-.182.038h-.005l-.005.002-.181.04h-.005l-.005.002-.18.042-.006.001-.005.001-.18.044-.005.002h-.005l-.17.045-.152.054-.139.082-.121.106-.1.127-.074.143-.046.155-.017.16.013.16.043.156.07.145.097.13.119.108.137.085.15.058.159.03.16-.001.133-.023.165-.043.168-.041.171-.04.171-.037.172-.036.17-.033.173-.03.17-.03.177-.027.171-.025.175-.022.175-.02.175-.02.176-.016.175-.014.177-.012.176-.01.177-.007.174-.006.177-.003L16 1.73h.177l.178.004.174.006.177.007.176.01.177.012.175.014.176.017.175.018.175.02.175.023.171.025.177.027.17.03.173.03.17.033.171.036.154.033.16.02.161-.01.156-.04.146-.069.131-.094.111-.117.088-.135.06-.15.032-.158.002-.16-.027-.16-.057-.15L20 .714l-.108-.12-.128-.097-.144-.073-.129-.038-.158-.035-.005-.001-.005-.001L19.14.31h-.005l-.005-.002-.182-.035h-.006l-.005-.002-.182-.033h-.006l-.005-.002-.183-.03-.005-.001-.005-.001-.184-.029h-.005l-.006-.001-.184-.027h-.005l-.005-.001-.185-.024h-.005L17.968.12 17.783.1l-.006-.001h-.005l-.185-.02h-.006l-.005-.001L17.39.06 17.385.06h-.005l-.187-.015h-.005l-.005-.001-.187-.013h-.01L16.799.02h-.011L16.6.01h-.011l-.187-.006h-.011L16.204 0h-.011L16.005 0h-.01zm8.86 2.939l-.157.033-.15.062-.134.09-.116.111-.093.132-.067.147-.038.156-.01.161.022.16.05.153.078.141.103.124.102.087.045.034.142.106.137.105.14.11.136.11.135.112.134.115.134.117.13.115.132.122.128.12.127.122.127.125.123.126.124.128.121.13.118.128.118.132.117.133.113.134.113.136.11.136.109.137.109.142.104.14.103.14.101.142.1.144.099.146.095.145.094.147.093.15.092.15.087.149.087.15.085.152.083.155.08.152.08.155.04.081.084.138.11.119.128.096.145.072.155.043.16.013.161-.016.155-.046.143-.074.127-.099.106-.12.083-.14.055-.151.026-.16-.004-.16-.034-.158-.05-.124-.042-.085-.002-.004-.003-.005-.084-.165-.002-.004-.003-.005-.086-.164-.002-.004-.003-.005-.088-.162-.002-.005-.003-.005-.09-.161-.002-.005-.003-.004-.092-.16-.002-.005-.003-.005-.094-.16-.003-.004-.003-.004-.096-.159-.002-.004-.003-.005-.098-.157-.003-.004-.003-.005-.1-.156-.003-.004-.002-.005-.102-.154-.003-.005-.003-.004-.104-.154-.003-.004-.003-.005-.106-.152-.003-.004-.003-.005-.108-.151-.003-.004-.003-.005-.11-.15-.003-.004-.003-.004-.111-.15-.004-.003-.003-.005-.113-.147-.004-.004-.003-.005-.115-.146-.004-.004-.003-.004-.117-.145-.004-.004-.003-.004-.12-.144-.003-.004-.003-.004-.121-.142-.003-.004-.004-.004-.123-.141-.003-.004-.004-.004-.125-.14-.003-.004-.004-.004-.127-.138-.003-.004-.004-.004-.128-.136-.004-.004-.004-.004-.13-.135-.004-.004-.003-.004-.133-.134-.003-.004-.004-.003-.134-.133-.004-.003-.004-.004-.135-.13-.004-.004-.004-.004-.136-.128-.004-.004-.004-.004-.138-.126-.004-.004-.004-.003-.14-.125-.004-.004-.004-.003-.14-.123-.005-.004-.004-.003-.142-.121-.004-.004-.004-.003-.144-.12-.004-.003-.004-.003-.145-.117-.004-.004-.004-.003-.147-.115-.004-.004-.004-.003-.148-.113-.004-.003-.004-.004-.149-.111-.004-.003-.004-.004-.05-.036-.14-.083-.15-.055-.16-.027-.16.004zm-18.381.348l-.157.037-.147.066-.111.074-.04.032-.005.003-.004.004-.145.117-.004.003-.004.004-.144.119-.004.003-.004.004-.142.12-.004.004-.004.004-.141.123-.004.003-.004.004-.14.125-.004.003-.004.004-.138.126-.004.004-.004.004-.136.128-.004.004-.004.004-.135.13-.004.004-.004.003-.134.133-.004.003-.004.004-.132.134-.003.004-.004.004-.13.135-.004.004-.004.004-.128.136-.004.004-.004.004-.126.138-.004.004-.003.004-.125.14-.004.004-.003.004-.123.14-.004.005-.003.004-.121.142-.004.004-.003.004-.12.144-.003.004-.003.004-.117.145-.004.004-.003.004-.115.146-.004.005-.003.004-.113.147-.003.005-.004.004-.111.149-.003.004-.004.004-.11.15-.002.005-.003.004-.108.151-.003.005-.003.004-.106.152-.003.005-.003.004-.104.154-.003.004-.003.005-.102.154-.003.005-.002.004-.1.156-.003.005-.003.004-.098.157-.003.005-.003.004-.096.159-.002.004-.003.005-.094.16-.003.004-.002.004-.092.16-.003.005-.003.005-.09.161-.002.005-.003.005-.088.162-.002.005-.003.004-.086.164-.002.005-.002.004-.084.165-.003.005-.002.004-.082.166-.002.005-.003.004-.08.167-.002.004-.002.005-.078.168-.002.004-.002.005-.045.1-.053.153-.023.16.007.16.037.157.065.148.092.132.114.114.134.09.148.064.157.035.161.006.16-.025.152-.054.14-.08.121-.106.1-.126.065-.118.043-.095.074-.16.075-.155.077-.157.08-.155.08-.152.083-.155.085-.152.086-.15.088-.149.091-.15.094-.15.094-.147.095-.145.099-.146.1-.144.1-.142.104-.14.104-.14.11-.142.107-.137.11-.136.114-.136.113-.134.117-.133.118-.132.117-.129.122-.13.124-.127.123-.126.127-.125.127-.122.128-.12.132-.122.13-.115.133-.117.135-.115.135-.111.136-.11.037-.03.117-.11.094-.132.068-.146.04-.156.01-.161-.02-.16-.05-.154-.076-.141-.102-.125-.123-.104-.14-.08-.153-.051-.16-.023-.161.008zm24.514 11.15l-.157.04-.146.067-.131.093-.112.117-.088.135-.061.149-.033.157-.005.134.006.14.006.176.003.177.001.178-.001.177-.003.178-.006.177-.007.176-.01.177-.012.176-.015.176-.016.173-.018.175-.02.175-.024.174-.024.175-.027.17-.03.174-.03.173-.033.17-.036.172-.037.17-.04.17-.042.172-.043.168-.045.166-.048.169-.05.167-.052.168-.053.164-.056.166-.058.166-.06.161-.061.164-.063.158-.066.165-.068.16-.07.16-.07.158-.075.159-.074.155-.078.158-.081.158-.06.15-.03.158-.001.161.029.159.058.15.085.137.108.12.13.096.144.07.156.044.16.013.16-.017.155-.046.143-.074.127-.1.107-.12.07-.115.083-.164.003-.005.002-.004.082-.166.002-.005.003-.004.08-.167.002-.005.002-.004.078-.168.002-.004.002-.005.076-.169.002-.004.002-.005.074-.17.002-.004.002-.005.072-.17.002-.005.002-.005.07-.17.002-.006.001-.005.068-.172.002-.004.002-.005.065-.173.002-.005.002-.005.063-.173.002-.005.002-.005.06-.174.003-.005.001-.005.06-.175.001-.005.002-.005.057-.176.001-.005.002-.005.055-.177.001-.005.002-.005.052-.177.002-.005.001-.005.051-.178.001-.005.002-.005.048-.179.002-.005v-.005l.047-.179.001-.005.002-.005.044-.18v-.005l.002-.005.042-.18.001-.006.001-.005.04-.18.001-.006.001-.005.038-.182v-.005l.002-.005.035-.182v-.006l.002-.005.033-.182v-.006l.002-.005.03-.183.001-.005.001-.005.029-.184v-.005l.001-.006.027-.184v-.005l.001-.005.024-.185v-.005l.001-.005.022-.185v-.006l.001-.005.02-.185v-.006l.001-.005.017-.186v-.005l.001-.005.015-.187v-.005l.001-.005.013-.187v-.01l.01-.187.001-.006v-.005l.009-.187v-.011l.006-.187v-.011l.004-.188v-.011l.001-.188v-.01l-.001-.188v-.011l-.004-.188v-.011l-.006-.187v-.011l-.007-.145-.022-.16-.05-.152-.08-.141-.103-.124-.125-.102-.141-.077-.153-.05-.16-.02-.161.009zM.777 15l-.158.032-.15.06-.136.087-.117.11-.095.131-.068.146-.04.156-.012.133-.001.14v.01l.001.188v.011l.004.188v.011l.006.187v.011l.008.187v.011l.011.187v.005l.001.005.013.187v.01l.016.187v.01l.018.186v.011l.02.185.001.005v.006l.022.185.001.005v.005l.025.185v.005l.001.005.027.184v.006l.001.005.029.184v.005l.001.005.031.183.001.005.001.006.033.182.001.005.001.006.035.182.001.005.001.005.038.182v.005l.002.005.04.181v.005l.002.005.042.18.001.006.001.005.044.18.002.005v.005l.047.18.001.004.002.005.048.179.002.005.001.005.05.178.002.005.001.005.053.177.002.005.001.005.055.177.002.005.001.005.057.176.002.005.001.005.06.175.001.005.002.005.061.174.002.005.002.005.063.173.002.005.002.005.065.173.002.005.002.004.067.172.002.005.002.005.07.171.002.005.002.005.072.17.002.005.002.005.074.169.002.005.002.004.076.169.002.005.002.004.078.168.002.004.002.005.08.167.003.004.002.005.082.166.002.004.003.005.02.04.086.136.11.118.13.095.146.07.156.041.16.012.16-.019.155-.048.142-.075.126-.1.105-.123.08-.14.054-.152.024-.16-.006-.16-.036-.158-.051-.123-.018-.034-.078-.158L3.1 22.1l-.074-.16-.071-.156-.07-.162-.068-.16-.067-.164-.062-.158-.062-.164-.059-.161-.058-.166-.056-.166-.053-.164-.052-.168-.05-.167-.048-.17-.045-.165-.043-.168-.043-.172-.039-.17-.037-.17-.036-.172-.033-.17-.03-.173-.03-.174-.027-.17-.025-.175-.022-.174-.021-.175-.018-.175-.017-.173-.014-.176-.012-.176-.01-.177-.007-.176-.006-.177-.003-.178L1.73 16v-.134l-.013-.16-.044-.156-.072-.144-.097-.129-.12-.108-.137-.085-.15-.057L.938 15 .777 15zM6.17 26.842l-.152.052-.14.08-.122.105-.101.126-.076.142-.048.154-.02.16.012.161.041.156.07.146.094.13.096.093.032.026.004.003.004.004.145.117.004.003.004.004.146.115.005.003.004.004.147.113.005.003.004.004.149.111.004.003.004.003.15.11.005.003.004.003.151.108.005.003.004.003.152.106.005.003.004.003.154.104.004.003.005.003.154.102.005.002.004.003.156.1.005.003.004.003.157.098.005.003.004.002.159.096.004.003.005.003.16.094.004.003.004.002.16.092.005.003.005.002.161.09.005.003.005.003.162.088.005.002.004.002.164.087.005.002.004.002.165.084.005.003.004.002.166.082.004.002.005.003.167.08.004.002.005.002.168.078.004.002.005.002.169.076.004.002.005.002.17.074.004.002.005.002.17.072.005.002.005.002.17.07.006.002.005.001.171.068.005.002.005.002.173.065.005.002.005.002.173.063.005.002.005.002.174.061.005.002.005.001.175.06.005.001.005.002.176.057.005.001.005.002.177.055.005.001.005.002.177.052.005.002.005.001.178.051.005.001.005.002.178.048.006.002h.005l.179.047.005.001.005.002.18.044h.005l.005.002.18.042.006.001.005.001.159.035.16.02.16-.01.157-.04.146-.069.13-.094.112-.117.087-.136.06-.149.033-.158.002-.161-.028-.159-.057-.15-.084-.138-.108-.12-.128-.098-.144-.072-.128-.039-.154-.033-.168-.04-.171-.041-.169-.044-.17-.045-.166-.048-.168-.05-.165-.051-.166-.054-.166-.056-.163-.057-.165-.06-.161-.062-.164-.064-.16-.065-.16-.068-.162-.07-.157-.07-.157-.074-.157-.075-.156-.077-.153-.079-.156-.082-.153-.082-.154-.086-.15-.086-.152-.09-.148-.09-.147-.092-.149-.095-.145-.095-.144-.098-.145-.1-.143-.102-.14-.103-.14-.104-.14-.108-.139-.11-.136-.11-.027-.022-.133-.091-.148-.065-.157-.036-.161-.006-.16.024zm19.214.073l-.156.039-.146.067-.11.076-.064.051-.139.11-.14.108-.14.104-.14.103-.143.101-.145.101-.144.098-.145.095-.149.095-.148.093-.147.089-.152.09-.15.086-.154.086-.153.082-.156.082-.153.079-.156.077-.157.075-.157.073-.158.071-.16.07-.16.068-.161.065-.164.064-.161.061-.165.06-.163.058-.166.056-.166.054-.166.051-.167.05-.167.048-.17.045-.168.044-.171.042-.168.039-.17.037-.11.023-.154.047-.143.075-.126.1-.106.122-.081.139-.054.152-.025.16.006.16.035.158.063.148.09.133.114.115.132.092.148.065.157.037.16.008.133-.017.115-.024h.005l.005-.002.181-.04h.005l.005-.002.18-.042.006-.001.005-.001.18-.044.005-.002h.005l.18-.047.004-.001.005-.002.179-.048.005-.002.005-.001.178-.05.005-.002.005-.002.177-.052.005-.002.005-.001.177-.055.005-.002.005-.001.176-.057.005-.002.005-.002.175-.059.005-.001.005-.002.174-.061.005-.002.005-.002.173-.063.005-.002.005-.002.173-.065.005-.002.004-.002.172-.068.005-.001.005-.002.171-.07.005-.002.005-.002.17-.072.005-.002.005-.002.169-.074.005-.002.004-.002.169-.076.004-.002.005-.002.168-.078.004-.002.005-.002.167-.08.004-.003.005-.002.166-.082.004-.002.005-.003.165-.084.004-.002.005-.002.163-.087.005-.002.005-.002.162-.088.005-.003.005-.003.161-.09.005-.002.004-.003.16-.092.005-.002.005-.003.16-.094.004-.003.004-.003.158-.096.005-.002.004-.003.158-.098.004-.003.005-.003.156-.1.004-.003.004-.002.155-.102.005-.003.004-.003.154-.104.004-.003.005-.003.152-.106.004-.003.005-.003.151-.108.004-.003.005-.003.15-.11.004-.003.004-.003.149-.111.004-.004.004-.003.148-.113.004-.004.004-.003.147-.115.004-.004.004-.003.068-.055.116-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.05-.153-.08-.14-.103-.125-.124-.102-.142-.077-.153-.05-.16-.02-.16.009z"
+})));
+
+function _extends$H() { _extends$H = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$H.apply(this, arguments); }
+var IntermediateEventCatchParallelMultipleIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$H({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.975.003C8.195-.157.935 6.24.125 13.985c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.884 23.445.408 17.201.049c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.174.872 11.679 4.985 6.916c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.215-2.282-2.022-5.3-3.217-8.357-3.22zM16 4.975c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.082 11.082 0 0116 4.975zm-2.15 3.281v5.534H8.213v4.38h5.636v5.534h4.31V18.17h5.639v-4.38h-5.64V8.256h-4.31zm.865.865h2.583v5.534h5.635v2.65h-5.635v5.533h-2.583v-5.534h-5.64v-2.649h5.64V9.121z"
+})));
+
+function _extends$G() { _extends$G = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$G.apply(this, arguments); }
+var IntermediateEventCatchSignalIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$G({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm.006 3.521L9.206 20.745h13.598L16.005 8.542zm0 1.775l5.329 9.564H10.677l5.328-9.564z"
+})));
+
+function _extends$F() { _extends$F = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$F.apply(this, arguments); }
+var IntermediateEventCatchTimerIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$F({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.97.04h-.127C8.713-.018 2.003 5.334.437 12.286c-1.51 6.123.98 13.005 6.136 16.665 5.125 3.788 12.546 4.105 17.912.623 5.272-3.276 8.33-9.766 7.325-15.916-.904-6.241-5.79-11.7-11.95-13.143A16.082 16.082 0 0015.97.04zm-.181 1.724c.115 0 .23 0 .347.003 6.625-.066 12.823 5.149 13.89 11.69 1.13 5.91-1.908 12.349-7.262 15.138-5.473 3.013-12.866 1.884-17.116-2.726C1.291 21.372.444 13.914 3.802 8.602c2.493-4.112 7.169-6.819 11.987-6.838zm.283 1.554c-.117 0-.234.002-.351.005-6.1 0-11.691 5.049-12.346 11.114-.78 5.684 2.795 11.612 8.218 13.52 5.139 1.943 11.416.101 14.624-4.38 3.461-4.583 3.262-11.538-.596-15.831-2.36-2.747-5.924-4.423-9.549-4.428zm-.078 1.695c.078 0 .156 0 .234.003 5.4 0 10.321 4.556 10.734 9.942.563 5.13-2.958 10.364-7.971 11.678-4.832 1.41-10.457-.935-12.746-5.446-2.463-4.559-1.2-10.795 3.014-13.883a11.072 11.072 0 016.735-2.294zm-.137 3.42c-2.965.02-5.792 1.968-6.884 4.722-1.137 2.693-.509 6.007 1.536 8.096 1.988 2.14 5.263 2.929 8.007 1.926 2.875-.98 4.987-3.824 5.063-6.865.154-2.954-1.622-5.875-4.295-7.13a7.545 7.545 0 00-3.427-.75zm.27 1.381c2.708.013 5.249 2.014 5.88 4.652.704 2.576-.481 5.512-2.788 6.862-2.356 1.478-5.677 1.084-7.611-.918-2.042-1.97-2.405-5.376-.839-7.738 1.11-1.762 3.146-2.877 5.229-2.857h.13zm1.831 1.764l-2.072 3.76c-.64.068-.792 1.039-.202 1.298.39.27.696-.18 1.051-.164h3.168v-.864h-3.18l1.992-3.612-.757-.418z"
+})));
+
+function _extends$E() { _extends$E = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$E.apply(this, arguments); }
+var IntermediateEventNoneIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$E({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.848.001C8.113-.093.931 6.281.125 13.983c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.207C29.105 4.938 23.55.48 17.367.06A16.448 16.448 0 0015.848 0v.001zm.293 1.727c7.113-.099 13.662 5.97 14.077 13.08.56 6.299-3.516 12.735-9.582 14.679-5.798 2.004-12.806-.12-16.283-5.237C.717 19.159.874 11.638 5.016 6.876 7.722 3.638 11.902 1.63 16.14 1.728zm-.415 1.555C9.157 3.258 3.256 9.156 3.278 15.729c-.16 5.965 4.365 11.725 10.293 12.737 5.409 1.065 11.37-1.744 13.775-6.753 2.534-4.986 1.386-11.627-2.953-15.251-2.364-2.077-5.512-3.27-8.667-3.18zm.507 1.692c5.82-.026 11.013 5.318 10.79 11.143-.024 5.3-4.313 10.267-9.636 10.803-5.075.667-10.426-2.588-11.885-7.553-1.535-4.744.494-10.46 4.925-12.885a11.072 11.072 0 015.806-1.508z"
+})));
+
+function _extends$D() { _extends$D = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$D.apply(this, arguments); }
+var IntermediateEventThrowCompensationIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$D({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.975.003C8.195-.156.935 6.24.125 13.985c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.884 23.445.407 17.201.049c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.174.872 11.679 4.985 6.916c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 4.975c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 4.975zm-.56 5.772l-7.408 5.231 7.409 5.234v-5.057c2.385 1.687 4.771 3.371 7.157 5.057V10.747l-7.157 5.055v-5.055z"
+})));
+
+function _extends$C() { _extends$C = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$C.apply(this, arguments); }
+var IntermediateEventThrowEscalationIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$C({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm.006 3.927c-1.672 4.654-2.734 9.502-4.406 14.155 1.534-1.525 2.872-3.234 4.406-4.759l4.406 4.76c-1.496-4.71-2.91-9.446-4.406-14.156z"
+})));
+
+function _extends$B() { _extends$B = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$B.apply(this, arguments); }
+var IntermediateEventThrowLinkIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$B({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm1.78 4.093v3.555H9.785v6.714h7.994v3.554l5.829-6.911-5.83-6.912z"
+})));
+
+function _extends$A() { _extends$A = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$A.apply(this, arguments); }
+var IntermediateEventThrowMessageIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$A({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.975.003C8.195-.156.935 6.24.125 13.985c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.884 23.445.407 17.201.049c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.174.872 11.679 4.985 6.916c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 4.975c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 4.975zm-5.91 5.475l6.04 4.901 6.042-4.9H10.088zm-1.341 1.138v9.921h14.514V11.79l-7.132 5.787-7.382-5.99z"
+})));
+
+function _extends$z() { _extends$z = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$z.apply(this, arguments); }
+var IntermediateEventThrowMultipleIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$z({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.975.003C8.195-.156.935 6.24.125 13.985c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.884 23.445.407 17.201.049c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.174.872 11.679 4.985 6.916c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 4.975c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 4.975zm.006 3.073l-7.62 5.532 2.91 8.95h9.42l2.91-8.95-7.62-5.532z"
+})));
+
+function _extends$y() { _extends$y = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$y.apply(this, arguments); }
+var IntermediateEventThrowSignalIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$y({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.975.003C8.195-.156.935 6.24.125 13.985c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.884 23.445.407 17.201.049c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.174.872 11.679 4.985 6.916c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 4.975c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 4.975zm.006 3.52c-2.261 4.07-4.533 8.136-6.798 12.205h13.596L16.005 8.495z"
+})));
+
+function _extends$x() { _extends$x = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$x.apply(this, arguments); }
+var LaneIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$x({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M0 7v18.62h32V7H0zm1.655 17.056V8.684h28.62v15.372H1.656z"
+})));
+
+function _extends$w() { _extends$w = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$w.apply(this, arguments); }
+var ManualTaskIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$w({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M6.494 3C2.916 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.012C28.015 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5zm4.43 1.328c-.222.005-.43.09-.606.203-.985.638-4.356 2.977-5.096 3.486-.67.46-1.12 1.153-1.38 1.974-.27.858-.235 1.793-.232 2.576.002.59.016 1.104.17 1.727.22.908.634 1.63 1.23 2.118.597.49 1.363.732 2.23.734 3.038.012 6.078.016 9.119 0 .327-.002.645-.127.848-.37.204-.241.287-.56.291-.914a1.732 1.732 0 00-.097-.625h.327c.335 0 .641-.11.852-.316.21-.206.317-.475.374-.754a1.783 1.783 0 00-.126-1.143 1.18 1.18 0 00.877-.521c.196-.306.257-.666.258-1.025.001-.375-.088-.738-.293-1.033a1.179 1.179 0 00-.958-.512h-.478c.108-.237.156-.505.155-.782-.003-.373-.098-.721-.316-.99a1.21 1.21 0 00-.943-.43c-2.273-.004-4.236.018-6.412.012l-.19-.001c.102-.104.202-.205.312-.314.337-.336.662-.652.83-.869.4-.516.46-1.215.123-1.729-.178-.272-.439-.456-.72-.494a.93.93 0 00-.148-.008zm.029.728l.022.001c.055.008.115.027.209.172.132.201.126.606-.09.884-.079.102-.431.465-.767.8-.337.334-.657.643-.815.836-.153.186-.096.338-.056.435.04.096.085.212.298.263.063.014.066.01.086.012l.066.003c2.429.027 4.986-.004 7.223-.003.194 0 .293.056.379.162.086.105.151.286.153.533 0 .257-.065.467-.155.59-.09.124-.183.182-.37.183-1.706-.001-3.411-.005-5.117-.009v.731c2.23.004 4.461.01 6.692.012.17 0 .265.06.361.2.096.138.164.364.163.615 0 .268-.058.501-.143.634-.085.132-.162.193-.385.195-2.32-.001-4.554-.006-6.688-.003v.73c1.905 0 3.809.003 5.713.001.194.005.316.09.416.26.102.173.151.442.093.728-.04.193-.102.313-.17.38-.067.065-.148.108-.343.108h-5.71l.002.734c1.445 0 2.89-.01 4.334-.001.162 0 .232.041.297.123.064.081.123.238.12.488-.003.244-.061.385-.12.455-.06.07-.127.11-.296.11-3.037.016-6.076.012-9.113 0-.735-.002-1.316-.196-1.77-.568-.454-.372-.793-.935-.986-1.728-.134-.546-.146-.978-.148-1.558-.003-.796-.018-1.664.199-2.354.222-.705.582-1.24 1.096-1.593.75-.515 4.14-2.866 5.079-3.474a.504.504 0 01.241-.087z"
+})));
+
+function _extends$v() { _extends$v = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$v.apply(this, arguments); }
+var MessageFlowIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$v({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M4.073 26.607l1.295 1.296L1.325 32l-.662-.633L0 30.735l4.073-4.128zm6.953-7.046l1.296 1.296L1.325 32l7.555-7.656-1.295-1.296 1.455-1.474 1.986-2.013zM32 .06s-2.699 5.189-5.417 10.462l-.326.633c-1.14 2.214-2.265 4.407-3.176 6.2-1.228-1.222-2.449-2.452-3.676-3.675l-3.57 3.618-1.297-1.296 3.541-3.588c-.98-.964-1.932-1.958-2.923-2.91l-.753-.706c2.68-1.258 6.533-3.165 9.95-4.876l.617-.309C28.838 1.673 32 .06 32 .06zm-4.126 4.06l-.015.007-.115.057-.048.024-.115.057L17.7 9.172l5.017 4.948 5.157-10z"
+})));
+
+function _extends$u() { _extends$u = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$u.apply(this, arguments); }
+var ParticipantIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$u({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M0 5v22.069h32V5H0zm30.276 1.684v18.82H6.62V6.684h23.655zm-28.62 0h3.31v18.82h-3.31V6.684z"
+})));
+
+function _extends$t() { _extends$t = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$t.apply(this, arguments); }
+var ProcessIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$t({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ fillRule: "evenodd",
+ d: "M16.177 0l.137.002c.452.009.9.037 1.342.082.346.036.62.303.68.646l.437 2.536c.055.319.296.57.608.655.986.269 1.923.653 2.796 1.14.28.155.624.145.885-.039l2.083-1.47a.775.775 0 01.937.022c.86.699 1.645 1.484 2.343 2.343.22.27.223.653.023.937l-1.439 2.038a.833.833 0 00-.031.896c.512.889.92 1.846 1.204 2.855a.833.833 0 00.653.601l2.435.42c.342.059.61.333.645.679a15.928 15.928 0 01.08 2.064l-.003.114c-.012.382-.038.76-.077 1.134a.775.775 0 01-.645.68l-2.396.412a.835.835 0 00-.656.61 12.511 12.511 0 01-1.2 2.917.832.832 0 00.034.892l1.396 1.978c.2.284.196.667-.023.936a16.104 16.104 0 01-2.343 2.343.775.775 0 01-.937.023l-1.99-1.404a.833.833 0 00-.88-.026c-.907.516-1.886.922-2.916 1.2a.833.833 0 00-.61.656l-.414 2.396a.775.775 0 01-.679.646 16.096 16.096 0 01-3.312 0 .775.775 0 01-.679-.646l-.423-2.452a.834.834 0 00-.598-.636 12.474 12.474 0 01-1.468-.514 12.49 12.49 0 01-1.417-.68.833.833 0 00-.878.03l-2.026 1.43a.775.775 0 01-.937-.023 16.069 16.069 0 01-2.342-2.342.774.774 0 01-.024-.936l1.402-1.986a.833.833 0 00.032-.896 12.507 12.507 0 01-1.214-2.911.833.833 0 00-.655-.606l-2.386-.412a.775.775 0 01-.646-.678 16.097 16.097 0 010-3.314.775.775 0 01.646-.678l2.386-.412a.833.833 0 00.655-.606 12.507 12.507 0 011.214-2.911.833.833 0 00-.032-.896L3.552 6.853a.774.774 0 01.023-.936 16.091 16.091 0 012.343-2.343.775.775 0 01.937-.023l2.03 1.433c.26.177.6.182.874.028.915-.512 1.88-.9 2.87-1.167a.833.833 0 00.612-.656l.424-2.46a.775.775 0 01.679-.645C14.845.032 15.348.004 15.85 0h.326zM16 6.4c-5.302 0-9.6 4.297-9.6 9.599 0 5.302 4.298 9.6 9.6 9.6s9.6-4.298 9.6-9.6-4.298-9.6-9.6-9.6zm-3 4.283c0-1.425 1.637-2.203 2.715-1.29l5.69 4.815c.794.672.794 1.91 0 2.583l-5.69 4.815c-1.078.913-2.715.134-2.715-1.29z"
+})));
+
+function _extends$s() { _extends$s = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$s.apply(this, arguments); }
+var ReceiveTaskIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$s({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M6.494 3C2.916 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.012C28.015 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5zM5.23 7.764v11.577h17.55V7.764H5.23zm1.816.758h13.917l-6.959 4.577-6.958-4.577zm-1.06.21l8.018 5.274 8.018-5.275v9.853H5.987V8.73z"
+})));
+
+function _extends$r() { _extends$r = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$r.apply(this, arguments); }
+var ScriptTaskIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$r({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M6.494 3C2.916 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.012C28.015 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5zm2.99 3.077l-.077.045-.026.015c-1.09.646-1.84 1.239-2.336 1.818-.496.579-.735 1.162-.742 1.725-.014 1.119.812 1.958 1.544 2.708.732.75 1.385 1.456 1.446 2.041.032.298-.039.598-.364 1.008-.324.408-.911.897-1.85 1.445l-1.388.808h8.56l.101-.059c.996-.58 1.667-1.116 2.094-1.655.429-.54.603-1.107.547-1.638-.11-1.052-.967-1.818-1.688-2.556-.721-.739-1.306-1.436-1.298-2.092.004-.331.132-.7.535-1.171.402-.47 1.08-1.02 2.119-1.636l1.362-.806h-8.54zm.241.867h5.271a6.83 6.83 0 00-1.113 1.01c-.496.58-.736 1.163-.743 1.726-.014 1.119.812 1.958 1.544 2.708.732.75 1.385 1.456 1.446 2.041.032.298-.039.598-.364 1.008-.312.393-.872.862-1.753 1.386H8.728c.367-.286.658-.566.88-.847.43-.54.604-1.107.548-1.638-.11-1.052-.968-1.818-1.688-2.556-.721-.739-1.306-1.435-1.298-2.092.004-.331.132-.7.534-1.171.389-.454 1.04-.984 2.021-1.575zm-1.233 1.48v.4h4.12v-.4h-4.12zm-.154 2.158v.4H12.6v-.4H8.34zm1.931 2.158v.4h4.126v-.4H10.27zm.59 2.158v.4h4.276v-.4h-4.276z"
+})));
+
+function _extends$q() { _extends$q = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$q.apply(this, arguments); }
+var SendTaskIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$q({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M6.494 3C2.916 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.012C28.015 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5zm-1.38 3.16l8.332 4.717L21.78 8.16H5.114zm.021 1.745v9.309H21.8V9.905l-8.353 4.655-8.31-4.655z"
+})));
+
+function _extends$p() { _extends$p = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$p.apply(this, arguments); }
+var ServiceTaskIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$p({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M6.494 3C2.916 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.012C28.015 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5zm1.22 1.681V7.84c-.329.093-.63.223-.914.382l-.83-.82-1.554 1.561.83.82c-.16.288-.285.594-.372.911l-1.177.002v2.2l1.189-.004c.109.431.345.819.58 1.165v-1.898l-1.038.004v-.737l1.034-.002.058-.294c.084-.429.252-.838.493-1.203l.165-.25-.727-.718.523-.526.728.719.247-.165c.379-.25.793-.417 1.206-.505l.291-.06-.002-1.01h.75L9.19 8.417H11.16c-.185-.221-.951-.508-1.237-.588L9.93 6.68H7.713zm2.078 2.105l.003 1.158a4.19 4.19 0 00-.915.383l-.83-.821-1.553 1.562.83.82c-.16.288-.286.593-.373.91l-1.176.003v2.2l1.188-.004c.094.326.224.624.383.905l-.85.847 1.57 1.543.847-.843c.29.161.599.286.919.373v1.198c.756.006 1.56.003 2.206.003V17.81a4.19 4.19 0 00.915-.383l.847.835 1.554-1.56-.848-.836c.16-.288.286-.594.373-.912l1.152-.007V12.75l-1.165.007a4.09 4.09 0 00-.382-.905l.805-.807-1.57-1.546-.804.806a4.16 4.16 0 00-.915-.372l.007-1.147H9.792zm.732.73h.751l-.006 1.005.297.058c.43.085.844.252 1.21.492l.25.162.701-.704.528.52-.702.704.169.25c.248.374.412.779.505 1.196l.061.292 1.016-.006v.737l-1.01.006-.058.292c-.085.43-.252.838-.494 1.205l-.165.25.744.733-.523.525-.743-.734-.248.165c-.378.247-.789.418-1.203.503l-.294.058v1.067h-.745v-1.059l-.295-.057a3.395 3.395 0 01-1.21-.492l-.248-.162-.747.743-.528-.52.747-.744-.17-.25a3.546 3.546 0 01-.506-1.196l-.06-.291-1.04.004v-.738l1.034-.002.058-.294c.085-.428.252-.837.493-1.203l.165-.25-.726-.718.522-.526.728.72.248-.166a3.546 3.546 0 011.205-.504l.292-.06-.003-1.01zm.388 2.685a1.65 1.65 0 00-1.645 1.645c0 .904.74 1.645 1.645 1.645a1.65 1.65 0 001.645-1.645 1.65 1.65 0 00-1.645-1.645zm0 .73a.91.91 0 01.915.915.91.91 0 01-.915.914.91.91 0 01-.915-.914.91.91 0 01.915-.915z"
+})));
+
+function _extends$o() { _extends$o = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$o.apply(this, arguments); }
+var StartEventCompensationIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$o({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.995.001C9.705-.084 3.643 3.964 1.257 9.775-1.235 15.485.06 22.577 4.42 27.03c4.193 4.513 11.102 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.269.403-6.227-3.26-12.44-8.87-15.153A15.924 15.924 0 0015.994 0zm0 1.73c6.213-.108 12.122 4.355 13.726 10.357 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.626C2.101 23.171.377 16.07 2.848 10.44c2.14-5.205 7.515-8.774 13.147-8.708zm-.566 9.03l-7.415 5.235 7.415 5.238v-5.062c2.386 1.689 4.775 3.375 7.163 5.062V10.761l-7.163 5.058v-5.058zm-.866 1.666v7.13L9.51 15.993l5.052-3.565zm7.166 0v7.137l-5.052-3.568 5.052-3.569z"
+})));
+
+function _extends$n() { _extends$n = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$n.apply(this, arguments); }
+var StartEventConditionIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$n({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M16 0C7.174 0 0 7.174 0 16s7.174 16 16 16 16-7.174 16-16S24.826 0 16 0zm0 1.73c7.892 0 14.27 6.378 14.27 14.27 0 7.891-6.379 14.27-14.27 14.27S1.73 23.891 1.73 16C1.73 8.108 8.108 1.73 16 1.73zm-5.362 7.523v13.493h10.724V9.253H10.638zm.863.866h8.995V21.88H11.501V10.12zm.928 1.324v.863h7.139v-.863h-7.139zm0 2.605v.867h7.139v-.867h-7.139zm0 3.01v.864h7.139v-.863h-7.139zm0 2.72v.863h7.139v-.863h-7.139z"
+})));
+
+function _extends$m() { _extends$m = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$m.apply(this, arguments); }
+var StartEventErrorIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$m({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.995.005C9.705-.08 3.643 3.968 1.257 9.78-1.235 15.49.06 22.581 4.42 27.034c4.193 4.513 11.102 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.269.403-6.227-3.26-12.44-8.87-15.153A15.924 15.924 0 0015.994.005zm0 1.73c6.213-.108 12.122 4.355 13.726 10.357 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.626-4.814-3.838-6.538-10.939-4.067-16.57 2.14-5.205 7.515-8.774 13.147-8.708zm6.13 7.45l-3.635 7.37-4.52-5.88c-1.37 4.048-2.738 8.095-4.106 12.143l4.603-5.917 4.748 5.433 2.91-13.149zm-7.754 3.889l4.299 5.449 1.073-2.39-1.028 4.135-4.387-5.16-1.78 2.75 1.823-4.784z"
+})));
+
+function _extends$l() { _extends$l = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$l.apply(this, arguments); }
+var StartEventEscalationIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$l({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.995.001C9.705-.084 3.643 3.964 1.257 9.775-1.235 15.485.06 22.577 4.42 27.03c4.193 4.513 11.102 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.269.403-6.227-3.26-12.44-8.87-15.153A15.924 15.924 0 0015.994 0zm0 1.73c6.213-.108 12.122 4.355 13.726 10.357 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.626C2.101 23.171.377 16.07 2.848 10.44c2.14-5.205 7.515-8.774 13.147-8.708zm0 7.183c-1.674 4.658-2.736 9.509-4.41 14.166 1.535-1.526 2.874-3.236 4.41-4.763l4.41 4.763c-1.499-4.713-2.913-9.453-4.41-14.166zm.032 2.931c.822 2.588 1.598 5.19 2.42 7.778l-2.42-2.615c-.683.598-2.455 2.887-2.34 2.39.871-2.489 1.448-5.07 2.34-7.553z"
+})));
+
+function _extends$k() { _extends$k = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
+var StartEventMessageIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$k({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.995.001C9.705-.084 3.643 3.964 1.257 9.775-1.235 15.485.06 22.577 4.42 27.03c4.193 4.513 11.102 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.269.403-6.227-3.26-12.44-8.87-15.153A15.924 15.924 0 0015.994 0zm0 1.73c6.213-.108 12.122 4.355 13.726 10.357 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.626C2.101 23.171.377 16.07 2.848 10.44c2.14-5.205 7.515-8.774 13.147-8.708zm-7.257 8.732v11.069h14.513v-11.07H8.738zm3.224 1.73h8.064c-1.428.878-2.857 2.807-4.285 3.018l-3.779-3.019zm9.562 1.017v6.593H10.465V13.21l5.528 4.417 5.53-4.418z"
+})));
+
+function _extends$j() { _extends$j = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
+var StartEventMultipleIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$j({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.995.001C9.705-.084 3.643 3.964 1.257 9.775-1.235 15.485.06 22.577 4.42 27.03c4.193 4.513 11.102 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.269.403-6.227-3.26-12.44-8.87-15.153A15.924 15.924 0 0015.994 0zm0 1.73c6.213-.108 12.122 4.355 13.726 10.357 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.626C2.101 23.171.377 16.07 2.848 10.44c2.14-5.205 7.515-8.774 13.147-8.708zm0 6.328l-7.626 5.536c.97 2.986 1.942 5.971 2.913 8.957h9.426l2.912-8.957-7.625-5.536zm0 1.068l6.609 4.798-2.525 7.763H11.91l-2.524-7.763 6.609-4.798z"
+})));
+
+function _extends$i() { _extends$i = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$i.apply(this, arguments); }
+var StartEventNonInterruptingConditionIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$i({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M10.632 9.189V22.68h10.723V9.189H10.632zm.862.865h8.994v11.76H11.494v-11.76zm.928 1.324v.863h7.138v-.863h-7.138zm0 2.605v.866h7.138v-.866h-7.138zm0 3.01v.863h7.138v-.863h-7.138zm0 2.72v.862h7.138v-.863h-7.138zM16.12 0h-.232l-.22.004h-.012l-.221.006h-.012l-.22.01h-.012l-.22.013h-.012l-.22.016h-.012l-.22.019h-.005l-.006.001-.22.021h-.006l-.005.001-.22.025h-.011l-.22.028h-.005l-.006.002-.219.03h-.005l-.006.001-.218.033-.006.001-.006.001-.217.036-.006.001-.006.001-.217.039-.006.001-.006.001-.216.042-.006.001-.006.001-.215.045-.006.001-.006.002-.215.047-.006.002-.006.001-.214.05-.006.002-.006.002-.115.029-.152.053-.14.081-.122.106-.1.126-.075.143-.047.154-.018.16.012.16.042.156.07.145.095.13.118.11.137.086.15.059.158.03h.161l.132-.022.11-.028.202-.047.203-.046.208-.043.202-.039.206-.037.206-.034.205-.03.208-.03.205-.025.209-.023.208-.02.21-.017.209-.015.207-.011.21-.009.21-.006.207-.003h.21l.21.002.207.005.207.008.212.011.207.014.208.017.209.019.208.022.205.025.206.028.207.03.208.035.205.036.202.039.052.01.16.018.16-.012.156-.042.146-.07.13-.096.109-.119.085-.136.06-.15.03-.159v-.16l-.03-.16-.059-.15-.086-.136-.109-.118-.13-.096-.145-.07-.128-.038-.057-.011-.006-.002h-.006l-.216-.042-.006-.001-.006-.001-.217-.039H18.9l-.006-.002-.217-.035-.006-.001-.006-.001-.218-.032-.006-.001-.006-.001-.218-.03h-.006l-.006-.001-.219-.027h-.011l-.22-.024-.005-.001h-.006l-.22-.021h-.006l-.006-.001-.22-.017-.005-.001h-.006L17.06.03h-.012l-.22-.012h-.012l-.22-.01h-.012l-.22-.005h-.012L16.132 0h-.012zm8.715 2.783l-.157.034-.149.063-.134.089-.116.112-.092.132-.067.147-.038.157-.008.16.021.16.051.153.079.141.103.124.102.087.052.038h.001l.087.064v.001l.082.061.002.001.076.059h.001l.084.065.082.066.002.001.079.063.002.002.077.063.081.067.002.002.077.065.076.065.001.002.08.07.078.07h.002l.075.068.077.072.002.001.073.069.077.073.072.07.002.001.077.076.07.07v.001l.075.076.07.073.002.001.074.079.002.002.069.074.069.075.074.082.07.08.002.001.068.079h.001l.067.079.068.082.065.078.001.002.068.083.067.084.063.081.001.002.067.087.002.002.063.084.001.001.064.087.008.01.008.01.095.12.093.121.09.119.087.119.088.122.086.123.084.12.081.122.001.002.084.126.08.126.08.127.077.126.079.131.074.127.075.131.073.131.07.13.07.133.069.133.045.09.086.137.109.119.13.096.144.07.156.042.16.013.16-.017.155-.047.143-.075.126-.1.106-.121.082-.14.054-.151.025-.16-.005-.16-.035-.158-.05-.124-.048-.095-.002-.004-.002-.004-.073-.14-.002-.005-.002-.004-.074-.14-.002-.004-.002-.004-.076-.14-.002-.003-.002-.004-.077-.139-.003-.004-.002-.004-.078-.138-.003-.004-.002-.003-.08-.137-.002-.004-.003-.004-.081-.136-.002-.004-.003-.004-.083-.136-.002-.003-.002-.004-.085-.135-.002-.004-.003-.003-.085-.134-.003-.004-.002-.004-.087-.132-.003-.004-.003-.004-.088-.132-.003-.003-.002-.004-.09-.13-.003-.005-.003-.003-.091-.13-.003-.004-.002-.004-.093-.129-.003-.003-.003-.004-.094-.128-.003-.004-.003-.003-.095-.127-.003-.004-.003-.004-.097-.125-.003-.004-.003-.004-.09-.114-.06-.082-.003-.003-.002-.003-.069-.091-.002-.004-.002-.003-.07-.09-.003-.003-.002-.003-.07-.09-.003-.003-.002-.003-.071-.09-.002-.003-.003-.002-.072-.089-.002-.003-.002-.003-.073-.088-.002-.003-.002-.002-.074-.087-.002-.003-.002-.003-.074-.086-.003-.003-.002-.003-.074-.086-.003-.002-.002-.003-.075-.085-.003-.003-.002-.002-.076-.084-.002-.003-.003-.003-.076-.083-.002-.003-.003-.003-.077-.082-.002-.003-.003-.002-.077-.082-.003-.003-.003-.002-.078-.081-.002-.003-.003-.003-.078-.08-.003-.002-.003-.003-.079-.08-.002-.002-.003-.002-.08-.08-.002-.002-.003-.002-.08-.078-.003-.003-.003-.002-.08-.077-.003-.003-.003-.002-.082-.077-.002-.002-.003-.002-.082-.076-.003-.002-.002-.003-.083-.075-.003-.002-.002-.003-.084-.074-.002-.002-.003-.002-.084-.074-.003-.002-.002-.002-.085-.073-.002-.002-.003-.003-.085-.071-.003-.003-.002-.002-.086-.07-.003-.003-.002-.002-.086-.07-.003-.003-.003-.002-.086-.07-.003-.002-.003-.002-.087-.069-.002-.002-.003-.002-.088-.068-.002-.002-.003-.002-.088-.067-.003-.003-.003-.002-.088-.066-.003-.002-.003-.002-.089-.066-.003-.002-.003-.002-.057-.042-.14-.082-.15-.055-.16-.026-.16.004zM6.377 3.21l-.157.037-.148.066-.111.074-.007.006-.003.002-.003.002-.086.069-.003.002-.002.002-.086.07-.003.002-.002.002-.086.07-.002.003-.003.002-.085.071-.002.002-.003.003-.084.071-.003.003-.002.002-.084.072-.003.003-.002.002-.083.073-.003.003-.002.002-.083.074-.002.002-.003.003-.082.074-.003.003-.002.002-.081.076-.003.002-.003.002-.08.077-.003.002-.003.003-.08.076-.002.003-.003.002-.08.078-.002.002-.003.003-.079.078-.002.003-.003.002-.078.08-.003.002-.002.002-.078.08-.002.003-.003.002-.077.08-.003.004-.002.002-.077.081-.002.003-.003.003-.076.082-.002.002-.003.003-.075.082-.002.003-.003.003-.074.083-.003.003-.002.003-.074.084-.003.003-.002.002-.074.085-.002.003-.002.003-.073.085-.003.003-.002.003-.072.086-.002.003-.003.003-.071.087-.003.003-.002.002-.07.088-.003.003-.002.003-.07.088-.003.003-.002.003-.07.09-.002.002-.002.003-.069.09-.002.003-.003.003-.068.09-.002.003-.002.003-.067.092-.003.003-.002.003-.067.092-.002.003-.002.003-.066.092-.002.003-.002.004-.066.093-.002.003-.002.003-.065.094-.002.003-.002.004-.064.094-.002.003-.002.004-.063.095-.002.003-.002.003-.063.097-.002.003-.002.003-.046.073-.05.07-.003.002-.002.003-.067.093-.003.003-.002.003-.066.094-.002.003-.002.003-.066.094-.002.003-.002.003-.064.094-.002.004-.002.003-.064.094-.002.004-.002.003-.062.095-.002.003-.002.003-.062.096-.002.003-.002.003-.06.096-.003.003-.002.003-.06.096-.001.004-.002.003-.059.096-.002.004-.002.003-.058.097-.002.003-.001.003-.057.098-.002.003-.002.003-.056.098-.002.003-.002.003-.055.098-.002.004-.001.003-.055.098-.001.004-.002.003-.054.099-.001.003-.002.003-.052.1-.002.002-.002.004-.051.1-.002.002-.002.004-.05.1-.002.003-.002.003-.05.1v.003l-.002.004-.05.1v.003l-.002.004-.048.1-.002.004-.001.003-.047.101-.002.003-.001.004-.013.027-.052.152-.024.16.006.16.037.157.064.148.091.133.114.114.134.09.147.065.157.036.162.006.159-.024.152-.053.14-.08.122-.105.1-.126.066-.117.01-.023.044-.095.045-.095.002-.003.042-.087.048-.097.048-.095v-.001l.048-.092.001-.001.047-.09.05-.093.002-.002.049-.09.052-.092.001-.002.051-.089.001-.002.051-.087.053-.088.001-.002.055-.091.057-.091.057-.09.001-.002.057-.089.055-.083.001-.002.06-.09.06-.088.062-.089.001-.001.06-.084.063-.088.065-.089.017-.023.016-.025.06-.094.059-.09v-.002l.058-.086.057-.086.001-.001.062-.09.062-.088.001-.002.06-.085.002-.002.06-.082.063-.087.064-.084.002-.002.061-.08.065-.084.064-.08v-.001l.067-.083.067-.082.07-.083.069-.08.063-.074.074-.083.068-.077.002-.002.07-.076.07-.075.072-.077.001-.001.067-.07.076-.078.002-.002.07-.07.075-.075.002-.002.072-.07.075-.072.002-.002.073-.069.074-.068.001-.001.08-.073.076-.068.002-.002.072-.063v-.001l.078-.067.079-.068.002-.001.08-.068.002-.002.077-.063.082-.066.001-.001.075-.06.002-.002.006-.004.117-.111.094-.131.068-.146.04-.156.01-.161-.019-.16-.049-.154-.076-.141-.102-.125-.123-.105-.14-.079-.153-.052-.16-.023-.16.007zm24.596 11.088l-.156.04-.146.067-.131.094-.112.117-.087.135-.061.15-.033.157-.004.134.007.142.005.152.004.15.002.149v.153l.001.011v.015l.004.11.002.11v.002l.002.106v.321l-.003.102-.002.106-.004.107-.005.105-.006.106-.006.106-.008.106v.002l-.008.103v.002l-.01.1-.01.105-.01.105-.013.105-.012.099v.002l-.014.108-.014.1-.016.105-.016.103v.002l-.017.099-.018.104-.019.103v.002l-.019.097-.02.104-.022.103v.001l-.022.098-.023.103v.002l-.024.096-.025.103v.002l-.024.096-.027.102v.003l-.026.093v.001l-.029.103v.002l-.03.099-.028.097v.002l-.03.095-.03.096v.001l-.033.1-.031.095v.002l-.035.1v.003l-.034.094v.003l-.035.096v.001l-.034.09v.002l-.038.098-.036.093v.002l-.038.095-.079.194-.08.188-.085.189-.087.19-.09.184-.092.183-.095.184-.05.093-.064.148-.034.158-.005.16.026.16.054.151.082.14.106.12.127.1.143.075.154.046.16.017.161-.013.156-.042.144-.071.13-.096.109-.119.072-.112.053-.099.003-.005.003-.006.102-.195.003-.006.003-.006.098-.196.003-.006.003-.006.096-.197.002-.006.003-.006.093-.2.002-.006.003-.006.09-.2.002-.006.003-.007.086-.202.003-.006.002-.006.084-.203.002-.005.001-.005.04-.102.002-.003.001-.003.04-.103.001-.003.001-.003.04-.103v-.004l.001-.003.039-.103v-.003l.002-.003.037-.104.001-.003.001-.003.037-.104v-.004l.002-.003.035-.104.002-.003v-.004l.035-.104.002-.004v-.003l.034-.105.002-.003v-.003l.034-.105v-.004l.002-.003.032-.106.001-.003.001-.003.031-.106.001-.003.001-.004.031-.106.001-.003.001-.004.03-.106v-.003l.002-.004.028-.107.001-.003.001-.003.028-.107.001-.004.001-.003.027-.107.001-.004v-.003l.027-.108.001-.003v-.004l.026-.108.001-.003v-.004l.025-.108.001-.003v-.004l.025-.108v-.004l.001-.003.023-.109v-.003l.001-.004.022-.109v-.003l.002-.004.02-.109.001-.004v-.003l.02-.11.002-.003v-.004l.02-.11v-.007l.019-.11v-.003l.001-.004.017-.11v-.004l.001-.003.017-.11v-.008l.016-.11v-.004l.001-.004.015-.11v-.008l.015-.111v-.008l.013-.111v-.007l.013-.112v-.007l.011-.112v-.004l.001-.004.01-.112v-.007l.01-.112v-.008l.008-.112v-.008l.007-.113v-.007l.007-.113v-.008l.005-.113v-.007l.005-.114v-.007l.003-.114v-.007l.003-.114v-.129l.001-.114v-.13l-.003-.114v-.008l-.003-.115v-.007l-.003-.102v-.155l-.003-.158v-.01l-.004-.158v-.01l-.006-.158v-.01l-.007-.148-.023-.16-.051-.152-.08-.14-.103-.124-.125-.102-.142-.077-.153-.05-.16-.02-.161.01zm-30.213.66l-.157.034-.149.063-.134.09-.115.113-.092.132-.067.147-.037.156-.009.134.001.11V15.95l.006.22v.012l.01.22v.012l.012.22v.006l.001.006.015.22v.005l.001.006.018.22.001.006v.006l.022.219v.006l.001.006.024.219.001.006v.006l.028.218.001.006v.006l.031.218.001.006.001.006.033.218.001.006.001.005.037.218v.006l.002.005.04.217v.006l.001.006.043.216.001.006.001.006.046.216v.005l.002.006.048.215.002.006.001.006.051.214.002.006v.006l.055.214.002.005.001.006.057.213.002.006.001.005.06.213.002.005.001.006.063.212.002.005.001.006.066.21.002.006.002.006.068.21.002.005.002.005.07.21.003.005.002.005.074.208.002.006.002.005.077.207.002.006.002.005.08.206.002.005.002.006.082.204.002.006.002.005.086.204.002.005.002.006.088.202.002.005.003.006.09.2.003.006.002.005.094.2.002.006.003.005.096.199.002.005.003.005.03.062.086.137.11.118.128.097.145.07.156.043.16.013.16-.017.155-.047.143-.074.127-.1.106-.121.081-.14.055-.15.025-.16-.005-.161-.034-.158-.05-.124-.028-.055-.092-.19-.087-.188-.087-.192-.083-.19-.08-.193-.078-.194-.076-.196-.073-.195-.07-.197-.067-.198-.065-.199-.063-.2-.059-.2-.056-.2-.055-.204-.05-.201-.049-.202-.046-.205-.043-.206-.04-.203-.038-.207-.034-.204-.032-.207-.028-.205-.026-.207-.023-.208-.02-.207-.018-.207-.014-.208-.011-.207-.009-.208-.005-.207-.002-.104-.017-.16-.046-.155-.074-.143-.1-.126-.121-.107-.139-.081-.152-.055-.159-.025-.161.004zm24.585 11.83l-.156.039-.146.068-.11.076-.015.012-.163.129-.166.127-.168.125-.17.124-.17.12-.172.118-.173.115-.176.114-.177.111-.18.11-.178.105-.182.104-.182.101-.184.1-.184.095-.189.095-.186.09-.188.089-.19.086-.19.082-.193.081-.195.078-.191.074-.197.073-.195.07-.196.065-.198.064-.198.061-.2.058-.2.055-.2.052-.2.049-.151.035-.153.05-.141.078-.125.103-.103.124-.078.14-.05.154-.022.16.009.16.038.157.067.147.093.132.116.112.134.089.149.062.158.034.16.003.133-.02.158-.035.006-.002.006-.001.213-.052.006-.002.007-.001.212-.056.006-.001.006-.002.212-.058.006-.002.006-.002.211-.061.006-.002.006-.002.21-.064.006-.002.006-.002.21-.067.005-.002.006-.002.208-.07.006-.002.006-.003.207-.073.006-.002.006-.002.206-.077.006-.002.005-.002.206-.08.005-.001.006-.003.204-.082.006-.002.005-.002.203-.085.006-.003.005-.002.202-.088.006-.002.005-.003.2-.09.006-.003.006-.003.2-.093.005-.003.005-.002.198-.096.006-.003.005-.003.197-.099.005-.002.005-.003.196-.102.005-.002.005-.003.195-.105.005-.002.005-.003.193-.107.005-.003.005-.003.191-.11.005-.003.005-.003.19-.112.005-.003.005-.003.189-.115.005-.003.005-.003.187-.117.005-.003.004-.004.186-.12.005-.003.004-.003.184-.122.005-.003.005-.004.182-.125.004-.003.005-.003.18-.128.005-.003.005-.003.179-.13.004-.003.005-.004.177-.132.004-.004.005-.003.175-.135.005-.003.004-.004.173-.137.005-.003.004-.004.019-.015.115-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.052-.153-.079-.14-.103-.124-.125-.102-.142-.078-.153-.05-.16-.02-.16.01zm-19.17.054l-.153.051-.14.079-.124.103-.103.125-.077.141-.05.153-.02.16.009.161.04.156.067.147.093.131.095.094.047.04.005.004.005.004.17.14.005.004.005.004.172.137.004.004.005.003.086.067.003.002.003.002.087.067.003.002.003.002.088.066.002.003.003.002.089.065.002.002.003.002.09.065.002.002.003.002.09.064.002.002.003.002.09.063.003.002.003.002.09.063.003.002.003.002.092.062.002.002.003.002.092.061.003.002.003.002.092.06.003.003.003.001.093.06.003.002.003.002.093.06.003.001.003.002.094.058.003.002.003.002.095.058.003.001.003.002.095.057.003.002.003.002.095.056.003.002.003.002.096.055.004.002.003.001.096.055.003.002.003.002.098.053.003.002.003.002.097.053.004.002.003.001.098.053.003.001.003.002.099.052.003.001.003.002.1.05.003.002.003.002.1.05.003.002.003.001.1.05h.003l.004.003.1.048.004.001.003.002.101.048.003.001.004.002.101.046.004.002.003.001.102.046.004.002.003.001.103.045.003.002.003.001.103.045.004.001.003.002.104.043.003.001.004.002.104.042.003.002.004.001.104.042.004.001.003.002.105.04.004.002.003.001.106.04.003.002h.004l.106.04.004.001.003.002.107.038.003.001.004.001.107.038.003.001.004.001.107.037.004.001.004.001.108.036.003.001.004.001.108.035.004.001.003.001.11.034.003.001.004.001.109.033.004.002h.003l.11.033h.004l.003.002.11.031.004.001.004.001.084.023.081.028.004.001.003.001.109.037.003.001.004.001.109.036.003.001.004.001.109.035h.003l.004.002.11.033.003.001.003.001.11.033.003.001.004.001.109.031.004.002h.003l.11.031.003.001.004.001.11.03h.003l.003.001.11.029h.004l.003.002.11.027.003.001.004.001.11.027h.003l.004.001.004.001.16.022.16-.008.157-.038.147-.067.132-.092.112-.116.09-.134.062-.149.034-.157.004-.161-.025-.16-.055-.151-.082-.139-.107-.12-.127-.1-.143-.074-.124-.04h-.003l-.104-.025-.103-.026h-.002l-.095-.026h-.001l-.101-.027h-.002l-.1-.028h-.002l-.103-.03-.104-.032-.097-.03h-.002l-.103-.033-.102-.033-.101-.034-.106-.036-.027-.01-.027-.007-.107-.03-.104-.029-.104-.03h-.002l-.097-.03-.102-.032-.102-.032-.102-.034-.103-.035-.096-.034-.1-.036-.101-.037h-.002l-.094-.036-.096-.037-.097-.04h-.002l-.099-.04-.098-.042h-.002l-.092-.04-.097-.043-.095-.043-.097-.044h-.002l-.09-.043-.094-.045-.094-.046-.093-.047-.09-.046-.096-.05-.088-.047-.002-.001-.09-.049-.094-.052-.002-.002-.087-.049-.087-.05h-.002l-.088-.053h-.001l-.09-.055-.086-.052-.002-.001-.089-.055-.084-.054h-.002l-.09-.059h-.001l-.085-.056-.001-.001-.084-.056-.082-.056h-.001l-.086-.06-.082-.058H7.79l-.086-.062-.002-.002-.08-.058-.081-.06h-.001l-.085-.064-.002-.002-.076-.058-.002-.002-.082-.064-.161-.128-.162-.133-.04-.034-.132-.092-.147-.066-.157-.038-.16-.008-.16.022z"
+})));
+
+function _extends$h() { _extends$h = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$h.apply(this, arguments); }
+var StartEventNonInterruptingEscalationIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$h({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M16 9.209c-1.674 4.655-2.735 9.504-4.408 14.16 1.534-1.526 2.873-3.235 4.407-4.761l4.408 4.76c-1.497-4.71-2.91-9.448-4.408-14.16zm.031 2.93c.822 2.586 1.598 5.187 2.42 7.774l-2.42-2.614c-.682.598-2.453 2.886-2.34 2.389.873-2.488 1.45-5.068 2.34-7.55zM16.132.364c-1.51.016-3.055.139-4.492.614-.854.442-.266 1.861.651 1.578 2.266-.58 4.656-.596 6.944-.144.935.063 1.21-1.391.318-1.674-1.118-.26-2.274-.361-3.42-.374zm8.865 2.777c-.931-.1-1.262 1.29-.425 1.666 1.863 1.364 3.222 3.298 4.322 5.296.617.737 1.875-.145 1.398-.979-1.184-2.275-2.808-4.384-4.923-5.866a.863.863 0 00-.372-.117zM6.55 3.564c-.734.078-1.196.762-1.735 1.206C3.552 6.02 2.55 7.511 1.681 9.053c-.31.533-.71 1.33-.03 1.767.615.432 1.282-.132 1.446-.742.796-1.475 1.746-2.89 2.934-4.08.43-.548 1.292-.822 1.34-1.595a.874.874 0 00-.822-.839zm24.582 11.078c-.771-.033-1.004.82-.873 1.437.13 2.395-.471 4.797-1.615 6.897-.33.876.984 1.559 1.512.785a14.276 14.276 0 001.761-8.54.865.865 0 00-.785-.579zm-30.195.666c-.774-.06-1.032.785-.905 1.407.117 2.41.732 4.81 1.858 6.945.528.774 1.84.09 1.51-.786A15.932 15.932 0 011.728 16a.876.876 0 00-.79-.692zm24.57 11.817c-.762.099-1.243.835-1.919 1.16-1.514 1.002-3.237 1.632-4.978 2.092-.864.423-.307 1.855.616 1.591 2.528-.578 4.93-1.75 6.913-3.421.469-.522.07-1.42-.631-1.422zm-19.16.042c-.845.001-1.12 1.228-.395 1.628 1.665 1.401 3.667 2.348 5.76 2.912.618.178 1.482.565 1.893-.177.355-.628-.226-1.297-.87-1.326-1.972-.515-3.912-1.285-5.5-2.594-.26-.213-.522-.472-.888-.443z"
+})));
+
+function _extends$g() { _extends$g = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
+var StartEventNonInterruptingMessageIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$g({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M8.746 10.393v11.064h14.506V10.393H8.746zm3.223 1.728h8.06c-1.428.879-2.856 2.807-4.283 3.018l-3.777-3.018zm9.557 1.018v6.59H10.473v-6.59l5.525 4.416 5.528-4.416zM16.132 0c-1.51.016-3.055.139-4.492.614-.854.442-.266 1.861.651 1.578 2.266-.58 4.656-.596 6.944-.144.935.063 1.21-1.391.318-1.674-1.118-.26-2.274-.361-3.42-.374zm8.865 2.777c-.931-.1-1.262 1.29-.425 1.666 1.863 1.364 3.222 3.298 4.322 5.296.617.737 1.875-.145 1.398-.979-1.184-2.275-2.808-4.384-4.923-5.866a.863.863 0 00-.372-.117zM6.55 3.2c-.734.078-1.196.762-1.735 1.206C3.552 5.656 2.55 7.147 1.681 8.69c-.31.533-.71 1.33-.03 1.767.615.432 1.282-.132 1.446-.742.796-1.475 1.746-2.89 2.934-4.08.43-.548 1.292-.822 1.34-1.595a.874.874 0 00-.822-.839zm24.582 11.078c-.771-.033-1.004.82-.873 1.437.13 2.395-.471 4.797-1.615 6.897-.33.876.984 1.559 1.512.785a14.276 14.276 0 001.761-8.54.865.865 0 00-.785-.579zm-30.195.666c-.774-.06-1.032.785-.905 1.407.117 2.41.732 4.81 1.858 6.945.528.774 1.84.09 1.51-.786a15.932 15.932 0 01-1.672-6.874.876.876 0 00-.79-.692zm24.57 11.817c-.762.099-1.243.835-1.919 1.16-1.514 1.002-3.237 1.632-4.978 2.092-.864.423-.307 1.855.616 1.591 2.528-.578 4.93-1.75 6.913-3.421.469-.522.07-1.42-.631-1.422zm-19.16.042c-.845.001-1.12 1.228-.395 1.628 1.665 1.401 3.667 2.348 5.76 2.912.618.178 1.482.565 1.893-.177.355-.628-.226-1.297-.87-1.326-1.972-.515-3.912-1.285-5.5-2.594-.26-.213-.522-.472-.888-.443z"
+})));
+
+function _extends$f() { _extends$f = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
+var StartEventNonInterruptingMultipleIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$f({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M23.621 13.524L16 7.99l-7.622 5.534 2.911 8.952h9.422l2.911-8.952zm-1.016.33l-2.523 7.759h-8.165l-2.524-7.76L16 9.059l6.606 4.796zM16.132 0c-1.51.016-3.055.139-4.492.614-.854.442-.266 1.861.651 1.578 2.266-.58 4.656-.596 6.944-.144.935.063 1.21-1.391.318-1.674-1.118-.26-2.274-.361-3.42-.374zm8.865 2.777c-.931-.1-1.262 1.29-.425 1.666 1.863 1.364 3.222 3.298 4.322 5.296.617.737 1.875-.145 1.398-.979-1.184-2.275-2.808-4.384-4.923-5.866a.863.863 0 00-.372-.117zM6.55 3.2c-.734.078-1.196.762-1.735 1.206C3.552 5.656 2.55 7.147 1.681 8.69c-.31.533-.71 1.33-.03 1.767.615.432 1.282-.132 1.446-.742.796-1.475 1.746-2.89 2.934-4.08.43-.548 1.292-.822 1.34-1.595a.874.874 0 00-.822-.839zm24.582 11.078c-.771-.033-1.004.82-.873 1.437.13 2.395-.471 4.797-1.615 6.897-.33.876.984 1.559 1.512.785a14.276 14.276 0 001.761-8.54.865.865 0 00-.785-.579zm-30.195.666c-.774-.06-1.032.785-.905 1.407.117 2.41.732 4.81 1.858 6.945.528.774 1.84.09 1.51-.786a15.932 15.932 0 01-1.672-6.874.876.876 0 00-.79-.692zm24.57 11.817c-.762.099-1.243.835-1.919 1.16-1.514 1.002-3.237 1.632-4.978 2.092-.864.423-.307 1.855.616 1.591 2.528-.578 4.93-1.75 6.913-3.421.469-.522.07-1.42-.631-1.422zm-19.16.042c-.845.001-1.12 1.228-.395 1.628 1.665 1.401 3.667 2.348 5.76 2.912.618.178 1.482.565 1.893-.177.355-.628-.226-1.297-.87-1.326-1.972-.515-3.912-1.285-5.5-2.594-.26-.213-.522-.472-.888-.443z"
+})));
+
+function _extends$e() { _extends$e = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
+var StartEventNonInterruptingParallelMultipleIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$e({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M13.503 9.016v4.428H9.075v4.98h4.428v4.428h4.98v-4.427h4.428v-4.981h-4.427V9.016h-4.981zm.83.83h3.32v4.428h4.428v3.32h-4.428v4.428h-3.32v-4.454H9.905v-3.294h4.428V9.846zM16.12 0h-.232l-.22.004h-.012l-.221.006h-.012l-.22.01h-.012l-.22.013h-.012l-.22.016h-.012l-.22.019h-.005l-.006.001-.22.021h-.006l-.005.001-.22.025h-.011l-.22.028h-.005l-.006.002-.219.03h-.005l-.006.001-.218.033-.006.001-.006.001-.217.036-.006.001-.006.001-.217.039-.006.001-.006.001-.216.042-.006.001-.006.001-.215.045-.006.001-.006.002-.215.047-.006.002-.006.001-.214.05-.006.002-.006.002-.115.029-.152.053-.14.081-.122.106-.1.126-.075.143-.047.154-.018.16.012.16.042.156.07.145.095.13.118.11.137.086.15.059.158.03h.161l.132-.022.11-.028.202-.047.203-.046.208-.043.202-.039.206-.037.206-.034.205-.03.208-.03.205-.025.209-.023.208-.02.21-.017.209-.015.207-.011.21-.009.21-.006.207-.003h.21l.21.002.207.005.207.008.212.011.207.014.208.017.209.019.208.022.205.025.206.028.207.03.208.035.205.036.202.039.052.01.16.018.16-.012.156-.042.146-.07.13-.096.109-.119.085-.136.06-.15.03-.159v-.16l-.03-.16-.059-.15-.086-.136-.109-.118-.13-.096-.145-.07-.128-.038-.057-.011-.006-.002h-.006l-.216-.042-.006-.001-.006-.001-.217-.039H18.9l-.006-.002-.217-.035-.006-.001-.006-.001-.218-.032-.006-.001-.006-.001-.218-.03h-.006l-.006-.001-.219-.027h-.011l-.22-.024-.005-.001h-.006l-.22-.021h-.006l-.006-.001-.22-.017-.005-.001h-.006L17.06.03h-.012l-.22-.012h-.012l-.22-.01h-.012l-.22-.005h-.012L16.132 0h-.012zm8.715 2.783l-.157.034-.149.063-.134.089-.116.112-.092.132-.067.147-.038.157-.008.16.021.16.051.153.079.141.103.124.102.087.052.038h.001l.087.064v.001l.082.061.002.001.076.059h.001l.084.065.082.066.002.001.079.063.002.002.077.063.081.067.002.002.077.065.076.065.001.002.08.07.078.07h.002l.075.068.077.072.002.001.073.069.077.073.072.07.002.001.077.076.07.07v.001l.075.076.07.073.002.001.074.079.002.002.069.074.069.075.074.082.07.08.002.001.068.079h.001l.067.079.068.082.065.078.001.002.068.083.067.084.063.081.001.002.067.087.002.002.063.084.001.001.064.087.008.01.008.01.095.12.093.121.09.119.087.119.088.122.086.123.084.12.081.122.001.002.084.126.08.126.08.127.077.126.079.131.074.127.075.131.073.131.07.13.07.133.069.133.045.09.086.137.109.119.13.096.144.07.156.042.16.013.16-.017.155-.047.143-.075.126-.1.106-.121.082-.14.054-.151.025-.16-.005-.16-.035-.158-.05-.124-.048-.095-.002-.004-.002-.004-.073-.14-.002-.005-.002-.004-.074-.14-.002-.004-.002-.004-.076-.14-.002-.003-.002-.004-.077-.139-.003-.004-.002-.004-.078-.138-.003-.004-.002-.003-.08-.137-.002-.004-.003-.004-.081-.136-.002-.004-.003-.004-.083-.136-.002-.003-.002-.004-.085-.135-.002-.004-.003-.003-.085-.134-.003-.004-.002-.004-.087-.132-.003-.004-.003-.004-.088-.132-.003-.003-.002-.004-.09-.13-.003-.005-.003-.003-.091-.13-.003-.004-.002-.004-.093-.129-.003-.003-.003-.004-.094-.128-.003-.004-.003-.003-.095-.127-.003-.004-.003-.004-.097-.125-.003-.004-.003-.004-.09-.114-.06-.082-.003-.003-.002-.003-.069-.091-.002-.004-.002-.003-.07-.09-.003-.003-.002-.003-.07-.09-.003-.003-.002-.003-.071-.09-.002-.003-.003-.002-.072-.089-.002-.003-.002-.003-.073-.088-.002-.003-.002-.002-.074-.087-.002-.003-.002-.003-.074-.086-.003-.003-.002-.003-.074-.086-.003-.002-.002-.003-.075-.085-.003-.003-.002-.002-.076-.084-.002-.003-.003-.003-.076-.083-.002-.003-.003-.003-.077-.082-.002-.003-.003-.002-.077-.082-.003-.003-.003-.002-.078-.081-.002-.003-.003-.003-.078-.08-.003-.002-.003-.003-.079-.08-.002-.002-.003-.002-.08-.08-.002-.002-.003-.002-.08-.078-.003-.003-.003-.002-.08-.077-.003-.003-.003-.002-.082-.077-.002-.002-.003-.002-.082-.076-.003-.002-.002-.003-.083-.075-.003-.002-.002-.003-.084-.074-.002-.002-.003-.002-.084-.074-.003-.002-.002-.002-.085-.073-.002-.002-.003-.003-.085-.071-.003-.003-.002-.002-.086-.07-.003-.003-.002-.002-.086-.07-.003-.003-.003-.002-.086-.07-.003-.002-.003-.002-.087-.069-.002-.002-.003-.002-.088-.068-.002-.002-.003-.002-.088-.067-.003-.003-.003-.002-.088-.066-.003-.002-.003-.002-.089-.066-.003-.002-.003-.002-.057-.042-.14-.082-.15-.055-.16-.026-.16.004zM6.377 3.21l-.157.037-.148.066-.111.074-.007.006-.003.002-.003.002-.086.069-.003.002-.002.002-.086.07-.003.002-.002.002-.086.07-.002.003-.003.002-.085.071-.002.002-.003.003-.084.071-.003.003-.002.002-.084.072-.003.003-.002.002-.083.073-.003.003-.002.002-.083.074-.002.002-.003.003-.082.074-.003.003-.002.002-.081.076-.003.002-.003.002-.08.077-.003.002-.003.003-.08.076-.002.003-.003.002-.08.078-.002.002-.003.003-.079.078-.002.003-.003.002-.078.08-.003.002-.002.002-.078.08-.002.003-.003.002-.077.08-.003.004-.002.002-.077.081-.002.003-.003.003-.076.082-.002.002-.003.003-.075.082-.002.003-.003.003-.074.083-.003.003-.002.003-.074.084-.003.003-.002.002-.074.085-.002.003-.002.003-.073.085-.003.003-.002.003-.072.086-.002.003-.003.003-.071.087-.003.003-.002.002-.07.088-.003.003-.002.003-.07.088-.003.003-.002.003-.07.09-.002.002-.002.003-.069.09-.002.003-.003.003-.068.09-.002.003-.002.003-.067.092-.003.003-.002.003-.067.092-.002.003-.002.003-.066.092-.002.003-.002.004-.066.093-.002.003-.002.003-.065.094-.002.003-.002.004-.064.094-.002.003-.002.004-.063.095-.002.003-.002.003-.063.097-.002.003-.002.003-.046.073-.05.07-.003.002-.002.003-.067.093-.003.003-.002.003-.066.094-.002.003-.002.003-.066.094-.002.003-.002.003-.064.094-.002.004-.002.003-.064.094-.002.004-.002.003-.062.095-.002.003-.002.003-.062.096-.002.003-.002.003-.06.096-.003.003-.002.003-.06.096-.001.004-.002.003-.059.096-.002.004-.002.003-.058.097-.002.003-.001.003-.057.098-.002.003-.002.003-.056.098-.002.003-.002.003-.055.098-.002.004-.001.003-.055.098-.001.004-.002.003-.054.099-.001.003-.002.003-.052.1-.002.002-.002.004-.051.1-.002.002-.002.004-.05.1-.002.003-.002.003-.05.1v.003l-.002.004-.05.1v.003l-.002.004-.048.1-.002.004-.001.003-.047.101-.002.003-.001.004-.013.027-.052.152-.024.16.006.16.037.157.064.148.091.133.114.114.134.09.147.065.157.036.162.006.159-.024.152-.053.14-.08.122-.105.1-.126.066-.117.01-.023.044-.095.045-.095.002-.003.042-.087.048-.097.048-.095v-.001l.048-.092.001-.001.047-.09.05-.093.002-.002.049-.09.052-.092.001-.002.051-.089.001-.002.051-.087.053-.088.001-.002.055-.091.057-.091.057-.09.001-.002.057-.089.055-.083.001-.002.06-.09.06-.088.062-.089.001-.001.06-.084.063-.088.065-.089.017-.023.016-.025.06-.094.059-.09v-.002l.058-.086.057-.086.001-.001.062-.09.062-.088.001-.002.06-.085.002-.002.06-.082.063-.087.064-.084.002-.002.061-.08.065-.084.064-.08v-.001l.067-.083.067-.082.07-.083.069-.08.063-.074.074-.083.068-.077.002-.002.07-.076.07-.075.072-.077.001-.001.067-.07.076-.078.002-.002.07-.07.075-.075.002-.002.072-.07.075-.072.002-.002.073-.069.074-.068.001-.001.08-.073.076-.068.002-.002.072-.063v-.001l.078-.067.079-.068.002-.001.08-.068.002-.002.077-.063.082-.066.001-.001.075-.06.002-.002.006-.004.117-.111.094-.131.068-.146.04-.156.01-.161-.019-.16-.049-.154-.076-.141-.102-.125-.123-.105-.14-.079-.153-.052-.16-.023-.16.007zm24.596 11.088l-.156.04-.146.067-.131.094-.112.117-.087.135-.061.15-.033.157-.004.134.007.142.005.152.004.15.002.149v.153l.001.011v.015l.004.11.002.11v.002l.002.106v.321l-.003.102-.002.106-.004.107-.005.105-.006.106-.006.106-.008.106v.002l-.008.103v.002l-.01.1-.01.105-.01.105-.013.105-.012.099v.002l-.014.108-.014.1-.016.105-.016.103v.002l-.017.099-.018.104-.019.103v.002l-.019.097-.02.104-.022.103v.001l-.022.098-.023.103v.002l-.024.096-.025.103v.002l-.024.096-.027.102v.003l-.026.093v.001l-.029.103v.002l-.03.099-.028.097v.002l-.03.095-.03.096v.001l-.033.1-.031.095v.002l-.035.1v.003l-.034.094v.003l-.035.096v.001l-.034.09v.002l-.038.098-.036.093v.002l-.038.095-.079.194-.08.188-.085.189-.087.19-.09.184-.092.183-.095.184-.05.093-.064.148-.034.158-.005.16.026.16.054.151.082.14.106.12.127.1.143.075.154.046.16.017.161-.013.156-.042.144-.071.13-.096.109-.119.072-.112.053-.099.003-.005.003-.006.102-.195.003-.006.003-.006.098-.196.003-.006.003-.006.096-.197.002-.006.003-.006.093-.2.002-.006.003-.006.09-.2.002-.006.003-.007.086-.202.003-.006.002-.006.084-.203.002-.005.001-.005.04-.102.002-.003.001-.003.04-.103.001-.003.001-.003.04-.103v-.004l.001-.003.039-.103v-.003l.002-.003.037-.104.001-.003.001-.003.037-.104v-.004l.002-.003.035-.104.002-.003v-.004l.035-.104.002-.004v-.003l.034-.105.002-.003v-.003l.034-.105v-.004l.002-.003.032-.106.001-.003.001-.003.031-.106.001-.003.001-.004.031-.106.001-.003.001-.004.03-.106v-.003l.002-.004.028-.107.001-.003.001-.003.028-.107.001-.004.001-.003.027-.107.001-.004v-.003l.027-.108.001-.003v-.004l.026-.108.001-.003v-.004l.025-.108.001-.003v-.004l.025-.108v-.004l.001-.003.023-.109v-.003l.001-.004.022-.109v-.003l.002-.004.02-.109.001-.004v-.003l.02-.11.002-.003v-.004l.02-.11v-.007l.019-.11v-.003l.001-.004.017-.11v-.004l.001-.003.017-.11v-.008l.016-.11v-.004l.001-.004.015-.11v-.008l.015-.111v-.008l.013-.111v-.007l.013-.112v-.007l.011-.112v-.004l.001-.004.01-.112v-.007l.01-.112v-.008l.008-.112v-.008l.007-.113v-.007l.007-.113v-.008l.005-.113v-.007l.005-.114v-.007l.003-.114v-.007l.003-.114v-.129l.001-.114v-.13l-.003-.114v-.008l-.003-.115v-.007l-.003-.102v-.155l-.003-.158v-.01l-.004-.158v-.01l-.006-.158v-.01l-.007-.148-.023-.16-.051-.152-.08-.14-.103-.124-.125-.102-.142-.077-.153-.05-.16-.02-.161.01zm-30.213.66l-.157.034-.149.063-.134.09-.115.113-.092.132-.067.147-.037.156-.009.134.001.11V15.95l.006.22v.012l.01.22v.012l.012.22v.006l.001.006.015.22v.005l.001.006.018.22.001.006v.006l.022.219v.006l.001.006.024.219.001.006v.006l.028.218.001.006v.006l.031.218.001.006.001.006.033.218.001.006.001.005.037.218v.006l.002.005.04.217v.006l.001.006.043.216.001.006.001.006.046.216v.005l.002.006.048.215.002.006.001.006.051.214.002.006v.006l.055.214.002.005.001.006.057.213.002.006.001.005.06.213.002.005.001.006.063.212.002.005.001.006.066.21.002.006.002.006.068.21.002.005.002.005.07.21.003.005.002.005.074.208.002.006.002.005.077.207.002.006.002.005.08.206.002.005.002.006.082.204.002.006.002.005.086.204.002.005.002.006.088.202.002.005.003.006.09.2.003.006.002.005.094.2.002.006.003.005.096.199.002.005.003.005.03.062.086.137.11.118.128.097.145.07.156.043.16.013.16-.017.155-.047.143-.074.127-.1.106-.121.081-.14.055-.15.025-.16-.005-.161-.034-.158-.05-.124-.028-.055-.092-.19-.087-.188-.087-.192-.083-.19-.08-.193-.078-.194-.076-.196-.073-.195-.07-.197-.067-.198-.065-.199-.063-.2-.059-.2-.056-.2-.055-.204-.05-.201-.049-.202-.046-.205-.043-.206-.04-.203-.038-.207-.034-.204-.032-.207-.028-.205-.026-.207-.023-.208-.02-.207-.018-.207-.014-.208-.011-.207-.009-.208-.005-.207-.002-.104-.017-.16-.046-.155-.074-.143-.1-.126-.121-.107-.139-.081-.152-.055-.159-.025-.161.004zm24.585 11.83l-.156.039-.146.068-.11.076-.015.012-.163.129-.166.127-.168.125-.17.124-.17.12-.172.118-.173.115-.176.114-.177.111-.18.11-.178.105-.182.104-.182.101-.184.1-.184.095-.189.095-.186.09-.188.089-.19.086-.19.082-.193.081-.195.078-.191.074-.197.073-.195.07-.196.065-.198.064-.198.061-.2.058-.2.055-.2.052-.2.049-.151.035-.153.05-.141.078-.125.103-.103.124-.078.14-.05.154-.022.16.009.16.038.157.067.147.093.132.116.112.134.089.149.062.158.034.16.003.133-.02.158-.035.006-.002.006-.001.213-.052.006-.002.007-.001.212-.056.006-.001.006-.002.212-.058.006-.002.006-.002.211-.061.006-.002.006-.002.21-.064.006-.002.006-.002.21-.067.005-.002.006-.002.208-.07.006-.002.006-.003.207-.073.006-.002.006-.002.206-.077.006-.002.005-.002.206-.08.005-.001.006-.003.204-.082.006-.002.005-.002.203-.085.006-.003.005-.002.202-.088.006-.002.005-.003.2-.09.006-.003.006-.003.2-.093.005-.003.005-.002.198-.096.006-.003.005-.003.197-.099.005-.002.005-.003.196-.102.005-.002.005-.003.195-.105.005-.002.005-.003.193-.107.005-.003.005-.003.191-.11.005-.003.005-.003.19-.112.005-.003.005-.003.189-.115.005-.003.005-.003.187-.117.005-.003.004-.004.186-.12.005-.003.004-.003.184-.122.005-.003.005-.004.182-.125.004-.003.005-.003.18-.128.005-.003.005-.003.179-.13.004-.003.005-.004.177-.132.004-.004.005-.003.175-.135.005-.003.004-.004.173-.137.005-.003.004-.004.019-.015.115-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.052-.153-.079-.14-.103-.124-.125-.102-.142-.078-.153-.05-.16-.02-.16.01zm-19.17.054l-.153.051-.14.079-.124.103-.103.125-.077.141-.05.153-.02.16.009.161.04.156.067.147.093.131.095.094.047.04.005.004.005.004.17.14.005.004.005.004.172.137.004.004.005.003.086.067.003.002.003.002.087.067.003.002.003.002.088.066.002.003.003.002.089.065.002.002.003.002.09.065.002.002.003.002.09.064.002.002.003.002.09.063.003.002.003.002.09.063.003.002.003.002.092.062.002.002.003.002.092.061.003.002.003.002.092.06.003.003.003.001.093.06.003.002.003.002.093.06.003.001.003.002.094.058.003.002.003.002.095.058.003.001.003.002.095.057.003.002.003.002.095.056.003.002.003.002.096.055.004.002.003.001.096.055.003.002.003.002.098.053.003.002.003.002.097.053.004.002.003.001.098.053.003.001.003.002.099.052.003.001.003.002.1.05.003.002.003.002.1.05.003.002.003.001.1.05h.003l.004.003.1.048.004.001.003.002.101.048.003.001.004.002.101.046.004.002.003.001.102.046.004.002.003.001.103.045.003.002.003.001.103.045.004.001.003.002.104.043.003.001.004.002.104.042.003.002.004.001.104.042.004.001.003.002.105.04.004.002.003.001.106.04.003.002h.004l.106.04.004.001.003.002.107.038.003.001.004.001.107.038.003.001.004.001.107.037.004.001.004.001.108.036.003.001.004.001.108.035.004.001.003.001.11.034.003.001.004.001.109.033.004.002h.003l.11.033h.004l.003.002.11.031.004.001.004.001.084.023.081.028.004.001.003.001.109.037.003.001.004.001.109.036.003.001.004.001.109.035h.003l.004.002.11.033.003.001.003.001.11.033.003.001.004.001.109.031.004.002h.003l.11.031.003.001.004.001.11.03h.003l.003.001.11.029h.004l.003.002.11.027.003.001.004.001.11.027h.003l.004.001.004.001.16.022.16-.008.157-.038.147-.067.132-.092.112-.116.09-.134.062-.149.034-.157.004-.161-.025-.16-.055-.151-.082-.139-.107-.12-.127-.1-.143-.074-.124-.04h-.003l-.104-.025-.103-.026h-.002l-.095-.026h-.001l-.101-.027h-.002l-.1-.028h-.002l-.103-.03-.104-.032-.097-.03h-.002l-.103-.033-.102-.033-.101-.034-.106-.036-.027-.01-.027-.007-.107-.03-.104-.029-.104-.03h-.002l-.097-.03-.102-.032-.102-.032-.102-.034-.103-.035-.096-.034-.1-.036-.101-.037h-.002l-.094-.036-.096-.037-.097-.04h-.002l-.099-.04-.098-.042h-.002l-.092-.04-.097-.043-.095-.043-.097-.044h-.002l-.09-.043-.094-.045-.094-.046-.093-.047-.09-.046-.096-.05-.088-.047-.002-.001-.09-.049-.094-.052-.002-.002-.087-.049-.087-.05h-.002l-.088-.053h-.001l-.09-.055-.086-.052-.002-.001-.089-.055-.084-.054h-.002l-.09-.059h-.001l-.085-.056-.001-.001-.084-.056-.082-.056h-.001l-.086-.06-.082-.058H7.79l-.086-.062-.002-.002-.08-.058-.081-.06h-.001l-.085-.064-.002-.002-.076-.058-.002-.002-.082-.064-.161-.128-.162-.133-.04-.034-.132-.092-.147-.066-.157-.038-.16-.008-.16.022z",
+ opacity: ".98"
+})));
+
+function _extends$d() { _extends$d = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$d.apply(this, arguments); }
+var StartEventNonInterruptingSignalIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$d({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M16.007 8.82L9.21 21.022h13.596L16.007 8.82zm0 1.775l5.328 9.563H10.68l5.327-9.563zM16.14.386c-1.571.236-4.195-.284-4.9 1.381.619 1.703 2.745.069 4.085.365 1.421-.13 2.84.2 4.235.259C21.27.784 18.19.344 17 .413a20.456 20.456 0 00-.86-.027zM25 3.162c-2.19.694.401 2.26 1.181 3.094 1.083 1.152 1.954 2.484 2.715 3.864 1.48 1.005 1.845-1.26.81-2.03-1.158-1.897-2.613-3.704-4.513-4.89l-.192-.038zm-18.438.423c-1.793.712-2.909 2.548-4.01 4.061-.773.814-2.211 3.653.005 3.211 1.123-1.469 1.87-3.306 3.267-4.614.664-.7 2.73-2.013.738-2.658zm24.57 11.072c-1.659.435-.468 2.667-.99 3.895a13.427 13.427 0 01-1.497 4.435c-.23 1.659 1.991 1.165 2.018-.199a14.277 14.277 0 001.254-7.552.865.865 0 00-.785-.579zm-30.18.666c-1.677.386-.633 2.667-.608 3.876.371 1.623.792 3.35 1.79 4.696 2.382.321.571-2.338.292-3.492a15.92 15.92 0 01-.684-4.39.877.877 0 00-.79-.69zm24.558 11.81c-1.755.865-3.303 2.266-5.274 2.765-1.162-.016-3.074 1.271-1.331 2.102 2.66-.447 5.163-1.733 7.236-3.445.472-.506.06-1.432-.631-1.421zm-19.151.043c-2.004.786.416 2.405 1.43 2.913 1.608.904 3.379 1.636 5.208 1.877 1.77-.804-.228-2.094-1.357-2.073-1.75-.537-3.403-1.396-4.798-2.586l-.227-.104-.256-.027z"
+})));
+
+function _extends$c() { _extends$c = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$c.apply(this, arguments); }
+var StartEventNonInterruptingTimerIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$c({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.991 8.7c-3.018-.042-5.92 1.925-7.03 4.725-1.138 2.695-.509 6.011 1.537 8.102 1.99 2.142 5.267 2.93 8.013 1.927 2.877-.98 4.99-3.826 5.067-6.87.153-2.956-1.624-5.88-4.299-7.135a7.551 7.551 0 00-3.288-.75zm0 1.383c2.758-.052 5.372 1.972 6.014 4.654.704 2.578-.482 5.516-2.79 6.867-2.358 1.48-5.682 1.085-7.617-.919-2.043-1.97-2.407-5.38-.84-7.743 1.11-1.764 3.149-2.88 5.233-2.86zm1.962 1.764l-2.074 3.762c-.64.068-.793 1.04-.202 1.3.39.27.696-.18 1.052-.165h3.17v-.865h-3.182l1.993-3.614-.757-.418zM16.12.358h-.232l-.22.004h-.012l-.221.006h-.012l-.22.01h-.012l-.22.013h-.012l-.22.016h-.012l-.22.019h-.005l-.006.001-.22.021h-.006l-.005.001-.22.025h-.011l-.22.028h-.005l-.006.002-.219.03h-.005l-.006.001-.218.033-.006.001-.006.001-.217.036-.006.001-.006.001-.217.039-.006.001-.006.001-.216.042-.006.001-.006.001-.215.045-.006.001-.006.002-.215.047-.006.002-.006.001-.214.05-.006.002-.006.002-.115.029-.152.053-.14.081-.122.106-.1.126-.075.143-.047.154-.018.16.012.16.042.156.07.145.095.13.118.11.137.086.15.059.158.03h.161l.132-.022.11-.028.202-.047.203-.046.208-.043.202-.039.206-.037.206-.034.205-.03.208-.03.205-.025.209-.023.208-.02.21-.017.209-.015.207-.011.21-.009.21-.006.207-.003h.21l.21.002.207.005.207.008.212.011.207.014.208.017.209.019.208.022.205.025.206.028.207.03.208.035.205.036.202.039.052.01.16.018.16-.012.156-.042.146-.07.13-.096.109-.119.085-.136.06-.15.03-.159v-.16l-.03-.16-.059-.15-.086-.136L19.823.9l-.13-.096-.145-.07-.128-.038-.057-.011-.006-.002h-.006L19.135.64l-.006-.001-.006-.001-.217-.039H18.9l-.006-.002-.217-.035-.006-.001-.006-.001-.218-.032-.006-.001-.006-.001-.218-.03h-.006l-.006-.001-.219-.027h-.011l-.22-.024-.005-.001h-.006l-.22-.021h-.006L17.512.42l-.22-.017-.005-.001h-.006l-.22-.015h-.012l-.22-.012h-.012l-.22-.01h-.012l-.22-.005h-.012l-.221-.003h-.012zm8.715 2.783l-.157.034-.149.063-.134.089-.116.112-.092.132-.067.147-.038.157-.008.16.021.16.051.153.079.141.103.124.102.087.052.038h.001l.087.064v.001l.082.061.002.001.076.059h.001l.084.065.082.066.002.001.079.063.002.002.077.063.081.067.002.002.077.065.076.065.001.002.08.07.078.07h.002l.075.068.077.072.002.001.073.069.077.073.072.07.002.001.077.076.07.07v.001l.075.076.07.073.002.001.074.079.002.002.069.074.069.075.074.082.07.08.002.001.068.079h.001l.067.079.068.082.065.078.001.002.068.083.067.084.063.081.001.002.067.087.002.002.063.084.001.001.064.087.008.01.008.01.095.12.093.121.09.119.087.119.088.122.086.123.084.12.081.122.001.002.084.126.08.126.08.127.077.126.079.131.074.127.075.131.073.131.07.13.07.133.069.133.045.09.086.137.109.119.13.096.144.07.156.042.16.013.16-.017.155-.047.143-.075.126-.1.106-.121.082-.14.054-.151.025-.16-.005-.16-.035-.158-.05-.124-.048-.095-.002-.004-.002-.004-.073-.14-.002-.005-.002-.004-.074-.14-.002-.004-.002-.004-.076-.14-.002-.003-.002-.004-.077-.139-.003-.004-.002-.004-.078-.138-.003-.004-.002-.003-.08-.137-.002-.004-.003-.004-.081-.136-.002-.004-.003-.004-.083-.136-.002-.003-.002-.004-.085-.135-.002-.004-.003-.003-.085-.134-.003-.004-.002-.004-.087-.132-.003-.004-.003-.004-.088-.132-.003-.003-.002-.004-.09-.13-.003-.005-.003-.003-.091-.13-.003-.004-.002-.004-.093-.129-.003-.003-.003-.004-.094-.128-.003-.004-.003-.003-.095-.127-.003-.004-.003-.004-.097-.125-.003-.004-.003-.004-.09-.114-.06-.082-.003-.003-.002-.003-.069-.091-.002-.004-.002-.003-.07-.09-.003-.003-.002-.003-.07-.09-.003-.003-.002-.003-.071-.09-.002-.003-.003-.002-.072-.089-.002-.003-.002-.003-.073-.088-.002-.003-.002-.002-.074-.087-.002-.003-.002-.003-.074-.086-.003-.003-.002-.003-.074-.086-.003-.002-.002-.003-.075-.085-.003-.003-.002-.002-.076-.084-.002-.003-.003-.003-.076-.083-.002-.003-.003-.003-.077-.082-.002-.003-.003-.002-.077-.082-.003-.003-.003-.002-.078-.081-.002-.003-.003-.003-.078-.08-.003-.002-.003-.003-.079-.08-.002-.002-.003-.002-.08-.08-.002-.002-.003-.002-.08-.078-.003-.003-.003-.002-.08-.077-.003-.003-.003-.002-.082-.077-.002-.002-.003-.002-.082-.076-.003-.002-.002-.003-.083-.075-.003-.002-.002-.003-.084-.074-.002-.002-.003-.002-.084-.074-.003-.002-.002-.002-.085-.073-.002-.002-.003-.003-.085-.071-.003-.003-.002-.002-.086-.07-.003-.003-.002-.002-.086-.07-.003-.003-.003-.002-.086-.07-.003-.002-.003-.002-.087-.069-.002-.002-.003-.002-.088-.068-.002-.002-.003-.002-.088-.067-.003-.003-.003-.002-.088-.066-.003-.002-.003-.002-.089-.066-.003-.002-.003-.002-.057-.042-.14-.082-.15-.055-.16-.026-.16.004zm-18.458.426l-.157.037-.148.066-.111.074-.007.006-.003.002-.003.002-.086.069-.003.002-.002.002-.086.07-.003.002-.002.002-.086.07-.002.003-.003.002-.085.071-.002.002-.003.003-.084.071-.003.003-.002.002-.084.072-.003.003-.002.002-.083.073-.003.003-.002.002-.083.074-.002.002-.003.003-.082.074-.003.003-.002.002-.081.076-.003.002-.003.002-.08.077-.003.002-.003.003-.08.076-.002.003-.003.002-.08.078-.002.002-.003.003-.079.078-.002.003-.003.002-.078.08-.003.002-.002.002-.078.08-.002.003-.003.002-.077.08-.003.004-.002.002-.077.081-.002.003-.003.003-.076.082-.002.002-.003.003-.075.082-.002.003-.003.003-.074.083-.003.003-.002.003-.074.084-.003.003-.002.002-.074.085-.002.003-.002.003-.073.085-.003.003-.002.003-.072.086-.002.003-.003.003-.071.087-.003.003-.002.002-.07.088-.003.003-.002.003-.07.088-.003.003-.002.003-.07.09-.002.002-.002.003-.069.09-.002.003-.003.003-.068.09-.002.003-.002.003-.067.092-.003.003-.002.003-.067.092-.002.003-.002.003-.066.092-.002.003-.002.004-.066.093-.002.003-.002.003-.065.094-.002.003-.002.004-.064.094-.002.003-.002.004-.063.095-.002.003-.002.003-.063.097-.002.003-.002.003-.046.073-.05.07-.003.002-.002.003-.067.093-.003.003-.002.003-.066.094-.002.003-.002.003-.066.094-.002.003-.002.003-.064.094-.002.004-.002.003-.064.094-.002.004-.002.003-.062.095-.002.003-.002.003-.062.096-.002.003-.002.003-.06.096-.003.003-.002.003-.06.096-.001.004-.002.003-.059.096-.002.004-.002.003-.058.097-.002.003-.001.003-.057.098-.002.003-.002.003-.056.098-.002.003-.002.003-.055.098-.002.004-.001.003-.055.098-.001.004-.002.003-.054.099-.001.003-.002.003-.052.1-.002.002-.002.004-.051.1-.002.002-.002.004-.05.1-.002.003-.002.003-.05.1v.003l-.002.004-.05.1V9.5l-.002.004-.048.1-.002.004-.001.003-.047.101-.002.003-.001.004-.013.027-.052.152-.024.16.006.16.037.157.064.148.091.133.114.114.134.09.147.065.157.036.162.006.159-.024.152-.053.14-.08.122-.105.1-.126.066-.117.01-.023.044-.095.045-.095.002-.003.042-.087.048-.097.048-.095v-.001l.048-.092.001-.001.047-.09.05-.093.002-.002.049-.09.052-.092.001-.002.051-.089.001-.002.051-.087.053-.088.001-.002.055-.091.057-.091.057-.09.001-.002.057-.089.055-.083.001-.002.06-.09.06-.088.062-.089.001-.001.06-.084.063-.088.065-.089.017-.023.016-.025.06-.094.059-.09v-.002l.058-.086.057-.086.001-.001.062-.09.062-.088.001-.002.06-.085.002-.002.06-.082.063-.087.064-.084.002-.002.061-.08.065-.084.064-.08v-.001l.067-.083.067-.082.07-.083.069-.08.063-.074.074-.083.068-.077.002-.002.07-.076.07-.075.072-.077.001-.001.067-.07.076-.078.002-.002.07-.07.075-.075.002-.002.072-.07.075-.072.002-.002.073-.069.074-.068.001-.001.08-.073.076-.068.002-.002.072-.063v-.001l.078-.067.079-.068.002-.001.08-.068.002-.002.077-.063.082-.066.001-.001.075-.06.002-.002.006-.004.117-.111.094-.131.068-.146.04-.156.01-.161-.019-.16-.049-.154-.076-.141-.102-.125-.123-.105-.14-.079-.153-.052-.16-.023-.16.007zm24.596 11.088l-.156.04-.146.067-.131.094-.112.117-.087.135-.061.15-.033.157-.004.134.007.142.005.152.004.15.002.149v.153l.001.011v.015l.004.11.002.11v.002l.002.106v.321l-.003.102-.002.106-.004.107-.005.105-.006.106-.006.106-.008.106v.002l-.008.103v.002l-.01.1-.01.105-.01.105-.013.105-.012.099v.002l-.014.108-.014.1-.016.105-.016.103v.002l-.017.099-.018.104-.019.103v.002l-.019.097-.02.104-.022.103v.001l-.022.098-.023.103v.002l-.024.096-.025.103v.002l-.024.096-.027.102v.003l-.026.093v.001l-.029.103v.002l-.03.099-.028.097v.002l-.03.095-.03.096v.001l-.033.1-.031.095v.002l-.035.1v.003l-.034.094v.003l-.035.096v.001l-.034.09v.002l-.038.098-.036.093v.002l-.038.095-.079.194-.08.188-.085.189-.087.19-.09.184-.092.183-.095.184-.05.093-.064.148-.034.158-.005.16.026.16.054.151.082.14.106.12.127.1.143.075.154.046.16.017.161-.013.156-.042.144-.071.13-.096.109-.119.072-.112.053-.099.003-.005.003-.006.102-.195.003-.006.003-.006.098-.196.003-.006.003-.006.096-.197.002-.006.003-.006.093-.2.002-.006.003-.006.09-.2.002-.006.003-.007.086-.202.003-.006.002-.006.084-.203.002-.005.001-.005.04-.102.002-.003.001-.003.04-.103.001-.003.001-.003.04-.103v-.004l.001-.003.039-.103v-.003l.002-.003.037-.104.001-.003.001-.003.037-.104v-.004l.002-.003.035-.104.002-.003v-.004l.035-.104.002-.004v-.003l.034-.105.002-.003v-.003l.034-.105v-.004l.002-.003.032-.106.001-.003.001-.003.031-.106.001-.003.001-.004.031-.106.001-.003.001-.004.03-.106v-.003l.002-.004.028-.107.001-.003.001-.003.028-.107.001-.004.001-.003.027-.107.001-.004v-.003l.027-.108.001-.003v-.004l.026-.108.001-.003v-.004l.025-.108.001-.003v-.004l.025-.108v-.004l.001-.003.023-.109v-.003l.001-.004.022-.109v-.003l.002-.004.02-.109.001-.004v-.003l.02-.11.002-.003v-.004l.02-.11v-.007l.019-.11v-.003l.001-.004.017-.11v-.004l.001-.003.017-.11v-.008l.016-.11v-.004l.001-.004.015-.11v-.008l.015-.111v-.008l.013-.111v-.007l.013-.112v-.007l.011-.112v-.004l.001-.004.01-.112v-.007l.01-.112v-.008l.008-.112v-.008l.007-.113v-.007l.007-.113v-.008l.005-.113v-.007l.005-.114v-.007l.003-.114v-.007l.003-.114v-.129l.001-.114v-.13l-.003-.114V16.5l-.003-.115v-.007l-.003-.102v-.155l-.003-.158v-.01l-.004-.158v-.01l-.006-.158v-.01l-.007-.148-.023-.16-.051-.152-.08-.14-.103-.124-.125-.102-.142-.077-.153-.05-.16-.02-.161.01zm-30.213.66l-.157.034-.149.063-.134.09-.115.113-.092.132-.067.147-.037.156-.009.134.001.11V16.308l.006.22v.012l.01.22v.012l.012.22v.006l.001.006.015.22v.005l.001.006.018.22.001.006v.006l.022.219v.006l.001.006.024.219.001.006v.006l.028.218.001.006v.006l.031.218.001.006.001.006.033.218.001.006.001.005.037.218v.006l.002.005.04.217v.006l.001.006.043.216.001.006.001.006.046.216v.005l.002.006.048.215.002.006.001.006.051.214.002.006v.006l.055.214.002.005.001.006.057.213.002.006.001.005.06.213.002.005.001.006.063.212.002.005.001.006.066.21.002.006.002.006.068.21.002.005.002.005.07.21.003.005.002.005.074.208.002.006.002.005.077.207.002.006.002.005.08.206.002.005.002.006.082.204.002.006.002.005.086.204.002.005.002.006.088.202.002.005.003.006.09.2.003.006.002.005.094.2.002.006.003.005.096.199.002.005.003.005.03.062.086.137.11.118.128.097.145.07.156.043.16.013.16-.017.155-.047.143-.074.127-.1.106-.121.081-.14.055-.15.025-.16-.005-.161-.034-.158-.05-.124-.028-.055-.092-.19-.087-.188-.087-.192-.083-.19-.08-.193-.078-.194-.076-.196-.073-.195-.07-.197-.067-.198-.065-.199-.063-.2-.059-.2-.056-.2-.055-.204-.05-.201-.049-.202-.046-.205-.043-.206-.04-.203-.038-.207-.034-.204-.032-.207-.028-.205-.026-.207-.023-.208-.02-.207-.018-.207-.014-.208-.011-.207-.009-.208-.005-.207-.002-.104-.017-.16-.046-.155-.074-.143-.1-.126-.121-.107-.139-.081-.152-.055-.159-.025-.161.004zm24.585 11.83l-.156.039-.146.068-.11.076-.015.012-.163.129-.166.127-.168.125-.17.124-.17.12-.172.118-.173.115-.176.114-.177.111-.18.11-.178.105-.182.104-.182.101-.184.1-.184.095-.189.095-.186.09-.188.089-.19.086-.19.082-.193.081-.195.078-.191.074-.197.073-.195.07-.196.065-.198.064-.198.061-.2.058-.2.055-.2.052-.2.049-.151.035-.153.05-.141.078-.125.103-.103.124-.078.14-.05.154-.022.16.009.16.038.157.067.147.093.132.116.112.134.089.149.062.158.034.16.003.133-.02.158-.035.006-.002.006-.001.213-.052.006-.002.007-.001.212-.056.006-.001.006-.002.212-.058.006-.002.006-.002.211-.061.006-.002.006-.002.21-.064.006-.002.006-.002.21-.067.005-.002.006-.002.208-.07.006-.002.006-.003.207-.073.006-.002.006-.002.206-.077.006-.002.005-.002.206-.08.005-.001.006-.003.204-.082.006-.002.005-.002.203-.085.006-.003.005-.002.202-.088.006-.002.005-.003.2-.09.006-.003.006-.003.2-.093.005-.003.005-.002.198-.096.006-.003.005-.003.197-.099.005-.002.005-.003.196-.102.005-.002.005-.003.195-.105.005-.002.005-.003.193-.107.005-.003.005-.003.191-.11.005-.003.005-.003.19-.112.005-.003.005-.003.189-.115.005-.003.005-.003.187-.117.005-.003.004-.004.186-.12.005-.003.004-.003.184-.122.005-.003.005-.004.182-.125.004-.003.005-.003.18-.128.005-.003.005-.003.179-.13.004-.003.005-.004.177-.132.004-.004.005-.003.175-.135.005-.003.004-.004.173-.137.005-.003.004-.004.019-.015.115-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.052-.153-.079-.14-.103-.124-.125-.102-.142-.078-.153-.05-.16-.02-.16.01zm-19.17.054l-.153.051-.14.079-.124.103-.103.125-.077.141-.05.153-.02.16.009.161.04.156.067.147.093.131.095.094.047.04.005.004.005.004.17.14.005.004.005.004.172.137.004.004.005.003.086.067.003.002.003.002.087.067.003.002.003.002.088.066.002.003.003.002.089.065.002.002.003.002.09.065.002.002.003.002.09.064.002.002.003.002.09.063.003.002.003.002.09.063.003.002.003.002.092.062.002.002.003.002.092.061.003.002.003.002.092.06.003.003.003.001.093.06.003.002.003.002.093.06.003.001.003.002.094.058.003.002.003.002.095.058.003.001.003.002.095.057.003.002.003.002.095.056.003.002.003.002.096.055.004.002.003.001.096.055.003.002.003.002.098.053.003.002.003.002.097.053.004.002.003.001.098.053.003.001.003.002.099.052.003.001.003.002.1.05.003.002.003.002.1.05.003.002.003.001.1.05h.003l.004.003.1.048.004.001.003.002.101.048.003.001.004.002.101.046.004.002.003.001.102.046.004.002.003.001.103.045.003.002.003.001.103.045.004.001.003.002.104.043.003.001.004.002.104.042.003.002.004.001.104.042.004.001.003.002.105.04.004.002.003.001.106.04.003.002h.004l.106.04.004.001.003.002.107.038.003.001.004.001.107.038.003.001.004.001.107.037.004.001.004.001.108.036.003.001.004.001.108.035.004.001.003.001.11.034.003.001.004.001.109.033.004.002h.003l.11.033h.004l.003.002.11.031.004.001.004.001.084.023.081.028.004.001.003.001.109.037.003.001.004.001.109.036.003.001.004.001.109.035h.003l.004.002.11.033.003.001.003.001.11.033.003.001.004.001.109.031.004.002h.003l.11.031.003.001.004.001.11.03h.003l.003.001.11.029h.004l.003.002.11.027.003.001.004.001.11.027h.003l.004.001.004.001.16.022.16-.008.157-.038.147-.067.132-.092.112-.116.09-.134.062-.149.034-.157.004-.161-.025-.16-.055-.151-.082-.139-.107-.12-.127-.1-.143-.074-.124-.04h-.003l-.104-.025-.103-.026h-.002l-.095-.026h-.001l-.101-.027h-.002l-.1-.028h-.002l-.103-.03-.104-.032-.097-.03h-.002l-.103-.033-.102-.033-.101-.034-.106-.036-.027-.01-.027-.007-.107-.03-.104-.029-.104-.03h-.002l-.097-.03-.102-.032-.102-.032-.102-.034-.103-.035-.096-.034-.1-.036-.101-.037h-.002l-.094-.036-.096-.037-.097-.04h-.002l-.099-.04-.098-.042h-.002l-.092-.04-.097-.043-.095-.043-.097-.044h-.002l-.09-.043-.094-.045-.094-.046-.093-.047-.09-.046-.096-.05-.088-.047-.002-.001-.09-.049-.094-.052-.002-.002-.087-.049-.087-.05h-.002l-.088-.053h-.001l-.09-.055-.086-.052-.002-.001-.089-.055-.084-.054h-.002l-.09-.059h-.001l-.085-.056-.001-.001-.084-.056-.082-.056h-.001l-.086-.06-.082-.058H7.79l-.086-.062-.002-.002-.08-.058-.081-.06h-.001l-.085-.064-.002-.002-.076-.058-.002-.002-.082-.064-.161-.128-.162-.133-.04-.034-.132-.092-.147-.066-.157-.038-.16-.008-.16.022z"
+})));
+
+function _extends$b() { _extends$b = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$b.apply(this, arguments); }
+var StartEventNoneIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$b({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.847.004C9.61-.016 3.624 4.014 1.257 9.78-1.235 15.49.06 22.581 4.42 27.034c4.193 4.513 11.101 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.268.403-6.228-3.26-12.441-8.87-15.154A15.924 15.924 0 0015.846.004zm.439 1.729c6.105.033 11.856 4.45 13.435 10.359 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.625-4.814-3.84-6.538-10.94-4.067-16.57 2.14-5.206 7.515-8.775 13.147-8.71.097-.001.194-.002.29-.001z"
+})));
+
+function _extends$a() { _extends$a = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
+var StartEventParallelMultipleIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$a({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.847 0C9.61-.02 3.624 4.01 1.257 9.775-1.235 15.485.06 22.577 4.42 27.03c4.193 4.513 11.101 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.268.403-6.228-3.26-12.441-8.87-15.154A15.924 15.924 0 0015.846 0zm.439 1.729c6.105.033 11.856 4.45 13.435 10.359 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.625C2.101 23.17.377 16.07 2.848 10.44c2.134-5.2 7.522-8.78 13.147-8.71.097-.001.194-.002.29-.001zM13.504 9.08v4.427H9.077v4.98h4.427v4.427h4.98v-4.427h4.428v-4.98h-4.427V9.08h-4.98zm.83.83h3.32v4.427h4.428v3.32h-4.427v4.427h-3.32v-4.453H9.906v-3.294h4.427V9.91z"
+})));
+
+function _extends$9() { _extends$9 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
+var StartEventSignalIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$9({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M15.995.005C9.705-.08 3.643 3.968 1.257 9.78-1.235 15.49.06 22.581 4.42 27.034c4.193 4.513 11.102 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.269.403-6.227-3.26-12.44-8.87-15.153A15.924 15.924 0 0015.994.005zm0 1.73c6.213-.108 12.122 4.355 13.726 10.357 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.626-4.814-3.838-6.538-10.939-4.067-16.57 2.14-5.205 7.515-8.774 13.147-8.708zm0 6.776L9.19 20.724H22.8L15.995 8.511zm0 1.777l5.332 9.572H10.662l5.333-9.572z"
+})));
+
+function _extends$8() { _extends$8 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$8.apply(this, arguments); }
+var StartEventTimerIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$8({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M16 0C7.174 0 0 7.174 0 16s7.174 16 16 16 16-7.174 16-16S24.826 0 16 0zm0 1.73c7.892 0 14.27 6.378 14.27 14.27 0 7.891-6.379 14.27-14.27 14.27S1.73 23.891 1.73 16C1.73 8.108 8.108 1.73 16 1.73zm-.143 6.676c-2.967.02-5.797 1.97-6.89 4.727-1.138 2.695-.51 6.012 1.537 8.102 1.99 2.142 5.268 2.932 8.014 1.928 2.878-.98 4.992-3.827 5.068-6.87.153-2.957-1.624-5.881-4.3-7.137a7.552 7.552 0 00-3.43-.75zm.27 1.383c2.71.012 5.254 2.015 5.886 4.656.704 2.577-.482 5.517-2.791 6.867-2.358 1.48-5.682 1.085-7.618-.918-2.043-1.971-2.407-5.381-.84-7.745 1.11-1.763 3.15-2.88 5.234-2.86h.13zm1.833 1.765l-2.074 3.763c-.64.068-.793 1.04-.202 1.3.39.27.696-.18 1.052-.165h3.17v-.865h-3.181l1.992-3.615-.757-.418z"
+})));
+
+function _extends$7() { _extends$7 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$7.apply(this, arguments); }
+var SubprocessCollapsedIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$7({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M5.637 3A5.644 5.644 0 000 8.637v15.417a5.644 5.644 0 005.637 5.637h20.726A5.644 5.644 0 0032 24.054V8.637A5.644 5.644 0 0026.363 3H5.637zm0 1.778h20.726a3.83 3.83 0 013.859 3.859v15.417a3.83 3.83 0 01-3.859 3.858h-4.201V16.695H9.838v11.217H5.637a3.83 3.83 0 01-3.859-3.858V8.637a3.83 3.83 0 013.859-3.859zm5.33 13.046h10.066v10.065H10.967V17.824zm4.189 1.431V22.06H12.35v1.689h2.804V26.554h1.69V23.749h2.804V22.06h-2.804V19.255h-1.69z"
+})));
+
+function _extends$6() { _extends$6 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$6.apply(this, arguments); }
+var SubprocessExpandedIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$6({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M5.636 3A5.642 5.642 0 000 8.636v15.418a5.643 5.643 0 005.636 5.636h20.728A5.643 5.643 0 0032 24.054V8.636A5.642 5.642 0 0026.364 3H5.636zm0 1.778h20.728a3.83 3.83 0 013.858 3.858v15.418a3.83 3.83 0 01-3.858 3.858h-4.203V16.723H9.84v11.189H5.636a3.83 3.83 0 01-3.858-3.858V8.636a3.83 3.83 0 013.858-3.858zm5.331 13.074h10.066v10.06H10.967v-10.06zm1.336 3.996v1.711h7.394v-1.71h-7.394z"
+})));
+
+function _extends$5() { _extends$5 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$5.apply(this, arguments); }
+var TaskNoneIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$5({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M6.494 2.667C2.916 2.667 0 5.57 0 9.142v13.383C0 26.097 2.916 29 6.494 29h19.012C29.084 29 32 26.097 32 22.525V9.142c0-3.572-2.916-6.475-6.494-6.475H6.494zm0 2h19.012c2.509 0 4.494 1.98 4.494 4.475v13.383C30 25.02 28.015 27 25.506 27H6.494C3.985 27 2 25.02 2 22.525V9.142c0-2.495 1.985-4.475 4.494-4.475z"
+})));
+
+function _extends$4() { _extends$4 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
+var TextAnnotationicon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$4({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M22.087 0v31.647H32v-1.788h-8.125V1.788H32V0h-9.913zm-2.924 13.999l-2.737 2.167 2.167 2.738 2.738-2.167-2.168-2.738zm-5.475 4.335L10.95 20.5l2.168 2.738 2.737-2.168-2.167-2.737zm-5.475 4.335l-2.738 2.167 2.168 2.738 2.737-2.168-2.167-2.737zm-5.476 4.335L0 29.17l2.167 2.738 2.738-2.168-2.168-2.737z"
+})));
+
+function _extends$3() { _extends$3 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
+var TransactionIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$3({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ d: "M5.422 3A5.424 5.424 0 000 8.422v15.822a5.424 5.424 0 005.422 5.423h21.156A5.424 5.424 0 0032 24.244V8.422A5.424 5.424 0 0026.578 3H5.422zm0 1.244h21.156a4.155 4.155 0 014.178 4.178v15.822a4.155 4.155 0 01-4.178 4.178H5.422a4.155 4.155 0 01-4.178-4.178V8.422a4.155 4.155 0 014.178-4.178zm1.056 1.778a3.373 3.373 0 00-3.367 3.366v13.89a3.373 3.373 0 003.367 3.366h19.044a3.373 3.373 0 003.367-3.366V9.388a3.373 3.373 0 00-3.367-3.366H6.478zm0 1.245h19.044c1.187 0 2.122.935 2.122 2.121v13.89a2.104 2.104 0 01-2.122 2.122H6.478a2.104 2.104 0 01-2.122-2.122V9.388c0-1.186.935-2.121 2.122-2.121z"
+})));
+
+function _extends$2() { _extends$2 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
+var UserTaskIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$2({
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "32",
+ height: "32"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ fillRule: "evenodd",
+ d: "M10.263 7.468c-1.698 0-2.912 1.305-2.915 2.791v.001c0 .45.121.924.311 1.352.138.309.308.593.516.82-1.235.423-2.683 1.119-3.414 2.49l-.04.075v4.44h11.083v-4.44l-.04-.074c-.72-1.352-2.136-2.047-3.36-2.471.597-.608.774-1.392.774-2.192-.004-1.487-1.218-2.792-2.915-2.792zm-1.16 1.583c.08 0 .165.003.26.008.757.045 1.012.181 1.207.31.196.13.334.252.851.268.404-.016.598-.087.737-.169.056-.033.103-.067.152-.1.128.275.197.578.198.893 0 .894-.154 1.52-.975 2.034l.08.604c.171.052.348.11.527.171.025.105.054.242.073.387.02.153.029.311.016.43a.422.422 0 01-.056.19c-.417.417-1.157.66-1.908.66-.75 0-1.49-.243-1.908-.66a.422.422 0 01-.056-.19 1.949 1.949 0 01.016-.43c.02-.146.049-.284.074-.388.177-.062.352-.118.521-.17l.048-.648a.616.616 0 00-.126-.118c-.183-.138-.405-.44-.562-.793-.157-.353-.254-.757-.254-1.08 0-.387.105-.758.297-1.079l.11-.04c.143-.046.339-.09.679-.09zm-1.448 4.304l-.002.014c-.025.185-.04.387-.018.589.021.202.074.42.248.593.595.594 1.494.857 2.382.857.889 0 1.788-.263 2.382-.857.174-.174.227-.391.249-.593a2.496 2.496 0 00-.018-.59l-.002-.01c.903.396 1.776.963 2.258 1.81v3.599H13.53v-2.538h-.67v2.538H7.651v-2.538h-.67v2.538H5.39v-3.599c.483-.849 1.359-1.416 2.264-1.813zM6.495 3C2.914 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.01C28.016 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5z"
+})));
+
+var iconsByType = {
+ 'Association': AssociationIcon,
+ 'BusinessRuleTask': BusinessRuleTaskIcon,
+ 'CallActivity': CallActivityIcon,
+ 'Collaboration': CollaborationIcon,
+ 'ConditionalFlow': ConditionalFlowIcon,
+ 'SequenceFlow': ConnectionIcon,
+ 'DataInput': DataInputIcon,
+ 'DataInputAssociation': DataInputOutputAssociationIcon,
+ 'DataOutput': DataOutputIcon,
+ 'DataOutputAssociation': DataInputOutputAssociationIcon,
+ 'DataObjectReference': DataObjectIcon,
+ 'DataStoreReference': DataStoreIcon,
+ 'DefaultFlow': DefaultFlowIcon,
+ 'CancelEndEvent': EndEventCancelIcon,
+ 'CompensateEndEvent': EndEventCompensationIcon,
+ 'ErrorEndEvent': EndEventErrorIcon,
+ 'EscalationEndEvent': EndEventEscalationIcon,
+ 'LinkEndEvent': EndEventLinkIcon,
+ 'MessageEndEvent': EndEventMessageIcon,
+ 'MultipleEndEvent': EndEventMultipleIcon,
+ 'EndEvent': EndEventNoneIcon,
+ 'SignalEndEvent': EndEventSignalIcon,
+ 'TerminateEndEvent': EndEventTerminateIcon,
+ 'EventSubProcess': EventSubProcessExpandedIcon,
+ 'ComplexGateway': GatewayComplexIcon,
+ 'EventBasedGateway': GatewayEventBasedIcon,
+ 'ExclusiveGateway': GatewayXorIcon,
+ 'Gateway': GatewayNoneIcon,
+ 'InclusiveGateway': GatewayOrIcon,
+ 'ParallelGateway': GatewayParallelIcon,
+ 'Group': GroupIcon,
+ 'CancelIntermediateCatchEvent': IntermediateEventCatchCancelIcon,
+ 'CompensateIntermediateCatchEvent': IntermediateEventCatchCompensationIcon,
+ 'ConditionalIntermediateCatchEvent': IntermediateEventCatchConditionIcon,
+ 'ErrorIntermediateCatchEvent': IntermediateEventCatchErrorIcon,
+ 'EscalationIntermediateCatchEvent': IntermediateEventCatchEscalationIcon,
+ 'LinkIntermediateCatchEvent': IntermediateEventCatchLinkIcon,
+ 'MessageIntermediateCatchEvent': IntermediateEventCatchMessageIcon,
+ 'MultipleIntermediateCatchEvent': IntermediateEventCatchMultipleIcon,
+ 'ConditionalIntermediateCatchEventNonInterrupting': IntermediateEventCatchNonInterruptingConditionIcon,
+ 'EscalationIntermediateCatchEventNonInterrupting': IntermediateEventCatchNonInterruptingEscalationIcon,
+ 'MessageIntermediateCatchEventNonInterrupting': IntermediateEventCatchNonInterruptingMessageIcon,
+ 'MultipleIntermediateCatchEventNonInterrupting': IntermediateEventCatchNonInterruptingMultipleIcon,
+ 'ParallelIntermediateCatchEventNonInterrupting': IntermediateEventCatchNonInterruptingParallelIcon,
+ 'SignalIntermediateCatchEventNonInterrupting': IntermediateEventCatchNonInterruptingSignalIcon,
+ 'TimerIntermediateCatchEventNonInterrupting': IntermediateEventCatchNonInterruptingTimerIcon,
+ 'ParallelMultipleIntermediateCatchEvent': IntermediateEventCatchParallelMultipleIcon,
+ 'SignalIntermediateCatchEvent': IntermediateEventCatchSignalIcon,
+ 'TimerIntermediateCatchEvent': IntermediateEventCatchTimerIcon,
+ 'IntermediateThrowEvent': IntermediateEventNoneIcon,
+ 'CompensateIntermediateThrowEvent': IntermediateEventThrowCompensationIcon,
+ 'EscalationIntermediateThrowEvent': IntermediateEventThrowEscalationIcon,
+ 'LinkIntermediateThrowEvent': IntermediateEventThrowLinkIcon,
+ 'MessageIntermediateThrowEvent': IntermediateEventThrowMessageIcon,
+ 'MultipleIntermediateThrowEvent': IntermediateEventThrowMultipleIcon,
+ 'SignalIntermediateThrowEvent': IntermediateEventThrowSignalIcon,
+ 'Lane': LaneIcon,
+ 'ManualTask': ManualTaskIcon,
+ 'MessageFlow': MessageFlowIcon,
+ 'Participant': ParticipantIcon,
+ 'Process': ProcessIcon,
+ 'ReceiveTask': ReceiveTaskIcon,
+ 'ScriptTask': ScriptTaskIcon,
+ 'SendTask': SendTaskIcon,
+ 'ServiceTask': ServiceTaskIcon,
+ 'CompensateStartEvent': StartEventCompensationIcon,
+ 'ConditionalStartEvent': StartEventConditionIcon,
+ 'ErrorStartEvent': StartEventErrorIcon,
+ 'EscalationStartEvent': StartEventEscalationIcon,
+ 'MessageStartEvent': StartEventMessageIcon,
+ 'MultipleStartEvent': StartEventMultipleIcon,
+ 'ConditionalStartEventNonInterrupting': StartEventNonInterruptingConditionIcon,
+ 'EscalationStartEventNonInterrupting': StartEventNonInterruptingEscalationIcon,
+ 'MessageStartEventNonInterrupting': StartEventNonInterruptingMessageIcon,
+ 'MultipleStartEventNonInterrupting': StartEventNonInterruptingMultipleIcon,
+ 'ParallelMultipleStartEventNonInterrupting': StartEventNonInterruptingParallelMultipleIcon,
+ 'SignalStartEventNonInterrupting': StartEventNonInterruptingSignalIcon,
+ 'TimerStartEventNonInterrupting': StartEventNonInterruptingTimerIcon,
+ 'CancelBoundaryEvent': IntermediateEventCatchCancelIcon,
+ 'CompensateBoundaryEvent': IntermediateEventCatchCompensationIcon,
+ 'ConditionalBoundaryEvent': IntermediateEventCatchConditionIcon,
+ 'ErrorBoundaryEvent': IntermediateEventCatchErrorIcon,
+ 'EscalationBoundaryEvent': IntermediateEventCatchEscalationIcon,
+ 'LinkBoundaryEvent': IntermediateEventCatchLinkIcon,
+ 'MessageBoundaryEvent': IntermediateEventCatchMessageIcon,
+ 'MultipleBoundaryEvent': IntermediateEventCatchMultipleIcon,
+ 'BoundaryEvent': IntermediateEventNoneIcon,
+ 'ConditionalBoundaryEventNonInterrupting': IntermediateEventCatchNonInterruptingConditionIcon,
+ 'EscalationBoundaryEventNonInterrupting': IntermediateEventCatchNonInterruptingEscalationIcon,
+ 'MessageBoundaryEventNonInterrupting': IntermediateEventCatchNonInterruptingMessageIcon,
+ 'MultipleBoundaryEventNonInterrupting': IntermediateEventCatchNonInterruptingMultipleIcon,
+ 'ParallelBoundaryEventNonInterrupting': IntermediateEventCatchNonInterruptingParallelIcon,
+ 'SignalBoundaryEventNonInterrupting': IntermediateEventCatchNonInterruptingSignalIcon,
+ 'TimerBoundaryEventNonInterrupting': IntermediateEventCatchNonInterruptingTimerIcon,
+ 'ParallelMultipleBoundaryEvent': IntermediateEventCatchParallelMultipleIcon,
+ 'SignalBoundaryEvent': IntermediateEventCatchSignalIcon,
+ 'TimerBoundaryEvent': IntermediateEventCatchTimerIcon,
+ 'StartEvent': StartEventNoneIcon,
+ 'ParallelMultipleStartEvent': StartEventParallelMultipleIcon,
+ 'SignalStartEvent': StartEventSignalIcon,
+ 'TimerStartEvent': StartEventTimerIcon,
+ 'CollapsedSubProcess': SubprocessCollapsedIcon,
+ 'CollapsedAdHocSubProcess': SubprocessCollapsedIcon,
+ 'ExpandedSubProcess': SubprocessExpandedIcon,
+ 'ExpandedAdHocSubProcess': SubprocessExpandedIcon,
+ 'Task': TaskNoneIcon,
+ 'TextAnnotation': TextAnnotationicon,
+ 'Transaction': TransactionIcon,
+ 'UserTask': UserTaskIcon
+};
+
+function getConcreteType(element) {
+ const {
+ type: elementType
+ } = element;
+ let type = getRawType(elementType);
+
+ // (1) event definition types
+ const eventDefinition = getEventDefinition$2(element);
+ if (eventDefinition) {
+ type = `${getEventDefinitionPrefix(eventDefinition)}${type}`;
+
+ // (1.1) interrupting / non interrupting
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:StartEvent') && !(0,bpmn_js_lib_util_DiUtil__WEBPACK_IMPORTED_MODULE_10__.isInterrupting)(element) || (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:BoundaryEvent') && !isCancelActivity(element)) {
+ type = `${type}NonInterrupting`;
+ }
+ return type;
+ }
+
+ // (2) sub process types
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:SubProcess') && !(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Transaction')) {
+ if ((0,bpmn_js_lib_util_DiUtil__WEBPACK_IMPORTED_MODULE_10__.isEventSubProcess)(element)) {
+ type = `Event${type}`;
+ } else {
+ const expanded = (0,bpmn_js_lib_util_DiUtil__WEBPACK_IMPORTED_MODULE_10__.isExpanded)(element) && !isPlane(element);
+ type = `${expanded ? 'Expanded' : 'Collapsed'}${type}`;
+ }
+ }
+
+ // (3) conditional + default flows
+ if (isDefaultFlow(element)) {
+ type = 'DefaultFlow';
+ }
+ if (isConditionalFlow(element)) {
+ type = 'ConditionalFlow';
+ }
+ return type;
+}
+const PanelHeaderProvider = {
+ getDocumentationRef: element => {
+ const elementTemplates = getTemplatesService();
+ if (elementTemplates) {
+ return getTemplateDocumentation(element, elementTemplates);
+ }
+ },
+ getElementLabel: element => {
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Process')) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element).name;
+ }
+ return (0,bpmn_js_lib_features_label_editing_LabelUtil__WEBPACK_IMPORTED_MODULE_11__.getLabel)(element);
+ },
+ getElementIcon: element => {
+ const concreteType = getConcreteType(element);
+
+ // eslint-disable-next-line react-hooks/rules-of-hooks
+ const config = useService('config.elementTemplateIconRenderer', false);
+ const {
+ iconProperty = 'zeebe:modelerTemplateIcon'
+ } = config || {};
+ const templateIcon = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element).get(iconProperty);
+ if (templateIcon) {
+ return () => (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("img", {
+ class: "bio-properties-panel-header-template-icon",
+ width: "32",
+ height: "32",
+ src: templateIcon
+ });
+ }
+ return iconsByType[concreteType];
+ },
+ getTypeLabel: element => {
+ const elementTemplates = getTemplatesService();
+ if (elementTemplates) {
+ const template = getTemplate(element, elementTemplates);
+ if (template && template.name) {
+ return template.name;
+ }
+ }
+ const concreteType = getConcreteType(element);
+ return concreteType.replace(/(\B[A-Z])/g, ' $1').replace(/(\bNon Interrupting)/g, '($1)');
+ }
+};
+
+// helpers ///////////////////////
+
+function isCancelActivity(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return businessObject && businessObject.cancelActivity !== false;
+}
+function getEventDefinition$2(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element),
+ eventDefinitions = businessObject.eventDefinitions;
+ return eventDefinitions && eventDefinitions[0];
+}
+function getRawType(type) {
+ return type.split(':')[1];
+}
+function getEventDefinitionPrefix(eventDefinition) {
+ const rawType = getRawType(eventDefinition.$type);
+ return rawType.replace('EventDefinition', '');
+}
+function isDefaultFlow(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const sourceBusinessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element.source);
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:SequenceFlow') || !sourceBusinessObject) {
+ return false;
+ }
+ return sourceBusinessObject.default && sourceBusinessObject.default === businessObject && ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(sourceBusinessObject, 'bpmn:Gateway') || (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(sourceBusinessObject, 'bpmn:Activity'));
+}
+function isConditionalFlow(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const sourceBusinessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element.source);
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:SequenceFlow') || !sourceBusinessObject) {
+ return false;
+ }
+ return businessObject.conditionExpression && (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(sourceBusinessObject, 'bpmn:Activity');
+}
+function isPlane(element) {
+ // Backwards compatibility for bpmn-js<8
+ const di = element && (element.di || (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element).di);
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(di, 'bpmndi:BPMNPlane');
+}
+function getTemplatesService() {
+ // eslint-disable-next-line react-hooks/rules-of-hooks
+ return useService('elementTemplates', false);
+}
+function getTemplate(element, elementTemplates) {
+ return elementTemplates.get(element);
+}
+function getTemplateDocumentation(element, elementTemplates) {
+ const template = getTemplate(element, elementTemplates);
+ return template && template.documentationRef;
+}
+
+function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
+var EmptyIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends$1({
+ xmlns: "http://www.w3.org/2000/svg",
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
+ width: "64",
+ height: "64"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("defs", null, /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("rect", {
+ id: "a",
+ width: "57",
+ height: "47",
+ x: "3",
+ y: "8",
+ rx: "7"
+}), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("mask", {
+ id: "b",
+ width: "57",
+ height: "47",
+ x: "0",
+ y: "0",
+ fill: "#fff",
+ maskContentUnits: "userSpaceOnUse",
+ maskUnits: "objectBoundingBox"
+}, /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("use", {
+ xlinkHref: "#a"
+}))), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("g", {
+ fill: "none",
+ fillRule: "evenodd"
+}, /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ fill: "#818798",
+ d: "M52 11a5 5 0 015 5v31a5 5 0 01-5 5H11a5 5 0 01-5-5V16a5 5 0 015-5h41zm0 2H11a3 3 0 00-2.995 2.824L8 16v31a3 3 0 002.824 2.995L11 50h41a3 3 0 002.995-2.824L55 47V16a3 3 0 00-2.824-2.995L52 13z"
+}), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ fill: "#D5D7DD",
+ d: "M16 24h31v6H16zM21 33h21v6H21z"
+}), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("use", {
+ stroke: "#B9BCC6",
+ strokeDasharray: "5 2",
+ strokeWidth: "2",
+ mask: "url(#b)",
+ xlinkHref: "#a"
+}))));
+
+function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
+var MultipleIcon = (({
+ styles = {},
+ ...props
+}) => /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("svg", _extends({
+ xmlns: "http://www.w3.org/2000/svg",
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
+ width: "128",
+ height: "64"
+}, props), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("defs", null, /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ id: "a",
+ d: "M9 9h110v47H9z"
+}), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("mask", {
+ id: "b",
+ width: "110",
+ height: "47",
+ x: "0",
+ y: "0",
+ fill: "#fff",
+ maskContentUnits: "userSpaceOnUse",
+ maskUnits: "objectBoundingBox"
+}, /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("use", {
+ xlinkHref: "#a"
+}))), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("g", {
+ fill: "none",
+ fillRule: "evenodd"
+}, /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ fill: "#818798",
+ d: "M25 20.272L37.728 33 25 45.728 12.272 33 25 20.272zm0 2.829L15.1 33l9.9 9.9 9.9-9.9-9.9-9.9z"
+}), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ fill: "#D5D7DD",
+ d: "M17 47h16v6H17z"
+}), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ fill: "#818798",
+ d: "M35 32h27v2H35z"
+}), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ fill: "#818798",
+ d: "M60 30v6l6-3z"
+}), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ fill: "#D5D7DD",
+ d: "M80 34h21v6H80z"
+}), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("g", null, /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ fill: "#818798",
+ d: "M111 12a5 5 0 015 5v31a5 5 0 01-5 5H70a5 5 0 01-5-5V17a5 5 0 015-5h41zm0 2H70a3 3 0 00-3 3v31a3 3 0 003 3h41a3 3 0 003-3V17a3 3 0 00-3-3z"
+}), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("path", {
+ fill: "#D5D7DD",
+ d: "M75 25h31v6H75z"
+})), /*#__PURE__*/_bpmn_io_properties_panel_preact_compat__WEBPACK_IMPORTED_MODULE_3__["default"].createElement("use", {
+ stroke: "#B9BCC6",
+ strokeDasharray: "5 2",
+ strokeWidth: "2",
+ mask: "url(#b)",
+ xlinkHref: "#a"
+}))));
+
+const PanelPlaceholderProvider = translate => {
+ if (!translate) translate = text => text;
+ return {
+ getEmpty: () => {
+ return {
+ text: translate('Select an element to edit its properties.'),
+ icon: EmptyIcon
+ };
+ },
+ getMultiple: () => {
+ return {
+ text: translate('Multiple elements are selected. Select a single element to edit its properties.'),
+ icon: MultipleIcon
+ };
+ }
+ };
+};
+
+function BpmnPropertiesPanel(props) {
+ const {
+ element,
+ injector,
+ getProviders,
+ layoutConfig: initialLayoutConfig,
+ descriptionConfig,
+ tooltipConfig,
+ feelPopupContainer
+ } = props;
+ const canvas = injector.get('canvas');
+ const elementRegistry = injector.get('elementRegistry');
+ const eventBus = injector.get('eventBus');
+ const translate = injector.get('translate');
+ const [state, setState] = (0,_bpmn_io_properties_panel_preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useState)({
+ selectedElement: element
+ });
+ const selectedElement = state.selectedElement;
+
+ /**
+ * @param {djs.model.Base | Array} element
+ */
+ const _update = element => {
+ if (!element) {
+ return;
+ }
+ let newSelectedElement = element;
+
+ // handle labels
+ if (newSelectedElement && newSelectedElement.type === 'label') {
+ newSelectedElement = newSelectedElement.labelTarget;
+ }
+ setState({
+ ...state,
+ selectedElement: newSelectedElement
+ });
+
+ // notify interested parties on property panel updates
+ eventBus.fire('propertiesPanel.updated', {
+ element: newSelectedElement
+ });
+ };
+
+ // (2) react on element changes
+
+ // (2a) selection changed
+ (0,_bpmn_io_properties_panel_preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
+ const onSelectionChanged = e => {
+ const {
+ newSelection = []
+ } = e;
+ if (newSelection.length > 1) {
+ return _update(newSelection);
+ }
+ const newElement = newSelection[0];
+ const rootElement = canvas.getRootElement();
+ if (isImplicitRoot$1(rootElement)) {
+ return;
+ }
+ _update(newElement || rootElement);
+ };
+ eventBus.on('selection.changed', onSelectionChanged);
+ return () => {
+ eventBus.off('selection.changed', onSelectionChanged);
+ };
+ }, []);
+
+ // (2b) selected element changed
+ (0,_bpmn_io_properties_panel_preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
+ const onElementsChanged = e => {
+ const elements = e.elements;
+ const updatedElement = findElement(elements, selectedElement);
+ if (updatedElement && elementExists(updatedElement, elementRegistry)) {
+ _update(updatedElement);
+ }
+ };
+ eventBus.on('elements.changed', onElementsChanged);
+ return () => {
+ eventBus.off('elements.changed', onElementsChanged);
+ };
+ }, [selectedElement]);
+
+ // (2c) root element changed
+ (0,_bpmn_io_properties_panel_preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
+ const onRootAdded = e => {
+ const element = e.element;
+ _update(element);
+ };
+ eventBus.on('root.added', onRootAdded);
+ return () => {
+ eventBus.off('root.added', onRootAdded);
+ };
+ }, [selectedElement]);
+
+ // (2d) provided entries changed
+ (0,_bpmn_io_properties_panel_preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
+ const onProvidersChanged = () => {
+ _update(selectedElement);
+ };
+ eventBus.on('propertiesPanel.providersChanged', onProvidersChanged);
+ return () => {
+ eventBus.off('propertiesPanel.providersChanged', onProvidersChanged);
+ };
+ }, [selectedElement]);
+
+ // (2e) element templates changed
+ (0,_bpmn_io_properties_panel_preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
+ const onTemplatesChanged = () => {
+ _update(selectedElement);
+ };
+ eventBus.on('elementTemplates.changed', onTemplatesChanged);
+ return () => {
+ eventBus.off('elementTemplates.changed', onTemplatesChanged);
+ };
+ }, [selectedElement]);
+
+ // (3) create properties panel context
+ const bpmnPropertiesPanelContext = {
+ selectedElement,
+ injector,
+ getService(type, strict) {
+ return injector.get(type, strict);
+ }
+ };
+
+ // (4) retrieve groups for selected element
+ const providers = getProviders(selectedElement);
+ const groups = (0,_bpmn_io_properties_panel_preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.reduce)(providers, function (groups, provider) {
+ // do not collect groups for multi element state
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_12__.isArray)(selectedElement)) {
+ return [];
+ }
+ const updater = provider.getGroups(selectedElement);
+ return updater(groups);
+ }, []);
+ }, [providers, selectedElement]);
+
+ // (5) notify layout changes
+ const [layoutConfig, setLayoutConfig] = (0,_bpmn_io_properties_panel_preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useState)(initialLayoutConfig || {});
+ const onLayoutChanged = (0,_bpmn_io_properties_panel_preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useCallback)(newLayout => {
+ eventBus.fire('propertiesPanel.layoutChanged', {
+ layout: newLayout
+ });
+ }, [eventBus]);
+
+ // React to external layout changes
+ (0,_bpmn_io_properties_panel_preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
+ const cb = e => {
+ const {
+ layout
+ } = e;
+ setLayoutConfig(layout);
+ };
+ eventBus.on('propertiesPanel.setLayout', cb);
+ return () => eventBus.off('propertiesPanel.setLayout', cb);
+ }, [eventBus, setLayoutConfig]);
+
+ // (6) notify description changes
+ const onDescriptionLoaded = description => {
+ eventBus.fire('propertiesPanel.descriptionLoaded', {
+ description
+ });
+ };
+
+ // (7) notify tooltip changes
+ const onTooltipLoaded = tooltip => {
+ eventBus.fire('propertiesPanel.tooltipLoaded', {
+ tooltip
+ });
+ };
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(BpmnPropertiesPanelContext.Provider, {
+ value: bpmnPropertiesPanelContext,
+ children: (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.PropertiesPanel, {
+ element: selectedElement,
+ headerProvider: PanelHeaderProvider,
+ placeholderProvider: PanelPlaceholderProvider(translate),
+ groups: groups,
+ layoutConfig: layoutConfig,
+ layoutChanged: onLayoutChanged,
+ descriptionConfig: descriptionConfig,
+ descriptionLoaded: onDescriptionLoaded,
+ tooltipConfig: tooltipConfig,
+ tooltipLoaded: onTooltipLoaded,
+ feelPopupContainer: feelPopupContainer,
+ eventBus: eventBus
+ })
+ });
+}
+
+// helpers //////////////////////////
+
+function isImplicitRoot$1(element) {
+ // Backwards compatibility for diagram-js<7.4.0, see https://github.com/bpmn-io/bpmn-properties-panel/pull/102
+ return element && (element.isImplicit || element.id === '__implicitroot');
+}
+function findElement(elements, element) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.find)(elements, e => e === element);
+}
+function elementExists(element, elementRegistry) {
+ return element && elementRegistry.get(element.id);
+}
+
+const DEFAULT_PRIORITY = 1000;
+
+/**
+ * @typedef { import('@bpmn-io/properties-panel').GroupDefinition } GroupDefinition
+ * @typedef { import('@bpmn-io/properties-panel').ListGroupDefinition } ListGroupDefinition
+ * @typedef { { getGroups: (ModdleElement) => (Array{GroupDefinition|ListGroupDefinition}) => Array{GroupDefinition|ListGroupDefinition}) } PropertiesProvider
+ */
- module.exports.addEmptyParameter = addEmptyParameter;
+class BpmnPropertiesPanelRenderer {
+ constructor(config, injector, eventBus) {
+ const {
+ parent,
+ layout: layoutConfig,
+ description: descriptionConfig,
+ tooltip: tooltipConfig,
+ feelPopupContainer
+ } = config || {};
+ this._eventBus = eventBus;
+ this._injector = injector;
+ this._layoutConfig = layoutConfig;
+ this._descriptionConfig = descriptionConfig;
+ this._tooltipConfig = tooltipConfig;
+ this._feelPopupContainer = feelPopupContainer;
+ this._container = (0,min_dom__WEBPACK_IMPORTED_MODULE_13__.domify)('
');
+ var commandStack = injector.get('commandStack', false);
+ commandStack && setupKeyboard(this._container, eventBus, commandStack);
+ eventBus.on('diagram.init', () => {
+ if (parent) {
+ this.attachTo(parent);
+ }
+ });
+ eventBus.on('diagram.destroy', () => {
+ this.detach();
+ });
+ eventBus.on('root.added', event => {
+ const {
+ element
+ } = event;
+ this._render(element);
+ });
+ }
+
+ /**
+ * Attach the properties panel to a parent node.
+ *
+ * @param {HTMLElement} container
+ */
+ attachTo(container) {
+ if (!container) {
+ throw new Error('container required');
+ }
+
+ // unwrap jQuery if provided
+ if (container.get && container.constructor.prototype.jquery) {
+ container = container.get(0);
+ }
+ if (typeof container === 'string') {
+ container = (0,min_dom__WEBPACK_IMPORTED_MODULE_13__.query)(container);
+ }
+
+ // (1) detach from old parent
+ this.detach();
+
+ // (2) append to parent container
+ container.appendChild(this._container);
+
+ // (3) notify interested parties
+ this._eventBus.fire('propertiesPanel.attach');
+ }
+
+ /**
+ * Detach the properties panel from its parent node.
+ */
+ detach() {
+ const parentNode = this._container.parentNode;
+ if (parentNode) {
+ parentNode.removeChild(this._container);
+ this._eventBus.fire('propertiesPanel.detach');
+ }
+ }
+
+ /**
+ * Register a new properties provider to the properties panel.
+ *
+ * @param {Number} [priority]
+ * @param {PropertiesProvider} provider
+ */
+ registerProvider(priority, provider) {
+ if (!provider) {
+ provider = priority;
+ priority = DEFAULT_PRIORITY;
+ }
+ if (typeof provider.getGroups !== 'function') {
+ console.error('Properties provider does not implement #getGroups(element) API');
+ return;
+ }
+ this._eventBus.on('propertiesPanel.getProviders', priority, function (event) {
+ event.providers.push(provider);
+ });
+ this._eventBus.fire('propertiesPanel.providersChanged');
+ }
+
+ /**
+ * Updates the layout of the properties panel.
+ * @param {Object} layout
+ */
+ setLayout(layout) {
+ this._eventBus.fire('propertiesPanel.setLayout', {
+ layout
+ });
+ }
+ _getProviders() {
+ const event = this._eventBus.createEvent({
+ type: 'propertiesPanel.getProviders',
+ providers: []
+ });
+ this._eventBus.fire(event);
+ return event.providers;
+ }
+ _render(element) {
+ const canvas = this._injector.get('canvas');
+ if (!element) {
+ element = canvas.getRootElement();
+ }
+ if (isImplicitRoot(element)) {
+ return;
+ }
+ (0,_bpmn_io_properties_panel_preact__WEBPACK_IMPORTED_MODULE_2__.render)((0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(BpmnPropertiesPanel, {
+ element: element,
+ injector: this._injector,
+ getProviders: this._getProviders.bind(this),
+ layoutConfig: this._layoutConfig,
+ descriptionConfig: this._descriptionConfig,
+ tooltipConfig: this._tooltipConfig,
+ feelPopupContainer: this._feelPopupContainer
+ }), this._container);
+ this._eventBus.fire('propertiesPanel.rendered');
+ }
+ _destroy() {
+ if (this._container) {
+ (0,_bpmn_io_properties_panel_preact__WEBPACK_IMPORTED_MODULE_2__.render)(null, this._container);
+ this._eventBus.fire('propertiesPanel.destroyed');
+ }
+ }
+}
+BpmnPropertiesPanelRenderer.$inject = ['config.propertiesPanel', 'injector', 'eventBus'];
+
+// helpers ///////////////////////
+
+function isImplicitRoot(element) {
+ // Backwards compatibility for diagram-js<7.4.0, see https://github.com/bpmn-io/bpmn-properties-panel/pull/102
+ return element && (element.isImplicit || element.id === '__implicitroot');
+}
+
+/**
+ * Setup keyboard bindings (undo, redo) on the given container.
+ *
+ * @param {Element} container
+ * @param {EventBus} eventBus
+ * @param {CommandStack} commandStack
+ */
+function setupKeyboard(container, eventBus, commandStack) {
+ function cancel(event) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ function handleKeys(event) {
+ if ((0,diagram_js_lib_features_keyboard_KeyboardUtil__WEBPACK_IMPORTED_MODULE_14__.isUndo)(event)) {
+ commandStack.undo();
+ return cancel(event);
+ }
+ if ((0,diagram_js_lib_features_keyboard_KeyboardUtil__WEBPACK_IMPORTED_MODULE_14__.isRedo)(event)) {
+ commandStack.redo();
+ return cancel(event);
+ }
+ }
+ eventBus.on('keyboard.bind', function () {
+ min_dom__WEBPACK_IMPORTED_MODULE_13__.event.bind(container, 'keydown', handleKeys);
+ });
+ eventBus.on('keyboard.unbind', function () {
+ min_dom__WEBPACK_IMPORTED_MODULE_13__.event.unbind(container, 'keydown', handleKeys);
+ });
+}
+
+/**
+ * A handler that combines and executes multiple commands.
+ *
+ * All updates are bundled on the command stack and executed in one step.
+ * This also makes it possible to revert the changes in one step.
+ *
+ * Example use case: remove the camunda:formKey attribute and in addition
+ * add all form fields needed for the camunda:formData property.
+ */
+class MultiCommandHandler {
+ constructor(commandStack) {
+ this._commandStack = commandStack;
+ }
+ preExecute(context) {
+ const commandStack = this._commandStack;
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.forEach)(context, function (command) {
+ commandStack.execute(command.cmd, command.context);
+ });
+ }
+}
+MultiCommandHandler.$inject = ['commandStack'];
+
+const HANDLERS = {
+ 'properties-panel.multi-command-executor': MultiCommandHandler
+};
+function CommandInitializer(eventBus, commandStack) {
+ eventBus.on('diagram.init', function () {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.forEach)(HANDLERS, function (handler, id) {
+ commandStack.registerHandler(id, handler);
+ });
+ });
+}
+CommandInitializer.$inject = ['eventBus', 'commandStack'];
+var Commands = {
+ __init__: [CommandInitializer]
+};
+
+var index$3 = {
+ __depends__: [Commands, _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.DebounceInputModule, _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.FeelPopupModule],
+ __init__: ['propertiesPanel'],
+ propertiesPanel: ['type', BpmnPropertiesPanelRenderer]
+};
+
+function ReferenceSelectEntry(props) {
+ const {
+ autoFocusEntry,
+ element,
+ getOptions
+ } = props;
+ const options = getOptions(element);
+ const prevOptions = (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.usePrevious)(options);
+
+ // auto focus specifc other entry when options changed
+ (0,_bpmn_io_properties_panel_preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
+ if (autoFocusEntry && prevOptions && options.length > prevOptions.length) {
+ const entry = (0,min_dom__WEBPACK_IMPORTED_MODULE_13__.query)(`[data-entry-id="${autoFocusEntry}"]`);
+ const focusableInput = (0,min_dom__WEBPACK_IMPORTED_MODULE_13__.query)('.bio-properties-panel-input', entry);
+ if (focusableInput) {
+ focusableInput.select();
+ }
+ }
+ }, [options]);
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry, {
+ ...props
+ });
+}
+
+function isErrorSupported(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.isAny)(element, ['bpmn:StartEvent', 'bpmn:BoundaryEvent', 'bpmn:EndEvent']) && !!getErrorEventDefinition(element);
+}
+function getErrorEventDefinition(element) {
+ return getEventDefinition$1(element, 'bpmn:ErrorEventDefinition');
+}
+function getTimerEventDefinition$1(element) {
+ return getEventDefinition$1(element, 'bpmn:TimerEventDefinition');
+}
+function getError(element) {
+ const errorEventDefinition = getErrorEventDefinition(element);
+ return errorEventDefinition && errorEventDefinition.get('errorRef');
+}
+function getEventDefinition$1(element, eventType) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const eventDefinitions = businessObject.get('eventDefinitions') || [];
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.find)(eventDefinitions, function (definition) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(definition, eventType);
+ });
+}
+function isMessageSupported(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:ReceiveTask') || (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.isAny)(element, ['bpmn:StartEvent', 'bpmn:EndEvent', 'bpmn:IntermediateThrowEvent', 'bpmn:BoundaryEvent', 'bpmn:IntermediateCatchEvent']) && !!getMessageEventDefinition(element);
+}
+function getMessageEventDefinition(element) {
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:ReceiveTask')) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ }
+ return getEventDefinition$1(element, 'bpmn:MessageEventDefinition');
+}
+function getMessage(element) {
+ const messageEventDefinition = getMessageEventDefinition(element);
+ return messageEventDefinition && messageEventDefinition.get('messageRef');
+}
+function getLinkEventDefinition(element) {
+ return getEventDefinition$1(element, 'bpmn:LinkEventDefinition');
+}
+function getSignalEventDefinition$1(element) {
+ return getEventDefinition$1(element, 'bpmn:SignalEventDefinition');
+}
+function isLinkSupported(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.isAny)(element, ['bpmn:IntermediateThrowEvent', 'bpmn:IntermediateCatchEvent']) && !!getLinkEventDefinition(element);
+}
+function isSignalSupported$1(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Event') && !!getSignalEventDefinition$1(element);
+}
+function getSignal$1(element) {
+ const signalEventDefinition = getSignalEventDefinition$1(element);
+ return signalEventDefinition && signalEventDefinition.get('signalRef');
+}
+function getEscalationEventDefinition(element) {
+ return getEventDefinition$1(element, 'bpmn:EscalationEventDefinition');
+}
+function isEscalationSupported(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Event') && !!getEscalationEventDefinition(element);
+}
+function getEscalation(element) {
+ const escalationEventDefinition = getEscalationEventDefinition(element);
+ return escalationEventDefinition && escalationEventDefinition.get('escalationRef');
+}
+function isCompensationSupported(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.isAny)(element, ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent']) && !!getCompensateEventDefinition(element);
+}
+function getCompensateEventDefinition(element) {
+ return getEventDefinition$1(element, 'bpmn:CompensateEventDefinition');
+}
+function getCompensateActivity(element) {
+ const compensateEventDefinition = getCompensateEventDefinition(element);
+ return compensateEventDefinition && compensateEventDefinition.get('activityRef');
+}
+
+/**
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
+ */
+/**
+ * @returns {Array} entries
+ */
+function CompensationProps(props) {
+ const {
+ element
+ } = props;
+ if (!isCompensationSupported(element)) {
+ return [];
+ }
+ return [{
+ id: 'waitForCompletion',
+ component: WaitForCompletion,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isCheckboxEntryEdited
+ }, {
+ id: 'activityRef',
+ component: ActivityRef,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isSelectEntryEdited
+ }];
+}
+function WaitForCompletion(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const compensateEventDefinition = getCompensateEventDefinition(element);
+ const getValue = () => {
+ return compensateEventDefinition.get('waitForCompletion');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: compensateEventDefinition,
+ properties: {
+ waitForCompletion: value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.CheckboxEntry)({
+ element,
+ id: 'waitForCompletion',
+ label: translate('Wait for completion'),
+ getValue,
+ setValue
+ });
+}
+function ActivityRef(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const elementRegistry = useService('elementRegistry');
+ const translate = useService('translate');
+ const compensateEventDefinition = getCompensateEventDefinition(element);
+ const getValue = () => {
+ const activityRef = getCompensateActivity(element);
+ return activityRef && activityRef.get('id');
+ };
+ const setValue = value => {
+ // update (or remove) activityRef
+ const activityRef = value ? (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(elementRegistry.get(value)) : undefined;
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: compensateEventDefinition,
+ properties: {
+ activityRef
+ }
+ });
+ };
+ const getOptions = () => {
+ let options = [{
+ value: '',
+ label: translate('')
+ }];
+ const activities = findActivityRefs(element);
+ sortByName$6(activities).forEach(function (activity) {
+ options.push({
+ value: activity.id,
+ label: createOptionLabel(activity)
+ });
+ });
+ return options;
+ };
+ return ReferenceSelectEntry({
+ element,
+ id: 'activityRef',
+ label: translate('Activity reference'),
+ getValue,
+ setValue,
+ getOptions
+ });
+}
+
+// helper /////////////////////////
+
+function getFlowElements(element, type) {
+ const {
+ flowElements
+ } = element;
+ return flowElements.filter(function (flowElement) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(flowElement, type);
+ });
+}
+function getContainedActivities(element) {
+ return getFlowElements(element, 'bpmn:Activity');
+}
+function getContainedBoundaryEvents(element) {
+ return getFlowElements(element, 'bpmn:BoundaryEvent');
+}
+
+/**
+ * Checks whether an Activity is attaching a CompensateEvent of the parent container.
+ *
+ * @param {ModdleElement} activity
+ * @param {Array} boundaryEvents
+ * @returns {Boolean}
+ */
+function hasCompensationEventAttached(activity, boundaryEvents) {
+ const {
+ id: activityId
+ } = activity;
+ return !!(0,min_dash__WEBPACK_IMPORTED_MODULE_12__.find)(boundaryEvents, function (boundaryEvent) {
+ const {
+ attachedToRef
+ } = boundaryEvent;
+ const compensateEventDefinition = getCompensateEventDefinition(boundaryEvent);
+ return attachedToRef && compensateEventDefinition && attachedToRef.id === activityId;
+ });
+}
+
+/**
+ * Checks whether an Activity can be compensated. That's the case when it is
+ * a) a CallActivity
+ * b) a SubProcess, when it is not event based and not a compensation
+ * c) any other Activity, when it is attaching a CompensateEvent of the parent container
+ *
+ * @param {ModdleElement} activity
+ * @param {Array} boundaryEvents
+ * @returns {Boolean}
+ */
+function canBeCompensated(activity, boundaryEvents) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(activity, 'bpmn:CallActivity') || (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(activity, 'bpmn:SubProcess') && !activity.triggeredByEvent && !activity.isForCompensation || hasCompensationEventAttached(activity, boundaryEvents);
+}
+function getActivitiesForCompensation(element) {
+ const activities = getContainedActivities(element);
+ const boundaryEvents = getContainedBoundaryEvents(element);
+ return activities.filter(function (activity) {
+ return canBeCompensated(activity, boundaryEvents);
+ });
+}
+
+/**
+ * Retrieves all possible activities to reference for a Compensation.
+ *
+ * @param {djs.model.Base} element
+ * @returns {Array}
+ */
+function findActivityRefs(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ let parent = businessObject.$parent;
+
+ // (1) get all activities in parent container
+ let activities = getActivitiesForCompensation(parent);
+
+ // (2) if throwing compensation event is inside an EventSubProcess,
+ // also get all activities outside of the event sub process
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(parent, 'bpmn:SubProcess') && parent.triggeredByEvent) {
+ parent = parent.$parent;
+ if (parent) {
+ activities = [...activities, ...getActivitiesForCompensation(parent)];
+ }
+ }
+ return activities;
+}
+
+/**
+ * Retrieves an option label in the form
+ * a) with name: "my Task (id=Task_1)"
+ * b) without name: "(id=Task_1)"
+ *
+ * @param {ModdleElement} activity
+ * @returns {String}
+ */
+function createOptionLabel(activity) {
+ const {
+ id,
+ name
+ } = activity;
+ return `${name ? name + ' ' : ''}(id=${id})`;
+}
+function sortByName$6(elements) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.sortBy)(elements, e => (e.name || '').toLowerCase());
+}
+
+const DOCUMENTATION_TEXT_FORMAT = 'text/plain';
+
+/**
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
+ */
- /**
- * returns a list with all root elements for the given parameter 'referencedType'
- */
- function refreshOptionsModel(businessObject, referencedType) {
- var model = [];
- var referableObjects = findRootElementsByType(businessObject, referencedType);
- forEach(referableObjects, function(obj) {
- model.push({
- label: (obj.name || '') + ' (id='+obj.id+')',
- value: obj.id,
- name: obj.name
- });
- });
- return model;
- }
+/**
+ * @returns {Array} entries
+ */
+function DocumentationProps(props) {
+ const {
+ element
+ } = props;
+ const entries = [{
+ id: 'documentation',
+ component: ElementDocumentationProperty,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextAreaEntryEdited
+ }];
+ if (hasProcessRef$2(element)) {
+ entries.push({
+ id: 'processDocumentation',
+ component: ProcessDocumentationProperty,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextAreaEntryEdited
+ });
+ }
+ return entries;
+}
+function ElementDocumentationProperty(props) {
+ const {
+ element
+ } = props;
+ const bpmnFactory = useService('bpmnFactory');
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = getDocumentation((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element));
+ const setValue = setDocumentation(element, (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element), bpmnFactory, commandStack);
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextAreaEntry)({
+ element,
+ id: 'documentation',
+ label: translate('Element documentation'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function ProcessDocumentationProperty(props) {
+ const {
+ element
+ } = props;
+ const bpmnFactory = useService('bpmnFactory');
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const processRef = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element).processRef;
+ const getValue = getDocumentation(processRef);
+ const setValue = setDocumentation(element, processRef, bpmnFactory, commandStack);
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextAreaEntry)({
+ element,
+ id: 'processDocumentation',
+ label: translate('Process documentation'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helper ////////////////////////////
+
+function hasProcessRef$2(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Participant') && element.businessObject.get('processRef');
+}
+function findDocumentation(docs) {
+ return docs.find(function (d) {
+ return (d.textFormat || DOCUMENTATION_TEXT_FORMAT) === DOCUMENTATION_TEXT_FORMAT;
+ });
+}
+
+/**
+ * Retrieves a documentation element from a given moddle element.
+ *
+ * @param {ModdleElement} businessObject
+ *
+ * @returns {ModdleElement} documentation element inside the given moddle element.
+ */
+function getDocumentation(businessObject) {
+ return function () {
+ const documentation = findDocumentation(businessObject && businessObject.get('documentation'));
+ return documentation && documentation.text;
+ };
+}
+
+/**
+ * Sets a documentation element for a given moddle element.
+ *
+ * @param {ModdleElement} businessObject
+ */
+function setDocumentation(element, businessObject, bpmnFactory, commandStack) {
+ return function (value) {
+ let documentation = findDocumentation(businessObject && businessObject.get('documentation'));
+
+ // (1) update or removing existing documentation
+ if (documentation) {
+ if (value) {
+ return commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: documentation,
+ properties: {
+ text: value
+ }
+ });
+ } else {
+ return commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ documentation: (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(businessObject.get('documentation'), documentation)
+ }
+ });
+ }
+ }
+
+ // (2) create new documentation entry
+ if (value) {
+ documentation = bpmnFactory.create('bpmn:Documentation', {
+ text: value
+ });
+ return commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ documentation: [...businessObject.get('documentation'), documentation]
+ }
+ });
+ }
+ };
+}
+
+/**
+ * Create a new element and (optionally) set its parent.
+ *
+ * @param {string} type
+ * @param {Object} properties
+ * @param {import('bpmn-js/lib/model/Types').ModdleElement} parent
+ * @param {import('bpmn-js/lib/features/modeling/BpmnFactory').default} bpmnFactory
+ *
+ * @returns {import('bpmn-js/lib/model/Types').ModdleElement}
+ */
+function createElement(type, properties, parent, bpmnFactory) {
+ const element = bpmnFactory.create(type, properties);
+ if (parent) {
+ element.$parent = parent;
+ }
+ return element;
+}
+
+/**
+ * generate a semantic id with given prefix
+ */
+function nextId(prefix) {
+ const ids = new ids__WEBPACK_IMPORTED_MODULE_5__["default"]([32, 32, 1]);
+ return ids.nextPrefixed(prefix);
+}
+function getRoot(businessObject) {
+ let parent = businessObject;
+ while (parent.$parent) {
+ parent = parent.$parent;
+ }
+ return parent;
+}
+function filterElementsByType(objectList, type) {
+ const list = objectList || [];
+ return list.filter(element => (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, type));
+}
+function findRootElementsByType(businessObject, referencedType) {
+ const root = getRoot(businessObject);
+ return filterElementsByType(root.get('rootElements'), referencedType);
+}
+function findRootElementById(businessObject, type, id) {
+ const elements = findRootElementsByType(businessObject, type);
+ return elements.find(element => element.id === id);
+}
+
+const EMPTY_OPTION$4 = '';
+const CREATE_NEW_OPTION$4 = 'create-new';
+
+/**
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
+ */
- module.exports.refreshOptionsModel = refreshOptionsModel;
+/**
+ * @returns {Array} entries
+ */
+function ErrorProps$2(props) {
+ const {
+ element
+ } = props;
+ if (!isErrorSupported(element)) {
+ return [];
+ }
+ const error = getError(element);
+ let entries = [{
+ id: 'errorRef',
+ component: ErrorRef$1,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isSelectEntryEdited
+ }];
+ if (error) {
+ entries = [...entries, {
+ id: 'errorName',
+ component: ErrorName$1,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }, {
+ id: 'errorCode',
+ component: ErrorCode$2,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }];
+ }
+ return entries;
+}
+function ErrorRef$1(props) {
+ const {
+ element
+ } = props;
+ const bpmnFactory = useService('bpmnFactory');
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const errorEventDefinition = getErrorEventDefinition(element);
+ const getValue = () => {
+ const error = getError(element);
+ if (error) {
+ return error.get('id');
+ }
+ return EMPTY_OPTION$4;
+ };
+ const setValue = value => {
+ const root = getRoot(errorEventDefinition);
+ const commands = [];
+ let error;
+
+ // (1) create new error
+ if (value === CREATE_NEW_OPTION$4) {
+ error = createElement('bpmn:Error', {
+ name: nextId('Error_')
+ }, root, bpmnFactory);
+ value = error.get('id');
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: root,
+ properties: {
+ rootElements: [...root.get('rootElements'), error]
+ }
+ }
+ });
+ }
+
+ // (2) update (or remove) errorRef
+ error = error || findRootElementById(errorEventDefinition, 'bpmn:Error', value);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: errorEventDefinition,
+ properties: {
+ errorRef: error
+ }
+ }
+ });
+
+ // (3) commit all updates
+ return commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+ const getOptions = () => {
+ let options = [{
+ value: EMPTY_OPTION$4,
+ label: translate('')
+ }, {
+ value: CREATE_NEW_OPTION$4,
+ label: translate('Create new ...')
+ }];
+ const errors = findRootElementsByType((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element), 'bpmn:Error');
+ sortByName$5(errors).forEach(error => {
+ options.push({
+ value: error.get('id'),
+ label: error.get('name')
+ });
+ });
+ return options;
+ };
+ return ReferenceSelectEntry({
+ element,
+ id: 'errorRef',
+ label: translate('Global error reference'),
+ autoFocusEntry: 'errorName',
+ getValue,
+ setValue,
+ getOptions
+ });
+}
+function ErrorName$1(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const error = getError(element);
+ const getValue = () => {
+ return error.get('name');
+ };
+ const setValue = value => {
+ return commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: error,
+ properties: {
+ name: value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'errorName',
+ label: translate('Name'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function ErrorCode$2(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const error = getError(element);
+ const getValue = () => {
+ return error.get('errorCode');
+ };
+ const setValue = value => {
+ return commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: error,
+ properties: {
+ errorCode: value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'errorCode',
+ label: translate('Code'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helper /////////////////////////
+
+function sortByName$5(elements) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.sortBy)(elements, e => (e.name || '').toLowerCase());
+}
+
+const CREATE_NEW_OPTION$3 = 'create-new';
+
+/**
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
+ */
+/**
+ * @returns {Array} entries
+ */
+function EscalationProps$2(props) {
+ const {
+ element
+ } = props;
+ if (!isEscalationSupported(element)) {
+ return [];
+ }
+ const escalation = getEscalation(element);
+ let entries = [{
+ id: 'escalationRef',
+ component: EscalationRef,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isSelectEntryEdited
+ }];
+ if (escalation) {
+ entries = [...entries, {
+ id: 'escalationName',
+ component: EscalationName,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }, {
+ id: 'escalationCode',
+ component: EscalationCode$1,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }];
+ }
+ return entries;
+}
+function EscalationRef(props) {
+ const {
+ element
+ } = props;
+ const bpmnFactory = useService('bpmnFactory');
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const escalationEventDefinition = getEscalationEventDefinition(element);
+ const getValue = () => {
+ const escalation = getEscalation(element);
+ return escalation && escalation.get('id');
+ };
+ const setValue = value => {
+ const root = getRoot(escalationEventDefinition);
+ const commands = [];
+ let escalation;
+
+ // (1) create new escalation
+ if (value === CREATE_NEW_OPTION$3) {
+ const id = nextId('Escalation_');
+ escalation = createElement('bpmn:Escalation', {
+ id,
+ name: id
+ }, root, bpmnFactory);
+ value = escalation.get('id');
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: root,
+ properties: {
+ rootElements: [...root.get('rootElements'), escalation]
+ }
+ }
+ });
+ }
+
+ // (2) update (or remove) escalationRef
+ escalation = escalation || findRootElementById(escalationEventDefinition, 'bpmn:Escalation', value);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: escalationEventDefinition,
+ properties: {
+ escalationRef: escalation
+ }
+ }
+ });
+
+ // (3) commit all updates
+ return commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+ const getOptions = () => {
+ let options = [{
+ value: '',
+ label: translate('')
+ }, {
+ value: CREATE_NEW_OPTION$3,
+ label: translate('Create new ...')
+ }];
+ const escalations = findRootElementsByType((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element), 'bpmn:Escalation');
+ sortByName$4(escalations).forEach(escalation => {
+ options.push({
+ value: escalation.get('id'),
+ label: escalation.get('name')
+ });
+ });
+ return options;
+ };
+ return ReferenceSelectEntry({
+ element,
+ id: 'escalationRef',
+ label: translate('Global escalation reference'),
+ autoFocusEntry: 'escalationName',
+ getValue,
+ setValue,
+ getOptions
+ });
+}
+function EscalationName(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const escalation = getEscalation(element);
+ const getValue = () => {
+ return escalation.get('name');
+ };
+ const setValue = value => {
+ return commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: escalation,
+ properties: {
+ name: value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'escalationName',
+ label: translate('Name'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function EscalationCode$1(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const escalation = getEscalation(element);
+ const getValue = () => {
+ return escalation.get('escalationCode');
+ };
+ const setValue = value => {
+ return commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: escalation,
+ properties: {
+ escalationCode: value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'escalationCode',
+ label: translate('Code'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helper /////////////////////////
+
+function sortByName$4(elements) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.sortBy)(elements, e => (e.name || '').toLowerCase());
+}
+
+/**
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
+ */
- /**
- * fills the drop down with options
- */
- function updateOptionsDropDown(domSelector, businessObject, referencedType, entryNode) {
- var options = refreshOptionsModel(businessObject, referencedType);
- addEmptyParameter(options);
- var selectBox = domQuery(domSelector, entryNode);
- domClear(selectBox);
-
- forEach(options, function(option) {
- var optionEntry = domify('' + escapeHTML(option.label) + ' ');
- selectBox.appendChild(optionEntry);
- });
- return options;
- }
+/**
+ * @returns {Array} entries
+ */
+function ExecutableProps(props) {
+ const {
+ element
+ } = props;
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Process') && !hasProcessRef$1(element)) {
+ return [];
+ }
+ return [{
+ id: 'isExecutable',
+ component: Executable,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isCheckboxEntryEdited
+ }];
+}
+function Executable(props) {
+ const {
+ element
+ } = props;
+ const modeling = useService('modeling');
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ let getValue, setValue;
+ setValue = value => {
+ modeling.updateProperties(element, {
+ isExecutable: value
+ });
+ };
+ getValue = element => {
+ return element.businessObject.isExecutable;
+ };
+
+ // handle properties on processRef level for participants
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Participant')) {
+ const process = element.businessObject.get('processRef');
+ setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: process,
+ properties: {
+ isExecutable: value
+ }
+ });
+ };
+ getValue = () => {
+ return process.get('isExecutable');
+ };
+ }
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.CheckboxEntry)({
+ element,
+ id: 'isExecutable',
+ label: translate('Executable'),
+ getValue,
+ setValue
+ });
+}
+
+// helper /////////////////////
+
+function hasProcessRef$1(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Participant') && element.businessObject.get('processRef');
+}
+
+const SPACE_REGEX = /\s/;
- module.exports.updateOptionsDropDown = updateOptionsDropDown;
+// for QName validation as per http://www.w3.org/TR/REC-xml/#NT-NameChar
+const QNAME_REGEX = /^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i;
+// for ID validation as per BPMN Schema (QName - Namespace)
+const ID_REGEX = /^[a-z_][\w-.]*$/i;
- /**
- * checks whether the id value is valid
- *
- * @param {ModdleElement} bo
- * @param {String} idValue
- * @param {Function} translate
- *
- * @return {String} error message
- */
- function isIdValid(bo, idValue, translate) {
- var assigned = bo.$model.ids.assigned(idValue);
+/**
+ * checks whether the id value is valid
+ *
+ * @param {ModdleElement} element
+ * @param {String} idValue
+ * @param {Function} translate
+ *
+ * @return {String} error message
+ */
+function isIdValid(element, idValue, translate) {
+ const assigned = element.$model.ids.assigned(idValue);
+ const idAlreadyExists = assigned && assigned !== element;
+ if (!idValue) {
+ return translate('ID must not be empty.');
+ }
+ if (idAlreadyExists) {
+ return translate('ID must be unique.');
+ }
+ return validateId(idValue, translate);
+}
+function validateId(idValue, translate) {
+ if (containsSpace(idValue)) {
+ return translate('ID must not contain spaces.');
+ }
+ if (!ID_REGEX.test(idValue)) {
+ if (QNAME_REGEX.test(idValue)) {
+ return translate('ID must not contain prefix.');
+ }
+ return translate('ID must be a valid QName.');
+ }
+}
+function containsSpace(value) {
+ return SPACE_REGEX.test(value);
+}
+
+/**
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
+ */
- var idExists = assigned && assigned !== bo;
+/**
+ * @returns {Array} entries
+ */
+function IdProps() {
+ return [{
+ id: 'id',
+ component: Id$3,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }];
+}
+function Id$3(props) {
+ const {
+ element
+ } = props;
+ const modeling = useService('modeling');
+ const debounce = useService('debounceInput');
+ const translate = useService('translate');
+ const setValue = (value, error) => {
+ if (error) {
+ return;
+ }
+ modeling.updateProperties(element, {
+ id: value
+ });
+ };
+ const getValue = (0,_bpmn_io_properties_panel_preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useCallback)(element => {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element).id;
+ }, [element]);
+ const validate = (0,_bpmn_io_properties_panel_preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useCallback)(value => {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return isIdValid(businessObject, value, translate);
+ }, [element, translate]);
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'id',
+ label: translate((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Participant') ? 'Participant ID' : 'ID'),
+ getValue,
+ setValue,
+ debounce,
+ validate
+ });
+}
+
+/**
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
+ */
- if (!idValue || idExists) {
- return translate('Element must have an unique id.');
- }
+/**
+ * @returns {Array} entries
+ */
+function LinkProps(props) {
+ const {
+ element
+ } = props;
+ if (!isLinkSupported(element)) {
+ return [];
+ }
+ return [{
+ id: 'linkName',
+ component: LinkName,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }];
+}
+function LinkName(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const linkEventDefinition = getLinkEventDefinition(element);
+ const getValue = () => {
+ return linkEventDefinition.get('name');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: linkEventDefinition,
+ properties: {
+ name: value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'linkName',
+ label: translate('Name'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+const EMPTY_OPTION$3 = '';
+const CREATE_NEW_OPTION$2 = 'create-new';
+
+/**
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
+ */
- return validateId(idValue, translate);
- }
+/**
+ * @returns {Array} entries
+ */
+function MessageProps$1(props) {
+ const {
+ element
+ } = props;
+ if (!isMessageSupported(element)) {
+ return [];
+ }
+ const message = getMessage(element);
+ let entries = [{
+ id: 'messageRef',
+ component: MessageRef,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isSelectEntryEdited
+ }];
+ if (message) {
+ entries = [...entries, {
+ id: 'messageName',
+ component: MessageName$1,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }];
+ }
+ return entries;
+}
+function MessageRef(props) {
+ const {
+ element
+ } = props;
+ const bpmnFactory = useService('bpmnFactory');
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const messageEventDefinition = getMessageEventDefinition(element);
+ const getValue = () => {
+ const message = getMessage(element);
+ if (message) {
+ return message.get('id');
+ }
+ return EMPTY_OPTION$3;
+ };
+ const setValue = value => {
+ const root = getRoot(messageEventDefinition);
+ const commands = [];
+ let message;
+
+ // (1) create new message
+ if (value === CREATE_NEW_OPTION$2) {
+ const id = nextId('Message_');
+ message = createElement('bpmn:Message', {
+ id,
+ name: id
+ }, root, bpmnFactory);
+ value = message.get('id');
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: root,
+ properties: {
+ rootElements: [...root.get('rootElements'), message]
+ }
+ }
+ });
+ }
+
+ // (2) update (or remove) messageRef
+ message = message || findRootElementById(messageEventDefinition, 'bpmn:Message', value);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: messageEventDefinition,
+ properties: {
+ messageRef: message
+ }
+ }
+ });
+
+ // (3) commit all updates
+ return commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+ const getOptions = () => {
+ let options = [{
+ value: EMPTY_OPTION$3,
+ label: translate('')
+ }, {
+ value: CREATE_NEW_OPTION$2,
+ label: translate('Create new ...')
+ }];
+ const messages = findRootElementsByType((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element), 'bpmn:Message');
+ sortByName$3(messages).forEach(message => {
+ options.push({
+ value: message.get('id'),
+ label: message.get('name')
+ });
+ });
+ return options;
+ };
+ return ReferenceSelectEntry({
+ element,
+ id: 'messageRef',
+ label: translate('Global message reference'),
+ autoFocusEntry: 'messageName',
+ getValue,
+ setValue,
+ getOptions
+ });
+}
+function MessageName$1(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const message = getMessage(element);
+ const getValue = () => {
+ return message.get('name');
+ };
+ const setValue = value => {
+ return commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: message,
+ properties: {
+ name: value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'messageName',
+ label: translate('Name'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helper /////////////////////////
+
+function sortByName$3(elements) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.sortBy)(elements, e => (e.name || '').toLowerCase());
+}
+
+/**
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
+ */
- module.exports.isIdValid = isIdValid;
+/**
+ * @returns {Array} entries
+ */
+function MultiInstanceProps$2(props) {
+ const {
+ element
+ } = props;
+ if (!isMultiInstanceSupported$1(element)) {
+ return [];
+ }
+ const entries = [{
+ id: 'loopCardinality',
+ component: LoopCardinality,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }, {
+ id: 'completionCondition',
+ component: CompletionCondition$1,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }];
+ return entries;
+}
+function LoopCardinality(props) {
+ const {
+ element
+ } = props;
+ const bpmnFactory = useService('bpmnFactory');
+ const debounce = useService('debounceInput');
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const getValue = () => {
+ return getLoopCardinalityValue(element);
+ };
+ const setValue = value => {
+ return commandStack.execute('element.updateModdleProperties', updateFormalExpression(element, 'loopCardinality', value, bpmnFactory));
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'loopCardinality',
+ label: translate('Loop cardinality'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function CompletionCondition$1(props) {
+ const {
+ element
+ } = props;
+ const bpmnFactory = useService('bpmnFactory');
+ const debounce = useService('debounceInput');
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const getValue = () => {
+ return getCompletionConditionValue(element);
+ };
+ const setValue = value => {
+ return commandStack.execute('element.updateModdleProperties', updateFormalExpression(element, 'completionCondition', value, bpmnFactory));
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'completionCondition',
+ label: translate('Completion condition'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helper ////////////////////////////
+
+// generic ///////////////////////////
+
+/**
+ * isMultiInstanceSupported - check whether given element supports MultiInstanceLoopCharacteristics.
+ *
+ * @param {djs.model.Base} element
+ * @return {boolean}
+ */
+function isMultiInstanceSupported$1(element) {
+ const loopCharacteristics = getLoopCharacteristics$2(element);
+ return !!loopCharacteristics && (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(loopCharacteristics, 'bpmn:MultiInstanceLoopCharacteristics');
+}
+/**
+ * getBody - get the body of a given expression.
+ *
+ * @param {ModdleElement} expression
+ * @return {string} the body (value) of the expression
+ */
+function getBody(expression) {
+ return expression && expression.get('body');
+}
- function validateId(idValue, translate) {
+/**
+ * getProperty - get a property value of the loop characteristics.
+ *
+ * @param {djs.model.Base} element
+ * @param {string} propertyName
+ *
+ * @return {any} the property value
+ */
+function getProperty$2(element, propertyName) {
+ const loopCharacteristics = getLoopCharacteristics$2(element);
+ return loopCharacteristics && loopCharacteristics.get(propertyName);
+}
- if (containsSpace(idValue)) {
- return translate('Id must not contain spaces.');
- }
+/**
+ * getLoopCharacteristics - get loopCharacteristics of a given element.
+ *
+ * @param {djs.model.Base} element
+ * @return {ModdleElement | undefined}
+ */
+function getLoopCharacteristics$2(element) {
+ const bo = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return bo.loopCharacteristics;
+}
- if (!ID_REGEX.test(idValue)) {
+/**
+ * createFormalExpression - creates a 'bpmn:FormalExpression' element.
+ *
+ * @param {ModdleElement} parent
+ * @param {string} body
+ * @param {BpmnFactory} bpmnFactory
+ *
+ * @result {ModdleElement} a formal expression
+ */
+function createFormalExpression$1(parent, body, bpmnFactory) {
+ return createElement('bpmn:FormalExpression', {
+ body: body
+ }, parent, bpmnFactory);
+}
+
+/**
+ * updateFormalExpression - updates a specific formal expression of the loop characteristics.
+ *
+ * @param {djs.model.Base} element
+ * @param {string} propertyName
+ * @param {string} newValue
+ * @param {BpmnFactory} bpmnFactory
+ */
+function updateFormalExpression(element, propertyName, newValue, bpmnFactory) {
+ const loopCharacteristics = getLoopCharacteristics$2(element);
+ const expressionProps = {};
+ if (!newValue) {
+ // remove formal expression
+ expressionProps[propertyName] = undefined;
+ return {
+ element,
+ moddleElement: loopCharacteristics,
+ properties: expressionProps
+ };
+ }
+ const existingExpression = loopCharacteristics.get(propertyName);
+ if (!existingExpression) {
+ // add formal expression
+ expressionProps[propertyName] = createFormalExpression$1(loopCharacteristics, newValue, bpmnFactory);
+ return {
+ element,
+ moddleElement: loopCharacteristics,
+ properties: expressionProps
+ };
+ }
+
+ // edit existing formal expression
+ return {
+ element,
+ moddleElement: existingExpression,
+ properties: {
+ body: newValue
+ }
+ };
+}
+
+// loopCardinality
+
+/**
+ * getLoopCardinality - get the loop cardinality of the loop characteristics.
+ *
+ * @param {djs.model.Base} element
+ *
+ * @return {ModdleElement} an expression representing the loop cardinality
+ */
+function getLoopCardinality(element) {
+ return getProperty$2(element, 'loopCardinality');
+}
- if (QNAME_REGEX.test(idValue)) {
- return translate('Id must not contain prefix.');
- }
+/**
+ * getLoopCardinalityValue - get the loop cardinality value of the loop characteristics.
+ *
+ * @param {djs.model.Base} element
+ *
+ * @return {string} the loop cardinality value
+ */
+function getLoopCardinalityValue(element) {
+ const loopCardinality = getLoopCardinality(element);
+ return getBody(loopCardinality);
+}
- return translate('Id must be a valid QName.');
- }
- }
+// completionCondition /////////////////////
- module.exports.validateId = validateId;
+/**
+ * getCompletionCondition - get the completion condition of the loop characteristics.
+ *
+ * @param {djs.model.Base} element
+ *
+ * @return {ModdleElement} an expression representing the completion condition
+ */
+function getCompletionCondition$1(element) {
+ return getProperty$2(element, 'completionCondition');
+}
+/**
+ * getCompletionConditionValue - get the completion condition value of the loop characteristics.
+ *
+ * @param {djs.model.Base} element
+ *
+ * @return {string} the completion condition value
+ */
+function getCompletionConditionValue(element) {
+ const completionCondition = getCompletionCondition$1(element);
+ return getBody(completionCondition);
+}
- function containsSpace(value) {
- return SPACE_REGEX.test(value);
- }
+/**
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
+ */
- module.exports.containsSpace = containsSpace;
+/**
+ * @returns {Array} entries
+ */
+function NameProps(props) {
+ const {
+ element
+ } = props;
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.isAny)(element, ['bpmn:Collaboration', 'bpmn:DataAssociation', 'bpmn:Association'])) {
+ return [];
+ }
+ return [{
+ id: 'name',
+ component: Name$3,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextAreaEntryEdited
+ }];
+}
+function Name$3(props) {
+ const {
+ element
+ } = props;
+ const modeling = useService('modeling');
+ const debounce = useService('debounceInput');
+ const canvas = useService('canvas');
+ const bpmnFactory = useService('bpmnFactory');
+ const translate = useService('translate');
+
+ // (1) default: name
+ let options = {
+ element,
+ id: 'name',
+ label: translate('Name'),
+ debounce,
+ setValue: value => {
+ modeling.updateProperties(element, {
+ name: value
+ });
+ },
+ getValue: element => {
+ return element.businessObject.name;
+ },
+ autoResize: true
+ };
+
+ // (2) text annotations
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:TextAnnotation')) {
+ options = {
+ ...options,
+ setValue: value => {
+ modeling.updateProperties(element, {
+ text: value
+ });
+ },
+ getValue: element => {
+ return element.businessObject.text;
+ }
+ };
+ }
+
+ // (3) groups
+ else if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Group')) {
+ options = {
+ ...options,
+ setValue: value => {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element),
+ categoryValueRef = businessObject.categoryValueRef;
+ if (!categoryValueRef) {
+ initializeCategory(businessObject, canvas.getRootElement(), bpmnFactory);
+ }
+ modeling.updateLabel(element, value);
+ },
+ getValue: element => {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element),
+ categoryValueRef = businessObject.categoryValueRef;
+ return categoryValueRef && categoryValueRef.value;
+ }
+ };
+ }
+
+ // (4) participants (only update label)
+ else if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Participant')) {
+ options.label = translate('Participant Name');
+ }
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextAreaEntry)(options);
+}
+
+// helpers ////////////////////////
+
+function initializeCategory(businessObject, rootElement, bpmnFactory) {
+ const definitions = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(rootElement).$parent;
+ const categoryValue = createCategoryValue(definitions, bpmnFactory);
+ businessObject.categoryValueRef = categoryValue;
+}
+function createCategoryValue(definitions, bpmnFactory) {
+ const categoryValue = bpmnFactory.create('bpmn:CategoryValue');
+ const category = bpmnFactory.create('bpmn:Category', {
+ categoryValue: [categoryValue]
+ });
+
+ // add to correct place
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_15__.add)(definitions.get('rootElements'), category);
+ (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(category).$parent = definitions;
+ (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(categoryValue).$parent = category;
+ return categoryValue;
+}
+
+/**
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
+ */
- /**
- * generate a semantic id with given prefix
- */
- function nextId(prefix) {
- var ids = new Ids([32,32,1]);
+/**
+ * @returns {Array} entries
+ */
+function ProcessProps(props) {
+ const {
+ element
+ } = props;
+ if (!hasProcessRef(element)) {
+ return [];
+ }
+ return [{
+ id: 'processId',
+ component: ProcessId,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }, {
+ id: 'processName',
+ component: ProcessName,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }];
+}
+function ProcessName(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const process = element.businessObject.get('processRef');
+ const getValue = () => {
+ return process.get('name');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: process,
+ properties: {
+ name: value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'processName',
+ label: translate('Process name'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function ProcessId(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const process = element.businessObject.get('processRef');
+ const getValue = () => {
+ return process.get('id');
+ };
+ const setValue = (value, error) => {
+ if (error) {
+ return;
+ }
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: process,
+ properties: {
+ id: value
+ }
+ });
+ };
+ const validate = (0,_bpmn_io_properties_panel_preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useCallback)(value => {
+ return isIdValid(process, value, translate);
+ }, [process, translate]);
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'processId',
+ label: translate('Process ID'),
+ getValue,
+ setValue,
+ debounce,
+ validate
+ });
+}
+
+// helper ////////////////
+
+function hasProcessRef(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Participant') && element.businessObject.get('processRef');
+}
+
+/**
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
+ */
- return ids.nextPrefixed(prefix);
- }
+const EMPTY_OPTION$2 = '';
+const CREATE_NEW_OPTION$1 = 'create-new';
- module.exports.nextId = nextId;
+/**
+ * @returns {Entry[]}
+ */
+function SignalProps$1(props) {
+ const {
+ element
+ } = props;
+ if (!isSignalSupported$1(element)) {
+ return [];
+ }
+ const signal = getSignal$1(element);
+ let entries = [{
+ id: 'signalRef',
+ component: SignalRef,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isSelectEntryEdited
+ }];
+ if (signal) {
+ entries = [...entries, {
+ id: 'signalName',
+ component: SignalName$1,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }];
+ }
+ return entries;
+}
+function SignalRef(props) {
+ const {
+ element
+ } = props;
+ const bpmnFactory = useService('bpmnFactory');
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const signalEventDefinition = getSignalEventDefinition$1(element);
+ const getValue = () => {
+ const signal = getSignal$1(element);
+ if (signal) {
+ return signal.get('id');
+ }
+ return EMPTY_OPTION$2;
+ };
+ const setValue = value => {
+ const root = getRoot(signalEventDefinition);
+ const commands = [];
+ let signal;
+
+ // (1) create new signal
+ if (value === CREATE_NEW_OPTION$1) {
+ const id = nextId('Signal_');
+ signal = createElement('bpmn:Signal', {
+ id,
+ name: id
+ }, root, bpmnFactory);
+ value = signal.get('id');
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: root,
+ properties: {
+ rootElements: [...root.get('rootElements'), signal]
+ }
+ }
+ });
+ }
+
+ // (2) update (or remove) signalRef
+ signal = signal || findRootElementById(signalEventDefinition, 'bpmn:Signal', value);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: signalEventDefinition,
+ properties: {
+ signalRef: signal
+ }
+ }
+ });
+
+ // (3) commit all updates
+ return commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+ const getOptions = () => {
+ let options = [{
+ value: EMPTY_OPTION$2,
+ label: translate('')
+ }, {
+ value: CREATE_NEW_OPTION$1,
+ label: translate('Create new ...')
+ }];
+ const signals = findRootElementsByType((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element), 'bpmn:Signal');
+ sortByName$2(signals).forEach(signal => {
+ options.push({
+ value: signal.get('id'),
+ label: signal.get('name')
+ });
+ });
+ return options;
+ };
+ return ReferenceSelectEntry({
+ element,
+ id: 'signalRef',
+ label: translate('Global signal reference'),
+ autoFocusEntry: 'signalName',
+ getValue,
+ setValue,
+ getOptions
+ });
+}
+function SignalName$1(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const signal = getSignal$1(element);
+ const getValue = () => {
+ return signal.get('name');
+ };
+ const setValue = value => {
+ return commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: signal,
+ properties: {
+ name: value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'signalName',
+ label: translate('Name'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helper /////////////////////////
+
+function sortByName$2(elements) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.sortBy)(elements, e => (e.name || '').toLowerCase());
+}
+
+function isTimerSupported(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.isAny)(element, ['bpmn:StartEvent', 'bpmn:IntermediateCatchEvent', 'bpmn:BoundaryEvent']) && !!getTimerEventDefinition(element);
+}
+
+/**
+ * Get the timer definition type for a given timer event definition.
+ *
+ * @param {ModdleElement} timer
+ *
+ * @return {string|undefined} the timer definition type
+ */
+function getTimerDefinitionType(timer) {
+ if (!timer) {
+ return;
+ }
+ const timeDate = timer.get('timeDate');
+ if (typeof timeDate !== 'undefined') {
+ return 'timeDate';
+ }
+ const timeCycle = timer.get('timeCycle');
+ if (typeof timeCycle !== 'undefined') {
+ return 'timeCycle';
+ }
+ const timeDuration = timer.get('timeDuration');
+ if (typeof timeDuration !== 'undefined') {
+ return 'timeDuration';
+ }
+}
+function getTimerEventDefinition(element) {
+ return getEventDefinition(element, 'bpmn:TimerEventDefinition');
+}
+function getEventDefinition(element, eventType) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const eventDefinitions = businessObject.get('eventDefinitions') || [];
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.find)(eventDefinitions, function (definition) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(definition, eventType);
+ });
+}
+function getSignalEventDefinition(element) {
+ return getEventDefinition(element, 'bpmn:SignalEventDefinition');
+}
+function isSignalSupported(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Event') && !!getSignalEventDefinition(element);
+}
+function getSignal(element) {
+ const signalEventDefinition = getSignalEventDefinition(element);
+ return signalEventDefinition && signalEventDefinition.get('signalRef');
+}
+
+function TimerProps$2(props) {
+ const {
+ element,
+ idPrefix
+ } = props;
+ let {
+ timerEventDefinition
+ } = props;
+ if (!timerEventDefinition) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ timerEventDefinition = getTimerEventDefinition(businessObject);
+ }
+ const timerEventDefinitionType = getTimerDefinitionType(timerEventDefinition);
+
+ // (1) Only show for supported elements
+ if (!isTimerSupported(element)) {
+ return [];
+ }
+
+ // (2) Provide entries, have a value only if selection was made
+ const entries = [];
+ entries.push({
+ id: getId$1(idPrefix, 'timerEventDefinitionType'),
+ component: TimerEventDefinitionType$2,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isSelectEntryEdited,
+ timerEventDefinition,
+ timerEventDefinitionType
+ });
+ if (timerEventDefinitionType) {
+ entries.push({
+ id: getId$1(idPrefix, 'timerEventDefinitionValue'),
+ component: TimerEventDefinitionValue$2,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited,
+ timerEventDefinition,
+ timerEventDefinitionType
+ });
+ }
+ return entries;
+}
+
+/**
+ * TimerEventDefinitionType - Generic select entry allowing to select a specific
+ * timerEventDefintionType. To be used together with timerEventDefinitionValue.
+ *
+ * @param {type} props
+ * @return {SelectEntry}
+ */
+function TimerEventDefinitionType$2(props) {
+ const {
+ element,
+ timerEventDefinition,
+ timerEventDefinitionType
+ } = props;
+ const commandStack = useService('commandStack'),
+ bpmnFactory = useService('bpmnFactory'),
+ translate = useService('translate');
+ const getValue = () => {
+ return timerEventDefinitionType || '';
+ };
+ const setValue = value => {
+ // (1) Check if value is different to current type
+ if (value === timerEventDefinitionType) {
+ return;
+ }
+
+ // (2) Create empty formalExpression element
+ const formalExpression = bpmnFactory.create('bpmn:FormalExpression', {
+ body: undefined
+ });
+ formalExpression.$parent = timerEventDefinition;
+
+ // (3) Set the value for selected timerEventDefinitionType
+ const newProps = {
+ timeDuration: undefined,
+ timeDate: undefined,
+ timeCycle: undefined
+ };
+ if (value !== '') {
+ newProps[value] = formalExpression;
+ }
+
+ // (4) Execute businessObject update
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: timerEventDefinition,
+ properties: newProps
+ });
+ };
+ const getOptions = element => {
+ return [{
+ value: '',
+ label: translate('')
+ }, {
+ value: 'timeDate',
+ label: translate('Date')
+ }, {
+ value: 'timeDuration',
+ label: translate('Duration')
+ }, {
+ value: 'timeCycle',
+ label: translate('Cycle')
+ }];
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry)({
+ element,
+ id: 'timerEventDefinitionType',
+ label: translate('Type'),
+ getValue,
+ setValue,
+ getOptions
+ });
+}
+
+/**
+ * TimerEventDefinitionValue - Generic textField entry allowing to specify the
+ * timerEventDefintionValue based on the set timerEventDefintionType. To be used
+ * together with timerEventDefinitionType.
+ *
+ * @param {type} props
+ * @return {TextFieldEntry}
+ */
+function TimerEventDefinitionValue$2(props) {
+ const {
+ element,
+ timerEventDefinition,
+ timerEventDefinitionType
+ } = props;
+ const commandStack = useService('commandStack'),
+ translate = useService('translate'),
+ debounce = useService('debounceInput');
+ const timerEventFormalExpression = timerEventDefinition.get(timerEventDefinitionType);
+ const getValue = () => {
+ return timerEventFormalExpression && timerEventFormalExpression.get('body');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: timerEventFormalExpression,
+ properties: {
+ body: value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'timerEventDefinitionValue',
+ label: translate('Value'),
+ getValue,
+ setValue,
+ debounce,
+ tooltip: getTimerEventDefinitionValueDescription$2(timerEventDefinitionType, translate)
+ });
+}
+
+// helper //////////////////////////
+
+function getTimerEventDefinitionValueDescription$2(timerDefinitionType, translate) {
+ switch (timerDefinitionType) {
+ case 'timeDate':
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("p", {
+ children: translate('A specific point in time defined as ISO 8601 combined date and time representation.')
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("ul", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("li", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "2019-10-01T12:00:00Z"
+ }), " - ", translate('UTC time')]
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("li", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "2019-10-02T08:09:40+02:00"
+ }), " - ", translate('UTC plus 2 hours zone offset')]
+ })]
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.org/manual/latest/reference/bpmn20/events/timer-events/#time-date",
+ target: "_blank",
+ rel: "noopener",
+ children: translate('Documentation: Timer events')
+ })]
+ });
+ case 'timeCycle':
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("p", {
+ children: translate('A cycle defined as ISO 8601 repeating intervals format.')
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("ul", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("li", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "R5/PT10S"
+ }), " - ", translate('every 10 seconds, up to 5 times')]
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("li", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "R/P1D"
+ }), " - ", translate('every day, infinitely')]
+ })]
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.org/manual/latest/reference/bpmn20/events/timer-events/#time-cycle",
+ target: "_blank",
+ rel: "noopener",
+ children: translate('Documentation: Timer events')
+ })]
+ });
+ case 'timeDuration':
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("p", {
+ children: translate('A time duration defined as ISO 8601 durations format.')
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("ul", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("li", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "PT15S"
+ }), " - ", translate('15 seconds')]
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("li", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "PT1H30M"
+ }), " - ", translate('1 hour and 30 minutes')]
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("li", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "P14D"
+ }), " - ", translate('14 days')]
+ })]
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.org/manual/latest/reference/bpmn20/events/timer-events/#time-duration",
+ target: "_blank",
+ rel: "noopener",
+ children: translate('Documentation: Timer events')
+ })]
+ });
+ }
+}
+function getId$1(idPrefix, id) {
+ return idPrefix ? idPrefix + id : id;
+}
+
+function GeneralGroup(element, injector) {
+ const translate = injector.get('translate');
+ const entries = [...NameProps({
+ element
+ }), ...IdProps(), ...ProcessProps({
+ element
+ }), ...ExecutableProps({
+ element
+ })];
+ return {
+ id: 'general',
+ label: translate('General'),
+ entries,
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group
+ };
+}
+function CompensationGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Compensation'),
+ id: 'compensation',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group,
+ entries: [...CompensationProps({
+ element
+ })]
+ };
+ if (group.entries.length) {
+ return group;
+ }
+ return null;
+}
+function DocumentationGroup(element, injector) {
+ const translate = injector.get('translate');
+ const entries = [...DocumentationProps({
+ element
+ })];
+ return {
+ id: 'documentation',
+ label: translate('Documentation'),
+ entries,
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group
+ };
+}
+function ErrorGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ id: 'error',
+ label: translate('Error'),
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group,
+ entries: [...ErrorProps$2({
+ element
+ })]
+ };
+ if (group.entries.length) {
+ return group;
+ }
+ return null;
+}
+function MessageGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ id: 'message',
+ label: translate('Message'),
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group,
+ entries: [...MessageProps$1({
+ element
+ })]
+ };
+ if (group.entries.length) {
+ return group;
+ }
+ return null;
+}
+function SignalGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ id: 'signal',
+ label: translate('Signal'),
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group,
+ entries: [...SignalProps$1({
+ element
+ })]
+ };
+ if (group.entries.length) {
+ return group;
+ }
+ return null;
+}
+function LinkGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Link'),
+ id: 'link',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group,
+ entries: [...LinkProps({
+ element
+ })]
+ };
+ if (group.entries.length) {
+ return group;
+ }
+ return null;
+}
+function EscalationGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ id: 'escalation',
+ label: translate('Escalation'),
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group,
+ entries: [...EscalationProps$2({
+ element
+ })]
+ };
+ if (group.entries.length) {
+ return group;
+ }
+ return null;
+}
+function TimerGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Timer'),
+ id: 'timer',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group,
+ entries: [...TimerProps$2({
+ element
+ })]
+ };
+ if (group.entries.length) {
+ return group;
+ }
+ return null;
+}
+function MultiInstanceGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Multi-instance'),
+ id: 'multiInstance',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group,
+ entries: [...MultiInstanceProps$2({
+ element
+ })]
+ };
+ if (group.entries.length) {
+ return group;
+ }
+ return null;
+}
+function getGroups(element, injector) {
+ const groups = [GeneralGroup(element, injector), DocumentationGroup(element, injector), CompensationGroup(element, injector), ErrorGroup(element, injector), LinkGroup(element, injector), MessageGroup(element, injector), MultiInstanceGroup(element, injector), SignalGroup(element, injector), EscalationGroup(element, injector), TimerGroup(element, injector)];
+
+ // contract: if a group returns null, it should not be displayed at all
+ return groups.filter(group => group !== null);
+}
+class BpmnPropertiesProvider {
+ constructor(propertiesPanel, injector) {
+ propertiesPanel.registerProvider(this);
+ this._injector = injector;
+ }
+ getGroups(element) {
+ return groups => {
+ groups = groups.concat(getGroups(element, this._injector));
+ return groups;
+ };
+ }
+}
+BpmnPropertiesProvider.$inject = ['propertiesPanel', 'injector'];
+
+var index$2 = {
+ __init__: ['bpmnPropertiesProvider'],
+ bpmnPropertiesProvider: ['type', BpmnPropertiesProvider]
+};
+
+/**
+ * Get extension elements of business object. Optionally filter by type.
+ *
+ * @param {ModdleElement} businessObject
+ * @param {string} [type=undefined]
+ * @returns {Array}
+ */
+function getExtensionElementsList(businessObject, type = undefined) {
+ const extensionElements = businessObject.get('extensionElements');
+ if (!extensionElements) {
+ return [];
+ }
+ const values = extensionElements.get('values');
+ if (!values || !values.length) {
+ return [];
+ }
+ if (type) {
+ return values.filter(value => (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(value, type));
+ }
+ return values;
+}
+
+/**
+ * Add one or more extension elements. Create bpmn:ExtensionElements if it doesn't exist.
+ *
+ * @param {ModdleElement} element
+ * @param {ModdleElement} businessObject
+ * @param {ModdleElement|Array} extensionElementsToAdd
+ * @param {CommandStack} commandStack
+ */
+function addExtensionElements(element, businessObject, extensionElementToAdd, bpmnFactory, commandStack) {
+ const commands = [];
+ let extensionElements = businessObject.get('extensionElements');
+
+ // (1) create bpmn:ExtensionElements if it doesn't exist
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+ extensionElementToAdd.$parent = extensionElements;
+
+ // (2) add extension element to list
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), extensionElementToAdd]
+ }
+ }
+ });
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+}
+
+/**
+ * Remove one or more extension elements. Remove bpmn:ExtensionElements afterwards if it's empty.
+ *
+ * @param {ModdleElement} element
+ * @param {ModdleElement} businessObject
+ * @param {ModdleElement|Array} extensionElementsToRemove
+ * @param {CommandStack} commandStack
+ */
+function removeExtensionElements(element, businessObject, extensionElementsToRemove, commandStack) {
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_12__.isArray)(extensionElementsToRemove)) {
+ extensionElementsToRemove = [extensionElementsToRemove];
+ }
+ const extensionElements = businessObject.get('extensionElements'),
+ values = extensionElements.get('values').filter(value => !extensionElementsToRemove.includes(value));
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values
+ }
+ });
+}
+
+const fallbackResolver = {
+ getVariablesForElement: bo => (0,_bpmn_io_extract_process_variables_zeebe__WEBPACK_IMPORTED_MODULE_6__.getVariablesForElement)(bo)
+};
+function withVariableContext(Component) {
+ return props => {
+ const {
+ bpmnElement,
+ element
+ } = props;
+ const bo = (bpmnElement || element).businessObject;
+ const [variables, setVariables] = (0,_bpmn_io_properties_panel_preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useState)([]);
+ const eventBus = useService('eventBus');
+ const variableResolver = useServiceIfAvailable('variableResolver', fallbackResolver);
+ (0,_bpmn_io_properties_panel_preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
+ const extractVariables = async () => {
+ const variables = await variableResolver.getVariablesForElement(bo, element);
+ setVariables(variables.map(variable => {
+ return {
+ ...variable,
+ info: variable.info || variable.origin && 'Written in ' + variable.origin.map(origin => origin.name || origin.id).join(', ')
+ };
+ }));
+ };
+
+ // The callback must return undefined, so the event propagation is not canceled.
+ // Cf. https://github.com/camunda/camunda-modeler/issues/3392
+ const callback = () => {
+ extractVariables();
+ };
+ eventBus.on('commandStack.changed', callback);
+ callback();
+ return () => {
+ eventBus.off('commandStack.changed', callback);
+ };
+ }, [bo]);
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(Component, {
+ ...props,
+ variables: variables
+ });
+ };
+}
+
+// helpers //////////
+
+function useServiceIfAvailable(service, fallback) {
+ const resolved = useService(service, false);
+ if (!resolved) {
+ return fallback;
+ }
+ return resolved;
+}
+
+function withTooltipContainer(Component) {
+ return props => {
+ const tooltipContainer = (0,_bpmn_io_properties_panel_preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {
+ const config = useService('config');
+ return config && config.propertiesPanel && config.propertiesPanel.feelTooltipContainer;
+ }, []);
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(Component, {
+ ...props,
+ tooltipContainer: tooltipContainer
+ });
+ };
+}
+
+const FeelEntry = withTooltipContainer(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.FeelEntry);
+const FeelEntryWithVariableContext = withVariableContext(FeelEntry);
+
+function AssignmentDefinitionProps(props) {
+ const {
+ element
+ } = props;
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:UserTask')) {
+ return [];
+ }
+ return [{
+ id: 'assignmentDefinitionAssignee',
+ component: Assignee$1,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isFeelEntryEdited
+ }, {
+ id: 'assignmentDefinitionCandidateGroups',
+ component: CandidateGroups$1,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isFeelEntryEdited
+ }, {
+ id: 'assignmentDefinitionCandidateUsers',
+ component: CandidateUsers$1,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isFeelEntryEdited
+ }];
+}
+function Assignee$1(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const bpmnFactory = useService('bpmnFactory');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return (getAssignmentDefinition(element) || {}).assignee;
+ };
+ const setValue = value => {
+ const commands = [];
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ let extensionElements = businessObject.get('extensionElements');
+
+ // (1) ensure extension elements
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+
+ // (2) ensure AssignmentDefinition
+ let assignmentDefinition = getAssignmentDefinition(element);
+ if (!assignmentDefinition) {
+ assignmentDefinition = createElement('zeebe:AssignmentDefinition', {}, extensionElements, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), assignmentDefinition]
+ }
+ }
+ });
+ }
+
+ // (3) update assignee definition type
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: assignmentDefinition,
+ properties: {
+ assignee: value
+ }
+ }
+ });
+
+ // (4) commit all updates
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+ return FeelEntryWithVariableContext({
+ element,
+ id: 'assignmentDefinitionAssignee',
+ label: translate('Assignee'),
+ feel: 'optional',
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function CandidateGroups$1(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const bpmnFactory = useService('bpmnFactory');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return (getAssignmentDefinition(element) || {}).candidateGroups;
+ };
+ const setValue = value => {
+ let commands = [];
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ let extensionElements = businessObject.get('extensionElements');
+
+ // (1) ensure extension elements
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+
+ // (2) ensure assignmentDefinition
+ let assignmentDefinition = getAssignmentDefinition(element);
+ if (!assignmentDefinition) {
+ assignmentDefinition = createElement('zeebe:AssignmentDefinition', {}, extensionElements, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), assignmentDefinition]
+ }
+ }
+ });
+ }
+
+ // (3) update candidateGroups
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: assignmentDefinition,
+ properties: {
+ candidateGroups: value
+ }
+ }
+ });
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+ return FeelEntryWithVariableContext({
+ element,
+ id: 'assignmentDefinitionCandidateGroups',
+ label: translate('Candidate groups'),
+ feel: 'optional',
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function CandidateUsers$1(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const bpmnFactory = useService('bpmnFactory');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return (getAssignmentDefinition(element) || {}).candidateUsers;
+ };
+ const setValue = value => {
+ let commands = [];
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ let extensionElements = businessObject.get('extensionElements');
+
+ // (1) ensure extension elements
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+
+ // (2) ensure assignmentDefinition
+ let assignmentDefinition = getAssignmentDefinition(element);
+ if (!assignmentDefinition) {
+ assignmentDefinition = createElement('zeebe:AssignmentDefinition', {}, extensionElements, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), assignmentDefinition]
+ }
+ }
+ });
+ }
+
+ // (3) update candidateUsers
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: assignmentDefinition,
+ properties: {
+ candidateUsers: value
+ }
+ }
+ });
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+ return FeelEntryWithVariableContext({
+ element,
+ id: 'assignmentDefinitionCandidateUsers',
+ label: translate('Candidate users'),
+ feel: 'optional',
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helper ///////////////////////
+
+function getAssignmentDefinition(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return getExtensionElementsList(businessObject, 'zeebe:AssignmentDefinition')[0];
+}
+
+function isZeebeServiceTask(element) {
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'zeebe:ZeebeServiceTask')) return false;
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:EndEvent') || (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:IntermediateThrowEvent')) {
+ return !!getMessageEventDefinition(element);
+ }
+
+ // BusinessRuleTask and ScriptTask are ServiceTasks only if they have a TaskDefinition
+ // (ie. if the implementation is set to ==JobWorker)
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.isAny)(element, ['bpmn:BusinessRuleTask', 'bpmn:ScriptTask']) && !getTaskDefinition$3(element)) {
+ return false;
+ }
+ return true;
+}
+function isMessageEndEvent(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:EndEvent') && !!getMessageEventDefinition(element);
+}
+function isMessageThrowEvent(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:IntermediateThrowEvent') && !!getMessageEventDefinition(element);
+}
+
+// helper ////////////////
+
+function getTaskDefinition$3(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return getExtensionElementsList(businessObject, 'zeebe:TaskDefinition')[0];
+}
+
+function areHeadersSupported(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:UserTask') || isZeebeServiceTask(element);
+}
+
+/**
+ * Get first zeebe:TaskHeaders element for a specific element.
+ *
+ * @param {ModdleElement} element
+ *
+ * @return {ModdleElement} a zeebe:TaskHeader element
+ */
+function getTaskHeaders$1(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return getExtensionElementsList(businessObject, 'zeebe:TaskHeaders')[0];
+}
+/**
+ * Retrieve all zeebe:Header elements for a specific element.
+ *
+ * @param {ModdleElement} element
+ *
+ * @return {Array} a list of zeebe:Header elements
+ */
+function getHeaders(element) {
+ const taskHeaders = getTaskHeaders$1(element);
+ return taskHeaders ? taskHeaders.get('values') : [];
+}
+
+const DMN_IMPLEMENTATION_OPTION = 'dmn',
+ JOB_WORKER_IMPLEMENTATION_OPTION$1 = 'jobWorker',
+ DEFAULT_IMPLEMENTATION_OPTION$1 = '';
+function BusinessRuleImplementationProps(props) {
+ const {
+ element
+ } = props;
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:BusinessRuleTask')) {
+ return [];
+ }
+ return [{
+ id: 'businessRuleImplementation',
+ component: BusinessRuleImplementation,
+ isEdited: () => isBusinessRuleImplementationEdited(element)
+ }];
+}
+function BusinessRuleImplementation(props) {
+ const {
+ element,
+ id
+ } = props;
+ const commandStack = useService('commandStack');
+ const bpmnFactory = useService('bpmnFactory');
+ const translate = useService('translate');
+ const getValue = () => {
+ if (getCalledDecision$1(element)) {
+ return DMN_IMPLEMENTATION_OPTION;
+ }
+ if (getTaskDefinition$2(element)) {
+ return JOB_WORKER_IMPLEMENTATION_OPTION$1;
+ }
+ return DEFAULT_IMPLEMENTATION_OPTION$1;
+ };
+
+ /**
+ * Set value by either creating a zeebe:calledDecision or a zeebe:taskDefintion
+ * extension element. Note that they must not exist both at the same time, however
+ * this will be ensured by a bpmn-js behavior (and not by the propPanel).
+ */
+ const setValue = value => {
+ let extensionElement, extensionElementType;
+ if (value === DMN_IMPLEMENTATION_OPTION) {
+ extensionElement = getCalledDecision$1(element);
+ extensionElementType = 'zeebe:CalledDecision';
+ } else if (value === JOB_WORKER_IMPLEMENTATION_OPTION$1) {
+ extensionElement = getTaskDefinition$2(element);
+ extensionElementType = 'zeebe:TaskDefinition';
+ } else {
+ resetElement$1(element, commandStack);
+ }
+ if (!extensionElement && extensionElementType) {
+ extensionElement = createElement(extensionElementType, {}, null, bpmnFactory);
+ updateExtensionElements$1(element, extensionElement, bpmnFactory, commandStack);
+ }
+ };
+ const getOptions = () => {
+ const options = [{
+ value: DEFAULT_IMPLEMENTATION_OPTION$1,
+ label: translate('')
+ }, {
+ value: DMN_IMPLEMENTATION_OPTION,
+ label: translate('DMN decision')
+ }, {
+ value: JOB_WORKER_IMPLEMENTATION_OPTION$1,
+ label: translate('Job worker')
+ }];
+ return options;
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry)({
+ element,
+ id,
+ label: translate('Implementation'),
+ getValue,
+ setValue,
+ getOptions
+ });
+}
+
+// helper ///////////////////////
+
+function getTaskDefinition$2(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return getExtensionElementsList(businessObject, 'zeebe:TaskDefinition')[0];
+}
+function getCalledDecision$1(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return getExtensionElementsList(businessObject, 'zeebe:CalledDecision')[0];
+}
+function isBusinessRuleImplementationEdited(element) {
+ return getTaskDefinition$2(element);
+}
+function resetElement$1(element, commandStack) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const toRemove = [getTaskDefinition$2(element), getTaskHeaders$1(element), getCalledDecision$1(element)].filter(Boolean);
+ removeExtensionElements(element, businessObject, toRemove, commandStack);
+}
+function updateExtensionElements$1(element, extensionElementToAdd, bpmnFactory, commandStack) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const commands = [];
+ let extensionElements = businessObject.get('extensionElements');
+ let extensionElementValues;
+
+ // (1) create bpmn:ExtensionElements if it doesn't exist
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+ extensionElementToAdd.$parent = extensionElements;
+
+ // (2) remove old exension element from extensionElements
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(extensionElementToAdd, 'zeebe:TaskDefinition')) {
+ extensionElementValues = (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(extensionElements.get('values'), getCalledDecision$1(element));
+ } else if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(extensionElementToAdd, 'zeebe:CalledDecision')) {
+ extensionElementValues = (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(extensionElements.get('values'), getTaskDefinition$2(element));
+ }
+
+ // (3) add extension element to list
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElementValues, extensionElementToAdd]
+ }
+ }
+ });
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+}
+
+function CalledDecisionProps(props) {
+ const {
+ element
+ } = props;
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:BusinessRuleTask') || !getCalledDecision(element)) {
+ return [];
+ }
+ return [{
+ id: 'decisionId',
+ component: DecisionID,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isFeelEntryEdited
+ }, {
+ id: 'resultVariable',
+ component: ResultVariable$4,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }];
+}
+function DecisionID(props) {
+ const {
+ element,
+ id
+ } = props;
+ const commandStack = useService('commandStack');
+ const bpmnFactory = useService('bpmnFactory');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return (getCalledDecision(element) || {}).decisionId;
+ };
+ const setValue = value => {
+ const commands = [];
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ let extensionElements = businessObject.get('extensionElements');
+
+ // (1) ensure extension elements
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+
+ // (2) ensure calledDecision
+ let calledDecision = getCalledDecision(element);
+ if (!calledDecision) {
+ calledDecision = createElement('zeebe:CalledDecision', {}, extensionElements, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), calledDecision]
+ }
+ }
+ });
+ }
+
+ // (3) update caledDecision.decisionId
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: calledDecision,
+ properties: {
+ decisionId: value
+ }
+ }
+ });
+
+ // (4) commit all updates
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+ return FeelEntryWithVariableContext({
+ element,
+ id,
+ label: translate('Decision ID'),
+ feel: 'optional',
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function ResultVariable$4(props) {
+ const {
+ element,
+ id
+ } = props;
+ const commandStack = useService('commandStack');
+ const bpmnFactory = useService('bpmnFactory');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return (getCalledDecision(element) || {}).resultVariable;
+ };
+ const setValue = value => {
+ const commands = [];
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ let extensionElements = businessObject.get('extensionElements');
+
+ // (1) ensure extension elements
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+
+ // (2) ensure calledDecision
+ let calledDecision = getCalledDecision(element);
+ if (!calledDecision) {
+ calledDecision = createElement('zeebe:CalledDecision', {}, extensionElements, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), calledDecision]
+ }
+ }
+ });
+ }
+
+ // (3) update caledDecision.decisionId
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: calledDecision,
+ properties: {
+ resultVariable: value
+ }
+ }
+ });
+
+ // (4) commit all updates
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id,
+ label: translate('Result variable'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helper ///////////////////////
+
+function getCalledDecision(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return getExtensionElementsList(businessObject, 'zeebe:CalledDecision')[0];
+}
+
+function ConditionProps$1(props) {
+ const {
+ element
+ } = props;
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:SequenceFlow')) {
+ return [];
+ }
+ const conditionProps = [];
+ if (isConditionalSource$1(element.source)) {
+ conditionProps.push({
+ id: 'conditionExpression',
+ component: ConditionExpression$1,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isFeelEntryEdited
+ });
+ }
+ return conditionProps;
+}
+function ConditionExpression$1(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack'),
+ bpmnFactory = useService('bpmnFactory'),
+ translate = useService('translate'),
+ debounce = useService('debounceInput');
+ const getValue = () => {
+ return getConditionExpression$1(element);
+ };
+ const setValue = value => {
+ const commands = [];
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+
+ // (1) If we set value to a default flow, make it a non-default flow
+ // by updating the element source
+ const source = element.source;
+ if (source.businessObject.default === businessObject) {
+ commands.push({
+ cmd: 'element.updateProperties',
+ context: {
+ element: source,
+ properties: {
+ 'default': undefined
+ }
+ }
+ });
+ }
+
+ // (2) Create and set formalExpression element containing the conditionExpression,
+ // unless the provided value is empty
+ const formalExpressionElement = value && value != '' ? createElement('bpmn:FormalExpression', {
+ body: value
+ }, businessObject, bpmnFactory) : undefined;
+ commands.push({
+ cmd: 'element.updateProperties',
+ context: {
+ element: element,
+ properties: {
+ conditionExpression: formalExpressionElement
+ }
+ }
+ });
+
+ // (3) Execute the commands
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+ return FeelEntryWithVariableContext({
+ element,
+ id: 'conditionExpression',
+ label: translate('Condition expression'),
+ feel: 'required',
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helper //////////////////////////
+
+const CONDITIONAL_SOURCES$1 = ['bpmn:Activity', 'bpmn:ExclusiveGateway', 'bpmn:InclusiveGateway'];
+function isConditionalSource$1(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.isAny)(element, CONDITIONAL_SOURCES$1);
+}
+
+/**
+ * getConditionExpression - get the body value of a condition expression for a given element
+ *
+ * @param {ModdleElement} element
+ *
+ * @return {string|undefined}
+ */
+function getConditionExpression$1(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const conditionExpression = businessObject.conditionExpression;
+ if (conditionExpression) {
+ return conditionExpression.get('body');
+ }
+}
+
+function ErrorProps$1(props) {
+ const {
+ element
+ } = props;
+ const error = getError(element);
+ const entries = [];
+ if (error && (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:ThrowEvent')) {
+ entries.push({
+ id: 'errorCode',
+ component: ErrorCode$1,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isFeelEntryEdited
+ });
+ }
+ return entries;
+}
+function ErrorCode$1(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const error = getError(element);
+ const getValue = () => {
+ return error.get('errorCode');
+ };
+ const setValue = value => {
+ return commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: error,
+ properties: {
+ errorCode: value
+ }
+ });
+ };
+ return FeelEntryWithVariableContext({
+ element,
+ id: 'errorCode',
+ label: translate('Code'),
+ feel: 'optional',
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+/**
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
+ */
- function triggerClickEvent(element) {
- var evt;
- var eventType = 'click';
+/**
+ * @returns {Array} entries
+ */
+function EscalationProps$1(props) {
+ const {
+ element
+ } = props;
+
+ // update throw events only
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:ThrowEvent')) {
+ return [];
+ }
+ const escalation = getEscalation(element);
+ const entries = [];
+ if (escalation) {
+ entries.push({
+ id: 'escalationCode',
+ component: EscalationCode,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isFeelEntryEdited
+ });
+ }
+ return entries;
+}
+function EscalationCode(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const escalation = getEscalation(element);
+ const getValue = () => {
+ return escalation.get('escalationCode');
+ };
+ const setValue = value => {
+ return commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: escalation,
+ properties: {
+ escalationCode: value
+ }
+ });
+ };
+ return FeelEntryWithVariableContext({
+ element,
+ id: 'escalationCode',
+ label: translate('Code'),
+ feel: 'optional',
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+const FORM_KEY_PREFIX = 'camunda-forms:bpmn:',
+ USER_TASK_FORM_ID_PREFIX = 'UserTaskForm_';
+const FORM_TYPES = {
+ CAMUNDA_FORM_EMBEDDED: 'camunda-form-embedded',
+ CAMUNDA_FORM_LINKED: 'camunda-form-linked',
+ CUSTOM_FORM: 'custom-form'
+};
+function getFormDefinition(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const formDefinitions = getExtensionElementsList(businessObject, 'zeebe:FormDefinition');
+ return formDefinitions[0];
+}
+function getUserTaskForm(element, rootElement) {
+ rootElement = rootElement || getRootElement$1(element);
+ const formDefinition = getFormDefinition(element);
+ if (!formDefinition) {
+ return;
+ }
+ const formKey = formDefinition.get('formKey');
+ const userTaskForms = getExtensionElementsList(rootElement, 'zeebe:UserTaskForm');
+ return userTaskForms.find(userTaskForm => {
+ return userTaskFormIdToFormKey(userTaskForm.get('id')) === formKey;
+ });
+}
+function userTaskFormIdToFormKey(userTaskFormId) {
+ return `${FORM_KEY_PREFIX}${userTaskFormId}`;
+}
+function createUserTaskFormId() {
+ return nextId(USER_TASK_FORM_ID_PREFIX);
+}
+function getRootElement$1(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ let parent = businessObject;
+ while (parent.$parent && !(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(parent, 'bpmn:Process')) {
+ parent = parent.$parent;
+ }
+ return parent;
+}
+function getFormType$1(element) {
+ const formDefinition = getFormDefinition(element);
+ if (!formDefinition) {
+ return;
+ }
+ const formId = formDefinition.get('formId'),
+ formKey = formDefinition.get('formKey');
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_12__.isDefined)(formId)) {
+ return FORM_TYPES.CAMUNDA_FORM_LINKED;
+ }
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_12__.isDefined)(formKey)) {
+ if (getUserTaskForm(element)) {
+ return FORM_TYPES.CAMUNDA_FORM_EMBEDDED;
+ }
+ return FORM_TYPES.CUSTOM_FORM;
+ }
+}
+
+function FormProps$1(props) {
+ const {
+ element
+ } = props;
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:UserTask')) {
+ return [];
+ }
+ const entries = [{
+ id: 'formType',
+ component: FormType$1,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isSelectEntryEdited
+ }];
+ const formType = getFormType$1(element);
+ if (formType === FORM_TYPES.CAMUNDA_FORM_EMBEDDED) {
+ entries.push({
+ id: 'formConfiguration',
+ component: FormConfiguration,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextAreaEntryEdited
+ });
+ } else if (formType === FORM_TYPES.CAMUNDA_FORM_LINKED) {
+ entries.push({
+ id: 'formId',
+ component: FormId,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ } else if (formType === FORM_TYPES.CUSTOM_FORM) {
+ entries.push({
+ id: 'customFormKey',
+ component: CustomFormKey,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ }
+ return entries;
+}
+function FormType$1(props) {
+ const {
+ element
+ } = props;
+ const injector = useService('injector'),
+ translate = useService('translate');
+ const getValue = () => {
+ return getFormType$1(element) || '';
+ };
+ const setValue = value => {
+ if (value === FORM_TYPES.CAMUNDA_FORM_EMBEDDED) {
+ setUserTaskForm(injector, element, '');
+ } else if (value === FORM_TYPES.CAMUNDA_FORM_LINKED) {
+ setFormId(injector, element, '');
+ } else if (value === FORM_TYPES.CUSTOM_FORM) {
+ setCustomFormKey(injector, element, '');
+ } else {
+ removeFormDefinition(injector, element);
+ }
+ };
+ const getOptions = () => {
+ return [{
+ value: '',
+ label: translate('')
+ }, {
+ value: FORM_TYPES.CAMUNDA_FORM_LINKED,
+ label: translate('Camunda Form (linked)')
+ }, {
+ value: FORM_TYPES.CAMUNDA_FORM_EMBEDDED,
+ label: translate('Camunda Form (embedded)')
+ }, {
+ value: FORM_TYPES.CUSTOM_FORM,
+ label: translate('Custom form key')
+ }];
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry)({
+ element,
+ id: 'formType',
+ label: translate('Type'),
+ getValue,
+ setValue,
+ getOptions
+ });
+}
+function FormConfiguration(props) {
+ const {
+ element
+ } = props;
+ const debounce = useService('debounceInput'),
+ injector = useService('injector'),
+ translate = useService('translate');
+ const getValue = () => {
+ return getUserTaskForm(element).get('body');
+ };
+ const setValue = value => {
+ setUserTaskForm(injector, element, (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.isUndefined)(value) ? '' : value);
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextAreaEntry)({
+ element,
+ id: 'formConfiguration',
+ label: translate('Form JSON configuration'),
+ rows: 4,
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function FormId(props) {
+ const {
+ element
+ } = props;
+ const debounce = useService('debounceInput'),
+ injector = useService('injector'),
+ translate = useService('translate');
+ const getValue = () => {
+ return getFormDefinition(element).get('formId');
+ };
+ const setValue = value => {
+ setFormId(injector, element, (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.isUndefined)(value) ? '' : value);
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'formId',
+ label: translate('Form ID'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function CustomFormKey(props) {
+ const {
+ element
+ } = props;
+ const debounce = useService('debounceInput'),
+ injector = useService('injector'),
+ translate = useService('translate');
+ const getValue = () => {
+ return getFormDefinition(element).get('formKey');
+ };
+ const setValue = value => {
+ setCustomFormKey(injector, element, (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.isUndefined)(value) ? '' : value);
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'customFormKey',
+ label: translate('Form key'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helpers /////////////
+
+/**
+ * @typedef { { cmd: string, context: Object } } Command
+ * @typedef {Command[]} Commands
+ *
+ * @typedef {import('diagram-js/lib/model/Types').Element} Element
+ * @typedef {import('bpmn-js/lib/model/Types').ModdleElement} ModdleElement
+ *
+ * @param {import('didi').Injector} Injector
+ */
- if (document.createEvent) {
- try {
- // Chrome, Safari, Firefox
- evt = new MouseEvent((eventType), { view: window, bubbles: true, cancelable: true });
- } catch (e) {
- // IE 11, PhantomJS (wat!)
- evt = document.createEvent('MouseEvent');
+/**
+ * @param {Injector} injector
+ * @param {Element} element
+ *
+ * @returns { {
+ * commands: Commands,
+ * extensionElements: ModdleElement
+ * } }
+ */
+function getOrCreateExtensionElements(injector, element, moddleElement) {
+ const businessObject = moddleElement || (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ let extensionElements = businessObject.get('extensionElements');
+ if (extensionElements) {
+ return {
+ commands: [],
+ extensionElements
+ };
+ }
+ const bpmnFactory = injector.get('bpmnFactory');
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ return {
+ commands: [createUpdateModdlePropertiesCommand(element, businessObject, {
+ extensionElements
+ })],
+ extensionElements
+ };
+}
+
+/**
+ * @param {Injector} injector
+ * @param {Element} element
+ *
+ * @returns { {
+* commands: Commands,
+* formDefinition: ModdleElement
+* } }
+*/
+function getOrCreateFormDefintition(injector, element) {
+ let formDefinition = getFormDefinition(element);
+ if (formDefinition) {
+ return {
+ commands: [],
+ formDefinition
+ };
+ }
+ const {
+ extensionElements,
+ commands
+ } = getOrCreateExtensionElements(injector, element);
+ formDefinition = createFormDefinition(injector, {}, extensionElements);
+ return {
+ commands: [...commands, createUpdateModdlePropertiesCommand(element, extensionElements, {
+ values: [...extensionElements.get('values'), formDefinition]
+ })],
+ formDefinition
+ };
+}
+
+/**
+ * @param {Injector} injector
+ * @param {Element} element
+ *
+ * @returns { {
+ * commands: Commands,
+ * formDefinition: ModdleElement,
+ * userTaskForm: ModdleElement
+ * } }
+ */
+function getOrCreateUserTaskForm(injector, element) {
+ let userTaskForm = getUserTaskForm(element);
+ if (userTaskForm) {
+ return {
+ commands: [],
+ formDefinition: getFormDefinition(element),
+ userTaskForm
+ };
+ }
+ const rootElement = getRootElement$1(element);
+ const {
+ extensionElements,
+ commands: extensionElementsCommands
+ } = getOrCreateExtensionElements(injector, element, rootElement);
+ const {
+ formDefinition,
+ commands: formDefinitionCommands
+ } = getOrCreateFormDefintition(injector, element);
+ const formId = createUserTaskFormId();
+ userTaskForm = createUserTaskForm(injector, {
+ id: formId
+ }, extensionElements);
+ return {
+ commands: [...extensionElementsCommands, ...formDefinitionCommands, createUpdateModdlePropertiesCommand(element, extensionElements, {
+ values: [...extensionElements.get('values'), userTaskForm]
+ }), createUpdateModdlePropertiesCommand(element, formDefinition, {
+ formKey: userTaskFormIdToFormKey(formId)
+ })],
+ formDefinition,
+ userTaskForm
+ };
+}
+function setFormId(injector, element, formId) {
+ let {
+ commands,
+ formDefinition
+ } = getOrCreateFormDefintition(injector, element);
+ const commandStack = injector.get('commandStack');
+ commandStack.execute('properties-panel.multi-command-executor', [...commands, createUpdateModdlePropertiesCommand(element, formDefinition, {
+ formId
+ })]);
+}
+function setCustomFormKey(injector, element, formKey) {
+ let {
+ commands,
+ formDefinition
+ } = getOrCreateFormDefintition(injector, element);
+ const commandStack = injector.get('commandStack');
+ commandStack.execute('properties-panel.multi-command-executor', [...commands, createUpdateModdlePropertiesCommand(element, formDefinition, {
+ formKey
+ })]);
+}
+function setUserTaskForm(injector, element, body) {
+ let {
+ commands,
+ userTaskForm
+ } = getOrCreateUserTaskForm(injector, element);
+ const commandStack = injector.get('commandStack');
+ commandStack.execute('properties-panel.multi-command-executor', [...commands, createUpdateModdlePropertiesCommand(element, userTaskForm, {
+ body
+ })]);
+}
+function removeFormDefinition(injector, element) {
+ const formDefinition = getFormDefinition(element);
+
+ /**
+ * @type {import('bpmn-js/lib/features/modeling/Modeling').default}
+ */
+ const modeling = injector.get('modeling');
+ if (formDefinition) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element),
+ extensionElements = businessObject.get('extensionElements');
+ modeling.updateModdleProperties(element, extensionElements, {
+ values: (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(extensionElements.get('values'), formDefinition)
+ });
+ }
+}
+
+/**
+ * @param {Injector} injector
+ * @param {Object} properties
+ * @param {ModdleElement} parent
+ *
+ * @returns {ModdleElement}
+ */
+function createFormDefinition(injector, properties, parent) {
+ const bpmnFactory = injector.get('bpmnFactory');
+ return createElement('zeebe:FormDefinition', properties, parent, bpmnFactory);
+}
+
+/**
+ * @param {Injector} injector
+ * @param {Object} properties
+ * @param {ModdleElement} parent
+ *
+ * @returns {ModdleElement}
+ */
+function createUserTaskForm(injector, properties, parent) {
+ const bpmnFactory = injector.get('bpmnFactory');
+ return createElement('zeebe:UserTaskForm', properties, parent, bpmnFactory);
+}
+
+/**
+ * @param {Element} element
+ * @param {ModdleElement} moddleElement
+ * @param {Object} properties
+ *
+ * @returns {Command}
+ */
+function createUpdateModdlePropertiesCommand(element, moddleElement, properties) {
+ return {
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement,
+ properties
+ }
+ };
+}
+
+function Header(props) {
+ const {
+ idPrefix,
+ header
+ } = props;
+ const entries = [{
+ id: idPrefix + '-key',
+ component: KeyProperty,
+ header,
+ idPrefix
+ }, {
+ id: idPrefix + '-value',
+ component: ValueProperty$2,
+ header,
+ idPrefix
+ }];
+ return entries;
+}
+function KeyProperty(props) {
+ const {
+ idPrefix,
+ element,
+ header
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: header,
+ properties: {
+ key: value
+ }
+ });
+ };
+ const getValue = header => {
+ return header.key;
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element: header,
+ id: idPrefix + '-key',
+ label: translate('Key'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function ValueProperty$2(props) {
+ const {
+ idPrefix,
+ element,
+ header
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: header,
+ properties: {
+ value
+ }
+ });
+ };
+ const getValue = header => {
+ return header.value;
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element: header,
+ id: idPrefix + '-value',
+ label: translate('Value'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+function HeaderProps({
+ element,
+ injector
+}) {
+ if (!areHeadersSupported(element)) {
+ return null;
+ }
+ const headers = getHeaders(element) || [];
+ const bpmnFactory = injector.get('bpmnFactory'),
+ commandStack = injector.get('commandStack');
+ const items = headers.map((header, index) => {
+ const id = element.id + '-header-' + index;
+ return {
+ id,
+ label: header.get('key') || '',
+ entries: Header({
+ idPrefix: id,
+ element,
+ header
+ }),
+ autoFocusEntry: id + '-key',
+ remove: removeFactory$c({
+ commandStack,
+ element,
+ header
+ })
+ };
+ });
+ return {
+ items,
+ add: addFactory$9({
+ bpmnFactory,
+ commandStack,
+ element
+ }),
+ shouldSort: false
+ };
+}
+function removeFactory$c({
+ commandStack,
+ element,
+ header
+}) {
+ return function (event) {
+ event.stopPropagation();
+ let commands = [];
+ const taskHeaders = getTaskHeaders$1(element);
+ if (!taskHeaders) {
+ return;
+ }
+ const newTaskHeaders = (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(taskHeaders.get('values'), header);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: taskHeaders,
+ properties: {
+ values: newTaskHeaders
+ }
+ }
+ });
+
+ // remove zeebe:TaskHeaders if there are no headers anymore
+ if (!newTaskHeaders.length) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element),
+ extensionElements = businessObject.get('extensionElements');
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(extensionElements.get('values'), taskHeaders)
+ }
+ }
+ });
+ }
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+}
+function addFactory$9({
+ bpmnFactory,
+ commandStack,
+ element
+}) {
+ return function (event) {
+ event.stopPropagation();
+ let commands = [];
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ let extensionElements = businessObject.get('extensionElements');
+
+ // (1) ensure extension elements
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+
+ // (2) ensure zeebe:TaskHeaders
+ let taskHeaders = getTaskHeaders$1(element);
+ if (!taskHeaders) {
+ const parent = extensionElements;
+ taskHeaders = createElement('zeebe:TaskHeaders', {
+ values: []
+ }, parent, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), taskHeaders]
+ }
+ }
+ });
+ }
+
+ // (3) create header
+ const header = createElement('zeebe:Header', {}, taskHeaders, bpmnFactory);
+
+ // (4) add header to list
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: taskHeaders,
+ properties: {
+ values: [...taskHeaders.get('values'), header]
+ }
+ }
+ });
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+}
+
+function getProcessId(element) {
+ const calledElement = getCalledElement(element);
+ return calledElement ? calledElement.get('processId') : '';
+}
+function getCalledElement(element) {
+ const calledElements = getCalledElements(element);
+ return calledElements[0];
+}
+function getCalledElements(element) {
+ const bo = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const extElements = getExtensionElementsList(bo, 'zeebe:CalledElement');
+ return extElements;
+}
+
+function InputPropagationProps(props) {
+ const {
+ element
+ } = props;
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:CallActivity')) {
+ return [];
+ }
+ return [{
+ id: 'propagateAllParentVariables',
+ component: PropagateAllParentVariables,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isToggleSwitchEntryEdited
+ }];
+}
+function PropagateAllParentVariables(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack'),
+ bpmnFactory = useService('bpmnFactory'),
+ translate = useService('translate');
+ const propagateAllParentVariables = isPropagateAllParentVariables(element);
+ const getValue = () => {
+ return propagateAllParentVariables;
+ };
+ const setValue = value => {
+ const commands = [];
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+
+ // (1) ensure extension elements
+ let extensionElements = businessObject.get('extensionElements');
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+
+ // (2) ensure zeebe:calledElement
+ let calledElement = getCalledElement(businessObject);
+ if (!calledElement) {
+ calledElement = createElement('zeebe:CalledElement', {}, extensionElements, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), calledElement]
+ }
+ }
+ });
+ }
+
+ // (3) Update propagateAllParentVariables attribute
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: calledElement,
+ properties: {
+ propagateAllParentVariables: value
+ }
+ }
+ });
+
+ // (4) Execute the commands
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.ToggleSwitchEntry)({
+ id: 'propagateAllParentVariables',
+ label: translate('Propagate all parent process variables'),
+ switcherLabel: propagateAllParentVariables ? translate('On') : translate('Off'),
+ tooltip: (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("p", {
+ children: translate('If turned on, all variables from the parent process instance will be propagated to the child process instance.')
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("p", {
+ children: translate('Otherwise, only variables defined via input mappings will be propagated.')
+ })]
+ }),
+ getValue,
+ setValue
+ });
+}
+
+// helper //////////////////////////
+
+/**
+ * Check whether the propagateAllParentVariables attribute is set on an element.
+ * @param {Object} element
+ *
+ * @returns {boolean}
+ */
+function isPropagateAllParentVariables(element) {
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:CallActivity')) {
+ return undefined;
+ }
+ const bo = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element),
+ calledElement = getCalledElement(bo);
+ return calledElement && (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.has)(calledElement, 'propagateAllParentVariables') ? calledElement.get('propagateAllParentVariables') : /* default value */true;
+}
+
+function InputOutputParameter$1(props) {
+ const {
+ idPrefix,
+ parameter
+ } = props;
+ const entries = [{
+ id: idPrefix + '-target',
+ component: TargetProperty,
+ idPrefix,
+ parameter
+ }, {
+ id: idPrefix + '-source',
+ component: SourceProperty,
+ idPrefix,
+ parameter
+ }];
+ return entries;
+}
+function TargetProperty(props) {
+ const {
+ idPrefix,
+ element,
+ parameter
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: parameter,
+ properties: {
+ target: value
+ }
+ });
+ };
+ const getValue = parameter => {
+ return parameter.target;
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element: parameter,
+ id: idPrefix + '-target',
+ label: translate((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(parameter, 'zeebe:Input') ? 'Local variable name' : 'Process variable name'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function SourceProperty(props) {
+ const {
+ idPrefix,
+ element,
+ parameter
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: parameter,
+ properties: {
+ source: value
+ }
+ });
+ };
+ const getValue = parameter => {
+ return parameter.source;
+ };
+ return FeelEntryWithVariableContext({
+ bpmnElement: element,
+ element: parameter,
+ id: idPrefix + '-source',
+ label: translate('Variable assignment value'),
+ feel: 'required',
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+function getElements$1(bo, type, prop) {
+ const elems = getExtensionElementsList(bo, type);
+ return !prop ? elems : (elems[0] || {})[prop] || [];
+}
+function getParameters$1(element, prop) {
+ const ioMapping = getIoMapping(element);
+ return ioMapping && ioMapping.get(prop) || [];
+}
+
+/**
+ * Get a ioMapping from the business object
+ *
+ * @param {djs.model.Base} element
+ *
+ * @return {ModdleElement} the ioMapping object
+ */
+function getIoMapping(element) {
+ const bo = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return (getElements$1(bo, 'zeebe:IoMapping') || [])[0];
+}
+
+/**
+ * Return all input parameters existing in the business object, and
+ * an empty array if none exist.
+ *
+ * @param {djs.model.Base} element
+ *
+ * @return {Array} a list of input parameter objects
+ */
+function getInputParameters$1(element) {
+ return getParameters$1.apply(this, [element, 'inputParameters']);
+}
- evt.initEvent((eventType), true, true);
- }
- return element.dispatchEvent(evt);
- } else {
- // Welcome IE
- evt = document.createEventObject();
+/**
+ * Return all output parameters existing in the business object, and
+ * an empty array if none exist.
+ *
+ * @param {djs.model.Base} element
+ *
+ * @return {Array} a list of output parameter objects
+ */
+function getOutputParameters$1(element) {
+ return getParameters$1.apply(this, [element, 'outputParameters']);
+}
+function areInputParametersSupported$1(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.isAny)(element, ['bpmn:UserTask', 'bpmn:SubProcess', 'bpmn:CallActivity', 'bpmn:BusinessRuleTask', 'bpmn:ScriptTask']) || isZeebeServiceTask(element) || isSignalThrowEvent(element);
+}
+function areOutputParametersSupported$1(element) {
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:EndEvent') && getErrorEventDefinition(element)) {
+ return false;
+ }
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.isAny)(element, ['zeebe:ZeebeServiceTask', 'bpmn:UserTask', 'bpmn:SubProcess', 'bpmn:ReceiveTask', 'bpmn:CallActivity', 'bpmn:Event', 'bpmn:BusinessRuleTask']);
+}
+function createIOMapping(properties, parent, bpmnFactory) {
+ return createElement('zeebe:IoMapping', properties, parent, bpmnFactory);
+}
+function isSignalThrowEvent(element) {
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.isAny)(element, ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent'])) {
+ return false;
+ }
+ return !!getEventDefinition$1(element, 'bpmn:SignalEventDefinition');
+}
+
+function InputProps$1({
+ element,
+ injector
+}) {
+ if (!areInputParametersSupported$1(element)) {
+ return null;
+ }
+ const inputParameters = getInputParameters$1(element) || [];
+ const bpmnFactory = injector.get('bpmnFactory'),
+ commandStack = injector.get('commandStack');
+ const items = inputParameters.map((parameter, index) => {
+ const id = element.id + '-input-' + index;
+ return {
+ id,
+ label: parameter.get('target') || '',
+ entries: InputOutputParameter$1({
+ idPrefix: id,
+ element,
+ parameter
+ }),
+ autoFocusEntry: id + '-target',
+ remove: removeFactory$b({
+ commandStack,
+ element,
+ parameter
+ })
+ };
+ });
+ return {
+ items,
+ add: addFactory$8({
+ element,
+ bpmnFactory,
+ commandStack
+ }),
+ shouldSort: false
+ };
+}
+function removeFactory$b({
+ commandStack,
+ element,
+ parameter
+}) {
+ return function (event) {
+ event.stopPropagation();
+ const commands = [];
+ const ioMapping = getIoMapping(element);
+ if (!ioMapping) {
+ return;
+ }
+ const inputParameters = (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(ioMapping.get('inputParameters'), parameter);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: ioMapping,
+ properties: {
+ inputParameters
+ }
+ }
+ });
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element),
+ extensionElements = businessObject.get('extensionElements'),
+ values = (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(extensionElements.get('values'), ioMapping);
+
+ // remove ioMapping if there are no input/output parameters anymore
+ if (!inputParameters.length && !ioMapping.get('outputParameters').length) {
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values
+ }
+ }
+ });
+ }
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+}
+function addFactory$8({
+ element,
+ bpmnFactory,
+ commandStack
+}) {
+ return function (event) {
+ event.stopPropagation();
+ const commands = [];
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ let extensionElements = businessObject.get('extensionElements');
+
+ // (1) ensure extension elements
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+
+ // (2) ensure IoMapping
+ let ioMapping = getIoMapping(element);
+ if (!ioMapping) {
+ ioMapping = createIOMapping({
+ inputParameters: [],
+ outputParameters: []
+ }, extensionElements, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), ioMapping]
+ }
+ }
+ });
+ }
+
+ // (3) create parameter
+ const newParameter = createElement('zeebe:Input', {
+ target: nextId('InputVariable_')
+ }, ioMapping, bpmnFactory);
+
+ // (4) add parameter to list
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: ioMapping,
+ properties: {
+ inputParameters: [...ioMapping.get('inputParameters'), newParameter]
+ }
+ }
+ });
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+}
+
+function MessageProps(props) {
+ const {
+ element
+ } = props;
+ const message = getMessage(element);
+ const entries = [];
+ if (message) {
+ entries.push({
+ id: 'messageName',
+ component: MessageName,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isFeelEntryEdited
+ });
+ }
+ if (message && canHaveSubscriptionCorrelationKey(element)) {
+ entries.push({
+ id: 'messageSubscriptionCorrelationKey',
+ component: SubscriptionCorrelationKey,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isFeelEntryEdited
+ });
+ }
+ return entries;
+}
+function MessageName(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const message = getMessage(element);
+ const getValue = () => {
+ return message.get('name');
+ };
+ const setValue = value => {
+ return commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: message,
+ properties: {
+ name: value
+ }
+ });
+ };
+ return FeelEntryWithVariableContext({
+ element,
+ id: 'messageName',
+ label: translate('Name'),
+ feel: 'optional',
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function SubscriptionCorrelationKey(props) {
+ const {
+ element
+ } = props;
+ const bpmnFactory = useService('bpmnFactory');
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return getCorrelationKey(element);
+ };
+ const setValue = value => {
+ const commands = [];
+ const properties = {
+ correlationKey: value
+ };
+ const message = getMessage(element);
+ let extensionElements = message.get('extensionElements');
+
+ // (1) ensure extension elements
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, message, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: message,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+ let subscription = getSubscription(element);
+
+ // (2a) add subscription with correlation key
+ if (!subscription) {
+ subscription = createElement('zeebe:Subscription', properties, extensionElements, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), subscription]
+ }
+ }
+ });
+ } else {
+ // (2b) update existing subscription's correlation key
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ properties,
+ moddleElement: subscription
+ }
+ });
+ }
+
+ // (3) commit all updates
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+ return FeelEntryWithVariableContext({
+ element,
+ id: 'messageSubscriptionCorrelationKey',
+ label: translate('Subscription correlation key'),
+ feel: 'required',
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helper ///////////////////////
+
+function canHaveSubscriptionCorrelationKey(element) {
+ // (1) allow for receive task
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:ReceiveTask')) {
+ return true;
+ }
+
+ // (2) allow for non start events
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:StartEvent')) {
+ return true;
+ }
+
+ // (3) allow for start events inside event sub processes
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:StartEvent') && (0,bpmn_js_lib_util_DiUtil__WEBPACK_IMPORTED_MODULE_10__.isEventSubProcess)(element.parent)) {
+ return true;
+ }
+ return false;
+}
+function getCorrelationKey(element) {
+ const subscription = getSubscription(element);
+ return subscription ? subscription.get('correlationKey') : '';
+}
+function getSubscription(element) {
+ const message = getMessage(element);
+ const subscriptions = getSubscriptions(message);
+ return subscriptions[0];
+}
+function getSubscriptions(message) {
+ const extensionElements = getExtensionElementsList(message, 'zeebe:Subscription');
+ return extensionElements;
+}
+
+function MultiInstanceProps$1(props) {
+ const {
+ element
+ } = props;
+ if (!supportsMultiInstances(element)) {
+ return [];
+ }
+ return [{
+ id: 'multiInstance-inputCollection',
+ component: InputCollection,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isFeelEntryEdited
+ }, {
+ id: 'multiInstance-inputElement',
+ component: InputElement,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }, {
+ id: 'multiInstance-outputCollection',
+ component: OutputCollection,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }, {
+ id: 'multiInstance-outputElement',
+ component: OutputElement,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isFeelEntryEdited
+ }, {
+ id: 'multiInstance-completionCondition',
+ component: CompletionCondition,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isFeelEntryEdited
+ }];
+}
+function InputCollection(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const bpmnFactory = useService('bpmnFactory');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return getProperty$1(element, 'inputCollection');
+ };
+ const setValue = value => {
+ return setProperty(element, 'inputCollection', value, commandStack, bpmnFactory);
+ };
+ return FeelEntryWithVariableContext({
+ element,
+ id: 'multiInstance-inputCollection',
+ label: translate('Input collection'),
+ feel: 'required',
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function InputElement(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const bpmnFactory = useService('bpmnFactory');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return getProperty$1(element, 'inputElement');
+ };
+ const setValue = value => {
+ return setProperty(element, 'inputElement', value, commandStack, bpmnFactory);
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'multiInstance-inputElement',
+ label: translate('Input element'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function OutputCollection(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const bpmnFactory = useService('bpmnFactory');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return getProperty$1(element, 'outputCollection');
+ };
+ const setValue = value => {
+ return setProperty(element, 'outputCollection', value, commandStack, bpmnFactory);
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'multiInstance-outputCollection',
+ label: translate('Output collection'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function OutputElement(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const bpmnFactory = useService('bpmnFactory');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return getProperty$1(element, 'outputElement');
+ };
+ const setValue = value => {
+ return setProperty(element, 'outputElement', value, commandStack, bpmnFactory);
+ };
+ return FeelEntryWithVariableContext({
+ element,
+ id: 'multiInstance-outputElement',
+ label: translate('Output element'),
+ feel: 'required',
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function CompletionCondition(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const bpmnFactory = useService('bpmnFactory');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ const completionCondition = getCompletionCondition(element);
+ return completionCondition && completionCondition.get('body');
+ };
+ const setValue = value => {
+ if (value && value !== '') {
+ const loopCharacteristics = getLoopCharacteristics$1(element);
+ const completionCondition = createElement('bpmn:FormalExpression', {
+ body: value
+ }, loopCharacteristics, bpmnFactory);
+ setCompletionCondition(element, commandStack, completionCondition);
+ } else {
+ setCompletionCondition(element, commandStack, undefined);
+ }
+ };
+ return FeelEntryWithVariableContext({
+ element,
+ id: 'multiInstance-completionCondition',
+ label: translate('Completion condition'),
+ feel: 'required',
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helper ///////////////////////
+
+function getLoopCharacteristics$1(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return businessObject.get('loopCharacteristics');
+}
+function getZeebeLoopCharacteristics(loopCharacteristics) {
+ const extensionElements = getExtensionElementsList(loopCharacteristics, 'zeebe:LoopCharacteristics');
+ return extensionElements && extensionElements[0];
+}
+function supportsMultiInstances(element) {
+ return !!getLoopCharacteristics$1(element);
+}
+function getCompletionCondition(element) {
+ return getLoopCharacteristics$1(element).get('completionCondition');
+}
+function setCompletionCondition(element, commandStack, completionCondition = undefined) {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: getLoopCharacteristics$1(element),
+ properties: {
+ completionCondition
+ }
+ });
+}
+function getProperty$1(element, propertyName) {
+ const loopCharacteristics = getLoopCharacteristics$1(element),
+ zeebeLoopCharacteristics = getZeebeLoopCharacteristics(loopCharacteristics);
+ return zeebeLoopCharacteristics && zeebeLoopCharacteristics.get(propertyName);
+}
+function setProperty(element, propertyName, value, commandStack, bpmnFactory) {
+ const loopCharacteristics = getLoopCharacteristics$1(element);
+ const commands = [];
+
+ // (1) ensure extension elements
+ let extensionElements = loopCharacteristics.get('extensionElements');
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, loopCharacteristics, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: loopCharacteristics,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+
+ // (2) ensure zeebe loop characteristics
+ let zeebeLoopCharacteristics = getZeebeLoopCharacteristics(loopCharacteristics);
+ if (!zeebeLoopCharacteristics) {
+ zeebeLoopCharacteristics = createElement('zeebe:LoopCharacteristics', {}, extensionElements, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), zeebeLoopCharacteristics]
+ }
+ }
+ });
+ }
+
+ // (3) update defined property
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: zeebeLoopCharacteristics,
+ properties: {
+ [propertyName]: value
+ }
+ }
+ });
+
+ // (4) commit all updates
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+}
+
+function OutputPropagationProps(props) {
+ const {
+ element
+ } = props;
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:CallActivity')) {
+ return [];
+ }
+ return [{
+ id: 'propagateAllChildVariables',
+ component: PropagateAllChildVariables,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isToggleSwitchEntryEdited
+ }];
+}
+function PropagateAllChildVariables(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack'),
+ bpmnFactory = useService('bpmnFactory'),
+ translate = useService('translate');
+ const propagateAllChildVariables = isPropagateAllChildVariables(element);
+ const getValue = () => {
+ return propagateAllChildVariables;
+ };
+ const setValue = value => {
+ const commands = [];
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+
+ // (1) ensure extension elements
+ let extensionElements = businessObject.get('extensionElements');
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+
+ // (2) ensure zeebe:calledElement
+ let calledElement = getCalledElement(businessObject);
+ if (!calledElement) {
+ calledElement = createElement('zeebe:CalledElement', {}, extensionElements, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), calledElement]
+ }
+ }
+ });
+ }
+
+ // (3) Update propagateAllChildVariables attribute
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: calledElement,
+ properties: {
+ propagateAllChildVariables: value
+ }
+ }
+ });
+
+ // (4) Execute the commands
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.ToggleSwitchEntry)({
+ id: 'propagateAllChildVariables',
+ label: translate('Propagate all child process variables'),
+ switcherLabel: propagateAllChildVariables ? translate('On') : translate('Off'),
+ tooltip: (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("p", {
+ children: translate('If turned on, all variables from the child process instance will be propagated to the parent process instance.')
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("p", {
+ children: translate('Otherwise, only variables defined via output mappings will be propagated.')
+ })]
+ }),
+ getValue,
+ setValue
+ });
+}
+
+// helper //////////////////////////
+
+/**
+ * Determine default value for propagateAllChildVariables attribute
+ * @param {Object} element representing a bpmn:CallActivity
+ *
+ * @returns {boolean}
+ */
+function determinePropAllChildVariablesDefault(element) {
+ const outputParameters = getOutputParameters$1(element);
+ if (outputParameters) {
+ return outputParameters.length > 0 ? false : true;
+ }
+}
+
+/**
+ * Check whether the propagateAllChildVariables attribute is set on an element.
+ * Note that a default logic will be determine if it is not explicitly set.
+ * @param {Object} element
+ *
+ * @returns {boolean}
+ */
+function isPropagateAllChildVariables(element) {
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:CallActivity')) {
+ return undefined;
+ }
+ const bo = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element),
+ calledElement = getCalledElement(bo);
+ return calledElement && (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.has)(calledElement, 'propagateAllChildVariables') ? calledElement.get('propagateAllChildVariables') : determinePropAllChildVariablesDefault(element);
+}
+
+function OutputProps$1({
+ element,
+ injector
+}) {
+ if (!areOutputParametersSupported$1(element)) {
+ return null;
+ }
+ const outputParameters = getOutputParameters$1(element) || [];
+ const bpmnFactory = injector.get('bpmnFactory'),
+ commandStack = injector.get('commandStack');
+ const items = outputParameters.map((parameter, index) => {
+ const id = element.id + '-output-' + index;
+ return {
+ id,
+ label: parameter.get('target') || '',
+ entries: InputOutputParameter$1({
+ idPrefix: id,
+ element,
+ parameter
+ }),
+ autoFocusEntry: id + '-target',
+ remove: removeFactory$a({
+ commandStack,
+ element,
+ parameter
+ })
+ };
+ });
+ return {
+ items,
+ add: addFactory$7({
+ element,
+ bpmnFactory,
+ commandStack
+ }),
+ shouldSort: false
+ };
+}
+function removeFactory$a({
+ commandStack,
+ element,
+ parameter
+}) {
+ return function (event) {
+ event.stopPropagation();
+ let commands = [];
+ const ioMapping = getIoMapping(element);
+ if (!ioMapping) {
+ return;
+ }
+ const outputParameters = (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(ioMapping.get('outputParameters'), parameter);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: ioMapping,
+ properties: {
+ outputParameters
+ }
+ }
+ });
+
+ // remove ioMapping if there are no input/output parameters anymore
+ if (!ioMapping.get('inputParameters').length && !outputParameters.length) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element),
+ extensionElements = businessObject.get('extensionElements'),
+ values = (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(extensionElements.get('values'), ioMapping);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values
+ }
+ }
+ });
+ }
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+}
+function addFactory$7({
+ element,
+ bpmnFactory,
+ commandStack
+}) {
+ return function (event) {
+ event.stopPropagation();
+ let commands = [];
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ let extensionElements = businessObject.get('extensionElements');
+
+ // (1) ensure extension elements
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+
+ // (2) ensure IoMapping
+ let ioMapping = getIoMapping(element);
+ if (!ioMapping) {
+ const parent = extensionElements;
+ ioMapping = createIOMapping({
+ inputParameters: [],
+ outputParameters: []
+ }, parent, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), ioMapping]
+ }
+ }
+ });
+ }
+
+ // (3) create parameter
+ const newParameter = createElement('zeebe:Output', {
+ target: nextId('OutputVariable_')
+ }, ioMapping, bpmnFactory);
+
+ // (4) add parameter to list
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: ioMapping,
+ properties: {
+ outputParameters: [...ioMapping.get('outputParameters'), newParameter]
+ }
+ }
+ });
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+}
+
+const SCRIPT_IMPLEMENTATION_OPTION = 'script',
+ JOB_WORKER_IMPLEMENTATION_OPTION = 'jobWorker',
+ DEFAULT_IMPLEMENTATION_OPTION = '';
+function ScriptImplementationProps(props) {
+ const {
+ element
+ } = props;
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:ScriptTask')) {
+ return [];
+ }
+ return [{
+ id: 'scriptImplementation',
+ component: ScriptImplementation,
+ isEdited: () => isScriptImplementationEdited(element)
+ }];
+}
+function ScriptImplementation(props) {
+ const {
+ element,
+ id
+ } = props;
+ const commandStack = useService('commandStack');
+ const bpmnFactory = useService('bpmnFactory');
+ const translate = useService('translate');
+ const getValue = () => {
+ if (getScript$1(element)) {
+ return SCRIPT_IMPLEMENTATION_OPTION;
+ }
+ if (getTaskDefinition$1(element)) {
+ return JOB_WORKER_IMPLEMENTATION_OPTION;
+ }
+ return DEFAULT_IMPLEMENTATION_OPTION;
+ };
+
+ /**
+ * Set value by either creating a zeebe:script or a zeebe:taskDefintion
+ * extension element. Note that they must not exist both at the same time, however
+ * this will be ensured by a bpmn-js behavior (and not by the propPanel).
+ */
+ const setValue = value => {
+ let extensionElement, extensionElementType;
+ if (value === SCRIPT_IMPLEMENTATION_OPTION) {
+ extensionElement = getScript$1(element);
+ extensionElementType = 'zeebe:Script';
+ } else if (value === JOB_WORKER_IMPLEMENTATION_OPTION) {
+ extensionElement = getTaskDefinition$1(element);
+ extensionElementType = 'zeebe:TaskDefinition';
+ } else {
+ resetElement(element, commandStack);
+ }
+ if (!extensionElement && extensionElementType) {
+ extensionElement = createElement(extensionElementType, {}, null, bpmnFactory);
+ updateExtensionElements(element, extensionElement, bpmnFactory, commandStack);
+ }
+ };
+ const getOptions = () => {
+ const options = [{
+ value: DEFAULT_IMPLEMENTATION_OPTION,
+ label: translate('')
+ }, {
+ value: SCRIPT_IMPLEMENTATION_OPTION,
+ label: translate('FEEL expression')
+ }, {
+ value: JOB_WORKER_IMPLEMENTATION_OPTION,
+ label: translate('Job worker')
+ }];
+ return options;
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry)({
+ element,
+ id,
+ label: translate('Implementation'),
+ getValue,
+ setValue,
+ getOptions
+ });
+}
+
+// helper ///////////////////////
+
+function getTaskDefinition$1(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return getExtensionElementsList(businessObject, 'zeebe:TaskDefinition')[0];
+}
+function getScript$1(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return getExtensionElementsList(businessObject, 'zeebe:Script')[0];
+}
+function getTaskHeaders(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return getExtensionElementsList(businessObject, 'zeebe:TaskHeaders');
+}
+function isScriptImplementationEdited(element) {
+ return getTaskDefinition$1(element) || getScript$1(element);
+}
+function resetElement(element, commandStack) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const taskDefinition = getTaskDefinition$1(element);
+ const taskHeaders = getTaskHeaders(element);
+ const script = getScript$1(element);
+ if (taskDefinition) {
+ const removed = [taskDefinition, taskHeaders].filter(Boolean);
+ removeExtensionElements(element, businessObject, removed, commandStack);
+ return;
+ }
+ if (script) {
+ removeExtensionElements(element, businessObject, script, commandStack);
+ }
+}
+function updateExtensionElements(element, extensionElementToAdd, bpmnFactory, commandStack) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const commands = [];
+ let extensionElements = businessObject.get('extensionElements');
+ let extensionElementValues;
+
+ // (1) create bpmn:ExtensionElements if it doesn't exist
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+ extensionElementToAdd.$parent = extensionElements;
+
+ // (2) remove old exension element from extensionElements
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(extensionElementToAdd, 'zeebe:TaskDefinition')) {
+ extensionElementValues = (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(extensionElements.get('values'), getScript$1(element));
+ } else if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(extensionElementToAdd, 'zeebe:Script')) {
+ const matcher = extension => (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.isAny)(extension, ['zeebe:TaskDefinition', 'zeebe:TaskHeaders']);
+ extensionElementValues = (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(extensionElements.get('values'), matcher);
+ }
+
+ // (3) add extension element to list
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElementValues, extensionElementToAdd]
+ }
+ }
+ });
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+}
+
+function ScriptProps$1(props) {
+ const {
+ element
+ } = props;
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:ScriptTask') || !getScript(element)) {
+ return [];
+ }
+ return [{
+ id: 'resultVariable',
+ component: ResultVariable$3,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }, {
+ id: 'scriptExpression',
+ component: Expression$2,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isFeelEntryEdited
+ }];
+}
+function Expression$2(props) {
+ const {
+ element,
+ id
+ } = props;
+ const commandStack = useService('commandStack');
+ const bpmnFactory = useService('bpmnFactory');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return (getScript(element) || {}).get('expression');
+ };
+ const setValue = value => {
+ const commands = [];
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ let extensionElements = businessObject.get('extensionElements');
+
+ // (1) ensure extension elements
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+
+ // (2) ensure script
+ let script = getScript(element);
+ if (!script) {
+ script = createElement('zeebe:Script', {}, extensionElements, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), script]
+ }
+ }
+ });
+ }
+
+ // (3) update script.expression
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: script,
+ properties: {
+ expression: value
+ }
+ }
+ });
+
+ // (4) commit all updates
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+ return FeelEntryWithVariableContext({
+ element,
+ id,
+ label: translate('FEEL expression'),
+ feel: 'required',
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function ResultVariable$3(props) {
+ const {
+ element,
+ id
+ } = props;
+ const commandStack = useService('commandStack');
+ const bpmnFactory = useService('bpmnFactory');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return (getScript(element) || {}).resultVariable;
+ };
+ const setValue = value => {
+ const commands = [];
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ let extensionElements = businessObject.get('extensionElements');
+
+ // (1) ensure extension elements
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+
+ // (2) ensure script
+ let script = getScript(element);
+ if (!script) {
+ script = createElement('zeebe:Script', {}, extensionElements, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), script]
+ }
+ }
+ });
+ }
+
+ // (3) update script.resultVariable
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: script,
+ properties: {
+ resultVariable: value
+ }
+ }
+ });
+
+ // (4) commit all updates
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id,
+ label: translate('Result variable'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helper ///////////////////////
+
+function getScript(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return getExtensionElementsList(businessObject, 'zeebe:Script')[0];
+}
+
+/**
+ * @returns {Entry[]}
+ */
+function SignalProps(props) {
+ const {
+ element
+ } = props;
+ if (!isSignalSupported(element)) {
+ return [];
+ }
+ const signal = getSignal(element);
+ let entries = [];
+ if (signal) {
+ entries = [...entries, {
+ id: 'signalName',
+ component: SignalName,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isFeelEntryEdited
+ }];
+ }
+ return entries;
+}
+function SignalName(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const signal = getSignal(element);
+ const getValue = () => {
+ return signal.get('name');
+ };
+ const setValue = value => {
+ return commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: signal,
+ properties: {
+ name: value
+ }
+ });
+ };
+ return FeelEntryWithVariableContext({
+ element,
+ id: 'signalName',
+ label: translate('Name'),
+ feel: 'optional',
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+function TargetProps(props) {
+ const {
+ element
+ } = props;
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:CallActivity')) {
+ return [];
+ }
+ return [{
+ id: 'targetProcessId',
+ component: TargetProcessId,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isFeelEntryEdited
+ }];
+}
+function TargetProcessId(props) {
+ const {
+ element,
+ id
+ } = props;
+ const commandStack = useService('commandStack'),
+ bpmnFactory = useService('bpmnFactory'),
+ translate = useService('translate'),
+ debounce = useService('debounceInput');
+ const getValue = () => {
+ return getProcessId(element);
+ };
+ const setValue = value => {
+ const commands = [];
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+
+ // (1) ensure extension elements
+ let extensionElements = businessObject.get('extensionElements');
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+
+ // (2) ensure zeebe:calledElement
+ let calledElement = getCalledElement(businessObject);
+ if (!calledElement) {
+ calledElement = createElement('zeebe:CalledElement', {}, extensionElements, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), calledElement]
+ }
+ }
+ });
+ }
+
+ // (3) Update processId attribute
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: calledElement,
+ properties: {
+ processId: value
+ }
+ }
+ });
+
+ // (4) Execute the commands
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+ return FeelEntryWithVariableContext({
+ element,
+ id,
+ label: translate('Process ID'),
+ feel: 'optional',
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+function TaskDefinitionProps(props) {
+ const {
+ element
+ } = props;
+ if (!isZeebeServiceTask(element)) {
+ return [];
+ }
+ return [{
+ id: 'taskDefinitionType',
+ component: TaskDefinitionType,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isFeelEntryEdited
+ }, {
+ id: 'taskDefinitionRetries',
+ component: TaskDefinitionRetries,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isFeelEntryEdited
+ }];
+}
+function TaskDefinitionType(props) {
+ const {
+ element,
+ id
+ } = props;
+ const commandStack = useService('commandStack');
+ const bpmnFactory = useService('bpmnFactory');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return (getTaskDefinition(element) || {}).type;
+ };
+ const setValue = value => {
+ const commands = [];
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ let extensionElements = businessObject.get('extensionElements');
+
+ // (1) ensure extension elements
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+
+ // (2) ensure task definition
+ let taskDefinition = getTaskDefinition(element);
+ if (!taskDefinition) {
+ taskDefinition = createElement('zeebe:TaskDefinition', {}, extensionElements, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), taskDefinition]
+ }
+ }
+ });
+ }
+
+ // (3) update task definition type
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: taskDefinition,
+ properties: {
+ type: value
+ }
+ }
+ });
+
+ // (4) commit all updates
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+ return FeelEntryWithVariableContext({
+ element,
+ id,
+ label: translate('Type'),
+ feel: 'optional',
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function TaskDefinitionRetries(props) {
+ const {
+ element,
+ id
+ } = props;
+ const commandStack = useService('commandStack');
+ const bpmnFactory = useService('bpmnFactory');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return (getTaskDefinition(element) || {}).retries;
+ };
+ const setValue = value => {
+ let commands = [];
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ let extensionElements = businessObject.get('extensionElements');
+
+ // (1) ensure extension elements
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+
+ // (2) ensure task definition
+ let taskDefinition = getTaskDefinition(element);
+ if (!taskDefinition) {
+ taskDefinition = createElement('zeebe:TaskDefinition', {}, extensionElements, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), taskDefinition]
+ }
+ }
+ });
+ }
+
+ // (3) update task definition retries
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: taskDefinition,
+ properties: {
+ retries: value
+ }
+ }
+ });
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+ return FeelEntryWithVariableContext({
+ element,
+ id,
+ label: translate('Retries'),
+ feel: 'optional',
+ getValue,
+ setValue,
+ debounce,
+ tooltip: translate('Specifies the number of times the job is retried when a worker signals failure. The default is three.')
+ });
+}
+
+// helper ///////////////////////
+
+function getTaskDefinition(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return getExtensionElementsList(businessObject, 'zeebe:TaskDefinition')[0];
+}
+
+function TaskScheduleProps(props) {
+ const {
+ element
+ } = props;
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:UserTask')) {
+ return [];
+ }
+ return [{
+ id: 'taskScheduleDueDate',
+ component: DueDate$1,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isFeelEntryEdited
+ }, {
+ id: 'taskScheduleFollowUpDate',
+ component: FollowUpDate$1,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isFeelEntryEdited
+ }];
+}
+function DueDate$1(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const bpmnFactory = useService('bpmnFactory');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ const taskSchedule = getTaskSchedule(element);
+ if (!taskSchedule) {
+ return;
+ }
+ return taskSchedule.get('dueDate');
+ };
+ const setValue = value => {
+ let commands = [];
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ let extensionElements = businessObject.get('extensionElements');
+
+ // (1) ensure extension elements
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+
+ // (2) ensure zeebe:TaskSchedule
+ let taskSchedule = getTaskSchedule(element);
+ if (!taskSchedule) {
+ taskSchedule = createElement('zeebe:TaskSchedule', {}, extensionElements, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), taskSchedule]
+ }
+ }
+ });
+ }
+
+ // (3) update zeebe:dueDate
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: taskSchedule,
+ properties: {
+ dueDate: value
+ }
+ }
+ });
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+ return FeelEntryWithVariableContext({
+ element,
+ id: 'taskScheduleDueDate',
+ label: translate('Due date'),
+ feel: 'optional',
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function FollowUpDate$1(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const bpmnFactory = useService('bpmnFactory');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ const taskSchedule = getTaskSchedule(element);
+ if (!taskSchedule) {
+ return;
+ }
+ return taskSchedule.get('followUpDate');
+ };
+ const setValue = value => {
+ let commands = [];
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ let extensionElements = businessObject.get('extensionElements');
+
+ // (1) ensure extension elements
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+
+ // (2) ensure zeebe:TaskSchedule
+ let taskSchedule = getTaskSchedule(element);
+ if (!taskSchedule) {
+ taskSchedule = createElement('zeebe:TaskSchedule', {}, extensionElements, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), taskSchedule]
+ }
+ }
+ });
+ }
+
+ // (3) update zeebe:followUpDate
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: taskSchedule,
+ properties: {
+ followUpDate: value
+ }
+ }
+ });
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+ return FeelEntryWithVariableContext({
+ element,
+ id: 'taskScheduleFollowUpDate',
+ label: translate('Follow up date'),
+ feel: 'optional',
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helper ///////////////////////
+
+function getTaskSchedule(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return getExtensionElementsList(businessObject, 'zeebe:TaskSchedule')[0];
+}
+
+/**
+ * Check whether a given timer expression type is supported for a given element.
+ *
+ * @param {string} type
+ * @param {Element|ModdleElement} element
+ *
+ * @return {boolean}
+ */
+function isTimerExpressionTypeSupported(type, element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ switch (type) {
+ case 'timeDate':
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.isAny)(element, ['bpmn:BoundaryEvent', 'bpmn:IntermediateCatchEvent', 'bpmn:StartEvent']);
+ case 'timeCycle':
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:StartEvent') && !hasParentEventSubProcess(businessObject) || !isInterrupting(businessObject)) {
+ return true;
+ }
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:BoundaryEvent') && !isInterrupting(businessObject)) {
+ return true;
+ }
+ return false;
+ case 'timeDuration':
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.isAny)(element, ['bpmn:BoundaryEvent', 'bpmn:IntermediateCatchEvent'])) {
+ return true;
+ }
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:StartEvent') && hasParentEventSubProcess(businessObject)) {
+ return true;
+ }
+ return false;
+ default:
+ return false;
+ }
+}
+function isInterrupting(businessObject) {
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(businessObject, 'bpmn:BoundaryEvent')) {
+ return businessObject.get('cancelActivity') !== false;
+ }
+ return businessObject.get('isInterrupting') !== false;
+}
+function hasParentEventSubProcess(businessObject) {
+ const parent = businessObject.$parent;
+ return parent && (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(parent, 'bpmn:SubProcess') && parent.get('triggeredByEvent');
+}
+
+function TimerProps$1(props) {
+ const {
+ element,
+ injector
+ } = props;
+ const translate = injector.get('translate');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element),
+ timerEventDefinition = getTimerEventDefinition(businessObject),
+ timerEventDefinitionType = getTimerDefinitionType(timerEventDefinition);
+
+ // (1) Only show for supported elements
+ if (!isTimerSupported(element)) {
+ return [];
+ }
+ const timerOptions = getTimerOptions(element, translate);
+ const entries = [];
+ entries.push({
+ id: 'timerEventDefinitionType',
+ component: TimerEventDefinitionType$1,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isSelectEntryEdited,
+ options: timerOptions
+ });
+ if (timerEventDefinitionType) {
+ entries.push({
+ id: 'timerEventDefinitionValue',
+ component: TimerEventDefinitionValue$1,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isFeelEntryEdited,
+ timerEventDefinitionType: timerEventDefinitionType || timerOptions[0].value
+ });
+ }
+ return entries;
+}
+function getTimerOptions(element, translate) {
+ const options = [];
+ if (isTimerExpressionTypeSupported('timeDate', element)) {
+ options.push({
+ value: 'timeDate',
+ label: translate('Date')
+ });
+ }
+ if (isTimerExpressionTypeSupported('timeDuration', element)) {
+ options.push({
+ value: 'timeDuration',
+ label: translate('Duration')
+ });
+ }
+ if (isTimerExpressionTypeSupported('timeCycle', element)) {
+ options.push({
+ value: 'timeCycle',
+ label: translate('Cycle')
+ });
+ }
+ return options;
+}
+
+/**
+ * TimerEventDefinitionType - Generic select entry allowing to select a specific
+ * timerEventDefintionType. To be used together with timerEventDefinitionValue.
+ *
+ * @param {type} props
+ * @return {SelectEntry}
+ */
+function TimerEventDefinitionType$1(props) {
+ const {
+ element,
+ options
+ } = props;
+ const commandStack = useService('commandStack'),
+ bpmnFactory = useService('bpmnFactory'),
+ translate = useService('translate');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element),
+ timerEventDefinition = getTimerEventDefinition(businessObject),
+ timerEventDefinitionType = getTimerDefinitionType(timerEventDefinition);
+ const getValue = () => {
+ return timerEventDefinitionType || '';
+ };
+ const setValue = value => {
+ // (1) Check if value is different to current type
+ if (value === timerEventDefinitionType) {
+ return;
+ }
+
+ // (2) Create empty formalExpression element
+ const formalExpression = createTimerFormalExpression(bpmnFactory, timerEventDefinition);
+
+ // (3) Set the value for selected timerEventDefinitionType
+ const newProps = {
+ timeDuration: undefined,
+ timeDate: undefined,
+ timeCycle: undefined
+ };
+ if (value !== '') {
+ newProps[value] = formalExpression;
+ }
+
+ // (4) Execute businessObject update
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: timerEventDefinition,
+ properties: newProps
+ });
+ };
+ const getOptions = element => {
+ return [{
+ value: '',
+ label: translate('')
+ }, ...options];
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry)({
+ element,
+ id: 'timerEventDefinitionType',
+ label: translate('Type'),
+ getValue,
+ setValue,
+ getOptions
+ });
+}
+
+/**
+ * TimerEventDefinitionValue - Generic textField entry allowing to specify the
+ * timerEventDefintionValue based on the set timerEventDefintionType. To be used
+ * together with timerEventDefinitionType.
+ *
+ * @param {object} props
+ * @param {ModdleElement} props.element
+ * @param {'timeCycle'|'timeDate'|'timeDuration'} props.timerEventDefinitionType?
+ * @param {string} props.label?
+ * @return {TextFieldEntry}
+ */
+function TimerEventDefinitionValue$1(props) {
+ const {
+ element,
+ label,
+ timerEventDefinitionType
+ } = props;
+ const commandStack = useService('commandStack'),
+ translate = useService('translate'),
+ debounce = useService('debounceInput'),
+ bpmnFactory = useService('bpmnFactory');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element),
+ timerEventDefinition = getTimerEventDefinition(businessObject),
+ timerEventFormalExpression = timerEventDefinition.get(timerEventDefinitionType);
+ const getValue = () => {
+ return timerEventFormalExpression && timerEventFormalExpression.get('body');
+ };
+ const setValue = value => {
+ if (!timerEventFormalExpression) {
+ const expression = createTimerFormalExpression(bpmnFactory, timerEventDefinition);
+ expression.set('body', value);
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: timerEventDefinition,
+ properties: {
+ [timerEventDefinitionType]: expression
+ }
+ });
+ return;
+ }
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: timerEventFormalExpression,
+ properties: {
+ body: value
+ }
+ });
+ };
+ return FeelEntryWithVariableContext({
+ element,
+ id: 'timerEventDefinitionValue',
+ label: label || translate('Value'),
+ feel: 'optional',
+ getValue,
+ setValue,
+ debounce,
+ tooltip: getTimerEventDefinitionValueDescription$1(timerEventDefinitionType, translate)
+ });
+}
+
+// helper //////////////////////////
+
+function createTimerFormalExpression(bpmnFactory, eventDefinition) {
+ const formalExpression = bpmnFactory.create('bpmn:FormalExpression', {
+ body: undefined
+ });
+ formalExpression.$parent = eventDefinition;
+ return formalExpression;
+}
+function getTimerEventDefinitionValueDescription$1(timerDefinitionType, translate) {
+ switch (timerDefinitionType) {
+ case 'timeDate':
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("p", {
+ children: translate('A specific point in time defined as ISO 8601 combined date and time representation.')
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("ul", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("li", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "2019-10-01T12:00:00Z"
+ }), " - ", translate('UTC time')]
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("li", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "2019-10-02T08:09:40+02:00"
+ }), " - ", translate('UTC plus 2 hours zone offset')]
+ })]
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.io/docs/reference/bpmn-processes/timer-events/timer-events#time-date",
+ target: "_blank",
+ rel: "noopener",
+ title: translate('Timer documentation'),
+ children: translate('How to configure a timer')
+ })]
+ });
+ case 'timeCycle':
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("p", {
+ children: translate('A cycle defined as ISO 8601 repeating intervals format, or a cron expression.')
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("ul", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("li", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "R5/PT10S"
+ }), " - ", translate('every 10 seconds, up to 5 times')]
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("li", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "R/P1D"
+ }), " - ", translate('every day, infinitely')]
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("li", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "0 0 9-17 * * MON-FRI"
+ }), " - ", translate('every hour on the hour from 9-5 p.m. UTC Monday-Friday')]
+ })]
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.io/docs/reference/bpmn-processes/timer-events/timer-events#time-cycle",
+ target: "_blank",
+ rel: "noopener",
+ title: translate('Timer documentation'),
+ children: translate('How to configure a timer')
+ })]
+ });
+ case 'timeDuration':
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("p", {
+ children: translate('A time duration defined as ISO 8601 durations format.')
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("ul", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("li", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "PT15S"
+ }), " - ", translate('15 seconds')]
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("li", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "PT1H30M"
+ }), " - ", translate('1 hour and 30 minutes')]
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("li", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "P14D"
+ }), " - ", translate('14 days')]
+ })]
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.io/docs/reference/bpmn-processes/timer-events/timer-events#time-duration",
+ target: "_blank",
+ rel: "noopener",
+ title: translate('Timer documentation'),
+ children: translate('How to configure a timer')
+ })]
+ });
+ }
+}
+
+function ExtensionProperty(props) {
+ const {
+ idPrefix,
+ property
+ } = props;
+ const entries = [{
+ id: idPrefix + '-name',
+ component: NameProperty$1,
+ idPrefix,
+ property
+ }, {
+ id: idPrefix + '-value',
+ component: ValueProperty$1,
+ idPrefix,
+ property
+ }];
+ return entries;
+}
+function NameProperty$1(props) {
+ const {
+ idPrefix,
+ element,
+ property
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: property,
+ properties: {
+ name: value
+ }
+ });
+ };
+ const getValue = () => {
+ return property.name;
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element: property,
+ id: idPrefix + '-name',
+ label: translate('Name'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function ValueProperty$1(props) {
+ const {
+ idPrefix,
+ element,
+ property
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: property,
+ properties: {
+ value
+ }
+ });
+ };
+ const getValue = () => {
+ return property.value;
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element: property,
+ id: idPrefix + '-value',
+ label: translate('Value'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+function ExtensionPropertiesProps({
+ element,
+ injector,
+ namespace = 'camunda'
+}) {
+ let businessObject = getRelevantBusinessObject(element);
+
+ // do not offer for empty pools
+ if (!businessObject) {
+ return;
+ }
+ const properties = getPropertiesList(businessObject, namespace) || [];
+ const bpmnFactory = injector.get('bpmnFactory'),
+ commandStack = injector.get('commandStack');
+ const items = properties.map((property, index) => {
+ const id = element.id + '-extensionProperty-' + index;
+ return {
+ id,
+ label: property.get('name') || '',
+ entries: ExtensionProperty({
+ idPrefix: id,
+ element,
+ property
+ }),
+ autoFocusEntry: id + '-name',
+ remove: removeFactory$9({
+ commandStack,
+ element,
+ property,
+ namespace
+ })
+ };
+ });
+ return {
+ items,
+ add: addFactory$6({
+ bpmnFactory,
+ commandStack,
+ element,
+ namespace
+ }),
+ shouldSort: false
+ };
+}
+function removeFactory$9({
+ commandStack,
+ element,
+ property,
+ namespace
+}) {
+ return function (event) {
+ event.stopPropagation();
+ const commands = [];
+ const businessObject = getRelevantBusinessObject(element);
+ const extensionElements = businessObject.get('extensionElements');
+ const properties = getProperties(businessObject, namespace);
+ if (!properties) {
+ return;
+ }
+ const propertyName = getPropertyName(namespace);
+ const values = (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(properties.get(propertyName), property);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: properties,
+ properties: {
+ [propertyName]: values
+ }
+ }
+ });
+
+ // remove camunda:Properties if there are no properties anymore
+ if (!values.length) {
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(extensionElements.get('values'), properties)
+ }
+ }
+ });
+ }
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+}
+function addFactory$6({
+ bpmnFactory,
+ commandStack,
+ element,
+ namespace
+}) {
+ return function (event) {
+ event.stopPropagation();
+ let commands = [];
+ const businessObject = getRelevantBusinessObject(element);
+ let extensionElements = businessObject.get('extensionElements');
+
+ // (1) ensure extension elements
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+ const propertyName = getPropertyName(namespace);
+
+ // (2) ensure camunda:Properties
+ let properties = getProperties(businessObject, namespace);
+ if (!properties) {
+ const parent = extensionElements;
+ properties = createElement(`${namespace}:Properties`, {
+ [propertyName]: []
+ }, parent, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), properties]
+ }
+ }
+ });
+ }
+
+ // (3) create camunda:Property
+ const property = createElement(`${namespace}:Property`, {}, properties, bpmnFactory);
+
+ // (4) add property to list
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: properties,
+ properties: {
+ [propertyName]: [...properties.get(propertyName), property]
+ }
+ }
+ });
+
+ // (5) commit all updates
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+}
+
+// helper //////////////////
+
+function getRelevantBusinessObject(element) {
+ let businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Participant')) {
+ return businessObject.get('processRef');
+ }
+ return businessObject;
+}
+function getPropertyName(namespace = 'camunda') {
+ if (namespace === 'zeebe') {
+ return 'properties';
+ }
+ return 'values';
+}
+function getProperties(element, namespace = 'camunda') {
+ const businessObject = getRelevantBusinessObject(element);
+ return getExtensionElementsList(businessObject, `${namespace}:Properties`)[0];
+}
+function getPropertiesList(element, namespace = 'camunda') {
+ const businessObject = getRelevantBusinessObject(element);
+ const properties = getProperties(businessObject, namespace);
+ return properties && properties.get(getPropertyName(namespace));
+}
+
+/**
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
+ */
- return element.fireEvent('on' + eventType, evt);
- }
- }
+const LOW_PRIORITY$1 = 500;
+const ZEEBE_GROUPS = [BusinessRuleImplementationGroup, CalledDecisionGroup, ScriptImplementationGroup, ScriptGroup$1, TaskDefinitionGroup, AssignmentDefinitionGroup, FormGroup$1, ConditionGroup$1, TargetGroup, InputPropagationGroup, InputGroup$1, OutputPropagationGroup, OutputGroup$1, HeaderGroup, ExtensionPropertiesGroup$1];
+class ZeebePropertiesProvider {
+ constructor(propertiesPanel, injector) {
+ propertiesPanel.registerProvider(LOW_PRIORITY$1, this);
+ this._injector = injector;
+ }
+ getGroups(element) {
+ return groups => {
+ // (1) add zeebe specific groups
+ groups = groups.concat(this._getGroups(element));
+
+ // (2) update existing groups with zeebe specific properties
+ updateErrorGroup$1(groups, element);
+ updateEscalationGroup$1(groups, element);
+ updateMessageGroup(groups, element);
+ updateSignalGroup(groups, element);
+ updateTimerGroup$1(groups, element, this._injector);
+ updateMultiInstanceGroup$1(groups, element);
+
+ // (3) remove message group when not applicable
+ groups = removeMessageGroup(groups, element);
+ return groups;
+ };
+ }
+ _getGroups(element) {
+ const groups = ZEEBE_GROUPS.map(createGroup => createGroup(element, this._injector));
+ return groups.filter(group => group !== null);
+ }
+}
+ZeebePropertiesProvider.$inject = ['propertiesPanel', 'injector'];
+function CalledDecisionGroup(element) {
+ const group = {
+ id: 'calledDecision',
+ label: 'Called decision',
+ entries: [...CalledDecisionProps({
+ element
+ })],
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group
+ };
+ return group.entries.length ? group : null;
+}
+function ScriptGroup$1(element) {
+ const group = {
+ id: 'script',
+ label: 'Script',
+ entries: [...ScriptProps$1({
+ element
+ })],
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group
+ };
+ return group.entries.length ? group : null;
+}
+function TaskDefinitionGroup(element) {
+ const group = {
+ id: 'taskDefinition',
+ label: 'Task definition',
+ entries: [...TaskDefinitionProps({
+ element
+ })],
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group
+ };
+ return group.entries.length ? group : null;
+}
+function InputGroup$1(element, injector) {
+ const group = {
+ id: 'inputs',
+ label: 'Inputs',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.ListGroup,
+ ...InputProps$1({
+ element,
+ injector
+ })
+ };
+ return group.items ? group : null;
+}
+function OutputGroup$1(element, injector) {
+ const group = {
+ id: 'outputs',
+ label: 'Outputs',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.ListGroup,
+ ...OutputProps$1({
+ element,
+ injector
+ })
+ };
+ return group.items ? group : null;
+}
+function ConditionGroup$1(element) {
+ const group = {
+ id: 'condition',
+ label: 'Condition',
+ entries: [...ConditionProps$1({
+ element
+ })],
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group
+ };
+ return group.entries.length ? group : null;
+}
+function FormGroup$1(element, injector) {
+ const group = {
+ id: 'form',
+ label: 'Form',
+ entries: [...FormProps$1({
+ element,
+ injector
+ })],
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group
+ };
+ return group.entries.length ? group : null;
+}
+function TargetGroup(element) {
+ const group = {
+ id: 'calledElement',
+ label: 'Called element',
+ entries: [...TargetProps({
+ element
+ })],
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group
+ };
+ return group.entries.length ? group : null;
+}
+function HeaderGroup(element, injector) {
+ const group = {
+ id: 'headers',
+ label: 'Headers',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.ListGroup,
+ ...HeaderProps({
+ element,
+ injector
+ })
+ };
+ return group.items ? group : null;
+}
+function OutputPropagationGroup(element) {
+ const group = {
+ id: 'outputPropagation',
+ label: 'Output propagation',
+ entries: [...OutputPropagationProps({
+ element
+ })],
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group
+ };
+ return group.entries.length ? group : null;
+}
+function InputPropagationGroup(element) {
+ const group = {
+ id: 'inputPropagation',
+ label: 'Input propagation',
+ entries: [...InputPropagationProps({
+ element
+ })],
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group
+ };
+ return group.entries.length ? group : null;
+}
+function BusinessRuleImplementationGroup(element) {
+ const group = {
+ id: 'businessRuleImplementation',
+ label: 'Implementation',
+ entries: [...BusinessRuleImplementationProps({
+ element
+ })],
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group
+ };
+ return group.entries.length ? group : null;
+}
+function ScriptImplementationGroup(element) {
+ const group = {
+ id: 'scriptImplementation',
+ label: 'Implementation',
+ entries: [...ScriptImplementationProps({
+ element
+ })],
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group
+ };
+ return group.entries.length ? group : null;
+}
+function AssignmentDefinitionGroup(element) {
+ const group = {
+ id: 'assignmentDefinition',
+ label: 'Assignment',
+ entries: [...AssignmentDefinitionProps({
+ element
+ }), ...TaskScheduleProps({
+ element
+ })],
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group
+ };
+ return group.entries.length ? group : null;
+}
+function ExtensionPropertiesGroup$1(element, injector) {
+ const group = {
+ label: 'Extension properties',
+ id: 'Zeebe__ExtensionProperties',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.ListGroup,
+ ...ExtensionPropertiesProps({
+ element,
+ injector,
+ namespace: 'zeebe'
+ })
+ };
+ if (group.items) {
+ return group;
+ }
+ return null;
+}
+function updateErrorGroup$1(groups, element) {
+ const errorGroup = findGroup$1(groups, 'error');
+ if (!errorGroup) {
+ return;
+ }
+ errorGroup.entries = replaceEntries(errorGroup.entries, ErrorProps$1({
+ element
+ }));
+}
+function updateEscalationGroup$1(groups, element) {
+ const escalationGroup = findGroup$1(groups, 'escalation');
+ if (!escalationGroup) {
+ return;
+ }
+ escalationGroup.entries = replaceEntries(escalationGroup.entries, EscalationProps$1({
+ element
+ }));
+}
+function updateSignalGroup(groups, element) {
+ const signalGroup = findGroup$1(groups, 'signal');
+ if (!signalGroup) {
+ return;
+ }
+ signalGroup.entries = replaceEntries(signalGroup.entries, SignalProps({
+ element
+ }));
+}
+function updateMessageGroup(groups, element) {
+ const messageGroup = findGroup$1(groups, 'message');
+ if (!messageGroup) {
+ return;
+ }
+ messageGroup.entries = replaceEntries(messageGroup.entries, MessageProps({
+ element
+ }));
+}
+
+// overwrite bpmn generic timerEventDefinition group with zeebe-specific one
+function updateTimerGroup$1(groups, element, injector) {
+ const timerEventGroup = findGroup$1(groups, 'timer');
+ if (!timerEventGroup) {
+ return;
+ }
+ timerEventGroup.entries = [...TimerProps$1({
+ element,
+ injector
+ })];
+}
+
+// overwrite bpmn generic multiInstance group with zeebe-specific one
+function updateMultiInstanceGroup$1(groups, element) {
+ const multiInstanceGroup = findGroup$1(groups, 'multiInstance');
+ if (!multiInstanceGroup) {
+ return;
+ }
+ multiInstanceGroup.entries = [...MultiInstanceProps$1({
+ element
+ })];
+}
+
+// remove message group from Message End Event & Message Throw Event
+function removeMessageGroup(groups, element) {
+ const messageGroup = findGroup$1(groups, 'message');
+ if (isMessageEndEvent(element) || isMessageThrowEvent(element)) {
+ groups = groups.filter(g => g != messageGroup);
+ }
+ return groups;
+}
+
+// helper /////////////////////
+
+function findGroup$1(groups, id) {
+ return groups.find(g => g.id === id);
+}
+
+/**
+ * Replace entries with the same ID.
+ *s
+ * @param {Entry[]} oldEntries
+ * @param {Entry[]} newEntries
+ *
+ * @returns {Entry[]} combined entries
+ */
+function replaceEntries(oldEntries, newEntries) {
+ const filteredEntries = oldEntries.filter(oldEntry => !newEntries.find(newEntry => newEntry.id === oldEntry.id));
+ return [...filteredEntries, ...newEntries];
+}
+
+var index$1 = {
+ __init__: ['zeebePropertiesProvider'],
+ zeebePropertiesProvider: ['type', ZeebePropertiesProvider]
+};
+
+function AsynchronousContinuationsProps(props) {
+ const {
+ element
+ } = props;
+ const checkboxIsEditedInverted = node => {
+ return node && !node.checked;
+ };
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const entries = [];
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'camunda:AsyncCapable')) {
+ entries.push({
+ id: 'asynchronousContinuationBefore',
+ component: AsynchronousContinuationBefore,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isCheckboxEntryEdited
+ }, {
+ id: 'asynchronousContinuationAfter',
+ component: AsynchronousContinuationAfter,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isCheckboxEntryEdited
+ });
+ if (isAsyncBefore$2(businessObject) || isAsyncAfter$2(businessObject)) {
+ entries.push({
+ id: 'exclusive',
+ component: Exclusive,
+ isEdited: checkboxIsEditedInverted
+ });
+ }
+ }
+ return entries;
+}
+function AsynchronousContinuationBefore(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack'),
+ translate = useService('translate');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const getValue = () => {
+ return isAsyncBefore$2(businessObject);
+ };
+ const setValue = value => {
+ // overwrite the legacy `async` property, we will use the more explicit `asyncBefore`
+ const props = {
+ 'camunda:asyncBefore': value,
+ 'camunda:async': undefined
+ };
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: props
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.CheckboxEntry)({
+ element,
+ id: 'asynchronousContinuationBefore',
+ label: translate('Before'),
+ getValue,
+ setValue
+ });
+}
+function AsynchronousContinuationAfter(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack'),
+ translate = useService('translate');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const getValue = () => {
+ return isAsyncAfter$2(businessObject);
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:asyncAfter': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.CheckboxEntry)({
+ element,
+ id: 'asynchronousContinuationAfter',
+ label: translate('After'),
+ getValue,
+ setValue
+ });
+}
+function Exclusive(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack'),
+ translate = useService('translate');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const getValue = () => {
+ return isExclusive$1(businessObject);
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:exclusive': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.CheckboxEntry)({
+ element,
+ id: 'exclusive',
+ label: translate('Exclusive'),
+ getValue,
+ setValue
+ });
+}
+
+// helper //////////////////
+
+/**
+ * Returns true if the attribute 'camunda:asyncBefore' is set
+ * to true.
+ *
+ * @param {ModdleElement} bo
+ *
+ * @return {boolean} a boolean value
+ */
+function isAsyncBefore$2(bo) {
+ return !!(bo.get('camunda:asyncBefore') || bo.get('camunda:async'));
+}
- module.exports.triggerClickEvent = triggerClickEvent;
+/**
+ * Returns true if the attribute 'camunda:asyncAfter' is set
+ * to true.
+ *
+ * @param {ModdleElement} bo
+ *
+ * @return {boolean} a boolean value
+ */
+function isAsyncAfter$2(bo) {
+ return !!bo.get('camunda:asyncAfter');
+}
+/**
+ * Returns true if the attribute 'camunda:exclusive' is set
+ * to true.
+ *
+ * @param {ModdleElement} bo
+ *
+ * @return {boolean} a boolean value
+ */
+function isExclusive$1(bo) {
+ return !!bo.get('camunda:exclusive');
+}
+
+const EMPTY_OPTION$1 = '';
+function BusinessKeyProps$1(props) {
+ const {
+ element
+ } = props;
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:StartEvent') || !hasFormFields(element)) {
+ return [];
+ }
+ return [{
+ id: 'businessKey',
+ component: BusinessKey$1,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isSelectEntryEdited
+ }];
+}
+function BusinessKey$1(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const formData = getFormData$2(element);
+ const getValue = () => {
+ return formData.get('camunda:businessKey') || '';
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: formData,
+ properties: {
+ 'camunda:businessKey': value
+ }
+ });
+ };
+ const getOptions = () => {
+ const options = [{
+ value: EMPTY_OPTION$1,
+ label: translate('')
+ }];
+ const fields = formData.get('fields');
+ fields.forEach(field => {
+ const id = field.get('camunda:id');
+ if (id) {
+ options.push({
+ value: id,
+ label: id
+ });
+ }
+ });
+ return options;
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry)({
+ element,
+ id: 'businessKey',
+ label: translate('Key'),
+ getValue,
+ setValue,
+ getOptions
+ });
+}
+
+// helper ///////////////////
+
+function getFormData$2(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return getExtensionElementsList(businessObject, 'camunda:FormData')[0];
+}
+function hasFormFields(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const formData = getFormData$2(businessObject);
+ return formData && formData.get('camunda:fields').length;
+}
+
+function CalledBpmnProps(props) {
+ const {
+ element
+ } = props;
+ const entries = [{
+ id: 'calledElement',
+ component: CalledElement,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }, {
+ id: 'calledElementBinding',
+ component: CalledElementBinding,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isSelectEntryEdited
+ }, {
+ id: 'calledElementTenantId',
+ component: CalledElementTenantId,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }];
+ const binding = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element).get('camunda:calledElementBinding');
+ if (binding === 'version') {
+ entries.splice(-1, 0, {
+ id: 'calledElementVersion',
+ component: CalledElementVersion,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ } else if (binding === 'versionTag') {
+ entries.splice(-1, 0, {
+ id: 'calledElementVersionTag',
+ component: CalledElementVersionTag,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ }
+ return entries;
+}
+function CalledElement(props) {
+ const {
+ element
+ } = props;
+ const modeling = useService('modeling');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element).get('calledElement');
+ };
+ const setValue = value => {
+ modeling.updateProperties(element, {
+ calledElement: value || ''
+ });
+ };
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry, {
+ element: element,
+ id: "calledElement",
+ label: translate('Called element'),
+ getValue: getValue,
+ setValue: setValue,
+ debounce: debounce
+ });
+}
+function CalledElementBinding(props) {
+ const {
+ element
+ } = props;
+ const modeling = useService('modeling');
+ const translate = useService('translate');
+ const getValue = () => {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element).get('camunda:calledElementBinding') || 'latest';
+ };
+ const setValue = value => {
+ modeling.updateProperties(element, {
+ calledElementBinding: value === 'latest' ? undefined : value,
+ calledElementVersion: undefined,
+ calledElementVersionTag: undefined
+ });
+ };
+ const getOptions = () => [{
+ value: 'latest',
+ label: translate('latest')
+ }, {
+ value: 'deployment',
+ label: translate('deployment')
+ }, {
+ value: 'version',
+ label: translate('version')
+ }, {
+ value: 'versionTag',
+ label: translate('version tag')
+ }];
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry, {
+ element: element,
+ id: "calledElementBinding",
+ label: translate('Binding'),
+ getValue: getValue,
+ setValue: setValue,
+ getOptions: getOptions
+ });
+}
+function CalledElementVersion(props) {
+ const {
+ element
+ } = props;
+ const modeling = useService('modeling');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element).get('camunda:calledElementVersion');
+ };
+ const setValue = value => {
+ modeling.updateProperties(element, {
+ calledElementVersion: value
+ });
+ };
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry, {
+ element: element,
+ id: "calledElementVersion",
+ label: translate('Version'),
+ getValue: getValue,
+ setValue: setValue,
+ debounce: debounce
+ });
+}
+function CalledElementVersionTag(props) {
+ const {
+ element
+ } = props;
+ const modeling = useService('modeling');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element).get('camunda:calledElementVersionTag');
+ };
+ const setValue = value => {
+ modeling.updateProperties(element, {
+ calledElementVersionTag: value
+ });
+ };
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry, {
+ element: element,
+ id: "calledElementVersionTag",
+ label: translate('Version tag'),
+ getValue: getValue,
+ setValue: setValue,
+ debounce: debounce
+ });
+}
+function CalledElementTenantId(props) {
+ const {
+ element
+ } = props;
+ const modeling = useService('modeling');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element).get('camunda:calledElementTenantId');
+ };
+ const setValue = value => {
+ modeling.updateProperties(element, {
+ calledElementTenantId: value
+ });
+ };
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry, {
+ element: element,
+ id: "calledElementTenantId",
+ label: translate('Tenant ID'),
+ getValue: getValue,
+ setValue: setValue,
+ debounce: debounce
+ });
+}
+
+function CalledCmmnProps(props) {
+ const {
+ element
+ } = props;
+ const entries = [{
+ id: 'calledElementCaseRef',
+ component: CaseRef,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }, {
+ id: 'calledElementCaseBinding',
+ component: CaseBinding,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isSelectEntryEdited
+ }, {
+ id: 'calledElementCaseTenantId',
+ component: CaseTenantId,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }];
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element).get('camunda:caseBinding') === 'version') {
+ entries.splice(-1, 0, {
+ id: 'calledElementCaseVersion',
+ component: CaseVersion,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ }
+ return entries;
+}
+function CaseRef(props) {
+ const {
+ element
+ } = props;
+ const modeling = useService('modeling');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element).get('camunda:caseRef');
+ };
+ const setValue = value => {
+ modeling.updateProperties(element, {
+ caseRef: value || ''
+ });
+ };
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry, {
+ element: element,
+ id: "calledElementCaseRef",
+ label: translate('Case ref'),
+ getValue: getValue,
+ setValue: setValue,
+ debounce: debounce
+ });
+}
+function CaseBinding(props) {
+ const {
+ element
+ } = props;
+ const modeling = useService('modeling');
+ const translate = useService('translate');
+ const getValue = () => {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element).get('camunda:caseBinding') || 'latest';
+ };
+ const setValue = value => {
+ modeling.updateProperties(element, {
+ caseBinding: value === 'latest' ? undefined : value,
+ caseVersion: undefined
+ });
+ };
+ const getOptions = () => [{
+ value: 'latest',
+ label: translate('latest')
+ }, {
+ value: 'deployment',
+ label: translate('deployment')
+ }, {
+ value: 'version',
+ label: translate('version')
+ }];
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry, {
+ element: element,
+ id: "calledElementCaseBinding",
+ label: translate('Binding'),
+ getValue: getValue,
+ setValue: setValue,
+ getOptions: getOptions
+ });
+}
+function CaseVersion(props) {
+ const {
+ element
+ } = props;
+ const modeling = useService('modeling');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element).get('camunda:caseVersion');
+ };
+ const setValue = value => {
+ modeling.updateProperties(element, {
+ caseVersion: value
+ });
+ };
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry, {
+ element: element,
+ id: "calledElementCaseVersion",
+ label: translate('Version'),
+ getValue: getValue,
+ setValue: setValue,
+ debounce: debounce
+ });
+}
+function CaseTenantId(props) {
+ const {
+ element
+ } = props;
+ const modeling = useService('modeling');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element).get('camunda:caseTenantId');
+ };
+ const setValue = value => {
+ modeling.updateProperties(element, {
+ caseTenantId: value
+ });
+ };
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry, {
+ element: element,
+ id: "calledElementCaseTenantId",
+ label: translate('Tenant ID'),
+ getValue: getValue,
+ setValue: setValue,
+ debounce: debounce
+ });
+}
+
+function DelegateVariableMappingProps(props) {
+ const {
+ element
+ } = props;
+ const entries = [{
+ id: 'calledElementDelegateVariableMappingType',
+ component: DelegateVariableMappingType,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isSelectEntryEdited
+ }];
+ const type = getDelegateVariableMappingType(element);
+ if (type === 'class') {
+ entries.push({
+ id: 'calledElementVariableMappingClass',
+ component: VariableMappingClass,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ } else if (type === 'delegateExpression') {
+ entries.push({
+ id: 'calledElementVariableMappingDelegateExpression',
+ component: VariableMappingDelegateExpression,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ }
+ return entries;
+}
+const DEFAULT_PROPS$5 = {
+ 'camunda:variableMappingClass': undefined,
+ 'camunda:variableMappingDelegateExpression': undefined
+};
+function DelegateVariableMappingType(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const getValue = () => {
+ return getDelegateVariableMappingType(element);
+ };
+ const setValue = value => {
+ const properties = {
+ ...DEFAULT_PROPS$5
+ };
+ if (value === 'class') {
+ properties['camunda:variableMappingClass'] = '';
+ } else if (value === 'delegateExpression') {
+ properties['camunda:variableMappingDelegateExpression'] = '';
+ }
+ commandStack.execute('element.updateProperties', {
+ element,
+ properties
+ });
+ };
+ const getOptions = () => [{
+ value: 'none',
+ label: translate('')
+ }, {
+ value: 'class',
+ label: translate('Class')
+ }, {
+ value: 'delegateExpression',
+ label: translate('Delegate expression')
+ }];
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry, {
+ element: element,
+ id: "calledElementDelegateVariableMappingType",
+ label: translate('Delegate Variable Mapping'),
+ getValue: getValue,
+ setValue: setValue,
+ getOptions: getOptions
+ });
+}
+function VariableMappingDelegateExpression(props) {
+ const {
+ element
+ } = props;
+ const modeling = useService('modeling');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element).get('camunda:variableMappingDelegateExpression');
+ };
+ const setValue = value => {
+ modeling.updateProperties(element, {
+ variableMappingDelegateExpression: value || '',
+ variableMappingClass: undefined
+ });
+ };
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry, {
+ element: element,
+ id: "calledElementVariableMappingDelegateExpression",
+ label: translate('Delegate Expression'),
+ getValue: getValue,
+ setValue: setValue,
+ debounce: debounce
+ });
+}
+function VariableMappingClass(props) {
+ const {
+ element
+ } = props;
+ const modeling = useService('modeling');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element).get('camunda:variableMappingClass');
+ };
+ const setValue = value => {
+ modeling.updateProperties(element, {
+ variableMappingDelegateExpression: undefined,
+ variableMappingClass: value || ''
+ });
+ };
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry, {
+ element: element,
+ id: "calledElementVariableMappingClass",
+ label: translate('Delegate Class'),
+ getValue: getValue,
+ setValue: setValue,
+ debounce: debounce
+ });
+}
+
+// helper /////
+
+function getDelegateVariableMappingType(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ if (businessObject.get('camunda:variableMappingClass') !== undefined) {
+ return 'class';
+ } else if (businessObject.get('camunda:variableMappingDelegateExpression') !== undefined) {
+ return 'delegateExpression';
+ }
+ return 'none';
+}
+
+function CallActivityProps(props) {
+ const {
+ element
+ } = props;
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:CallActivity')) {
+ return [];
+ }
+ const entries = [];
+ entries.push({
+ id: 'calledElementType',
+ component: CalledElementType,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isSelectEntryEdited
+ });
+ const calledElementType = getCalledElementType(element);
+ if (calledElementType === 'bpmn') {
+ entries.push(...CalledBpmnProps({
+ element
+ }), ...BusinessKeyProps({
+ element
+ }), ...DelegateVariableMappingProps({
+ element
+ }));
+ } else if (calledElementType === 'cmmn') {
+ entries.push(...CalledCmmnProps({
+ element
+ }), ...BusinessKeyProps({
+ element
+ }));
+ } else {
+ entries.push(...BusinessKeyProps({
+ element
+ }));
+ }
+ return entries;
+}
+const DEFAULT_PROPS$4 = {
+ calledElement: undefined,
+ 'camunda:calledElementBinding': undefined,
+ 'camunda:calledElementVersion': undefined,
+ 'camunda:calledElementTenantId': undefined,
+ 'camunda:variableMappingClass': undefined,
+ 'camunda:variableMappingDelegateExpression': undefined,
+ 'camunda:caseRef': undefined,
+ 'camunda:caseBinding': undefined,
+ 'camunda:caseVersion': undefined,
+ 'camunda:caseTenantId': undefined
+};
+const DEFAULT_BUSINESS_KEY = '#{execution.processBusinessKey}';
+function CalledElementType(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const getValue = () => {
+ return getCalledElementType(element);
+ };
+ const setValue = value => {
+ const properties = {
+ ...DEFAULT_PROPS$4
+ };
+ if (value === 'bpmn') {
+ properties['calledElement'] = '';
+ } else if (value === 'cmmn') {
+ properties['camunda:caseRef'] = '';
+ }
+ commandStack.execute('element.updateProperties', {
+ element,
+ properties
+ });
+ };
+ const getOptions = () => [{
+ value: '',
+ label: translate('')
+ }, {
+ value: 'bpmn',
+ label: translate('BPMN')
+ }, {
+ value: 'cmmn',
+ label: translate('CMMN')
+ }];
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry, {
+ element: element,
+ id: "calledElementType",
+ label: translate('Type'),
+ getValue: getValue,
+ setValue: setValue,
+ getOptions: getOptions
+ });
+}
+function BusinessKeyProps(props) {
+ const {
+ element
+ } = props;
+ const entries = [{
+ id: 'calledElementBusinessKey',
+ component: BusinessKey,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isCheckboxEntryEdited
+ }];
+ if (hasBusinessKey(element)) {
+ entries.push({
+ id: 'calledElementBusinessKeyExpression',
+ component: BusinessKeyExpression,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ }
+ return entries;
+}
+function BusinessKey(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const modeling = useService('modeling');
+ const bpmnFactory = useService('bpmnFactory');
+ const translate = useService('translate');
+ const getValue = () => {
+ return hasBusinessKey(element);
+ };
+ const setValue = value => {
+ if (value) {
+ addBusinessKey();
+ } else {
+ removeBusinessKey();
+ }
+ };
+ function addBusinessKey() {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ let extensionElements = businessObject.get('extensionElements');
+
+ // (1) If there are no extension elements, create camunda:In and update element's properties
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {}, businessObject, bpmnFactory);
+ const businessKeyItem = createBusinessKey(extensionElements);
+ extensionElements.set('values', [businessKeyItem]);
+ modeling.updateProperties(element, {
+ extensionElements
+ });
+ } else {
+ // (2) Otherwise, add camunda:In to the existing values
+ const businessKeyItem = createBusinessKey(extensionElements);
+ addExtensionElements(element, businessObject, businessKeyItem, bpmnFactory, commandStack);
+ }
+ }
+ function createBusinessKey(parent) {
+ return createElement('camunda:In', {
+ businessKey: DEFAULT_BUSINESS_KEY
+ }, parent, bpmnFactory);
+ }
+ function removeBusinessKey() {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const camundaInList = getExtensionElementsList(businessObject, 'camunda:In');
+ const businessKeyItems = camundaInList.filter(camundaIn => camundaIn.get('businessKey') !== undefined);
+ removeExtensionElements(element, businessObject, businessKeyItems, commandStack);
+ }
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.CheckboxEntry, {
+ element: element,
+ id: "calledElementBusinessKey",
+ label: translate('Business key'),
+ getValue: getValue,
+ setValue: setValue
+ });
+}
+function BusinessKeyExpression(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => getBusinessKey(element);
+ const setValue = value => {
+ const camundaIn = findCamundaInWithBusinessKey(element);
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: camundaIn,
+ properties: {
+ businessKey: value || ''
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry, {
+ element: element,
+ id: "calledElementBusinessKeyExpression",
+ label: translate('Business key expression'),
+ getValue: getValue,
+ setValue: setValue,
+ debounce: debounce
+ });
+}
+
+// helper //////
+
+function getCalledElementType(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ if (businessObject.get('calledElement') !== undefined) {
+ return 'bpmn';
+ } else if (businessObject.get('camunda:caseRef') !== undefined) {
+ return 'cmmn';
+ }
+ return '';
+}
+function hasBusinessKey(element) {
+ return getBusinessKey(element) !== undefined;
+}
+function getBusinessKey(element) {
+ const camundaIn = findCamundaInWithBusinessKey(element);
+ if (camundaIn) {
+ return camundaIn.get('businessKey');
+ }
+}
+function findCamundaInWithBusinessKey(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const camundaInList = getExtensionElementsList(businessObject, 'camunda:In');
+ for (const camundaIn of camundaInList) {
+ const businessKey = camundaIn.get('businessKey');
+ if (businessKey !== undefined) {
+ return camundaIn;
+ }
+ }
+}
+
+function CandidateStarterProps(props) {
+ const {
+ element
+ } = props;
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Process') && !((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Participant') && businessObject.get('processRef'))) {
+ return [];
+ }
+ return [{
+ id: 'candidateStarterGroups',
+ component: CandidateStarterGroups,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }, {
+ id: 'candidateStarterUsers',
+ component: CandidateStarterUsers,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }];
+}
+function CandidateStarterGroups(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack'),
+ translate = useService('translate'),
+ debounce = useService('debounceInput');
+ const process = getProcess$3(element);
+ const getValue = () => {
+ return process.get('camunda:candidateStarterGroups') || '';
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element: element,
+ moddleElement: process,
+ properties: {
+ 'camunda:candidateStarterGroups': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'candidateStarterGroups',
+ label: translate('Candidate starter groups'),
+ description: translate('Specify more than one group as a comma separated list.'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function CandidateStarterUsers(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack'),
+ translate = useService('translate'),
+ debounce = useService('debounceInput');
+ const process = getProcess$3(element);
+ const getValue = () => {
+ return process.get('camunda:candidateStarterUsers') || '';
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element: element,
+ moddleElement: process,
+ properties: {
+ 'camunda:candidateStarterUsers': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'candidateStarterUsers',
+ label: translate('Candidate starter users'),
+ description: translate('Specify more than one user as a comma separated list.'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helper //////////////////
+
+/**
+ * getProcess - get the businessObject of the process referred to by a bpmn:Process
+ * or by a bpmn:Participant
+ *
+ * @param {ModdleElement} element either a bpmn:Process or a bpmn:Participant
+ * @return {BusinessObject}
+ */
+function getProcess$3(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Process') ? (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element) : (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element).get('processRef');
+}
+
+function ConditionProps(props) {
+ const {
+ element
+ } = props;
+ if (!((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:SequenceFlow') && isConditionalSource(element.source)) && !getConditionalEventDefinition(element)) {
+ return [];
+ }
+ const entries = [];
+ if (getConditionalEventDefinition(element)) {
+ entries.push(...VariableEventProps({
+ element
+ }));
+ }
+ entries.push({
+ id: 'conditionType',
+ component: ConditionType,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isSelectEntryEdited
+ });
+ const conditionType = getConditionType(element);
+ if (conditionType === 'script') {
+ entries.push(...ConditionScriptProps({
+ element
+ }));
+ } else if (conditionType === 'expression') {
+ entries.push({
+ id: 'conditionExpression',
+ component: ConditionExpression,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ }
+ return entries;
+}
+function ConditionType(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const bpmnFactory = useService('bpmnFactory');
+ const translate = useService('translate');
+ const getValue = () => {
+ return getConditionType(element);
+ };
+ const setValue = value => {
+ // (1) Remove formalExpression if is selected
+ if (value === '') {
+ updateCondition(element, commandStack, undefined);
+ } else {
+ // (2) Create and set formalExpression element containing the conditionExpression
+ const attributes = {
+ body: '',
+ language: value === 'script' ? '' : undefined
+ };
+ const formalExpressionElement = createFormalExpression(element, attributes, bpmnFactory);
+ updateCondition(element, commandStack, formalExpressionElement);
+ }
+ };
+ const getOptions = () => [{
+ value: '',
+ label: translate('')
+ }, {
+ value: 'script',
+ label: translate('Script')
+ }, {
+ value: 'expression',
+ label: translate('Expression')
+ }];
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry, {
+ element: element,
+ id: "conditionType",
+ label: translate('Type'),
+ getValue: getValue,
+ setValue: setValue,
+ getOptions: getOptions
+ });
+}
+function ConditionExpression(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack'),
+ bpmnFactory = useService('bpmnFactory'),
+ translate = useService('translate'),
+ debounce = useService('debounceInput');
+ const getValue = () => {
+ return getConditionExpression(element).get('body');
+ };
+ const setValue = value => {
+ const conditionExpression = createFormalExpression(element, {
+ body: value
+ }, bpmnFactory);
+ updateCondition(element, commandStack, conditionExpression);
+ };
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry, {
+ element: element,
+ id: "conditionExpression",
+ label: translate('Condition Expression'),
+ getValue: getValue,
+ setValue: setValue,
+ debounce: debounce
+ });
+}
+function ConditionScriptProps(props) {
+ const {
+ element
+ } = props;
+ const entries = [];
+ const scriptType = getScriptType$1(element);
+
+ // (1) language
+ entries.push({
+ id: 'conditionScriptLanguage',
+ component: Language,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+
+ // (2) type
+ entries.push({
+ id: 'conditionScriptType',
+ component: ScriptType,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isSelectEntryEdited
+ });
+
+ // (3) script
+ if (scriptType === 'script') {
+ entries.push({
+ id: 'conditionScriptValue',
+ component: Script$1,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextAreaEntryEdited
+ });
+ } else if (scriptType === 'resource') {
+ // (4) resource
+ entries.push({
+ id: 'conditionScriptResource',
+ component: Resource$1,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ }
+ return entries;
+}
+function Language(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return getConditionExpression(element).get('language');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element: element,
+ moddleElement: getConditionExpression(element),
+ properties: {
+ language: value || ''
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry, {
+ element: element,
+ id: "conditionScriptLanguage",
+ label: translate('Format'),
+ getValue: getValue,
+ setValue: setValue,
+ debounce: debounce
+ });
+}
+function ScriptType(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const getValue = () => {
+ return getScriptType$1(element);
+ };
+ const setValue = value => {
+ // reset script properties on type change
+ const updatedProperties = {
+ 'body': value === 'script' ? '' : undefined,
+ 'camunda:resource': value === 'resource' ? '' : undefined
+ };
+ commandStack.execute('element.updateModdleProperties', {
+ element: element,
+ moddleElement: getConditionExpression(element),
+ properties: updatedProperties
+ });
+ };
+ const getOptions = () => {
+ const options = [{
+ value: 'resource',
+ label: translate('External resource')
+ }, {
+ value: 'script',
+ label: translate('Inline script')
+ }];
+ return options;
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry)({
+ element,
+ id: 'conditionScriptType',
+ label: translate('Script type'),
+ getValue,
+ setValue,
+ getOptions
+ });
+}
+function Script$1(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return getConditionExpression(element).get('body');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element: element,
+ moddleElement: getConditionExpression(element),
+ properties: {
+ 'body': value || ''
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextAreaEntry, {
+ element: element,
+ id: "conditionScriptValue",
+ label: translate('Script'),
+ getValue: getValue,
+ setValue: setValue,
+ debounce: debounce,
+ monospace: true
+ });
+}
+function Resource$1(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return getConditionExpression(element).get('camunda:resource');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element: element,
+ moddleElement: getConditionExpression(element),
+ properties: {
+ 'camunda:resource': value || ''
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry, {
+ element: true,
+ id: "conditionScriptResource",
+ label: translate('Resource'),
+ getValue: getValue,
+ setValue: setValue,
+ debounce: debounce
+ });
+}
+function VariableEventProps(props) {
+ const {
+ element
+ } = props;
+ const entries = [];
+ entries.push({
+ id: 'conditionVariableName',
+ component: VariableName,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:StartEvent') || isInEventSubProcess(element)) {
+ entries.push({
+ id: 'conditionVariableEvents',
+ component: VariableEvents,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ }
+ return entries;
+}
+function VariableName(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return getConditionalEventDefinition(element).get('variableName');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element: element,
+ moddleElement: getConditionalEventDefinition(element),
+ properties: {
+ variableName: value || ''
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry, {
+ element: element,
+ id: "conditionVariableName",
+ label: translate('Variable name'),
+ getValue: getValue,
+ setValue: setValue,
+ debounce: debounce
+ });
+}
+function VariableEvents(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return getConditionalEventDefinition(element).get('variableEvents');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element: element,
+ moddleElement: getConditionalEventDefinition(element),
+ properties: {
+ variableEvents: value || ''
+ }
+ });
+ };
+ const tooltip = (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("p", {
+ children: translate('Specify more than one variable change event as a comma separated list. Variable change events are:')
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("ul", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("li", {
+ children: (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "create"
+ })
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("li", {
+ children: (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "update"
+ })
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("li", {
+ children: (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "delete"
+ })
+ })]
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.org/manual/latest/reference/bpmn20/custom-extensions/extension-attributes/#variableevents",
+ target: "_blank",
+ rel: "noopener",
+ children: translate('Documentation: Variable events')
+ })]
+ });
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry, {
+ element: element,
+ id: "conditionVariableEvents",
+ label: translate('Variable events'),
+ getValue: getValue,
+ setValue: setValue,
+ debounce: debounce,
+ tooltip: tooltip
+ });
+}
+
+// helper ////////////////////
+
+const CONDITIONAL_SOURCES = ['bpmn:Activity', 'bpmn:ExclusiveGateway', 'bpmn:InclusiveGateway', 'bpmn:ComplexGateway'];
+function isConditionalSource(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.isAny)(element, CONDITIONAL_SOURCES);
+}
+function getConditionalEventDefinition(element) {
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Event')) {
+ return false;
+ }
+ return getEventDefinition$1(element, 'bpmn:ConditionalEventDefinition');
+}
+function getConditionType(element) {
+ const conditionExpression = getConditionExpression(element);
+ if (!conditionExpression) {
+ return '';
+ } else {
+ return conditionExpression.get('language') === undefined ? 'expression' : 'script';
+ }
+}
+
+/**
+ * getConditionExpression - get the body value of a condition expression for a given element
+ *
+ * @param {ModdleElement} element
+ *
+ * @return {string|undefined}
+ */
+function getConditionExpression(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(businessObject, 'bpmn:SequenceFlow')) {
+ return businessObject.get('conditionExpression');
+ } else if (getConditionalEventDefinition(businessObject)) {
+ return getConditionalEventDefinition(businessObject).get('condition');
+ }
+}
+function getScriptType$1(element) {
+ const conditionExpression = getConditionExpression(element);
+ const resource = conditionExpression.get('camunda:resource');
+ if (typeof resource !== 'undefined') {
+ return 'resource';
+ } else {
+ return 'script';
+ }
+}
+function updateCondition(element, commandStack, condition = undefined) {
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:SequenceFlow')) {
+ commandStack.execute('element.updateProperties', {
+ element,
+ properties: {
+ conditionExpression: condition
+ }
+ });
+ } else {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: getConditionalEventDefinition(element),
+ properties: {
+ condition
+ }
+ });
+ }
+}
+function createFormalExpression(parent, attributes, bpmnFactory) {
+ return createElement('bpmn:FormalExpression', attributes, (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(parent, 'bpmn:SequenceFlow') ? (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(parent) : getConditionalEventDefinition(parent), bpmnFactory);
+}
+function isInEventSubProcess(element) {
+ const bo = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element),
+ parent = bo.$parent;
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(parent, 'bpmn:SubProcess') && parent.triggeredByEvent;
+}
+
+/**
+ * Cf. https://docs.camunda.org/manual/latest/user-guide/process-engine/scripting/
+ */
+function ScriptProps(props) {
+ const {
+ element,
+ script,
+ prefix
+ } = props;
+ const entries = [];
+ const scriptType = getScriptType(script || element);
+ const idPrefix = prefix || '';
+
+ // (1) scriptFormat
+ entries.push({
+ id: idPrefix + 'scriptFormat',
+ component: Format,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited,
+ idPrefix,
+ script
+ });
+
+ // (2) type
+ entries.push({
+ id: idPrefix + 'scriptType',
+ component: Type$3,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isSelectEntryEdited,
+ idPrefix,
+ script
+ });
+
+ // (3) script
+ if (scriptType === 'script') {
+ entries.push({
+ id: idPrefix + 'scriptValue',
+ component: Script,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextAreaEntryEdited,
+ idPrefix,
+ script
+ });
+ }
+
+ // (4) resource
+ if (scriptType === 'resource') {
+ entries.push({
+ id: idPrefix + 'scriptResource',
+ component: Resource,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited,
+ idPrefix,
+ script
+ });
+ }
+ return entries;
+}
+function Format(props) {
+ const {
+ element,
+ idPrefix,
+ script
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const businessObject = script || (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const getValue = () => {
+ return businessObject.get('scriptFormat');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ scriptFormat: value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: idPrefix + 'scriptFormat',
+ label: translate('Format'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function Type$3(props) {
+ const {
+ element,
+ idPrefix,
+ script
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const businessObject = script || (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const scriptProperty = getScriptProperty(businessObject);
+ const getValue = () => {
+ return getScriptType(businessObject);
+ };
+ const setValue = value => {
+ // reset script properties on type change
+ const properties = {
+ [scriptProperty]: value === 'script' ? '' : undefined,
+ 'camunda:resource': value === 'resource' ? '' : undefined
+ };
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties
+ });
+ };
+ const getOptions = () => {
+ const options = [{
+ value: '',
+ label: translate('')
+ }, {
+ value: 'resource',
+ label: translate('External resource')
+ }, {
+ value: 'script',
+ label: translate('Inline script')
+ }];
+ return options;
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry)({
+ element,
+ id: idPrefix + 'scriptType',
+ label: translate('Type'),
+ getValue,
+ setValue,
+ getOptions
+ });
+}
+function Script(props) {
+ const {
+ element,
+ idPrefix,
+ script
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const businessObject = script || (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const scriptProperty = getScriptProperty(businessObject);
+ const getValue = () => {
+ return getScriptValue(businessObject);
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ [scriptProperty]: value || ''
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextAreaEntry)({
+ element,
+ id: idPrefix + 'scriptValue',
+ label: translate('Script'),
+ getValue,
+ setValue,
+ debounce,
+ monospace: true
+ });
+}
+function Resource(props) {
+ const {
+ element,
+ idPrefix,
+ script
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const businessObject = script || (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const getValue = () => {
+ return businessObject.get('camunda:resource');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:resource': value || ''
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: idPrefix + 'scriptResource',
+ label: translate('Resource'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helper ////////////////////
+
+function getScriptType(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const scriptValue = getScriptValue(businessObject);
+ if (typeof scriptValue !== 'undefined') {
+ return 'script';
+ }
+ const resource = businessObject.get('camunda:resource');
+ if (typeof resource !== 'undefined') {
+ return 'resource';
+ }
+}
+function getScriptValue(businessObject) {
+ return businessObject.get(getScriptProperty(businessObject));
+}
+function isScript$2(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'camunda:Script');
+}
+function getScriptProperty(businessObject) {
+ return isScript$2(businessObject) ? 'value' : 'script';
+}
+
+function getElements(businessObject, type, property) {
+ const elements = getExtensionElementsList(businessObject, type);
+ return !property ? elements : (elements[0] || {})[property] || [];
+}
+function getParameters(element, prop) {
+ const inputOutput = getInputOutput(element);
+ return inputOutput && inputOutput.get(prop) || [];
+}
+
+/**
+ * Get a camunda:inputOutput from the business object
+ *
+ * @param {djs.model.Base | ModdleElement} element
+ *
+ * @return {ModdleElement} the inputOutput object
+ */
+function getInputOutput(element) {
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'camunda:Connector')) {
+ return element.get('inputOutput');
+ }
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return (getElements(businessObject, 'camunda:InputOutput') || [])[0];
+}
+
+/**
+ * Return all input parameters existing in the business object, and
+ * an empty array if none exist.
+ *
+ * @param {djs.model.Base} element
+ *
+ * @return {Array} a list of input parameter objects
+ */
+function getInputParameters(element) {
+ return getParameters(element, 'inputParameters');
+}
- function escapeHTML(str) {
- str = '' + str;
+/**
+ * Return all output parameters existing in the business object, and
+ * an empty array if none exist.
+ *
+ * @param {djs.model.Base} element
+ *
+ * @return {Array} a list of output parameter objects
+ */
+function getOutputParameters(element) {
+ return getParameters(element, 'outputParameters');
+}
+function isInputOutputSupported(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(businessObject, 'bpmn:FlowNode') && !((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.isAny)(businessObject, ['bpmn:StartEvent', 'bpmn:BoundaryEvent', 'bpmn:Gateway']) || (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(businessObject, 'bpmn:SubProcess') && businessObject.get('triggeredByEvent'));
+}
+function areInputParametersSupported(element) {
+ return isInputOutputSupported(element);
+}
+function areOutputParametersSupported(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return isInputOutputSupported(element) && !(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(businessObject, 'bpmn:EndEvent') && !businessObject.loopCharacteristics;
+}
+function getInputOutputType(parameter) {
+ const definitionTypes = {
+ 'camunda:Map': 'map',
+ 'camunda:List': 'list',
+ 'camunda:Script': 'script'
+ };
+ let type = 'stringOrExpression';
+ const definition = parameter.get('definition');
+ if (typeof definition !== 'undefined') {
+ type = definitionTypes[definition.$type];
+ }
+ return type;
+}
+function CreateParameterCmd(element, type, parent, bpmnFactory) {
+ const isInput = type === 'camunda:InputParameter';
+ const newParameter = createElement(type, {
+ name: nextId(isInput ? 'Input_' : 'Output_')
+ }, parent, bpmnFactory);
+ const propertyName = isInput ? 'inputParameters' : 'outputParameters';
+ return {
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: parent,
+ properties: {
+ [propertyName]: [...parent.get(propertyName), newParameter]
+ }
+ }
+ };
+}
+function AddParameterCmd(element, type, bpmnFactory) {
+ const commands = [];
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ let extensionElements = businessObject.get('extensionElements');
+
+ // (1) ensure extension elements
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+
+ // (2) ensure inputOutput
+ let inputOutput = getInputOutput(element);
+ if (!inputOutput) {
+ const parent = extensionElements;
+ inputOutput = createElement('camunda:InputOutput', {
+ inputParameters: [],
+ outputParameters: []
+ }, parent, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), inputOutput]
+ }
+ }
+ });
+ }
+
+ // (3) create + add parameter
+ commands.push(CreateParameterCmd(element, type, inputOutput, bpmnFactory));
+ return commands;
+}
+
+function ListProp(props) {
+ const {
+ element,
+ id: idPrefix,
+ index,
+ item
+ } = props;
+ const id = `${idPrefix}-listItem-${index}`;
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(ListItem, {
+ idPrefix: id,
+ element: element,
+ item: item
+ });
+}
+function ListProps(props) {
+ const {
+ idPrefix,
+ element,
+ parameter
+ } = props;
+ const bpmnFactory = useService('bpmnFactory');
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const list = parameter.get('definition');
+ const items = list.get('items');
+ function addItem() {
+ const value = createElement('camunda:Value', {}, parameter, bpmnFactory);
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: list,
+ properties: {
+ items: [...list.get('items'), value]
+ }
+ });
+ }
+ function removeItem(item) {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: list,
+ properties: {
+ items: (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(list.get('items'), item)
+ }
+ });
+ }
+ function compareFn(item, anotherItem) {
+ const [value = '', anotherValue = ''] = [item.value, anotherItem.value];
+ return value === anotherValue ? 0 : value > anotherValue ? 1 : -1;
+ }
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.ListEntry)({
+ element,
+ autoFocusEntry: true,
+ compareFn,
+ id: idPrefix + '-list',
+ items,
+ label: translate('List values'),
+ onAdd: addItem,
+ onRemove: removeItem,
+ component: ListProp
+ });
+}
+function ListItem(props) {
+ const {
+ idPrefix,
+ element,
+ item
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const definitionLabels = {
+ 'camunda:Map': translate('Map'),
+ 'camunda:List': translate('List'),
+ 'camunda:Script': translate('Script')
+ };
+ const getValue = () => {
+ if (isDefinitionType$1(item)) {
+ return definitionLabels[item.$type];
+ }
+ return item.get('value');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: item,
+ properties: {
+ value
+ }
+ });
+ };
+ return ListValue({
+ id: idPrefix + '-value',
+ disabled: isDefinitionType$1(item),
+ getValue,
+ setValue
+ });
+}
+function ListValue(props) {
+ const {
+ id,
+ disabled,
+ getValue,
+ setValue
+ } = props;
+ const debounce = useService('debounceInput', true);
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SimpleEntry, {
+ id: id,
+ getValue: getValue,
+ setValue: setValue,
+ disabled: disabled,
+ debounce: debounce
+ });
+}
+
+// helper //////////////////////
+
+function isScript$1(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'camunda:Script');
+}
+function isList$1(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'camunda:List');
+}
+function isMap$1(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'camunda:Map');
+}
+function isDefinitionType$1(element) {
+ return isScript$1(element) || isList$1(element) || isMap$1(element);
+}
+
+function MapProp(props) {
+ const {
+ element,
+ id: idPrefix,
+ index,
+ item: entry,
+ open
+ } = props;
+ const id = `${idPrefix}-mapEntry-${index}`;
+ const translate = useService('translate');
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.CollapsibleEntry, {
+ id: id,
+ element: element,
+ entries: MapEntry({
+ element,
+ entry,
+ idPrefix: id
+ }),
+ label: entry.get('key') || translate(''),
+ open: open
+ });
+}
+function MapProps(props) {
+ const {
+ idPrefix,
+ element,
+ parameter
+ } = props;
+ const bpmnFactory = useService('bpmnFactory');
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const map = parameter.get('definition');
+ const entries = map.get('entries');
+ function addEntry() {
+ const entry = createElement('camunda:Entry', {}, parameter, bpmnFactory);
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: map,
+ properties: {
+ entries: [...map.get('entries'), entry]
+ }
+ });
+ }
+ function removeEntry(entry) {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: map,
+ properties: {
+ entries: (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(map.get('entries'), entry)
+ }
+ });
+ }
+ function compareFn(entry, anotherEntry) {
+ const [key = '', anotherKey = ''] = [entry.key, anotherEntry.key];
+ return key === anotherKey ? 0 : key > anotherKey ? 1 : -1;
+ }
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.ListEntry)({
+ element,
+ autoFocusEntry: true,
+ compareFn,
+ id: idPrefix + '-map',
+ items: entries,
+ label: translate('Map entries'),
+ onAdd: addEntry,
+ onRemove: removeEntry,
+ component: MapProp
+ });
+}
+function MapEntry(props) {
+ const {
+ element,
+ entry,
+ idPrefix
+ } = props;
+ const entries = [{
+ id: idPrefix + '-key',
+ component: MapKey,
+ entry,
+ idPrefix,
+ element
+ }, {
+ id: idPrefix + '-value',
+ component: MapValue,
+ entry,
+ idPrefix,
+ element
+ }];
+ return entries;
+}
+function MapKey(props) {
+ const {
+ element,
+ entry,
+ idPrefix
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: entry,
+ properties: {
+ key: value
+ }
+ });
+ };
+ const getValue = () => {
+ return entry.get('key');
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element: entry,
+ id: idPrefix + '-key',
+ label: translate('Key'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function MapValue(props) {
+ const {
+ element,
+ entry,
+ idPrefix
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const definition = entry.get('definition');
+ const definitionLabels = {
+ 'camunda:Map': translate('Map'),
+ 'camunda:List': translate('List'),
+ 'camunda:Script': translate('Script')
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: entry,
+ properties: {
+ value
+ }
+ });
+ };
+ const getValue = () => {
+ if (isDefinitionType(definition)) {
+ return definitionLabels[definition.$type];
+ }
+ return entry.get('value');
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element: entry,
+ id: idPrefix + '-value',
+ label: translate('Value'),
+ getValue,
+ setValue,
+ disabled: isDefinitionType(definition),
+ debounce
+ });
+}
+
+// helper ///////////////////
+
+function isScript(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'camunda:Script');
+}
+function isList(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'camunda:List');
+}
+function isMap(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'camunda:Map');
+}
+function isDefinitionType(element) {
+ return isScript(element) || isList(element) || isMap(element);
+}
+
+const DEFAULT_PROPS$3 = {
+ value: undefined,
+ definition: undefined
+};
+function InputOutputParameter(props) {
+ const {
+ idPrefix,
+ element,
+ parameter
+ } = props;
+ const inputOutputType = getInputOutputType(parameter);
+ let entries = [{
+ id: idPrefix + '-name',
+ component: Name$2,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited,
+ idPrefix,
+ parameter
+ }, {
+ id: idPrefix + '-type',
+ component: Type$2,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isSelectEntryEdited,
+ idPrefix,
+ parameter
+ }];
+
+ // (1) String or expression
+ if (inputOutputType === 'stringOrExpression') {
+ entries.push({
+ id: idPrefix + '-stringOrExpression',
+ component: StringOrExpression,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextAreaEntryEdited,
+ idPrefix,
+ parameter
+ });
+
+ // (2) Script
+ } else if (inputOutputType === 'script') {
+ const script = parameter.get('definition');
+ entries = [...entries, ...ScriptProps({
+ element,
+ prefix: idPrefix + '-',
+ script
+ })];
+
+ // (3) List
+ } else if (inputOutputType === 'list') {
+ entries.push({
+ id: `${idPrefix}-list`,
+ component: ListProps,
+ idPrefix,
+ parameter
+ });
+
+ // (4) Map
+ } else if (inputOutputType === 'map') {
+ entries.push({
+ id: `${idPrefix}-map`,
+ component: MapProps,
+ idPrefix,
+ parameter
+ });
+ }
+ return entries;
+}
+function Name$2(props) {
+ const {
+ idPrefix,
+ element,
+ parameter
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: parameter,
+ properties: {
+ name: value
+ }
+ });
+ };
+ const getValue = parameter => {
+ return parameter.get('name');
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element: parameter,
+ id: idPrefix + '-name',
+ label: translate(isInput(parameter) ? 'Local variable name' : 'Process variable name'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function Type$2(props) {
+ const {
+ idPrefix,
+ element,
+ parameter
+ } = props;
+ const bpmnFactory = useService('bpmnFactory');
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const createDefinitionElement = type => {
+ return createElement(type, {}, parameter, bpmnFactory);
+ };
+ const getValue = mapping => {
+ return getInputOutputType(mapping);
+ };
+ const setValue = value => {
+ let properties = {
+ ...DEFAULT_PROPS$3
+ };
+ if (value === 'script') {
+ properties.definition = createDefinitionElement('camunda:Script');
+ } else if (value === 'list') {
+ properties.definition = createDefinitionElement('camunda:List');
+ } else if (value === 'map') {
+ properties.definition = createDefinitionElement('camunda:Map');
+ }
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: parameter,
+ properties
+ });
+ };
+ const getOptions = () => {
+ const options = [{
+ label: translate('List'),
+ value: 'list'
+ }, {
+ label: translate('Map'),
+ value: 'map'
+ }, {
+ label: translate('Script'),
+ value: 'script'
+ }, {
+ label: translate('String or expression'),
+ value: 'stringOrExpression'
+ }];
+ return options;
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry)({
+ element: parameter,
+ id: idPrefix + '-type',
+ label: translate('Assignment type'),
+ getValue,
+ setValue,
+ getOptions
+ });
+}
+function StringOrExpression(props) {
+ const {
+ idPrefix,
+ element,
+ parameter
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: parameter,
+ properties: {
+ value
+ }
+ });
+ };
+ const getValue = parameter => {
+ return parameter.get('value');
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextAreaEntry)({
+ element: parameter,
+ id: idPrefix + '-stringOrExpression',
+ label: translate('Value'),
+ description: translate('Start typing "${}" to create an expression.'),
+ getValue,
+ setValue,
+ rows: 1,
+ debounce
+ });
+}
+
+// helper /////////////////////
+
+function isInput(parameter) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(parameter, 'camunda:InputParameter');
+}
+
+/**
+ * Check whether an element is camunda:ServiceTaskLike
+ *
+ * @param {djs.model.Base} element
+ *
+ * @return {boolean} a boolean value
+ */
+function isServiceTaskLike(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'camunda:ServiceTaskLike');
+}
- return str && str.replace(/[&<>"']/g, function(match) {
- return HTML_ESCAPE_MAP[match];
- });
- }
+/**
+ * Returns 'true' if the given element is 'camunda:DmnCapable'
+ *
+ * @param {djs.model.Base} element
+ *
+ * @return {boolean} a boolean value
+ */
+function isDmnCapable(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'camunda:DmnCapable');
+}
- module.exports.escapeHTML = escapeHTML;
+/**
+ * Returns 'true' if the given element is 'camunda:ExternalCapable'
+ *
+ * @param {djs.model.Base} element
+ *
+ * @return {boolean} a boolean value
+ */
+function isExternalCapable(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'camunda:ExternalCapable');
+}
- },{"bpmn-js/lib/util/ModelUtil":240,"ids":437,"lodash/forEach":613,"min-dom":647}],6:[function(require,module,exports){
- 'use strict';
+/**
+ * getServiceTaskLikeBusinessObject - Get a 'camunda:ServiceTaskLike' business object.
+ *
+ * If the given element is not a 'camunda:ServiceTaskLike', then 'false'
+ * is returned.
+ *
+ * @param {djs.model.Base} element
+ * @return {ModdleElement} the 'camunda:ServiceTaskLike' business object
+ */
+function getServiceTaskLikeBusinessObject(element) {
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:IntermediateThrowEvent') || (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:EndEvent')) {
+ // change business object to 'messageEventDefinition' when
+ // the element is a message intermediate throw event or message end event
+ // because the camunda extensions (e.g. camunda:class) are in the message
+ // event definition tag and not in the intermediate throw event or end event tag
+ const messageEventDefinition = getMessageEventDefinition(element);
+ if (messageEventDefinition) {
+ element = messageEventDefinition;
+ }
+ }
+ return isServiceTaskLike(element) && (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+}
+
+/**
+ * Returns the implementation type of the given element.
+ *
+ * Possible implementation types are:
+ * - dmn
+ * - connector
+ * - external
+ * - class
+ * - expression
+ * - delegateExpression
+ * - script
+ * - or undefined, when no matching implementation type is found
+ *
+ * @param {djs.model.Base} element
+ *
+ * @return {String} the implementation type
+ */
+function getImplementationType(element) {
+ const businessObject = getListenerBusinessObject(element) || getServiceTaskLikeBusinessObject(element);
+ if (!businessObject) {
+ return;
+ }
+ if (isDmnCapable(businessObject)) {
+ const decisionRef = businessObject.get('camunda:decisionRef');
+ if (typeof decisionRef !== 'undefined') {
+ return 'dmn';
+ }
+ }
+ if (isServiceTaskLike(businessObject)) {
+ const connectors = getExtensionElementsList(businessObject, 'camunda:Connector');
+ if (connectors.length) {
+ return 'connector';
+ }
+ }
+ if (isExternalCapable(businessObject)) {
+ const type = businessObject.get('camunda:type');
+ if (type === 'external') {
+ return 'external';
+ }
+ }
+ const cls = businessObject.get('camunda:class');
+ if (typeof cls !== 'undefined') {
+ return 'class';
+ }
+ const expression = businessObject.get('camunda:expression');
+ if (typeof expression !== 'undefined') {
+ return 'expression';
+ }
+ const delegateExpression = businessObject.get('camunda:delegateExpression');
+ if (typeof delegateExpression !== 'undefined') {
+ return 'delegateExpression';
+ }
+ const script = businessObject.get('script');
+ if (typeof script !== 'undefined') {
+ return 'script';
+ }
+}
+function getListenerBusinessObject(businessObject) {
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.isAny)(businessObject, ['camunda:ExecutionListener', 'camunda:TaskListener'])) {
+ return businessObject;
+ }
+}
+
+function areConnectorsSupported(element) {
+ const businessObject = getServiceTaskLikeBusinessObject(element);
+ return businessObject && getImplementationType(businessObject) === 'connector';
+}
+function getConnectors$2(businessObject) {
+ return getExtensionElementsList(businessObject, 'camunda:Connector');
+}
+function getConnector$1(element) {
+ const businessObject = getServiceTaskLikeBusinessObject(element);
+ const connectors = getConnectors$2(businessObject);
+ return connectors[0];
+}
+
+function ConnectorInputProps(props) {
+ const {
+ element,
+ injector
+ } = props;
+ if (!areConnectorsSupported(element)) {
+ return null;
+ }
+ const connector = getConnector$1(element);
+ const commandStack = injector.get('commandStack'),
+ bpmnFactory = injector.get('bpmnFactory');
+ const inputParameters = getInputParameters(connector) || [];
+ const items = inputParameters.map((parameter, index) => {
+ const id = element.id + '-connector-inputParameter-' + index;
+ return {
+ id,
+ label: parameter.get('name') || '',
+ entries: InputOutputParameter({
+ element,
+ idPrefix: id,
+ parameter
+ }),
+ autoFocusEntry: id + '-name',
+ remove: removeFactory$8({
+ connector,
+ element,
+ parameter,
+ commandStack
+ })
+ };
+ });
+ function add(event) {
+ event.stopPropagation();
+ const commands = [];
+
+ // (1) ensure inputOutput
+ let inputOutput = getInputOutput(connector);
+ if (!inputOutput) {
+ inputOutput = createElement('camunda:InputOutput', {
+ inputParameters: [],
+ outputParameters: []
+ }, connector, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element: element,
+ moddleElement: connector,
+ properties: {
+ inputOutput
+ }
+ }
+ });
+ }
+
+ // (2) create + add parameter
+ commands.push(CreateParameterCmd(element, 'camunda:InputParameter', inputOutput, bpmnFactory));
+
+ // (3) commit all updates
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ }
+ return {
+ items,
+ add
+ };
+}
+function removeFactory$8(props) {
+ const {
+ commandStack,
+ connector,
+ element,
+ parameter
+ } = props;
+ return function (event) {
+ event.stopPropagation();
+ const inputOutput = getInputOutput(connector);
+ if (!inputOutput) {
+ return;
+ }
+ commandStack.execute('element.updateModdleProperties', {
+ element: element,
+ moddleElement: inputOutput,
+ properties: {
+ inputParameters: (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(inputOutput.get('inputParameters'), parameter)
+ }
+ });
+ };
+}
+
+function ConnectorOutputProps(props) {
+ const {
+ element,
+ injector
+ } = props;
+ if (!areConnectorsSupported(element)) {
+ return null;
+ }
+ const connector = getConnector$1(element);
+ const commandStack = injector.get('commandStack'),
+ bpmnFactory = injector.get('bpmnFactory');
+ const outputParameters = getOutputParameters(connector) || [];
+ const items = outputParameters.map((parameter, index) => {
+ const id = element.id + '-connector-outputParameter-' + index;
+ return {
+ id,
+ label: parameter.get('name') || '',
+ entries: InputOutputParameter({
+ idPrefix: id,
+ element,
+ parameter
+ }),
+ autoFocusEntry: id + '-name',
+ remove: removeFactory$7({
+ connector,
+ element,
+ commandStack,
+ parameter
+ })
+ };
+ });
+ function add(event) {
+ event.stopPropagation();
+ const commands = [];
+
+ // (1) ensure inputOutput
+ let inputOutput = getInputOutput(connector);
+ if (!inputOutput) {
+ inputOutput = createElement('camunda:InputOutput', {
+ inputParameters: [],
+ outputParameters: []
+ }, connector, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element: element,
+ moddleElement: connector,
+ properties: {
+ inputOutput
+ }
+ }
+ });
+ }
+
+ // (2) create + add parameter
+ commands.push(CreateParameterCmd(element, 'camunda:OutputParameter', inputOutput, bpmnFactory));
+
+ // (3) commit all updates
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ }
+ return {
+ items,
+ add
+ };
+}
+function removeFactory$7(props) {
+ const {
+ commandStack,
+ connector,
+ element,
+ parameter
+ } = props;
+ return function (event) {
+ event.stopPropagation();
+ const inputOutput = getInputOutput(connector);
+ if (!inputOutput) {
+ return;
+ }
+ commandStack.execute('element.updateModdleProperties', {
+ element: element,
+ moddleElement: inputOutput,
+ properties: {
+ outputParameters: (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(inputOutput.get('outputParameters'), parameter)
+ }
+ });
+ };
+}
+
+function ErrorProps(props) {
+ const {
+ element,
+ entries
+ } = props;
+ if (!isErrorSupported(element)) {
+ return entries;
+ }
+ const error = getError(element);
+
+ // (1) errorMessage (error)
+ if (error) {
+ const idx = findPlaceToInsert(entries, 'errorCode');
+
+ // place below errorCode
+ entries.splice(idx, 0, {
+ id: 'errorMessage',
+ component: ErrorMessage$1,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ }
+ if (!canHaveErrorVariables(element)) {
+ return entries;
+ }
+
+ // (2) errorCodeVariable + errorMessageVariable (errorEventDefinition)
+ entries.push({
+ id: 'errorCodeVariable',
+ component: ErrorCodeVariable,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }, {
+ id: 'errorMessageVariable',
+ component: ErrorMessageVariable,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ return entries;
+}
+function ErrorMessage$1(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const error = getError(element);
+ const getValue = () => {
+ return error.get('camunda:errorMessage');
+ };
+ const setValue = value => {
+ return commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: error,
+ properties: {
+ 'camunda:errorMessage': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'errorMessage',
+ label: translate('Message'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function ErrorCodeVariable(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const errorEventDefinition = getErrorEventDefinition(element);
+ const getValue = () => {
+ return errorEventDefinition.get('camunda:errorCodeVariable');
+ };
+ const setValue = value => {
+ return commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: errorEventDefinition,
+ properties: {
+ 'camunda:errorCodeVariable': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'errorCodeVariable',
+ label: translate('Code variable'),
+ description: translate('Define the name of the variable that will contain the error code.'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function ErrorMessageVariable(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const errorEventDefinition = getErrorEventDefinition(element);
+ const getValue = () => {
+ return errorEventDefinition.get('camunda:errorMessageVariable');
+ };
+ const setValue = value => {
+ return commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: errorEventDefinition,
+ properties: {
+ 'camunda:errorMessageVariable': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'errorMessageVariable',
+ label: translate('Message variable'),
+ description: translate('Define the name of the variable that will contain the error message.'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helper ///////////////////////
+
+function canHaveErrorVariables(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:StartEvent') || (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:BoundaryEvent');
+}
+function findPlaceToInsert(entries, idx) {
+ const entryIndex = (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.findIndex)(entries, entry => entry.id === idx);
+ return entryIndex >= 0 ? entryIndex + 1 : entries.length;
+}
+
+const EMPTY_OPTION = '';
+const CREATE_NEW_OPTION = 'create-new';
+function Error$1(props) {
+ const {
+ idPrefix,
+ errorEventDefinition
+ } = props;
+ let entries = [{
+ id: idPrefix + '-errorRef',
+ component: ErrorRef,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isSelectEntryEdited,
+ errorEventDefinition,
+ idPrefix
+ }];
+ const error = errorEventDefinition.get('errorRef');
+ if (error) {
+ entries = [...entries, {
+ id: idPrefix + '-errorName',
+ component: ErrorName,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited,
+ error,
+ errorEventDefinition,
+ idPrefix
+ }, {
+ id: idPrefix + '-errorCode',
+ component: ErrorCode,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited,
+ error,
+ errorEventDefinition,
+ idPrefix
+ }, {
+ id: idPrefix + '-errorMessage',
+ component: ErrorMessage,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited,
+ error,
+ errorEventDefinition,
+ idPrefix
+ }];
+ }
+ entries.push({
+ id: idPrefix + '-expression',
+ component: Expression$1,
+ errorEventDefinition,
+ idPrefix
+ });
+ return entries;
+}
+function ErrorRef(props) {
+ const {
+ element,
+ errorEventDefinition,
+ idPrefix
+ } = props;
+ const bpmnFactory = useService('bpmnFactory');
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const getValue = () => {
+ const error = errorEventDefinition.get('errorRef');
+ if (error) {
+ return error.get('id');
+ }
+ return EMPTY_OPTION;
+ };
+ const setValue = value => {
+ const root = getRoot(businessObject);
+ const commands = [];
+ let error;
+
+ // (1) create new error
+ if (value === CREATE_NEW_OPTION) {
+ error = createElement('bpmn:Error', {
+ name: nextId('Error_')
+ }, root, bpmnFactory);
+ value = error.get('id');
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: root,
+ properties: {
+ rootElements: [...root.get('rootElements'), error]
+ }
+ }
+ });
+ }
+
+ // (2) update (or remove) errorRef
+ error = error || findRootElementById(businessObject, 'bpmn:Error', value);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: errorEventDefinition,
+ properties: {
+ errorRef: error
+ }
+ }
+ });
+
+ // (3) commit all updates
+ return commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+ const getOptions = () => {
+ let options = [{
+ value: EMPTY_OPTION,
+ label: translate('')
+ }, {
+ value: CREATE_NEW_OPTION,
+ label: translate('Create new ...')
+ }];
+ const errors = findRootElementsByType((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element), 'bpmn:Error');
+ sortByName$1(errors).forEach(error => {
+ options.push({
+ value: error.get('id'),
+ label: error.get('name') || error.get('id')
+ });
+ });
+ return options;
+ };
+ return ReferenceSelectEntry({
+ element,
+ id: idPrefix + '-errorRef',
+ label: translate('Global error reference'),
+ autoFocusEntry: idPrefix + '-errorName',
+ getValue,
+ setValue,
+ getOptions
+ });
+}
+function ErrorName(props) {
+ const {
+ element,
+ error,
+ idPrefix
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return error.get('name');
+ };
+ const setValue = value => {
+ return commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: error,
+ properties: {
+ name: value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: idPrefix + '-errorName',
+ label: translate('Name'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function ErrorCode(props) {
+ const {
+ element,
+ error,
+ idPrefix
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return error.get('errorCode');
+ };
+ const setValue = value => {
+ return commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: error,
+ properties: {
+ errorCode: value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: idPrefix + '-errorCode',
+ label: translate('Code'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function ErrorMessage(props) {
+ const {
+ element,
+ error,
+ idPrefix
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return error.get('errorMessage');
+ };
+ const setValue = value => {
+ return commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: error,
+ properties: {
+ errorMessage: value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: idPrefix + '-errorMessage',
+ label: translate('Message'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function Expression$1(props) {
+ const {
+ element,
+ errorEventDefinition,
+ idPrefix
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: errorEventDefinition,
+ properties: {
+ 'camunda:expression': value
+ }
+ });
+ };
+ const getValue = () => {
+ return errorEventDefinition.get('camunda:expression');
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element: errorEventDefinition,
+ id: idPrefix + '-expression',
+ label: translate('Throw expression'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helpers //////////
+
+function sortByName$1(elements) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.sortBy)(elements, e => (e.name || '').toLowerCase());
+}
+
+function ErrorsProps({
+ element,
+ injector
+}) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:ServiceTask') || getImplementationType(element) !== 'external') {
+ return null;
+ }
+ const errorEventDefinitions = getExtensionElementsList(businessObject, 'camunda:ErrorEventDefinition');
+ const bpmnFactory = injector.get('bpmnFactory'),
+ commandStack = injector.get('commandStack');
+ const items = errorEventDefinitions.map((errorEventDefinition, index) => {
+ const id = element.id + '-error-' + index;
+ return {
+ id,
+ label: getErrorLabel(errorEventDefinition),
+ entries: Error$1({
+ idPrefix: id,
+ element,
+ errorEventDefinition
+ }),
+ autoFocusEntry: id + '-errorRef',
+ remove: removeFactory$6({
+ commandStack,
+ element,
+ errorEventDefinition
+ })
+ };
+ });
+ return {
+ items,
+ add: addFactory$5({
+ bpmnFactory,
+ commandStack,
+ element
+ }),
+ shouldSort: false
+ };
+}
+function removeFactory$6({
+ commandStack,
+ element,
+ errorEventDefinition
+}) {
+ return function (event) {
+ event.stopPropagation();
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ removeExtensionElements(element, businessObject, errorEventDefinition, commandStack);
+ };
+}
+function addFactory$5({
+ bpmnFactory,
+ commandStack,
+ element
+}) {
+ return function (event) {
+ event.stopPropagation();
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const error = createElement('camunda:ErrorEventDefinition', {}, undefined, bpmnFactory);
+ addExtensionElements(element, businessObject, error, bpmnFactory, commandStack);
+ };
+}
+
+// helpers //////////
+
+function getErrorLabel(errorEventDefinition) {
+ const error = errorEventDefinition.get('errorRef');
+ if (!error) {
+ return '';
+ }
+ const errorCode = error.get('errorCode'),
+ name = error.get('name') || '';
+ if (errorCode) {
+ return `${name} (code = ${errorCode})`;
+ }
+ return name;
+}
+
+/**
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
+ */
- var elementHelper = require('../helper/ElementHelper');
+/**
+ * @returns {Array} entries
+ */
+function EscalationProps(props) {
+ const {
+ element,
+ entries
+ } = props;
+ if (!(isEscalationSupported(element) && canHaveEscalationVariables(element))) {
+ return entries;
+ }
+ entries.push({
+ id: 'escalationCodeVariable',
+ component: EscalationCodeVariable,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ return entries;
+}
+function EscalationCodeVariable(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const escalationEventDefinition = getEscalationEventDefinition(element);
+ const getValue = () => {
+ return escalationEventDefinition.get('camunda:escalationCodeVariable');
+ };
+ const setValue = value => {
+ return commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: escalationEventDefinition,
+ properties: {
+ 'camunda:escalationCodeVariable': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'escalationCodeVariable',
+ label: translate('Code variable'),
+ description: translate('Define the name of the variable that will contain the escalation code.'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helper ///////////////////////
+
+function canHaveEscalationVariables(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:StartEvent') || (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:BoundaryEvent');
+}
+
+function ExternalTaskPriorityProps(props) {
+ const {
+ element
+ } = props;
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Process') && !((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Participant') && businessObject.get('processRef')) && !isExternalTaskLike(element)) {
+ return [];
+ }
+ return [{
+ id: 'externalTaskPriority',
+ component: ExternalTaskPriority,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }];
+}
+function ExternalTaskPriority(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack'),
+ translate = useService('translate'),
+ debounce = useService('debounceInput');
+ let businessObject;
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Participant')) {
+ businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element).get('processRef');
+ } else if (isExternalTaskLike(element)) {
+ businessObject = getServiceTaskLikeBusinessObject(element);
+ } else {
+ businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ }
+ const getValue = () => {
+ return businessObject.get('camunda:taskPriority');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:taskPriority': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'externalTaskPriority',
+ label: translate('Priority'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helper //////////////////
+
+function isExternalTaskLike(element) {
+ const bo = getServiceTaskLikeBusinessObject(element),
+ type = bo && bo.get('camunda:type');
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(bo, 'camunda:ServiceTaskLike') && type && type === 'external';
+}
+
+const DEFAULT_PROPS$2 = {
+ 'stringValue': undefined,
+ 'string': undefined,
+ 'expression': undefined
+};
+function FieldInjection(props) {
+ const {
+ element,
+ idPrefix,
+ field
+ } = props;
+ const entries = [{
+ id: idPrefix + '-name',
+ component: NameProperty,
+ field,
+ idPrefix,
+ element
+ }, {
+ id: idPrefix + '-type',
+ component: TypeProperty,
+ field,
+ idPrefix,
+ element
+ }, {
+ id: idPrefix + '-value',
+ component: ValueProperty,
+ field,
+ idPrefix,
+ element
+ }];
+ return entries;
+}
+function NameProperty(props) {
+ const {
+ idPrefix,
+ element,
+ field
+ } = props;
+ const commandStack = useService('commandStack'),
+ translate = useService('translate'),
+ debounce = useService('debounceInput');
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: field,
+ properties: {
+ name: value
+ }
+ });
+ };
+ const getValue = field => {
+ return field.name;
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element: field,
+ id: idPrefix + '-name',
+ label: translate('Name'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function TypeProperty(props) {
+ const {
+ idPrefix,
+ element,
+ field
+ } = props;
+ const commandStack = useService('commandStack'),
+ translate = useService('translate');
+ const getValue = field => {
+ return determineType(field);
+ };
+ const setValue = value => {
+ const properties = Object.assign({}, DEFAULT_PROPS$2);
+ properties[value] = '';
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: field,
+ properties
+ });
+ };
+ const getOptions = element => {
+ const options = [{
+ value: 'string',
+ label: translate('String')
+ }, {
+ value: 'expression',
+ label: translate('Expression')
+ }];
+ return options;
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry)({
+ element: field,
+ id: idPrefix + '-type',
+ label: translate('Type'),
+ getValue,
+ setValue,
+ getOptions
+ });
+}
+function ValueProperty(props) {
+ const {
+ idPrefix,
+ element,
+ field
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const setValue = value => {
+ // (1) determine which type we have set
+ const type = determineType(field);
+
+ // (2) set property accordingly
+ const properties = Object.assign({}, DEFAULT_PROPS$2);
+ properties[type] = value || '';
+
+ // (3) execute the update command
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: field,
+ properties
+ });
+ };
+ const getValue = field => {
+ return field.string || field.stringValue || field.expression;
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element: field,
+ id: idPrefix + '-value',
+ label: translate('Value'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helper ///////////////////
+
+/**
+ * determineType - get the type of a fieldInjection based on the attributes
+ * set on it
+ *
+ * @param {ModdleElement} field
+ * @return {('string'|'expression')}
+ */
+function determineType(field) {
+ // string is the default type
+ return 'string' in field && 'string' || 'expression' in field && 'expression' || 'stringValue' in field && 'string' || 'string';
+}
+
+function FieldInjectionProps({
+ element,
+ injector
+}) {
+ const businessObject = getServiceTaskLikeBusinessObject(element);
+ if (!businessObject) {
+ return null;
+ }
+ const fieldInjections = getExtensionElementsList(businessObject, 'camunda:Field');
+ const bpmnFactory = injector.get('bpmnFactory'),
+ commandStack = injector.get('commandStack');
+ const items = fieldInjections.map((field, index) => {
+ const id = element.id + '-fieldInjection-' + index;
+ return {
+ id,
+ label: getFieldLabel(field),
+ entries: FieldInjection({
+ idPrefix: id,
+ element,
+ field
+ }),
+ autoFocusEntry: id + '-name',
+ remove: removeFactory$5({
+ commandStack,
+ element,
+ field
+ })
+ };
+ });
+ return {
+ items,
+ add: addFactory$4({
+ bpmnFactory,
+ commandStack,
+ element
+ })
+ };
+}
+function removeFactory$5({
+ commandStack,
+ element,
+ field
+}) {
+ return function (event) {
+ event.stopPropagation();
+ const businessObject = getServiceTaskLikeBusinessObject(element);
+ removeExtensionElements(element, businessObject, field, commandStack);
+ };
+}
+function addFactory$4({
+ bpmnFactory,
+ commandStack,
+ element
+}) {
+ return function (event) {
+ event.stopPropagation();
+ const businessObject = getServiceTaskLikeBusinessObject(element);
+ const fieldInjection = createElement('camunda:Field', {
+ name: undefined,
+ string: '',
+ // string is the default type
+ stringValue: undefined
+ }, null, bpmnFactory);
+ addExtensionElements(element, businessObject, fieldInjection, bpmnFactory, commandStack);
+ };
+}
+
+// helper ///////////////
+
+function getFieldLabel(field) {
+ return field.name || '';
+}
+
+function FormFieldConstraint(props) {
+ const {
+ constraint,
+ element,
+ idPrefix
+ } = props;
+ const entries = [{
+ id: idPrefix + '-name',
+ component: Name$1,
+ constraint,
+ idPrefix,
+ element
+ }, {
+ id: idPrefix + '-config',
+ component: Config,
+ constraint,
+ idPrefix,
+ element
+ }];
+ return entries;
+}
+function Name$1(props) {
+ const {
+ idPrefix,
+ element,
+ constraint
+ } = props;
+ const commandStack = useService('commandStack'),
+ translate = useService('translate'),
+ debounce = useService('debounceInput');
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: constraint,
+ properties: {
+ name: value
+ }
+ });
+ };
+ const getValue = () => {
+ return constraint.name;
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element: constraint,
+ id: idPrefix + '-name',
+ label: translate('Name'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function Config(props) {
+ const {
+ idPrefix,
+ element,
+ constraint
+ } = props;
+ const commandStack = useService('commandStack'),
+ translate = useService('translate'),
+ debounce = useService('debounceInput');
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: constraint,
+ properties: {
+ config: value
+ }
+ });
+ };
+ const getValue = () => {
+ return constraint.config;
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element: constraint,
+ id: idPrefix + '-config',
+ label: translate('Config'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+function FormFieldProperty(props) {
+ const {
+ element,
+ idPrefix,
+ property
+ } = props;
+ const entries = [{
+ id: idPrefix + '-id',
+ component: Id$2,
+ idPrefix,
+ property,
+ element
+ }, {
+ id: idPrefix + '-value',
+ component: Value$1,
+ idPrefix,
+ property,
+ element
+ }];
+ return entries;
+}
+function Id$2(props) {
+ const {
+ idPrefix,
+ element,
+ property
+ } = props;
+ const commandStack = useService('commandStack'),
+ translate = useService('translate'),
+ debounce = useService('debounceInput');
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: property,
+ properties: {
+ id: value
+ }
+ });
+ };
+ const getValue = () => {
+ return property.id;
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element: property,
+ id: idPrefix + '-id',
+ label: translate('ID'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function Value$1(props) {
+ const {
+ idPrefix,
+ element,
+ property
+ } = props;
+ const commandStack = useService('commandStack'),
+ translate = useService('translate'),
+ debounce = useService('debounceInput');
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: property,
+ properties: {
+ value
+ }
+ });
+ };
+ const getValue = () => {
+ return property.value;
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element: property,
+ id: idPrefix + '-value',
+ label: translate('Value'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+function FormFieldValue(props) {
+ const {
+ element,
+ idPrefix,
+ value
+ } = props;
+ const entries = [{
+ id: idPrefix + '-id',
+ component: Id$1,
+ idPrefix,
+ value,
+ element
+ }, {
+ id: idPrefix + '-name',
+ component: Name,
+ idPrefix,
+ value,
+ element
+ }];
+ return entries;
+}
+function Id$1(props) {
+ const {
+ idPrefix,
+ element,
+ value
+ } = props;
+ const commandStack = useService('commandStack'),
+ translate = useService('translate'),
+ debounce = useService('debounceInput');
+ const setValue = val => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: value,
+ properties: {
+ id: val
+ }
+ });
+ };
+ const getValue = () => {
+ return value.id;
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element: value,
+ id: idPrefix + '-id',
+ label: translate('ID'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function Name(props) {
+ const {
+ idPrefix,
+ element,
+ value
+ } = props;
+ const commandStack = useService('commandStack'),
+ translate = useService('translate'),
+ debounce = useService('debounceInput');
+ const setValue = val => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: value,
+ properties: {
+ name: val
+ }
+ });
+ };
+ const getValue = () => {
+ return value.name;
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element: value,
+ id: idPrefix + '-name',
+ label: translate('Name'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+const CUSTOM_TYPE_VALUE = '',
+ DEFINED_TYPE_VALUES = ['boolean', 'date', 'enum', 'long', 'string', undefined];
+function FormField(props) {
+ const {
+ idPrefix,
+ formField
+ } = props;
+ const entries = [{
+ id: idPrefix + '-formFieldID',
+ component: Id,
+ idPrefix,
+ formField
+ }, {
+ id: idPrefix + '-formFieldLabel',
+ component: Label,
+ idPrefix,
+ formField
+ }, {
+ id: idPrefix + '-formFieldType',
+ component: Type$1,
+ idPrefix,
+ formField
+ }];
+ if (!DEFINED_TYPE_VALUES.includes(formField.get('type'))) {
+ entries.push({
+ id: idPrefix + '-formFieldCustomType',
+ component: CustomType,
+ idPrefix,
+ formField
+ });
+ }
+ entries.push({
+ id: idPrefix + '-formFieldDefaultValue',
+ component: DefaultValue,
+ idPrefix,
+ formField
+ });
+ if (formField.get('type') === 'enum') {
+ entries.push({
+ id: idPrefix + '-formFieldValues',
+ component: ValueList,
+ formField,
+ idPrefix
+ });
+ }
+ entries.push({
+ id: idPrefix + '-formFieldConstraints',
+ component: ConstraintList,
+ formField,
+ idPrefix
+ }, {
+ id: idPrefix + '-formFieldProperties',
+ component: PropertiesList,
+ formField,
+ idPrefix
+ });
+ return entries;
+}
+function Id(props) {
+ const {
+ idPrefix,
+ element,
+ formField
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: formField,
+ properties: {
+ id: value
+ }
+ });
+ };
+ const getValue = () => {
+ return formField.get('id');
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element: formField,
+ id: idPrefix + '-formFieldID',
+ label: translate('ID'),
+ description: translate('Refers to the process variable name'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function Label(props) {
+ const {
+ idPrefix,
+ element,
+ formField
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: formField,
+ properties: {
+ label: value
+ }
+ });
+ };
+ const getValue = () => {
+ return formField.get('label');
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element: formField,
+ id: idPrefix + '-formFieldLabel',
+ label: translate('Label'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function Type$1(props) {
+ const {
+ idPrefix,
+ element,
+ formField
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: formField,
+ properties: {
+ type: value
+ }
+ });
+ };
+ const getValue = () => {
+ const type = formField.get('type');
+ return DEFINED_TYPE_VALUES.includes(type) ? type : CUSTOM_TYPE_VALUE;
+ };
+ const getOptions = () => {
+ const options = [{
+ label: translate('boolean'),
+ value: 'boolean'
+ }, {
+ label: translate('date'),
+ value: 'date'
+ }, {
+ label: translate('enum'),
+ value: 'enum'
+ }, {
+ label: translate('long'),
+ value: 'long'
+ }, {
+ label: translate('string'),
+ value: 'string'
+ }, {
+ label: translate(''),
+ value: CUSTOM_TYPE_VALUE
+ }];
+
+ // for the initial state only, we want to show an empty state
+ if (formField.get('type') === undefined) {
+ options.unshift({
+ label: translate(''),
+ value: ''
+ });
+ }
+ return options;
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry)({
+ element: formField,
+ id: idPrefix + '-formFieldType',
+ label: translate('Type'),
+ getValue,
+ setValue,
+ getOptions
+ });
+}
+function CustomType(props) {
+ const {
+ idPrefix,
+ element,
+ formField
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const setValue = value => {
+ const type = value || '';
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: formField,
+ properties: {
+ type
+ }
+ });
+ };
+ const getValue = () => {
+ return formField.get('type');
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element: formField,
+ id: idPrefix + '-formFieldCustomType',
+ label: translate('Custom type'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function DefaultValue(props) {
+ const {
+ idPrefix,
+ element,
+ formField
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: formField,
+ properties: {
+ defaultValue: value
+ }
+ });
+ };
+ const getValue = () => {
+ return formField.get('defaultValue');
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element: formField,
+ id: idPrefix + '-formFieldDefaultValue',
+ label: translate('Default value'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function Value(props) {
+ const {
+ element,
+ id: idPrefix,
+ index,
+ item: value,
+ open
+ } = props;
+ const translate = useService('translate');
+ const id = `${idPrefix}-value-${index}`;
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.CollapsibleEntry, {
+ id: id,
+ element: element,
+ entries: FormFieldValue({
+ idPrefix: id,
+ element,
+ value
+ }),
+ label: value.get('id') || translate(''),
+ open: open
+ });
+}
+function ValueList(props) {
+ const {
+ element,
+ formField,
+ idPrefix
+ } = props;
+ const id = `${idPrefix}-formFieldValues`;
+ const bpmnFactory = useService('bpmnFactory');
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const values = formField.get('values') || [];
+ function addValue() {
+ const value = createElement('camunda:Value', {
+ id: undefined,
+ name: undefined
+ }, formField, bpmnFactory);
+ commandStack.execute('element.updateModdleProperties', {
+ element: element,
+ moddleElement: formField,
+ properties: {
+ values: [...formField.get('values'), value]
+ }
+ });
+ }
+ function removeValue(value) {
+ commandStack.execute('element.updateModdleProperties', {
+ element: element,
+ moddleElement: formField,
+ properties: {
+ values: (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(formField.get('values'), value)
+ }
+ });
+ }
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.ListEntry, {
+ element: element,
+ autoFocusEntry: `[data-entry-id="${id}-value-${values.length - 1}"] input`,
+ id: id,
+ label: translate('Values'),
+ items: values,
+ component: Value,
+ onAdd: addValue,
+ onRemove: removeValue
+ });
+}
+function Constraint(props) {
+ const {
+ element,
+ id: idPrefix,
+ index,
+ item: constraint,
+ open
+ } = props;
+ const translate = useService('translate');
+ const id = `${idPrefix}-constraint-${index}`;
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.CollapsibleEntry, {
+ id: id,
+ element: element,
+ entries: FormFieldConstraint({
+ constraint,
+ element,
+ idPrefix: id
+ }),
+ label: constraint.get('name') || translate(''),
+ open: open
+ });
+}
+function ConstraintList(props) {
+ const {
+ element,
+ formField,
+ idPrefix
+ } = props;
+ const id = `${idPrefix}-formFieldConstraints`;
+ const bpmnFactory = useService('bpmnFactory');
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ let validation = formField.get('validation');
+ const constraints = validation && validation.get('constraints') || [];
+ function addConstraint() {
+ const commands = [];
+
+ // (1) ensure validation
+ if (!validation) {
+ validation = createElement('camunda:Validation', {}, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: formField,
+ properties: {
+ validation
+ }
+ }
+ });
+ }
+
+ // (2) add constraint
+ const constraint = createElement('camunda:Constraint', {
+ name: undefined,
+ config: undefined
+ }, validation, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: validation,
+ properties: {
+ constraints: [...validation.get('constraints'), constraint]
+ }
+ }
+ });
+
+ // (3) commit updates
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ }
+ function removeConstraint(constraint) {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: validation,
+ properties: {
+ constraints: (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(validation.get('constraints'), constraint)
+ }
+ });
+ }
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.ListEntry, {
+ element: element,
+ autoFocusEntry: `[data-entry-id="${id}-constraint-${constraints.length - 1}"] input`,
+ id: id,
+ label: translate('Constraints'),
+ items: constraints,
+ component: Constraint,
+ onAdd: addConstraint,
+ onRemove: removeConstraint
+ });
+}
+function Property(props) {
+ const {
+ element,
+ id: idPrefix,
+ index,
+ item: property,
+ open
+ } = props;
+ const translate = useService('translate');
+ const id = `${idPrefix}-property-${index}`;
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.CollapsibleEntry, {
+ id: id,
+ element: element,
+ entries: FormFieldProperty({
+ element,
+ idPrefix: id,
+ property
+ }),
+ label: property.get('id') || translate(''),
+ open: open
+ });
+}
+function PropertiesList(props) {
+ const {
+ element,
+ formField,
+ idPrefix
+ } = props;
+ const id = `${idPrefix}-formFieldProperties`;
+ const bpmnFactory = useService('bpmnFactory');
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ let properties = formField.get('properties');
+ const propertyEntries = properties && properties.get('values') || [];
+ function addProperty() {
+ const commands = [];
+
+ // (1) ensure properties
+ if (!properties) {
+ properties = createElement('camunda:Properties', {}, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: formField,
+ properties: {
+ properties
+ }
+ }
+ });
+ }
+
+ // (2) add property
+ const property = createElement('camunda:Property', {
+ id: undefined,
+ value: undefined
+ }, properties, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: properties,
+ properties: {
+ values: [...properties.get('values'), property]
+ }
+ }
+ });
+
+ // (3) commit updates
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ }
+ function removeProperty(property) {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: properties,
+ properties: {
+ values: (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(properties.get('values'), property)
+ }
+ });
+ }
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.ListEntry, {
+ element: element,
+ autoFocusEntry: true,
+ id: id,
+ compareFn: createAlphanumericCompare('id'),
+ label: translate('Properties'),
+ items: propertyEntries,
+ component: Property,
+ onAdd: addProperty,
+ onRemove: removeProperty
+ });
+}
+
+// helper //////////////////
+
+function createAlphanumericCompare(field) {
+ return function (entry, anotherEntry) {
+ const [key = '', anotherKey = ''] = [entry[field], anotherEntry[field]];
+ return key === anotherKey ? 0 : key > anotherKey ? 1 : -1;
+ };
+}
+
+function FormDataProps({
+ element,
+ injector
+}) {
+ if (!isFormDataSupported(element)) {
+ return;
+ }
+ const formFields = getFormFieldsList(element) || [];
+ const bpmnFactory = injector.get('bpmnFactory'),
+ commandStack = injector.get('commandStack');
+ const items = formFields.map((formField, index) => {
+ const id = element.id + '-formField-' + index;
+ return {
+ id,
+ label: formField.get('id') || '',
+ entries: FormField({
+ idPrefix: id,
+ element,
+ formField
+ }),
+ autoFocusEntry: id + '-formFieldID',
+ remove: removeFactory$4({
+ commandStack,
+ element,
+ formField
+ })
+ };
+ });
+ return {
+ items,
+ add: addFactory$3({
+ bpmnFactory,
+ commandStack,
+ element
+ }),
+ shouldSort: false
+ };
+}
+function addFactory$3({
+ bpmnFactory,
+ commandStack,
+ element
+}) {
+ return function (event) {
+ event.stopPropagation();
+ const commands = [];
+
+ // (1) get camunda:FormData
+ const formData = getFormData$1(element);
+
+ // (2) create camunda:FormField
+ const formField = createElement('camunda:FormField', {}, formData, bpmnFactory);
+
+ // (3) add formField to list
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: formData,
+ properties: {
+ fields: [...formData.get('fields'), formField]
+ }
+ }
+ });
+
+ // (4) commit all updates
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+}
+function removeFactory$4({
+ commandStack,
+ element,
+ formField
+}) {
+ return function (event) {
+ event.stopPropagation();
+ const formData = getFormData$1(element),
+ formFields = getFormFieldsList(element);
+ if (!formFields || !formFields.length) {
+ return;
+ }
+ const fields = (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(formData.get('fields'), formField);
+
+ // update formData
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: formData,
+ properties: {
+ fields
+ }
+ });
+ };
+}
+
+// helper ///////////////////////////////
+
+function isFormDataSupported(element) {
+ const formData = getFormData$1(element);
+ return ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:StartEvent') && !(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element.parent, 'bpmn:SubProcess') || (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:UserTask')) && formData;
+}
+function getFormData$1(element) {
+ const bo = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return getExtensionElementsList(bo, 'camunda:FormData')[0];
+}
+function getFormFieldsList(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const formData = getFormData$1(businessObject);
+ return formData && formData.fields;
+}
+
+const FORM_KEY_PROPS = {
+ 'camunda:formRef': undefined,
+ 'camunda:formRefBinding': undefined,
+ 'camunda:formRefVersion': undefined
+};
+const FORM_REF_PROPS = {
+ 'camunda:formKey': undefined
+};
+function FormTypeProps(props) {
+ return [{
+ id: 'formType',
+ component: FormType,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isSelectEntryEdited
+ }];
+}
+function FormType(props) {
+ const {
+ element
+ } = props;
+ const translate = useService('translate');
+ const bpmnFactory = useService('bpmnFactory');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const commandStack = useService('commandStack');
+ let extensionElements = businessObject.get('extensionElements');
+ const getValue = () => {
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_12__.isDefined)(businessObject.get('camunda:formKey'))) {
+ return 'formKey';
+ } else if ((0,min_dash__WEBPACK_IMPORTED_MODULE_12__.isDefined)(businessObject.get('camunda:formRef'))) {
+ return 'formRef';
+ } else if (getFormData(element)) {
+ return 'formData';
+ }
+ return '';
+ };
+ const setValue = value => {
+ const commands = removePropertiesCommands(element);
+ if (value === 'formData') {
+ // (1) ensure extension elements
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+
+ // (2) create camunda:FormData
+ const parent = extensionElements;
+ const formData = createElement('camunda:FormData', {
+ fields: []
+ }, parent, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), formData]
+ }
+ }
+ });
+ } else if (value === 'formKey') {
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:formKey': ''
+ }
+ }
+ });
+ } else if (value === 'formRef') {
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:formRef': ''
+ }
+ }
+ });
+ }
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+ const getOptions = () => {
+ return [{
+ value: '',
+ label: translate('')
+ }, {
+ value: 'formRef',
+ label: translate('Camunda Forms')
+ }, {
+ value: 'formKey',
+ label: translate('Embedded or External Task Forms')
+ }, {
+ value: 'formData',
+ label: translate('Generated Task Forms')
+ }];
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry)({
+ element,
+ id: 'formType',
+ label: translate('Type'),
+ getValue,
+ setValue,
+ getOptions
+ });
+}
+function getFormData(element) {
+ const bo = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return getExtensionElementsList(bo, 'camunda:FormData')[0];
+}
+function removePropertiesCommands(element, commandStack) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const extensionElements = businessObject.get('extensionElements');
+ const commands = [];
+
+ // (1) reset formKey and formRef
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ ...FORM_KEY_PROPS,
+ ...FORM_REF_PROPS
+ }
+ }
+ });
+
+ // (2) remove formData if defined
+ if (extensionElements && getFormData(element)) {
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(extensionElements.get('values'), getFormData(element))
+ }
+ }
+ });
+ }
+ return commands;
+}
+
+function getFormRefBinding(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return businessObject.get('camunda:formRefBinding') || 'latest';
+}
+function getFormType(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_12__.isDefined)(businessObject.get('camunda:formKey'))) {
+ return 'formKey';
+ } else if ((0,min_dash__WEBPACK_IMPORTED_MODULE_12__.isDefined)(businessObject.get('camunda:formRef'))) {
+ return 'formRef';
+ }
+}
+function isFormSupported(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:StartEvent') && !(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element.parent, 'bpmn:SubProcess') || (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:UserTask');
+}
+
+function FormProps(props) {
+ const {
+ element
+ } = props;
+ if (!isFormSupported(element)) {
+ return [];
+ }
+ const formType = getFormType(element),
+ bindingType = getFormRefBinding(element);
+
+ // (1) display form type select
+ const entries = [...FormTypeProps()];
+
+ // (2) display form properties based on type
+ if (formType === 'formKey') {
+ entries.push({
+ id: 'formKey',
+ component: FormKey,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ } else if (formType === 'formRef') {
+ entries.push({
+ id: 'formRef',
+ component: FormRef,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }, {
+ id: 'formRefBinding',
+ component: Binding$1,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isSelectEntryEdited
+ });
+ if (bindingType === 'version') {
+ entries.push({
+ id: 'formRefVersion',
+ component: Version$1,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ }
+ }
+ return entries;
+}
+function FormKey(props) {
+ const {
+ element
+ } = props;
+ const debounce = useService('debounceInput');
+ const modeling = useService('modeling');
+ const translate = useService('translate');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const getValue = () => {
+ return businessObject.get('camunda:formKey');
+ };
+ const setValue = value => {
+ modeling.updateProperties(element, {
+ 'camunda:formKey': (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.isUndefined)(value) ? '' : value
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'formKey',
+ label: translate('Form key'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function FormRef(props) {
+ const {
+ element
+ } = props;
+ const debounce = useService('debounceInput');
+ const modeling = useService('modeling');
+ const translate = useService('translate');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const getValue = () => {
+ return businessObject.get('camunda:formRef');
+ };
+ const setValue = value => {
+ modeling.updateProperties(element, {
+ 'camunda:formRef': (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.isUndefined)(value) ? '' : value
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'formRef',
+ label: translate('Form reference'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function Binding$1(props) {
+ const {
+ element
+ } = props;
+ const modeling = useService('modeling');
+ const translate = useService('translate');
+ const getValue = () => {
+ return getFormRefBinding(element);
+ };
+ const setValue = value => {
+ modeling.updateProperties(element, {
+ 'camunda:formRefBinding': value
+ });
+ };
+
+ // Note: default is "latest",
+ // cf. https://docs.camunda.org/manual/develop/reference/bpmn20/custom-extensions/extension-attributes/#formrefbinding
+ const getOptions = () => {
+ const options = [{
+ value: 'deployment',
+ label: translate('deployment')
+ }, {
+ value: 'latest',
+ label: translate('latest')
+ }, {
+ value: 'version',
+ label: translate('version')
+ }];
+ return options;
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry)({
+ element,
+ id: 'formRefBinding',
+ label: translate('Binding'),
+ getValue,
+ setValue,
+ getOptions
+ });
+}
+function Version$1(props) {
+ const {
+ element
+ } = props;
+ const debounce = useService('debounceInput');
+ const modeling = useService('modeling');
+ const translate = useService('translate');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const getValue = () => {
+ return businessObject.get('camunda:formRefVersion');
+ };
+ const setValue = value => {
+ modeling.updateProperties(element, {
+ 'camunda:formRefVersion': value
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'formRefVersion',
+ label: translate('Version'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+function HistoryCleanupProps(props) {
+ const {
+ element
+ } = props;
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Process') && !((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Participant') && businessObject.get('processRef'))) {
+ return [];
+ }
+ return [{
+ id: 'historyTimeToLive',
+ component: HistoryTimeToLive,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }];
+}
+function HistoryTimeToLive(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const process = getProcess$2(element);
+ const getValue = () => {
+ return process.get('camunda:historyTimeToLive') || '';
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: process,
+ properties: {
+ 'camunda:historyTimeToLive': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'historyTimeToLive',
+ label: translate('Time to live'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helper //////////////////
+
+function getProcess$2(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Process') ? (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element) : (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element).get('processRef');
+}
+
+function DmnImplementationProps(props) {
+ const {
+ element
+ } = props;
+ const entries = [];
+ const implementationType = getImplementationType(element);
+ const bindingType = getDecisionRefBinding(element);
+ if (implementationType !== 'dmn') {
+ return entries;
+ }
+
+ // (1) decisionRef
+ entries.push({
+ id: 'decisionRef',
+ component: DecisionRef,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+
+ // (2) binding
+ entries.push({
+ id: 'decisionRefBinding',
+ component: Binding,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isSelectEntryEdited
+ });
+
+ // (3) version
+ if (bindingType === 'version') {
+ entries.push({
+ id: 'decisionRefVersion',
+ component: Version,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ }
+
+ // (4) versionTag
+ if (bindingType === 'versionTag') {
+ entries.push({
+ id: 'decisionRefVersionTag',
+ component: VersionTag$1,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ }
+
+ // (5) tenantId
+ entries.push({
+ id: 'decisionRefTenantId',
+ component: TenantId,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+
+ // (6) resultVariable
+ entries.push({
+ id: 'decisionRefResultVariable',
+ component: ResultVariable$2,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+
+ // (7) mapDecisionResult
+ if (getResultVariable(element)) {
+ entries.push({
+ id: 'mapDecisionResult',
+ component: MapDecisionResult,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isSelectEntryEdited
+ });
+ }
+ return entries;
+}
+function DecisionRef(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const getValue = () => {
+ return businessObject.get('camunda:decisionRef');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:decisionRef': value || ''
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'decisionRef',
+ label: translate('Decision reference'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function Binding(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const getValue = () => {
+ return getDecisionRefBinding(element);
+ };
+ const setValue = value => {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+
+ // reset version properties on binding type change
+ const updatedProperties = {
+ 'camunda:decisionRefVersion': undefined,
+ 'camunda:decisionRefVersionTag': undefined,
+ 'camunda:decisionRefBinding': value
+ };
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: updatedProperties
+ });
+ };
+
+ // Note: default is "latest",
+ // cf. https://docs.camunda.org/manual/latest/reference/bpmn20/custom-extensions/extension-attributes/#decisionrefbinding
+ const getOptions = () => {
+ const options = [{
+ value: 'deployment',
+ label: translate('deployment')
+ }, {
+ value: 'latest',
+ label: translate('latest')
+ }, {
+ value: 'version',
+ label: translate('version')
+ }, {
+ value: 'versionTag',
+ label: translate('versionTag')
+ }];
+ return options;
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry)({
+ element,
+ id: 'decisionRefBinding',
+ label: translate('Binding'),
+ getValue,
+ setValue,
+ getOptions
+ });
+}
+function Version(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const getValue = () => {
+ return businessObject.get('camunda:decisionRefVersion');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:decisionRefVersion': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'decisionRefVersion',
+ label: translate('Version'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function VersionTag$1(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const getValue = () => {
+ return businessObject.get('camunda:decisionRefVersionTag');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:decisionRefVersionTag': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'decisionRefVersionTag',
+ label: translate('Version tag'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function TenantId(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const getValue = () => {
+ return businessObject.get('camunda:decisionRefTenantId');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:decisionRefTenantId': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'decisionRefTenantId',
+ label: translate('Tenant ID'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function ResultVariable$2(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const getValue = () => {
+ return getResultVariable(businessObject);
+ };
+
+ // Note: camunda:mapDecisionResult got cleaned up in modeling behavior
+ // cf. https://github.com/camunda/camunda-bpmn-js/blob/main/lib/camunda-platform/features/modeling/behavior/UpdateResultVariableBehavior.js
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:resultVariable': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'decisionRefResultVariable',
+ label: translate('Result variable'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function MapDecisionResult(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const getValue = () => {
+ return businessObject.get('camunda:mapDecisionResult') || 'resultList';
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:mapDecisionResult': value
+ }
+ });
+ };
+
+ // Note: default is "resultList",
+ // cf. https://docs.camunda.org/manual/latest/reference/bpmn20/custom-extensions/extension-attributes/#mapdecisionresult
+ const getOptions = () => {
+ const options = [{
+ value: 'collectEntries',
+ label: translate('collectEntries (List)')
+ }, {
+ value: 'resultList',
+ label: translate('resultList (List>)')
+ }, {
+ value: 'singleEntry',
+ label: translate('singleEntry (TypedValue)')
+ }, {
+ value: 'singleResult',
+ label: translate('singleResult (Map)')
+ }];
+ return options;
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry)({
+ element,
+ id: 'mapDecisionResult',
+ label: translate('Map decision result'),
+ getValue,
+ setValue,
+ getOptions
+ });
+}
+
+// helper ////////////////////
+
+function getDecisionRefBinding(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return businessObject.get('camunda:decisionRefBinding') || 'latest';
+}
+function getResultVariable(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return businessObject.get('camunda:resultVariable');
+}
+
+const DELEGATE_PROPS = {
+ 'camunda:class': undefined,
+ 'camunda:expression': undefined,
+ 'camunda:delegateExpression': undefined,
+ 'camunda:resultVariable': undefined
+};
+const DMN_CAPABLE_PROPS = {
+ 'camunda:decisionRef': undefined,
+ 'camunda:decisionRefBinding': 'latest',
+ 'camunda:decisionRefVersion': undefined,
+ 'camunda:mapDecisionResult': 'resultList',
+ 'camunda:decisionRefTenantId': undefined
+};
+const EXTERNAL_CAPABLE_PROPS = {
+ 'camunda:type': undefined,
+ 'camunda:topic': undefined
+};
+const IMPLEMENTATION_TYPE_NONE_LABEL = '',
+ IMPLEMENTATION_TYPE_JAVA_LABEL = 'Java class',
+ IMPLEMENTATION_TYPE_EXPRESSION_LABEL = 'Expression',
+ IMPLEMENTATION_TYPE_DELEGATE_LABEL = 'Delegate expression',
+ IMPLEMENTATION_TYPE_DMN_LABEL = 'DMN',
+ IMPLEMENTATION_TYPE_EXTERNAL_LABEL = 'External',
+ IMPLEMENTATION_TYPE_CONNECTOR_LABEL = 'Connector';
+function ImplementationTypeProps(props) {
+ return [{
+ id: 'implementationType',
+ component: ImplementationType,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isSelectEntryEdited
+ }];
+}
+function ImplementationType(props) {
+ const {
+ element
+ } = props;
+ const bpmnFactory = useService('bpmnFactory');
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const getValue = () => {
+ return getImplementationType(element) || '';
+ };
+ const setValue = value => {
+ const oldType = getImplementationType(element);
+ const businessObject = getServiceTaskLikeBusinessObject(element);
+ const commands = [];
+ let updatedProperties = DELEGATE_PROPS;
+ let extensionElements = businessObject.get('extensionElements');
+
+ // (1) class, expression, delegateExpression
+ if (isDelegateType(value)) {
+ updatedProperties = {
+ ...updatedProperties,
+ [value]: isDelegateType(oldType) ? businessObject.get(`camunda:${oldType}`) : ''
+ };
+ }
+
+ // (2) dmn
+ if (isDmnCapable(businessObject)) {
+ updatedProperties = {
+ ...updatedProperties,
+ ...DMN_CAPABLE_PROPS
+ };
+ if (value === 'dmn') {
+ updatedProperties = {
+ ...updatedProperties,
+ 'camunda:decisionRef': ''
+ };
+ }
+ }
+
+ // (3) external
+ // Note: error event definition elements got cleaned up in modeling behavior
+ // cf. https://github.com/camunda/camunda-bpmn-js/blob/main/lib/camunda-platform/features/modeling/behavior/DeleteErrorEventDefinitionBehavior.js
+ if (isExternalCapable(businessObject)) {
+ updatedProperties = {
+ ...updatedProperties,
+ ...EXTERNAL_CAPABLE_PROPS
+ };
+ if (value === 'external') {
+ updatedProperties = {
+ ...updatedProperties,
+ 'camunda:type': 'external',
+ 'camunda:topic': ''
+ };
+ }
+ }
+
+ // (4) connector
+ if (isServiceTaskLike(businessObject)) {
+ // (4.1) remove all connectors on type change
+ const connectors = getConnectors$1(businessObject);
+ if (connectors.length) {
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(extensionElements.get('values'), value => connectors.includes(value))
+ }
+ }
+ });
+ }
+
+ // (4.2) create connector
+ if (value === 'connector') {
+ // ensure extension elements
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ commands.push(UpdateModdlePropertiesCommand(element, businessObject, {
+ extensionElements
+ }));
+ }
+ const connector = createElement('camunda:Connector', {}, extensionElements, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), connector]
+ }
+ }
+ });
+ }
+ }
+
+ // (5) collect all property updates
+ commands.push(UpdateModdlePropertiesCommand(element, businessObject, updatedProperties));
+
+ // (6) commit all updates
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+ const getOptions = () => {
+ const businessObject = getServiceTaskLikeBusinessObject(element);
+ const options = [{
+ value: '',
+ label: translate(IMPLEMENTATION_TYPE_NONE_LABEL)
+ }, {
+ value: 'class',
+ label: translate(IMPLEMENTATION_TYPE_JAVA_LABEL)
+ }, {
+ value: 'expression',
+ label: translate(IMPLEMENTATION_TYPE_EXPRESSION_LABEL)
+ }, {
+ value: 'delegateExpression',
+ label: translate(IMPLEMENTATION_TYPE_DELEGATE_LABEL)
+ }];
+ if (isDmnCapable(businessObject)) {
+ options.push({
+ value: 'dmn',
+ label: translate(IMPLEMENTATION_TYPE_DMN_LABEL)
+ });
+ }
+ if (isExternalCapable(businessObject)) {
+ options.push({
+ value: 'external',
+ label: translate(IMPLEMENTATION_TYPE_EXTERNAL_LABEL)
+ });
+ }
+ if (isServiceTaskLike(businessObject)) {
+ options.push({
+ value: 'connector',
+ label: translate(IMPLEMENTATION_TYPE_CONNECTOR_LABEL)
+ });
+ }
+ return sortByPriority(options);
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry)({
+ element,
+ id: 'implementationType',
+ label: translate('Type'),
+ getValue,
+ setValue,
+ getOptions
+ });
+}
+
+// helper ///////////////////////
+
+function isDelegateType(type) {
+ return ['class', 'expression', 'delegateExpression'].includes(type);
+}
+function getConnectors$1(businessObject) {
+ return getExtensionElementsList(businessObject, 'camunda:Connector');
+}
+function UpdateModdlePropertiesCommand(element, businessObject, newProperties) {
+ return {
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: newProperties
+ }
+ };
+}
+function sortByPriority(options) {
+ const priorities = {
+ [IMPLEMENTATION_TYPE_NONE_LABEL]: 0,
+ [IMPLEMENTATION_TYPE_JAVA_LABEL]: 3,
+ [IMPLEMENTATION_TYPE_EXPRESSION_LABEL]: 4,
+ [IMPLEMENTATION_TYPE_DELEGATE_LABEL]: 5,
+ [IMPLEMENTATION_TYPE_DMN_LABEL]: 1,
+ [IMPLEMENTATION_TYPE_EXTERNAL_LABEL]: 2,
+ [IMPLEMENTATION_TYPE_CONNECTOR_LABEL]: 6
+ };
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.sortBy)(options, o => priorities[o.label]);
+}
+
+function ImplementationProps(props) {
+ const {
+ element
+ } = props;
+ if (!getServiceTaskLikeBusinessObject(element)) {
+ return [];
+ }
+ const implementationType = getImplementationType(element);
+
+ // (1) display implementation type select
+ const entries = [...ImplementationTypeProps()];
+
+ // (2) display implementation properties based on type
+ if (implementationType === 'class') {
+ entries.push({
+ id: 'javaClass',
+ component: JavaClass,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ } else if (implementationType === 'expression') {
+ entries.push({
+ id: 'expression',
+ component: Expression,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }, {
+ id: 'expressionResultVariable',
+ component: ResultVariable$1,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ } else if (implementationType === 'delegateExpression') {
+ entries.push({
+ id: 'delegateExpression',
+ component: DelegateExpression,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ } else if (implementationType === 'dmn') {
+ entries.push(...DmnImplementationProps({
+ element
+ }));
+ } else if (implementationType === 'external') {
+ entries.push({
+ id: 'externalTopic',
+ component: Topic,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ } else if (implementationType === 'connector') {
+ entries.push({
+ id: 'connectorId',
+ component: ConnectorId,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ }
+ return entries;
+}
+function JavaClass(props) {
+ const {
+ element,
+ businessObject = getServiceTaskLikeBusinessObject(element),
+ id = 'javaClass'
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return businessObject.get('camunda:class');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:class': value || ''
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id,
+ label: translate('Java class'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function Expression(props) {
+ const {
+ element,
+ businessObject = getServiceTaskLikeBusinessObject(element),
+ id = 'expression'
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return businessObject.get('camunda:expression');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:expression': value || ''
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id,
+ label: translate('Expression'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function ResultVariable$1(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const businessObject = getServiceTaskLikeBusinessObject(element);
+ const getValue = () => {
+ return businessObject.get('camunda:resultVariable');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:resultVariable': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'expressionResultVariable',
+ label: translate('Result variable'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function DelegateExpression(props) {
+ const {
+ element,
+ businessObject = getServiceTaskLikeBusinessObject(element),
+ id = 'delegateExpression'
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const getValue = () => {
+ return businessObject.get('camunda:delegateExpression');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:delegateExpression': value || ''
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id,
+ label: translate('Delegate expression'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function Topic(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const businessObject = getServiceTaskLikeBusinessObject(element);
+ const getValue = () => {
+ return businessObject.get('camunda:topic');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:topic': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'externalTopic',
+ label: translate('Topic'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function ConnectorId(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const connector = getConnector(element);
+ const getValue = () => {
+ return connector.get('camunda:connectorId');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: connector,
+ properties: {
+ 'camunda:connectorId': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'connectorId',
+ label: translate('Connector ID'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helper //////////////////
+
+function getConnectors(businessObject) {
+ return getExtensionElementsList(businessObject, 'camunda:Connector');
+}
+function getConnector(element) {
+ const businessObject = getServiceTaskLikeBusinessObject(element);
+ const connectors = getConnectors(businessObject);
+ return connectors[0];
+}
+
+function InitiatorProps(props) {
+ const {
+ element
+ } = props;
+ if (!isInitiator(element)) {
+ return [];
+ }
+ return [{
+ id: 'initiator',
+ component: Initiator,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }];
+}
+function Initiator(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const getValue = () => {
+ return businessObject.get('camunda:initiator');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:initiator': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'initiator',
+ label: translate('Initiator'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helper ///////////////////
+
+function isInitiator(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'camunda:Initiator') && !(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element.parent, 'bpmn:SubProcess');
+}
+
+/**
+ * Cf. https://docs.camunda.org/manual/7.15/reference/bpmn20/subprocesses/call-activity/#passing-variables
+ */
+function InMappingPropagationProps(props) {
+ const {
+ element
+ } = props;
+ if (!areInMappingsSupported$1(element)) {
+ return [];
+ }
+ const entries = [{
+ id: 'inMapping-propagation',
+ component: PropagateAll$1,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isCheckboxEntryEdited
+ }];
+ if (isPropagateAll$1(element)) {
+ entries.push({
+ id: 'inMapping-propagation-local',
+ component: Local$2,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isCheckboxEntryEdited
+ });
+ }
+ return entries;
+}
+function PropagateAll$1(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const bpmnFactory = useService('bpmnFactory');
+ const translate = useService('translate');
+ const getValue = () => {
+ return isPropagateAll$1(element);
+ };
+ const setValue = value => {
+ if (value) {
+ addInMapping();
+ } else {
+ removeInMapping();
+ }
+ };
+ function addInMapping() {
+ const businessObject = getSignalEventDefinition$1(element) || (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const mapping = createElement('camunda:In', {
+ variables: 'all'
+ }, null, bpmnFactory);
+ addExtensionElements(element, businessObject, mapping, bpmnFactory, commandStack);
+ }
+ function removeInMapping() {
+ const businessObject = getSignalEventDefinition$1(element) || (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const mappings = findRelevantInMappings(element);
+ removeExtensionElements(element, businessObject, mappings, commandStack);
+ }
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.CheckboxEntry)({
+ id: 'inMapping-propagation',
+ label: translate('Propagate all variables'),
+ getValue,
+ setValue
+ });
+}
+function Local$2(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const mapping = findRelevantInMappings(element)[0];
+ const getValue = () => {
+ return mapping.get('camunda:local');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: mapping,
+ properties: {
+ local: value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.CheckboxEntry)({
+ element,
+ id: 'inMapping-propagation-local',
+ label: translate('Local'),
+ getValue,
+ setValue
+ });
+}
+
+// helper //////////////////////////
+
+function areInMappingsSupported$1(element) {
+ const signalEventDefinition = getSignalEventDefinition$1(element);
+ if (signalEventDefinition) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.isAny)(element, ['bpmn:IntermediateThrowEvent', 'bpmn:EndEvent']);
+ }
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:CallActivity');
+}
+function getInMappings$1(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const signalEventDefinition = getSignalEventDefinition$1(businessObject);
+ return getExtensionElementsList(signalEventDefinition || businessObject, 'camunda:In');
+}
+function findRelevantInMappings(element) {
+ const inMappings = getInMappings$1(element);
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.filter)(inMappings, function (mapping) {
+ const variables = mapping.get('variables');
+ return variables && variables === 'all';
+ });
+}
+function isPropagateAll$1(element) {
+ const mappings = findRelevantInMappings(element);
+ return !!mappings.length;
+}
+
+const DEFAULT_PROPS$1 = {
+ 'source': undefined,
+ 'sourceExpression': undefined
+};
+function InOutMapping(props) {
+ const {
+ idPrefix,
+ mapping
+ } = props;
+ const type = getInOutType(mapping);
+ const entries = [];
+
+ // (1) Type
+ entries.push({
+ id: idPrefix + '-type',
+ component: Type,
+ idPrefix,
+ mapping
+ });
+
+ // (2) Source
+ if (type === 'source') {
+ entries.push({
+ id: idPrefix + '-source',
+ component: Source,
+ idPrefix,
+ mapping
+ });
+ }
+
+ // (3) Source expression
+ if (type === 'sourceExpression') {
+ entries.push({
+ id: idPrefix + '-sourceExpression',
+ component: SourceExpression,
+ idPrefix,
+ mapping
+ });
+ }
+
+ // (4) Target
+ entries.push({
+ id: idPrefix + '-target',
+ component: Target,
+ idPrefix,
+ mapping
+ });
+
+ // (5) Local
+ entries.push({
+ id: idPrefix + '-local',
+ component: Local$1,
+ idPrefix,
+ mapping
+ });
+ return entries;
+}
+function Type(props) {
+ const {
+ idPrefix,
+ element,
+ mapping
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const getValue = mapping => {
+ return getInOutType(mapping);
+ };
+ const setValue = value => {
+ const properties = {
+ ...DEFAULT_PROPS$1,
+ [value]: ''
+ };
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: mapping,
+ properties
+ });
+ };
+ const getOptions = () => {
+ const options = [{
+ label: translate('Source'),
+ value: 'source'
+ }, {
+ label: translate('Source expression'),
+ value: 'sourceExpression'
+ }];
+ return options;
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry)({
+ element: mapping,
+ id: idPrefix + '-type',
+ label: translate('Type'),
+ getValue,
+ setValue,
+ getOptions
+ });
+}
+function Source(props) {
+ const {
+ idPrefix,
+ element,
+ mapping
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: mapping,
+ properties: {
+ source: value
+ }
+ });
+ };
+ const getValue = mapping => {
+ return mapping.get('camunda:source');
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element: mapping,
+ id: idPrefix + '-source',
+ label: translate('Source'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function SourceExpression(props) {
+ const {
+ idPrefix,
+ element,
+ mapping
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: mapping,
+ properties: {
+ sourceExpression: value
+ }
+ });
+ };
+ const getValue = mapping => {
+ return mapping.get('camunda:sourceExpression');
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element: mapping,
+ id: idPrefix + '-sourceExpression',
+ label: translate('Source expression'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function Target(props) {
+ const {
+ idPrefix,
+ element,
+ mapping
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: mapping,
+ properties: {
+ target: value
+ }
+ });
+ };
+ const getValue = mapping => {
+ return mapping.get('camunda:target');
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element: mapping,
+ id: idPrefix + '-target',
+ label: translate('Target'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function Local$1(props) {
+ const {
+ idPrefix,
+ element,
+ mapping
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const getValue = () => {
+ return mapping.get('camunda:local');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: mapping,
+ properties: {
+ local: value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.CheckboxEntry)({
+ element,
+ id: idPrefix + '-local',
+ label: translate('Local'),
+ getValue,
+ setValue
+ });
+}
+
+// helper ///////////////////
+
+function getInOutType(mapping) {
+ let inOutType = '';
+ if (typeof mapping.source !== 'undefined') {
+ inOutType = 'source';
+ } else if (typeof mapping.sourceExpression !== 'undefined') {
+ inOutType = 'sourceExpression';
+ }
+ return inOutType;
+}
+
+/**
+ * Cf. https://docs.camunda.org/manual/latest/reference/bpmn20/custom-extensions/extension-elements/#in
+ */
+function InMappingProps({
+ element,
+ injector
+}) {
+ if (!areInMappingsSupported(element)) {
+ return null;
+ }
+ const variableMappings = getInMappings(element) || [];
+ const bpmnFactory = injector.get('bpmnFactory'),
+ commandStack = injector.get('commandStack');
+ const items = variableMappings.map((mapping, index) => {
+ const id = element.id + '-inMapping-' + index;
+ return {
+ id,
+ label: mapping.get('target') || '',
+ entries: InOutMapping({
+ idPrefix: id,
+ element,
+ mapping
+ }),
+ autoFocusEntry: id + '-target',
+ remove: removeFactory$3({
+ commandStack,
+ element,
+ mapping
+ })
+ };
+ });
+ return {
+ items,
+ add: addFactory$2({
+ bpmnFactory,
+ commandStack,
+ element
+ })
+ };
+}
+function removeFactory$3({
+ commandStack,
+ element,
+ mapping
+}) {
+ return function (event) {
+ event.stopPropagation();
+ const businessObject = getSignalEventDefinition$1(element) || (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ removeExtensionElements(element, businessObject, mapping, commandStack);
+ };
+}
+function addFactory$2({
+ bpmnFactory,
+ commandStack,
+ element
+}) {
+ return function (event) {
+ event.stopPropagation();
+ const businessObject = getSignalEventDefinition$1(element) || (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const newMapping = createElement('camunda:In', {
+ source: '' // source is the default type
+ }, null, bpmnFactory);
+ addExtensionElements(element, businessObject, newMapping, bpmnFactory, commandStack);
+ };
+}
+
+// helper ///////////////
+
+function getInMappings(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const signalEventDefinition = getSignalEventDefinition$1(businessObject);
+ const mappings = getExtensionElementsList(signalEventDefinition || businessObject, 'camunda:In');
+
+ // only retrieve relevant mappings here, others are handled in other groups
+ // mapping.businessKey => camunda-platform/CallAvtivityProps
+ // mapping.variables => camunda-platform/InMappingPropagationProps
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.filter)(mappings, function (mapping) {
+ return !mapping.businessKey && !(mapping.variables && mapping.variables === 'all');
+ });
+}
+function areInMappingsSupported(element) {
+ const signalEventDefinition = getSignalEventDefinition$1(element);
+ if (signalEventDefinition) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.isAny)(element, ['bpmn:IntermediateThrowEvent', 'bpmn:EndEvent']);
+ }
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:CallActivity');
+}
+
+function InputProps(props) {
+ const {
+ element,
+ injector
+ } = props;
+ if (!areInputParametersSupported(element)) {
+ return null;
+ }
+ const inputParameters = getInputParameters(element) || [];
+ const bpmnFactory = injector.get('bpmnFactory'),
+ commandStack = injector.get('commandStack');
+ const items = inputParameters.map((parameter, index) => {
+ const id = element.id + '-inputParameter-' + index;
+ return {
+ id,
+ label: parameter.get('name') || '',
+ entries: InputOutputParameter({
+ idPrefix: id,
+ element,
+ parameter
+ }),
+ autoFocusEntry: id + '-name',
+ remove: removeFactory$2({
+ element,
+ commandStack,
+ parameter
+ })
+ };
+ });
+ function add(event) {
+ event.stopPropagation();
+ commandStack.execute('properties-panel.multi-command-executor', AddParameterCmd(element, 'camunda:InputParameter', bpmnFactory));
+ }
+ return {
+ items,
+ add,
+ shouldSort: false
+ };
+}
+function removeFactory$2(props) {
+ const {
+ commandStack,
+ element,
+ parameter
+ } = props;
+ return function (event) {
+ event.stopPropagation();
+ const inputOutput = getInputOutput(element);
+ if (!inputOutput) {
+ return;
+ }
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: inputOutput,
+ properties: {
+ inputParameters: (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(inputOutput.get('inputParameters'), parameter)
+ }
+ });
+ };
+}
+
+function JobExecutionProps(props) {
+ const {
+ element
+ } = props;
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const entries = [];
+
+ // (1) add retryTimeCycle field for camunda:asyncCapable enabled Elements
+ // or TimerEvents
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'camunda:AsyncCapable') && isAsync$1(businessObject) || isTimerEvent(element)) {
+ entries.push({
+ id: 'retryTimeCycle',
+ component: RetryTimeCycle,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ }
+
+ // (2) add jobPriority field for camunda:jobPriorized with async enabled
+ // or Processes
+ // or Processes referred to by participants
+ // or TimerEvents
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'camunda:JobPriorized') && isAsync$1(businessObject) || (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Process') || (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Participant') && businessObject.get('processRef') || isTimerEvent(element)) {
+ entries.push({
+ id: 'jobPriority',
+ component: JobPriority,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ }
+ return entries;
+}
+function JobPriority(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack'),
+ translate = useService('translate'),
+ debounce = useService('debounceInput');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Participant') ? (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element).get('processRef') : (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const getValue = () => {
+ return businessObject.get('camunda:jobPriority');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:jobPriority': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'jobPriority',
+ label: translate('Priority'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function RetryTimeCycle(props) {
+ const {
+ element
+ } = props;
+ const bpmnFactory = useService('bpmnFactory'),
+ commandStack = useService('commandStack'),
+ translate = useService('translate'),
+ debounce = useService('debounceInput');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const getValue = () => {
+ const failedJobRetryTimeCycle = getExtensionElementsList(businessObject, 'camunda:FailedJobRetryTimeCycle')[0];
+ return failedJobRetryTimeCycle && failedJobRetryTimeCycle.body;
+ };
+ const setValue = value => {
+ const commands = [];
+ let extensionElements = businessObject.get('extensionElements');
+
+ // (1) ensure extension elements
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, businessObject, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+
+ // (2) ensure failedJobRetryTimeCycle
+ let failedJobRetryTimeCycle = getExtensionElementsList(businessObject, 'camunda:FailedJobRetryTimeCycle')[0];
+ if (!failedJobRetryTimeCycle) {
+ failedJobRetryTimeCycle = createElement('camunda:FailedJobRetryTimeCycle', {}, extensionElements, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), failedJobRetryTimeCycle]
+ }
+ }
+ });
+ }
+
+ // (3) update failedJobRetryTimeCycle value
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: failedJobRetryTimeCycle,
+ properties: {
+ body: value
+ }
+ }
+ });
+
+ // (4) commit all updates
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'retryTimeCycle',
+ label: translate('Retry time cycle'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helper //////////////////
+
+/**
+ * @param {ModdleElement} bo
+ * @return {boolean} a boolean value
+ */
+function isAsyncBefore$1(bo) {
+ return !!(bo.get('camunda:asyncBefore') || bo.get('camunda:async'));
+}
- /**
- * A handler capable of creating a new element under a provided parent
- * and updating / creating a reference to it in one atomic action.
- *
- * @class
- * @constructor
- */
- function CreateAndReferenceElementHandler(elementRegistry, bpmnFactory) {
- this._elementRegistry = elementRegistry;
- this._bpmnFactory = bpmnFactory;
- }
+/**
+ * @param {ModdleElement} bo
+ * @return {boolean}
+ */
+function isAsyncAfter$1(bo) {
+ return !!bo.get('camunda:asyncAfter');
+}
- CreateAndReferenceElementHandler.$inject = [ 'elementRegistry', 'bpmnFactory' ];
+/**
+ * isAsync - returns true if the attribute 'camunda:asyncAfter' or 'camunda:asyncBefore'
+ * is set to true.
+ *
+ * @param {ModdleElement} bo
+ * @return {boolean}
+ */
+function isAsync$1(bo) {
+ return isAsyncAfter$1(bo) || isAsyncBefore$1(bo);
+}
- module.exports = CreateAndReferenceElementHandler;
+/**
+ * isTimerEvent - returns true if the element is a bpmn:Event with a timerEventDefinition
+ *
+ * @param {ModdleElement} element
+ * @return {boolean}
+ */
+function isTimerEvent(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Event') && getTimerEventDefinition$1(element);
+}
+/**
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
+ */
-// api ////////////////////
+/**
+ * @returns {Array} entries
+ */
+function MultiInstanceProps(props) {
+ const {
+ element
+ } = props;
+ const loopCharacteristics = getLoopCharacteristics(element);
+ let entries = props.entries || [];
+ if (!isMultiInstanceSupported(element)) {
+ return entries;
+ }
+ entries.push({
+ id: 'collection',
+ component: Collection,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }, {
+ id: 'elementVariable',
+ component: ElementVariable,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }, {
+ id: 'multiInstanceAsynchronousBefore',
+ component: MultiInstanceAsynchronousBefore,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isCheckboxEntryEdited
+ }, {
+ id: 'multiInstanceAsynchronousAfter',
+ component: MultiInstanceAsynchronousAfter,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isCheckboxEntryEdited
+ });
+ if (isAsync(loopCharacteristics)) {
+ entries.push({
+ id: 'multiInstanceExclusive',
+ component: MultiInstanceExclusive,
+ isEdited: checkboxIsEditedInverted
+ }, {
+ id: 'multiInstanceRetryTimeCycle',
+ component: MultiInstanceRetryTimeCycle,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ }
+ return entries;
+}
+function Collection(props) {
+ const {
+ element
+ } = props;
+ const debounce = useService('debounceInput');
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const loopCharacteristics = getLoopCharacteristics(element);
+ const getValue = () => {
+ return getCollection(element);
+ };
+ const setValue = value => {
+ return commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: loopCharacteristics,
+ properties: {
+ 'camunda:collection': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'collection',
+ label: translate('Collection'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function ElementVariable(props) {
+ const {
+ element
+ } = props;
+ const debounce = useService('debounceInput');
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const loopCharacteristics = getLoopCharacteristics(element);
+ const getValue = () => {
+ return getElementVariable(element);
+ };
+ const setValue = value => {
+ return commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: loopCharacteristics,
+ properties: {
+ 'camunda:elementVariable': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'elementVariable',
+ label: translate('Element variable'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function MultiInstanceAsynchronousBefore(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const loopCharacteristics = getLoopCharacteristics(element);
+ const getValue = () => {
+ return isAsyncBefore(loopCharacteristics);
+ };
+ const setValue = value => {
+ // overwrite the legacy `async` property, we will use the more explicit `asyncBefore`
+ const properties = {
+ 'camunda:asyncBefore': value,
+ 'camunda:async': undefined
+ };
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: loopCharacteristics,
+ properties
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.CheckboxEntry)({
+ element,
+ id: 'multiInstanceAsynchronousBefore',
+ label: translate('Asynchronous before'),
+ getValue,
+ setValue
+ });
+}
+function MultiInstanceAsynchronousAfter(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const loopCharacteristics = getLoopCharacteristics(element);
+ const getValue = () => {
+ return isAsyncAfter(loopCharacteristics);
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: loopCharacteristics,
+ properties: {
+ 'camunda:asyncAfter': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.CheckboxEntry)({
+ element,
+ id: 'multiInstanceAsynchronousAfter',
+ label: translate('Asynchronous after'),
+ getValue,
+ setValue
+ });
+}
+function MultiInstanceExclusive(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack'),
+ translate = useService('translate');
+ const loopCharacteristics = getLoopCharacteristics(element);
+ const getValue = () => {
+ return isExclusive(loopCharacteristics);
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: loopCharacteristics,
+ properties: {
+ 'camunda:exclusive': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.CheckboxEntry)({
+ element,
+ id: 'multiInstanceExclusive',
+ label: translate('Exclusive'),
+ getValue,
+ setValue
+ });
+}
+function MultiInstanceRetryTimeCycle(props) {
+ const {
+ element
+ } = props;
+ const bpmnFactory = useService('bpmnFactory'),
+ commandStack = useService('commandStack'),
+ translate = useService('translate'),
+ debounce = useService('debounceInput');
+ const loopCharacteristics = getLoopCharacteristics(element);
+ const getValue = () => {
+ const failedJobRetryTimeCycle = getExtensionElementsList(loopCharacteristics, 'camunda:FailedJobRetryTimeCycle')[0];
+ return failedJobRetryTimeCycle && failedJobRetryTimeCycle.body;
+ };
+ const setValue = value => {
+ const commands = [];
+ let extensionElements = loopCharacteristics.get('extensionElements');
+
+ // (1) ensure extension elements
+ if (!extensionElements) {
+ extensionElements = createElement('bpmn:ExtensionElements', {
+ values: []
+ }, loopCharacteristics, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: loopCharacteristics,
+ properties: {
+ extensionElements
+ }
+ }
+ });
+ }
+
+ // (2) ensure failedJobRetryTimeCycle
+ let failedJobRetryTimeCycle = getExtensionElementsList(loopCharacteristics, 'camunda:FailedJobRetryTimeCycle')[0];
+ if (!failedJobRetryTimeCycle) {
+ failedJobRetryTimeCycle = createElement('camunda:FailedJobRetryTimeCycle', {}, extensionElements, bpmnFactory);
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element: loopCharacteristics,
+ moddleElement: extensionElements,
+ properties: {
+ values: [...extensionElements.get('values'), failedJobRetryTimeCycle]
+ }
+ }
+ });
+ }
+
+ // (3) update failedJobRetryTimeCycle value
+ commands.push({
+ cmd: 'element.updateModdleProperties',
+ context: {
+ element,
+ moddleElement: failedJobRetryTimeCycle,
+ properties: {
+ body: value
+ }
+ }
+ });
+
+ // (4) commit all updates
+ commandStack.execute('properties-panel.multi-command-executor', commands);
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'multiInstanceRetryTimeCycle',
+ label: translate('Retry time cycle'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helper ////////////////////////////
+
+// generic ///////////////////////////
+
+/**
+ * isMultiInstanceSupported - check whether given element supports camunda specific props
+ * for multiInstance (ref. ).
+ *
+ * @param {djs.model.Base} element
+ * @return {boolean}
+ */
+function isMultiInstanceSupported(element) {
+ const loopCharacteristics = getLoopCharacteristics(element);
+ return !!loopCharacteristics && (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(loopCharacteristics, 'camunda:Collectable');
+}
- /**
- * Creates a new element under a provided parent and updates / creates a reference to it in
- * one atomic action.
- *
- * @method CreateAndReferenceElementHandler#execute
- *
- * @param {Object} context
- * @param {djs.model.Base} context.element which is the context for the reference
- * @param {moddle.referencingObject} context.referencingObject the object which creates the reference
- * @param {String} context.referenceProperty the property of the referencingObject which makes the reference
- * @param {moddle.newObject} context.newObject the new object to add
- * @param {moddle.newObjectContainer} context.newObjectContainer the container for the new object
- *
- * @returns {Array} the updated element
- */
- CreateAndReferenceElementHandler.prototype.execute = function(context) {
+/**
+ * getProperty - get a property value of the loop characteristics.
+ *
+ * @param {djs.model.Base} element
+ * @param {string} propertyName
+ *
+ * @return {any} the property value
+ */
+function getProperty(element, propertyName) {
+ var loopCharacteristics = getLoopCharacteristics(element);
+ return loopCharacteristics && loopCharacteristics.get(propertyName);
+}
- var referencingObject = ensureNotNull(context.referencingObject, 'referencingObject'),
- referenceProperty = ensureNotNull(context.referenceProperty, 'referenceProperty'),
- newObject = ensureNotNull(context.newObject, 'newObject'),
- newObjectContainer = ensureNotNull(context.newObjectContainer, 'newObjectContainer'),
- newObjectParent = ensureNotNull(context.newObjectParent, 'newObjectParent'),
- changed = [ context.element ]; // this will not change any diagram-js elements
+/**
+ * getLoopCharacteristics - get loopCharacteristics of a given element.
+ *
+ * @param {djs.model.Base} element
+ * @return {ModdleElement | undefined}
+ */
+function getLoopCharacteristics(element) {
+ const bo = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return bo.loopCharacteristics;
+}
- // create new object
- var referencedObject = elementHelper
- .createElement(newObject.type, newObject.properties, newObjectParent, this._bpmnFactory);
- context.referencedObject = referencedObject;
+// collection
- // add to containing list
- newObjectContainer.push(referencedObject);
+/**
+ * getCollection - get the 'camunda:collection' attribute value of the loop characteristics.
+ *
+ * @param {djs.model.Base} element
+ *
+ * @return {string} the 'camunda:collection' value
+ */
+function getCollection(element) {
+ return getProperty(element, 'camunda:collection');
+}
- // adjust reference attribute
- context.previousReference = referencingObject[referenceProperty];
- referencingObject[referenceProperty] = referencedObject;
+// elementVariable
- context.changed = changed;
+/**
+ * getElementVariable - get the 'camunda:elementVariable' attribute value of the loop characteristics.
+ *
+ * @param {djs.model.Base} element
+ *
+ * @return {string} the 'camunda:elementVariable' value
+ */
+function getElementVariable(element) {
+ return getProperty(element, 'camunda:elementVariable');
+}
- // indicate changed on objects affected by the update
- return changed;
- };
+// asyncBefore asyncAfter
- /**
- * Reverts the update
- *
- * @method CreateAndReferenceElementHandler#revert
- *
- * @param {Object} context
- *
- * @returns {djs.mode.Base} the updated element
- */
- CreateAndReferenceElementHandler.prototype.revert = function(context) {
+/**
+ * Returns true if the attribute 'camunda:asyncBefore' is set
+ * to true.
+ *
+ * @param {ModdleElement} bo
+ *
+ * @return {boolean} a boolean value
+ */
+function isAsyncBefore(bo) {
+ return !!(bo.get('camunda:asyncBefore') || bo.get('camunda:async'));
+}
- var referencingObject = context.referencingObject,
- referenceProperty = context.referenceProperty,
- previousReference = context.previousReference,
- referencedObject = context.referencedObject,
- newObjectContainer = context.newObjectContainer;
+/**
+ * Returns true if the attribute 'camunda:asyncAfter' is set
+ * to true.
+ *
+ * @param {ModdleElement} bo
+ *
+ * @return {boolean} a boolean value
+ */
+function isAsyncAfter(bo) {
+ return !!bo.get('camunda:asyncAfter');
+}
- // reset reference
- referencingObject.set(referenceProperty, previousReference);
+/**
+ * Returns true if the attribute 'camunda:exclusive' is set
+ * to true.
+ *
+ * @param {ModdleElement} bo
+ *
+ * @return {boolean} a boolean value
+ */
+function isExclusive(bo) {
+ return !!bo.get('camunda:exclusive');
+}
- // remove new element
- newObjectContainer.splice(newObjectContainer.indexOf(referencedObject), 1);
+/**
+ * isAsync - returns true if the attribute 'camunda:asyncAfter' or 'camunda:asyncBefore'
+ * is set to true.
+ *
+ * @param {ModdleElement} bo
+ * @return {boolean}
+ */
+function isAsync(bo) {
+ return isAsyncAfter(bo) || isAsyncBefore(bo);
+}
- return context.changed;
- };
+// Checkbox
+function checkboxIsEditedInverted(node) {
+ return node && !node.checked;
+}
+/**
+ * Cf. https://docs.camunda.org/manual/7.15/reference/bpmn20/subprocesses/call-activity/#passing-variables
+ */
+function OutMappingPropagationProps(props) {
+ const {
+ element
+ } = props;
+ if (!areOutMappingsSupported$1(element)) {
+ return [];
+ }
+ const entries = [{
+ id: 'outMapping-propagation',
+ component: PropagateAll,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isCheckboxEntryEdited
+ }];
+ if (isPropagateAll(element)) {
+ entries.push({
+ id: 'outMapping-propagation-local',
+ component: Local,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isCheckboxEntryEdited
+ });
+ }
+ return entries;
+}
+function PropagateAll(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const bpmnFactory = useService('bpmnFactory');
+ const translate = useService('translate');
+ const getValue = () => {
+ return isPropagateAll(element);
+ };
+ const setValue = value => {
+ if (value) {
+ addOutMapping();
+ } else {
+ removeOutMapping();
+ }
+ };
+ function addOutMapping() {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const mapping = createElement('camunda:Out', {
+ variables: 'all'
+ }, null, bpmnFactory);
+ addExtensionElements(element, businessObject, mapping, bpmnFactory, commandStack);
+ }
+ function removeOutMapping() {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const mappings = findRelevantOutMappings(element);
+ removeExtensionElements(element, businessObject, mappings, commandStack);
+ }
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.CheckboxEntry)({
+ id: 'outMapping-propagation',
+ label: translate('Propagate all variables'),
+ getValue,
+ setValue
+ });
+}
+function Local(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const mapping = findRelevantOutMappings(element)[0];
+ const getValue = () => {
+ return mapping.get('camunda:local');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: mapping,
+ properties: {
+ local: value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.CheckboxEntry)({
+ element,
+ id: 'outMapping-propagation-local',
+ label: translate('Local'),
+ getValue,
+ setValue
+ });
+}
+
+// helper //////////////////////////
+
+function areOutMappingsSupported$1(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:CallActivity');
+}
+function getOutMappings$1(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return getExtensionElementsList(businessObject, 'camunda:Out');
+}
+function findRelevantOutMappings(element) {
+ const inMappings = getOutMappings$1(element);
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.filter)(inMappings, function (mapping) {
+ const variables = mapping.get('variables');
+ return variables && variables === 'all';
+ });
+}
+function isPropagateAll(element) {
+ const mappings = findRelevantOutMappings(element);
+ return !!mappings.length;
+}
+
+/**
+ * Cf. https://docs.camunda.org/manual/latest/reference/bpmn20/custom-extensions/extension-elements/#out
+ */
+function OutMappingProps({
+ element,
+ injector
+}) {
+ if (!areOutMappingsSupported(element)) {
+ return null;
+ }
+ const variableMappings = getOutMappings(element) || [];
+ const bpmnFactory = injector.get('bpmnFactory'),
+ commandStack = injector.get('commandStack');
+ const items = variableMappings.map((mapping, index) => {
+ const id = element.id + '-outMapping-' + index;
+ return {
+ id,
+ label: mapping.get('target') || '',
+ entries: InOutMapping({
+ idPrefix: id,
+ element,
+ mapping
+ }),
+ autoFocusEntry: id + '-target',
+ remove: removeFactory$1({
+ commandStack,
+ element,
+ mapping
+ })
+ };
+ });
+ return {
+ items,
+ add: addFactory$1({
+ bpmnFactory,
+ commandStack,
+ element
+ })
+ };
+}
+function removeFactory$1({
+ commandStack,
+ element,
+ mapping
+}) {
+ return function (event) {
+ event.stopPropagation();
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ removeExtensionElements(element, businessObject, mapping, commandStack);
+ };
+}
+function addFactory$1({
+ bpmnFactory,
+ commandStack,
+ element
+}) {
+ return function (event) {
+ event.stopPropagation();
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const newMapping = createElement('camunda:Out', {
+ source: '' // source is the default type
+ }, null, bpmnFactory);
+ addExtensionElements(element, businessObject, newMapping, bpmnFactory, commandStack);
+ };
+}
+
+// helper ///////////////
+
+function getOutMappings(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const mappings = getExtensionElementsList(businessObject, 'camunda:Out');
+
+ // only retrieve relevant mappings here, others are handled in other groups
+ // mapping.businessKey => camunda-platform/CallAvtivityProps
+ // mapping.variables => camunda-platform/OutMappingPropagationProps
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.filter)(mappings, function (mapping) {
+ return !mapping.businessKey && !(mapping.variables && mapping.variables === 'all');
+ });
+}
+function areOutMappingsSupported(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:CallActivity');
+}
+
+function OutputProps({
+ element,
+ injector
+}) {
+ if (!areOutputParametersSupported(element)) {
+ return null;
+ }
+ const outputParameters = getOutputParameters(element) || [];
+ const bpmnFactory = injector.get('bpmnFactory'),
+ commandStack = injector.get('commandStack');
+ const items = outputParameters.map((parameter, index) => {
+ const id = element.id + '-outputParameter-' + index;
+ return {
+ id,
+ label: parameter.get('name') || '',
+ entries: InputOutputParameter({
+ idPrefix: id,
+ element,
+ parameter
+ }),
+ autoFocusEntry: id + '-name',
+ remove: removeFactory({
+ commandStack,
+ element,
+ parameter
+ })
+ };
+ });
+ return {
+ items,
+ add: addFactory({
+ bpmnFactory,
+ commandStack,
+ element
+ }),
+ shouldSort: false
+ };
+}
+function removeFactory({
+ commandStack,
+ element,
+ parameter
+}) {
+ return function (event) {
+ event.stopPropagation();
+ const inputOutput = getInputOutput(element);
+ if (!inputOutput) {
+ return;
+ }
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: inputOutput,
+ properties: {
+ outputParameters: (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(inputOutput.get('outputParameters'), parameter)
+ }
+ });
+ };
+}
+function addFactory({
+ bpmnFactory,
+ commandStack,
+ element
+}) {
+ return function (event) {
+ event.stopPropagation();
+ commandStack.execute('properties-panel.multi-command-executor', AddParameterCmd(element, 'camunda:OutputParameter', bpmnFactory));
+ };
+}
+
+function TimerProps(props) {
+ const {
+ element,
+ listener,
+ idPrefix
+ } = props;
+ let {
+ timerEventDefinition
+ } = props;
+ if (!timerEventDefinition) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ timerEventDefinition = getTimerEventDefinition(businessObject);
+ }
+ const timerEventDefinitionType = getTimerDefinitionType(timerEventDefinition);
+
+ // (1) Only show for supported elements
+ if (!isTimerSupported(element) && !isTimerSupportedOnListener(listener)) {
+ return [];
+ }
+
+ // (2) Provide entries, have a value only if selection was made
+ const entries = [];
+ entries.push({
+ id: getId(idPrefix, 'timerEventDefinitionType'),
+ component: TimerEventDefinitionType,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isSelectEntryEdited,
+ timerEventDefinition,
+ timerEventDefinitionType
+ });
+ if (timerEventDefinitionType) {
+ entries.push({
+ id: getId(idPrefix, 'timerEventDefinitionValue'),
+ component: TimerEventDefinitionValue,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited,
+ timerEventDefinition,
+ timerEventDefinitionType
+ });
+ }
+ return entries;
+}
+
+/**
+ * TimerEventDefinitionType - Generic select entry allowing to select a specific
+ * timerEventDefintionType. To be used together with timerEventDefinitionValue.
+ *
+ * @param {type} props
+ * @return {SelectEntry}
+ */
+function TimerEventDefinitionType(props) {
+ const {
+ element,
+ timerEventDefinition,
+ timerEventDefinitionType
+ } = props;
+ const commandStack = useService('commandStack'),
+ bpmnFactory = useService('bpmnFactory'),
+ translate = useService('translate');
+ const getValue = () => {
+ return timerEventDefinitionType || '';
+ };
+ const setValue = value => {
+ // (1) Check if value is different to current type
+ if (value === timerEventDefinitionType) {
+ return;
+ }
+
+ // (2) Create empty formalExpression element
+ const formalExpression = bpmnFactory.create('bpmn:FormalExpression', {
+ body: undefined
+ });
+ formalExpression.$parent = timerEventDefinition;
+
+ // (3) Set the value for selected timerEventDefinitionType
+ const newProps = {
+ timeDuration: undefined,
+ timeDate: undefined,
+ timeCycle: undefined
+ };
+ if (value !== '') {
+ newProps[value] = formalExpression;
+ }
+
+ // (4) Execute businessObject update
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: timerEventDefinition,
+ properties: newProps
+ });
+ };
+ const getOptions = element => {
+ return [{
+ value: '',
+ label: translate('')
+ }, {
+ value: 'timeDate',
+ label: translate('Date')
+ }, {
+ value: 'timeDuration',
+ label: translate('Duration')
+ }, {
+ value: 'timeCycle',
+ label: translate('Cycle')
+ }];
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry)({
+ element,
+ id: 'timerEventDefinitionType',
+ label: translate('Type'),
+ getValue,
+ setValue,
+ getOptions
+ });
+}
+
+/**
+ * TimerEventDefinitionValue - Generic textField entry allowing to specify the
+ * timerEventDefintionValue based on the set timerEventDefintionType. To be used
+ * together with timerEventDefinitionType.
+ *
+ * @param {type} props
+ * @return {TextFieldEntry}
+ */
+function TimerEventDefinitionValue(props) {
+ const {
+ element,
+ timerEventDefinition,
+ timerEventDefinitionType
+ } = props;
+ const commandStack = useService('commandStack'),
+ translate = useService('translate'),
+ debounce = useService('debounceInput');
+ const timerEventFormalExpression = timerEventDefinition.get(timerEventDefinitionType);
+ const getValue = () => {
+ return timerEventFormalExpression && timerEventFormalExpression.get('body');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: timerEventFormalExpression,
+ properties: {
+ body: value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'timerEventDefinitionValue',
+ label: translate('Value'),
+ getValue,
+ setValue,
+ debounce,
+ tooltip: getTimerEventDefinitionValueDescription(timerEventDefinitionType, translate)
+ });
+}
+
+// helper //////////////////////////
+
+function getTimerEventDefinitionValueDescription(timerDefinitionType, translate) {
+ switch (timerDefinitionType) {
+ case 'timeDate':
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("p", {
+ children: translate('A specific point in time defined as ISO 8601 combined date and time representation.')
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("ul", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("li", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "2019-10-01T12:00:00Z"
+ }), " - ", translate('UTC time')]
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("li", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "2019-10-02T08:09:40+02:00"
+ }), " - ", translate('UTC plus 2 hours zone offset')]
+ })]
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.org/manual/latest/reference/bpmn20/events/timer-events/#time-date",
+ target: "_blank",
+ rel: "noopener",
+ children: translate('Documentation: Timer events')
+ })]
+ });
+ case 'timeCycle':
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("p", {
+ children: translate('A cycle defined as ISO 8601 repeating intervals format, or a cron expression.')
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("ul", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("li", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "R5/PT10S"
+ }), " - ", translate('every 10 seconds, up to 5 times')]
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("li", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "R/P1D"
+ }), " - ", translate('every day, infinitely')]
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("li", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "0 0 9-17 * * MON-FRI"
+ }), " - ", translate('every hour on the hour from 9-5 p.m. UTC Monday-Friday')]
+ })]
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.org/manual/latest/reference/bpmn20/events/timer-events/#time-cycle",
+ target: "_blank",
+ rel: "noopener",
+ children: translate('Documentation: Timer events')
+ })]
+ });
+ case 'timeDuration':
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("p", {
+ children: translate('A time duration defined as ISO 8601 durations format.')
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("ul", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("li", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "PT15S"
+ }), " - ", translate('15 seconds')]
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("li", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "PT1H30M"
+ }), " - ", translate('1 hour and 30 minutes')]
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("li", {
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "P14D"
+ }), " - ", translate('14 days')]
+ })]
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.org/manual/latest/reference/bpmn20/events/timer-events/#time-duration",
+ target: "_blank",
+ rel: "noopener",
+ children: translate('Documentation: Timer events')
+ })]
+ });
+ }
+}
+function isTimerSupportedOnListener(listener) {
+ return listener && (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(listener, 'camunda:TaskListener') && getTimerEventDefinition(listener);
+}
+function getId(idPrefix, id) {
+ return idPrefix ? idPrefix + id : id;
+}
+
+const LISTENER_ALLOWED_TYPES = ['bpmn:Activity', 'bpmn:Event', 'bpmn:Gateway', 'bpmn:SequenceFlow', 'bpmn:Process', 'bpmn:Participant'];
+const SCRIPT_PROPS = {
+ 'script': undefined,
+ 'resource': undefined,
+ 'scriptFormat': undefined
+};
+const CLASS_PROPS = {
+ 'class': undefined
+};
+const EXPRESSION_PROPS = {
+ 'expression': undefined
+};
+const DELEGATE_EXPRESSION_PROPS = {
+ 'delegateExpression': undefined
+};
+const DEFAULT_PROPS = {
+ ...SCRIPT_PROPS,
+ ...CLASS_PROPS,
+ ...EXPRESSION_PROPS,
+ ...DELEGATE_EXPRESSION_PROPS
+};
+const DEFAULT_EVENT_PROPS = {
+ 'eventDefinitions': undefined,
+ 'event': undefined
+};
+const IMPLEMENTATION_TYPE_TO_LABEL = {
+ class: 'Java class',
+ expression: 'Expression',
+ delegateExpression: 'Delegate expression',
+ script: 'Script'
+};
+const EVENT_TO_LABEL = {
+ start: 'Start',
+ end: 'End',
+ take: 'Take',
+ create: 'Create',
+ assignment: 'Assignment',
+ complete: 'Complete',
+ delete: 'Delete',
+ update: 'Update',
+ timeout: 'Timeout'
+};
+
+/**
+ * Cf. https://docs.camunda.org/manual/latest/user-guide/process-engine/delegation-code/#execution-listener
+ */
+function ExecutionListenerProps({
+ element,
+ injector
+}) {
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.isAny)(element, LISTENER_ALLOWED_TYPES)) {
+ return;
+ }
+ const bpmnFactory = injector.get('bpmnFactory'),
+ commandStack = injector.get('commandStack');
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Participant') && !element.businessObject.processRef) {
+ return;
+ }
+ const businessObject = getListenersContainer(element);
+ const listeners = getExtensionElementsList(businessObject, 'camunda:ExecutionListener');
+ return {
+ items: listeners.map((listener, index) => {
+ const id = `${element.id}-executionListener-${index}`;
+
+ // @TODO(barmac): Find a way to pass translate for internationalized label.
+ return {
+ id,
+ label: getListenerLabel(listener),
+ entries: ExecutionListener({
+ idPrefix: id,
+ element,
+ listener
+ }),
+ remove: removeListenerFactory({
+ element,
+ listener,
+ commandStack
+ })
+ };
+ }),
+ add: addExecutionListenerFactory({
+ bpmnFactory,
+ commandStack,
+ element
+ })
+ };
+}
+function ExecutionListener(props) {
+ const {
+ idPrefix,
+ element,
+ listener
+ } = props;
+ return [{
+ id: `${idPrefix}-eventType`,
+ component: EventType,
+ listener
+ }, {
+ id: `${idPrefix}-listenerType`,
+ component: ListenerType,
+ listener
+ }, ...ImplementationDetails({
+ idPrefix,
+ element,
+ listener
+ }), {
+ id: `${idPrefix}-fields`,
+ component: Fields,
+ listener
+ }];
+}
+function TaskListenerProps({
+ element,
+ injector
+}) {
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:UserTask')) {
+ return;
+ }
+ const bpmnFactory = injector.get('bpmnFactory'),
+ commandStack = injector.get('commandStack');
+ const businessObject = getListenersContainer(element);
+ const listeners = getExtensionElementsList(businessObject, 'camunda:TaskListener');
+ return {
+ items: listeners.map((listener, index) => {
+ const id = `${element.id}-taskListener-${index}`;
+
+ // @TODO(barmac): Find a way to pass translate for internationalized label.
+ return {
+ id,
+ label: getListenerLabel(listener),
+ entries: TaskListener({
+ idPrefix: id,
+ element,
+ listener
+ }),
+ remove: removeListenerFactory({
+ element,
+ listener,
+ commandStack
+ })
+ };
+ }),
+ add: addTaskListenerFactory({
+ bpmnFactory,
+ commandStack,
+ element
+ })
+ };
+}
+function TaskListener(props) {
+ const {
+ idPrefix,
+ element,
+ listener
+ } = props;
+ return [{
+ id: `${idPrefix}-eventType`,
+ component: EventType,
+ listener
+ }, {
+ id: `${idPrefix}-listenerId`,
+ component: ListenerId,
+ listener
+ }, {
+ id: `${idPrefix}-listenerType`,
+ component: ListenerType,
+ listener
+ }, ...ImplementationDetails({
+ idPrefix,
+ element,
+ listener
+ }), ...EventTypeDetails({
+ idPrefix,
+ element,
+ listener
+ }), {
+ id: `${idPrefix}-fields`,
+ component: Fields,
+ listener
+ }];
+}
+function removeListenerFactory({
+ element,
+ listener,
+ commandStack
+}) {
+ return function removeListener(event) {
+ event.stopPropagation();
+ removeExtensionElements(element, getListenersContainer(element), listener, commandStack);
+ };
+}
+function EventType({
+ id,
+ element,
+ listener
+}) {
+ const translate = useService('translate');
+ const bpmnFactory = useService('bpmnFactory');
+ const commandStack = useService('commandStack');
+ function getValue() {
+ return listener.get('event');
+ }
+ function setValue(value) {
+ const properties = getDefaultEventTypeProperties(value, bpmnFactory);
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: listener,
+ properties
+ });
+ }
+ function getOptions() {
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(listener, 'camunda:TaskListener')) {
+ return [{
+ value: 'create',
+ label: translate('create')
+ }, {
+ value: 'assignment',
+ label: translate('assignment')
+ }, {
+ value: 'complete',
+ label: translate('complete')
+ }, {
+ value: 'delete',
+ label: translate('delete')
+ }, {
+ value: 'update',
+ label: translate('update')
+ }, {
+ value: 'timeout',
+ label: translate('timeout')
+ }];
+ }
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:SequenceFlow')) {
+ return [{
+ value: 'take',
+ label: translate('take')
+ }];
+ }
+ return [{
+ value: 'start',
+ label: translate('start')
+ }, {
+ value: 'end',
+ label: translate('end')
+ }];
+ }
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry, {
+ id: id,
+ label: translate('Event type'),
+ getValue: getValue,
+ setValue: setValue,
+ getOptions: getOptions
+ });
+}
+function ListenerId({
+ id,
+ element,
+ listener
+}) {
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const commandStack = useService('commandStack');
+ let options = {
+ element,
+ id: id,
+ label: translate('Listener ID'),
+ debounce,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited,
+ setValue: value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: listener,
+ properties: {
+ 'camunda:id': value
+ }
+ });
+ },
+ getValue: () => {
+ return listener.get('camunda:id');
+ }
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)(options);
+}
+function ListenerType({
+ id,
+ element,
+ listener
+}) {
+ const modeling = useService('modeling');
+ const translate = useService('translate');
+ const bpmnFactory = useService('bpmnFactory');
+ function getValue() {
+ return getListenerType(listener);
+ }
+ function setValue(value) {
+ const properties = getDefaultImplementationProperties(value, bpmnFactory);
+ modeling.updateModdleProperties(element, listener, properties);
+ }
+ function getOptions() {
+ return getListenerTypeOptions(translate);
+ }
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.SelectEntry, {
+ id: id,
+ label: translate('Listener type'),
+ getValue: getValue,
+ setValue: setValue,
+ getOptions: getOptions
+ });
+}
+function ImplementationDetails(props) {
+ const {
+ idPrefix,
+ element,
+ listener
+ } = props;
+ const type = getListenerType(listener);
+ if (type === 'class') {
+ return [{
+ id: getPrefixedId(idPrefix, 'javaClass'),
+ component: JavaClass,
+ businessObject: listener
+ }];
+ } else if (type === 'expression') {
+ return [{
+ id: getPrefixedId(idPrefix, 'expression'),
+ component: Expression,
+ businessObject: listener
+ }];
+ } else if (type === 'delegateExpression') {
+ return [{
+ id: getPrefixedId(idPrefix, 'delegateExpression'),
+ component: DelegateExpression,
+ businessObject: listener
+ }];
+ } else if (type === 'script') {
+ return ScriptProps({
+ element,
+ script: listener.get('script'),
+ prefix: idPrefix
+ });
+ }
+
+ // should never happen
+ return [];
+}
+function EventTypeDetails(props) {
+ const {
+ idPrefix,
+ element,
+ listener
+ } = props;
+ const type = listener.get('event');
+ if (type === 'timeout') {
+ return TimerProps({
+ element,
+ listener,
+ timerEventDefinition: getTimerEventDefinition$1(listener),
+ idPrefix: idPrefix
+ });
+ }
+ return [];
+}
+function Field(props) {
+ const {
+ element,
+ id: idPrefix,
+ index,
+ item: field,
+ open
+ } = props;
+ const fieldId = `${idPrefix}-field-${index}`;
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.CollapsibleEntry, {
+ id: fieldId,
+ element: element,
+ entries: FieldInjection({
+ element,
+ field,
+ idPrefix: fieldId
+ }),
+ label: field.get('name') || '',
+ open: open
+ });
+}
+function Fields(props) {
+ const {
+ id,
+ element,
+ listener
+ } = props;
+ const bpmnFactory = useService('bpmnFactory');
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const fields = listener.get('fields');
+ function addField() {
+ const field = createElement('camunda:Field', {}, listener, bpmnFactory);
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: listener,
+ properties: {
+ fields: [...listener.get('fields'), field]
+ }
+ });
+ }
+ function removeField(field) {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: listener,
+ properties: {
+ fields: (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.without)(listener.get('fields'), field)
+ }
+ });
+ }
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.ListEntry, {
+ id: id,
+ element: element,
+ label: translate('Field injection'),
+ items: fields,
+ component: Field,
+ onAdd: addField,
+ onRemove: removeField,
+ compareFn: compareName,
+ autoFocusEntry: true
+ });
+}
+function addListenerFactory({
+ bpmnFactory,
+ commandStack,
+ element,
+ listenerGroup
+}) {
+ return function (event) {
+ event.stopPropagation();
+ const listener = bpmnFactory.create(listenerGroup, {
+ event: getDefaultEvent(element, listenerGroup),
+ class: ''
+ });
+ const businessObject = getListenersContainer(element);
+ addExtensionElements(element, businessObject, listener, bpmnFactory, commandStack);
+ };
+}
+function addTaskListenerFactory(props) {
+ return addListenerFactory({
+ ...props,
+ listenerGroup: 'camunda:TaskListener'
+ });
+}
+function addExecutionListenerFactory(props) {
+ return addListenerFactory({
+ ...props,
+ listenerGroup: 'camunda:ExecutionListener'
+ });
+}
+
+// helper
+
+/**
+ * Get a readable label for a listener.
+ *
+ * @param {ModdleElement} listener
+ * @param {string => string} [translate]
+ */
+function getListenerLabel(listener, translate = value => value) {
+ const event = listener.get('event');
+ const implementationType = getListenerType(listener);
+ return `${translate(EVENT_TO_LABEL[event])}: ${translate(IMPLEMENTATION_TYPE_TO_LABEL[implementationType])}`;
+}
+function getListenerTypeOptions(translate) {
+ return Object.entries(IMPLEMENTATION_TYPE_TO_LABEL).map(([value, label]) => ({
+ value,
+ label: translate(label)
+ }));
+}
+function getListenerType(listener) {
+ return getImplementationType(listener);
+}
+function getDefaultEvent(element, listenerGroup) {
+ if (listenerGroup === 'camunda:TaskListener') return 'create';
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:SequenceFlow') ? 'take' : 'start';
+}
+function getDefaultImplementationProperties(type, bpmnFactory) {
+ switch (type) {
+ case 'class':
+ return {
+ ...DEFAULT_PROPS,
+ 'class': ''
+ };
+ case 'expression':
+ return {
+ ...DEFAULT_PROPS,
+ 'expression': ''
+ };
+ case 'delegateExpression':
+ return {
+ ...DEFAULT_PROPS,
+ 'delegateExpression': ''
+ };
+ case 'script':
+ return {
+ ...DEFAULT_PROPS,
+ 'script': bpmnFactory.create('camunda:Script')
+ };
+ }
+}
+function getDefaultEventTypeProperties(type, bpmnFactory) {
+ switch (type) {
+ case 'timeout':
+ return {
+ ...DEFAULT_EVENT_PROPS,
+ eventDefinitions: [bpmnFactory.create('bpmn:TimerEventDefinition')],
+ event: type
+ };
+ default:
+ return {
+ ...DEFAULT_EVENT_PROPS,
+ event: type
+ };
+ }
+}
+function getPrefixedId(prefix, id) {
+ return `${prefix}-${id}`;
+}
+function compareName(field, anotherField) {
+ const [name = '', anotherName = ''] = [field.name, anotherField.name];
+ return name === anotherName ? 0 : name > anotherName ? 1 : -1;
+}
+function getListenersContainer(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return businessObject.get('processRef') || businessObject;
+}
+
+function ProcessVariablesEntry(props) {
+ const {
+ element
+ } = props;
+ const [variables, setVariables] = (0,_bpmn_io_properties_panel_preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useState)([]);
+ (0,_bpmn_io_properties_panel_preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useEffect)(async () => {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const rootElement = getRootElement(businessObject);
+ const scope = getScope(element);
+ const rawVariables = await (0,_bpmn_io_extract_process_variables__WEBPACK_IMPORTED_MODULE_8__.getVariablesForScope)(scope, rootElement);
+ const withName = populateElementNames(sortByName(rawVariables));
+ setVariables(withName);
+ }, [element]);
+ if (!variables.length) {
+ return null;
+ }
+ const byScope = groupByScope(variables);
+ const multiScope = isMultiScope(byScope);
+ let variableItems = [];
+
+ // (2) get variables to display
+ if (multiScope) {
+ // (2a) multiple scopes, sub scopes first
+ // assumption: variables extractor fetches parent variables first
+ const reversed = (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.map)(reverse((0,min_dash__WEBPACK_IMPORTED_MODULE_12__.keys)(byScope)), scopeKey => byScope[scopeKey]);
+ variableItems = (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.flatten)(reversed);
+ } else {
+ // (2b) single scope
+ variableItems = variables;
+ }
+ const items = variableItems.map((variable, index) => {
+ const id = element.id + '-variable-' + index;
+ return {
+ id,
+ label: variable.name,
+ entries: [...ProcessVariableItem({
+ idPrefix: id,
+ multiScope,
+ variable
+ })]
+ };
+ });
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.ListGroup, {
+ ...props,
+ items: items,
+ shouldSort: false
+ });
+}
+function ProcessVariablesProps(props) {
+ const {
+ element
+ } = props;
+ if (!canHaveProcessVariables(element)) {
+ return null;
+ }
+ return {
+ component: ProcessVariablesEntry,
+ shouldSort: false
+ };
+}
+function ProcessVariableItem(props) {
+ const {
+ idPrefix,
+ multiScope,
+ variable
+ } = props;
+ let entries = [];
+ if (multiScope) {
+ entries.push({
+ id: idPrefix + '-scope',
+ component: Scope,
+ idPrefix,
+ variable
+ });
+ }
+ entries.push({
+ id: idPrefix + '-createdIn',
+ component: CreatedIn,
+ idPrefix,
+ variable
+ });
+ return entries;
+}
+function Scope(props) {
+ const {
+ idPrefix,
+ variable
+ } = props;
+ const translate = useService('translate');
+ const id = idPrefix + '-scope';
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ "data-entry-id": id,
+ class: "bio-properties-panel-entry",
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("b", {
+ style: "font-weight: bold",
+ class: "bio-properties-panel-label",
+ children: translate('Scope')
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("label", {
+ id: prefixId(id),
+ class: "bio-properties-panel-label",
+ children: variable.scope
+ })]
+ });
+}
+function CreatedIn(props) {
+ const {
+ idPrefix,
+ variable
+ } = props;
+ const translate = useService('translate');
+ const id = idPrefix + '-createdIn';
+ const origin = variable.origin.join(', ');
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ "data-entry-id": id,
+ class: "bio-properties-panel-entry",
+ children: [(0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("b", {
+ style: "font-weight: bold",
+ class: "bio-properties-panel-label",
+ children: translate('Created in')
+ }), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("label", {
+ id: prefixId(id),
+ class: "bio-properties-panel-label",
+ children: origin
+ })]
+ });
+}
+
+// helper //////////////////////
+
+function canHaveProcessVariables(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.isAny)(element, ['bpmn:Process', 'bpmn:SubProcess']) || (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Participant') && businessObject.get('processRef');
+}
+function getRootElement(element) {
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(businessObject, 'bpmn:Participant')) {
+ return businessObject.processRef;
+ }
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(businessObject, 'bpmn:Process')) {
+ return businessObject;
+ }
+ let parent = businessObject;
+ while (parent.$parent && !(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(parent, 'bpmn:Process')) {
+ parent = parent.$parent;
+ }
+ return parent;
+}
+function getScope(element) {
+ const bo = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Participant')) {
+ return bo.processRef.id;
+ }
+ return bo.id;
+}
+function sortByName(variables) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.sortBy)(variables, function (variable) {
+ return variable.name;
+ });
+}
+function groupByScope(variables) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.groupBy)(variables, 'scope');
+}
+function populateElementNames(variables) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.forEach)(variables, function (variable) {
+ const names = (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.map)(variable.origin, function (element) {
+ return element.name || element.id;
+ });
+ variable.origin = names;
+ variable.scope = variable.scope.name || variable.scope.id;
+ });
+ return variables;
+}
+function isMultiScope(scopedVariables) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.keys)(scopedVariables).length > 1;
+}
+function reverse(array) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.map)(array, function (a, i) {
+ return array[array.length - 1 - i];
+ });
+}
+function prefixId(id) {
+ return `bio-properties-panel-${id}`;
+}
+
+function ScriptTaskProps(props) {
+ const {
+ element
+ } = props;
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:ScriptTask')) {
+ return [];
+ }
+ const entries = [...ScriptProps({
+ element
+ })];
+ entries.push({
+ id: 'scriptResultVariable',
+ component: ResultVariable,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ });
+ return entries;
+}
+function ResultVariable(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const getValue = () => {
+ return businessObject.get('camunda:resultVariable');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:resultVariable': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'scriptResultVariable',
+ label: translate('Result variable'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+function TasklistProps(props) {
+ const {
+ element
+ } = props;
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const isEdited = node => {
+ return node && !node.checked;
+ };
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Process') && !((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Participant') && businessObject.get('processRef'))) {
+ return [];
+ }
+ return [{
+ id: 'isStartableInTasklist',
+ component: Startable,
+ isEdited
+ }];
+}
+function Startable(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const process = getProcess$1(element);
+ const getValue = () => {
+ return process.get('camunda:isStartableInTasklist');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: process,
+ properties: {
+ 'camunda:isStartableInTasklist': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.CheckboxEntry)({
+ element,
+ id: 'isStartableInTasklist',
+ label: translate('Startable'),
+ getValue,
+ setValue
+ });
+}
+
+// helper //////////////////
+
+function getProcess$1(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Process') ? (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element) : (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element).get('processRef');
+}
+
+/**
+ * Cf. https://docs.camunda.org/manual/latest/reference/bpmn20/tasks/user-task/
+ */
+function UserAssignmentProps(props) {
+ const {
+ element
+ } = props;
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'camunda:Assignable')) {
+ return [];
+ }
+ return [{
+ id: 'assignee',
+ component: Assignee,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }, {
+ id: 'candidateGroups',
+ component: CandidateGroups,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }, {
+ id: 'candidateUsers',
+ component: CandidateUsers,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }, {
+ id: 'dueDate',
+ component: DueDate,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }, {
+ id: 'followUpDate',
+ component: FollowUpDate,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }, {
+ id: 'priority',
+ component: Priority,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }];
+}
+function Assignee(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const getValue = () => {
+ return businessObject.get('camunda:assignee');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:assignee': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'assignee',
+ label: translate('Assignee'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function CandidateUsers(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const getValue = () => {
+ return businessObject.get('camunda:candidateUsers');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:candidateUsers': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'candidateUsers',
+ label: translate('Candidate users'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function CandidateGroups(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const getValue = () => {
+ return businessObject.get('camunda:candidateGroups');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:candidateGroups': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'candidateGroups',
+ label: translate('Candidate groups'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function DueDate(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const getValue = () => {
+ return businessObject.get('camunda:dueDate');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:dueDate': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'dueDate',
+ label: translate('Due date'),
+ description: translate('The due date as an EL expression (e.g. ${someDate}) or an ISO date (e.g. 2015-06-26T09:54:00).'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function FollowUpDate(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const getValue = () => {
+ return businessObject.get('camunda:followUpDate');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:followUpDate': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'followUpDate',
+ label: translate('Follow up date'),
+ description: translate('The follow up date as an EL expression (e.g. ${someDate}) or an ' + 'ISO date (e.g. 2015-06-26T09:54:00).'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+function Priority(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ const getValue = () => {
+ return businessObject.get('camunda:priority');
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: businessObject,
+ properties: {
+ 'camunda:priority': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'priority',
+ label: translate('Priority'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+function VersionTagProps(props) {
+ const {
+ element
+ } = props;
+ const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element);
+ if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Process') && !((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Participant') && businessObject.get('processRef'))) {
+ return [];
+ }
+ return [{
+ id: 'versionTag',
+ component: VersionTag,
+ isEdited: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.isTextFieldEntryEdited
+ }];
+}
+function VersionTag(props) {
+ const {
+ element
+ } = props;
+ const commandStack = useService('commandStack');
+ const translate = useService('translate');
+ const debounce = useService('debounceInput');
+ const process = getProcess(element);
+ const getValue = () => {
+ return process.get('camunda:versionTag') || '';
+ };
+ const setValue = value => {
+ commandStack.execute('element.updateModdleProperties', {
+ element,
+ moddleElement: process,
+ properties: {
+ 'camunda:versionTag': value
+ }
+ });
+ };
+ return (0,_bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.TextFieldEntry)({
+ element,
+ id: 'versionTag',
+ label: translate('Version tag'),
+ getValue,
+ setValue,
+ debounce
+ });
+}
+
+// helper //////////////////
+
+function getProcess(element) {
+ return (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:Process') ? (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element) : (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.getBusinessObject)(element).get('processRef');
+}
+
+const LOW_PRIORITY = 500;
+const CAMUNDA_PLATFORM_GROUPS = [HistoryCleanupGroup, TasklistGroup, CandidateStarterGroup, ImplementationGroup, ExternalTaskGroup, ProcessVariablesGroup, ErrorsGroup, UserAssignmentGroup, FormGroup, FormDataGroup, TaskListenerGroup, StartInitiatorGroup, ScriptGroup, ConditionGroup, CallActivityGroup, AsynchronousContinuationsGroup, JobExecutionGroup, InMappingPropagationGroup, InMappingGroup, InputGroup, ConnectorInputGroup, OutMappingPropagationGroup, OutMappingGroup, OutputGroup, ConnectorOutputGroup, ExecutionListenerGroup, ExtensionPropertiesGroup, FieldInjectionGroup, BusinessKeyGroup];
+
+/**
+ * Provides `camunda` namespace properties.
+ *
+ * @example
+ * ```javascript
+ * import BpmnModeler from 'bpmn-js/lib/Modeler';
+ * import {
+ * BpmnPropertiesPanelModule,
+ * BpmnPropertiesProviderModule,
+ * CamundaPlatformPropertiesProviderModule
+ * } from 'bpmn-js-properties-panel';
+ *
+ * const modeler = new BpmnModeler({
+ * container: '#canvas',
+ * propertiesPanel: {
+ * parent: '#properties'
+ * },
+ * additionalModules: [
+ * BpmnPropertiesPanelModule,
+ * BpmnPropertiesProviderModule,
+ * CamundaPlatformPropertiesProviderModule
+ * ]
+ * });
+ * ```
+ */
+class CamundaPlatformPropertiesProvider {
+ constructor(propertiesPanel, injector) {
+ propertiesPanel.registerProvider(LOW_PRIORITY, this);
+ this._injector = injector;
+ }
+ getGroups(element) {
+ return groups => {
+ // (1) add Camunda Platform specific groups
+ groups = groups.concat(this._getGroups(element));
+
+ // (2) update existing groups with Camunda Platform specific properties
+ updateGeneralGroup(groups, element);
+ updateErrorGroup(groups, element);
+ updateEscalationGroup(groups, element);
+ updateMultiInstanceGroup(groups, element);
+ updateTimerGroup(groups, element);
+
+ // (3) move groups given specific priorities
+ moveImplementationGroup(groups);
+ return groups;
+ };
+ }
+ _getGroups(element) {
+ const groups = CAMUNDA_PLATFORM_GROUPS.map(createGroup => createGroup(element, this._injector));
+
+ // contract: if a group returns null, it should not be displayed at all
+ return groups.filter(group => group !== null);
+ }
+}
+CamundaPlatformPropertiesProvider.$inject = ['propertiesPanel', 'injector'];
+
+/**
+ * This ensures the group always locates after
+ */
+function moveImplementationGroup(groups) {
+ const documentationGroupIdx = findGroupIndex(groups, 'documentation');
+ if (documentationGroupIdx < 0) {
+ return;
+ }
+ return moveGroup(groups, 'CamundaPlatform__Implementation', documentationGroupIdx + 1);
+}
+function updateGeneralGroup(groups, element) {
+ const generalGroup = findGroup(groups, 'general');
+ if (!generalGroup) {
+ return;
+ }
+ const {
+ entries
+ } = generalGroup;
+
+ // (1) add version tag before executable (if existing)
+ const executableEntry = (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.findIndex)(entries, entry => entry.id === 'isExecutable');
+ const insertIndex = executableEntry >= 0 ? executableEntry : entries.length;
+ entries.splice(insertIndex, 0, ...VersionTagProps({
+ element
+ }));
+}
+function updateErrorGroup(groups, element) {
+ const errorGroup = findGroup(groups, 'error');
+ if (!errorGroup) {
+ return;
+ }
+ const {
+ entries
+ } = errorGroup;
+ ErrorProps({
+ element,
+ entries
+ });
+}
+function updateMultiInstanceGroup(groups, element) {
+ const multiInstanceGroup = findGroup(groups, 'multiInstance');
+ if (!multiInstanceGroup) {
+ return;
+ }
+ const {
+ entries
+ } = multiInstanceGroup;
+ MultiInstanceProps({
+ element,
+ entries
+ });
+}
+function updateEscalationGroup(groups, element) {
+ const escalationGroup = findGroup(groups, 'escalation');
+ if (!escalationGroup) {
+ return;
+ }
+ const {
+ entries
+ } = escalationGroup;
+ EscalationProps({
+ element,
+ entries
+ });
+}
+function updateTimerGroup(groups, element) {
+ const timerEventGroup = findGroup(groups, 'timer');
+ if (!timerEventGroup) {
+ return;
+ }
+ timerEventGroup.entries = [...TimerProps({
+ element
+ })];
+}
+function ImplementationGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Implementation'),
+ id: 'CamundaPlatform__Implementation',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group,
+ entries: [...ImplementationProps({
+ element
+ })]
+ };
+ if (group.entries.length) {
+ return group;
+ }
+ return null;
+}
+function ErrorsGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Errors'),
+ id: 'CamundaPlatform__Errors',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.ListGroup,
+ ...ErrorsProps({
+ element,
+ injector
+ })
+ };
+ if (group.items) {
+ return group;
+ }
+ return null;
+}
+function UserAssignmentGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('User assignment'),
+ id: 'CamundaPlatform__UserAssignment',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group,
+ entries: [...UserAssignmentProps({
+ element
+ })]
+ };
+ if (group.entries.length) {
+ return group;
+ }
+ return null;
+}
+function ScriptGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Script'),
+ id: 'CamundaPlatform__Script',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group,
+ entries: [...ScriptTaskProps({
+ element
+ })]
+ };
+ if (group.entries.length) {
+ return group;
+ }
+ return null;
+}
+function CallActivityGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Called element'),
+ id: 'CamundaPlatform__CallActivity',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group,
+ entries: [...CallActivityProps({
+ element
+ })]
+ };
+ if (group.entries.length) {
+ return group;
+ }
+ return null;
+}
+function ConditionGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Condition'),
+ id: 'CamundaPlatform__Condition',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group,
+ entries: [...ConditionProps({
+ element
+ })]
+ };
+ if (group.entries.length) {
+ return group;
+ }
+ return null;
+}
+function StartInitiatorGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Start initiator'),
+ id: 'CamundaPlatform__StartInitiator',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group,
+ entries: [...InitiatorProps({
+ element
+ })]
+ };
+ if (group.entries.length) {
+ return group;
+ }
+ return null;
+}
+function ExternalTaskGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('External task'),
+ id: 'CamundaPlatform__ExternalTask',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group,
+ entries: [...ExternalTaskPriorityProps({
+ element
+ })]
+ };
+ if (group.entries.length) {
+ return group;
+ }
+ return null;
+}
+function AsynchronousContinuationsGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Asynchronous continuations'),
+ id: 'CamundaPlatform__AsynchronousContinuations',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group,
+ entries: [...AsynchronousContinuationsProps({
+ element
+ })]
+ };
+ if (group.entries.length) {
+ return group;
+ }
+ return null;
+}
+function JobExecutionGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Job execution'),
+ id: 'CamundaPlatform__JobExecution',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group,
+ entries: [...JobExecutionProps({
+ element
+ })]
+ };
+ if (group.entries.length) {
+ return group;
+ }
+ return null;
+}
+function CandidateStarterGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Candidate starter'),
+ id: 'CamundaPlatform__CandidateStarter',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group,
+ entries: [...CandidateStarterProps({
+ element
+ })]
+ };
+ if (group.entries.length) {
+ return group;
+ }
+ return null;
+}
+function FieldInjectionGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Field injections'),
+ id: 'CamundaPlatform__FieldInjection',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.ListGroup,
+ ...FieldInjectionProps({
+ element,
+ injector
+ })
+ };
+ if (group.items) {
+ return group;
+ }
+ return null;
+}
+function HistoryCleanupGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('History cleanup'),
+ id: 'CamundaPlatform__HistoryCleanup',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group,
+ entries: [...HistoryCleanupProps({
+ element
+ })]
+ };
+ if (group.entries.length) {
+ return group;
+ }
+ return null;
+}
+function TasklistGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Tasklist'),
+ id: 'CamundaPlatform__Tasklist',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group,
+ entries: [...TasklistProps({
+ element
+ })]
+ };
+ if (group.entries.length) {
+ return group;
+ }
+ return null;
+}
+function InMappingGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('In mappings'),
+ id: 'CamundaPlatform__InMapping',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.ListGroup,
+ ...InMappingProps({
+ element,
+ injector
+ })
+ };
+ if (group.items) {
+ return group;
+ }
+ return null;
+}
+function InMappingPropagationGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('In mapping propagation'),
+ id: 'CamundaPlatform__InMappingPropagation',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group,
+ entries: [...InMappingPropagationProps({
+ element
+ })]
+ };
+ if (group.entries.length) {
+ return group;
+ }
+ return null;
+}
+function OutMappingGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Out mappings'),
+ id: 'CamundaPlatform__OutMapping',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.ListGroup,
+ ...OutMappingProps({
+ element,
+ injector
+ })
+ };
+ if (group.items) {
+ return group;
+ }
+ return null;
+}
+function OutMappingPropagationGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Out mapping propagation'),
+ id: 'CamundaPlatform__OutMappingPropagation',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group,
+ entries: [...OutMappingPropagationProps({
+ element
+ })]
+ };
+ if (group.entries.length) {
+ return group;
+ }
+ return null;
+}
+function ProcessVariablesGroup(element, injector) {
+ const translate = injector.get('translate');
+ const variableProps = ProcessVariablesProps({
+ element,
+ injector
+ });
+ if (!variableProps) {
+ return null;
+ }
+ const group = {
+ label: translate('Process variables'),
+ id: 'CamundaPlatform__ProcessVariables',
+ ...variableProps
+ };
+ return group;
+}
+function FormDataGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Form fields'),
+ id: 'CamundaPlatform__FormData',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.ListGroup,
+ ...FormDataProps({
+ element,
+ injector
+ })
+ };
+ if (group.items) {
+ return group;
+ }
+ return null;
+}
+function BusinessKeyGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Business key'),
+ id: 'CamundaPlatform__BusinessKey',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group,
+ entries: [...BusinessKeyProps$1({
+ element
+ })]
+ };
+ if (group.entries.length) {
+ return group;
+ }
+ return null;
+}
+function FormGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Forms'),
+ id: 'CamundaPlatform__Form',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.Group,
+ entries: [...FormProps({
+ element
+ })]
+ };
+ if (group.entries.length) {
+ return group;
+ }
+ return null;
+}
+function ExecutionListenerGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Execution listeners'),
+ id: 'CamundaPlatform__ExecutionListener',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.ListGroup,
+ ...ExecutionListenerProps({
+ element,
+ injector
+ })
+ };
+ if (group.items) {
+ return group;
+ }
+ return null;
+}
+function TaskListenerGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Task listeners'),
+ id: 'CamundaPlatform__TaskListener',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.ListGroup,
+ ...TaskListenerProps({
+ element,
+ injector
+ })
+ };
+ if (group.items) {
+ return group;
+ }
+ return null;
+}
+function InputGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Inputs'),
+ id: 'CamundaPlatform__Input',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.ListGroup,
+ ...InputProps({
+ element,
+ injector
+ })
+ };
+ if (group.items) {
+ return group;
+ }
+ return null;
+}
+function OutputGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Outputs'),
+ id: 'CamundaPlatform__Output',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.ListGroup,
+ ...OutputProps({
+ element,
+ injector
+ })
+ };
+ if (group.items) {
+ return group;
+ }
+ return null;
+}
+function ConnectorInputGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Connector inputs'),
+ id: 'CamundaPlatform__ConnectorInput',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.ListGroup,
+ ...ConnectorInputProps({
+ element,
+ injector
+ })
+ };
+ if (group.items) {
+ return group;
+ }
+ return null;
+}
+function ConnectorOutputGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Connector outputs'),
+ id: 'CamundaPlatform__ConnectorOutput',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.ListGroup,
+ ...ConnectorOutputProps({
+ element,
+ injector
+ })
+ };
+ if (group.items) {
+ return group;
+ }
+ return null;
+}
+function ExtensionPropertiesGroup(element, injector) {
+ const translate = injector.get('translate');
+ const group = {
+ label: translate('Extension properties'),
+ id: 'CamundaPlatform__ExtensionProperties',
+ component: _bpmn_io_properties_panel__WEBPACK_IMPORTED_MODULE_1__.ListGroup,
+ ...ExtensionPropertiesProps({
+ element,
+ injector
+ })
+ };
+ if (group.items) {
+ return group;
+ }
+ return null;
+}
+
+// helper /////////////////////
+
+function findGroup(groups, id) {
+ return groups.find(g => g.id === id);
+}
+function findGroupIndex(groups, id) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_12__.findIndex)(groups, g => g.id === id);
+}
+function moveGroup(groups, id, position) {
+ const groupIndex = findGroupIndex(groups, id);
+ if (position < 0 || groupIndex < 0) {
+ return;
+ }
+ return (0,array_move__WEBPACK_IMPORTED_MODULE_7__.arrayMoveMutable)(groups, groupIndex, position);
+}
+
+var index = {
+ __init__: ['camundaPlatformPropertiesProvider'],
+ camundaPlatformPropertiesProvider: ['type', CamundaPlatformPropertiesProvider]
+};
+
+/* eslint-disable react-hooks/rules-of-hooks */
+const TooltipProvider = {
+ 'group-assignmentDefinition': element => {
+ const translate = useService('translate');
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [translate('Define who the task is assigned to. One or all of the following attributes can be specified simultaneously. '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.io/docs/components/modeler/bpmn/user-tasks/#assignments",
+ target: "_blank",
+ rel: "noopener",
+ title: translate('User task documentation'),
+ children: translate('Learn more.')
+ })]
+ });
+ },
+ 'group-condition': element => {
+ const translate = useService('translate');
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [translate('Define a boolean condition expression that defines when this flow is taken. '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.io/docs/components/modeler/bpmn/exclusive-gateways/#conditions",
+ target: "_blank",
+ rel: "noopener",
+ title: translate('Conditions documentation'),
+ children: translate('Learn how to define conditions.')
+ })]
+ });
+ },
+ 'group-businessRuleImplementation': element => {
+ const translate = useService('translate');
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [translate('Evaluate a business rule, for example a DMN. To add a custom implementation, use a job worker. '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.io/docs/components/modeler/bpmn/business-rule-tasks/#defining-a-task",
+ target: "_blank",
+ rel: "noopener",
+ title: translate('Business rule task documentation'),
+ children: translate('Learn more.')
+ })]
+ });
+ },
+ 'group-scriptImplementation': element => {
+ const translate = useService('translate');
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [translate('Implement a script task using an inline FEEL expression. To add a custom implementation, use a job worker. '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.io/docs/components/modeler/bpmn/script-tasks/#defining-a-script-task",
+ target: "_blank",
+ rel: "noopener",
+ title: translate('Script task documentation'),
+ children: translate('Learn more.')
+ })]
+ });
+ },
+ 'group-form': element => {
+ const translate = useService('translate');
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [translate('Link or embed a form created with the Camunda Forms editor. To associate a custom form, application, or URL to the user task, specify a form key. '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.io/docs/guides/utilizing-forms/#connect-your-form-to-a-bpmn-diagram",
+ target: "_blank",
+ rel: "noopener",
+ title: translate('User task form documentation'),
+ children: translate('Learn more.')
+ })]
+ });
+ },
+ 'group-message': element => {
+ const translate = useService('translate');
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:ReceiveTask')) {
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [translate('Define the name of the message (e.g. '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "Money collected"
+ }), translate(') and the '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "correlationKey"
+ }), translate(' expression (e.g. '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "= orderId"
+ }), translate(')'), translate(' to subscribe to. '), translate('Learn more how to '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.io/docs/components/modeler/bpmn/send-tasks",
+ target: "_blank",
+ rel: "noopener",
+ title: translate('Send task documentation'),
+ children: translate('send ')
+ }), translate('and '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.io/docs/components/modeler/bpmn/receive-tasks",
+ target: "_blank",
+ rel: "noopener",
+ title: translate('Receive task documentation'),
+ children: translate('receive messages. ')
+ })]
+ });
+ }
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [translate('Define the name of the message (e.g. '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "Money collected"
+ }), translate(') and the '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "correlationKey"
+ }), translate(' expression (e.g. '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "= orderId"
+ }), translate(')'), translate(' to subscribe to. '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.io/docs/components/modeler/bpmn/message-events/#messages",
+ target: "_blank",
+ rel: "noopener",
+ title: translate('Message event documentation'),
+ children: translate('Learn more.')
+ })]
+ });
+ },
+ 'group-calledElement': element => {
+ const translate = useService('translate');
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [translate('Define the ID of the process to call (e.g. '), " ", (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "shipping-process"
+ }), translate(' or '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "= \"shipping-\" + tenantId"
+ }), " ", translate('). '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.io/docs/components/modeler/bpmn/call-activities/",
+ target: "_blank",
+ rel: "noopener",
+ title: translate('Call activity documentation'),
+ children: translate('Learn more.')
+ })]
+ });
+ },
+ 'group-taskDefinition': element => {
+ const translate = useService('translate');
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:ServiceTask')) {
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [translate('Specify which job workers handle the task work to execute a service (e.g. '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "order-items"
+ }), translate('). '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.io/docs/components/modeler/bpmn/service-tasks",
+ target: "_blank",
+ rel: "noopener",
+ title: translate('Service task documentation'),
+ children: translate('Learn more.')
+ })]
+ });
+ }
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:BusinessRuleTask')) {
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [translate('Specify which job workers handle the task work to evaluate business rules. '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.io/docs/components/modeler/bpmn/business-rule-tasks/#job-worker-implementation",
+ target: "_blank",
+ rel: "noopener",
+ title: translate('Business rule task documentation'),
+ children: translate('Learn more.')
+ })]
+ });
+ }
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:ScriptTask')) {
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [translate('Specify which job workers handle the task work to execute a script. '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.io/docs/components/modeler/bpmn/script-tasks/#defining-a-task",
+ target: "_blank",
+ rel: "noopener",
+ title: translate('Script task documentation'),
+ children: translate('Learn more.')
+ })]
+ });
+ }
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:SendTask')) {
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [translate('Specify which job workers handle the task work to send a message (e.g. '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "kafka"
+ }), translate(' or '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "mail"
+ }), translate('). '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.io/docs/components/modeler/bpmn/send-tasks/#defining-a-task",
+ target: "_blank",
+ rel: "noopener",
+ title: translate('Send task documentation'),
+ children: translate('Learn more.')
+ })]
+ });
+ }
+ if ((0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_9__.is)(element, 'bpmn:ThrowEvent')) {
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [translate('Specify which job workers handle the event work. '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.io/docs/components/modeler/bpmn/message-events/#message-throw-events",
+ target: "_blank",
+ rel: "noopener",
+ title: translate('Message throw event documentation'),
+ children: translate('Learn more.')
+ })]
+ });
+ }
+ },
+ 'group-multiInstance': element => {
+ const translate = useService('translate');
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [translate('Execute this task for each element of a given collection. '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("br", {}), translate('Define an input collection expression that defines the collection to iterate over (e.g. '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "= items"
+ }), translate('). '), translate('To collect the output define the output collection and the output element expressions. '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.io/docs/components/modeler/bpmn/multi-instance/#defining-the-collection-to-iterate-over",
+ target: "_blank",
+ rel: "noopener",
+ title: translate('Multi instance documentation'),
+ children: translate('Learn more.')
+ })]
+ });
+ },
+ 'group-error': element => {
+ const translate = useService('translate');
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [translate('Define an error code (e.g. '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("code", {
+ children: "order-not-found"
+ }), translate('). '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.io/docs/components/modeler/bpmn/error-events/#defining-the-error",
+ target: "_blank",
+ rel: "noopener",
+ title: translate('Error event documentation'),
+ children: translate('Learn more.')
+ })]
+ });
+ },
+ 'group-inputs': element => {
+ const translate = useService('translate');
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [translate('Create a new local variable in the scope of this task. '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.io/docs/components/concepts/variables/#input-mappings",
+ target: "_blank",
+ rel: "noopener",
+ title: translate('Input mappings documentation'),
+ children: translate('Learn more.')
+ })]
+ });
+ },
+ 'group-outputs': element => {
+ const translate = useService('translate');
+ return (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
+ children: [translate('Customize how result variables are merged into the global scope of the process instance. '), (0,_bpmn_io_properties_panel_preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
+ href: "https://docs.camunda.io/docs/components/concepts/variables/#output-mappings",
+ target: "_blank",
+ rel: "noopener",
+ title: translate('Output mappings documentation'),
+ children: translate('Learn more.')
+ })]
+ });
+ }
+};
+
+
+//# sourceMappingURL=index.esm.js.map
+
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/BaseModeler.js":
+/*!**************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/BaseModeler.js ***!
+ \**************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BaseModeler)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var ids__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ids */ "../node_modules/ids/dist/index.esm.js");
+/* harmony import */ var _BaseViewer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BaseViewer */ "../node_modules/bpmn-js/lib/BaseViewer.js");
+
+
+
+
+
+
+
+/**
+ * @typedef {import('./BaseViewer').BaseViewerOptions} BaseViewerOptions
+ * @typedef {import('./BaseViewer').ModdleElementsById} ModdleElementsById
+ *
+ * @typedef {import('./model/Types').ModdleElement} ModdleElement
+ */
-// helpers //////////////
+/**
+ * A base modeler for BPMN 2.0 diagrams.
+ *
+ * See {@link Modeler} for a fully-featured modeler.
+ *
+ * @param {BaseViewerOptions} [options] The options to configure the modeler.
+ */
+function BaseModeler(options) {
+ _BaseViewer__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, options);
- function ensureNotNull(prop, name) {
- if (!prop) {
- throw new Error(name + ' required');
- }
- return prop;
- }
+ // hook ID collection into the modeler
+ this.on('import.parse.complete', function(event) {
+ if (!event.error) {
+ this._collectIds(event.definitions, event.elementsById);
+ }
+ }, this);
- },{"../helper/ElementHelper":26}],7:[function(require,module,exports){
- 'use strict';
+ this.on('diagram.destroy', function() {
+ this.get('moddle').ids.clear();
+ }, this);
+}
- var forEach = require('lodash/forEach');
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_2__["default"])(BaseModeler, _BaseViewer__WEBPACK_IMPORTED_MODULE_1__["default"]);
- var elementHelper = require('../helper/ElementHelper');
- /**
- * A handler that implements a BPMN 2.0 property update
- * for business objects which are not represented in the
- * diagram.
- *
- * This is useful in the context of the properties panel in
- * order to update child elements of elements visible in
- * the diagram.
- *
- * Example: perform an update of a specific event definition
- * of an intermediate event.
- *
- * @class
- * @constructor
- */
- function CreateBusinessObjectListHandler(elementRegistry, bpmnFactory) {
- this._elementRegistry = elementRegistry;
- this._bpmnFactory = bpmnFactory;
- }
+/**
+ * Create a moddle instance, attaching IDs to it.
+ *
+ * @param {BaseViewerOptions} options
+ *
+ * @return {Moddle}
+ */
+BaseModeler.prototype._createModdle = function(options) {
+ var moddle = _BaseViewer__WEBPACK_IMPORTED_MODULE_1__["default"].prototype._createModdle.call(this, options);
- CreateBusinessObjectListHandler.$inject = [ 'elementRegistry', 'bpmnFactory' ];
+ // attach ids to moddle to be able to track and validated ids in the BPMN 2.0
+ // XML document tree
+ moddle.ids = new ids__WEBPACK_IMPORTED_MODULE_0__["default"]([ 32, 36, 1 ]);
- module.exports = CreateBusinessObjectListHandler;
+ return moddle;
+};
- function ensureNotNull(prop, name) {
- if (!prop) {
- throw new Error(name + ' required');
- }
- return prop;
+/**
+ * Collect IDs processed during parsing of the definitions object.
+ *
+ * @param {ModdleElement} definitions
+ * @param {ModdleElementsById} elementsById
+ */
+BaseModeler.prototype._collectIds = function(definitions, elementsById) {
+
+ var moddle = definitions.$model,
+ ids = moddle.ids,
+ id;
+
+ // remove references from previous import
+ ids.clear();
+
+ for (id in elementsById) {
+ ids.claim(id, elementsById[ id ]);
+ }
+};
+
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/BaseViewer.js":
+/*!*************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/BaseViewer.js ***!
+ \*************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BaseViewer)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! min-dom */ "../node_modules/min-dom/dist/index.esm.js");
+/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tiny-svg */ "../node_modules/tiny-svg/dist/index.esm.js");
+/* harmony import */ var diagram_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js */ "../node_modules/diagram-js/lib/Diagram.js");
+/* harmony import */ var bpmn_moddle__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! bpmn-moddle */ "../node_modules/bpmn-moddle/dist/index.esm.js");
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var _import_Importer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./import/Importer */ "../node_modules/bpmn-js/lib/import/Importer.js");
+/* harmony import */ var _util_PoweredByUtil__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./util/PoweredByUtil */ "../node_modules/bpmn-js/lib/util/PoweredByUtil.js");
+/**
+ * The code in the area
+ * must not be changed.
+ *
+ * @see http://bpmn.io/license for more information.
+ */
- }
- function ensureList(prop, name) {
- if (!prop || Object.prototype.toString.call(prop) !== '[object Array]') {
- throw new Error(name + ' needs to be a list');
- }
- return prop;
- }
-// api /////////////////////////////////////////////
- /**
- * Creates a new element under a provided parent and updates / creates a reference to it in
- * one atomic action.
- *
- * @method CreateBusinessObjectListHandler#execute
- *
- * @param {Object} context
- * @param {djs.model.Base} context.element which is the context for the reference
- * @param {moddle.referencingObject} context.referencingObject the object which creates the reference
- * @param {String} context.referenceProperty the property of the referencingObject which makes the reference
- * @param {moddle.newObject} context.newObject the new object to add
- * @param {moddle.newObjectContainer} context.newObjectContainer the container for the new object
- *
- * @return {Array} the updated element
- */
- CreateBusinessObjectListHandler.prototype.execute = function(context) {
- var currentObject = ensureNotNull(context.currentObject, 'currentObject'),
- propertyName = ensureNotNull(context.propertyName, 'propertyName'),
- newObjects = ensureList(context.newObjects, 'newObjects'),
- changed = [ context.element ]; // this will not change any diagram-js elements
- var childObjects = [];
- var self = this;
- // create new array of business objects
- forEach(newObjects, function(obj) {
- var element = elementHelper.createElement(obj.type, obj.properties, currentObject, self._bpmnFactory);
- childObjects.push(element);
- });
- context.childObject = childObjects;
- // adjust array reference in the parent business object
- context.previousChilds = currentObject[propertyName];
- currentObject[propertyName] = childObjects;
- context.changed = changed;
- // indicate changed on objects affected by the update
- return changed;
- };
- /**
- * Reverts the update
- *
- * @method CreateBusinessObjectListHandler#revert
- *
- * @param {Object} context
- *
- * @return {djs.mode.Base} the updated element
- */
- CreateBusinessObjectListHandler.prototype.revert = function(context) {
- var currentObject = context.currentObject,
- propertyName = context.propertyName,
- previousChilds = context.previousChilds;
+/**
+ * @template T
+ *
+ * @typedef {import('diagram-js/lib/core/EventBus').EventBusEventCallback} EventBusEventCallback
+ */
- // remove new element
- currentObject.set(propertyName, previousChilds);
+/**
+ * @typedef {import('didi').ModuleDeclaration} ModuleDeclaration
+ *
+ * @typedef {import('./model/Types').Moddle} Moddle
+ * @typedef {import('./model/Types').ModdleElement} ModdleElement
+ * @typedef {import('./model/Types').ModdleExtension} ModdleExtension
+ *
+ * @typedef { {
+ * width?: number|string;
+ * height?: number|string;
+ * position?: string;
+ * container?: string|HTMLElement;
+ * moddleExtensions?: ModdleExtensions;
+ * additionalModules?: ModuleDeclaration[];
+ * } & Record } BaseViewerOptions
+ *
+ * @typedef {Record} ModdleElementsById
+ *
+ * @typedef { {
+ * [key: string]: ModdleExtension;
+ * } } ModdleExtensions
+ *
+ * @typedef { {
+ * warnings: string[];
+ * } } ImportXMLResult
+ *
+ * @typedef {ImportXMLResult & Error} ImportXMLError
+ *
+ * @typedef {ImportXMLResult} ImportDefinitionsResult
+ *
+ * @typedef {ImportXMLError} ImportDefinitionsError
+ *
+ * @typedef {ImportXMLResult} OpenResult
+ *
+ * @typedef {ImportXMLError} OpenError
+ *
+ * @typedef { {
+ * format?: boolean;
+ * preamble?: boolean;
+ * } } SaveXMLOptions
+ *
+ * @typedef { {
+ * xml?: string;
+ * error?: Error;
+ * } } SaveXMLResult
+ *
+ * @typedef { {
+ * svg: string;
+ * } } SaveSVGResult
+ *
+ * @typedef { {
+ * xml: string;
+ * } } ImportParseStartEvent
+ *
+ * @typedef { {
+ * error?: ImportXMLError;
+ * definitions?: ModdleElement;
+ * elementsById?: ModdleElementsById;
+ * references?: ModdleElement[];
+ * warnings: string[];
+ * } } ImportParseCompleteEvent
+ *
+ * @typedef { {
+ * error?: ImportXMLError;
+ * warnings: string[];
+ * } } ImportDoneEvent
+ *
+ * @typedef { {
+ * definitions: ModdleElement;
+ * } } SaveXMLStartEvent
+ *
+ * @typedef {SaveXMLResult} SaveXMLDoneEvent
+ *
+ * @typedef { {
+ * error?: Error;
+ * svg: string;
+ * } } SaveSVGDoneEvent
+ */
- return context.changed;
- };
+/**
+ * A base viewer for BPMN 2.0 diagrams.
+ *
+ * Have a look at {@link Viewer}, {@link NavigatedViewer} or {@link Modeler} for
+ * bundles that include actual features.
+ *
+ * @param {BaseViewerOptions} [options] The options to configure the viewer.
+ */
+function BaseViewer(options) {
- },{"../helper/ElementHelper":26,"lodash/forEach":613}],8:[function(require,module,exports){
- 'use strict';
+ /**
+ * @type {BaseViewerOptions}
+ */
+ options = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, DEFAULT_OPTIONS, options);
- var forEach = require('lodash/forEach');
+ /**
+ * @type {Moddle}
+ */
+ this._moddle = this._createModdle(options);
- /**
- * A handler that combines and executes multiple commands.
- *
- * All updates are bundled on the command stack and executed in one step.
- * This also makes it possible to revert the changes in one step.
- *
- * Example use case: remove the camunda:formKey attribute and in addition
- * add all form fields needed for the camunda:formData property.
- *
- * @class
- * @constructor
- */
- function MultiCommandHandler(commandStack) {
- this._commandStack = commandStack;
- }
+ /**
+ * @type {HTMLElement}
+ */
+ this._container = this._createContainer(options);
- MultiCommandHandler.$inject = [ 'commandStack' ];
+ /* */
- module.exports = MultiCommandHandler;
+ addProjectLogo(this._container);
- MultiCommandHandler.prototype.preExecute = function(context) {
+ /* */
- var commandStack = this._commandStack;
+ this._init(this._container, this._moddle, options);
+}
- forEach(context, function(command) {
- commandStack.execute(command.cmd, command.context);
- });
- };
- },{"lodash/forEach":613}],9:[function(require,module,exports){
- 'use strict';
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_1__["default"])(BaseViewer, diagram_js__WEBPACK_IMPORTED_MODULE_2__["default"]);
- var reduce = require('lodash/transform'),
- is = require('bpmn-js/lib/util/ModelUtil').is,
- keys = require('lodash/keys'),
- forEach = require('lodash/forEach');
+/**
+ * Parse and render a BPMN 2.0 diagram.
+ *
+ * Once finished the viewer reports back the result to the
+ * provided callback function with (err, warnings).
+ *
+ * ## Life-Cycle Events
+ *
+ * During import the viewer will fire life-cycle events:
+ *
+ * * import.parse.start (about to read model from XML)
+ * * import.parse.complete (model read; may have worked or not)
+ * * import.render.start (graphical import start)
+ * * import.render.complete (graphical import finished)
+ * * import.done (everything done)
+ *
+ * You can use these events to hook into the life-cycle.
+ *
+ * @throws {ImportXMLError} An error thrown during the import of the XML.
+ *
+ * @fires BaseViewer#ImportParseStartEvent
+ * @fires BaseViewer#ImportParseCompleteEvent
+ * @fires Importer#ImportRenderStartEvent
+ * @fires Importer#ImportRenderCompleteEvent
+ * @fires BaseViewer#ImportDoneEvent
+ *
+ * @param {string} xml The BPMN 2.0 XML to be imported.
+ * @param {ModdleElement|string} [bpmnDiagram] The optional diagram or Id of the BPMN diagram to open.
+ *
+ * @return {Promise} A promise resolving with warnings that were produced during the import.
+ */
+BaseViewer.prototype.importXML = async function importXML(xml, bpmnDiagram) {
+
+ const self = this;
+
+ function ParseCompleteEvent(data) {
+ return self.get('eventBus').createEvent(data);
+ }
+
+ let aggregatedWarnings = [];
+ try {
+
+ // hook in pre-parse listeners +
+ // allow xml manipulation
+
+ /**
+ * A `import.parse.start` event.
+ *
+ * @event BaseViewer#ImportParseStartEvent
+ * @type {ImportParseStartEvent}
+ */
+ xml = this._emit('import.parse.start', { xml: xml }) || xml;
+
+ let parseResult;
+ try {
+ parseResult = await this._moddle.fromXML(xml, 'bpmn:Definitions');
+ } catch (error) {
+ this._emit('import.parse.complete', {
+ error
+ });
+
+ throw error;
+ }
+
+ let definitions = parseResult.rootElement;
+ const references = parseResult.references;
+ const parseWarnings = parseResult.warnings;
+ const elementsById = parseResult.elementsById;
+
+ aggregatedWarnings = aggregatedWarnings.concat(parseWarnings);
+
+ // hook in post parse listeners +
+ // allow definitions manipulation
+
+ /**
+ * A `import.parse.complete` event.
+ *
+ * @event BaseViewer#ImportParseCompleteEvent
+ * @type {ImportParseCompleteEvent}
+ */
+ definitions = this._emit('import.parse.complete', ParseCompleteEvent({
+ error: null,
+ definitions: definitions,
+ elementsById: elementsById,
+ references: references,
+ warnings: aggregatedWarnings
+ })) || definitions;
+
+ const importResult = await this.importDefinitions(definitions, bpmnDiagram);
+
+ aggregatedWarnings = aggregatedWarnings.concat(importResult.warnings);
+
+ /**
+ * A `import.parse.complete` event.
+ *
+ * @event BaseViewer#ImportDoneEvent
+ * @type {ImportDoneEvent}
+ */
+ this._emit('import.done', { error: null, warnings: aggregatedWarnings });
+
+ return { warnings: aggregatedWarnings };
+ } catch (err) {
+ let error = err;
+ aggregatedWarnings = aggregatedWarnings.concat(error.warnings || []);
+ addWarningsToError(error, aggregatedWarnings);
+
+ error = checkValidationError(error);
+
+ this._emit('import.done', { error, warnings: error.warnings });
+
+ throw error;
+ }
+};
+
+
+/**
+ * Import parsed definitions and render a BPMN 2.0 diagram.
+ *
+ * Once finished the viewer reports back the result to the
+ * provided callback function with (err, warnings).
+ *
+ * ## Life-Cycle Events
+ *
+ * During import the viewer will fire life-cycle events:
+ *
+ * * import.render.start (graphical import start)
+ * * import.render.complete (graphical import finished)
+ *
+ * You can use these events to hook into the life-cycle.
+ *
+ * @throws {ImportDefinitionsError} An error thrown during the import of the definitions.
+ *
+ * @param {ModdleElement} definitions The definitions.
+ * @param {ModdleElement|string} [bpmnDiagram] The optional diagram or ID of the BPMN diagram to open.
+ *
+ * @return {Promise} A promise resolving with warnings that were produced during the import.
+ */
+BaseViewer.prototype.importDefinitions = async function importDefinitions(definitions, bpmnDiagram) {
+ this._setDefinitions(definitions);
+ const result = await this.open(bpmnDiagram);
- /**
- * A handler that implements a BPMN 2.0 property update
- * for business objects which are not represented in the
- * diagram.
- *
- * This is useful in the context of the properties panel in
- * order to update child elements of elements visible in
- * the diagram.
- *
- * Example: perform an update of a specific event definition
- * of an intermediate event.
- *
- * @class
- * @constructor
- */
- function UpdateBusinessObjectHandler(elementRegistry) {
- this._elementRegistry = elementRegistry;
- }
+ return { warnings: result.warnings };
+};
- UpdateBusinessObjectHandler.$inject = [ 'elementRegistry' ];
- module.exports = UpdateBusinessObjectHandler;
+/**
+ * Open diagram of previously imported XML.
+ *
+ * Once finished the viewer reports back the result to the
+ * provided callback function with (err, warnings).
+ *
+ * ## Life-Cycle Events
+ *
+ * During switch the viewer will fire life-cycle events:
+ *
+ * * import.render.start (graphical import start)
+ * * import.render.complete (graphical import finished)
+ *
+ * You can use these events to hook into the life-cycle.
+ *
+ * @throws {OpenError} An error thrown during opening.
+ *
+ * @param {ModdleElement|string} bpmnDiagramOrId The diagram or Id of the BPMN diagram to open.
+ *
+ * @return {Promise} A promise resolving with warnings that were produced during opening.
+ */
+BaseViewer.prototype.open = async function open(bpmnDiagramOrId) {
- /**
- * returns the root element
- */
- function getRoot(businessObject) {
- var parent = businessObject;
- while (parent.$parent) {
- parent = parent.$parent;
- }
- return parent;
- }
+ const definitions = this._definitions;
+ let bpmnDiagram = bpmnDiagramOrId;
- function getProperties(businessObject, propertyNames) {
- return reduce(propertyNames, function(result, key) {
- result[key] = businessObject.get(key);
- return result;
- }, {});
- }
+ if (!definitions) {
+ const error = new Error('no XML imported');
+ addWarningsToError(error, []);
+ throw error;
+ }
- function setProperties(businessObject, properties) {
- forEach(properties, function(value, key) {
- businessObject.set(key, value);
- });
- }
+ if (typeof bpmnDiagramOrId === 'string') {
+ bpmnDiagram = findBPMNDiagram(definitions, bpmnDiagramOrId);
+ if (!bpmnDiagram) {
+ const error = new Error('BPMNDiagram <' + bpmnDiagramOrId + '> not found');
+ addWarningsToError(error, []);
-// api /////////////////////////////////////////////
+ throw error;
+ }
+ }
- /**
- * Updates a business object with a list of new properties
- *
- * @method UpdateBusinessObjectHandler#execute
- *
- * @param {Object} context
- * @param {djs.model.Base} context.element the element which has a child business object updated
- * @param {moddle.businessObject} context.businessObject the businessObject to update
- * @param {Object} context.properties a list of properties to set on the businessObject
- *
- * @return {Array} the updated element
- */
- UpdateBusinessObjectHandler.prototype.execute = function(context) {
+ // clear existing rendered diagram
+ // catch synchronous exceptions during #clear()
+ try {
+ this.clear();
+ } catch (error) {
+ addWarningsToError(error, []);
- var element = context.element,
- businessObject = context.businessObject,
- rootElements = getRoot(businessObject).rootElements,
- referenceType = context.referenceType,
- referenceProperty = context.referenceProperty,
- changed = [ element ]; // this will not change any diagram-js elements
+ throw error;
+ }
- if (!element) {
- throw new Error('element required');
- }
+ // perform graphical import
+ const { warnings } = await (0,_import_Importer__WEBPACK_IMPORTED_MODULE_3__.importBpmnDiagram)(this, definitions, bpmnDiagram);
- if (!businessObject) {
- throw new Error('businessObject required');
- }
+ return { warnings };
+};
- var properties = context.properties,
- oldProperties = context.oldProperties || getProperties(businessObject, keys(properties));
+/**
+ * Export the currently displayed BPMN 2.0 diagram as
+ * a BPMN 2.0 XML document.
+ *
+ * ## Life-Cycle Events
+ *
+ * During XML saving the viewer will fire life-cycle events:
+ *
+ * * saveXML.start (before serialization)
+ * * saveXML.serialized (after xml generation)
+ * * saveXML.done (everything done)
+ *
+ * You can use these events to hook into the life-cycle.
+ *
+ * @throws {Error} An error thrown during export.
+ *
+ * @fires BaseViewer#SaveXMLStart
+ * @fires BaseViewer#SaveXMLDone
+ *
+ * @param {SaveXMLOptions} [options] The options.
+ *
+ * @return {Promise} A promise resolving with the XML.
+ */
+BaseViewer.prototype.saveXML = async function saveXML(options) {
- // check if there the update needs an external element for reference
- if (typeof referenceType !== 'undefined' && typeof referenceProperty !== 'undefined') {
- forEach(rootElements, function(rootElement) {
- if (is(rootElement, referenceType)) {
- if (rootElement.id === properties[referenceProperty]) {
- properties[referenceProperty] = rootElement;
- }
- }
- });
- }
+ options = options || {};
- // update properties
- setProperties(businessObject, properties);
+ let definitions = this._definitions,
+ error, xml;
- // store old values
- context.oldProperties = oldProperties;
- context.changed = changed;
+ try {
+ if (!definitions) {
+ throw new Error('no definitions loaded');
+ }
- // indicate changed on objects affected by the update
- return changed;
- };
+ // allow to fiddle around with definitions
- /**
- * Reverts the update
- *
- * @method UpdateBusinessObjectHandler#revert
- *
- * @param {Object} context
- *
- * @return {djs.mode.Base} the updated element
- */
- UpdateBusinessObjectHandler.prototype.revert = function(context) {
+ /**
+ * A `saveXML.start` event.
+ *
+ * @event BaseViewer#SaveXMLStartEvent
+ * @type {SaveXMLStartEvent}
+ */
+ definitions = this._emit('saveXML.start', {
+ definitions
+ }) || definitions;
- var oldProperties = context.oldProperties,
- businessObject = context.businessObject;
+ const result = await this._moddle.toXML(definitions, options);
+ xml = result.xml;
- // update properties
- setProperties(businessObject, oldProperties);
+ xml = this._emit('saveXML.serialized', {
+ xml
+ }) || xml;
+ } catch (err) {
+ error = err;
+ }
- return context.changed;
- };
+ const result = error ? { error } : { xml };
- },{"bpmn-js/lib/util/ModelUtil":240,"lodash/forEach":613,"lodash/keys":630,"lodash/transform":642}],10:[function(require,module,exports){
- 'use strict';
+ /**
+ * A `saveXML.done` event.
+ *
+ * @event BaseViewer#SaveXMLDoneEvent
+ * @type {SaveXMLDoneEvent}
+ */
+ this._emit('saveXML.done', result);
- var forEach = require('lodash/forEach');
+ if (error) {
+ throw error;
+ }
- /**
- * A handler that implements a BPMN 2.0 property update
- * for business object lists which are not represented in the
- * diagram.
- *
- * This is useful in the context of the properties panel in
- * order to update child elements of elements visible in
- * the diagram.
- *
- * Example: perform an update of a specific event definition
- * of an intermediate event.
- *
- * @class
- * @constructor
- */
- function UpdateBusinessObjectListHandler(elementRegistry, bpmnFactory) {
- this._elementRegistry = elementRegistry;
- this._bpmnFactory = bpmnFactory;
- }
+ return result;
+};
- UpdateBusinessObjectListHandler.$inject = [ 'elementRegistry', 'bpmnFactory' ];
- module.exports = UpdateBusinessObjectListHandler;
+/**
+ * Export the currently displayed BPMN 2.0 diagram as
+ * an SVG image.
+ *
+ * ## Life-Cycle Events
+ *
+ * During SVG saving the viewer will fire life-cycle events:
+ *
+ * * saveSVG.start (before serialization)
+ * * saveSVG.done (everything done)
+ *
+ * You can use these events to hook into the life-cycle.
+ *
+ * @throws {Error} An error thrown during export.
+ *
+ * @fires BaseViewer#SaveSVGDone
+ *
+ * @return {Promise} A promise resolving with the SVG.
+ */
+BaseViewer.prototype.saveSVG = async function saveSVG() {
+ this._emit('saveSVG.start');
- function ensureNotNull(prop, name) {
- if (!prop) {
- throw new Error(name + 'required');
- }
- return prop;
- }
+ let svg, err;
-// api /////////////////////////////////////////////
+ try {
+ const canvas = this.get('canvas');
- /**
- * Updates a element under a provided parent.
- */
- UpdateBusinessObjectListHandler.prototype.execute = function(context) {
+ const contentNode = canvas.getActiveLayer(),
+ defsNode = (0,min_dom__WEBPACK_IMPORTED_MODULE_4__.query)('defs', canvas._svg);
- var currentObject = ensureNotNull(context.currentObject, 'currentObject'),
- propertyName = ensureNotNull(context.propertyName, 'propertyName'),
- updatedObjectList = context.updatedObjectList,
- objectsToRemove = context.objectsToRemove || [],
- objectsToAdd = context.objectsToAdd || [],
- changed = [ context.element], // this will not change any diagram-js elements
- referencePropertyName;
+ const contents = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_5__.innerSVG)(contentNode),
+ defs = defsNode ? '' + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_5__.innerSVG)(defsNode) + ' ' : '';
- if (context.referencePropertyName) {
- referencePropertyName = context.referencePropertyName;
- }
+ const bbox = contentNode.getBBox();
- var objectList = currentObject[propertyName];
- // adjust array reference in the parent business object
- context.previousList = currentObject[propertyName];
+ svg =
+ '\n' +
+ '\n' +
+ '\n' +
+ '' +
+ defs + contents +
+ ' ';
+ } catch (e) {
+ err = e;
+ }
- if (updatedObjectList) {
- currentObject[propertyName] = updatedObjectList;
- } else {
- var listCopy = [];
- // remove all objects which should be removed
- forEach(objectList, function(object) {
- if (objectsToRemove.indexOf(object) == -1) {
- listCopy.push(object);
- }
- });
- // add all objects which should be added
- listCopy = listCopy.concat(objectsToAdd);
+ /**
+ * A `saveSVG.done` event.
+ *
+ * @event BaseViewer#SaveSVGDoneEvent
+ * @type {SaveSVGDoneEvent}
+ */
+ this._emit('saveSVG.done', {
+ error: err,
+ svg: svg
+ });
- // set property to new list
- if (listCopy.length > 0 || !referencePropertyName) {
+ if (err) {
+ throw err;
+ }
- // as long as there are elements in the list update the list
- currentObject[propertyName] = listCopy;
- } else if (referencePropertyName) {
+ return { svg };
+};
- // remove the list when it is empty
- var parentObject = currentObject.$parent;
- parentObject.set(referencePropertyName, undefined);
- }
- }
+BaseViewer.prototype._setDefinitions = function(definitions) {
+ this._definitions = definitions;
+};
- context.changed = changed;
+/**
+ * Return modules to instantiate with.
+ *
+ * @return {ModuleDeclaration[]} The modules.
+ */
+BaseViewer.prototype.getModules = function() {
+ return this._modules;
+};
- // indicate changed on objects affected by the update
- return changed;
- };
+/**
+ * Remove all drawn elements from the viewer.
+ *
+ * After calling this method the viewer can still be reused for opening another
+ * diagram.
+ */
+BaseViewer.prototype.clear = function() {
+ if (!this.getDefinitions()) {
- /**
- * Reverts the update
- *
- * @method CreateBusinessObjectListHandler#revert
- *
- * @param {Object} context
- *
- * @return {djs.mode.Base} the updated element
- */
- UpdateBusinessObjectListHandler.prototype.revert = function(context) {
+ // no diagram to clear
+ return;
+ }
- var currentObject = context.currentObject,
- propertyName = context.propertyName,
- previousList = context.previousList,
- parentObject = currentObject.$parent;
+ // remove drawn elements
+ diagram_js__WEBPACK_IMPORTED_MODULE_2__["default"].prototype.clear.call(this);
+};
- if (context.referencePropertyName) {
- parentObject.set(context.referencePropertyName, currentObject);
- }
+/**
+ * Destroy the viewer instance and remove all its remainders from the document
+ * tree.
+ */
+BaseViewer.prototype.destroy = function() {
- // remove new element
- currentObject.set(propertyName, previousList);
+ // diagram destroy
+ diagram_js__WEBPACK_IMPORTED_MODULE_2__["default"].prototype.destroy.call(this);
- return context.changed;
- };
+ // dom detach
+ (0,min_dom__WEBPACK_IMPORTED_MODULE_4__.remove)(this._container);
+};
- },{"lodash/forEach":613}],11:[function(require,module,exports){
- 'use strict';
+/**
+ * Register an event listener.
+ *
+ * Remove an event listener via {@link BaseViewer#off}.
+ *
+ * @template T
+ *
+ * @param {string|string[]} events The event(s) to listen to.
+ * @param {number} [priority] The priority with which to listen.
+ * @param {EventBusEventCallback} callback The callback.
+ * @param {any} [that] Value of `this` the callback will be called with.
+ */
+BaseViewer.prototype.on = function(events, priority, callback, that) {
+ return this.get('eventBus').on(events, priority, callback, that);
+};
- var forEach = require('lodash/forEach');
+/**
+ * Remove an event listener.
+ *
+ * @param {string|string[]} events The event(s).
+ * @param {Function} [callback] The callback.
+ */
+BaseViewer.prototype.off = function(events, callback) {
+ this.get('eventBus').off(events, callback);
+};
- var HANDLERS = {
- 'properties-panel.update-businessobject': require('./UpdateBusinessObjectHandler'),
- 'properties-panel.create-and-reference': require('./CreateAndReferenceHandler'),
- 'properties-panel.create-businessobject-list': require('./CreateBusinessObjectListHandler'),
- 'properties-panel.update-businessobject-list': require('./UpdateBusinessObjectListHandler'),
- 'properties-panel.multi-command-executor': require('./MultiCommandHandler')
- };
+/**
+ * Attach the viewer to an HTML element.
+ *
+ * @param {HTMLElement} parentNode The parent node to attach to.
+ */
+BaseViewer.prototype.attachTo = function(parentNode) {
+ if (!parentNode) {
+ throw new Error('parentNode required');
+ }
- function CommandInitializer(eventBus, commandStack) {
+ // ensure we detach from the
+ // previous, old parent
+ this.detach();
- eventBus.on('diagram.init', function() {
- forEach(HANDLERS, function(handler, id) {
- commandStack.registerHandler(id, handler);
- });
- });
- }
+ // unwrap jQuery if provided
+ if (parentNode.get && parentNode.constructor.prototype.jquery) {
+ parentNode = parentNode.get(0);
+ }
- CommandInitializer.$inject = [ 'eventBus', 'commandStack' ];
+ if (typeof parentNode === 'string') {
+ parentNode = (0,min_dom__WEBPACK_IMPORTED_MODULE_4__.query)(parentNode);
+ }
- module.exports = {
- __init__: [ CommandInitializer ]
- };
- },{"./CreateAndReferenceHandler":6,"./CreateBusinessObjectListHandler":7,"./MultiCommandHandler":8,"./UpdateBusinessObjectHandler":9,"./UpdateBusinessObjectListHandler":10,"lodash/forEach":613}],12:[function(require,module,exports){
- 'use strict';
+ parentNode.appendChild(this._container);
- var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject,
- cmdHelper = require('../helper/CmdHelper'),
- escapeHTML = require('../Utils').escapeHTML;
+ this._emit('attach', {});
- var entryFieldDescription = require('./EntryFieldDescription');
+ this.get('canvas').resized();
+};
+/**
+ * Get the definitions model element.
+ *
+ * @return {ModdleElement} The definitions model element.
+ */
+BaseViewer.prototype.getDefinitions = function() {
+ return this._definitions;
+};
- var checkbox = function(options, defaultParameters) {
- var resource = defaultParameters,
- id = resource.id,
- label = options.label || id,
- canBeDisabled = !!options.disabled && typeof options.disabled === 'function',
- canBeHidden = !!options.hidden && typeof options.hidden === 'function',
- description = options.description;
+/**
+ * Detach the viewer.
+ *
+ * @fires BaseViewer#DetachEvent
+ */
+BaseViewer.prototype.detach = function() {
- resource.html =
- ' ' +
- '' + escapeHTML(label) + ' ';
+ const container = this._container,
+ parentNode = container.parentNode;
- // add description below checkbox entry field
- if (description) {
- resource.html += entryFieldDescription(description);
- }
+ if (!parentNode) {
+ return;
+ }
- resource.get = function(element) {
- var bo = getBusinessObject(element),
- res = {};
+ /**
+ * A `detach` event.
+ *
+ * @event BaseViewer#DetachEvent
+ * @type {Object}
+ */
+ this._emit('detach', {});
- res[options.modelProperty] = bo.get(options.modelProperty);
+ parentNode.removeChild(container);
+};
- return res;
- };
+BaseViewer.prototype._init = function(container, moddle, options) {
- resource.set = function(element, values) {
- var res = {};
+ const baseModules = options.modules || this.getModules(options),
+ additionalModules = options.additionalModules || [],
+ staticModules = [
+ {
+ bpmnjs: [ 'value', this ],
+ moddle: [ 'value', moddle ]
+ }
+ ];
- res[options.modelProperty] = !!values[options.modelProperty];
+ const diagramModules = [].concat(staticModules, baseModules, additionalModules);
- return cmdHelper.updateProperties(element, res);
- };
+ const diagramOptions = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.omit)(options, [ 'additionalModules' ]), {
+ canvas: (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, options.canvas, { container: container }),
+ modules: diagramModules
+ });
- if (typeof options.set === 'function') {
- resource.set = options.set;
- }
+ // invoke diagram constructor
+ diagram_js__WEBPACK_IMPORTED_MODULE_2__["default"].call(this, diagramOptions);
- if (typeof options.get === 'function') {
- resource.get = options.get;
- }
+ if (options && options.container) {
+ this.attachTo(options.container);
+ }
+};
- if (canBeDisabled) {
- resource.isDisabled = function() {
- return options.disabled.apply(resource, arguments);
- };
- }
+/**
+ * Emit an event on the underlying {@link EventBus}
+ *
+ * @param {string} type
+ * @param {Object} event
+ *
+ * @return {Object} The return value after calling all event listeners.
+ */
+BaseViewer.prototype._emit = function(type, event) {
+ return this.get('eventBus').fire(type, event);
+};
- if (canBeHidden) {
- resource.isHidden = function() {
- return !options.hidden.apply(resource, arguments);
- };
- }
+/**
+ * @param {BaseViewerOptions} options
+ *
+ * @return {HTMLElement}
+ */
+BaseViewer.prototype._createContainer = function(options) {
- resource.cssClasses = ['bpp-checkbox'];
+ const container = (0,min_dom__WEBPACK_IMPORTED_MODULE_4__.domify)('
');
- return resource;
- };
+ (0,min_dom__WEBPACK_IMPORTED_MODULE_4__.assignStyle)(container, {
+ width: ensureUnit(options.width),
+ height: ensureUnit(options.height),
+ position: options.position
+ });
- module.exports = checkbox;
+ return container;
+};
- },{"../Utils":5,"../helper/CmdHelper":25,"./EntryFieldDescription":15,"bpmn-js/lib/util/ModelUtil":240}],13:[function(require,module,exports){
- 'use strict';
+/**
+ * @param {BaseViewerOptions} options
+ *
+ * @return {Moddle}
+ */
+BaseViewer.prototype._createModdle = function(options) {
+ const moddleOptions = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, this._moddleExtensions, options.moddleExtensions);
- var assign = require('lodash/assign'),
- find = require('lodash/find');
+ return new bpmn_moddle__WEBPACK_IMPORTED_MODULE_6__["default"](moddleOptions);
+};
- var domQuery = require('min-dom').query;
+BaseViewer.prototype._modules = [];
- var escapeHTML = require('../Utils').escapeHTML;
+// helpers ///////////////
- var selectEntryFactory = require('./SelectEntryFactory'),
- entryFieldDescription = require('./EntryFieldDescription');
+function addWarningsToError(err, warningsAry) {
+ err.warnings = warningsAry;
+ return err;
+}
+function checkValidationError(err) {
- /**
- * The combo box is a special implementation of the select entry and adds the option 'custom' to the
- * select box. If 'custom' is selected, an additional text input field is shown which allows to define
- * a custom value.
- *
- * @param {Object} options
- * @param {string} options.id
- * @param {string} options.label
- * @param {Array} options.selectOptions list of name/value pairs
- * @param {string} options.modelProperty
- * @param {function} options.get
- * @param {function} options.set
- * @param {string} [options.customValue] custom select option value (default: 'custom')
- * @param {string} [options.customName] custom select option name visible in the select box (default: 'custom')
- *
- * @return {Object}
- */
- var comboBox = function(options) {
+ // check if we can help the user by indicating wrong BPMN 2.0 xml
+ // (in case he or the exporting tool did not get that right)
- var selectOptions = options.selectOptions,
- modelProperty = options.modelProperty,
- customValue = options.customValue || 'custom',
- customName = options.customName || 'custom ' + modelProperty,
- description = options.description;
+ const pattern = /unparsable content <([^>]+)> detected([\s\S]*)$/;
+ const match = pattern.exec(err.message);
- // check if a value is not a built in value
- var isCustomValue = function(value) {
- if (typeof value[modelProperty] === 'undefined') {
- return false;
- }
+ if (match) {
+ err.message =
+ 'unparsable content <' + match[1] + '> detected; ' +
+ 'this may indicate an invalid BPMN 2.0 diagram file' + match[2];
+ }
- var isCustom = !find(selectOptions, function(option) {
- return value[modelProperty] === option.value;
- });
+ return err;
+}
- return isCustom;
- };
+const DEFAULT_OPTIONS = {
+ width: '100%',
+ height: '100%',
+ position: 'relative'
+};
- var comboOptions = assign({}, options);
- // true if the selected value in the select box is customValue
- comboOptions.showCustomInput = function(element, node) {
- var selectBox = domQuery('[data-entry="'+ options.id +'"] select', node.parentNode);
+/**
+ * Ensure the passed argument is a proper unit (defaulting to px)
+ */
+function ensureUnit(val) {
+ return val + ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(val) ? 'px' : '');
+}
- if (selectBox) {
- return selectBox.value === customValue;
- }
- return false;
- };
+/**
+ * Find BPMNDiagram in definitions by ID
+ *
+ * @param {ModdleElement} definitions
+ * @param {string} diagramId
+ *
+ * @return {ModdleElement|null}
+ */
+function findBPMNDiagram(definitions, diagramId) {
+ if (!diagramId) {
+ return null;
+ }
- comboOptions.get = function(element, node) {
- var value = options.get(element, node);
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(definitions.diagrams, function(element) {
+ return element.id === diagramId;
+ }) || null;
+}
- var modifiedValues = {};
- if (!isCustomValue(value)) {
- modifiedValues[modelProperty] = value[modelProperty] || '';
+/* */
- return modifiedValues;
- }
- modifiedValues[modelProperty] = customValue;
- modifiedValues['custom-'+modelProperty] = value[modelProperty];
- return modifiedValues;
- };
- comboOptions.set = function(element, values, node) {
- var modifiedValues = {};
- // if the custom select option has been selected
- // take the value from the text input field
- if (values[modelProperty] === customValue) {
- modifiedValues[modelProperty] = values['custom-' + modelProperty] || '';
- }
- else if (options.emptyParameter && values[modelProperty] === '') {
- modifiedValues[modelProperty] = undefined;
- } else {
- modifiedValues[modelProperty] = values[modelProperty];
- }
- return options.set(element, modifiedValues, node);
- };
+/**
+ * Adds the project logo to the diagram container as
+ * required by the bpmn.io license.
+ *
+ * @see http://bpmn.io/license
+ *
+ * @param {Element} container
+ */
+function addProjectLogo(container) {
+ const img = _util_PoweredByUtil__WEBPACK_IMPORTED_MODULE_7__.BPMNIO_IMG;
- comboOptions.selectOptions.push({ name: customName, value: customValue });
+ const linkMarkup =
+ '' +
+ img +
+ ' ';
- var comboBoxEntry = assign({}, selectEntryFactory(comboOptions, comboOptions));
+ const linkElement = (0,min_dom__WEBPACK_IMPORTED_MODULE_4__.domify)(linkMarkup);
- comboBoxEntry.html += '' +
- ' ' +
- '
';
+ (0,min_dom__WEBPACK_IMPORTED_MODULE_4__.assignStyle)((0,min_dom__WEBPACK_IMPORTED_MODULE_4__.query)('svg', linkElement), _util_PoweredByUtil__WEBPACK_IMPORTED_MODULE_7__.LOGO_STYLES);
+ (0,min_dom__WEBPACK_IMPORTED_MODULE_4__.assignStyle)(linkElement, _util_PoweredByUtil__WEBPACK_IMPORTED_MODULE_7__.LINK_STYLES, {
+ position: 'absolute',
+ bottom: '15px',
+ right: '15px',
+ zIndex: '100'
+ });
- // add description below combo box entry field
- if (description) {
- comboBoxEntry.html += entryFieldDescription(description);
- }
+ container.appendChild(linkElement);
- return comboBoxEntry;
- };
+ min_dom__WEBPACK_IMPORTED_MODULE_4__.event.bind(linkElement, 'click', function(event) {
+ (0,_util_PoweredByUtil__WEBPACK_IMPORTED_MODULE_7__.open)();
- module.exports = comboBox;
+ event.preventDefault();
+ });
+}
- },{"../Utils":5,"./EntryFieldDescription":15,"./SelectEntryFactory":18,"lodash/assign":604,"lodash/find":610,"min-dom":647}],14:[function(require,module,exports){
- 'use strict';
+/* */
- var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject;
-// input entities
- var textInputField = require('./TextInputEntryFactory'),
- checkboxField = require('./CheckboxEntryFactory'),
- selectBoxField = require('./SelectEntryFactory'),
- comboBoxField = require('./ComboEntryFactory'),
- textBoxField = require('./TextBoxEntryFactory'),
- validationAwareTextInputField = require('./ValidationAwareTextInput'),
- tableField = require('./TableEntryFactory'),
- labelEntry = require('./LabelFactory'),
- link = require('./LinkEntryFactory');
+/***/ }),
- var cmdHelper = require('../helper/CmdHelper');
+/***/ "../node_modules/bpmn-js/lib/Modeler.js":
+/*!**********************************************!*\
+ !*** ../node_modules/bpmn-js/lib/Modeler.js ***!
+ \**********************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
-// helpers ////////////////////////////////////////
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ Modeler)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var _BaseModeler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BaseModeler */ "../node_modules/bpmn-js/lib/BaseModeler.js");
+/* harmony import */ var _Viewer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Viewer */ "../node_modules/bpmn-js/lib/Viewer.js");
+/* harmony import */ var _NavigatedViewer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./NavigatedViewer */ "../node_modules/bpmn-js/lib/NavigatedViewer.js");
+/* harmony import */ var diagram_js_lib_navigation_keyboard_move__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! diagram-js/lib/navigation/keyboard-move */ "../node_modules/diagram-js/lib/navigation/keyboard-move/index.js");
+/* harmony import */ var diagram_js_lib_navigation_movecanvas__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! diagram-js/lib/navigation/movecanvas */ "../node_modules/diagram-js/lib/navigation/movecanvas/index.js");
+/* harmony import */ var diagram_js_lib_navigation_zoomscroll__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! diagram-js/lib/navigation/zoomscroll */ "../node_modules/diagram-js/lib/navigation/zoomscroll/index.js");
+/* harmony import */ var _features_align_elements__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./features/align-elements */ "../node_modules/bpmn-js/lib/features/align-elements/index.js");
+/* harmony import */ var _features_auto_place__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./features/auto-place */ "../node_modules/bpmn-js/lib/features/auto-place/index.js");
+/* harmony import */ var _features_auto_resize__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./features/auto-resize */ "../node_modules/bpmn-js/lib/features/auto-resize/index.js");
+/* harmony import */ var diagram_js_lib_features_auto_scroll__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! diagram-js/lib/features/auto-scroll */ "../node_modules/diagram-js/lib/features/auto-scroll/index.js");
+/* harmony import */ var diagram_js_lib_features_bendpoints__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! diagram-js/lib/features/bendpoints */ "../node_modules/diagram-js/lib/features/bendpoints/index.js");
+/* harmony import */ var diagram_js_lib_features_connect__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! diagram-js/lib/features/connect */ "../node_modules/diagram-js/lib/features/connect/index.js");
+/* harmony import */ var diagram_js_lib_features_connection_preview__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! diagram-js/lib/features/connection-preview */ "../node_modules/diagram-js/lib/features/connection-preview/index.js");
+/* harmony import */ var _features_context_pad__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./features/context-pad */ "../node_modules/bpmn-js/lib/features/context-pad/index.js");
+/* harmony import */ var _features_copy_paste__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./features/copy-paste */ "../node_modules/bpmn-js/lib/features/copy-paste/index.js");
+/* harmony import */ var diagram_js_lib_features_create__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! diagram-js/lib/features/create */ "../node_modules/diagram-js/lib/features/create/index.js");
+/* harmony import */ var _features_distribute_elements__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./features/distribute-elements */ "../node_modules/bpmn-js/lib/features/distribute-elements/index.js");
+/* harmony import */ var _features_editor_actions__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./features/editor-actions */ "../node_modules/bpmn-js/lib/features/editor-actions/index.js");
+/* harmony import */ var _features_grid_snapping__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./features/grid-snapping */ "../node_modules/bpmn-js/lib/features/grid-snapping/index.js");
+/* harmony import */ var _features_interaction_events__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./features/interaction-events */ "../node_modules/bpmn-js/lib/features/interaction-events/index.js");
+/* harmony import */ var _features_keyboard__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./features/keyboard */ "../node_modules/bpmn-js/lib/features/keyboard/index.js");
+/* harmony import */ var diagram_js_lib_features_keyboard_move_selection__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! diagram-js/lib/features/keyboard-move-selection */ "../node_modules/diagram-js/lib/features/keyboard-move-selection/index.js");
+/* harmony import */ var _features_label_editing__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./features/label-editing */ "../node_modules/bpmn-js/lib/features/label-editing/index.js");
+/* harmony import */ var _features_modeling__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./features/modeling */ "../node_modules/bpmn-js/lib/features/modeling/index.js");
+/* harmony import */ var _features_modeling_feedback__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./features/modeling-feedback */ "../node_modules/bpmn-js/lib/features/modeling-feedback/index.js");
+/* harmony import */ var diagram_js_lib_features_move__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! diagram-js/lib/features/move */ "../node_modules/diagram-js/lib/features/move/index.js");
+/* harmony import */ var _features_outline__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./features/outline */ "../node_modules/bpmn-js/lib/features/outline/index.js");
+/* harmony import */ var _features_palette__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./features/palette */ "../node_modules/bpmn-js/lib/features/palette/index.js");
+/* harmony import */ var _features_replace_preview__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./features/replace-preview */ "../node_modules/bpmn-js/lib/features/replace-preview/index.js");
+/* harmony import */ var diagram_js_lib_features_resize__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! diagram-js/lib/features/resize */ "../node_modules/diagram-js/lib/features/resize/index.js");
+/* harmony import */ var _features_snapping__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./features/snapping */ "../node_modules/bpmn-js/lib/features/snapping/index.js");
+/* harmony import */ var _features_search__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./features/search */ "../node_modules/bpmn-js/lib/features/search/index.js");
- function ensureNotNull(prop) {
- if (!prop) {
- throw new Error(prop + ' must be set.');
- }
- return prop;
- }
- /**
- * sets the default parameters which are needed to create an entry
- *
- * @param options
- * @returns {{id: *, description: (*|string), get: (*|Function), set: (*|Function),
- * validate: (*|Function), html: string}}
- */
- var setDefaultParameters = function(options) {
- // default method to fetch the current value of the input field
- var defaultGet = function(element) {
- var bo = getBusinessObject(element),
- res = {},
- prop = ensureNotNull(options.modelProperty);
- res[prop] = bo.get(prop);
- return res;
- };
- // default method to set a new value to the input field
- var defaultSet = function(element, values) {
- var res = {},
- prop = ensureNotNull(options.modelProperty);
- if (values[prop] !== '') {
- res[prop] = values[prop];
- } else {
- res[prop] = undefined;
- }
- return cmdHelper.updateProperties(element, res);
- };
- // default validation method
- var defaultValidate = function() {
- return {};
- };
- return {
- id : options.id,
- description : (options.description || ''),
- get : (options.get || defaultGet),
- set : (options.set || defaultSet),
- validate : (options.validate || defaultValidate),
- html: ''
- };
- };
- function EntryFactory() {
- }
- /**
- * Generates an text input entry object for a property panel.
- * options are:
- * - id: id of the entry - String
- *
- * - description: description of the property - String
- *
- * - label: label for the input field - String
- *
- * - set: setter method - Function
- *
- * - get: getter method - Function
- *
- * - validate: validation mehtod - Function
- *
- * - modelProperty: name of the model property - String
- *
- * - buttonAction: Object which contains the following properties: - Object
- * ---- name: name of the [data-action] callback - String
- * ---- method: callback function for [data-action] - Function
- *
- * - buttonShow: Object which contains the following properties: - Object
- * ---- name: name of the [data-show] callback - String
- * ---- method: callback function for [data-show] - Function
- *
- * @param options
- * @returns the propertyPanel entry resource object
- */
- EntryFactory.textField = function(options) {
- return textInputField(options, setDefaultParameters(options));
- };
- EntryFactory.validationAwareTextField = function(options) {
- return validationAwareTextInputField(options, setDefaultParameters(options));
- };
- /**
- * Generates a checkbox input entry object for a property panel.
- * options are:
- * - id: id of the entry - String
- *
- * - description: description of the property - String
- *
- * - label: label for the input field - String
- *
- * - set: setter method - Function
- *
- * - get: getter method - Function
- *
- * - validate: validation method - Function
- *
- * - modelProperty: name of the model property - String
- *
- * @param options
- * @returns the propertyPanel entry resource object
- */
- EntryFactory.checkbox = function(options) {
- return checkboxField(options, setDefaultParameters(options));
- };
- EntryFactory.textBox = function(options) {
- return textBoxField(options, setDefaultParameters(options));
- };
- EntryFactory.selectBox = function(options) {
- return selectBoxField(options, setDefaultParameters(options));
- };
- EntryFactory.comboBox = function(options) {
- return comboBoxField(options);
- };
- EntryFactory.table = function(options) {
- return tableField(options);
- };
- EntryFactory.label = function(options) {
- return labelEntry(options);
- };
- EntryFactory.link = function(options) {
- return link(options);
- };
- module.exports = EntryFactory;
- },{"../helper/CmdHelper":25,"./CheckboxEntryFactory":12,"./ComboEntryFactory":13,"./LabelFactory":16,"./LinkEntryFactory":17,"./SelectEntryFactory":18,"./TableEntryFactory":19,"./TextBoxEntryFactory":20,"./TextInputEntryFactory":21,"./ValidationAwareTextInput":22,"bpmn-js/lib/util/ModelUtil":240}],15:[function(require,module,exports){
- 'use strict';
- var escapeHTML = require('../Utils').escapeHTML;
- /**
- * Create a linkified and HTML escaped entry field description.
- *
- * As a special feature, this description may contain both markdown,
- * plain links and
- *
- * @param {String} description
- */
- module.exports = function entryFieldDescription(description) {
- // we tokenize the description to extract text, HTML and markdown links
- // text, links and new lines are handled seperately
- var escaped = [];
- // match markdown [{TEXT}]({URL}) and HTML links {TEXT}
- var pattern = /(?:\[([^\]]+)\]\((https?:\/\/[^)]+)\))|(?:(.+?(?=<\/))<\/a>)/gi;
- var index = 0;
- var match;
- var link, text;
- while ((match = pattern.exec(description))) {
- // escape + insert text before match
- if (match.index > index) {
- escaped.push(escapeText(description.substring(index, match.index)));
- }
- link = match[2] && encodeURI(match[2]) || match[3];
- text = match[1] || match[4];
- // insert safe link
- escaped.push(' ' + escapeText(text) + ' ');
- index = match.index + match[0].length;
- }
- // escape and insert text after last match
- if (index < description.length) {
- escaped.push(escapeText(description.substring(index)));
- }
- return '' + escaped.join('') + '
';
- };
- function escapeText(text) {
- var match, index = 0, escaped = [];
- // match new line etc.
- var pattern = / /gi;
- while ((match = pattern.exec(text))) {
+var initialDiagram =
+ '' +
+ '' +
+ '' +
+ ' ' +
+ ' ' +
+ '' +
+ '' +
+ '' +
+ ' ' +
+ ' ' +
+ ' ' +
+ ' ' +
+ ' ';
- if (match.index > index) {
- escaped.push(escapeHTML(text.substring(index, match.index)));
- }
- escaped.push(' ');
+/**
+ * @typedef {import('./BaseViewer').BaseViewerOptions} BaseViewerOptions
+ * @typedef {import('./BaseViewer').ImportXMLResult} ImportXMLResult
+ */
- index = match.index + match[0].length;
- }
+/**
+ * A modeler for BPMN 2.0 diagrams.
+ *
+ *
+ * ## Extending the Modeler
+ *
+ * In order to extend the viewer pass extension modules to bootstrap via the
+ * `additionalModules` option. An extension module is an object that exposes
+ * named services.
+ *
+ * The following example depicts the integration of a simple
+ * logging component that integrates with interaction events:
+ *
+ *
+ * ```javascript
+ *
+ * // logging component
+ * function InteractionLogger(eventBus) {
+ * eventBus.on('element.hover', function(event) {
+ * console.log()
+ * })
+ * }
+ *
+ * InteractionLogger.$inject = [ 'eventBus' ]; // minification save
+ *
+ * // extension module
+ * var extensionModule = {
+ * __init__: [ 'interactionLogger' ],
+ * interactionLogger: [ 'type', InteractionLogger ]
+ * };
+ *
+ * // extend the viewer
+ * var bpmnModeler = new Modeler({ additionalModules: [ extensionModule ] });
+ * bpmnModeler.importXML(...);
+ * ```
+ *
+ *
+ * ## Customizing / Replacing Components
+ *
+ * You can replace individual diagram components by redefining them in override modules.
+ * This works for all components, including those defined in the core.
+ *
+ * Pass in override modules via the `options.additionalModules` flag like this:
+ *
+ * ```javascript
+ * function CustomContextPadProvider(contextPad) {
+ *
+ * contextPad.registerProvider(this);
+ *
+ * this.getContextPadEntries = function(element) {
+ * // no entries, effectively disable the context pad
+ * return {};
+ * };
+ * }
+ *
+ * CustomContextPadProvider.$inject = [ 'contextPad' ];
+ *
+ * var overrideModule = {
+ * contextPadProvider: [ 'type', CustomContextPadProvider ]
+ * };
+ *
+ * var bpmnModeler = new Modeler({ additionalModules: [ overrideModule ]});
+ * ```
+ *
+ * @param {BaseViewerOptions} [options] The options to configure the modeler.
+ */
+function Modeler(options) {
+ _BaseModeler__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, options);
+}
- if (index < text.length) {
- escaped.push(escapeHTML(text.substring(index)));
- }
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_1__["default"])(Modeler, _BaseModeler__WEBPACK_IMPORTED_MODULE_0__["default"]);
- return escaped.join('');
- }
- },{"../Utils":5}],16:[function(require,module,exports){
- 'use strict';
+Modeler.Viewer = _Viewer__WEBPACK_IMPORTED_MODULE_2__["default"];
+Modeler.NavigatedViewer = _NavigatedViewer__WEBPACK_IMPORTED_MODULE_3__["default"];
- /**
- * The label factory provides a label entry. For the label text
- * it expects either a string provided by the options.labelText
- * parameter or it could be generated programmatically using a
- * function passed as the options.get parameter.
- *
- * @param {Object} options
- * @param {string} options.id
- * @param {string} [options.labelText]
- * @param {Function} [options.get]
- * @param {Function} [options.showLabel]
- * @param {Boolean} [options.divider] adds a divider at the top of the label if true; default: false
- */
- var label = function(options) {
- return {
- id: options.id,
- html: '' +
- ' ',
- get: function(element, node) {
- if (typeof options.get === 'function') {
- return options.get(element, node);
- }
- return { label: options.labelText };
- },
- showLabel: function(element, node) {
- if (typeof options.showLabel === 'function') {
- return options.showLabel(element, node);
- }
- return true;
- }
- };
- };
+/**
+ * Create a new diagram to start modeling.
+ *
+ * @throws {ImportXMLError} An error thrown during the import of the XML.
+ *
+ * @return {Promise} A promise resolving with warnings that were produced during the import.
+ */
+Modeler.prototype.createDiagram = function createDiagram() {
+ return this.importXML(initialDiagram);
+};
+
+
+Modeler.prototype._interactionModules = [
+
+ // non-modeling components
+ diagram_js_lib_navigation_keyboard_move__WEBPACK_IMPORTED_MODULE_4__["default"],
+ diagram_js_lib_navigation_movecanvas__WEBPACK_IMPORTED_MODULE_5__["default"],
+ diagram_js_lib_navigation_zoomscroll__WEBPACK_IMPORTED_MODULE_6__["default"]
+];
+
+Modeler.prototype._modelingModules = [
+
+ // modeling components
+ _features_align_elements__WEBPACK_IMPORTED_MODULE_7__["default"],
+ _features_auto_place__WEBPACK_IMPORTED_MODULE_8__["default"],
+ diagram_js_lib_features_auto_scroll__WEBPACK_IMPORTED_MODULE_9__["default"],
+ _features_auto_resize__WEBPACK_IMPORTED_MODULE_10__["default"],
+ diagram_js_lib_features_bendpoints__WEBPACK_IMPORTED_MODULE_11__["default"],
+ diagram_js_lib_features_connect__WEBPACK_IMPORTED_MODULE_12__["default"],
+ diagram_js_lib_features_connection_preview__WEBPACK_IMPORTED_MODULE_13__["default"],
+ _features_context_pad__WEBPACK_IMPORTED_MODULE_14__["default"],
+ _features_copy_paste__WEBPACK_IMPORTED_MODULE_15__["default"],
+ diagram_js_lib_features_create__WEBPACK_IMPORTED_MODULE_16__["default"],
+ _features_distribute_elements__WEBPACK_IMPORTED_MODULE_17__["default"],
+ _features_editor_actions__WEBPACK_IMPORTED_MODULE_18__["default"],
+ _features_grid_snapping__WEBPACK_IMPORTED_MODULE_19__["default"],
+ _features_interaction_events__WEBPACK_IMPORTED_MODULE_20__["default"],
+ _features_keyboard__WEBPACK_IMPORTED_MODULE_21__["default"],
+ diagram_js_lib_features_keyboard_move_selection__WEBPACK_IMPORTED_MODULE_22__["default"],
+ _features_label_editing__WEBPACK_IMPORTED_MODULE_23__["default"],
+ _features_modeling__WEBPACK_IMPORTED_MODULE_24__["default"],
+ _features_modeling_feedback__WEBPACK_IMPORTED_MODULE_25__["default"],
+ diagram_js_lib_features_move__WEBPACK_IMPORTED_MODULE_26__["default"],
+ _features_outline__WEBPACK_IMPORTED_MODULE_27__["default"],
+ _features_palette__WEBPACK_IMPORTED_MODULE_28__["default"],
+ _features_replace_preview__WEBPACK_IMPORTED_MODULE_29__["default"],
+ diagram_js_lib_features_resize__WEBPACK_IMPORTED_MODULE_30__["default"],
+ _features_snapping__WEBPACK_IMPORTED_MODULE_31__["default"],
+ _features_search__WEBPACK_IMPORTED_MODULE_32__["default"]
+];
+
+
+// modules the modeler is composed of
+//
+// - viewer modules
+// - interaction modules
+// - modeling modules
- module.exports = label;
+Modeler.prototype._modules = [].concat(
+ _Viewer__WEBPACK_IMPORTED_MODULE_2__["default"].prototype._modules,
+ Modeler.prototype._interactionModules,
+ Modeler.prototype._modelingModules
+);
- },{}],17:[function(require,module,exports){
- 'use strict';
- var escapeHTML = require('../Utils').escapeHTML;
+/***/ }),
- var entryFieldDescription = require('./EntryFieldDescription');
+/***/ "../node_modules/bpmn-js/lib/NavigatedViewer.js":
+/*!******************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/NavigatedViewer.js ***!
+ \******************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var bind = require('lodash/bind');
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ NavigatedViewer)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var _Viewer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Viewer */ "../node_modules/bpmn-js/lib/Viewer.js");
+/* harmony import */ var diagram_js_lib_navigation_keyboard_move__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/navigation/keyboard-move */ "../node_modules/diagram-js/lib/navigation/keyboard-move/index.js");
+/* harmony import */ var diagram_js_lib_navigation_movecanvas__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/navigation/movecanvas */ "../node_modules/diagram-js/lib/navigation/movecanvas/index.js");
+/* harmony import */ var diagram_js_lib_navigation_zoomscroll__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! diagram-js/lib/navigation/zoomscroll */ "../node_modules/diagram-js/lib/navigation/zoomscroll/index.js");
- /**
- * An entry that renders a clickable link.
- *
- * A passed {@link options#handleClick} handler is responsible
- * to process the click.
- *
- * The link may be conditionally shown or hidden. This can be
- * controlled via the {@link options.showLink}.
- *
- * @param {Object} options
- * @param {String} options.id
- * @param {String} [options.label]
- * @param {Function} options.handleClick
- * @param {Function} [options.showLink] returning false to hide link
- * @param {String} [options.description]
- *
- * @example
- *
- * var linkEntry = link({
- * id: 'foo',
- * description: 'Some Description',
- * handleClick: function(element, node, event) { ... },
- * showLink: function(element, node) { ... }
- * });
- *
- * @return {Entry} the newly created entry
- */
- function link(options) {
- var id = options.id,
- label = options.label || id,
- showLink = options.showLink,
- handleClick = options.handleClick,
- description = options.description;
- if (showLink && typeof showLink !== 'function') {
- throw new Error('options.showLink must be a function');
- }
- if (typeof handleClick !== 'function') {
- throw new Error('options.handleClick must be a function');
- }
- var resource = {
- id: id
- };
- resource.html =
- '' + escapeHTML(label) + ' ';
- // add description below link entry field
- if (description) {
- resource.html += entryFieldDescription(description);
- }
- resource.handleClick = bind(handleClick, resource);
+/**
+ * @typedef { import('./BaseViewer').BaseViewerOptions } BaseViewerOptions
+ */
- if (typeof showLink === 'function') {
- resource.showLink = function() {
- return showLink.apply(resource, arguments);
- };
- }
+/**
+ * A viewer with mouse and keyboard navigation features.
+ *
+ * @param {BaseViewerOptions} [options]
+ */
+function NavigatedViewer(options) {
+ _Viewer__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, options);
+}
- return resource;
- }
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_1__["default"])(NavigatedViewer, _Viewer__WEBPACK_IMPORTED_MODULE_0__["default"]);
- module.exports = link;
- },{"../Utils":5,"./EntryFieldDescription":15,"lodash/bind":605}],18:[function(require,module,exports){
- 'use strict';
+NavigatedViewer.prototype._navigationModules = [
+ diagram_js_lib_navigation_keyboard_move__WEBPACK_IMPORTED_MODULE_2__["default"],
+ diagram_js_lib_navigation_movecanvas__WEBPACK_IMPORTED_MODULE_3__["default"],
+ diagram_js_lib_navigation_zoomscroll__WEBPACK_IMPORTED_MODULE_4__["default"]
+];
- var escapeHTML = require('../Utils').escapeHTML;
+NavigatedViewer.prototype._modules = [].concat(
+ _Viewer__WEBPACK_IMPORTED_MODULE_0__["default"].prototype._modules,
+ NavigatedViewer.prototype._navigationModules
+);
- var domify = require('min-dom').domify;
+/***/ }),
- var forEach = require('lodash/forEach');
+/***/ "../node_modules/bpmn-js/lib/Viewer.js":
+/*!*********************************************!*\
+ !*** ../node_modules/bpmn-js/lib/Viewer.js ***!
+ \*********************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var entryFieldDescription = require('./EntryFieldDescription');
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ Viewer)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./core */ "../node_modules/bpmn-js/lib/core/index.js");
+/* harmony import */ var diagram_js_lib_i18n_translate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/i18n/translate */ "../node_modules/diagram-js/lib/i18n/translate/index.js");
+/* harmony import */ var diagram_js_lib_features_selection__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! diagram-js/lib/features/selection */ "../node_modules/diagram-js/lib/features/selection/index.js");
+/* harmony import */ var diagram_js_lib_features_overlays__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! diagram-js/lib/features/overlays */ "../node_modules/diagram-js/lib/features/overlays/index.js");
+/* harmony import */ var _features_drilldown__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./features/drilldown */ "../node_modules/bpmn-js/lib/features/drilldown/index.js");
+/* harmony import */ var _BaseViewer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BaseViewer */ "../node_modules/bpmn-js/lib/BaseViewer.js");
- var isList = function(list) {
- return !(!list || Object.prototype.toString.call(list) !== '[object Array]');
- };
- var addEmptyParameter = function(list) {
- return list.concat([ { name: '', value: '' } ]);
- };
- var createOption = function(option) {
- return '' + option.name + ' ';
- };
- /**
- * @param {Object} options
- * @param {string} options.id
- * @param {string} [options.label]
- * @param {Array} options.selectOptions
- * @param {string} options.modelProperty
- * @param {boolean} options.emptyParameter
- * @param {function} options.disabled
- * @param {function} options.hidden
- * @param {Object} defaultParameters
- *
- * @return {Object}
- */
- var selectbox = function(options, defaultParameters) {
- var resource = defaultParameters,
- label = options.label || resource.id,
- selectOptions = options.selectOptions || [ { name: '', value: '' } ],
- modelProperty = options.modelProperty,
- emptyParameter = options.emptyParameter,
- canBeDisabled = !!options.disabled && typeof options.disabled === 'function',
- canBeHidden = !!options.hidden && typeof options.hidden === 'function',
- description = options.description;
-
-
- if (emptyParameter) {
- selectOptions = addEmptyParameter(selectOptions);
- }
-
-
- resource.html =
- '' + escapeHTML(label) + ' ' +
- '';
-
- if (isList(selectOptions)) {
- forEach(selectOptions, function(option) {
- resource.html += '' +
- (option.name ? escapeHTML(option.name) : '') + ' ';
- });
- }
- resource.html += ' ';
- // add description below select box entry field
- if (description && typeof options.showCustomInput !== 'function') {
- resource.html += entryFieldDescription(description);
- }
- /**
- * Fill the select box options dynamically.
- *
- * Calls the defined function #selectOptions in the entry to get the
- * values for the options and set the value to the inputNode.
- *
- * @param {djs.model.Base} element
- * @param {HTMLElement} entryNode
- * @param {EntryDescriptor} inputNode
- * @param {Object} inputName
- * @param {Object} newValue
- */
- resource.setControlValue = function(element, entryNode, inputNode, inputName, newValue) {
- if (typeof selectOptions === 'function') {
- var options = selectOptions(element, inputNode);
- if (options) {
- // remove existing options
- while (inputNode.firstChild) {
- inputNode.removeChild(inputNode.firstChild);
- }
+/**
+ * @typedef { import('./BaseViewer').BaseViewerOptions } BaseViewerOptions
+ */
- // add options
- forEach(options, function(option) {
- var template = domify(createOption(option));
+/**
+ * A viewer for BPMN 2.0 diagrams.
+ *
+ * Have a look at {@link NavigatedViewer} or {@link Modeler} for bundles that include
+ * additional features.
+ *
+ *
+ * ## Extending the Viewer
+ *
+ * In order to extend the viewer pass extension modules to bootstrap via the
+ * `additionalModules` option. An extension module is an object that exposes
+ * named services.
+ *
+ * The following example depicts the integration of a simple
+ * logging component that integrates with interaction events:
+ *
+ *
+ * ```javascript
+ *
+ * // logging component
+ * function InteractionLogger(eventBus) {
+ * eventBus.on('element.hover', function(event) {
+ * console.log()
+ * })
+ * }
+ *
+ * InteractionLogger.$inject = [ 'eventBus' ]; // minification save
+ *
+ * // extension module
+ * var extensionModule = {
+ * __init__: [ 'interactionLogger' ],
+ * interactionLogger: [ 'type', InteractionLogger ]
+ * };
+ *
+ * // extend the viewer
+ * var bpmnViewer = new Viewer({ additionalModules: [ extensionModule ] });
+ * bpmnViewer.importXML(...);
+ * ```
+ *
+ * @param {BaseViewerOptions} [options] The options to configure the viewer.
+ */
+function Viewer(options) {
+ _BaseViewer__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, options);
+}
+
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_1__["default"])(Viewer, _BaseViewer__WEBPACK_IMPORTED_MODULE_0__["default"]);
+
+// modules the viewer is composed of
+Viewer.prototype._modules = [
+ _core__WEBPACK_IMPORTED_MODULE_2__["default"],
+ diagram_js_lib_i18n_translate__WEBPACK_IMPORTED_MODULE_3__["default"],
+ diagram_js_lib_features_selection__WEBPACK_IMPORTED_MODULE_4__["default"],
+ diagram_js_lib_features_overlays__WEBPACK_IMPORTED_MODULE_5__["default"],
+ _features_drilldown__WEBPACK_IMPORTED_MODULE_6__["default"]
+];
+
+// default moddle extensions the viewer is composed of
+Viewer.prototype._moddleExtensions = {};
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/core/index.js":
+/*!*************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/core/index.js ***!
+ \*************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _draw__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../draw */ "../node_modules/bpmn-js/lib/draw/index.js");
+/* harmony import */ var _import__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../import */ "../node_modules/bpmn-js/lib/import/index.js");
+
+
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ _draw__WEBPACK_IMPORTED_MODULE_0__["default"],
+ _import__WEBPACK_IMPORTED_MODULE_1__["default"]
+ ]
+});
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/draw/BpmnRenderUtil.js":
+/*!**********************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/draw/BpmnRenderUtil.js ***!
+ \**********************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ black: () => (/* binding */ black),
+/* harmony export */ getBounds: () => (/* binding */ getBounds),
+/* harmony export */ getCirclePath: () => (/* binding */ getCirclePath),
+/* harmony export */ getDi: () => (/* reexport safe */ _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getDi),
+/* harmony export */ getDiamondPath: () => (/* binding */ getDiamondPath),
+/* harmony export */ getFillColor: () => (/* binding */ getFillColor),
+/* harmony export */ getHeight: () => (/* binding */ getHeight),
+/* harmony export */ getLabelColor: () => (/* binding */ getLabelColor),
+/* harmony export */ getRectPath: () => (/* binding */ getRectPath),
+/* harmony export */ getRoundRectPath: () => (/* binding */ getRoundRectPath),
+/* harmony export */ getSemantic: () => (/* reexport safe */ _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject),
+/* harmony export */ getStrokeColor: () => (/* binding */ getStrokeColor),
+/* harmony export */ getWidth: () => (/* binding */ getWidth),
+/* harmony export */ isCollection: () => (/* binding */ isCollection),
+/* harmony export */ isThrowEvent: () => (/* binding */ isThrowEvent),
+/* harmony export */ isTypedEvent: () => (/* binding */ isTypedEvent),
+/* harmony export */ white: () => (/* binding */ white)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var diagram_js_lib_util_RenderUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/util/RenderUtil */ "../node_modules/diagram-js/lib/util/RenderUtil.js");
+
+
+
+
+
+
+
+/**
+ * @typedef {import('../model').ModdleElement} ModdleElement
+ * @typedef {import('../model').Element} Element
+ *
+ * @typedef {import('../model').ShapeLike} ShapeLike
+ *
+ * @typedef {import('diagram-js/lib/util/Types').Dimensions} Dimensions
+ * @typedef {import('diagram-js/lib/util/Types').Rect} Rect
+ */
- inputNode.appendChild(template);
- });
+// re-export for compatibility
- }
- }
- // set select value
- if (newValue !== undefined) {
- inputNode.value = newValue;
- }
+var black = 'hsl(225, 10%, 15%)';
+var white = 'white';
- };
+// element utils //////////////////////
- if (canBeDisabled) {
- resource.isDisabled = function() {
- return options.disabled.apply(resource, arguments);
- };
- }
+/**
+ * Checks if eventDefinition of the given element matches with semantic type.
+ *
+ * @param {ModdleElement} event
+ * @param {string} eventDefinitionType
+ *
+ * @return {boolean}
+ */
+function isTypedEvent(event, eventDefinitionType) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.some)(event.eventDefinitions, function(definition) {
+ return definition.$type === eventDefinitionType;
+ });
+}
+
+/**
+ * Check if element is a throw event.
+ *
+ * @param {ModdleElement} event
+ *
+ * @return {boolean}
+ */
+function isThrowEvent(event) {
+ return (event.$type === 'bpmn:IntermediateThrowEvent') || (event.$type === 'bpmn:EndEvent');
+}
- if (canBeHidden) {
- resource.isHidden = function() {
- return !options.hidden.apply(resource, arguments);
- };
- }
+/**
+ * Check if element is a throw event.
+ *
+ * @param {ModdleElement} element
+ *
+ * @return {boolean}
+ */
+function isCollection(element) {
+ var dataObject = element.dataObjectRef;
- resource.cssClasses = ['bpp-dropdown'];
+ return element.isCollection || (dataObject && dataObject.isCollection);
+}
- return resource;
- };
- module.exports = selectbox;
+// color access //////////////////////
- },{"../Utils":5,"./EntryFieldDescription":15,"lodash/forEach":613,"min-dom":647}],19:[function(require,module,exports){
- 'use strict';
+/**
+ * @param {Element} element
+ * @param {string} [defaultColor]
+ * @param {string} [overrideColor]
+ *
+ * @return {string}
+ */
+function getFillColor(element, defaultColor, overrideColor) {
+ var di = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getDi)(element);
- var escapeHTML = require('../Utils').escapeHTML;
+ return overrideColor || di.get('color:background-color') || di.get('bioc:fill') || defaultColor || white;
+}
- var cmdHelper = require('../helper/CmdHelper');
+/**
+ * @param {Element} element
+ * @param {string} [defaultColor]
+ * @param {string} [overrideColor]
+ *
+ * @return {string}
+ */
+function getStrokeColor(element, defaultColor, overrideColor) {
+ var di = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getDi)(element);
- var domQuery = require('min-dom').query,
- domAttr = require('min-dom').attr,
- domClosest = require('min-dom').closest;
+ return overrideColor || di.get('color:border-color') || di.get('bioc:stroke') || defaultColor || black;
+}
- var filter = require('lodash/filter'),
- forEach = require('lodash/forEach'),
- keys = require('lodash/keys');
+/**
+ * @param {Element} element
+ * @param {string} [defaultColor]
+ * @param {string} [defaultStrokeColor]
+ * @param {string} [overrideColor]
+ *
+ * @return {string}
+ */
+function getLabelColor(element, defaultColor, defaultStrokeColor, overrideColor) {
+ var di = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getDi)(element),
+ label = di.get('label');
- var domify = require('min-dom').domify;
+ return overrideColor || (label && label.get('color:color')) || defaultColor ||
+ getStrokeColor(element, defaultStrokeColor);
+}
- var entryFieldDescription = require('./EntryFieldDescription');
+// cropping path customizations //////////////////////
- var updateSelection = require('selection-update');
+/**
+ * @param {ShapeLike} shape
+ *
+ * @return {string} path
+ */
+function getCirclePath(shape) {
+
+ var cx = shape.x + shape.width / 2,
+ cy = shape.y + shape.height / 2,
+ radius = shape.width / 2;
+
+ var circlePath = [
+ [ 'M', cx, cy ],
+ [ 'm', 0, -radius ],
+ [ 'a', radius, radius, 0, 1, 1, 0, 2 * radius ],
+ [ 'a', radius, radius, 0, 1, 1, 0, -2 * radius ],
+ [ 'z' ]
+ ];
+
+ return (0,diagram_js_lib_util_RenderUtil__WEBPACK_IMPORTED_MODULE_2__.componentsToPath)(circlePath);
+}
+
+/**
+ * @param {ShapeLike} shape
+ * @param {number} [borderRadius]
+ *
+ * @return {string} path
+ */
+function getRoundRectPath(shape, borderRadius) {
+
+ var x = shape.x,
+ y = shape.y,
+ width = shape.width,
+ height = shape.height;
+
+ var roundRectPath = [
+ [ 'M', x + borderRadius, y ],
+ [ 'l', width - borderRadius * 2, 0 ],
+ [ 'a', borderRadius, borderRadius, 0, 0, 1, borderRadius, borderRadius ],
+ [ 'l', 0, height - borderRadius * 2 ],
+ [ 'a', borderRadius, borderRadius, 0, 0, 1, -borderRadius, borderRadius ],
+ [ 'l', borderRadius * 2 - width, 0 ],
+ [ 'a', borderRadius, borderRadius, 0, 0, 1, -borderRadius, -borderRadius ],
+ [ 'l', 0, borderRadius * 2 - height ],
+ [ 'a', borderRadius, borderRadius, 0, 0, 1, borderRadius, -borderRadius ],
+ [ 'z' ]
+ ];
+
+ return (0,diagram_js_lib_util_RenderUtil__WEBPACK_IMPORTED_MODULE_2__.componentsToPath)(roundRectPath);
+}
+
+/**
+ * @param {ShapeLike} shape
+ *
+ * @return {string} path
+ */
+function getDiamondPath(shape) {
+
+ var width = shape.width,
+ height = shape.height,
+ x = shape.x,
+ y = shape.y,
+ halfWidth = width / 2,
+ halfHeight = height / 2;
+
+ var diamondPath = [
+ [ 'M', x + halfWidth, y ],
+ [ 'l', halfWidth, halfHeight ],
+ [ 'l', -halfWidth, halfHeight ],
+ [ 'l', -halfWidth, -halfHeight ],
+ [ 'z' ]
+ ];
+
+ return (0,diagram_js_lib_util_RenderUtil__WEBPACK_IMPORTED_MODULE_2__.componentsToPath)(diamondPath);
+}
+
+/**
+ * @param {ShapeLike} shape
+ *
+ * @return {string} path
+ */
+function getRectPath(shape) {
+ var x = shape.x,
+ y = shape.y,
+ width = shape.width,
+ height = shape.height;
+
+ var rectPath = [
+ [ 'M', x, y ],
+ [ 'l', width, 0 ],
+ [ 'l', 0, height ],
+ [ 'l', -width, 0 ],
+ [ 'z' ]
+ ];
+
+ return (0,diagram_js_lib_util_RenderUtil__WEBPACK_IMPORTED_MODULE_2__.componentsToPath)(rectPath);
+}
+
+/**
+ * Get width and height from element or overrides.
+ *
+ * @param {Dimensions|Rect|ShapeLike} bounds
+ * @param {Object} overrides
+ *
+ * @returns {Dimensions}
+ */
+function getBounds(bounds, overrides = {}) {
+ return {
+ width: getWidth(bounds, overrides),
+ height: getHeight(bounds, overrides)
+ };
+}
+
+/**
+ * Get width from element or overrides.
+ *
+ * @param {Dimensions|Rect|ShapeLike} bounds
+ * @param {Object} overrides
+ *
+ * @returns {number}
+ */
+function getWidth(bounds, overrides = {}) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.has)(overrides, 'width') ? overrides.width : bounds.width;
+}
- var TABLE_ROW_DIV_SNIPPET = '';
- var DELETE_ROW_BUTTON_SNIPPET = '' +
- 'X ' +
- ' ';
+/**
+ * Get height from element or overrides.
+ *
+ * @param {Dimensions|Rect|ShapeLike} bounds
+ * @param {Object} overrides
+ *
+ * @returns {number}
+ */
+function getHeight(bounds, overrides = {}) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.has)(overrides, 'height') ? overrides.height : bounds.height;
+}
- function createInputRowTemplate(properties, canRemove) {
- var template = TABLE_ROW_DIV_SNIPPET;
- template += createInputTemplate(properties, canRemove);
- template += canRemove ? DELETE_ROW_BUTTON_SNIPPET : '';
- template += '
';
+/***/ }),
- return template;
- }
+/***/ "../node_modules/bpmn-js/lib/draw/BpmnRenderer.js":
+/*!********************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/draw/BpmnRenderer.js ***!
+ \********************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- function createInputTemplate(properties, canRemove) {
- var columns = properties.length;
- var template = '';
- forEach(properties, function(prop) {
- template += ' ';
- });
- return template;
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BpmnRenderer)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var diagram_js_lib_draw_BaseRenderer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/draw/BaseRenderer */ "../node_modules/diagram-js/lib/draw/BaseRenderer.js");
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
+/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../util/LabelUtil */ "../node_modules/bpmn-js/lib/util/LabelUtil.js");
+/* harmony import */ var _BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./BpmnRenderUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var diagram_js_lib_util_RenderUtil__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! diagram-js/lib/util/RenderUtil */ "../node_modules/diagram-js/lib/util/RenderUtil.js");
+/* harmony import */ var _BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BpmnRenderUtil */ "../node_modules/bpmn-js/lib/draw/BpmnRenderUtil.js");
+/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! min-dom */ "../node_modules/min-dom/dist/index.esm.js");
+/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tiny-svg */ "../node_modules/tiny-svg/dist/index.esm.js");
+/* harmony import */ var diagram_js_lib_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! diagram-js/lib/util/SvgTransformUtil */ "../node_modules/diagram-js/lib/util/SvgTransformUtil.js");
+/* harmony import */ var ids__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ids */ "../node_modules/ids/dist/index.esm.js");
- function createLabelRowTemplate(labels) {
- var template = TABLE_ROW_DIV_SNIPPET;
- template += createLabelTemplate(labels);
- template += '';
- return template;
- }
- function createLabelTemplate(labels) {
- var columns = labels.length;
- var template = '';
- forEach(labels, function(label) {
- template += '' + escapeHTML(label) + ' ';
- });
- return template;
- }
- function pick(elements, properties) {
- return (elements || []).map(function(elem) {
- var newElement = {};
- forEach(properties, function(prop) {
- newElement[prop] = elem[prop] || '';
- });
- return newElement;
- });
- }
- function diff(element, node, values, oldValues, editable) {
- return filter(values, function(value, idx) {
- return !valueEqual(element, node, value, oldValues[idx], editable, idx);
- });
- }
- function valueEqual(element, node, value, oldValue, editable, idx) {
- if (value && !oldValue) {
- return false;
- }
- var allKeys = keys(value).concat(keys(oldValue));
- return allKeys.every(function(key) {
- var n = value[key] || undefined;
- var o = oldValue[key] || undefined;
- return !editable(element, node, key, idx) || n === o;
- });
- }
- function getEntryNode(node) {
- return domClosest(node, '[data-entry]', true);
- }
- function getContainer(node) {
- return domQuery('div[data-list-entry-container]', node);
- }
- function getSelection(node) {
- return {
- start: node.selectionStart,
- end: node.selectionEnd
- };
- }
- function setSelection(node, selection) {
- node.selectionStart = selection.start;
- node.selectionEnd = selection.end;
- }
- /**
- * @param {Object} options
- * @param {string} options.id
- * @param {string} options.description
- * @param {Array} options.modelProperties
- * @param {Array} options.labels
- * @param {Function} options.getElements - this callback function must return a list of business object items
- * @param {Function} options.removeElement
- * @param {Function} options.addElement
- * @param {Function} options.updateElement
- * @param {Function} options.editable
- * @param {Function} options.setControlValue
- * @param {Function} options.show
- *
- * @return {Object}
- */
- module.exports = function(options) {
- var id = options.id,
- modelProperties = options.modelProperties,
- labels = options.labels,
- description = options.description;
- var labelRow = createLabelRowTemplate(labels);
- var getElements = options.getElements;
- var removeElement = options.removeElement,
- canRemove = typeof removeElement === 'function';
- var addElement = options.addElement,
- canAdd = typeof addElement === 'function',
- addLabel = options.addLabel || 'Add Value';
- var updateElement = options.updateElement,
- canUpdate = typeof updateElement === 'function';
- var editable = options.editable || function() { return true; },
- setControlValue = options.setControlValue;
- var show = options.show,
- canBeShown = typeof show === 'function';
- var elements = function(element, node) {
- return pick(getElements(element, node), modelProperties);
- };
- var factory = {
- id: id,
- html: (canAdd ?
- '' +
- '' + escapeHTML(addLabel) + ' ' +
- '+ ' +
- '
' : '') +
- '' +
- '
' +
- labelRow +
- '
' +
- '
' +
- '
' +
- '
' +
- // add description below table entry field
- (description ? entryFieldDescription(description) : ''),
- get: function(element, node) {
- var boElements = elements(element, node, this.__invalidValues);
- var invalidValues = this.__invalidValues;
- delete this.__invalidValues;
+var rendererIds = new ids__WEBPACK_IMPORTED_MODULE_0__["default"]();
- forEach(invalidValues, function(value, idx) {
- var element = boElements[idx];
+var ELEMENT_LABEL_DISTANCE = 10,
+ INNER_OUTER_DIST = 3,
+ PARTICIPANT_STROKE_WIDTH = 1.5,
+ TASK_BORDER_RADIUS = 10;
- forEach(modelProperties, function(prop) {
- element[prop] = value[prop];
- });
- });
+var DEFAULT_OPACITY = 0.95,
+ FULL_OPACITY = 1,
+ LOW_OPACITY = 0.25;
- return boElements;
- },
+/**
+ * @typedef { Partial<{
+ * defaultFillColor: string,
+ * defaultStrokeColor: string,
+ * defaultLabelColor: string
+ * }> } BpmnRendererConfig
+ *
+ * @typedef { Partial<{
+ * fill: string,
+ * stroke: string,
+ * width: string,
+ * height: string
+ * }> } Attrs
+ */
- set: function(element, values, node) {
- var action = this.__action || {};
- delete this.__action;
+/**
+ * @typedef { import('../model/Types').Element } Element
+ */
- if (action.id === 'delete-element') {
- return removeElement(element, node, action.idx);
- }
- else if (action.id === 'add-element') {
- return addElement(element, node);
- }
- else if (canUpdate) {
- var commands = [],
- valuesToValidate = values;
+/**
+ * A renderer for BPMN elements
+ *
+ * @param {BpmnRendererConfig} config
+ * @param {import('diagram-js/lib/core/EventBus').default} eventBus
+ * @param {import('diagram-js/lib/draw/Styles').default} styles
+ * @param {import('./PathMap').default} pathMap
+ * @param {import('diagram-js/lib/core/Canvas').default} canvas
+ * @param {import('./TextRenderer').default} textRenderer
+ * @param {number} [priority]
+ */
+function BpmnRenderer(
+ config, eventBus, styles, pathMap,
+ canvas, textRenderer, priority) {
+
+ diagram_js_lib_draw_BaseRenderer__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus, priority);
+
+ var defaultFillColor = config && config.defaultFillColor,
+ defaultStrokeColor = config && config.defaultStrokeColor,
+ defaultLabelColor = config && config.defaultLabelColor;
+
+ var rendererId = rendererIds.next();
+
+ var markers = {};
+
+ function shapeStyle(attrs) {
+ return styles.computeStyle(attrs, {
+ strokeLinecap: 'round',
+ strokeLinejoin: 'round',
+ stroke: _BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.black,
+ strokeWidth: 2,
+ fill: 'white'
+ });
+ }
+
+ function lineStyle(attrs) {
+ return styles.computeStyle(attrs, [ 'no-fill' ], {
+ strokeLinecap: 'round',
+ strokeLinejoin: 'round',
+ stroke: _BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.black,
+ strokeWidth: 2
+ });
+ }
+
+ function addMarker(id, options) {
+ var {
+ ref = { x: 0, y: 0 },
+ scale = 1,
+ element
+ } = options;
+
+ var marker = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.create)('marker', {
+ id: id,
+ viewBox: '0 0 20 20',
+ refX: ref.x,
+ refY: ref.y,
+ markerWidth: 20 * scale,
+ markerHeight: 20 * scale,
+ orient: 'auto'
+ });
+
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.append)(marker, element);
+
+ var defs = (0,min_dom__WEBPACK_IMPORTED_MODULE_4__.query)('defs', canvas._svg);
+
+ if (!defs) {
+ defs = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.create)('defs');
+
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.append)(canvas._svg, defs);
+ }
+
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.append)(defs, marker);
+
+ markers[id] = marker;
+ }
+
+ function colorEscape(str) {
+
+ // only allow characters and numbers
+ return str.replace(/[^0-9a-zA-Z]+/g, '_');
+ }
+
+ function marker(type, fill, stroke) {
+ var id = type + '-' + colorEscape(fill) + '-' + colorEscape(stroke) + '-' + rendererId;
+
+ if (!markers[id]) {
+ createMarker(id, type, fill, stroke);
+ }
+
+ return 'url(#' + id + ')';
+ }
+
+ function createMarker(id, type, fill, stroke) {
+
+ if (type === 'sequenceflow-end') {
+ var sequenceflowEnd = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.create)('path', {
+ d: 'M 1 5 L 11 10 L 1 15 Z',
+ ...shapeStyle({
+ fill: stroke,
+ stroke: stroke,
+ strokeWidth: 1
+ })
+ });
+
+ addMarker(id, {
+ element: sequenceflowEnd,
+ ref: { x: 11, y: 10 },
+ scale: 0.5
+ });
+ }
+
+ if (type === 'messageflow-start') {
+ var messageflowStart = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.create)('circle', {
+ cx: 6,
+ cy: 6,
+ r: 3.5,
+ ...shapeStyle({
+ fill,
+ stroke: stroke,
+ strokeWidth: 1,
+
+ // fix for safari / chrome / firefox bug not correctly
+ // resetting stroke dash array
+ strokeDasharray: [ 10000, 1 ]
+ })
+ });
+
+ addMarker(id, {
+ element: messageflowStart,
+ ref: { x: 6, y: 6 }
+ });
+ }
+
+ if (type === 'messageflow-end') {
+ var messageflowEnd = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.create)('path', {
+ d: 'm 1 5 l 0 -3 l 7 3 l -7 3 z',
+ ...shapeStyle({
+ fill,
+ stroke: stroke,
+ strokeWidth: 1,
+
+ // fix for safari / chrome / firefox bug not correctly
+ // resetting stroke dash array
+ strokeDasharray: [ 10000, 1 ]
+ })
+ });
+
+ addMarker(id, {
+ element: messageflowEnd,
+ ref: { x: 8.5, y: 5 }
+ });
+ }
+
+ if (type === 'association-start') {
+ var associationStart = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.create)('path', {
+ d: 'M 11 5 L 1 10 L 11 15',
+ ...lineStyle({
+ fill: 'none',
+ stroke,
+ strokeWidth: 1.5,
+
+ // fix for safari / chrome / firefox bug not correctly
+ // resetting stroke dash array
+ strokeDasharray: [ 10000, 1 ]
+ })
+ });
+
+ addMarker(id, {
+ element: associationStart,
+ ref: { x: 1, y: 10 },
+ scale: 0.5
+ });
+ }
+
+ if (type === 'association-end') {
+ var associationEnd = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.create)('path', {
+ d: 'M 1 5 L 11 10 L 1 15',
+ ...lineStyle({
+ fill: 'none',
+ stroke,
+ strokeWidth: 1.5,
+
+ // fix for safari / chrome / firefox bug not correctly
+ // resetting stroke dash array
+ strokeDasharray: [ 10000, 1 ]
+ })
+ });
+
+ addMarker(id, {
+ element: associationEnd,
+ ref: { x: 11, y: 10 },
+ scale: 0.5
+ });
+ }
+
+ if (type === 'conditional-flow-marker') {
+ var conditionalFlowMarker = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.create)('path', {
+ d: 'M 0 10 L 8 6 L 16 10 L 8 14 Z',
+ ...shapeStyle({
+ fill,
+ stroke: stroke
+ })
+ });
+
+ addMarker(id, {
+ element: conditionalFlowMarker,
+ ref: { x: -1, y: 10 },
+ scale: 0.5
+ });
+ }
+
+ if (type === 'conditional-default-flow-marker') {
+ var defaultFlowMarker = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.create)('path', {
+ d: 'M 6 4 L 10 16',
+ ...shapeStyle({
+ stroke: stroke
+ })
+ });
+
+ addMarker(id, {
+ element: defaultFlowMarker,
+ ref: { x: 0, y: 10 },
+ scale: 0.5
+ });
+ }
+ }
+
+ function drawCircle(parentGfx, width, height, offset, attrs = {}) {
+
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_5__.isObject)(offset)) {
+ attrs = offset;
+ offset = 0;
+ }
+
+ offset = offset || 0;
+
+ attrs = shapeStyle(attrs);
+
+ var cx = width / 2,
+ cy = height / 2;
+
+ var circle = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.create)('circle', {
+ cx: cx,
+ cy: cy,
+ r: Math.round((width + height) / 4 - offset),
+ ...attrs
+ });
+
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.append)(parentGfx, circle);
+
+ return circle;
+ }
+
+ function drawRect(parentGfx, width, height, r, offset, attrs) {
+
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_5__.isObject)(offset)) {
+ attrs = offset;
+ offset = 0;
+ }
+
+ offset = offset || 0;
+
+ attrs = shapeStyle(attrs);
+
+ var rect = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.create)('rect', {
+ x: offset,
+ y: offset,
+ width: width - offset * 2,
+ height: height - offset * 2,
+ rx: r,
+ ry: r,
+ ...attrs
+ });
+
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.append)(parentGfx, rect);
+
+ return rect;
+ }
+
+ function drawDiamond(parentGfx, width, height, attrs) {
+
+ var x_2 = width / 2;
+ var y_2 = height / 2;
+
+ var points = [
+ { x: x_2, y: 0 },
+ { x: width, y: y_2 },
+ { x: x_2, y: height },
+ { x: 0, y: y_2 }
+ ];
+
+ var pointsString = points.map(function(point) {
+ return point.x + ',' + point.y;
+ }).join(' ');
+
+ attrs = shapeStyle(attrs);
+
+ var polygon = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.create)('polygon', {
+ ...attrs,
+ points: pointsString
+ });
- if (typeof options.validate !== 'function') {
- valuesToValidate = diff(element, node, values, elements(element, node), editable);
- }
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.append)(parentGfx, polygon);
- var self = this;
+ return polygon;
+ }
- forEach(valuesToValidate, function(value) {
- var validationError,
- idx = values.indexOf(value);
+ /**
+ * @param {SVGElement} parentGfx
+ * @param {Point[]} waypoints
+ * @param {any} attrs
+ * @param {number} [radius]
+ *
+ * @return {SVGElement}
+ */
+ function drawLine(parentGfx, waypoints, attrs, radius) {
+ attrs = lineStyle(attrs);
- if (typeof options.validate === 'function') {
- validationError = options.validate(element, value, node, idx);
- }
+ var line = (0,diagram_js_lib_util_RenderUtil__WEBPACK_IMPORTED_MODULE_6__.createLine)(waypoints, attrs, radius);
- if (!validationError) {
- var cmd = updateElement(element, value, node, idx);
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.append)(parentGfx, line);
- if (cmd) {
- commands.push(cmd);
- }
- } else {
- // cache invalid value in an object by index as key
- self.__invalidValues = self.__invalidValues || {};
- self.__invalidValues[idx] = value;
+ return line;
+ }
- // execute a command, which does not do anything
- commands.push(cmdHelper.updateProperties(element, {}));
- }
- });
+ /**
+ * @param {SVGElement} parentGfx
+ * @param {Point[]} waypoints
+ * @param {any} attrs
+ *
+ * @return {SVGElement}
+ */
+ function drawConnectionSegments(parentGfx, waypoints, attrs) {
+ return drawLine(parentGfx, waypoints, attrs, 5);
+ }
+
+ function drawPath(parentGfx, d, attrs) {
+ attrs = lineStyle(attrs);
+
+ var path = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.create)('path', {
+ ...attrs,
+ d
+ });
+
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.append)(parentGfx, path);
+
+ return path;
+ }
+
+ function drawMarker(type, parentGfx, path, attrs) {
+ return drawPath(parentGfx, path, (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.assign)({ 'data-marker': type }, attrs));
+ }
+
+ function renderer(type) {
+ return handlers[type];
+ }
+
+ function as(type) {
+ return function(parentGfx, element, attrs) {
+ return renderer(type)(parentGfx, element, attrs);
+ };
+ }
+
+ var eventIconRenderers = {
+ 'bpmn:MessageEventDefinition': function(parentGfx, element, attrs = {}, isThrowing) {
+ var pathData = pathMap.getScaledPath('EVENT_MESSAGE', {
+ xScaleFactor: 0.9,
+ yScaleFactor: 0.9,
+ containerWidth: element.width,
+ containerHeight: element.height,
+ position: {
+ mx: 0.235,
+ my: 0.315
+ }
+ });
+
+ var fill = isThrowing
+ ? (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke)
+ : (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill);
+
+ var stroke = isThrowing
+ ? (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill)
+ : (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke);
+
+ var messagePath = drawPath(parentGfx, pathData, {
+ fill,
+ stroke,
+ strokeWidth: 1
+ });
+
+ return messagePath;
+ },
+ 'bpmn:TimerEventDefinition': function(parentGfx, element, attrs = {}) {
+ var circle = drawCircle(parentGfx, element.width, element.height, 0.2 * element.height, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 2
+ });
+
+ var pathData = pathMap.getScaledPath('EVENT_TIMER_WH', {
+ xScaleFactor: 0.75,
+ yScaleFactor: 0.75,
+ containerWidth: element.width,
+ containerHeight: element.height,
+ position: {
+ mx: 0.5,
+ my: 0.5
+ }
+ });
+
+ drawPath(parentGfx, pathData, {
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 2
+ });
+
+ for (var i = 0; i < 12; i++) {
+ var linePathData = pathMap.getScaledPath('EVENT_TIMER_LINE', {
+ xScaleFactor: 0.75,
+ yScaleFactor: 0.75,
+ containerWidth: element.width,
+ containerHeight: element.height,
+ position: {
+ mx: 0.5,
+ my: 0.5
+ }
+ });
- return commands;
- }
- },
- createListEntryTemplate: function(value, index, selectBox) {
- return createInputRowTemplate(modelProperties, canRemove);
- },
+ var width = element.width / 2,
+ height = element.height / 2;
- addElement: function(element, node, event, scopeNode) {
- var template = domify(createInputRowTemplate(modelProperties, canRemove));
+ drawPath(parentGfx, linePathData, {
+ strokeWidth: 1,
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ transform: 'rotate(' + (i * 30) + ',' + height + ',' + width + ')'
+ });
+ }
+
+ return circle;
+ },
+ 'bpmn:EscalationEventDefinition': function(parentGfx, event, attrs = {}, isThrowing) {
+ var pathData = pathMap.getScaledPath('EVENT_ESCALATION', {
+ xScaleFactor: 1,
+ yScaleFactor: 1,
+ containerWidth: event.width,
+ containerHeight: event.height,
+ position: {
+ mx: 0.5,
+ my: 0.2
+ }
+ });
+
+ var fill = isThrowing
+ ? (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(event, defaultStrokeColor, attrs.stroke)
+ : (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(event, defaultFillColor, attrs.fill);
+
+ return drawPath(parentGfx, pathData, {
+ fill,
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(event, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 1
+ });
+ },
+ 'bpmn:ConditionalEventDefinition': function(parentGfx, event, attrs = {}) {
+ var pathData = pathMap.getScaledPath('EVENT_CONDITIONAL', {
+ xScaleFactor: 1,
+ yScaleFactor: 1,
+ containerWidth: event.width,
+ containerHeight: event.height,
+ position: {
+ mx: 0.5,
+ my: 0.222
+ }
+ });
+
+ return drawPath(parentGfx, pathData, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(event, defaultFillColor, attrs.fill),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(event, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 1
+ });
+ },
+ 'bpmn:LinkEventDefinition': function(parentGfx, event, attrs = {}, isThrowing) {
+ var pathData = pathMap.getScaledPath('EVENT_LINK', {
+ xScaleFactor: 1,
+ yScaleFactor: 1,
+ containerWidth: event.width,
+ containerHeight: event.height,
+ position: {
+ mx: 0.57,
+ my: 0.263
+ }
+ });
+
+ var fill = isThrowing
+ ? (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(event, defaultStrokeColor, attrs.stroke)
+ : (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(event, defaultFillColor, attrs.fill);
+
+ return drawPath(parentGfx, pathData, {
+ fill,
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(event, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 1
+ });
+ },
+ 'bpmn:ErrorEventDefinition': function(parentGfx, event, attrs = {}, isThrowing) {
+ var pathData = pathMap.getScaledPath('EVENT_ERROR', {
+ xScaleFactor: 1.1,
+ yScaleFactor: 1.1,
+ containerWidth: event.width,
+ containerHeight: event.height,
+ position: {
+ mx: 0.2,
+ my: 0.722
+ }
+ });
+
+ var fill = isThrowing
+ ? (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(event, defaultStrokeColor, attrs.stroke)
+ : (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(event, defaultFillColor, attrs.fill);
+
+ return drawPath(parentGfx, pathData, {
+ fill,
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(event, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 1
+ });
+ },
+ 'bpmn:CancelEventDefinition': function(parentGfx, event, attrs = {}, isThrowing) {
+ var pathData = pathMap.getScaledPath('EVENT_CANCEL_45', {
+ xScaleFactor: 1.0,
+ yScaleFactor: 1.0,
+ containerWidth: event.width,
+ containerHeight: event.height,
+ position: {
+ mx: 0.638,
+ my: -0.055
+ }
+ });
+
+ var fill = isThrowing ? (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(event, defaultStrokeColor, attrs.stroke) : 'none';
+
+ var path = drawPath(parentGfx, pathData, {
+ fill,
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(event, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 1
+ });
+
+ (0,diagram_js_lib_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_7__.rotate)(path, 45);
+
+ return path;
+ },
+ 'bpmn:CompensateEventDefinition': function(parentGfx, event, attrs = {}, isThrowing) {
+ var pathData = pathMap.getScaledPath('EVENT_COMPENSATION', {
+ xScaleFactor: 1,
+ yScaleFactor: 1,
+ containerWidth: event.width,
+ containerHeight: event.height,
+ position: {
+ mx: 0.22,
+ my: 0.5
+ }
+ });
+
+ var fill = isThrowing
+ ? (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(event, defaultStrokeColor, attrs.stroke)
+ : (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(event, defaultFillColor, attrs.fill);
+
+ return drawPath(parentGfx, pathData, {
+ fill,
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(event, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 1
+ });
+ },
+ 'bpmn:SignalEventDefinition': function(parentGfx, event, attrs = {}, isThrowing) {
+ var pathData = pathMap.getScaledPath('EVENT_SIGNAL', {
+ xScaleFactor: 0.9,
+ yScaleFactor: 0.9,
+ containerWidth: event.width,
+ containerHeight: event.height,
+ position: {
+ mx: 0.5,
+ my: 0.2
+ }
+ });
+
+ var fill = isThrowing
+ ? (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(event, defaultStrokeColor, attrs.stroke)
+ : (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(event, defaultFillColor, attrs.fill);
+
+ return drawPath(parentGfx, pathData, {
+ strokeWidth: 1,
+ fill,
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(event, defaultStrokeColor, attrs.stroke)
+ });
+ },
+ 'bpmn:MultipleEventDefinition': function(parentGfx, event, attrs = {}, isThrowing) {
+ var pathData = pathMap.getScaledPath('EVENT_MULTIPLE', {
+ xScaleFactor: 1.1,
+ yScaleFactor: 1.1,
+ containerWidth: event.width,
+ containerHeight: event.height,
+ position: {
+ mx: 0.222,
+ my: 0.36
+ }
+ });
+
+ var fill = isThrowing
+ ? (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(event, defaultStrokeColor, attrs.stroke)
+ : (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(event, defaultFillColor, attrs.fill);
+
+ return drawPath(parentGfx, pathData, {
+ fill,
+ strokeWidth: 1
+ });
+ },
+ 'bpmn:ParallelMultipleEventDefinition': function(parentGfx, event, attrs = {}) {
+ var pathData = pathMap.getScaledPath('EVENT_PARALLEL_MULTIPLE', {
+ xScaleFactor: 1.2,
+ yScaleFactor: 1.2,
+ containerWidth: event.width,
+ containerHeight: event.height,
+ position: {
+ mx: 0.458,
+ my: 0.194
+ }
+ });
+
+ return drawPath(parentGfx, pathData, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(event, defaultFillColor, attrs.fill),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(event, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 1
+ });
+ },
+ 'bpmn:TerminateEventDefinition': function(parentGfx, element, attrs = {}) {
+ var circle = drawCircle(parentGfx, element.width, element.height, 8, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 4
+ });
+
+ return circle;
+ }
+ };
+
+ function renderEventIcon(element, parentGfx, attrs = {}) {
+ var semantic = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.getBusinessObject)(element),
+ isThrowing = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.isThrowEvent)(semantic);
+
+ if (semantic.get('eventDefinitions') && semantic.get('eventDefinitions').length > 1) {
+ if (semantic.get('parallelMultiple')) {
+ return eventIconRenderers[ 'bpmn:ParallelMultipleEventDefinition' ](parentGfx, element, attrs, isThrowing);
+ }
+ else {
+ return eventIconRenderers[ 'bpmn:MultipleEventDefinition' ](parentGfx, element, attrs, isThrowing);
+ }
+ }
+
+ if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.isTypedEvent)(semantic, 'bpmn:MessageEventDefinition')) {
+ return eventIconRenderers[ 'bpmn:MessageEventDefinition' ](parentGfx, element, attrs, isThrowing);
+ }
+
+ if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.isTypedEvent)(semantic, 'bpmn:TimerEventDefinition')) {
+ return eventIconRenderers[ 'bpmn:TimerEventDefinition' ](parentGfx, element, attrs, isThrowing);
+ }
+
+ if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.isTypedEvent)(semantic, 'bpmn:ConditionalEventDefinition')) {
+ return eventIconRenderers[ 'bpmn:ConditionalEventDefinition' ](parentGfx, element, attrs, isThrowing);
+ }
+
+ if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.isTypedEvent)(semantic, 'bpmn:SignalEventDefinition')) {
+ return eventIconRenderers[ 'bpmn:SignalEventDefinition' ](parentGfx, element, attrs, isThrowing);
+ }
+
+ if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.isTypedEvent)(semantic, 'bpmn:EscalationEventDefinition')) {
+ return eventIconRenderers[ 'bpmn:EscalationEventDefinition' ](parentGfx, element, attrs, isThrowing);
+ }
+
+ if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.isTypedEvent)(semantic, 'bpmn:LinkEventDefinition')) {
+ return eventIconRenderers[ 'bpmn:LinkEventDefinition' ](parentGfx, element, attrs, isThrowing);
+ }
+
+ if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.isTypedEvent)(semantic, 'bpmn:ErrorEventDefinition')) {
+ return eventIconRenderers[ 'bpmn:ErrorEventDefinition' ](parentGfx, element, attrs, isThrowing);
+ }
+
+ if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.isTypedEvent)(semantic, 'bpmn:CancelEventDefinition')) {
+ return eventIconRenderers[ 'bpmn:CancelEventDefinition' ](parentGfx, element, attrs, isThrowing);
+ }
+
+ if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.isTypedEvent)(semantic, 'bpmn:CompensateEventDefinition')) {
+ return eventIconRenderers[ 'bpmn:CompensateEventDefinition' ](parentGfx, element, attrs, isThrowing);
+ }
+
+ if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.isTypedEvent)(semantic, 'bpmn:TerminateEventDefinition')) {
+ return eventIconRenderers[ 'bpmn:TerminateEventDefinition' ](parentGfx, element, attrs, isThrowing);
+ }
+
+ return null;
+ }
+
+ var taskMarkerRenderers = {
+ 'ParticipantMultiplicityMarker': function(parentGfx, element, attrs = {}) {
+ var width = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getWidth)(element, attrs),
+ height = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getHeight)(element, attrs);
+
+ var markerPath = pathMap.getScaledPath('MARKER_PARALLEL', {
+ xScaleFactor: 1,
+ yScaleFactor: 1,
+ containerWidth: width,
+ containerHeight: height,
+ position: {
+ mx: ((width / 2 - 6) / width),
+ my: (height - 15) / height
+ }
+ });
+
+ drawMarker('participant-multiplicity', parentGfx, markerPath, {
+ strokeWidth: 2,
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke)
+ });
+ },
+ 'SubProcessMarker': function(parentGfx, element, attrs = {}) {
+ var markerRect = drawRect(parentGfx, 14, 14, 0, {
+ strokeWidth: 1,
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke)
+ });
+
+ (0,diagram_js_lib_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_7__.translate)(markerRect, element.width / 2 - 7.5, element.height - 20);
+
+ var markerPath = pathMap.getScaledPath('MARKER_SUB_PROCESS', {
+ xScaleFactor: 1.5,
+ yScaleFactor: 1.5,
+ containerWidth: element.width,
+ containerHeight: element.height,
+ position: {
+ mx: (element.width / 2 - 7.5) / element.width,
+ my: (element.height - 20) / element.height
+ }
+ });
+
+ drawMarker('sub-process', parentGfx, markerPath, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke)
+ });
+ },
+ 'ParallelMarker': function(parentGfx, element, attrs) {
+ var width = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getWidth)(element, attrs),
+ height = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getHeight)(element, attrs);
+
+ var markerPath = pathMap.getScaledPath('MARKER_PARALLEL', {
+ xScaleFactor: 1,
+ yScaleFactor: 1,
+ containerWidth: width,
+ containerHeight: height,
+ position: {
+ mx: ((width / 2 + attrs.parallel) / width),
+ my: (height - 20) / height
+ }
+ });
+
+ drawMarker('parallel', parentGfx, markerPath, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke)
+ });
+ },
+ 'SequentialMarker': function(parentGfx, element, attrs) {
+ var markerPath = pathMap.getScaledPath('MARKER_SEQUENTIAL', {
+ xScaleFactor: 1,
+ yScaleFactor: 1,
+ containerWidth: element.width,
+ containerHeight: element.height,
+ position: {
+ mx: ((element.width / 2 + attrs.seq) / element.width),
+ my: (element.height - 19) / element.height
+ }
+ });
+
+ drawMarker('sequential', parentGfx, markerPath, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke)
+ });
+ },
+ 'CompensationMarker': function(parentGfx, element, attrs) {
+ var markerMath = pathMap.getScaledPath('MARKER_COMPENSATION', {
+ xScaleFactor: 1,
+ yScaleFactor: 1,
+ containerWidth: element.width,
+ containerHeight: element.height,
+ position: {
+ mx: ((element.width / 2 + attrs.compensation) / element.width),
+ my: (element.height - 13) / element.height
+ }
+ });
+
+ drawMarker('compensation', parentGfx, markerMath, {
+ strokeWidth: 1,
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke)
+ });
+ },
+ 'LoopMarker': function(parentGfx, element, attrs) {
+ var width = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getWidth)(element, attrs),
+ height = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getHeight)(element, attrs);
+
+ var markerPath = pathMap.getScaledPath('MARKER_LOOP', {
+ xScaleFactor: 1,
+ yScaleFactor: 1,
+ containerWidth: width,
+ containerHeight: height,
+ position: {
+ mx: ((width / 2 + attrs.loop) / width),
+ my: (height - 7) / height
+ }
+ });
+
+ drawMarker('loop', parentGfx, markerPath, {
+ strokeWidth: 1.5,
+ fill: 'none',
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeMiterlimit: 0.5
+ });
+ },
+ 'AdhocMarker': function(parentGfx, element, attrs) {
+ var width = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getWidth)(element, attrs),
+ height = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getHeight)(element, attrs);
+
+ var markerPath = pathMap.getScaledPath('MARKER_ADHOC', {
+ xScaleFactor: 1,
+ yScaleFactor: 1,
+ containerWidth: width,
+ containerHeight: height,
+ position: {
+ mx: ((width / 2 + attrs.adhoc) / width),
+ my: (height - 15) / height
+ }
+ });
+
+ drawMarker('adhoc', parentGfx, markerPath, {
+ strokeWidth: 1,
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke)
+ });
+ }
+ };
+
+ function renderTaskMarker(type, parentGfx, element, attrs) {
+ taskMarkerRenderers[ type ](parentGfx, element, attrs);
+ }
+
+ function renderTaskMarkers(parentGfx, element, taskMarkers, attrs = {}) {
+ attrs = {
+ fill: attrs.fill,
+ stroke: attrs.stroke,
+ width: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getWidth)(element, attrs),
+ height: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getHeight)(element, attrs)
+ };
+
+ var semantic = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.getBusinessObject)(element);
+
+ var subprocess = taskMarkers && taskMarkers.includes('SubProcessMarker');
+
+ if (subprocess) {
+ attrs = {
+ ...attrs,
+ seq: -21,
+ parallel: -22,
+ compensation: -42,
+ loop: -18,
+ adhoc: 10
+ };
+ } else {
+ attrs = {
+ ...attrs,
+ seq: -5,
+ parallel: -6,
+ compensation: -27,
+ loop: 0,
+ adhoc: 10
+ };
+ }
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.forEach)(taskMarkers, function(marker) {
+ renderTaskMarker(marker, parentGfx, element, attrs);
+ });
+
+ if (semantic.get('isForCompensation')) {
+ renderTaskMarker('CompensationMarker', parentGfx, element, attrs);
+ }
+
+ if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.is)(semantic, 'bpmn:AdHocSubProcess')) {
+ renderTaskMarker('AdhocMarker', parentGfx, element, attrs);
+ }
+
+ var loopCharacteristics = semantic.get('loopCharacteristics'),
+ isSequential = loopCharacteristics && loopCharacteristics.get('isSequential');
+
+ if (loopCharacteristics) {
+
+ if (isSequential === undefined) {
+ renderTaskMarker('LoopMarker', parentGfx, element, attrs);
+ }
+
+ if (isSequential === false) {
+ renderTaskMarker('ParallelMarker', parentGfx, element, attrs);
+ }
+
+ if (isSequential === true) {
+ renderTaskMarker('SequentialMarker', parentGfx, element, attrs);
+ }
+ }
+ }
+
+ function renderLabel(parentGfx, label, attrs = {}) {
+ attrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.assign)({
+ size: {
+ width: 100
+ }
+ }, attrs);
+
+ var text = textRenderer.createText(label || '', attrs);
+
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.classes)(text).add('djs-label');
+
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.append)(parentGfx, text);
+
+ return text;
+ }
+
+ function renderEmbeddedLabel(parentGfx, element, align, attrs = {}) {
+ var semantic = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.getBusinessObject)(element);
+
+ var box = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getBounds)({
+ x: element.x,
+ y: element.y,
+ width: element.width,
+ height: element.height
+ }, attrs);
+
+ return renderLabel(parentGfx, semantic.name, {
+ align,
+ box,
+ padding: 7,
+ style: {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getLabelColor)(element, defaultLabelColor, defaultStrokeColor, attrs.stroke)
+ }
+ });
+ }
+
+ function renderExternalLabel(parentGfx, element, attrs = {}) {
+ var box = {
+ width: 90,
+ height: 30,
+ x: element.width / 2 + element.x,
+ y: element.height / 2 + element.y
+ };
+
+ return renderLabel(parentGfx, (0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_9__.getLabel)(element), {
+ box: box,
+ fitBox: true,
+ style: (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.assign)(
+ {},
+ textRenderer.getExternalStyle(),
+ {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getLabelColor)(element, defaultLabelColor, defaultStrokeColor, attrs.stroke)
+ }
+ )
+ });
+ }
+
+ function renderLaneLabel(parentGfx, text, element, attrs = {}) {
+ var isHorizontalLane = (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_10__.isHorizontal)(element);
+
+ var textBox = renderLabel(parentGfx, text, {
+ box: {
+ height: 30,
+ width: isHorizontalLane ? (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getHeight)(element, attrs) : (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getWidth)(element, attrs),
+ },
+ align: 'center-middle',
+ style: {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getLabelColor)(element, defaultLabelColor, defaultStrokeColor, attrs.stroke)
+ }
+ });
+
+ if (isHorizontalLane) {
+ var top = -1 * (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getHeight)(element, attrs);
+ (0,diagram_js_lib_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_7__.transform)(textBox, 0, -top, 270);
+ }
+ }
+
+ function renderActivity(parentGfx, element, attrs = {}) {
+ var {
+ width,
+ height
+ } = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getBounds)(element, attrs);
+
+ return drawRect(parentGfx, width, height, TASK_BORDER_RADIUS, {
+ ...attrs,
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ fillOpacity: DEFAULT_OPACITY,
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke)
+ });
+ }
+
+ function renderAssociation(parentGfx, element, attrs = {}) {
+ var semantic = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.getBusinessObject)(element);
+
+ var fill = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ stroke = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke);
+
+ if (semantic.get('associationDirection') === 'One' ||
+ semantic.get('associationDirection') === 'Both') {
+ attrs.markerEnd = marker('association-end', fill, stroke);
+ }
+
+ if (semantic.get('associationDirection') === 'Both') {
+ attrs.markerStart = marker('association-start', fill, stroke);
+ }
+
+ attrs = pickAttrs(attrs, [
+ 'markerStart',
+ 'markerEnd'
+ ]);
+
+ return drawConnectionSegments(parentGfx, element.waypoints, {
+ ...attrs,
+ stroke,
+ strokeDasharray: '0, 5'
+ });
+ }
+
+ function renderDataObject(parentGfx, element, attrs = {}) {
+ var fill = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ stroke = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke);
+
+ var pathData = pathMap.getScaledPath('DATA_OBJECT_PATH', {
+ xScaleFactor: 1,
+ yScaleFactor: 1,
+ containerWidth: element.width,
+ containerHeight: element.height,
+ position: {
+ mx: 0.474,
+ my: 0.296
+ }
+ });
+
+ var dataObject = drawPath(parentGfx, pathData, {
+ fill,
+ fillOpacity: DEFAULT_OPACITY,
+ stroke
+ });
+
+ var semantic = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.getBusinessObject)(element);
+
+ if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.isCollection)(semantic)) {
+ var collectionPathData = pathMap.getScaledPath('DATA_OBJECT_COLLECTION_PATH', {
+ xScaleFactor: 1,
+ yScaleFactor: 1,
+ containerWidth: element.width,
+ containerHeight: element.height,
+ position: {
+ mx: 0.33,
+ my: (element.height - 18) / element.height
+ }
+ });
+
+ drawPath(parentGfx, collectionPathData, {
+ strokeWidth: 2,
+ fill,
+ stroke
+ });
+ }
+
+ return dataObject;
+ }
+
+ function renderEvent(parentGfx, element, attrs = {}) {
+ return drawCircle(parentGfx, element.width, element.height, {
+ fillOpacity: DEFAULT_OPACITY,
+ ...attrs,
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke)
+ });
+ }
+
+ function renderGateway(parentGfx, element, attrs = {}) {
+ return drawDiamond(parentGfx, element.width, element.height, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ fillOpacity: DEFAULT_OPACITY,
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke)
+ });
+ }
+
+ function renderLane(parentGfx, element, attrs = {}) {
+ var lane = drawRect(parentGfx, (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getWidth)(element, attrs), (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getHeight)(element, attrs), 0, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ fillOpacity: attrs.fillOpacity || DEFAULT_OPACITY,
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 1.5
+ });
+
+ var semantic = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.getBusinessObject)(element);
+
+ if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.is)(semantic, 'bpmn:Lane')) {
+ var text = semantic.get('name');
+
+ renderLaneLabel(parentGfx, text, element, attrs);
+ }
+
+ return lane;
+ }
+
+ function renderSubProcess(parentGfx, element, attrs = {}) {
+ var activity = renderActivity(parentGfx, element, attrs);
+
+ if ((0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_10__.isEventSubProcess)(element)) {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.attr)(activity, {
+ strokeDasharray: '0, 5.5',
+ strokeWidth: 2.5
+ });
+ }
+
+ var expanded = (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_10__.isExpanded)(element);
+
+ renderEmbeddedLabel(parentGfx, element, expanded ? 'center-top' : 'center-middle', attrs);
+
+ if (expanded) {
+ renderTaskMarkers(parentGfx, element, undefined, attrs);
+ } else {
+ renderTaskMarkers(parentGfx, element, [ 'SubProcessMarker' ], attrs);
+ }
+
+ return activity;
+ }
+
+ function renderTask(parentGfx, element, attrs = {}) {
+ var activity = renderActivity(parentGfx, element, attrs);
+
+ renderEmbeddedLabel(parentGfx, element, 'center-middle', attrs);
+
+ renderTaskMarkers(parentGfx, element, undefined, attrs);
+
+ return activity;
+ }
+
+ var handlers = this.handlers = {
+ 'bpmn:AdHocSubProcess': function(parentGfx, element, attrs = {}) {
+ if ((0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_10__.isExpanded)(element)) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke',
+ 'width',
+ 'height'
+ ]);
+ } else {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+ }
+
+ return renderSubProcess(parentGfx, element, attrs);
+ },
+ 'bpmn:Association': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ return renderAssociation(parentGfx, element, attrs);
+ },
+ 'bpmn:BoundaryEvent': function(parentGfx, element, attrs = {}) {
+ var { renderIcon = true } = attrs;
+
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ var semantic = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.getBusinessObject)(element),
+ cancelActivity = semantic.get('cancelActivity');
+
+ attrs = {
+ strokeWidth: 1.5,
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ fillOpacity: FULL_OPACITY,
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke)
+ };
+
+ if (!cancelActivity) {
+ attrs.strokeDasharray = '6';
+ }
+
+ var event = renderEvent(parentGfx, element, attrs);
+
+ drawCircle(parentGfx, element.width, element.height, INNER_OUTER_DIST, {
+ ...attrs,
+ fill: 'none'
+ });
+
+ if (renderIcon) {
+ renderEventIcon(element, parentGfx, attrs);
+ }
+
+ return event;
+ },
+ 'bpmn:BusinessRuleTask': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ var task = renderTask(parentGfx, element, attrs);
+
+ var headerData = pathMap.getScaledPath('TASK_TYPE_BUSINESS_RULE_MAIN', {
+ abspos: {
+ x: 8,
+ y: 8
+ }
+ });
+
+ var businessPath = drawPath(parentGfx, headerData);
+
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.attr)(businessPath, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 1
+ });
+
+ var headerPathData = pathMap.getScaledPath('TASK_TYPE_BUSINESS_RULE_HEADER', {
+ abspos: {
+ x: 8,
+ y: 8
+ }
+ });
+
+ var businessHeaderPath = drawPath(parentGfx, headerPathData);
+
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.attr)(businessHeaderPath, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 1
+ });
+
+ return task;
+ },
+ 'bpmn:CallActivity': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ return renderSubProcess(parentGfx, element, {
+ strokeWidth: 5,
+ ...attrs
+ });
+ },
+ 'bpmn:ComplexGateway': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ var gateway = renderGateway(parentGfx, element, attrs);
+
+ var pathData = pathMap.getScaledPath('GATEWAY_COMPLEX', {
+ xScaleFactor: 0.5,
+ yScaleFactor:0.5,
+ containerWidth: element.width,
+ containerHeight: element.height,
+ position: {
+ mx: 0.46,
+ my: 0.26
+ }
+ });
+
+ drawPath(parentGfx, pathData, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 1
+ });
+
+ return gateway;
+ },
+ 'bpmn:DataInput': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ var arrowPathData = pathMap.getRawPath('DATA_ARROW');
+
+ var dataObject = renderDataObject(parentGfx, element, attrs);
+
+ drawPath(parentGfx, arrowPathData, {
+ fill: 'none',
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 1
+ });
+
+ return dataObject;
+ },
+ 'bpmn:DataInputAssociation': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ return renderAssociation(parentGfx, element, {
+ ...attrs,
+ markerEnd: marker('association-end', (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill), (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke))
+ });
+ },
+ 'bpmn:DataObject': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ return renderDataObject(parentGfx, element, attrs);
+ },
+ 'bpmn:DataObjectReference': as('bpmn:DataObject'),
+ 'bpmn:DataOutput': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ var arrowPathData = pathMap.getRawPath('DATA_ARROW');
+
+ var dataObject = renderDataObject(parentGfx, element, attrs);
+
+ drawPath(parentGfx, arrowPathData, {
+ strokeWidth: 1,
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke)
+ });
+
+ return dataObject;
+ },
+ 'bpmn:DataOutputAssociation': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ return renderAssociation(parentGfx, element, {
+ ...attrs,
+ markerEnd: marker('association-end', (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill), (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke))
+ });
+ },
+ 'bpmn:DataStoreReference': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ var dataStorePath = pathMap.getScaledPath('DATA_STORE', {
+ xScaleFactor: 1,
+ yScaleFactor: 1,
+ containerWidth: element.width,
+ containerHeight: element.height,
+ position: {
+ mx: 0,
+ my: 0.133
+ }
+ });
+
+ return drawPath(parentGfx, dataStorePath, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ fillOpacity: DEFAULT_OPACITY,
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 2
+ });
+ },
+ 'bpmn:EndEvent': function(parentGfx, element, attrs = {}) {
+ var { renderIcon = true } = attrs;
+
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ var event = renderEvent(parentGfx, element, {
+ ...attrs,
+ strokeWidth: 4
+ });
+
+ if (renderIcon) {
+ renderEventIcon(element, parentGfx, attrs);
+ }
+
+ return event;
+ },
+ 'bpmn:EventBasedGateway': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ var semantic = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.getBusinessObject)(element);
+
+ var diamond = renderGateway(parentGfx, element, attrs);
+
+ drawCircle(parentGfx, element.width, element.height, element.height * 0.20, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, 'none', attrs.fill),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 1
+ });
+
+ var type = semantic.get('eventGatewayType'),
+ instantiate = !!semantic.get('instantiate');
+
+ function drawEvent() {
+
+ var pathData = pathMap.getScaledPath('GATEWAY_EVENT_BASED', {
+ xScaleFactor: 0.18,
+ yScaleFactor: 0.18,
+ containerWidth: element.width,
+ containerHeight: element.height,
+ position: {
+ mx: 0.36,
+ my: 0.44
+ }
+ });
- var container = getContainer(node);
- container.appendChild(template);
+ drawPath(parentGfx, pathData, {
+ fill: 'none',
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 2
+ });
+ }
+
+ if (type === 'Parallel') {
+ var pathData = pathMap.getScaledPath('GATEWAY_PARALLEL', {
+ xScaleFactor: 0.4,
+ yScaleFactor: 0.4,
+ containerWidth: element.width,
+ containerHeight: element.height,
+ position: {
+ mx: 0.474,
+ my: 0.296
+ }
+ });
- this.__action = {
- id: 'add-element'
- };
+ drawPath(parentGfx, pathData, {
+ fill: 'none',
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 1
+ });
+ } else if (type === 'Exclusive') {
+ if (!instantiate) {
+ drawCircle(parentGfx, element.width, element.height, element.height * 0.26, {
+ fill: 'none',
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 1
+ });
+ }
+
+ drawEvent();
+ }
+
+
+ return diamond;
+ },
+ 'bpmn:ExclusiveGateway': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ var gateway = renderGateway(parentGfx, element, attrs);
+
+ var pathData = pathMap.getScaledPath('GATEWAY_EXCLUSIVE', {
+ xScaleFactor: 0.4,
+ yScaleFactor: 0.4,
+ containerWidth: element.width,
+ containerHeight: element.height,
+ position: {
+ mx: 0.32,
+ my: 0.3
+ }
+ });
+
+ var di = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.getDi)(element);
+
+ if (di.get('isMarkerVisible')) {
+ drawPath(parentGfx, pathData, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 1
+ });
+ }
+
+ return gateway;
+ },
+ 'bpmn:Gateway': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ return renderGateway(parentGfx, element, attrs);
+ },
+ 'bpmn:Group': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke',
+ 'width',
+ 'height'
+ ]);
+
+ return drawRect(parentGfx, element.width, element.height, TASK_BORDER_RADIUS, {
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 1.5,
+ strokeDasharray: '10, 6, 0, 6',
+ fill: 'none',
+ pointerEvents: 'none',
+ width: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getWidth)(element, attrs),
+ height: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getHeight)(element, attrs)
+ });
+ },
+ 'bpmn:InclusiveGateway': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ var gateway = renderGateway(parentGfx, element, attrs);
+
+ drawCircle(parentGfx, element.width, element.height, element.height * 0.24, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 2.5
+ });
+
+ return gateway;
+ },
+ 'bpmn:IntermediateEvent': function(parentGfx, element, attrs = {}) {
+ var { renderIcon = true } = attrs;
+
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ var outer = renderEvent(parentGfx, element, {
+ ...attrs,
+ strokeWidth: 1.5
+ });
+
+ drawCircle(parentGfx, element.width, element.height, INNER_OUTER_DIST, {
+ fill: 'none',
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 1.5
+ });
+
+ if (renderIcon) {
+ renderEventIcon(element, parentGfx, attrs);
+ }
+
+ return outer;
+ },
+ 'bpmn:IntermediateCatchEvent': as('bpmn:IntermediateEvent'),
+ 'bpmn:IntermediateThrowEvent': as('bpmn:IntermediateEvent'),
+ 'bpmn:Lane': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke',
+ 'width',
+ 'height'
+ ]);
+
+ return renderLane(parentGfx, element, {
+ ...attrs,
+ fillOpacity: LOW_OPACITY
+ });
+ },
+ 'bpmn:ManualTask': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ var task = renderTask(parentGfx, element, attrs);
+
+ var pathData = pathMap.getScaledPath('TASK_TYPE_MANUAL', {
+ abspos: {
+ x: 17,
+ y: 15
+ }
+ });
+
+ drawPath(parentGfx, pathData, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 0.5
+ });
+
+ return task;
+ },
+ 'bpmn:MessageFlow': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ var semantic = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.getBusinessObject)(element),
+ di = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.getDi)(element);
+
+ var fill = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ stroke = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke);
+
+ var path = drawConnectionSegments(parentGfx, element.waypoints, {
+ markerEnd: marker('messageflow-end', fill, stroke),
+ markerStart: marker('messageflow-start', fill, stroke),
+ stroke,
+ strokeDasharray: '10, 11',
+ strokeWidth: 1.5
+ });
+
+ if (semantic.get('messageRef')) {
+ var midPoint = path.getPointAtLength(path.getTotalLength() / 2);
+
+ var markerPathData = pathMap.getScaledPath('MESSAGE_FLOW_MARKER', {
+ abspos: {
+ x: midPoint.x,
+ y: midPoint.y
+ }
+ });
- return true;
- },
+ var messageAttrs = {
+ strokeWidth: 1
+ };
- deleteElement: function(element, node, event, scopeNode) {
- var container = getContainer(node);
- var rowToDelete = event.delegateTarget.parentNode;
- var idx = parseInt(domAttr(rowToDelete, 'data-index'), 10);
+ if (di.get('messageVisibleKind') === 'initiating') {
+ messageAttrs.fill = fill;
+ messageAttrs.stroke = stroke;
+ } else {
+ messageAttrs.fill = stroke;
+ messageAttrs.stroke = fill;
+ }
- container.removeChild(rowToDelete);
+ var message = drawPath(parentGfx, markerPathData, messageAttrs);
- this.__action = {
- id: 'delete-element',
- idx: idx
- };
+ var messageRef = semantic.get('messageRef'),
+ name = messageRef.get('name');
- return true;
- },
+ var label = renderLabel(parentGfx, name, {
+ align: 'center-top',
+ fitBox: true,
+ style: {
+ fill: stroke
+ }
+ });
- editable: function(element, rowNode, input, prop, value, idx) {
- var entryNode = domClosest(rowNode, '[data-entry]');
- return editable(element, entryNode, prop, idx);
- },
+ var messageBounds = message.getBBox(),
+ labelBounds = label.getBBox();
+
+ var translateX = midPoint.x - labelBounds.width / 2,
+ translateY = midPoint.y + messageBounds.height / 2 + ELEMENT_LABEL_DISTANCE;
+
+ (0,diagram_js_lib_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_7__.transform)(label, translateX, translateY, 0);
+ }
+
+ return path;
+ },
+ 'bpmn:ParallelGateway': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ var diamond = renderGateway(parentGfx, element, attrs);
+
+ var pathData = pathMap.getScaledPath('GATEWAY_PARALLEL', {
+ xScaleFactor: 0.6,
+ yScaleFactor: 0.6,
+ containerWidth: element.width,
+ containerHeight: element.height,
+ position: {
+ mx: 0.46,
+ my: 0.2
+ }
+ });
+
+ drawPath(parentGfx, pathData, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 1
+ });
+
+ return diamond;
+ },
+ 'bpmn:Participant': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke',
+ 'width',
+ 'height'
+ ]);
+
+ var participant = renderLane(parentGfx, element, attrs);
+
+ var expandedParticipant = (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_10__.isExpanded)(element);
+ var horizontalParticipant = (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_10__.isHorizontal)(element);
+
+ var semantic = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.getBusinessObject)(element),
+ name = semantic.get('name');
+
+ if (expandedParticipant) {
+ var waypoints = horizontalParticipant ? [
+ {
+ x: 30,
+ y: 0
+ },
+ {
+ x: 30,
+ y: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getHeight)(element, attrs)
+ }
+ ] : [
+ {
+ x: 0,
+ y: 30
+ },
+ {
+ x: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getWidth)(element, attrs),
+ y: 30
+ }
+ ];
- show: function(element, entryNode, node, scopeNode) {
- entryNode = getEntryNode(entryNode);
- return show(element, entryNode, node, scopeNode);
- },
+ drawLine(parentGfx, waypoints, {
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: PARTICIPANT_STROKE_WIDTH
+ });
- showTable: function(element, entryNode, node, scopeNode) {
- entryNode = getEntryNode(entryNode);
- var elems = elements(element, entryNode);
- return elems && elems.length && (!canBeShown || show(element, entryNode, node, scopeNode));
- },
+ renderLaneLabel(parentGfx, name, element, attrs);
+ } else {
+ var bounds = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getBounds)(element, attrs);
- validateListItem: function(element, value, node, idx) {
- if (typeof options.validate === 'function') {
- return options.validate(element, value, node, idx);
- }
- }
+ if (!horizontalParticipant) {
+ bounds.height = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getWidth)(element, attrs);
+ bounds.width = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getHeight)(element, attrs);
+ }
- };
+ var textBox = renderLabel(parentGfx, name, {
+ box: bounds,
+ align: 'center-middle',
+ style: {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getLabelColor)(element, defaultLabelColor, defaultStrokeColor, attrs.stroke)
+ }
+ });
- // Update/set the selection on the correct position.
- // It's the same code like for an input value in the PropertiesPanel.js.
- if (setControlValue) {
- factory.setControlValue = function(element, rowNode, input, prop, value, idx) {
- var entryNode = getEntryNode(rowNode);
+ if (!horizontalParticipant) {
+ var top = -1 * (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getHeight)(element, attrs);
+ (0,diagram_js_lib_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_7__.transform)(textBox, 0, -top, 270);
+ }
+ }
- var isReadOnly = domAttr(input, 'readonly');
- var oldValue = input.value;
+ if (semantic.get('participantMultiplicity')) {
+ renderTaskMarker('ParticipantMultiplicityMarker', parentGfx, element, attrs);
+ }
- var selection;
+ return participant;
+ },
+ 'bpmn:ReceiveTask' : function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
- // prevents input fields from having the value 'undefined'
- if (value === undefined) {
- value = '';
- }
+ var semantic = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.getBusinessObject)(element);
- // when the attribute 'readonly' exists, ignore the comparison
- // with 'oldValue' and 'value'
- if (!!isReadOnly && oldValue === value) {
- return;
- }
+ var task = renderTask(parentGfx, element, attrs);
- // update selection on undo/redo
- if (document.activeElement === input) {
- selection = updateSelection(getSelection(input), oldValue, value);
- }
+ var pathData;
- setControlValue(element, entryNode, input, prop, value, idx);
+ if (semantic.get('instantiate')) {
+ drawCircle(parentGfx, 28, 28, 20 * 0.22, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 1
+ });
- if (selection) {
- setSelection(input, selection);
- }
+ pathData = pathMap.getScaledPath('TASK_TYPE_INSTANTIATING_SEND', {
+ abspos: {
+ x: 7.77,
+ y: 9.52
+ }
+ });
+ } else {
+ pathData = pathMap.getScaledPath('TASK_TYPE_SEND', {
+ xScaleFactor: 0.9,
+ yScaleFactor: 0.9,
+ containerWidth: 21,
+ containerHeight: 14,
+ position: {
+ mx: 0.3,
+ my: 0.4
+ }
+ });
+ }
+
+ drawPath(parentGfx, pathData, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 1
+ });
+
+ return task;
+ },
+ 'bpmn:ScriptTask': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ var task = renderTask(parentGfx, element, attrs);
+
+ var pathData = pathMap.getScaledPath('TASK_TYPE_SCRIPT', {
+ abspos: {
+ x: 15,
+ y: 20
+ }
+ });
+
+ drawPath(parentGfx, pathData, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 1
+ });
+
+ return task;
+ },
+ 'bpmn:SendTask': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ var task = renderTask(parentGfx, element, attrs);
+
+ var pathData = pathMap.getScaledPath('TASK_TYPE_SEND', {
+ xScaleFactor: 1,
+ yScaleFactor: 1,
+ containerWidth: 21,
+ containerHeight: 14,
+ position: {
+ mx: 0.285,
+ my: 0.357
+ }
+ });
+
+ drawPath(parentGfx, pathData, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ strokeWidth: 1
+ });
+
+ return task;
+ },
+ 'bpmn:SequenceFlow': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ var fill = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ stroke = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke);
+
+ var connection = drawConnectionSegments(parentGfx, element.waypoints, {
+ markerEnd: marker('sequenceflow-end', fill, stroke),
+ stroke
+ });
+
+ var semantic = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.getBusinessObject)(element);
+
+ var { source } = element;
+
+ if (source) {
+ var sourceSemantic = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.getBusinessObject)(source);
+
+ // conditional flow marker
+ if (semantic.get('conditionExpression') && (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.is)(sourceSemantic, 'bpmn:Activity')) {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.attr)(connection, {
+ markerStart: marker('conditional-flow-marker', fill, stroke)
+ });
+ }
+
+ // default marker
+ if (sourceSemantic.get('default') && ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.is)(sourceSemantic, 'bpmn:Gateway') || (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.is)(sourceSemantic, 'bpmn:Activity')) &&
+ sourceSemantic.get('default') === semantic) {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.attr)(connection, {
+ markerStart: marker('conditional-default-flow-marker', fill, stroke)
+ });
+ }
+ }
+
+ return connection;
+ },
+ 'bpmn:ServiceTask': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ var task = renderTask(parentGfx, element, attrs);
+
+ drawCircle(parentGfx, 10, 10, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ stroke: 'none',
+ transform: 'translate(6, 6)'
+ });
+
+ var pathDataService1 = pathMap.getScaledPath('TASK_TYPE_SERVICE', {
+ abspos: {
+ x: 12,
+ y: 18
+ }
+ });
+
+ drawPath(parentGfx, pathDataService1, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 1
+ });
+
+ drawCircle(parentGfx, 10, 10, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ stroke: 'none',
+ transform: 'translate(11, 10)'
+ });
+
+ var pathDataService2 = pathMap.getScaledPath('TASK_TYPE_SERVICE', {
+ abspos: {
+ x: 17,
+ y: 22
+ }
+ });
+
+ drawPath(parentGfx, pathDataService2, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 1
+ });
+
+ return task;
+ },
+ 'bpmn:StartEvent': function(parentGfx, element, attrs = {}) {
+ var { renderIcon = true } = attrs;
+
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ var semantic = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.getBusinessObject)(element);
+
+ if (!semantic.get('isInterrupting')) {
+ attrs = {
+ ...attrs,
+ strokeDasharray: '6'
+ };
+ }
+
+ var event = renderEvent(parentGfx, element, attrs);
+
+ if (renderIcon) {
+ renderEventIcon(element, parentGfx, attrs);
+ }
+
+ return event;
+ },
+ 'bpmn:SubProcess': function(parentGfx, element, attrs = {}) {
+ if ((0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_10__.isExpanded)(element)) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke',
+ 'width',
+ 'height'
+ ]);
+ } else {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+ }
+
+ return renderSubProcess(parentGfx, element, attrs);
+ },
+ 'bpmn:Task': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ return renderTask(parentGfx, element, attrs);
+ },
+ 'bpmn:TextAnnotation': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke',
+ 'width',
+ 'height'
+ ]);
+
+ var {
+ width,
+ height
+ } = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getBounds)(element, attrs);
+
+ var textElement = drawRect(parentGfx, width, height, 0, 0, {
+ fill: 'none',
+ stroke: 'none'
+ });
+
+ var textPathData = pathMap.getScaledPath('TEXT_ANNOTATION', {
+ xScaleFactor: 1,
+ yScaleFactor: 1,
+ containerWidth: width,
+ containerHeight: height,
+ position: {
+ mx: 0.0,
+ my: 0.0
+ }
+ });
+
+ drawPath(parentGfx, textPathData, {
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke)
+ });
+
+ var semantic = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.getBusinessObject)(element),
+ text = semantic.get('text') || '';
+
+ renderLabel(parentGfx, text, {
+ align: 'left-top',
+ box: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getBounds)(element, attrs),
+ padding: 7,
+ style: {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getLabelColor)(element, defaultLabelColor, defaultStrokeColor, attrs.stroke)
+ }
+ });
+
+ return textElement;
+ },
+ 'bpmn:Transaction': function(parentGfx, element, attrs = {}) {
+ if ((0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_10__.isExpanded)(element)) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke',
+ 'width',
+ 'height'
+ ]);
+ } else {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+ }
+
+ var outer = renderSubProcess(parentGfx, element, {
+ strokeWidth: 1.5,
+ ...attrs
+ });
+
+ var innerAttrs = styles.style([ 'no-fill', 'no-events' ], {
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 1.5
+ });
+
+ var expanded = (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_10__.isExpanded)(element);
+
+ if (!expanded) {
+ attrs = {};
+ }
+
+ drawRect(
+ parentGfx,
+ (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getWidth)(element, attrs),
+ (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getHeight)(element, attrs),
+ TASK_BORDER_RADIUS - INNER_OUTER_DIST,
+ INNER_OUTER_DIST,
+ innerAttrs
+ );
+
+ return outer;
+ },
+ 'bpmn:UserTask': function(parentGfx, element, attrs = {}) {
+ attrs = pickAttrs(attrs, [
+ 'fill',
+ 'stroke'
+ ]);
+
+ var task = renderTask(parentGfx, element, attrs);
+
+ var x = 15;
+ var y = 12;
+
+ var pathDataUser1 = pathMap.getScaledPath('TASK_TYPE_USER_1', {
+ abspos: {
+ x: x,
+ y: y
+ }
+ });
+
+ drawPath(parentGfx, pathDataUser1, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 0.5
+ });
+
+ var pathDataUser2 = pathMap.getScaledPath('TASK_TYPE_USER_2', {
+ abspos: {
+ x: x,
+ y: y
+ }
+ });
+
+ drawPath(parentGfx, pathDataUser2, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getFillColor)(element, defaultFillColor, attrs.fill),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 0.5
+ });
+
+ var pathDataUser3 = pathMap.getScaledPath('TASK_TYPE_USER_3', {
+ abspos: {
+ x: x,
+ y: y
+ }
+ });
+
+ drawPath(parentGfx, pathDataUser3, {
+ fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getStrokeColor)(element, defaultStrokeColor, attrs.stroke),
+ strokeWidth: 0.5
+ });
+
+ return task;
+ },
+ 'label': function(parentGfx, element, attrs = {}) {
+ return renderExternalLabel(parentGfx, element, attrs);
+ }
+ };
+
+ // extension API, use at your own risk
+ this._drawPath = drawPath;
+
+ this._renderer = renderer;
+}
+
+
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_11__["default"])(BpmnRenderer, diagram_js_lib_draw_BaseRenderer__WEBPACK_IMPORTED_MODULE_1__["default"]);
+
+BpmnRenderer.$inject = [
+ 'config.bpmnRenderer',
+ 'eventBus',
+ 'styles',
+ 'pathMap',
+ 'canvas',
+ 'textRenderer'
+];
+
+
+/**
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+BpmnRenderer.prototype.canRender = function(element) {
+ return (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.is)(element, 'bpmn:BaseElement');
+};
- };
- }
+/**
+ * Draw shape into parentGfx.
+ *
+ * @param {SVGElement} parentGfx
+ * @param {Element} element
+ * @param {Attrs} [attrs]
+ *
+ * @return {SVGElement} mainGfx
+ */
+BpmnRenderer.prototype.drawShape = function(parentGfx, element, attrs = {}) {
+ var { type } = element;
- return factory;
+ var handler = this._renderer(type);
- };
+ return handler(parentGfx, element, attrs);
+};
- },{"../Utils":5,"../helper/CmdHelper":25,"./EntryFieldDescription":15,"lodash/filter":609,"lodash/forEach":613,"lodash/keys":630,"min-dom":647,"selection-update":657}],20:[function(require,module,exports){
- 'use strict';
+/**
+ * Draw connection into parentGfx.
+ *
+ * @param {SVGElement} parentGfx
+ * @param {Element} element
+ * @param {Attrs} [attrs]
+ *
+ * @return {SVGElement} mainGfx
+ */
+BpmnRenderer.prototype.drawConnection = function(parentGfx, element, attrs = {}) {
+ var { type } = element;
- var escapeHTML = require('../Utils').escapeHTML;
+ var handler = this._renderer(type);
- var entryFieldDescription = require('./EntryFieldDescription');
+ return handler(parentGfx, element, attrs);
+};
+/**
+ * Get shape path.
+ *
+ * @param {Element} element
+ *
+ * @return {string} path
+ */
+BpmnRenderer.prototype.getShapePath = function(element) {
+ if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.is)(element, 'bpmn:Event')) {
+ return (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getCirclePath)(element);
+ }
- var textBox = function(options, defaultParameters) {
+ if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.is)(element, 'bpmn:Activity')) {
+ return (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getRoundRectPath)(element, TASK_BORDER_RADIUS);
+ }
- var resource = defaultParameters,
- label = options.label || resource.id,
- canBeShown = !!options.show && typeof options.show === 'function',
- description = options.description;
+ if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_8__.is)(element, 'bpmn:Gateway')) {
+ return (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getDiamondPath)(element);
+ }
- resource.html =
- '' + label + ' ' +
- '';
+ return (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_2__.getRectPath)(element);
+};
- // add description below text box entry field
- if (description) {
- resource.html += entryFieldDescription(description);
- }
+/**
+ * Pick attributes if they exist.
+ *
+ * @param {Object} attrs
+ * @param {string[]} keys
+ *
+ * @returns {Object}
+ */
+function pickAttrs(attrs, keys = []) {
+ return keys.reduce((pickedAttrs, key) => {
+ if (attrs[ key ]) {
+ pickedAttrs[ key ] = attrs[ key ];
+ }
+
+ return pickedAttrs;
+ }, {});
+}
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/draw/PathMap.js":
+/*!***************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/draw/PathMap.js ***!
+ \***************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ PathMap)
+/* harmony export */ });
+/**
+ * Map containing SVG paths needed by BpmnRenderer
+ */
+function PathMap() {
- if (canBeShown) {
- resource.isShown = function() {
- return options.show.apply(resource, arguments);
- };
- }
+ /**
+ * Contains a map of path elements
+ *
+ * Path definition
+ * A parameterized path is defined like this:
+ *
+ * 'GATEWAY_PARALLEL': {
+ * d: 'm {mx},{my} {e.x0},0 0,{e.x1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} ' +
+ '-{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z',
+ * height: 17.5,
+ * width: 17.5,
+ * heightElements: [2.5, 7.5],
+ * widthElements: [2.5, 7.5]
+ * }
+ *
+ * It's important to specify a correct height and width for the path as the scaling
+ * is based on the ratio between the specified height and width in this object and the
+ * height and width that is set as scale target (Note x,y coordinates will be scaled with
+ * individual ratios).
+ * The 'heightElements ' and 'widthElements ' array must contain the values that will be scaled.
+ * The scaling is based on the computed ratios.
+ * Coordinates on the y axis should be in the heightElement 's array, they will be scaled using
+ * the computed ratio coefficient.
+ * In the parameterized path the scaled values can be accessed through the 'e' object in {} brackets.
+ *
+ * The values for the y axis can be accessed in the path string using {e.y0}, {e.y1}, ....
+ * The values for the x axis can be accessed in the path string using {e.x0}, {e.x1}, ....
+ *
+ * The numbers x0, x1 respectively y0, y1, ... map to the corresponding array index.
+ *
+ */
+ this.pathMap = {
+ 'EVENT_MESSAGE': {
+ d: 'm {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}',
+ height: 36,
+ width: 36,
+ heightElements: [ 6, 14 ],
+ widthElements: [ 10.5, 21 ]
+ },
+ 'EVENT_SIGNAL': {
+ d: 'M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z',
+ height: 36,
+ width: 36,
+ heightElements: [ 18 ],
+ widthElements: [ 10, 20 ]
+ },
+ 'EVENT_ESCALATION': {
+ d: 'M {mx},{my} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z',
+ height: 36,
+ width: 36,
+ heightElements: [ 20, 7 ],
+ widthElements: [ 8 ]
+ },
+ 'EVENT_CONDITIONAL': {
+ d: 'M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z ' +
+ 'M {e.x2},{e.y3} l {e.x0},0 ' +
+ 'M {e.x2},{e.y4} l {e.x0},0 ' +
+ 'M {e.x2},{e.y5} l {e.x0},0 ' +
+ 'M {e.x2},{e.y6} l {e.x0},0 ' +
+ 'M {e.x2},{e.y7} l {e.x0},0 ' +
+ 'M {e.x2},{e.y8} l {e.x0},0 ',
+ height: 36,
+ width: 36,
+ heightElements: [ 8.5, 14.5, 18, 11.5, 14.5, 17.5, 20.5, 23.5, 26.5 ],
+ widthElements: [ 10.5, 14.5, 12.5 ]
+ },
+ 'EVENT_LINK': {
+ d: 'm {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z',
+ height: 36,
+ width: 36,
+ heightElements: [ 4.4375, 6.75, 7.8125 ],
+ widthElements: [ 9.84375, 13.5 ]
+ },
+ 'EVENT_ERROR': {
+ d: 'm {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z',
+ height: 36,
+ width: 36,
+ heightElements: [ 0.023, 8.737, 8.151, 16.564, 10.591, 8.714 ],
+ widthElements: [ 0.085, 6.672, 6.97, 4.273, 5.337, 6.636 ]
+ },
+ 'EVENT_CANCEL_45': {
+ d: 'm {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 ' +
+ '0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z',
+ height: 36,
+ width: 36,
+ heightElements: [ 4.75, 8.5 ],
+ widthElements: [ 4.75, 8.5 ]
+ },
+ 'EVENT_COMPENSATION': {
+ d: 'm {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z',
+ height: 36,
+ width: 36,
+ heightElements: [ 6.5, 13, 0.4, 6.1 ],
+ widthElements: [ 9, 9.3, 8.7 ]
+ },
+ 'EVENT_TIMER_WH': {
+ d: 'M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ',
+ height: 36,
+ width: 36,
+ heightElements: [ 10, 2 ],
+ widthElements: [ 3, 7 ]
+ },
+ 'EVENT_TIMER_LINE': {
+ d: 'M {mx},{my} ' +
+ 'm {e.x0},{e.y0} l -{e.x1},{e.y1} ',
+ height: 36,
+ width: 36,
+ heightElements: [ 10, 3 ],
+ widthElements: [ 0, 0 ]
+ },
+ 'EVENT_MULTIPLE': {
+ d:'m {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z',
+ height: 36,
+ width: 36,
+ heightElements: [ 6.28099, 12.56199 ],
+ widthElements: [ 3.1405, 9.42149, 12.56198 ]
+ },
+ 'EVENT_PARALLEL_MULTIPLE': {
+ d:'m {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} ' +
+ '-{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z',
+ height: 36,
+ width: 36,
+ heightElements: [ 2.56228, 7.68683 ],
+ widthElements: [ 2.56228, 7.68683 ]
+ },
+ 'GATEWAY_EXCLUSIVE': {
+ d:'m {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} ' +
+ '{e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} ' +
+ '{e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z',
+ height: 17.5,
+ width: 17.5,
+ heightElements: [ 8.5, 6.5312, -6.5312, -8.5 ],
+ widthElements: [ 6.5, -6.5, 3, -3, 5, -5 ]
+ },
+ 'GATEWAY_PARALLEL': {
+ d:'m {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 ' +
+ '0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z',
+ height: 30,
+ width: 30,
+ heightElements: [ 5, 12.5 ],
+ widthElements: [ 5, 12.5 ]
+ },
+ 'GATEWAY_EVENT_BASED': {
+ d:'m {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z',
+ height: 11,
+ width: 11,
+ heightElements: [ -6, 6, 12, -12 ],
+ widthElements: [ 9, -3, -12 ]
+ },
+ 'GATEWAY_COMPLEX': {
+ d:'m {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} ' +
+ '{e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} ' +
+ '{e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} ' +
+ '-{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z',
+ height: 17.125,
+ width: 17.125,
+ heightElements: [ 4.875, 3.4375, 2.125, 3 ],
+ widthElements: [ 3.4375, 2.125, 4.875, 3 ]
+ },
+ 'DATA_OBJECT_PATH': {
+ d:'m 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0',
+ height: 61,
+ width: 51,
+ heightElements: [ 10, 50, 60 ],
+ widthElements: [ 10, 40, 50, 60 ]
+ },
+ 'DATA_OBJECT_COLLECTION_PATH': {
+ d: 'm{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10',
+ height: 10,
+ width: 10,
+ heightElements: [],
+ widthElements: []
+ },
+ 'DATA_ARROW': {
+ d:'m 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z',
+ height: 61,
+ width: 51,
+ heightElements: [],
+ widthElements: []
+ },
+ 'DATA_STORE': {
+ d:'m {mx},{my} ' +
+ 'l 0,{e.y2} ' +
+ 'c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 ' +
+ 'l 0,-{e.y2} ' +
+ 'c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0' +
+ 'c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 ' +
+ 'm -{e.x2},{e.y0}' +
+ 'c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0' +
+ 'm -{e.x2},{e.y0}' +
+ 'c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0',
+ height: 61,
+ width: 61,
+ heightElements: [ 7, 10, 45 ],
+ widthElements: [ 2, 58, 60 ]
+ },
+ 'TEXT_ANNOTATION': {
+ d: 'm {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0',
+ height: 30,
+ width: 10,
+ heightElements: [ 30 ],
+ widthElements: [ 10 ]
+ },
+ 'MARKER_SUB_PROCESS': {
+ d: 'm{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0',
+ height: 10,
+ width: 10,
+ heightElements: [],
+ widthElements: []
+ },
+ 'MARKER_PARALLEL': {
+ d: 'm{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10',
+ height: 10,
+ width: 10,
+ heightElements: [],
+ widthElements: []
+ },
+ 'MARKER_SEQUENTIAL': {
+ d: 'm{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0',
+ height: 10,
+ width: 10,
+ heightElements: [],
+ widthElements: []
+ },
+ 'MARKER_COMPENSATION': {
+ d: 'm {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z',
+ height: 10,
+ width: 21,
+ heightElements: [],
+ widthElements: []
+ },
+ 'MARKER_LOOP': {
+ d: 'm {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 ' +
+ '-6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 ' +
+ '0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 ' +
+ 'l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902',
+ height: 13.9,
+ width: 13.7,
+ heightElements: [],
+ widthElements: []
+ },
+ 'MARKER_ADHOC': {
+ d: 'm {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 ' +
+ '3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 ' +
+ '1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 ' +
+ '-3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 ' +
+ '-2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z',
+ height: 4,
+ width: 15,
+ heightElements: [],
+ widthElements: []
+ },
+ 'TASK_TYPE_SEND': {
+ d: 'm {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}',
+ height: 14,
+ width: 21,
+ heightElements: [ 6, 14 ],
+ widthElements: [ 10.5, 21 ]
+ },
+ 'TASK_TYPE_SCRIPT': {
+ d: 'm {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 ' +
+ 'c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z ' +
+ 'm -7,-12 l 5,0 ' +
+ 'm -4.5,3 l 4.5,0 ' +
+ 'm -3,3 l 5,0' +
+ 'm -4,3 l 5,0',
+ height: 15,
+ width: 12.6,
+ heightElements: [ 6, 14 ],
+ widthElements: [ 10.5, 21 ]
+ },
+ 'TASK_TYPE_USER_1': {
+ d: 'm {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 ' +
+ '-4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 ' +
+ '0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 ' +
+ 'h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 z' +
+ 'm -8,6 l 0,5.5 m 11,0 l 0,-5'
+ },
+ 'TASK_TYPE_USER_2': {
+ d: 'm {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 ' +
+ '-2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 '
+ },
+ 'TASK_TYPE_USER_3': {
+ d: 'm {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 ' +
+ '4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 ' +
+ '-4.20799998,3.36699999 -4.20699998,4.34799999 z'
+ },
+ 'TASK_TYPE_MANUAL': {
+ d: 'm {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 ' +
+ '-0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 ' +
+ '0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 ' +
+ '-1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 ' +
+ '0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 ' +
+ '-10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 ' +
+ '2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 ' +
+ '-0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 ' +
+ '-1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 ' +
+ '-0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 ' +
+ '0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 ' +
+ '-5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z'
+ },
+ 'TASK_TYPE_INSTANTIATING_SEND': {
+ d: 'm {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6'
+ },
+ 'TASK_TYPE_SERVICE': {
+ d: 'm {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 ' +
+ '0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 ' +
+ '-1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 ' +
+ 'v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 ' +
+ '-0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 ' +
+ '-1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 ' +
+ 'h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.14437 ' +
+ '-0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 ' +
+ 'c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 ' +
+ 'l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 ' +
+ '0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 ' +
+ 'c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z ' +
+ 'm 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 ' +
+ '0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 ' +
+ '0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z'
+ },
+ 'TASK_TYPE_SERVICE_FILL': {
+ d: 'm {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 ' +
+ '0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 ' +
+ '0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z'
+ },
+ 'TASK_TYPE_BUSINESS_RULE_HEADER': {
+ d: 'm {mx},{my} 0,4 20,0 0,-4 z'
+ },
+ 'TASK_TYPE_BUSINESS_RULE_MAIN': {
+ d: 'm {mx},{my} 0,12 20,0 0,-12 z' +
+ 'm 0,8 l 20,0 ' +
+ 'm -13,-4 l 0,8'
+ },
+ 'MESSAGE_FLOW_MARKER': {
+ d: 'm {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6'
+ }
+ };
+
+ /**
+ * Return raw path for the given ID.
+ *
+ * @param {string} pathId
+ *
+ * @return {string} raw path
+ */
+ this.getRawPath = function getRawPath(pathId) {
+ return this.pathMap[pathId].d;
+ };
+
+ /**
+ * Scales the path to the given height and width.
+ * Use case
+ * Use case is to scale the content of elements (event, gateways) based
+ * on the element bounding box's size.
+ *
+ * Why not transform
+ * Scaling a path with transform() will also scale the stroke and IE does not support
+ * the option 'non-scaling-stroke' to prevent this.
+ * Also there are use cases where only some parts of a path should be
+ * scaled.
+ *
+ * @param {string} pathId The ID of the path.
+ * @param {Object} param
+ * Example param object scales the path to 60% size of the container (data.width, data.height).
+ *
+ * {
+ * xScaleFactor: 0.6,
+ * yScaleFactor:0.6,
+ * containerWidth: data.width,
+ * containerHeight: data.height,
+ * position: {
+ * mx: 0.46,
+ * my: 0.2,
+ * }
+ * }
+ *
+ *
+ * targetpathwidth = xScaleFactor * containerWidth
+ * targetpathheight = yScaleFactor * containerHeight
+ * Position is used to set the starting coordinate of the path. M is computed:
+ *
+ * position.x * containerWidth
+ * position.y * containerHeight
+ *
+ * Center of the container position: {
+ * mx: 0.5,
+ * my: 0.5,
+ * }
+ * Upper left corner of the container
+ * position: {
+ * mx: 0.0,
+ * my: 0.0,
+ * }
+ *
+ *
+ *
+ *
+ * @return {string} scaled path
+ */
+ this.getScaledPath = function getScaledPath(pathId, param) {
+ var rawPath = this.pathMap[pathId];
+
+ // positioning
+ // compute the start point of the path
+ var mx, my;
+
+ if (param.abspos) {
+ mx = param.abspos.x;
+ my = param.abspos.y;
+ } else {
+ mx = param.containerWidth * param.position.mx;
+ my = param.containerHeight * param.position.my;
+ }
+
+ var coordinates = {}; // map for the scaled coordinates
+ if (param.position) {
+
+ // path
+ var heightRatio = (param.containerHeight / rawPath.height) * param.yScaleFactor;
+ var widthRatio = (param.containerWidth / rawPath.width) * param.xScaleFactor;
+
+
+ // Apply height ratio
+ for (var heightIndex = 0; heightIndex < rawPath.heightElements.length; heightIndex++) {
+ coordinates['y' + heightIndex] = rawPath.heightElements[heightIndex] * heightRatio;
+ }
+
+ // Apply width ratio
+ for (var widthIndex = 0; widthIndex < rawPath.widthElements.length; widthIndex++) {
+ coordinates['x' + widthIndex] = rawPath.widthElements[widthIndex] * widthRatio;
+ }
+ }
+
+ // Apply value to raw path
+ var path = format(
+ rawPath.d, {
+ mx: mx,
+ my: my,
+ e: coordinates
+ }
+ );
+ return path;
+ };
+}
+
+// helpers //////////////////////
+
+// copied and adjusted from https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js
+var tokenRegex = /\{([^{}]+)\}/g,
+ objNotationRegex = /(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g; // matches .xxxxx or ["xxxxx"] to run over object properties
+
+function replacer(all, key, obj) {
+ var res = obj;
+ key.replace(objNotationRegex, function(all, name, quote, quotedName, isFunc) {
+ name = name || quotedName;
+ if (res) {
+ if (name in res) {
+ res = res[name];
+ }
+ typeof res == 'function' && isFunc && (res = res());
+ }
+ });
+ res = (res == null || res == obj ? all : res) + '';
+
+ return res;
+}
+
+function format(str, obj) {
+ return String(str).replace(tokenRegex, function(all, key) {
+ return replacer(all, key, obj);
+ });
+}
+
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/draw/TextRenderer.js":
+/*!********************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/draw/TextRenderer.js ***!
+ \********************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ TextRenderer)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var diagram_js_lib_util_Text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/util/Text */ "../node_modules/diagram-js/lib/util/Text.js");
+
+
+
+
+var DEFAULT_FONT_SIZE = 12;
+var LINE_HEIGHT_RATIO = 1.2;
+
+var MIN_TEXT_ANNOTATION_HEIGHT = 30;
+
+/**
+ * @typedef { {
+ * fontFamily: string;
+ * fontSize: number;
+ * fontWeight: string;
+ * lineHeight: number;
+ * } } TextRendererStyle
+ *
+ * @typedef { {
+ * defaultStyle?: Partial;
+ * externalStyle?: Partial;
+ * } } TextRendererConfig
+ *
+ * @typedef { import('diagram-js/lib/util/Text').TextLayoutConfig } TextLayoutConfig
+ *
+ * @typedef { import('diagram-js/lib/util/Types').Rect } Rect
+ */
- resource.cssClasses = ['bpp-textbox'];
- return resource;
- };
+/**
+ * Renders text and computes text bounding boxes.
+ *
+ * @param {TextRendererConfig} [config]
+ */
+function TextRenderer(config) {
- module.exports = textBox;
+ var defaultStyle = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({
+ fontFamily: 'Arial, sans-serif',
+ fontSize: DEFAULT_FONT_SIZE,
+ fontWeight: 'normal',
+ lineHeight: LINE_HEIGHT_RATIO
+ }, config && config.defaultStyle || {});
- },{"../Utils":5,"./EntryFieldDescription":15}],21:[function(require,module,exports){
- 'use strict';
+ var fontSize = parseInt(defaultStyle.fontSize, 10) - 1;
- var escapeHTML = require('../Utils').escapeHTML;
+ var externalStyle = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, defaultStyle, {
+ fontSize: fontSize
+ }, config && config.externalStyle || {});
- var domQuery = require('min-dom').query;
+ var textUtil = new diagram_js_lib_util_Text__WEBPACK_IMPORTED_MODULE_1__["default"]({
+ style: defaultStyle
+ });
- var entryFieldDescription = require('./EntryFieldDescription');
+ /**
+ * Get the new bounds of an externally rendered,
+ * layouted label.
+ *
+ * @param {Rect} bounds
+ * @param {string} text
+ *
+ * @return {Rect}
+ */
+ this.getExternalLabelBounds = function(bounds, text) {
+
+ var layoutedDimensions = textUtil.getDimensions(text, {
+ box: {
+ width: 90,
+ height: 30
+ },
+ style: externalStyle
+ });
+
+ // resize label shape to fit label text
+ return {
+ x: Math.round(bounds.x + bounds.width / 2 - layoutedDimensions.width / 2),
+ y: Math.round(bounds.y),
+ width: Math.ceil(layoutedDimensions.width),
+ height: Math.ceil(layoutedDimensions.height)
+ };
+
+ };
+
+ /**
+ * Get the new bounds of text annotation.
+ *
+ * @param {Rect} bounds
+ * @param {string} text
+ *
+ * @return {Rect}
+ */
+ this.getTextAnnotationBounds = function(bounds, text) {
+
+ var layoutedDimensions = textUtil.getDimensions(text, {
+ box: bounds,
+ style: defaultStyle,
+ align: 'left-top',
+ padding: 5
+ });
+
+ return {
+ x: bounds.x,
+ y: bounds.y,
+ width: bounds.width,
+ height: Math.max(MIN_TEXT_ANNOTATION_HEIGHT, Math.round(layoutedDimensions.height))
+ };
+ };
+
+ /**
+ * Create a layouted text element.
+ *
+ * @param {string} text
+ * @param {TextLayoutConfig} [options]
+ *
+ * @return {SVGElement} rendered text
+ */
+ this.createText = function(text, options) {
+ return textUtil.createText(text, options || {});
+ };
+ /**
+ * Get default text style.
+ */
+ this.getDefaultStyle = function() {
+ return defaultStyle;
+ };
- var textField = function(options, defaultParameters) {
+ /**
+ * Get the external text style.
+ */
+ this.getExternalStyle = function() {
+ return externalStyle;
+ };
- // Default action for the button next to the input-field
- var defaultButtonAction = function(element, inputNode) {
- var input = domQuery('input[name="' + options.modelProperty + '"]', inputNode);
- input.value = '';
+}
- return true;
- };
+TextRenderer.$inject = [
+ 'config.textRenderer'
+];
- // default method to determine if the button should be visible
- var defaultButtonShow = function(element, inputNode) {
- var input = domQuery('input[name="' + options.modelProperty + '"]', inputNode);
+/***/ }),
- return input.value !== '';
- };
+/***/ "../node_modules/bpmn-js/lib/draw/index.js":
+/*!*************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/draw/index.js ***!
+ \*************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _BpmnRenderer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BpmnRenderer */ "../node_modules/bpmn-js/lib/draw/BpmnRenderer.js");
+/* harmony import */ var _TextRenderer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./TextRenderer */ "../node_modules/bpmn-js/lib/draw/TextRenderer.js");
+/* harmony import */ var _PathMap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PathMap */ "../node_modules/bpmn-js/lib/draw/PathMap.js");
- var resource = defaultParameters,
- label = options.label || resource.id,
- dataValueLabel = options.dataValueLabel,
- buttonLabel = (options.buttonLabel || 'X'),
- actionName = (typeof options.buttonAction != 'undefined') ? options.buttonAction.name : 'clear',
- actionMethod = (typeof options.buttonAction != 'undefined') ? options.buttonAction.method : defaultButtonAction,
- showName = (typeof options.buttonShow != 'undefined') ? options.buttonShow.name : 'canClear',
- showMethod = (typeof options.buttonShow != 'undefined') ? options.buttonShow.method : defaultButtonShow,
- canBeDisabled = !!options.disabled && typeof options.disabled === 'function',
- canBeHidden = !!options.hidden && typeof options.hidden === 'function',
- description = options.description;
-
- resource.html =
- ''+ escapeHTML(label) +' ' +
- '' +
- ' ' +
- '' +
- '' + escapeHTML(buttonLabel) + ' ' +
- ' ' +
- '
';
-
- // add description below text input entry field
- if (description) {
- resource.html += entryFieldDescription(description);
- }
-
- resource[actionName] = actionMethod;
- resource[showName] = showMethod;
-
- if (canBeDisabled) {
- resource.isDisabled = function() {
- return options.disabled.apply(resource, arguments);
- };
- }
- if (canBeHidden) {
- resource.isHidden = function() {
- return !options.hidden.apply(resource, arguments);
- };
- }
- resource.cssClasses = ['bpp-textfield'];
- return resource;
- };
- module.exports = textField;
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __init__: [ 'bpmnRenderer' ],
+ bpmnRenderer: [ 'type', _BpmnRenderer__WEBPACK_IMPORTED_MODULE_0__["default"] ],
+ textRenderer: [ 'type', _TextRenderer__WEBPACK_IMPORTED_MODULE_1__["default"] ],
+ pathMap: [ 'type', _PathMap__WEBPACK_IMPORTED_MODULE_2__["default"] ]
+});
- },{"../Utils":5,"./EntryFieldDescription":15,"min-dom":647}],22:[function(require,module,exports){
- 'use strict';
- var textField = require('./TextInputEntryFactory');
+/***/ }),
- /**
- * This function is a wrapper around TextInputEntryFactory.
- * It adds functionality to cache an invalid value entered in the
- * text input, instead of setting it on the business object.
- */
- var validationAwareTextField = function(options, defaultParameters) {
+/***/ "../node_modules/bpmn-js/lib/features/align-elements/AlignElementsContextPadProvider.js":
+/*!**********************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/align-elements/AlignElementsContextPadProvider.js ***!
+ \**********************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var modelProperty = options.modelProperty;
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ AlignElementsContextPadProvider)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _AlignElementsIcons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AlignElementsIcons */ "../node_modules/bpmn-js/lib/features/align-elements/AlignElementsIcons.js");
- defaultParameters.get = function(element, node) {
- var value = this.__lastInvalidValue;
- delete this.__lastInvalidValue;
- var properties = {};
- properties[modelProperty] = value !== undefined ? value : options.getProperty(element, node);
+/**
+ * @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
+ * @typedef {import('diagram-js/lib/features/context-pad/ContextPad').default} ContextPad
+ * @typedef {import('diagram-js/lib/features/popup-menu/PopupMenu').default} PopupMenu
+ * @typedef {import('diagram-js/lib/i18n/translate/translate').default} Translate
+ *
+ * @typedef {import('../../model/Types').Element} Element
+ * @typedef {import('diagram-js/lib/features/context-pad/ContextPad').ContextPadEntries} ContextPadEntries
+ * @typedef {import('diagram-js/lib/features/context-pad/ContextPadProvider').default} ContextPadProvider
+ */
- return properties;
- };
+var LOW_PRIORITY = 900;
- defaultParameters.set = function(element, values, node) {
- var validationErrors = validate.apply(this, [ element, values, node ]),
- propertyValue = values[modelProperty];
+/**
+ * A provider for the `Align elements` context pad entry.
+ *
+ * @implements {ContextPadProvider}
+ *
+ * @param {ContextPad} contextPad
+ * @param {PopupMenu} popupMenu
+ * @param {Translate} translate
+ * @param {Canvas} canvas
+ */
+function AlignElementsContextPadProvider(contextPad, popupMenu, translate, canvas) {
- // make sure we do not update the id
- if (validationErrors && validationErrors[modelProperty]) {
- this.__lastInvalidValue = propertyValue;
+ contextPad.registerProvider(LOW_PRIORITY, this);
- return options.setProperty(element, {}, node);
- } else {
- var properties = {};
+ this._contextPad = contextPad;
+ this._popupMenu = popupMenu;
+ this._translate = translate;
+ this._canvas = canvas;
+}
- properties[modelProperty] = propertyValue;
+AlignElementsContextPadProvider.$inject = [
+ 'contextPad',
+ 'popupMenu',
+ 'translate',
+ 'canvas'
+];
- return options.setProperty(element, properties, node);
- }
- };
+/**
+ * @param {Element[]} elements
+ *
+ * @return {ContextPadEntries}
+ */
+AlignElementsContextPadProvider.prototype.getMultiElementContextPadEntries = function(elements) {
+ var actions = {};
- var validate = defaultParameters.validate = function(element, values, node) {
- var value = values[modelProperty] || this.__lastInvalidValue;
+ if (this._isAllowed(elements)) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(actions, this._getEntries(elements));
+ }
- var property = {};
- property[modelProperty] = value;
+ return actions;
+};
- return options.validate(element, property, node);
- };
+AlignElementsContextPadProvider.prototype._isAllowed = function(elements) {
+ return !this._popupMenu.isEmpty(elements, 'align-elements');
+};
- return textField(options, defaultParameters);
- };
+AlignElementsContextPadProvider.prototype._getEntries = function() {
+ var self = this;
- module.exports = validationAwareTextField;
+ return {
+ 'align-elements': {
+ group: 'align-elements',
+ title: self._translate('Align elements'),
+ html: `${_AlignElementsIcons__WEBPACK_IMPORTED_MODULE_1__["default"]['align']}
`,
+ action: {
+ click: function(event, target) {
+ var position = self._getMenuPosition(target);
- },{"./TextInputEntryFactory":21}],23:[function(require,module,exports){
- 'use strict';
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(position, {
+ cursor: {
+ x: event.x,
+ y: event.y
+ }
+ });
- var map = require('lodash/map');
+ self._popupMenu.open(target, 'align-elements', position);
+ }
+ }
+ }
+ };
+};
- var extensionElementsHelper = require('./ExtensionElementsHelper');
+AlignElementsContextPadProvider.prototype._getMenuPosition = function(elements) {
+ var Y_OFFSET = 5;
- /**
- * Returns true if the attribute 'camunda:asyncBefore' is set
- * to true.
- *
- * @param {ModdleElement} bo
- *
- * @return {boolean} a boolean value
- */
- function isAsyncBefore(bo) {
- return !!(bo.get('camunda:asyncBefore') || bo.get('camunda:async'));
- }
+ var pad = this._contextPad.getPad(elements).html;
- module.exports.isAsyncBefore = isAsyncBefore;
+ var padRect = pad.getBoundingClientRect();
- /**
- * Returns true if the attribute 'camunda:asyncAfter' is set
- * to true.
- *
- * @param {ModdleElement} bo
- *
- * @return {boolean} a boolean value
- */
- function isAsyncAfter(bo) {
- return !!bo.get('camunda:asyncAfter');
- }
+ var pos = {
+ x: padRect.left,
+ y: padRect.bottom + Y_OFFSET
+ };
- module.exports.isAsyncAfter = isAsyncAfter;
+ return pos;
+};
- /**
- * Returns true if the attribute 'camunda:exclusive' is set
- * to true.
- *
- * @param {ModdleElement} bo
- *
- * @return {boolean} a boolean value
- */
- function isExclusive(bo) {
- return !!bo.get('camunda:exclusive');
- }
- module.exports.isExclusive = isExclusive;
+/***/ }),
- /**
- * Get first 'camunda:FailedJobRetryTimeCycle' from the business object.
- *
- * @param {ModdleElement} bo
- *
- * @return {Array} a list of 'camunda:FailedJobRetryTimeCycle'
- */
- function getFailedJobRetryTimeCycle(bo) {
- return (extensionElementsHelper.getExtensionElements(bo, 'camunda:FailedJobRetryTimeCycle') || [])[0];
- }
+/***/ "../node_modules/bpmn-js/lib/features/align-elements/AlignElementsIcons.js":
+/*!*********************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/align-elements/AlignElementsIcons.js ***!
+ \*********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- module.exports.getFailedJobRetryTimeCycle = getFailedJobRetryTimeCycle;
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/**
+ * To change the icons, modify the SVGs in `./resources`, execute `npx svgo -f resources --datauri enc -o dist`,
+ * and then replace respective icons with the optimized data URIs in `./dist`.
+ */
+var icons = {
+ align: `
+
+
+
+ `,
+ bottom: `
+
+
+
+ `,
+ center: `
+
+
+
+ `,
+ left: `
+
+
+
+ `,
+ right: `
+
+
+
+ `,
+ top: `
+
+
+
+ `,
+ middle: `
+
+
+
+ `
+};
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (icons);
+
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/features/align-elements/AlignElementsMenuProvider.js":
+/*!****************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/align-elements/AlignElementsMenuProvider.js ***!
+ \****************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ AlignElementsMenuProvider)
+/* harmony export */ });
+/* harmony import */ var _AlignElementsIcons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AlignElementsIcons */ "../node_modules/bpmn-js/lib/features/align-elements/AlignElementsIcons.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+
+
+
+
+/**
+ * @typedef {import('diagram-js/lib/features/align-elements/AlignElements').default} AlignElements
+ * @typedef {import('diagram-js/lib/features/popup-menu/PopupMenu').default} PopupMenu
+ * @typedef {import('diagram-js/lib/features/rules/Rules').default} Rules
+ * @typedef {import('diagram-js/lib/i18n/translate/translate').default} Translate
+ *
+ * @typedef {import('diagram-js/lib/features/popup-menu/PopupMenu').PopupMenuEntries} PopupMenuEntries
+ * @typedef {import('diagram-js/lib/features/popup-menu/PopupMenuProvider').default} PopupMenuProvider
+ * @typedef {import('diagram-js/lib/features/popup-menu/PopupMenu').PopupMenuTarget} PopupMenuTarget
+ */
- /**
- * Removes all existing 'camunda:FailedJobRetryTimeCycle' from the business object
- *
- * @param {ModdleElement} bo
- *
- * @return {Array} a list of 'camunda:FailedJobRetryTimeCycle'
- */
- function removeFailedJobRetryTimeCycle(bo, element) {
- var retryTimeCycles = extensionElementsHelper.getExtensionElements(bo, 'camunda:FailedJobRetryTimeCycle');
- return map(retryTimeCycles, function(cycle) {
- return extensionElementsHelper.removeEntry(bo, element, cycle);
- });
- }
+var ALIGNMENT_OPTIONS = [
+ 'left',
+ 'center',
+ 'right',
+ 'top',
+ 'middle',
+ 'bottom'
+];
+
+/**
+ * A provider for the `Align elements` popup menu.
+ *
+ * @implements {PopupMenuProvider}
+ *
+ * @param {PopupMenu} popupMenu
+ * @param {AlignElements} alignElements
+ * @param {Translate} translate
+ * @param {Rules} rules
+ */
+function AlignElementsMenuProvider(popupMenu, alignElements, translate, rules) {
- module.exports.removeFailedJobRetryTimeCycle = removeFailedJobRetryTimeCycle;
- },{"./ExtensionElementsHelper":28,"lodash/map":631}],24:[function(require,module,exports){
- 'use strict';
+ this._alignElements = alignElements;
+ this._translate = translate;
+ this._popupMenu = popupMenu;
+ this._rules = rules;
- var collectionAdd = require('diagram-js/lib/util/Collections').add,
- getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject;
+ popupMenu.registerProvider('align-elements', this);
+}
- var CategoryHelper = {};
+AlignElementsMenuProvider.$inject = [
+ 'popupMenu',
+ 'alignElements',
+ 'translate',
+ 'rules'
+];
- module.exports = CategoryHelper;
+/**
+ * @param {PopupMenuTarget} target
+ *
+ * @return {PopupMenuEntries}
+ */
+AlignElementsMenuProvider.prototype.getPopupMenuEntries = function(target) {
+ var entries = {};
- /**
- * Creates a new bpmn:CategoryValue inside a new bpmn:Category
- *
- * @param {ModdleElement} definitions
- * @param {BpmnFactory} bpmnFactory
- *
- * @return {ModdleElement} categoryValue.
- */
- CategoryHelper.createCategoryValue = function(definitions, bpmnFactory) {
- var categoryValue = bpmnFactory.create('bpmn:CategoryValue'),
- category = bpmnFactory.create('bpmn:Category', {
- categoryValue: [ categoryValue ]
- });
+ if (this._isAllowed(target)) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(entries, this._getEntries(target));
+ }
- // add to correct place
- collectionAdd(definitions.get('rootElements'), category);
- getBusinessObject(category).$parent = definitions;
- getBusinessObject(categoryValue).$parent = category;
+ return entries;
+};
- return categoryValue;
+AlignElementsMenuProvider.prototype._isAllowed = function(target) {
+ return this._rules.allowed('elements.align', { elements: target });
+};
- };
- },{"bpmn-js/lib/util/ModelUtil":240,"diagram-js/lib/util/Collections":418}],25:[function(require,module,exports){
- 'use strict';
+/**
+ * @param {PopupMenuTarget} target
+ *
+ * @return {PopupMenuEntries}
+ */
+AlignElementsMenuProvider.prototype._getEntries = function(target) {
+ var alignElements = this._alignElements,
+ translate = this._translate,
+ popupMenu = this._popupMenu;
- var CmdHelper = {};
- module.exports = CmdHelper;
+ var entries = {};
- CmdHelper.updateProperties = function(element, properties) {
- return {
- cmd: 'element.updateProperties',
- context: { element: element, properties: properties }
- };
- };
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(ALIGNMENT_OPTIONS, function(alignment) {
+ entries[ 'align-elements-' + alignment ] = {
+ group: 'align',
+ title: translate('Align elements ' + alignment),
+ className: 'bjs-align-elements-menu-entry',
+ imageHtml: _AlignElementsIcons__WEBPACK_IMPORTED_MODULE_1__["default"][ alignment ],
+ action: function() {
+ alignElements.trigger(target, alignment);
+ popupMenu.close();
+ }
+ };
+ });
- CmdHelper.updateBusinessObject = function(element, businessObject, newProperties) {
- return {
- cmd: 'properties-panel.update-businessobject',
- context: {
- element: element,
- businessObject: businessObject,
- properties: newProperties
- }
- };
- };
+ return entries;
+};
- CmdHelper.addElementsTolist = function(element, businessObject, listPropertyName, objectsToAdd) {
- return {
- cmd: 'properties-panel.update-businessobject-list',
- context: {
- element: element,
- currentObject: businessObject,
- propertyName: listPropertyName,
- objectsToAdd: objectsToAdd
- }
- };
- };
- CmdHelper.removeElementsFromList = function(element, businessObject, listPropertyName, referencePropertyName, objectsToRemove) {
+/***/ }),
- return {
- cmd: 'properties-panel.update-businessobject-list',
- context: {
- element: element,
- currentObject: businessObject,
- propertyName: listPropertyName,
- referencePropertyName: referencePropertyName,
- objectsToRemove: objectsToRemove
- }
- };
- };
+/***/ "../node_modules/bpmn-js/lib/features/align-elements/BpmnAlignElements.js":
+/*!********************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/align-elements/BpmnAlignElements.js ***!
+ \********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BpmnAlignElements)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_features_rules_RuleProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/rules/RuleProvider */ "../node_modules/diagram-js/lib/features/rules/RuleProvider.js");
+/* harmony import */ var diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/util/Elements */ "../node_modules/diagram-js/lib/util/Elements.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
- CmdHelper.addAndRemoveElementsFromList = function(element, businessObject, listPropertyName, referencePropertyName, objectsToAdd, objectsToRemove) {
- return {
- cmd: 'properties-panel.update-businessobject-list',
- context: {
- element: element,
- currentObject: businessObject,
- propertyName: listPropertyName,
- referencePropertyName: referencePropertyName,
- objectsToAdd: objectsToAdd,
- objectsToRemove: objectsToRemove
- }
- };
- };
- CmdHelper.setList = function(element, businessObject, listPropertyName, updatedObjectList) {
- return {
- cmd: 'properties-panel.update-businessobject-list',
- context: {
- element: element,
- currentObject: businessObject,
- propertyName: listPropertyName,
- updatedObjectList: updatedObjectList
- }
- };
- };
- },{}],26:[function(require,module,exports){
- 'use strict';
- var ElementHelper = {};
- module.exports = ElementHelper;
- /**
- * Creates a new element and set the parent to it
- *
- * @method ElementHelper#createElement
- *
- * @param {String} elementType of the new element
- * @param {Object} properties of the new element in key-value pairs
- * @param {moddle.object} parent of the new element
- * @param {BpmnFactory} factory which creates the new element
- *
- * @returns {djs.model.Base} element which is created
- */
- ElementHelper.createElement = function(elementType, properties, parent, factory) {
- var element = factory.create(elementType, properties);
- element.$parent = parent;
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ */
- return element;
- };
+/**
+ * Rule provider for aligning BPMN elements.
+ *
+ * @param {EventBus} eventBus
+ */
+function BpmnAlignElements(eventBus) {
+ diagram_js_lib_features_rules_RuleProvider__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
+}
- },{}],27:[function(require,module,exports){
- 'use strict';
+BpmnAlignElements.$inject = [ 'eventBus' ];
- var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject,
- is = require('bpmn-js/lib/util/ModelUtil').is,
- forEach = require('lodash/forEach');
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_1__["default"])(BpmnAlignElements, diagram_js_lib_features_rules_RuleProvider__WEBPACK_IMPORTED_MODULE_0__["default"]);
- var EventDefinitionHelper = {};
+BpmnAlignElements.prototype.init = function() {
+ this.addRule('elements.align', function(context) {
+ var elements = context.elements;
- module.exports = EventDefinitionHelper;
+ // filter out elements which cannot be aligned
+ var filteredElements = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.filter)(elements, function(element) {
+ return !(element.waypoints || element.host || element.labelTarget);
+ });
- EventDefinitionHelper.getEventDefinition = function(element, eventType) {
+ // filter out elements which are children of any of the selected elements
+ filteredElements = (0,diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_3__.getParents)(filteredElements);
- var bo = getBusinessObject(element),
- eventDefinition = null;
+ if (filteredElements.length < 2) {
+ return false;
+ }
- if (bo.eventDefinitions) {
- forEach(bo.eventDefinitions, function(event) {
- if (is(event, eventType)) {
- eventDefinition = event;
- }
- });
- }
+ return filteredElements;
+ });
+};
- return eventDefinition;
- };
- EventDefinitionHelper.getTimerEventDefinition = function(element) {
- return this.getEventDefinition(element, 'bpmn:TimerEventDefinition');
- };
+/***/ }),
- EventDefinitionHelper.getMessageEventDefinition = function(element) {
- return this.getEventDefinition(element, 'bpmn:MessageEventDefinition');
- };
+/***/ "../node_modules/bpmn-js/lib/features/align-elements/index.js":
+/*!********************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/align-elements/index.js ***!
+ \********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- EventDefinitionHelper.getSignalEventDefinition = function(element) {
- return this.getEventDefinition(element, 'bpmn:SignalEventDefinition');
- };
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_features_align_elements__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/align-elements */ "../node_modules/diagram-js/lib/features/align-elements/index.js");
+/* harmony import */ var diagram_js_lib_features_context_pad__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/context-pad */ "../node_modules/diagram-js/lib/features/context-pad/index.js");
+/* harmony import */ var diagram_js_lib_features_popup_menu__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/features/popup-menu */ "../node_modules/diagram-js/lib/features/popup-menu/index.js");
+/* harmony import */ var _AlignElementsContextPadProvider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AlignElementsContextPadProvider */ "../node_modules/bpmn-js/lib/features/align-elements/AlignElementsContextPadProvider.js");
+/* harmony import */ var _AlignElementsMenuProvider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./AlignElementsMenuProvider */ "../node_modules/bpmn-js/lib/features/align-elements/AlignElementsMenuProvider.js");
+/* harmony import */ var _BpmnAlignElements__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./BpmnAlignElements */ "../node_modules/bpmn-js/lib/features/align-elements/BpmnAlignElements.js");
- EventDefinitionHelper.getErrorEventDefinition = function(element) {
- return this.getEventDefinition(element, 'bpmn:ErrorEventDefinition');
- };
- EventDefinitionHelper.getEscalationEventDefinition = function(element) {
- return this.getEventDefinition(element, 'bpmn:EscalationEventDefinition');
- };
- EventDefinitionHelper.getCompensateEventDefinition = function(element) {
- return this.getEventDefinition(element, 'bpmn:CompensateEventDefinition');
- };
- EventDefinitionHelper.getLinkEventDefinition = function(element) {
- return this.getEventDefinition(element, 'bpmn:LinkEventDefinition');
- };
- EventDefinitionHelper.getConditionalEventDefinition = function(element) {
- return this.getEventDefinition(element, 'bpmn:ConditionalEventDefinition');
- };
- },{"bpmn-js/lib/util/ModelUtil":240,"lodash/forEach":613}],28:[function(require,module,exports){
- 'use strict';
- var cmdHelper = require('./CmdHelper'),
- elementHelper = require('./ElementHelper');
- var is = require('bpmn-js/lib/util/ModelUtil').is;
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ diagram_js_lib_features_align_elements__WEBPACK_IMPORTED_MODULE_0__["default"],
+ diagram_js_lib_features_context_pad__WEBPACK_IMPORTED_MODULE_1__["default"],
+ diagram_js_lib_features_popup_menu__WEBPACK_IMPORTED_MODULE_2__["default"]
+ ],
+ __init__: [
+ 'alignElementsContextPadProvider',
+ 'alignElementsMenuProvider',
+ 'bpmnAlignElements'
+ ],
+ alignElementsContextPadProvider: [ 'type', _AlignElementsContextPadProvider__WEBPACK_IMPORTED_MODULE_3__["default"] ],
+ alignElementsMenuProvider: [ 'type', _AlignElementsMenuProvider__WEBPACK_IMPORTED_MODULE_4__["default"] ],
+ bpmnAlignElements: [ 'type', _BpmnAlignElements__WEBPACK_IMPORTED_MODULE_5__["default"] ]
+});
- var ExtensionElementsHelper = {};
- var getExtensionElements = function(bo) {
- return bo.get('extensionElements');
- };
+/***/ }),
- ExtensionElementsHelper.getExtensionElements = function(bo, type) {
- var extensionElements = getExtensionElements(bo);
- if (typeof extensionElements !== 'undefined') {
- var extensionValues = extensionElements.get('values');
- if (typeof extensionValues !== 'undefined') {
- var elements = extensionValues.filter(function(value) {
- return is(value, type);
- });
- if (elements.length) {
- return elements;
- }
- }
- }
- };
+/***/ "../node_modules/bpmn-js/lib/features/append-preview/AppendPreview.js":
+/*!****************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/append-preview/AppendPreview.js ***!
+ \****************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- ExtensionElementsHelper.addEntry = function(bo, element, entry, bpmnFactory) {
- var extensionElements = bo.get('extensionElements');
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ AppendPreview)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
- // if there is no extensionElements list, create one
- if (!extensionElements) {
- // TODO: Ask Daniel which operation costs more
- extensionElements = elementHelper.createElement('bpmn:ExtensionElements', { values: [entry] }, bo, bpmnFactory);
- return { extensionElements : extensionElements };
- } else {
- // add new failedJobRetryExtensionElement to existing extensionElements list
- return cmdHelper.addElementsTolist(element, extensionElements, 'values', [entry]);
- }
- };
- ExtensionElementsHelper.removeEntry = function(bo, element, entry) {
- var extensionElements = bo.get('extensionElements');
+const round = Math.round;
- if (!extensionElements) {
+/**
+ * @typedef {import('diagram-js/lib/features/complex-preview/ComplexPreview').default} ComplexPreview
+ * @typedef {import('diagram-js/lib/layout/ConnectionDocking').default} ConnectionDocking
+ * @typedef {import('../modeling/ElementFactory').default} ElementFactory
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('diagram-js/lib/layout/ManhattanLayout').default} ManhattanLayout
+ * @typedef {import('diagram-js/lib/features/rules/Rules').default} Rules
+ *
+ * @typedef {import('../../model/Types').Shape} Shape
+ */
- // return an empty command when there is no extensionElements list
- return {};
- }
+/**
+ * A preview for appending.
+ *
+ * @param {ComplexPreview} complexPreview
+ * @param {ConnectionDocking} connectionDocking
+ * @param {ElementFactory} elementFactory
+ * @param {EventBus} eventBus
+ * @param {ManhattanLayout} layouter
+ * @param {Rules} rules
+ */
+function AppendPreview(complexPreview, connectionDocking, elementFactory, eventBus, layouter, rules) {
+ this._complexPreview = complexPreview;
+ this._connectionDocking = connectionDocking;
+ this._elementFactory = elementFactory;
+ this._eventBus = eventBus;
+ this._layouter = layouter;
+ this._rules = rules;
+}
+
+/**
+ * Create a preview of appending a shape of the given type to the given source.
+ *
+ * @param {Shape} source
+ * @param {string} type
+ * @param {Partial} options
+ */
+AppendPreview.prototype.create = function(source, type, options) {
+ const complexPreview = this._complexPreview,
+ connectionDocking = this._connectionDocking,
+ elementFactory = this._elementFactory,
+ eventBus = this._eventBus,
+ layouter = this._layouter,
+ rules = this._rules;
+
+ const shape = elementFactory.createShape((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({ type }, options));
+
+ const position = eventBus.fire('autoPlace', {
+ source,
+ shape
+ });
+
+ if (!position) {
+ return;
+ }
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(shape, {
+ x: position.x - round(shape.width / 2),
+ y: position.y - round(shape.height / 2)
+ });
+
+ const connectionCreateAllowed = rules.allowed('connection.create', {
+ source,
+ target: shape,
+ hints: {
+ targetParent: source.parent
+ }
+ });
+
+ let connection = null;
+
+ if (connectionCreateAllowed) {
+ connection = elementFactory.createConnection(connectionCreateAllowed);
+
+ connection.waypoints = layouter.layoutConnection(connection, {
+ source,
+ target: shape
+ });
+
+ connection.waypoints = connectionDocking.getCroppedWaypoints(connection, source, shape);
+ }
+
+ complexPreview.create({
+ created: [
+ shape,
+ connection
+ ].filter((element) => !(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNil)(element))
+ });
+};
+
+AppendPreview.prototype.cleanUp = function() {
+ this._complexPreview.cleanUp();
+};
+
+AppendPreview.$inject = [
+ 'complexPreview',
+ 'connectionDocking',
+ 'elementFactory',
+ 'eventBus',
+ 'layouter',
+ 'rules'
+];
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/features/append-preview/index.js":
+/*!********************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/append-preview/index.js ***!
+ \********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _auto_place__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../auto-place */ "../node_modules/bpmn-js/lib/features/auto-place/index.js");
+/* harmony import */ var diagram_js_lib_features_complex_preview__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/complex-preview */ "../node_modules/diagram-js/lib/features/complex-preview/index.js");
+/* harmony import */ var _modeling__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../modeling */ "../node_modules/bpmn-js/lib/features/modeling/index.js");
+/* harmony import */ var _AppendPreview__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AppendPreview */ "../node_modules/bpmn-js/lib/features/append-preview/AppendPreview.js");
+
+
+
+
+
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ _auto_place__WEBPACK_IMPORTED_MODULE_0__["default"],
+ diagram_js_lib_features_complex_preview__WEBPACK_IMPORTED_MODULE_1__["default"],
+ _modeling__WEBPACK_IMPORTED_MODULE_2__["default"]
+ ],
+ __init__: [ 'appendPreview' ],
+ appendPreview: [ 'type', _AppendPreview__WEBPACK_IMPORTED_MODULE_3__["default"] ]
+});
+
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/features/auto-place/BpmnAutoPlace.js":
+/*!************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/auto-place/BpmnAutoPlace.js ***!
+ \************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- return cmdHelper.removeElementsFromList(element, extensionElements, 'values', 'extensionElements', [entry]);
- };
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ AutoPlace)
+/* harmony export */ });
+/* harmony import */ var _BpmnAutoPlaceUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BpmnAutoPlaceUtil */ "../node_modules/bpmn-js/lib/features/auto-place/BpmnAutoPlaceUtil.js");
+
+
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ */
- module.exports = ExtensionElementsHelper;
+/**
+ * BPMN auto-place behavior.
+ *
+ * @param {EventBus} eventBus
+ */
+function AutoPlace(eventBus) {
+ eventBus.on('autoPlace', function(context) {
+ var shape = context.shape,
+ source = context.source;
- },{"./CmdHelper":25,"./ElementHelper":26,"bpmn-js/lib/util/ModelUtil":240}],29:[function(require,module,exports){
- 'use strict';
+ return (0,_BpmnAutoPlaceUtil__WEBPACK_IMPORTED_MODULE_0__.getNewShapePosition)(source, shape);
+ });
+}
- var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject,
- getExtensionElements = require('./ExtensionElementsHelper').getExtensionElements;
+AutoPlace.$inject = [ 'eventBus' ];
- var FormHelper = {};
+/***/ }),
- module.exports = FormHelper;
+/***/ "../node_modules/bpmn-js/lib/features/auto-place/BpmnAutoPlaceUtil.js":
+/*!****************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/auto-place/BpmnAutoPlaceUtil.js ***!
+ \****************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- /**
- * Return form data from business object or undefined if none exist
- *
- * @param {djs.model.Base} element
- *
- * @return {ModdleElement|undefined} formData
- */
- FormHelper.getFormData = function(element) {
- var bo = getBusinessObject(element);
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ getDataElementPosition: () => (/* binding */ getDataElementPosition),
+/* harmony export */ getFlowNodePosition: () => (/* binding */ getFlowNodePosition),
+/* harmony export */ getNewShapePosition: () => (/* binding */ getNewShapePosition),
+/* harmony export */ getTextAnnotationPosition: () => (/* binding */ getTextAnnotationPosition)
+/* harmony export */ });
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modeling/util/ModelingUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+/* harmony import */ var diagram_js_lib_features_auto_place_AutoPlaceUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/features/auto-place/AutoPlaceUtil */ "../node_modules/diagram-js/lib/features/auto-place/AutoPlaceUtil.js");
+/* harmony import */ var diagram_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/util/ModelUtil */ "../node_modules/diagram-js/lib/util/ModelUtil.js");
- var formData = getExtensionElements(bo, 'camunda:FormData');
- if (typeof formData !== 'undefined') {
- return formData[0];
- }
- };
- /**
- * Return all form fields existing in the business object, and
- * an empty array if none exist.
- *
- * @param {djs.model.Base} element
- *
- * @return {Array} a list of form field objects
- */
- FormHelper.getFormFields = function(element) {
- var formData = this.getFormData(element);
- if (typeof formData === 'undefined') {
- return [];
- }
- return formData.fields || [];
- };
- /**
- * Get a form field from the business object at given index
- *
- * @param {djs.model.Base} element
- * @param {number} idx
- *
- * @return {ModdleElement} the form field
- */
- FormHelper.getFormField = function(element, idx) {
- var formFields = this.getFormFields(element);
+/**
+ * @typedef {import('../../model/Types').Shape} Shape
+ *
+ * @typedef {import('diagram-js/lib/util/Types').Point} Point
+ * @typedef {import('diagram-js/lib/util/Types').DirectionTRBL} DirectionTRBL
+ */
- return formFields[idx];
- };
+/**
+ * Get the position for given new target relative to the source it will be
+ * connected to.
+ *
+ * @param {Shape} source
+ * @param {Shape} element
+ *
+ * @return {Point}
+ */
+function getNewShapePosition(source, element) {
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:TextAnnotation')) {
+ return getTextAnnotationPosition(source, element);
+ }
- /**
- * Get all constraints for a specific form field from the business object
- *
- * @param {ModdleElement} formField
- *
- * @return {Array} a list of constraint objects
- */
- FormHelper.getConstraints = function(formField) {
- if (formField && formField.validation && formField.validation.constraints) {
- return formField.validation.constraints;
- }
- return [];
- };
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.isAny)(element, [ 'bpmn:DataObjectReference', 'bpmn:DataStoreReference' ])) {
+ return getDataElementPosition(source, element);
+ }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:FlowNode')) {
+ return getFlowNodePosition(source, element);
+ }
+}
- /**
- * Get all camunda:value objects for a specific form field from the business object
- *
- * @param {ModdleElement} formField
- *
- * @return {Array} a list of camunda:value objects
- */
- FormHelper.getEnumValues = function(formField) {
- if (formField && formField.values) {
- return formField.values;
- }
- return [];
- };
+/**
+ * Get the position for given new flow node. Try placing the flow node right of
+ * the source.
+ *
+ * @param {Shape} source
+ * @param {Shape} element
+ *
+ * @return {Point}
+ */
+function getFlowNodePosition(source, element) {
+
+ var sourceTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(source);
+ var sourceMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(source);
+
+ var horizontalDistance = (0,diagram_js_lib_features_auto_place_AutoPlaceUtil__WEBPACK_IMPORTED_MODULE_2__.getConnectedDistance)(source, {
+ filter: function(connection) {
+ return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(connection, 'bpmn:SequenceFlow');
+ }
+ });
+
+ var margin = 30,
+ minDistance = 80,
+ orientation = 'left';
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(source, 'bpmn:BoundaryEvent')) {
+ orientation = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getOrientation)(source, source.host, -25);
+
+ if (orientation.indexOf('top') !== -1) {
+ margin *= -1;
+ }
+ }
+
+ var position = {
+ x: sourceTrbl.right + horizontalDistance + element.width / 2,
+ y: sourceMid.y + getVerticalDistance(orientation, minDistance)
+ };
+
+ var nextPositionDirection = {
+ y: {
+ margin: margin,
+ minDistance: minDistance
+ }
+ };
+
+ return (0,diagram_js_lib_features_auto_place_AutoPlaceUtil__WEBPACK_IMPORTED_MODULE_2__.findFreePosition)(source, element, position, (0,diagram_js_lib_features_auto_place_AutoPlaceUtil__WEBPACK_IMPORTED_MODULE_2__.generateGetNextPosition)(nextPositionDirection));
+}
+
+/**
+ * @param {DirectionTRBL} orientation
+ * @param {number} minDistance
+ *
+ * @return {number}
+ */
+function getVerticalDistance(orientation, minDistance) {
+ if (orientation.includes('top')) {
+ return -1 * minDistance;
+ } else if (orientation.includes('bottom')) {
+ return minDistance;
+ } else {
+ return 0;
+ }
+}
+
+
+/**
+ * Get the position for given text annotation. Try placing the text annotation
+ * top-right of the source.
+ *
+ * @param {Shape} source
+ * @param {Shape} element
+ *
+ * @return {Point}
+ */
+function getTextAnnotationPosition(source, element) {
+ var sourceTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(source);
- },{"./ExtensionElementsHelper":28,"bpmn-js/lib/util/ModelUtil":240}],30:[function(require,module,exports){
- 'use strict';
+ var position = {
+ x: sourceTrbl.right + element.width / 2,
+ y: sourceTrbl.top - 50 - element.height / 2
+ };
- var ModelUtil = require('bpmn-js/lib/util/ModelUtil'),
- is = ModelUtil.is,
- getBusinessObject = ModelUtil.getBusinessObject;
+ if ((0,diagram_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.isConnection)(source)) {
+ position = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(source);
+ position.x += 100;
+ position.y -= 50;
+ }
- var eventDefinitionHelper = require('./EventDefinitionHelper');
- var extensionsElementHelper = require('./ExtensionElementsHelper');
+ var nextPositionDirection = {
+ y: {
+ margin: -30,
+ minDistance: 20
+ }
+ };
- var ImplementationTypeHelper = {};
+ return (0,diagram_js_lib_features_auto_place_AutoPlaceUtil__WEBPACK_IMPORTED_MODULE_2__.findFreePosition)(source, element, position, (0,diagram_js_lib_features_auto_place_AutoPlaceUtil__WEBPACK_IMPORTED_MODULE_2__.generateGetNextPosition)(nextPositionDirection));
+}
- module.exports = ImplementationTypeHelper;
- /**
- * Returns 'true' if the given element is 'camunda:ServiceTaskLike'
- *
- * @param {djs.model.Base} element
- *
- * @return {boolean} a boolean value
- */
- ImplementationTypeHelper.isServiceTaskLike = function(element) {
- return is(element, 'camunda:ServiceTaskLike');
- };
+/**
+ * Get the position for given new data element. Try placing the data element
+ * bottom-right of the source.
+ *
+ * @param {Shape} source
+ * @param {Shape} element
+ *
+ * @return {Point}
+ */
+function getDataElementPosition(source, element) {
- /**
- * Returns 'true' if the given element is 'camunda:DmnCapable'
- *
- * @param {djs.model.Base} element
- *
- * @return {boolean} a boolean value
- */
- ImplementationTypeHelper.isDmnCapable = function(element) {
- return is(element, 'camunda:DmnCapable');
- };
+ var sourceTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(source);
- /**
- * Returns 'true' if the given element is 'camunda:ExternalCapable'
- *
- * @param {djs.model.Base} element
- *
- * @return {boolean} a boolean value
- */
- ImplementationTypeHelper.isExternalCapable = function(element) {
- return is(element, 'camunda:ExternalCapable');
- };
+ var position = {
+ x: sourceTrbl.right - 10 + element.width / 2,
+ y: sourceTrbl.bottom + 40 + element.width / 2
+ };
- /**
- * Returns 'true' if the given element is 'camunda:TaskListener'
- *
- * @param {djs.model.Base} element
- *
- * @return {boolean} a boolean value
- */
- ImplementationTypeHelper.isTaskListener = function(element) {
- return is(element, 'camunda:TaskListener');
- };
+ var nextPositionDirection = {
+ x: {
+ margin: 30,
+ minDistance: 30
+ }
+ };
- /**
- * Returns 'true' if the given element is 'camunda:ExecutionListener'
- *
- * @param {djs.model.Base} element
- *
- * @return {boolean} a boolean value
- */
- ImplementationTypeHelper.isExecutionListener = function(element) {
- return is(element, 'camunda:ExecutionListener');
- };
+ return (0,diagram_js_lib_features_auto_place_AutoPlaceUtil__WEBPACK_IMPORTED_MODULE_2__.findFreePosition)(source, element, position, (0,diagram_js_lib_features_auto_place_AutoPlaceUtil__WEBPACK_IMPORTED_MODULE_2__.generateGetNextPosition)(nextPositionDirection));
+}
- /**
- * Returns 'true' if the given element is 'camunda:ExecutionListener' or
- * 'camunda:TaskListener'
- *
- * @param {djs.model.Base} element
- *
- * @return {boolean} a boolean value
- */
- ImplementationTypeHelper.isListener = function(element) {
- return this.isTaskListener(element) || this.isExecutionListener(element);
- };
+/***/ }),
- /**
- * Returns 'true' if the given element is 'bpmn:SequenceFlow'
- *
- * @param {djs.model.Base} element
- *
- * @return {boolean} a boolean value
- */
- ImplementationTypeHelper.isSequenceFlow = function(element) {
- return is(element, 'bpmn:SequenceFlow');
- };
+/***/ "../node_modules/bpmn-js/lib/features/auto-place/index.js":
+/*!****************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/auto-place/index.js ***!
+ \****************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- /**
- * Get a 'camunda:ServiceTaskLike' business object.
- *
- * If the given element is not a 'camunda:ServiceTaskLike', then 'false'
- * is returned.
- *
- * @param {djs.model.Base} element
- *
- * @return {ModdleElement} the 'camunda:ServiceTaskLike' business object
- */
- ImplementationTypeHelper.getServiceTaskLikeBusinessObject = function(element) {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_features_auto_place__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/auto-place */ "../node_modules/diagram-js/lib/features/auto-place/index.js");
+/* harmony import */ var _BpmnAutoPlace__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BpmnAutoPlace */ "../node_modules/bpmn-js/lib/features/auto-place/BpmnAutoPlace.js");
- if (is(element, 'bpmn:IntermediateThrowEvent') || is(element, 'bpmn:EndEvent')) {
- // change business object to 'messageEventDefinition' when
- // the element is a message intermediate throw event or message end event
- // because the camunda extensions (e.g. camunda:class) are in the message
- // event definition tag and not in the intermediate throw event or end event tag
- var messageEventDefinition = eventDefinitionHelper.getMessageEventDefinition(element);
- if (messageEventDefinition) {
- element = messageEventDefinition;
- }
- }
- return this.isServiceTaskLike(element) && getBusinessObject(element);
- };
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [ diagram_js_lib_features_auto_place__WEBPACK_IMPORTED_MODULE_0__["default"] ],
+ __init__: [ 'bpmnAutoPlace' ],
+ bpmnAutoPlace: [ 'type', _BpmnAutoPlace__WEBPACK_IMPORTED_MODULE_1__["default"] ]
+});
- /**
- * Returns the implementation type of the given element.
- *
- * Possible implementation types are:
- * - dmn
- * - connector
- * - external
- * - class
- * - expression
- * - delegateExpression
- * - script
- * - or undefined, when no matching implementation type is found
- *
- * @param {djs.model.Base} element
- *
- * @return {String} the implementation type
- */
- ImplementationTypeHelper.getImplementationType = function(element) {
+/***/ }),
- var bo = this.getServiceTaskLikeBusinessObject(element);
+/***/ "../node_modules/bpmn-js/lib/features/auto-resize/BpmnAutoResize.js":
+/*!**************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/auto-resize/BpmnAutoResize.js ***!
+ \**************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- if (!bo) {
- if (this.isListener(element)) {
- bo = element;
- } else {
- return;
- }
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BpmnAutoResize)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_features_auto_resize_AutoResize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/auto-resize/AutoResize */ "../node_modules/diagram-js/lib/features/auto-resize/AutoResize.js");
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- if (this.isDmnCapable(bo)) {
- var decisionRef = bo.get('camunda:decisionRef');
- if (typeof decisionRef !== 'undefined') {
- return 'dmn';
- }
- }
- if (this.isServiceTaskLike(bo)) {
- var connectors = extensionsElementHelper.getExtensionElements(bo, 'camunda:Connector');
- if (typeof connectors !== 'undefined') {
- return 'connector';
- }
- }
- if (this.isExternalCapable(bo)) {
- var type = bo.get('camunda:type');
- if (type === 'external') {
- return 'external';
- }
- }
- var cls = bo.get('camunda:class');
- if (typeof cls !== 'undefined') {
- return 'class';
- }
- var expression = bo.get('camunda:expression');
- if (typeof expression !== 'undefined') {
- return 'expression';
- }
- var delegateExpression = bo.get('camunda:delegateExpression');
- if (typeof delegateExpression !== 'undefined') {
- return 'delegateExpression';
- }
+/**
+ * @typedef {import('didi').Injector} Injector
+ *
+ * @typedef {import('../../model/Types').Shape} Shape
+ *
+ * @typedef {import('diagram-js/lib/util/Types').Rect} Rect
+ */
- if (this.isListener(bo)) {
- var script = bo.get('script');
- if (typeof script !== 'undefined') {
- return 'script';
- }
- }
+/**
+ * BPMN-specific resize behavior.
+ *
+ * @param {Injector} injector
+ */
+function BpmnAutoResize(injector) {
- };
+ injector.invoke(diagram_js_lib_features_auto_resize_AutoResize__WEBPACK_IMPORTED_MODULE_0__["default"], this);
+}
- },{"./EventDefinitionHelper":27,"./ExtensionElementsHelper":28,"bpmn-js/lib/util/ModelUtil":240}],31:[function(require,module,exports){
- 'use strict';
+BpmnAutoResize.$inject = [
+ 'injector'
+];
- var ModelUtil = require('bpmn-js/lib/util/ModelUtil'),
- is = ModelUtil.is,
- getBusinessObject = ModelUtil.getBusinessObject;
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_1__["default"])(BpmnAutoResize, diagram_js_lib_features_auto_resize_AutoResize__WEBPACK_IMPORTED_MODULE_0__["default"]);
- var extensionElementsHelper = require('./ExtensionElementsHelper'),
- implementationTypeHelper = require('./ImplementationTypeHelper');
+/**
+ * Perform BPMN-specific resizing of participants.
+ *
+ * @param {Shape} target
+ * @param {Rect} newBounds
+ * @param {Object} [hints]
+ * @param {string} [hints.autoResize]
+ */
+BpmnAutoResize.prototype.resize = function(target, newBounds, hints) {
- var InputOutputHelper = {};
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target, 'bpmn:Participant')) {
+ this._modeling.resizeLane(target, newBounds, null, hints);
+ } else {
+ this._modeling.resizeShape(target, newBounds, null, hints);
+ }
+};
- module.exports = InputOutputHelper;
+/***/ }),
- function getElements(bo, type, prop) {
- var elems = extensionElementsHelper.getExtensionElements(bo, type) || [];
- return !prop ? elems : (elems[0] || {})[prop] || [];
- }
+/***/ "../node_modules/bpmn-js/lib/features/auto-resize/BpmnAutoResizeProvider.js":
+/*!**********************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/auto-resize/BpmnAutoResizeProvider.js ***!
+ \**********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- function getParameters(element, prop, insideConnector) {
- var inputOutput = InputOutputHelper.getInputOutput(element, insideConnector);
- return (inputOutput && inputOutput.get(prop)) || [];
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BpmnAutoResizeProvider)
+/* harmony export */ });
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/LabelUtil */ "../node_modules/diagram-js/lib/util/ModelUtil.js");
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var diagram_js_lib_features_auto_resize_AutoResizeProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/auto-resize/AutoResizeProvider */ "../node_modules/diagram-js/lib/features/auto-resize/AutoResizeProvider.js");
- /**
- * Get a inputOutput from the business object
- *
- * @param {djs.model.Base} element
- * @param {boolean} insideConnector
- *
- * @return {ModdleElement} the inputOutput object
- */
- InputOutputHelper.getInputOutput = function(element, insideConnector) {
- if (!insideConnector) {
- var bo = getBusinessObject(element);
- return (getElements(bo, 'camunda:InputOutput') || [])[0];
- }
- var connector = this.getConnector(element);
- return connector && connector.get('inputOutput');
- };
- /**
- * Get a connector from the business object
- *
- * @param {djs.model.Base} element
- *
- * @return {ModdleElement} the connector object
- */
- InputOutputHelper.getConnector = function(element) {
- var bo = implementationTypeHelper.getServiceTaskLikeBusinessObject(element);
- return bo && (getElements(bo, 'camunda:Connector') || [])[0];
- };
- /**
- * Return all input parameters existing in the business object, and
- * an empty array if none exist.
- *
- * @param {djs.model.Base} element
- * @param {boolean} insideConnector
- *
- * @return {Array} a list of input parameter objects
- */
- InputOutputHelper.getInputParameters = function(element, insideConnector) {
- return getParameters.apply(this, [ element, 'inputParameters', insideConnector ]);
- };
- /**
- * Return all output parameters existing in the business object, and
- * an empty array if none exist.
- *
- * @param {djs.model.Base} element
- * @param {boolean} insideConnector
- *
- * @return {Array} a list of output parameter objects
- */
- InputOutputHelper.getOutputParameters = function(element, insideConnector) {
- return getParameters.apply(this, [ element, 'outputParameters', insideConnector ]);
- };
- /**
- * Get a input parameter from the business object at given index
- *
- * @param {djs.model.Base} element
- * @param {boolean} insideConnector
- * @param {number} idx
- *
- * @return {ModdleElement} input parameter
- */
- InputOutputHelper.getInputParameter = function(element, insideConnector, idx) {
- return this.getInputParameters(element, insideConnector)[idx];
- };
- /**
- * Get a output parameter from the business object at given index
- *
- * @param {djs.model.Base} element
- * @param {boolean} insideConnector
- * @param {number} idx
- *
- * @return {ModdleElement} output parameter
- */
- InputOutputHelper.getOutputParameter = function(element, insideConnector, idx) {
- return this.getOutputParameters(element, insideConnector)[idx];
- };
- /**
- * Returns 'true' if the given element supports inputOutput
- *
- * @param {djs.model.Base} element
- * @param {boolean} insideConnector
- *
- * @return {boolean} a boolean value
- */
- InputOutputHelper.isInputOutputSupported = function(element, insideConnector) {
- if (insideConnector) {
- return true;
- }
- var bo = getBusinessObject(element);
- return (
- is(bo, 'bpmn:FlowNode') && !(
- is(bo, 'bpmn:StartEvent') ||
- is(bo, 'bpmn:Gateway') ||
- is(bo, 'bpmn:BoundaryEvent') ||
- (
- is(bo, 'bpmn:SubProcess') && bo.get('triggeredByEvent')
- )
- )
- );
- };
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../modeling/Modeling').default} Modeling
+ *
+ * @typedef {import('../../model/Types').Shape} Shape
+ */
- /**
- * Returns 'true' if the given element supports output parameters
- *
- * @param {djs.model.Base} element
- * @param {boolean} insideConnector
- *
- * @return {boolean} a boolean value
- */
- InputOutputHelper.areOutputParametersSupported = function(element, insideConnector) {
- var bo = getBusinessObject(element);
- return insideConnector || (!is(bo, 'bpmn:EndEvent') && !bo.loopCharacteristics);
- };
+/**
+ * BPMN-specific provider for automatic resizung.
+ *
+ * @param {EventBus} eventBus
+ * @param {Modeling} modeling
+ */
+function BpmnAutoResizeProvider(eventBus, modeling) {
+ diagram_js_lib_features_auto_resize_AutoResizeProvider__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- },{"./ExtensionElementsHelper":28,"./ImplementationTypeHelper":30,"bpmn-js/lib/util/ModelUtil":240}],32:[function(require,module,exports){
- 'use strict';
+ this._modeling = modeling;
+}
- var is = require('bpmn-js/lib/util/ModelUtil').is,
- getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject,
- cmdHelper = require('./CmdHelper');
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_1__["default"])(BpmnAutoResizeProvider, diagram_js_lib_features_auto_resize_AutoResizeProvider__WEBPACK_IMPORTED_MODULE_0__["default"]);
+BpmnAutoResizeProvider.$inject = [
+ 'eventBus',
+ 'modeling'
+];
- var ParticipantHelper = {};
- module.exports = ParticipantHelper;
+/**
+ * BPMN-specific check whether given elements can be resized.
+ *
+ * @param {Shape[]} elements
+ * @param {Shape} target
+ *
+ * @return {boolean}
+ */
+BpmnAutoResizeProvider.prototype.canResize = function(elements, target) {
- ParticipantHelper.modifyProcessBusinessObject = function(element, property, values) {
- if (!is(element, 'bpmn:Participant')) {
- return {};
- }
+ // do not resize plane elements:
+ // root elements, collapsed sub-processes
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target.di, 'bpmndi:BPMNPlane')) {
+ return false;
+ }
- var bo = getBusinessObject(element).get('processRef'),
- properties = {};
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target, 'bpmn:Participant') && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target, 'bpmn:Lane') && !((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target, 'bpmn:SubProcess'))) {
+ return false;
+ }
- properties[property] = values[property];
+ var canResize = true;
- return cmdHelper.updateBusinessObject(element, bo, properties);
- };
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(elements, function(element) {
- ParticipantHelper.getProcessBusinessObject = function(element, propertyName) {
- if (!is(element, 'bpmn:Participant')) {
- return {};
- }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(element, 'bpmn:Lane') || (0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_4__.isLabel)(element)) {
+ canResize = false;
+ return;
+ }
+ });
- var bo = getBusinessObject(element).get('processRef'),
- properties = {};
+ return canResize;
+};
- properties[propertyName] = bo.get(propertyName);
- return properties;
- };
- },{"./CmdHelper":25,"bpmn-js/lib/util/ModelUtil":240}],33:[function(require,module,exports){
- module.exports = {
- __depends__: [
- require('./cmd'),
- require('diagram-js/lib/i18n/translate').default
- ],
- __init__: [ 'propertiesPanel' ],
- propertiesPanel: [ 'type', require('./PropertiesPanel') ]
- };
+/***/ }),
- },{"./PropertiesPanel":4,"./cmd":11,"diagram-js/lib/i18n/translate":401}],34:[function(require,module,exports){
- 'use strict';
+/***/ "../node_modules/bpmn-js/lib/features/auto-resize/index.js":
+/*!*****************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/auto-resize/index.js ***!
+ \*****************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var entryFactory = require('../../../factory/EntryFactory'),
- cmdHelper = require('../../../helper/CmdHelper');
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _BpmnAutoResize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BpmnAutoResize */ "../node_modules/bpmn-js/lib/features/auto-resize/BpmnAutoResize.js");
+/* harmony import */ var _BpmnAutoResizeProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BpmnAutoResizeProvider */ "../node_modules/bpmn-js/lib/features/auto-resize/BpmnAutoResizeProvider.js");
- var ModelUtil = require('bpmn-js/lib/util/ModelUtil'),
- is = ModelUtil.is,
- getBusinessObject = ModelUtil.getBusinessObject;
- module.exports = function(group, element, bpmnFactory, translate) {
- var getValue = function(businessObject) {
- return function(element) {
- var documentations = businessObject && businessObject.get('documentation'),
- text = (documentations && documentations.length > 0) ? documentations[0].text : '';
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __init__: [
+ 'bpmnAutoResize',
+ 'bpmnAutoResizeProvider'
+ ],
+ bpmnAutoResize: [ 'type', _BpmnAutoResize__WEBPACK_IMPORTED_MODULE_0__["default"] ],
+ bpmnAutoResizeProvider: [ 'type', _BpmnAutoResizeProvider__WEBPACK_IMPORTED_MODULE_1__["default"] ]
+});
- return { documentation: text };
- };
- };
- var setValue = function(businessObject) {
- return function(element, values) {
- var newObjectList = [];
+/***/ }),
- if (typeof values.documentation !== 'undefined' && values.documentation !== '') {
- newObjectList.push(bpmnFactory.create('bpmn:Documentation', {
- text: values.documentation
- }));
- }
+/***/ "../node_modules/bpmn-js/lib/features/context-pad/ContextPadProvider.js":
+/*!******************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/context-pad/ContextPadProvider.js ***!
+ \******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- return cmdHelper.setList(element, businessObject, 'documentation', newObjectList);
- };
- };
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ ContextPadProvider)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../modeling/util/ModelingUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
+/* harmony import */ var _modeling_util_LaneUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../modeling/util/LaneUtil */ "../node_modules/bpmn-js/lib/features/modeling/util/LaneUtil.js");
+/* harmony import */ var diagram_js_lib_util_Mouse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/util/Mouse */ "../node_modules/diagram-js/lib/util/Mouse.js");
- // Element Documentation
- var elementDocuEntry = entryFactory.textBox({
- id: 'documentation',
- label: translate('Element Documentation'),
- modelProperty: 'documentation'
- });
- elementDocuEntry.set = setValue(getBusinessObject(element));
- elementDocuEntry.get = getValue(getBusinessObject(element));
- group.entries.push(elementDocuEntry);
- var processRef;
- // Process Documentation when having a Collaboration Diagram
- if (is(element, 'bpmn:Participant')) {
- processRef = getBusinessObject(element).processRef;
- // do not show for collapsed Pools/Participants
- if (processRef) {
- var processDocuEntry = entryFactory.textBox({
- id: 'process-documentation',
- label: translate('Process Documentation'),
- modelProperty: 'documentation'
- });
- processDocuEntry.set = setValue(processRef);
- processDocuEntry.get = getValue(processRef);
- group.entries.push(processDocuEntry);
- }
- }
+/**
+ * @typedef {import('didi').Injector} Injector
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('diagram-js/lib/features/context-pad/ContextPad').default} ContextPad
+ * @typedef {import('../modeling/Modeling').default} Modeling
+ * @typedef {import('../modeling/ElementFactory').default} ElementFactory
+ * @typedef {import('diagram-js/lib/features/connect/Connect').default} Connect
+ * @typedef {import('diagram-js/lib/features/create/Create').default} Create
+ * @typedef {import('diagram-js/lib/features/popup-menu/PopupMenu').default} PopupMenu
+ * @typedef {import('diagram-js/lib/features/canvas/Canvas').default} Canvas
+ * @typedef {import('diagram-js/lib/features/rules/Rules').default} Rules
+ * @typedef {import('diagram-js/lib/i18n/translate/translate').default} Translate
+ *
+ * @typedef {import('../../model/Types').Element} Element
+ * @typedef {import('../../model/Types').ModdleElement} ModdleElement
+ *
+ * @typedef {import('diagram-js/lib/features/context-pad/ContextPadProvider').default} BaseContextPadProvider
+ * @typedef {import('diagram-js/lib/features/context-pad/ContextPadProvider').ContextPadEntries} ContextPadEntries
+ * @typedef {import('diagram-js/lib/features/context-pad/ContextPadProvider').ContextPadEntry} ContextPadEntry
+ *
+ * @typedef { { autoPlace?: boolean; } } ContextPadConfig
+ */
- };
+/**
+ * BPMN-specific context pad provider.
+ *
+ * @implements {BaseContextPadProvider}
+ *
+ * @param {ContextPadConfig} config
+ * @param {Injector} injector
+ * @param {EventBus} eventBus
+ * @param {ContextPad} contextPad
+ * @param {Modeling} modeling
+ * @param {ElementFactory} elementFactory
+ * @param {Connect} connect
+ * @param {Create} create
+ * @param {PopupMenu} popupMenu
+ * @param {Canvas} canvas
+ * @param {Rules} rules
+ * @param {Translate} translate
+ */
+function ContextPadProvider(
+ config, injector, eventBus,
+ contextPad, modeling, elementFactory,
+ connect, create, popupMenu,
+ canvas, rules, translate, appendPreview) {
+
+ config = config || {};
+
+ contextPad.registerProvider(this);
+
+ this._contextPad = contextPad;
+
+ this._modeling = modeling;
+
+ this._elementFactory = elementFactory;
+ this._connect = connect;
+ this._create = create;
+ this._popupMenu = popupMenu;
+ this._canvas = canvas;
+ this._rules = rules;
+ this._translate = translate;
+ this._eventBus = eventBus;
+ this._appendPreview = appendPreview;
+
+ if (config.autoPlace !== false) {
+ this._autoPlace = injector.get('autoPlace', false);
+ }
+
+ eventBus.on('create.end', 250, function(event) {
+ var context = event.context,
+ shape = context.shape;
+
+ if (!(0,diagram_js_lib_util_Mouse__WEBPACK_IMPORTED_MODULE_0__.hasPrimaryModifier)(event) || !contextPad.isOpen(shape)) {
+ return;
+ }
+
+ var entries = contextPad.getEntries(shape);
+
+ if (entries.replace) {
+ entries.replace.action.click(event, shape);
+ }
+ });
+}
+
+ContextPadProvider.$inject = [
+ 'config.contextPad',
+ 'injector',
+ 'eventBus',
+ 'contextPad',
+ 'modeling',
+ 'elementFactory',
+ 'connect',
+ 'create',
+ 'popupMenu',
+ 'canvas',
+ 'rules',
+ 'translate',
+ 'appendPreview'
+];
+
+/**
+ * @param {Element[]} elements
+ *
+ * @return {ContextPadEntries}
+ */
+ContextPadProvider.prototype.getMultiElementContextPadEntries = function(elements) {
+ var modeling = this._modeling;
+
+ var actions = {};
+
+ if (this._isDeleteAllowed(elements)) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, {
+ 'delete': {
+ group: 'edit',
+ className: 'bpmn-icon-trash',
+ title: this._translate('Delete'),
+ action: {
+ click: function(event, elements) {
+ modeling.removeElements(elements.slice());
+ }
+ }
+ }
+ });
+ }
+
+ return actions;
+};
+
+/**
+ * @param {Element[]} elements
+ *
+ * @return {boolean}
+ */
+ContextPadProvider.prototype._isDeleteAllowed = function(elements) {
+
+ var baseAllowed = this._rules.allowed('elements.delete', {
+ elements: elements
+ });
- },{"../../../factory/EntryFactory":14,"../../../helper/CmdHelper":25,"bpmn-js/lib/util/ModelUtil":240}],35:[function(require,module,exports){
- 'use strict';
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isArray)(baseAllowed)) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.every)(baseAllowed, function(element) {
+ return includes(baseAllowed, element);
+ });
+ }
- var is = require('bpmn-js/lib/util/ModelUtil').is,
- isAny = require('bpmn-js/lib/features/modeling/util/ModelingUtil').isAny,
- getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject,
- eventDefinitionHelper = require('../../../helper/EventDefinitionHelper');
+ return baseAllowed;
+};
- var forEach = require('lodash/forEach');
+/**
+ * @param {Element} element
+ *
+ * @return {ContextPadEntries}
+ */
+ContextPadProvider.prototype.getContextPadEntries = function(element) {
+ var contextPad = this._contextPad,
+ modeling = this._modeling,
+ elementFactory = this._elementFactory,
+ connect = this._connect,
+ create = this._create,
+ popupMenu = this._popupMenu,
+ rules = this._rules,
+ autoPlace = this._autoPlace,
+ translate = this._translate,
+ appendPreview = this._appendPreview;
- var message = require('./implementation/MessageEventDefinition'),
- signal = require('./implementation/SignalEventDefinition'),
- error = require('./implementation/ErrorEventDefinition'),
- escalation = require('./implementation/EscalationEventDefinition'),
- timer = require('./implementation/TimerEventDefinition'),
- compensation = require('./implementation/CompensateEventDefinition'),
- condition = require('./implementation/ConditionalEventDefinition');
+ var actions = {};
+ if (element.type === 'label') {
+ return actions;
+ }
- module.exports = function(group, element, bpmnFactory, elementRegistry, translate) {
- var events = [
- 'bpmn:StartEvent',
- 'bpmn:EndEvent',
- 'bpmn:IntermediateThrowEvent',
- 'bpmn:BoundaryEvent',
- 'bpmn:IntermediateCatchEvent'
- ];
+ var businessObject = element.businessObject;
- // Message and Signal Event Definition
- forEach(events, function(event) {
- if (is(element, event)) {
+ function startConnect(event, element) {
+ connect.start(event, element);
+ }
- var messageEventDefinition = eventDefinitionHelper.getMessageEventDefinition(element),
- signalEventDefinition = eventDefinitionHelper.getSignalEventDefinition(element);
+ function removeElement(e, element) {
+ modeling.removeElements([ element ]);
+ }
- if (messageEventDefinition) {
- message(group, element, bpmnFactory, messageEventDefinition, translate);
- }
+ function getReplaceMenuPosition(element) {
- if (signalEventDefinition) {
- signal(group, element, bpmnFactory, signalEventDefinition, translate);
- }
+ var Y_OFFSET = 5;
- }
- });
+ var pad = contextPad.getPad(element).html;
- // Special Case: Receive Task
- if (is(element, 'bpmn:ReceiveTask')) {
- message(group, element, bpmnFactory, getBusinessObject(element), translate);
- }
+ var padRect = pad.getBoundingClientRect();
- // Error Event Definition
- var errorEvents = [
- 'bpmn:StartEvent',
- 'bpmn:BoundaryEvent',
- 'bpmn:EndEvent'
- ];
+ var pos = {
+ x: padRect.left,
+ y: padRect.bottom + Y_OFFSET
+ };
- forEach(errorEvents, function(event) {
- if (is(element, event)) {
+ return pos;
+ }
- var errorEventDefinition = eventDefinitionHelper.getErrorEventDefinition(element);
+ /**
+ * Create an append action.
+ *
+ * @param {string} type
+ * @param {string} className
+ * @param {string} title
+ * @param {Object} [options]
+ *
+ * @return {ContextPadEntry}
+ */
+ function appendAction(type, className, title, options) {
- if (errorEventDefinition) {
+ function appendStart(event, element) {
- error(group, element, bpmnFactory, errorEventDefinition, translate);
- }
- }
- });
+ var shape = elementFactory.createShape((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)({ type: type }, options));
- // Escalation Event Definition
- var escalationEvents = [
- 'bpmn:StartEvent',
- 'bpmn:BoundaryEvent',
- 'bpmn:IntermediateThrowEvent',
- 'bpmn:EndEvent'
- ];
+ create.start(event, shape, {
+ source: element
+ });
- forEach(escalationEvents, function(event) {
- if (is(element, event)) {
+ appendPreview.cleanUp();
+ }
- var showEscalationCodeVariable = is(element, 'bpmn:StartEvent') || is(element, 'bpmn:BoundaryEvent');
+ var append = autoPlace ? function(_, element) {
+ var shape = elementFactory.createShape((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)({ type: type }, options));
- // get business object
- var escalationEventDefinition = eventDefinitionHelper.getEscalationEventDefinition(element);
+ autoPlace.append(element, shape);
- if (escalationEventDefinition) {
- escalation(group, element, bpmnFactory, escalationEventDefinition, showEscalationCodeVariable,
- translate);
- }
- }
+ appendPreview.cleanUp();
+ } : appendStart;
- });
+ var previewAppend = autoPlace ? function(_, element) {
- // Timer Event Definition
- var timerEvents = [
- 'bpmn:StartEvent',
- 'bpmn:BoundaryEvent',
- 'bpmn:IntermediateCatchEvent'
- ];
+ // mouseover
+ appendPreview.create(element, type, options);
- forEach(timerEvents, function(event) {
- if (is(element, event)) {
+ return () => {
- // get business object
- var timerEventDefinition = eventDefinitionHelper.getTimerEventDefinition(element);
+ // mouseout
+ appendPreview.cleanUp();
+ };
+ } : null;
- if (timerEventDefinition) {
- timer(group, element, bpmnFactory, timerEventDefinition, translate);
- }
- }
- });
+ return {
+ group: 'model',
+ className: className,
+ title: title,
+ action: {
+ dragstart: appendStart,
+ click: append,
+ hover: previewAppend
+ }
+ };
+ }
- // Compensate Event Definition
- var compensationEvents = [
- 'bpmn:EndEvent',
- 'bpmn:IntermediateThrowEvent'
- ];
+ function splitLaneHandler(count) {
- forEach(compensationEvents, function(event) {
- if (is(element, event)) {
+ return function(_, element) {
- // get business object
- var compensateEventDefinition = eventDefinitionHelper.getCompensateEventDefinition(element);
+ // actual split
+ modeling.splitLane(element, count);
- if (compensateEventDefinition) {
- compensation(group, element, bpmnFactory, compensateEventDefinition, elementRegistry, translate);
- }
- }
- });
+ // refresh context pad after split to
+ // get rid of split icons
+ contextPad.open(element, true);
+ };
+ }
- // Conditional Event Definition
- var conditionalEvents = [
- 'bpmn:StartEvent',
- 'bpmn:BoundaryEvent',
- 'bpmn:IntermediateThrowEvent',
- 'bpmn:IntermediateCatchEvent'
- ];
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.isAny)(businessObject, [ 'bpmn:Lane', 'bpmn:Participant' ]) && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_3__.isExpanded)(element)) {
- if (isAny(element, conditionalEvents)) {
+ var childLanes = (0,_modeling_util_LaneUtil__WEBPACK_IMPORTED_MODULE_4__.getChildLanes)(element);
- // get business object
- var conditionalEventDefinition = eventDefinitionHelper.getConditionalEventDefinition(element);
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, {
+ 'lane-insert-above': {
+ group: 'lane-insert-above',
+ className: 'bpmn-icon-lane-insert-above',
+ title: translate('Add lane above'),
+ action: {
+ click: function(event, element) {
+ modeling.addLane(element, 'top');
+ }
+ }
+ }
+ });
- if (conditionalEventDefinition) {
- condition(group, element, bpmnFactory, conditionalEventDefinition, elementRegistry, translate);
- }
+ if (childLanes.length < 2) {
+
+ if (element.height >= 120) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, {
+ 'lane-divide-two': {
+ group: 'lane-divide',
+ className: 'bpmn-icon-lane-divide-two',
+ title: translate('Divide into two lanes'),
+ action: {
+ click: splitLaneHandler(2)
}
+ }
+ });
+ }
+
+ if (element.height >= 180) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, {
+ 'lane-divide-three': {
+ group: 'lane-divide',
+ className: 'bpmn-icon-lane-divide-three',
+ title: translate('Divide into three lanes'),
+ action: {
+ click: splitLaneHandler(3)
+ }
+ }
+ });
+ }
+ }
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, {
+ 'lane-insert-below': {
+ group: 'lane-insert-below',
+ className: 'bpmn-icon-lane-insert-below',
+ title: translate('Add lane below'),
+ action: {
+ click: function(event, element) {
+ modeling.addLane(element, 'bottom');
+ }
+ }
+ }
+ });
+
+ }
+
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:FlowNode')) {
+
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:EventBasedGateway')) {
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, {
+ 'append.receive-task': appendAction(
+ 'bpmn:ReceiveTask',
+ 'bpmn-icon-receive-task',
+ translate('Append receive task')
+ ),
+ 'append.message-intermediate-event': appendAction(
+ 'bpmn:IntermediateCatchEvent',
+ 'bpmn-icon-intermediate-event-catch-message',
+ translate('Append message intermediate catch event'),
+ { eventDefinitionType: 'bpmn:MessageEventDefinition' }
+ ),
+ 'append.timer-intermediate-event': appendAction(
+ 'bpmn:IntermediateCatchEvent',
+ 'bpmn-icon-intermediate-event-catch-timer',
+ translate('Append timer intermediate catch event'),
+ { eventDefinitionType: 'bpmn:TimerEventDefinition' }
+ ),
+ 'append.condition-intermediate-event': appendAction(
+ 'bpmn:IntermediateCatchEvent',
+ 'bpmn-icon-intermediate-event-catch-condition',
+ translate('Append conditional intermediate catch event'),
+ { eventDefinitionType: 'bpmn:ConditionalEventDefinition' }
+ ),
+ 'append.signal-intermediate-event': appendAction(
+ 'bpmn:IntermediateCatchEvent',
+ 'bpmn-icon-intermediate-event-catch-signal',
+ translate('Append signal intermediate catch event'),
+ { eventDefinitionType: 'bpmn:SignalEventDefinition' }
+ )
+ });
+ } else
+
+ if (isEventType(businessObject, 'bpmn:BoundaryEvent', 'bpmn:CompensateEventDefinition')) {
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, {
+ 'append.compensation-activity':
+ appendAction(
+ 'bpmn:Task',
+ 'bpmn-icon-task',
+ translate('Append compensation activity'),
+ {
+ isForCompensation: true
+ }
+ )
+ });
+ } else
+
+ if (!(0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:EndEvent') &&
+ !businessObject.isForCompensation &&
+ !isEventType(businessObject, 'bpmn:IntermediateThrowEvent', 'bpmn:LinkEventDefinition') &&
+ !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_3__.isEventSubProcess)(businessObject)) {
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, {
+ 'append.end-event': appendAction(
+ 'bpmn:EndEvent',
+ 'bpmn-icon-end-event-none',
+ translate('Append end event')
+ ),
+ 'append.gateway': appendAction(
+ 'bpmn:ExclusiveGateway',
+ 'bpmn-icon-gateway-none',
+ translate('Append gateway')
+ ),
+ 'append.append-task': appendAction(
+ 'bpmn:Task',
+ 'bpmn-icon-task',
+ translate('Append task')
+ ),
+ 'append.intermediate-event': appendAction(
+ 'bpmn:IntermediateThrowEvent',
+ 'bpmn-icon-intermediate-event-none',
+ translate('Append intermediate/boundary event')
+ )
+ });
+ }
+ }
+
+ if (!popupMenu.isEmpty(element, 'bpmn-replace')) {
+
+ // Replace menu entry
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, {
+ 'replace': {
+ group: 'edit',
+ className: 'bpmn-icon-screw-wrench',
+ title: translate('Change element'),
+ action: {
+ click: function(event, element) {
+
+ var position = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(getReplaceMenuPosition(element), {
+ cursor: { x: event.x, y: event.y }
+ });
+
+ popupMenu.open(element, 'bpmn-replace', position, {
+ title: translate('Change element'),
+ width: 300,
+ search: true
+ });
+ }
+ }
+ }
+ });
+ }
+
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:SequenceFlow')) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, {
+ 'append.text-annotation': appendAction(
+ 'bpmn:TextAnnotation',
+ 'bpmn-icon-text-annotation',
+ translate('Add text annotation')
+ )
+ });
+ }
+
+ if (
+ (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.isAny)(businessObject, [
+ 'bpmn:FlowNode',
+ 'bpmn:InteractionNode',
+ 'bpmn:DataObjectReference',
+ 'bpmn:DataStoreReference',
+ ])
+ ) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, {
+ 'append.text-annotation': appendAction(
+ 'bpmn:TextAnnotation',
+ 'bpmn-icon-text-annotation',
+ translate('Add text annotation')
+ ),
+
+ 'connect': {
+ group: 'connect',
+ className: 'bpmn-icon-connection-multi',
+ title: translate('Connect to other element'),
+ action: {
+ click: startConnect,
+ dragstart: startConnect,
+ },
+ },
+ });
+ }
+
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:TextAnnotation')) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, {
+ 'connect': {
+ group: 'connect',
+ className: 'bpmn-icon-connection-multi',
+ title: translate('Connect using association'),
+ action: {
+ click: startConnect,
+ dragstart: startConnect,
+ },
+ },
+ });
+ }
+
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.isAny)(businessObject, [ 'bpmn:DataObjectReference', 'bpmn:DataStoreReference' ])) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, {
+ 'connect': {
+ group: 'connect',
+ className: 'bpmn-icon-connection-multi',
+ title: translate('Connect using data input association'),
+ action: {
+ click: startConnect,
+ dragstart: startConnect
+ }
+ }
+ });
+ }
+
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:Group')) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, {
+ 'append.text-annotation': appendAction(
+ 'bpmn:TextAnnotation',
+ 'bpmn-icon-text-annotation',
+ translate('Add text annotation')
+ )
+ });
+ }
+
+ // delete element entry, only show if allowed by rules
+ var deleteAllowed = rules.allowed('elements.delete', { elements: [ element ] });
+
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isArray)(deleteAllowed)) {
+
+ // was the element returned as a deletion candidate?
+ deleteAllowed = deleteAllowed[0] === element;
+ }
+
+ if (deleteAllowed) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, {
+ 'delete': {
+ group: 'edit',
+ className: 'bpmn-icon-trash',
+ title: translate('Delete'),
+ action: {
+ click: removeElement
+ }
+ }
+ });
+ }
+
+ return actions;
+};
+
+
+// helpers /////////
+
+/**
+ * @param {ModdleElement} businessObject
+ * @param {string} type
+ * @param {string} eventDefinitionType
+ *
+ * @return {boolean}
+ */
+function isEventType(businessObject, type, eventDefinitionType) {
- };
+ var isType = businessObject.$instanceOf(type);
+ var isDefinition = false;
- },{"../../../helper/EventDefinitionHelper":27,"./implementation/CompensateEventDefinition":41,"./implementation/ConditionalEventDefinition":42,"./implementation/ErrorEventDefinition":44,"./implementation/EscalationEventDefinition":45,"./implementation/MessageEventDefinition":47,"./implementation/SignalEventDefinition":49,"./implementation/TimerEventDefinition":50,"bpmn-js/lib/features/modeling/util/ModelingUtil":211,"bpmn-js/lib/util/ModelUtil":240,"lodash/forEach":613}],36:[function(require,module,exports){
- 'use strict';
+ var definitions = businessObject.eventDefinitions || [];
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(definitions, function(def) {
+ if (def.$type === eventDefinitionType) {
+ isDefinition = true;
+ }
+ });
- var is = require('bpmn-js/lib/util/ModelUtil').is,
- getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject;
+ return isType && isDefinition;
+}
- var entryFactory = require('../../../factory/EntryFactory');
+function includes(array, item) {
+ return array.indexOf(item) !== -1;
+}
- var participantHelper = require('../../../helper/ParticipantHelper');
+/***/ }),
- module.exports = function(group, element, translate) {
+/***/ "../node_modules/bpmn-js/lib/features/context-pad/index.js":
+/*!*****************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/context-pad/index.js ***!
+ \*****************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var bo = getBusinessObject(element);
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _append_preview__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../append-preview */ "../node_modules/bpmn-js/lib/features/append-preview/index.js");
+/* harmony import */ var diagram_js_direct_editing__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js-direct-editing */ "../node_modules/diagram-js-direct-editing/lib/index.js");
+/* harmony import */ var diagram_js_lib_features_context_pad__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/features/context-pad */ "../node_modules/diagram-js/lib/features/context-pad/index.js");
+/* harmony import */ var diagram_js_lib_features_selection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/features/selection */ "../node_modules/diagram-js/lib/features/selection/index.js");
+/* harmony import */ var diagram_js_lib_features_connect__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! diagram-js/lib/features/connect */ "../node_modules/diagram-js/lib/features/connect/index.js");
+/* harmony import */ var diagram_js_lib_features_create__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! diagram-js/lib/features/create */ "../node_modules/diagram-js/lib/features/create/index.js");
+/* harmony import */ var _popup_menu__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../popup-menu */ "../node_modules/bpmn-js/lib/features/popup-menu/index.js");
+/* harmony import */ var _ContextPadProvider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ContextPadProvider */ "../node_modules/bpmn-js/lib/features/context-pad/ContextPadProvider.js");
- if (!bo) {
- return;
- }
- if (is(element, 'bpmn:Process') || (is(element, 'bpmn:Participant') && bo.get('processRef'))) {
- var executableEntry = entryFactory.checkbox({
- id: 'process-is-executable',
- label: translate('Executable'),
- modelProperty: 'isExecutable'
- });
- // in participants we have to change the default behavior of set and get
- if (is(element, 'bpmn:Participant')) {
- executableEntry.get = function(element) {
- return participantHelper.getProcessBusinessObject(element, 'isExecutable');
- };
- executableEntry.set = function(element, values) {
- return participantHelper.modifyProcessBusinessObject(element, 'isExecutable', values);
- };
- }
- group.entries.push(executableEntry);
- }
- };
- },{"../../../factory/EntryFactory":14,"../../../helper/ParticipantHelper":32,"bpmn-js/lib/util/ModelUtil":240}],37:[function(require,module,exports){
- 'use strict';
- var entryFactory = require('../../../factory/EntryFactory'),
- getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject,
- utils = require('../../../Utils'),
- cmdHelper = require('../../../helper/CmdHelper');
- module.exports = function(group, element, translate, options) {
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ _append_preview__WEBPACK_IMPORTED_MODULE_1__["default"],
+ diagram_js_direct_editing__WEBPACK_IMPORTED_MODULE_0__["default"],
+ diagram_js_lib_features_context_pad__WEBPACK_IMPORTED_MODULE_2__["default"],
+ diagram_js_lib_features_selection__WEBPACK_IMPORTED_MODULE_3__["default"],
+ diagram_js_lib_features_connect__WEBPACK_IMPORTED_MODULE_4__["default"],
+ diagram_js_lib_features_create__WEBPACK_IMPORTED_MODULE_5__["default"],
+ _popup_menu__WEBPACK_IMPORTED_MODULE_6__["default"]
+ ],
+ __init__: [ 'contextPadProvider' ],
+ contextPadProvider: [ 'type', _ContextPadProvider__WEBPACK_IMPORTED_MODULE_7__["default"] ]
+});
- var description = options && options.description;
+/***/ }),
- // Id
- group.entries.push(entryFactory.validationAwareTextField({
- id: 'id',
- label: translate('Id'),
- description: description && translate(description),
- modelProperty: 'id',
- getProperty: function(element) {
- return getBusinessObject(element).id;
- },
- setProperty: function(element, properties) {
+/***/ "../node_modules/bpmn-js/lib/features/copy-paste/BpmnCopyPaste.js":
+/*!************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/copy-paste/BpmnCopyPaste.js ***!
+ \************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- element = element.labelTarget || element;
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BpmnCopyPaste)
+/* harmony export */ });
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/LabelUtil */ "../node_modules/diagram-js/lib/util/ModelUtil.js");
- return cmdHelper.updateProperties(element, properties);
- },
- validate: function(element, values) {
- var idValue = values.id;
- var bo = getBusinessObject(element);
- var idError = utils.isIdValid(bo, idValue, translate);
- return idError ? { id: idError } : {};
- }
- }));
- };
- },{"../../../Utils":5,"../../../factory/EntryFactory":14,"../../../helper/CmdHelper":25,"bpmn-js/lib/util/ModelUtil":240}],38:[function(require,module,exports){
- 'use strict';
+/**
+ * @typedef {import('../modeling/BpmnFactory').default} BpmnFactory
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('./ModdleCopy').default} ModdleCopy
+ */
- var is = require('bpmn-js/lib/util/ModelUtil').is,
- getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject,
- entryFactory = require('../../../factory/EntryFactory'),
- cmdHelper = require('../../../helper/CmdHelper');
+function copyProperties(source, target, properties) {
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(properties)) {
+ properties = [ properties ];
+ }
- var forEach = require('lodash/forEach');
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(properties, function(property) {
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isUndefined)(source[property])) {
+ target[property] = source[property];
+ }
+ });
+}
- function getLinkEventDefinition(element) {
+var LOW_PRIORITY = 750;
- var bo = getBusinessObject(element);
+/**
+ * BPMN-specific copy & paste.
+ *
+ * @param {BpmnFactory} bpmnFactory
+ * @param {EventBus} eventBus
+ * @param {ModdleCopy} moddleCopy
+ */
+function BpmnCopyPaste(bpmnFactory, eventBus, moddleCopy) {
- var linkEventDefinition = null;
- if (bo.eventDefinitions) {
- forEach(bo.eventDefinitions, function(eventDefinition) {
- if (is(eventDefinition, 'bpmn:LinkEventDefinition')) {
- linkEventDefinition = eventDefinition;
- }
- });
- }
+ function copy(bo, clone) {
+ var targetBo = bpmnFactory.create(bo.$type);
- return linkEventDefinition;
- }
+ return moddleCopy.copyElement(bo, targetBo, null, clone);
+ }
- module.exports = function(group, element, translate) {
- var linkEvents = [ 'bpmn:IntermediateThrowEvent', 'bpmn:IntermediateCatchEvent' ];
+ eventBus.on('copyPaste.copyElement', LOW_PRIORITY, function(context) {
+ var descriptor = context.descriptor,
+ element = context.element,
+ businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(element);
- forEach(linkEvents, function(event) {
- if (is(element, event)) {
+ // do not copy business object + di for labels;
+ // will be pulled from the referenced label target
+ if ((0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_2__.isLabel)(element)) {
+ return descriptor;
+ }
- var linkEventDefinition = getLinkEventDefinition(element);
+ var businessObjectCopy = descriptor.businessObject = copy(businessObject, true);
+ var diCopy = descriptor.di = copy((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getDi)(element), true);
+ diCopy.bpmnElement = businessObjectCopy;
- if (linkEventDefinition) {
- var entry = entryFactory.textField({
- id: 'link-event',
- label: translate('Link Name'),
- modelProperty: 'link-name'
- });
+ copyProperties(businessObjectCopy, descriptor, 'name');
+ copyProperties(diCopy, descriptor, 'isExpanded');
- entry.get = function() {
- return { 'link-name': linkEventDefinition.get('name') };
- };
+ // default sequence flow
+ if (businessObject.default) {
+ descriptor.default = businessObject.default.id;
+ }
+ });
- entry.set = function(element, values) {
- var newProperties = {
- name: values['link-name']
- };
- return cmdHelper.updateBusinessObject(element, linkEventDefinition, newProperties);
- };
+ var referencesKey = '-bpmn-js-refs';
- group.entries.push(entry);
- }
- }
- });
- };
+ function getReferences(cache) {
+ return (cache[referencesKey] = cache[referencesKey] || {});
+ }
+ function setReferences(cache, references) {
+ cache[referencesKey] = references;
+ }
- },{"../../../factory/EntryFactory":14,"../../../helper/CmdHelper":25,"bpmn-js/lib/util/ModelUtil":240,"lodash/forEach":613}],39:[function(require,module,exports){
- 'use strict';
+ function resolveReferences(descriptor, cache, references) {
+ var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(descriptor);
- var nameEntryFactory = require('./implementation/Name'),
- createCategoryValue = require('../../../helper/CategoryHelper').createCategoryValue,
- is = require('bpmn-js/lib/util/ModelUtil').is,
- getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject;
+ // default sequence flows
+ if (descriptor.default) {
- module.exports = function(group, element, bpmnFactory, canvas, translate) {
+ // relationship cannot be resolved immediately
+ references[ descriptor.default ] = {
+ element: businessObject,
+ property: 'default'
+ };
+ }
- function initializeCategory(semantic) {
- var rootElement = canvas.getRootElement(),
- definitions = getBusinessObject(rootElement).$parent,
- categoryValue = createCategoryValue(definitions, bpmnFactory);
+ // boundary events
+ if (descriptor.host) {
- semantic.categoryValueRef = categoryValue;
+ // relationship can be resolved immediately
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(descriptor).attachedToRef = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(cache[ descriptor.host ]);
+ }
- }
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.omit)(references, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.reduce)(references, function(array, reference, key) {
+ var element = reference.element,
+ property = reference.property;
- function setGroupName(element, values) {
- var bo = getBusinessObject(element),
- categoryValueRef = bo.categoryValueRef;
+ if (key === descriptor.id) {
+ element.set(property, businessObject);
- if (!categoryValueRef) {
- initializeCategory(bo);
- }
+ array.push(descriptor.id);
+ }
- // needs direct call to update categoryValue properly
- return {
- cmd: 'element.updateLabel',
- context: {
- element: element,
- newLabel: values.categoryValue
- }
- };
- }
+ return array;
+ }, []));
+ }
- function getGroupName(element) {
- var bo = getBusinessObject(element),
- value = (bo.categoryValueRef || {}).value;
+ eventBus.on('copyPaste.pasteElement', function(context) {
+ var cache = context.cache,
+ descriptor = context.descriptor,
+ businessObject = descriptor.businessObject,
+ di = descriptor.di;
- return { categoryValue: value };
- }
+ // wire existing di + businessObject for external label
+ if ((0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_2__.isLabel)(descriptor)) {
+ descriptor.businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(cache[ descriptor.labelTarget ]);
+ descriptor.di = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getDi)(cache[ descriptor.labelTarget ]);
+
+ return;
+ }
+
+ businessObject = descriptor.businessObject = copy(businessObject);
+
+ di = descriptor.di = copy(di);
+ di.bpmnElement = businessObject;
+
+ copyProperties(descriptor, businessObject, [
+ 'isExpanded',
+ 'name'
+ ]);
+
+ descriptor.type = businessObject.$type;
+ });
+
+ // copy + paste processRef with participant
+
+ eventBus.on('copyPaste.copyElement', LOW_PRIORITY, function(context) {
+ var descriptor = context.descriptor,
+ element = context.element;
+
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(element, 'bpmn:Participant')) {
+ return;
+ }
+
+ var participantBo = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(element);
+
+ if (participantBo.processRef) {
+ descriptor.processRef = copy(participantBo.processRef, true);
+ }
+ });
+
+ eventBus.on('copyPaste.pasteElement', function(context) {
+ var descriptor = context.descriptor,
+ processRef = descriptor.processRef;
+
+ if (processRef) {
+ descriptor.processRef = copy(processRef);
+ }
+ });
+
+ // resolve references
- if (!is(element, 'bpmn:Collaboration')) {
+ eventBus.on('copyPaste.pasteElement', LOW_PRIORITY, function(context) {
+ var cache = context.cache,
+ descriptor = context.descriptor;
+
+ // resolve references e.g. default sequence flow
+ setReferences(
+ cache,
+ resolveReferences(descriptor, cache, getReferences(cache))
+ );
+ });
- var options;
- if (is(element, 'bpmn:TextAnnotation')) {
- options = { modelProperty: 'text', label: translate('Text') };
- } else if (is(element, 'bpmn:Group')) {
- options = {
- modelProperty: 'categoryValue',
- label: translate('Category Value'),
- get: getGroupName,
- set: setGroupName
- };
- }
+}
+
+
+BpmnCopyPaste.$inject = [
+ 'bpmnFactory',
+ 'eventBus',
+ 'moddleCopy'
+];
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/features/copy-paste/ModdleCopy.js":
+/*!*********************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/copy-paste/ModdleCopy.js ***!
+ \*********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ ModdleCopy),
+/* harmony export */ getPropertyNames: () => (/* binding */ getPropertyNames)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+
+
+var DISALLOWED_PROPERTIES = [
+ 'artifacts',
+ 'dataInputAssociations',
+ 'dataOutputAssociations',
+ 'default',
+ 'flowElements',
+ 'lanes',
+ 'incoming',
+ 'outgoing',
+ 'categoryValue'
+];
+
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../modeling/BpmnFactory').default} BpmnFactory
+ * @typedef {import('../../model/Types').Moddle} Moddle
+ *
+ * @typedef {import('../../model/Types').ModdleElement} ModdleElement
+ */
- // name
- group.entries = group.entries.concat(nameEntryFactory(element, options, translate));
+/**
+ * Utility for copying model properties from source element to target element.
+ *
+ * @param {EventBus} eventBus
+ * @param {BpmnFactory} bpmnFactory
+ * @param {Moddle} moddle
+ */
+function ModdleCopy(eventBus, bpmnFactory, moddle) {
+ this._bpmnFactory = bpmnFactory;
+ this._eventBus = eventBus;
+ this._moddle = moddle;
+
+ // copy extension elements last
+ eventBus.on('moddleCopy.canCopyProperties', function(context) {
+ var propertyNames = context.propertyNames;
+
+ if (!propertyNames || !propertyNames.length) {
+ return;
+ }
+
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.sortBy)(propertyNames, function(propertyName) {
+ return propertyName === 'extensionElements';
+ });
+ });
+
+ // default check whether property can be copied
+ eventBus.on('moddleCopy.canCopyProperty', function(context) {
+ var parent = context.parent,
+ parentDescriptor = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isObject)(parent) && parent.$descriptor,
+ propertyName = context.propertyName;
+
+ if (propertyName && DISALLOWED_PROPERTIES.indexOf(propertyName) !== -1) {
+
+ // disallow copying property
+ return false;
+ }
+
+ if (propertyName &&
+ parentDescriptor &&
+ !(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(parentDescriptor.properties, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.matchPattern)({ name: propertyName }))) {
+
+ // disallow copying property
+ return false;
+ }
+ });
+
+ // do NOT allow to copy empty extension elements
+ eventBus.on('moddleCopy.canSetCopiedProperty', function(context) {
+ var property = context.property;
+
+ if (is(property, 'bpmn:ExtensionElements') && (!property.values || !property.values.length)) {
+
+ // disallow setting copied property
+ return false;
+ }
+ });
+}
+
+ModdleCopy.$inject = [
+ 'eventBus',
+ 'bpmnFactory',
+ 'moddle'
+];
+
+/**
+ * Copy model properties of source element to target element.
+ *
+ * @param {ModdleElement} sourceElement
+ * @param {ModdleElement} targetElement
+ * @param {string[]} [propertyNames]
+ * @param {boolean} [clone=false]
+ *
+ * @return {ModdleElement}
+ */
+ModdleCopy.prototype.copyElement = function(sourceElement, targetElement, propertyNames, clone = false) {
+ var self = this;
- }
+ if (propertyNames && !(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(propertyNames)) {
+ propertyNames = [ propertyNames ];
+ }
- };
+ propertyNames = propertyNames || getPropertyNames(sourceElement.$descriptor);
- },{"../../../helper/CategoryHelper":24,"./implementation/Name":48,"bpmn-js/lib/util/ModelUtil":240}],40:[function(require,module,exports){
- 'use strict';
+ var canCopyProperties = this._eventBus.fire('moddleCopy.canCopyProperties', {
+ propertyNames: propertyNames,
+ sourceElement: sourceElement,
+ targetElement: targetElement,
+ clone: clone
+ });
- var is = require('bpmn-js/lib/util/ModelUtil').is,
- entryFactory = require('../../../factory/EntryFactory'),
- participantHelper = require('../../../helper/ParticipantHelper'),
- getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject,
- nameEntryFactory = require('./implementation/Name'),
- utils = require('../../../Utils');
+ if (canCopyProperties === false) {
+ return targetElement;
+ }
- module.exports = function(group, element, translate, options) {
- var businessObject = getBusinessObject(element);
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(canCopyProperties)) {
+ propertyNames = canCopyProperties;
+ }
- var processIdDescription = options && options.processIdDescription;
+ // copy properties
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(propertyNames, function(propertyName) {
+ var sourceProperty;
- if (is(element, 'bpmn:Process') || (is(element, 'bpmn:Participant') && businessObject.get('processRef'))) {
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.has)(sourceElement, propertyName)) {
+ sourceProperty = sourceElement.get(propertyName);
+ }
- /**
- * processId
- */
- if (is(element, 'bpmn:Participant')) {
- var idEntry = entryFactory.validationAwareTextField({
- id: 'process-id',
- label: translate('Process Id'),
- description: processIdDescription && translate(processIdDescription),
- modelProperty: 'processId'
- });
+ var copiedProperty = self.copyProperty(sourceProperty, targetElement, propertyName, clone);
- // in participants we have to change the default behavior of set and get
- idEntry.get = function(element) {
- var properties = participantHelper.getProcessBusinessObject(element, 'id');
- return { processId: properties.id };
- };
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isDefined)(copiedProperty)) {
+ return;
+ }
- idEntry.set = function(element, values) {
- return participantHelper.modifyProcessBusinessObject(element, 'id', { id: values.processId });
- };
+ var canSetProperty = self._eventBus.fire('moddleCopy.canSetCopiedProperty', {
+ parent: targetElement,
+ property: copiedProperty,
+ propertyName: propertyName
+ });
- idEntry.validate = function(element, values) {
- var idValue = values.processId;
+ if (canSetProperty === false) {
+ return;
+ }
- var bo = getBusinessObject(element);
+ // TODO(nikku): unclaim old IDs if ID property is copied over
+ // this._moddle.getPropertyDescriptor(parent, propertyName)
+ targetElement.set(propertyName, copiedProperty);
+ });
- var processIdError = utils.isIdValid(bo.processRef, idValue, translate);
+ return targetElement;
+};
- return processIdError ? { processId: processIdError } : {};
- };
+/**
+ * Copy model property.
+ *
+ * @param {any} property
+ * @param {ModdleElement} parent
+ * @param {string} propertyName
+ * @param {boolean} [clone=false]
+ *
+ * @return {any}
+ */
+ModdleCopy.prototype.copyProperty = function(property, parent, propertyName, clone = false) {
+ var self = this;
- group.entries.push(idEntry);
+ // allow others to copy property
+ var copiedProperty = this._eventBus.fire('moddleCopy.canCopyProperty', {
+ parent: parent,
+ property: property,
+ propertyName: propertyName,
+ clone: clone
+ });
+ // return if copying is NOT allowed
+ if (copiedProperty === false) {
+ return;
+ }
+
+ if (copiedProperty) {
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isObject)(copiedProperty) && copiedProperty.$type && !copiedProperty.$parent) {
+ copiedProperty.$parent = parent;
+ }
+
+ return copiedProperty;
+ }
- /**
- * process name
- */
- var processNameEntry = nameEntryFactory(element, {
- id: 'process-name',
- label: translate('Process Name')
- })[0];
+ var propertyDescriptor = this._moddle.getPropertyDescriptor(parent, propertyName);
- // in participants we have to change the default behavior of set and get
- processNameEntry.get = function(element) {
- return participantHelper.getProcessBusinessObject(element, 'name');
- };
+ // do NOT copy references
+ if (propertyDescriptor.isReference) {
+ return;
+ }
- processNameEntry.set = function(element, values) {
- return participantHelper.modifyProcessBusinessObject(element, 'name', values);
- };
+ // copy id
+ if (propertyDescriptor.isId) {
+ return property && this._copyId(property, parent, clone);
+ }
- group.entries.push(processNameEntry);
- }
- }
- };
+ // copy arrays
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(property)) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.reduce)(property, function(childProperties, childProperty) {
- },{"../../../Utils":5,"../../../factory/EntryFactory":14,"../../../helper/ParticipantHelper":32,"./implementation/Name":48,"bpmn-js/lib/util/ModelUtil":240}],41:[function(require,module,exports){
- 'use strict';
+ // recursion
+ copiedProperty = self.copyProperty(childProperty, parent, propertyName, clone);
- var entryFactory = require('../../../../factory/EntryFactory');
+ // copying might NOT be allowed
+ if (copiedProperty) {
+ return childProperties.concat(copiedProperty);
+ }
- var cmdHelper = require('../../../../helper/CmdHelper'),
- eventDefinitionHelper = require('../../../../helper/EventDefinitionHelper'),
- utils = require('../../../../Utils');
+ return childProperties;
+ }, []);
+ }
- var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject,
- is = require('bpmn-js/lib/util/ModelUtil').is;
+ // copy model elements
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isObject)(property) && property.$type) {
+ if (this._moddle.getElementDescriptor(property).isGeneric) {
+ return;
+ }
- var forEach = require('lodash/forEach'),
- find = require('lodash/find'),
- filter = require('lodash/filter');
+ copiedProperty = self._bpmnFactory.create(property.$type);
+ copiedProperty.$parent = parent;
- function getContainedActivities(element) {
- return getFlowElements(element, 'bpmn:Activity');
- }
+ // recursion
+ copiedProperty = self.copyElement(property, copiedProperty, null, clone);
- function getContainedBoundaryEvents(element) {
- return getFlowElements(element, 'bpmn:BoundaryEvent');
- }
+ return copiedProperty;
+ }
- function getFlowElements(element, type) {
- return utils.filterElementsByType(element.flowElements, type);
- }
+ // copy primitive properties
+ return property;
+};
- function isCompensationEventAttachedToActivity(activity, boundaryEvents) {
- var activityId = activity.id;
- var boundaryEvent = find(boundaryEvents, function(boundaryEvent) {
- var compensateEventDefinition = eventDefinitionHelper.getCompensateEventDefinition(boundaryEvent);
- var attachedToRef = boundaryEvent.attachedToRef;
- return compensateEventDefinition && attachedToRef && attachedToRef.id === activityId;
- });
- return !!boundaryEvent;
- }
+ModdleCopy.prototype._copyId = function(id, element, clone = false) {
+ if (clone) {
+ return id;
+ }
-// subprocess: only when it is not triggeredByEvent
-// activity: only when it attach a compensation boundary event
-// callActivity: no limitation
- function canActivityBeCompensated(activity, boundaryEvents) {
- return (is(activity, 'bpmn:SubProcess') && !activity.triggeredByEvent) ||
- is(activity, 'bpmn:CallActivity') ||
- isCompensationEventAttachedToActivity(activity, boundaryEvents);
- }
+ // disallow if already taken
+ if (this._moddle.ids.assigned(id)) {
+ return;
+ } else {
- function getActivitiesForCompensation(element) {
- var boundaryEvents = getContainedBoundaryEvents(element);
- return filter(getContainedActivities(element), function(activity) {
- return canActivityBeCompensated(activity, boundaryEvents);
- });
- }
+ this._moddle.ids.claim(id, element);
+ return id;
+ }
+};
- function getActivitiesForActivityRef(element) {
- var bo = getBusinessObject(element);
- var parent = bo.$parent;
+// helpers //////////
- var activitiesForActivityRef = getActivitiesForCompensation(parent);
+function getPropertyNames(descriptor, keepDefaultProperties) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.reduce)(descriptor.properties, function(properties, property) {
- // if throwing compensation event is in an event sub process:
- // get also all activities outside of the event sub process
- if (is(parent, 'bpmn:SubProcess') && parent.triggeredByEvent) {
- parent = parent.$parent;
- if (parent) {
- activitiesForActivityRef = activitiesForActivityRef.concat(getActivitiesForCompensation(parent));
- }
+ if (keepDefaultProperties && property.default) {
+ return properties;
+ }
- }
+ return properties.concat(property.name);
+ }, []);
+}
- return activitiesForActivityRef;
- }
+function is(element, type) {
+ return element && (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isFunction)(element.$instanceOf) && element.$instanceOf(type);
+}
- function createActivityRefOptions(element) {
- var options = [ { value: '' } ];
+/***/ }),
- var activities = getActivitiesForActivityRef(element);
- forEach(activities, function(activity) {
- var activityId = activity.id;
- var name = (activity.name ? (activity.name + ' ') : '') + '(id=' + activityId + ')';
- options.push({ value: activityId, name: name });
- });
+/***/ "../node_modules/bpmn-js/lib/features/copy-paste/index.js":
+/*!****************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/copy-paste/index.js ***!
+ \****************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- return options;
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_features_copy_paste__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/copy-paste */ "../node_modules/diagram-js/lib/features/copy-paste/index.js");
+/* harmony import */ var _BpmnCopyPaste__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BpmnCopyPaste */ "../node_modules/bpmn-js/lib/features/copy-paste/BpmnCopyPaste.js");
+/* harmony import */ var _ModdleCopy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ModdleCopy */ "../node_modules/bpmn-js/lib/features/copy-paste/ModdleCopy.js");
- module.exports = function(group, element, bpmnFactory, compensateEventDefinition, elementRegistry, translate) {
- group.entries.push(entryFactory.checkbox({
- id: 'wait-for-completion',
- label: translate('Wait for Completion'),
- modelProperty: 'waitForCompletion',
- get: function(element, node) {
- return {
- waitForCompletion: compensateEventDefinition.waitForCompletion
- };
- },
- set: function(element, values) {
- values.waitForCompletion = values.waitForCompletion || false;
- return cmdHelper.updateBusinessObject(element, compensateEventDefinition, values);
- }
- }));
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ diagram_js_lib_features_copy_paste__WEBPACK_IMPORTED_MODULE_0__["default"]
+ ],
+ __init__: [ 'bpmnCopyPaste', 'moddleCopy' ],
+ bpmnCopyPaste: [ 'type', _BpmnCopyPaste__WEBPACK_IMPORTED_MODULE_1__["default"] ],
+ moddleCopy: [ 'type', _ModdleCopy__WEBPACK_IMPORTED_MODULE_2__["default"] ]
+});
- group.entries.push(entryFactory.selectBox({
- id: 'activity-ref',
- label: translate('Activity Ref'),
- selectOptions: createActivityRefOptions(element),
- modelProperty: 'activityRef',
-
- get: function(element, node) {
- var activityRef = compensateEventDefinition.activityRef;
- activityRef = activityRef && activityRef.id;
- return {
- activityRef: activityRef || ''
- };
- },
- set: function(element, values) {
- var activityRef = values.activityRef || undefined;
- activityRef = activityRef && getBusinessObject(elementRegistry.get(activityRef));
- return cmdHelper.updateBusinessObject(element, compensateEventDefinition, {
- activityRef: activityRef
- });
- }
- }));
+/***/ }),
- };
+/***/ "../node_modules/bpmn-js/lib/features/di-ordering/BpmnDiOrdering.js":
+/*!**************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/di-ordering/BpmnDiOrdering.js ***!
+ \**************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- },{"../../../../Utils":5,"../../../../factory/EntryFactory":14,"../../../../helper/CmdHelper":25,"../../../../helper/EventDefinitionHelper":27,"bpmn-js/lib/util/ModelUtil":240,"lodash/filter":609,"lodash/find":610,"lodash/forEach":613}],42:[function(require,module,exports){
- 'use strict';
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BpmnDiOrdering)
+/* harmony export */ });
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/util/Elements */ "../node_modules/diagram-js/lib/util/Elements.js");
- var entryFactory = require('../../../../factory/EntryFactory'),
- cmdHelper = require('../../../../helper/CmdHelper');
- var is = require('bpmn-js/lib/util/ModelUtil').is,
- isEventSubProcess = require('bpmn-js/lib/util/DiUtil').isEventSubProcess;
- module.exports = function(group, element, bpmnFactory, conditionalEventDefinition, elementRegistry, translate) {
- var getValue = function(modelProperty) {
- return function(element) {
- var modelPropertyValue = conditionalEventDefinition.get('camunda:' + modelProperty);
- var value = {};
- value[modelProperty] = modelPropertyValue;
- return value;
- };
- };
- var setValue = function(modelProperty) {
- return function(element, values) {
- var props = {};
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
+ */
- props['camunda:' + modelProperty] = values[modelProperty] || undefined;
+var HIGH_PRIORITY = 2000;
- return cmdHelper.updateBusinessObject(element, conditionalEventDefinition, props);
- };
- };
+/**
+ * @param {EventBus} eventBus
+ * @param {Canvas} canvas
+ */
+function BpmnDiOrdering(eventBus, canvas) {
- group.entries.push(entryFactory.textField({
- id: 'variableName',
- label: translate('Variable Name'),
- modelProperty : 'variableName',
+ eventBus.on('saveXML.start', HIGH_PRIORITY, orderDi);
- get: getValue('variableName'),
- set: setValue('variableName')
- }));
+ function orderDi() {
+ var rootElements = canvas.getRootElements();
- var isConditionalStartEvent =
- is(element, 'bpmn:StartEvent') && !isEventSubProcess(element.parent);
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(rootElements, function(root) {
+ var rootDi = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getDi)(root),
+ elements,
+ diElements;
- if (!isConditionalStartEvent) {
- group.entries.push(entryFactory.textField({
- id: 'variableEvent',
- label: translate('Variable Event'),
- description: translate('Specify more than one variable change event as a comma separated list.'),
- modelProperty : 'variableEvent',
+ elements = (0,diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_2__.selfAndAllChildren)([ root ], false);
- get: getValue('variableEvent'),
- set: setValue('variableEvent')
- }));
- }
- };
+ // only bpmndi:Shape and bpmndi:Edge can be direct children of bpmndi:Plane
+ elements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(elements, function(element) {
+ return element !== root && !element.labelTarget;
+ });
- },{"../../../../factory/EntryFactory":14,"../../../../helper/CmdHelper":25,"bpmn-js/lib/util/DiUtil":238,"bpmn-js/lib/util/ModelUtil":240}],43:[function(require,module,exports){
- 'use strict';
+ diElements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.map)(elements, _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getDi);
- var entryFactory = require('../../../../factory/EntryFactory');
+ rootDi.set('planeElement', diElements);
+ });
+ }
+}
- var cmdHelper = require('../../../../helper/CmdHelper');
+BpmnDiOrdering.$inject = [ 'eventBus', 'canvas' ];
- /**
- * Create an entry to modify a property of an element which
- * is referenced by a event definition.
- *
- * @param {djs.model.Base} element
- * @param {ModdleElement} definition
- * @param {BpmnFactory} bpmnFactory
- * @param {Object} options
- * @param {string} options.id the id of the entry
- * @param {string} options.label the label of the entry
- * @param {string} options.referenceProperty the name of referencing property
- * @param {string} options.modelProperty the name of property to modify
- * @param {string} options.shouldValidate a flag indicate whether to validate or not
- *
- * @return {Array} return an array containing the entries
- */
- module.exports = function(element, definition, bpmnFactory, options) {
-
- var id = options.id || 'element-property';
- var label = options.label;
- var referenceProperty = options.referenceProperty;
- var modelProperty = options.modelProperty || 'name';
- var shouldValidate = options.shouldValidate || false;
-
- var entry = entryFactory.textField({
- id: id,
- label: label,
- modelProperty: modelProperty,
-
- get: function(element, node) {
- var reference = definition.get(referenceProperty);
- var props = {};
- props[modelProperty] = reference && reference.get(modelProperty);
- return props;
- },
- set: function(element, values, node) {
- var reference = definition.get(referenceProperty);
- var props = {};
- props[modelProperty] = values[modelProperty] || undefined;
- return cmdHelper.updateBusinessObject(element, reference, props);
- },
+/***/ }),
- hidden: function(element, node) {
- return !definition.get(referenceProperty);
- }
- });
+/***/ "../node_modules/bpmn-js/lib/features/di-ordering/index.js":
+/*!*****************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/di-ordering/index.js ***!
+ \*****************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- if (shouldValidate) {
- entry.validate = function(element, values, node) {
- var reference = definition.get(referenceProperty);
- if (reference && !values[modelProperty]) {
- var validationErrors = {};
- validationErrors[modelProperty] = 'Must provide a value';
- return validationErrors;
- }
- };
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _di_ordering_BpmnDiOrdering__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../di-ordering/BpmnDiOrdering */ "../node_modules/bpmn-js/lib/features/di-ordering/BpmnDiOrdering.js");
- return [ entry ];
- };
- },{"../../../../factory/EntryFactory":14,"../../../../helper/CmdHelper":25}],44:[function(require,module,exports){
- 'use strict';
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __init__: [
+ 'bpmnDiOrdering'
+ ],
+ bpmnDiOrdering: [ 'type', _di_ordering_BpmnDiOrdering__WEBPACK_IMPORTED_MODULE_0__["default"] ]
+});
- var eventDefinitionReference = require('./EventDefinitionReference'),
- elementReferenceProperty = require('./ElementReferenceProperty');
+/***/ }),
+/***/ "../node_modules/bpmn-js/lib/features/distribute-elements/BpmnDistributeElements.js":
+/*!******************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/distribute-elements/BpmnDistributeElements.js ***!
+ \******************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- module.exports = function(group, element, bpmnFactory, errorEventDefinition, translate) {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BpmnDistributeElements)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_features_rules_RuleProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/rules/RuleProvider */ "../node_modules/diagram-js/lib/features/rules/RuleProvider.js");
+/* harmony import */ var diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! diagram-js/lib/util/Elements */ "../node_modules/diagram-js/lib/util/Elements.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../modeling/util/ModelingUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- group.entries = group.entries.concat(eventDefinitionReference(element, errorEventDefinition, bpmnFactory, {
- label: translate('Error'),
- elementName: 'error',
- elementType: 'bpmn:Error',
- referenceProperty: 'errorRef',
- newElementIdPrefix: 'Error_'
- }));
- group.entries = group.entries.concat(elementReferenceProperty(element, errorEventDefinition, bpmnFactory, {
- id: 'error-element-name',
- label: translate('Error Name'),
- referenceProperty: 'errorRef',
- modelProperty: 'name',
- shouldValidate: true
- }));
- group.entries = group.entries.concat(elementReferenceProperty(element, errorEventDefinition, bpmnFactory, {
- id: 'error-element-code',
- label: translate('Error Code'),
- referenceProperty: 'errorRef',
- modelProperty: 'errorCode'
- }));
- };
- },{"./ElementReferenceProperty":43,"./EventDefinitionReference":46}],45:[function(require,module,exports){
- 'use strict';
- var entryFactory = require('../../../../factory/EntryFactory'),
- cmdHelper = require('../../../../helper/CmdHelper');
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ */
- var eventDefinitionReference = require('./EventDefinitionReference'),
- elementReferenceProperty = require('./ElementReferenceProperty');
+/**
+ * Registers element exclude filters for elements that currently do not support
+ * distribution.
+ *
+ * @param {EventBus} eventBus
+ */
+function BpmnDistributeElements(eventBus) {
+ diagram_js_lib_features_rules_RuleProvider__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
+}
+
+BpmnDistributeElements.$inject = [ 'eventBus' ];
+
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_1__["default"])(BpmnDistributeElements, diagram_js_lib_features_rules_RuleProvider__WEBPACK_IMPORTED_MODULE_0__["default"]);
+
+BpmnDistributeElements.prototype.init = function() {
+ this.addRule('elements.distribute', function(context) {
+ var elements = context.elements;
+
+ elements = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.filter)(elements, function(element) {
+ var cannotDistribute = (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.isAny)(element, [
+ 'bpmn:Association',
+ 'bpmn:BoundaryEvent',
+ 'bpmn:DataInputAssociation',
+ 'bpmn:DataOutputAssociation',
+ 'bpmn:Lane',
+ 'bpmn:MessageFlow',
+ 'bpmn:SequenceFlow',
+ 'bpmn:TextAnnotation'
+ ]);
+
+ return !(element.labelTarget || cannotDistribute);
+ });
+
+ // filter out elements which are children of any of the selected elements
+ elements = (0,diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_4__.getParents)(elements);
+
+ if (elements.length < 3) {
+ return false;
+ }
+
+ return elements;
+ });
+};
+
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/features/distribute-elements/DistributeElementsIcons.js":
+/*!*******************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/distribute-elements/DistributeElementsIcons.js ***!
+ \*******************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/**
+ * To change the icons, modify the SVGs in `./resources`, execute `npx svgo -f resources --datauri enc -o dist`,
+ * and then replace respective icons with the optimized data URIs in `./dist`.
+ */
+var icons = {
+ horizontal: `
+
+
+
+ `,
+ vertical: `
+
+
+
+ `
+};
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (icons);
+
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/features/distribute-elements/DistributeElementsMenuProvider.js":
+/*!**************************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/distribute-elements/DistributeElementsMenuProvider.js ***!
+ \**************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ DistributeElementsMenuProvider)
+/* harmony export */ });
+/* harmony import */ var _DistributeElementsIcons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DistributeElementsIcons */ "../node_modules/bpmn-js/lib/features/distribute-elements/DistributeElementsIcons.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+
+
+
+
+/**
+ * @typedef {import('diagram-js/lib/features/popup-menu/PopupMenu').default} PopupMenu
+ * @typedef {import('./BpmnDistributeElements').default} DistributeElements
+ * @typedef {import('diagram-js/lib/i18n/translate/translate').default} Translate
+ * @typedef {import('diagram-js/lib/features/rules/Rules').default} Rules
+ *
+ * @typedef {import('diagram-js/lib/features/popup-menu/PopupMenuProvider').PopupMenuEntries} PopupMenuEntries
+ * @typedef {import('diagram-js/lib/features/popup-menu/PopupMenuProvider').default} PopupMenuProvider
+ * @typedef {import('diagram-js/lib/features/popup-menu/PopupMenu').PopupMenuTarget} PopupMenuTarget
+ */
+var LOW_PRIORITY = 900;
- module.exports = function(group, element, bpmnFactory, escalationEventDefinition, showEscalationCodeVariable, translate) {
+/**
+ * A provider for the distribute elements popup menu.
+ *
+ * @implements {PopupMenuProvider}
+ *
+ * @param {PopupMenu} popupMenu
+ * @param {DistributeElements} distributeElements
+ * @param {Translate} translate
+ * @param {Rules} rules
+ */
+function DistributeElementsMenuProvider(
+ popupMenu, distributeElements, translate, rules) {
+ this._distributeElements = distributeElements;
+ this._translate = translate;
+ this._popupMenu = popupMenu;
+ this._rules = rules;
+
+ popupMenu.registerProvider('align-elements', LOW_PRIORITY, this);
+}
+
+DistributeElementsMenuProvider.$inject = [
+ 'popupMenu',
+ 'distributeElements',
+ 'translate',
+ 'rules'
+];
+
+/**
+ * @param {PopupMenuTarget} target
+ *
+ * @return {PopupMenuEntries}
+ */
+DistributeElementsMenuProvider.prototype.getPopupMenuEntries = function(target) {
+ var entries = {};
+
+ if (this._isAllowed(target)) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(entries, this._getEntries(target));
+ }
- group.entries = group.entries.concat(eventDefinitionReference(element, escalationEventDefinition, bpmnFactory, {
- label: translate('Escalation'),
- elementName: 'escalation',
- elementType: 'bpmn:Escalation',
- referenceProperty: 'escalationRef',
- newElementIdPrefix: 'Escalation_'
- }));
+ return entries;
+};
+DistributeElementsMenuProvider.prototype._isAllowed = function(elements) {
+ return this._rules.allowed('elements.distribute', { elements: elements });
+};
- group.entries = group.entries.concat(elementReferenceProperty(element, escalationEventDefinition, bpmnFactory, {
- id: 'escalation-element-name',
- label: translate('Escalation Name'),
- referenceProperty: 'escalationRef',
- modelProperty: 'name',
- shouldValidate: true
- }));
+DistributeElementsMenuProvider.prototype._getEntries = function(elements) {
+ var distributeElements = this._distributeElements,
+ translate = this._translate,
+ popupMenu = this._popupMenu;
+ var entries = {
+ 'distribute-elements-horizontal': {
+ group: 'distribute',
+ title: translate('Distribute elements horizontally'),
+ className: 'bjs-align-elements-menu-entry',
+ imageHtml: _DistributeElementsIcons__WEBPACK_IMPORTED_MODULE_1__["default"]['horizontal'],
+ action: function(event, entry) {
+ distributeElements.trigger(elements, 'horizontal');
+ popupMenu.close();
+ }
+ },
+ 'distribute-elements-vertical': {
+ group: 'distribute',
+ title: translate('Distribute elements vertically'),
+ imageHtml: _DistributeElementsIcons__WEBPACK_IMPORTED_MODULE_1__["default"]['vertical'],
+ action: function(event, entry) {
+ distributeElements.trigger(elements, 'vertical');
+ popupMenu.close();
+ }
+ },
+ };
- group.entries = group.entries.concat(elementReferenceProperty(element, escalationEventDefinition, bpmnFactory, {
- id: 'escalation-element-code',
- label: translate('Escalation Code'),
- referenceProperty: 'escalationRef',
- modelProperty: 'escalationCode'
- }));
+ return entries;
+};
- if (showEscalationCodeVariable) {
- group.entries.push(entryFactory.textField({
- id : 'escalationCodeVariable',
- label : translate('Escalation Code Variable'),
- modelProperty : 'escalationCodeVariable',
+/***/ }),
- get: function(element) {
- var codeVariable = escalationEventDefinition.get('camunda:escalationCodeVariable');
- return {
- escalationCodeVariable: codeVariable
- };
- },
+/***/ "../node_modules/bpmn-js/lib/features/distribute-elements/index.js":
+/*!*************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/distribute-elements/index.js ***!
+ \*************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- set: function(element, values) {
- return cmdHelper.updateBusinessObject(element, escalationEventDefinition, {
- 'camunda:escalationCodeVariable': values.escalationCodeVariable || undefined
- });
- }
- }));
- }
- };
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_features_distribute_elements__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/distribute-elements */ "../node_modules/diagram-js/lib/features/distribute-elements/index.js");
+/* harmony import */ var diagram_js_lib_features_popup_menu__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/popup-menu */ "../node_modules/diagram-js/lib/features/popup-menu/index.js");
+/* harmony import */ var _BpmnDistributeElements__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BpmnDistributeElements */ "../node_modules/bpmn-js/lib/features/distribute-elements/BpmnDistributeElements.js");
+/* harmony import */ var _DistributeElementsMenuProvider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./DistributeElementsMenuProvider */ "../node_modules/bpmn-js/lib/features/distribute-elements/DistributeElementsMenuProvider.js");
- },{"../../../../factory/EntryFactory":14,"../../../../helper/CmdHelper":25,"./ElementReferenceProperty":43,"./EventDefinitionReference":46}],46:[function(require,module,exports){
- 'use strict';
- var cmdHelper = require('../../../../helper/CmdHelper');
- var domQuery = require('min-dom').query,
- domify = require('min-dom').domify,
- domAttr = require('min-dom').attr;
- var forEach = require('lodash/forEach'),
- find = require('lodash/find');
- var elementHelper = require('../../../../helper/ElementHelper');
- var utils = require('../../../../Utils'),
- escapeHTML = utils.escapeHTML;
- var selector = 'select[name=selectedElement]';
- /**
- * Get select box containing all elements.
- *
- * @param {DOMElement} node
- *
- * @return {DOMElement} the select box
- */
- function getSelectBox(node) {
- return domQuery(selector, node.parentElement);
- }
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ diagram_js_lib_features_popup_menu__WEBPACK_IMPORTED_MODULE_0__["default"],
+ diagram_js_lib_features_distribute_elements__WEBPACK_IMPORTED_MODULE_1__["default"]
+ ],
+ __init__: [
+ 'bpmnDistributeElements',
+ 'distributeElementsMenuProvider'
+ ],
+ bpmnDistributeElements: [ 'type', _BpmnDistributeElements__WEBPACK_IMPORTED_MODULE_2__["default"] ],
+ distributeElementsMenuProvider: [ 'type', _DistributeElementsMenuProvider__WEBPACK_IMPORTED_MODULE_3__["default"] ]
+});
- /**
- * Find element by given id.
- *
- * @param {ModdleElement} eventDefinition
- *
- * @return {ModdleElement} an element
- */
- function findElementById(eventDefinition, type, id) {
- var elements = utils.findRootElementsByType(eventDefinition, type);
- return find(elements, function(element) {
- return element.id === id;
- });
- }
- /**
- * Create an entry to modify the reference to an element from an
- * event definition.
- *
- * @param {djs.model.Base} element
- * @param {ModdleElement} definition
- * @param {BpmnFactory} bpmnFactory
- * @param {Object} options
- * @param {string} options.label the label of the entry
- * @param {string} options.description the description of the entry
- * @param {string} options.elementName the name of the element
- * @param {string} options.elementType the type of the element
- * @param {string} options.referenceProperty the name of referencing property
- * @param {string} options.newElementIdPrefix the prefix of a new created element
- *
- * @return {Array} return an array containing the entries
- */
- module.exports = function(element, definition, bpmnFactory, options) {
-
- var elementName = options.elementName || '',
- elementType = options.elementType,
- referenceProperty = options.referenceProperty;
-
- var newElementIdPrefix = options.newElementIdPrefix || 'elem_';
-
- var label = options.label || '',
- description = options.description || '';
-
- var entries = [];
-
- entries.push({
-
- id: 'event-definitions-' + elementName,
- description: description,
- html: '' +
- '
' + escapeHTML(label) + ' ' +
- '
' +
- '' +
- ' ' +
- '+ ' +
- '
' +
- '
',
-
- get: function(element, entryNode) {
- utils.updateOptionsDropDown(selector, definition, elementType, entryNode);
- var reference = definition.get(referenceProperty);
- return {
- selectedElement: (reference && reference.id) || ''
- };
- },
+/***/ }),
- set: function(element, values) {
- var selection = values.selectedElement;
+/***/ "../node_modules/bpmn-js/lib/features/drilldown/DrilldownBreadcrumbs.js":
+/*!******************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/drilldown/DrilldownBreadcrumbs.js ***!
+ \******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var props = {};
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ DrilldownBreadcrumbs)
+/* harmony export */ });
+/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dom */ "../node_modules/min-dom/dist/index.esm.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var diagram_js_lib_util_EscapeUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/util/EscapeUtil */ "../node_modules/diagram-js/lib/util/EscapeUtil.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/DrilldownUtil */ "../node_modules/bpmn-js/lib/util/DrilldownUtil.js");
- if (!selection || typeof selection === 'undefined') {
- // remove reference to element
- props[referenceProperty] = undefined;
- return cmdHelper.updateBusinessObject(element, definition, props);
- }
- var commands = [];
- var selectedElement = findElementById(definition, elementType, selection);
- if (!selectedElement) {
- var root = utils.getRoot(definition);
- // create a new element
- selectedElement = elementHelper.createElement(elementType, { name: selection }, root, bpmnFactory);
- commands.push(cmdHelper.addAndRemoveElementsFromList(element, root, 'rootElements', null, [ selectedElement ]));
- }
- // update reference to element
- props[referenceProperty] = selectedElement;
- commands.push(cmdHelper.updateBusinessObject(element, definition, props));
- return commands;
- },
- addElement: function(element, inputNode) {
- // note: this generated id will be used as name
- // of the element and not as id
- var id = utils.nextId(newElementIdPrefix);
+/**
+ * @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
+ * @typedef {import('diagram-js/lib/core/ElementRegistry').default} ElementRegistry
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ *
+ * @typedef {import('../../model/Types').Element} Element
+ * @typedef {import('../../model/Types').Shape} Shape
+ */
- var optionTemplate = domify(' (id='+escapeHTML(id)+')' + ' ');
+var OPEN_CLASS = 'bjs-breadcrumbs-shown';
- // add new option
- var selectBox = getSelectBox(inputNode);
- selectBox.insertBefore(optionTemplate, selectBox.firstChild);
- // select new element in the select box
- forEach(selectBox, function(option) {
- if (option.value === id) {
- domAttr(option, 'selected', 'selected');
- } else {
- domAttr(option, 'selected', null);
- }
- });
+/**
+ * Adds overlays that allow switching planes on collapsed subprocesses.
+ *
+ * @param {EventBus} eventBus
+ * @param {ElementRegistry} elementRegistry
+ * @param {Canvas} canvas
+ */
+function DrilldownBreadcrumbs(eventBus, elementRegistry, canvas) {
+ var breadcrumbs = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.domify)('');
+ var container = canvas.getContainer();
+ var containerClasses = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.classes)(container);
+ container.appendChild(breadcrumbs);
- return true;
- }
+ var businessObjectParents = [];
- });
+ // update breadcrumbs if name or ID of the primary shape changes
+ eventBus.on('element.changed', function(event) {
+ var shape = event.element,
+ businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(shape);
- return entries;
+ var isPresent = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.find)(businessObjectParents, function(element) {
+ return element === businessObject;
+ });
- };
+ if (!isPresent) {
+ return;
+ }
- },{"../../../../Utils":5,"../../../../helper/CmdHelper":25,"../../../../helper/ElementHelper":26,"lodash/find":610,"lodash/forEach":613,"min-dom":647}],47:[function(require,module,exports){
- 'use strict';
+ updateBreadcrumbs();
+ });
- var eventDefinitionReference = require('./EventDefinitionReference'),
- elementReferenceProperty = require('./ElementReferenceProperty');
+ /**
+ * Updates the displayed breadcrumbs. If no element is provided, only the
+ * labels are updated.
+ *
+ * @param {Element} [element]
+ */
+ function updateBreadcrumbs(element) {
+ if (element) {
+ businessObjectParents = getBusinessObjectParentChain(element);
+ }
+ var path = businessObjectParents.map(function(parent) {
+ var title = (0,diagram_js_lib_util_EscapeUtil__WEBPACK_IMPORTED_MODULE_3__.escapeHTML)(parent.name || parent.id);
+ var link = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.domify)('' + title + ' ');
- module.exports = function(group, element, bpmnFactory, messageEventDefinition, translate) {
+ var parentPlane = canvas.findRoot((0,_util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_4__.getPlaneIdFromShape)(parent)) || canvas.findRoot(parent.id);
- group.entries = group.entries.concat(eventDefinitionReference(element, messageEventDefinition, bpmnFactory, {
- label: translate('Message'),
- elementName: 'message',
- elementType: 'bpmn:Message',
- referenceProperty: 'messageRef',
- newElementIdPrefix: 'Message_'
- }));
+ // when the root is a collaboration, the process does not have a corresponding
+ // element in the elementRegisty. Instead, we search for the corresponding participant
+ if (!parentPlane && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(parent, 'bpmn:Process')) {
+ var participant = elementRegistry.find(function(element) {
+ var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(element);
+ return businessObject && businessObject.get('processRef') && businessObject.get('processRef') === parent;
+ });
- group.entries = group.entries.concat(elementReferenceProperty(element, messageEventDefinition, bpmnFactory, {
- id: 'message-element-name',
- label: translate('Message Name'),
- referenceProperty: 'messageRef',
- modelProperty: 'name',
- shouldValidate: true
- }));
+ parentPlane = canvas.findRoot(participant.id);
+ }
- };
+ link.addEventListener('click', function() {
+ canvas.setRootElement(parentPlane);
+ });
- },{"./ElementReferenceProperty":43,"./EventDefinitionReference":46}],48:[function(require,module,exports){
- 'use strict';
+ return link;
+ });
- var entryFactory = require('../../../../factory/EntryFactory');
+ breadcrumbs.innerHTML = '';
- /**
- * Create an entry to modify the name of an an element.
- *
- * @param {djs.model.Base} element
- * @param {Object} options
- * @param {string} options.id the id of the entry
- * @param {string} options.label the label of the entry
- *
- * @return {Array} return an array containing
- * the entry to modify the name
- */
- module.exports = function(element, options, translate) {
-
- options = options || {};
- var id = options.id || 'name',
- label = options.label || translate('Name'),
- modelProperty = options.modelProperty || 'name';
-
- var nameEntry = entryFactory.textBox({
- id: id,
- label: label,
- modelProperty: modelProperty,
- get: options.get,
- set: options.set
- });
+ // show breadcrumbs and expose state to .djs-container
+ var visible = path.length > 1;
- return [ nameEntry ];
+ containerClasses.toggle(OPEN_CLASS, visible);
- };
+ path.forEach(function(element) {
+ breadcrumbs.appendChild(element);
+ });
+ }
- },{"../../../../factory/EntryFactory":14}],49:[function(require,module,exports){
- 'use strict';
+ eventBus.on('root.set', function(event) {
+ updateBreadcrumbs(event.element);
+ });
- var eventDefinitionReference = require('./EventDefinitionReference'),
- elementReferenceProperty = require('./ElementReferenceProperty');
+}
+DrilldownBreadcrumbs.$inject = [ 'eventBus', 'elementRegistry', 'canvas' ];
- module.exports = function(group, element, bpmnFactory, signalEventDefinition, translate) {
- group.entries = group.entries.concat(eventDefinitionReference(element, signalEventDefinition, bpmnFactory, {
- label: translate('Signal'),
- elementName: 'signal',
- elementType: 'bpmn:Signal',
- referenceProperty: 'signalRef',
- newElementIdPrefix: 'Signal_'
- }));
+// helpers //////////
+/**
+ * Returns the parents for the element using the business object chain,
+ * starting with the root element.
+ *
+ * @param {Shape} child
+ *
+ * @return {Shape}
+ */
+function getBusinessObjectParentChain(child) {
+ var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(child);
- group.entries = group.entries.concat(elementReferenceProperty(element, signalEventDefinition, bpmnFactory, {
- id: 'signal-element-name',
- label: translate('Signal Name'),
- referenceProperty: 'signalRef',
- modelProperty: 'name',
- shouldValidate: true
- }));
+ var parents = [];
- };
+ for (var element = businessObject; element; element = element.$parent) {
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(element, 'bpmn:SubProcess') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(element, 'bpmn:Process')) {
+ parents.push(element);
+ }
+ }
- },{"./ElementReferenceProperty":43,"./EventDefinitionReference":46}],50:[function(require,module,exports){
- 'use strict';
+ return parents.reverse();
+}
- var elementHelper = require('../../../../helper/ElementHelper'),
- cmdHelper = require('../../../../helper/CmdHelper');
+/***/ }),
- var entryFactory = require('../../../../factory/EntryFactory');
+/***/ "../node_modules/bpmn-js/lib/features/drilldown/DrilldownCentering.js":
+/*!****************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/drilldown/DrilldownCentering.js ***!
+ \****************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- /**
- * Get the timer definition type for a given timer event definition.
- *
- * @param {ModdleElement} timer
- *
- * @return {string|undefined} the timer definition type
- */
- function getTimerDefinitionType(timer) {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ DrilldownCentering)
+/* harmony export */ });
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- if (!timer) {
- return;
- }
- var timeDate = timer.get('timeDate');
- if (typeof timeDate !== 'undefined') {
- return 'timeDate';
- }
+/**
+ * @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ */
- var timeCycle = timer.get('timeCycle');
- if (typeof timeCycle !== 'undefined') {
- return 'timeCycle';
- }
+/**
+ * Move collapsed subprocesses into view when drilling down.
+ *
+ * Zoom and scroll are saved in a session.
+ *
+ * @param {EventBus} eventBus
+ * @param {Canvas} canvas
+ */
+function DrilldownCentering(eventBus, canvas) {
- var timeDuration = timer.get('timeDuration');
- if (typeof timeDuration !== 'undefined') {
- return 'timeDuration';
- }
- }
+ var currentRoot = null;
+ var positionMap = new Map();
- /**
- * Get the actual timer event definition based on option, whether it's a getter
- * to fetch the timer event definition or the exact event definition itself
- *
- * @param {ModdleElement|Function} timerOrFunction
- * @param {Shape} element
- * @param {HTMLElement} node
- *
- * @return ModdleElement
- */
- function getTimerDefinition(timerOrFunction, element, node) {
- if (typeof timerOrFunction === 'function') {
- return timerOrFunction(element, node);
- }
+ eventBus.on('root.set', function(event) {
+ var newRoot = event.element;
+ var currentViewbox = canvas.viewbox();
+ var storedViewbox = positionMap.get(newRoot);
- return timerOrFunction;
- }
+ positionMap.set(currentRoot, {
+ x: currentViewbox.x,
+ y: currentViewbox.y,
+ zoom: currentViewbox.scale
+ });
- /**
- * Creates 'bpmn:FormalExpression' element.
- *
- * @param {ModdleElement} parent
- * @param {string} body
- * @param {BpmnFactory} bpmnFactory
- *
- * @return {ModdleElement} a formal expression
- */
- function createFormalExpression(parent, body, bpmnFactory) {
- body = body || undefined;
- return elementHelper.createElement('bpmn:FormalExpression', { body: body }, parent, bpmnFactory);
- }
+ currentRoot = newRoot;
- function TimerEventDefinition(group, element, bpmnFactory, timerEventDefinition, translate, options) {
+ // current root was replaced with a collaboration, we don't update the viewbox
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(newRoot, 'bpmn:Collaboration') && !storedViewbox) {
+ return;
+ }
- var selectOptions = [
- { value: 'timeDate', name: translate('Date') },
- { value: 'timeDuration', name: translate('Duration') },
- { value: 'timeCycle', name: translate('Cycle') }
- ];
+ storedViewbox = storedViewbox || { x: 0, y: 0, zoom: 1 };
- var prefix = options && options.idPrefix,
- createTimerEventDefinition = options && options.createTimerEventDefinition;
+ var dx = (currentViewbox.x - storedViewbox.x) * currentViewbox.scale,
+ dy = (currentViewbox.y - storedViewbox.y) * currentViewbox.scale;
+ if (dx !== 0 || dy !== 0) {
+ canvas.scroll({
+ dx: dx,
+ dy: dy
+ });
+ }
- group.entries.push(entryFactory.selectBox({
- id: prefix + 'timer-event-definition-type',
- label: translate('Timer Definition Type'),
- selectOptions: selectOptions,
- emptyParameter: true,
- modelProperty: 'timerDefinitionType',
+ if (storedViewbox.zoom !== currentViewbox.scale) {
+ canvas.zoom(storedViewbox.zoom, { x: 0, y: 0 });
+ }
+ });
- get: function(element, node) {
- var timerDefinition = getTimerDefinition(timerEventDefinition, element, node);
+ eventBus.on('diagram.clear', function() {
+ positionMap.clear();
+ currentRoot = null;
+ });
- return {
- timerDefinitionType: getTimerDefinitionType(timerDefinition) || ''
- };
- },
+}
- set: function(element, values, node) {
- var props = {
- timeDuration: undefined,
- timeDate: undefined,
- timeCycle: undefined
- };
+DrilldownCentering.$inject = [ 'eventBus', 'canvas' ];
- var timerDefinition = getTimerDefinition(timerEventDefinition, element, node),
- newType = values.timerDefinitionType;
+/**
+ * ES5 Map implementation. Works.
+ */
+function Map() {
- if (!timerDefinition && typeof createTimerEventDefinition === 'function') {
- timerDefinition = createTimerEventDefinition(element, node);
- }
+ this._entries = [];
- if (values.timerDefinitionType) {
- var oldType = getTimerDefinitionType(timerDefinition);
+ this.set = function(key, value) {
- var value;
- if (oldType) {
- var definition = timerDefinition.get(oldType);
- value = definition.get('body');
- }
+ var found = false;
- props[newType] = createFormalExpression(timerDefinition, value, bpmnFactory);
- }
+ for (var k in this._entries) {
+ if (this._entries[k][0] === key) {
+ this._entries[k][1] = value;
- return cmdHelper.updateBusinessObject(element, timerDefinition, props);
- },
+ found = true;
- hidden: function(element, node) {
- return getTimerDefinition(timerEventDefinition, element, node) === undefined;
- }
+ break;
+ }
+ }
- }));
+ if (!found) {
+ this._entries.push([ key, value ]);
+ }
+ };
+ this.get = function(key) {
- group.entries.push(entryFactory.textField({
- id: prefix + 'timer-event-definition',
- label: translate('Timer Definition'),
- modelProperty: 'timerDefinition',
+ for (var k in this._entries) {
+ if (this._entries[k][0] === key) {
+ return this._entries[k][1];
+ }
+ }
- get: function(element, node) {
- var timerDefinition = getTimerDefinition(timerEventDefinition, element, node),
- type = getTimerDefinitionType(timerDefinition),
- definition = type && timerDefinition.get(type),
- value = definition && definition.get('body');
+ return null;
+ };
- return {
- timerDefinition: value
- };
- },
+ this.clear = function() {
+ this._entries.length = 0;
+ };
- set: function(element, values, node) {
- var timerDefinition = getTimerDefinition(timerEventDefinition, element, node),
- type = getTimerDefinitionType(timerDefinition),
- definition = type && timerDefinition.get(type);
+ this.remove = function(key) {
- if (definition) {
- return cmdHelper.updateBusinessObject(element, definition, {
- body: values.timerDefinition || undefined
- });
- }
- },
+ var idx = -1;
- validate: function(element, node) {
- var timerDefinition = getTimerDefinition(timerEventDefinition, element, node),
- type = getTimerDefinitionType(timerDefinition),
- definition = type && timerDefinition.get(type);
-
- if (definition) {
- var value = definition.get('body');
- if (!value) {
- return {
- timerDefinition: translate('Must provide a value')
- };
- }
- }
- },
+ for (var k in this._entries) {
+ if (this._entries[k][0] === key) {
+ idx = k;
- hidden: function(element, node) {
- var timerDefinition = getTimerDefinition(timerEventDefinition, element, node);
+ break;
+ }
+ }
- return !getTimerDefinitionType(timerDefinition);
- }
+ if (idx !== -1) {
+ this._entries.splice(idx, 1);
+ }
+ };
+}
- }));
+/***/ }),
- }
+/***/ "../node_modules/bpmn-js/lib/features/drilldown/DrilldownOverlayBehavior.js":
+/*!**********************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/drilldown/DrilldownOverlayBehavior.js ***!
+ \**********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- module.exports = TimerEventDefinition;
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ DrilldownOverlayBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! min-dom */ "../node_modules/min-dom/dist/index.esm.js");
+/* harmony import */ var _util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/DrilldownUtil */ "../node_modules/bpmn-js/lib/util/DrilldownUtil.js");
- },{"../../../../factory/EntryFactory":14,"../../../../helper/CmdHelper":25,"../../../../helper/ElementHelper":26}],51:[function(require,module,exports){
- 'use strict';
- var inherits = require('inherits');
- var PropertiesActivator = require('../../PropertiesActivator');
- var asyncCapableHelper = require('../../helper/AsyncCapableHelper'),
- ImplementationTypeHelper = require('../../helper/ImplementationTypeHelper');
- var is = require('bpmn-js/lib/util/ModelUtil').is;
-// bpmn properties
- var processProps = require('../bpmn/parts/ProcessProps'),
- eventProps = require('../bpmn/parts/EventProps'),
- linkProps = require('../bpmn/parts/LinkProps'),
- documentationProps = require('../bpmn/parts/DocumentationProps'),
- idProps = require('../bpmn/parts/IdProps'),
- nameProps = require('../bpmn/parts/NameProps'),
- executableProps = require('../bpmn/parts/ExecutableProps');
-// camunda properties
- var serviceTaskDelegateProps = require('./parts/ServiceTaskDelegateProps'),
- userTaskProps = require('./parts/UserTaskProps'),
- asynchronousContinuationProps = require('./parts/AsynchronousContinuationProps'),
- callActivityProps = require('./parts/CallActivityProps'),
- multiInstanceProps = require('./parts/MultiInstanceLoopProps'),
- conditionalProps = require('./parts/ConditionalProps'),
- scriptProps = require('./parts/ScriptTaskProps'),
- errorProps = require('./parts/ErrorEventProps'),
- formProps = require('./parts/FormProps'),
- startEventInitiator = require('./parts/StartEventInitiator'),
- variableMapping = require('./parts/VariableMappingProps'),
- versionTag = require('./parts/VersionTagProps');
+/**
+ * @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
+ * @typedef {import('diagram-js/lib/core/ElementRegistry').default} ElementRegistry
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('diagram-js/lib/features/overlays/Overlays').default} Overlays
+ *
+ * @typedef {import('../../model/Types').Element} Element
+ * @typedef {import('../../model/Types').Parent} Parent
+ * @typedef {import('../../model/Types').Shape} Shape
+ */
- var listenerProps = require('./parts/ListenerProps'),
- listenerDetails = require('./parts/ListenerDetailProps'),
- listenerFields = require('./parts/ListenerFieldInjectionProps');
+var LOW_PRIORITY = 250;
+var ARROW_DOWN_SVG = ' ';
- var elementTemplateChooserProps = require('./element-templates/parts/ChooserProps'),
- elementTemplateCustomProps = require('./element-templates/parts/CustomProps');
+var EMPTY_MARKER = 'bjs-drilldown-empty';
-// Input/Output
- var inputOutput = require('./parts/InputOutputProps'),
- inputOutputParameter = require('./parts/InputOutputParameterProps');
+/**
+ * @param {Canvas} canvas
+ * @param {EventBus} eventBus
+ * @param {ElementRegistry} elementRegistry
+ * @param {Overlays} overlays
+ */
+function DrilldownOverlayBehavior(
+ canvas, eventBus, elementRegistry, overlays
+) {
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
+
+ this._canvas = canvas;
+ this._eventBus = eventBus;
+ this._elementRegistry = elementRegistry;
+ this._overlays = overlays;
+
+ var self = this;
+
+ this.executed('shape.toggleCollapse', LOW_PRIORITY, function(context) {
+ var shape = context.shape;
+
+ // Add overlay to the collapsed shape
+ if (self._canDrillDown(shape)) {
+ self._addOverlay(shape);
+ } else {
+ self._removeOverlay(shape);
+ }
+ }, true);
+
+
+ this.reverted('shape.toggleCollapse', LOW_PRIORITY, function(context) {
+ var shape = context.shape;
+
+ // Add overlay to the collapsed shape
+ if (self._canDrillDown(shape)) {
+ self._addOverlay(shape);
+ } else {
+ self._removeOverlay(shape);
+ }
+ }, true);
+
+
+ this.executed([ 'shape.create', 'shape.move', 'shape.delete' ], LOW_PRIORITY,
+ function(context) {
+ var oldParent = context.oldParent,
+ newParent = context.newParent || context.parent,
+ shape = context.shape;
+
+ // Add overlay to the collapsed shape
+ if (self._canDrillDown(shape)) {
+ self._addOverlay(shape);
+ }
+
+ self._updateDrilldownOverlay(oldParent);
+ self._updateDrilldownOverlay(newParent);
+ self._updateDrilldownOverlay(shape);
+ }, true);
+
+
+ this.reverted([ 'shape.create', 'shape.move', 'shape.delete' ], LOW_PRIORITY,
+ function(context) {
+ var oldParent = context.oldParent,
+ newParent = context.newParent || context.parent,
+ shape = context.shape;
+
+ // Add overlay to the collapsed shape
+ if (self._canDrillDown(shape)) {
+ self._addOverlay(shape);
+ }
+
+ self._updateDrilldownOverlay(oldParent);
+ self._updateDrilldownOverlay(newParent);
+ self._updateDrilldownOverlay(shape);
+ }, true);
+
+
+ eventBus.on('import.render.complete', function() {
+ elementRegistry.filter(function(e) {
+ return self._canDrillDown(e);
+ }).map(function(el) {
+ self._addOverlay(el);
+ });
+ });
+
+}
+
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_1__["default"])(DrilldownOverlayBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
+
+/**
+ * @param {Shape} shape
+ */
+DrilldownOverlayBehavior.prototype._updateDrilldownOverlay = function(shape) {
+ var canvas = this._canvas;
-// Connector
- var connectorDetails = require('./parts/ConnectorDetailProps'),
- connectorInputOutput = require('./parts/ConnectorInputOutputProps'),
- connectorInputOutputParameter = require('./parts/ConnectorInputOutputParameterProps');
+ if (!shape) {
+ return;
+ }
-// properties
- var properties = require('./parts/PropertiesProps');
+ var root = canvas.findRoot(shape);
-// job configuration
- var jobConfiguration = require('./parts/JobConfigurationProps');
+ if (root) {
+ this._updateOverlayVisibility(root);
+ }
+};
-// history time to live
- var historyTimeToLive = require('./parts/HistoryTimeToLiveProps');
+/**
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+DrilldownOverlayBehavior.prototype._canDrillDown = function(element) {
+ var canvas = this._canvas;
-// candidate starter groups/users
- var candidateStarter = require('./parts/CandidateStarterProps');
+ return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(element, 'bpmn:SubProcess') && canvas.findRoot((0,_util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_3__.getPlaneIdFromShape)(element));
+};
-// tasklist
- var tasklist = require('./parts/TasklistProps');
+/**
+ * Update the visibility of the drilldown overlay. If the plane has no elements,
+ * the drilldown will only be shown when the element is selected.
+ *
+ * @param {Parent} element The collapsed root or shape.
+ */
+DrilldownOverlayBehavior.prototype._updateOverlayVisibility = function(element) {
+ var overlays = this._overlays;
-// external task configuration
- var externalTaskConfiguration = require('./parts/ExternalTaskConfigurationProps');
+ var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(element);
-// field injection
- var fieldInjections = require('./parts/FieldInjectionProps');
+ var overlay = overlays.get({ element: businessObject.id, type: 'drilldown' })[0];
- var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject,
- eventDefinitionHelper = require('../../helper/EventDefinitionHelper'),
- implementationTypeHelper = require('../../helper/ImplementationTypeHelper');
+ if (!overlay) {
+ return;
+ }
-// helpers ////////////////////////////////////////
+ var hasFlowElements = businessObject
+ && businessObject.get('flowElements')
+ && businessObject.get('flowElements').length;
- var isExternalTaskPriorityEnabled = function(element) {
- var businessObject = getBusinessObject(element);
+ (0,min_dom__WEBPACK_IMPORTED_MODULE_4__.classes)(overlay.html).toggle(EMPTY_MARKER, !hasFlowElements);
+};
- // show only if element is a process, a participant ...
- if (is(element, 'bpmn:Process') || is(element, 'bpmn:Participant') && businessObject.get('processRef')) {
- return true;
- }
+/**
+ * Add a drilldown button to the given element assuming the plane has the same
+ * ID as the element.
+ *
+ * @param {Shape} element The collapsed shape.
+ */
+DrilldownOverlayBehavior.prototype._addOverlay = function(element) {
+ var canvas = this._canvas,
+ overlays = this._overlays;
- var externalBo = ImplementationTypeHelper.getServiceTaskLikeBusinessObject(element),
- isExternalTask = ImplementationTypeHelper.getImplementationType(externalBo) === 'external';
+ var existingOverlays = overlays.get({ element: element, type: 'drilldown' });
- // ... or an external task with selected external implementation type
- return !!ImplementationTypeHelper.isExternalCapable(externalBo) && isExternalTask;
- };
+ if (existingOverlays.length) {
+ this._removeOverlay(element);
+ }
- var isJobConfigEnabled = function(element) {
- var businessObject = getBusinessObject(element);
+ var button = (0,min_dom__WEBPACK_IMPORTED_MODULE_4__.domify)('' + ARROW_DOWN_SVG + ' ');
- if (is(element, 'bpmn:Process') || is(element, 'bpmn:Participant') && businessObject.get('processRef')) {
- return true;
- }
+ button.addEventListener('click', function() {
+ canvas.setRootElement(canvas.findRoot((0,_util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_3__.getPlaneIdFromShape)(element)));
+ });
- // async behavior
- var bo = getBusinessObject(element);
- if (asyncCapableHelper.isAsyncBefore(bo) || asyncCapableHelper.isAsyncAfter(bo)) {
- return true;
- }
+ overlays.add(element, 'drilldown', {
+ position: {
+ bottom: -7,
+ right: -8
+ },
+ html: button
+ });
- // timer definition
- if (is(element, 'bpmn:Event')) {
- return !!eventDefinitionHelper.getTimerEventDefinition(element);
- }
+ this._updateOverlayVisibility(element);
+};
- return false;
- };
+DrilldownOverlayBehavior.prototype._removeOverlay = function(element) {
+ var overlays = this._overlays;
- var getInputOutputParameterLabel = function(param, translate) {
+ overlays.remove({
+ element: element,
+ type: 'drilldown'
+ });
+};
- if (is(param, 'camunda:InputParameter')) {
- return translate('Input Parameter');
- }
+DrilldownOverlayBehavior.$inject = [
+ 'canvas',
+ 'eventBus',
+ 'elementRegistry',
+ 'overlays'
+];
- if (is(param, 'camunda:OutputParameter')) {
- return translate('Output Parameter');
- }
+/***/ }),
- return '';
- };
+/***/ "../node_modules/bpmn-js/lib/features/drilldown/SubprocessCompatibility.js":
+/*!*********************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/drilldown/SubprocessCompatibility.js ***!
+ \*********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var getListenerLabel = function(param, translate) {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ SubprocessCompatibility)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- if (is(param, 'camunda:ExecutionListener')) {
- return translate('Execution Listener');
- }
- if (is(param, 'camunda:TaskListener')) {
- return translate('Task Listener');
- }
- return '';
- };
- var PROCESS_KEY_HINT = 'This maps to the process definition key.';
- var TASK_KEY_HINT = 'This maps to the task definition key.';
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../../model/Types').Moddle} Moddle
+ *
+ * @typedef {import('../../model/Types').Element} Element
+ * @typedef {import('../../model/Types').Shape} Shape
+ *
+ * @typedef {import('diagram-js/lib/core/Canvas').CanvasPlane} CanvasPlane
+ *
+ * @typedef {import('diagram-js/lib/util/Types').Rect} Rect
+ */
- function createGeneralTabGroups(
- element, canvas, bpmnFactory,
- elementRegistry, elementTemplates, translate) {
+var DEFAULT_POSITION = {
+ x: 180,
+ y: 160
+};
- // refer to target element for external labels
- element = element.labelTarget || element;
+/**
+ * Hook into `import.render.start` and create new planes for diagrams with
+ * collapsed subprocesses and all DI elements on the same plane.
+ *
+ * @param {EventBus} eventBus
+ * @param {Moddle} moddle
+ */
+function SubprocessCompatibility(eventBus, moddle) {
+ this._eventBus = eventBus;
+ this._moddle = moddle;
- var generalGroup = {
- id: 'general',
- label: translate('General'),
- entries: []
- };
+ var self = this;
- var idOptions;
- var processOptions;
+ eventBus.on('import.render.start', 1500, function(e, context) {
+ self._handleImport(context.definitions);
+ });
+}
- if (is(element, 'bpmn:Process')) {
- idOptions = { description: PROCESS_KEY_HINT };
- }
+/**
+ * @param {ModdleElement} definitions
+ */
+SubprocessCompatibility.prototype._handleImport = function(definitions) {
+ if (!definitions.diagrams) {
+ return;
+ }
- if (is(element, 'bpmn:UserTask')) {
- idOptions = { description: TASK_KEY_HINT };
- }
+ var self = this;
+ this._definitions = definitions;
+ this._processToDiagramMap = {};
- if (is(element, 'bpmn:Participant')) {
- processOptions = { processIdDescription: PROCESS_KEY_HINT };
- }
+ definitions.diagrams.forEach(function(diagram) {
+ if (!diagram.plane || !diagram.plane.bpmnElement) {
+ return;
+ }
- idProps(generalGroup, element, translate, idOptions);
- nameProps(generalGroup, element, bpmnFactory, canvas, translate);
- processProps(generalGroup, element, translate, processOptions);
- versionTag(generalGroup, element, translate);
- executableProps(generalGroup, element, translate);
- elementTemplateChooserProps(generalGroup, element, elementTemplates, translate);
+ self._processToDiagramMap[diagram.plane.bpmnElement.id] = diagram;
+ });
- var customFieldsGroups = elementTemplateCustomProps(element, elementTemplates, bpmnFactory, translate);
+ var newDiagrams = [];
+ definitions.diagrams.forEach(function(diagram) {
+ var createdDiagrams = self._createNewDiagrams(diagram.plane);
+ Array.prototype.push.apply(newDiagrams, createdDiagrams);
+ });
- var detailsGroup = {
- id: 'details',
- label: translate('Details'),
- entries: []
- };
- serviceTaskDelegateProps(detailsGroup, element, bpmnFactory, translate);
- userTaskProps(detailsGroup, element, translate);
- scriptProps(detailsGroup, element, bpmnFactory, translate);
- linkProps(detailsGroup, element, translate);
- callActivityProps(detailsGroup, element, bpmnFactory, translate);
- eventProps(detailsGroup, element, bpmnFactory, elementRegistry, translate);
- errorProps(detailsGroup, element, bpmnFactory, translate);
- conditionalProps(detailsGroup, element, bpmnFactory, translate);
- startEventInitiator(detailsGroup, element, translate); // this must be the last element of the details group!
-
- var multiInstanceGroup = {
- id: 'multiInstance',
- label: translate('Multi Instance'),
- entries: []
- };
- multiInstanceProps(multiInstanceGroup, element, bpmnFactory, translate);
+ newDiagrams.forEach(function(diagram) {
+ self._movePlaneElementsToOrigin(diagram.plane);
+ });
+};
- var asyncGroup = {
- id : 'async',
- label: translate('Asynchronous Continuations'),
- entries : []
- };
- asynchronousContinuationProps(asyncGroup, element, bpmnFactory, translate);
- var jobConfigurationGroup = {
- id : 'jobConfiguration',
- label : translate('Job Configuration'),
- entries : [],
- enabled: isJobConfigEnabled
- };
- jobConfiguration(jobConfigurationGroup, element, bpmnFactory, translate);
+/**
+ * Moves all DI elements from collapsed subprocesses to a new plane.
+ *
+ * @param {CanvasPlane} plane
+ *
+ * @return {ModdleElement[]} new diagrams created for the collapsed subprocesses
+ */
+SubprocessCompatibility.prototype._createNewDiagrams = function(plane) {
+ var self = this;
- var externalTaskGroup = {
- id : 'externalTaskConfiguration',
- label : translate('External Task Configuration'),
- entries : [],
- enabled: isExternalTaskPriorityEnabled
- };
- externalTaskConfiguration(externalTaskGroup, element, bpmnFactory, translate);
+ var collapsedElements = [];
+ var elementsToMove = [];
+ plane.get('planeElement').forEach(function(diElement) {
+ var businessObject = diElement.bpmnElement;
- var candidateStarterGroup = {
- id: 'candidateStarterConfiguration',
- label: translate('Candidate Starter Configuration'),
- entries: []
- };
- candidateStarter(candidateStarterGroup, element, bpmnFactory, translate);
+ if (!businessObject) {
+ return;
+ }
- var historyTimeToLiveGroup = {
- id: 'historyConfiguration',
- label: translate('History Configuration'),
- entries: []
- };
- historyTimeToLive(historyTimeToLiveGroup, element, bpmnFactory, translate);
+ var parent = businessObject.$parent;
- var tasklistGroup = {
- id: 'tasklist',
- label: translate('Tasklist Configuration'),
- entries: []
- };
- tasklist(tasklistGroup, element, bpmnFactory, translate);
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(businessObject, 'bpmn:SubProcess') && !diElement.isExpanded) {
+ collapsedElements.push(businessObject);
+ }
- var documentationGroup = {
- id: 'documentation',
- label: translate('Documentation'),
- entries: []
- };
- documentationProps(documentationGroup, element, bpmnFactory, translate);
+ if (shouldMoveToPlane(businessObject, plane)) {
- var groups = [];
- groups.push(generalGroup);
- customFieldsGroups.forEach(function(group) {
- groups.push(group);
- });
- groups.push(detailsGroup);
- groups.push(externalTaskGroup);
- groups.push(multiInstanceGroup);
- groups.push(asyncGroup);
- groups.push(jobConfigurationGroup);
- groups.push(candidateStarterGroup);
- groups.push(historyTimeToLiveGroup);
- groups.push(tasklistGroup);
- groups.push(documentationGroup);
-
- return groups;
- }
-
- function createVariablesTabGroups(element, bpmnFactory, elementRegistry, translate) {
- var variablesGroup = {
- id : 'variables',
- label : translate('Variables'),
- entries: []
- };
- variableMapping(variablesGroup, element, bpmnFactory, translate);
+ // don't change the array while we iterate over it
+ elementsToMove.push({ diElement: diElement, parent: parent });
+ }
+ });
- return [
- variablesGroup
- ];
- }
+ var newDiagrams = [];
- function createFormsTabGroups(element, bpmnFactory, elementRegistry, translate) {
- var formGroup = {
- id : 'forms',
- label : translate('Forms'),
- entries: []
- };
- formProps(formGroup, element, bpmnFactory, translate);
+ // create new planes for all collapsed subprocesses, even when they are empty
+ collapsedElements.forEach(function(element) {
+ if (!self._processToDiagramMap[ element.id ]) {
+ var diagram = self._createDiagram(element);
- return [
- formGroup
- ];
- }
+ self._processToDiagramMap[element.id] = diagram;
- function createListenersTabGroups(element, bpmnFactory, elementRegistry, translate) {
+ newDiagrams.push(diagram);
+ }
+ });
- var listenersGroup = {
- id : 'listeners',
- label: translate('Listeners'),
- entries: []
- };
+ elementsToMove.forEach(function(element) {
+ var diElement = element.diElement;
+ var parent = element.parent;
- var options = listenerProps(listenersGroup, element, bpmnFactory, translate);
+ // parent is expanded, get nearest collapsed parent
+ while (parent && collapsedElements.indexOf(parent) === -1) {
+ parent = parent.$parent;
+ }
- var listenerDetailsGroup = {
- id: 'listener-details',
- entries: [],
- enabled: function(element, node) {
- return options.getSelectedListener(element, node);
- },
- label: function(element, node) {
- var param = options.getSelectedListener(element, node);
- return getListenerLabel(param, translate);
- }
- };
+ // false positive, all parents are expanded
+ if (!parent) {
+ return;
+ }
- listenerDetails(listenerDetailsGroup, element, bpmnFactory, options, translate);
+ var diagram = self._processToDiagramMap[ parent.id ];
- var listenerFieldsGroup = {
- id: 'listener-fields',
- label: translate('Field Injection'),
- entries: [],
- enabled: function(element, node) {
- return options.getSelectedListener(element, node);
- }
- };
+ self._moveToDiPlane(diElement, diagram.plane);
+ });
- listenerFields(listenerFieldsGroup, element, bpmnFactory, options, translate);
+ return newDiagrams;
+};
- return [
- listenersGroup,
- listenerDetailsGroup,
- listenerFieldsGroup
- ];
- }
+/**
+ * @param {CanvasPlane} plane
+ */
+SubprocessCompatibility.prototype._movePlaneElementsToOrigin = function(plane) {
+ var elements = plane.get('planeElement');
+
+ // get bounding box of all elements
+ var planeBounds = getPlaneBounds(plane);
+
+ var offset = {
+ x: planeBounds.x - DEFAULT_POSITION.x,
+ y: planeBounds.y - DEFAULT_POSITION.y
+ };
+
+ elements.forEach(function(diElement) {
+ if (diElement.waypoint) {
+ diElement.waypoint.forEach(function(waypoint) {
+ waypoint.x = waypoint.x - offset.x;
+ waypoint.y = waypoint.y - offset.y;
+ });
+ } else if (diElement.bounds) {
+ diElement.bounds.x = diElement.bounds.x - offset.x;
+ diElement.bounds.y = diElement.bounds.y - offset.y;
+ }
+ });
+};
+
+/**
+ * @param {ModdleElement} diElement
+ * @param {CanvasPlane} newPlane
+ */
+SubprocessCompatibility.prototype._moveToDiPlane = function(diElement, newPlane) {
+ var containingDiagram = findRootDiagram(diElement);
- function createInputOutputTabGroups(element, bpmnFactory, elementRegistry, translate) {
+ // remove DI from old Plane and add it to the new one
+ var parentPlaneElement = containingDiagram.plane.get('planeElement');
- var inputOutputGroup = {
- id: 'input-output',
- label: translate('Parameters'),
- entries: []
- };
+ parentPlaneElement.splice(parentPlaneElement.indexOf(diElement), 1);
- var options = inputOutput(inputOutputGroup, element, bpmnFactory, translate);
+ newPlane.get('planeElement').push(diElement);
+};
- var inputOutputParameterGroup = {
- id: 'input-output-parameter',
- entries: [],
- enabled: function(element, node) {
- return options.getSelectedParameter(element, node);
- },
- label: function(element, node) {
- var param = options.getSelectedParameter(element, node);
- return getInputOutputParameterLabel(param, translate);
- }
- };
+/**
+ * @param {ModdleElement} businessObject
+ *
+ * @return {ModdleElement}
+ */
+SubprocessCompatibility.prototype._createDiagram = function(businessObject) {
+ var plane = this._moddle.create('bpmndi:BPMNPlane', {
+ bpmnElement: businessObject
+ });
- inputOutputParameter(inputOutputParameterGroup, element, bpmnFactory, options, translate);
+ var diagram = this._moddle.create('bpmndi:BPMNDiagram', {
+ plane: plane
+ });
- return [
- inputOutputGroup,
- inputOutputParameterGroup
- ];
- }
+ plane.$parent = diagram;
- function createConnectorTabGroups(element, bpmnFactory, elementRegistry, translate) {
- var connectorDetailsGroup = {
- id: 'connector-details',
- label: translate('Details'),
- entries: []
- };
+ plane.bpmnElement = businessObject;
- connectorDetails(connectorDetailsGroup, element, bpmnFactory, translate);
+ diagram.$parent = this._definitions;
- var connectorInputOutputGroup = {
- id: 'connector-input-output',
- label: translate('Input/Output'),
- entries: []
- };
+ this._definitions.diagrams.push(diagram);
- var options = connectorInputOutput(connectorInputOutputGroup, element, bpmnFactory, translate);
+ return diagram;
+};
- var connectorInputOutputParameterGroup = {
- id: 'connector-input-output-parameter',
- entries: [],
- enabled: function(element, node) {
- return options.getSelectedParameter(element, node);
- },
- label: function(element, node) {
- var param = options.getSelectedParameter(element, node);
- return getInputOutputParameterLabel(param, translate);
- }
- };
+SubprocessCompatibility.$inject = [ 'eventBus', 'moddle' ];
- connectorInputOutputParameter(connectorInputOutputParameterGroup, element, bpmnFactory, options, translate);
- return [
- connectorDetailsGroup,
- connectorInputOutputGroup,
- connectorInputOutputParameterGroup
- ];
- }
+// helpers //////////
- function createFieldInjectionsTabGroups(element, bpmnFactory, elementRegistry, translate) {
+function findRootDiagram(element) {
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmndi:BPMNDiagram')) {
+ return element;
+ } else {
+ return findRootDiagram(element.$parent);
+ }
+}
- var fieldGroup = {
- id: 'field-injections-properties',
- label: translate('Field Injections'),
- entries: []
- };
+/**
+ * @param {CanvasPlane} plane
+ *
+ * @return {Rect}
+ */
+function getPlaneBounds(plane) {
+ var planeTrbl = {
+ top: Infinity,
+ right: -Infinity,
+ bottom: -Infinity,
+ left: Infinity
+ };
+
+ plane.planeElement.forEach(function(element) {
+ if (!element.bounds) {
+ return;
+ }
+
+ var trbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(element.bounds);
+
+ planeTrbl.top = Math.min(trbl.top, planeTrbl.top);
+ planeTrbl.left = Math.min(trbl.left, planeTrbl.left);
+ });
+
+ return (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asBounds)(planeTrbl);
+}
+
+/**
+ * @param {ModdleElement} businessObject
+ * @param {CanvasPlane} plane
+ *
+ * @return {boolean}
+ */
+function shouldMoveToPlane(businessObject, plane) {
+ var parent = businessObject.$parent;
- fieldInjections(fieldGroup, element, bpmnFactory, translate);
+ // don't move elements that are already on the plane
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(parent, 'bpmn:SubProcess') || parent === plane.bpmnElement) {
+ return false;
+ }
- return [
- fieldGroup
- ];
- }
+ // dataAssociations are children of the subprocess but rendered on process level
+ // cf. https://github.com/bpmn-io/bpmn-js/issues/1619
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.isAny)(businessObject, [ 'bpmn:DataInputAssociation', 'bpmn:DataOutputAssociation' ])) {
+ return false;
+ }
- function createExtensionElementsGroups(element, bpmnFactory, elementRegistry, translate) {
+ return true;
+}
- var propertiesGroup = {
- id : 'extensionElements-properties',
- label: translate('Properties'),
- entries: []
- };
- properties(propertiesGroup, element, bpmnFactory, translate);
- return [
- propertiesGroup
- ];
- }
+/***/ }),
-// Camunda Properties Provider /////////////////////////////////////
+/***/ "../node_modules/bpmn-js/lib/features/drilldown/index.js":
+/*!***************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/drilldown/index.js ***!
+ \***************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_features_overlays__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/overlays */ "../node_modules/diagram-js/lib/features/overlays/index.js");
+/* harmony import */ var diagram_js_lib_features_change_support__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/change-support */ "../node_modules/diagram-js/lib/features/change-support/index.js");
+/* harmony import */ var diagram_js_lib_features_root_elements__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/features/root-elements */ "../node_modules/diagram-js/lib/features/root-elements/index.js");
+/* harmony import */ var _DrilldownBreadcrumbs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./DrilldownBreadcrumbs */ "../node_modules/bpmn-js/lib/features/drilldown/DrilldownBreadcrumbs.js");
+/* harmony import */ var _DrilldownCentering__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./DrilldownCentering */ "../node_modules/bpmn-js/lib/features/drilldown/DrilldownCentering.js");
+/* harmony import */ var _SubprocessCompatibility__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SubprocessCompatibility */ "../node_modules/bpmn-js/lib/features/drilldown/SubprocessCompatibility.js");
+/* harmony import */ var _DrilldownOverlayBehavior__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./DrilldownOverlayBehavior */ "../node_modules/bpmn-js/lib/features/drilldown/DrilldownOverlayBehavior.js");
- /**
- * A properties provider for Camunda related properties.
- *
- * @param {EventBus} eventBus
- * @param {Canvas} canvas
- * @param {BpmnFactory} bpmnFactory
- * @param {ElementRegistry} elementRegistry
- * @param {ElementTemplates} elementTemplates
- * @param {Translate} translate
- */
- function CamundaPropertiesProvider(
- eventBus, canvas, bpmnFactory,
- elementRegistry, elementTemplates, translate) {
- PropertiesActivator.call(this, eventBus);
- this.getTabs = function(element) {
- var generalTab = {
- id: 'general',
- label: translate('General'),
- groups: createGeneralTabGroups(
- element, canvas, bpmnFactory,
- elementRegistry, elementTemplates, translate)
- };
- var variablesTab = {
- id: 'variables',
- label: translate('Variables'),
- groups: createVariablesTabGroups(element, bpmnFactory, elementRegistry, translate)
- };
- var formsTab = {
- id: 'forms',
- label: translate('Forms'),
- groups: createFormsTabGroups(element, bpmnFactory, elementRegistry, translate)
- };
- var listenersTab = {
- id: 'listeners',
- label: translate('Listeners'),
- groups: createListenersTabGroups(element, bpmnFactory, elementRegistry, translate),
- enabled: function(element) {
- return !eventDefinitionHelper.getLinkEventDefinition(element)
- || (!is(element, 'bpmn:IntermediateThrowEvent')
- && eventDefinitionHelper.getLinkEventDefinition(element));
- }
- };
- var inputOutputTab = {
- id: 'input-output',
- label: translate('Input/Output'),
- groups: createInputOutputTabGroups(element, bpmnFactory, elementRegistry, translate)
- };
- var connectorTab = {
- id: 'connector',
- label: translate('Connector'),
- groups: createConnectorTabGroups(element, bpmnFactory, elementRegistry, translate),
- enabled: function(element) {
- var bo = implementationTypeHelper.getServiceTaskLikeBusinessObject(element);
- return bo && implementationTypeHelper.getImplementationType(bo) === 'connector';
- }
- };
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [ diagram_js_lib_features_overlays__WEBPACK_IMPORTED_MODULE_0__["default"], diagram_js_lib_features_change_support__WEBPACK_IMPORTED_MODULE_1__["default"], diagram_js_lib_features_root_elements__WEBPACK_IMPORTED_MODULE_2__["default"] ],
+ __init__: [ 'drilldownBreadcrumbs', 'drilldownOverlayBehavior', 'drilldownCentering', 'subprocessCompatibility' ],
+ drilldownBreadcrumbs: [ 'type', _DrilldownBreadcrumbs__WEBPACK_IMPORTED_MODULE_3__["default"] ],
+ drilldownCentering: [ 'type', _DrilldownCentering__WEBPACK_IMPORTED_MODULE_4__["default"] ],
+ drilldownOverlayBehavior: [ 'type', _DrilldownOverlayBehavior__WEBPACK_IMPORTED_MODULE_5__["default"] ],
+ subprocessCompatibility: [ 'type', _SubprocessCompatibility__WEBPACK_IMPORTED_MODULE_6__["default"] ]
+});
- var fieldInjectionsTab = {
- id: 'field-injections',
- label: translate('Field Injections'),
- groups: createFieldInjectionsTabGroups(element, bpmnFactory, elementRegistry, translate)
- };
+/***/ }),
- var extensionsTab = {
- id: 'extensionElements',
- label: translate('Extensions'),
- groups: createExtensionElementsGroups(element, bpmnFactory, elementRegistry, translate)
- };
+/***/ "../node_modules/bpmn-js/lib/features/editor-actions/BpmnEditorActions.js":
+/*!********************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/editor-actions/BpmnEditorActions.js ***!
+ \********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- return [
- generalTab,
- variablesTab,
- connectorTab,
- formsTab,
- listenersTab,
- inputOutputTab,
- fieldInjectionsTab,
- extensionsTab
- ];
- };
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BpmnEditorActions)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_features_editor_actions_EditorActions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/editor-actions/EditorActions */ "../node_modules/diagram-js/lib/features/editor-actions/EditorActions.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! diagram-js/lib/util/Elements */ "../node_modules/diagram-js/lib/util/Elements.js");
- }
- CamundaPropertiesProvider.$inject = [
- 'eventBus',
- 'canvas',
- 'bpmnFactory',
- 'elementRegistry',
- 'elementTemplates',
- 'translate'
- ];
- inherits(CamundaPropertiesProvider, PropertiesActivator);
- module.exports = CamundaPropertiesProvider;
- },{"../../PropertiesActivator":3,"../../helper/AsyncCapableHelper":23,"../../helper/EventDefinitionHelper":27,"../../helper/ImplementationTypeHelper":30,"../bpmn/parts/DocumentationProps":34,"../bpmn/parts/EventProps":35,"../bpmn/parts/ExecutableProps":36,"../bpmn/parts/IdProps":37,"../bpmn/parts/LinkProps":38,"../bpmn/parts/NameProps":39,"../bpmn/parts/ProcessProps":40,"./element-templates/parts/ChooserProps":61,"./element-templates/parts/CustomProps":62,"./parts/AsynchronousContinuationProps":64,"./parts/CallActivityProps":65,"./parts/CandidateStarterProps":66,"./parts/ConditionalProps":67,"./parts/ConnectorDetailProps":68,"./parts/ConnectorInputOutputParameterProps":69,"./parts/ConnectorInputOutputProps":70,"./parts/ErrorEventProps":71,"./parts/ExternalTaskConfigurationProps":72,"./parts/FieldInjectionProps":73,"./parts/FormProps":74,"./parts/HistoryTimeToLiveProps":75,"./parts/InputOutputParameterProps":76,"./parts/InputOutputProps":77,"./parts/JobConfigurationProps":78,"./parts/ListenerDetailProps":79,"./parts/ListenerFieldInjectionProps":80,"./parts/ListenerProps":81,"./parts/MultiInstanceLoopProps":82,"./parts/PropertiesProps":83,"./parts/ScriptTaskProps":84,"./parts/ServiceTaskDelegateProps":85,"./parts/StartEventInitiator":86,"./parts/TasklistProps":87,"./parts/UserTaskProps":88,"./parts/VariableMappingProps":89,"./parts/VersionTagProps":90,"bpmn-js/lib/util/ModelUtil":240,"inherits":438}],52:[function(require,module,exports){
- 'use strict';
- var assign = require('lodash/assign');
- /**
- * Create an input parameter representing the given
- * binding and value.
- *
- * @param {PropertyBinding} binding
- * @param {String} value
- * @param {BpmnFactory} bpmnFactory
- *
- * @return {ModdleElement}
- */
- function createInputParameter(binding, value, bpmnFactory) {
- var scriptFormat = binding.scriptFormat,
- parameterValue,
- parameterDefinition;
-
- if (scriptFormat) {
- parameterDefinition = bpmnFactory.create('camunda:Script', {
- scriptFormat: scriptFormat,
- value: value
- });
- } else {
- parameterValue = value;
- }
- return bpmnFactory.create('camunda:InputParameter', {
- name: binding.name,
- value: parameterValue,
- definition: parameterDefinition
- });
- }
- module.exports.createInputParameter = createInputParameter;
+/**
+ * @typedef {import('didi').Injector} Injector
+ */
- /**
- * Create an output parameter representing the given
- * binding and value.
- *
- * @param {PropertyBinding} binding
- * @param {String} value
- * @param {BpmnFactory} bpmnFactory
- *
- * @return {ModdleElement}
- */
- function createOutputParameter(binding, value, bpmnFactory) {
- var scriptFormat = binding.scriptFormat,
- parameterValue,
- parameterDefinition;
-
- if (scriptFormat) {
- parameterDefinition = bpmnFactory.create('camunda:Script', {
- scriptFormat: scriptFormat,
- value: binding.source
- });
- } else {
- parameterValue = binding.source;
- }
+/**
+ * Registers and executes BPMN specific editor actions.
+ *
+ * @param {Injector} injector
+ */
+function BpmnEditorActions(injector) {
+ injector.invoke(diagram_js_lib_features_editor_actions_EditorActions__WEBPACK_IMPORTED_MODULE_0__["default"], this);
+}
- return bpmnFactory.create('camunda:OutputParameter', {
- name: value,
- value: parameterValue,
- definition: parameterDefinition
- });
- }
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_1__["default"])(BpmnEditorActions, diagram_js_lib_features_editor_actions_EditorActions__WEBPACK_IMPORTED_MODULE_0__["default"]);
- module.exports.createOutputParameter = createOutputParameter;
+BpmnEditorActions.$inject = [
+ 'injector'
+];
+/**
+ * Register default actions.
+ *
+ * @param {Injector} injector
+ */
+BpmnEditorActions.prototype._registerDefaultActions = function(injector) {
+
+ // (0) invoke super method
+
+ diagram_js_lib_features_editor_actions_EditorActions__WEBPACK_IMPORTED_MODULE_0__["default"].prototype._registerDefaultActions.call(this, injector);
+
+ // (1) retrieve optional components to integrate with
+
+ var canvas = injector.get('canvas', false);
+ var elementRegistry = injector.get('elementRegistry', false);
+ var selection = injector.get('selection', false);
+ var spaceTool = injector.get('spaceTool', false);
+ var lassoTool = injector.get('lassoTool', false);
+ var handTool = injector.get('handTool', false);
+ var globalConnect = injector.get('globalConnect', false);
+ var distributeElements = injector.get('distributeElements', false);
+ var alignElements = injector.get('alignElements', false);
+ var directEditing = injector.get('directEditing', false);
+ var searchPad = injector.get('searchPad', false);
+ var modeling = injector.get('modeling', false);
+ var contextPad = injector.get('contextPad', false);
+
+ // (2) check components and register actions
+
+ if (canvas && elementRegistry && selection) {
+ this._registerAction('selectElements', function() {
+
+ // select all elements except for the invisible
+ // root element
+ var rootElement = canvas.getRootElement();
+
+ var elements = elementRegistry.filter(function(element) {
+ return element !== rootElement;
+ });
+
+ selection.select(elements);
+
+ return elements;
+ });
+ }
+
+ if (spaceTool) {
+ this._registerAction('spaceTool', function() {
+ spaceTool.toggle();
+ });
+ }
+
+ if (lassoTool) {
+ this._registerAction('lassoTool', function() {
+ lassoTool.toggle();
+ });
+ }
+
+ if (handTool) {
+ this._registerAction('handTool', function() {
+ handTool.toggle();
+ });
+ }
+
+ if (globalConnect) {
+ this._registerAction('globalConnectTool', function() {
+ globalConnect.toggle();
+ });
+ }
+
+ if (selection && distributeElements) {
+ this._registerAction('distributeElements', function(opts) {
+ var currentSelection = selection.get(),
+ type = opts.type;
+
+ if (currentSelection.length) {
+ distributeElements.trigger(currentSelection, type);
+ }
+ });
+ }
+
+ if (selection && alignElements) {
+ this._registerAction('alignElements', function(opts) {
+ var currentSelection = selection.get(),
+ aligneableElements = [],
+ type = opts.type;
+
+ if (currentSelection.length) {
+ aligneableElements = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.filter)(currentSelection, function(element) {
+ return !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:Lane');
+ });
- /**
- * Create camunda property from the given binding.
- *
- * @param {PropertyBinding} binding
- * @param {String} value
- * @param {BpmnFactory} bpmnFactory
- *
- * @return {ModdleElement}
- */
- function createCamundaProperty(binding, value, bpmnFactory) {
- return bpmnFactory.create('camunda:Property', {
- name: binding.name,
- value: value || ''
- });
- }
+ alignElements.trigger(aligneableElements, type);
+ }
+ });
+ }
+
+ if (selection && modeling) {
+ this._registerAction('setColor', function(opts) {
+ var currentSelection = selection.get();
+
+ if (currentSelection.length) {
+ modeling.setColor(currentSelection, opts);
+ }
+ });
+ }
+
+ if (selection && directEditing) {
+ this._registerAction('directEditing', function() {
+ var currentSelection = selection.get();
+
+ if (currentSelection.length) {
+ directEditing.activate(currentSelection[0]);
+ }
+ });
+ }
+
+ if (searchPad) {
+ this._registerAction('find', function() {
+ searchPad.toggle();
+ });
+ }
+
+ if (canvas && modeling) {
+ this._registerAction('moveToOrigin', function() {
+ var rootElement = canvas.getRootElement(),
+ boundingBox,
+ elements;
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(rootElement, 'bpmn:Collaboration')) {
+ elements = elementRegistry.filter(function(element) {
+ return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element.parent, 'bpmn:Collaboration');
+ });
+ } else {
+ elements = elementRegistry.filter(function(element) {
+ return element !== rootElement && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element.parent, 'bpmn:SubProcess');
+ });
+ }
- module.exports.createCamundaProperty = createCamundaProperty;
+ boundingBox = (0,diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_4__.getBBox)(elements);
+ modeling.moveElements(
+ elements,
+ { x: -boundingBox.x, y: -boundingBox.y },
+ rootElement
+ );
+ });
+ }
- /**
- * Create camunda:in element from given binding.
- *
- * @param {PropertyBinding} binding
- * @param {String} value
- * @param {BpmnFactory} bpmnFactory
- *
- * @return {ModdleElement}
- */
- function createCamundaIn(binding, value, bpmnFactory) {
+ if (selection && contextPad) {
+ this._registerAction('replaceElement', function(event) {
+ contextPad.triggerEntry('replace', 'click', event);
+ });
+ }
- var properties = createCamundaInOutAttrs(binding, value);
+};
- return bpmnFactory.create('camunda:In', properties);
- }
- module.exports.createCamundaIn = createCamundaIn;
+/***/ }),
+/***/ "../node_modules/bpmn-js/lib/features/editor-actions/index.js":
+/*!********************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/editor-actions/index.js ***!
+ \********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- /**
- * Create camunda:in with businessKey element from given binding.
- *
- * @param {PropertyBinding} binding
- * @param {String} value
- * @param {BpmnFactory} bpmnFactory
- *
- * @return {ModdleElement}
- */
- function createCamundaInWithBusinessKey(binding, value, bpmnFactory) {
- return bpmnFactory.create('camunda:In', {
- businessKey: value
- });
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_features_editor_actions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/editor-actions */ "../node_modules/diagram-js/lib/features/editor-actions/index.js");
+/* harmony import */ var _BpmnEditorActions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BpmnEditorActions */ "../node_modules/bpmn-js/lib/features/editor-actions/BpmnEditorActions.js");
- module.exports.createCamundaInWithBusinessKey = createCamundaInWithBusinessKey;
- /**
- * Create camunda:out element from given binding.
- *
- * @param {PropertyBinding} binding
- * @param {String} value
- * @param {BpmnFactory} bpmnFactory
- *
- * @return {ModdleElement}
- */
- function createCamundaOut(binding, value, bpmnFactory) {
- var properties = createCamundaInOutAttrs(binding, value);
- return bpmnFactory.create('camunda:Out', properties);
- }
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ diagram_js_lib_features_editor_actions__WEBPACK_IMPORTED_MODULE_0__["default"]
+ ],
+ editorActions: [ 'type', _BpmnEditorActions__WEBPACK_IMPORTED_MODULE_1__["default"] ]
+});
- module.exports.createCamundaOut = createCamundaOut;
+/***/ }),
- /**
- * Create camunda:executionListener element containing an inline script from given binding.
- *
- * @param {PropertyBinding} binding
- * @param {String} value
- * @param {BpmnFactory} bpmnFactory
- *
- * @return {ModdleElement}
- */
- function createCamundaExecutionListenerScript(binding, value, bpmnFactory) {
- var scriptFormat = binding.scriptFormat,
- parameterValue,
- parameterDefinition;
-
- if (scriptFormat) {
- parameterDefinition = bpmnFactory.create('camunda:Script', {
- scriptFormat: scriptFormat,
- value: value
- });
- } else {
- parameterValue = value;
- }
+/***/ "../node_modules/bpmn-js/lib/features/grid-snapping/BpmnGridSnapping.js":
+/*!******************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/grid-snapping/BpmnGridSnapping.js ***!
+ \******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- return bpmnFactory.create('camunda:ExecutionListener', {
- event: binding.event,
- value: parameterValue,
- script: parameterDefinition
- });
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BpmnGridSnapping)
+/* harmony export */ });
+/* harmony import */ var _modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modeling/util/ModelingUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- module.exports.createCamundaExecutionListenerScript = createCamundaExecutionListenerScript;
- /**
- * Create camunda:field element containing string or expression from given binding.
- *
- * @param {PropertyBinding} binding
- * @param {String} value
- * @param {BpmnFactory} bpmnFactory
- *
- * @return {ModdleElement}
- */
- function createCamundaFieldInjection(binding, value, bpmnFactory) {
- var DEFAULT_PROPS = {
- 'string': undefined,
- 'expression': undefined,
- 'name': undefined
- };
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ */
- var props = assign({}, DEFAULT_PROPS);
+/**
+ * @param {EventBus} eventBus
+ */
+function BpmnGridSnapping(eventBus) {
+ eventBus.on([
+ 'create.init',
+ 'shape.move.init'
+ ], function(event) {
+ var context = event.context,
+ shape = event.shape;
+
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.isAny)(shape, [
+ 'bpmn:Participant',
+ 'bpmn:SubProcess',
+ 'bpmn:TextAnnotation'
+ ])) {
+ if (!context.gridSnappingContext) {
+ context.gridSnappingContext = {};
+ }
+
+ context.gridSnappingContext.snapLocation = 'top-left';
+ }
+ });
+}
+
+BpmnGridSnapping.$inject = [ 'eventBus' ];
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/features/grid-snapping/behavior/GridSnappingAutoPlaceBehavior.js":
+/*!****************************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/grid-snapping/behavior/GridSnappingAutoPlaceBehavior.js ***!
+ \****************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ GridSnappingAutoPlaceBehavior)
+/* harmony export */ });
+/* harmony import */ var _auto_place_BpmnAutoPlaceUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../auto-place/BpmnAutoPlaceUtil */ "../node_modules/bpmn-js/lib/features/auto-place/BpmnAutoPlaceUtil.js");
+/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+
+
+
+
+
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('diagram-js/lib/features/grid-snapping/GridSnapping').default} GridSnapping
+ *
+ * @typedef {import('diagram-js/lib/util/Types').Axis} Axis
+ */
- if (!binding.expression) {
- props.string = value;
- } else {
- props.expression = value;
- }
- props.name = binding.name;
+var HIGH_PRIORITY = 2000;
- return bpmnFactory.create('camunda:Field', props);
- }
- module.exports.createCamundaFieldInjection = createCamundaFieldInjection;
+/**
+ * @param {EventBus} eventBus
+ * @param {GridSnapping} gridSnapping
+ */
+function GridSnappingAutoPlaceBehavior(eventBus, gridSnapping) {
+ eventBus.on('autoPlace', HIGH_PRIORITY, function(context) {
+ var source = context.source,
+ sourceMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.getMid)(source),
+ shape = context.shape;
+ var position = (0,_auto_place_BpmnAutoPlaceUtil__WEBPACK_IMPORTED_MODULE_1__.getNewShapePosition)(source, shape);
-// helpers ////////////////////////////
+ [ 'x', 'y' ].forEach(function(axis) {
+ var options = {};
- /**
- * Create properties for camunda:in and camunda:out types.
- */
- function createCamundaInOutAttrs(binding, value) {
+ // do not snap if x/y equal
+ if (position[ axis ] === sourceMid[ axis ]) {
+ return;
+ }
- var properties = {};
+ if (position[ axis ] > sourceMid[ axis ]) {
+ options.min = position[ axis ];
+ } else {
+ options.max = position[ axis ];
+ }
- // camunda:in source(Expression) target
- if (binding.target) {
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:TextAnnotation')) {
- properties.target = binding.target;
+ if (isHorizontal(axis)) {
+ options.offset = -shape.width / 2;
+ } else {
+ options.offset = -shape.height / 2;
+ }
- if (binding.expression) {
- properties.sourceExpression = value;
- } else {
- properties.source = value;
- }
- } else
+ }
- // camunda:(in|out) variables local
- if (binding.variables) {
- properties.variables = 'all';
+ position[ axis ] = gridSnapping.snapValue(position[ axis ], options);
- if (binding.variables === 'local') {
- properties.local = true;
- }
- }
+ });
- // camunda:out source(Expression) target
- else {
- properties.target = value;
+ // must be returned to be considered by auto place
+ return position;
+ });
+}
- [ 'source', 'sourceExpression' ].forEach(function(k) {
- if (binding[k]) {
- properties[k] = binding[k];
- }
- });
- }
+GridSnappingAutoPlaceBehavior.$inject = [
+ 'eventBus',
+ 'gridSnapping'
+];
- return properties;
- }
+// helpers //////////
- },{"lodash/assign":604}],53:[function(require,module,exports){
- 'use strict';
+/**
+ * @param {Axis} axis
+ *
+ * @return {boolean}
+ */
+function isHorizontal(axis) {
+ return axis === 'x';
+}
- var inherits = require('inherits');
+/***/ }),
- var getTemplate = require('./Helper').getTemplate;
+/***/ "../node_modules/bpmn-js/lib/features/grid-snapping/behavior/GridSnappingLayoutConnectionBehavior.js":
+/*!***********************************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/grid-snapping/behavior/GridSnappingLayoutConnectionBehavior.js ***!
+ \***********************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var PropertiesActivator = require('../../../PropertiesActivator');
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ GridSnappingLayoutConnectionBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var diagram_js_lib_util_Geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/util/Geometry */ "../node_modules/diagram-js/lib/util/Geometry.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
- var HIGHER_PRIORITY = 1100;
- /**
- * Applies template visibility settings.
- *
- * Controlled using `entriesVisible` on template config object:
- *
- * ```json
- * "entriesVisible": {
- * "_all": true|false,
- * "entryName": true|false,
- * ...
- * }
- * ```
- *
- * @param {EventBus} eventBus
- * @param {ElementTemplates} elementTemplates
- */
- function CustomElementsPropertiesActivator(eventBus, elementTemplates) {
- PropertiesActivator.call(this, eventBus, HIGHER_PRIORITY);
- this.isEntryVisible = function(entry, element) {
- var template = getTemplate(element, elementTemplates);
- if (template && !isEntryVisible(entry, template)) {
- return false;
- }
- };
- this.isPropertyEditable = function(entry, propertyName, element) {
- var template = getTemplate(element, elementTemplates);
- if (template && !isEntryEditable(entry, template)) {
- return false;
- }
- };
- }
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('diagram-js/lib/features/grid-snapping/GridSnapping').default} GridSnapping
+ * @typedef {import('../../modeling/Modeling').default} Modeling
+ *
+ * @typedef {import('diagram-js/lib/util/Types').Point} Point
+ */
- CustomElementsPropertiesActivator.$inject = [ 'eventBus', 'elementTemplates' ];
+var HIGH_PRIORITY = 3000;
- inherits(CustomElementsPropertiesActivator, PropertiesActivator);
- module.exports = CustomElementsPropertiesActivator;
+/**
+ * Snaps connections with Manhattan layout.
+ *
+ * @param {EventBus} eventBus
+ * @param {GridSnapping} gridSnapping
+ * @param {Modeling} modeling
+ */
+function GridSnappingLayoutConnectionBehavior(eventBus, gridSnapping, modeling) {
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
+ this._gridSnapping = gridSnapping;
+ var self = this;
-// helpers ////////////////////////////////////
+ this.postExecuted([
+ 'connection.create',
+ 'connection.layout'
+ ], HIGH_PRIORITY, function(event) {
+ var context = event.context,
+ connection = context.connection,
+ hints = context.hints || {},
+ waypoints = connection.waypoints;
+ if (hints.connectionStart || hints.connectionEnd || hints.createElementsBehavior === false) {
+ return;
+ }
- var CUSTOM_PROPERTIES_PATTERN = /^custom-/;
+ if (!hasMiddleSegments(waypoints)) {
+ return;
+ }
- var DEFAULT_ENTRIES_VISIBLE = {
- _all: false,
- id: true,
- name: true
- };
+ modeling.updateWaypoints(connection, self.snapMiddleSegments(waypoints));
+ });
+}
- function isCustomEntry(entry) {
- return CUSTOM_PROPERTIES_PATTERN.test(entry.id);
- }
+GridSnappingLayoutConnectionBehavior.$inject = [
+ 'eventBus',
+ 'gridSnapping',
+ 'modeling'
+];
- function isEntryVisible(entry, template) {
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_1__["default"])(GridSnappingLayoutConnectionBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- var entryId = entry.id;
+/**
+ * Snap middle segments of a given connection.
+ *
+ * @param {Point[]} waypoints
+ *
+ * @return {Point[]}
+ */
+GridSnappingLayoutConnectionBehavior.prototype.snapMiddleSegments = function(waypoints) {
+ var gridSnapping = this._gridSnapping,
+ snapped;
- if (entryId === 'elementTemplate-chooser' || isCustomEntry(entry)) {
- return true;
- }
+ waypoints = waypoints.slice();
- var entriesVisible = template.entriesVisible || DEFAULT_ENTRIES_VISIBLE;
+ for (var i = 1; i < waypoints.length - 2; i++) {
- if (typeof entriesVisible === 'boolean') {
- return entriesVisible;
- }
+ snapped = snapSegment(gridSnapping, waypoints[i], waypoints[i + 1]);
- var defaultVisible = entriesVisible._all || false,
- entryVisible = entriesVisible[entryId];
+ waypoints[i] = snapped[0];
+ waypoints[i + 1] = snapped[1];
+ }
- // d = true, e = false => false
- // d = false, e = true => true
- // d = false, e = false
- return (
- (defaultVisible === true && entryVisible !== false) ||
- (defaultVisible === false && entryVisible === true)
- );
- }
+ return waypoints;
+};
- function isEntryEditable(entry, template) {
- var property;
+// helpers //////////
- if (isCustomEntry(entry)) {
- property = getProperty(template, entry);
+/**
+ * Check whether a connection has a middle segments.
+ *
+ * @param {Point[]} waypoints
+ *
+ * @return {boolean}
+ */
+function hasMiddleSegments(waypoints) {
+ return waypoints.length > 3;
+}
- return property && property.editable !== false;
- }
+/**
+ * Check whether an alignment is horizontal.
+ *
+ * @param {string} aligned
+ *
+ * @return {boolean}
+ */
+function horizontallyAligned(aligned) {
+ return aligned === 'h';
+}
- return true;
- }
+/**
+ * Check whether an alignment is vertical.
+ *
+ * @param {string} aligned
+ *
+ * @return {boolean}
+ */
+function verticallyAligned(aligned) {
+ return aligned === 'v';
+}
- function getProperty(template, entry) {
+/**
+ * Get middle segments from a given connection.
+ *
+ * @param {Point[]} waypoints
+ *
+ * @return {Point[]}
+ */
+function snapSegment(gridSnapping, segmentStart, segmentEnd) {
- var index;
- var idx = entry.id.replace('custom-' + template.id + '-', '');
- if (idx.indexOf('-') !== -1) {
- var indexes = idx.split('-');
- if (indexes.length == 2) {
- var scopeName = indexes[0].replace(/_/g, ':');
- index = parseInt(indexes[1], 10);
- if (scopeName && !isNaN(index)) {
- return template.scopes[scopeName].properties[index];
- }
- }
- } else {
- index = parseInt(idx, 10);
- if (!isNaN(index)) {
- return template.properties[index];
- }
- }
+ var aligned = (0,diagram_js_lib_util_Geometry__WEBPACK_IMPORTED_MODULE_2__.pointsAligned)(segmentStart, segmentEnd);
- throw new Error('cannot extract property index for entry <' + entry.id + '>');
- }
+ var snapped = {};
- },{"../../../PropertiesActivator":3,"./Helper":56,"inherits":438}],54:[function(require,module,exports){
- 'use strict';
+ if (horizontallyAligned(aligned)) {
- var values = require('lodash/values');
+ // snap horizontally
+ snapped.y = gridSnapping.snapValue(segmentStart.y);
+ }
- /**
- * The guy knowing all configured element templates.
- *
- * This registry won't validate. Use the {@link Validator}
- * to verify a template is valid prior to adding it to
- * this registry.
- */
- function ElementTemplates() {
+ if (verticallyAligned(aligned)) {
- this._templates = {};
+ // snap vertically
+ snapped.x = gridSnapping.snapValue(segmentStart.x);
+ }
- /**
- * Sets the known element templates.
- *
- * @param {Array} descriptors
- *
- * @return {ElementTemplates}
- */
- this.set = function(descriptors) {
+ if ('x' in snapped || 'y' in snapped) {
+ segmentStart = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)({}, segmentStart, snapped);
+ segmentEnd = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)({}, segmentEnd, snapped);
+ }
- var templates = this._templates = {};
+ return [ segmentStart, segmentEnd ];
+}
- descriptors.forEach(function(descriptor) {
- templates[descriptor.id] = descriptor;
- });
+/***/ }),
- return this;
- };
+/***/ "../node_modules/bpmn-js/lib/features/grid-snapping/behavior/GridSnappingParticipantBehavior.js":
+/*!******************************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/grid-snapping/behavior/GridSnappingParticipantBehavior.js ***!
+ \******************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- /**
- * Get template descriptor with given id.
- *
- * @param {String} id
- *
- * @return {TemplateDescriptor}
- */
- this.get = function(id) {
- return this._templates[id];
- };
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ GridSnappingParticipantBehavior)
+/* harmony export */ });
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- /**
- * Return all known template descriptors.
- *
- * @return {Array}
- */
- this.getAll = function() {
- return values(this._templates);
- };
- }
+/**
+ * @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('diagram-js/lib/features/grid-snapping/GridSnapping').default} GridSnapping
+ */
- module.exports = ElementTemplates;
- },{"lodash/values":643}],55:[function(require,module,exports){
- 'use strict';
+var HIGHER_PRIORITY = 1750;
- var Validator = require('./Validator');
+/**
+ * @param {Canvas} canvas
+ * @param {EventBus} eventBus
+ * @param {GridSnapping} gridSnapping
+ */
+function GridSnappingParticipantBehavior(canvas, eventBus, gridSnapping) {
+ eventBus.on([
+ 'create.start',
+ 'shape.move.start'
+ ], HIGHER_PRIORITY, function(event) {
+ var context = event.context,
+ shape = context.shape,
+ rootElement = canvas.getRootElement();
+
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(shape, 'bpmn:Participant') ||
+ !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(rootElement, 'bpmn:Process') ||
+ !rootElement.children.length) {
+ return;
+ }
+
+ var createConstraints = context.createConstraints;
+
+ if (!createConstraints) {
+ return;
+ }
+
+ shape.width = gridSnapping.snapValue(shape.width, { min: shape.width });
+ shape.height = gridSnapping.snapValue(shape.height, { min: shape.height });
+ });
+}
+
+GridSnappingParticipantBehavior.$inject = [
+ 'canvas',
+ 'eventBus',
+ 'gridSnapping'
+];
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/features/grid-snapping/behavior/index.js":
+/*!****************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/grid-snapping/behavior/index.js ***!
+ \****************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _GridSnappingAutoPlaceBehavior__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./GridSnappingAutoPlaceBehavior */ "../node_modules/bpmn-js/lib/features/grid-snapping/behavior/GridSnappingAutoPlaceBehavior.js");
+/* harmony import */ var _GridSnappingParticipantBehavior__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GridSnappingParticipantBehavior */ "../node_modules/bpmn-js/lib/features/grid-snapping/behavior/GridSnappingParticipantBehavior.js");
+/* harmony import */ var _GridSnappingLayoutConnectionBehavior__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GridSnappingLayoutConnectionBehavior */ "../node_modules/bpmn-js/lib/features/grid-snapping/behavior/GridSnappingLayoutConnectionBehavior.js");
+
+
+
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __init__: [
+ 'gridSnappingAutoPlaceBehavior',
+ 'gridSnappingParticipantBehavior',
+ 'gridSnappingLayoutConnectionBehavior',
+ ],
+ gridSnappingAutoPlaceBehavior: [ 'type', _GridSnappingAutoPlaceBehavior__WEBPACK_IMPORTED_MODULE_0__["default"] ],
+ gridSnappingParticipantBehavior: [ 'type', _GridSnappingParticipantBehavior__WEBPACK_IMPORTED_MODULE_1__["default"] ],
+ gridSnappingLayoutConnectionBehavior: [ 'type', _GridSnappingLayoutConnectionBehavior__WEBPACK_IMPORTED_MODULE_2__["default"] ]
+});
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/features/grid-snapping/index.js":
+/*!*******************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/grid-snapping/index.js ***!
+ \*******************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _BpmnGridSnapping__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BpmnGridSnapping */ "../node_modules/bpmn-js/lib/features/grid-snapping/BpmnGridSnapping.js");
+/* harmony import */ var diagram_js_lib_features_grid_snapping__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/grid-snapping */ "../node_modules/diagram-js/lib/features/grid-snapping/index.js");
+/* harmony import */ var _behavior__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./behavior */ "../node_modules/bpmn-js/lib/features/grid-snapping/behavior/index.js");
+
+
+
+
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ diagram_js_lib_features_grid_snapping__WEBPACK_IMPORTED_MODULE_0__["default"],
+ _behavior__WEBPACK_IMPORTED_MODULE_1__["default"]
+ ],
+ __init__: [ 'bpmnGridSnapping' ],
+ bpmnGridSnapping: [ 'type', _BpmnGridSnapping__WEBPACK_IMPORTED_MODULE_2__["default"] ]
+});
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/features/interaction-events/BpmnInteractionEvents.js":
+/*!****************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/interaction-events/BpmnInteractionEvents.js ***!
+ \****************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BpmnInteractionEvents)
+/* harmony export */ });
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
- /**
- * The guy responsible for template loading.
- *
- * Provide the actual templates via the `config.elementTemplates`.
- *
- * That configuration can either be an array of template
- * descriptors or a node style callback to retrieve
- * the templates asynchronously.
- *
- * @param {Array|Function} loadTemplates
- * @param {EventBus} eventBus
- * @param {ElementTemplates} elementTemplates
- */
- function ElementTemplatesLoader(loadTemplates, eventBus, elementTemplates) {
- this._loadTemplates = loadTemplates;
- this._eventBus = eventBus;
- this._elementTemplates = elementTemplates;
- var self = this;
- eventBus.on('diagram.init', function() {
- self.reload();
- });
- }
- module.exports = ElementTemplatesLoader;
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('diagram-js/lib/features/interaction-events/InteractionEvents').default} InteractionEvents
+ *
+ * @typedef {import('../../model/Types').Element} Element
+ * @typedef {import('../../model/Types').Shape} Shape
+ */
- ElementTemplatesLoader.$inject = [
- 'config.elementTemplates',
- 'eventBus',
- 'elementTemplates'
- ];
+var LABEL_WIDTH = 30,
+ LABEL_HEIGHT = 30;
- ElementTemplatesLoader.prototype.reload = function() {
+/**
+ * BPMN-specific hit zones and interaction fixes.
+ *
+ * @param {EventBus} eventBus
+ * @param {InteractionEvents} interactionEvents
+ */
+function BpmnInteractionEvents(eventBus, interactionEvents) {
+
+ this._interactionEvents = interactionEvents;
+
+ var self = this;
+
+ eventBus.on([
+ 'interactionEvents.createHit',
+ 'interactionEvents.updateHit'
+ ], function(context) {
+ var element = context.element,
+ gfx = context.gfx;
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Lane')) {
+ return self._createParticipantHit(element, gfx);
+ } else
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Participant')) {
+ if ((0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_1__.isExpanded)(element)) {
+ return self._createParticipantHit(element, gfx);
+ } else {
+ return self._createDefaultHit(element, gfx);
+ }
+ } else
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:SubProcess')) {
+ if ((0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_1__.isExpanded)(element)) {
+ return self._createSubProcessHit(element, gfx);
+ } else {
+ return self._createDefaultHit(element, gfx);
+ }
+ }
+ });
+
+}
+
+BpmnInteractionEvents.$inject = [
+ 'eventBus',
+ 'interactionEvents'
+];
+
+/**
+ * @param {Element} element
+ * @param {SVGElement} gfx
+ *
+ * @return {boolean}
+ */
+BpmnInteractionEvents.prototype._createDefaultHit = function(element, gfx) {
+ this._interactionEvents.removeHits(gfx);
- var self = this;
+ this._interactionEvents.createDefaultHit(element, gfx);
- var loadTemplates = this._loadTemplates;
+ // indicate that we created a hit
+ return true;
+};
- // no templates specified
- if (typeof loadTemplates === 'undefined') {
- return;
- }
+/**
+ * @param {Shape} element
+ * @param {SVGElement} gfx
+ *
+ * @return {boolean}
+ */
+BpmnInteractionEvents.prototype._createParticipantHit = function(element, gfx) {
+
+ // remove existing hits
+ this._interactionEvents.removeHits(gfx);
+
+ // add body hit
+ this._interactionEvents.createBoxHit(gfx, 'no-move', {
+ width: element.width,
+ height: element.height
+ });
+
+ // add outline hit
+ this._interactionEvents.createBoxHit(gfx, 'click-stroke', {
+ width: element.width,
+ height: element.height
+ });
+
+ // add label hit
+ this._interactionEvents.createBoxHit(gfx, 'all', {
+ width: LABEL_WIDTH,
+ height: element.height
+ });
+
+ // indicate that we created a hit
+ return true;
+};
+
+/**
+ * @param {Shape} element
+ * @param {SVGElement} gfx
+ *
+ * @return {boolean}
+ */
+BpmnInteractionEvents.prototype._createSubProcessHit = function(element, gfx) {
- // template loader function specified
- if (typeof loadTemplates === 'function') {
+ // remove existing hits
+ this._interactionEvents.removeHits(gfx);
- return loadTemplates(function(err, templates) {
+ // add body hit
+ this._interactionEvents.createBoxHit(gfx, 'no-move', {
+ width: element.width,
+ height: element.height
+ });
- if (err) {
- return self.templateErrors([ err ]);
- }
+ // add outline hit
+ this._interactionEvents.createBoxHit(gfx, 'click-stroke', {
+ width: element.width,
+ height: element.height
+ });
- self.setTemplates(templates);
- });
- }
+ // add label hit
+ this._interactionEvents.createBoxHit(gfx, 'all', {
+ width: element.width,
+ height: LABEL_HEIGHT
+ });
- // templates array specified
- if (loadTemplates.length) {
- return this.setTemplates(loadTemplates);
- }
+ // indicate that we created a hit
+ return true;
+};
- };
+/***/ }),
- ElementTemplatesLoader.prototype.setTemplates = function(templates) {
+/***/ "../node_modules/bpmn-js/lib/features/interaction-events/index.js":
+/*!************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/interaction-events/index.js ***!
+ \************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var elementTemplates = this._elementTemplates;
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _BpmnInteractionEvents__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BpmnInteractionEvents */ "../node_modules/bpmn-js/lib/features/interaction-events/BpmnInteractionEvents.js");
- var validator = new Validator().addAll(templates);
- var errors = validator.getErrors(),
- validTemplates = validator.getValidTemplates();
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __init__: [ 'bpmnInteractionEvents' ],
+ bpmnInteractionEvents: [ 'type', _BpmnInteractionEvents__WEBPACK_IMPORTED_MODULE_0__["default"] ]
+});
- elementTemplates.set(validTemplates);
+/***/ }),
- if (errors.length) {
- this.templateErrors(errors);
- }
+/***/ "../node_modules/bpmn-js/lib/features/keyboard/BpmnKeyboardBindings.js":
+/*!*****************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/keyboard/BpmnKeyboardBindings.js ***!
+ \*****************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- this.templatesChanged();
- };
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BpmnKeyboardBindings)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_features_keyboard_KeyboardBindings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/keyboard/KeyboardBindings */ "../node_modules/diagram-js/lib/features/keyboard/KeyboardBindings.js");
- ElementTemplatesLoader.prototype.templatesChanged = function() {
- this._eventBus.fire('elementTemplates.changed');
- };
- ElementTemplatesLoader.prototype.templateErrors = function(errors) {
- this._eventBus.fire('elementTemplates.errors', {
- errors: errors
- });
- };
- },{"./Validator":57}],56:[function(require,module,exports){
- 'use strict';
- var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject;
- var is = require('bpmn-js/lib/util/ModelUtil').is,
- isAny = require('bpmn-js/lib/features/modeling/util/ModelingUtil').isAny;
+/**
+ * @typedef {import('didi').Injector} Injector
+ * @typedef {import('diagram-js/lib/features/editor-actions/EditorActions').default} EditorActions
+ * @typedef {import('diagram-js/lib/features/keyboard/Keyboard').default} Keyboard
+ */
- var find = require('lodash/find');
+/**
+ * BPMN 2.0 specific keyboard bindings.
+ *
+ * @param {Injector} injector
+ */
+function BpmnKeyboardBindings(injector) {
+ injector.invoke(diagram_js_lib_features_keyboard_KeyboardBindings__WEBPACK_IMPORTED_MODULE_0__["default"], this);
+}
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_1__["default"])(BpmnKeyboardBindings, diagram_js_lib_features_keyboard_KeyboardBindings__WEBPACK_IMPORTED_MODULE_0__["default"]);
- var TEMPLATE_ATTR = 'camunda:modelerTemplate';
+BpmnKeyboardBindings.$inject = [
+ 'injector'
+];
- /**
- * The BPMN 2.0 extension attribute name under
- * which the element template is stored.
- *
- * @type {String}
- */
- module.exports.TEMPLATE_ATTR = TEMPLATE_ATTR;
+/**
+ * Register available keyboard bindings.
+ *
+ * @param {Keyboard} keyboard
+ * @param {EditorActions} editorActions
+ */
+BpmnKeyboardBindings.prototype.registerBindings = function(keyboard, editorActions) {
- /**
- * Get template id for a given diagram element.
- *
- * @param {djs.model.Base} element
- *
- * @return {String}
- */
- function getTemplateId(element) {
+ // inherit default bindings
+ diagram_js_lib_features_keyboard_KeyboardBindings__WEBPACK_IMPORTED_MODULE_0__["default"].prototype.registerBindings.call(this, keyboard, editorActions);
- var bo = getBusinessObject(element);
+ /**
+ * Add keyboard binding if respective editor action
+ * is registered.
+ *
+ * @param {string} action name
+ * @param {Function} fn that implements the key binding
+ */
+ function addListener(action, fn) {
- if (bo) {
- return bo.get(TEMPLATE_ATTR);
- }
- }
+ if (editorActions.isRegistered(action)) {
+ keyboard.addListener(fn);
+ }
+ }
- module.exports.getTemplateId = getTemplateId;
+ // select all elements
+ // CTRL + A
+ addListener('selectElements', function(context) {
+ var event = context.keyEvent;
- /**
- * Get template of a given element.
- *
- * @param {Element} element
- * @param {ElementTemplates} elementTemplates
- *
- * @return {TemplateDefinition}
- */
- function getTemplate(element, elementTemplates) {
- var id = getTemplateId(element);
+ if (keyboard.isKey([ 'a', 'A' ], event) && keyboard.isCmd(event)) {
+ editorActions.trigger('selectElements');
- return id && elementTemplates.get(id);
- }
+ return true;
+ }
+ });
- module.exports.getTemplate = getTemplate;
+ // search labels
+ // CTRL + F
+ addListener('find', function(context) {
- /**
- * Get default template for a given element.
- *
- * @param {Element} element
- * @param {ElementTemplates} elementTemplates
- *
- * @return {TemplateDefinition}
- */
- function getDefaultTemplate(element, elementTemplates) {
+ var event = context.keyEvent;
- // return first default template, if any exists
- return (
- elementTemplates.getAll().filter(function(t) {
- return isAny(element, t.appliesTo) && t.isDefault;
- })
- )[0];
- }
+ if (keyboard.isKey([ 'f', 'F' ], event) && keyboard.isCmd(event)) {
+ editorActions.trigger('find');
- module.exports.getDefaultTemplate = getDefaultTemplate;
+ return true;
+ }
+ });
+ // activate space tool
+ // S
+ addListener('spaceTool', function(context) {
- /**
- * Find extension with given type in
- * BPMN element, diagram element or ExtensionElement.
- *
- * @param {ModdleElement|djs.model.Base} element
- * @param {String} type
- *
- * @return {ModdleElement} the extension
- */
- function findExtension(element, type) {
- var bo = getBusinessObject(element);
+ var event = context.keyEvent;
- var extensionElements;
+ if (keyboard.hasModifier(event)) {
+ return;
+ }
- if (is(bo, 'bpmn:ExtensionElements')) {
- extensionElements = bo;
- } else {
- extensionElements = bo.extensionElements;
- }
+ if (keyboard.isKey([ 's', 'S' ], event)) {
+ editorActions.trigger('spaceTool');
- if (!extensionElements) {
- return null;
- }
+ return true;
+ }
+ });
- return find(extensionElements.get('values'), function(e) {
- return is(e, type);
- });
- }
+ // activate lasso tool
+ // L
+ addListener('lassoTool', function(context) {
- module.exports.findExtension = findExtension;
+ var event = context.keyEvent;
+ if (keyboard.hasModifier(event)) {
+ return;
+ }
- function findExtensions(element, types) {
- var extensionElements = getExtensionElements(element);
+ if (keyboard.isKey([ 'l', 'L' ], event)) {
+ editorActions.trigger('lassoTool');
- if (!extensionElements) {
- return [];
- }
+ return true;
+ }
+ });
- return extensionElements.get('values').filter(function(e) {
- return isAny(e, types);
- });
- }
+ // activate hand tool
+ // H
+ addListener('handTool', function(context) {
- module.exports.findExtensions = findExtensions;
+ var event = context.keyEvent;
+ if (keyboard.hasModifier(event)) {
+ return;
+ }
- function findCamundaInOut(element, binding) {
+ if (keyboard.isKey([ 'h', 'H' ], event)) {
+ editorActions.trigger('handTool');
- var extensionElements = getExtensionElements(element);
+ return true;
+ }
+ });
- if (!extensionElements) {
- return;
- }
+ // activate global connect tool
+ // C
+ addListener('globalConnectTool', function(context) {
- var matcher;
+ var event = context.keyEvent;
- if (binding.type === 'camunda:in') {
- matcher = function(e) {
- return is(e, 'camunda:In') && isInOut(e, binding);
- };
- } else
- if (binding.type === 'camunda:out') {
- matcher = function(e) {
- return is(e, 'camunda:Out') && isInOut(e, binding);
- };
- } else
- if (binding.type === 'camunda:in:businessKey') {
- matcher = function(e) {
- return is(e, 'camunda:In') && 'businessKey' in e;
- };
- }
+ if (keyboard.hasModifier(event)) {
+ return;
+ }
- return find(extensionElements.get('values'), matcher);
- }
+ if (keyboard.isKey([ 'c', 'C' ], event)) {
+ editorActions.trigger('globalConnectTool');
- module.exports.findCamundaInOut = findCamundaInOut;
+ return true;
+ }
+ });
- function findCamundaProperty(camundaProperties, binding) {
- return find(camundaProperties.get('values'), function(p) {
- return p.name === binding.name;
- });
- }
+ // activate direct editing
+ // E
+ addListener('directEditing', function(context) {
- module.exports.findCamundaProperty = findCamundaProperty;
+ var event = context.keyEvent;
+ if (keyboard.hasModifier(event)) {
+ return;
+ }
- function findInputParameter(inputOutput, binding) {
- var parameters = inputOutput.get('inputParameters');
+ if (keyboard.isKey([ 'e', 'E' ], event)) {
+ editorActions.trigger('directEditing');
- return find(parameters, function(p) {
- return p.name === binding.name;
- });
- }
+ return true;
+ }
+ });
- module.exports.findInputParameter = findInputParameter;
+ // activate replace element
+ // R
+ addListener('replaceElement', function(context) {
+ var event = context.keyEvent;
- function findOutputParameter(inputOutput, binding) {
- var parameters = inputOutput.get('outputParameters');
+ if (keyboard.hasModifier(event)) {
+ return;
+ }
- return find(parameters, function(p) {
- var value = p.value;
+ if (keyboard.isKey([ 'r', 'R' ], event)) {
+ editorActions.trigger('replaceElement', event);
- if (!binding.scriptFormat) {
- return value === binding.source;
- }
+ return true;
+ }
+ });
- var definition = p.definition;
+};
- if (!definition || binding.scriptFormat !== definition.scriptFormat) {
- return false;
- }
+/***/ }),
- return definition.value === binding.source;
- });
- }
+/***/ "../node_modules/bpmn-js/lib/features/keyboard/index.js":
+/*!**************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/keyboard/index.js ***!
+ \**************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- module.exports.findOutputParameter = findOutputParameter;
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_features_keyboard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/keyboard */ "../node_modules/diagram-js/lib/features/keyboard/index.js");
+/* harmony import */ var _BpmnKeyboardBindings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BpmnKeyboardBindings */ "../node_modules/bpmn-js/lib/features/keyboard/BpmnKeyboardBindings.js");
-// helpers /////////////////////////////////
- function getExtensionElements(element) {
- var bo = getBusinessObject(element);
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ diagram_js_lib_features_keyboard__WEBPACK_IMPORTED_MODULE_0__["default"]
+ ],
+ __init__: [ 'keyboardBindings' ],
+ keyboardBindings: [ 'type', _BpmnKeyboardBindings__WEBPACK_IMPORTED_MODULE_1__["default"] ]
+});
- if (is(bo, 'bpmn:ExtensionElements')) {
- return bo;
- } else {
- return bo.extensionElements;
- }
- }
+/***/ }),
- function isInOut(element, binding) {
+/***/ "../node_modules/bpmn-js/lib/features/label-editing/LabelEditingPreview.js":
+/*!*********************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/label-editing/LabelEditingPreview.js ***!
+ \*********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- if (binding.type === 'camunda:in') {
- // find based on target attribute
- if (binding.target) {
- return element.target === binding.target;
- }
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ LabelEditingPreview)
+/* harmony export */ });
+/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tiny-svg */ "../node_modules/tiny-svg/dist/index.esm.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var diagram_js_lib_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/util/SvgTransformUtil */ "../node_modules/diagram-js/lib/util/SvgTransformUtil.js");
- if (binding.type === 'camunda:out') {
- // find based on source / sourceExpression
- if (binding.source) {
- return element.source === binding.source;
- }
- if (binding.sourceExpression) {
- return element.sourceExpression === binding.sourceExpression;
- }
- }
- // find based variables / local combination
- if (binding.variables) {
- return element.variables === 'all' && (
- binding.variables !== 'local' || element.local
- );
- }
- }
- },{"bpmn-js/lib/features/modeling/util/ModelingUtil":211,"bpmn-js/lib/util/ModelUtil":240,"lodash/find":610}],57:[function(require,module,exports){
- 'use strict';
- var isArray = require('lodash/isArray');
- var isObject = require('lodash/isObject');
- var DROPDOWN_TYPE = 'Dropdown';
+/**
+ * @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../../draw/PathMap').default} PathMap
+ */
- var VALID_TYPES = [ 'String', 'Text', 'Boolean', 'Hidden', DROPDOWN_TYPE ];
+var MARKER_HIDDEN = 'djs-element-hidden',
+ MARKER_LABEL_HIDDEN = 'djs-label-hidden';
- var PROPERTY_TYPE = 'property',
- CAMUNDA_PROPERTY_TYPE = 'camunda:property',
- CAMUNDA_INPUT_PARAMETER_TYPE = 'camunda:inputParameter',
- CAMUNDA_OUTPUT_PARAMETER_TYPE = 'camunda:outputParameter',
- CAMUNDA_IN_TYPE = 'camunda:in',
- CAMUNDA_OUT_TYPE = 'camunda:out',
- CAMUNDA_IN_BUSINESS_KEY_TYPE = 'camunda:in:businessKey',
- CAMUNDA_EXECUTION_LISTENER = 'camunda:executionListener',
- CAMUNDA_FIELD = 'camunda:field';
+/**
+ * @param {EventBus} eventBus
+ * @param {Canvas} canvas
+ * @param {PathMap} pathMap
+ */
+function LabelEditingPreview(eventBus, canvas, pathMap) {
- var VALID_BINDING_TYPES = [
- PROPERTY_TYPE,
- CAMUNDA_PROPERTY_TYPE,
- CAMUNDA_INPUT_PARAMETER_TYPE,
- CAMUNDA_OUTPUT_PARAMETER_TYPE,
- CAMUNDA_IN_TYPE,
- CAMUNDA_OUT_TYPE,
- CAMUNDA_IN_BUSINESS_KEY_TYPE,
- CAMUNDA_EXECUTION_LISTENER,
- CAMUNDA_FIELD
- ];
+ var self = this;
+ var defaultLayer = canvas.getDefaultLayer();
- /**
- * A element template validator.
- */
- function Validator() {
+ var element, absoluteElementBBox, gfx;
- this._templatesById = {};
+ eventBus.on('directEditing.activate', function(context) {
+ var activeProvider = context.active;
- this._validTemplates = [];
- this._errors = [];
+ element = activeProvider.element.label || activeProvider.element;
+ // text annotation
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:TextAnnotation')) {
+ absoluteElementBBox = canvas.getAbsoluteBBox(element);
- /**
- * Adds the templates.
- *
- * @param {Array} templates
- *
- * @return {Validator} self
- */
- this.addAll = function(templates) {
+ gfx = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('g');
- if (!isArray(templates)) {
- this._logError('templates must be []');
- } else {
- templates.forEach(this.add, this);
- }
+ var textPathData = pathMap.getScaledPath('TEXT_ANNOTATION', {
+ xScaleFactor: 1,
+ yScaleFactor: 1,
+ containerWidth: element.width,
+ containerHeight: element.height,
+ position: {
+ mx: 0.0,
+ my: 0.0
+ }
+ });
- return this;
- };
+ var path = self.path = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('path');
- /**
- * Add the given element template, if it is valid.
- *
- * @param {TemplateDescriptor} template
- *
- * @return {Validator} self
- */
- this.add = function(template) {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(path, {
+ d: textPathData,
+ strokeWidth: 2,
+ stroke: getStrokeColor(element)
+ });
- var err = this._validateTemplate(template);
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.append)(gfx, path);
- if (!err) {
- this._templatesById[template.id] = template;
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.append)(defaultLayer, gfx);
- this._validTemplates.push(template);
- }
+ (0,diagram_js_lib_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_2__.translate)(gfx, element.x, element.y);
+ }
- return this;
- };
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:TextAnnotation') ||
+ element.labelTarget) {
+ canvas.addMarker(element, MARKER_HIDDEN);
+ } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Task') ||
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:CallActivity') ||
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:SubProcess') ||
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Participant')) {
+ canvas.addMarker(element, MARKER_LABEL_HIDDEN);
+ }
+ });
- /**
- * Validate given template and return error (if any).
- *
- * @param {TemplateDescriptor} template
- *
- * @return {Error} validation error, if any
- */
- this._validateTemplate = function(template) {
-
- var err,
- id = template.id,
- appliesTo = template.appliesTo,
- properties = template.properties,
- scopes = template.scopes;
-
- if (!id) {
- return this._logError('missing template id');
- }
+ eventBus.on('directEditing.resize', function(context) {
- if (id in this._templatesById) {
- return this._logError('template id <' + id + '> already used');
- }
+ // text annotation
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:TextAnnotation')) {
+ var height = context.height,
+ dy = context.dy;
- if (!isArray(appliesTo)) {
- err = this._logError('missing appliesTo=[]', template);
- }
+ var newElementHeight = Math.max(element.height / absoluteElementBBox.height * (height + dy), 0);
- if (!isArray(properties)) {
- err = this._logError('missing properties=[]', template);
- } else {
- if (!this._validateProperties(properties)) {
- err = new Error('invalid properties');
- }
- }
+ var textPathData = pathMap.getScaledPath('TEXT_ANNOTATION', {
+ xScaleFactor: 1,
+ yScaleFactor: 1,
+ containerWidth: element.width,
+ containerHeight: newElementHeight,
+ position: {
+ mx: 0.0,
+ my: 0.0
+ }
+ });
- if (scopes) {
- err = this._validateScopes(template, scopes);
- }
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(self.path, {
+ d: textPathData
+ });
+ }
+ });
- return err;
- };
+ eventBus.on([ 'directEditing.complete', 'directEditing.cancel' ], function(context) {
+ var activeProvider = context.active;
- this._validateScopes = function(template, scopes) {
+ if (activeProvider) {
+ canvas.removeMarker(activeProvider.element.label || activeProvider.element, MARKER_HIDDEN);
+ canvas.removeMarker(element, MARKER_LABEL_HIDDEN);
+ }
- var err,
- scope,
- scopeName;
+ element = undefined;
+ absoluteElementBBox = undefined;
- if (!isObject(scopes) || isArray(scopes)) {
- return this._logError('invalid scopes, should be scopes={}', template);
- }
+ if (gfx) {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.remove)(gfx);
- for (scopeName in scopes) {
- scope = scopes[scopeName];
+ gfx = undefined;
+ }
+ });
+}
- if (!isObject(scope) || isArray(scope)) {
- err = this._logError('invalid scope, should be scope={}', template);
- }
+LabelEditingPreview.$inject = [
+ 'eventBus',
+ 'canvas',
+ 'pathMap'
+];
- if (!isArray(scope.properties)) {
- err = this._logError(
- 'missing properties=[] in scope <' + scopeName + '>', template
- );
- } else {
- if (!this._validateProperties(scope.properties)) {
- err = new Error('invalid properties in scope <' + scopeName + '>');
- }
- }
- }
- return err;
- };
+// helpers //////////
- /**
- * Validate properties and return false if any is invalid.
- *
- * @param {Array} properties
- *
- * @return {Boolean} true if all properties are valid
- */
- this._validateProperties = function(properties) {
- var validProperties = properties.filter(this._validateProperty, this);
-
- return properties.length === validProperties.length;
- };
+function getStrokeColor(element, defaultColor) {
+ var di = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getDi)(element);
- /**
- * Validate property and return false, if there was
- * a validation error.
- *
- * @param {PropertyDescriptor} property
- *
- * @return {Boolean} true if property is valid
- */
- this._validateProperty = function(property) {
+ return di.get('stroke') || defaultColor || 'black';
+}
- var type = property.type,
- binding = property.binding;
+/***/ }),
- var err;
+/***/ "../node_modules/bpmn-js/lib/features/label-editing/LabelEditingProvider.js":
+/*!**********************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/label-editing/LabelEditingProvider.js ***!
+ \**********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var bindingType = binding.type;
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ LabelEditingProvider)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/LabelUtil */ "../node_modules/bpmn-js/lib/util/LabelUtil.js");
+/* harmony import */ var _modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modeling/util/ModelingUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
+/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/LabelUtil */ "../node_modules/diagram-js/lib/util/ModelUtil.js");
- if (VALID_TYPES.indexOf(type) === -1) {
- err = this._logError(
- 'invalid property type <' + type + '>; ' +
- 'must be any of { ' + VALID_TYPES.join(', ') + ' }'
- );
- }
- if (type === DROPDOWN_TYPE && bindingType !== CAMUNDA_EXECUTION_LISTENER) {
- if (!isArray(property.choices)) {
- err = this._logError(
- 'must provide choices=[] with ' + DROPDOWN_TYPE + ' type'
- );
- } else
-
- if (!property.choices.every(isDropdownChoiceValid)) {
- err = this._logError(
- '{ name, value } must be specified for ' +
- DROPDOWN_TYPE + ' choices'
- );
- }
- }
- if (!binding) {
- return this._logError('property missing binding');
- }
- if (VALID_BINDING_TYPES.indexOf(bindingType) === -1) {
- err = this._logError(
- 'invalid property.binding type <' + bindingType + '>; ' +
- 'must be any of { ' + VALID_BINDING_TYPES.join(', ') + ' }'
- );
- }
- if (bindingType === PROPERTY_TYPE ||
- bindingType === CAMUNDA_PROPERTY_TYPE ||
- bindingType === CAMUNDA_INPUT_PARAMETER_TYPE ||
- bindingType === CAMUNDA_FIELD) {
- if (!binding.name) {
- err = this._logError(
- 'property.binding <' + bindingType + '> requires name'
- );
- }
- }
- if (bindingType === CAMUNDA_OUTPUT_PARAMETER_TYPE) {
- if (!binding.source) {
- err = this._logError(
- 'property.binding <' + bindingType + '> requires source'
- );
- }
- }
- if (bindingType === CAMUNDA_IN_TYPE) {
- if (!binding.variables && !binding.target) {
- err = this._logError(
- 'property.binding <' + bindingType + '> requires ' +
- 'variables or target'
- );
- }
- }
- if (bindingType === CAMUNDA_OUT_TYPE) {
- if (!binding.variables && !binding.source && !binding.sourceExpression) {
- err = this._logError(
- 'property.binding <' + bindingType + '> requires ' +
- 'variables, sourceExpression or source'
- );
- }
- }
- if (bindingType === CAMUNDA_EXECUTION_LISTENER) {
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../modeling/BpmnFactory').default} BpmnFactory
+ * @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
+ * @typedef {import('diagram-js-direct-editing/lib/DirectEditing').default} DirectEditing
+ * @typedef {import('../modeling/Modeling').default} Modeling
+ * @typedef {import('diagram-js/lib/features/resize/ResizeHandles').default} ResizeHandles
+ * @typedef {import('../../draw/TextRenderer').default} TextRenderer
+ *
+ * @typedef {import('../../model/Types').Element} Element
+ *
+ * @typedef { {
+ * bounds: {
+ * x: number;
+ * y: number;
+ * width: number;
+ * height: number;
+ * minWidth?: number;
+ * minHeight?: number;
+ * };
+ * style: Object;
+ * } } DirectEditingContext
+ */
- if (type !== 'Hidden') {
- err = this._logError(
- 'invalid property type <' + type + '> for ' + CAMUNDA_EXECUTION_LISTENER + '; ' +
- 'must be '
- );
- }
- }
+var HIGH_PRIORITY = 2000;
- return !err;
- };
+/**
+ * @param {EventBus} eventBus
+ * @param {BpmnFactory} bpmnFactory
+ * @param {Canvas} canvas
+ * @param {DirectEditing} directEditing
+ * @param {Modeling} modeling
+ * @param {ResizeHandles} resizeHandles
+ * @param {TextRenderer} textRenderer
+ */
+function LabelEditingProvider(
+ eventBus, bpmnFactory, canvas, directEditing,
+ modeling, resizeHandles, textRenderer) {
+
+ this._bpmnFactory = bpmnFactory;
+ this._canvas = canvas;
+ this._modeling = modeling;
+ this._textRenderer = textRenderer;
+
+ directEditing.registerProvider(this);
+
+ // listen to dblclick on non-root elements
+ eventBus.on('element.dblclick', function(event) {
+ activateDirectEdit(event.element, true);
+ });
+
+ // complete on followup canvas operation
+ eventBus.on([
+ 'autoPlace.start',
+ 'canvas.viewbox.changing',
+ 'drag.init',
+ 'element.mousedown',
+ 'popupMenu.open',
+ 'root.set',
+ 'selection.changed'
+ ], function() {
+ if (directEditing.isActive()) {
+ directEditing.complete();
+ }
+ });
+
+ eventBus.on([
+ 'shape.remove',
+ 'connection.remove'
+ ], HIGH_PRIORITY, function(event) {
+
+ if (directEditing.isActive(event.element)) {
+ directEditing.cancel();
+ }
+ });
+
+ // cancel on command stack changes
+ eventBus.on([ 'commandStack.changed' ], function(e) {
+ if (directEditing.isActive()) {
+ directEditing.cancel();
+ }
+ });
+
+
+ eventBus.on('directEditing.activate', function(event) {
+ resizeHandles.removeResizers();
+ });
+
+ eventBus.on('create.end', 500, function(event) {
+
+ var context = event.context,
+ element = context.shape,
+ canExecute = event.context.canExecute,
+ isTouch = event.isTouch;
+
+ // TODO(nikku): we need to find a way to support the
+ // direct editing on mobile devices; right now this will
+ // break for desworkflowediting on mobile devices
+ // as it breaks the user interaction workflow
+
+ // TODO(nikku): we should temporarily focus the edited element
+ // here and release the focused viewport after the direct edit
+ // operation is finished
+ if (isTouch) {
+ return;
+ }
+
+ if (!canExecute) {
+ return;
+ }
+
+ if (context.hints && context.hints.createElementsBehavior === false) {
+ return;
+ }
+
+ activateDirectEdit(element);
+ });
+
+ eventBus.on('autoPlace.end', 500, function(event) {
+ activateDirectEdit(event.shape);
+ });
+
+
+ function activateDirectEdit(element, force) {
+ if (force ||
+ (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.isAny)(element, [ 'bpmn:Task', 'bpmn:TextAnnotation', 'bpmn:Participant' ]) ||
+ isCollapsedSubProcess(element)) {
+
+ directEditing.activate(element);
+ }
+ }
+
+}
+
+LabelEditingProvider.$inject = [
+ 'eventBus',
+ 'bpmnFactory',
+ 'canvas',
+ 'directEditing',
+ 'modeling',
+ 'resizeHandles',
+ 'textRenderer'
+];
+
+
+/**
+ * Activate direct editing for activities and text annotations.
+ *
+ * @param {Element} element
+ *
+ * @return { {
+ * text: string;
+ * options?: {
+ * autoResize?: boolean;
+ * centerVertically?: boolean;
+ * resizable?: boolean;
+ * }
+ * } & DirectEditingContext }
+ */
+LabelEditingProvider.prototype.activate = function(element) {
+
+ // text
+ var text = (0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_1__.getLabel)(element);
+
+ if (text === undefined) {
+ return;
+ }
+
+ var context = {
+ text: text
+ };
+
+ // bounds
+ var bounds = this.getEditingBBox(element);
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(context, bounds);
+
+ var options = {};
+
+ // tasks
+ if (
+ (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.isAny)(element, [
+ 'bpmn:Task',
+ 'bpmn:Participant',
+ 'bpmn:Lane',
+ 'bpmn:CallActivity'
+ ]) ||
+ isCollapsedSubProcess(element)
+ ) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(options, {
+ centerVertically: true
+ });
+ }
+
+ // external labels
+ if ((0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_1__.isLabelExternal)(element)) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(options, {
+ autoResize: true
+ });
+ }
+
+ // text annotations
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:TextAnnotation')) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(options, {
+ resizable: true,
+ autoResize: true
+ });
+ }
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(context, {
+ options: options
+ });
+
+ return context;
+};
+
+
+/**
+ * Get the editing bounding box based on the element's size and position.
+ *
+ * @param {Element} element
+ *
+ * @return {DirectEditingContext}
+ */
+LabelEditingProvider.prototype.getEditingBBox = function(element) {
+ var canvas = this._canvas;
+
+ var target = element.label || element;
+
+ var bbox = canvas.getAbsoluteBBox(target);
+
+ var mid = {
+ x: bbox.x + bbox.width / 2,
+ y: bbox.y + bbox.height / 2
+ };
+
+ // default position
+ var bounds = { x: bbox.x, y: bbox.y };
+
+ var zoom = canvas.zoom();
+
+ var defaultStyle = this._textRenderer.getDefaultStyle(),
+ externalStyle = this._textRenderer.getExternalStyle();
+
+ // take zoom into account
+ var externalFontSize = externalStyle.fontSize * zoom,
+ externalLineHeight = externalStyle.lineHeight,
+ defaultFontSize = defaultStyle.fontSize * zoom,
+ defaultLineHeight = defaultStyle.lineHeight;
+
+ var style = {
+ fontFamily: this._textRenderer.getDefaultStyle().fontFamily,
+ fontWeight: this._textRenderer.getDefaultStyle().fontWeight
+ };
+
+ // adjust for expanded pools AND lanes
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Lane') || isExpandedPool(element)) {
+ var isHorizontalLane = (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_3__.isHorizontal)(element);
+
+ var laneBounds = isHorizontalLane ? {
+ width: bbox.height,
+ height: 30 * zoom,
+ x: bbox.x - bbox.height / 2 + (15 * zoom),
+ y: mid.y - (30 * zoom) / 2
+ } : {
+ width: bbox.width,
+ height: 30 * zoom
+ };
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(bounds, laneBounds);
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(style, {
+ fontSize: defaultFontSize + 'px',
+ lineHeight: defaultLineHeight,
+ paddingTop: (7 * zoom) + 'px',
+ paddingBottom: (7 * zoom) + 'px',
+ paddingLeft: (5 * zoom) + 'px',
+ paddingRight: (5 * zoom) + 'px',
+ transform: isHorizontalLane ? 'rotate(-90deg)' : null
+ });
+ }
+
+
+ // internal labels for collapsed participants
+ if (isCollapsedPool(element)) {
+ var isHorizontalPool = (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_3__.isHorizontal)(element);
+
+ var poolBounds = isHorizontalPool ? {
+ width: bbox.width,
+ height: bbox.height
+ } : {
+ width: bbox.height,
+ height: bbox.width,
+ x: mid.x - bbox.height / 2,
+ y: mid.y - bbox.width / 2
+ };
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(bounds, poolBounds);
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(style, {
+ fontSize: defaultFontSize + 'px',
+ lineHeight: defaultLineHeight,
+ paddingTop: (7 * zoom) + 'px',
+ paddingBottom: (7 * zoom) + 'px',
+ paddingLeft: (5 * zoom) + 'px',
+ paddingRight: (5 * zoom) + 'px',
+ transform: isHorizontalPool ? null : 'rotate(-90deg)'
+ });
+ }
+
+
+ // internal labels for tasks and collapsed call activities
+ // and sub processes
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.isAny)(element, [ 'bpmn:Task', 'bpmn:CallActivity' ]) ||
+ isCollapsedSubProcess(element)) {
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(bounds, {
+ width: bbox.width,
+ height: bbox.height
+ });
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(style, {
+ fontSize: defaultFontSize + 'px',
+ lineHeight: defaultLineHeight,
+ paddingTop: (7 * zoom) + 'px',
+ paddingBottom: (7 * zoom) + 'px',
+ paddingLeft: (5 * zoom) + 'px',
+ paddingRight: (5 * zoom) + 'px'
+ });
+ }
+
+
+ // internal labels for expanded sub processes
+ if (isExpandedSubProcess(element)) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(bounds, {
+ width: bbox.width,
+ x: bbox.x
+ });
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(style, {
+ fontSize: defaultFontSize + 'px',
+ lineHeight: defaultLineHeight,
+ paddingTop: (7 * zoom) + 'px',
+ paddingBottom: (7 * zoom) + 'px',
+ paddingLeft: (5 * zoom) + 'px',
+ paddingRight: (5 * zoom) + 'px'
+ });
+ }
+
+ var width = 90 * zoom,
+ paddingTop = 7 * zoom,
+ paddingBottom = 4 * zoom;
+
+ // external labels for events, data elements, gateways, groups and connections
+ if (target.labelTarget) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(bounds, {
+ width: width,
+ height: bbox.height + paddingTop + paddingBottom,
+ x: mid.x - width / 2,
+ y: bbox.y - paddingTop
+ });
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(style, {
+ fontSize: externalFontSize + 'px',
+ lineHeight: externalLineHeight,
+ paddingTop: paddingTop + 'px',
+ paddingBottom: paddingBottom + 'px'
+ });
+ }
+
+ // external label not yet created
+ if ((0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_1__.isLabelExternal)(target)
+ && !(0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_1__.hasExternalLabel)(target)
+ && !(0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_4__.isLabel)(target)) {
+
+ var externalLabelMid = (0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_1__.getExternalLabelMid)(element);
+
+ var absoluteBBox = canvas.getAbsoluteBBox({
+ x: externalLabelMid.x,
+ y: externalLabelMid.y,
+ width: 0,
+ height: 0
+ });
+
+ var height = externalFontSize + paddingTop + paddingBottom;
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(bounds, {
+ width: width,
+ height: height,
+ x: absoluteBBox.x - width / 2,
+ y: absoluteBBox.y - height / 2
+ });
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(style, {
+ fontSize: externalFontSize + 'px',
+ lineHeight: externalLineHeight,
+ paddingTop: paddingTop + 'px',
+ paddingBottom: paddingBottom + 'px'
+ });
+ }
+
+ // text annotations
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:TextAnnotation')) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(bounds, {
+ width: bbox.width,
+ height: bbox.height,
+ minWidth: 30 * zoom,
+ minHeight: 10 * zoom
+ });
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(style, {
+ textAlign: 'left',
+ paddingTop: (5 * zoom) + 'px',
+ paddingBottom: (7 * zoom) + 'px',
+ paddingLeft: (7 * zoom) + 'px',
+ paddingRight: (5 * zoom) + 'px',
+ fontSize: defaultFontSize + 'px',
+ lineHeight: defaultLineHeight
+ });
+ }
+
+ return { bounds: bounds, style: style };
+};
+
+
+LabelEditingProvider.prototype.update = function(
+ element, newLabel,
+ activeContextText, bounds) {
+
+ var newBounds,
+ bbox;
+
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:TextAnnotation')) {
+
+ bbox = this._canvas.getAbsoluteBBox(element);
+
+ newBounds = {
+ x: element.x,
+ y: element.y,
+ width: element.width / bbox.width * bounds.width,
+ height: element.height / bbox.height * bounds.height
+ };
+ }
+
+ if (isEmptyText(newLabel)) {
+ newLabel = null;
+ }
+
+ this._modeling.updateLabel(element, newLabel, newBounds);
+};
+
+
+
+// helpers //////////
+
+function isCollapsedSubProcess(element) {
+ return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:SubProcess') && !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_3__.isExpanded)(element);
+}
+
+function isExpandedSubProcess(element) {
+ return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:SubProcess') && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_3__.isExpanded)(element);
+}
+
+function isCollapsedPool(element) {
+ return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Participant') && !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_3__.isExpanded)(element);
+}
+function isExpandedPool(element) {
+ return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Participant') && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_3__.isExpanded)(element);
+}
- this._logError = function(err, template) {
+function isEmptyText(label) {
+ return !label || !label.trim();
+}
- if (typeof err === 'string') {
- if (template) {
- err = 'template(id: ' + template.id + ') ' + err;
- }
+/***/ }),
- err = new Error(err);
- }
+/***/ "../node_modules/bpmn-js/lib/features/label-editing/cmd/UpdateLabelHandler.js":
+/*!************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/label-editing/cmd/UpdateLabelHandler.js ***!
+ \************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- this._errors.push(err);
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ UpdateLabelHandler)
+/* harmony export */ });
+/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/LabelUtil */ "../node_modules/bpmn-js/lib/util/LabelUtil.js");
+/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/LabelUtil */ "../node_modules/diagram-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- return err;
- };
- this.getErrors = function() {
- return this._errors;
- };
- this.getValidTemplates = function() {
- return this._validTemplates;
- };
- }
- module.exports = Validator;
-// helpers ///////////////////////////////////
+var NULL_DIMENSIONS = {
+ width: 0,
+ height: 0
+};
- function isDropdownChoiceValid(c) {
- return 'name' in c && 'value' in c;
- }
+/**
+ * @typedef {import('../../modeling/Modeling').default} Modeling
+ * @typedef {import('../../../draw/TextRenderer').default} TextRenderer
+ * @typedef {import('../../modeling/BpmnFactory').default} BpmnFactory
+ *
+ * @typedef {import('../../../model/Types').Element} Element
+ */
- },{"lodash/isArray":618,"lodash/isObject":625}],58:[function(require,module,exports){
- 'use strict';
+/**
+ * A handler that updates the text of a BPMN element.
+ *
+ * @param {Modeling} modeling
+ * @param {TextRenderer} textRenderer
+ * @param {BpmnFactory} bpmnFactory
+ */
+function UpdateLabelHandler(modeling, textRenderer, bpmnFactory) {
- var findExtension = require('../Helper').findExtension,
- findExtensions = require('../Helper').findExtensions;
+ /**
+ * Set the label and return the changed elements.
+ *
+ * Element parameter can be label itself or connection (i.e. sequence flow).
+ *
+ * @param {Element} element
+ * @param {string} text
+ */
+ function setText(element, text) {
- var createCamundaProperty = require('../CreateHelper').createCamundaProperty,
- createInputParameter = require('../CreateHelper').createInputParameter,
- createOutputParameter = require('../CreateHelper').createOutputParameter,
- createCamundaIn = require('../CreateHelper').createCamundaIn,
- createCamundaOut = require('../CreateHelper').createCamundaOut,
- createCamundaInWithBusinessKey = require('../CreateHelper').createCamundaInWithBusinessKey,
- createCamundaExecutionListenerScript = require('../CreateHelper').createCamundaExecutionListenerScript,
- createCamundaFieldInjection = require('../CreateHelper').createCamundaFieldInjection;
+ // external label if present
+ var label = element.label || element;
- var forEach = require('lodash/forEach');
+ var labelTarget = element.labelTarget || element;
- var CAMUNDA_SERVICE_TASK_LIKE = [
- 'camunda:class',
- 'camunda:delegateExpression',
- 'camunda:expression'
- ];
+ (0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_0__.setLabel)(label, text, labelTarget !== label);
- /**
- * A handler that changes the modeling template of a BPMN element.
- */
- function ChangeElementTemplateHandler(modeling, commandStack, bpmnFactory) {
+ return [ label, labelTarget ];
+ }
- function getOrCreateExtensionElements(element) {
+ function preExecute(ctx) {
+ var element = ctx.element,
+ businessObject = element.businessObject,
+ newLabel = ctx.newLabel;
- var bo = element.businessObject;
+ if (!(0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_1__.isLabel)(element)
+ && (0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_0__.isLabelExternal)(element)
+ && !(0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_0__.hasExternalLabel)(element)
+ && !isEmptyText(newLabel)) {
+
+ // create label
+ var paddingTop = 7;
- var extensionElements = bo.extensionElements;
+ var labelCenter = (0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_0__.getExternalLabelMid)(element);
- // add extension elements
- if (!extensionElements) {
- extensionElements = bpmnFactory.create('bpmn:ExtensionElements', {
- values: []
- });
+ labelCenter = {
+ x: labelCenter.x,
+ y: labelCenter.y + paddingTop
+ };
- modeling.updateProperties(element, {
- extensionElements: extensionElements
- });
- }
+ modeling.createLabel(element, labelCenter, {
+ id: businessObject.id + '_label',
+ businessObject: businessObject,
+ di: element.di
+ });
+ }
+ }
- return extensionElements;
- }
+ function execute(ctx) {
+ ctx.oldLabel = (0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_0__.getLabel)(ctx.element);
+ return setText(ctx.element, ctx.newLabel);
+ }
- function updateModelerTemplate(element, newTemplate) {
- modeling.updateProperties(element, {
- 'camunda:modelerTemplate': newTemplate && newTemplate.id
- });
- }
+ function revert(ctx) {
+ return setText(ctx.element, ctx.oldLabel);
+ }
- function updateIoMappings(element, newTemplate, context) {
+ function postExecute(ctx) {
+ var element = ctx.element,
+ label = element.label || element,
+ newLabel = ctx.newLabel,
+ newBounds = ctx.newBounds,
+ hints = ctx.hints || {};
- var newMappings = createInputOutputMappings(newTemplate, bpmnFactory),
- oldMappings;
+ // ignore internal labels for elements except text annotations
+ if (!(0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_1__.isLabel)(label) && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(label, 'bpmn:TextAnnotation')) {
+ return;
+ }
- if (!newMappings) {
- return;
- }
+ if ((0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_1__.isLabel)(label) && isEmptyText(newLabel)) {
- if (context) {
- commandStack.execute('properties-panel.update-businessobject', {
- element: element,
- businessObject: context,
- properties: { inputOutput: newMappings }
- });
- } else {
- context = getOrCreateExtensionElements(element);
- oldMappings = findExtension(element, 'camunda:InputOutput');
- commandStack.execute('properties-panel.update-businessobject-list', {
- element: element,
- currentObject: context,
- propertyName: 'values',
- objectsToAdd: [ newMappings ],
- objectsToRemove: oldMappings ? [ oldMappings ] : []
- });
- }
- }
+ if (hints.removeShape !== false) {
+ modeling.removeShape(label, { unsetLabel: false });
+ }
- function updateCamundaField(element, newTemplate, context) {
+ return;
+ }
- var newMappings = createCamundaFieldInjections(newTemplate, bpmnFactory),
- oldMappings;
+ var text = (0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_0__.getLabel)(element);
- if (!newMappings) {
- return;
- }
- if (context) {
- commandStack.execute('properties-panel.update-businessobject', {
- element: element,
- businessObject: context,
- properties: { field: newMappings }
- });
- } else {
- context = getOrCreateExtensionElements(element);
- oldMappings = findExtensions(element, ['camunda:Field']);
-
- commandStack.execute('properties-panel.update-businessobject-list', {
- element: element,
- currentObject: context,
- propertyName: 'values',
- objectsToAdd: newMappings,
- objectsToRemove: oldMappings ? oldMappings : []
- });
- }
- }
+ // resize element based on label _or_ pre-defined bounds
+ if (typeof newBounds === 'undefined') {
+ newBounds = textRenderer.getExternalLabelBounds(label, text);
+ }
+ // setting newBounds to false or _null_ will
+ // disable the postExecute resize operation
+ if (newBounds) {
+ modeling.resizeShape(label, newBounds, NULL_DIMENSIONS);
+ }
+ }
- function updateCamundaProperties(element, newTemplate, context) {
+ // API
- var newProperties = createCamundaProperties(newTemplate, bpmnFactory),
- oldProperties;
+ this.preExecute = preExecute;
+ this.execute = execute;
+ this.revert = revert;
+ this.postExecute = postExecute;
+}
- if (!newProperties) {
- return;
- }
+UpdateLabelHandler.$inject = [
+ 'modeling',
+ 'textRenderer',
+ 'bpmnFactory'
+];
- if (context) {
- commandStack.execute('properties-panel.update-businessobject', {
- element: element,
- businessObject: context,
- properties: { properties: newProperties }
- });
- } else {
- context = getOrCreateExtensionElements(element);
- oldProperties = findExtension(element, 'camunda:Properties');
-
- commandStack.execute('properties-panel.update-businessobject-list', {
- element: element,
- currentObject: context,
- propertyName: 'values',
- objectsToAdd: [ newProperties ],
- objectsToRemove: oldProperties ? [ oldProperties ] : []
- });
- }
- }
- function updateProperties(element, newTemplate, context) {
+// helpers //////////
- var newProperties = createBpmnPropertyUpdates(newTemplate, bpmnFactory);
+function isEmptyText(label) {
+ return !label || !label.trim();
+}
- var newPropertiesCount = Object.keys(newProperties).length;
+/***/ }),
- if (!newPropertiesCount) {
- return;
- }
+/***/ "../node_modules/bpmn-js/lib/features/label-editing/index.js":
+/*!*******************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/label-editing/index.js ***!
+ \*******************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- if (context) {
- commandStack.execute('properties-panel.update-businessobject', {
- element: element,
- businessObject: context,
- properties: newProperties
- });
- } else {
- modeling.updateProperties(element, newProperties);
- }
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_features_change_support__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/change-support */ "../node_modules/diagram-js/lib/features/change-support/index.js");
+/* harmony import */ var diagram_js_lib_features_resize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/features/resize */ "../node_modules/diagram-js/lib/features/resize/index.js");
+/* harmony import */ var diagram_js_direct_editing__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js-direct-editing */ "../node_modules/diagram-js-direct-editing/lib/index.js");
+/* harmony import */ var _LabelEditingProvider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./LabelEditingProvider */ "../node_modules/bpmn-js/lib/features/label-editing/LabelEditingProvider.js");
+/* harmony import */ var _LabelEditingPreview__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./LabelEditingPreview */ "../node_modules/bpmn-js/lib/features/label-editing/LabelEditingPreview.js");
- function updateInOut(element, newTemplate, context) {
- var newInOut = createCamundaInOut(newTemplate, bpmnFactory),
- oldInOut;
- if (!newInOut) {
- return;
- }
- if (context) {
- commandStack.execute('properties-panel.update-businessobject', {
- element: element,
- businessObject: context,
- properties: { inout: newInOut }
- });
- } else {
- context = getOrCreateExtensionElements(element);
- oldInOut = findExtensions(context, [ 'camunda:In', 'camunda:Out' ]);
-
- commandStack.execute('properties-panel.update-businessobject-list', {
- element: element,
- currentObject: context,
- propertyName: 'values',
- objectsToAdd: newInOut,
- objectsToRemove: oldInOut
- });
- }
- }
- function updateExecutionListener(element, newTemplate, context) {
- var newExecutionListeners = createCamundaExecutionListeners(newTemplate, bpmnFactory),
- oldExecutionsListeners;
- if (!newExecutionListeners.length) {
- return;
- }
- if (context) {
- commandStack.execute('properties-panel.update-businessobject', {
- element: element,
- businessObject: context,
- properties: { executionListener: newExecutionListeners }
- });
- } else {
- context = getOrCreateExtensionElements(element);
- oldExecutionsListeners = findExtensions(context, [ 'camunda:ExecutionListener' ]);
-
- commandStack.execute('properties-panel.update-businessobject-list', {
- element: element,
- currentObject: context,
- propertyName: 'values',
- objectsToAdd: newExecutionListeners,
- objectsToRemove: oldExecutionsListeners
- });
- }
- }
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ diagram_js_lib_features_change_support__WEBPACK_IMPORTED_MODULE_1__["default"],
+ diagram_js_lib_features_resize__WEBPACK_IMPORTED_MODULE_2__["default"],
+ diagram_js_direct_editing__WEBPACK_IMPORTED_MODULE_0__["default"]
+ ],
+ __init__: [
+ 'labelEditingProvider',
+ 'labelEditingPreview'
+ ],
+ labelEditingProvider: [ 'type', _LabelEditingProvider__WEBPACK_IMPORTED_MODULE_3__["default"] ],
+ labelEditingPreview: [ 'type', _LabelEditingPreview__WEBPACK_IMPORTED_MODULE_4__["default"] ]
+});
- /**
- * Update / recreate a scoped element.
- *
- * @param {djs.model.Base} element the diagram parent element
- * @param {String} scopeName name of the scope, i.e. camunda:Connector
- * @param {Object} scopeDefinition
- */
- function updateScopeElements(element, scopeName, scopeDefinition) {
- var scopeElement = bpmnFactory.create(scopeName);
+/***/ }),
- // update camunda:inputOutput
- updateIoMappings(element, scopeDefinition, scopeElement);
+/***/ "../node_modules/bpmn-js/lib/features/modeling-feedback/ModelingFeedback.js":
+/*!**********************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling-feedback/ModelingFeedback.js ***!
+ \**********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- // update camunda:field
- updateCamundaField(element, scopeDefinition, scopeElement);
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ ModelingFeedback)
+/* harmony export */ });
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- // update camunda:properties
- updateCamundaProperties(element, scopeDefinition, scopeElement);
- // update other properties (bpmn:condition, camunda:async, ...)
- updateProperties(element, scopeDefinition, scopeElement);
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('diagram-js/lib/features/tooltips/Tooltips').default} Tooltips
+ * @typedef {import('diagram-js/lib/i18n/translate/translate').default} Translate
+ */
- // update camunda:in and camunda:out
- updateInOut(element, scopeDefinition, scopeElement);
+var COLLAB_ERR_MSG = 'flow elements must be children of pools/participants';
- // update camunda:executionListener
- updateExecutionListener(element, scopeDefinition, scopeElement);
+/**
+ * @param {EventBus} eventBus
+ * @param {Tooltips} tooltips
+ * @param {Translate} translate
+ */
+function ModelingFeedback(eventBus, tooltips, translate) {
- var extensionElements = getOrCreateExtensionElements(element);
- var oldScope = findExtension(extensionElements, scopeName);
+ function showError(position, message, timeout) {
+ tooltips.add({
+ position: {
+ x: position.x + 5,
+ y: position.y + 5
+ },
+ type: 'error',
+ timeout: timeout || 2000,
+ html: '' + message + '
'
+ });
+ }
- commandStack.execute('properties-panel.update-businessobject-list', {
- element: element,
- currentObject: extensionElements,
- propertyName: 'values',
- objectsToAdd: [ scopeElement ],
- objectsToRemove: oldScope ? [ oldScope ] : []
- });
- }
+ eventBus.on([ 'shape.move.rejected', 'create.rejected' ], function(event) {
+ var context = event.context,
+ shape = context.shape,
+ target = context.target;
- /**
- * Compose an element template change action, updating all
- * necessary underlying properties.
- *
- * @param {Object} context
- * @param {Object} context.element
- * @param {Object} context.oldTemplate
- * @param {Object} context.newTemplate
- */
- this.preExecute = function(context) {
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(target, 'bpmn:Collaboration') && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(shape, 'bpmn:FlowNode')) {
+ showError(event, translate(COLLAB_ERR_MSG));
+ }
+ });
- var element = context.element,
- newTemplate = context.newTemplate;
+}
- // update camunda:modelerTemplate attribute
- updateModelerTemplate(element, newTemplate);
+ModelingFeedback.$inject = [
+ 'eventBus',
+ 'tooltips',
+ 'translate'
+];
- if (newTemplate) {
- // update camunda:inputOutput
- updateIoMappings(element, newTemplate);
+/***/ }),
- // update camunda:field
- updateCamundaField(element, newTemplate);
+/***/ "../node_modules/bpmn-js/lib/features/modeling-feedback/index.js":
+/*!***********************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling-feedback/index.js ***!
+ \***********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- // update camunda:properties
- updateCamundaProperties(element, newTemplate);
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_features_tooltips__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/tooltips */ "../node_modules/diagram-js/lib/features/tooltips/index.js");
+/* harmony import */ var _ModelingFeedback__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ModelingFeedback */ "../node_modules/bpmn-js/lib/features/modeling-feedback/ModelingFeedback.js");
- // update other properties (bpmn:condition, camunda:async, ...)
- updateProperties(element, newTemplate);
- // update camunda:in and camunda:out
- updateInOut(element, newTemplate);
- // update camunda:executionListener
- updateExecutionListener(element, newTemplate);
- // loop on scopes properties
- forEach(newTemplate.scopes, function(scopeDefinition, scopeName) {
- updateScopeElements(element, scopeName, scopeDefinition);
- });
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ diagram_js_lib_features_tooltips__WEBPACK_IMPORTED_MODULE_0__["default"]
+ ],
+ __init__: [
+ 'modelingFeedback'
+ ],
+ modelingFeedback: [ 'type', _ModelingFeedback__WEBPACK_IMPORTED_MODULE_1__["default"] ]
+});
- }
- };
- }
+/***/ }),
- ChangeElementTemplateHandler.$inject = [ 'modeling', 'commandStack', 'bpmnFactory' ];
+/***/ "../node_modules/bpmn-js/lib/features/modeling/BpmnFactory.js":
+/*!********************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/BpmnFactory.js ***!
+ \********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- module.exports = ChangeElementTemplateHandler;
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BpmnFactory)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
-// helpers /////////////////////////////
- function createBpmnPropertyUpdates(template, bpmnFactory) {
- var propertyUpdates = {};
- template.properties.forEach(function(p) {
+/**
+ * @typedef {import('../../model/Types').Moddle} Moddle
+ * @typedef {import('../../model/Types').ModdleElement} ModdleElement
+ *
+ * @typedef {import('diagram-js/lib/util/Types').Point} Point
+ */
- var binding = p.binding,
- bindingTarget = binding.name,
- propertyValue;
+/**
+ * A factory for BPMN elements.
+ *
+ * @param {Moddle} moddle
+ */
+function BpmnFactory(moddle) {
+ this._model = moddle;
+}
- if (binding.type === 'property') {
+BpmnFactory.$inject = [ 'moddle' ];
- if (bindingTarget === 'conditionExpression') {
- propertyValue = bpmnFactory.create('bpmn:FormalExpression', {
- body: p.value,
- language: binding.scriptFormat
- });
- } else {
- propertyValue = p.value;
- }
+/**
+ * @param {ModdleElement} element
+ *
+ * @return {boolean}
+ */
+BpmnFactory.prototype._needsId = function(element) {
+ return (0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.isAny)(element, [
+ 'bpmn:RootElement',
+ 'bpmn:FlowElement',
+ 'bpmn:MessageFlow',
+ 'bpmn:DataAssociation',
+ 'bpmn:Artifact',
+ 'bpmn:Participant',
+ 'bpmn:Lane',
+ 'bpmn:LaneSet',
+ 'bpmn:Process',
+ 'bpmn:Collaboration',
+ 'bpmndi:BPMNShape',
+ 'bpmndi:BPMNEdge',
+ 'bpmndi:BPMNDiagram',
+ 'bpmndi:BPMNPlane',
+ 'bpmn:Property',
+ 'bpmn:CategoryValue'
+ ]);
+};
+
+/**
+ * @param {ModdleElement} element
+ */
+BpmnFactory.prototype._ensureId = function(element) {
+ if (element.id) {
+ this._model.ids.claim(element.id, element);
+ return;
+ }
+
+ // generate semantic ids for elements
+ // bpmn:SequenceFlow -> SequenceFlow_ID
+ var prefix;
+
+ if ((0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Activity')) {
+ prefix = 'Activity';
+ } else if ((0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Event')) {
+ prefix = 'Event';
+ } else if ((0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Gateway')) {
+ prefix = 'Gateway';
+ } else if ((0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.isAny)(element, [ 'bpmn:SequenceFlow', 'bpmn:MessageFlow' ])) {
+ prefix = 'Flow';
+ } else {
+ prefix = (element.$type || '').replace(/^[^:]*:/g, '');
+ }
+
+ prefix += '_';
+
+ if (!element.id && this._needsId(element)) {
+ element.id = this._model.ids.nextPrefixed(prefix, element);
+ }
+};
+
+/**
+ * Create BPMN element.
+ *
+ * @param {string} type
+ * @param {Object} [attrs]
+ *
+ * @return {ModdleElement}
+ */
+BpmnFactory.prototype.create = function(type, attrs) {
+ var element = this._model.create(type, attrs || {});
- // assigning camunda:async to true|false
- // assigning bpmn:conditionExpression to { $type: 'bpmn:FormalExpression', ... }
- propertyUpdates[bindingTarget] = propertyValue;
-
- // make sure we unset other "implementation types"
- // when applying a camunda:class template onto a preconfigured
- // camunda:delegateExpression element
- if (CAMUNDA_SERVICE_TASK_LIKE.indexOf(bindingTarget) !== -1) {
- CAMUNDA_SERVICE_TASK_LIKE.forEach(function(prop) {
- if (prop !== bindingTarget) {
- propertyUpdates[prop] = undefined;
- }
- });
- }
- }
- });
+ this._ensureId(element);
- return propertyUpdates;
- }
+ return element;
+};
- function createCamundaFieldInjections(template, bpmnFactory) {
- var injections = [];
+/**
+ * @return {ModdleElement}
+ */
+BpmnFactory.prototype.createDiLabel = function() {
+ return this.create('bpmndi:BPMNLabel', {
+ bounds: this.createDiBounds()
+ });
+};
+
+/**
+ * @param {ModdleElement} semantic
+ * @param {Object} [attrs]
+ * @return {ModdleElement}
+ */
+BpmnFactory.prototype.createDiShape = function(semantic, attrs) {
+ return this.create('bpmndi:BPMNShape', (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)({
+ bpmnElement: semantic,
+ bounds: this.createDiBounds()
+ }, attrs));
+};
+
+/**
+ * @return {ModdleElement}
+ */
+BpmnFactory.prototype.createDiBounds = function(bounds) {
+ return this.create('dc:Bounds', bounds);
+};
- template.properties.forEach(function(p) {
- var binding = p.binding,
- bindingType = binding.type;
- if (bindingType === 'camunda:field') {
- injections.push(createCamundaFieldInjection(
- binding, p.value, bpmnFactory
- ));
- }
- });
+/**
+ * @param {Point[]} waypoints
+ *
+ * @return {ModdleElement[]}
+ */
+BpmnFactory.prototype.createDiWaypoints = function(waypoints) {
+ var self = this;
- if (injections.length) {
- return injections;
- }
- }
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.map)(waypoints, function(pos) {
+ return self.createDiWaypoint(pos);
+ });
+};
- function createCamundaProperties(template, bpmnFactory) {
+/**
+ * @param {Point} point
+ *
+ * @return {ModdleElement}
+ */
+BpmnFactory.prototype.createDiWaypoint = function(point) {
+ return this.create('dc:Point', (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.pick)(point, [ 'x', 'y' ]));
+};
- var properties = [];
+/**
+ * @param {ModdleElement} semantic
+ * @param {Object} [attrs]
+ *
+ * @return {ModdleElement}
+ */
+BpmnFactory.prototype.createDiEdge = function(semantic, attrs) {
+ return this.create('bpmndi:BPMNEdge', (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)({
+ bpmnElement: semantic,
+ waypoint: this.createDiWaypoints([])
+ }, attrs));
+};
+
+/**
+ * @param {ModdleElement} semantic
+ * @param {Object} [attrs]
+ *
+ * @return {ModdleElement}
+ */
+BpmnFactory.prototype.createDiPlane = function(semantic, attrs) {
+ return this.create('bpmndi:BPMNPlane', (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)({
+ bpmnElement: semantic
+ }, attrs));
+};
- template.properties.forEach(function(p) {
- var binding = p.binding,
- bindingType = binding.type;
- if (bindingType === 'camunda:property') {
- properties.push(createCamundaProperty(
- binding, p.value, bpmnFactory
- ));
- }
- });
+/***/ }),
- if (properties.length) {
- return bpmnFactory.create('camunda:Properties', {
- values: properties
- });
- }
- }
+/***/ "../node_modules/bpmn-js/lib/features/modeling/BpmnLayouter.js":
+/*!*********************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/BpmnLayouter.js ***!
+ \*********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- function createInputOutputMappings(template, bpmnFactory) {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BpmnLayouter)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var diagram_js_lib_layout_BaseLayouter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/layout/BaseLayouter */ "../node_modules/diagram-js/lib/layout/BaseLayouter.js");
+/* harmony import */ var diagram_js_lib_layout_ManhattanLayout__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! diagram-js/lib/layout/ManhattanLayout */ "../node_modules/diagram-js/lib/layout/ManhattanLayout.js");
+/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- var inputParameters = [],
- outputParameters = [];
- template.properties.forEach(function(p) {
- var binding = p.binding,
- bindingType = binding.type;
- if (bindingType === 'camunda:inputParameter') {
- inputParameters.push(createInputParameter(
- binding, p.value, bpmnFactory
- ));
- }
- if (bindingType === 'camunda:outputParameter') {
- outputParameters.push(createOutputParameter(
- binding, p.value, bpmnFactory
- ));
- }
- });
- // do we need to create new ioMappings (?)
- if (outputParameters.length || inputParameters.length) {
- return bpmnFactory.create('camunda:InputOutput', {
- inputParameters: inputParameters,
- outputParameters: outputParameters
- });
- }
- }
- function createCamundaInOut(template, bpmnFactory) {
- var inOuts = [];
- template.properties.forEach(function(p) {
- var binding = p.binding,
- bindingType = binding.type;
- if (bindingType === 'camunda:in') {
- inOuts.push(createCamundaIn(
- binding, p.value, bpmnFactory
- ));
- } else
- if (bindingType === 'camunda:out') {
- inOuts.push(createCamundaOut(
- binding, p.value, bpmnFactory
- ));
- } else
- if (bindingType === 'camunda:in:businessKey') {
- inOuts.push(createCamundaInWithBusinessKey(
- binding, p.value, bpmnFactory
- ));
- }
- });
- return inOuts;
- }
- function createCamundaExecutionListeners(template, bpmnFactory) {
- var executionListener = [];
- template.properties.forEach(function(p) {
- var binding = p.binding,
- bindingType = binding.type;
+/**
+ * @typedef {import('diagram-js/lib/util/Types').Point} Point
+ *
+ * @typedef {import('../../model/Types').Connection} Connection
+ * @typedef {import('../../model/Types').Element} Element
+ *
+ * @typedef {import('diagram-js/lib/layout/BaseLayouter').LayoutConnectionHints} LayoutConnectionHints
+ *
+ * @typedef { {
+ * source?: Element;
+ * target?: Element;
+ * waypoints?: Point[];
+ * connectionStart?: Point;
+ * connectionEnd?: Point;
+ * } & LayoutConnectionHints } BpmnLayoutConnectionHints
+ */
- if (bindingType === 'camunda:executionListener') {
- executionListener.push(createCamundaExecutionListenerScript(
- binding, p.value, bpmnFactory
- ));
- }
- });
+var ATTACH_ORIENTATION_PADDING = -10,
+ BOUNDARY_TO_HOST_THRESHOLD = 40;
+
+var oppositeOrientationMapping = {
+ 'top': 'bottom',
+ 'top-right': 'bottom-left',
+ 'top-left': 'bottom-right',
+ 'right': 'left',
+ 'bottom': 'top',
+ 'bottom-right': 'top-left',
+ 'bottom-left': 'top-right',
+ 'left': 'right'
+};
+
+var orientationDirectionMapping = {
+ top: 't',
+ right: 'r',
+ bottom: 'b',
+ left: 'l'
+};
+
+function BpmnLayouter() {}
+
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_0__["default"])(BpmnLayouter, diagram_js_lib_layout_BaseLayouter__WEBPACK_IMPORTED_MODULE_1__["default"]);
+
+/**
+ * Returns waypoints of laid out connection.
+ *
+ * @param {Connection} connection
+ * @param {BpmnLayoutConnectionHints} [hints]
+ *
+ * @return {Point[]}
+ */
+BpmnLayouter.prototype.layoutConnection = function(connection, hints) {
+ if (!hints) {
+ hints = {};
+ }
+
+ var source = hints.source || connection.source,
+ target = hints.target || connection.target,
+ waypoints = hints.waypoints || connection.waypoints,
+ connectionStart = hints.connectionStart,
+ connectionEnd = hints.connectionEnd;
+
+ var manhattanOptions,
+ updatedWaypoints;
+
+ if (!connectionStart) {
+ connectionStart = getConnectionDocking(waypoints && waypoints[ 0 ], source);
+ }
+
+ if (!connectionEnd) {
+ connectionEnd = getConnectionDocking(waypoints && waypoints[ waypoints.length - 1 ], target);
+ }
+
+ // TODO(nikku): support vertical modeling
+ // and invert preferredLayouts accordingly
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(connection, 'bpmn:Association') ||
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(connection, 'bpmn:DataAssociation')) {
+
+ if (waypoints && !isCompensationAssociation(source, target)) {
+ return [].concat([ connectionStart ], waypoints.slice(1, -1), [ connectionEnd ]);
+ }
+ }
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(connection, 'bpmn:MessageFlow')) {
+ manhattanOptions = getMessageFlowManhattanOptions(source, target);
+ } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(connection, 'bpmn:SequenceFlow') || isCompensationAssociation(source, target)) {
+
+ // layout all connection between flow elements h:h, except for
+ // (1) outgoing of boundary events -> layout based on attach orientation and target orientation
+ // (2) incoming/outgoing of gateways -> v:h for outgoing, h:v for incoming
+ // (3) loops
+ if (source === target) {
+ manhattanOptions = {
+ preferredLayouts: getLoopPreferredLayout(source, connection)
+ };
+ } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(source, 'bpmn:BoundaryEvent')) {
+ manhattanOptions = {
+ preferredLayouts: getBoundaryEventPreferredLayouts(source, target, connectionEnd)
+ };
+ } else if (isExpandedSubProcess(source) || isExpandedSubProcess(target)) {
+ manhattanOptions = getSubProcessManhattanOptions(source);
+ } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(source, 'bpmn:Gateway')) {
+ manhattanOptions = {
+ preferredLayouts: [ 'v:h' ]
+ };
+ } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target, 'bpmn:Gateway')) {
+ manhattanOptions = {
+ preferredLayouts: [ 'h:v' ]
+ };
+ } else {
+ manhattanOptions = {
+ preferredLayouts: [ 'h:h' ]
+ };
+ }
+ }
+
+ if (manhattanOptions) {
+ manhattanOptions = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(manhattanOptions, hints);
+
+ updatedWaypoints = (0,diagram_js_lib_layout_ManhattanLayout__WEBPACK_IMPORTED_MODULE_4__.withoutRedundantPoints)((0,diagram_js_lib_layout_ManhattanLayout__WEBPACK_IMPORTED_MODULE_4__.repairConnection)(
+ source,
+ target,
+ connectionStart,
+ connectionEnd,
+ waypoints,
+ manhattanOptions
+ ));
+ }
+
+ return updatedWaypoints || [ connectionStart, connectionEnd ];
+};
+
+
+// helpers //////////
+
+function getAttachOrientation(attachedElement) {
+ var hostElement = attachedElement.host;
+
+ return (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.getOrientation)((0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.getMid)(attachedElement), hostElement, ATTACH_ORIENTATION_PADDING);
+}
+
+function getMessageFlowManhattanOptions(source, target) {
+ return {
+ preferredLayouts: [ 'straight', 'v:v' ],
+ preserveDocking: getMessageFlowPreserveDocking(source, target)
+ };
+}
+
+function getMessageFlowPreserveDocking(source, target) {
+
+ // (1) docking element connected to participant has precedence
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target, 'bpmn:Participant')) {
+ return 'source';
+ }
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(source, 'bpmn:Participant')) {
+ return 'target';
+ }
+
+ // (2) docking element connected to expanded sub-process has precedence
+ if (isExpandedSubProcess(target)) {
+ return 'source';
+ }
+
+ if (isExpandedSubProcess(source)) {
+ return 'target';
+ }
+
+ // (3) docking event has precedence
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target, 'bpmn:Event')) {
+ return 'target';
+ }
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(source, 'bpmn:Event')) {
+ return 'source';
+ }
+
+ return null;
+}
+
+function getSubProcessManhattanOptions(source) {
+ return {
+ preferredLayouts: [ 'straight', 'h:h' ],
+ preserveDocking: getSubProcessPreserveDocking(source)
+ };
+}
+
+function getSubProcessPreserveDocking(source) {
+ return isExpandedSubProcess(source) ? 'target' : 'source';
+}
+
+function getConnectionDocking(point, shape) {
+ return point ? (point.original || point) : (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.getMid)(shape);
+}
+
+function isCompensationAssociation(source, target) {
+ return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target, 'bpmn:Activity') &&
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(source, 'bpmn:BoundaryEvent') &&
+ target.businessObject.isForCompensation;
+}
+
+function isExpandedSubProcess(element) {
+ return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(element, 'bpmn:SubProcess') && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_6__.isExpanded)(element);
+}
+
+function isSame(a, b) {
+ return a === b;
+}
- return executionListener;
- }
+function isAnyOrientation(orientation, orientations) {
+ return orientations.indexOf(orientation) !== -1;
+}
- },{"../CreateHelper":52,"../Helper":56,"lodash/forEach":613}],59:[function(require,module,exports){
- 'use strict';
+function getHorizontalOrientation(orientation) {
+ var matches = /right|left/.exec(orientation);
- var ChangeElementTemplateHandler = require('./ChangeElementTemplateHandler');
+ return matches && matches[0];
+}
- var getTemplate = require('../Helper').getTemplate,
- getDefaultTemplate = require('../Helper').getDefaultTemplate;
+function getVerticalOrientation(orientation) {
+ var matches = /top|bottom/.exec(orientation);
- function registerHandlers(commandStack, elementTemplates, eventBus, elementRegistry) {
- commandStack.registerHandler(
- 'propertiesPanel.camunda.changeTemplate',
- ChangeElementTemplateHandler
- );
+ return matches && matches[0];
+}
- // apply default element templates on shape creation
- eventBus.on([ 'commandStack.shape.create.postExecuted' ], function(context) {
- applyDefaultTemplate(context.context.shape, elementTemplates, commandStack);
- });
+function isOppositeOrientation(a, b) {
+ return oppositeOrientationMapping[a] === b;
+}
- // apply default element templates on connection creation
- eventBus.on([ 'commandStack.connection.create.postExecuted' ], function(context) {
- applyDefaultTemplate(context.context.connection, elementTemplates, commandStack);
- });
- }
+function isOppositeHorizontalOrientation(a, b) {
+ var horizontalOrientation = getHorizontalOrientation(a);
- registerHandlers.$inject = [ 'commandStack', 'elementTemplates', 'eventBus', 'elementRegistry' ];
+ var oppositeHorizontalOrientation = oppositeOrientationMapping[horizontalOrientation];
+ return b.indexOf(oppositeHorizontalOrientation) !== -1;
+}
- module.exports = {
- __init__: [ registerHandlers ]
- };
+function isOppositeVerticalOrientation(a, b) {
+ var verticalOrientation = getVerticalOrientation(a);
+ var oppositeVerticalOrientation = oppositeOrientationMapping[verticalOrientation];
+
+ return b.indexOf(oppositeVerticalOrientation) !== -1;
+}
+
+function isHorizontalOrientation(orientation) {
+ return orientation === 'right' || orientation === 'left';
+}
+
+function getLoopPreferredLayout(source, connection) {
+ var waypoints = connection.waypoints;
+
+ var orientation = waypoints && waypoints.length && (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.getOrientation)(waypoints[0], source);
- function applyDefaultTemplate(element, elementTemplates, commandStack) {
+ if (orientation === 'top') {
+ return [ 't:r' ];
+ } else if (orientation === 'right') {
+ return [ 'r:b' ];
+ } else if (orientation === 'left') {
+ return [ 'l:t' ];
+ }
- if (!getTemplate(element, elementTemplates)
- && getDefaultTemplate(element, elementTemplates)) {
+ return [ 'b:l' ];
+}
+
+function getBoundaryEventPreferredLayouts(source, target, end) {
+ var sourceMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.getMid)(source),
+ targetMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.getMid)(target),
+ attachOrientation = getAttachOrientation(source),
+ sourceLayout,
+ targetLayout;
- var command = 'propertiesPanel.camunda.changeTemplate';
- var commandContext = {
- element: element,
- newTemplate: getDefaultTemplate(element, elementTemplates)
- };
+ var isLoop = isSame(source.host, target);
- commandStack.execute(command, commandContext);
- }
- }
+ var attachedToSide = isAnyOrientation(attachOrientation, [ 'top', 'right', 'bottom', 'left' ]);
- },{"../Helper":56,"./ChangeElementTemplateHandler":58}],60:[function(require,module,exports){
- module.exports = {
- __depends__: [
- require('./cmd'),
- require('diagram-js/lib/i18n/translate').default
- ],
- __init__: [
- 'customElementsPropertiesActivator',
- 'elementTemplatesLoader'
- ],
- customElementsPropertiesActivator: [ 'type', require('./CustomElementsPropertiesActivator') ],
- elementTemplates: [ 'type', require('./ElementTemplates') ],
- elementTemplatesLoader: [ 'type', require('./ElementTemplatesLoader') ]
- };
+ var targetOrientation = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.getOrientation)(targetMid, sourceMid, {
+ x: source.width / 2 + target.width / 2,
+ y: source.height / 2 + target.height / 2
+ });
+
+ if (isLoop) {
+ return getBoundaryEventLoopLayout(attachOrientation, attachedToSide, source, target, end);
+ }
+
+ // source layout
+ sourceLayout = getBoundaryEventSourceLayout(attachOrientation, targetOrientation, attachedToSide);
- },{"./CustomElementsPropertiesActivator":53,"./ElementTemplates":54,"./ElementTemplatesLoader":55,"./cmd":59,"diagram-js/lib/i18n/translate":401}],61:[function(require,module,exports){
- 'use strict';
+ // target layout
+ targetLayout = getBoundaryEventTargetLayout(attachOrientation, targetOrientation, attachedToSide);
- var entryFactory = require('../../../../factory/EntryFactory'),
- is = require('bpmn-js/lib/util/ModelUtil').is,
- getTemplate = require('../Helper').getTemplate,
- getTemplateId = require('../Helper').getTemplateId;
+ return [ sourceLayout + ':' + targetLayout ];
+}
+
+function getBoundaryEventLoopLayout(attachOrientation, attachedToSide, source, target, end) {
+ var orientation = attachedToSide ? attachOrientation : getVerticalOrientation(attachOrientation),
+ sourceLayout = orientationDirectionMapping[ orientation ],
+ targetLayout;
+
+ if (attachedToSide) {
+ if (isHorizontalOrientation(attachOrientation)) {
+ targetLayout = shouldConnectToSameSide('y', source, target, end) ? 'h' : 'b';
+ } else {
+ targetLayout = shouldConnectToSameSide('x', source, target, end) ? 'v' : 'l';
+ }
+ } else {
+ targetLayout = 'v';
+ }
- var find = require('lodash/find');
+ return [ sourceLayout + ':' + targetLayout ];
+}
+
+function shouldConnectToSameSide(axis, source, target, end) {
+ var threshold = BOUNDARY_TO_HOST_THRESHOLD;
+
+ return !(
+ areCloseOnAxis(axis, end, target, threshold) ||
+ areCloseOnAxis(axis, end, {
+ x: target.x + target.width,
+ y: target.y + target.height
+ }, threshold) ||
+ areCloseOnAxis(axis, end, (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.getMid)(source), threshold)
+ );
+}
+
+function areCloseOnAxis(axis, a, b, threshold) {
+ return Math.abs(a[ axis ] - b[ axis ]) < threshold;
+}
- var TEMPLATE_ATTR = require('../Helper').TEMPLATE_ATTR;
+function getBoundaryEventSourceLayout(attachOrientation, targetOrientation, attachedToSide) {
- function isAny(element, types) {
- return types.reduce(function(result, type) {
- return result || is(element, type);
- }, false);
- }
+ // attached to either top, right, bottom or left side
+ if (attachedToSide) {
+ return orientationDirectionMapping[ attachOrientation ];
+ }
+ // attached to either top-right, top-left, bottom-right or bottom-left corner
- module.exports = function(group, element, elementTemplates, translate) {
+ // same vertical or opposite horizontal orientation
+ if (isSame(
+ getVerticalOrientation(attachOrientation), getVerticalOrientation(targetOrientation)
+ ) || isOppositeOrientation(
+ getHorizontalOrientation(attachOrientation), getHorizontalOrientation(targetOrientation)
+ )) {
+ return orientationDirectionMapping[ getVerticalOrientation(attachOrientation) ];
+ }
- var options = getTemplateOptions(element, elementTemplates, translate);
+ // fallback
+ return orientationDirectionMapping[ getHorizontalOrientation(attachOrientation) ];
+}
- if (options.length === 1 && !options[0].isDefault) {
- return;
- }
+function getBoundaryEventTargetLayout(attachOrientation, targetOrientation, attachedToSide) {
- // select element template (via dropdown)
- group.entries.push(entryFactory.selectBox({
- id: 'elementTemplate-chooser',
- label: translate('Element Template'),
- modelProperty: 'camunda:modelerTemplate',
- selectOptions: options,
- set: function(element, properties) {
- return applyTemplate(element, properties[TEMPLATE_ATTR], elementTemplates);
- },
- disabled: function() {
- var template = getTemplate(element, elementTemplates);
+ // attached to either top, right, bottom or left side
+ if (attachedToSide) {
+ if (isHorizontalOrientation(attachOrientation)) {
- return template && isDefaultTemplate(template);
- }
- }));
+ // orientation is right or left
- };
+ // opposite horizontal orientation or same orientation
+ if (
+ isOppositeHorizontalOrientation(attachOrientation, targetOrientation) ||
+ isSame(attachOrientation, targetOrientation)
+ ) {
+ return 'h';
+ }
+ // fallback
+ return 'v';
+ } else {
-// helpers //////////////////////////////////////
+ // orientation is top or bottom
- function applyTemplate(element, newTemplateId, elementTemplates) {
+ // opposite vertical orientation or same orientation
+ if (
+ isOppositeVerticalOrientation(attachOrientation, targetOrientation) ||
+ isSame(attachOrientation, targetOrientation)
+ ) {
+ return 'v';
+ }
- // cleanup
- // clear input output mappings
- // undo changes to properties defined in template
+ // fallback
+ return 'h';
+ }
+ }
- // re-establish
- // set input output mappings
- // apply changes to properties as defined in new template
+ // attached to either top-right, top-left, bottom-right or bottom-left corner
- var oldTemplate = getTemplate(element, elementTemplates),
- newTemplate = elementTemplates.get(newTemplateId);
+ // orientation is right, left
+ // or same vertical orientation but also right or left
+ if (isHorizontalOrientation(targetOrientation) ||
+ (isSame(getVerticalOrientation(attachOrientation), getVerticalOrientation(targetOrientation)) &&
+ getHorizontalOrientation(targetOrientation))) {
+ return 'h';
+ } else {
+ return 'v';
+ }
+}
- if (oldTemplate === newTemplate) {
- return;
- }
- return {
- cmd: 'propertiesPanel.camunda.changeTemplate',
- context: {
- element: element,
- oldTemplate: oldTemplate,
- newTemplate: newTemplate
- }
- };
- }
+/***/ }),
- function getTemplateOptions(element, elementTemplates, translate) {
+/***/ "../node_modules/bpmn-js/lib/features/modeling/BpmnUpdater.js":
+/*!********************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/BpmnUpdater.js ***!
+ \********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var currentTemplateId = getTemplateId(element);
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BpmnUpdater)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! diagram-js/lib/util/Collections */ "../node_modules/diagram-js/lib/util/Collections.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util/ModelingUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/LabelUtil */ "../node_modules/bpmn-js/lib/util/LabelUtil.js");
+/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../util/LabelUtil */ "../node_modules/diagram-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/DrilldownUtil */ "../node_modules/bpmn-js/lib/util/DrilldownUtil.js");
+/* harmony import */ var diagram_js_lib_util_PositionUtil__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! diagram-js/lib/util/PositionUtil */ "../node_modules/diagram-js/lib/util/PositionUtil.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
- var emptyOption = {
- name: '',
- value: ''
- };
- var allOptions = elementTemplates.getAll().reduce(function(templates, t) {
- if (!isAny(element, t.appliesTo)) {
- return templates;
- }
- return templates.concat({
- name: translate(t.name),
- value: t.id,
- isDefault: t.isDefault
- });
- }, [ emptyOption ]);
- var defaultOption = find(allOptions, function(option) {
- return isDefaultTemplate(option);
- });
- var currentOption = find(allOptions, function(option) {
- return option.value === currentTemplateId;
- });
- if (currentTemplateId && !currentOption) {
- currentOption = unknownTemplate(currentTemplateId, translate);
- allOptions.push(currentOption);
- }
- if (!defaultOption) {
- // return all options, including empty
- // and optionally unknownTemplate option
- return allOptions;
- }
- // special limited handling for
- // default options
- var options = [];
- // current template not set
- if (!currentTemplateId) {
- options.push({
- name: '',
- value: ''
- });
- }
- // current template not default
- if (currentOption && currentOption !== defaultOption) {
- options.push(currentOption);
- }
- options.push(defaultOption);
- // [ (empty), (current), defaultOption ]
- return options;
- }
- function unknownTemplate(templateId, translate) {
- return {
- name: translate('[unknown template: {templateId}]', { templateId: templateId }),
- value: templateId
- };
- }
- function isDefaultTemplate(elementTemplate) {
- return elementTemplate.isDefault;
- }
- },{"../../../../factory/EntryFactory":14,"../Helper":56,"bpmn-js/lib/util/ModelUtil":240,"lodash/find":610}],62:[function(require,module,exports){
- 'use strict';
-
- var assign = require('lodash/assign');
-
- var entryFactory = require('../../../../factory/EntryFactory'),
- getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject,
- getTemplate = require('../Helper').getTemplate,
- cmdHelper = require('../../../../helper/CmdHelper'),
- elementHelper = require('../../../../helper/ElementHelper');
-
- var findExtension = require('../Helper').findExtension,
- findExtensions = require('../Helper').findExtensions,
- findInputParameter = require('../Helper').findInputParameter,
- findOutputParameter = require('../Helper').findOutputParameter,
- findCamundaProperty = require('../Helper').findCamundaProperty,
- findCamundaInOut = require('../Helper').findCamundaInOut;
-
- var createCamundaProperty = require('../CreateHelper').createCamundaProperty,
- createInputParameter = require('../CreateHelper').createInputParameter,
- createOutputParameter = require('../CreateHelper').createOutputParameter,
- createCamundaIn = require('../CreateHelper').createCamundaIn,
- createCamundaOut = require('../CreateHelper').createCamundaOut,
- createCamundaInWithBusinessKey = require('../CreateHelper').createCamundaInWithBusinessKey,
- createCamundaFieldInjection = require('../CreateHelper').createCamundaFieldInjection;
-
- var CAMUNDA_PROPERTY_TYPE = 'camunda:property',
- CAMUNDA_INPUT_PARAMETER_TYPE = 'camunda:inputParameter',
- CAMUNDA_OUTPUT_PARAMETER_TYPE = 'camunda:outputParameter',
- CAMUNDA_IN_TYPE = 'camunda:in',
- CAMUNDA_OUT_TYPE = 'camunda:out',
- CAMUNDA_IN_BUSINESS_KEY_TYPE = 'camunda:in:businessKey',
- CAMUNDA_EXECUTION_LISTENER_TYPE = 'camunda:executionListener',
- CAMUNDA_FIELD = 'camunda:field';
-
- var BASIC_MODDLE_TYPES = [
- 'Boolean',
- 'Integer',
- 'String'
- ];
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('./BpmnFactory').default} BpmnFactory
+ * @typedef {import('diagram-js/lib/layout/CroppingConnectionDocking').default} CroppingConnectionDocking
+ * @typedef {import('diagram-js/lib/i18n/translate/translate').default} Translate
+ *
+ * @typedef {import('../../model/Types').Connection} Connection
+ * @typedef {import('../../model/Types').Element} Element
+ * @typedef {import('../../model/Types').Shape} Shape
+ * @typedef {import('../../model/Types').Parent} Parent
+ * @typedef {import('../../model/Types').ModdleElement} ModdleElement
+ */
- var EXTENSION_BINDING_TYPES = [
- CAMUNDA_PROPERTY_TYPE,
- CAMUNDA_INPUT_PARAMETER_TYPE,
- CAMUNDA_OUTPUT_PARAMETER_TYPE,
- CAMUNDA_IN_TYPE,
- CAMUNDA_OUT_TYPE,
- CAMUNDA_IN_BUSINESS_KEY_TYPE,
- CAMUNDA_FIELD
- ];
+/**
+ * A handler responsible for updating the underlying BPMN 2.0 XML & DI
+ * once changes on the diagram happen.
+ *
+ * @param {EventBus} eventBus
+ * @param {BpmnFactory} bpmnFactory
+ * @param {CroppingConnectionDocking} connectionDocking
+ * @param {Translate} translate
+ */
+function BpmnUpdater(
+ eventBus,
+ bpmnFactory,
+ connectionDocking,
+ translate
+) {
- var IO_BINDING_TYPES = [
- CAMUNDA_INPUT_PARAMETER_TYPE,
- CAMUNDA_OUTPUT_PARAMETER_TYPE
- ];
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- var IN_OUT_BINDING_TYPES = [
- CAMUNDA_IN_TYPE,
- CAMUNDA_OUT_TYPE,
- CAMUNDA_IN_BUSINESS_KEY_TYPE
- ];
+ this._bpmnFactory = bpmnFactory;
+ this._translate = translate;
- /**
- * Injects custom properties into the given group.
- *
- * @param {djs.model.Base} element
- * @param {ElementTemplates} elementTemplates
- * @param {BpmnFactory} bpmnFactory
- * @param {Function} translate
- */
- module.exports = function(element, elementTemplates, bpmnFactory, translate) {
+ var self = this;
- var template = getTemplate(element, elementTemplates);
- if (!template) {
- return [];
- }
- var renderCustomField = function(id, p, idx) {
- var propertyType = p.type;
+ // connection cropping //////////////////////
- var entryOptions = {
- id: id,
- description: p.description,
- label: p.label ? translate(p.label) : p.label,
- modelProperty: id,
- get: propertyGetter(id, p),
- set: propertySetter(id, p, bpmnFactory),
- validate: propertyValidator(id, p, translate)
- };
+ // crop connection ends during create/update
+ function cropConnection(e) {
+ var context = e.context,
+ hints = context.hints || {},
+ connection;
- var entry;
+ if (!context.cropped && hints.createElementsBehavior !== false) {
+ connection = context.connection;
+ connection.waypoints = connectionDocking.getCroppedWaypoints(connection);
+ context.cropped = true;
+ }
+ }
- if (propertyType === 'Boolean') {
- entry = entryFactory.checkbox(entryOptions);
- }
+ this.executed([
+ 'connection.layout',
+ 'connection.create'
+ ], cropConnection);
- if (propertyType === 'String') {
- entry = entryFactory.textField(entryOptions);
- }
+ this.reverted([ 'connection.layout' ], function(e) {
+ delete e.context.cropped;
+ });
- if (propertyType === 'Text') {
- entry = entryFactory.textBox(entryOptions);
- }
- if (propertyType === 'Dropdown') {
- entryOptions.selectOptions = p.choices;
- entry = entryFactory.selectBox(entryOptions);
- }
+ // BPMN + DI update //////////////////////
- return entry;
- };
- var groups = [];
- var id, entry;
+ // update parent
+ function updateParent(e) {
+ var context = e.context;
- var customFieldsGroup = {
- id: 'customField',
- label: translate('Custom Fields'),
- entries: []
- };
- template.properties.forEach(function(p, idx) {
+ self.updateParent(context.shape || context.connection, context.oldParent);
+ }
- id = 'custom-' + template.id + '-' + idx;
+ function reverseUpdateParent(e) {
+ var context = e.context;
- entry = renderCustomField(id, p, idx);
- if (entry) {
- customFieldsGroup.entries.push(entry);
- }
- });
- if (customFieldsGroup.entries.length > 0) {
- groups.push(customFieldsGroup);
- }
+ var element = context.shape || context.connection,
- if (template.scopes) {
- for (var scopeName in template.scopes) {
+ // oldParent is the (old) new parent, because we are undoing
+ oldParent = context.parent || context.newParent;
- var scope = template.scopes[scopeName];
- var idScopeName = scopeName.replace(/:/g, '_');
+ self.updateParent(element, oldParent);
+ }
- var customScopeFieldsGroup = {
- id: 'customField-' + idScopeName,
- label: translate('Custom Fields for scope: ') + scopeName,
- entries: []
- };
+ this.executed([
+ 'shape.move',
+ 'shape.create',
+ 'shape.delete',
+ 'connection.create',
+ 'connection.move',
+ 'connection.delete'
+ ], ifBpmn(updateParent));
- scope.properties.forEach(function(p, idx) {
+ this.reverted([
+ 'shape.move',
+ 'shape.create',
+ 'shape.delete',
+ 'connection.create',
+ 'connection.move',
+ 'connection.delete'
+ ], ifBpmn(reverseUpdateParent));
- var propertyId = 'custom-' + template.id + '-' + idScopeName + '-' + idx;
+ /*
+ * ## Updating Parent
+ *
+ * When morphing a Process into a Collaboration or vice-versa,
+ * make sure that both the *semantic* and *di* parent of each element
+ * is updated.
+ *
+ */
+ function updateRoot(event) {
+ var context = event.context,
+ oldRoot = context.oldRoot,
+ children = oldRoot.children;
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(children, function(child) {
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(child, 'bpmn:BaseElement')) {
+ self.updateParent(child);
+ }
+ });
+ }
+
+ this.executed([ 'canvas.updateRoot' ], updateRoot);
+ this.reverted([ 'canvas.updateRoot' ], updateRoot);
+
+
+ // update bounds
+ function updateBounds(e) {
+ var shape = e.context.shape;
+
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:BaseElement')) {
+ return;
+ }
+
+ self.updateBounds(shape);
+ }
+
+ this.executed([ 'shape.move', 'shape.create', 'shape.resize' ], ifBpmn(function(event) {
+
+ // exclude labels because they're handled separately during shape.changed
+ if (event.context.shape.type === 'label') {
+ return;
+ }
+
+ updateBounds(event);
+ }));
+
+ this.reverted([ 'shape.move', 'shape.create', 'shape.resize' ], ifBpmn(function(event) {
+
+ // exclude labels because they're handled separately during shape.changed
+ if (event.context.shape.type === 'label') {
+ return;
+ }
+
+ updateBounds(event);
+ }));
+
+ // Handle labels separately. This is necessary, because the label bounds have to be updated
+ // every time its shape changes, not only on move, create and resize.
+ eventBus.on('shape.changed', function(event) {
+ if (event.element.type === 'label') {
+ updateBounds({ context: { shape: event.element } });
+ }
+ });
+
+ // attach / detach connection
+ function updateConnection(e) {
+ self.updateConnection(e.context);
+ }
+
+ this.executed([
+ 'connection.create',
+ 'connection.move',
+ 'connection.delete',
+ 'connection.reconnect'
+ ], ifBpmn(updateConnection));
+
+ this.reverted([
+ 'connection.create',
+ 'connection.move',
+ 'connection.delete',
+ 'connection.reconnect'
+ ], ifBpmn(updateConnection));
+
+
+ // update waypoints
+ function updateConnectionWaypoints(e) {
+ self.updateConnectionWaypoints(e.context.connection);
+ }
+
+ this.executed([
+ 'connection.layout',
+ 'connection.move',
+ 'connection.updateWaypoints',
+ ], ifBpmn(updateConnectionWaypoints));
+
+ this.reverted([
+ 'connection.layout',
+ 'connection.move',
+ 'connection.updateWaypoints',
+ ], ifBpmn(updateConnectionWaypoints));
+
+ // update conditional/default flows
+ this.executed('connection.reconnect', ifBpmn(function(event) {
+ var context = event.context,
+ connection = context.connection,
+ oldSource = context.oldSource,
+ newSource = context.newSource,
+ connectionBo = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(connection),
+ oldSourceBo = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(oldSource),
+ newSourceBo = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(newSource);
+
+ // remove condition from connection on reconnect to new source
+ // if new source can NOT have condional sequence flow
+ if (connectionBo.conditionExpression && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.isAny)(newSourceBo, [
+ 'bpmn:Activity',
+ 'bpmn:ExclusiveGateway',
+ 'bpmn:InclusiveGateway'
+ ])) {
+ context.oldConditionExpression = connectionBo.conditionExpression;
+
+ delete connectionBo.conditionExpression;
+ }
+
+ // remove default from old source flow on reconnect to new source
+ // if source changed
+ if (oldSource !== newSource && oldSourceBo.default === connectionBo) {
+ context.oldDefault = oldSourceBo.default;
+
+ delete oldSourceBo.default;
+ }
+ }));
+
+ this.reverted('connection.reconnect', ifBpmn(function(event) {
+ var context = event.context,
+ connection = context.connection,
+ oldSource = context.oldSource,
+ newSource = context.newSource,
+ connectionBo = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(connection),
+ oldSourceBo = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(oldSource),
+ newSourceBo = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(newSource);
+
+ // add condition to connection on revert reconnect to new source
+ if (context.oldConditionExpression) {
+ connectionBo.conditionExpression = context.oldConditionExpression;
+ }
+
+ // add default to old source on revert reconnect to new source
+ if (context.oldDefault) {
+ oldSourceBo.default = context.oldDefault;
+
+ delete newSourceBo.default;
+ }
+ }));
+
+ // update attachments
+ function updateAttachment(e) {
+ self.updateAttachment(e.context);
+ }
+
+ this.executed([ 'element.updateAttachment' ], ifBpmn(updateAttachment));
+ this.reverted([ 'element.updateAttachment' ], ifBpmn(updateAttachment));
+
+
+ // update BPMNLabel
+ this.executed('element.updateLabel', ifBpmn(updateBPMNLabel));
+ this.reverted('element.updateLabel', ifBpmn(updateBPMNLabel));
+
+ function updateBPMNLabel(event) {
+ const { element } = event.context,
+ label = (0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.getLabel)(element);
+ const di = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getDi)(element),
+ diLabel = di && di.get('label');
+
+ if ((0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.isLabelExternal)(element) || (0,_util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_4__.isPlane)(element)) {
+ return;
+ }
+
+ if (label && !diLabel) {
+ di.set('label', bpmnFactory.create('bpmndi:BPMNLabel'));
+ } else if (!label && diLabel) {
+ di.set('label', undefined);
+ }
+ }
+}
+
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_5__["default"])(BpmnUpdater, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
+
+BpmnUpdater.$inject = [
+ 'eventBus',
+ 'bpmnFactory',
+ 'connectionDocking',
+ 'translate'
+];
+
+
+// implementation //////////////////////
+
+/**
+ * @param { {
+ * shape: Shape;
+ * host: Shape;
+ * } } context
+ */
+BpmnUpdater.prototype.updateAttachment = function(context) {
- var scopedProperty = propertyWithScope(p, scopeName);
+ var shape = context.shape,
+ businessObject = shape.businessObject,
+ host = shape.host;
- entry = renderCustomField(propertyId, scopedProperty, idx);
- if (entry) {
- customScopeFieldsGroup.entries.push(entry);
- }
- });
+ businessObject.attachedToRef = host && host.businessObject;
+};
- if (customScopeFieldsGroup.entries.length > 0) {
- groups.push(customScopeFieldsGroup);
- }
- }
- }
+/**
+ * @param {Element} element
+ * @param {Parent} oldParent
+ */
+BpmnUpdater.prototype.updateParent = function(element, oldParent) {
+
+ // do not update BPMN 2.0 label parent
+ if ((0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_6__.isLabel)(element)) {
+ return;
+ }
+
+ // data stores in collaborations are handled separately by DataStoreBehavior
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(element, 'bpmn:DataStoreReference') &&
+ element.parent &&
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(element.parent, 'bpmn:Collaboration')) {
+ return;
+ }
+
+ var parentShape = element.parent;
+
+ var businessObject = element.businessObject,
+ di = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getDi)(element),
+ parentBusinessObject = parentShape && parentShape.businessObject,
+ parentDi = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getDi)(parentShape);
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(element, 'bpmn:FlowNode')) {
+ this.updateFlowNodeRefs(businessObject, parentBusinessObject, oldParent && oldParent.businessObject);
+ }
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(element, 'bpmn:DataOutputAssociation')) {
+ if (element.source) {
+ parentBusinessObject = element.source.businessObject;
+ } else {
+ parentBusinessObject = null;
+ }
+ }
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(element, 'bpmn:DataInputAssociation')) {
+ if (element.target) {
+ parentBusinessObject = element.target.businessObject;
+ } else {
+ parentBusinessObject = null;
+ }
+ }
+
+ this.updateSemanticParent(businessObject, parentBusinessObject);
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(element, 'bpmn:DataObjectReference') && businessObject.dataObjectRef) {
+ this.updateSemanticParent(businessObject.dataObjectRef, parentBusinessObject);
+ }
+
+ this.updateDiParent(di, parentDi);
+};
+
+/**
+ * @param {Shape} shape
+ */
+BpmnUpdater.prototype.updateBounds = function(shape) {
+
+ var di = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getDi)(shape),
+ embeddedLabelBounds = getEmbeddedLabelBounds(shape);
+
+ // update embedded label bounds if possible
+ if (embeddedLabelBounds) {
+ var embeddedLabelBoundsDelta = (0,diagram_js_lib_util_PositionUtil__WEBPACK_IMPORTED_MODULE_7__.delta)(embeddedLabelBounds, di.get('bounds'));
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(embeddedLabelBounds, {
+ x: shape.x + embeddedLabelBoundsDelta.x,
+ y: shape.y + embeddedLabelBoundsDelta.y
+ });
+ }
+
+ var target = (0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_6__.isLabel)(shape) ? this._getLabel(di) : di;
+
+ var bounds = target.bounds;
+
+ if (!bounds) {
+ bounds = this._bpmnFactory.createDiBounds();
+ target.set('bounds', bounds);
+ }
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(bounds, {
+ x: shape.x,
+ y: shape.y,
+ width: shape.width,
+ height: shape.height
+ });
+};
+
+/**
+ * @param {ModdleElement} businessObject
+ * @param {ModdleElement} newContainment
+ * @param {ModdleElement} oldContainment
+ */
+BpmnUpdater.prototype.updateFlowNodeRefs = function(businessObject, newContainment, oldContainment) {
- return groups;
- };
+ if (oldContainment === newContainment) {
+ return;
+ }
+ var oldRefs, newRefs;
-// getters, setters and validators ///////////////
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is) (oldContainment, 'bpmn:Lane')) {
+ oldRefs = oldContainment.get('flowNodeRef');
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_8__.remove)(oldRefs, businessObject);
+ }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(newContainment, 'bpmn:Lane')) {
+ newRefs = newContainment.get('flowNodeRef');
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_8__.add)(newRefs, businessObject);
+ }
+};
- /**
- * Return a getter that retrieves the given property.
- *
- * @param {String} name
- * @param {PropertyDescriptor} property
- *
- * @return {Function}
- */
- function propertyGetter(name, property) {
+/**
+ * @param {Connection} connection
+ * @param {Element} newSource
+ * @param {Element} newTarget
+ */
+BpmnUpdater.prototype.updateDiConnection = function(connection, newSource, newTarget) {
+ var connectionDi = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getDi)(connection),
+ newSourceDi = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getDi)(newSource),
+ newTargetDi = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getDi)(newTarget);
- /* getter */
- return function get(element) {
- var value = getPropertyValue(element, property);
+ if (connectionDi.sourceElement && connectionDi.sourceElement.bpmnElement !== (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(newSource)) {
+ connectionDi.sourceElement = newSource && newSourceDi;
+ }
- return objectWithKey(name, value);
- };
- }
+ if (connectionDi.targetElement && connectionDi.targetElement.bpmnElement !== (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(newTarget)) {
+ connectionDi.targetElement = newTarget && newTargetDi;
+ }
- /**
- * Return a setter that updates the given property.
- *
- * @param {String} name
- * @param {PropertyDescriptor} property
- * @param {BpmnFactory} bpmnFactory
- *
- * @return {Function}
- */
- function propertySetter(name, property, bpmnFactory) {
+};
- /* setter */
- return function set(element, values) {
+/**
+ * @param {ModdleElement} di
+ * @param {ModdleElement} parentDi
+ */
+BpmnUpdater.prototype.updateDiParent = function(di, parentDi) {
- var value = values[name];
+ if (parentDi && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(parentDi, 'bpmndi:BPMNPlane')) {
+ parentDi = parentDi.$parent;
+ }
- return setPropertyValue(element, property, value, bpmnFactory);
- };
- }
+ if (di.$parent === parentDi) {
+ return;
+ }
- /**
- * Return a validator that ensures the property is ok.
- *
- * @param {String} name
- * @param {PropertyDescriptor} property
- * @param {Function} translate
- *
- * @return {Function}
- */
- function propertyValidator(name, property, translate) {
+ var planeElements = (parentDi || di.$parent).get('planeElement');
- /* validator */
- return function validate(element, values) {
- var value = values[name];
+ if (parentDi) {
+ planeElements.push(di);
+ di.$parent = parentDi;
+ } else {
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_8__.remove)(planeElements, di);
+ di.$parent = null;
+ }
+};
- var error = validateValue(value, property, translate);
+/**
+ * @param {ModdleElement} element
+ *
+ * @return {ModdleElement}
+ */
+function getDefinitions(element) {
+ while (element && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(element, 'bpmn:Definitions')) {
+ element = element.$parent;
+ }
- if (error) {
- return objectWithKey(name, error);
- }
- };
- }
+ return element;
+}
+/**
+ * @param {ModdleElement} container
+ *
+ * @return {ModdleElement}
+ */
+BpmnUpdater.prototype.getLaneSet = function(container) {
-// get, set and validate helpers ///////////////////
+ var laneSet, laneSets;
- /**
- * Return the value of the specified property descriptor,
- * on the passed diagram element.
- *
- * @param {djs.model.Base} element
- * @param {PropertyDescriptor} property
- *
- * @return {Any}
- */
- function getPropertyValue(element, property) {
+ // bpmn:Lane
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(container, 'bpmn:Lane')) {
+ laneSet = container.childLaneSet;
- var bo = getBusinessObject(element);
+ if (!laneSet) {
+ laneSet = this._bpmnFactory.create('bpmn:LaneSet');
+ container.childLaneSet = laneSet;
+ laneSet.$parent = container;
+ }
- var binding = property.binding,
- scope = property.scope;
+ return laneSet;
+ }
- var bindingType = binding.type,
- bindingName = binding.name;
+ // bpmn:Participant
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(container, 'bpmn:Participant')) {
+ container = container.processRef;
+ }
- var propertyValue = property.value || '';
+ // bpmn:FlowElementsContainer
+ laneSets = container.get('laneSets');
+ laneSet = laneSets[0];
- if (scope) {
- bo = findExtension(bo, scope.name);
- if (!bo) {
- return propertyValue;
- }
- }
+ if (!laneSet) {
+ laneSet = this._bpmnFactory.create('bpmn:LaneSet');
+ laneSet.$parent = container;
+ laneSets.push(laneSet);
+ }
- // property
- if (bindingType === 'property') {
+ return laneSet;
+};
- var value = bo.get(bindingName);
+/**
+ * @param {ModdleElement} businessObject
+ * @param {ModdleElement} newParent
+ * @param {ModdleElement} visualParent
+ */
+BpmnUpdater.prototype.updateSemanticParent = function(businessObject, newParent, visualParent) {
- if (bindingName === 'conditionExpression') {
- if (value) {
- return value.body;
- } else {
- // return defined default
- return propertyValue;
- }
- } else {
- // return value; default to defined default
- return typeof value !== 'undefined' ? value : propertyValue;
- }
- }
+ var containment,
+ translate = this._translate;
- var camundaProperties,
- camundaProperty;
+ if (businessObject.$parent === newParent) {
+ return;
+ }
- if (bindingType === CAMUNDA_PROPERTY_TYPE) {
- if (scope) {
- camundaProperties = bo.get('properties');
- } else {
- camundaProperties = findExtension(bo, 'camunda:Properties');
- }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:DataInput') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:DataOutput')) {
- if (camundaProperties) {
- camundaProperty = findCamundaProperty(camundaProperties, binding);
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(newParent, 'bpmn:Participant') && 'processRef' in newParent) {
+ newParent = newParent.processRef;
+ }
- if (camundaProperty) {
- return camundaProperty.value;
- }
- }
+ // already in correct ioSpecification
+ if ('ioSpecification' in newParent && newParent.ioSpecification === businessObject.$parent) {
+ return;
+ }
+ }
- return propertyValue;
- }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:Lane')) {
- var inputOutput,
- ioParameter;
+ if (newParent) {
+ newParent = this.getLaneSet(newParent);
+ }
- if (IO_BINDING_TYPES.indexOf(bindingType) !== -1) {
+ containment = 'lanes';
+ } else
- if (scope) {
- inputOutput = bo.get('inputOutput');
- } else {
- inputOutput = findExtension(bo, 'camunda:InputOutput');
- }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:FlowElement')) {
- if (!inputOutput) {
- // ioParameter cannot exist yet, return property value
- return propertyValue;
- }
- }
+ if (newParent) {
- // camunda input parameter
- if (bindingType === CAMUNDA_INPUT_PARAMETER_TYPE) {
- ioParameter = findInputParameter(inputOutput, binding);
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(newParent, 'bpmn:Participant')) {
+ newParent = newParent.processRef;
+ } else
- if (ioParameter) {
- if (binding.scriptFormat) {
- if (ioParameter.definition) {
- return ioParameter.definition.value;
- }
- } else {
- return ioParameter.value || '';
- }
- }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(newParent, 'bpmn:Lane')) {
+ do {
- return propertyValue;
- }
+ // unwrap Lane -> LaneSet -> (Lane | FlowElementsContainer)
+ newParent = newParent.$parent.$parent;
+ } while ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(newParent, 'bpmn:Lane'));
- // camunda output parameter
- if (binding.type === CAMUNDA_OUTPUT_PARAMETER_TYPE) {
- ioParameter = findOutputParameter(inputOutput, binding);
+ }
+ }
- if (ioParameter) {
- return ioParameter.name;
- }
+ containment = 'flowElements';
- return propertyValue;
- }
+ } else
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:Artifact')) {
- var ioElement;
+ while (newParent &&
+ !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(newParent, 'bpmn:Process') &&
+ !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(newParent, 'bpmn:SubProcess') &&
+ !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(newParent, 'bpmn:Collaboration')) {
- if (IN_OUT_BINDING_TYPES.indexOf(bindingType) != -1) {
- ioElement = findCamundaInOut(bo, binding);
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(newParent, 'bpmn:Participant')) {
+ newParent = newParent.processRef;
+ break;
+ } else {
+ newParent = newParent.$parent;
+ }
+ }
- if (ioElement) {
- if (bindingType === CAMUNDA_IN_BUSINESS_KEY_TYPE) {
- return ioElement.businessKey;
- } else
- if (bindingType === CAMUNDA_OUT_TYPE) {
- return ioElement.target;
- } else
- if (bindingType === CAMUNDA_IN_TYPE) {
- return ioElement[binding.expression ? 'sourceExpression' : 'source'];
- }
- }
+ containment = 'artifacts';
+ } else
- return propertyValue;
- }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:MessageFlow')) {
+ containment = 'messageFlows';
- if (bindingType === CAMUNDA_EXECUTION_LISTENER_TYPE) {
- var executionListener;
- if (scope) {
- executionListener = bo.get('executionListener');
- } else {
- executionListener = findExtension(bo, 'camunda:ExecutionListener');
- }
+ } else
- return executionListener.script.value;
- }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:Participant')) {
+ containment = 'participants';
- var fieldInjection;
- if (CAMUNDA_FIELD === bindingType) {
- var fieldInjections = findExtensions(bo, [ 'camunda:Field' ]);
- fieldInjections.forEach(function(item) {
- if (item.name === binding.name) {
- fieldInjection = item;
- }
- });
- if (fieldInjection) {
- return fieldInjection.string || fieldInjection.expression;
- } else {
- return '';
- }
- }
+ // make sure the participants process is properly attached / detached
+ // from the XML document
- throw unknownPropertyBinding(property);
- }
+ var process = businessObject.processRef,
+ definitions;
- module.exports.getPropertyValue = getPropertyValue;
+ if (process) {
+ definitions = getDefinitions(businessObject.$parent || newParent);
+ if (businessObject.$parent) {
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_8__.remove)(definitions.get('rootElements'), process);
+ process.$parent = null;
+ }
- /**
- * Return an update operation that changes the diagram
- * element's custom property to the given value.
- *
- * The response of this method will be processed via
- * {@link PropertiesPanel#applyChanges}.
- *
- * @param {djs.model.Base} element
- * @param {PropertyDescriptor} property
- * @param {String} value
- * @param {BpmnFactory} bpmnFactory
- *
- * @return {Object|Array} results to be processed
- */
- function setPropertyValue(element, property, value, bpmnFactory) {
- var bo = getBusinessObject(element);
+ if (newParent) {
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_8__.add)(definitions.get('rootElements'), process);
+ process.$parent = definitions;
+ }
+ }
+ } else
- var binding = property.binding,
- scope = property.scope;
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:DataOutputAssociation')) {
+ containment = 'dataOutputAssociations';
+ } else
- var bindingType = binding.type,
- bindingName = binding.name;
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:DataInputAssociation')) {
+ containment = 'dataInputAssociations';
+ }
- var propertyValue;
+ if (!containment) {
+ throw new Error(translate(
+ 'no parent for {element} in {parent}',
+ {
+ element: businessObject.id,
+ parent: newParent.id
+ }
+ ));
+ }
- var updates = [];
+ var children;
- var extensionElements;
+ if (businessObject.$parent) {
- if (EXTENSION_BINDING_TYPES.indexOf(bindingType) !== -1) {
- extensionElements = bo.get('extensionElements');
+ // remove from old parent
+ children = businessObject.$parent.get(containment);
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_8__.remove)(children, businessObject);
+ }
- // create extension elements, if they do not exist (yet)
- if (!extensionElements) {
- extensionElements = elementHelper.createElement('bpmn:ExtensionElements', null, element, bpmnFactory);
+ if (!newParent) {
+ businessObject.$parent = null;
+ } else {
- updates.push(cmdHelper.updateBusinessObject(
- element, bo, objectWithKey('extensionElements', extensionElements)
- ));
- }
- }
+ // add to new parent
+ children = newParent.get(containment);
+ children.push(businessObject);
+ businessObject.$parent = newParent;
+ }
- if (scope) {
- bo = findExtension(bo, scope.name);
- if (!bo) {
- bo = elementHelper.createElement(scope.name, null, element, bpmnFactory);
+ if (visualParent) {
+ var diChildren = visualParent.get(containment);
- updates.push(cmdHelper.addElementsTolist(
- bo, extensionElements, 'values', [ bo ]
- ));
- }
- }
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_8__.remove)(children, businessObject);
- // property
- if (bindingType === 'property') {
+ if (newParent) {
- if (bindingName === 'conditionExpression') {
+ if (!diChildren) {
+ diChildren = [];
+ newParent.set(containment, diChildren);
+ }
- propertyValue = elementHelper.createElement('bpmn:FormalExpression', {
- body: value,
- language: binding.scriptFormat
- }, bo, bpmnFactory);
- } else {
+ diChildren.push(businessObject);
+ }
+ }
+};
- var moddlePropertyDescriptor = bo.$descriptor.propertiesByName[bindingName];
+/**
+ * @param {Connection} connection
+ */
+BpmnUpdater.prototype.updateConnectionWaypoints = function(connection) {
+ var di = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getDi)(connection);
+
+ di.set('waypoint', this._bpmnFactory.createDiWaypoints(connection.waypoints));
+};
+
+/**
+ * @param { {
+ * connection: Connection;
+ * parent: Parent;
+ * newParent: Parent;
+ * } } context
+ */
+BpmnUpdater.prototype.updateConnection = function(context) {
+ var connection = context.connection,
+ businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(connection),
+ newSource = connection.source,
+ newSourceBo = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(newSource),
+ newTarget = connection.target,
+ newTargetBo = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(connection.target),
+ visualParent;
- var moddleType = moddlePropertyDescriptor.type;
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:DataAssociation')) {
- // make sure we only update String, Integer, Real and
- // Boolean properties (do not accidentally override complex objects...)
- if (BASIC_MODDLE_TYPES.indexOf(moddleType) === -1) {
- throw new Error('cannot set moddle type <' + moddleType + '>');
- }
+ var inverseSet = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:SequenceFlow');
- if (moddleType === 'Boolean') {
- propertyValue = !!value;
- } else
- if (moddleType === 'Integer') {
- propertyValue = parseInt(value, 10);
+ if (businessObject.sourceRef !== newSourceBo) {
+ if (inverseSet) {
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_8__.remove)(businessObject.sourceRef && businessObject.sourceRef.get('outgoing'), businessObject);
- if (isNaN(propertyValue)) {
- // do not write NaN value
- propertyValue = undefined;
- }
- } else {
- propertyValue = value;
- }
- }
+ if (newSourceBo && newSourceBo.get('outgoing')) {
+ newSourceBo.get('outgoing').push(businessObject);
+ }
+ }
- if (propertyValue !== undefined) {
- updates.push(cmdHelper.updateBusinessObject(
- element, bo, objectWithKey(bindingName, propertyValue)
- ));
- }
- }
+ businessObject.sourceRef = newSourceBo;
+ }
- // camunda:property
- var camundaProperties,
- existingCamundaProperty,
- newCamundaProperty;
+ if (businessObject.targetRef !== newTargetBo) {
+ if (inverseSet) {
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_8__.remove)(businessObject.targetRef && businessObject.targetRef.get('incoming'), businessObject);
- if (bindingType === CAMUNDA_PROPERTY_TYPE) {
+ if (newTargetBo && newTargetBo.get('incoming')) {
+ newTargetBo.get('incoming').push(businessObject);
+ }
+ }
- if (scope) {
- camundaProperties = bo.get('properties');
- } else {
- camundaProperties = findExtension(extensionElements, 'camunda:Properties');
- }
+ businessObject.targetRef = newTargetBo;
+ }
+ } else
- if (!camundaProperties) {
- camundaProperties = elementHelper.createElement('camunda:Properties', null, bo, bpmnFactory);
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:DataInputAssociation')) {
- if (scope) {
- updates.push(cmdHelper.updateBusinessObject(
- element, bo, { properties: camundaProperties }
- ));
- }
- else {
- updates.push(cmdHelper.addElementsTolist(
- element, extensionElements, 'values', [ camundaProperties ]
- ));
- }
- }
+ // handle obnoxious isMsome sourceRef
+ businessObject.get('sourceRef')[0] = newSourceBo;
- existingCamundaProperty = findCamundaProperty(camundaProperties, binding);
+ visualParent = context.parent || context.newParent || newTargetBo;
- newCamundaProperty = createCamundaProperty(binding, value, bpmnFactory);
+ this.updateSemanticParent(businessObject, newTargetBo, visualParent);
+ } else
- updates.push(cmdHelper.addAndRemoveElementsFromList(
- element,
- camundaProperties,
- 'values',
- null,
- [ newCamundaProperty ],
- existingCamundaProperty ? [ existingCamundaProperty ] : []
- ));
- }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:DataOutputAssociation')) {
+ visualParent = context.parent || context.newParent || newSourceBo;
- // camunda:inputParameter
- // camunda:outputParameter
- var inputOutput,
- existingIoParameter,
- newIoParameter;
+ this.updateSemanticParent(businessObject, newSourceBo, visualParent);
- if (IO_BINDING_TYPES.indexOf(bindingType) !== -1) {
+ // targetRef = new target
+ businessObject.targetRef = newTargetBo;
+ }
- if (scope) {
- inputOutput = bo.get('inputOutput');
- } else {
- inputOutput = findExtension(extensionElements, 'camunda:InputOutput');
- }
+ this.updateConnectionWaypoints(connection);
- // create inputOutput element, if it do not exist (yet)
- if (!inputOutput) {
- inputOutput = elementHelper.createElement('camunda:InputOutput', null, bo, bpmnFactory);
+ this.updateDiConnection(connection, newSource, newTarget);
+};
- if (scope) {
- updates.push(cmdHelper.updateBusinessObject(
- element, bo, { inputOutput: inputOutput }
- ));
- }
- else {
- updates.push(cmdHelper.addElementsTolist(
- element, extensionElements, 'values', inputOutput
- ));
- }
- }
- }
- if (bindingType === CAMUNDA_INPUT_PARAMETER_TYPE) {
+// helpers //////////////////////
- existingIoParameter = findInputParameter(inputOutput, binding);
+BpmnUpdater.prototype._getLabel = function(di) {
+ if (!di.label) {
+ di.label = this._bpmnFactory.createDiLabel();
+ }
- newIoParameter = createInputParameter(binding, value, bpmnFactory);
+ return di.label;
+};
- updates.push(cmdHelper.addAndRemoveElementsFromList(
- element,
- inputOutput,
- 'inputParameters',
- null,
- [ newIoParameter ],
- existingIoParameter ? [ existingIoParameter ] : []
- ));
- }
- if (bindingType === CAMUNDA_OUTPUT_PARAMETER_TYPE) {
+/**
+ * Call function if shape or connection is BPMN element.
+ *
+ * @param {Function} fn
+ *
+ * @return {Function}
+ */
+function ifBpmn(fn) {
- existingIoParameter = findOutputParameter(inputOutput, binding);
+ return function(event) {
- newIoParameter = createOutputParameter(binding, value, bpmnFactory);
+ var context = event.context,
+ element = context.shape || context.connection || context.element;
- updates.push(cmdHelper.addAndRemoveElementsFromList(
- element,
- inputOutput,
- 'outputParameters',
- null,
- [ newIoParameter ],
- existingIoParameter ? [ existingIoParameter ] : []
- ));
- }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(element, 'bpmn:BaseElement')) {
+ fn(event);
+ }
+ };
+}
+/**
+ * Return dc:Bounds of bpmndi:BPMNLabel if exists.
+ *
+ * @param {Shape} shape
+ *
+ * @return {ModdleElement|undefined}
+ */
+function getEmbeddedLabelBounds(shape) {
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:Activity')) {
+ return;
+ }
- // camunda:in
- // camunda:out
- // camunda:in:businessKey
- var existingInOut,
- newInOut;
+ var di = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getDi)(shape);
- if (IN_OUT_BINDING_TYPES.indexOf(bindingType) !== -1) {
+ if (!di) {
+ return;
+ }
- existingInOut = findCamundaInOut(bo, binding);
+ var label = di.get('label');
- if (bindingType === CAMUNDA_IN_TYPE) {
- newInOut = createCamundaIn(binding, value, bpmnFactory);
- } else
- if (bindingType === CAMUNDA_OUT_TYPE) {
- newInOut = createCamundaOut(binding, value, bpmnFactory);
- } else {
- newInOut = createCamundaInWithBusinessKey(binding, value, bpmnFactory);
- }
+ if (!label) {
+ return;
+ }
- updates.push(cmdHelper.addAndRemoveElementsFromList(
- element,
- extensionElements,
- 'values',
- null,
- [ newInOut ],
- existingInOut ? [ existingInOut ] : []
- ));
- }
-
- if (bindingType === CAMUNDA_FIELD) {
- var existingFieldInjections = findExtensions(bo, [ 'camunda:Field' ]);
- var newFieldInjections = [];
-
- if (existingFieldInjections.length > 0) {
- existingFieldInjections.forEach(function(item) {
- if (item.name === binding.name) {
- newFieldInjections.push(createCamundaFieldInjection(binding, value, bpmnFactory));
- } else {
- newFieldInjections.push(item);
- }
- });
- } else {
- newFieldInjections.push(createCamundaFieldInjection(binding, value, bpmnFactory));
- }
+ return label.get('bounds');
+}
- updates.push(cmdHelper.addAndRemoveElementsFromList(
- element,
- extensionElements,
- 'values',
- null,
- newFieldInjections,
- existingFieldInjections ? existingFieldInjections : []
- ));
- }
+/***/ }),
- if (updates.length) {
- return updates;
- }
+/***/ "../node_modules/bpmn-js/lib/features/modeling/ElementFactory.js":
+/*!***********************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/ElementFactory.js ***!
+ \***********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- // quick warning for better debugging
- console.warn('no update', element, property, value);
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ ElementFactory)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../modeling/util/ModelingUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
+/* harmony import */ var diagram_js_lib_core_ElementFactory__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/core/ElementFactory */ "../node_modules/diagram-js/lib/core/ElementFactory.js");
+/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/LabelUtil */ "../node_modules/bpmn-js/lib/util/LabelUtil.js");
+/* harmony import */ var _util_CompatibilityUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/CompatibilityUtil */ "../node_modules/bpmn-js/lib/util/CompatibilityUtil.js");
- module.exports.setPropertyValue = setPropertyValue;
- /**
- * Validate value of a given property.
- *
- * @param {String} value
- * @param {PropertyDescriptor} property
- * @param {Function} translate
- *
- * @return {Object} with validation errors
- */
- function validateValue(value, property, translate) {
- var constraints = property.constraints || {};
- if (constraints.notEmpty && isEmpty(value)) {
- return translate('Must not be empty');
- }
- if (constraints.maxLength && value.length > constraints.maxLength) {
- return translate('Must have max length {length}', { length: constraints.maxLength });
- }
- if (constraints.minLength && value.length < constraints.minLength) {
- return translate('Must have min length {length}', { length: constraints.minLength });
- }
- var pattern = constraints.pattern,
- message;
- if (pattern) {
- if (typeof pattern !== 'string') {
- message = pattern.message;
- pattern = pattern.value;
- }
- if (!matchesPattern(value, pattern)) {
- return message || translate('Must match pattern {pattern}', { pattern: pattern });
- }
- }
- }
-// misc helpers ///////////////////////////////
- function propertyWithScope(property, scopeName) {
- if (!scopeName) {
- return property;
- }
- return assign({}, property, {
- scope: {
- name: scopeName
- }
- });
- }
- /**
- * Return an object with a single key -> value association.
- *
- * @param {String} key
- * @param {Any} value
- *
- * @return {Object}
- */
- function objectWithKey(key, value) {
- var obj = {};
- obj[key] = value;
+/**
+ * @typedef {import('diagram-js/lib/i18n/translate/translate').default} Translate
+ *
+ * @typedef {import('diagram-js/lib/util/Types').Dimensions} Dimensions
+ *
+ * @typedef {import('./BpmnFactory').default} BpmnFactory
+ *
+ * @typedef {import('../../model/Types').BpmnAttributes} BpmnAttributes
+ * @typedef {import('../../model/Types').Connection} Connection
+ * @typedef {import('../../model/Types').Element} Element
+ * @typedef {import('../../model/Types').Label} Label
+ * @typedef {import('../../model/Types').Root} Root
+ * @typedef {import('../../model/Types').Shape} Shape
+ * @typedef {import('../../model/Types').Moddle} Moddle
+ * @typedef {import('../../model/Types').ModdleElement} ModdleElement
+ */
- return obj;
- }
+/**
+ * A BPMN-specific element factory.
+ *
+ * @template {Connection} [T=Connection]
+ * @template {Label} [U=Label]
+ * @template {Root} [V=Root]
+ * @template {Shape} [W=Shape]
+ *
+ * @extends {BaseElementFactory}
+ *
+ * @param {BpmnFactory} bpmnFactory
+ * @param {Moddle} moddle
+ * @param {Translate} translate
+ */
+function ElementFactory(bpmnFactory, moddle, translate) {
+ diagram_js_lib_core_ElementFactory__WEBPACK_IMPORTED_MODULE_0__["default"].call(this);
- /**
- * Does the given string match the specified pattern?
- *
- * @param {String} str
- * @param {String} pattern
- *
- * @return {Boolean}
- */
- function matchesPattern(str, pattern) {
- var regexp = new RegExp(pattern);
+ this._bpmnFactory = bpmnFactory;
+ this._moddle = moddle;
+ this._translate = translate;
+}
- return regexp.test(str);
- }
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_1__["default"])(ElementFactory, diagram_js_lib_core_ElementFactory__WEBPACK_IMPORTED_MODULE_0__["default"]);
- function isEmpty(str) {
- return !str || /^\s*$/.test(str);
- }
+ElementFactory.$inject = [
+ 'bpmnFactory',
+ 'moddle',
+ 'translate'
+];
- /**
- * Create a new {@link Error} indicating an unknown
- * property binding.
- *
- * @param {PropertyDescriptor} property
- *
- * @return {Error}
- */
- function unknownPropertyBinding(property) {
- var binding = property.binding;
+ElementFactory.prototype._baseCreate = diagram_js_lib_core_ElementFactory__WEBPACK_IMPORTED_MODULE_0__["default"].prototype.create;
- return new Error('unknown binding: <' + binding.type + '>');
- }
+/**
+ * Create a root element.
+ *
+ * @overlord
+ * @param {'root'} elementType
+ * @param {Partial & Partial} [attrs]
+ * @return {V}
+ */
- },{"../../../../factory/EntryFactory":14,"../../../../helper/CmdHelper":25,"../../../../helper/ElementHelper":26,"../CreateHelper":52,"../Helper":56,"bpmn-js/lib/util/ModelUtil":240,"lodash/assign":604}],63:[function(require,module,exports){
- module.exports = {
- __depends__: [
- require('./element-templates'),
- require('diagram-js/lib/i18n/translate').default
- ],
- __init__: [ 'propertiesProvider' ],
- propertiesProvider: [ 'type', require('./CamundaPropertiesProvider') ]
- };
+/**
+ * Create a shape.
+ *
+ * @overlord
+ * @param {'shape'} elementType
+ * @param {Partial & Partial} [attrs]
+ * @return {W}
+ */
- },{"./CamundaPropertiesProvider":51,"./element-templates":60,"diagram-js/lib/i18n/translate":401}],64:[function(require,module,exports){
- 'use strict';
+/**
+ * Create a connection.
+ *
+ * @overlord
+ * @param {'connection'} elementType
+ * @param {Partial & Partial} [attrs]
+ * @return {T}
+ */
- var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject,
- is = require('bpmn-js/lib/util/ModelUtil').is,
- asyncContinuation = require('./implementation/AsyncContinuation');
+/**
+ * Create a label.
+ *
+ * @param {'label'} elementType
+ * @param {Partial & Partial} [attrs]
+ * @return {U}
+ */
+ElementFactory.prototype.create = function(elementType, attrs) {
- module.exports = function(group, element, bpmnFactory, translate) {
+ // no special magic for labels,
+ // we assume their businessObjects have already been created
+ // and wired via attrs
+ if (elementType === 'label') {
+ var di = attrs.di || this._bpmnFactory.createDiLabel();
+ return this._baseCreate(elementType, (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({ type: 'label', di: di }, _util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_LABEL_SIZE, attrs));
+ }
- if (is(element, 'camunda:AsyncCapable')) {
+ return this.createElement(elementType, attrs);
+};
- group.entries = group.entries.concat(asyncContinuation(element, bpmnFactory, {
- getBusinessObject: getBusinessObject
- }, translate));
+/**
+ * Create a BPMN root element.
+ *
+ * @overlord
+ * @param {'root'} elementType
+ * @param {Partial & Partial} [attrs]
+ * @return {V}
+ */
- }
- };
- },{"./implementation/AsyncContinuation":91,"bpmn-js/lib/util/ModelUtil":240}],65:[function(require,module,exports){
- 'use strict';
+/**
+ * Create a BPMN shape.
+ *
+ * @overlord
+ * @param {'shape'} elementType
+ * @param {Partial & Partial} [attrs]
+ * @return {W}
+ */
- var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject,
- is = require('bpmn-js/lib/util/ModelUtil').is;
+/**
+ * Create a BPMN connection.
+ *
+ * @param {'connection'} elementType
+ * @param {Partial & Partial} [attrs]
+ * @return {T}
+ */
+ElementFactory.prototype.createElement = function(elementType, attrs) {
+ var size,
+ translate = this._translate;
+
+ attrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({}, attrs || {});
+
+ var businessObject = attrs.businessObject,
+ di = attrs.di;
+
+ if (!businessObject) {
+ if (!attrs.type) {
+ throw new Error(translate('no shape type specified'));
+ }
+
+ businessObject = this._bpmnFactory.create(attrs.type);
+
+ (0,_util_CompatibilityUtil__WEBPACK_IMPORTED_MODULE_4__.ensureCompatDiRef)(businessObject);
+ }
+
+ if (!isModdleDi(di)) {
+ var diAttrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(
+ {},
+ di || {},
+ { id: businessObject.id + '_di' }
+ );
+
+ if (elementType === 'root') {
+ di = this._bpmnFactory.createDiPlane(businessObject, diAttrs);
+ } else
+ if (elementType === 'connection') {
+ di = this._bpmnFactory.createDiEdge(businessObject, diAttrs);
+ } else {
+ di = this._bpmnFactory.createDiShape(businessObject, diAttrs);
+ }
+ }
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_5__.is)(businessObject, 'bpmn:Group')) {
+ attrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({
+ isFrame: true
+ }, attrs);
+ }
+
+ attrs = applyAttributes(businessObject, attrs, [
+ 'processRef',
+ 'isInterrupting',
+ 'associationDirection',
+ 'isForCompensation'
+ ]);
+
+ if (attrs.isExpanded) {
+ attrs = applyAttribute(di, attrs, 'isExpanded');
+ }
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_5__.isAny)(businessObject, [ 'bpmn:Lane', 'bpmn:Participant' ])) {
+ attrs = applyAttribute(di, attrs, 'isHorizontal');
+ }
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_5__.is)(businessObject, 'bpmn:SubProcess')) {
+ attrs.collapsed = !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_6__.isExpanded)(businessObject, di);
+ }
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_5__.is)(businessObject, 'bpmn:ExclusiveGateway')) {
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_2__.has)(di, 'isMarkerVisible')) {
+ if (di.isMarkerVisible === undefined) {
+ di.isMarkerVisible = false;
+ }
+ } else {
+ di.isMarkerVisible = true;
+ }
+ }
+
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_2__.isDefined)(attrs.triggeredByEvent)) {
+ businessObject.triggeredByEvent = attrs.triggeredByEvent;
+ delete attrs.triggeredByEvent;
+ }
+
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_2__.isDefined)(attrs.cancelActivity)) {
+ businessObject.cancelActivity = attrs.cancelActivity;
+ delete attrs.cancelActivity;
+ }
+
+ var eventDefinitions,
+ newEventDefinition;
+
+ if (attrs.eventDefinitionType) {
+ eventDefinitions = businessObject.get('eventDefinitions') || [];
+ newEventDefinition = this._bpmnFactory.create(attrs.eventDefinitionType, attrs.eventDefinitionAttrs);
+
+ if (attrs.eventDefinitionType === 'bpmn:ConditionalEventDefinition') {
+ newEventDefinition.condition = this._bpmnFactory.create('bpmn:FormalExpression');
+ }
+
+ eventDefinitions.push(newEventDefinition);
+
+ newEventDefinition.$parent = businessObject;
+ businessObject.eventDefinitions = eventDefinitions;
+
+ delete attrs.eventDefinitionType;
+ }
+
+ size = this.getDefaultSize(businessObject, di);
+
+ attrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({
+ id: businessObject.id
+ }, size, attrs, {
+ businessObject: businessObject,
+ di: di
+ });
+
+ return this._baseCreate(elementType, attrs);
+};
+
+/**
+ * Get the default size of a diagram element.
+ *
+ * @param {Element} element The element.
+ * @param {ModdleElement} di The DI.
+ *
+ * @return {Dimensions} Default width and height of the element.
+ */
+ElementFactory.prototype.getDefaultSize = function(element, di) {
- var entryFactory = require('../../../factory/EntryFactory');
+ var bo = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_5__.getBusinessObject)(element);
+ di = di || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_5__.getDi)(element);
- var callable = require('./implementation/Callable');
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_5__.is)(bo, 'bpmn:SubProcess')) {
+ if ((0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_6__.isExpanded)(bo, di)) {
+ return { width: 350, height: 200 };
+ } else {
+ return { width: 100, height: 80 };
+ }
+ }
- var cmdHelper = require('../../../helper/CmdHelper');
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_5__.is)(bo, 'bpmn:Task')) {
+ return { width: 100, height: 80 };
+ }
- var flattenDeep = require('lodash/flattenDeep');
- var assign = require('lodash/assign');
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_5__.is)(bo, 'bpmn:Gateway')) {
+ return { width: 50, height: 50 };
+ }
- function getCallableType(element) {
- var bo = getBusinessObject(element);
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_5__.is)(bo, 'bpmn:Event')) {
+ return { width: 36, height: 36 };
+ }
- var boCalledElement = bo.get('calledElement'),
- boCaseRef = bo.get('camunda:caseRef');
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_5__.is)(bo, 'bpmn:Participant')) {
+ if ((0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_6__.isExpanded)(bo, di)) {
+ return { width: 600, height: 250 };
+ } else {
+ return { width: 400, height: 60 };
+ }
+ }
- var callActivityType = '';
- if (typeof boCalledElement !== 'undefined') {
- callActivityType = 'bpmn';
- } else
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_5__.is)(bo, 'bpmn:Lane')) {
+ return { width: 400, height: 100 };
+ }
- if (typeof boCaseRef !== 'undefined') {
- callActivityType = 'cmmn';
- }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_5__.is)(bo, 'bpmn:DataObjectReference')) {
+ return { width: 36, height: 50 };
+ }
- return callActivityType;
- }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_5__.is)(bo, 'bpmn:DataStoreReference')) {
+ return { width: 50, height: 50 };
+ }
- var DEFAULT_PROPS = {
- calledElement: undefined,
- 'camunda:calledElementBinding': 'latest',
- 'camunda:calledElementVersion': undefined,
- 'camunda:calledElementTenantId': undefined,
- 'camunda:variableMappingClass' : undefined,
- 'camunda:variableMappingDelegateExpression' : undefined,
- 'camunda:caseRef': undefined,
- 'camunda:caseBinding': 'latest',
- 'camunda:caseVersion': undefined,
- 'camunda:caseTenantId': undefined
- };
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_5__.is)(bo, 'bpmn:TextAnnotation')) {
+ return { width: 100, height: 30 };
+ }
- module.exports = function(group, element, bpmnFactory, translate) {
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_5__.is)(bo, 'bpmn:Group')) {
+ return { width: 300, height: 300 };
+ }
- if (!is(element, 'camunda:CallActivity')) {
- return;
- }
+ return { width: 100, height: 80 };
+};
- group.entries.push(entryFactory.selectBox({
- id : 'callActivity',
- label: translate('CallActivity Type'),
- selectOptions: [
- { name: 'BPMN', value: 'bpmn' },
- { name: 'CMMN', value: 'cmmn' }
- ],
- emptyParameter: true,
- modelProperty: 'callActivityType',
-
- get: function(element, node) {
- return {
- callActivityType: getCallableType(element)
- };
- },
- set: function(element, values, node) {
- var type = values.callActivityType;
+/**
+ * Create participant.
+ *
+ * @param {boolean|Partial & Partial} [attrs]
+ * Attributes or whether the participant is expanded.
+ *
+ * @return {W} The created participant.
+ */
+ElementFactory.prototype.createParticipantShape = function(attrs) {
- var props = assign({}, DEFAULT_PROPS);
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_2__.isObject)(attrs)) {
+ attrs = { isExpanded: attrs };
+ }
- if (type === 'bpmn') {
- props.calledElement = '';
- }
- else if (type === 'cmmn') {
- props['camunda:caseRef'] = '';
- }
+ attrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({ type: 'bpmn:Participant' }, attrs || {});
- return cmdHelper.updateProperties(element, props);
- }
+ // participants are expanded by default
+ if (attrs.isExpanded !== false) {
+ attrs.processRef = this._bpmnFactory.create('bpmn:Process');
+ }
- }));
+ return this.createShape(attrs);
+};
- group.entries.push(callable(element, bpmnFactory, {
- getCallableType: getCallableType
- }, translate));
- group.entries = flattenDeep(group.entries);
- };
+// helpers //////////////////////
- },{"../../../factory/EntryFactory":14,"../../../helper/CmdHelper":25,"./implementation/Callable":92,"bpmn-js/lib/util/ModelUtil":240,"lodash/assign":604,"lodash/flattenDeep":612}],66:[function(require,module,exports){
- 'use strict';
+/**
+ * Apply attributes from a map to the given element, remove attribute from the
+ * map on application.
+ *
+ * @param {Element} element
+ * @param {Object} attrs (in/out map of attributes)
+ * @param {string[]} attributeNames name of attributes to apply
+ *
+ * @return {Object} changed attrs
+ */
+function applyAttributes(element, attrs, attributeNames) {
- var is = require('bpmn-js/lib/util/ModelUtil').is,
- getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject;
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(attributeNames, function(property) {
+ attrs = applyAttribute(element, attrs, property);
+ });
- var candidateStarter = require('./implementation/CandidateStarter');
+ return attrs;
+}
- module.exports = function(group, element, bpmnFactory, translate) {
- var businessObject = getBusinessObject(element);
+/**
+ * Apply named property to element and drain it from the attrs collection.
+ *
+ * @param {Element} element
+ * @param {Object} attrs (in/out map of attributes)
+ * @param {string} attributeName to apply
+ *
+ * @return {Object} changed attrs
+ */
+function applyAttribute(element, attrs, attributeName) {
+ if (attrs[attributeName] === undefined) {
+ return attrs;
+ }
- if (is(element, 'camunda:Process') ||
- is(element, 'bpmn:Participant') && businessObject.get('processRef')) {
+ element[attributeName] = attrs[attributeName];
- group.entries = group.entries.concat(candidateStarter(element, bpmnFactory, {
- getBusinessObject: function(element) {
- var bo = getBusinessObject(element);
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.omit)(attrs, [ attributeName ]);
+}
- if (!is(bo, 'bpmn:Participant')) {
- return bo;
- }
+/**
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function isModdleDi(element) {
+ return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_5__.isAny)(element, [
+ 'bpmndi:BPMNShape',
+ 'bpmndi:BPMNEdge',
+ 'bpmndi:BPMNDiagram',
+ 'bpmndi:BPMNPlane',
+ ]);
+}
- return bo.get('processRef');
- }
- }, translate));
- }
- };
+/***/ }),
- },{"./implementation/CandidateStarter":93,"bpmn-js/lib/util/ModelUtil":240}],67:[function(require,module,exports){
- 'use strict';
+/***/ "../node_modules/bpmn-js/lib/features/modeling/Modeling.js":
+/*!*****************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/Modeling.js ***!
+ \*****************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var is = require('bpmn-js/lib/util/ModelUtil').is,
- isAny = require('bpmn-js/lib/features/modeling/util/ModelingUtil').isAny,
- getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject,
- escapeHTML = require('../../../Utils').escapeHTML,
- domQuery = require('min-dom').query,
- cmdHelper = require('../../../helper/CmdHelper'),
- elementHelper = require('../../../helper/ElementHelper'),
- eventDefinitionHelper = require('../../../helper/EventDefinitionHelper'),
- scriptImplementation = require('./implementation/Script');
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ Modeling)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_features_modeling_Modeling__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/modeling/Modeling */ "../node_modules/diagram-js/lib/features/modeling/Modeling.js");
+/* harmony import */ var _cmd_UpdateModdlePropertiesHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cmd/UpdateModdlePropertiesHandler */ "../node_modules/bpmn-js/lib/features/modeling/cmd/UpdateModdlePropertiesHandler.js");
+/* harmony import */ var _cmd_UpdatePropertiesHandler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cmd/UpdatePropertiesHandler */ "../node_modules/bpmn-js/lib/features/modeling/cmd/UpdatePropertiesHandler.js");
+/* harmony import */ var _cmd_UpdateCanvasRootHandler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cmd/UpdateCanvasRootHandler */ "../node_modules/bpmn-js/lib/features/modeling/cmd/UpdateCanvasRootHandler.js");
+/* harmony import */ var _cmd_AddLaneHandler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cmd/AddLaneHandler */ "../node_modules/bpmn-js/lib/features/modeling/cmd/AddLaneHandler.js");
+/* harmony import */ var _cmd_SplitLaneHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./cmd/SplitLaneHandler */ "../node_modules/bpmn-js/lib/features/modeling/cmd/SplitLaneHandler.js");
+/* harmony import */ var _cmd_ResizeLaneHandler__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./cmd/ResizeLaneHandler */ "../node_modules/bpmn-js/lib/features/modeling/cmd/ResizeLaneHandler.js");
+/* harmony import */ var _cmd_UpdateFlowNodeRefsHandler__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./cmd/UpdateFlowNodeRefsHandler */ "../node_modules/bpmn-js/lib/features/modeling/cmd/UpdateFlowNodeRefsHandler.js");
+/* harmony import */ var _cmd_IdClaimHandler__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./cmd/IdClaimHandler */ "../node_modules/bpmn-js/lib/features/modeling/cmd/IdClaimHandler.js");
+/* harmony import */ var _cmd_SetColorHandler__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./cmd/SetColorHandler */ "../node_modules/bpmn-js/lib/features/modeling/cmd/SetColorHandler.js");
+/* harmony import */ var _label_editing_cmd_UpdateLabelHandler__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../label-editing/cmd/UpdateLabelHandler */ "../node_modules/bpmn-js/lib/features/label-editing/cmd/UpdateLabelHandler.js");
- module.exports = function(group, element, bpmnFactory, translate) {
- var bo = getBusinessObject(element);
- if (!bo) {
- return;
- }
- var conditionalEventDefinition = eventDefinitionHelper.getConditionalEventDefinition(element);
- if (!(is(element, 'bpmn:SequenceFlow') && isConditionalSource(element.source))
- && !conditionalEventDefinition) {
- return;
- }
- var script = scriptImplementation('language', 'body', true, translate);
- group.entries.push({
- id: 'condition',
- label: translate('Condition'),
- html: '' +
- '
'+ escapeHTML(translate('Condition Type')) + ' ' +
- '
' +
- '' +
- ''+ escapeHTML(translate('Expression')) + ' ' +
- ''+ escapeHTML(translate('Script')) + ' ' +
- ' ' +
- ' ' +
- '
' +
- '
' +
-
- // expression
- '' +
- '
' + escapeHTML(translate('Expression')) + ' ' +
- '
' +
- ' ' +
- '' +
- 'X ' +
- ' ' +
- '
' +
- '
' +
- script.template +
- '
' +
- '
',
-
- get: function(element, propertyName) {
- var conditionalEventDefinition = eventDefinitionHelper.getConditionalEventDefinition(element);
-
- var conditionExpression = conditionalEventDefinition
- ? conditionalEventDefinition.condition
- : bo.conditionExpression;
-
- var values = {},
- conditionType = '';
-
- if (conditionExpression) {
- var conditionLanguage = conditionExpression.language;
- if (typeof conditionLanguage !== 'undefined') {
- conditionType = 'script';
- values = script.get(element, conditionExpression);
- } else {
- conditionType = 'expression';
- values.condition = conditionExpression.get('body');
- }
- }
- values.conditionType = conditionType;
- return values;
- },
- set: function(element, values, containerElement) {
- var conditionType = values.conditionType;
- var commands = [];
- var conditionProps = {
- body: undefined
- };
- if (conditionType === 'script') {
- conditionProps = script.set(element, values, containerElement);
- } else {
- var condition = values.condition;
- conditionProps.body = condition;
- }
- var conditionOrConditionExpression;
- if (conditionType) {
- conditionOrConditionExpression = elementHelper.createElement(
- 'bpmn:FormalExpression',
- conditionProps,
- conditionalEventDefinition || bo,
- bpmnFactory
- );
- var source = element.source;
+/**
+ * @typedef {import('../rules/BpmnRules').default} BpmnRules
+ * @typedef {import('diagram-js/lib/command/CommandStack').default} CommandStack
+ * @typedef {import('./ElementFactory').default} ElementFactory
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ *
+ * @typedef {import('diagram-js/lib/features/modeling/Modeling').ModelingHints} ModelingHints
+ *
+ * @typedef {import('../../model/Types').Connection} Connection
+ * @typedef {import('../../model/Types').Element} Element
+ * @typedef {import('../../model/Types').Label} Label
+ * @typedef {import('../../model/Types').Parent} Parent
+ * @typedef {import('../../model/Types').Root} Root
+ * @typedef {import('../../model/Types').Shape} Shape
+ * @typedef {import('../../model/Types').ModdleElement} ModdleElement
+ *
+ * @typedef {import('diagram-js/lib/util/Types').Rect} Rect
+ *
+ * @typedef {import('../../util/Types').Colors} Colors
+ *
+ * @typedef { {
+ * removeShape?: boolean;
+ * } } UpdateLabelHints
+ */
- // if default-flow, remove default-property from source
- if (source && source.businessObject.default === bo) {
- commands.push(cmdHelper.updateProperties(source, { 'default': undefined }));
- }
- }
+/**
+ * The BPMN 2.0 modeling entry point.
+ *
+ * @template {Connection} [T=Connection]
+ * @template {Element} [U=Element]
+ * @template {Label} [V=Label]
+ * @template {Parent} [W=Parent]
+ * @template {Shape} [X=Shape]
+ *
+ * @extends {BaseModeling}
+ *
+ * @param {EventBus} eventBus
+ * @param {ElementFactory} elementFactory
+ * @param {CommandStack} commandStack
+ * @param {BpmnRules} bpmnRules
+ */
+function Modeling(
+ eventBus,
+ elementFactory,
+ commandStack,
+ bpmnRules
+) {
+
+ diagram_js_lib_features_modeling_Modeling__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus, elementFactory, commandStack);
+
+ this._bpmnRules = bpmnRules;
+}
+
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_1__["default"])(Modeling, diagram_js_lib_features_modeling_Modeling__WEBPACK_IMPORTED_MODULE_0__["default"]);
+
+Modeling.$inject = [
+ 'eventBus',
+ 'elementFactory',
+ 'commandStack',
+ 'bpmnRules'
+];
+
+
+Modeling.prototype.getHandlers = function() {
+ var handlers = diagram_js_lib_features_modeling_Modeling__WEBPACK_IMPORTED_MODULE_0__["default"].prototype.getHandlers.call(this);
+
+ handlers['element.updateModdleProperties'] = _cmd_UpdateModdlePropertiesHandler__WEBPACK_IMPORTED_MODULE_2__["default"];
+ handlers['element.updateProperties'] = _cmd_UpdatePropertiesHandler__WEBPACK_IMPORTED_MODULE_3__["default"];
+ handlers['canvas.updateRoot'] = _cmd_UpdateCanvasRootHandler__WEBPACK_IMPORTED_MODULE_4__["default"];
+ handlers['lane.add'] = _cmd_AddLaneHandler__WEBPACK_IMPORTED_MODULE_5__["default"];
+ handlers['lane.resize'] = _cmd_ResizeLaneHandler__WEBPACK_IMPORTED_MODULE_6__["default"];
+ handlers['lane.split'] = _cmd_SplitLaneHandler__WEBPACK_IMPORTED_MODULE_7__["default"];
+ handlers['lane.updateRefs'] = _cmd_UpdateFlowNodeRefsHandler__WEBPACK_IMPORTED_MODULE_8__["default"];
+ handlers['id.updateClaim'] = _cmd_IdClaimHandler__WEBPACK_IMPORTED_MODULE_9__["default"];
+ handlers['element.setColor'] = _cmd_SetColorHandler__WEBPACK_IMPORTED_MODULE_10__["default"];
+ handlers['element.updateLabel'] = _label_editing_cmd_UpdateLabelHandler__WEBPACK_IMPORTED_MODULE_11__["default"];
+
+ return handlers;
+};
+
+/**
+ * Update an element's label.
+ *
+ * @param {Element} element The element.
+ * @param {string} newLabel The new label.
+ * @param {Rect} [newBounds] The optional bounds of the label.
+ * @param {UpdateLabelHints} [hints] The optional hints.
+ */
+Modeling.prototype.updateLabel = function(element, newLabel, newBounds, hints) {
+ this._commandStack.execute('element.updateLabel', {
+ element: element,
+ newLabel: newLabel,
+ newBounds: newBounds,
+ hints: hints || {}
+ });
+};
+
+/**
+ * @param {Element} source
+ * @param {Element} target
+ * @param {Partial} attrs
+ * @param {ModelingHints} [hints]
+ *
+ * @return {T}
+ */
+Modeling.prototype.connect = function(source, target, attrs, hints) {
- var update = conditionalEventDefinition
- ? { condition: conditionOrConditionExpression }
- : { conditionExpression: conditionOrConditionExpression };
+ var bpmnRules = this._bpmnRules;
- commands.push(cmdHelper.updateBusinessObject(element, conditionalEventDefinition || bo, update));
+ if (!attrs) {
+ attrs = bpmnRules.canConnect(source, target);
+ }
- return commands;
- },
+ if (!attrs) {
+ return;
+ }
- validate: function(element, values) {
- var validationResult = {};
+ return this.createConnection(source, target, attrs, source.parent, hints);
+};
- if (!values.condition && values.conditionType === 'expression') {
- validationResult.condition = translate('Must provide a value');
- }
- else if (values.conditionType === 'script') {
- validationResult = script.validate(element, values);
- }
+/**
+ * Update a model element's properties.
+ *
+ * @param {Element} element The element.
+ * @param {ModdleElement} moddleElement The model element.
+ * @param {Object} properties The updated properties.
+ */
+Modeling.prototype.updateModdleProperties = function(element, moddleElement, properties) {
+ this._commandStack.execute('element.updateModdleProperties', {
+ element: element,
+ moddleElement: moddleElement,
+ properties: properties
+ });
+};
+
+/**
+ * Update an element's properties.
+ *
+ * @param {Element} element The element.
+ * @param {Object} properties The updated properties.
+ */
+Modeling.prototype.updateProperties = function(element, properties) {
+ this._commandStack.execute('element.updateProperties', {
+ element: element,
+ properties: properties
+ });
+};
+
+/**
+ * Resize a lane.
+ *
+ * @param {Shape} laneShape The lane.
+ * @param {Rect} newBounds The new bounds of the lane.
+ * @param {boolean} [balanced] Wether to resize neighboring lanes.
+ */
+Modeling.prototype.resizeLane = function(laneShape, newBounds, balanced) {
+ this._commandStack.execute('lane.resize', {
+ shape: laneShape,
+ newBounds: newBounds,
+ balanced: balanced
+ });
+};
+
+/**
+ * Add a lane.
+ *
+ * @param {Shape} targetLaneShape The shape to add the lane to.
+ * @param {string} location The location.
+ *
+ * @return {Shape} The added lane.
+ */
+Modeling.prototype.addLane = function(targetLaneShape, location) {
+ var context = {
+ shape: targetLaneShape,
+ location: location
+ };
- return validationResult;
- },
+ this._commandStack.execute('lane.add', context);
- isExpression: function(element, inputNode) {
- var conditionType = domQuery('select[name=conditionType]', inputNode);
- if (conditionType.selectedIndex >= 0) {
- return conditionType.options[conditionType.selectedIndex].value === 'expression';
- }
- },
+ return context.newLane;
+};
- isScript: function(element, inputNode) {
- var conditionType = domQuery('select[name=conditionType]', inputNode);
- if (conditionType.selectedIndex >= 0) {
- return conditionType.options[conditionType.selectedIndex].value === 'script';
- }
- },
+/**
+ * Split a lane.
+ *
+ * @param {Shape} targetLane The lane to split.
+ * @param {number} count The number of lanes to split the lane into. Must not
+ * exceed the number of existing lanes.
+ */
+Modeling.prototype.splitLane = function(targetLane, count) {
+ this._commandStack.execute('lane.split', {
+ shape: targetLane,
+ count: count
+ });
+};
+
+/**
+ * Turn a process into a collaboration.
+ *
+ * @return {Root} The root of the collaboration.
+ */
+Modeling.prototype.makeCollaboration = function() {
- clear: function(element, inputNode) {
- // clear text input
- domQuery('input[name=condition]', inputNode).value='';
+ var collaborationElement = this._create('root', {
+ type: 'bpmn:Collaboration'
+ });
- return true;
- },
+ var context = {
+ newRoot: collaborationElement
+ };
- canClear: function(element, inputNode) {
- var input = domQuery('input[name=condition]', inputNode);
+ this._commandStack.execute('canvas.updateRoot', context);
- return input.value !== '';
- },
+ return collaborationElement;
+};
- script : script,
+/**
+ * Transform a collaboration into a process.
+ *
+ * @return {Root} The root of the process.
+ */
+Modeling.prototype.makeProcess = function() {
- cssClasses: [ 'bpp-textfield' ]
- });
- };
+ var processElement = this._create('root', {
+ type: 'bpmn:Process'
+ });
+ var context = {
+ newRoot: processElement
+ };
-// utilities //////////////////////////
+ this._commandStack.execute('canvas.updateRoot', context);
+};
- var CONDITIONAL_SOURCES = [
- 'bpmn:Activity',
- 'bpmn:ExclusiveGateway',
- 'bpmn:InclusiveGateway',
- 'bpmn:ComplexGateway'
- ];
+/**
+ * Update the referenced lanes of each flow node.
+ *
+ * @param {Shape[]} flowNodeShapes The flow nodes to update.
+ * @param {Shape[]} laneShapes The lanes.
+ */
+Modeling.prototype.updateLaneRefs = function(flowNodeShapes, laneShapes) {
- function isConditionalSource(element) {
- return isAny(element, CONDITIONAL_SOURCES);
- }
+ this._commandStack.execute('lane.updateRefs', {
+ flowNodeShapes: flowNodeShapes,
+ laneShapes: laneShapes
+ });
+};
- },{"../../../Utils":5,"../../../helper/CmdHelper":25,"../../../helper/ElementHelper":26,"../../../helper/EventDefinitionHelper":27,"./implementation/Script":110,"bpmn-js/lib/features/modeling/util/ModelingUtil":211,"bpmn-js/lib/util/ModelUtil":240,"min-dom":647}],68:[function(require,module,exports){
- 'use strict';
+/**
+ * Claim an ID.
+ *
+ * @param {string} id The ID to claim.
+ * @param {ModdleElement} moddleElement The model element the ID is claimed for.
+ */
+Modeling.prototype.claimId = function(id, moddleElement) {
+ this._commandStack.execute('id.updateClaim', {
+ id: id,
+ element: moddleElement,
+ claiming: true
+ });
+};
+
+/**
+ * Unclaim an ID.
+ *
+ * @param {string} id The ID to unclaim.
+ * @param {ModdleElement} moddleElement The model element the ID is claimed for.
+ */
+Modeling.prototype.unclaimId = function(id, moddleElement) {
+ this._commandStack.execute('id.updateClaim', {
+ id: id,
+ element: moddleElement
+ });
+};
+
+/**
+ * Set the color(s) of one or many elements.
+ *
+ * @param {Element[]} elements The elements to set the color(s) for.
+ * @param {Colors} colors The color(s) to set.
+ */
+Modeling.prototype.setColor = function(elements, colors) {
+ if (!elements.length) {
+ elements = [ elements ];
+ }
- var ImplementationTypeHelper = require('../../../helper/ImplementationTypeHelper'),
- InputOutputHelper = require('../../../helper/InputOutputHelper');
+ this._commandStack.execute('element.setColor', {
+ elements: elements,
+ colors: colors
+ });
+};
- var entryFactory = require('../../../factory/EntryFactory'),
- cmdHelper = require('../../../helper/CmdHelper');
- function getImplementationType(element) {
- return ImplementationTypeHelper.getImplementationType(element);
- }
+/***/ }),
- function getBusinessObject(element) {
- return ImplementationTypeHelper.getServiceTaskLikeBusinessObject(element);
- }
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/AdaptiveLabelPositioningBehavior.js":
+/*!**************************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/AdaptiveLabelPositioningBehavior.js ***!
+ \**************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- function getConnector(bo) {
- return InputOutputHelper.getConnector(bo);
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ AdaptiveLabelPositioningBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+/* harmony import */ var diagram_js_lib_util_Math__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/util/Math */ "../node_modules/diagram-js/lib/util/PositionUtil.js");
+/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/LabelUtil */ "../node_modules/bpmn-js/lib/util/LabelUtil.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
- function isConnector(element) {
- return getImplementationType(element) === 'connector';
- }
- module.exports = function(group, element, bpmnFactory, translate) {
- group.entries.push(entryFactory.textField({
- id: 'connectorId',
- label: translate('Connector Id'),
- modelProperty: 'connectorId',
- get: function(element, node) {
- var bo = getBusinessObject(element);
- var connector = bo && getConnector(bo);
- var value = connector && connector.get('connectorId');
- return { connectorId: value };
- },
- set: function(element, values, node) {
- var bo = getBusinessObject(element);
- var connector = getConnector(bo);
- return cmdHelper.updateBusinessObject(element, connector, {
- connectorId: values.connectorId || undefined
- });
- },
- validate: function(element, values, node) {
- return isConnector(element) && !values.connectorId ? { connectorId: translate('Must provide a value') } : {};
- },
- hidden: function(element, node) {
- return !isConnector(element);
- }
- }));
- };
- },{"../../../factory/EntryFactory":14,"../../../helper/CmdHelper":25,"../../../helper/ImplementationTypeHelper":30,"../../../helper/InputOutputHelper":31}],69:[function(require,module,exports){
- 'use strict';
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../Modeling').default} Modeling
+ *
+ * @typedef {import('../../../model/Types').Element} Element
+ * @typedef {import('../../../model/Types').Shape} Shape
+ *
+ * @typedef {import('diagram-js/lib/util/Types').DirectionTRBL} DirectionTRBL
+ */
- var assign = require('lodash/assign');
+var ALIGNMENTS = [
+ 'top',
+ 'bottom',
+ 'left',
+ 'right'
+];
- var inputOutputParameter = require('./implementation/InputOutputParameter');
+var ELEMENT_LABEL_DISTANCE = 10;
- module.exports = function(group, element, bpmnFactory, options, translate) {
+/**
+ * A component that makes sure that external labels are added
+ * together with respective elements and properly updated (DI wise)
+ * during move.
+ *
+ * @param {EventBus} eventBus
+ * @param {Modeling} modeling
+ */
+function AdaptiveLabelPositioningBehavior(eventBus, modeling) {
- options = assign({
- idPrefix: 'connector-',
- insideConnector: true
- }, options);
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- group.entries = group.entries.concat(inputOutputParameter(element, bpmnFactory, options, translate));
+ this.postExecuted([
+ 'connection.create',
+ 'connection.layout',
+ 'connection.updateWaypoints'
+ ], function(event) {
+ var context = event.context,
+ connection = context.connection,
+ source = connection.source,
+ target = connection.target,
+ hints = context.hints || {};
- };
+ if (hints.createElementsBehavior !== false) {
+ checkLabelAdjustment(source);
+ checkLabelAdjustment(target);
+ }
+ });
- },{"./implementation/InputOutputParameter":103,"lodash/assign":604}],70:[function(require,module,exports){
- 'use strict';
- var inputOutput = require('./implementation/InputOutput');
+ this.postExecuted([
+ 'label.create'
+ ], function(event) {
+ var context = event.context,
+ shape = context.shape,
+ hints = context.hints || {};
- module.exports = function(group, element, bpmnFactory, translate) {
+ if (hints.createElementsBehavior !== false) {
+ checkLabelAdjustment(shape.labelTarget);
+ }
+ });
- var inputOutputEntry = inputOutput(element, bpmnFactory, {
- idPrefix: 'connector-',
- insideConnector: true
- }, translate);
- group.entries = group.entries.concat(inputOutputEntry.entries);
+ this.postExecuted([
+ 'elements.create'
+ ], function(event) {
+ var context = event.context,
+ elements = context.elements,
+ hints = context.hints || {};
- return {
- getSelectedParameter: inputOutputEntry.getSelectedParameter
- };
+ if (hints.createElementsBehavior !== false) {
+ elements.forEach(function(element) {
+ checkLabelAdjustment(element);
+ });
+ }
+ });
- };
+ function checkLabelAdjustment(element) {
- },{"./implementation/InputOutput":102}],71:[function(require,module,exports){
- 'use strict';
+ // skip non-existing labels
+ if (!(0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_1__.hasExternalLabel)(element)) {
+ return;
+ }
- var is = require('bpmn-js/lib/util/ModelUtil').is,
- eventDefinitionHelper = require('../../../helper/EventDefinitionHelper'),
- error = require('./implementation/ErrorEventDefinition');
+ var optimalPosition = getOptimalPosition(element);
- var forEach = require('lodash/forEach');
+ // no optimal position found
+ if (!optimalPosition) {
+ return;
+ }
+ adjustLabelPosition(element, optimalPosition);
+ }
- module.exports = function(group, element, bpmnFactory, translate) {
+ function adjustLabelPosition(element, orientation) {
- var errorEvents = [
- 'bpmn:StartEvent',
- 'bpmn:BoundaryEvent',
- 'bpmn:EndEvent'
- ];
+ var elementMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_2__.getMid)(element),
+ label = element.label,
+ labelMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_2__.getMid)(label);
- forEach(errorEvents, function(event) {
- if (is(element, event)) {
+ // ignore labels that are being created
+ if (!label.parent) {
+ return;
+ }
- var errorEventDefinition = eventDefinitionHelper.getErrorEventDefinition(element);
+ var elementTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_2__.asTRBL)(element);
- if (errorEventDefinition) {
- var isCatchingErrorEvent = is(element, 'bpmn:StartEvent') || is (element, 'bpmn:BoundaryEvent');
+ var newLabelMid;
- var showErrorCodeVariable = isCatchingErrorEvent,
- showErrorMessageVariable = isCatchingErrorEvent;
+ switch (orientation) {
+ case 'top':
+ newLabelMid = {
+ x: elementMid.x,
+ y: elementTrbl.top - ELEMENT_LABEL_DISTANCE - label.height / 2
+ };
- error(
- group,
- element,
- bpmnFactory,
- errorEventDefinition,
- showErrorCodeVariable,
- showErrorMessageVariable,
- translate);
- }
- }
- });
- };
+ break;
- },{"../../../helper/EventDefinitionHelper":27,"./implementation/ErrorEventDefinition":95,"bpmn-js/lib/util/ModelUtil":240,"lodash/forEach":613}],72:[function(require,module,exports){
- 'use strict';
+ case 'left':
- var is = require('bpmn-js/lib/util/ModelUtil').is,
- getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject;
+ newLabelMid = {
+ x: elementTrbl.left - ELEMENT_LABEL_DISTANCE - label.width / 2,
+ y: elementMid.y
+ };
- var ImplementationTypeHelper = require('../../../helper/ImplementationTypeHelper');
+ break;
- var externalTaskPriority = require('./implementation/ExternalTaskPriority');
+ case 'bottom':
- function getServiceTaskLikeBusinessObject(element) {
- var bo = ImplementationTypeHelper.getServiceTaskLikeBusinessObject(element);
+ newLabelMid = {
+ x: elementMid.x,
+ y: elementTrbl.bottom + ELEMENT_LABEL_DISTANCE + label.height / 2
+ };
- // if the element is not a serviceTaskLike element, fetch the normal business object
- // This avoids the loss of the process / participant business object
- if (!bo) {
- bo = getBusinessObject(element);
- }
+ break;
- return bo;
- }
+ case 'right':
- module.exports = function(group, element, bpmnFactory, translate) {
+ newLabelMid = {
+ x: elementTrbl.right + ELEMENT_LABEL_DISTANCE + label.width / 2,
+ y: elementMid.y
+ };
- var bo = getServiceTaskLikeBusinessObject(element);
+ break;
+ }
- if (!bo) {
- return;
- }
+ var delta = (0,diagram_js_lib_util_Math__WEBPACK_IMPORTED_MODULE_3__.delta)(newLabelMid, labelMid);
- if (is(bo, 'camunda:TaskPriorized') || (is(bo, 'bpmn:Participant')) && bo.get('processRef')) {
- group.entries = group.entries.concat(externalTaskPriority(element, bpmnFactory, {
- getBusinessObject: function(element) {
- if (!is(bo, 'bpmn:Participant')) {
- return bo;
- }
- return bo.get('processRef');
- }
- }, translate));
- }
- };
- },{"../../../helper/ImplementationTypeHelper":30,"./implementation/ExternalTaskPriority":98,"bpmn-js/lib/util/ModelUtil":240}],73:[function(require,module,exports){
- 'use strict';
+ modeling.moveShape(label, delta);
+ }
- var ImplementationTypeHelper = require('../../../helper/ImplementationTypeHelper');
+}
- var fieldInjection = require('./implementation/FieldInjection');
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_4__["default"])(AdaptiveLabelPositioningBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- module.exports = function(group, element, bpmnFactory, translate) {
+AdaptiveLabelPositioningBehavior.$inject = [
+ 'eventBus',
+ 'modeling'
+];
- var bo = ImplementationTypeHelper.getServiceTaskLikeBusinessObject(element);
- if (!bo) {
- return;
- }
+// helpers //////////////////////
- var fieldInjectionEntry = fieldInjection(element, bpmnFactory, translate, { businessObject: bo });
+/**
+ * Return alignments which are taken by a boundary's host element
+ *
+ * @param {Shape} element
+ *
+ * @return {DirectionTRBL[]}
+ */
+function getTakenHostAlignments(element) {
- if (fieldInjectionEntry && fieldInjectionEntry.length > 0) {
- group.entries = group.entries.concat(fieldInjectionEntry);
- }
+ var hostElement = element.host,
+ elementMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_2__.getMid)(element),
+ hostOrientation = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_2__.getOrientation)(elementMid, hostElement);
- };
+ var freeAlignments;
- },{"../../../helper/ImplementationTypeHelper":30,"./implementation/FieldInjection":99}],74:[function(require,module,exports){
- 'use strict';
+ // check whether there is a multi-orientation, e.g. 'top-left'
+ if (hostOrientation.indexOf('-') >= 0) {
+ freeAlignments = hostOrientation.split('-');
+ } else {
+ freeAlignments = [ hostOrientation ];
+ }
- var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject,
- getExtensionElements = require('../../../helper/ExtensionElementsHelper').getExtensionElements,
- removeEntry = require('../../../helper/ExtensionElementsHelper').removeEntry,
- extensionElements = require('./implementation/ExtensionElements'),
- properties = require('./implementation/Properties'),
- entryFactory = require('../../../factory/EntryFactory'),
- elementHelper = require('../../../helper/ElementHelper'),
- cmdHelper = require('../../../helper/CmdHelper'),
- formHelper = require('../../../helper/FormHelper'),
- utils = require('../../../Utils'),
- is = require('bpmn-js/lib/util/ModelUtil').is,
- find = require('lodash/find'),
- each = require('lodash/forEach');
+ var takenAlignments = ALIGNMENTS.filter(function(alignment) {
- function generateValueId() {
- return utils.nextId('Value_');
- }
+ return freeAlignments.indexOf(alignment) === -1;
+ });
- /**
- * Generate a form field specific textField using entryFactory.
- *
- * @param {string} options.id
- * @param {string} options.label
- * @param {string} options.modelProperty
- * @param {function} options.validate
- *
- * @return {Object} an entryFactory.textField object
- */
- function formFieldTextField(options, getSelectedFormField) {
+ return takenAlignments;
- var id = options.id,
- label = options.label,
- modelProperty = options.modelProperty,
- validate = options.validate;
+}
- return entryFactory.textField({
- id: id,
- label: label,
- modelProperty: modelProperty,
- get: function(element, node) {
- var selectedFormField = getSelectedFormField(element, node) || {},
- values = {};
+/**
+ * Return alignments which are taken by related connections
+ *
+ * @param {Element} element
+ *
+ * @return {DirectionTRBL[]}
+ */
+function getTakenConnectionAlignments(element) {
+
+ var elementMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_2__.getMid)(element);
+
+ var takenAlignments = [].concat(
+ element.incoming.map(function(c) {
+ return c.waypoints[c.waypoints.length - 2 ];
+ }),
+ element.outgoing.map(function(c) {
+ return c.waypoints[1];
+ })
+ ).map(function(point) {
+ return getApproximateOrientation(elementMid, point);
+ });
+
+ return takenAlignments;
+}
+
+/**
+ * Return the optimal label position around an element
+ * or `undefined`, if none was found.
+ *
+ * @param {Element} element
+ *
+ * @return {DirectionTRBL|undefined}
+ */
+function getOptimalPosition(element) {
- values[modelProperty] = selectedFormField[modelProperty];
+ var labelMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_2__.getMid)(element.label);
- return values;
- },
+ var elementMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_2__.getMid)(element);
- set: function(element, values, node) {
- var commands = [];
+ var labelOrientation = getApproximateOrientation(elementMid, labelMid);
- if (typeof options.set === 'function') {
- var cmd = options.set(element, values, node);
+ if (!isAligned(labelOrientation)) {
+ return;
+ }
- if (cmd) {
- commands.push(cmd);
- }
- }
+ var takenAlignments = getTakenConnectionAlignments(element);
- var formField = getSelectedFormField(element, node),
- properties = {};
+ if (element.host) {
+ var takenHostAlignments = getTakenHostAlignments(element);
- properties[modelProperty] = values[modelProperty] || undefined;
+ takenAlignments = takenAlignments.concat(takenHostAlignments);
+ }
- commands.push(cmdHelper.updateBusinessObject(element, formField, properties));
+ var freeAlignments = ALIGNMENTS.filter(function(alignment) {
- return commands;
- },
- hidden: function(element, node) {
- return !getSelectedFormField(element, node);
- },
- validate: validate
- });
- }
+ return takenAlignments.indexOf(alignment) === -1;
+ });
- function ensureFormKeyAndDataSupported(element) {
- return (
- is(element, 'bpmn:StartEvent') && !is(element.parent, 'bpmn:SubProcess')
- ) || is(element, 'bpmn:UserTask');
- }
+ // NOTHING TO DO; label already aligned a.O.K.
+ if (freeAlignments.indexOf(labelOrientation) !== -1) {
+ return;
+ }
- module.exports = function(group, element, bpmnFactory, translate) {
+ return freeAlignments[0];
+}
- if (!ensureFormKeyAndDataSupported(element)) {
- return;
- }
+function getApproximateOrientation(p0, p1) {
+ return (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_2__.getOrientation)(p1, p0, 5);
+}
+function isAligned(orientation) {
+ return ALIGNMENTS.indexOf(orientation) !== -1;
+}
- /**
- * Return the currently selected form field querying the form field select box
- * from the DOM.
- *
- * @param {djs.model.Base} element
- * @param {DOMElement} node - DOM element of any form field text input
- *
- * @return {ModdleElement} the currently selected form field
- */
- function getSelectedFormField(element, node) {
- var selected = formFieldsEntry.getSelected(element, node.parentNode);
- if (selected.idx === -1) {
- return;
- }
+/***/ }),
- return formHelper.getFormField(element, selected.idx);
- }
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/AppendBehavior.js":
+/*!********************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/AppendBehavior.js ***!
+ \********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- // [FormKey] form key text input field
- group.entries.push(entryFactory.textField({
- id : 'form-key',
- label : translate('Form Key'),
- modelProperty: 'formKey',
- get: function(element, node) {
- var bo = getBusinessObject(element);
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ AppendBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
- return {
- formKey: bo.get('camunda:formKey')
- };
- },
- set: function(element, values, node) {
- var bo = getBusinessObject(element),
- formKey = values.formKey || undefined;
- return cmdHelper.updateBusinessObject(element, bo, { 'camunda:formKey': formKey });
- }
- }));
- // [FormData] form field select box
- var formFieldsEntry = extensionElements(element, bpmnFactory, {
- id: 'form-fields',
- label: translate('Form Fields'),
- modelProperty: 'id',
- prefix: 'FormField',
- createExtensionElement: function(element, extensionElements, value) {
- var bo = getBusinessObject(element), commands = [];
-
- if (!extensionElements) {
- extensionElements = elementHelper.createElement('bpmn:ExtensionElements', { values: [] }, bo, bpmnFactory);
- commands.push(cmdHelper.updateProperties(element, { extensionElements: extensionElements }));
- }
- var formData = formHelper.getFormData(element);
-
- if (!formData) {
- formData = elementHelper.createElement('camunda:FormData', { fields: [] }, extensionElements, bpmnFactory);
- commands.push(cmdHelper.addAndRemoveElementsFromList(
- element,
- extensionElements,
- 'values',
- 'extensionElements',
- [formData],
- []
- ));
- }
- var field = elementHelper.createElement('camunda:FormField', { id: value }, formData, bpmnFactory);
- if (typeof formData.fields !== 'undefined') {
- commands.push(cmdHelper.addElementsTolist(element, formData, 'fields', [ field ]));
- } else {
- commands.push(cmdHelper.updateBusinessObject(element, formData, {
- fields: [ field ]
- }));
- }
- return commands;
- },
- removeExtensionElement: function(element, extensionElements, value, idx) {
- var formData = getExtensionElements(getBusinessObject(element), 'camunda:FormData')[0],
- entry = formData.fields[idx],
- commands = [];
-
- if (formData.fields.length < 2) {
- commands.push(removeEntry(getBusinessObject(element), element, formData));
- } else {
- commands.push(cmdHelper.removeElementsFromList(element, formData, 'fields', null, [entry]));
-
- if (entry.id === formData.get('businessKey')) {
- commands.push(cmdHelper.updateBusinessObject(element, formData, { 'businessKey': undefined }));
- }
- }
- return commands;
- },
- getExtensionElements: function(element) {
- return formHelper.getFormFields(element);
- },
- hideExtensionElements: function(element, node) {
- return false;
- }
- });
- group.entries.push(formFieldsEntry);
-
- // [FormData] business key form field select box
- var formBusinessKeyFormFieldEntry = entryFactory.selectBox({
- id: 'form-business-key',
- label: translate('Business Key'),
- modelProperty: 'businessKey',
- selectOptions: function(element, inputNode) {
- var selectOptions = [{ name: '', value: '' }];
- var formFields = formHelper.getFormFields(element);
- each(formFields, function(field) {
- if (field.type !== 'boolean') {
- selectOptions.push({ name: field.id, value: field.id });
- }
- });
- return selectOptions;
- },
- get: function(element, node) {
- var result = { businessKey: '' };
- var bo = getBusinessObject(element);
- var formDataExtension = getExtensionElements(bo, 'camunda:FormData');
- if (formDataExtension) {
- var formData = formDataExtension[0];
- var storedValue = formData.get('businessKey');
- result = { businessKey: storedValue };
- }
- return result;
- },
- set: function(element, values, node) {
- var formData = getExtensionElements(getBusinessObject(element), 'camunda:FormData')[0];
- return cmdHelper.updateBusinessObject(element, formData, { 'businessKey': values.businessKey || undefined });
- },
- hidden: function(element, node) {
- var isStartEvent = is(element,'bpmn:StartEvent');
- return !(isStartEvent && formHelper.getFormFields(element).length > 0);
- }
- });
- group.entries.push(formBusinessKeyFormFieldEntry);
-
- // [FormData] Form Field label
- group.entries.push(entryFactory.label({
- id: 'form-field-header',
- labelText: translate('Form Field'),
- showLabel: function(element, node) {
- return !!getSelectedFormField(element, node);
- }
- }));
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ */
- // [FormData] form field id text input field
- group.entries.push(entryFactory.validationAwareTextField({
- id: 'form-field-id',
- label: translate('ID (process variable name)'),
- modelProperty: 'id',
+function AppendBehavior(eventBus) {
- getProperty: function(element, node) {
- var selectedFormField = getSelectedFormField(element, node) || {};
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- return selectedFormField.id;
- },
+ // assign correct shape position unless already set
- setProperty: function(element, properties, node) {
- var formField = getSelectedFormField(element, node);
+ this.preExecute('shape.append', function(context) {
- return cmdHelper.updateBusinessObject(element, formField, properties);
- },
+ var source = context.source,
+ shape = context.shape;
- hidden: function(element, node) {
- return !getSelectedFormField(element, node);
- },
+ if (!context.position) {
- validate: function(element, values, node) {
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:TextAnnotation')) {
+ context.position = {
+ x: source.x + source.width / 2 + 75,
+ y: source.y - 50 - shape.height / 2
+ };
+ } else {
+ context.position = {
+ x: source.x + source.width + 80 + shape.width / 2,
+ y: source.y + source.height / 2
+ };
+ }
+ }
+ }, true);
+}
- var formField = getSelectedFormField(element, node);
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_2__["default"])(AppendBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- if (formField) {
+AppendBehavior.$inject = [
+ 'eventBus'
+];
- var idValue = values.id;
+/***/ }),
- if (!idValue || idValue.trim() === '') {
- return { id: 'Form field id must not be empty' };
- }
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/AssociationBehavior.js":
+/*!*************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/AssociationBehavior.js ***!
+ \*************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var formFields = formHelper.getFormFields(element);
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ AssociationBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
- var existingFormField = find(formFields, function(f) {
- return f !== formField && f.id === idValue;
- });
- if (existingFormField) {
- return { id: 'Form field id already used in form data.' };
- }
- }
- }
- }));
- // [FormData] form field type combo box
- group.entries.push(entryFactory.comboBox({
- id: 'form-field-type',
- label: translate('Type'),
- selectOptions: [
- { name: 'string', value: 'string' },
- { name: 'long', value: 'long' },
- { name: 'boolean', value: 'boolean' },
- { name: 'date', value: 'date' },
- { name: 'enum', value: 'enum' }
- ],
- modelProperty: 'type',
- emptyParameter: true,
-
- get: function(element, node) {
- var selectedFormField = getSelectedFormField(element, node);
-
- if (selectedFormField) {
- return { type: selectedFormField.type };
- } else {
- return {};
- }
- },
- set: function(element, values, node) {
- var selectedFormField = getSelectedFormField(element, node),
- formData = getExtensionElements(getBusinessObject(element), 'camunda:FormData')[0],
- commands = [];
-
- if (selectedFormField.type === 'enum' && values.type !== 'enum') {
- // delete camunda:value objects from formField.values when switching from type enum
- commands.push(cmdHelper.updateBusinessObject(element, selectedFormField, { values: undefined }));
- }
- if (values.type === 'boolean' && selectedFormField.get('id') === formData.get('businessKey')) {
- commands.push(cmdHelper.updateBusinessObject(element, formData, { 'businessKey': undefined }));
- }
- commands.push(cmdHelper.updateBusinessObject(element, selectedFormField, values));
- return commands;
- },
- hidden: function(element, node) {
- return !getSelectedFormField(element, node);
- }
- }));
- // [FormData] form field label text input field
- group.entries.push(formFieldTextField({
- id: 'form-field-label',
- label: translate('Label'),
- modelProperty: 'label'
- }, getSelectedFormField));
-
- // [FormData] form field defaultValue text input field
- group.entries.push(formFieldTextField({
- id: 'form-field-defaultValue',
- label: translate('Default Value'),
- modelProperty: 'defaultValue'
- }, getSelectedFormField));
-
-
- // [FormData] form field enum values label
- group.entries.push(entryFactory.label({
- id: 'form-field-enum-values-header',
- labelText: translate('Values'),
- divider: true,
- showLabel: function(element, node) {
- var selectedFormField = getSelectedFormField(element, node);
-
- return selectedFormField && selectedFormField.type === 'enum';
- }
- }));
- // [FormData] form field enum values table
- group.entries.push(entryFactory.table({
- id: 'form-field-enum-values',
- labels: [ translate('Id'), translate('Name') ],
- modelProperties: [ 'id', 'name' ],
- show: function(element, node) {
- var selectedFormField = getSelectedFormField(element, node);
- return selectedFormField && selectedFormField.type === 'enum';
- },
- getElements: function(element, node) {
- var selectedFormField = getSelectedFormField(element, node);
- return formHelper.getEnumValues(selectedFormField);
- },
- addElement: function(element, node) {
- var selectedFormField = getSelectedFormField(element, node),
- id = generateValueId();
-
- var enumValue = elementHelper.createElement(
- 'camunda:Value',
- { id: id, name: undefined },
- getBusinessObject(element),
- bpmnFactory
- );
-
- return cmdHelper.addElementsTolist(element, selectedFormField, 'values', [enumValue]);
- },
- removeElement: function(element, node, idx) {
- var selectedFormField = getSelectedFormField(element, node),
- enumValue = selectedFormField.values[idx];
+/**
+ * @typedef {import('didi').Injector} Injector
+ * @typedef {import('../Modeling').default} Modeling
+ */
- return cmdHelper.removeElementsFromList(element, selectedFormField, 'values', null, [enumValue]);
- },
- updateElement: function(element, value, node, idx) {
- var selectedFormField = getSelectedFormField(element, node),
- enumValue = selectedFormField.values[idx];
+/**
+ * @param {Injector} injector
+ * @param {Modeling} modeling
+ */
+function AssociationBehavior(injector, modeling) {
+ injector.invoke(diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"], this);
- value.name = value.name || undefined;
- return cmdHelper.updateBusinessObject(element, enumValue, value);
- },
- validate: function(element, value, node, idx) {
+ this.postExecute('shape.move', function(context) {
+ var newParent = context.newParent,
+ shape = context.shape;
- var selectedFormField = getSelectedFormField(element, node),
- enumValue = selectedFormField.values[idx];
+ var associations = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.filter)(shape.incoming.concat(shape.outgoing), function(connection) {
+ return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(connection, 'bpmn:Association');
+ });
- if (enumValue) {
- // check if id is valid
- var validationError = utils.isIdValid(enumValue, value.id, translate);
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(associations, function(association) {
+ modeling.moveConnection(association, { x: 0, y: 0 }, newParent);
+ });
+ }, true);
+}
- if (validationError) {
- return { id: validationError };
- }
- }
- }
- }));
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_3__["default"])(AssociationBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- // [FormData] Validation label
- group.entries.push(entryFactory.label({
- id: 'form-field-validation-header',
- labelText: translate('Validation'),
- divider: true,
- showLabel: function(element, node) {
- return !!getSelectedFormField(element, node);
- }
- }));
+AssociationBehavior.$inject = [
+ 'injector',
+ 'modeling'
+];
- // [FormData] form field constraints table
- group.entries.push(entryFactory.table({
- id: 'constraints-list',
- modelProperties: [ 'name', 'config' ],
- labels: [ translate('Name'), translate('Config') ],
- addLabel: translate('Add Constraint'),
- getElements: function(element, node) {
- var formField = getSelectedFormField(element, node);
+/***/ }),
- return formHelper.getConstraints(formField);
- },
- addElement: function(element, node) {
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/AttachEventBehavior.js":
+/*!*************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/AttachEventBehavior.js ***!
+ \*************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var commands = [],
- formField = getSelectedFormField(element, node),
- validation = formField.validation;
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ AttachEventBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/ModelingUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../util/LabelUtil */ "../node_modules/diagram-js/lib/util/ModelUtil.js");
- if (!validation) {
- // create validation business object and add it to form data, if it doesn't exist
- validation = elementHelper.createElement('camunda:Validation', {}, getBusinessObject(element), bpmnFactory);
- commands.push(cmdHelper.updateBusinessObject(element, formField, { 'validation': validation }));
- }
- var newConstraint = elementHelper.createElement(
- 'camunda:Constraint',
- { name: undefined, config: undefined },
- validation,
- bpmnFactory
- );
- commands.push(cmdHelper.addElementsTolist(element, validation, 'constraints', [ newConstraint ]));
- return commands;
- },
- updateElement: function(element, value, node, idx) {
- var formField = getSelectedFormField(element, node),
- constraint = formHelper.getConstraints(formField)[idx];
- value.name = value.name || undefined;
- value.config = value.config || undefined;
- return cmdHelper.updateBusinessObject(element, constraint, value);
- },
- removeElement: function(element, node, idx) {
- var commands = [],
- formField = getSelectedFormField(element, node),
- constraints = formHelper.getConstraints(formField),
- currentConstraint = constraints[idx];
-
- commands.push(cmdHelper.removeElementsFromList(
- element,
- formField.validation,
- 'constraints',
- null,
- [ currentConstraint ]
- ));
-
- if (constraints.length === 1) {
- // remove camunda:validation if the last existing constraint has been removed
- commands.push(cmdHelper.updateBusinessObject(element, formField, { validation: undefined }));
- }
- return commands;
- },
- show: function(element, node) {
- return !!getSelectedFormField(element, node);
- }
- }));
- // [FormData] Properties label
- group.entries.push(entryFactory.label({
- id: 'form-field-properties-header',
- labelText: translate('Properties'),
- divider: true,
- showLabel: function(element, node) {
- return !!getSelectedFormField(element, node);
- }
- }));
- // [FormData] camunda:properties table
- group.entries.push(properties(element, bpmnFactory, {
- id: 'form-field-properties',
- modelProperties: [ 'id', 'value' ],
- labels: [ translate('Id'), translate('Value') ],
- getParent: function(element, node) {
- return getSelectedFormField(element, node);
- },
- show: function(element, node) {
- return !!getSelectedFormField(element, node);
- }
- }, translate));
- };
+/**
+ * @typedef {import('../../replace/BpmnReplace').default} BpmnReplace
+ * @typedef {import('didi').Injector} Injector
+ */
- },{"../../../Utils":5,"../../../factory/EntryFactory":14,"../../../helper/CmdHelper":25,"../../../helper/ElementHelper":26,"../../../helper/ExtensionElementsHelper":28,"../../../helper/FormHelper":29,"./implementation/ExtensionElements":96,"./implementation/Properties":108,"bpmn-js/lib/util/ModelUtil":240,"lodash/find":610,"lodash/forEach":613}],75:[function(require,module,exports){
- 'use strict';
+var LOW_PRIORITY = 500;
- var is = require('bpmn-js/lib/util/ModelUtil').is,
- getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject;
- var historyTimeToLive = require('./implementation/HistoryTimeToLive');
+/**
+ * Replace intermediate event with boundary event when creating or moving results in attached event.
+ *
+ * @param {BpmnReplace} bpmnReplace
+ * @param {Injector} injector
+ */
+function AttachEventBehavior(bpmnReplace, injector) {
+ injector.invoke(diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"], this);
- module.exports = function(group, element, bpmnFactory, translate) {
- var businessObject = getBusinessObject(element);
+ this._bpmnReplace = bpmnReplace;
- if (is(element, 'camunda:Process') ||
- is(element, 'bpmn:Participant') && businessObject.get('processRef')) {
+ var self = this;
- group.entries = group.entries.concat(historyTimeToLive(element, bpmnFactory, {
- getBusinessObject: function(element) {
- var bo = getBusinessObject(element);
+ this.postExecuted('elements.create', LOW_PRIORITY, function(context) {
+ var elements = context.elements;
- if (!is(bo, 'bpmn:Participant')) {
- return bo;
- }
+ elements = elements.filter(function(shape) {
+ var host = shape.host;
- return bo.get('processRef');
- }
- }, translate));
+ return shouldReplace(shape, host);
+ });
- }
- };
+ if (elements.length !== 1) {
+ return;
+ }
- },{"./implementation/HistoryTimeToLive":100,"bpmn-js/lib/util/ModelUtil":240}],76:[function(require,module,exports){
- 'use strict';
+ elements.map(function(element) {
+ return elements.indexOf(element);
+ }).forEach(function(index) {
+ var host = elements[ index ];
- var inputOutputParameter = require('./implementation/InputOutputParameter');
+ context.elements[ index ] = self._replaceShape(elements[ index ], host);
+ });
+ }, true);
- var assign = require('lodash/assign');
- module.exports = function(group, element, bpmnFactory, options, translate) {
+ this.preExecute('elements.move', LOW_PRIORITY, function(context) {
+ var shapes = context.shapes,
+ host = context.newHost;
- group.entries = group.entries.concat(inputOutputParameter(element, bpmnFactory, assign({}, options), translate));
+ if (shapes.length !== 1) {
+ return;
+ }
- };
+ var shape = shapes[0];
- },{"./implementation/InputOutputParameter":103,"lodash/assign":604}],77:[function(require,module,exports){
- 'use strict';
+ if (shouldReplace(shape, host)) {
+ context.shapes = [ self._replaceShape(shape, host) ];
+ }
+ }, true);
+}
- var inputOutput = require('./implementation/InputOutput');
+AttachEventBehavior.$inject = [
+ 'bpmnReplace',
+ 'injector'
+];
- module.exports = function(group, element, bpmnFactory, translate) {
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_1__["default"])(AttachEventBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- var inputOutputEntry = inputOutput(element, bpmnFactory, {}, translate);
+AttachEventBehavior.prototype._replaceShape = function(shape, host) {
+ var eventDefinition = getEventDefinition(shape);
- group.entries = group.entries.concat(inputOutputEntry.entries);
+ var boundaryEvent = {
+ type: 'bpmn:BoundaryEvent',
+ host: host
+ };
- return {
- getSelectedParameter: inputOutputEntry.getSelectedParameter
- };
+ if (eventDefinition) {
+ boundaryEvent.eventDefinitionType = eventDefinition.$type;
+ }
- };
+ return this._bpmnReplace.replaceElement(shape, boundaryEvent, { layoutConnection: false });
+};
- },{"./implementation/InputOutput":102}],78:[function(require,module,exports){
- 'use strict';
- var is = require('bpmn-js/lib/util/ModelUtil').is,
- getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject;
+// helpers //////////
- var jobPriority = require('./implementation/JobPriority'),
- jobRetryTimeCycle = require('./implementation/JobRetryTimeCycle');
+function getEventDefinition(element) {
+ var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(element),
+ eventDefinitions = businessObject.eventDefinitions;
- module.exports = function(group, element, bpmnFactory, translate) {
- var businessObject = getBusinessObject(element);
+ return eventDefinitions && eventDefinitions[0];
+}
- if (is(element, 'camunda:JobPriorized') ||
- is(element, 'bpmn:Participant') && businessObject.get('processRef')) {
+function shouldReplace(shape, host) {
+ return !(0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.isLabel)(shape) &&
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.isAny)(shape, [ 'bpmn:IntermediateThrowEvent', 'bpmn:IntermediateCatchEvent' ]) && !!host;
+}
- group.entries = group.entries.concat(jobPriority(element, bpmnFactory, {
- getBusinessObject: function(element) {
- var bo = getBusinessObject(element);
- if (!is(bo, 'bpmn:Participant')) {
- return bo;
- }
+/***/ }),
- return bo.get('processRef');
- }
- }, translate));
- }
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/BoundaryEventBehavior.js":
+/*!***************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/BoundaryEventBehavior.js ***!
+ \***************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- if (is(element, 'camunda:AsyncCapable')) {
- group.entries = group.entries.concat(jobRetryTimeCycle(element, bpmnFactory, {
- getBusinessObject: getBusinessObject
- }, translate));
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BoundaryEventBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
- };
- },{"./implementation/JobPriority":104,"./implementation/JobRetryTimeCycle":105,"bpmn-js/lib/util/ModelUtil":240}],79:[function(require,module,exports){
- 'use strict';
- var is = require('bpmn-js/lib/util/ModelUtil').is;
- var find = require('min-dash').find;
- var entryFactory = require('../../../factory/EntryFactory');
- var cmdHelper = require('../../../helper/CmdHelper'),
- ImplementationTypeHelper = require('../../../helper/ImplementationTypeHelper'),
- scriptImplementation = require('./implementation/Script'),
- timerImplementation = require('../../bpmn/parts/implementation/TimerEventDefinition');
- module.exports = function(group, element, bpmnFactory, options, translate) {
- var LISTENER_TYPE_LABEL = {
- class: translate('Java Class'),
- expression: translate('Expression'),
- delegateExpression: translate('Delegate Expression'),
- script: translate('Script')
- };
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../Modeling').default} Modeling
+ */
- options = options || {};
+/**
+ * BPMN specific boundary event behavior.
+ *
+ * @param {EventBus} eventBus
+ * @param {Modeling} modeling
+ */
+function BoundaryEventBehavior(eventBus, modeling) {
- var getSelectedListener = options.getSelectedListener;
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- var classProp = 'class',
- expressionProp = 'expression',
- delegateExpressionProp = 'delegateExpression',
- scriptProp = 'script';
+ function getBoundaryEvents(element) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.filter)(element.attachers, function(attacher) {
+ return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(attacher, 'bpmn:BoundaryEvent');
+ });
+ }
- var executionListenerEventTypeOptions = ImplementationTypeHelper.isSequenceFlow(element) ? [
- { name: translate('take'), value: 'take' }
- ] : [
- { name: translate('start'), value: 'start' },
- { name: translate('end'), value: 'end' }
- ];
+ // remove after connecting to event-based gateway
+ this.postExecute('connection.create', function(event) {
+ var source = event.context.source,
+ target = event.context.target,
+ boundaryEvents = getBoundaryEvents(target);
- var taskListenerEventTypeOptions = [
- { name: translate('create'), value: 'create' },
- { name: translate('assignment'), value: 'assignment' },
- { name: translate('complete'), value: 'complete' },
- { name: translate('delete'), value: 'delete' },
- { name: translate('update'), value: 'update' },
- { name: translate('timeout'), value: 'timeout' }
- ];
+ if (
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(source, 'bpmn:EventBasedGateway') &&
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target, 'bpmn:ReceiveTask') &&
+ boundaryEvents.length > 0
+ ) {
+ modeling.removeElements(boundaryEvents);
+ }
- var isSelected = function(element, node) {
- return getSelectedListener(element, node);
- };
+ });
+ // remove after replacing connected gateway with event-based gateway
+ this.postExecute('connection.reconnect', function(event) {
+ var oldSource = event.context.oldSource,
+ newSource = event.context.newSource;
- // eventType ////////////////
- group.entries.push(entryFactory.selectBox({
- id: 'listener-event-type',
- label: translate('Event Type'),
- modelProperty: 'eventType',
- emptyParameter: false,
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(oldSource, 'bpmn:Gateway') &&
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(newSource, 'bpmn:EventBasedGateway')) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(newSource.outgoing, function(connection) {
+ var target = connection.target,
+ attachedboundaryEvents = getBoundaryEvents(target);
- get: function(element, node) {
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target, 'bpmn:ReceiveTask') &&
+ attachedboundaryEvents.length > 0) {
+ modeling.removeElements(attachedboundaryEvents);
+ }
+ });
+ }
+ });
- var listener = getSelectedListener(element, node);
+}
- var eventType = listener && listener.get('event');
+BoundaryEventBehavior.$inject = [
+ 'eventBus',
+ 'modeling'
+];
- return {
- eventType: eventType
- };
- },
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_3__["default"])(BoundaryEventBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- set: function(element, values, node) {
- var eventType = values.eventType,
- listener = getSelectedListener(element, node),
- eventDefinitions = listener && listener.eventDefinitions;
+/***/ }),
- // ensure only timeout events can have timer event definitions
- if (eventDefinitions && eventType !== 'timeout') {
- eventDefinitions = [];
- }
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/CompensateBoundaryEventBehavior.js":
+/*!*************************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/CompensateBoundaryEventBehavior.js ***!
+ \*************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- return cmdHelper.updateBusinessObject(element, listener,
- {
- event: eventType,
- eventDefinitions: eventDefinitions
- }
- );
- },
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ CompensateBoundaryEventBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
- selectOptions: function(element, node) {
- var eventTypeOptions;
- var selectedListener = getSelectedListener(element, node);
- if (ImplementationTypeHelper.isTaskListener(selectedListener)) {
- eventTypeOptions = taskListenerEventTypeOptions;
- } else if (ImplementationTypeHelper.isExecutionListener(selectedListener)) {
- eventTypeOptions = executionListenerEventTypeOptions;
- }
- return eventTypeOptions;
- },
- hidden: function(element, node) {
- return !isSelected(element, node);
- }
- }));
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../lib/features/modeling/Modeling').default} Modeling
+ */
- // listenerId ///////////////
- group.entries.push(entryFactory.textField({
- id: 'listener-id',
- label: translate('Listener Id'),
- modelProperty: 'listenerId',
+/**
+ * Behavior ensuring that only a single compensation activity is connected to a
+ * compensation boundary event when connecting, reconnecting or replacing shapes.
+ *
+ * @param {import('diagram-js/lib/core/EventBus').default} eventBus
+ * @param {import('../Modeling').default} modeling
+ * @param {import('../../rules/BpmnRules').default} bpmnRules
+ */
+function CompensateBoundaryEventBehavior(eventBus, modeling, bpmnRules) {
- get: function(element, node) {
- var value = {},
- listener = getSelectedListener(element, node);
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- value.listenerId = (listener && listener.get('id')) || undefined;
+ this.preExecute('shape.replace', handleReplacement, true);
+ this.postExecuted('shape.replace', handleReplacementPostExecuted, true);
+ this.preExecute('connection.create', handleNewConnection, true);
+ this.postExecuted('connection.delete', handleConnectionRemoval, true);
+ this.postExecuted('connection.reconnect', handleReconnection, true);
+ this.postExecuted('element.updateProperties', handlePropertiesUpdate, true);
- return value;
- },
+ /**
+ * Given a connection from boundary event is removed, remove the `isForCompensation` property.
+ */
+ function handleConnectionRemoval(context) {
+ const source = context.source,
+ target = context.target;
- set: function(element, values, node) {
- var update = {},
- listener = getSelectedListener(element, node);
+ if (isCompensationBoundaryEvent(source) && isForCompensation(target)) {
+ removeIsForCompensationProperty(target);
+ }
+ }
- update['id'] = values.listenerId || '';
+ /**
+ * Add `isForCompensation` property and make sure only a single compensation activity is connected.
+ */
+ function handleNewConnection(context) {
+ const connection = context.connection,
+ source = context.source,
+ target = context.target;
+
+ if (isCompensationBoundaryEvent(source) && isForCompensationAllowed(target)) {
+ addIsForCompensationProperty(target);
+ removeExistingAssociations(source, [ connection ]);
+ }
+ }
+
+ function handleReconnection(context) {
+ const newTarget = context.newTarget,
+ oldSource = context.oldSource,
+ oldTarget = context.oldTarget;
+
+ // target changes
+ if (oldTarget !== newTarget) {
+ const source = oldSource;
+
+ // oldTarget perspective
+ if (isForCompensation(oldTarget)) {
+ removeIsForCompensationProperty(oldTarget);
+ }
+
+ // newTarget perspective
+ if (isCompensationBoundaryEvent(source) && isForCompensationAllowed(newTarget)) {
+ addIsForCompensationProperty(newTarget);
+ }
+ }
+ }
+
+ function handlePropertiesUpdate(context) {
+ const { element } = context;
+
+ if (isForCompensation(element)) {
+ removeDisallowedConnections(element);
+ removeAttachments(element);
+ } else if (isForCompensationAllowed(element)) {
+ removeIncomingCompensationAssociations(element);
+ }
+ }
+
+ /**
+ * When replacing a boundary event, make sure the compensation activity is connected,
+ * and remove the potential candidates for connection replacement to have a single compensation activity.
+ */
+ function handleReplacement(context) {
+ const {
+ newData,
+ oldShape
+ } = context;
+
+ // from compensate boundary event
+ if (isCompensationBoundaryEvent(context.oldShape) &&
+ newData.eventDefinitionType !== 'bpmn:CompensateEventDefinition' ||
+ newData.type !== 'bpmn:BoundaryEvent'
+ ) {
+ const targetConnection = oldShape.outgoing.find(
+ ({ target }) => isForCompensation(target)
+ );
+
+ if (targetConnection && targetConnection.target) {
+ context._connectionTarget = targetConnection.target;
+ }
+ }
+
+ // to compensate boundary event
+ else if (
+ !isCompensationBoundaryEvent(context.oldShape) &&
+ newData.eventDefinitionType === 'bpmn:CompensateEventDefinition' &&
+ newData.type === 'bpmn:BoundaryEvent'
+ ) {
+ const targetConnection = oldShape.outgoing.find(
+ ({ target }) => isForCompensationAllowed(target)
+ );
+
+ if (targetConnection && targetConnection.target) {
+ context._connectionTarget = targetConnection.target;
+ }
+
+ removeOutgoingSequenceFlows(oldShape);
+ }
+ }
+
+ function handleReplacementPostExecuted(context) {
+ const { _connectionTarget: target, newShape } = context;
+
+ if (target) {
+ modeling.connect(newShape, target);
+ }
+ }
+
+ function addIsForCompensationProperty(target) {
+ modeling.updateProperties(target, { isForCompensation: true });
+ }
+
+ function removeIsForCompensationProperty(target) {
+ modeling.updateProperties(target, { isForCompensation: undefined });
+ }
+
+ function removeDisallowedConnections(element) {
- return cmdHelper.updateBusinessObject(element, listener, update);
- },
+ for (const connection of element.incoming) {
+ if (!bpmnRules.canConnect(connection.source, element)) {
+ modeling.removeConnection(connection);
+ }
+ }
- hidden: function(element, node) {
- var listener = getSelectedListener(element, node);
+ for (const connection of element.outgoing) {
+ if (!bpmnRules.canConnect(element, connection.target)) {
+ modeling.removeConnection(connection);
+ }
+ }
+ }
- return !ImplementationTypeHelper.isTaskListener(listener);
- },
+ function removeExistingAssociations(boundaryEvent, ignoredAssociations) {
+ const associations = boundaryEvent.outgoing.filter(connection => (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(connection, 'bpmn:Association'));
+ const associationsToRemove = associations.filter(association => {
+ return isForCompensation(association.target) && !ignoredAssociations.includes(association);
+ });
- validate: function(element, values, node) {
- var value = values.listenerId,
- listener = getSelectedListener(element, node),
- validate = {};
+ // remove existing associations
+ associationsToRemove.forEach(association => modeling.removeConnection(association));
+ }
- if (!value && isTimeoutTaskListener(listener)) {
- validate.listenerId = translate('Must provide a value for timeout task listener');
- }
+ function removeAttachments(element) {
+ const attachments = element.attachers.slice();
- return validate;
- }
+ if (!attachments.length) {
+ return;
+ }
- }));
+ modeling.removeElements(attachments);
+ }
+ function removeIncomingCompensationAssociations(element) {
+ const compensationAssociations = element.incoming.filter(
+ connection => isCompensationBoundaryEvent(connection.source)
+ );
- // listenerType ///////////////
- group.entries.push(entryFactory.selectBox({
- id: 'listener-type',
- label: translate('Listener Type'),
- selectOptions: [
- { value: classProp, name: translate('Java Class') },
- { value: expressionProp, name: translate('Expression') },
- { value: delegateExpressionProp, name: translate('Delegate Expression') },
- { value: scriptProp, name: translate('Script') }
- ],
- modelProperty: 'listenerType',
- emptyParameter: false,
-
- get: function(element, node) {
- var listener = getSelectedListener(element, node);
- return {
- listenerType: ImplementationTypeHelper.getImplementationType(listener)
- };
- },
+ modeling.removeElements(compensationAssociations);
+ }
- set: function(element, values, node) {
- var listener = getSelectedListener(element, node),
- listenerType = values.listenerType || undefined,
- update = {};
+ function removeOutgoingSequenceFlows(element) {
+ const sequenceFlows = element.outgoing.filter(
+ connection => (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(connection, 'bpmn:SequenceFlow')
+ );
- update[classProp] = listenerType === classProp ? '' : undefined;
- update[expressionProp] = listenerType === expressionProp ? '' : undefined;
- update[delegateExpressionProp] = listenerType === delegateExpressionProp ? '' : undefined;
- update[scriptProp] = listenerType === scriptProp ? bpmnFactory.create('camunda:Script') : undefined;
+ modeling.removeElements(sequenceFlows);
+ }
+}
- return cmdHelper.updateBusinessObject(element, listener, update);
- },
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_2__["default"])(CompensateBoundaryEventBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- hidden: function(element, node) {
- return !isSelected(element, node);
- }
+CompensateBoundaryEventBehavior.$inject = [
+ 'eventBus',
+ 'modeling',
+ 'bpmnRules'
+];
- }));
+// helpers //////////
+function isForCompensation(element) {
+ const bo = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(element);
+ return bo && bo.get('isForCompensation');
+}
- // listenerValue //////////////
- group.entries.push(entryFactory.textField({
- id: 'listener-value',
- dataValueLabel: 'listenerValueLabel',
- modelProperty: 'listenerValue',
+function isCompensationBoundaryEvent(element) {
+ return element && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(element, 'bpmn:BoundaryEvent') &&
+ (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_3__.hasEventDefinition)(element, 'bpmn:CompensateEventDefinition');
+}
- get: function(element, node) {
- var value = {},
- listener = getSelectedListener(element, node),
- listenerType = ImplementationTypeHelper.getImplementationType(listener);
+function isForCompensationAllowed(element) {
+ return element && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(element, 'bpmn:Activity') && !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_3__.isEventSubProcess)(element);
+}
- value.listenerValueLabel = LISTENER_TYPE_LABEL[listenerType] || '';
- value.listenerValue = (listener && listener.get(listenerType)) || undefined;
- return value;
- },
+/***/ }),
- set: function(element, values, node) {
- var update = {},
- listener = getSelectedListener(element, node),
- listenerType = ImplementationTypeHelper.getImplementationType(listener);
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/CreateBehavior.js":
+/*!********************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/CreateBehavior.js ***!
+ \********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- update[listenerType] = values.listenerValue || '';
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ CreateBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var _util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/ModelingUtil */ "../node_modules/bpmn-js/lib/features/modeling/util/ModelingUtil.js");
- return cmdHelper.updateBusinessObject(element, listener, update);
- },
- hidden: function(element, node) {
- var listener = getSelectedListener(element, node);
- return !listener || listener.script;
- },
- validate: function(element, values) {
- var value = values.listenerValue,
- validate = {};
- if (!value) {
- validate.listenerValue = translate('Must provide a value');
- }
- return validate;
- }
- }));
- // script ////////////////////
- var script = scriptImplementation('scriptFormat', 'value', true, translate);
+/**
+ * @typedef {import('didi').Injector} Injector
+ */
- group.entries.push({
- id: 'listener-script-value',
- html: '' +
- script.template +
- '
',
+/**
+ * @param {Injector} injector
+ */
+function CreateBehavior(injector) {
+ injector.invoke(diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"], this);
- get: function(element, node) {
- var listener = getSelectedListener(element, node);
- return listener && listener.script ? script.get(element, listener.script) : {};
- },
+ this.preExecute('shape.create', 1500, function(event) {
+ var context = event.context,
+ parent = context.parent,
+ shape = context.shape;
- set: function(element, values, node) {
- var listener = getSelectedListener(element, node);
- var update = script.set(element, values, listener);
- return cmdHelper.updateBusinessObject(element, listener.script, update);
- },
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(parent, 'bpmn:Lane') && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:Lane')) {
+ context.parent = (0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.getParent)(parent, 'bpmn:Participant');
+ }
+ });
- validate: function(element, values, node) {
- var listener = getSelectedListener(element, node);
- return listener && listener.script ? script.validate(element, values) : {};
- },
+}
- isScript: function(element, node) {
- var listener = getSelectedListener(element, node);
- return listener && listener.script;
- },
- script: script
+CreateBehavior.$inject = [ 'injector' ];
- });
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_3__["default"])(CreateBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
+/***/ }),
- // timerEventDefinition //////
- var timerEventDefinitionHandler = function(element, node) {
- var listener = getSelectedListener(element, node);
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/CreateDataObjectBehavior.js":
+/*!******************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/CreateDataObjectBehavior.js ***!
+ \******************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- if (!listener || !isTimeoutTaskListener(listener)) {
- return;
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ CreateDataObjectBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- var timerEventDefinition = getTimerEventDefinition(listener);
- if (!timerEventDefinition) {
- return false;
- }
- return timerEventDefinition;
- };
- function createTimerEventDefinition(element, node) {
- var listener = getSelectedListener(element, node);
- if (!listener || !isTimeoutTaskListener(listener)) {
- return;
- }
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../BpmnFactory').default} BpmnFactory
+ */
- var eventDefinitions = listener.get('eventDefinitions') || [],
- timerEventDefinition = bpmnFactory.create('bpmn:TimerEventDefinition');
+/**
+ * BPMN specific create data object behavior.
+ *
+ * @param {EventBus} eventBus
+ * @param {BpmnFactory} bpmnFactory
+ */
+function CreateDataObjectBehavior(eventBus, bpmnFactory) {
- eventDefinitions.push(timerEventDefinition);
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- listener.eventDefinitions = eventDefinitions;
+ this.preExecute('shape.create', function(event) {
- return timerEventDefinition;
- }
+ var context = event.context,
+ shape = context.shape;
- var timerOptions = {
- idPrefix: 'listener-',
- createTimerEventDefinition: createTimerEventDefinition
- };
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:DataObjectReference') && shape.type !== 'label') {
- timerImplementation(group, element, bpmnFactory, timerEventDefinitionHandler, translate, timerOptions);
+ // create a DataObject every time a DataObjectReference is created
+ var dataObject = bpmnFactory.create('bpmn:DataObject');
- };
+ // set the reference to the DataObject
+ shape.businessObject.dataObjectRef = dataObject;
+ }
+ });
+}
-// helpers //////////////
+CreateDataObjectBehavior.$inject = [
+ 'eventBus',
+ 'bpmnFactory'
+];
- function isTimeoutTaskListener(listener) {
- var eventType = listener && listener.event;
- return eventType === 'timeout';
- }
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_2__["default"])(CreateDataObjectBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- function getTimerEventDefinition(bo) {
- var eventDefinitions = bo.eventDefinitions || [];
+/***/ }),
- return find(eventDefinitions, function(event) {
- return is(event, 'bpmn:TimerEventDefinition');
- });
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/CreateParticipantBehavior.js":
+/*!*******************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/CreateParticipantBehavior.js ***!
+ \*******************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ PARTICIPANT_BORDER_WIDTH: () => (/* binding */ PARTICIPANT_BORDER_WIDTH),
+/* harmony export */ "default": () => (/* binding */ CreateParticipantBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/util/ModelUtil */ "../node_modules/diagram-js/lib/util/ModelUtil.js");
+/* harmony import */ var diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/util/Elements */ "../node_modules/diagram-js/lib/util/Elements.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
- },{"../../../factory/EntryFactory":14,"../../../helper/CmdHelper":25,"../../../helper/ImplementationTypeHelper":30,"../../bpmn/parts/implementation/TimerEventDefinition":50,"./implementation/Script":110,"bpmn-js/lib/util/ModelUtil":240,"min-dash":646}],80:[function(require,module,exports){
- 'use strict';
- var assign = require('lodash/assign');
- var fieldInjection = require('./implementation/FieldInjection');
- module.exports = function(group, element, bpmnFactory, options, translate) {
- options = assign({
- idPrefix: 'listener-',
- insideListener: true
- }, options);
- var fieldInjectionEntry = fieldInjection(element, bpmnFactory, translate, options);
- if (fieldInjectionEntry && fieldInjectionEntry.length > 0) {
- group.entries = group.entries.concat(fieldInjectionEntry);
- }
- };
- },{"./implementation/FieldInjection":99,"lodash/assign":604}],81:[function(require,module,exports){
- 'use strict';
- var listener = require('./implementation/Listener');
- module.exports = function(group, element, bpmnFactory, translate) {
- var listenerEntry = listener(element, bpmnFactory, {}, translate);
- group.entries = group.entries.concat(listenerEntry.entries);
- return {
- getSelectedListener: listenerEntry.getSelectedListener
- };
- };
- },{"./implementation/Listener":106}],82:[function(require,module,exports){
- 'use strict';
+/**
+ * @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../Modeling').default} Modeling
+ */
- var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject,
- is = require('bpmn-js/lib/util/ModelUtil').is;
+var HORIZONTAL_PARTICIPANT_PADDING = 20,
+ VERTICAL_PARTICIPANT_PADDING = 20;
- var multiInstanceLoopCharacteristics = require('./implementation/MultiInstanceLoopCharacteristics');
+var PARTICIPANT_BORDER_WIDTH = 30;
- var jobRetryTimeCycle = require('./implementation/JobRetryTimeCycle'),
- asyncContinuation = require('./implementation/AsyncContinuation');
+var HIGH_PRIORITY = 2000;
- function getLoopCharacteristics(element) {
- var bo = getBusinessObject(element);
- return bo.loopCharacteristics;
- }
+/**
+ * BPMN-specific behavior for creating participants.
+ *
+ * @param {Canvas} canvas
+ * @param {EventBus} eventBus
+ * @param {Modeling} modeling
+ */
+function CreateParticipantBehavior(canvas, eventBus, modeling) {
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
+
+ // fit participant
+ eventBus.on([
+ 'create.start',
+ 'shape.move.start'
+ ], HIGH_PRIORITY, function(event) {
+ var context = event.context,
+ shape = context.shape,
+ rootElement = canvas.getRootElement();
+
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:Participant') ||
+ !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(rootElement, 'bpmn:Process') ||
+ !rootElement.children.length) {
+ return;
+ }
+
+ // ignore connections, groups and labels
+ var children = rootElement.children.filter(function(element) {
+ return !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(element, 'bpmn:Group') &&
+ !(0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_2__.isLabel)(element) &&
+ !(0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_2__.isConnection)(element);
+ });
+
+ // ensure for available children to calculate bounds
+ if (!children.length) {
+ return;
+ }
+
+ var childrenBBox = (0,diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_3__.getBBox)(children);
+
+ var participantBounds = getParticipantBounds(shape, childrenBBox);
+
+ // assign width and height
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(shape, participantBounds);
+
+ // assign create constraints
+ context.createConstraints = getParticipantCreateConstraints(shape, childrenBBox);
+ });
+
+ // force hovering process when creating first participant
+ eventBus.on('create.start', HIGH_PRIORITY, function(event) {
+ var context = event.context,
+ shape = context.shape,
+ rootElement = canvas.getRootElement(),
+ rootElementGfx = canvas.getGraphics(rootElement);
+
+ function ensureHoveringProcess(event) {
+ event.element = rootElement;
+ event.gfx = rootElementGfx;
+ }
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:Participant') && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(rootElement, 'bpmn:Process')) {
+ eventBus.on('element.hover', HIGH_PRIORITY, ensureHoveringProcess);
+
+ eventBus.once('create.cleanup', function() {
+ eventBus.off('element.hover', ensureHoveringProcess);
+ });
+ }
+ });
+
+ // turn process into collaboration when creating first participant
+ function getOrCreateCollaboration() {
+ var rootElement = canvas.getRootElement();
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(rootElement, 'bpmn:Collaboration')) {
+ return rootElement;
+ }
+
+ return modeling.makeCollaboration();
+ }
+
+ // when creating mutliple elements through `elements.create` parent must be set to collaboration
+ // and passed to `shape.create` as hint
+ this.preExecute('elements.create', HIGH_PRIORITY, function(context) {
+ var elements = context.elements,
+ parent = context.parent,
+ participant = findParticipant(elements),
+ hints;
+
+ if (participant && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(parent, 'bpmn:Process')) {
+ context.parent = getOrCreateCollaboration();
+
+ hints = context.hints = context.hints || {};
+
+ hints.participant = participant;
+ hints.process = parent;
+ hints.processRef = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(participant).get('processRef');
+ }
+ }, true);
+
+ // when creating single shape through `shape.create` parent must be set to collaboration
+ // unless it was already set through `elements.create`
+ this.preExecute('shape.create', function(context) {
+ var parent = context.parent,
+ shape = context.shape;
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:Participant') && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(parent, 'bpmn:Process')) {
+ context.parent = getOrCreateCollaboration();
+
+ context.process = parent;
+ context.processRef = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(shape).get('processRef');
+ }
+ }, true);
+
+ // #execute necessary because #preExecute not called on CommandStack#redo
+ this.execute('shape.create', function(context) {
+ var hints = context.hints || {},
+ process = context.process || hints.process,
+ shape = context.shape,
+ participant = hints.participant;
+
+ // both shape.create and elements.create must be handled
+ if (process && (!participant || shape === participant)) {
+
+ // monkey-patch process ref
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(shape).set('processRef', (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(process));
+ }
+ }, true);
+
+ this.revert('shape.create', function(context) {
+ var hints = context.hints || {},
+ process = context.process || hints.process,
+ processRef = context.processRef || hints.processRef,
+ shape = context.shape,
+ participant = hints.participant;
+
+ // both shape.create and elements.create must be handled
+ if (process && (!participant || shape === participant)) {
+
+ // monkey-patch process ref
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(shape).set('processRef', processRef);
+ }
+ }, true);
+
+ this.postExecute('shape.create', function(context) {
+ var hints = context.hints || {},
+ process = context.process || context.hints.process,
+ shape = context.shape,
+ participant = hints.participant;
+
+ if (process) {
+ var children = process.children.slice();
+
+ // both shape.create and elements.create must be handled
+ if (!participant) {
+ modeling.moveElements(children, { x: 0, y: 0 }, shape);
+ } else if (shape === participant) {
+ modeling.moveElements(children, { x: 0, y: 0 }, participant);
+ }
+ }
+ }, true);
+}
+
+CreateParticipantBehavior.$inject = [
+ 'canvas',
+ 'eventBus',
+ 'modeling'
+];
+
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_5__["default"])(CreateParticipantBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
+
+// helpers //////////
+
+function getParticipantBounds(shape, childrenBBox) {
+ childrenBBox = {
+ width: childrenBBox.width + HORIZONTAL_PARTICIPANT_PADDING * 2 + PARTICIPANT_BORDER_WIDTH,
+ height: childrenBBox.height + VERTICAL_PARTICIPANT_PADDING * 2
+ };
+
+ var width = Math.max(shape.width, childrenBBox.width),
+ height = Math.max(shape.height, childrenBBox.height);
+
+ return {
+ x: -width / 2,
+ y: -height / 2,
+ width: width,
+ height: height
+ };
+}
+
+function getParticipantCreateConstraints(shape, childrenBBox) {
+ childrenBBox = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_6__.asTRBL)(childrenBBox);
+
+ return {
+ bottom: childrenBBox.top + shape.height / 2 - VERTICAL_PARTICIPANT_PADDING,
+ left: childrenBBox.right - shape.width / 2 + HORIZONTAL_PARTICIPANT_PADDING,
+ top: childrenBBox.bottom - shape.height / 2 + VERTICAL_PARTICIPANT_PADDING,
+ right: childrenBBox.left + shape.width / 2 - HORIZONTAL_PARTICIPANT_PADDING - PARTICIPANT_BORDER_WIDTH
+ };
+}
+
+function findParticipant(elements) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.find)(elements, function(element) {
+ return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(element, 'bpmn:Participant');
+ });
+}
+
+/***/ }),
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/DataInputAssociationBehavior.js":
+/*!**********************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/DataInputAssociationBehavior.js ***!
+ \**********************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ DataInputAssociationBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/util/Collections */ "../node_modules/diagram-js/lib/util/Collections.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- function ensureMultiInstanceSupported(element) {
- var loopCharacteristics = getLoopCharacteristics(element);
- return !!loopCharacteristics && is(loopCharacteristics, 'camunda:Collectable');
- }
- module.exports = function(group, element, bpmnFactory, translate) {
- if (!ensureMultiInstanceSupported(element)) {
- return;
- }
- // multi instance properties
- group.entries = group.entries.concat(multiInstanceLoopCharacteristics(element, bpmnFactory, translate));
- // async continuation ///////////////////////////////////////////////////////
- group.entries = group.entries.concat(asyncContinuation(element, bpmnFactory, {
- getBusinessObject: getLoopCharacteristics,
- idPrefix: 'multiInstance-',
- labelPrefix: translate('Multi Instance ')
- }, translate));
- // retry time cycle //////////////////////////////////////////////////////////
- group.entries = group.entries.concat(jobRetryTimeCycle(element, bpmnFactory, {
- getBusinessObject: getLoopCharacteristics,
- idPrefix: 'multiInstance-',
- labelPrefix: translate('Multi Instance ')
- }, translate));
- };
- },{"./implementation/AsyncContinuation":91,"./implementation/JobRetryTimeCycle":105,"./implementation/MultiInstanceLoopCharacteristics":107,"bpmn-js/lib/util/ModelUtil":240}],83:[function(require,module,exports){
- 'use strict';
- var properties = require('./implementation/Properties'),
- elementHelper = require('../../../helper/ElementHelper'),
- cmdHelper = require('../../../helper/CmdHelper');
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../BpmnFactory').default} BpmnFactory
+ */
- module.exports = function(group, element, bpmnFactory, translate) {
+var TARGET_REF_PLACEHOLDER_NAME = '__targetRef_placeholder';
- var propertiesEntry = properties(element, bpmnFactory, {
- id: 'properties',
- modelProperties: [ 'name', 'value' ],
- labels: [ translate('Name'), translate('Value') ],
- getParent: function(element, node, bo) {
- return bo.extensionElements;
- },
+/**
+ * This behavior makes sure we always set a fake
+ * DataInputAssociation#targetRef as demanded by the BPMN 2.0
+ * XSD schema.
+ *
+ * The reference is set to a bpmn:Property{ name: '__targetRef_placeholder' }
+ * which is created on the fly and cleaned up afterwards if not needed
+ * anymore.
+ *
+ * @param {EventBus} eventBus
+ * @param {BpmnFactory} bpmnFactory
+ */
+function DataInputAssociationBehavior(eventBus, bpmnFactory) {
- createParent: function(element, bo) {
- var parent = elementHelper.createElement('bpmn:ExtensionElements', { values: [] }, bo, bpmnFactory);
- var cmd = cmdHelper.updateBusinessObject(element, bo, { extensionElements: parent });
- return {
- cmd: cmd,
- parent: parent
- };
- }
- }, translate);
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- if (propertiesEntry) {
- group.entries.push(propertiesEntry);
- }
- };
+ this.executed([
+ 'connection.create',
+ 'connection.delete',
+ 'connection.move',
+ 'connection.reconnect'
+ ], ifDataInputAssociation(fixTargetRef));
- },{"../../../helper/CmdHelper":25,"../../../helper/ElementHelper":26,"./implementation/Properties":108}],84:[function(require,module,exports){
- 'use strict';
+ this.reverted([
+ 'connection.create',
+ 'connection.delete',
+ 'connection.move',
+ 'connection.reconnect'
+ ], ifDataInputAssociation(fixTargetRef));
- var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject,
- is = require('bpmn-js/lib/util/ModelUtil').is,
- entryFactory = require('../../../factory/EntryFactory'),
- cmdHelper = require('../../../helper/CmdHelper'),
- scriptImplementation = require('./implementation/Script');
+ function usesTargetRef(element, targetRef, removedConnection) {
- module.exports = function(group, element, bpmnFactory, translate) {
- var bo;
+ var inputAssociations = element.get('dataInputAssociations');
- if (is(element, 'bpmn:ScriptTask')) {
- bo = getBusinessObject(element);
- }
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.find)(inputAssociations, function(association) {
+ return association !== removedConnection &&
+ association.targetRef === targetRef;
+ });
+ }
- if (!bo) {
- return;
- }
+ function getTargetRef(element, create) {
- var script = scriptImplementation('scriptFormat', 'script', false, translate);
- group.entries.push({
- id: 'script-implementation',
- label: translate('Script'),
- html: script.template,
+ var properties = element.get('properties');
- get: function(element) {
- return script.get(element, bo);
- },
+ var targetRefProp = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.find)(properties, function(p) {
+ return p.name === TARGET_REF_PLACEHOLDER_NAME;
+ });
- set: function(element, values, containerElement) {
- var properties = script.set(element, values, containerElement);
+ if (!targetRefProp && create) {
+ targetRefProp = bpmnFactory.create('bpmn:Property', {
+ name: TARGET_REF_PLACEHOLDER_NAME
+ });
- return cmdHelper.updateProperties(element, properties);
- },
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_2__.add)(properties, targetRefProp);
+ }
- validate: function(element, values) {
- return script.validate(element, values);
- },
+ return targetRefProp;
+ }
- script : script,
+ function cleanupTargetRef(element, connection) {
- cssClasses: ['bpp-textfield']
+ var targetRefProp = getTargetRef(element);
- });
+ if (!targetRefProp) {
+ return;
+ }
- group.entries.push(entryFactory.textField({
- id : 'scriptResultVariable',
- label : translate('Result Variable'),
- modelProperty : 'scriptResultVariable',
+ if (!usesTargetRef(element, targetRefProp, connection)) {
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_2__.remove)(element.get('properties'), targetRefProp);
+ }
+ }
- get: function(element, propertyName) {
- var boResultVariable = bo.get('camunda:resultVariable');
+ /**
+ * Make sure targetRef is set to a valid property or
+ * `null` if the connection is detached.
+ *
+ * @param {Event} event
+ */
+ function fixTargetRef(event) {
+
+ var context = event.context,
+ connection = context.connection,
+ connectionBo = connection.businessObject,
+ target = connection.target,
+ targetBo = target && target.businessObject,
+ newTarget = context.newTarget,
+ newTargetBo = newTarget && newTarget.businessObject,
+ oldTarget = context.oldTarget || context.target,
+ oldTargetBo = oldTarget && oldTarget.businessObject;
+
+ var dataAssociation = connection.businessObject,
+ targetRefProp;
+
+ if (oldTargetBo && oldTargetBo !== targetBo) {
+ cleanupTargetRef(oldTargetBo, connectionBo);
+ }
+
+ if (newTargetBo && newTargetBo !== targetBo) {
+ cleanupTargetRef(newTargetBo, connectionBo);
+ }
+
+ if (targetBo) {
+ targetRefProp = getTargetRef(targetBo, true);
+ dataAssociation.targetRef = targetRefProp;
+ } else {
+ dataAssociation.targetRef = null;
+ }
+ }
+}
+
+DataInputAssociationBehavior.$inject = [
+ 'eventBus',
+ 'bpmnFactory'
+];
+
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_3__["default"])(DataInputAssociationBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
+
+
+/**
+ * Only call the given function when the event
+ * changes a bpmn:DataInputAssociation.
+ *
+ * @param {Function} fn
+ * @return {Function}
+ */
+function ifDataInputAssociation(fn) {
- return { scriptResultVariable : boResultVariable };
- },
+ return function(event) {
+ var context = event.context,
+ connection = context.connection;
- set: function(element, values, containerElement) {
- return cmdHelper.updateProperties(element, {
- 'camunda:resultVariable': values.scriptResultVariable.length
- ? values.scriptResultVariable
- : undefined
- });
- }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(connection, 'bpmn:DataInputAssociation')) {
+ return fn(event);
+ }
+ };
+}
- }));
+/***/ }),
- };
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/DataStoreBehavior.js":
+/*!***********************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/DataStoreBehavior.js ***!
+ \***********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- },{"../../../factory/EntryFactory":14,"../../../helper/CmdHelper":25,"./implementation/Script":110,"bpmn-js/lib/util/ModelUtil":240}],85:[function(require,module,exports){
- 'use strict';
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ DataStoreBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/ModelingUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _cmd_UpdateSemanticParentHandler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../cmd/UpdateSemanticParentHandler */ "../node_modules/bpmn-js/lib/features/modeling/cmd/UpdateSemanticParentHandler.js");
- var ImplementationTypeHelper = require('../../../helper/ImplementationTypeHelper'),
- InputOutputHelper = require('../../../helper/InputOutputHelper');
- var utils = require('../../../Utils'),
- escapeHTML = utils.escapeHTML,
- triggerClickEvent = utils.triggerClickEvent;
- var implementationType = require('./implementation/ImplementationType'),
- delegate = require('./implementation/Delegate'),
- external = require('./implementation/External'),
- callable = require('./implementation/Callable'),
- resultVariable = require('./implementation/ResultVariable');
- var entryFactory = require('../../../factory/EntryFactory');
- var domQuery = require('min-dom').query,
- domClosest = require('min-dom').closest,
- domClasses = require('min-dom').classes;
- function getImplementationType(element) {
- return ImplementationTypeHelper.getImplementationType(element);
- }
- function getBusinessObject(element) {
- return ImplementationTypeHelper.getServiceTaskLikeBusinessObject(element);
- }
- function isDmnCapable(element) {
- return ImplementationTypeHelper.isDmnCapable(element);
- }
- function isExternalCapable(element) {
- return ImplementationTypeHelper.isExternalCapable(element);
- }
- function isServiceTaskLike(element) {
- return ImplementationTypeHelper.isServiceTaskLike(element);
- }
+/**
+ * @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
+ * @typedef {import('diagram-js/lib/command/CommandStack').default} CommandStack
+ * @typedef {import('diagram-js/lib/core/ElementRegistry').default} ElementRegistry
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ */
- module.exports = function(group, element, bpmnFactory, translate) {
+/**
+ * BPMN specific data store behavior.
+ *
+ * @param {Canvas} canvas
+ * @param {CommandStack} commandStack
+ * @param {ElementRegistry} elementRegistry
+ * @param {EventBus} eventBus
+ */
+function DataStoreBehavior(
+ canvas, commandStack, elementRegistry,
+ eventBus) {
- if (!isServiceTaskLike(getBusinessObject(element))) {
- return;
- }
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- var hasDmnSupport = isDmnCapable(element);
- var hasExternalSupport = isExternalCapable(getBusinessObject(element));
+ commandStack.registerHandler('dataStore.updateContainment', _cmd_UpdateSemanticParentHandler__WEBPACK_IMPORTED_MODULE_1__["default"]);
- // implementation type ////////////////////////////////////
+ function getFirstParticipantWithProcessRef() {
+ return elementRegistry.filter(function(element) {
+ return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(element, 'bpmn:Participant') && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(element).processRef;
+ })[0];
+ }
- group.entries = group.entries.concat(implementationType(element, bpmnFactory, {
- getBusinessObject: getBusinessObject,
- getImplementationType: getImplementationType,
- hasDmnSupport: hasDmnSupport,
- hasExternalSupport: hasExternalSupport,
- hasServiceTaskLikeSupport: true
- }, translate));
+ function getDataStores(element) {
+ return element.children.filter(function(child) {
+ return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(child, 'bpmn:DataStoreReference') && !child.labelTarget;
+ });
+ }
+ function updateDataStoreParent(dataStore, newDataStoreParent) {
+ var dataStoreBo = dataStore.businessObject || dataStore;
- // delegate (class, expression, delegateExpression) //////////
+ newDataStoreParent = newDataStoreParent || getFirstParticipantWithProcessRef();
- group.entries = group.entries.concat(delegate(element, bpmnFactory, {
- getBusinessObject: getBusinessObject,
- getImplementationType: getImplementationType
- }, translate));
+ if (newDataStoreParent) {
+ var newDataStoreParentBo = newDataStoreParent.businessObject || newDataStoreParent;
+ commandStack.execute('dataStore.updateContainment', {
+ dataStoreBo: dataStoreBo,
+ dataStoreDi: (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getDi)(dataStore),
+ newSemanticParent: newDataStoreParentBo.processRef || newDataStoreParentBo,
+ newDiParent: (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getDi)(newDataStoreParent)
+ });
+ }
+ }
- // result variable /////////////////////////////////////////
- group.entries = group.entries.concat(resultVariable(element, bpmnFactory, {
- getBusinessObject: getBusinessObject,
- getImplementationType: getImplementationType,
- hideResultVariable: function(element, node) {
- return getImplementationType(element) !== 'expression';
- }
- }, translate));
+ // disable auto-resize for data stores
+ this.preExecute('shape.create', function(event) {
- // external //////////////////////////////////////////////////
+ var context = event.context,
+ shape = context.shape;
- if (hasExternalSupport) {
- group.entries = group.entries.concat(external(element, bpmnFactory, {
- getBusinessObject: getBusinessObject,
- getImplementationType: getImplementationType
- }, translate));
- }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:DataStoreReference') &&
+ shape.type !== 'label') {
+ if (!context.hints) {
+ context.hints = {};
+ }
- // dmn ////////////////////////////////////////////////////////
+ // prevent auto resizing
+ context.hints.autoResize = false;
+ }
+ });
- if (hasDmnSupport) {
- group.entries = group.entries.concat(callable(element, bpmnFactory, {
- getCallableType: getImplementationType
- }, translate));
- }
+ // disable auto-resize for data stores
+ this.preExecute('elements.move', function(event) {
+ var context = event.context,
+ shapes = context.shapes;
- // connector ////////////////////////////////////////////////
+ var dataStoreReferences = shapes.filter(function(shape) {
+ return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:DataStoreReference');
+ });
- var isConnector = function(element) {
- return getImplementationType(element) === 'connector';
- };
+ if (dataStoreReferences.length) {
+ if (!context.hints) {
+ context.hints = {};
+ }
- group.entries.push(entryFactory.link({
- id: 'configureConnectorLink',
- label: translate('Configure Connector'),
- handleClick: function(element, node, event) {
+ // prevent auto resizing for data store references
+ context.hints.autoResize = shapes.filter(function(shape) {
+ return !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:DataStoreReference');
+ });
+ }
+ });
- var connectorTabEl = getTabNode(node, 'connector');
- if (connectorTabEl) {
- triggerClickEvent(connectorTabEl);
- }
+ // update parent on data store created
+ this.postExecute('shape.create', function(event) {
+ var context = event.context,
+ shape = context.shape,
+ parent = shape.parent;
- // suppress actual link click
- return false;
- },
- showLink: function(element, node) {
- var link = domQuery('a', node);
- link.textContent = '';
-
- domClasses(link).remove('bpp-error-message');
-
- if (isConnector(element)) {
- var connectorId = InputOutputHelper.getConnector(element).get('connectorId');
- if (connectorId) {
- link.textContent = translate('Configure Connector');
- } else {
- link.innerHTML = ' ' + escapeHTML(translate('Must configure Connector'));
- domClasses(link).add('bpp-error-message');
- }
- return true;
- }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:DataStoreReference') &&
+ shape.type !== 'label' &&
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(parent, 'bpmn:Collaboration')) {
- return false;
- }
- }));
+ updateDataStoreParent(shape);
+ }
+ });
- };
+ // update parent on data store moved
+ this.postExecute('shape.move', function(event) {
+ var context = event.context,
+ shape = context.shape,
+ oldParent = context.oldParent,
+ parent = shape.parent;
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(oldParent, 'bpmn:Collaboration')) {
-// helpers ///////////////////////////
+ // do nothing if not necessary
+ return;
+ }
- function getTabNode(el, id) {
- var containerEl = domClosest(el, '.bpp-properties-panel');
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:DataStoreReference') &&
+ shape.type !== 'label' &&
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(parent, 'bpmn:Collaboration')) {
- return domQuery('a[data-tab-target="' + id + '"]', containerEl);
- }
- },{"../../../Utils":5,"../../../factory/EntryFactory":14,"../../../helper/ImplementationTypeHelper":30,"../../../helper/InputOutputHelper":31,"./implementation/Callable":92,"./implementation/Delegate":94,"./implementation/External":97,"./implementation/ImplementationType":101,"./implementation/ResultVariable":109,"min-dom":647}],86:[function(require,module,exports){
- 'use strict';
+ var participant = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(oldParent, 'bpmn:Participant') ?
+ oldParent :
+ getAncestor(oldParent, 'bpmn:Participant');
- var entryFactory = require('../../../factory/EntryFactory'),
- is = require('bpmn-js/lib/util/ModelUtil').is,
- getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject;
+ updateDataStoreParent(shape, participant);
+ }
+ });
- module.exports = function(group, element, translate) {
+ // update data store parents on participant or subprocess deleted
+ this.postExecute('shape.delete', function(event) {
+ var context = event.context,
+ shape = context.shape,
+ rootElement = canvas.getRootElement();
- var bo = getBusinessObject(element);
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.isAny)(shape, [ 'bpmn:Participant', 'bpmn:SubProcess' ])
+ && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(rootElement, 'bpmn:Collaboration')) {
+ getDataStores(rootElement)
+ .filter(function(dataStore) {
+ return isDescendant(dataStore, shape);
+ })
+ .forEach(function(dataStore) {
+ updateDataStoreParent(dataStore);
+ });
+ }
+ });
- if (!bo) {
- return;
- }
+ // update data store parents on collaboration -> process
+ this.postExecute('canvas.updateRoot', function(event) {
+ var context = event.context,
+ oldRoot = context.oldRoot,
+ newRoot = context.newRoot;
- if (is(element, 'camunda:Initiator') && !is(element.parent, 'bpmn:SubProcess')) {
- group.entries.push(entryFactory.textField({
- id: 'initiator',
- label: translate('Initiator'),
- modelProperty: 'initiator'
- }));
- }
- };
+ var dataStores = getDataStores(oldRoot);
- },{"../../../factory/EntryFactory":14,"bpmn-js/lib/util/ModelUtil":240}],87:[function(require,module,exports){
- 'use strict';
+ dataStores.forEach(function(dataStore) {
- var is = require('bpmn-js/lib/util/ModelUtil').is,
- getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject;
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(newRoot, 'bpmn:Process')) {
+ updateDataStoreParent(dataStore, newRoot);
+ }
- var tasklist = require('./implementation/Tasklist');
+ });
+ });
+}
- module.exports = function(group, element, bpmnFactory, translate) {
- var businessObject = getBusinessObject(element);
+DataStoreBehavior.$inject = [
+ 'canvas',
+ 'commandStack',
+ 'elementRegistry',
+ 'eventBus',
+];
- if (is(element, 'camunda:Process') ||
- is(element, 'bpmn:Participant') && businessObject.get('processRef')) {
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_3__["default"])(DataStoreBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- group.entries = group.entries.concat(tasklist(element, bpmnFactory, {
- getBusinessObject: function(element) {
- var bo = getBusinessObject(element);
- if (!is(bo, 'bpmn:Participant')) {
- return bo;
- }
+// helpers //////////
- return bo.get('processRef');
- }
- }, translate));
+function isDescendant(descendant, ancestor) {
+ var descendantBo = descendant.businessObject || descendant,
+ ancestorBo = ancestor.businessObject || ancestor;
- }
- };
+ while (descendantBo.$parent) {
+ if (descendantBo.$parent === ancestorBo.processRef || ancestorBo) {
+ return true;
+ }
- },{"./implementation/Tasklist":111,"bpmn-js/lib/util/ModelUtil":240}],88:[function(require,module,exports){
- 'use strict';
+ descendantBo = descendantBo.$parent;
+ }
- var is = require('bpmn-js/lib/util/ModelUtil').is,
- entryFactory = require('../../../factory/EntryFactory');
+ return false;
+}
+function getAncestor(element, type) {
- module.exports = function(group, element, translate) {
- if (is(element, 'camunda:Assignable')) {
+ while (element.parent) {
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(element.parent, type)) {
+ return element.parent;
+ }
- // Assignee
- group.entries.push(entryFactory.textField({
- id : 'assignee',
- label : translate('Assignee'),
- modelProperty : 'assignee'
- }));
+ element = element.parent;
+ }
+}
- // Candidate Users
- group.entries.push(entryFactory.textField({
- id : 'candidateUsers',
- label : translate('Candidate Users'),
- modelProperty : 'candidateUsers'
- }));
+/***/ }),
- // Candidate Groups
- group.entries.push(entryFactory.textField({
- id : 'candidateGroups',
- label : translate('Candidate Groups'),
- modelProperty : 'candidateGroups'
- }));
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/DeleteLaneBehavior.js":
+/*!************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/DeleteLaneBehavior.js ***!
+ \************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- // Due Date
- group.entries.push(entryFactory.textField({
- id : 'dueDate',
- description : translate('The due date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)'),
- label : translate('Due Date'),
- modelProperty : 'dueDate'
- }));
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ DeleteLaneBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_LaneUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/LaneUtil */ "../node_modules/bpmn-js/lib/features/modeling/util/LaneUtil.js");
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
+/* harmony import */ var diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/util/Elements */ "../node_modules/diagram-js/lib/util/Elements.js");
- // FollowUp Date
- group.entries.push(entryFactory.textField({
- id : 'followUpDate',
- description : translate('The follow up date as an EL expression (e.g. ${someDate} or an ' +
- 'ISO date (e.g. 2015-06-26T09:54:00)'),
- label : translate('Follow Up Date'),
- modelProperty : 'followUpDate'
- }));
- // priority
- group.entries.push(entryFactory.textField({
- id : 'priority',
- label : translate('Priority'),
- modelProperty : 'priority'
- }));
- }
- };
- },{"../../../factory/EntryFactory":14,"bpmn-js/lib/util/ModelUtil":240}],89:[function(require,module,exports){
- 'use strict';
- var is = require('bpmn-js/lib/util/ModelUtil').is,
- isAny = require('bpmn-js/lib/features/modeling/util/ModelingUtil').isAny,
- getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject;
- var filter = require('lodash/filter');
- var extensionElementsHelper = require('../../../helper/ExtensionElementsHelper'),
- cmdHelper = require('../../../helper/CmdHelper'),
- elementHelper = require('../../../helper/ElementHelper'),
- eventDefinitionHelper = require('../../../helper/EventDefinitionHelper');
- var extensionElementsEntry = require('./implementation/ExtensionElements');
- var entryFactory = require('../../../factory/EntryFactory');
- /**
- * return depend on parameter 'type' camunda:in or camunda:out extension elements
- */
- function getCamundaInOutMappings(element, type) {
- var bo = getBusinessObject(element);
- var signalEventDefinition = eventDefinitionHelper.getSignalEventDefinition(bo);
- return extensionElementsHelper.getExtensionElements(signalEventDefinition || bo, type) || [];
- }
- /**
- * return depend on parameter 'type' camunda:in or camunda:out extension elements
- * with source or sourceExpression attribute
- */
- function getVariableMappings(element, type) {
- var camundaMappings = getCamundaInOutMappings(element, type);
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../../space-tool/BpmnSpaceTool').default} SpaceTool
+ */
- return filter(camundaMappings, function(mapping) {
- return !mapping.businessKey;
- });
- }
+var LOW_PRIORITY = 500;
- function getInOutType(mapping) {
- var inOutType = 'source';
- if (mapping.variables === 'all') {
- inOutType = 'variables';
- }
- else if (typeof mapping.source !== 'undefined') {
- inOutType = 'source';
- }
- else if (typeof mapping.sourceExpression !== 'undefined') {
- inOutType = 'sourceExpression';
- }
+/**
+ * BPMN specific delete lane behavior.
+ *
+ * @param {EventBus} eventBus
+ * @param {SpaceTool} spaceTool
+ */
+function DeleteLaneBehavior(eventBus, spaceTool) {
- return inOutType;
- }
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- var CAMUNDA_IN_EXTENSION_ELEMENT = 'camunda:In',
- CAMUNDA_OUT_EXTENSION_ELEMENT = 'camunda:Out';
- var WHITESPACE_REGEX = /\s/;
+ function compensateLaneDelete(shape, oldParent) {
+ var isHorizontalLane = (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_1__.isHorizontal)(shape);
+ var siblings = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_2__.getChildLanes)(oldParent);
- module.exports = function(group, element, bpmnFactory, translate) {
+ var topAffected = [];
+ var bottomAffected = [];
+ var leftAffected = [];
+ var rightAffected = [];
- var inOutTypeOptions = [
- {
- name: translate('Source'),
- value: 'source'
- },
- {
- name: translate('Source Expression'),
- value: 'sourceExpression'
- },
- {
- name: translate('All'),
- value: 'variables'
- }
- ];
+ (0,diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_3__.eachElement)(siblings, function(element) {
- var signalEventDefinition = eventDefinitionHelper.getSignalEventDefinition(element);
+ if (isHorizontalLane) {
+ if (element.y > shape.y) {
+ bottomAffected.push(element);
+ } else {
+ topAffected.push(element);
+ }
+ } else {
+ if (element.x > shape.x) {
+ rightAffected.push(element);
+ } else {
+ leftAffected.push(element);
+ }
+ }
+
+ return element.children;
+ });
+
+ if (!siblings.length) {
+ return;
+ }
+
+ var offset;
+
+ if (isHorizontalLane) {
+ if (bottomAffected.length && topAffected.length) {
+ offset = shape.height / 2;
+ } else {
+ offset = shape.height;
+ }
+ } else {
+ if (rightAffected.length && leftAffected.length) {
+ offset = shape.width / 2;
+ } else {
+ offset = shape.width;
+ }
+ }
+
+ var topAdjustments,
+ bottomAdjustments,
+ leftAdjustments,
+ rightAdjustments;
+
+ if (topAffected.length) {
+ topAdjustments = spaceTool.calculateAdjustments(
+ topAffected, 'y', offset, shape.y - 10);
+
+ spaceTool.makeSpace(
+ topAdjustments.movingShapes,
+ topAdjustments.resizingShapes,
+ { x: 0, y: offset }, 's');
+ }
+
+ if (bottomAffected.length) {
+ bottomAdjustments = spaceTool.calculateAdjustments(
+ bottomAffected, 'y', -offset, shape.y + shape.height + 10);
+
+ spaceTool.makeSpace(
+ bottomAdjustments.movingShapes,
+ bottomAdjustments.resizingShapes,
+ { x: 0, y: -offset }, 'n');
+ }
+
+ if (leftAffected.length) {
+ leftAdjustments = spaceTool.calculateAdjustments(
+ leftAffected, 'x', offset, shape.x - 10);
+
+ spaceTool.makeSpace(
+ leftAdjustments.movingShapes,
+ leftAdjustments.resizingShapes,
+ { x: offset, y: 0 }, 'e');
+ }
+
+ if (rightAffected.length) {
+ rightAdjustments = spaceTool.calculateAdjustments(
+ rightAffected, 'x', -offset, shape.x + shape.width + 10);
+
+ spaceTool.makeSpace(
+ rightAdjustments.movingShapes,
+ rightAdjustments.resizingShapes,
+ { x: -offset, y: 0 }, 'w');
+ }
+ }
+
+
+ /**
+ * Adjust sizes of other lanes after lane deletion
+ */
+ this.postExecuted('shape.delete', LOW_PRIORITY, function(event) {
- if (!is(element, 'camunda:CallActivity') && !signalEventDefinition) {
- return;
- }
+ var context = event.context,
+ hints = context.hints,
+ shape = context.shape,
+ oldParent = context.oldParent;
- if (signalEventDefinition && !(isAny(element, [
- 'bpmn:IntermediateThrowEvent',
- 'bpmn:EndEvent'
- ]))) {
- return;
- }
+ // only compensate lane deletes
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(shape, 'bpmn:Lane')) {
+ return;
+ }
- var isSelected = function(element, node) {
- return !!getSelected(element, node);
- };
+ // compensate root deletes only
+ if (hints && hints.nested) {
+ return;
+ }
- var getSelected = function(element, node) {
- var parentNode = node.parentNode;
- var selection = inEntry.getSelected(element, parentNode);
+ compensateLaneDelete(shape, oldParent);
+ });
+}
- var parameter = getVariableMappings(element, CAMUNDA_IN_EXTENSION_ELEMENT)[selection.idx];
+DeleteLaneBehavior.$inject = [
+ 'eventBus',
+ 'spaceTool'
+];
- if (!parameter && outEntry) {
- selection = outEntry.getSelected(element, parentNode);
- parameter = getVariableMappings(element, CAMUNDA_OUT_EXTENSION_ELEMENT)[selection.idx];
- }
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_5__["default"])(DeleteLaneBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- return parameter;
- };
+/***/ }),
- var setOptionLabelValue = function(type) {
- return function(element, node, option, property, value, idx) {
- var variableMappings = getVariableMappings(element, type);
- var mappingValue = variableMappings[idx];
- var label = (mappingValue.target || '') + ' := ';
- var mappingType = getInOutType(mappingValue);
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/DetachEventBehavior.js":
+/*!*************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/DetachEventBehavior.js ***!
+ \*************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- if (mappingType === 'variables') {
- label = 'all';
- }
- else if (mappingType === 'source') {
- label = label + (mappingValue.source || '');
- }
- else if (mappingType === 'sourceExpression') {
- label = label + (mappingValue.sourceExpression || '');
- } else {
- label = label + '';
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ DetachEventBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../util/LabelUtil */ "../node_modules/diagram-js/lib/util/ModelUtil.js");
- option.text = label;
- };
- };
- var newElement = function(type) {
- return function(element, extensionElements, value) {
- var newElem = elementHelper.createElement(type, { source: '' }, extensionElements, bpmnFactory);
- return cmdHelper.addElementsTolist(element, extensionElements, 'values', [ newElem ]);
- };
- };
- var removeElement = function(type) {
- return function(element, extensionElements, value, idx) {
- var variablesMappings= getVariableMappings(element, type);
- var mapping = variablesMappings[idx];
- if (mapping) {
- return extensionElementsHelper
- .removeEntry(signalEventDefinition || getBusinessObject(element), element, mapping);
- }
- };
- };
- // in mapping for source and sourceExpression ///////////////////////////////////////////////////////////////
- var inEntry = extensionElementsEntry(element, bpmnFactory, {
- id: 'variableMapping-in',
- label: translate('In Mapping'),
- modelProperty: 'source',
- prefix: 'In',
- idGeneration: false,
- resizable: true,
- businessObject: signalEventDefinition || getBusinessObject(element),
- createExtensionElement: newElement(CAMUNDA_IN_EXTENSION_ELEMENT),
- removeExtensionElement: removeElement(CAMUNDA_IN_EXTENSION_ELEMENT),
+/**
+ * @typedef {import('../../replace/BpmnReplace').default} BpmnReplace
+ * @typedef {import('didi').Injector} Injector
+ */
- getExtensionElements: function(element) {
- return getVariableMappings(element, CAMUNDA_IN_EXTENSION_ELEMENT);
- },
+var LOW_PRIORITY = 500;
- onSelectionChange: function(element, node, event, scope) {
- outEntry && outEntry.deselect(element, node.parentNode);
- },
- setOptionLabelValue: setOptionLabelValue(CAMUNDA_IN_EXTENSION_ELEMENT)
- });
- group.entries.push(inEntry);
+/**
+ * Replace boundary event with intermediate event when creating or moving results in detached event.
+ *
+ * @param {BpmnReplace} bpmnReplace
+ * @param {Injector} injector
+ */
+function DetachEventBehavior(bpmnReplace, injector) {
+ injector.invoke(diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"], this);
- // out mapping for source and sourceExpression ///////////////////////////////////////////////////////
+ this._bpmnReplace = bpmnReplace;
- if (!signalEventDefinition) {
- var outEntry = extensionElementsEntry(element, bpmnFactory, {
- id: 'variableMapping-out',
- label: translate('Out Mapping'),
- modelProperty: 'source',
- prefix: 'Out',
- idGeneration: false,
- resizable: true,
+ var self = this;
- createExtensionElement: newElement(CAMUNDA_OUT_EXTENSION_ELEMENT),
- removeExtensionElement: removeElement(CAMUNDA_OUT_EXTENSION_ELEMENT),
+ this.postExecuted('elements.create', LOW_PRIORITY, function(context) {
+ var elements = context.elements;
- getExtensionElements: function(element) {
- return getVariableMappings(element, CAMUNDA_OUT_EXTENSION_ELEMENT);
- },
+ elements.filter(function(shape) {
+ var host = shape.host;
- onSelectionChange: function(element, node, event, scope) {
- inEntry.deselect(element, node.parentNode);
- },
+ return shouldReplace(shape, host);
+ }).map(function(shape) {
+ return elements.indexOf(shape);
+ }).forEach(function(index) {
+ context.elements[ index ] = self._replaceShape(elements[ index ]);
+ });
+ }, true);
- setOptionLabelValue: setOptionLabelValue(CAMUNDA_OUT_EXTENSION_ELEMENT)
- });
- group.entries.push(outEntry);
- }
+ this.preExecute('elements.move', LOW_PRIORITY, function(context) {
+ var shapes = context.shapes,
+ newHost = context.newHost;
- // label for selected mapping ///////////////////////////////////////////////////////
+ shapes.forEach(function(shape, index) {
+ var host = shape.host;
- group.entries.push(entryFactory.label({
- id: 'variableMapping-typeLabel',
- get: function(element, node) {
- var mapping = getSelected(element, node);
+ if (shouldReplace(shape, includes(shapes, host) ? host : newHost)) {
+ shapes[ index ] = self._replaceShape(shape);
+ }
+ });
+ }, true);
+}
- var value = '';
- if (is(mapping, CAMUNDA_IN_EXTENSION_ELEMENT)) {
- value = translate('In Mapping');
- }
- else if (is(mapping, CAMUNDA_OUT_EXTENSION_ELEMENT)) {
- value = translate('Out Mapping');
- }
+DetachEventBehavior.$inject = [
+ 'bpmnReplace',
+ 'injector'
+];
- return {
- label: value
- };
- },
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_1__["default"])(DetachEventBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- showLabel: function(element, node) {
- return isSelected(element, node);
- }
- }));
+DetachEventBehavior.prototype._replaceShape = function(shape) {
+ var eventDefinition = getEventDefinition(shape),
+ intermediateEvent;
+ if (eventDefinition) {
+ intermediateEvent = {
+ type: 'bpmn:IntermediateCatchEvent',
+ eventDefinitionType: eventDefinition.$type
+ };
+ } else {
+ intermediateEvent = {
+ type: 'bpmn:IntermediateThrowEvent'
+ };
+ }
- group.entries.push(entryFactory.selectBox({
- id: 'variableMapping-inOutType',
- label: translate('Type'),
- selectOptions: inOutTypeOptions,
- modelProperty: 'inOutType',
- get: function(element, node) {
- var mapping = getSelected(element, node) || {};
- return {
- inOutType: getInOutType(mapping)
- };
- },
- set: function(element, values, node) {
- var inOutType = values.inOutType;
+ return this._bpmnReplace.replaceElement(shape, intermediateEvent, { layoutConnection: false });
+};
- var props = {
- 'source' : undefined,
- 'sourceExpression' : undefined,
- 'variables' : undefined
- };
- if (inOutType === 'source') {
- props.source = '';
- }
- else if (inOutType === 'sourceExpression') {
- props.sourceExpression = '';
- }
- else if (inOutType === 'variables') {
- props.variables = 'all';
- props.target = undefined;
- }
+// helpers //////////
- var mapping = getSelected(element, node);
- return cmdHelper.updateBusinessObject(element, mapping, props);
- },
- hidden: function(element, node) {
- return !isSelected(element, node);
- }
+function getEventDefinition(element) {
+ var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(element),
+ eventDefinitions = businessObject.eventDefinitions;
- }));
+ return eventDefinitions && eventDefinitions[0];
+}
+function shouldReplace(shape, host) {
+ return !(0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.isLabel)(shape) && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:BoundaryEvent') && !host;
+}
- group.entries.push(entryFactory.textField({
- id: 'variableMapping-source',
- dataValueLabel: 'sourceLabel',
- modelProperty: 'source',
- get: function(element, node) {
- var mapping = getSelected(element, node) || {};
+function includes(array, item) {
+ return array.indexOf(item) !== -1;
+}
- var label = '';
- var inOutType = getInOutType(mapping);
- if (inOutType === 'source') {
- label = translate('Source');
- }
- else if (inOutType === 'sourceExpression') {
- label = translate('Source Expression');
- }
+/***/ }),
- return {
- source: mapping[inOutType],
- sourceLabel: label
- };
- },
- set: function(element, values, node) {
- values.source = values.source || undefined;
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/DropOnFlowBehavior.js":
+/*!************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/DropOnFlowBehavior.js ***!
+ \************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var mapping = getSelected(element, node);
- var inOutType = getInOutType(mapping);
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ DropOnFlowBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var diagram_js_lib_util_LineIntersection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/util/LineIntersection */ "../node_modules/diagram-js/lib/util/LineIntersection.js");
- var props = {};
- props[inOutType] = values.source || '';
- return cmdHelper.updateBusinessObject(element, mapping, props);
- },
- // one of both (source or sourceExpression) must have a value to make
- // the configuration easier and more understandable
- // it is not engine conform
- validate: function(element, values, node) {
- var mapping = getSelected(element, node);
-
- var validation = {};
- if (mapping) {
- if (!values.source) {
- validation.source =
- validation.source = values.sourceLabel ?
- translate('Mapping must have a {value}', { value: values.sourceLabel.toLowerCase() }) :
- translate('Mapping must have a value');
- }
- var inOutType = getInOutType(mapping);
- if (WHITESPACE_REGEX.test(values.source) && inOutType !== 'sourceExpression') {
- validation.source = translate('{label} must not contain whitespace', { label: values.sourceLabel });
- }
- }
- return validation;
- },
- hidden: function(element, node) {
- var selectedMapping = getSelected(element, node);
- return !selectedMapping || (selectedMapping && selectedMapping.variables);
- }
- }));
- group.entries.push(entryFactory.textField({
- id: 'variableMapping-target',
- label: translate('Target'),
- modelProperty: 'target',
- get: function(element, node) {
- return {
- target: (getSelected(element, node) || {}).target
- };
- },
- set: function(element, values, node) {
- values.target = values.target || undefined;
- var mapping = getSelected(element, node);
- return cmdHelper.updateBusinessObject(element, mapping, values);
- },
- validate: function(element, values, node) {
- var mapping = getSelected(element, node);
- var validation = {};
- if (mapping) {
- var mappingType = getInOutType(mapping);
- if (!values.target && mappingType !== 'variables') {
- validation.target = translate('Mapping must have a target');
- }
- if (values.target
- && WHITESPACE_REGEX.test(values.target)
- && mappingType !== 'variables') {
- validation.target = translate('Target must not contain whitespace');
- }
- }
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../../rules/BpmnRules').default} BpmnRules
+ * @typedef {import('../../modeling/Modeling').default} Modeling
+ */
- return validation;
- },
- hidden: function(element, node) {
- var selectedMapping = getSelected(element, node);
- return !selectedMapping || (selectedMapping && selectedMapping.variables);
- }
- }));
+/**
+ * @param {EventBus} eventBus
+ * @param {BpmnRules} bpmnRules
+ * @param {Modeling} modeling
+ */
+function DropOnFlowBehavior(eventBus, bpmnRules, modeling) {
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- group.entries.push(entryFactory.checkbox({
- id: 'variableMapping-local',
- label: translate('Local'),
- modelProperty: 'local',
- get: function(element, node) {
- return {
- local: (getSelected(element, node) || {}).local
- };
- },
- set: function(element, values, node) {
- values.local = values.local || false;
- var mapping = getSelected(element, node);
- return cmdHelper.updateBusinessObject(element, mapping, values);
- },
- hidden: function(element, node) {
- return !isSelected(element, node);
- }
- }));
+ /**
+ * Reconnect start / end of a connection after
+ * dropping an element on a flow.
+ */
- };
+ function insertShape(shape, targetFlow, positionOrBounds) {
+ var waypoints = targetFlow.waypoints,
+ waypointsBefore,
+ waypointsAfter,
+ dockingPoint,
+ source,
+ target,
+ incomingConnection,
+ outgoingConnection,
+ oldOutgoing = shape.outgoing.slice(),
+ oldIncoming = shape.incoming.slice();
- },{"../../../factory/EntryFactory":14,"../../../helper/CmdHelper":25,"../../../helper/ElementHelper":26,"../../../helper/EventDefinitionHelper":27,"../../../helper/ExtensionElementsHelper":28,"./implementation/ExtensionElements":96,"bpmn-js/lib/features/modeling/util/ModelingUtil":211,"bpmn-js/lib/util/ModelUtil":240,"lodash/filter":609}],90:[function(require,module,exports){
- 'use strict';
+ var mid;
- var entryFactory = require('../../../factory/EntryFactory'),
- cmdHelper = require('../../../helper/CmdHelper'),
- is = require('bpmn-js/lib/util/ModelUtil').is,
- getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject;
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isNumber)(positionOrBounds.width)) {
+ mid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_2__.getMid)(positionOrBounds);
+ } else {
+ mid = positionOrBounds;
+ }
- module.exports = function(group, element, translate) {
+ var intersection = (0,diagram_js_lib_util_LineIntersection__WEBPACK_IMPORTED_MODULE_3__.getApproxIntersection)(waypoints, mid);
- var bo = getBusinessObject(element);
+ if (intersection) {
+ waypointsBefore = waypoints.slice(0, intersection.index);
+ waypointsAfter = waypoints.slice(intersection.index + (intersection.bendpoint ? 1 : 0));
- if (!bo) {
- return;
- }
+ // due to inaccuracy intersection might have been found
+ if (!waypointsBefore.length || !waypointsAfter.length) {
+ return;
+ }
- if (is(element, 'bpmn:Process') || is(element, 'bpmn:Participant') && bo.get('processRef')) {
- var versionTagEntry = entryFactory.textField({
- id: 'versionTag',
- label: translate('Version Tag'),
- modelProperty: 'versionTag'
- });
+ dockingPoint = intersection.bendpoint ? waypoints[intersection.index] : mid;
- // in participants we have to change the default behavior of set and get
- if (is(element, 'bpmn:Participant')) {
- versionTagEntry.get = function(element) {
- var processBo = bo.get('processRef');
+ // if last waypointBefore is inside shape's bounds, ignore docking point
+ if (waypointsBefore.length === 1 || !isPointInsideBBox(shape, waypointsBefore[waypointsBefore.length - 1])) {
+ waypointsBefore.push(copy(dockingPoint));
+ }
- return {
- versionTag: processBo.get('camunda:versionTag')
- };
- };
+ // if first waypointAfter is inside shape's bounds, ignore docking point
+ if (waypointsAfter.length === 1 || !isPointInsideBBox(shape, waypointsAfter[0])) {
+ waypointsAfter.unshift(copy(dockingPoint));
+ }
+ }
- versionTagEntry.set = function(element, values) {
- var processBo = bo.get('processRef');
+ source = targetFlow.source;
+ target = targetFlow.target;
- return cmdHelper.updateBusinessObject(element, processBo, {
- 'camunda:versionTag': values.versionTag || undefined
- });
- };
- }
+ if (bpmnRules.canConnect(source, shape, targetFlow)) {
- group.entries.push(versionTagEntry);
+ // reconnect source -> inserted shape
+ modeling.reconnectEnd(targetFlow, shape, waypointsBefore || mid);
- }
- };
+ incomingConnection = targetFlow;
+ }
- },{"../../../factory/EntryFactory":14,"../../../helper/CmdHelper":25,"bpmn-js/lib/util/ModelUtil":240}],91:[function(require,module,exports){
- 'use strict';
+ if (bpmnRules.canConnect(shape, target, targetFlow)) {
- var assign = require('lodash/assign');
+ if (!incomingConnection) {
- var entryFactory = require('../../../../factory/EntryFactory');
+ // reconnect inserted shape -> end
+ modeling.reconnectStart(targetFlow, shape, waypointsAfter || mid);
- var asyncCapableHelper = require('../../../../helper/AsyncCapableHelper'),
- eventDefinitionHelper = require('../../../../helper/EventDefinitionHelper'),
- cmdHelper = require('../../../../helper/CmdHelper');
+ outgoingConnection = targetFlow;
+ } else {
+ outgoingConnection = modeling.connect(
+ shape, target, { type: targetFlow.type, waypoints: waypointsAfter }
+ );
+ }
+ }
- function isAsyncBefore(bo) {
- return asyncCapableHelper.isAsyncBefore(bo);
- }
+ var duplicateConnections = [].concat(
- function isAsyncAfter(bo) {
- return asyncCapableHelper.isAsyncAfter(bo);
- }
+ incomingConnection && (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.filter)(oldIncoming, function(connection) {
+ return connection.source === incomingConnection.source;
+ }) || [],
- function isExclusive(bo) {
- return asyncCapableHelper.isExclusive(bo);
- }
+ outgoingConnection && (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.filter)(oldOutgoing, function(connection) {
+ return connection.target === outgoingConnection.target;
+ }) || []
+ );
- function removeFailedJobRetryTimeCycle(bo, element) {
- return asyncCapableHelper.removeFailedJobRetryTimeCycle(bo, element);
- }
+ if (duplicateConnections.length) {
+ modeling.removeElements(duplicateConnections);
+ }
+ }
- function canRemoveFailedJobRetryTimeCycle(element) {
- return !eventDefinitionHelper.getTimerEventDefinition(element);
- }
+ this.preExecute('elements.move', function(context) {
- module.exports = function(element, bpmnFactory, options, translate) {
+ var newParent = context.newParent,
+ shapes = context.shapes,
+ delta = context.delta,
+ shape = shapes[0];
- var getBusinessObject = options.getBusinessObject;
+ if (!shape || !newParent) {
+ return;
+ }
- var idPrefix = options.idPrefix || '',
- labelPrefix = options.labelPrefix || '';
+ // if the new parent is a connection,
+ // change it to the new parent's parent
+ if (newParent && newParent.waypoints) {
+ context.newParent = newParent = newParent.parent;
+ }
+ var shapeMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_2__.getMid)(shape);
+ var newShapeMid = {
+ x: shapeMid.x + delta.x,
+ y: shapeMid.y + delta.y
+ };
- var asyncBeforeEntry = entryFactory.checkbox({
- id: idPrefix + 'asyncBefore',
- label: labelPrefix + translate('Asynchronous Before'),
- modelProperty: 'asyncBefore',
+ // find a connection which intersects with the
+ // element's mid point
+ var connection = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.find)(newParent.children, function(element) {
+ var canInsert = bpmnRules.canInsert(shapes, element);
- get: function(element, node) {
- var bo = getBusinessObject(element);
- return {
- asyncBefore: isAsyncBefore(bo)
- };
- },
+ return canInsert && (0,diagram_js_lib_util_LineIntersection__WEBPACK_IMPORTED_MODULE_3__.getApproxIntersection)(element.waypoints, newShapeMid);
+ });
- set: function(element, values) {
- var bo = getBusinessObject(element);
- var asyncBefore = !!values.asyncBefore;
+ if (connection) {
+ context.targetFlow = connection;
+ context.position = newShapeMid;
+ }
- var props = {
- 'camunda:asyncBefore': asyncBefore,
- 'camunda:async': false
- };
+ }, true);
- var commands = [];
- if (!isAsyncAfter(bo) && !asyncBefore) {
- props = assign({ 'camunda:exclusive' : true }, props);
- if (canRemoveFailedJobRetryTimeCycle(element)) {
- commands.push(removeFailedJobRetryTimeCycle(bo, element));
- }
- }
+ this.postExecuted('elements.move', function(context) {
- commands.push(cmdHelper.updateBusinessObject(element, bo, props));
- return commands;
- }
- });
+ var shapes = context.shapes,
+ targetFlow = context.targetFlow,
+ position = context.position;
+ if (targetFlow) {
+ insertShape(shapes[0], targetFlow, position);
+ }
- var asyncAfterEntry = entryFactory.checkbox({
- id: idPrefix + 'asyncAfter',
- label: labelPrefix + translate('Asynchronous After'),
- modelProperty: 'asyncAfter',
+ }, true);
- get: function(element, node) {
- var bo = getBusinessObject(element);
- return {
- asyncAfter: isAsyncAfter(bo)
- };
- },
+ this.preExecute('shape.create', function(context) {
- set: function(element, values) {
- var bo = getBusinessObject(element);
- var asyncAfter = !!values.asyncAfter;
+ var parent = context.parent,
+ shape = context.shape;
- var props = {
- 'camunda:asyncAfter': asyncAfter
- };
+ if (bpmnRules.canInsert(shape, parent)) {
+ context.targetFlow = parent;
+ context.parent = parent.parent;
+ }
+ }, true);
- var commands = [];
- if (!isAsyncBefore(bo) && !asyncAfter) {
- props = assign({ 'camunda:exclusive' : true }, props);
- if (canRemoveFailedJobRetryTimeCycle(element)) {
- commands.push(removeFailedJobRetryTimeCycle(bo, element));
- }
- }
+ this.postExecuted('shape.create', function(context) {
- commands.push(cmdHelper.updateBusinessObject(element, bo, props));
- return commands;
- }
- });
+ var shape = context.shape,
+ targetFlow = context.targetFlow,
+ positionOrBounds = context.position;
+ if (targetFlow) {
+ insertShape(shape, targetFlow, positionOrBounds);
+ }
+ }, true);
+}
- var exclusiveEntry = entryFactory.checkbox({
- id: idPrefix + 'exclusive',
- label: labelPrefix + translate('Exclusive'),
- modelProperty: 'exclusive',
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_4__["default"])(DropOnFlowBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- get: function(element, node) {
- var bo = getBusinessObject(element);
- return { exclusive: isExclusive(bo) };
- },
+DropOnFlowBehavior.$inject = [
+ 'eventBus',
+ 'bpmnRules',
+ 'modeling'
+];
- set: function(element, values) {
- var bo = getBusinessObject(element);
- return cmdHelper.updateBusinessObject(element, bo, { 'camunda:exclusive': !!values.exclusive });
- },
- hidden: function(element) {
- var bo = getBusinessObject(element);
- return bo && !isAsyncAfter(bo) && !isAsyncBefore(bo);
- }
- });
+// helpers /////////////////////
- return [ asyncBeforeEntry, asyncAfterEntry, exclusiveEntry ];
- };
+function isPointInsideBBox(bbox, point) {
+ var x = point.x,
+ y = point.y;
- },{"../../../../factory/EntryFactory":14,"../../../../helper/AsyncCapableHelper":23,"../../../../helper/CmdHelper":25,"../../../../helper/EventDefinitionHelper":27,"lodash/assign":604}],92:[function(require,module,exports){
- 'use strict';
+ return x >= bbox.x &&
+ x <= bbox.x + bbox.width &&
+ y >= bbox.y &&
+ y <= bbox.y + bbox.height;
+}
- var cmdHelper = require('../../../../helper/CmdHelper'),
- entryFactory = require('../../../../factory/EntryFactory'),
- elementHelper = require('../../../../helper/ElementHelper'),
- extensionElementsHelper = require('../../../../helper/ExtensionElementsHelper');
+function copy(obj) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)({}, obj);
+}
- var resultVariable = require('./ResultVariable');
- var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject;
- var is = require('bpmn-js/lib/util/ModelUtil').is;
+/***/ }),
- var forEach = require('lodash/forEach');
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/EventBasedGatewayBehavior.js":
+/*!*******************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/EventBasedGatewayBehavior.js ***!
+ \*******************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var attributeInfo = {
- bpmn: {
- element: 'calledElement',
- binding: 'camunda:calledElementBinding',
- version: 'camunda:calledElementVersion',
- versionTag: 'camunda:calledElementVersionTag',
- tenantId: 'camunda:calledElementTenantId'
- },
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ EventBasedGatewayBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- cmmn: {
- element: 'camunda:caseRef',
- binding: 'camunda:caseBinding',
- version: 'camunda:caseVersion',
- tenantId: 'camunda:caseTenantId'
- },
- dmn: {
- element: 'camunda:decisionRef',
- binding: 'camunda:decisionRefBinding',
- version: 'camunda:decisionRefVersion',
- versionTag: 'camunda:decisionRefVersionTag',
- tenantId: 'camunda:decisionRefTenantId'
- }
- };
- var mapDecisionResultOptions = [
- {
- name: 'singleEntry (TypedValue)',
- value: 'singleEntry'
- },
- {
- name:'singleResult (Map)',
- value:'singleResult'
- },
- {
- name:'collectEntries (List)',
- value:'collectEntries'
- },
- {
- name:'resultList (List>)',
- value:'resultList'
- }
- ];
- var delegateVariableMappingOptions = [
- {
- name: 'variableMappingClass',
- value: 'variableMappingClass'
- },
- {
- name: 'variableMappingDelegateExpression',
- value: 'variableMappingDelegateExpression'
- }
- ];
- function getCamundaInWithBusinessKey(element) {
- var camundaIn = [],
- bo = getBusinessObject(element);
- var camundaInParams = extensionElementsHelper.getExtensionElements(bo, 'camunda:In');
- if (camundaInParams) {
- forEach(camundaInParams, function(param) {
- if (param.businessKey !== undefined) {
- camundaIn.push(param);
- }
- });
- }
- return camundaIn;
- }
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../Modeling').default} Modeling
+ */
- function setBusinessKey(element, text, bpmnFactory) {
- var commands = [];
+/**
+ * @param {EventBus} eventBus
+ * @param {Modeling} modeling
+ */
+function EventBasedGatewayBehavior(eventBus, modeling) {
- var camundaInWithBusinessKey = getCamundaInWithBusinessKey(element);
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- if (camundaInWithBusinessKey.length) {
- commands.push(cmdHelper.updateBusinessObject(element, camundaInWithBusinessKey[0], {
- businessKey: text
- }));
- } else {
- var bo = getBusinessObject(element),
- extensionElements = bo.extensionElements;
+ /**
+ * Remove incoming sequence flows of event-based target when creating
+ * sequence flow.
+ *
+ * 1. If source is event-based gateway remove all incoming sequence flows
+ * 2. If source is not event-based gateway remove all incoming sequence flows
+ * whose source is event-based gateway
+ */
+ this.preExecuted('connection.create', function(event) {
+ var context = event.context,
+ connection = context.connection,
+ source = context.source,
+ target = context.target,
+ hints = context.hints;
+
+ if (hints && hints.createElementsBehavior === false) {
+ return;
+ }
+
+ if (!isSequenceFlow(connection)) {
+ return;
+ }
+
+ var sequenceFlows = [];
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(source, 'bpmn:EventBasedGateway')) {
+ sequenceFlows = target.incoming
+ .filter(flow =>
+ flow !== connection &&
+ isSequenceFlow(flow)
+ );
+ } else {
+ sequenceFlows = target.incoming
+ .filter(flow =>
+ flow !== connection &&
+ isSequenceFlow(flow) &&
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(flow.source, 'bpmn:EventBasedGateway')
+ );
+ }
- if (!extensionElements) {
- extensionElements = elementHelper.createElement('bpmn:ExtensionElements', { values: [] }, bo, bpmnFactory);
- commands.push(cmdHelper.updateProperties(element, { extensionElements: extensionElements }));
- }
+ sequenceFlows.forEach(function(sequenceFlow) {
+ modeling.removeConnection(sequenceFlow);
+ });
+ });
- var camundaIn = elementHelper.createElement(
- 'camunda:In',
- { 'businessKey': text },
- extensionElements,
- bpmnFactory
- );
+ /**
+ * Remove incoming sequence flows of event-based targets when replacing source
+ * with event-based gateway.
+ */
+ this.preExecuted('shape.replace', function(event) {
+ var context = event.context,
+ newShape = context.newShape;
- commands.push(cmdHelper.addAndRemoveElementsFromList(
- element,
- extensionElements,
- 'values',
- 'extensionElements',
- [ camundaIn ],[]
- ));
- }
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(newShape, 'bpmn:EventBasedGateway')) {
+ return;
+ }
- return commands;
+ var targets = newShape.outgoing.filter(isSequenceFlow)
+ .reduce(function(targets, sequenceFlow) {
+ if (!targets.includes(sequenceFlow.target)) {
+ return targets.concat(sequenceFlow.target);
}
- function deleteBusinessKey(element) {
- var camundaInExtensions = getCamundaInWithBusinessKey(element);
- var commands = [];
- forEach(camundaInExtensions, function(elem) {
- commands.push(extensionElementsHelper.removeEntry(getBusinessObject(element), element, elem));
- });
- return commands;
- }
+ return targets;
+ }, []);
- function isSupportedCallableType(type) {
- return [ 'bpmn', 'cmmn', 'dmn' ].indexOf(type) !== -1;
+ targets.forEach(function(target) {
+ target.incoming.filter(isSequenceFlow).forEach(function(sequenceFlow) {
+ const sequenceFlowsFromNewShape = target.incoming.filter(isSequenceFlow).filter(function(sequenceFlow) {
+ return sequenceFlow.source === newShape;
+ });
+
+ if (sequenceFlow.source !== newShape || sequenceFlowsFromNewShape.length > 1) {
+ modeling.removeConnection(sequenceFlow);
}
+ });
+ });
+ });
+}
- module.exports = function(element, bpmnFactory, options, translate) {
+EventBasedGatewayBehavior.$inject = [
+ 'eventBus',
+ 'modeling'
+];
- var bindingOptions = [
- {
- name: translate('latest'),
- value: 'latest'
- },
- {
- name: translate('deployment'),
- value: 'deployment'
- },
- {
- name: translate('version'),
- value: 'version'
- },
- {
- name: translate('versionTag'),
- value: 'versionTag'
- }
- ];
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_2__["default"])(EventBasedGatewayBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- var getCallableType = options.getCallableType;
+// helpers //////////
- var entries = [];
+function isSequenceFlow(connection) {
+ return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(connection, 'bpmn:SequenceFlow');
+}
- function getAttribute(element, prop) {
- var type = getCallableType(element);
- return (attributeInfo[type] || {})[prop];
- }
+/***/ }),
- function getCallActivityBindingValue(element) {
- var type = getCallableType(element);
- var bo = getBusinessObject(element);
- var attr = (attributeInfo[type] || {}).binding;
- return bo.get(attr);
- }
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/FixHoverBehavior.js":
+/*!**********************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/FixHoverBehavior.js ***!
+ \**********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- function getDelegateVariableMappingType(element) {
- var bo = getBusinessObject(element);
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ FixHoverBehavior)
+/* harmony export */ });
+/* harmony import */ var _util_LaneUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/LaneUtil */ "../node_modules/bpmn-js/lib/features/modeling/util/LaneUtil.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- var boVariableMappingClass = bo.get('camunda:variableMappingClass'),
- boVariableMappingDelegateExpression = bo.get('camunda:variableMappingDelegateExpression');
- var delegateVariableMappingType = '';
- if (typeof boVariableMappingClass !== 'undefined') {
- delegateVariableMappingType = 'variableMappingClass';
- } else
- if (typeof boVariableMappingDelegateExpression !== 'undefined') {
- delegateVariableMappingType = 'variableMappingDelegateExpression';
- }
- return delegateVariableMappingType;
- }
+/**
+ * @typedef {import('diagram-js/lib/core/ElementRegistry').default} ElementRegistry
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
+ */
+var HIGH_PRIORITY = 1500;
+var HIGHEST_PRIORITY = 2000;
- entries.push(entryFactory.textField({
- id: 'callable-element-ref',
- dataValueLabel: 'callableElementLabel',
- modelProperty: 'callableElementRef',
- get: function(element, node) {
- var callableElementRef;
+/**
+ * Correct hover targets in certain situations to improve diagram interaction.
+ *
+ * @param {ElementRegistry} elementRegistry
+ * @param {EventBus} eventBus
+ * @param {Canvas} canvas
+ */
+function FixHoverBehavior(elementRegistry, eventBus, canvas) {
+
+ eventBus.on([
+ 'create.hover',
+ 'create.move',
+ 'create.out',
+ 'create.end',
+ 'shape.move.hover',
+ 'shape.move.move',
+ 'shape.move.out',
+ 'shape.move.end'
+ ], HIGH_PRIORITY, function(event) {
+ var context = event.context,
+ shape = context.shape || event.shape,
+ hover = event.hover;
+
+ // ensure elements are not dropped onto a bpmn:Lane but onto
+ // the underlying bpmn:Participant
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(hover, 'bpmn:Lane') && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.isAny)(shape, [ 'bpmn:Lane', 'bpmn:Participant' ])) {
+ event.hover = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_1__.getLanesRoot)(hover);
+ event.hoverGfx = elementRegistry.getGraphics(event.hover);
+ }
+
+ var rootElement = canvas.getRootElement();
+
+ // ensure bpmn:Group and label elements are dropped
+ // always onto the root
+ if (hover !== rootElement && (shape.labelTarget || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.isAny)(shape, [ 'bpmn:Group', 'bpmn:TextAnnotation' ]))) {
+ event.hover = rootElement;
+ event.hoverGfx = elementRegistry.getGraphics(event.hover);
+ }
+ });
+
+ eventBus.on([
+ 'connect.hover',
+ 'connect.out',
+ 'connect.end',
+ 'connect.cleanup',
+ 'global-connect.hover',
+ 'global-connect.out',
+ 'global-connect.end',
+ 'global-connect.cleanup'
+ ], HIGH_PRIORITY, function(event) {
+ var hover = event.hover;
+
+ // ensure connections start/end on bpmn:Participant,
+ // not the underlying bpmn:Lane
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(hover, 'bpmn:Lane')) {
+ event.hover = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_1__.getLanesRoot)(hover) || hover;
+ event.hoverGfx = elementRegistry.getGraphics(event.hover);
+ }
+ });
+
+
+ eventBus.on([
+ 'bendpoint.move.hover'
+ ], HIGH_PRIORITY, function(event) {
+ var context = event.context,
+ hover = event.hover,
+ type = context.type;
+
+ // ensure reconnect start/end on bpmn:Participant,
+ // not the underlying bpmn:Lane
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(hover, 'bpmn:Lane') && /reconnect/.test(type)) {
+ event.hover = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_1__.getLanesRoot)(hover) || hover;
+ event.hoverGfx = elementRegistry.getGraphics(event.hover);
+ }
+ });
+
+
+ eventBus.on([
+ 'connect.start'
+ ], HIGH_PRIORITY, function(event) {
+ var context = event.context,
+ start = context.start;
+
+ // ensure connect start on bpmn:Participant,
+ // not the underlying bpmn:Lane
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(start, 'bpmn:Lane')) {
+ context.start = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_1__.getLanesRoot)(start) || start;
+ }
+ });
+
+
+ // allow movement of participants from lanes
+ eventBus.on('shape.move.start', HIGHEST_PRIORITY, function(event) {
+ var shape = event.shape;
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(shape, 'bpmn:Lane')) {
+ event.shape = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_1__.getLanesRoot)(shape) || shape;
+ }
+ });
+
+ // ensure lanes aren't resized without their parent participant when using
+ // space tool
+ eventBus.on('spaceTool.move', HIGHEST_PRIORITY, function(event) {
+ var hover = event.hover;
+
+ if (hover && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(hover, 'bpmn:Lane')) {
+ event.hover = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_1__.getLanesRoot)(hover);
+ }
+ });
+
+}
+
+FixHoverBehavior.$inject = [
+ 'elementRegistry',
+ 'eventBus',
+ 'canvas'
+];
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/GroupBehavior.js":
+/*!*******************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/GroupBehavior.js ***!
+ \*******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ GroupBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_CategoryUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util/CategoryUtil */ "../node_modules/bpmn-js/lib/features/modeling/behavior/util/CategoryUtil.js");
+
+
+
+
+
+
+
+
+/**
+ * @typedef {import('../BpmnFactory').default} BpmnFactory
+ * @typedef {import('../../../Modeler').default} Modeler
+ * @typedef {import('diagram-js/lib/core/ElementRegistry').default} ElementRegistry
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('didi').Injector} Injector
+ * @typedef {import('../../copy-paste/ModdleCopy').default} ModdleCopy
+ *
+ * @typedef {import('../../../model/Types').Element} Element
+ * @typedef {import('../../../model/Types').Shape} Shape
+ *
+ * @typedef {import('diagram-js/lib/util/Types').DirectionTRBL} DirectionTRBL
+ */
- var attr = getAttribute(element, 'element');
- if (attr) {
- var bo = getBusinessObject(element);
- callableElementRef = bo.get(attr);
- }
+var LOWER_PRIORITY = 770;
- var label = '';
- var type = getCallableType(element);
- if (type === 'bpmn') {
- label = translate('Called Element');
- }
- else if (type === 'cmmn') {
- label = translate('Case Ref');
- }
- else if (type === 'dmn') {
- label = translate('Decision Ref');
- }
- return {
- callableElementRef: callableElementRef,
- callableElementLabel: label
- };
- },
+/**
+ * BPMN specific group behavior.
+ *
+ * @param {BpmnFactory} bpmnFactory
+ * @param {Modeler} bpmnjs
+ * @param {ElementRegistry} elementRegistry
+ * @param {EventBus} eventBus
+ * @param {Injector} injector
+ * @param {ModdleCopy} moddleCopy
+ */
+function GroupBehavior(
+ bpmnFactory,
+ bpmnjs,
+ elementRegistry,
+ eventBus,
+ injector,
+ moddleCopy
+) {
+ injector.invoke(diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"], this);
+
+ /**
+ * Returns all group element in the current registry.
+ *
+ * @return {Shape[]}
+ */
+ function getGroupElements() {
+ return elementRegistry.filter(function(e) {
+ return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(e, 'bpmn:Group');
+ });
+ }
+
+ /**
+ * Returns true if given category is referenced in one of the given elements.
+ *
+ * @param {Element[]} elements
+ * @param {ModdleElement} category
+ *
+ * @return {boolean}
+ */
+ function isReferencedCategory(elements, category) {
+ return elements.some(function(element) {
+ var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(element);
- set: function(element, values, node) {
- var newCallableElementRef = values.callableElementRef;
- var attr = getAttribute(element, 'element');
+ var _category = businessObject.categoryValueRef && businessObject.categoryValueRef.$parent;
- var props = {};
- props[attr] = newCallableElementRef || '';
+ return _category === category;
+ });
+ }
- return cmdHelper.updateProperties(element, props);
- },
+ /**
+ * Returns true if given categoryValue is referenced in one of the given elements.
+ *
+ * @param {Element[]} elements
+ * @param {ModdleElement} categoryValue
+ *
+ * @return {boolean}
+ */
+ function isReferencedCategoryValue(elements, categoryValue) {
+ return elements.some(function(element) {
+ var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(element);
- validate: function(element, values, node) {
- var elementRef = values.callableElementRef;
- var type = getCallableType(element);
- return isSupportedCallableType(type) && !elementRef ? { callableElementRef: translate('Must provide a value') } : {};
- },
+ return businessObject.categoryValueRef === categoryValue;
+ });
+ }
- hidden: function(element, node) {
- return !isSupportedCallableType(getCallableType(element));
- }
+ /**
+ * Remove category value unless it is still referenced.
+ *
+ * @param {ModdleElement} categoryValue
+ * @param {ModdleElement} category
+ * @param {ModdleElement} businessObject
+ */
+ function removeCategoryValue(categoryValue, category, businessObject) {
- }));
+ var groups = getGroupElements().filter(function(element) {
+ return element.businessObject !== businessObject;
+ });
- entries.push(entryFactory.selectBox({
- id: 'callable-binding',
- label: translate('Binding'),
- selectOptions: function(element) {
- var type = getCallableType(element);
- var options;
+ if (category && !isReferencedCategory(groups, category)) {
+ (0,_util_CategoryUtil__WEBPACK_IMPORTED_MODULE_2__.unlinkCategory)(category);
+ }
- if (type === 'cmmn') {
- options = bindingOptions.filter(function(bindingOption) {
- return bindingOption.value !== 'versionTag';
- });
- } else {
- options = bindingOptions;
- }
- return options;
- },
- modelProperty: 'callableBinding',
+ if (categoryValue && !isReferencedCategoryValue(groups, categoryValue)) {
+ (0,_util_CategoryUtil__WEBPACK_IMPORTED_MODULE_2__.unlinkCategoryValue)(categoryValue);
+ }
+ }
- get: function(element, node) {
- var callableBinding;
+ /**
+ * Add category value.
+ *
+ * @param {ModdleElement} categoryValue
+ * @param {ModdleElement} category
+ *
+ * @return {ModdleElement}
+ */
+ function addCategoryValue(categoryValue, category) {
+ return (0,_util_CategoryUtil__WEBPACK_IMPORTED_MODULE_2__.linkCategoryValue)(categoryValue, category, bpmnjs.getDefinitions());
+ }
- var attr = getAttribute(element, 'binding');
- if (attr) {
- var bo = getBusinessObject(element);
- callableBinding = bo.get(attr) || 'latest';
- }
+ function setCategoryValue(element, context) {
+ var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(element),
+ categoryValue = businessObject.categoryValueRef;
- return {
- callableBinding: callableBinding
- };
- },
+ if (!categoryValue) {
+ categoryValue =
+ businessObject.categoryValueRef =
+ context.categoryValue = (
+ context.categoryValue || (0,_util_CategoryUtil__WEBPACK_IMPORTED_MODULE_2__.createCategoryValue)(bpmnFactory)
+ );
+ }
- set: function(element, values, node) {
- var binding = values.callableBinding;
- var attr = getAttribute(element, 'binding'),
- attrVer = getAttribute(element, 'version'),
- attrVerTag = getAttribute(element, 'versionTag');
+ var category = categoryValue.$parent;
- var props = {};
- props[attr] = binding;
+ if (!category) {
+ category =
+ categoryValue.$parent =
+ context.category = (
+ context.category || (0,_util_CategoryUtil__WEBPACK_IMPORTED_MODULE_2__.createCategory)(bpmnFactory)
+ );
+ }
- // set version and versionTag values always to undefined to delete the existing value
- props[attrVer] = undefined;
- props[attrVerTag] = undefined;
+ addCategoryValue(categoryValue, category, bpmnjs.getDefinitions());
+ }
- return cmdHelper.updateProperties(element, props);
- },
+ function unsetCategoryValue(element, context) {
+ var category = context.category,
+ categoryValue = context.categoryValue,
+ businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(element);
- hidden: function(element, node) {
- return !isSupportedCallableType(getCallableType(element));
- }
+ if (categoryValue) {
+ businessObject.categoryValueRef = null;
- }));
+ removeCategoryValue(categoryValue, category, businessObject);
+ } else {
+ removeCategoryValue(null, businessObject.categoryValueRef.$parent, businessObject);
+ }
+ }
- entries.push(entryFactory.textField({
- id: 'callable-version',
- label: translate('Version'),
- modelProperty: 'callableVersion',
- get: function(element, node) {
- var callableVersion;
+ // ensure category + value exist before label editing
- var attr = getAttribute(element, 'version');
- if (attr) {
- var bo = getBusinessObject(element);
- callableVersion = bo.get(attr);
- }
+ this.execute('label.create', function(event) {
+ var context = event.context,
+ labelTarget = context.labelTarget;
- return {
- callableVersion: callableVersion
- };
- },
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(labelTarget, 'bpmn:Group')) {
+ return;
+ }
- set: function(element, values, node) {
- var version = values.callableVersion;
- var attr = getAttribute(element, 'version');
+ setCategoryValue(labelTarget, context);
+ });
- var props = {};
- props[attr] = version || undefined;
+ this.revert('label.create', function(event) {
+ var context = event.context,
+ labelTarget = context.labelTarget;
- return cmdHelper.updateProperties(element, props);
- },
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(labelTarget, 'bpmn:Group')) {
+ return;
+ }
- validate: function(element, values, node) {
- var version = values.callableVersion;
+ unsetCategoryValue(labelTarget, context);
+ });
- var type = getCallableType(element);
- return (
- isSupportedCallableType(type) &&
- getCallActivityBindingValue(element) === 'version' && (
- !version ? { callableVersion: translate('Must provide a value') } : {}
- )
- );
- },
- hidden: function(element, node) {
- var type = getCallableType(element);
- return !isSupportedCallableType(type) || getCallActivityBindingValue(element) !== 'version';
- }
+ // remove referenced category + value when group was deleted
- }));
+ this.execute('shape.delete', function(event) {
- entries.push(entryFactory.textField({
- id: 'callable-version-tag',
- label: translate('Version Tag'),
- modelProperty: 'versionTag',
+ var context = event.context,
+ shape = context.shape,
+ businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(shape);
- get: function(element, node) {
- var versionTag;
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:Group') || shape.labelTarget) {
+ return;
+ }
- var attr = getAttribute(element, 'versionTag');
+ var categoryValue = context.categoryValue = businessObject.categoryValueRef,
+ category;
- if (attr) {
- var bo = getBusinessObject(element);
+ if (categoryValue) {
+ category = context.category = categoryValue.$parent;
- versionTag = bo.get(attr);
- }
+ removeCategoryValue(categoryValue, category, businessObject);
- return {
- versionTag: versionTag
- };
- },
+ businessObject.categoryValueRef = null;
+ }
+ });
- set: function(element, values, node) {
- var versionTag = values.versionTag;
+ this.reverted('shape.delete', function(event) {
- var attr = getAttribute(element, 'versionTag');
+ var context = event.context,
+ shape = context.shape;
- var props = {};
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:Group') || shape.labelTarget) {
+ return;
+ }
- props[attr] = versionTag || undefined;
+ var category = context.category,
+ categoryValue = context.categoryValue,
+ businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(shape);
- return cmdHelper.updateProperties(element, props);
- },
+ if (categoryValue) {
+ businessObject.categoryValueRef = categoryValue;
- validate: function(element, values, node) {
- var versionTag = values.versionTag;
+ addCategoryValue(categoryValue, category);
+ }
+ });
- var type = getCallableType(element);
- return (
- isSupportedCallableType(type) &&
- getCallActivityBindingValue(element) === 'versionTag' && (
- !versionTag ? { versionTag: translate('Must provide a value') } : {}
- )
- );
- },
+ // create new category + value when group was created
- hidden: function(element, node) {
- var type = getCallableType(element);
+ this.execute('shape.create', function(event) {
+ var context = event.context,
+ shape = context.shape;
- return !isSupportedCallableType(type) || getCallActivityBindingValue(element) !== 'versionTag';
- }
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:Group') || shape.labelTarget) {
+ return;
+ }
- }));
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(shape).categoryValueRef) {
+ setCategoryValue(shape, context);
+ }
+ });
- entries.push(entryFactory.textField({
- id: 'tenant-id',
- label: translate('Tenant Id'),
- modelProperty: 'tenantId',
+ this.reverted('shape.create', function(event) {
- get: function(element, node) {
- var tenantId;
+ var context = event.context,
+ shape = context.shape;
- var attr = getAttribute(element, 'tenantId');
- if (attr) {
- var bo = getBusinessObject(element);
- tenantId = bo.get(attr);
- }
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:Group') || shape.labelTarget) {
+ return;
+ }
- return {
- tenantId: tenantId
- };
- },
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(shape).categoryValueRef) {
+ unsetCategoryValue(shape, context);
+ }
+ });
- set: function(element, values, node) {
- var tenantId = values.tenantId;
- var attr = getAttribute(element, 'tenantId');
- var props = {};
- props[attr] = tenantId || undefined;
+ // copy + paste categoryValueRef with group
- return cmdHelper.updateProperties(element, props);
- },
+ function copy(bo, clone) {
+ var targetBo = bpmnFactory.create(bo.$type);
- hidden: function(element, node) {
- var type = getCallableType(element);
- return !isSupportedCallableType(type);
- }
+ return moddleCopy.copyElement(bo, targetBo, null, clone);
+ }
- }));
+ eventBus.on('copyPaste.copyElement', LOWER_PRIORITY, function(context) {
+ var descriptor = context.descriptor,
+ element = context.element;
- if (is(getBusinessObject(element), 'bpmn:CallActivity')) {
- entries.push(entryFactory.checkbox({
- id: 'callable-business-key',
- label: translate('Business Key'),
- modelProperty: 'callableBusinessKey',
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(element, 'bpmn:Group') || element.labelTarget) {
+ return;
+ }
- get: function(element, node) {
- var camundaIn = getCamundaInWithBusinessKey(element);
+ var groupBo = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(element);
- return {
- callableBusinessKey: !!(camundaIn && camundaIn.length > 0)
- };
- },
+ if (groupBo.categoryValueRef) {
- set: function(element, values, node) {
- if (values.callableBusinessKey) {
- return setBusinessKey(element, '#{execution.processBusinessKey}', bpmnFactory);
- } else {
- return deleteBusinessKey(element);
- }
- }
- }));
- }
+ var categoryValue = groupBo.categoryValueRef;
- entries.push(entryFactory.textField({
- id: 'business-key-expression',
- label: translate('Business Key Expression'),
- modelProperty: 'businessKey',
+ descriptor.categoryValue = copy(categoryValue, true);
- get: function(element, node) {
- var camundaInWithBusinessKey = getCamundaInWithBusinessKey(element);
+ if (categoryValue.$parent) {
+ descriptor.category = copy(categoryValue.$parent, true);
+ }
+ }
+ });
- return {
- businessKey: (
- camundaInWithBusinessKey.length ?
- camundaInWithBusinessKey[0].get('camunda:businessKey') :
- undefined
- )
- };
- },
+ eventBus.on('copyPaste.pasteElement', LOWER_PRIORITY, function(context) {
+ var descriptor = context.descriptor,
+ businessObject = descriptor.businessObject,
+ categoryValue = descriptor.categoryValue,
+ category = descriptor.category;
- set: function(element, values, node) {
- var businessKey = values.businessKey;
+ if (categoryValue) {
+ categoryValue = businessObject.categoryValueRef = copy(categoryValue);
+ }
- return setBusinessKey(element, businessKey, bpmnFactory);
- },
+ if (category) {
+ categoryValue.$parent = copy(category);
+ }
- validate: function(element, values, node) {
- var businessKey = values.businessKey;
+ delete descriptor.category;
+ delete descriptor.categoryValue;
+ });
- return businessKey === '' ? { businessKey: translate('Must provide a value') } : {};
- },
+}
- hidden: function(element, node) {
- return !getCamundaInWithBusinessKey(element).length;
- }
+GroupBehavior.$inject = [
+ 'bpmnFactory',
+ 'bpmnjs',
+ 'elementRegistry',
+ 'eventBus',
+ 'injector',
+ 'moddleCopy'
+];
- }));
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_3__["default"])(GroupBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- entries = entries.concat(resultVariable(element, bpmnFactory, {
- id: 'dmn-resultVariable',
- getBusinessObject: getBusinessObject,
- getImplementationType: getCallableType,
- hideResultVariable: function(element, node) {
- return getCallableType(element) !== 'dmn';
- }
- }, translate));
-
- entries.push(entryFactory.selectBox({
- id: 'dmn-map-decision-result',
- label: translate('Map Decision Result'),
- selectOptions: mapDecisionResultOptions,
- modelProperty: 'mapDecisionResult',
-
- get: function(element, node) {
- var bo = getBusinessObject(element);
- return {
- mapDecisionResult: bo.get('camunda:mapDecisionResult') || 'resultList'
- };
- },
+/***/ }),
- set: function(element, values, node) {
- return cmdHelper.updateProperties(element, {
- 'camunda:mapDecisionResult': values.mapDecisionResult || 'resultList'
- });
- },
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/ImportDockingFix.js":
+/*!**********************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/ImportDockingFix.js ***!
+ \**********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- hidden: function(element, node) {
- var bo = getBusinessObject(element);
- var resultVariable = bo.get('camunda:resultVariable');
- return !(getCallableType(element) === 'dmn' && typeof resultVariable !== 'undefined');
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ ImportDockingFix)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+/* harmony import */ var _util_LineIntersect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/LineIntersect */ "../node_modules/bpmn-js/lib/features/modeling/behavior/util/LineIntersect.js");
- }));
- entries.push(entryFactory.selectBox({
- id: 'delegateVariableMappingType',
- label: translate('Delegate Variable Mapping'),
- selectOptions: delegateVariableMappingOptions,
- emptyParameter: true,
- modelProperty: 'delegateVariableMappingType',
- get: function(element, node) {
- return {
- delegateVariableMappingType : getDelegateVariableMappingType(element)
- };
- },
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ */
- set: function(element, values, node) {
- var delegateVariableMappingType = values.delegateVariableMappingType;
+/**
+ * Fix broken dockings after DI imports.
+ *
+ * @param {EventBus} eventBus
+ */
+function ImportDockingFix(eventBus) {
- var props = {
- 'camunda:variableMappingClass' : undefined,
- 'camunda:variableMappingDelegateExpression' : undefined
- };
+ function adjustDocking(startPoint, nextPoint, elementMid) {
- if (delegateVariableMappingType === 'variableMappingClass') {
- props['camunda:variableMappingClass'] = '';
- }
- else if (delegateVariableMappingType === 'variableMappingDelegateExpression') {
- props['camunda:variableMappingDelegateExpression'] = '';
- }
+ var elementTop = {
+ x: elementMid.x,
+ y: elementMid.y - 50
+ };
- return cmdHelper.updateProperties(element, props);
- },
+ var elementLeft = {
+ x: elementMid.x - 50,
+ y: elementMid.y
+ };
- hidden: function(element, node) {
- return (getCallableType(element) !== 'bpmn');
- }
+ var verticalIntersect = (0,_util_LineIntersect__WEBPACK_IMPORTED_MODULE_0__["default"])(startPoint, nextPoint, elementMid, elementTop),
+ horizontalIntersect = (0,_util_LineIntersect__WEBPACK_IMPORTED_MODULE_0__["default"])(startPoint, nextPoint, elementMid, elementLeft);
- }));
+ // original is horizontal or vertical center cross intersection
+ var centerIntersect;
- entries.push(entryFactory.textField({
- id: 'delegateVariableMapping',
- dataValueLabel: 'delegateVariableMappingLabel',
- modelProperty: 'delegateVariableMapping',
+ if (verticalIntersect && horizontalIntersect) {
+ if (getDistance(verticalIntersect, elementMid) > getDistance(horizontalIntersect, elementMid)) {
+ centerIntersect = horizontalIntersect;
+ } else {
+ centerIntersect = verticalIntersect;
+ }
+ } else {
+ centerIntersect = verticalIntersect || horizontalIntersect;
+ }
- get: function(element, node) {
- var bo = getBusinessObject(element);
+ startPoint.original = centerIntersect;
+ }
- var label = '';
- var delegateVariableMapping = undefined;
- var type = getDelegateVariableMappingType(element);
+ function fixDockings(connection) {
+ var waypoints = connection.waypoints;
- if (type === 'variableMappingClass') {
- label = translate('Class');
- delegateVariableMapping = bo.get('camunda:variableMappingClass');
- }
- else if (type === 'variableMappingDelegateExpression') {
- label = translate('Delegate Expression');
- delegateVariableMapping = bo.get('camunda:variableMappingDelegateExpression');
- }
+ adjustDocking(
+ waypoints[0],
+ waypoints[1],
+ (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(connection.source)
+ );
- return {
- delegateVariableMapping: delegateVariableMapping,
- delegateVariableMappingLabel: label
- };
- },
+ adjustDocking(
+ waypoints[waypoints.length - 1],
+ waypoints[waypoints.length - 2],
+ (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(connection.target)
+ );
+ }
- set: function(element, values, node) {
- var delegateVariableMapping = values.delegateVariableMapping;
+ eventBus.on('bpmnElement.added', function(e) {
- var attr = 'camunda:' + getDelegateVariableMappingType(element);
+ var element = e.element;
- var props = {};
- props[attr] = delegateVariableMapping || undefined;
+ if (element.waypoints) {
+ fixDockings(element);
+ }
+ });
+}
- return cmdHelper.updateProperties(element, props);
- },
+ImportDockingFix.$inject = [
+ 'eventBus'
+];
- validate: function(element, values, node) {
- var delegateVariableMapping = values.delegateVariableMapping;
- return (
- getCallableType(element) === 'bpmn' && (
- !delegateVariableMapping ? { delegateVariableMapping: translate('Must provide a value') } : {}
- )
- );
- },
- hidden: function(element, node) {
- return !(getCallableType(element) === 'bpmn' && getDelegateVariableMappingType(element) !== '');
- }
+// helpers //////////////////////
- }));
+function getDistance(p1, p2) {
+ return Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2));
+}
- return entries;
- };
+/***/ }),
- },{"../../../../factory/EntryFactory":14,"../../../../helper/CmdHelper":25,"../../../../helper/ElementHelper":26,"../../../../helper/ExtensionElementsHelper":28,"./ResultVariable":109,"bpmn-js/lib/util/ModelUtil":240,"lodash/forEach":613}],93:[function(require,module,exports){
- 'use strict';
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/IsHorizontalFix.js":
+/*!*********************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/IsHorizontalFix.js ***!
+ \*********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var entryFactory = require('../../../../factory/EntryFactory');
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ IsHorizontalFix)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/ModelingUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- var cmdHelper = require('../../../../helper/CmdHelper');
- module.exports = function(element, bpmnFactory, options, translate) {
- var getBusinessObject = options.getBusinessObject;
- var candidateStarterGroupsEntry = entryFactory.textField({
- id: 'candidateStarterGroups',
- label: translate('Candidate Starter Groups'),
- modelProperty: 'candidateStarterGroups',
- description: translate('Specify more than one group as a comma separated list.'),
- get: function(element, node) {
- var bo = getBusinessObject(element);
- var candidateStarterGroups = bo.get('camunda:candidateStarterGroups');
- return {
- candidateStarterGroups: candidateStarterGroups ? candidateStarterGroups : ''
- };
- },
- set: function(element, values) {
- var bo = getBusinessObject(element);
- return cmdHelper.updateBusinessObject(element, bo, {
- 'camunda:candidateStarterGroups': values.candidateStarterGroups || undefined
- });
- }
- });
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ */
- var candidateStarterUsersEntry = entryFactory.textField({
- id: 'candidateStarterUsers',
- label: translate('Candidate Starter Users'),
- modelProperty: 'candidateStarterUsers',
- description: translate('Specify more than one user as a comma separated list.'),
+/**
+ * A component that makes sure that each created or updated
+ * Pool and Lane is assigned an isHorizontal property set to true.
+ *
+ * @param {EventBus} eventBus
+ */
+function IsHorizontalFix(eventBus) {
- get: function(element, node) {
- var bo = getBusinessObject(element);
- var candidateStarterUsers = bo.get('camunda:candidateStarterUsers');
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- return {
- candidateStarterUsers: candidateStarterUsers ? candidateStarterUsers : ''
- };
- },
+ var elementTypesToUpdate = [
+ 'bpmn:Participant',
+ 'bpmn:Lane'
+ ];
- set: function(element, values) {
- var bo = getBusinessObject(element);
- return cmdHelper.updateBusinessObject(element, bo, {
- 'camunda:candidateStarterUsers': values.candidateStarterUsers || undefined
- });
- }
+ this.executed([ 'shape.move', 'shape.create', 'shape.resize' ], function(event) {
+ var shape = event.context.shape,
+ bo = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(shape),
+ di = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getDi)(shape);
- });
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.isAny)(bo, elementTypesToUpdate)) {
+ var isHorizontal = di.get('isHorizontal');
- return [
- candidateStarterGroupsEntry,
- candidateStarterUsersEntry
- ];
- };
+ if (isHorizontal === undefined) {
+ isHorizontal = true;
+ }
- },{"../../../../factory/EntryFactory":14,"../../../../helper/CmdHelper":25}],94:[function(require,module,exports){
- 'use strict';
+ // set attribute directly to avoid modeling#updateProperty side effects
+ di.set('isHorizontal', isHorizontal);
+ }
+ });
- var entryFactory = require('../../../../factory/EntryFactory'),
- cmdHelper = require('../../../../helper/CmdHelper');
+}
- var DELEGATE_TYPES = [
- 'class',
- 'expression',
- 'delegateExpression'
- ];
+IsHorizontalFix.$inject = [ 'eventBus' ];
- var PROPERTIES = {
- class: 'camunda:class',
- expression: 'camunda:expression',
- delegateExpression: 'camunda:delegateExpression'
- };
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_2__["default"])(IsHorizontalFix, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- function isDelegate(type) {
- return DELEGATE_TYPES.indexOf(type) !== -1;
- }
- function getAttribute(type) {
- return PROPERTIES[type];
- }
+/***/ }),
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/LabelBehavior.js":
+/*!*******************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/LabelBehavior.js ***!
+ \*******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- module.exports = function(element, bpmnFactory, options, translate) {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ asEdges: () => (/* binding */ asEdges),
+/* harmony export */ "default": () => (/* binding */ LabelBehavior),
+/* harmony export */ getReferencePoint: () => (/* binding */ getReferencePoint),
+/* harmony export */ getReferencePointDelta: () => (/* binding */ getReferencePointDelta)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/LabelUtil */ "../node_modules/diagram-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../util/LabelUtil */ "../node_modules/bpmn-js/lib/util/LabelUtil.js");
+/* harmony import */ var _util_LabelLayoutUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./util/LabelLayoutUtil */ "../node_modules/bpmn-js/lib/features/modeling/behavior/util/LabelLayoutUtil.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var diagram_js_lib_util_AttachUtil__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! diagram-js/lib/util/AttachUtil */ "../node_modules/diagram-js/lib/util/AttachUtil.js");
+/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+/* harmony import */ var diagram_js_lib_util_PositionUtil__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! diagram-js/lib/util/PositionUtil */ "../node_modules/diagram-js/lib/util/PositionUtil.js");
+/* harmony import */ var _util_GeometricUtil__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./util/GeometricUtil */ "../node_modules/diagram-js/lib/features/bendpoints/GeometricUtil.js");
- var getImplementationType = options.getImplementationType,
- getBusinessObject = options.getBusinessObject;
- function getDelegationLabel(type) {
- switch (type) {
- case 'class':
- return translate('Java Class');
- case 'expression':
- return translate('Expression');
- case 'delegateExpression':
- return translate('Delegate Expression');
- default:
- return '';
- }
- }
- var delegateEntry = entryFactory.textField({
- id: 'delegate',
- label: translate('Value'),
- dataValueLabel: 'delegationLabel',
- modelProperty: 'delegate',
-
- get: function(element, node) {
- var bo = getBusinessObject(element);
- var type = getImplementationType(element);
- var attr = getAttribute(type);
- var label = getDelegationLabel(type);
- return {
- delegate: bo.get(attr),
- delegationLabel: label
- };
- },
- set: function(element, values, node) {
- var bo = getBusinessObject(element);
- var type = getImplementationType(element);
- var attr = getAttribute(type);
- var prop = {};
- prop[attr] = values.delegate || '';
- return cmdHelper.updateBusinessObject(element, bo, prop);
- },
- validate: function(element, values, node) {
- return isDelegate(getImplementationType(element)) && !values.delegate ? { delegate: translate('Must provide a value') } : {};
- },
- hidden: function(element, node) {
- return !isDelegate(getImplementationType(element));
- }
- });
- return [ delegateEntry ];
- };
- },{"../../../../factory/EntryFactory":14,"../../../../helper/CmdHelper":25}],95:[function(require,module,exports){
- 'use strict';
- var entryFactory = require('../../../../factory/EntryFactory'),
- cmdHelper = require('../../../../helper/CmdHelper'),
- elementReferenceProperty = require('../../../bpmn/parts/implementation/ElementReferenceProperty');
- module.exports = function(
- group, element, bpmnFactory, errorEventDefinition,
- showErrorCodeVariable, showErrorMessageVariable, translate
- ) {
- var getValue = function(modelProperty) {
- return function(element) {
- var modelPropertyValue = errorEventDefinition.get('camunda:' + modelProperty);
- var value = {};
- value[modelProperty] = modelPropertyValue;
- return value;
- };
- };
- var setValue = function(modelProperty) {
- return function(element, values) {
- var props = {};
- props['camunda:' + modelProperty] = values[modelProperty] || undefined;
- return cmdHelper.updateBusinessObject(element, errorEventDefinition, props);
- };
- };
- group.entries = group.entries.concat(
- elementReferenceProperty(element, errorEventDefinition, bpmnFactory, {
- id: 'error-element-message',
- label: translate('Error Message'),
- referenceProperty: 'errorRef',
- modelProperty: 'errorMessage'
- })
- );
- if (showErrorCodeVariable) {
- group.entries.push(entryFactory.textField({
- id: 'errorCodeVariable',
- label: translate('Error Code Variable'),
- modelProperty : 'errorCodeVariable',
- get: getValue('errorCodeVariable'),
- set: setValue('errorCodeVariable')
- }));
- }
+var NAME_PROPERTY = 'name';
+var TEXT_PROPERTY = 'text';
- if (showErrorMessageVariable) {
- group.entries.push(entryFactory.textField({
- id: 'errorMessageVariable',
- label: translate('Error Message Variable'),
- modelProperty: 'errorMessageVariable',
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../Modeling').default} Modeling
+ * @typedef {import('../BpmnFactory').default} BpmnFactory
+ * @typedef {import('../../../draw/TextRenderer').default} TextRenderer
+ *
+ * @typedef {import('diagram-js/lib/util/Types').Point} Point
+ * @typedef {import('diagram-js/lib/util/Types').Rect} Rect
+ *
+ * @typedef {Point[]} Line
+ */
- get: getValue('errorMessageVariable'),
- set: setValue('errorMessageVariable')
- }));
- }
+/**
+ * A component that makes sure that external labels are added
+ * together with respective elements and properly updated (DI wise)
+ * during move.
+ *
+ * @param {EventBus} eventBus
+ * @param {Modeling} modeling
+ * @param {BpmnFactory} bpmnFactory
+ * @param {TextRenderer} textRenderer
+ */
+function LabelBehavior(
+ eventBus, modeling, bpmnFactory,
+ textRenderer) {
+
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
+
+ // update label if name property was updated
+ this.postExecute('element.updateProperties', onPropertyUpdate);
+ this.postExecute('element.updateModdleProperties', e => {
+ const elementBo = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(e.context.element);
+
+ if (elementBo === e.context.moddleElement) {
+ onPropertyUpdate(e);
+ }
+ });
+
+ function onPropertyUpdate(e) {
+ var context = e.context,
+ element = context.element,
+ properties = context.properties;
+
+ if (NAME_PROPERTY in properties) {
+ modeling.updateLabel(element, properties[NAME_PROPERTY]);
+ }
+
+ if (TEXT_PROPERTY in properties
+ && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(element, 'bpmn:TextAnnotation')) {
+
+ var newBounds = textRenderer.getTextAnnotationBounds(
+ {
+ x: element.x,
+ y: element.y,
+ width: element.width,
+ height: element.height
+ },
+ properties[TEXT_PROPERTY] || ''
+ );
+
+ modeling.updateLabel(element, properties.text, newBounds);
+ }
+ }
+
+ // create label shape after shape/connection was created
+ this.postExecute([ 'shape.create', 'connection.create' ], function(e) {
+ var context = e.context,
+ hints = context.hints || {};
+
+ if (hints.createElementsBehavior === false) {
+ return;
+ }
+
+ var element = context.shape || context.connection;
+
+ if ((0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_2__.isLabel)(element) || !(0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.isLabelExternal)(element)) {
+ return;
+ }
+
+ // only create label if attribute available
+ if (!(0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.getLabel)(element)) {
+ return;
+ }
+
+ modeling.updateLabel(element, (0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.getLabel)(element));
+ });
+
+ // update label after label shape was deleted
+ this.postExecute('shape.delete', function(event) {
+ var context = event.context,
+ labelTarget = context.labelTarget,
+ hints = context.hints || {};
- };
+ // check if label
+ if (labelTarget && hints.unsetLabel !== false) {
+ modeling.updateLabel(labelTarget, null, null, { removeShape: false });
+ }
+ });
- },{"../../../../factory/EntryFactory":14,"../../../../helper/CmdHelper":25,"../../../bpmn/parts/implementation/ElementReferenceProperty":43}],96:[function(require,module,exports){
- 'use strict';
+ function getVisibleLabelAdjustment(event) {
- var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject;
+ var context = event.context,
+ connection = context.connection,
+ label = connection.label,
+ hints = (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)({}, context.hints),
+ newWaypoints = context.newWaypoints || connection.waypoints,
+ oldWaypoints = context.oldWaypoints;
- var domQuery = require('min-dom').query,
- domClosest = require('min-dom').closest,
- domify = require('min-dom').domify,
- forEach = require('lodash/forEach');
- var elementHelper = require('../../../../helper/ElementHelper'),
- cmdHelper = require('../../../../helper/CmdHelper'),
- utils = require('../../../../Utils'),
- escapeHTML = utils.escapeHTML;
+ if (typeof hints.startChanged === 'undefined') {
+ hints.startChanged = !!hints.connectionStart;
+ }
- function getSelectBox(node, id) {
- var currentTab = domClosest(node, 'div.bpp-properties-tab');
- var query = 'select[name=selectedExtensionElement]' + (id ? '[id=cam-extensionElements-' + id + ']' : '');
- return domQuery(query, currentTab);
- }
+ if (typeof hints.endChanged === 'undefined') {
+ hints.endChanged = !!hints.connectionEnd;
+ }
- function getSelected(node, id) {
- var selectBox = getSelectBox(node, id);
- return {
- value: (selectBox || {}).value,
- idx: (selectBox || {}).selectedIndex
- };
- }
+ return (0,_util_LabelLayoutUtil__WEBPACK_IMPORTED_MODULE_5__.getLabelAdjustment)(label, newWaypoints, oldWaypoints, hints);
+ }
- function generateElementId(prefix) {
- prefix = prefix + '_';
- return utils.nextId(prefix);
- }
+ this.postExecute([
+ 'connection.layout',
+ 'connection.updateWaypoints'
+ ], function(event) {
+ var context = event.context,
+ hints = context.hints || {};
- var CREATE_EXTENSION_ELEMENT_ACTION = 'create-extension-element',
- REMOVE_EXTENSION_ELEMENT_ACTION = 'remove-extension-element';
+ if (hints.labelBehavior === false) {
+ return;
+ }
- module.exports = function(element, bpmnFactory, options, translate) {
+ var connection = context.connection,
+ label = connection.label,
+ labelAdjustment;
- var id = options.id,
- prefix = options.prefix || 'elem',
- label = options.label || id,
- idGeneration = (options.idGeneration === false) ? options.idGeneration : true,
- businessObject = options.businessObject || getBusinessObject(element);
+ // handle missing label as well as the case
+ // that the label parent does not exist (yet),
+ // because it is being pasted / created via multi element create
+ //
+ // Cf. https://github.com/bpmn-io/bpmn-js/pull/1227
+ if (!label || !label.parent) {
+ return;
+ }
- var modelProperty = options.modelProperty || 'id';
+ labelAdjustment = getVisibleLabelAdjustment(event);
- var getElements = options.getExtensionElements;
+ modeling.moveShape(label, labelAdjustment);
+ });
- var createElement = options.createExtensionElement,
- canCreate = typeof createElement === 'function';
- var removeElement = options.removeExtensionElement,
- canRemove = typeof removeElement === 'function';
+ // keep label position on shape replace
+ this.postExecute([ 'shape.replace' ], function(event) {
+ var context = event.context,
+ newShape = context.newShape,
+ oldShape = context.oldShape;
- var onSelectionChange = options.onSelectionChange;
+ var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(newShape);
- var hideElements = options.hideExtensionElements,
- canBeHidden = typeof hideElements === 'function';
+ if (businessObject
+ && (0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.isLabelExternal)(businessObject)
+ && oldShape.label
+ && newShape.label) {
+ newShape.label.x = oldShape.label.x;
+ newShape.label.y = oldShape.label.y;
+ }
+ });
- var setOptionLabelValue = options.setOptionLabelValue;
- var defaultSize = options.size || 5,
- resizable = options.resizable;
+ // move external label after resizing
+ this.postExecute('shape.resize', function(event) {
- var reference = options.reference || undefined;
+ var context = event.context,
+ shape = context.shape,
+ newBounds = context.newBounds,
+ oldBounds = context.oldBounds;
- var selectionChanged = function(element, node, event, scope) {
- if (typeof onSelectionChange === 'function') {
- return onSelectionChange(element, node, event, scope);
- }
- };
+ if ((0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.hasExternalLabel)(shape)) {
- var createOption = function(value) {
- return '' + escapeHTML(value) + ' ';
- };
+ var label = shape.label,
+ labelMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_6__.getMid)(label),
+ edges = asEdges(oldBounds);
- var initSelectionSize = function(selectBox, optionsLength) {
- if (resizable) {
- selectBox.size = optionsLength > defaultSize ? optionsLength : defaultSize;
- }
- };
+ // get nearest border point to label as reference point
+ var referencePoint = getReferencePoint(labelMid, edges);
- return {
- id: id,
- html: '' +
- '
' + escapeHTML(label) + ' ' +
- '
' +
- '' +
- ' ' +
- (canCreate ? '' +
- '+ ' +
- ' ' : '') +
- (canRemove ? '' +
- '- ' +
- ' ' : '') +
- '
' +
- '
',
-
- get: function(element, node) {
- var elements = getElements(element, node);
-
- var result = [];
- forEach(elements, function(elem) {
- result.push({
- extensionElementValue: elem.get(modelProperty)
- });
- });
+ var delta = getReferencePointDelta(referencePoint, oldBounds, newBounds);
- var selectBox = getSelectBox(node.parentNode, id);
- initSelectionSize(selectBox, result.length);
+ modeling.moveShape(label, delta);
- return result;
- },
+ }
- set: function(element, values, node) {
- var action = this.__action;
- delete this.__action;
+ });
- businessObject = businessObject || getBusinessObject(element);
+}
- var bo =
- (reference && businessObject.get(reference))
- ? businessObject.get(reference)
- : businessObject;
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_7__["default"])(LabelBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- var extensionElements = bo.get('extensionElements');
+LabelBehavior.$inject = [
+ 'eventBus',
+ 'modeling',
+ 'bpmnFactory',
+ 'textRenderer'
+];
- if (action.id === CREATE_EXTENSION_ELEMENT_ACTION) {
- var commands = [];
- if (!extensionElements) {
- extensionElements = elementHelper.createElement('bpmn:ExtensionElements', { values: [] }, bo, bpmnFactory);
- commands.push(cmdHelper.updateBusinessObject(element, bo, { extensionElements: extensionElements }));
- }
- commands.push(createElement(element, extensionElements, action.value, node));
- return commands;
+// helpers //////////////////////
- }
- else if (action.id === REMOVE_EXTENSION_ELEMENT_ACTION) {
- return removeElement(element, extensionElements, action.value, action.idx, node);
- }
+/**
+ * Calculates a reference point delta relative to a new position
+ * of a certain element's bounds
+ *
+ * @param {Point} referencePoint
+ * @param {Rect} oldBounds
+ * @param {Rect} newBounds
+ *
+ * @return {Point}
+ */
+function getReferencePointDelta(referencePoint, oldBounds, newBounds) {
- },
+ var newReferencePoint = (0,diagram_js_lib_util_AttachUtil__WEBPACK_IMPORTED_MODULE_8__.getNewAttachPoint)(referencePoint, oldBounds, newBounds);
- createListEntryTemplate: function(value, index, selectBox) {
- initSelectionSize(selectBox, selectBox.options.length + 1);
- return createOption(value.extensionElementValue);
- },
+ return (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_6__.roundPoint)((0,diagram_js_lib_util_PositionUtil__WEBPACK_IMPORTED_MODULE_9__.delta)(newReferencePoint, referencePoint));
+}
- deselect: function(element, node) {
- var selectBox = getSelectBox(node, id);
- selectBox.selectedIndex = -1;
- },
+/**
+ * Generates the nearest point (reference point) for a given point
+ * onto given set of lines
+ *
+ * @param {Point} point
+ * @param {Line[]} lines
+ *
+ * @return {Point}
+ */
+function getReferencePoint(point, lines) {
- getSelected: function(element, node) {
- return getSelected(node, id);
- },
+ if (!lines.length) {
+ return;
+ }
- setControlValue: function(element, node, option, property, value, idx) {
- node.value = value;
+ var nearestLine = getNearestLine(point, lines);
- if (!setOptionLabelValue) {
- node.text = value;
- } else {
- setOptionLabelValue(element, node, option, property, value, idx);
- }
- },
+ return (0,_util_GeometricUtil__WEBPACK_IMPORTED_MODULE_10__.perpendicularFoot)(point, nearestLine);
+}
- createElement: function(element, node) {
- // create option template
- var generatedId;
- if (idGeneration) {
- generatedId = generateElementId(prefix);
- }
+/**
+ * Convert the given bounds to a lines array containing all edges
+ *
+ * @param {Rect|Point} bounds
+ *
+ * @return {Line[]}
+ */
+function asEdges(bounds) {
+ return [
+ [ // top
+ {
+ x: bounds.x,
+ y: bounds.y
+ },
+ {
+ x: bounds.x + (bounds.width || 0),
+ y: bounds.y
+ }
+ ],
+ [ // right
+ {
+ x: bounds.x + (bounds.width || 0),
+ y: bounds.y
+ },
+ {
+ x: bounds.x + (bounds.width || 0),
+ y: bounds.y + (bounds.height || 0)
+ }
+ ],
+ [ // bottom
+ {
+ x: bounds.x,
+ y: bounds.y + (bounds.height || 0)
+ },
+ {
+ x: bounds.x + (bounds.width || 0),
+ y: bounds.y + (bounds.height || 0)
+ }
+ ],
+ [ // left
+ {
+ x: bounds.x,
+ y: bounds.y
+ },
+ {
+ x: bounds.x,
+ y: bounds.y + (bounds.height || 0)
+ }
+ ]
+ ];
+}
+
+/**
+ * Returns the nearest line for a given point by distance
+ * @param {Point} point
+ * @param {Line[]} lines
+ *
+ * @return {Line}
+ */
+function getNearestLine(point, lines) {
- var selectBox = getSelectBox(node, id);
- var template = domify(createOption(generatedId));
+ var distances = lines.map(function(l) {
+ return {
+ line: l,
+ distance: (0,_util_GeometricUtil__WEBPACK_IMPORTED_MODULE_10__.getDistancePointLine)(point, l)
+ };
+ });
- // add new empty option as last child element
- selectBox.appendChild(template);
+ var sorted = (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.sortBy)(distances, 'distance');
- // select last child element
- selectBox.lastChild.selected = 'selected';
- selectionChanged(element, node);
+ return sorted[0].line;
+}
- // update select box size
- initSelectionSize(selectBox, selectBox.options.length);
- this.__action = {
- id: CREATE_EXTENSION_ELEMENT_ACTION,
- value: generatedId
- };
+/***/ }),
- return true;
- },
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/LayoutConnectionBehavior.js":
+/*!******************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/LayoutConnectionBehavior.js ***!
+ \******************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- removeElement: function(element, node) {
- var selection = getSelected(node, id);
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ LayoutConnectionBehavior)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var _util_ConnectionLayoutUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util/ConnectionLayoutUtil */ "../node_modules/bpmn-js/lib/features/modeling/behavior/util/ConnectionLayoutUtil.js");
- var selectBox = getSelectBox(node, id);
- selectBox.removeChild(selectBox.options[selection.idx]);
- // update select box size
- initSelectionSize(selectBox, selectBox.options.length);
- this.__action = {
- id: REMOVE_EXTENSION_ELEMENT_ACTION,
- value: selection.value,
- idx: selection.idx
- };
- return true;
- },
- hideElements: function(element, entryNode, node, scopeNode) {
- return !hideElements(element, entryNode, node, scopeNode);
- },
- disableRemove: function(element, entryNode, node, scopeNode) {
- return (getSelected(entryNode, id) || {}).idx < 0;
- },
- selectElement: selectionChanged
- };
- };
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../Modeling').default} Modeling
+ */
- },{"../../../../Utils":5,"../../../../helper/CmdHelper":25,"../../../../helper/ElementHelper":26,"bpmn-js/lib/util/ModelUtil":240,"lodash/forEach":613,"min-dom":647}],97:[function(require,module,exports){
- 'use strict';
+/**
+ * A component that makes sure that Associations connected to Connections
+ * are updated together with the Connection.
+ *
+ * @param {EventBus} eventBus
+ * @param {Modeling} modeling
+ */
+function LayoutConnectionBehavior(eventBus, modeling) {
- var entryFactory = require('../../../../factory/EntryFactory'),
- cmdHelper = require('../../../../helper/CmdHelper');
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- module.exports = function(element, bpmnFactory, options, translate) {
+ function getnewAnchorPoint(event, point) {
- var getImplementationType = options.getImplementationType,
- getBusinessObject = options.getBusinessObject;
+ var context = event.context,
+ connection = context.connection,
+ hints = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)({}, context.hints),
+ newWaypoints = context.newWaypoints || connection.waypoints,
+ oldWaypoints = context.oldWaypoints;
- function isExternal(element) {
- return getImplementationType(element) === 'external';
- }
- var topicEntry = entryFactory.textField({
- id: 'externalTopic',
- label: translate('Topic'),
- modelProperty: 'externalTopic',
+ if (typeof hints.startChanged === 'undefined') {
+ hints.startChanged = !!hints.connectionStart;
+ }
- get: function(element, node) {
- var bo = getBusinessObject(element);
- return { externalTopic: bo.get('camunda:topic') };
- },
+ if (typeof hints.endChanged === 'undefined') {
+ hints.endChanged = !!hints.connectionEnd;
+ }
- set: function(element, values, node) {
- var bo = getBusinessObject(element);
- return cmdHelper.updateBusinessObject(element, bo, {
- 'camunda:topic': values.externalTopic
- });
- },
+ return (0,_util_ConnectionLayoutUtil__WEBPACK_IMPORTED_MODULE_2__.getConnectionAdjustment)(point, newWaypoints, oldWaypoints, hints);
+ }
- validate: function(element, values, node) {
- return isExternal(element) && !values.externalTopic ? { externalTopic: translate('Must provide a value') } : {};
- },
+ this.postExecute([
+ 'connection.layout',
+ 'connection.updateWaypoints'
+ ], function(event) {
+ var context = event.context;
- hidden: function(element, node) {
- return !isExternal(element);
- }
+ var connection = context.connection,
+ outgoing = connection.outgoing,
+ incoming = connection.incoming;
- });
+ incoming.forEach(function(connection) {
+ var endPoint = connection.waypoints[connection.waypoints.length - 1];
+ var newEndpoint = getnewAnchorPoint(event, endPoint);
- return [ topicEntry ];
+ var newWaypoints = [].concat(connection.waypoints.slice(0, -1), [ newEndpoint ]);
- };
+ modeling.updateWaypoints(connection, newWaypoints);
+ });
- },{"../../../../factory/EntryFactory":14,"../../../../helper/CmdHelper":25}],98:[function(require,module,exports){
- 'use strict';
+ outgoing.forEach(function(connection) {
+ var startpoint = connection.waypoints[0];
+ var newStartpoint = getnewAnchorPoint(event, startpoint);
- var entryFactory = require('../../../../factory/EntryFactory');
+ var newWaypoints = [].concat([ newStartpoint ], connection.waypoints.slice(1));
- var cmdHelper = require('../../../../helper/CmdHelper');
+ modeling.updateWaypoints(connection, newWaypoints);
+ });
- module.exports = function(element, bpmnFactory, options, translate) {
+ });
- var getBusinessObject = options.getBusinessObject;
- var externalTaskPriorityEntry = entryFactory.textField({
- id: 'externalTaskPriority',
- label: translate('Task Priority'),
- modelProperty: 'taskPriority',
+ this.postExecute([
+ 'connection.move'
+ ], function(event) {
+ var context = event.context;
- get: function(element, node) {
- var bo = getBusinessObject(element);
- return {
- taskPriority: bo.get('camunda:taskPriority')
- };
- },
+ var connection = context.connection,
+ outgoing = connection.outgoing,
+ incoming = connection.incoming,
+ delta = context.delta;
- set: function(element, values) {
- var bo = getBusinessObject(element);
- return cmdHelper.updateBusinessObject(element, bo, {
- 'camunda:taskPriority': values.taskPriority || undefined
- });
- }
+ incoming.forEach(function(connection) {
+ var endPoint = connection.waypoints[connection.waypoints.length - 1];
+ var newEndpoint = {
+ x: endPoint.x + delta.x,
+ y: endPoint.y + delta.y
+ };
- });
+ var newWaypoints = [].concat(connection.waypoints.slice(0, -1), [ newEndpoint ]);
- return [ externalTaskPriorityEntry ];
+ modeling.updateWaypoints(connection, newWaypoints);
+ });
- };
+ outgoing.forEach(function(connection) {
+ var startpoint = connection.waypoints[0];
+ var newStartpoint = {
+ x: startpoint.x + delta.x,
+ y: startpoint.y + delta.y
+ };
- },{"../../../../factory/EntryFactory":14,"../../../../helper/CmdHelper":25}],99:[function(require,module,exports){
- 'use strict';
+ var newWaypoints = [].concat([ newStartpoint ], connection.waypoints.slice(1));
- var extensionElementsHelper = require('../../../../helper/ExtensionElementsHelper'),
- elementHelper = require('../../../../helper/ElementHelper'),
- cmdHelper = require('../../../../helper/CmdHelper');
+ modeling.updateWaypoints(connection, newWaypoints);
+ });
- var utils = require('../../../../Utils');
+ });
- var entryFactory = require('../../../../factory/EntryFactory');
+}
- var extensionElementsEntry = require('./ExtensionElements');
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_3__["default"])(LayoutConnectionBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- var ModelUtil = require('bpmn-js/lib/util/ModelUtil'),
- getBusinessObject = ModelUtil.getBusinessObject;
+LayoutConnectionBehavior.$inject = [
+ 'eventBus',
+ 'modeling'
+];
- var assign = require('lodash/assign');
+/***/ }),
- var DEFAULT_PROPS = {
- 'stringValue': undefined,
- 'string': undefined,
- 'expression': undefined
- };
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/MessageFlowBehavior.js":
+/*!*************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/MessageFlowBehavior.js ***!
+ \*************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var CAMUNDA_FIELD_EXTENSION_ELEMENT = 'camunda:Field';
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ MessageFlowBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
+/* harmony import */ var diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! diagram-js/lib/util/Elements */ "../node_modules/diagram-js/lib/util/Elements.js");
+/* harmony import */ var diagram_js_lib_features_modeling_cmd_helper_AnchorsHelper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/modeling/cmd/helper/AnchorsHelper */ "../node_modules/diagram-js/lib/features/modeling/cmd/helper/AnchorsHelper.js");
- module.exports = function(element, bpmnFactory, translate, options) {
- options = options || {};
- var insideListener = !!options.insideListener,
- idPrefix = options.idPrefix || '',
- getSelectedListener = options.getSelectedListener,
- businessObject = options.businessObject || getBusinessObject(element);
- var entries = [];
- var isSelected = function(element, node) {
- return getSelectedField(element, node);
- };
- function getSelectedField(element, node) {
- var selected = fieldEntry.getSelected(element, node.parentNode);
- if (selected.idx === -1) {
- return;
- }
- var fields = getCamundaFields(element, node);
- return fields[selected.idx];
- }
- function getCamundaFields(element, node) {
- if (!insideListener) {
- return (
- businessObject &&
- extensionElementsHelper.getExtensionElements(businessObject, CAMUNDA_FIELD_EXTENSION_ELEMENT)
- ) || [];
- }
- return getCamundaListenerFields(element, node);
- }
- function getCamundaListenerFields(element, node) {
- var selectedListener = getSelectedListener(element, node);
- return selectedListener && selectedListener.fields || [];
- }
- function getFieldType(bo) {
- var fieldType = 'string';
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../Modeling').default} Modeling
+ */
- var expressionValue = bo && bo.expression;
- var stringValue = bo && (bo.string || bo.stringValue);
+/**
+ * BPMN-specific message flow behavior.
+ *
+ * @param {EventBus} eventBus
+ * @param {Modeling} modeling
+ */
+function MessageFlowBehavior(eventBus, modeling) {
- if (typeof stringValue !== 'undefined') {
- fieldType = 'string';
- } else if (typeof expressionValue !== 'undefined') {
- fieldType = 'expression';
- }
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- return fieldType;
- }
+ this.postExecute('shape.replace', function(context) {
+ var oldShape = context.oldShape,
+ newShape = context.newShape;
- var setOptionLabelValue = function() {
- return function(element, node, option, property, value, idx) {
- var camundaFields = getCamundaFields(element, node);
- var field = camundaFields[idx];
+ if (!isParticipantCollapse(oldShape, newShape)) {
+ return;
+ }
- value = (field.name) ? field.name : '';
+ var messageFlows = getMessageFlows(oldShape);
- var label = idx + ' : ' + value;
+ messageFlows.incoming.forEach(function(incoming) {
+ var anchor = (0,diagram_js_lib_features_modeling_cmd_helper_AnchorsHelper__WEBPACK_IMPORTED_MODULE_1__.getResizedTargetAnchor)(incoming, newShape, oldShape);
- option.text = label;
- };
- };
+ modeling.reconnectEnd(incoming, newShape, anchor);
+ });
- var newElement = function() {
- return function(element, extensionElements, value, node) {
+ messageFlows.outgoing.forEach(function(outgoing) {
+ var anchor = (0,diagram_js_lib_features_modeling_cmd_helper_AnchorsHelper__WEBPACK_IMPORTED_MODULE_1__.getResizedSourceAnchor)(outgoing, newShape, oldShape);
- var props = {
- name: '',
- string: ''
- };
+ modeling.reconnectStart(outgoing, newShape, anchor);
+ });
+ }, true);
- var newFieldElem;
+}
- if (!insideListener) {
+MessageFlowBehavior.$inject = [ 'eventBus', 'modeling' ];
- newFieldElem = elementHelper.createElement(CAMUNDA_FIELD_EXTENSION_ELEMENT, props, extensionElements, bpmnFactory);
- return cmdHelper.addElementsTolist(element, extensionElements, 'values', [ newFieldElem ]);
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_2__["default"])(MessageFlowBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- } else {
+// helpers //////////
- var selectedListener = getSelectedListener(element, node);
- newFieldElem = elementHelper.createElement(CAMUNDA_FIELD_EXTENSION_ELEMENT, props, selectedListener, bpmnFactory);
- return cmdHelper.addElementsTolist(element, selectedListener, 'fields', [ newFieldElem ]);
+function isParticipantCollapse(oldShape, newShape) {
+ return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(oldShape, 'bpmn:Participant')
+ && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isExpanded)(oldShape)
+ && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(newShape, 'bpmn:Participant')
+ && !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isExpanded)(newShape);
+}
- }
+function getMessageFlows(parent) {
+ var elements = (0,diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_5__.selfAndAllChildren)([ parent ], false);
- };
- };
+ var incoming = [],
+ outgoing = [];
- var removeElement = function() {
- return function(element, extensionElements, value, idx, node) {
- var camundaFields= getCamundaFields(element, node);
- var field = camundaFields[idx];
- if (field) {
- if (!insideListener) {
- return extensionElementsHelper.removeEntry(businessObject, element, field);
- }
- var selectedListener = getSelectedListener(element, node);
- return cmdHelper.removeElementsFromList(element, selectedListener, 'fields', null, [ field ]);
- }
- };
- };
+ elements.forEach(function(element) {
+ if (element === parent) {
+ return;
+ }
+ element.incoming.forEach(function(connection) {
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(connection, 'bpmn:MessageFlow')) {
+ incoming.push(connection);
+ }
+ });
- var fieldEntry = extensionElementsEntry(element, bpmnFactory, {
- id : idPrefix + 'fields',
- label : translate('Fields'),
- modelProperty: 'fieldName',
- idGeneration: 'false',
+ element.outgoing.forEach(function(connection) {
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(connection, 'bpmn:MessageFlow')) {
+ outgoing.push(connection);
+ }
+ });
+ }, []);
- businessObject: businessObject,
+ return {
+ incoming: incoming,
+ outgoing: outgoing
+ };
+}
- createExtensionElement: newElement(),
- removeExtensionElement: removeElement(),
+/***/ }),
- getExtensionElements: function(element, node) {
- return getCamundaFields(element, node);
- },
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/NonInterruptingBehavior.js":
+/*!*****************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/NonInterruptingBehavior.js ***!
+ \*****************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- setOptionLabelValue: setOptionLabelValue()
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ NonInterruptingBehavior)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var _util_NonInterruptingUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/NonInterruptingUtil */ "../node_modules/bpmn-js/lib/features/modeling/behavior/util/NonInterruptingUtil.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- });
- entries.push(fieldEntry);
- entries.push(entryFactory.validationAwareTextField({
- id: idPrefix + 'field-name',
- label: translate('Name'),
- modelProperty: 'fieldName',
- getProperty: function(element, node) {
- return (getSelectedField(element, node) || {}).name;
- },
- setProperty: function(element, values, node) {
- var selectedField = getSelectedField(element, node);
- return cmdHelper.updateBusinessObject(element, selectedField, { name : values.fieldName });
- },
- validate: function(element, values, node) {
- var bo = getSelectedField(element, node);
+function NonInterruptingBehavior(injector, modeling) {
+ injector.invoke(diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"], this);
- var validation = {};
- if (bo) {
- var nameValue = values.fieldName;
+ this.postExecuted('shape.replace', function(event) {
+ const oldShape = event.context.oldShape;
+ const newShape = event.context.newShape;
+ const hints = event.context.hints;
- if (nameValue) {
- if (utils.containsSpace(nameValue)) {
- validation.fieldName = translate('Name must not contain spaces');
- }
- } else {
- validation.fieldName = translate('Parameter must have a name');
- }
- }
+ if (!(0,_util_NonInterruptingUtil__WEBPACK_IMPORTED_MODULE_1__.canBeNonInterrupting)(newShape)) {
+ return;
+ }
- return validation;
- },
+ const property = (0,_util_NonInterruptingUtil__WEBPACK_IMPORTED_MODULE_1__.getInterruptingProperty)(newShape);
+ const isExplicitChange = hints.targetElement && hints.targetElement[property] !== undefined;
- hidden: function(element, node) {
- return !isSelected(element, node);
- }
+ if (isExplicitChange) {
+ return;
+ }
- }));
+ const isOldInterrupting = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(oldShape).get(property);
+ const isNewInterruptingDefault = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(newShape).get(property);
- var fieldTypeOptions = [
- {
- name: translate('String'),
- value: 'string'
- },
- {
- name: translate('Expression'),
- value: 'expression'
- }
- ];
+ if (isOldInterrupting === isNewInterruptingDefault) {
+ return;
+ }
- entries.push(entryFactory.selectBox({
- id: idPrefix + 'field-type',
- label: translate('Type'),
- selectOptions: fieldTypeOptions,
- modelProperty: 'fieldType',
+ modeling.updateProperties(newShape, {
+ [property]: isOldInterrupting
+ });
+ });
+}
- get: function(element, node) {
- var bo = getSelectedField(element, node);
+NonInterruptingBehavior.$inject = [ 'injector', 'modeling' ];
- var fieldType = getFieldType(bo);
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_3__["default"])(NonInterruptingBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- return {
- fieldType: fieldType
- };
- },
- set: function(element, values, node) {
- var props = assign({}, DEFAULT_PROPS);
+/***/ }),
- var fieldType = values.fieldType;
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/RemoveElementBehavior.js":
+/*!***************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/RemoveElementBehavior.js ***!
+ \***************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- if (fieldType === 'string') {
- props.string = '';
- }
- else if (fieldType === 'expression') {
- props.expression = '';
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ RemoveElementBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var _util_LineIntersect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util/LineIntersect */ "../node_modules/bpmn-js/lib/features/modeling/behavior/util/LineIntersect.js");
- return cmdHelper.updateBusinessObject(element, getSelectedField(element, node), props);
- },
- hidden: function(element, node) {
- return !isSelected(element, node);
- }
- }));
- entries.push(entryFactory.textBox({
- id: idPrefix + 'field-value',
- label: translate('Value'),
- modelProperty: 'fieldValue',
- get: function(element, node) {
- var bo = getSelectedField(element, node);
- var fieldType = getFieldType(bo);
- var fieldValue;
- if (fieldType === 'string') {
- fieldValue = bo && (bo.string || bo.stringValue);
- }
- else if (fieldType === 'expression') {
- fieldValue = bo && bo.expression;
- }
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../../rules/BpmnRules').default} BpmnRules
+ * @typedef {import('../Modeling').default} Modeling
+ */
- return {
- fieldValue: fieldValue
- };
- },
+/**
+ * @param {EventBus} eventBus
+ * @param {BpmnRules} bpmnRules
+ * @param {Modeling} modeling
+ */
+function RemoveElementBehavior(eventBus, bpmnRules, modeling) {
- set: function(element, values, node) {
- var bo = getSelectedField(element, node);
- var fieldType = getFieldType(bo);
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- var props = assign({}, DEFAULT_PROPS);
+ /**
+ * Combine sequence flows when deleting an element
+ * if there is one incoming and one outgoing
+ * sequence flow
+ */
+ this.preExecute('shape.delete', function(e) {
- var fieldValue = values.fieldValue || undefined;
+ var shape = e.context.shape;
- if (fieldType === 'string') {
- props.string = fieldValue;
- }
- else if (fieldType === 'expression') {
- props.expression = fieldValue;
- }
+ // only handle [a] -> [shape] -> [b] patterns
+ if (shape.incoming.length !== 1 || shape.outgoing.length !== 1) {
+ return;
+ }
- return cmdHelper.updateBusinessObject(element, bo, props);
+ var inConnection = shape.incoming[0],
+ outConnection = shape.outgoing[0];
- },
+ // only handle sequence flows
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(inConnection, 'bpmn:SequenceFlow') || !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(outConnection, 'bpmn:SequenceFlow')) {
+ return;
+ }
- validate: function(element, values, node) {
- var bo = getSelectedField(element, node);
+ if (bpmnRules.canConnect(inConnection.source, outConnection.target, inConnection)) {
- var validation = {};
- if (bo) {
- if (!values.fieldValue) {
- validation.fieldValue = translate('Must provide a value');
- }
- }
+ // compute new, combined waypoints
+ var newWaypoints = getNewWaypoints(inConnection.waypoints, outConnection.waypoints);
- return validation;
- },
+ modeling.reconnectEnd(inConnection, outConnection.target, newWaypoints);
+ }
+ });
- show: function(element, node) {
- return isSelected(element, node);
- }
+}
- }));
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_2__["default"])(RemoveElementBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- return entries;
+RemoveElementBehavior.$inject = [
+ 'eventBus',
+ 'bpmnRules',
+ 'modeling'
+];
- };
- },{"../../../../Utils":5,"../../../../factory/EntryFactory":14,"../../../../helper/CmdHelper":25,"../../../../helper/ElementHelper":26,"../../../../helper/ExtensionElementsHelper":28,"./ExtensionElements":96,"bpmn-js/lib/util/ModelUtil":240,"lodash/assign":604}],100:[function(require,module,exports){
- 'use strict';
+// helpers //////////////////////
- var entryFactory = require('../../../../factory/EntryFactory');
+function getDocking(point) {
+ return point.original || point;
+}
- var cmdHelper = require('../../../../helper/CmdHelper');
- module.exports = function(element, bpmnFactory, options, translate) {
+function getNewWaypoints(inWaypoints, outWaypoints) {
- var getBusinessObject = options.getBusinessObject;
+ var intersection = (0,_util_LineIntersect__WEBPACK_IMPORTED_MODULE_3__["default"])(
+ getDocking(inWaypoints[inWaypoints.length - 2]),
+ getDocking(inWaypoints[inWaypoints.length - 1]),
+ getDocking(outWaypoints[1]),
+ getDocking(outWaypoints[0]));
- var historyTimeToLiveEntry = entryFactory.textField({
- id: 'historyTimeToLive',
- label: translate('History Time To Live'),
- modelProperty: 'historyTimeToLive',
+ if (intersection) {
+ return [].concat(
+ inWaypoints.slice(0, inWaypoints.length - 1),
+ [ intersection ],
+ outWaypoints.slice(1));
+ } else {
+ return [
+ getDocking(inWaypoints[0]),
+ getDocking(outWaypoints[outWaypoints.length - 1])
+ ];
+ }
+}
- get: function(element, node) {
- var bo = getBusinessObject(element);
- var historyTimeToLive = bo.get('camunda:historyTimeToLive');
+/***/ }),
- return {
- historyTimeToLive: historyTimeToLive ? historyTimeToLive : ''
- };
- },
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/RemoveEmbeddedLabelBoundsBehavior.js":
+/*!***************************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/RemoveEmbeddedLabelBoundsBehavior.js ***!
+ \***************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- set: function(element, values) {
- var bo = getBusinessObject(element);
- return cmdHelper.updateBusinessObject(element, bo, {
- 'camunda:historyTimeToLive': values.historyTimeToLive || undefined
- });
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ RemoveEmbeddedLabelBoundsBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- });
- return [ historyTimeToLiveEntry ];
- };
- },{"../../../../factory/EntryFactory":14,"../../../../helper/CmdHelper":25}],101:[function(require,module,exports){
- 'use strict';
- var entryFactory = require('../../../../factory/EntryFactory'),
- cmdHelper = require('../../../../helper/CmdHelper'),
- extensionElementsHelper = require('../../../../helper/ExtensionElementsHelper'),
- elementHelper = require('../../../../helper/ElementHelper');
- var assign = require('lodash/assign');
- var map = require('lodash/map');
- var DEFAULT_DELEGATE_PROPS = [ 'class', 'expression', 'delegateExpression' ];
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../Modeling').default} Modeling
+ */
- var DELEGATE_PROPS = {
- 'camunda:class': undefined,
- 'camunda:expression': undefined,
- 'camunda:delegateExpression': undefined,
- 'camunda:resultVariable': undefined
- };
+/**
+ * BPMN specific behavior ensuring that bpmndi:Label's dc:Bounds are removed
+ * when shape is resized.
+ *
+ * @param {EventBus} eventBus
+ * @param {Modeling} modeling
+ */
+function RemoveEmbeddedLabelBoundsBehavior(eventBus, modeling) {
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- var DMN_CAPABLE_PROPS = {
- 'camunda:decisionRef': undefined,
- 'camunda:decisionRefBinding': 'latest',
- 'camunda:decisionRefVersion': undefined,
- 'camunda:mapDecisionResult': 'resultList',
- 'camunda:decisionRefTenantId': undefined
- };
+ this.preExecute('shape.resize', function(context) {
+ var shape = context.shape;
+ var di = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getDi)(shape),
+ label = di && di.get('label'),
+ bounds = label && label.get('bounds');
- var EXTERNAL_CAPABLE_PROPS = {
- 'camunda:type': undefined,
- 'camunda:topic': undefined
- };
+ if (bounds) {
+ modeling.updateModdleProperties(shape, label, {
+ bounds: undefined
+ });
+ }
+ }, true);
+}
- module.exports = function(element, bpmnFactory, options, translate) {
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_2__["default"])(RemoveEmbeddedLabelBoundsBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- var DEFAULT_OPTIONS = [
- { value: 'class', name: translate('Java Class') },
- { value: 'expression', name: translate('Expression') },
- { value: 'delegateExpression', name: translate('Delegate Expression') }
- ];
+RemoveEmbeddedLabelBoundsBehavior.$inject = [
+ 'eventBus',
+ 'modeling'
+];
- var DMN_OPTION = [
- { value: 'dmn', name: translate('DMN') }
- ];
+/***/ }),
- var EXTERNAL_OPTION = [
- { value: 'external', name: translate('External') }
- ];
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/RemoveParticipantBehavior.js":
+/*!*******************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/RemoveParticipantBehavior.js ***!
+ \*******************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var CONNECTOR_OPTION = [
- { value: 'connector', name: translate('Connector') }
- ];
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ RemoveParticipantBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- var SCRIPT_OPTION = [
- { value: 'script', name: translate('Script') }
- ];
- var getType = options.getImplementationType,
- getBusinessObject = options.getBusinessObject;
- var hasDmnSupport = options.hasDmnSupport,
- hasExternalSupport = options.hasExternalSupport,
- hasServiceTaskLikeSupport = options.hasServiceTaskLikeSupport,
- hasScriptSupport = options.hasScriptSupport;
- var entries = [];
- var selectOptions = DEFAULT_OPTIONS.concat([]);
- if (hasDmnSupport) {
- selectOptions = selectOptions.concat(DMN_OPTION);
- }
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../Modeling').default} Modeling
+ */
- if (hasExternalSupport) {
- selectOptions = selectOptions.concat(EXTERNAL_OPTION);
- }
+/**
+ * BPMN specific remove behavior.
+ *
+ * @param {EventBus} eventBus
+ * @param {Modeling} modeling
+ */
+function RemoveParticipantBehavior(eventBus, modeling) {
- if (hasServiceTaskLikeSupport) {
- selectOptions = selectOptions.concat(CONNECTOR_OPTION);
- }
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- if (hasScriptSupport) {
- selectOptions = selectOptions.concat(SCRIPT_OPTION);
- }
- selectOptions.push({ value: '' });
+ /**
+ * morph collaboration diagram into process diagram
+ * after the last participant has been removed
+ */
- entries.push(entryFactory.selectBox({
- id : 'implementation',
- label: translate('Implementation'),
- selectOptions: selectOptions,
- modelProperty: 'implType',
+ this.preExecute('shape.delete', function(context) {
- get: function(element, node) {
- return {
- implType: getType(element) || ''
- };
- },
+ var shape = context.shape,
+ parent = shape.parent;
- set: function(element, values, node) {
- var bo = getBusinessObject(element);
- var oldType = getType(element);
- var newType = values.implType;
+ // activate the behavior if the shape to be removed
+ // is a participant
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:Participant')) {
+ context.collaborationRoot = parent;
+ }
+ }, true);
- var props = assign({}, DELEGATE_PROPS);
+ this.postExecute('shape.delete', function(context) {
- if (DEFAULT_DELEGATE_PROPS.indexOf(newType) !== -1) {
+ var collaborationRoot = context.collaborationRoot;
- var newValue = '';
- if (DEFAULT_DELEGATE_PROPS.indexOf(oldType) !== -1) {
- newValue = bo.get('camunda:' + oldType);
- }
- props['camunda:' + newType] = newValue;
- }
+ if (collaborationRoot && !collaborationRoot.businessObject.participants.length) {
- if (hasDmnSupport) {
- props = assign(props, DMN_CAPABLE_PROPS);
- if (newType === 'dmn') {
- props['camunda:decisionRef'] = '';
- }
- }
+ // replace empty collaboration with process diagram
+ modeling.makeProcess();
+ }
+ }, true);
- if (hasExternalSupport) {
- props = assign(props, EXTERNAL_CAPABLE_PROPS);
- if (newType === 'external') {
- props['camunda:type'] = 'external';
- props['camunda:topic'] = '';
- }
- }
+}
- if (hasScriptSupport) {
- props['camunda:script'] = undefined;
+RemoveParticipantBehavior.$inject = [ 'eventBus', 'modeling' ];
- if (newType === 'script') {
- props['camunda:script'] = elementHelper.createElement('camunda:Script', {}, bo, bpmnFactory);
- }
- }
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_2__["default"])(RemoveParticipantBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- var commands = [];
- commands.push(cmdHelper.updateBusinessObject(element, bo, props));
+/***/ }),
- if (hasServiceTaskLikeSupport) {
- var connectors = extensionElementsHelper.getExtensionElements(bo, 'camunda:Connector');
- commands.push(map(connectors, function(connector) {
- return extensionElementsHelper.removeEntry(bo, element, connector);
- }));
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/ReplaceConnectionBehavior.js":
+/*!*******************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/ReplaceConnectionBehavior.js ***!
+ \*******************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- if (newType === 'connector') {
- var extensionElements = bo.get('extensionElements');
- if (!extensionElements) {
- extensionElements = elementHelper.createElement('bpmn:ExtensionElements', { values: [] }, bo, bpmnFactory);
- commands.push(cmdHelper.updateBusinessObject(element, bo, { extensionElements: extensionElements }));
- }
- var connector = elementHelper.createElement('camunda:Connector', {}, extensionElements, bpmnFactory);
- commands.push(cmdHelper.addAndRemoveElementsFromList(
- element,
- extensionElements,
- 'values',
- 'extensionElements',
- [ connector ],
- []
- ));
- }
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ ReplaceConnectionBehavior)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- return commands;
- }
- }));
- return entries;
- };
- },{"../../../../factory/EntryFactory":14,"../../../../helper/CmdHelper":25,"../../../../helper/ElementHelper":26,"../../../../helper/ExtensionElementsHelper":28,"lodash/assign":604,"lodash/map":631}],102:[function(require,module,exports){
- 'use strict';
- var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject;
- var elementHelper = require('../../../../helper/ElementHelper'),
- extensionElementsHelper = require('../../../../helper/ExtensionElementsHelper'),
- inputOutputHelper = require('../../../../helper/InputOutputHelper'),
- cmdHelper = require('../../../../helper/CmdHelper');
- var extensionElementsEntry = require('./ExtensionElements');
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../Modeling').default} Modeling
+ * @typedef {import('../../rules/BpmnRules').default} BpmnRules
+ * @typedef {import('didi').Injector} Injector
+ */
+/**
+ * @param {EventBus} eventBus
+ * @param {Modeling} modeling
+ * @param {BpmnRules} bpmnRules
+ * @param {Injector} injector
+ */
+function ReplaceConnectionBehavior(eventBus, modeling, bpmnRules, injector) {
+
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
+
+ var dragging = injector.get('dragging', false);
+
+ function fixConnection(connection) {
+
+ var source = connection.source,
+ target = connection.target,
+ parent = connection.parent;
+
+ // do not do anything if connection
+ // is already deleted (may happen due to other
+ // behaviors plugged-in before)
+ if (!parent) {
+ return;
+ }
+
+ var replacementType,
+ remove;
+
+ /**
+ * Check if incoming or outgoing connections
+ * can stay or could be substituted with an
+ * appropriate replacement.
+ *
+ * This holds true for SequenceFlow <> MessageFlow.
+ */
- function getInputOutput(element, insideConnector) {
- return inputOutputHelper.getInputOutput(element, insideConnector);
- }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(connection, 'bpmn:SequenceFlow')) {
+ if (!bpmnRules.canConnectSequenceFlow(source, target)) {
+ remove = true;
+ }
- function getConnector(element) {
- return inputOutputHelper.getConnector(element);
- }
+ if (bpmnRules.canConnectMessageFlow(source, target)) {
+ replacementType = 'bpmn:MessageFlow';
+ }
+ }
- function getInputParameters(element, insideConnector) {
- return inputOutputHelper.getInputParameters(element, insideConnector);
- }
+ // transform message flows into sequence flows, if possible
- function getOutputParameters(element, insideConnector) {
- return inputOutputHelper.getOutputParameters(element, insideConnector);
- }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(connection, 'bpmn:MessageFlow')) {
- function getInputParameter(element, insideConnector, idx) {
- return inputOutputHelper.getInputParameter(element, insideConnector, idx);
- }
+ if (!bpmnRules.canConnectMessageFlow(source, target)) {
+ remove = true;
+ }
+
+ if (bpmnRules.canConnectSequenceFlow(source, target)) {
+ replacementType = 'bpmn:SequenceFlow';
+ }
+ }
+
+ // remove invalid connection,
+ // unless it has been removed already
+ if (remove) {
+ modeling.removeConnection(connection);
+ }
+
+ // replace SequenceFlow <> MessageFlow
+
+ if (replacementType) {
+ modeling.connect(source, target, {
+ type: replacementType,
+ waypoints: connection.waypoints.slice()
+ });
+ }
+ }
+
+ function replaceReconnectedConnection(event) {
- function getOutputParameter(element, insideConnector, idx) {
- return inputOutputHelper.getOutputParameter(element, insideConnector, idx);
- }
+ var context = event.context,
+ connection = context.connection,
+ source = context.newSource || connection.source,
+ target = context.newTarget || connection.target,
+ allowed,
+ replacement;
+
+ allowed = bpmnRules.canConnect(source, target);
+
+ if (!allowed || allowed.type === connection.type) {
+ return;
+ }
+
+ replacement = modeling.connect(source, target, {
+ type: allowed.type,
+ associationDirection: allowed.associationDirection,
+ waypoints: connection.waypoints.slice()
+ });
+
+ // remove old connection unless it's already removed
+ if (connection.parent) {
+ modeling.removeConnection(connection);
+ }
+ // replace connection in context to reconnect end/start
+ context.connection = replacement;
- function createElement(type, parent, factory, properties) {
- return elementHelper.createElement(type, properties, parent, factory);
- }
+ if (dragging) {
+ cleanDraggingSelection(connection, replacement);
+ }
+ }
- function createInputOutput(parent, bpmnFactory, properties) {
- return createElement('camunda:InputOutput', parent, bpmnFactory, properties);
- }
+ // monkey-patch selection saved in dragging in order to re-select it when operation is finished
+ function cleanDraggingSelection(oldConnection, newConnection) {
+ var context = dragging.context(),
+ previousSelection = context && context.payload.previousSelection,
+ index;
- function createParameter(type, parent, bpmnFactory, properties) {
- return createElement(type, parent, bpmnFactory, properties);
- }
+ // do nothing if not dragging or no selection was present
+ if (!previousSelection || !previousSelection.length) {
+ return;
+ }
+ index = previousSelection.indexOf(oldConnection);
- function ensureInputOutputSupported(element, insideConnector) {
- return inputOutputHelper.isInputOutputSupported(element, insideConnector);
- }
+ if (index === -1) {
+ return;
+ }
- function ensureOutparameterSupported(element, insideConnector) {
- return inputOutputHelper.areOutputParametersSupported(element, insideConnector);
- }
+ previousSelection.splice(index, 1, newConnection);
+ }
- module.exports = function(element, bpmnFactory, options, translate) {
+ // lifecycle hooks
- var TYPE_LABEL = {
- 'camunda:Map': translate('Map'),
- 'camunda:List': translate('List'),
- 'camunda:Script': translate('Script')
- };
+ this.postExecuted('elements.move', function(context) {
- options = options || {};
+ var closure = context.closure,
+ allConnections = closure.allConnections;
- var insideConnector = !!options.insideConnector,
- idPrefix = options.idPrefix || '';
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(allConnections, fixConnection);
+ }, true);
- var getSelected = function(element, node) {
- var selection = (inputEntry && inputEntry.getSelected(element, node)) || { idx: -1 };
+ this.preExecute('connection.reconnect', replaceReconnectedConnection);
- var parameter = getInputParameter(element, insideConnector, selection.idx);
- if (!parameter && outputEntry) {
- selection = outputEntry.getSelected(element, node);
- parameter = getOutputParameter(element, insideConnector, selection.idx);
- }
- return parameter;
- };
+ this.postExecuted('element.updateProperties', function(event) {
+ var context = event.context,
+ properties = context.properties,
+ element = context.element,
+ businessObject = element.businessObject,
+ connection;
- var result = {
- getSelectedParameter: getSelected
- };
+ // remove condition on change to default
+ if (properties.default) {
+ connection = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.find)(
+ element.outgoing,
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.matchPattern)({ id: element.businessObject.default.id })
+ );
- var entries = result.entries = [];
+ if (connection) {
+ modeling.updateProperties(connection, { conditionExpression: undefined });
+ }
+ }
- if (!ensureInputOutputSupported(element)) {
- return result;
- }
+ // remove default from source on change to conditional
+ if (properties.conditionExpression && businessObject.sourceRef.default === businessObject) {
+ modeling.updateProperties(element.source, { default: undefined });
+ }
+ });
+}
- var newElement = function(type, prop, factory) {
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_3__["default"])(ReplaceConnectionBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- return function(element, extensionElements, value) {
- var commands = [];
+ReplaceConnectionBehavior.$inject = [
+ 'eventBus',
+ 'modeling',
+ 'bpmnRules',
+ 'injector'
+];
- var inputOutput = getInputOutput(element, insideConnector);
- if (!inputOutput) {
- var parent = !insideConnector ? extensionElements : getConnector(element);
- inputOutput = createInputOutput(parent, bpmnFactory, {
- inputParameters: [],
- outputParameters: []
- });
- if (!insideConnector) {
- commands.push(cmdHelper.addAndRemoveElementsFromList(
- element,
- extensionElements,
- 'values',
- 'extensionElements',
- [ inputOutput ],
- []
- ));
- } else {
- commands.push(cmdHelper.updateBusinessObject(element, parent, { inputOutput: inputOutput }));
- }
- }
+/***/ }),
- var newElem = createParameter(type, inputOutput, bpmnFactory, { name: value });
- commands.push(cmdHelper.addElementsTolist(element, inputOutput, prop, [ newElem ]));
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/ReplaceElementBehaviour.js":
+/*!*****************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/ReplaceElementBehaviour.js ***!
+ \*****************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- return commands;
- };
- };
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ ReplaceElementBehaviour)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
- var removeElement = function(getter, prop, otherProp) {
- return function(element, extensionElements, value, idx) {
- var inputOutput = getInputOutput(element, insideConnector);
- var parameter = getter(element, insideConnector, idx);
- var commands = [];
- commands.push(cmdHelper.removeElementsFromList(element, inputOutput, prop, null, [ parameter ]));
- var firstLength = inputOutput.get(prop).length-1;
- var secondLength = (inputOutput.get(otherProp) || []).length;
- if (!firstLength && !secondLength) {
- if (!insideConnector) {
- commands.push(extensionElementsHelper.removeEntry(getBusinessObject(element), element, inputOutput));
- } else {
- var connector = getConnector(element);
- commands.push(cmdHelper.updateBusinessObject(element, connector, { inputOutput: undefined }));
- }
- }
- return commands;
- };
- };
- var setOptionLabelValue = function(getter) {
- return function(element, node, option, property, value, idx) {
- var parameter = getter(element, insideConnector, idx);
+/**
+ * @typedef {import('../../replace/BpmnReplace').default} BpmnReplace
+ * @typedef {import('../../rules/BpmnRules').default} BpmnRules
+ * @typedef {import('diagram-js/lib/core/ElementRegistry').default} ElementRegistry
+ * @typedef {import('didi').Injector} Injector
+ * @typedef {import('../Modeling').default} Modeling
+ * @typedef {import('diagram-js/lib/features/selection/Selection').default} Selection
+ */
- var suffix = 'Text';
+/**
+ * BPMN-specific replace behavior.
+ *
+ * @param {BpmnReplace} bpmnReplace
+ * @param {BpmnRules} bpmnRules
+ * @param {ElementRegistry} elementRegistry
+ * @param {Injector} injector
+ * @param {Modeling} modeling
+ * @param {Selection} selection
+ */
+function ReplaceElementBehaviour(
+ bpmnReplace,
+ bpmnRules,
+ elementRegistry,
+ injector,
+ modeling,
+ selection
+) {
+ injector.invoke(diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"], this);
+
+ this._bpmnReplace = bpmnReplace;
+ this._elementRegistry = elementRegistry;
+ this._selection = selection;
+
+ // replace elements on create, e.g. during copy-paste
+ this.postExecuted([ 'elements.create' ], 500, function(event) {
+ var context = event.context,
+ target = context.parent,
+ elements = context.elements;
+
+ var elementReplacements = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.reduce)(elements, function(replacements, element) {
+ var canReplace = bpmnRules.canReplace([ element ], element.host || element.parent || target);
+
+ return canReplace ? replacements.concat(canReplace.replacements) : replacements;
+ }, []);
+
+ if (elementReplacements.length) {
+ this._replaceElements(elements, elementReplacements);
+ }
+ }, this);
+
+ // replace elements on move
+ this.postExecuted([ 'elements.move' ], 500, function(event) {
+ var context = event.context,
+ target = context.newParent,
+ newHost = context.newHost,
+ elements = [];
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(context.closure.topLevel, function(topLevelElements) {
+ if ((0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_2__.isEventSubProcess)(topLevelElements)) {
+ elements = elements.concat(topLevelElements.children);
+ } else {
+ elements = elements.concat(topLevelElements);
+ }
+ });
+
+ // set target to host if attaching
+ if (elements.length === 1 && newHost) {
+ target = newHost;
+ }
+
+ var canReplace = bpmnRules.canReplace(elements, target);
+
+ if (canReplace) {
+ this._replaceElements(elements, canReplace.replacements, newHost);
+ }
+ }, this);
+
+ // update attachments on host replace
+ this.postExecute([ 'shape.replace' ], 1500, function(e) {
+ var context = e.context,
+ oldShape = context.oldShape,
+ newShape = context.newShape,
+ attachers = oldShape.attachers,
+ canReplace;
+
+ if (attachers && attachers.length) {
+ canReplace = bpmnRules.canReplace(attachers, newShape);
+
+ this._replaceElements(attachers, canReplace.replacements);
+ }
+
+ }, this);
+
+ // keep ID on shape replace
+ this.postExecuted([ 'shape.replace' ], 1500, function(e) {
+ var context = e.context,
+ oldShape = context.oldShape,
+ newShape = context.newShape;
+
+ modeling.unclaimId(oldShape.businessObject.id, oldShape.businessObject);
+ modeling.updateProperties(newShape, { id: oldShape.id });
+ });
+}
+
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_3__["default"])(ReplaceElementBehaviour, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
+
+ReplaceElementBehaviour.prototype._replaceElements = function(elements, newElements) {
+ var elementRegistry = this._elementRegistry,
+ bpmnReplace = this._bpmnReplace,
+ selection = this._selection;
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(newElements, function(replacement) {
+ var newElement = {
+ type: replacement.newElementType
+ };
+
+ var oldElement = elementRegistry.get(replacement.oldElementId);
+
+ var idx = elements.indexOf(oldElement);
+
+ elements[idx] = bpmnReplace.replaceElement(oldElement, newElement, { select: false });
+ });
+
+ if (newElements) {
+ selection.select(elements);
+ }
+};
- var definition = parameter.get('definition');
- if (typeof definition !== 'undefined') {
- var type = definition.$type;
- suffix = TYPE_LABEL[type];
- }
+ReplaceElementBehaviour.$inject = [
+ 'bpmnReplace',
+ 'bpmnRules',
+ 'elementRegistry',
+ 'injector',
+ 'modeling',
+ 'selection'
+];
- option.text = (value || '') + ' : ' + suffix;
- };
- };
+/***/ }),
- // input parameters ///////////////////////////////////////////////////////////////
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/ResizeBehavior.js":
+/*!********************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/ResizeBehavior.js ***!
+ \********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var inputEntry = extensionElementsEntry(element, bpmnFactory, {
- id: idPrefix + 'inputs',
- label: translate('Input Parameters'),
- modelProperty: 'name',
- prefix: 'Input',
- resizable: true,
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ GROUP_MIN_DIMENSIONS: () => (/* binding */ GROUP_MIN_DIMENSIONS),
+/* harmony export */ LANE_MIN_DIMENSIONS: () => (/* binding */ LANE_MIN_DIMENSIONS),
+/* harmony export */ PARTICIPANT_MIN_DIMENSIONS: () => (/* binding */ PARTICIPANT_MIN_DIMENSIONS),
+/* harmony export */ SUB_PROCESS_MIN_DIMENSIONS: () => (/* binding */ SUB_PROCESS_MIN_DIMENSIONS),
+/* harmony export */ TEXT_ANNOTATION_MIN_DIMENSIONS: () => (/* binding */ TEXT_ANNOTATION_MIN_DIMENSIONS),
+/* harmony export */ VERTICAL_LANE_MIN_DIMENSIONS: () => (/* binding */ VERTICAL_LANE_MIN_DIMENSIONS),
+/* harmony export */ VERTICAL_PARTICIPANT_MIN_DIMENSIONS: () => (/* binding */ VERTICAL_PARTICIPANT_MIN_DIMENSIONS),
+/* harmony export */ "default": () => (/* binding */ ResizeBehavior),
+/* harmony export */ getParticipantResizeConstraints: () => (/* binding */ getParticipantResizeConstraints)
+/* harmony export */ });
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
+/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+/* harmony import */ var _util_LaneUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/LaneUtil */ "../node_modules/bpmn-js/lib/features/modeling/util/LaneUtil.js");
- createExtensionElement: newElement('camunda:InputParameter', 'inputParameters'),
- removeExtensionElement: removeElement(getInputParameter, 'inputParameters', 'outputParameters'),
- getExtensionElements: function(element) {
- return getInputParameters(element, insideConnector);
- },
- onSelectionChange: function(element, node, event, scope) {
- outputEntry && outputEntry.deselect(element, node);
- },
- setOptionLabelValue: setOptionLabelValue(getInputParameter)
- });
- entries.push(inputEntry);
- // output parameters ///////////////////////////////////////////////////////
- if (ensureOutparameterSupported(element, insideConnector)) {
- var outputEntry = extensionElementsEntry(element, bpmnFactory, {
- id: idPrefix + 'outputs',
- label: translate('Output Parameters'),
- modelProperty: 'name',
- prefix: 'Output',
- resizable: true,
+var HIGH_PRIORITY = 1500;
- createExtensionElement: newElement('camunda:OutputParameter', 'outputParameters'),
- removeExtensionElement: removeElement(getOutputParameter, 'outputParameters', 'inputParameters'),
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ *
+ * @typedef {import('../../../model/Types').Shape} Shape
+ *
+ * @typedef {import('diagram-js/lib/util/Types').Dimensions} Dimensions
+ * @typedef {import('diagram-js/lib/util/Types').Direction} Direction
+ * @typedef {import('diagram-js/lib/util/Types').RectTRBL} RectTRBL
+ */
- getExtensionElements: function(element) {
- return getOutputParameters(element, insideConnector);
- },
+/**
+ * @type {Dimensions}
+ */
+var GROUP_MIN_DIMENSIONS = { width: 140, height: 120 };
- onSelectionChange: function(element, node, event, scope) {
- inputEntry.deselect(element, node);
- },
+/**
+ * @type {Dimensions}
+ */
+var LANE_MIN_DIMENSIONS = { width: 300, height: 60 };
- setOptionLabelValue: setOptionLabelValue(getOutputParameter)
+/**
+ * @type {Dimensions}
+ */
+var VERTICAL_LANE_MIN_DIMENSIONS = { width: 60, height: 300 };
- });
- entries.push(outputEntry);
- }
+/**
+ * @type {Dimensions}
+ */
+var PARTICIPANT_MIN_DIMENSIONS = { width: 300, height: 150 };
- return result;
+/**
+ * @type {Dimensions}
+ */
+var VERTICAL_PARTICIPANT_MIN_DIMENSIONS = { width: 150, height: 300 };
- };
+/**
+ * @type {Dimensions}
+ */
+var SUB_PROCESS_MIN_DIMENSIONS = { width: 140, height: 120 };
- },{"../../../../helper/CmdHelper":25,"../../../../helper/ElementHelper":26,"../../../../helper/ExtensionElementsHelper":28,"../../../../helper/InputOutputHelper":31,"./ExtensionElements":96,"bpmn-js/lib/util/ModelUtil":240}],103:[function(require,module,exports){
- 'use strict';
+/**
+ * @type {Dimensions}
+ */
+var TEXT_ANNOTATION_MIN_DIMENSIONS = { width: 50, height: 30 };
- var is = require('bpmn-js/lib/util/ModelUtil').is;
+/**
+ * Set minimum bounds/resize constraints on resize.
+ *
+ * @param {EventBus} eventBus
+ */
+function ResizeBehavior(eventBus) {
+ eventBus.on('resize.start', HIGH_PRIORITY, function(event) {
+ var context = event.context,
+ shape = context.shape,
+ direction = context.direction,
+ balanced = context.balanced;
- var elementHelper = require('../../../../helper/ElementHelper'),
- inputOutputHelper = require('../../../../helper/InputOutputHelper'),
- cmdHelper = require('../../../../helper/CmdHelper'),
- utils = require('../../../../Utils');
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(shape, 'bpmn:Lane') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(shape, 'bpmn:Participant')) {
+ context.resizeConstraints = getParticipantResizeConstraints(shape, direction, balanced);
+ }
- var entryFactory = require('../../../../factory/EntryFactory'),
- scriptImplementation = require('./Script');
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(shape, 'bpmn:SubProcess') && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_1__.isExpanded)(shape)) {
+ context.minDimensions = SUB_PROCESS_MIN_DIMENSIONS;
+ }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(shape, 'bpmn:TextAnnotation')) {
+ context.minDimensions = TEXT_ANNOTATION_MIN_DIMENSIONS;
+ }
+ });
+}
- function createElement(type, parent, factory, properties) {
- return elementHelper.createElement(type, properties, parent, factory);
- }
+ResizeBehavior.$inject = [ 'eventBus' ];
- function isScript(elem) {
- return is(elem, 'camunda:Script');
- }
- function isList(elem) {
- return is(elem, 'camunda:List');
- }
+var abs = Math.abs,
+ min = Math.min,
+ max = Math.max;
- function isMap(elem) {
- return is(elem, 'camunda:Map');
- }
- function ensureInputOutputSupported(element, insideConnector) {
- return inputOutputHelper.isInputOutputSupported(element, insideConnector);
- }
+function addToTrbl(trbl, attr, value, choice) {
+ var current = trbl[attr];
- module.exports = function(element, bpmnFactory, options, translate) {
+ // make sure to set the value if it does not exist
+ // or apply the correct value by comparing against
+ // choice(value, currentValue)
+ trbl[attr] = current === undefined ? value : choice(value, current);
+}
- var typeInfo = {
- 'camunda:Map': {
- value: 'map',
- label: translate('Map')
- },
- 'camunda:List': {
- value: 'list',
- label: translate('List')
- },
- 'camunda:Script': {
- value: 'script',
- label: translate('Script')
- }
- };
+function addMin(trbl, attr, value) {
+ return addToTrbl(trbl, attr, value, min);
+}
- options = options || {};
+function addMax(trbl, attr, value) {
+ return addToTrbl(trbl, attr, value, max);
+}
- var insideConnector = !!options.insideConnector,
- idPrefix = options.idPrefix || '';
+var LANE_PADDING = { top: 20, left: 50, right: 20, bottom: 20 },
+ VERTICAL_LANE_PADDING = { top: 50, left: 20, right: 20, bottom: 20 };
- var getSelected = options.getSelectedParameter;
+/**
+ * @param {Shape} laneShape
+ * @param {Direction} resizeDirection
+ * @param {boolean} [balanced=false]
+ *
+ * @return { {
+ * min: RectTRBL;
+ * max: RectTRBL;
+ * } }
+ */
+function getParticipantResizeConstraints(laneShape, resizeDirection, balanced) {
+ var lanesRoot = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_2__.getLanesRoot)(laneShape);
- if (!ensureInputOutputSupported(element, insideConnector)) {
- return [];
- }
+ var isFirst = true,
+ isLast = true;
+
+ var allLanes = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_2__.collectLanes)(lanesRoot, [ lanesRoot ]);
+
+ var laneTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.asTRBL)(laneShape);
- var entries = [];
+ var maxTrbl = {},
+ minTrbl = {};
- var isSelected = function(element, node) {
- return getSelected(element, node);
- };
+ var isHorizontalLane = (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_1__.isHorizontal)(laneShape);
+ var minDimensions = isHorizontalLane ? LANE_MIN_DIMENSIONS : VERTICAL_LANE_MIN_DIMENSIONS;
- // parameter name ////////////////////////////////////////////////////////
+ if (/n/.test(resizeDirection)) {
+ minTrbl.top = laneTrbl.bottom - minDimensions.height;
+ } else
+ if (/e/.test(resizeDirection)) {
+ minTrbl.right = laneTrbl.left + minDimensions.width;
+ } else
+ if (/s/.test(resizeDirection)) {
+ minTrbl.bottom = laneTrbl.top + minDimensions.height;
+ } else
+ if (/w/.test(resizeDirection)) {
+ minTrbl.left = laneTrbl.right - minDimensions.width;
+ }
- entries.push(entryFactory.validationAwareTextField({
- id: idPrefix + 'parameterName',
- label: translate('Name'),
- modelProperty: 'name',
+ // min/max size based on related lanes
+ allLanes.forEach(function(other) {
- getProperty: function(element, node) {
- return (getSelected(element, node) || {}).name;
- },
+ var otherTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.asTRBL)(other);
- setProperty: function(element, values, node) {
- var param = getSelected(element, node);
- return cmdHelper.updateBusinessObject(element, param, values);
- },
+ if (/n/.test(resizeDirection)) {
+ if (isHorizontalLane && otherTrbl.top < (laneTrbl.top - 10)) {
+ isFirst = false;
+ }
- validate: function(element, values, node) {
- var bo = getSelected(element, node);
+ // max top size (based on next element)
+ if (balanced && abs(laneTrbl.top - otherTrbl.bottom) < 10) {
+ addMax(maxTrbl, 'top', otherTrbl.top + minDimensions.height);
+ }
- var validation = {};
- if (bo) {
- var nameValue = values.name;
+ // min top size (based on self or nested element)
+ if (abs(laneTrbl.top - otherTrbl.top) < 5) {
+ addMin(minTrbl, 'top', otherTrbl.bottom - minDimensions.height);
+ }
+ }
+
+ if (/e/.test(resizeDirection)) {
+
+ if (!isHorizontalLane && otherTrbl.right > (laneTrbl.right + 10)) {
+ isLast = false;
+ }
- if (nameValue) {
- if (utils.containsSpace(nameValue)) {
- validation.name = translate('Name must not contain spaces');
- }
- } else {
- validation.name = translate('Parameter must have a name');
- }
- }
+ // max right size (based on previous element)
+ if (balanced && abs(laneTrbl.right - otherTrbl.left) < 10) {
+ addMin(maxTrbl, 'right', otherTrbl.right - minDimensions.width);
+ }
- return validation;
- },
+ // min right size (based on self or nested element)
+ if (abs(laneTrbl.right - otherTrbl.right) < 5) {
+ addMax(minTrbl, 'right', otherTrbl.left + minDimensions.width);
+ }
+ }
- hidden: function(element, node) {
- return !isSelected(element, node);
- }
- }));
+ if (/s/.test(resizeDirection)) {
+ if (isHorizontalLane && otherTrbl.bottom > (laneTrbl.bottom + 10)) {
+ isLast = false;
+ }
- // parameter type //////////////////////////////////////////////////////
+ // max bottom size (based on previous element)
+ if (balanced && abs(laneTrbl.bottom - otherTrbl.top) < 10) {
+ addMin(maxTrbl, 'bottom', otherTrbl.bottom - minDimensions.height);
+ }
- var selectOptions = [
- { value: 'text', name: translate('Text') },
- { value: 'script', name: translate('Script') },
- { value: 'list', name: translate('List') },
- { value: 'map', name: translate('Map') }
- ];
+ // min bottom size (based on self or nested element)
+ if (abs(laneTrbl.bottom - otherTrbl.bottom) < 5) {
+ addMax(minTrbl, 'bottom', otherTrbl.top + minDimensions.height);
+ }
+ }
- entries.push(entryFactory.selectBox({
- id : idPrefix + 'parameterType',
- label: translate('Type'),
- selectOptions: selectOptions,
- modelProperty: 'parameterType',
+ if (/w/.test(resizeDirection)) {
- get: function(element, node) {
- var bo = getSelected(element, node);
+ if (!isHorizontalLane && otherTrbl.left < (laneTrbl.left - 10)) {
+ isFirst = false;
+ }
- var parameterType = 'text';
+ // max left size (based on next element)
+ if (balanced && abs(laneTrbl.left - otherTrbl.right) < 10) {
+ addMax(maxTrbl, 'left', otherTrbl.left + minDimensions.width);
+ }
- if (typeof bo !== 'undefined') {
- var definition = bo.get('definition');
- if (typeof definition !== 'undefined') {
- var type = definition.$type;
- parameterType = typeInfo[type].value;
- }
- }
+ // min left size (based on self or nested element)
+ if (abs(laneTrbl.left - otherTrbl.left) < 5) {
+ addMin(minTrbl, 'left', otherTrbl.right - minDimensions.width);
+ }
+ }
+ });
- return {
- parameterType: parameterType
- };
- },
+ // max top/bottom/left/right size based on flow nodes
+ var flowElements = lanesRoot.children.filter(function(s) {
+ return !s.hidden && !s.waypoints && ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(s, 'bpmn:FlowElement') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(s, 'bpmn:Artifact'));
+ });
- set: function(element, values, node) {
- var bo = getSelected(element, node);
+ var padding = isHorizontalLane ? LANE_PADDING : VERTICAL_LANE_PADDING;
- var properties = {
- value: undefined,
- definition: undefined
- };
+ flowElements.forEach(function(flowElement) {
- var createParameterTypeElem = function(type) {
- return createElement(type, bo, bpmnFactory);
- };
+ var flowElementTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.asTRBL)(flowElement);
- var parameterType = values.parameterType;
+ if (isFirst && /n/.test(resizeDirection)) {
+ addMin(minTrbl, 'top', flowElementTrbl.top - padding.top);
+ }
+
+ if (isLast && /e/.test(resizeDirection)) {
+ addMax(minTrbl, 'right', flowElementTrbl.right + padding.right);
+ }
- if (parameterType === 'script') {
- properties.definition = createParameterTypeElem('camunda:Script');
- }
- else if (parameterType === 'list') {
- properties.definition = createParameterTypeElem('camunda:List');
- }
- else if (parameterType === 'map') {
- properties.definition = createParameterTypeElem('camunda:Map');
- }
+ if (isLast && /s/.test(resizeDirection)) {
+ addMax(minTrbl, 'bottom', flowElementTrbl.bottom + padding.bottom);
+ }
- return cmdHelper.updateBusinessObject(element, bo, properties);
- },
+ if (isFirst && /w/.test(resizeDirection)) {
+ addMin(minTrbl, 'left', flowElementTrbl.left - padding.left);
+ }
+ });
- show: function(element, node) {
- return isSelected(element, node);
- }
+ return {
+ min: minTrbl,
+ max: maxTrbl
+ };
+}
- }));
+/***/ }),
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/ResizeLaneBehavior.js":
+/*!************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/ResizeLaneBehavior.js ***!
+ \************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- // parameter value (type = text) ///////////////////////////////////////////////////////
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ ResizeLaneBehavior)
+/* harmony export */ });
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+/* harmony import */ var diagram_js_lib_util_Mouse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/util/Mouse */ "../node_modules/diagram-js/lib/util/Mouse.js");
- entries.push(entryFactory.textBox({
- id : idPrefix + 'parameterType-text',
- label : translate('Value'),
- modelProperty: 'value',
- get: function(element, node) {
- return {
- value: (getSelected(element, node) || {}).value
- };
- },
- set: function(element, values, node) {
- var param = getSelected(element, node);
- values.value = values.value || undefined;
- return cmdHelper.updateBusinessObject(element, param, values);
- },
- show: function(element, node) {
- var bo = getSelected(element, node);
- return bo && !bo.definition;
- }
- }));
- // parameter value (type = script) ///////////////////////////////////////////////////////
- var script = scriptImplementation('scriptFormat', 'value', true, translate);
- entries.push({
- id: idPrefix + 'parameterType-script',
- html: '' +
- script.template +
- '
',
- get: function(element, node) {
- var bo = getSelected(element, node);
- return bo && isScript(bo.definition) ? script.get(element, bo.definition) : {};
- },
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../Modeling').default} Modeling
+ */
- set: function(element, values, node) {
- var bo = getSelected(element, node);
- var update = script.set(element, values);
- return cmdHelper.updateBusinessObject(element, bo.definition, update);
- },
+var SLIGHTLY_HIGHER_PRIORITY = 1001;
- validate: function(element, values, node) {
- var bo = getSelected(element, node);
- return bo && isScript(bo.definition) ? script.validate(element, bo.definition) : {};
- },
- isScript: function(element, node) {
- var bo = getSelected(element, node);
- return bo && isScript(bo.definition);
- },
+/**
+ * Invoke {@link Modeling#resizeLane} instead of {@link Modeling#resizeShape}
+ * when resizing a lane or participant shape.
+ *
+ * @param {EventBus} eventBus
+ * @param {Modeling} modeling
+ */
+function ResizeLaneBehavior(eventBus, modeling) {
- script: script
+ eventBus.on('resize.start', SLIGHTLY_HIGHER_PRIORITY + 500, function(event) {
+ var context = event.context,
+ shape = context.shape;
- });
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(shape, 'bpmn:Lane') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(shape, 'bpmn:Participant')) {
+ // should we resize the opposite lane(s) in
+ // order to compensate for the resize operation?
+ context.balanced = !(0,diagram_js_lib_util_Mouse__WEBPACK_IMPORTED_MODULE_1__.hasPrimaryModifier)(event);
+ }
+ });
- // parameter value (type = list) ///////////////////////////////////////////////////////
+ /**
+ * Intercept resize end and call resize lane function instead.
+ */
+ eventBus.on('resize.end', SLIGHTLY_HIGHER_PRIORITY, function(event) {
+ var context = event.context,
+ shape = context.shape,
+ canExecute = context.canExecute,
+ newBounds = context.newBounds;
- entries.push(entryFactory.table({
- id: idPrefix + 'parameterType-list',
- modelProperties: [ 'value' ],
- labels: [ translate('Value') ],
- addLabel: translate('Add Value'),
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(shape, 'bpmn:Lane') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(shape, 'bpmn:Participant')) {
- getElements: function(element, node) {
- var bo = getSelected(element, node);
+ if (canExecute) {
- if (bo && isList(bo.definition)) {
- return bo.definition.items;
- }
+ // ensure we have actual pixel values for new bounds
+ // (important when zoom level was > 1 during move)
+ newBounds = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_2__.roundBounds)(newBounds);
- return [];
- },
+ // perform the actual resize
+ modeling.resizeLane(shape, newBounds, context.balanced);
+ }
- updateElement: function(element, values, node, idx) {
- var bo = getSelected(element, node);
- var item = bo.definition.items[idx];
- return cmdHelper.updateBusinessObject(element, item, values);
- },
+ // stop propagation
+ return false;
+ }
+ });
+}
- addElement: function(element, node) {
- var bo = getSelected(element, node);
- var newValue = createElement('camunda:Value', bo.definition, bpmnFactory, { value: undefined });
- return cmdHelper.addElementsTolist(element, bo.definition, 'items', [ newValue ]);
- },
+ResizeLaneBehavior.$inject = [
+ 'eventBus',
+ 'modeling'
+];
- removeElement: function(element, node, idx) {
- var bo = getSelected(element, node);
- return cmdHelper.removeElementsFromList(element, bo.definition, 'items', null, [ bo.definition.items[idx] ]);
- },
- editable: function(element, node, prop, idx) {
- var bo = getSelected(element, node);
- var item = bo.definition.items[idx];
- return !isMap(item) && !isList(item) && !isScript(item);
- },
+/***/ }),
- setControlValue: function(element, node, input, prop, value, idx) {
- var bo = getSelected(element, node);
- var item = bo.definition.items[idx];
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/RootElementReferenceBehavior.js":
+/*!**********************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/RootElementReferenceBehavior.js ***!
+ \**********************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- if (!isMap(item) && !isList(item) && !isScript(item)) {
- input.value = value;
- } else {
- input.value = typeInfo[item.$type].label;
- }
- },
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ RootElementReferenceBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/util/Collections */ "../node_modules/diagram-js/lib/util/Collections.js");
+/* harmony import */ var _util_ModelingUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/ModelingUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
- show: function(element, node) {
- var bo = getSelected(element, node);
- return bo && bo.definition && isList(bo.definition);
- }
- }));
- // parameter value (type = map) ///////////////////////////////////////////////////////
- entries.push(entryFactory.table({
- id: idPrefix + 'parameterType-map',
- modelProperties: [ 'key', 'value' ],
- labels: [ translate('Key'), translate('Value') ],
- addLabel: translate('Add Entry'),
- getElements: function(element, node) {
- var bo = getSelected(element, node);
- if (bo && isMap(bo.definition)) {
- return bo.definition.entries;
- }
- return [];
- },
- updateElement: function(element, values, node, idx) {
- var bo = getSelected(element, node);
- var entry = bo.definition.entries[idx];
- if (isMap(entry.definition) || isList(entry.definition) || isScript(entry.definition)) {
- values = {
- key: values.key
- };
- }
- return cmdHelper.updateBusinessObject(element, entry, values);
- },
- addElement: function(element, node) {
- var bo = getSelected(element, node);
- var newEntry = createElement('camunda:Entry', bo.definition, bpmnFactory, { key: undefined, value: undefined });
- return cmdHelper.addElementsTolist(element, bo.definition, 'entries', [ newEntry ]);
- },
- removeElement: function(element, node, idx) {
- var bo = getSelected(element, node);
- return cmdHelper.removeElementsFromList(element, bo.definition, 'entries', null, [ bo.definition.entries[idx] ]);
- },
- editable: function(element, node, prop, idx) {
- var bo = getSelected(element, node);
- var entry = bo.definition.entries[idx];
- return prop === 'key' || (!isMap(entry.definition) && !isList(entry.definition) && !isScript(entry.definition));
- },
+/**
+ * @typedef {import('../../../Modeler').default} Modeler
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('didi').Injector} Injector
+ * @typedef {import('../../copy-paste/ModdleCopy').default} ModdleCopy
+ * @typedef {import('../BpmnFactory').default} BpmnFactory
+ *
+ * @typedef {import('../../../model/Types').Element} Element
+ * @typedef {import('../../../model/Types').Shape} Shape
+ *
+ * @typedef {import('diagram-js/lib/util/Types').DirectionTRBL} DirectionTRBL
+ */
- setControlValue: function(element, node, input, prop, value, idx) {
- var bo = getSelected(element, node);
- var entry = bo.definition.entries[idx];
+var LOW_PRIORITY = 500;
- if (prop === 'key' || (!isMap(entry.definition) && !isList(entry.definition) && !isScript(entry.definition))) {
- input.value = value;
- } else {
- input.value = typeInfo[entry.definition.$type].label;
- }
- },
- show: function(element, node) {
- var bo = getSelected(element, node);
- return bo && bo.definition && isMap(bo.definition);
- }
+/**
+ * Add referenced root elements (error, escalation, message, signal) if they don't exist.
+ * Copy referenced root elements on copy & paste.
+ *
+ * @param {Modeler} bpmnjs
+ * @param {EventBus} eventBus
+ * @param {Injector} injector
+ * @param {ModdleCopy} moddleCopy
+ * @param {BpmnFactory} bpmnFactory
+ */
+function RootElementReferenceBehavior(
+ bpmnjs, eventBus, injector, moddleCopy, bpmnFactory
+) {
+ injector.invoke(diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"], this);
+
+ function canHaveRootElementReference(element) {
+ return (0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_1__.isAny)(element, [ 'bpmn:ReceiveTask', 'bpmn:SendTask' ]) ||
+ hasAnyEventDefinition(element, [
+ 'bpmn:ErrorEventDefinition',
+ 'bpmn:EscalationEventDefinition',
+ 'bpmn:MessageEventDefinition',
+ 'bpmn:SignalEventDefinition'
+ ]);
+ }
+
+ function hasRootElement(rootElement) {
+ var definitions = bpmnjs.getDefinitions(),
+ rootElements = definitions.get('rootElements');
+
+ return !!(0,min_dash__WEBPACK_IMPORTED_MODULE_2__.find)(rootElements, (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.matchPattern)({ id: rootElement.id }));
+ }
+
+ function getRootElementReferencePropertyName(eventDefinition) {
+ if ((0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_1__.is)(eventDefinition, 'bpmn:ErrorEventDefinition')) {
+ return 'errorRef';
+ } else if ((0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_1__.is)(eventDefinition, 'bpmn:EscalationEventDefinition')) {
+ return 'escalationRef';
+ } else if ((0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_1__.is)(eventDefinition, 'bpmn:MessageEventDefinition')) {
+ return 'messageRef';
+ } else if ((0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_1__.is)(eventDefinition, 'bpmn:SignalEventDefinition')) {
+ return 'signalRef';
+ }
+ }
+
+ function getRootElement(businessObject) {
+ if ((0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_1__.isAny)(businessObject, [ 'bpmn:ReceiveTask', 'bpmn:SendTask' ])) {
+ return businessObject.get('messageRef');
+ }
+
+ var eventDefinitions = businessObject.get('eventDefinitions'),
+ eventDefinition = eventDefinitions[ 0 ];
+
+ return eventDefinition.get(getRootElementReferencePropertyName(eventDefinition));
+ }
+
+ function setRootElement(businessObject, rootElement) {
+ if ((0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_1__.isAny)(businessObject, [ 'bpmn:ReceiveTask', 'bpmn:SendTask' ])) {
+ return businessObject.set('messageRef', rootElement);
+ }
+
+ var eventDefinitions = businessObject.get('eventDefinitions'),
+ eventDefinition = eventDefinitions[ 0 ];
+
+ return eventDefinition.set(getRootElementReferencePropertyName(eventDefinition), rootElement);
+ }
+
+ // create shape
+ this.executed([
+ 'shape.create',
+ 'element.updateProperties',
+ 'element.updateModdleProperties'
+ ], function(context) {
+ var shape = context.shape || context.element;
+
+ if (!canHaveRootElementReference(shape)) {
+ return;
+ }
+
+ var businessObject = (0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(shape),
+ rootElement = getRootElement(businessObject),
+ rootElements;
+
+ if (rootElement && !hasRootElement(rootElement)) {
+ rootElements = bpmnjs.getDefinitions().get('rootElements');
+
+ // add root element
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__.add)(rootElements, rootElement);
+
+ context.addedRootElement = rootElement;
+ }
+ }, true);
+
+ this.reverted([
+ 'shape.create',
+ 'element.updateProperties',
+ 'element.updateModdleProperties'
+ ], function(context) {
+ var addedRootElement = context.addedRootElement;
- }));
+ if (!addedRootElement) {
+ return;
+ }
- return entries;
+ var rootElements = bpmnjs.getDefinitions().get('rootElements');
- };
+ // remove root element
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__.remove)(rootElements, addedRootElement);
+ }, true);
- },{"../../../../Utils":5,"../../../../factory/EntryFactory":14,"../../../../helper/CmdHelper":25,"../../../../helper/ElementHelper":26,"../../../../helper/InputOutputHelper":31,"./Script":110,"bpmn-js/lib/util/ModelUtil":240}],104:[function(require,module,exports){
- 'use strict';
+ eventBus.on('copyPaste.copyElement', function(context) {
+ var descriptor = context.descriptor,
+ element = context.element;
- var entryFactory = require('../../../../factory/EntryFactory');
+ if (element.labelTarget || !canHaveRootElementReference(element)) {
+ return;
+ }
- var cmdHelper = require('../../../../helper/CmdHelper');
+ var businessObject = (0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(element),
+ rootElement = getRootElement(businessObject);
- module.exports = function(element, bpmnFactory, options, translate) {
+ if (rootElement) {
- var getBusinessObject = options.getBusinessObject;
+ // TODO(nikku): clone on copy
+ descriptor.referencedRootElement = rootElement;
+ }
+ });
- var jobPriorityEntry = entryFactory.textField({
- id: 'jobPriority',
- label: translate('Job Priority'),
- modelProperty: 'jobPriority',
+ eventBus.on('copyPaste.pasteElement', LOW_PRIORITY, function(context) {
+ var descriptor = context.descriptor,
+ businessObject = descriptor.businessObject,
+ referencedRootElement = descriptor.referencedRootElement;
- get: function(element, node) {
- var bo = getBusinessObject(element);
- return {
- jobPriority: bo.get('camunda:jobPriority')
- };
- },
+ if (!referencedRootElement) {
+ return;
+ }
- set: function(element, values) {
- var bo = getBusinessObject(element);
- return cmdHelper.updateBusinessObject(element, bo, {
- 'camunda:jobPriority': values.jobPriority || undefined
- });
- }
+ if (!hasRootElement(referencedRootElement)) {
+ referencedRootElement = moddleCopy.copyElement(
+ referencedRootElement,
+ bpmnFactory.create(referencedRootElement.$type)
+ );
+ }
- });
+ setRootElement(businessObject, referencedRootElement);
- return [ jobPriorityEntry ];
+ delete descriptor.referencedRootElement;
+ });
+}
- };
+RootElementReferenceBehavior.$inject = [
+ 'bpmnjs',
+ 'eventBus',
+ 'injector',
+ 'moddleCopy',
+ 'bpmnFactory'
+];
- },{"../../../../factory/EntryFactory":14,"../../../../helper/CmdHelper":25}],105:[function(require,module,exports){
- 'use strict';
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_4__["default"])(RootElementReferenceBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- var is = require('bpmn-js/lib/util/ModelUtil').is;
+// helpers //////////
- var entryFactory = require('../../../../factory/EntryFactory');
+function hasAnyEventDefinition(element, types) {
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_2__.isArray)(types)) {
+ types = [ types ];
+ }
- var asyncCapableHelper = require('../../../../helper/AsyncCapableHelper');
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.some)(types, function(type) {
+ return (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.hasEventDefinition)(element, type);
+ });
+}
- var elementHelper = require('../../../../helper/ElementHelper'),
- eventDefinitionHelper = require('../../../../helper/EventDefinitionHelper'),
- cmdHelper = require('../../../../helper/CmdHelper');
+/***/ }),
- function isAsyncBefore(bo) {
- return asyncCapableHelper.isAsyncBefore(bo);
- }
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/SpaceToolBehavior.js":
+/*!***********************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/SpaceToolBehavior.js ***!
+ \***********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- function isAsyncAfter(bo) {
- return asyncCapableHelper.isAsyncAfter(bo);
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ SpaceToolBehavior)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
+/* harmony import */ var _ResizeBehavior__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ResizeBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/ResizeBehavior.js");
+/* harmony import */ var _util_LaneUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/LaneUtil */ "../node_modules/bpmn-js/lib/features/modeling/util/LaneUtil.js");
- function getFailedJobRetryTimeCycle(bo) {
- return asyncCapableHelper.getFailedJobRetryTimeCycle(bo);
- }
- function removeFailedJobRetryTimeCycle(bo, element) {
- return asyncCapableHelper.removeFailedJobRetryTimeCycle(bo, element);
- }
- function createExtensionElements(parent, bpmnFactory) {
- return elementHelper.createElement('bpmn:ExtensionElements', { values: [] }, parent, bpmnFactory);
- }
- function createFailedJobRetryTimeCycle(parent, bpmnFactory, cycle) {
- return elementHelper.createElement('camunda:FailedJobRetryTimeCycle', { body: cycle }, parent, bpmnFactory);
- }
- module.exports = function(element, bpmnFactory, options, translate) {
- var getBusinessObject = options.getBusinessObject;
- var idPrefix = options.idPrefix || '',
- labelPrefix = options.labelPrefix || '';
- var retryTimeCycleEntry = entryFactory.textField({
- id: idPrefix + 'retryTimeCycle',
- label: labelPrefix + translate('Retry Time Cycle'),
- modelProperty: 'cycle',
- get: function(element, node) {
- var retryTimeCycle = getFailedJobRetryTimeCycle(getBusinessObject(element));
- var value = retryTimeCycle && retryTimeCycle.get('body');
- return {
- cycle: value
- };
- },
- set: function(element, values, node) {
- var newCycle = values.cycle;
- var bo = getBusinessObject(element);
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ *
+ * @typedef {import('../../../model/Types').Shape} Shape
+ */
- if (newCycle === '' || typeof newCycle === 'undefined') {
- // remove retry time cycle element(s)
- return removeFailedJobRetryTimeCycle(bo, element);
- }
+var max = Math.max;
- var retryTimeCycle = getFailedJobRetryTimeCycle(bo);
+/**
+ * @param {EventBus} eventBus
+ */
+function SpaceToolBehavior(eventBus) {
+ eventBus.on('spaceTool.getMinDimensions', function(context) {
+ var shapes = context.shapes,
+ axis = context.axis,
+ start = context.start,
+ minDimensions = {};
- if (!retryTimeCycle) {
- // add new retry time cycle element
- var commands = [];
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(shapes, function(shape) {
+ var id = shape.id;
- var extensionElements = bo.get('extensionElements');
- if (!extensionElements) {
- extensionElements = createExtensionElements(bo, bpmnFactory);
- commands.push(cmdHelper.updateBusinessObject(element, bo, { extensionElements: extensionElements }));
- }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:Participant')) {
+ minDimensions[ id ] = getParticipantMinDimensions(shape, axis, start);
+ }
- retryTimeCycle = createFailedJobRetryTimeCycle(extensionElements, bpmnFactory, newCycle);
- commands.push(cmdHelper.addAndRemoveElementsFromList(
- element,
- extensionElements,
- 'values',
- 'extensionElements',
- [ retryTimeCycle ],
- []
- ));
-
- return commands;
- }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:Lane')) {
+ minDimensions[ id ] = (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_2__.isHorizontal)(shape) ? _ResizeBehavior__WEBPACK_IMPORTED_MODULE_3__.LANE_MIN_DIMENSIONS : _ResizeBehavior__WEBPACK_IMPORTED_MODULE_3__.VERTICAL_LANE_MIN_DIMENSIONS;
+ }
- // update existing retry time cycle element
- return cmdHelper.updateBusinessObject(element, retryTimeCycle, { body: newCycle });
- },
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:SubProcess') && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_2__.isExpanded)(shape)) {
+ minDimensions[ id ] = _ResizeBehavior__WEBPACK_IMPORTED_MODULE_3__.SUB_PROCESS_MIN_DIMENSIONS;
+ }
- hidden: function(element) {
- var bo = getBusinessObject(element);
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:TextAnnotation')) {
+ minDimensions[ id ] = _ResizeBehavior__WEBPACK_IMPORTED_MODULE_3__.TEXT_ANNOTATION_MIN_DIMENSIONS;
+ }
- if (bo && (isAsyncBefore(bo) || isAsyncAfter(bo))) {
- return false;
- }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:Group')) {
+ minDimensions[ id ] = _ResizeBehavior__WEBPACK_IMPORTED_MODULE_3__.GROUP_MIN_DIMENSIONS;
+ }
+ });
- if (is(element, 'bpmn:Event')) {
- return !eventDefinitionHelper.getTimerEventDefinition(element);
- }
+ return minDimensions;
+ });
+}
- return true;
- }
+SpaceToolBehavior.$inject = [ 'eventBus' ];
- });
- return [ retryTimeCycleEntry ];
+// helpers //////////
+function isHorizontalAxis(axis) {
+ return axis === 'x';
+}
- };
+/**
+ * Get minimum dimensions for participant taking lanes into account.
+ *
+ * @param {Shape} participant
+ * @param {Axis} axis
+ * @param {number} start
+ *
+ * @return {number}
+ */
+function getParticipantMinDimensions(participant, axis, start) {
+ var isHorizontalLane = (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_2__.isHorizontal)(participant);
+
+ if (!hasChildLanes(participant)) {
+ return isHorizontalLane ? _ResizeBehavior__WEBPACK_IMPORTED_MODULE_3__.PARTICIPANT_MIN_DIMENSIONS : _ResizeBehavior__WEBPACK_IMPORTED_MODULE_3__.VERTICAL_PARTICIPANT_MIN_DIMENSIONS;
+ }
+
+ var isHorizontalResize = isHorizontalAxis(axis);
+ var minDimensions = {};
+
+ if (isHorizontalResize) {
+ if (isHorizontalLane) {
+ minDimensions = _ResizeBehavior__WEBPACK_IMPORTED_MODULE_3__.PARTICIPANT_MIN_DIMENSIONS;
+ } else {
+ minDimensions = {
+ width: getParticipantMinWidth(participant, start, isHorizontalResize),
+ height: _ResizeBehavior__WEBPACK_IMPORTED_MODULE_3__.VERTICAL_PARTICIPANT_MIN_DIMENSIONS.height
+ };
+ }
+
+ } else {
+ if (isHorizontalLane) {
+ minDimensions = {
+ width: _ResizeBehavior__WEBPACK_IMPORTED_MODULE_3__.PARTICIPANT_MIN_DIMENSIONS.width,
+ height: getParticipantMinHeight(participant, start, isHorizontalResize)
+ };
+ } else {
+ minDimensions = _ResizeBehavior__WEBPACK_IMPORTED_MODULE_3__.VERTICAL_PARTICIPANT_MIN_DIMENSIONS;
+ }
+ }
+
+ return minDimensions;
+}
+
+/**
+ * Get minimum height for participant taking lanes into account.
+ *
+ * @param {Shape} participant
+ * @param {number} start
+ * @param {boolean} isHorizontalResize
+ *
+ * @return {number}
+ */
+function getParticipantMinHeight(participant, start, isHorizontalResize) {
+ var lanesMinHeight;
+ lanesMinHeight = getLanesMinHeight(participant, start, isHorizontalResize);
+ return max(_ResizeBehavior__WEBPACK_IMPORTED_MODULE_3__.PARTICIPANT_MIN_DIMENSIONS.height, lanesMinHeight);
+}
+
+/**
+ * Get minimum width for participant taking lanes into account.
+ *
+ * @param {Shape} participant
+ * @param {number} start
+ * @param {boolean} isHorizontalResize
+ *
+ * @return {number}
+ */
+function getParticipantMinWidth(participant, start, isHorizontalResize) {
+ var lanesMinWidth;
+ lanesMinWidth = getLanesMinWidth(participant, start, isHorizontalResize);
+ return max(_ResizeBehavior__WEBPACK_IMPORTED_MODULE_3__.VERTICAL_PARTICIPANT_MIN_DIMENSIONS.width, lanesMinWidth);
+}
+
+function hasChildLanes(element) {
+ return !!(0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_4__.getChildLanes)(element).length;
+}
+
+function getLanesMinHeight(participant, resizeStart, isHorizontalResize) {
+ var lanes = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_4__.getChildLanes)(participant),
+ resizedLane;
+
+ // find the nested lane which is currently resized
+ resizedLane = findResizedLane(lanes, resizeStart, isHorizontalResize);
+
+ // resized lane cannot shrink below the minimum height
+ // but remaining lanes' dimensions are kept intact
+ return participant.height - resizedLane.height + _ResizeBehavior__WEBPACK_IMPORTED_MODULE_3__.LANE_MIN_DIMENSIONS.height;
+}
+
+function getLanesMinWidth(participant, resizeStart, isHorizontalResize) {
+ var lanes = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_4__.getChildLanes)(participant),
+ resizedLane;
+
+ // find the nested lane which is currently resized
+ resizedLane = findResizedLane(lanes, resizeStart, isHorizontalResize);
+
+ // resized lane cannot shrink below the minimum width
+ // but remaining lanes' dimensions are kept intact
+ return participant.width - resizedLane.width + _ResizeBehavior__WEBPACK_IMPORTED_MODULE_3__.VERTICAL_LANE_MIN_DIMENSIONS.width;
+}
+
+/**
+ * Find nested lane which is currently resized.
+ *
+ * @param {Shape[]} lanes
+ * @param {number} resizeStart
+ * @param {boolean} isHorizontalResize
+ *
+ * @return {Shape}
+ */
+function findResizedLane(lanes, resizeStart, isHorizontalResize) {
+ var i, lane, childLanes;
- },{"../../../../factory/EntryFactory":14,"../../../../helper/AsyncCapableHelper":23,"../../../../helper/CmdHelper":25,"../../../../helper/ElementHelper":26,"../../../../helper/EventDefinitionHelper":27,"bpmn-js/lib/util/ModelUtil":240}],106:[function(require,module,exports){
- 'use strict';
+ for (i = 0; i < lanes.length; i++) {
+ lane = lanes[i];
- var is = require('bpmn-js/lib/util/ModelUtil').is,
- getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject;
+ // resizing current lane or a lane nested
+ if (!isHorizontalResize && resizeStart >= lane.y && resizeStart <= lane.y + lane.height ||
+ isHorizontalResize && resizeStart >= lane.x && resizeStart <= lane.x + lane.width) {
- var extensionElementsEntry = require('./ExtensionElements'),
- extensionElementsHelper = require('../../../../helper/ExtensionElementsHelper'),
- cmdHelper = require('../../../../helper/CmdHelper'),
- elementHelper = require('../../../../helper/ElementHelper'),
- ImplementationTypeHelper = require('../../../../helper/ImplementationTypeHelper');
+ childLanes = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_4__.getChildLanes)(lane);
+ // a nested lane is resized
+ if (childLanes.length) {
+ return findResizedLane(childLanes, resizeStart, isHorizontalResize);
+ }
- function getListeners(bo, type) {
- return bo && extensionElementsHelper.getExtensionElements(bo, type) || [];
- }
+ // current lane is the resized one
+ return lane;
+ }
+ }
+}
- var CAMUNDA_EXECUTION_LISTENER_ELEMENT = 'camunda:ExecutionListener';
- var CAMUNDA_TASK_LISTENER_ELEMENT = 'camunda:TaskListener';
- module.exports = function(element, bpmnFactory, options, translate) {
+/***/ }),
- var LISTENER_TYPE_LABEL = {
- class: translate('Java Class'),
- expression: translate('Expression'),
- delegateExpression: translate('Delegate Expression'),
- script: translate('Script')
- };
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/SubProcessPlaneBehavior.js":
+/*!*****************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/SubProcessPlaneBehavior.js ***!
+ \*****************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var bo;
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ SubProcessPlaneBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+/* harmony import */ var diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! diagram-js/lib/util/Elements */ "../node_modules/diagram-js/lib/util/Elements.js");
+/* harmony import */ var _util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../util/DrilldownUtil */ "../node_modules/bpmn-js/lib/util/DrilldownUtil.js");
- var result = {
- getSelectedListener: getSelectedListener
- };
- var entries = result.entries = [];
- var isSequenceFlow = ImplementationTypeHelper.isSequenceFlow(element);
- function getSelectedListener(element, node) {
- var selection = (executionListenerEntry && executionListenerEntry.getSelected(element, node)) || { idx: -1 };
- var listener = getListeners(bo, CAMUNDA_EXECUTION_LISTENER_ELEMENT)[selection.idx];
- if (!listener && taskListenerEntry) {
- selection = taskListenerEntry.getSelected(element, node);
- listener = getListeners(bo, CAMUNDA_TASK_LISTENER_ELEMENT)[selection.idx];
- }
- return listener;
- }
- var setOptionLabelValue = function(type) {
- return function(element, node, option, property, value, idx) {
- var listeners = getListeners(bo, type);
- var listener = listeners[idx];
- var listenerType = ImplementationTypeHelper.getImplementationType(listener);
- var event = (listener.get('event')) ? listener.get('event') : '';
- var label = (event || '*') + ' : ' + (LISTENER_TYPE_LABEL[listenerType] || '');
- option.text = label;
- };
- };
- var newElement = function(element, type, initialEvent) {
- return function(element, extensionElements, value) {
- var props = {
- event: initialEvent,
- class: ''
- };
- var newElem = elementHelper.createElement(type, props, extensionElements, bpmnFactory);
- return cmdHelper.addElementsTolist(element, extensionElements, 'values', [ newElem ]);
- };
- };
- var removeElement = function(element, type) {
- return function(element, extensionElements, value, idx) {
- var listeners = getListeners(bo, type);
- var listener = listeners[idx];
- if (listener) {
- return extensionElementsHelper.removeEntry(bo, element, listener);
- }
- };
- };
- // Execution Listener
- if (is(element, 'bpmn:FlowElement') || is(element, 'bpmn:Process') || is(element, 'bpmn:Participant')) {
- bo = getBusinessObject(element);
- if (is(element, 'bpmn:Participant')) {
- element = element.processRef;
- bo = bo.get('processRef');
- }
+/**
+ * @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../Modeling').default} Modeling
+ * @typedef {import('../ElementFactory').default} ElementFactory
+ * @typedef {import('../BpmnFactory').default} BpmnFactory
+ * @typedef {import('../../../Modeler').default} Modeler
+ * @typedef {import('diagram-js/lib/core/ElementRegistry').default} ElementRegistry
+ *
+ * @typedef {import('../../../model/Types').Element} Element
+ * @typedef {import('../../../model/Types').Root} Root
+ * @typedef {import('../../../model/Types').ModdleElement} ModdleElement
+ */
- if (bo) {
+var LOW_PRIORITY = 400;
+var HIGH_PRIORITY = 600;
- var executionListenerEntry = extensionElementsEntry(element, bpmnFactory, {
- id : 'executionListeners',
- label : translate('Execution Listener'),
- modelProperty: 'name',
- idGeneration: 'false',
- reference: 'processRef',
+var DEFAULT_POSITION = {
+ x: 180,
+ y: 160
+};
- createExtensionElement: newElement(element, CAMUNDA_EXECUTION_LISTENER_ELEMENT, (isSequenceFlow) ? 'take' : 'start'),
- removeExtensionElement: removeElement(element, CAMUNDA_EXECUTION_LISTENER_ELEMENT),
- getExtensionElements: function(element) {
- return getListeners(bo, CAMUNDA_EXECUTION_LISTENER_ELEMENT);
- },
+/**
+ * Creates bpmndi:BPMNPlane elements and canvas planes when collapsed subprocesses are created.
+ *
+ * @param {Canvas} canvas
+ * @param {EventBus} eventBus
+ * @param {Modeling} modeling
+ * @param {ElementFactory} elementFactory
+ * @param {BpmnFactory} bpmnFactory
+ * @param {Modeler} bpmnjs
+ * @param {ElementRegistry} elementRegistry
+ */
+function SubProcessPlaneBehavior(
+ canvas, eventBus, modeling,
+ elementFactory, bpmnFactory, bpmnjs, elementRegistry) {
- onSelectionChange: function(element, node, event, scope) {
- taskListenerEntry && taskListenerEntry.deselect(element, node);
- },
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- setOptionLabelValue: setOptionLabelValue(CAMUNDA_EXECUTION_LISTENER_ELEMENT)
+ this._canvas = canvas;
+ this._eventBus = eventBus;
+ this._modeling = modeling;
+ this._elementFactory = elementFactory;
+ this._bpmnFactory = bpmnFactory;
+ this._bpmnjs = bpmnjs;
+ this._elementRegistry = elementRegistry;
- });
- entries.push(executionListenerEntry);
+ var self = this;
- }
- }
+ function isCollapsedSubProcess(element) {
+ return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(element, 'bpmn:SubProcess') && !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_2__.isExpanded)(element);
+ }
+ function createRoot(context) {
+ var shape = context.shape,
+ rootElement = context.newRootElement;
- // Task Listener
+ var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(shape);
- if (is(element, 'bpmn:UserTask')) {
- bo = getBusinessObject(element);
+ rootElement = self._addDiagram(rootElement || businessObject);
- var taskListenerEntry = extensionElementsEntry(element, bpmnFactory, {
- id : 'taskListeners',
- label : translate('Task Listener'),
- modelProperty: 'name',
- idGeneration: 'false',
+ context.newRootElement = canvas.addRootElement(rootElement);
+ }
- createExtensionElement: newElement(element, CAMUNDA_TASK_LISTENER_ELEMENT, 'create'),
- removeExtensionElement: removeElement(element, CAMUNDA_TASK_LISTENER_ELEMENT),
+ function removeRoot(context) {
+ var shape = context.shape;
- getExtensionElements: function(element) {
- return getListeners(bo, CAMUNDA_TASK_LISTENER_ELEMENT);
- },
+ var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(shape);
+ self._removeDiagram(businessObject);
- onSelectionChange: function(element, node, event, scope) {
- executionListenerEntry.deselect(element, node);
- },
+ var rootElement = context.newRootElement = elementRegistry.get((0,_util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_3__.getPlaneIdFromShape)(businessObject));
- setOptionLabelValue: setOptionLabelValue(CAMUNDA_TASK_LISTENER_ELEMENT)
+ canvas.removeRootElement(rootElement);
+ }
- });
- entries.push(taskListenerEntry);
- }
+ // add plane elements for newly created sub-processes
+ // this ensures we can actually drill down into the element
+ this.executed('shape.create', function(context) {
+ var shape = context.shape;
+ if (!isCollapsedSubProcess(shape)) {
+ return;
+ }
- return result;
+ createRoot(context);
+ }, true);
- };
- },{"../../../../helper/CmdHelper":25,"../../../../helper/ElementHelper":26,"../../../../helper/ExtensionElementsHelper":28,"../../../../helper/ImplementationTypeHelper":30,"./ExtensionElements":96,"bpmn-js/lib/util/ModelUtil":240}],107:[function(require,module,exports){
- 'use strict';
+ this.postExecuted('shape.create', function(context) {
+ var shape = context.shape,
+ rootElement = context.newRootElement;
- var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject,
- escapeHTML = require('../../../../Utils').escapeHTML;
+ if (!rootElement || !shape.children) {
+ return;
+ }
+ self._showRecursively(shape.children);
- var entryFactory = require('../../../../factory/EntryFactory');
+ self._moveChildrenToShape(shape, rootElement);
+ }, true);
- var elementHelper = require('../../../../helper/ElementHelper'),
- cmdHelper = require('../../../../helper/CmdHelper');
- var domClasses = require('min-dom').classes;
+ this.reverted('shape.create', function(context) {
+ var shape = context.shape;
+ if (!isCollapsedSubProcess(shape)) {
+ return;
+ }
- /**
- * Get a property value of the loop characteristics.
- *
- * @param {djs.model.Base} element
- * @param {string} propertyName
- *
- * @return {any} the property value
- */
- function getProperty(element, propertyName) {
- var loopCharacteristics = getLoopCharacteristics(element);
- return loopCharacteristics && loopCharacteristics.get(propertyName);
- }
+ removeRoot(context);
+ }, true);
- /**
- * Get the body of a given expression.
- *
- * @param {ModdleElement} expression
- *
- * @return {string} the body (value) of the expression
- */
- function getBody(expression) {
- return expression && expression.get('body');
- }
+ this.preExecuted('shape.delete', function(context) {
+ var shape = context.shape;
+ if (!isCollapsedSubProcess(shape)) {
+ return;
+ }
- /**
- * Get the loop characteristics of an element.
- *
- * @param {djs.model.Base} element
- *
- * @return {ModdleElement} the loop characteristics
- */
- function getLoopCharacteristics(element) {
- var bo = getBusinessObject(element);
- return bo.loopCharacteristics;
- }
+ var attachedRoot = elementRegistry.get((0,_util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_3__.getPlaneIdFromShape)(shape));
- /**
- * Get the loop cardinality of the loop characteristics.
- *
- * @param {djs.model.Base} element
- *
- * @return {ModdleElement} an expression representing the loop cardinality
- */
- function getLoopCardinality(element) {
- return getProperty(element, 'loopCardinality');
- }
+ if (!attachedRoot) {
+ return;
+ }
- /**
- * Get the loop cardinality value of the loop characteristics.
- *
- * @param {djs.model.Base} element
- *
- * @return {string} the loop cardinality value
- */
- function getLoopCardinalityValue(element) {
- var loopCardinality = getLoopCardinality(element);
- return getBody(loopCardinality);
- }
+ modeling.removeElements(attachedRoot.children.slice());
+ }, true);
- /**
- * Get the completion condition of the loop characteristics.
- *
- * @param {djs.model.Base} element
- *
- * @return {ModdleElement} an expression representing the completion condition
- */
- function getCompletionCondition(element) {
- return getProperty(element, 'completionCondition');
- }
- /**
- * Get the completion condition value of the loop characteristics.
- *
- * @param {djs.model.Base} element
- *
- * @return {string} the completion condition value
- */
- function getCompletionConditionValue(element) {
- var completionCondition = getCompletionCondition(element);
- return getBody(completionCondition);
- }
+ this.executed('shape.delete', function(context) {
+ var shape = context.shape;
+ if (!isCollapsedSubProcess(shape)) {
+ return;
+ }
+ removeRoot(context);
+ }, true);
- /**
- * Get the 'camunda:collection' attribute value of the loop characteristics.
- *
- * @param {djs.model.Base} element
- *
- * @return {string} the 'camunda:collection' value
- */
- function getCollection(element) {
- return getProperty(element, 'camunda:collection');
- }
- /**
- * Get the 'camunda:elementVariable' attribute value of the loop characteristics.
- *
- * @param {djs.model.Base} element
- *
- * @return {string} the 'camunda:elementVariable' value
- */
- function getElementVariable(element) {
- return getProperty(element, 'camunda:elementVariable');
- }
+ this.reverted('shape.delete', function(context) {
+ var shape = context.shape;
+ if (!isCollapsedSubProcess(shape)) {
+ return;
+ }
+ createRoot(context);
+ }, true);
- /**
- * Creates 'bpmn:FormalExpression' element.
- *
- * @param {ModdleElement} parent
- * @param {string} body
- * @param {BpmnFactory} bpmnFactory
- *
- * @result {ModdleElement} a formal expression
- */
- function createFormalExpression(parent, body, bpmnFactory) {
- return elementHelper.createElement('bpmn:FormalExpression', { body: body }, parent, bpmnFactory);
- }
- /**
- * Updates a specific formal expression of the loop characteristics.
- *
- * @param {djs.model.Base} element
- * @param {string} propertyName
- * @param {string} newValue
- * @param {BpmnFactory} bpmnFactory
- */
- function updateFormalExpression(element, propertyName, newValue, bpmnFactory) {
- var loopCharacteristics = getLoopCharacteristics(element);
+ this.preExecuted('shape.replace', function(context) {
+ var oldShape = context.oldShape;
+ var newShape = context.newShape;
- var expressionProps = {};
+ if (!isCollapsedSubProcess(oldShape) || !isCollapsedSubProcess(newShape)) {
+ return;
+ }
- if (!newValue) {
- // remove formal expression
- expressionProps[propertyName] = undefined;
- return cmdHelper.updateBusinessObject(element, loopCharacteristics, expressionProps);
- }
+ // old plane could have content,
+ // we remove it so it is not recursively deleted from 'shape.delete'
+ context.oldRoot = canvas.removeRootElement((0,_util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_3__.getPlaneIdFromShape)(oldShape));
+ }, true);
- var existingExpression = loopCharacteristics.get(propertyName);
- if (!existingExpression) {
- // add formal expression
- expressionProps[propertyName] = createFormalExpression(loopCharacteristics, newValue, bpmnFactory);
- return cmdHelper.updateBusinessObject(element, loopCharacteristics, expressionProps);
- }
+ this.postExecuted('shape.replace', function(context) {
+ var newShape = context.newShape,
+ source = context.oldRoot,
+ target = canvas.findRoot((0,_util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_3__.getPlaneIdFromShape)(newShape));
- // edit existing formal expression
- return cmdHelper.updateBusinessObject(element, existingExpression, {
- body: newValue
- });
- }
+ if (!source || !target) {
+ return;
+ }
+ var elements = source.children;
+ modeling.moveElements(elements, { x: 0, y: 0 }, target);
+ }, true);
- module.exports = function(element, bpmnFactory, translate) {
- var entries = [];
+ // rename primary elements when the secondary element changes
+ // this ensures rootElement.id = element.id + '_plane'
+ this.executed('element.updateProperties', function(context) {
+ var shape = context.element;
- // error message /////////////////////////////////////////////////////////////////
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:SubProcess')) {
+ return;
+ }
- entries.push({
- id: 'multiInstance-errorMessage',
- html: '' +
- ' ' +
- escapeHTML(translate('Must provide either loop cardinality or collection')) +
- '
',
+ var properties = context.properties;
+ var oldProperties = context.oldProperties;
- isValid: function(element, node, notification, scope) {
- var loopCharacteristics = getLoopCharacteristics(element);
+ var oldId = oldProperties.id,
+ newId = properties.id;
- var isValid = true;
- if (loopCharacteristics) {
- var loopCardinality = getLoopCardinalityValue(element);
- var collection = getCollection(element);
+ if (oldId === newId) {
+ return;
+ }
- isValid = !loopCardinality && !collection;
- }
+ if ((0,_util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_3__.isPlane)(shape)) {
+ elementRegistry.updateId(shape, (0,_util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_3__.toPlaneId)(newId));
+ elementRegistry.updateId(oldId, newId);
- domClasses(node).toggle('bpp-hidden', !isValid);
- domClasses(notification).toggle('bpp-error-message', isValid);
+ return;
+ }
- return isValid;
- }
- });
+ var planeElement = elementRegistry.get((0,_util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_3__.toPlaneId)(oldId));
- // loop cardinality //////////////////////////////////////////////////////////////
+ if (!planeElement) {
+ return;
+ }
- entries.push(entryFactory.textField({
- id: 'multiInstance-loopCardinality',
- label: translate('Loop Cardinality'),
- modelProperty: 'loopCardinality',
+ elementRegistry.updateId((0,_util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_3__.toPlaneId)(oldId), (0,_util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_3__.toPlaneId)(newId));
+ }, true);
- get: function(element, node) {
- return {
- loopCardinality: getLoopCardinalityValue(element)
- };
- },
- set: function(element, values) {
- return updateFormalExpression(element, 'loopCardinality', values.loopCardinality, bpmnFactory);
- }
- }));
+ this.reverted('element.updateProperties', function(context) {
+ var shape = context.element;
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:SubProcess')) {
+ return;
+ }
- // collection //////////////////////////////////////////////////////////////////
+ var properties = context.properties;
+ var oldProperties = context.oldProperties;
- entries.push(entryFactory.textField({
- id: 'multiInstance-collection',
- label: translate('Collection'),
- modelProperty: 'collection',
+ var oldId = oldProperties.id,
+ newId = properties.id;
- get: function(element, node) {
- return {
- collection: getCollection(element)
- };
- },
+ if (oldId === newId) {
+ return;
+ }
- set: function(element, values) {
- var loopCharacteristics = getLoopCharacteristics(element);
- return cmdHelper.updateBusinessObject(element, loopCharacteristics, {
- 'camunda:collection': values.collection || undefined
- });
- },
+ if ((0,_util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_3__.isPlane)(shape)) {
+ elementRegistry.updateId(shape, (0,_util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_3__.toPlaneId)(oldId));
+ elementRegistry.updateId(newId, oldId);
- validate: function(element, values, node) {
- var collection = getCollection(element);
- var elementVariable = getElementVariable(element);
+ return;
+ }
- if (!collection && elementVariable) {
- return { collection : 'Must provide a value' };
- }
- }
- }));
+ var planeElement = elementRegistry.get((0,_util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_3__.toPlaneId)(newId));
+ if (!planeElement) {
+ return;
+ }
- // element variable ////////////////////////////////////////////////////////////
+ elementRegistry.updateId(planeElement, (0,_util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_3__.toPlaneId)(oldId));
+ }, true);
- entries.push(entryFactory.textField({
- id: 'multiInstance-elementVariable',
- label: translate('Element Variable'),
- modelProperty: 'elementVariable',
+ // re-throw element.changed to re-render primary shape if associated plane has
+ // changed (e.g. bpmn:name property has changed)
+ eventBus.on('element.changed', function(context) {
+ var element = context.element;
- get: function(element, node) {
- return {
- elementVariable: getElementVariable(element)
- };
- },
+ if (!(0,_util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_3__.isPlane)(element)) {
+ return;
+ }
- set: function(element, values) {
- var loopCharacteristics = getLoopCharacteristics(element);
- return cmdHelper.updateBusinessObject(element, loopCharacteristics, {
- 'camunda:elementVariable': values.elementVariable || undefined
- });
- }
- }));
+ var plane = element;
+ var primaryShape = elementRegistry.get((0,_util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_3__.getShapeIdFromPlane)(plane));
- // Completion Condition //////////////////////////////////////////////////////
+ // do not re-throw if no associated primary shape (e.g. bpmn:Process)
+ if (!primaryShape || primaryShape === plane) {
+ return;
+ }
- entries.push(entryFactory.textField({
- id: 'multiInstance-completionCondition',
- label: translate('Completion Condition'),
- modelProperty: 'completionCondition',
+ eventBus.fire('element.changed', { element: primaryShape });
+ });
- get: function(element) {
- return {
- completionCondition: getCompletionConditionValue(element)
- };
- },
- set: function(element, values) {
- return updateFormalExpression(element, 'completionCondition', values.completionCondition, bpmnFactory);
- }
- }));
+ // create/remove plane for the subprocess
+ this.executed('shape.toggleCollapse', LOW_PRIORITY, function(context) {
+ var shape = context.shape;
- return entries;
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:SubProcess')) {
+ return;
+ }
- };
+ if (!(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_2__.isExpanded)(shape)) {
+ createRoot(context);
+ self._showRecursively(shape.children);
+ } else {
+ removeRoot(context);
+ }
- },{"../../../../Utils":5,"../../../../factory/EntryFactory":14,"../../../../helper/CmdHelper":25,"../../../../helper/ElementHelper":26,"bpmn-js/lib/util/ModelUtil":240,"min-dom":647}],108:[function(require,module,exports){
- 'use strict';
+ }, true);
- var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject,
- is = require('bpmn-js/lib/util/ModelUtil').is;
- var factory = require('../../../../factory/EntryFactory');
+ // create/remove plane for the subprocess
+ this.reverted('shape.toggleCollapse', LOW_PRIORITY, function(context) {
+ var shape = context.shape;
- var elementHelper = require('../../../../helper/ElementHelper'),
- extensionElementsHelper = require('../../../../helper/ExtensionElementsHelper'),
- cmdHelper = require('../../../../helper/CmdHelper'),
- utils = require('../../../../Utils');
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:SubProcess')) {
+ return;
+ }
- var assign = require('lodash/assign'),
- forEach = require('lodash/forEach'),
- find = require('lodash/find');
+ if (!(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_2__.isExpanded)(shape)) {
+ createRoot(context);
+ self._showRecursively(shape.children);
+ } else {
+ removeRoot(context);
+ }
- function generatePropertyId() {
- return utils.nextId('Property_');
- }
+ }, true);
- /**
- * Get all camunda:property objects for a specific business object
- *
- * @param {ModdleElement} parent
- *
- * @return {Array} a list of camunda:property objects
- */
- function getPropertyValues(parent) {
- var properties = parent && getPropertiesElement(parent);
- if (properties && properties.values) {
- return properties.values;
- }
- return [];
- }
+ // move elements between planes
+ this.postExecuted('shape.toggleCollapse', HIGH_PRIORITY, function(context) {
+ var shape = context.shape;
- /**
- * Get all camunda:Properties object for a specific business object
- *
- * @param {ModdleElement} parent
- *
- * @return {ModdleElement} a camunda:Properties object
- */
- function getPropertiesElement(element) {
- if (!isExtensionElements(element)) {
- return element.properties;
- } else {
- return getPropertiesElementInsideExtensionElements(element);
- }
- }
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:SubProcess')) {
+ return;
+ }
- /**
- * Get first camunda:Properties object for a specific bpmn:ExtensionElements
- * business object.
- *
- * @param {ModdleElement} extensionElements
- *
- * @return {ModdleElement} a camunda:Properties object
- */
- function getPropertiesElementInsideExtensionElements(extensionElements) {
- return find(extensionElements.values, function(elem) {
- return is(elem, 'camunda:Properties');
- });
- }
+ var rootElement = context.newRootElement;
- /**
- * Returns true, if the given business object is a bpmn:ExtensionElements.
- *
- * @param {ModdleElement} element
- *
- * @return {boolean} a boolean value
- */
- function isExtensionElements(element) {
- return is(element, 'bpmn:ExtensionElements');
- }
+ if (!rootElement) {
+ return;
+ }
- /**
- * Create a camunda:property entry using tableEntryFactory
- *
- * @param {djs.model.Base} element
- * @param {BpmnFactory} bpmnFactory
- * @param {Object} options
- * @param {string} options.id
- * @param {Array} options.modelProperties
- * @param {Array} options.labels
- * @param {function} options.getParent Gets the parent business object
- * @param {function} options.show Indicate when the entry will be shown, should return boolean
- */
- module.exports = function(element, bpmnFactory, options, translate) {
+ if (!(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_2__.isExpanded)(shape)) {
- var getParent = options.getParent;
+ // collapsed
+ self._moveChildrenToShape(shape, rootElement);
- var modelProperties = options.modelProperties,
- createParent = options.createParent;
+ } else {
+ self._moveChildrenToShape(rootElement, shape);
+ }
+ }, true);
- var bo = getBusinessObject(element);
- if (is(element, 'bpmn:Participant')) {
- bo = bo.get('processRef');
- }
- // build properties group only when the participant have a processRef
- if (!bo) {
- return;
- }
+ // copy-paste ///////////
- assign(options, {
- addLabel: translate('Add Property'),
- getElements: function(element, node) {
- var parent = getParent(element, node, bo);
- return getPropertyValues(parent);
- },
- addElement: function(element, node) {
- var commands = [],
- parent = getParent(element, node, bo);
-
- if (!parent && typeof createParent === 'function') {
- var result = createParent(element, bo);
- parent = result.parent;
- commands.push(result.cmd);
- }
+ // add elements in plane to tree
+ eventBus.on('copyPaste.createTree', function(context) {
+ var element = context.element,
+ children = context.children;
- var properties = getPropertiesElement(parent);
- if (!properties) {
- properties = elementHelper.createElement('camunda:Properties', {}, parent, bpmnFactory);
-
- if (!isExtensionElements(parent)) {
- commands.push(cmdHelper.updateBusinessObject(element, parent, { 'properties': properties }));
- } else {
- commands.push(cmdHelper.addAndRemoveElementsFromList(
- element,
- parent,
- 'values',
- 'extensionElements',
- [ properties ],
- []
- ));
- }
- }
+ if (!isCollapsedSubProcess(element)) {
+ return;
+ }
- var propertyProps = {};
- forEach(modelProperties, function(prop) {
- propertyProps[prop] = undefined;
- });
+ var id = (0,_util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_3__.getPlaneIdFromShape)(element);
+ var parent = elementRegistry.get(id);
- // create id if necessary
- if (modelProperties.indexOf('id') >= 0) {
- propertyProps.id = generatePropertyId();
- }
+ if (parent) {
- var property = elementHelper.createElement('camunda:Property', propertyProps, properties, bpmnFactory);
- commands.push(cmdHelper.addElementsTolist(element, properties, 'values', [ property ]));
+ // do not copy invisible root element
+ children.push.apply(children, parent.children);
+ }
+ });
- return commands;
- },
- updateElement: function(element, value, node, idx) {
- var parent = getParent(element, node, bo),
- property = getPropertyValues(parent)[idx];
+ // set plane children as direct children of collapsed shape
+ eventBus.on('copyPaste.copyElement', function(context) {
+ var descriptor = context.descriptor,
+ element = context.element,
+ elements = context.elements;
- forEach(modelProperties, function(prop) {
- value[prop] = value[prop] || undefined;
- });
+ var parent = element.parent;
- return cmdHelper.updateBusinessObject(element, property, value);
- },
- validate: function(element, value, node, idx) {
- // validate id if necessary
- if (modelProperties.indexOf('id') >= 0) {
+ var isPlane = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getDi)(parent), 'bpmndi:BPMNPlane');
+ if (!isPlane) {
+ return;
+ }
- var parent = getParent(element, node, bo),
- properties = getPropertyValues(parent),
- property = properties[idx];
+ var parentId = (0,_util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_3__.getShapeIdFromPlane)(parent);
- if (property) {
- // check if id is valid
- var validationError = utils.isIdValid(property, value.id, translate);
+ var referencedShape = (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.find)(elements, function(element) {
+ return element.id === parentId;
+ });
- if (validationError) {
- return { id: validationError };
- }
- }
- }
- },
- removeElement: function(element, node, idx) {
- var commands = [],
- parent = getParent(element, node, bo),
- properties = getPropertiesElement(parent),
- propertyValues = getPropertyValues(parent),
- currentProperty = propertyValues[idx];
-
- commands.push(cmdHelper.removeElementsFromList(element, properties, 'values', null, [ currentProperty ]));
-
- if (propertyValues.length === 1) {
- // remove camunda:properties if the last existing property has been removed
- if (!isExtensionElements(parent)) {
- commands.push(cmdHelper.updateBusinessObject(element, parent, { properties: undefined }));
- } else {
- forEach(parent.values, function(value) {
- if (is(value, 'camunda:Properties')) {
- commands.push(extensionElementsHelper.removeEntry(bo, element, value));
- }
- });
- }
- }
+ if (!referencedShape) {
+ return;
+ }
- return commands;
- }
- });
+ descriptor.parent = referencedShape.id;
+ });
- return factory.table(options);
- };
+ // hide children during pasting
+ eventBus.on('copyPaste.pasteElement', function(context) {
+ var descriptor = context.descriptor;
- },{"../../../../Utils":5,"../../../../factory/EntryFactory":14,"../../../../helper/CmdHelper":25,"../../../../helper/ElementHelper":26,"../../../../helper/ExtensionElementsHelper":28,"bpmn-js/lib/util/ModelUtil":240,"lodash/assign":604,"lodash/find":610,"lodash/forEach":613}],109:[function(require,module,exports){
- 'use strict';
+ if (!descriptor.parent) {
+ return;
+ }
- var is = require('bpmn-js/lib/util/ModelUtil').is;
+ if (isCollapsedSubProcess(descriptor.parent) || descriptor.parent.hidden) {
+ descriptor.hidden = true;
+ }
+ });
- var assign = require('lodash/assign');
+}
- var entryFactory = require('../../../../factory/EntryFactory'),
- cmdHelper = require('../../../../helper/CmdHelper');
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_5__["default"])(SubProcessPlaneBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- module.exports = function(element, bpmnFactory, options, translate) {
+/**
+ * Moves the child elements from source to target.
+ *
+ * If the target is a plane, the children are moved to the top left corner.
+ * Otherwise, the center of the target is used.
+ *
+ * @param {Root} source
+ * @param {Root} target
+ */
+SubProcessPlaneBehavior.prototype._moveChildrenToShape = function(source, target) {
+ var modeling = this._modeling;
+
+ var children = source.children;
+ var offset;
+
+ if (!children) {
+ return;
+ }
+
+ // add external labels that weren't children of sub process
+ children = children.concat(children.reduce(function(labels, child) {
+ if (child.label && child.label.parent !== source) {
+ return labels.concat(child.label);
+ }
+
+ return labels;
+ }, []));
+
+ // only change plane if there are no visible children, but don't move them
+ var visibleChildren = children.filter(function(child) {
+ return !child.hidden;
+ });
+
+ if (!visibleChildren.length) {
+ modeling.moveElements(children, { x: 0, y: 0 }, target, { autoResize: false });
+ return;
+ }
+
+ var childrenBounds = (0,diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_6__.getBBox)(visibleChildren);
+
+ // target is a plane
+ if (!target.x) {
+ offset = {
+ x: DEFAULT_POSITION.x - childrenBounds.x,
+ y: DEFAULT_POSITION.y - childrenBounds.y
+ };
+ }
+
+ // source is a plane
+ else {
+
+ // move relative to the center of the shape
+ var targetMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_7__.getMid)(target);
+ var childrenMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_7__.getMid)(childrenBounds);
+
+ offset = {
+ x: targetMid.x - childrenMid.x,
+ y: targetMid.y - childrenMid.y
+ };
+ }
+
+ modeling.moveElements(children, offset, target, { autoResize: false });
+};
+
+/**
+ * Sets `hidden` property on all children of the given shape.
+ *
+ * @param {Element[]} elements
+ * @param {boolean} [hidden=false]
+ *
+ * @return {Element[]}
+ */
+SubProcessPlaneBehavior.prototype._showRecursively = function(elements, hidden) {
+ var self = this;
- var getBusinessObject = options.getBusinessObject,
- hideResultVariable = options.hideResultVariable,
- id = options.id || 'resultVariable';
+ var result = [];
+ elements.forEach(function(element) {
+ element.hidden = !!hidden;
+ result = result.concat(element);
- var resultVariableEntry = entryFactory.textField({
- id: id,
- label: translate('Result Variable'),
- modelProperty: 'resultVariable',
+ if (element.children) {
+ result = result.concat(
+ self._showRecursively(element.children, element.collapsed || hidden)
+ );
+ }
+ });
- get: function(element, node) {
- var bo = getBusinessObject(element);
- return { resultVariable: bo.get('camunda:resultVariable') };
- },
+ return result;
+};
- set: function(element, values, node) {
- var bo = getBusinessObject(element);
+/**
+ * Adds a given root element to the BPMNDI diagrams.
+ *
+ * @param {Root|ModdleElement} planeElement
+ *
+ * @return {Root}
+ */
+SubProcessPlaneBehavior.prototype._addDiagram = function(planeElement) {
+ var bpmnjs = this._bpmnjs;
+ var diagrams = bpmnjs.getDefinitions().diagrams;
- var resultVariable = values.resultVariable || undefined;
+ if (!planeElement.businessObject) {
+ planeElement = this._createNewDiagram(planeElement);
+ }
- var props = {
- 'camunda:resultVariable': resultVariable
- };
+ diagrams.push(planeElement.di.$parent);
- if (is(bo, 'camunda:DmnCapable') && !resultVariable) {
- props = assign({ 'camunda:mapDecisionResult': 'resultList' }, props);
- }
+ return planeElement;
+};
- return cmdHelper.updateBusinessObject(element, bo, props);
- },
- hidden: function(element, node) {
- if (typeof hideResultVariable === 'function') {
- return hideResultVariable.apply(resultVariableEntry, arguments);
- }
- }
+/**
+ * Creates a new plane element for the given sub process.
+ *
+ * @param {ModdleElement} bpmnElement
+ *
+ * @return {Root}
+ */
+SubProcessPlaneBehavior.prototype._createNewDiagram = function(bpmnElement) {
+ var bpmnFactory = this._bpmnFactory,
+ elementFactory = this._elementFactory;
+
+ var diPlane = bpmnFactory.create('bpmndi:BPMNPlane', {
+ bpmnElement: bpmnElement
+ });
+
+ var diDiagram = bpmnFactory.create('bpmndi:BPMNDiagram', {
+ plane: diPlane
+ });
+
+ diPlane.$parent = diDiagram;
+
+ // add a virtual element (not being drawn),
+ // a copy cat of our BpmnImporter code
+ var planeElement = elementFactory.createRoot({
+ id: (0,_util_DrilldownUtil__WEBPACK_IMPORTED_MODULE_3__.getPlaneIdFromShape)(bpmnElement),
+ type: bpmnElement.$type,
+ di: diPlane,
+ businessObject: bpmnElement,
+ collapsed: true
+ });
+
+ return planeElement;
+};
+
+/**
+ * Removes the diagram for a given root element.
+ *
+ * @param {Root} rootElement
+ *
+ * @return {ModdleElement}
+ */
+SubProcessPlaneBehavior.prototype._removeDiagram = function(rootElement) {
+ var bpmnjs = this._bpmnjs;
- });
+ var diagrams = bpmnjs.getDefinitions().diagrams;
- return [ resultVariableEntry ];
+ var removedDiagram = (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.find)(diagrams, function(diagram) {
+ return diagram.plane.bpmnElement.id === rootElement.id;
+ });
- };
+ diagrams.splice(diagrams.indexOf(removedDiagram), 1);
- },{"../../../../factory/EntryFactory":14,"../../../../helper/CmdHelper":25,"bpmn-js/lib/util/ModelUtil":240,"lodash/assign":604}],110:[function(require,module,exports){
- 'use strict';
-
- var domQuery = require('min-dom').query,
- escapeHTML = require('../../../../Utils').escapeHTML,
- utils = require('../../../../Utils');
-
-
- function getScriptType(node) {
- return utils.selectedType('select[name=scriptType]', node.parentElement);
- }
-
-
- module.exports = function(scriptLanguagePropName, scriptValuePropName, isFormatRequired, translate) {
-
- return {
- template:
- '' +
- '
' + escapeHTML(translate('Script Format')) + ' ' +
- '
' +
- ' ' +
- '' +
- 'X ' +
- ' ' +
- '
' +
- '
' +
-
- '' +
- '
' + escapeHTML(translate('Script Type')) + ' ' +
- '
' +
- '' +
- '' + escapeHTML(translate('Inline Script')) + ' ' +
- '' + escapeHTML(translate('External Resource')) + ' ' +
- ' ' +
- '
' +
- '
' +
-
- '' +
- '
' + escapeHTML(translate('Resource')) + ' ' +
- '
' +
- ' ' +
- '' +
- 'X ' +
- ' ' +
- '
' +
- '
' +
-
- '' +
- '
' + escapeHTML(translate('Script')) + ' ' +
- '
' +
- '' +
- '
'+
- '
',
-
- get: function(element, bo) {
- var values = {};
-
- // read values from xml:
- var boScriptResource = bo.get('camunda:resource'),
- boScript = bo.get(scriptValuePropName),
- boScriptFormat = bo.get(scriptLanguagePropName);
-
- if (typeof boScriptResource !== 'undefined') {
- values.scriptResourceValue = boScriptResource;
- values.scriptType = 'scriptResource';
- } else {
- values.scriptValue = boScript;
- values.scriptType = 'script';
- }
+ return removedDiagram;
+};
- values.scriptFormat = boScriptFormat;
- return values;
- },
+SubProcessPlaneBehavior.$inject = [
+ 'canvas',
+ 'eventBus',
+ 'modeling',
+ 'elementFactory',
+ 'bpmnFactory',
+ 'bpmnjs',
+ 'elementRegistry'
+];
- set: function(element, values, containerElement) {
- var scriptFormat = values.scriptFormat,
- scriptType = values.scriptType,
- scriptResourceValue = values.scriptResourceValue,
- scriptValue = values.scriptValue;
-
- // init update
- var update = {
- 'camunda:resource': undefined
- };
- update[scriptValuePropName] = undefined;
- update[scriptLanguagePropName] = undefined;
-
- if (isFormatRequired) {
- // always set language
- update[scriptLanguagePropName] = scriptFormat || '';
- } else
- // set language only when scriptFormat has a value
- if (scriptFormat !== '') {
- update[scriptLanguagePropName] = scriptFormat;
- }
- // set either inline script or resource
- if ('scriptResource' === scriptType) {
- update['camunda:resource'] = scriptResourceValue || '';
- } else {
- update[scriptValuePropName] = scriptValue || '';
- }
+/***/ }),
- return update;
- },
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/SubProcessStartEventBehavior.js":
+/*!**********************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/SubProcessStartEventBehavior.js ***!
+ \**********************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- validate: function(element, values) {
- var validationResult = {};
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ SubProcessStartEventBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_DiUtil_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/DiUtil.js */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
- if (values.scriptType === 'script' && !values.scriptValue) {
- validationResult.scriptValue = translate('Must provide a value');
- }
- if (values.scriptType === 'scriptResource' && !values.scriptResourceValue) {
- validationResult.scriptResourceValue = translate('Must provide a value');
- }
- if (isFormatRequired && (!values.scriptFormat || values.scriptFormat.length === 0)) {
- validationResult.scriptFormat = translate('Must provide a value');
- }
- return validationResult;
- },
- clearScriptFormat: function(element, inputNode, btnNode, scopeNode) {
- domQuery('input[name=scriptFormat]', scopeNode).value='';
- return true;
- },
- canClearScriptFormat: function(element, inputNode, btnNode, scopeNode) {
- var input = domQuery('input[name=scriptFormat]', scopeNode);
- return input.value !== '';
- },
+/**
+ * @typedef {import('didi').Injector} Injector
+ * @typedef {import('../Modeling').default} Modeling
+ */
- clearScriptResource: function(element, inputNode, btnNode, scopeNode) {
- domQuery('input[name=scriptResourceValue]', scopeNode).value='';
+/**
+ * Add start event replacing element with expanded sub process.
+ *
+ * @param {Injector} injector
+ * @param {Modeling} modeling
+ */
+function SubProcessStartEventBehavior(injector, modeling) {
+ injector.invoke(diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"], this);
- return true;
- },
+ this.postExecuted('shape.replace', function(event) {
+ var oldShape = event.context.oldShape,
+ newShape = event.context.newShape;
- canClearScriptResource: function(element, inputNode, btnNode, scopeNode) {
- var input = domQuery('input[name=scriptResourceValue]', scopeNode);
+ if (
+ !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(newShape, 'bpmn:SubProcess') ||
+ ! ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(oldShape, 'bpmn:Task') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(oldShape, 'bpmn:CallActivity')) ||
+ !(0,_util_DiUtil_js__WEBPACK_IMPORTED_MODULE_2__.isExpanded)(newShape)
+ ) {
+ return;
+ }
- return input.value !== '';
- },
+ var position = getStartEventPosition(newShape);
- clearScript: function(element, inputNode, btnNode, scopeNode) {
- domQuery('textarea[name=scriptValue]', scopeNode).value='';
+ modeling.createShape({ type: 'bpmn:StartEvent' }, position, newShape);
+ });
+}
- return true;
- },
+SubProcessStartEventBehavior.$inject = [
+ 'injector',
+ 'modeling'
+];
- canClearScript: function(element, inputNode, btnNode, scopeNode) {
- var input = domQuery('textarea[name=scriptValue]', scopeNode);
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_3__["default"])(SubProcessStartEventBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- return input.value !== '';
- },
+// helpers //////////
- isScriptResource: function(element, inputNode, btnNode, scopeNode) {
- var scriptType = getScriptType(scopeNode);
- return scriptType === 'scriptResource';
- },
+function getStartEventPosition(shape) {
+ return {
+ x: shape.x + shape.width / 6,
+ y: shape.y + shape.height / 2
+ };
+}
- isScript: function(element, inputNode, btnNode, scopeNode) {
- var scriptType = getScriptType(scopeNode);
- return scriptType === 'script';
- }
- };
+/***/ }),
- };
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/TextAnnotationBehavior.js":
+/*!****************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/TextAnnotationBehavior.js ***!
+ \****************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- },{"../../../../Utils":5,"min-dom":647}],111:[function(require,module,exports){
- 'use strict';
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ TextAnnotationBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
- var entryFactory = require('../../../../factory/EntryFactory');
- var cmdHelper = require('../../../../helper/CmdHelper');
- module.exports = function(element, bpmnFactory, options, translate) {
- var getBusinessObject = options.getBusinessObject;
- var isStartableInTasklistEntry = entryFactory.checkbox({
- id: 'isStartableInTasklist',
- label: translate('Startable'),
- modelProperty: 'isStartableInTasklist',
- get: function(element, node) {
- var bo = getBusinessObject(element);
- var isStartableInTasklist = bo.get('camunda:isStartableInTasklist');
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ */
- return {
- isStartableInTasklist: isStartableInTasklist ? isStartableInTasklist : ''
- };
- },
+function TextAnnotationBehavior(eventBus) {
- set: function(element, values) {
- var bo = getBusinessObject(element);
- return cmdHelper.updateBusinessObject(element, bo, {
- 'camunda:isStartableInTasklist': !!values.isStartableInTasklist
- });
- }
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- });
+ // On Append, TextAnnotations will be created on the Root.
+ // The default for connections will create the connection in the parent of
+ // the source element, so we overwrite the parent here.
+ this.preExecute('connection.create', function(context) {
+ const { target } = context;
- return [
- isStartableInTasklistEntry
- ];
- };
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(target, 'bpmn:TextAnnotation')) {
+ return;
+ }
- },{"../../../../factory/EntryFactory":14,"../../../../helper/CmdHelper":25}],112:[function(require,module,exports){
- "use strict";
+ context.parent = target.parent;
+ }, true);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BaseModeler;
+ this.preExecute([ 'shape.create', 'shape.resize', 'elements.move' ], function(context) {
+ const shapes = context.shapes || [ context.shape ];
- var _inherits = _interopRequireDefault(require("inherits"));
+ if (shapes.length === 1 && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shapes[0], 'bpmn:TextAnnotation')) {
+ context.hints = context.hints || {};
- var _ids = _interopRequireDefault(require("ids"));
+ context.hints.autoResize = false;
+ }
+ }, true);
+}
- var _BaseViewer = _interopRequireDefault(require("./BaseViewer"));
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_2__["default"])(TextAnnotationBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+TextAnnotationBehavior.$inject = [
+ 'eventBus'
+];
- /**
- * A base modeler for BPMN 2.0 diagrams.
- *
- * Have a look at {@link Modeler} for a bundle that includes actual features.
- *
- * @param {Object} [options] configuration options to pass to the viewer
- * @param {DOMElement} [options.container] the container to render the viewer in, defaults to body.
- * @param {string|number} [options.width] the width of the viewer
- * @param {string|number} [options.height] the height of the viewer
- * @param {Object} [options.moddleExtensions] extension packages to provide
- * @param {Array} [options.modules] a list of modules to override the default modules
- * @param {Array} [options.additionalModules] a list of modules to use with the default modules
- */
- function BaseModeler(options) {
- _BaseViewer.default.call(this, options); // hook ID collection into the modeler
+/***/ }),
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/ToggleCollapseConnectionBehaviour.js":
+/*!***************************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/ToggleCollapseConnectionBehaviour.js ***!
+ \***************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- this.on('import.parse.complete', function (event) {
- if (!event.error) {
- this._collectIds(event.definitions, event.elementsById);
- }
- }, this);
- this.on('diagram.destroy', function () {
- this.get('moddle').ids.clear();
- }, this);
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ ToggleCollapseConnectionBehaviour)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+/* harmony import */ var diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/util/Elements */ "../node_modules/diagram-js/lib/util/Elements.js");
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
- (0, _inherits.default)(BaseModeler, _BaseViewer.default);
- /**
- * Create a moddle instance, attaching ids to it.
- *
- * @param {Object} options
- */
- BaseModeler.prototype._createModdle = function (options) {
- var moddle = _BaseViewer.default.prototype._createModdle.call(this, options); // attach ids to moddle to be able to track
- // and validated ids in the BPMN 2.0 XML document
- // tree
- moddle.ids = new _ids.default([32, 36, 1]);
- return moddle;
- };
- /**
- * Collect ids processed during parsing of the
- * definitions object.
- *
- * @param {ModdleElement} definitions
- * @param {Context} context
- */
- BaseModeler.prototype._collectIds = function (definitions, elementsById) {
- var moddle = definitions.$model,
- ids = moddle.ids,
- id; // remove references from previous import
- ids.clear();
- for (id in elementsById) {
- ids.claim(id, elementsById[id]);
- }
- };
- },{"./BaseViewer":113,"ids":437,"inherits":438}],113:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BaseViewer;
- var _minDash = require("min-dash");
- var _minDom = require("min-dom");
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../Modeling').default} Modeling
+ *
+ * @typedef {import('../../../model/Types').Element} Element
+ * @typedef {import('../../../model/Types').Shape} Shape
+ *
+ * @typedef {import('diagram-js/lib/util/Types').DirectionTRBL} DirectionTRBL
+ */
- var _tinySvg = require("tiny-svg");
+/**
+ * @param {EventBus} eventBus
+ * @param {Modeling} modeling
+ */
+function ToggleCollapseConnectionBehaviour(
+ eventBus, modeling
+) {
- var _diagramJs = _interopRequireDefault(require("diagram-js"));
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- var _bpmnModdle = _interopRequireDefault(require("bpmn-moddle"));
+ this.postExecuted('shape.toggleCollapse', 1500, function(context) {
- var _inherits = _interopRequireDefault(require("inherits"));
+ // var shape = context.shape;
+ var shape = context.shape;
- var _Importer = require("./import/Importer");
+ // only change connections when collapsing
+ if ((0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_1__.isExpanded)(shape)) {
+ return;
+ }
- var _CompatibilityUtil = require("./util/CompatibilityUtil");
+ var allChildren = (0,diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_2__.selfAndAllChildren)(shape);
- var _PoweredByUtil = require("./util/PoweredByUtil");
+ allChildren.forEach(function(child) {
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ // Ensure that the connection array is not modified during iteration
+ var incomingConnections = child.incoming.slice(),
+ outgoingConnections = child.outgoing.slice();
- /**
- * The code in the area
- * must not be changed.
- *
- * @see http://bpmn.io/license for more information.
- */
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(incomingConnections, function(c) {
+ handleConnection(c, true);
+ });
- /**
- * A base viewer for BPMN 2.0 diagrams.
- *
- * Have a look at {@link Viewer}, {@link NavigatedViewer} or {@link Modeler} for
- * bundles that include actual features.
- *
- * @param {Object} [options] configuration options to pass to the viewer
- * @param {DOMElement} [options.container] the container to render the viewer in, defaults to body.
- * @param {string|number} [options.width] the width of the viewer
- * @param {string|number} [options.height] the height of the viewer
- * @param {Object} [options.moddleExtensions] extension packages to provide
- * @param {Array} [options.modules] a list of modules to override the default modules
- * @param {Array} [options.additionalModules] a list of modules to use with the default modules
- */
- function BaseViewer(options) {
- options = (0, _minDash.assign)({}, DEFAULT_OPTIONS, options);
- this._moddle = this._createModdle(options);
- this._container = this._createContainer(options);
- /* */
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(outgoingConnections, function(c) {
+ handleConnection(c, false);
+ });
+ });
- addProjectLogo(this._container);
- /* */
- this._init(this._container, this._moddle, options);
- }
+ function handleConnection(c, incoming) {
+ if (allChildren.indexOf(c.source) !== -1 && allChildren.indexOf(c.target) !== -1) {
+ return;
+ }
- (0, _inherits.default)(BaseViewer, _diagramJs.default);
- /**
- * The importXML result.
- *
- * @typedef {Object} ImportXMLResult
- *
- * @property {Array} warnings
- */
+ if (incoming) {
+ modeling.reconnectEnd(c, shape, (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_4__.getMid)(shape));
+ } else {
+ modeling.reconnectStart(c, shape, (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_4__.getMid)(shape));
+ }
- /**
- * The importXML error.
- *
- * @typedef {Error} ImportXMLError
- *
- * @property {Array} warnings
- */
+ }
- /**
- * Parse and render a BPMN 2.0 diagram.
- *
- * Once finished the viewer reports back the result to the
- * provided callback function with (err, warnings).
- *
- * ## Life-Cycle Events
- *
- * During import the viewer will fire life-cycle events:
- *
- * * import.parse.start (about to read model from xml)
- * * import.parse.complete (model read; may have worked or not)
- * * import.render.start (graphical import start)
- * * import.render.complete (graphical import finished)
- * * import.done (everything done)
- *
- * You can use these events to hook into the life-cycle.
- *
- * @param {string} xml the BPMN 2.0 xml
- * @param {ModdleElement|string} [bpmnDiagram] BPMN diagram or id of diagram to render (if not provided, the first one will be rendered)
- *
- * Returns {Promise}
- */
+ }, true);
- BaseViewer.prototype.importXML = (0, _CompatibilityUtil.wrapForCompatibility)(function importXML(xml, bpmnDiagram) {
- var self = this;
+}
- function ParseCompleteEvent(data) {
- var event = self.get('eventBus').createEvent(data); // TODO(nikku): remove with future bpmn-js version
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_5__["default"])(ToggleCollapseConnectionBehaviour, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- Object.defineProperty(event, 'context', {
- enumerable: true,
- get: function () {
- console.warn(new Error('import.parse.complete is deprecated ' + 'and will be removed in future library versions'));
- return {
- warnings: data.warnings,
- references: data.references,
- elementsById: data.elementsById
- };
- }
- });
- return event;
- }
-
- return new Promise(function (resolve, reject) {
- // hook in pre-parse listeners +
- // allow xml manipulation
- xml = self._emit('import.parse.start', {
- xml: xml
- }) || xml;
-
- self._moddle.fromXML(xml, 'bpmn:Definitions').then(function (result) {
- var definitions = result.rootElement;
- var references = result.references;
- var parseWarnings = result.warnings;
- var elementsById = result.elementsById; // hook in post parse listeners +
- // allow definitions manipulation
-
- definitions = self._emit('import.parse.complete', ParseCompleteEvent({
- error: null,
- definitions: definitions,
- elementsById: elementsById,
- references: references,
- warnings: parseWarnings
- })) || definitions;
- self.importDefinitions(definitions, bpmnDiagram).then(function (result) {
- var allWarnings = [].concat(parseWarnings, result.warnings || []);
-
- self._emit('import.done', {
- error: null,
- warnings: allWarnings
- });
+ToggleCollapseConnectionBehaviour.$inject = [
+ 'eventBus',
+ 'modeling',
+];
- return resolve({
- warnings: allWarnings
- });
- }).catch(function (err) {
- var allWarnings = [].concat(parseWarnings, err.warnings || []);
- self._emit('import.done', {
- error: err,
- warnings: allWarnings
- });
- return reject(addWarningsToError(err, allWarnings));
- });
- }).catch(function (err) {
- self._emit('import.parse.complete', {
- error: err
- });
- err = checkValidationError(err);
+/***/ }),
- self._emit('import.done', {
- error: err,
- warnings: err.warnings
- });
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/ToggleElementCollapseBehaviour.js":
+/*!************************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/ToggleElementCollapseBehaviour.js ***!
+ \************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- return reject(err);
- });
- });
- });
- /**
- * The importDefinitions result.
- *
- * @typedef {Object} ImportDefinitionsResult
- *
- * @property {Array} warnings
- */
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ ToggleElementCollapseBehaviour)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var diagram_js_lib_features_resize_ResizeUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/resize/ResizeUtil */ "../node_modules/diagram-js/lib/features/resize/ResizeUtil.js");
- /**
- * The importDefinitions error.
- *
- * @typedef {Error} ImportDefinitionsError
- *
- * @property {Array} warnings
- */
- /**
- * Import parsed definitions and render a BPMN 2.0 diagram.
- *
- * Once finished the viewer reports back the result to the
- * provided callback function with (err, warnings).
- *
- * ## Life-Cycle Events
- *
- * During import the viewer will fire life-cycle events:
- *
- * * import.render.start (graphical import start)
- * * import.render.complete (graphical import finished)
- *
- * You can use these events to hook into the life-cycle.
- *
- * @param {ModdleElement} definitions parsed BPMN 2.0 definitions
- * @param {ModdleElement|string} [bpmnDiagram] BPMN diagram or id of diagram to render (if not provided, the first one will be rendered)
- *
- * Returns {Promise}
- */
- BaseViewer.prototype.importDefinitions = (0, _CompatibilityUtil.wrapForCompatibility)(function importDefinitions(definitions, bpmnDiagram) {
- var self = this;
- return new Promise(function (resolve, reject) {
- self._setDefinitions(definitions);
- self.open(bpmnDiagram).then(function (result) {
- var warnings = result.warnings;
- return resolve({
- warnings: warnings
- });
- }).catch(function (err) {
- return reject(err);
- });
- });
- });
- /**
- * The open result.
- *
- * @typedef {Object} OpenResult
- *
- * @property {Array} warnings
- */
- /**
- * The open error.
- *
- * @typedef {Error} OpenError
- *
- * @property {Array} warnings
- */
- /**
- * Open diagram of previously imported XML.
- *
- * Once finished the viewer reports back the result to the
- * provided callback function with (err, warnings).
- *
- * ## Life-Cycle Events
- *
- * During switch the viewer will fire life-cycle events:
- *
- * * import.render.start (graphical import start)
- * * import.render.complete (graphical import finished)
- *
- * You can use these events to hook into the life-cycle.
- *
- * @param {string|ModdleElement} [bpmnDiagramOrId] id or the diagram to open
- *
- * Returns {Promise}
- */
- BaseViewer.prototype.open = (0, _CompatibilityUtil.wrapForCompatibility)(function open(bpmnDiagramOrId) {
- var definitions = this._definitions;
- var bpmnDiagram = bpmnDiagramOrId;
- var self = this;
- return new Promise(function (resolve, reject) {
- if (!definitions) {
- var err1 = new Error('no XML imported');
- return reject(addWarningsToError(err1, []));
- }
- if (typeof bpmnDiagramOrId === 'string') {
- bpmnDiagram = findBPMNDiagram(definitions, bpmnDiagramOrId);
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../ElementFactory').default} ElementFactory
+ * @typedef {import('../Modeling').default} Modeling
+ */
- if (!bpmnDiagram) {
- var err2 = new Error('BPMNDiagram <' + bpmnDiagramOrId + '> not found');
- return reject(addWarningsToError(err2, []));
- }
- } // clear existing rendered diagram
- // catch synchronous exceptions during #clear()
+var LOW_PRIORITY = 500;
+/**
+ * @param {EventBus} eventBus
+ * @param {ElementFactory} elementFactory
+ * @param {Modeling} modeling
+ */
+function ToggleElementCollapseBehaviour(
+ eventBus, elementFactory, modeling) {
- try {
- self.clear();
- } catch (error) {
- return reject(addWarningsToError(error, []));
- } // perform graphical import
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- (0, _Importer.importBpmnDiagram)(self, definitions, bpmnDiagram).then(function (result) {
- var warnings = result.warnings;
- return resolve({
- warnings: warnings
- });
- }).catch(function (err) {
- return reject(err);
- });
- });
- });
- /**
- * The saveXML result.
- *
- * @typedef {Object} SaveXMLResult
- *
- * @property {string} xml
- */
+ function hideEmptyLabels(children) {
+ if (children.length) {
+ children.forEach(function(child) {
+ if (child.type === 'label' && !child.businessObject.name) {
+ child.hidden = true;
+ }
+ });
+ }
+ }
- /**
- * Export the currently displayed BPMN 2.0 diagram as
- * a BPMN 2.0 XML document.
- *
- * ## Life-Cycle Events
- *
- * During XML saving the viewer will fire life-cycle events:
- *
- * * saveXML.start (before serialization)
- * * saveXML.serialized (after xml generation)
- * * saveXML.done (everything done)
- *
- * You can use these events to hook into the life-cycle.
- *
- * @param {Object} [options] export options
- * @param {boolean} [options.format=false] output formatted XML
- * @param {boolean} [options.preamble=true] output preamble
- *
- * Returns {Promise}
- */
+ function expandedBounds(shape, defaultSize) {
+ var children = shape.children,
+ newBounds = defaultSize,
+ visibleElements,
+ visibleBBox;
- BaseViewer.prototype.saveXML = (0, _CompatibilityUtil.wrapForCompatibility)(function saveXML(options) {
- options = options || {};
- var self = this;
- var definitions = this._definitions;
- return new Promise(function (resolve, reject) {
- if (!definitions) {
- var err = new Error('no definitions loaded');
- return reject(err);
- } // allow to fiddle around with definitions
+ visibleElements = filterVisible(children).concat([ shape ]);
+ visibleBBox = (0,diagram_js_lib_features_resize_ResizeUtil__WEBPACK_IMPORTED_MODULE_1__.computeChildrenBBox)(visibleElements);
- definitions = self._emit('saveXML.start', {
- definitions: definitions
- }) || definitions;
+ if (visibleBBox) {
- self._moddle.toXML(definitions, options).then(function (result) {
- var xml = result.xml;
+ // center to visibleBBox with max(defaultSize, childrenBounds)
+ newBounds.width = Math.max(visibleBBox.width, newBounds.width);
+ newBounds.height = Math.max(visibleBBox.height, newBounds.height);
- try {
- xml = self._emit('saveXML.serialized', {
- error: null,
- xml: xml
- }) || xml;
-
- self._emit('saveXML.done', {
- error: null,
- xml: xml
- });
- } catch (e) {
- console.error('error in saveXML life-cycle listener', e);
- }
+ newBounds.x = visibleBBox.x + (visibleBBox.width - newBounds.width) / 2;
+ newBounds.y = visibleBBox.y + (visibleBBox.height - newBounds.height) / 2;
+ } else {
- return resolve({
- xml: xml
- });
- }).catch(function (err) {
- return reject(err);
- });
- });
- });
- /**
- * The saveSVG result.
- *
- * @typedef {Object} SaveSVGResult
- *
- * @property {string} svg
- */
+ // center to collapsed shape with defaultSize
+ newBounds.x = shape.x + (shape.width - newBounds.width) / 2;
+ newBounds.y = shape.y + (shape.height - newBounds.height) / 2;
+ }
- /**
- * Export the currently displayed BPMN 2.0 diagram as
- * an SVG image.
- *
- * ## Life-Cycle Events
- *
- * During SVG saving the viewer will fire life-cycle events:
- *
- * * saveSVG.start (before serialization)
- * * saveSVG.done (everything done)
- *
- * You can use these events to hook into the life-cycle.
- *
- * @param {Object} [options]
- *
- * Returns {Promise}
- */
+ return newBounds;
+ }
- BaseViewer.prototype.saveSVG = (0, _CompatibilityUtil.wrapForCompatibility)(function saveSVG(options) {
- options = options || {};
- var self = this;
- return new Promise(function (resolve, reject) {
- self._emit('saveSVG.start');
+ function collapsedBounds(shape, defaultSize) {
- var svg, err;
+ return {
+ x: shape.x + (shape.width - defaultSize.width) / 2,
+ y: shape.y + (shape.height - defaultSize.height) / 2,
+ width: defaultSize.width,
+ height: defaultSize.height
+ };
+ }
- try {
- var canvas = self.get('canvas');
- var contentNode = canvas.getDefaultLayer(),
- defsNode = (0, _minDom.query)('defs', canvas._svg);
- var contents = (0, _tinySvg.innerSVG)(contentNode),
- defs = defsNode ? '' + (0, _tinySvg.innerSVG)(defsNode) + ' ' : '';
- var bbox = contentNode.getBBox();
- svg = '\n' + '\n' + '\n' + '' + defs + contents + ' ';
- } catch (e) {
- err = e;
- }
+ this.executed([ 'shape.toggleCollapse' ], LOW_PRIORITY, function(e) {
- self._emit('saveSVG.done', {
- error: err,
- svg: svg
- });
+ var context = e.context,
+ shape = context.shape;
- if (!err) {
- return resolve({
- svg: svg
- });
- }
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:SubProcess')) {
+ return;
+ }
- return reject(err);
- });
- });
- /**
- * Get a named diagram service.
- *
- * @example
- *
- * var elementRegistry = viewer.get('elementRegistry');
- * var startEventShape = elementRegistry.get('StartEvent_1');
- *
- * @param {string} name
- *
- * @return {Object} diagram service instance
- *
- * @method BaseViewer#get
- */
+ if (!shape.collapsed) {
- /**
- * Invoke a function in the context of this viewer.
- *
- * @example
- *
- * viewer.invoke(function(elementRegistry) {
- * var startEventShape = elementRegistry.get('StartEvent_1');
- * });
- *
- * @param {Function} fn to be invoked
- *
- * @return {Object} the functions return value
- *
- * @method BaseViewer#invoke
- */
+ // all children got made visible through djs, hide empty labels
+ hideEmptyLabels(shape.children);
- BaseViewer.prototype._setDefinitions = function (definitions) {
- this._definitions = definitions;
- };
+ // remove collapsed marker
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getDi)(shape).isExpanded = true;
+ } else {
- BaseViewer.prototype.getModules = function () {
- return this._modules;
- };
- /**
- * Remove all drawn elements from the viewer.
- *
- * After calling this method the viewer can still
- * be reused for opening another diagram.
- *
- * @method BaseViewer#clear
- */
+ // place collapsed marker
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getDi)(shape).isExpanded = false;
+ }
+ });
+ this.reverted([ 'shape.toggleCollapse' ], LOW_PRIORITY, function(e) {
- BaseViewer.prototype.clear = function () {
- if (!this.getDefinitions()) {
- // no diagram to clear
- return;
- } // remove businessObject#di binding
- //
- // this is necessary, as we establish the bindings
- // in the BpmnTreeWalker (and assume none are given
- // on reimport)
+ var context = e.context;
+ var shape = context.shape;
- this.get('elementRegistry').forEach(function (element) {
- var bo = element.businessObject;
+ // revert removing/placing collapsed marker
+ if (!shape.collapsed) {
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getDi)(shape).isExpanded = true;
- if (bo && bo.di) {
- delete bo.di;
- }
- }); // remove drawn elements
+ } else {
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getDi)(shape).isExpanded = false;
+ }
+ });
- _diagramJs.default.prototype.clear.call(this);
- };
- /**
- * Destroy the viewer instance and remove all its
- * remainders from the document tree.
- */
+ this.postExecuted([ 'shape.toggleCollapse' ], LOW_PRIORITY, function(e) {
+ var shape = e.context.shape,
+ defaultSize = elementFactory.getDefaultSize(shape),
+ newBounds;
+ if (shape.collapsed) {
- BaseViewer.prototype.destroy = function () {
- // diagram destroy
- _diagramJs.default.prototype.destroy.call(this); // dom detach
+ // resize to default size of collapsed shapes
+ newBounds = collapsedBounds(shape, defaultSize);
+ } else {
+ // resize to bounds of max(visible children, defaultSize)
+ newBounds = expandedBounds(shape, defaultSize);
+ }
- (0, _minDom.remove)(this._container);
- };
- /**
- * Register an event listener
- *
- * Remove a previously added listener via {@link #off(event, callback)}.
- *
- * @param {string} event
- * @param {number} [priority]
- * @param {Function} callback
- * @param {Object} [that]
- */
+ modeling.resizeShape(shape, newBounds, null, {
+ autoResize: shape.collapsed ? false : 'nwse'
+ });
+ });
+}
- BaseViewer.prototype.on = function (event, priority, callback, target) {
- return this.get('eventBus').on(event, priority, callback, target);
- };
- /**
- * De-register an event listener
- *
- * @param {string} event
- * @param {Function} callback
- */
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_3__["default"])(ToggleElementCollapseBehaviour, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- BaseViewer.prototype.off = function (event, callback) {
- this.get('eventBus').off(event, callback);
- };
+ToggleElementCollapseBehaviour.$inject = [
+ 'eventBus',
+ 'elementFactory',
+ 'modeling'
+];
- BaseViewer.prototype.attachTo = function (parentNode) {
- if (!parentNode) {
- throw new Error('parentNode required');
- } // ensure we detach from the
- // previous, old parent
+// helpers //////////////////////
- this.detach(); // unwrap jQuery if provided
+function filterVisible(elements) {
+ return elements.filter(function(e) {
+ return !e.hidden;
+ });
+}
- if (parentNode.get && parentNode.constructor.prototype.jquery) {
- parentNode = parentNode.get(0);
- }
+/***/ }),
- if (typeof parentNode === 'string') {
- parentNode = (0, _minDom.query)(parentNode);
- }
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/UnclaimIdBehavior.js":
+/*!***********************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/UnclaimIdBehavior.js ***!
+ \***********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- parentNode.appendChild(this._container);
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ UnclaimIdBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
+/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/LabelUtil */ "../node_modules/diagram-js/lib/util/ModelUtil.js");
- this._emit('attach', {});
- this.get('canvas').resized();
- };
- BaseViewer.prototype.getDefinitions = function () {
- return this._definitions;
- };
- BaseViewer.prototype.detach = function () {
- var container = this._container,
- parentNode = container.parentNode;
- if (!parentNode) {
- return;
- }
- this._emit('detach', {});
- parentNode.removeChild(container);
- };
- BaseViewer.prototype._init = function (container, moddle, options) {
- var baseModules = options.modules || this.getModules(),
- additionalModules = options.additionalModules || [],
- staticModules = [{
- bpmnjs: ['value', this],
- moddle: ['value', moddle]
- }];
- var diagramModules = [].concat(staticModules, baseModules, additionalModules);
- var diagramOptions = (0, _minDash.assign)((0, _minDash.omit)(options, ['additionalModules']), {
- canvas: (0, _minDash.assign)({}, options.canvas, {
- container: container
- }),
- modules: diagramModules
- }); // invoke diagram constructor
-
- _diagramJs.default.call(this, diagramOptions);
-
- if (options && options.container) {
- this.attachTo(options.container);
- }
- };
- /**
- * Emit an event on the underlying {@link EventBus}
- *
- * @param {string} type
- * @param {Object} event
- *
- * @return {Object} event processing result (if any)
- */
+/**
+ * @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
+ * @typedef {import('didi').Injector} Injector
+ * @typedef {import('../Modeling').default} Modeling
+ *
+ * @typedef {import('../../../model/Types').Moddle} Moddle
+ */
+/**
+ * Unclaims model IDs on element deletion.
+ *
+ * @param {Canvas} canvas
+ * @param {Injector} injector
+ * @param {Moddle} moddle
+ * @param {Modeling} modeling
+ */
+function UnclaimIdBehavior(canvas, injector, moddle, modeling) {
+ injector.invoke(diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"], this);
- BaseViewer.prototype._emit = function (type, event) {
- return this.get('eventBus').fire(type, event);
- };
+ this.preExecute('shape.delete', function(event) {
+ var context = event.context,
+ shape = context.shape,
+ shapeBo = shape.businessObject;
- BaseViewer.prototype._createContainer = function (options) {
- var container = (0, _minDom.domify)('
');
- (0, _minDash.assign)(container.style, {
- width: ensureUnit(options.width),
- height: ensureUnit(options.height),
- position: options.position
- });
- return container;
- };
+ if ((0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_1__.isLabel)(shape)) {
+ return;
+ }
- BaseViewer.prototype._createModdle = function (options) {
- var moddleOptions = (0, _minDash.assign)({}, this._moddleExtensions, options.moddleExtensions);
- return new _bpmnModdle.default(moddleOptions);
- };
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:Participant') && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_3__.isExpanded)(shape)) {
+ moddle.ids.unclaim(shapeBo.processRef.id);
+ }
- BaseViewer.prototype._modules = []; // helpers ///////////////
+ modeling.unclaimId(shapeBo.id, shapeBo);
+ });
- function addWarningsToError(err, warningsAry) {
- err.warnings = warningsAry;
- return err;
- }
- function checkValidationError(err) {
- // check if we can help the user by indicating wrong BPMN 2.0 xml
- // (in case he or the exporting tool did not get that right)
- var pattern = /unparsable content <([^>]+)> detected([\s\S]*)$/;
- var match = pattern.exec(err.message);
+ this.preExecute('connection.delete', function(event) {
+ var context = event.context,
+ connection = context.connection,
+ connectionBo = connection.businessObject;
- if (match) {
- err.message = 'unparsable content <' + match[1] + '> detected; ' + 'this may indicate an invalid BPMN 2.0 diagram file' + match[2];
- }
+ modeling.unclaimId(connectionBo.id, connectionBo);
+ });
- return err;
- }
+ this.preExecute('canvas.updateRoot', function() {
+ var rootElement = canvas.getRootElement(),
+ rootElementBo = rootElement.businessObject;
- var DEFAULT_OPTIONS = {
- width: '100%',
- height: '100%',
- position: 'relative'
- };
- /**
- * Ensure the passed argument is a proper unit (defaulting to px)
- */
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(rootElement, 'bpmn:Collaboration')) {
+ moddle.ids.unclaim(rootElementBo.id);
+ }
+ });
+}
- function ensureUnit(val) {
- return val + ((0, _minDash.isNumber)(val) ? 'px' : '');
- }
- /**
- * Find BPMNDiagram in definitions by ID
- *
- * @param {ModdleElement} definitions
- * @param {string} diagramId
- *
- * @return {ModdleElement|null}
- */
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_4__["default"])(UnclaimIdBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
+UnclaimIdBehavior.$inject = [ 'canvas', 'injector', 'moddle', 'modeling' ];
- function findBPMNDiagram(definitions, diagramId) {
- if (!diagramId) {
- return null;
- }
+/***/ }),
- return (0, _minDash.find)(definitions.diagrams, function (element) {
- return element.id === diagramId;
- }) || null;
- }
- /* */
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/UnsetDefaultFlowBehavior.js":
+/*!******************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/UnsetDefaultFlowBehavior.js ***!
+ \******************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ DeleteSequenceFlowBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- /**
- * Adds the project logo to the diagram container as
- * required by the bpmn.io license.
- *
- * @see http://bpmn.io/license
- *
- * @param {Element} container
- */
- function addProjectLogo(container) {
- var img = _PoweredByUtil.BPMNIO_IMG;
- var linkMarkup = '' + img + ' ';
- var linkElement = (0, _minDom.domify)(linkMarkup);
- container.appendChild(linkElement);
-
- _minDom.event.bind(linkElement, 'click', function (event) {
- (0, _PoweredByUtil.open)();
- event.preventDefault();
- });
- }
- /* */
- },{"./import/Importer":234,"./util/CompatibilityUtil":237,"./util/PoweredByUtil":241,"bpmn-moddle":242,"diagram-js":248,"inherits":438,"min-dash":646,"min-dom":647,"tiny-svg":658}],114:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = Modeler;
- var _inherits = _interopRequireDefault(require("inherits"));
- var _BaseModeler = _interopRequireDefault(require("./BaseModeler"));
- var _Viewer = _interopRequireDefault(require("./Viewer"));
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../Modeling').default} Modeling
+ */
- var _NavigatedViewer = _interopRequireDefault(require("./NavigatedViewer"));
+/**
+ * A behavior that unsets the Default property of sequence flow source on
+ * element delete, if the removed element is the Gateway or Task's default flow.
+ *
+ * @param {EventBus} eventBus
+ * @param {Modeling} modeling
+ */
+function DeleteSequenceFlowBehavior(eventBus, modeling) {
- var _keyboardMove = _interopRequireDefault(require("diagram-js/lib/navigation/keyboard-move"));
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- var _movecanvas = _interopRequireDefault(require("diagram-js/lib/navigation/movecanvas"));
- var _touch = _interopRequireDefault(require("diagram-js/lib/navigation/touch"));
+ this.preExecute('connection.delete', function(event) {
+ var context = event.context,
+ connection = context.connection,
+ source = connection.source;
- var _zoomscroll = _interopRequireDefault(require("diagram-js/lib/navigation/zoomscroll"));
+ if (isDefaultFlow(connection, source)) {
+ modeling.updateProperties(source, {
+ 'default': null
+ });
+ }
+ });
+}
- var _alignElements = _interopRequireDefault(require("diagram-js/lib/features/align-elements"));
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_1__["default"])(DeleteSequenceFlowBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- var _autoPlace = _interopRequireDefault(require("./features/auto-place"));
+DeleteSequenceFlowBehavior.$inject = [
+ 'eventBus',
+ 'modeling'
+];
- var _autoResize = _interopRequireDefault(require("./features/auto-resize"));
- var _autoScroll = _interopRequireDefault(require("diagram-js/lib/features/auto-scroll"));
+// helpers //////////////////////
- var _bendpoints = _interopRequireDefault(require("diagram-js/lib/features/bendpoints"));
+function isDefaultFlow(connection, source) {
- var _connect = _interopRequireDefault(require("diagram-js/lib/features/connect"));
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(connection, 'bpmn:SequenceFlow')) {
+ return false;
+ }
- var _connectionPreview = _interopRequireDefault(require("diagram-js/lib/features/connection-preview"));
+ var sourceBo = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(source),
+ sequenceFlow = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(connection);
- var _contextPad = _interopRequireDefault(require("./features/context-pad"));
+ return sourceBo.get('default') === sequenceFlow;
+}
- var _copyPaste = _interopRequireDefault(require("./features/copy-paste"));
+/***/ }),
- var _create = _interopRequireDefault(require("diagram-js/lib/features/create"));
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/UpdateFlowNodeRefsBehavior.js":
+/*!********************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/UpdateFlowNodeRefsBehavior.js ***!
+ \********************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var _distributeElements = _interopRequireDefault(require("./features/distribute-elements"));
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ UpdateFlowNodeRefsBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- var _editorActions = _interopRequireDefault(require("./features/editor-actions"));
- var _gridSnapping = _interopRequireDefault(require("./features/grid-snapping"));
- var _interactionEvents = _interopRequireDefault(require("./features/interaction-events"));
- var _keyboard = _interopRequireDefault(require("./features/keyboard"));
- var _keyboardMoveSelection = _interopRequireDefault(require("diagram-js/lib/features/keyboard-move-selection"));
- var _labelEditing = _interopRequireDefault(require("./features/label-editing"));
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('../Modeling').default} Modeling
+ * @typedef {import('diagram-js/lib/i18n/translate/translate').default} Translate
+ */
- var _modeling = _interopRequireDefault(require("./features/modeling"));
+var LOW_PRIORITY = 500,
+ HIGH_PRIORITY = 5000;
- var _move = _interopRequireDefault(require("diagram-js/lib/features/move"));
- var _palette = _interopRequireDefault(require("./features/palette"));
+/**
+ * BPMN specific delete lane behavior.
+ *
+ * @param {EventBus} eventBus
+ * @param {Modeling} modeling
+ * @param {Translate} translate
+ */
+function UpdateFlowNodeRefsBehavior(eventBus, modeling, translate) {
- var _replacePreview = _interopRequireDefault(require("./features/replace-preview"));
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- var _resize = _interopRequireDefault(require("diagram-js/lib/features/resize"));
+ /**
+ * Update Lane#flowNodeRefs and FlowNode#lanes with every flow node
+ * move/resize and lane move/resize. Groups elements to recompute containments
+ * as efficient as possible.
+ */
- var _snapping = _interopRequireDefault(require("./features/snapping"));
+ // the update context
+ var context;
- var _search = _interopRequireDefault(require("./features/search"));
- var _CompatibilityUtil = require("./util/CompatibilityUtil");
+ function initContext() {
+ context = context || new UpdateContext();
+ context.enter();
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ return context;
+ }
- var initialDiagram = '' + '' + '' + ' ' + ' ' + '' + '' + '' + ' ' + ' ' + ' ' + ' ' + ' ';
- /**
- * A modeler for BPMN 2.0 diagrams.
- *
- *
- * ## Extending the Modeler
- *
- * In order to extend the viewer pass extension modules to bootstrap via the
- * `additionalModules` option. An extension module is an object that exposes
- * named services.
- *
- * The following example depicts the integration of a simple
- * logging component that integrates with interaction events:
- *
- *
- * ```javascript
- *
- * // logging component
- * function InteractionLogger(eventBus) {
- * eventBus.on('element.hover', function(event) {
- * console.log()
- * })
- * }
- *
- * InteractionLogger.$inject = [ 'eventBus' ]; // minification save
- *
- * // extension module
- * var extensionModule = {
- * __init__: [ 'interactionLogger' ],
- * interactionLogger: [ 'type', InteractionLogger ]
- * };
- *
- * // extend the viewer
- * var bpmnModeler = new Modeler({ additionalModules: [ extensionModule ] });
- * bpmnModeler.importXML(...);
- * ```
- *
- *
- * ## Customizing / Replacing Components
- *
- * You can replace individual diagram components by redefining them in override modules.
- * This works for all components, including those defined in the core.
- *
- * Pass in override modules via the `options.additionalModules` flag like this:
- *
- * ```javascript
- * function CustomContextPadProvider(contextPad) {
- *
- * contextPad.registerProvider(this);
- *
- * this.getContextPadEntries = function(element) {
- * // no entries, effectively disable the context pad
- * return {};
- * };
- * }
- *
- * CustomContextPadProvider.$inject = [ 'contextPad' ];
- *
- * var overrideModule = {
- * contextPadProvider: [ 'type', CustomContextPadProvider ]
- * };
- *
- * var bpmnModeler = new Modeler({ additionalModules: [ overrideModule ]});
- * ```
- *
- * @param {Object} [options] configuration options to pass to the viewer
- * @param {DOMElement} [options.container] the container to render the viewer in, defaults to body.
- * @param {string|number} [options.width] the width of the viewer
- * @param {string|number} [options.height] the height of the viewer
- * @param {Object} [options.moddleExtensions] extension packages to provide
- * @param {Array} [options.modules] a list of modules to override the default modules
- * @param {Array} [options.additionalModules] a list of modules to use with the default modules
- */
+ function getContext() {
+ if (!context) {
+ throw new Error(translate('out of bounds release'));
+ }
- function Modeler(options) {
- _BaseModeler.default.call(this, options);
- }
+ return context;
+ }
- (0, _inherits.default)(Modeler, _BaseModeler.default);
- Modeler.Viewer = _Viewer.default;
- Modeler.NavigatedViewer = _NavigatedViewer.default;
- /**
- * The createDiagram result.
- *
- * @typedef {Object} CreateDiagramResult
- *
- * @property {Array} warnings
- */
+ function releaseContext() {
- /**
- * The createDiagram error.
- *
- * @typedef {Error} CreateDiagramError
- *
- * @property {Array} warnings
- */
+ if (!context) {
+ throw new Error(translate('out of bounds release'));
+ }
- /**
- * Create a new diagram to start modeling.
- *
- * Returns {Promise}
- */
+ var triggerUpdate = context.leave();
- Modeler.prototype.createDiagram = (0, _CompatibilityUtil.wrapForCompatibility)(function createDiagram() {
- return this.importXML(initialDiagram);
- });
- Modeler.prototype._interactionModules = [// non-modeling components
- _keyboardMove.default, _movecanvas.default, _touch.default, _zoomscroll.default];
- Modeler.prototype._modelingModules = [// modeling components
- _alignElements.default, _autoPlace.default, _autoScroll.default, _autoResize.default, _bendpoints.default, _connect.default, _connectionPreview.default, _contextPad.default, _copyPaste.default, _create.default, _distributeElements.default, _editorActions.default, _gridSnapping.default, _interactionEvents.default, _keyboard.default, _keyboardMoveSelection.default, _labelEditing.default, _modeling.default, _move.default, _palette.default, _replacePreview.default, _resize.default, _snapping.default, _search.default]; // modules the modeler is composed of
-//
-// - viewer modules
-// - interaction modules
-// - modeling modules
+ if (triggerUpdate) {
+ modeling.updateLaneRefs(context.flowNodes, context.lanes);
- Modeler.prototype._modules = [].concat(_Viewer.default.prototype._modules, Modeler.prototype._interactionModules, Modeler.prototype._modelingModules);
+ context = null;
+ }
- },{"./BaseModeler":112,"./NavigatedViewer":115,"./Viewer":116,"./features/auto-place":125,"./features/auto-resize":128,"./features/context-pad":130,"./features/copy-paste":133,"./features/distribute-elements":137,"./features/editor-actions":139,"./features/grid-snapping":145,"./features/interaction-events":147,"./features/keyboard":149,"./features/label-editing":154,"./features/modeling":209,"./features/palette":215,"./features/replace-preview":220,"./features/search":227,"./features/snapping":231,"./util/CompatibilityUtil":237,"diagram-js/lib/features/align-elements":264,"diagram-js/lib/features/auto-scroll":274,"diagram-js/lib/features/bendpoints":281,"diagram-js/lib/features/connect":288,"diagram-js/lib/features/connection-preview":290,"diagram-js/lib/features/create":297,"diagram-js/lib/features/keyboard-move-selection":318,"diagram-js/lib/features/move":356,"diagram-js/lib/features/resize":374,"diagram-js/lib/navigation/keyboard-move":409,"diagram-js/lib/navigation/movecanvas":411,"diagram-js/lib/navigation/touch":412,"diagram-js/lib/navigation/zoomscroll":415,"inherits":438}],115:[function(require,module,exports){
- "use strict";
+ return triggerUpdate;
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = NavigatedViewer;
- var _inherits = _interopRequireDefault(require("inherits"));
+ var laneRefUpdateEvents = [
+ 'spaceTool',
+ 'lane.add',
+ 'lane.resize',
+ 'lane.split',
+ 'elements.create',
+ 'elements.delete',
+ 'elements.move',
+ 'shape.create',
+ 'shape.delete',
+ 'shape.move',
+ 'shape.resize'
+ ];
- var _Viewer = _interopRequireDefault(require("./Viewer"));
- var _keyboardMove = _interopRequireDefault(require("diagram-js/lib/navigation/keyboard-move"));
+ // listen to a lot of stuff to group lane updates
- var _movecanvas = _interopRequireDefault(require("diagram-js/lib/navigation/movecanvas"));
+ this.preExecute(laneRefUpdateEvents, HIGH_PRIORITY, function(event) {
+ initContext();
+ });
- var _zoomscroll = _interopRequireDefault(require("diagram-js/lib/navigation/zoomscroll"));
+ this.postExecuted(laneRefUpdateEvents, LOW_PRIORITY, function(event) {
+ releaseContext();
+ });
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- /**
- * A viewer that includes mouse navigation facilities
- *
- * @param {Object} options
- */
- function NavigatedViewer(options) {
- _Viewer.default.call(this, options);
- }
+ // Mark flow nodes + lanes that need an update
+
+ this.preExecute([
+ 'shape.create',
+ 'shape.move',
+ 'shape.delete',
+ 'shape.resize'
+ ], function(event) {
+
+ var context = event.context,
+ shape = context.shape;
+
+ var updateContext = getContext();
+
+ // no need to update labels
+ if (shape.labelTarget) {
+ return;
+ }
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:Lane')) {
+ updateContext.addLane(shape);
+ }
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:FlowNode')) {
+ updateContext.addFlowNode(shape);
+ }
+ });
+}
- (0, _inherits.default)(NavigatedViewer, _Viewer.default);
- NavigatedViewer.prototype._navigationModules = [_keyboardMove.default, _movecanvas.default, _zoomscroll.default];
- NavigatedViewer.prototype._modules = [].concat(_Viewer.default.prototype._modules, NavigatedViewer.prototype._navigationModules);
+UpdateFlowNodeRefsBehavior.$inject = [
+ 'eventBus',
+ 'modeling' ,
+ 'translate'
+];
- },{"./Viewer":116,"diagram-js/lib/navigation/keyboard-move":409,"diagram-js/lib/navigation/movecanvas":411,"diagram-js/lib/navigation/zoomscroll":415,"inherits":438}],116:[function(require,module,exports){
- "use strict";
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_2__["default"])(UpdateFlowNodeRefsBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = Viewer;
- var _inherits = _interopRequireDefault(require("inherits"));
+function UpdateContext() {
- var _core = _interopRequireDefault(require("./core"));
+ this.flowNodes = [];
+ this.lanes = [];
- var _translate = _interopRequireDefault(require("diagram-js/lib/i18n/translate"));
+ this.counter = 0;
- var _selection = _interopRequireDefault(require("diagram-js/lib/features/selection"));
+ this.addLane = function(lane) {
+ this.lanes.push(lane);
+ };
- var _overlays = _interopRequireDefault(require("diagram-js/lib/features/overlays"));
+ this.addFlowNode = function(flowNode) {
+ this.flowNodes.push(flowNode);
+ };
- var _BaseViewer = _interopRequireDefault(require("./BaseViewer"));
+ this.enter = function() {
+ this.counter++;
+ };
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ this.leave = function() {
+ this.counter--;
- /**
- * A viewer for BPMN 2.0 diagrams.
- *
- * Have a look at {@link NavigatedViewer} or {@link Modeler} for bundles that include
- * additional features.
- *
- *
- * ## Extending the Viewer
- *
- * In order to extend the viewer pass extension modules to bootstrap via the
- * `additionalModules` option. An extension module is an object that exposes
- * named services.
- *
- * The following example depicts the integration of a simple
- * logging component that integrates with interaction events:
- *
- *
- * ```javascript
- *
- * // logging component
- * function InteractionLogger(eventBus) {
- * eventBus.on('element.hover', function(event) {
- * console.log()
- * })
- * }
- *
- * InteractionLogger.$inject = [ 'eventBus' ]; // minification save
- *
- * // extension module
- * var extensionModule = {
- * __init__: [ 'interactionLogger' ],
- * interactionLogger: [ 'type', InteractionLogger ]
- * };
- *
- * // extend the viewer
- * var bpmnViewer = new Viewer({ additionalModules: [ extensionModule ] });
- * bpmnViewer.importXML(...);
- * ```
- *
- * @param {Object} [options] configuration options to pass to the viewer
- * @param {DOMElement} [options.container] the container to render the viewer in, defaults to body.
- * @param {string|number} [options.width] the width of the viewer
- * @param {string|number} [options.height] the height of the viewer
- * @param {Object} [options.moddleExtensions] extension packages to provide
- * @param {Array} [options.modules] a list of modules to override the default modules
- * @param {Array} [options.additionalModules] a list of modules to use with the default modules
- */
- function Viewer(options) {
- _BaseViewer.default.call(this, options);
- }
+ return !this.counter;
+ };
+}
- (0, _inherits.default)(Viewer, _BaseViewer.default); // modules the viewer is composed of
+/***/ }),
- Viewer.prototype._modules = [_core.default, _translate.default, _selection.default, _overlays.default]; // default moddle extensions the viewer is composed of
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/index.js":
+/*!***********************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/index.js ***!
+ \***********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- Viewer.prototype._moddleExtensions = {};
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _AdaptiveLabelPositioningBehavior__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AdaptiveLabelPositioningBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/AdaptiveLabelPositioningBehavior.js");
+/* harmony import */ var _AppendBehavior__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AppendBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/AppendBehavior.js");
+/* harmony import */ var _AssociationBehavior__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AssociationBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/AssociationBehavior.js");
+/* harmony import */ var _AttachEventBehavior__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AttachEventBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/AttachEventBehavior.js");
+/* harmony import */ var _BoundaryEventBehavior__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BoundaryEventBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/BoundaryEventBehavior.js");
+/* harmony import */ var _CompensateBoundaryEventBehavior__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./CompensateBoundaryEventBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/CompensateBoundaryEventBehavior.js");
+/* harmony import */ var _CreateBehavior__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CreateBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/CreateBehavior.js");
+/* harmony import */ var _CreateDataObjectBehavior__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./CreateDataObjectBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/CreateDataObjectBehavior.js");
+/* harmony import */ var _CreateParticipantBehavior__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CreateParticipantBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/CreateParticipantBehavior.js");
+/* harmony import */ var _DataInputAssociationBehavior__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./DataInputAssociationBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/DataInputAssociationBehavior.js");
+/* harmony import */ var _DataStoreBehavior__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./DataStoreBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/DataStoreBehavior.js");
+/* harmony import */ var _DeleteLaneBehavior__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./DeleteLaneBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/DeleteLaneBehavior.js");
+/* harmony import */ var _DetachEventBehavior__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./DetachEventBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/DetachEventBehavior.js");
+/* harmony import */ var _DropOnFlowBehavior__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./DropOnFlowBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/DropOnFlowBehavior.js");
+/* harmony import */ var _EventBasedGatewayBehavior__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./EventBasedGatewayBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/EventBasedGatewayBehavior.js");
+/* harmony import */ var _FixHoverBehavior__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./FixHoverBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/FixHoverBehavior.js");
+/* harmony import */ var _GroupBehavior__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./GroupBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/GroupBehavior.js");
+/* harmony import */ var _ImportDockingFix__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./ImportDockingFix */ "../node_modules/bpmn-js/lib/features/modeling/behavior/ImportDockingFix.js");
+/* harmony import */ var _IsHorizontalFix__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./IsHorizontalFix */ "../node_modules/bpmn-js/lib/features/modeling/behavior/IsHorizontalFix.js");
+/* harmony import */ var _LabelBehavior__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./LabelBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/LabelBehavior.js");
+/* harmony import */ var _LayoutConnectionBehavior__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./LayoutConnectionBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/LayoutConnectionBehavior.js");
+/* harmony import */ var _MessageFlowBehavior__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./MessageFlowBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/MessageFlowBehavior.js");
+/* harmony import */ var _NonInterruptingBehavior__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./NonInterruptingBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/NonInterruptingBehavior.js");
+/* harmony import */ var _RemoveEmbeddedLabelBoundsBehavior__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./RemoveEmbeddedLabelBoundsBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/RemoveEmbeddedLabelBoundsBehavior.js");
+/* harmony import */ var _RemoveElementBehavior__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./RemoveElementBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/RemoveElementBehavior.js");
+/* harmony import */ var _RemoveParticipantBehavior__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./RemoveParticipantBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/RemoveParticipantBehavior.js");
+/* harmony import */ var _ReplaceConnectionBehavior__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./ReplaceConnectionBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/ReplaceConnectionBehavior.js");
+/* harmony import */ var _ReplaceElementBehaviour__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./ReplaceElementBehaviour */ "../node_modules/bpmn-js/lib/features/modeling/behavior/ReplaceElementBehaviour.js");
+/* harmony import */ var _ResizeBehavior__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./ResizeBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/ResizeBehavior.js");
+/* harmony import */ var _ResizeLaneBehavior__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./ResizeLaneBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/ResizeLaneBehavior.js");
+/* harmony import */ var _RootElementReferenceBehavior__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./RootElementReferenceBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/RootElementReferenceBehavior.js");
+/* harmony import */ var _SpaceToolBehavior__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./SpaceToolBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/SpaceToolBehavior.js");
+/* harmony import */ var _SubProcessPlaneBehavior__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./SubProcessPlaneBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/SubProcessPlaneBehavior.js");
+/* harmony import */ var _SubProcessStartEventBehavior__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./SubProcessStartEventBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/SubProcessStartEventBehavior.js");
+/* harmony import */ var _TextAnnotationBehavior__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./TextAnnotationBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/TextAnnotationBehavior.js");
+/* harmony import */ var _ToggleCollapseConnectionBehaviour__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./ToggleCollapseConnectionBehaviour */ "../node_modules/bpmn-js/lib/features/modeling/behavior/ToggleCollapseConnectionBehaviour.js");
+/* harmony import */ var _ToggleElementCollapseBehaviour__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./ToggleElementCollapseBehaviour */ "../node_modules/bpmn-js/lib/features/modeling/behavior/ToggleElementCollapseBehaviour.js");
+/* harmony import */ var _UnclaimIdBehavior__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./UnclaimIdBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/UnclaimIdBehavior.js");
+/* harmony import */ var _UnsetDefaultFlowBehavior__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./UnsetDefaultFlowBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/UnsetDefaultFlowBehavior.js");
+/* harmony import */ var _UpdateFlowNodeRefsBehavior__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./UpdateFlowNodeRefsBehavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/UpdateFlowNodeRefsBehavior.js");
- },{"./BaseViewer":113,"./core":117,"diagram-js/lib/features/overlays":361,"diagram-js/lib/features/selection":383,"diagram-js/lib/i18n/translate":401,"inherits":438}],117:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _draw = _interopRequireDefault(require("../draw"));
- var _import = _interopRequireDefault(require("../import"));
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var _default = {
- __depends__: [_draw.default, _import.default]
- };
- exports.default = _default;
- },{"../draw":122,"../import":236}],118:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.isTypedEvent = isTypedEvent;
- exports.isThrowEvent = isThrowEvent;
- exports.isCollection = isCollection;
- exports.getDi = getDi;
- exports.getSemantic = getSemantic;
- exports.getFillColor = getFillColor;
- exports.getStrokeColor = getStrokeColor;
- exports.getCirclePath = getCirclePath;
- exports.getRoundRectPath = getRoundRectPath;
- exports.getDiamondPath = getDiamondPath;
- exports.getRectPath = getRectPath;
-
- var _minDash = require("min-dash");
-
- var _RenderUtil = require("diagram-js/lib/util/RenderUtil");
-// element utils //////////////////////
- /**
- * Checks if eventDefinition of the given element matches with semantic type.
- *
- * @return {boolean} true if element is of the given semantic type
- */
- function isTypedEvent(event, eventDefinitionType, filter) {
- function matches(definition, filter) {
- return (0, _minDash.every)(filter, function (val, key) {
- // we want a == conversion here, to be able to catch
- // undefined == false and friends
-
- /* jshint -W116 */
- return definition[key] == val;
- });
- }
- return (0, _minDash.some)(event.eventDefinitions, function (definition) {
- return definition.$type === eventDefinitionType && matches(event, filter);
- });
- }
- function isThrowEvent(event) {
- return event.$type === 'bpmn:IntermediateThrowEvent' || event.$type === 'bpmn:EndEvent';
- }
- function isCollection(element) {
- var dataObject = element.dataObjectRef;
- return element.isCollection || dataObject && dataObject.isCollection;
- }
- function getDi(element) {
- return element.businessObject.di;
- }
- function getSemantic(element) {
- return element.businessObject;
- } // color access //////////////////////
- function getFillColor(element, defaultColor) {
- return getDi(element).get('bioc:fill') || defaultColor || 'white';
- }
- function getStrokeColor(element, defaultColor) {
- return getDi(element).get('bioc:stroke') || defaultColor || 'black';
- } // cropping path customizations //////////////////////
- function getCirclePath(shape) {
- var cx = shape.x + shape.width / 2,
- cy = shape.y + shape.height / 2,
- radius = shape.width / 2;
- var circlePath = [['M', cx, cy], ['m', 0, -radius], ['a', radius, radius, 0, 1, 1, 0, 2 * radius], ['a', radius, radius, 0, 1, 1, 0, -2 * radius], ['z']];
- return (0, _RenderUtil.componentsToPath)(circlePath);
- }
- function getRoundRectPath(shape, borderRadius) {
- var x = shape.x,
- y = shape.y,
- width = shape.width,
- height = shape.height;
- var roundRectPath = [['M', x + borderRadius, y], ['l', width - borderRadius * 2, 0], ['a', borderRadius, borderRadius, 0, 0, 1, borderRadius, borderRadius], ['l', 0, height - borderRadius * 2], ['a', borderRadius, borderRadius, 0, 0, 1, -borderRadius, borderRadius], ['l', borderRadius * 2 - width, 0], ['a', borderRadius, borderRadius, 0, 0, 1, -borderRadius, -borderRadius], ['l', 0, borderRadius * 2 - height], ['a', borderRadius, borderRadius, 0, 0, 1, borderRadius, -borderRadius], ['z']];
- return (0, _RenderUtil.componentsToPath)(roundRectPath);
- }
- function getDiamondPath(shape) {
- var width = shape.width,
- height = shape.height,
- x = shape.x,
- y = shape.y,
- halfWidth = width / 2,
- halfHeight = height / 2;
- var diamondPath = [['M', x + halfWidth, y], ['l', halfWidth, halfHeight], ['l', -halfWidth, halfHeight], ['l', -halfWidth, -halfHeight], ['z']];
- return (0, _RenderUtil.componentsToPath)(diamondPath);
- }
- function getRectPath(shape) {
- var x = shape.x,
- y = shape.y,
- width = shape.width,
- height = shape.height;
- var rectPath = [['M', x, y], ['l', width, 0], ['l', 0, height], ['l', -width, 0], ['z']];
- return (0, _RenderUtil.componentsToPath)(rectPath);
- }
- },{"diagram-js/lib/util/RenderUtil":432,"min-dash":646}],119:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BpmnRenderer;
- var _inherits = _interopRequireDefault(require("inherits"));
- var _minDash = require("min-dash");
- var _BaseRenderer = _interopRequireDefault(require("diagram-js/lib/draw/BaseRenderer"));
- var _DiUtil = require("../util/DiUtil");
- var _LabelUtil = require("../features/label-editing/LabelUtil");
- var _ModelUtil = require("../util/ModelUtil");
- var _RenderUtil = require("diagram-js/lib/util/RenderUtil");
- var _BpmnRenderUtil = require("./BpmnRenderUtil");
- var _minDom = require("min-dom");
- var _tinySvg = require("tiny-svg");
- var _SvgTransformUtil = require("diagram-js/lib/util/SvgTransformUtil");
- var _ids = _interopRequireDefault(require("ids"));
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var RENDERER_IDS = new _ids.default();
- var TASK_BORDER_RADIUS = 10;
- var INNER_OUTER_DIST = 3;
- var DEFAULT_FILL_OPACITY = .95,
- HIGH_FILL_OPACITY = .35;
- function BpmnRenderer(config, eventBus, styles, pathMap, canvas, textRenderer, priority) {
- _BaseRenderer.default.call(this, eventBus, priority);
- var defaultFillColor = config && config.defaultFillColor,
- defaultStrokeColor = config && config.defaultStrokeColor;
- var rendererId = RENDERER_IDS.next();
- var markers = {};
- var computeStyle = styles.computeStyle;
+/**
+ * @type { import('didi').ModuleDeclaration }
+ */
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __init__: [
+ 'adaptiveLabelPositioningBehavior',
+ 'appendBehavior',
+ 'associationBehavior',
+ 'attachEventBehavior',
+ 'boundaryEventBehavior',
+ 'compensateBoundaryEventBehaviour',
+ 'createBehavior',
+ 'createDataObjectBehavior',
+ 'createParticipantBehavior',
+ 'dataInputAssociationBehavior',
+ 'dataStoreBehavior',
+ 'deleteLaneBehavior',
+ 'detachEventBehavior',
+ 'dropOnFlowBehavior',
+ 'eventBasedGatewayBehavior',
+ 'fixHoverBehavior',
+ 'groupBehavior',
+ 'importDockingFix',
+ 'isHorizontalFix',
+ 'labelBehavior',
+ 'layoutConnectionBehavior',
+ 'messageFlowBehavior',
+ 'nonInterruptingBehavior',
+ 'removeElementBehavior',
+ 'removeEmbeddedLabelBoundsBehavior',
+ 'removeParticipantBehavior',
+ 'replaceConnectionBehavior',
+ 'replaceElementBehaviour',
+ 'resizeBehavior',
+ 'resizeLaneBehavior',
+ 'rootElementReferenceBehavior',
+ 'spaceToolBehavior',
+ 'subProcessPlaneBehavior',
+ 'subProcessStartEventBehavior',
+ 'textAnnotationBehavior',
+ 'toggleCollapseConnectionBehaviour',
+ 'toggleElementCollapseBehaviour',
+ 'unclaimIdBehavior',
+ 'updateFlowNodeRefsBehavior',
+ 'unsetDefaultFlowBehavior'
+ ],
+ adaptiveLabelPositioningBehavior: [ 'type', _AdaptiveLabelPositioningBehavior__WEBPACK_IMPORTED_MODULE_0__["default"] ],
+ appendBehavior: [ 'type', _AppendBehavior__WEBPACK_IMPORTED_MODULE_1__["default"] ],
+ associationBehavior: [ 'type', _AssociationBehavior__WEBPACK_IMPORTED_MODULE_2__["default"] ],
+ attachEventBehavior: [ 'type', _AttachEventBehavior__WEBPACK_IMPORTED_MODULE_3__["default"] ],
+ boundaryEventBehavior: [ 'type', _BoundaryEventBehavior__WEBPACK_IMPORTED_MODULE_4__["default"] ],
+ compensateBoundaryEventBehaviour: [ 'type', _CompensateBoundaryEventBehavior__WEBPACK_IMPORTED_MODULE_5__["default"] ],
+ createBehavior: [ 'type', _CreateBehavior__WEBPACK_IMPORTED_MODULE_6__["default"] ],
+ createDataObjectBehavior: [ 'type', _CreateDataObjectBehavior__WEBPACK_IMPORTED_MODULE_7__["default"] ],
+ createParticipantBehavior: [ 'type', _CreateParticipantBehavior__WEBPACK_IMPORTED_MODULE_8__["default"] ],
+ dataInputAssociationBehavior: [ 'type', _DataInputAssociationBehavior__WEBPACK_IMPORTED_MODULE_9__["default"] ],
+ dataStoreBehavior: [ 'type', _DataStoreBehavior__WEBPACK_IMPORTED_MODULE_10__["default"] ],
+ deleteLaneBehavior: [ 'type', _DeleteLaneBehavior__WEBPACK_IMPORTED_MODULE_11__["default"] ],
+ detachEventBehavior: [ 'type', _DetachEventBehavior__WEBPACK_IMPORTED_MODULE_12__["default"] ],
+ dropOnFlowBehavior: [ 'type', _DropOnFlowBehavior__WEBPACK_IMPORTED_MODULE_13__["default"] ],
+ eventBasedGatewayBehavior: [ 'type', _EventBasedGatewayBehavior__WEBPACK_IMPORTED_MODULE_14__["default"] ],
+ fixHoverBehavior: [ 'type', _FixHoverBehavior__WEBPACK_IMPORTED_MODULE_15__["default"] ],
+ groupBehavior: [ 'type', _GroupBehavior__WEBPACK_IMPORTED_MODULE_16__["default"] ],
+ importDockingFix: [ 'type', _ImportDockingFix__WEBPACK_IMPORTED_MODULE_17__["default"] ],
+ isHorizontalFix: [ 'type', _IsHorizontalFix__WEBPACK_IMPORTED_MODULE_18__["default"] ],
+ labelBehavior: [ 'type', _LabelBehavior__WEBPACK_IMPORTED_MODULE_19__["default"] ],
+ layoutConnectionBehavior: [ 'type', _LayoutConnectionBehavior__WEBPACK_IMPORTED_MODULE_20__["default"] ],
+ messageFlowBehavior: [ 'type', _MessageFlowBehavior__WEBPACK_IMPORTED_MODULE_21__["default"] ],
+ nonInterruptingBehavior: [ 'type', _NonInterruptingBehavior__WEBPACK_IMPORTED_MODULE_22__["default"] ],
+ removeElementBehavior: [ 'type', _RemoveElementBehavior__WEBPACK_IMPORTED_MODULE_23__["default"] ],
+ removeEmbeddedLabelBoundsBehavior: [ 'type', _RemoveEmbeddedLabelBoundsBehavior__WEBPACK_IMPORTED_MODULE_24__["default"] ],
+ removeParticipantBehavior: [ 'type', _RemoveParticipantBehavior__WEBPACK_IMPORTED_MODULE_25__["default"] ],
+ replaceConnectionBehavior: [ 'type', _ReplaceConnectionBehavior__WEBPACK_IMPORTED_MODULE_26__["default"] ],
+ replaceElementBehaviour: [ 'type', _ReplaceElementBehaviour__WEBPACK_IMPORTED_MODULE_27__["default"] ],
+ resizeBehavior: [ 'type', _ResizeBehavior__WEBPACK_IMPORTED_MODULE_28__["default"] ],
+ resizeLaneBehavior: [ 'type', _ResizeLaneBehavior__WEBPACK_IMPORTED_MODULE_29__["default"] ],
+ rootElementReferenceBehavior: [ 'type', _RootElementReferenceBehavior__WEBPACK_IMPORTED_MODULE_30__["default"] ],
+ spaceToolBehavior: [ 'type', _SpaceToolBehavior__WEBPACK_IMPORTED_MODULE_31__["default"] ],
+ subProcessPlaneBehavior: [ 'type', _SubProcessPlaneBehavior__WEBPACK_IMPORTED_MODULE_32__["default"] ],
+ subProcessStartEventBehavior: [ 'type', _SubProcessStartEventBehavior__WEBPACK_IMPORTED_MODULE_33__["default"] ],
+ textAnnotationBehavior: [ 'type', _TextAnnotationBehavior__WEBPACK_IMPORTED_MODULE_34__["default"] ],
+ toggleCollapseConnectionBehaviour: [ 'type', _ToggleCollapseConnectionBehaviour__WEBPACK_IMPORTED_MODULE_35__["default"] ],
+ toggleElementCollapseBehaviour : [ 'type', _ToggleElementCollapseBehaviour__WEBPACK_IMPORTED_MODULE_36__["default"] ],
+ unclaimIdBehavior: [ 'type', _UnclaimIdBehavior__WEBPACK_IMPORTED_MODULE_37__["default"] ],
+ unsetDefaultFlowBehavior: [ 'type', _UnsetDefaultFlowBehavior__WEBPACK_IMPORTED_MODULE_38__["default"] ],
+ updateFlowNodeRefsBehavior: [ 'type', _UpdateFlowNodeRefsBehavior__WEBPACK_IMPORTED_MODULE_39__["default"] ]
+});
+
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/util/CategoryUtil.js":
+/*!***********************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/util/CategoryUtil.js ***!
+ \***********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ createCategory: () => (/* binding */ createCategory),
+/* harmony export */ createCategoryValue: () => (/* binding */ createCategoryValue),
+/* harmony export */ linkCategoryValue: () => (/* binding */ linkCategoryValue),
+/* harmony export */ unlinkCategory: () => (/* binding */ unlinkCategory),
+/* harmony export */ unlinkCategoryValue: () => (/* binding */ unlinkCategoryValue)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/util/Collections */ "../node_modules/diagram-js/lib/util/Collections.js");
+
+
+/**
+ * @typedef {import('../../BpmnFactory').default} BpmnFactory
+ *
+ * @typedef {import('../../../model/Types').ModdleElement} ModdleElement
+ */
- function addMarker(id, options) {
- var attrs = (0, _minDash.assign)({
- fill: 'black',
- strokeWidth: 1,
- strokeLinecap: 'round',
- strokeDasharray: 'none'
- }, options.attrs);
- var ref = options.ref || {
- x: 0,
- y: 0
- };
- var scale = options.scale || 1; // fix for safari / chrome / firefox bug not correctly
- // resetting stroke dash array
+/**
+ * Creates a new bpmn:CategoryValue inside a new bpmn:Category
+ *
+ * @param {BpmnFactory} bpmnFactory
+ *
+ * @return {ModdleElement}
+ */
+function createCategory(bpmnFactory) {
+ return bpmnFactory.create('bpmn:Category');
+}
- if (attrs.strokeDasharray === 'none') {
- attrs.strokeDasharray = [10000, 1];
- }
+/**
+ * Creates a new bpmn:CategoryValue inside a new bpmn:Category
+ *
+ * @param {BpmnFactory} bpmnFactory
+ *
+ * @return {ModdleElement}
+ */
+function createCategoryValue(bpmnFactory) {
+ return bpmnFactory.create('bpmn:CategoryValue');
+}
- var marker = (0, _tinySvg.create)('marker');
- (0, _tinySvg.attr)(options.element, attrs);
- (0, _tinySvg.append)(marker, options.element);
- (0, _tinySvg.attr)(marker, {
- id: id,
- viewBox: '0 0 20 20',
- refX: ref.x,
- refY: ref.y,
- markerWidth: 20 * scale,
- markerHeight: 20 * scale,
- orient: 'auto'
- });
- var defs = (0, _minDom.query)('defs', canvas._svg);
+/**
+ * Adds category value to definitions
+ *
+ * @param {ModdleElement} categoryValue
+ * @param {ModdleElement} category
+ * @param {ModdleElement} definitions
+ *
+ * @return {ModdleElement}
+ */
+function linkCategoryValue(categoryValue, category, definitions) {
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_0__.add)(category.get('categoryValue'), categoryValue);
+ categoryValue.$parent = category;
- if (!defs) {
- defs = (0, _tinySvg.create)('defs');
- (0, _tinySvg.append)(canvas._svg, defs);
- }
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_0__.add)(definitions.get('rootElements'), category);
+ category.$parent = definitions;
- (0, _tinySvg.append)(defs, marker);
- markers[id] = marker;
- }
+ return categoryValue;
+}
- function colorEscape(str) {
- // only allow characters and numbers
- return str.replace(/[^0-9a-zA-z]+/g, '_');
- }
+/**
+ * Unlink category value from parent
+ *
+ * @param {ModdleElement} categoryValue
+ *
+ * @return {ModdleElement}
+ */
+function unlinkCategoryValue(categoryValue) {
+ var category = categoryValue.$parent;
- function marker(type, fill, stroke) {
- var id = type + '-' + colorEscape(fill) + '-' + colorEscape(stroke) + '-' + rendererId;
+ if (category) {
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_0__.remove)(category.get('categoryValue'), categoryValue);
+ categoryValue.$parent = null;
+ }
- if (!markers[id]) {
- createMarker(id, type, fill, stroke);
- }
+ return categoryValue;
+}
- return 'url(#' + id + ')';
- }
+/**
+ * Unlink category from parent
+ *
+ * @param {ModdleElement} category
+ *
+ * @return {ModdleElement}
+ */
+function unlinkCategory(category) {
+ var definitions = category.$parent;
- function createMarker(id, type, fill, stroke) {
- if (type === 'sequenceflow-end') {
- var sequenceflowEnd = (0, _tinySvg.create)('path');
- (0, _tinySvg.attr)(sequenceflowEnd, {
- d: 'M 1 5 L 11 10 L 1 15 Z'
- });
- addMarker(id, {
- element: sequenceflowEnd,
- ref: {
- x: 11,
- y: 10
- },
- scale: 0.5,
- attrs: {
- fill: stroke,
- stroke: stroke
- }
- });
- }
+ if (definitions) {
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_0__.remove)(definitions.get('rootElements'), category);
+ category.$parent = null;
+ }
- if (type === 'messageflow-start') {
- var messageflowStart = (0, _tinySvg.create)('circle');
- (0, _tinySvg.attr)(messageflowStart, {
- cx: 6,
- cy: 6,
- r: 3.5
- });
- addMarker(id, {
- element: messageflowStart,
- attrs: {
- fill: fill,
- stroke: stroke
- },
- ref: {
- x: 6,
- y: 6
- }
- });
- }
+ return category;
+}
- if (type === 'messageflow-end') {
- var messageflowEnd = (0, _tinySvg.create)('path');
- (0, _tinySvg.attr)(messageflowEnd, {
- d: 'm 1 5 l 0 -3 l 7 3 l -7 3 z'
- });
- addMarker(id, {
- element: messageflowEnd,
- attrs: {
- fill: fill,
- stroke: stroke,
- strokeLinecap: 'butt'
- },
- ref: {
- x: 8.5,
- y: 5
- }
- });
- }
+/***/ }),
- if (type === 'association-start') {
- var associationStart = (0, _tinySvg.create)('path');
- (0, _tinySvg.attr)(associationStart, {
- d: 'M 11 5 L 1 10 L 11 15'
- });
- addMarker(id, {
- element: associationStart,
- attrs: {
- fill: 'none',
- stroke: stroke,
- strokeWidth: 1.5
- },
- ref: {
- x: 1,
- y: 10
- },
- scale: 0.5
- });
- }
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/util/ConnectionLayoutUtil.js":
+/*!*******************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/util/ConnectionLayoutUtil.js ***!
+ \*******************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- if (type === 'association-end') {
- var associationEnd = (0, _tinySvg.create)('path');
- (0, _tinySvg.attr)(associationEnd, {
- d: 'M 1 5 L 11 10 L 1 15'
- });
- addMarker(id, {
- element: associationEnd,
- attrs: {
- fill: 'none',
- stroke: stroke,
- strokeWidth: 1.5
- },
- ref: {
- x: 12,
- y: 10
- },
- scale: 0.5
- });
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ getConnectionAdjustment: () => (/* binding */ getConnectionAdjustment)
+/* harmony export */ });
+/* harmony import */ var _LayoutUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./LayoutUtil */ "../node_modules/bpmn-js/lib/features/modeling/behavior/util/LayoutUtil.js");
- if (type === 'conditional-flow-marker') {
- var conditionalflowMarker = (0, _tinySvg.create)('path');
- (0, _tinySvg.attr)(conditionalflowMarker, {
- d: 'M 0 10 L 8 6 L 16 10 L 8 14 Z'
- });
- addMarker(id, {
- element: conditionalflowMarker,
- attrs: {
- fill: fill,
- stroke: stroke
- },
- ref: {
- x: -1,
- y: 10
- },
- scale: 0.5
- });
- }
- if (type === 'conditional-default-flow-marker') {
- var conditionaldefaultflowMarker = (0, _tinySvg.create)('path');
- (0, _tinySvg.attr)(conditionaldefaultflowMarker, {
- d: 'M 6 4 L 10 16'
- });
- addMarker(id, {
- element: conditionaldefaultflowMarker,
- attrs: {
- stroke: stroke
- },
- ref: {
- x: 0,
- y: 10
- },
- scale: 0.5
- });
- }
- }
+/**
+ * @typedef {import('diagram-js/lib/util/Types').Point} Point
+ *
+ * @typedef {import('./LayoutUtil').FindNewLineStartIndexHints} FindNewLineStartIndexHints
+ */
- function drawCircle(parentGfx, width, height, offset, attrs) {
- if ((0, _minDash.isObject)(offset)) {
- attrs = offset;
- offset = 0;
- }
+/**
+ * Calculate the new point after the connection waypoints got updated.
+ *
+ * @param {Point} position
+ * @param {Point[]} newWaypoints
+ * @param {Point[]} oldWaypoints
+ * @param {FindNewLineStartIndexHints} hints
+ *
+ * @return {Point}
+ */
+function getConnectionAdjustment(position, newWaypoints, oldWaypoints, hints) {
+ return (0,_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.getAnchorPointAdjustment)(position, newWaypoints, oldWaypoints, hints).point;
+}
- offset = offset || 0;
- attrs = computeStyle(attrs, {
- stroke: 'black',
- strokeWidth: 2,
- fill: 'white'
- });
- if (attrs.fill === 'none') {
- delete attrs.fillOpacity;
- }
- var cx = width / 2,
- cy = height / 2;
- var circle = (0, _tinySvg.create)('circle');
- (0, _tinySvg.attr)(circle, {
- cx: cx,
- cy: cy,
- r: Math.round((width + height) / 4 - offset)
- });
- (0, _tinySvg.attr)(circle, attrs);
- (0, _tinySvg.append)(parentGfx, circle);
- return circle;
- }
+/***/ }),
- function drawRect(parentGfx, width, height, r, offset, attrs) {
- if ((0, _minDash.isObject)(offset)) {
- attrs = offset;
- offset = 0;
- }
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/util/LabelLayoutUtil.js":
+/*!**************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/util/LabelLayoutUtil.js ***!
+ \**************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- offset = offset || 0;
- attrs = computeStyle(attrs, {
- stroke: 'black',
- strokeWidth: 2,
- fill: 'white'
- });
- var rect = (0, _tinySvg.create)('rect');
- (0, _tinySvg.attr)(rect, {
- x: offset,
- y: offset,
- width: width - offset * 2,
- height: height - offset * 2,
- rx: r,
- ry: r
- });
- (0, _tinySvg.attr)(rect, attrs);
- (0, _tinySvg.append)(parentGfx, rect);
- return rect;
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ findNewLabelLineStartIndex: () => (/* binding */ findNewLabelLineStartIndex),
+/* harmony export */ getLabelAdjustment: () => (/* binding */ getLabelAdjustment)
+/* harmony export */ });
+/* harmony import */ var _LayoutUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./LayoutUtil */ "../node_modules/bpmn-js/lib/features/modeling/behavior/util/LayoutUtil.js");
+/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
- function drawDiamond(parentGfx, width, height, attrs) {
- var x_2 = width / 2;
- var y_2 = height / 2;
- var points = [{
- x: x_2,
- y: 0
- }, {
- x: width,
- y: y_2
- }, {
- x: x_2,
- y: height
- }, {
- x: 0,
- y: y_2
- }];
- var pointsString = points.map(function (point) {
- return point.x + ',' + point.y;
- }).join(' ');
- attrs = computeStyle(attrs, {
- stroke: 'black',
- strokeWidth: 2,
- fill: 'white'
- });
- var polygon = (0, _tinySvg.create)('polygon');
- (0, _tinySvg.attr)(polygon, {
- points: pointsString
- });
- (0, _tinySvg.attr)(polygon, attrs);
- (0, _tinySvg.append)(parentGfx, polygon);
- return polygon;
- }
- function drawLine(parentGfx, waypoints, attrs) {
- attrs = computeStyle(attrs, ['no-fill'], {
- stroke: 'black',
- strokeWidth: 2,
- fill: 'none'
- });
- var line = (0, _RenderUtil.createLine)(waypoints, attrs);
- (0, _tinySvg.append)(parentGfx, line);
- return line;
- }
- function drawPath(parentGfx, d, attrs) {
- attrs = computeStyle(attrs, ['no-fill'], {
- strokeWidth: 2,
- stroke: 'black'
- });
- var path = (0, _tinySvg.create)('path');
- (0, _tinySvg.attr)(path, {
- d: d
- });
- (0, _tinySvg.attr)(path, attrs);
- (0, _tinySvg.append)(parentGfx, path);
- return path;
- }
- function drawMarker(type, parentGfx, path, attrs) {
- return drawPath(parentGfx, path, (0, _minDash.assign)({
- 'data-marker': type
- }, attrs));
- }
+/**
+ * @typedef {import('./LineAttachmentUtil').Attachment} Attachment
+ *
+ * @typedef {import('./LayoutUtil').FindNewLineStartIndexHints} FindNewLineStartIndexHints
+ *
+ * @typedef {import('../../../../model/Types').Label} Label
+ *
+ * @typedef {import('diagram-js/lib/util/Types').Point} Point
+ */
- function as(type) {
- return function (parentGfx, element) {
- return handlers[type](parentGfx, element);
- };
- }
+/**
+ * @param {Point[]} oldWaypoints
+ * @param {Point[]} newWaypoints
+ * @param {Attachment} attachment
+ * @param {FindNewLineStartIndexHints} hints
+ *
+ * @return {number}
+ */
+function findNewLabelLineStartIndex(oldWaypoints, newWaypoints, attachment, hints) {
+ return (0,_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.findNewLineStartIndex)(oldWaypoints, newWaypoints, attachment, hints);
+}
- function renderer(type) {
- return handlers[type];
- }
+/**
+ * Calculate the required adjustment (move delta) for the given label
+ * after the connection waypoints got updated.
+ *
+ * @param {Label} label
+ * @param {Point[]} newWaypoints
+ * @param {Point[]} oldWaypoints
+ * @param {FindNewLineStartIndexHints} hints
+ *
+ * @return {Point}
+ */
+function getLabelAdjustment(label, newWaypoints, oldWaypoints, hints) {
+ var labelPosition = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(label);
- function renderEventContent(element, parentGfx) {
- var event = (0, _BpmnRenderUtil.getSemantic)(element);
- var isThrowing = (0, _BpmnRenderUtil.isThrowEvent)(event);
+ return (0,_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.getAnchorPointAdjustment)(labelPosition, newWaypoints, oldWaypoints, hints).delta;
+}
- if (event.eventDefinitions && event.eventDefinitions.length > 1) {
- if (event.parallelMultiple) {
- return renderer('bpmn:ParallelMultipleEventDefinition')(parentGfx, element, isThrowing);
- } else {
- return renderer('bpmn:MultipleEventDefinition')(parentGfx, element, isThrowing);
- }
- }
+/***/ }),
- if ((0, _BpmnRenderUtil.isTypedEvent)(event, 'bpmn:MessageEventDefinition')) {
- return renderer('bpmn:MessageEventDefinition')(parentGfx, element, isThrowing);
- }
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/util/LayoutUtil.js":
+/*!*********************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/util/LayoutUtil.js ***!
+ \*********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- if ((0, _BpmnRenderUtil.isTypedEvent)(event, 'bpmn:TimerEventDefinition')) {
- return renderer('bpmn:TimerEventDefinition')(parentGfx, element, isThrowing);
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ findNewLineStartIndex: () => (/* binding */ findNewLineStartIndex),
+/* harmony export */ getAnchorPointAdjustment: () => (/* binding */ getAnchorPointAdjustment)
+/* harmony export */ });
+/* harmony import */ var _GeometricUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GeometricUtil */ "../node_modules/diagram-js/lib/features/bendpoints/GeometricUtil.js");
+/* harmony import */ var _LineAttachmentUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./LineAttachmentUtil */ "../node_modules/bpmn-js/lib/features/modeling/behavior/util/LineAttachmentUtil.js");
+/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
- if ((0, _BpmnRenderUtil.isTypedEvent)(event, 'bpmn:ConditionalEventDefinition')) {
- return renderer('bpmn:ConditionalEventDefinition')(parentGfx, element);
- }
- if ((0, _BpmnRenderUtil.isTypedEvent)(event, 'bpmn:SignalEventDefinition')) {
- return renderer('bpmn:SignalEventDefinition')(parentGfx, element, isThrowing);
- }
- if ((0, _BpmnRenderUtil.isTypedEvent)(event, 'bpmn:EscalationEventDefinition')) {
- return renderer('bpmn:EscalationEventDefinition')(parentGfx, element, isThrowing);
- }
- if ((0, _BpmnRenderUtil.isTypedEvent)(event, 'bpmn:LinkEventDefinition')) {
- return renderer('bpmn:LinkEventDefinition')(parentGfx, element, isThrowing);
- }
- if ((0, _BpmnRenderUtil.isTypedEvent)(event, 'bpmn:ErrorEventDefinition')) {
- return renderer('bpmn:ErrorEventDefinition')(parentGfx, element, isThrowing);
- }
- if ((0, _BpmnRenderUtil.isTypedEvent)(event, 'bpmn:CancelEventDefinition')) {
- return renderer('bpmn:CancelEventDefinition')(parentGfx, element, isThrowing);
- }
+/**
+ * @typedef {import('diagram-js/lib/util/Types').Point} Point
+ *
+ * @typedef {import('./LineAttachmentUtil').Attachment} Attachment
+ *
+ * @typedef { {
+ * point: Point;
+ * delta: Point;
+ * } } AnchorPointAdjustment
+ *
+ * @typedef { {
+ * segmentMove?: {
+* segmentStartIndex: number;
+* newSegmentStartIndex: number;
+* };
+* bendpointMove?: {
+* insert: boolean;
+* bendpointIndex: number;
+* };
+* connectionStart: boolean;
+* connectionEnd: boolean;
+* } } FindNewLineStartIndexHints
+ */
- if ((0, _BpmnRenderUtil.isTypedEvent)(event, 'bpmn:CompensateEventDefinition')) {
- return renderer('bpmn:CompensateEventDefinition')(parentGfx, element, isThrowing);
- }
+/**
+ * @param {Point[]} oldWaypoints
+ * @param {Point[]} newWaypoints
+ * @param {Attachment} attachment
+ * @param {FindNewLineStartIndexHints} hints
+ *
+ * @return {number}
+ */
+function findNewLineStartIndex(oldWaypoints, newWaypoints, attachment, hints) {
- if ((0, _BpmnRenderUtil.isTypedEvent)(event, 'bpmn:TerminateEventDefinition')) {
- return renderer('bpmn:TerminateEventDefinition')(parentGfx, element, isThrowing);
- }
+ var index = attachment.segmentIndex;
- return null;
- }
+ var offset = newWaypoints.length - oldWaypoints.length;
- function renderLabel(parentGfx, label, options) {
- options = (0, _minDash.assign)({
- size: {
- width: 100
- }
- }, options);
- var text = textRenderer.createText(label || '', options);
- (0, _tinySvg.classes)(text).add('djs-label');
- (0, _tinySvg.append)(parentGfx, text);
- return text;
- }
-
- function renderEmbeddedLabel(parentGfx, element, align) {
- var semantic = (0, _BpmnRenderUtil.getSemantic)(element);
- return renderLabel(parentGfx, semantic.name, {
- box: element,
- align: align,
- padding: 5,
- style: {
- fill: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- }
- });
- }
+ // segmentMove happened
+ if (hints.segmentMove) {
- function renderExternalLabel(parentGfx, element) {
- var box = {
- width: 90,
- height: 30,
- x: element.width / 2 + element.x,
- y: element.height / 2 + element.y
- };
- return renderLabel(parentGfx, (0, _LabelUtil.getLabel)(element), {
- box: box,
- fitBox: true,
- style: (0, _minDash.assign)({}, textRenderer.getExternalStyle(), {
- fill: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- })
- });
- }
+ var oldSegmentStartIndex = hints.segmentMove.segmentStartIndex,
+ newSegmentStartIndex = hints.segmentMove.newSegmentStartIndex;
- function renderLaneLabel(parentGfx, text, element) {
- var textBox = renderLabel(parentGfx, text, {
- box: {
- height: 30,
- width: element.height
- },
- align: 'center-middle',
- style: {
- fill: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- }
- });
- var top = -1 * element.height;
- (0, _SvgTransformUtil.transform)(textBox, 0, -top, 270);
- }
+ // if point was on moved segment return new segment index
+ if (index === oldSegmentStartIndex) {
+ return newSegmentStartIndex;
+ }
- function createPathFromConnection(connection) {
- var waypoints = connection.waypoints;
- var pathData = 'm ' + waypoints[0].x + ',' + waypoints[0].y;
+ // point is after new segment index
+ if (index >= newSegmentStartIndex) {
+ return (index + offset < newSegmentStartIndex) ? newSegmentStartIndex : index + offset;
+ }
- for (var i = 1; i < waypoints.length; i++) {
- pathData += 'L' + waypoints[i].x + ',' + waypoints[i].y + ' ';
- }
+ // if point is before new segment index
+ return index;
+ }
- return pathData;
- }
+ // bendpointMove happened
+ if (hints.bendpointMove) {
- var handlers = this.handlers = {
- 'bpmn:Event': function (parentGfx, element, attrs) {
- if (!('fillOpacity' in attrs)) {
- attrs.fillOpacity = DEFAULT_FILL_OPACITY;
- }
+ var insert = hints.bendpointMove.insert,
+ bendpointIndex = hints.bendpointMove.bendpointIndex,
+ newIndex;
- return drawCircle(parentGfx, element.width, element.height, attrs);
- },
- 'bpmn:StartEvent': function (parentGfx, element) {
- var attrs = {
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- };
- var semantic = (0, _BpmnRenderUtil.getSemantic)(element);
-
- if (!semantic.isInterrupting) {
- attrs = {
- strokeDasharray: '6',
- strokeLinecap: 'round',
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- };
- }
+ // waypoints length didnt change
+ if (offset === 0) {
+ return index;
+ }
- var circle = renderer('bpmn:Event')(parentGfx, element, attrs);
- renderEventContent(element, parentGfx);
- return circle;
- },
- 'bpmn:MessageEventDefinition': function (parentGfx, element, isThrowing) {
- var pathData = pathMap.getScaledPath('EVENT_MESSAGE', {
- xScaleFactor: 0.9,
- yScaleFactor: 0.9,
- containerWidth: element.width,
- containerHeight: element.height,
- position: {
- mx: 0.235,
- my: 0.315
- }
- });
- var fill = isThrowing ? (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor) : (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor);
- var stroke = isThrowing ? (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor) : (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor);
- var messagePath = drawPath(parentGfx, pathData, {
- strokeWidth: 1,
- fill: fill,
- stroke: stroke
- });
- return messagePath;
- },
- 'bpmn:TimerEventDefinition': function (parentGfx, element) {
- var circle = drawCircle(parentGfx, element.width, element.height, 0.2 * element.height, {
- strokeWidth: 2,
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- var pathData = pathMap.getScaledPath('EVENT_TIMER_WH', {
- xScaleFactor: 0.75,
- yScaleFactor: 0.75,
- containerWidth: element.width,
- containerHeight: element.height,
- position: {
- mx: 0.5,
- my: 0.5
- }
- });
- drawPath(parentGfx, pathData, {
- strokeWidth: 2,
- strokeLinecap: 'square',
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
+ // point behind new/removed bendpoint
+ if (index >= bendpointIndex) {
+ newIndex = insert ? index + 1 : index - 1;
+ }
- for (var i = 0; i < 12; i++) {
- var linePathData = pathMap.getScaledPath('EVENT_TIMER_LINE', {
- xScaleFactor: 0.75,
- yScaleFactor: 0.75,
- containerWidth: element.width,
- containerHeight: element.height,
- position: {
- mx: 0.5,
- my: 0.5
- }
- });
- var width = element.width / 2;
- var height = element.height / 2;
- drawPath(parentGfx, linePathData, {
- strokeWidth: 1,
- strokeLinecap: 'square',
- transform: 'rotate(' + i * 30 + ',' + height + ',' + width + ')',
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- }
+ // point before new/removed bendpoint
+ if (index < bendpointIndex) {
- return circle;
- },
- 'bpmn:EscalationEventDefinition': function (parentGfx, event, isThrowing) {
- var pathData = pathMap.getScaledPath('EVENT_ESCALATION', {
- xScaleFactor: 1,
- yScaleFactor: 1,
- containerWidth: event.width,
- containerHeight: event.height,
- position: {
- mx: 0.5,
- my: 0.2
- }
- });
- var fill = isThrowing ? (0, _BpmnRenderUtil.getStrokeColor)(event, defaultStrokeColor) : 'none';
- return drawPath(parentGfx, pathData, {
- strokeWidth: 1,
- fill: fill,
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(event, defaultStrokeColor)
- });
- },
- 'bpmn:ConditionalEventDefinition': function (parentGfx, event) {
- var pathData = pathMap.getScaledPath('EVENT_CONDITIONAL', {
- xScaleFactor: 1,
- yScaleFactor: 1,
- containerWidth: event.width,
- containerHeight: event.height,
- position: {
- mx: 0.5,
- my: 0.222
- }
- });
- return drawPath(parentGfx, pathData, {
- strokeWidth: 1,
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(event, defaultStrokeColor)
- });
- },
- 'bpmn:LinkEventDefinition': function (parentGfx, event, isThrowing) {
- var pathData = pathMap.getScaledPath('EVENT_LINK', {
- xScaleFactor: 1,
- yScaleFactor: 1,
- containerWidth: event.width,
- containerHeight: event.height,
- position: {
- mx: 0.57,
- my: 0.263
- }
- });
- var fill = isThrowing ? (0, _BpmnRenderUtil.getStrokeColor)(event, defaultStrokeColor) : 'none';
- return drawPath(parentGfx, pathData, {
- strokeWidth: 1,
- fill: fill,
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(event, defaultStrokeColor)
- });
- },
- 'bpmn:ErrorEventDefinition': function (parentGfx, event, isThrowing) {
- var pathData = pathMap.getScaledPath('EVENT_ERROR', {
- xScaleFactor: 1.1,
- yScaleFactor: 1.1,
- containerWidth: event.width,
- containerHeight: event.height,
- position: {
- mx: 0.2,
- my: 0.722
- }
- });
- var fill = isThrowing ? (0, _BpmnRenderUtil.getStrokeColor)(event, defaultStrokeColor) : 'none';
- return drawPath(parentGfx, pathData, {
- strokeWidth: 1,
- fill: fill,
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(event, defaultStrokeColor)
- });
- },
- 'bpmn:CancelEventDefinition': function (parentGfx, event, isThrowing) {
- var pathData = pathMap.getScaledPath('EVENT_CANCEL_45', {
- xScaleFactor: 1.0,
- yScaleFactor: 1.0,
- containerWidth: event.width,
- containerHeight: event.height,
- position: {
- mx: 0.638,
- my: -0.055
- }
- });
- var fill = isThrowing ? (0, _BpmnRenderUtil.getStrokeColor)(event, defaultStrokeColor) : 'none';
- var path = drawPath(parentGfx, pathData, {
- strokeWidth: 1,
- fill: fill,
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(event, defaultStrokeColor)
- });
- (0, _SvgTransformUtil.rotate)(path, 45);
- return path;
- },
- 'bpmn:CompensateEventDefinition': function (parentGfx, event, isThrowing) {
- var pathData = pathMap.getScaledPath('EVENT_COMPENSATION', {
- xScaleFactor: 1,
- yScaleFactor: 1,
- containerWidth: event.width,
- containerHeight: event.height,
- position: {
- mx: 0.22,
- my: 0.5
- }
- });
- var fill = isThrowing ? (0, _BpmnRenderUtil.getStrokeColor)(event, defaultStrokeColor) : 'none';
- return drawPath(parentGfx, pathData, {
- strokeWidth: 1,
- fill: fill,
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(event, defaultStrokeColor)
- });
- },
- 'bpmn:SignalEventDefinition': function (parentGfx, event, isThrowing) {
- var pathData = pathMap.getScaledPath('EVENT_SIGNAL', {
- xScaleFactor: 0.9,
- yScaleFactor: 0.9,
- containerWidth: event.width,
- containerHeight: event.height,
- position: {
- mx: 0.5,
- my: 0.2
- }
- });
- var fill = isThrowing ? (0, _BpmnRenderUtil.getStrokeColor)(event, defaultStrokeColor) : 'none';
- return drawPath(parentGfx, pathData, {
- strokeWidth: 1,
- fill: fill,
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(event, defaultStrokeColor)
- });
- },
- 'bpmn:MultipleEventDefinition': function (parentGfx, event, isThrowing) {
- var pathData = pathMap.getScaledPath('EVENT_MULTIPLE', {
- xScaleFactor: 1.1,
- yScaleFactor: 1.1,
- containerWidth: event.width,
- containerHeight: event.height,
- position: {
- mx: 0.222,
- my: 0.36
- }
- });
- var fill = isThrowing ? (0, _BpmnRenderUtil.getStrokeColor)(event, defaultStrokeColor) : 'none';
- return drawPath(parentGfx, pathData, {
- strokeWidth: 1,
- fill: fill
- });
- },
- 'bpmn:ParallelMultipleEventDefinition': function (parentGfx, event) {
- var pathData = pathMap.getScaledPath('EVENT_PARALLEL_MULTIPLE', {
- xScaleFactor: 1.2,
- yScaleFactor: 1.2,
- containerWidth: event.width,
- containerHeight: event.height,
- position: {
- mx: 0.458,
- my: 0.194
- }
- });
- return drawPath(parentGfx, pathData, {
- strokeWidth: 1,
- fill: (0, _BpmnRenderUtil.getStrokeColor)(event, defaultStrokeColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(event, defaultStrokeColor)
- });
- },
- 'bpmn:EndEvent': function (parentGfx, element) {
- var circle = renderer('bpmn:Event')(parentGfx, element, {
- strokeWidth: 4,
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- renderEventContent(element, parentGfx, true);
- return circle;
- },
- 'bpmn:TerminateEventDefinition': function (parentGfx, element) {
- var circle = drawCircle(parentGfx, element.width, element.height, 8, {
- strokeWidth: 4,
- fill: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- return circle;
- },
- 'bpmn:IntermediateEvent': function (parentGfx, element) {
- var outer = renderer('bpmn:Event')(parentGfx, element, {
- strokeWidth: 1,
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- /* inner */
+ newIndex = index;
- drawCircle(parentGfx, element.width, element.height, INNER_OUTER_DIST, {
- strokeWidth: 1,
- fill: (0, _BpmnRenderUtil.getFillColor)(element, 'none'),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- renderEventContent(element, parentGfx);
- return outer;
- },
- 'bpmn:IntermediateCatchEvent': as('bpmn:IntermediateEvent'),
- 'bpmn:IntermediateThrowEvent': as('bpmn:IntermediateEvent'),
- 'bpmn:Activity': function (parentGfx, element, attrs) {
- attrs = attrs || {};
+ // decide point should take right or left segment
+ if (insert && attachment.type !== 'bendpoint' && bendpointIndex - 1 === index) {
- if (!('fillOpacity' in attrs)) {
- attrs.fillOpacity = DEFAULT_FILL_OPACITY;
- }
+ var rel = relativePositionMidWaypoint(newWaypoints, bendpointIndex);
- return drawRect(parentGfx, element.width, element.height, TASK_BORDER_RADIUS, attrs);
- },
- 'bpmn:Task': function (parentGfx, element) {
- var attrs = {
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- };
- var rect = renderer('bpmn:Activity')(parentGfx, element, attrs);
- renderEmbeddedLabel(parentGfx, element, 'center-middle');
- attachTaskMarkers(parentGfx, element);
- return rect;
- },
- 'bpmn:ServiceTask': function (parentGfx, element) {
- var task = renderer('bpmn:Task')(parentGfx, element);
- var pathDataBG = pathMap.getScaledPath('TASK_TYPE_SERVICE', {
- abspos: {
- x: 12,
- y: 18
- }
- });
- /* service bg */
+ if (rel < attachment.relativeLocation) {
+ newIndex++;
+ }
+ }
+ }
- drawPath(parentGfx, pathDataBG, {
- strokeWidth: 1,
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- var fillPathData = pathMap.getScaledPath('TASK_TYPE_SERVICE_FILL', {
- abspos: {
- x: 17.2,
- y: 18
- }
- });
- /* service fill */
+ return newIndex;
+ }
- drawPath(parentGfx, fillPathData, {
- strokeWidth: 0,
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor)
- });
- var pathData = pathMap.getScaledPath('TASK_TYPE_SERVICE', {
- abspos: {
- x: 17,
- y: 22
- }
- });
- /* service */
+ // start/end changed
+ if (offset === 0) {
+ return index;
+ }
- drawPath(parentGfx, pathData, {
- strokeWidth: 1,
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- return task;
- },
- 'bpmn:UserTask': function (parentGfx, element) {
- var task = renderer('bpmn:Task')(parentGfx, element);
- var x = 15;
- var y = 12;
- var pathData = pathMap.getScaledPath('TASK_TYPE_USER_1', {
- abspos: {
- x: x,
- y: y
- }
- });
- /* user path */
+ if (hints.connectionStart && index === 0) {
+ return 0;
+ }
- drawPath(parentGfx, pathData, {
- strokeWidth: 0.5,
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- var pathData2 = pathMap.getScaledPath('TASK_TYPE_USER_2', {
- abspos: {
- x: x,
- y: y
- }
- });
- /* user2 path */
+ if (hints.connectionEnd && index === oldWaypoints.length - 2) {
+ return newWaypoints.length - 2;
+ }
- drawPath(parentGfx, pathData2, {
- strokeWidth: 0.5,
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- var pathData3 = pathMap.getScaledPath('TASK_TYPE_USER_3', {
- abspos: {
- x: x,
- y: y
- }
- });
- /* user3 path */
+ // if nothing fits, take the middle segment
+ return Math.floor((newWaypoints.length - 2) / 2);
+}
- drawPath(parentGfx, pathData3, {
- strokeWidth: 0.5,
- fill: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- return task;
- },
- 'bpmn:ManualTask': function (parentGfx, element) {
- var task = renderer('bpmn:Task')(parentGfx, element);
- var pathData = pathMap.getScaledPath('TASK_TYPE_MANUAL', {
- abspos: {
- x: 17,
- y: 15
- }
- });
- /* manual path */
- drawPath(parentGfx, pathData, {
- strokeWidth: 0.5,
- // 0.25,
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- return task;
- },
- 'bpmn:SendTask': function (parentGfx, element) {
- var task = renderer('bpmn:Task')(parentGfx, element);
- var pathData = pathMap.getScaledPath('TASK_TYPE_SEND', {
- xScaleFactor: 1,
- yScaleFactor: 1,
- containerWidth: 21,
- containerHeight: 14,
- position: {
- mx: 0.285,
- my: 0.357
- }
- });
- /* send path */
+/**
+ * Calculate the required adjustment (move delta) for the given point
+ * after the connection waypoints got updated.
+ *
+ * @param {Point} position
+ * @param {Point[]} newWaypoints
+ * @param {Point[]} oldWaypoints
+ * @param {FindNewLineStartIndexHints} hints
+ *
+ * @return {AnchorPointAdjustment} result
+ */
+function getAnchorPointAdjustment(position, newWaypoints, oldWaypoints, hints) {
- drawPath(parentGfx, pathData, {
- strokeWidth: 1,
- fill: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor),
- stroke: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor)
- });
- return task;
- },
- 'bpmn:ReceiveTask': function (parentGfx, element) {
- var semantic = (0, _BpmnRenderUtil.getSemantic)(element);
- var task = renderer('bpmn:Task')(parentGfx, element);
- var pathData;
-
- if (semantic.instantiate) {
- drawCircle(parentGfx, 28, 28, 20 * 0.22, {
- strokeWidth: 1
- });
- pathData = pathMap.getScaledPath('TASK_TYPE_INSTANTIATING_SEND', {
- abspos: {
- x: 7.77,
- y: 9.52
- }
- });
- } else {
- pathData = pathMap.getScaledPath('TASK_TYPE_SEND', {
- xScaleFactor: 0.9,
- yScaleFactor: 0.9,
- containerWidth: 21,
- containerHeight: 14,
- position: {
- mx: 0.3,
- my: 0.4
- }
- });
- }
- /* receive path */
+ var dx = 0,
+ dy = 0;
+ var oldPosition = {
+ point: position,
+ delta: { x: 0, y: 0 }
+ };
+
+ // get closest attachment
+ var attachment = (0,_LineAttachmentUtil__WEBPACK_IMPORTED_MODULE_0__.getAttachment)(position, oldWaypoints),
+ oldLabelLineIndex = attachment.segmentIndex,
+ newLabelLineIndex = findNewLineStartIndex(oldWaypoints, newWaypoints, attachment, hints);
- drawPath(parentGfx, pathData, {
- strokeWidth: 1,
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- return task;
- },
- 'bpmn:ScriptTask': function (parentGfx, element) {
- var task = renderer('bpmn:Task')(parentGfx, element);
- var pathData = pathMap.getScaledPath('TASK_TYPE_SCRIPT', {
- abspos: {
- x: 15,
- y: 20
- }
- });
- /* script path */
- drawPath(parentGfx, pathData, {
- strokeWidth: 1,
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- return task;
- },
- 'bpmn:BusinessRuleTask': function (parentGfx, element) {
- var task = renderer('bpmn:Task')(parentGfx, element);
- var headerPathData = pathMap.getScaledPath('TASK_TYPE_BUSINESS_RULE_HEADER', {
- abspos: {
- x: 8,
- y: 8
- }
- });
- var businessHeaderPath = drawPath(parentGfx, headerPathData);
- (0, _tinySvg.attr)(businessHeaderPath, {
- strokeWidth: 1,
- fill: (0, _BpmnRenderUtil.getFillColor)(element, '#aaaaaa'),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- var headerData = pathMap.getScaledPath('TASK_TYPE_BUSINESS_RULE_MAIN', {
- abspos: {
- x: 8,
- y: 8
- }
- });
- var businessPath = drawPath(parentGfx, headerData);
- (0, _tinySvg.attr)(businessPath, {
- strokeWidth: 1,
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- return task;
- },
- 'bpmn:SubProcess': function (parentGfx, element, attrs) {
- attrs = (0, _minDash.assign)({
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- }, attrs);
- var rect = renderer('bpmn:Activity')(parentGfx, element, attrs);
- var expanded = (0, _DiUtil.isExpanded)(element);
-
- if ((0, _DiUtil.isEventSubProcess)(element)) {
- (0, _tinySvg.attr)(rect, {
- strokeDasharray: '1,2'
- });
- }
+ // should never happen
+ // TODO(@janstuemmel): throw an error here when connectionSegmentMove is refactored
+ if (newLabelLineIndex < 0 ||
+ newLabelLineIndex > newWaypoints.length - 2 ||
+ newLabelLineIndex === null) {
+ return oldPosition;
+ }
+
+ var oldLabelLine = getLine(oldWaypoints, oldLabelLineIndex),
+ newLabelLine = getLine(newWaypoints, newLabelLineIndex),
+ oldFoot = attachment.position;
- renderEmbeddedLabel(parentGfx, element, expanded ? 'center-top' : 'center-middle');
+ var relativeFootPosition = getRelativeFootPosition(oldLabelLine, oldFoot),
+ angleDelta = getAngleDelta(oldLabelLine, newLabelLine);
- if (expanded) {
- attachTaskMarkers(parentGfx, element);
- } else {
- attachTaskMarkers(parentGfx, element, ['SubProcessMarker']);
- }
+ // special rule if label on bendpoint
+ if (attachment.type === 'bendpoint') {
- return rect;
- },
- 'bpmn:AdHocSubProcess': function (parentGfx, element) {
- return renderer('bpmn:SubProcess')(parentGfx, element);
- },
- 'bpmn:Transaction': function (parentGfx, element) {
- var outer = renderer('bpmn:SubProcess')(parentGfx, element);
- var innerAttrs = styles.style(['no-fill', 'no-events'], {
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- /* inner path */
+ var offset = newWaypoints.length - oldWaypoints.length,
+ oldBendpointIndex = attachment.bendpointIndex,
+ oldBendpoint = oldWaypoints[oldBendpointIndex];
- drawRect(parentGfx, element.width, element.height, TASK_BORDER_RADIUS - 2, INNER_OUTER_DIST, innerAttrs);
- return outer;
- },
- 'bpmn:CallActivity': function (parentGfx, element) {
- return renderer('bpmn:SubProcess')(parentGfx, element, {
- strokeWidth: 5
- });
- },
- 'bpmn:Participant': function (parentGfx, element) {
- var attrs = {
- fillOpacity: DEFAULT_FILL_OPACITY,
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- };
- var lane = renderer('bpmn:Lane')(parentGfx, element, attrs);
- var expandedPool = (0, _DiUtil.isExpanded)(element);
-
- if (expandedPool) {
- drawLine(parentGfx, [{
- x: 30,
- y: 0
- }, {
- x: 30,
- y: element.height
- }], {
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- var text = (0, _BpmnRenderUtil.getSemantic)(element).name;
- renderLaneLabel(parentGfx, text, element);
- } else {
- // Collapsed pool draw text inline
- var text2 = (0, _BpmnRenderUtil.getSemantic)(element).name;
- renderLabel(parentGfx, text2, {
- box: element,
- align: 'center-middle',
- style: {
- fill: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- }
- });
- }
+ // bendpoint position hasn't changed, return same position
+ if (newWaypoints.indexOf(oldBendpoint) !== -1) {
+ return oldPosition;
+ }
- var participantMultiplicity = !!(0, _BpmnRenderUtil.getSemantic)(element).participantMultiplicity;
+ // new bendpoint and old bendpoint have same index, then just return the offset
+ if (offset === 0) {
+ var newBendpoint = newWaypoints[oldBendpointIndex];
- if (participantMultiplicity) {
- renderer('ParticipantMultiplicityMarker')(parentGfx, element);
- }
+ dx = newBendpoint.x - attachment.position.x,
+ dy = newBendpoint.y - attachment.position.y;
- return lane;
- },
- 'bpmn:Lane': function (parentGfx, element, attrs) {
- var rect = drawRect(parentGfx, element.width, element.height, 0, (0, _minDash.assign)({
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- fillOpacity: HIGH_FILL_OPACITY,
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- }, attrs));
- var semantic = (0, _BpmnRenderUtil.getSemantic)(element);
-
- if (semantic.$type === 'bpmn:Lane') {
- var text = semantic.name;
- renderLaneLabel(parentGfx, text, element);
- }
+ return {
+ delta: {
+ x: dx,
+ y: dy
+ },
+ point: {
+ x: position.x + dx,
+ y: position.y + dy
+ }
+ };
+ }
- return rect;
- },
- 'bpmn:InclusiveGateway': function (parentGfx, element) {
- var diamond = renderer('bpmn:Gateway')(parentGfx, element);
- /* circle path */
-
- drawCircle(parentGfx, element.width, element.height, element.height * 0.24, {
- strokeWidth: 2.5,
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- return diamond;
- },
- 'bpmn:ExclusiveGateway': function (parentGfx, element) {
- var diamond = renderer('bpmn:Gateway')(parentGfx, element);
- var pathData = pathMap.getScaledPath('GATEWAY_EXCLUSIVE', {
- xScaleFactor: 0.4,
- yScaleFactor: 0.4,
- containerWidth: element.width,
- containerHeight: element.height,
- position: {
- mx: 0.32,
- my: 0.3
- }
- });
+ // if bendpoints get removed
+ if (offset < 0 && oldBendpointIndex !== 0 && oldBendpointIndex < oldWaypoints.length - 1) {
+ relativeFootPosition = relativePositionMidWaypoint(oldWaypoints, oldBendpointIndex);
+ }
+ }
- if ((0, _BpmnRenderUtil.getDi)(element).isMarkerVisible) {
- drawPath(parentGfx, pathData, {
- strokeWidth: 1,
- fill: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- }
+ var newFoot = {
+ x: (newLabelLine[1].x - newLabelLine[0].x) * relativeFootPosition + newLabelLine[0].x,
+ y: (newLabelLine[1].y - newLabelLine[0].y) * relativeFootPosition + newLabelLine[0].y
+ };
- return diamond;
- },
- 'bpmn:ComplexGateway': function (parentGfx, element) {
- var diamond = renderer('bpmn:Gateway')(parentGfx, element);
- var pathData = pathMap.getScaledPath('GATEWAY_COMPLEX', {
- xScaleFactor: 0.5,
- yScaleFactor: 0.5,
- containerWidth: element.width,
- containerHeight: element.height,
- position: {
- mx: 0.46,
- my: 0.26
- }
- });
- /* complex path */
+ // the rotated vector to label
+ var newLabelVector = (0,_GeometricUtil__WEBPACK_IMPORTED_MODULE_1__.rotateVector)({
+ x: position.x - oldFoot.x,
+ y: position.y - oldFoot.y
+ }, angleDelta);
- drawPath(parentGfx, pathData, {
- strokeWidth: 1,
- fill: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- return diamond;
- },
- 'bpmn:ParallelGateway': function (parentGfx, element) {
- var diamond = renderer('bpmn:Gateway')(parentGfx, element);
- var pathData = pathMap.getScaledPath('GATEWAY_PARALLEL', {
- xScaleFactor: 0.6,
- yScaleFactor: 0.6,
- containerWidth: element.width,
- containerHeight: element.height,
- position: {
- mx: 0.46,
- my: 0.2
- }
- });
- /* parallel path */
+ // the new relative position
+ dx = newFoot.x + newLabelVector.x - position.x;
+ dy = newFoot.y + newLabelVector.y - position.y;
- drawPath(parentGfx, pathData, {
- strokeWidth: 1,
- fill: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- return diamond;
- },
- 'bpmn:EventBasedGateway': function (parentGfx, element) {
- var semantic = (0, _BpmnRenderUtil.getSemantic)(element);
- var diamond = renderer('bpmn:Gateway')(parentGfx, element);
- /* outer circle path */
-
- drawCircle(parentGfx, element.width, element.height, element.height * 0.20, {
- strokeWidth: 1,
- fill: 'none',
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- var type = semantic.eventGatewayType;
- var instantiate = !!semantic.instantiate;
-
- function drawEvent() {
- var pathData = pathMap.getScaledPath('GATEWAY_EVENT_BASED', {
- xScaleFactor: 0.18,
- yScaleFactor: 0.18,
- containerWidth: element.width,
- containerHeight: element.height,
- position: {
- mx: 0.36,
- my: 0.44
- }
- });
- var attrs = {
- strokeWidth: 2,
- fill: (0, _BpmnRenderUtil.getFillColor)(element, 'none'),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- };
- /* event path */
+ return {
+ point: (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_2__.roundPoint)(newFoot),
+ delta: (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_2__.roundPoint)({
+ x: dx,
+ y: dy
+ })
+ };
+}
- drawPath(parentGfx, pathData, attrs);
- }
- if (type === 'Parallel') {
- var pathData = pathMap.getScaledPath('GATEWAY_PARALLEL', {
- xScaleFactor: 0.4,
- yScaleFactor: 0.4,
- containerWidth: element.width,
- containerHeight: element.height,
- position: {
- mx: 0.474,
- my: 0.296
- }
- });
- var parallelPath = drawPath(parentGfx, pathData);
- (0, _tinySvg.attr)(parallelPath, {
- strokeWidth: 1,
- fill: 'none'
- });
- } else if (type === 'Exclusive') {
- if (!instantiate) {
- var innerCircle = drawCircle(parentGfx, element.width, element.height, element.height * 0.26);
- (0, _tinySvg.attr)(innerCircle, {
- strokeWidth: 1,
- fill: 'none',
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- }
+// HELPERS //////////////////////
- drawEvent();
- }
+function relativePositionMidWaypoint(waypoints, idx) {
- return diamond;
- },
- 'bpmn:Gateway': function (parentGfx, element) {
- var attrs = {
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- fillOpacity: DEFAULT_FILL_OPACITY,
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- };
- return drawDiamond(parentGfx, element.width, element.height, attrs);
- },
- 'bpmn:SequenceFlow': function (parentGfx, element) {
- var pathData = createPathFromConnection(element);
- var fill = (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke = (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor);
- var attrs = {
- strokeLinejoin: 'round',
- markerEnd: marker('sequenceflow-end', fill, stroke),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- };
- var path = drawPath(parentGfx, pathData, attrs);
- var sequenceFlow = (0, _BpmnRenderUtil.getSemantic)(element);
- var source;
-
- if (element.source) {
- source = element.source.businessObject; // conditional flow marker
-
- if (sequenceFlow.conditionExpression && source.$instanceOf('bpmn:Activity')) {
- (0, _tinySvg.attr)(path, {
- markerStart: marker('conditional-flow-marker', fill, stroke)
- });
- } // default marker
+ var distanceSegment1 = (0,_GeometricUtil__WEBPACK_IMPORTED_MODULE_1__.getDistancePointPoint)(waypoints[idx - 1], waypoints[idx]),
+ distanceSegment2 = (0,_GeometricUtil__WEBPACK_IMPORTED_MODULE_1__.getDistancePointPoint)(waypoints[idx], waypoints[idx + 1]);
+ var relativePosition = distanceSegment1 / (distanceSegment1 + distanceSegment2);
- if (source.default && (source.$instanceOf('bpmn:Gateway') || source.$instanceOf('bpmn:Activity')) && source.default === sequenceFlow) {
- (0, _tinySvg.attr)(path, {
- markerStart: marker('conditional-default-flow-marker', fill, stroke)
- });
- }
- }
+ return relativePosition;
+}
- return path;
- },
- 'bpmn:Association': function (parentGfx, element, attrs) {
- var semantic = (0, _BpmnRenderUtil.getSemantic)(element);
- var fill = (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke = (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor);
- attrs = (0, _minDash.assign)({
- strokeDasharray: '0.5, 5',
- strokeLinecap: 'round',
- strokeLinejoin: 'round',
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- }, attrs || {});
-
- if (semantic.associationDirection === 'One' || semantic.associationDirection === 'Both') {
- attrs.markerEnd = marker('association-end', fill, stroke);
- }
+function getAngleDelta(l1, l2) {
+ var a1 = (0,_GeometricUtil__WEBPACK_IMPORTED_MODULE_1__.getAngle)(l1),
+ a2 = (0,_GeometricUtil__WEBPACK_IMPORTED_MODULE_1__.getAngle)(l2);
+ return a2 - a1;
+}
+
+function getLine(waypoints, idx) {
+ return [ waypoints[idx], waypoints[idx + 1] ];
+}
- if (semantic.associationDirection === 'Both') {
- attrs.markerStart = marker('association-start', fill, stroke);
- }
+function getRelativeFootPosition(line, foot) {
+
+ var length = (0,_GeometricUtil__WEBPACK_IMPORTED_MODULE_1__.getDistancePointPoint)(line[0], line[1]),
+ lengthToFoot = (0,_GeometricUtil__WEBPACK_IMPORTED_MODULE_1__.getDistancePointPoint)(line[0], foot);
+
+ return length === 0 ? 0 : lengthToFoot / length;
+}
- return drawLine(parentGfx, element.waypoints, attrs);
- },
- 'bpmn:DataInputAssociation': function (parentGfx, element) {
- var fill = (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke = (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor);
- return renderer('bpmn:Association')(parentGfx, element, {
- markerEnd: marker('association-end', fill, stroke)
- });
- },
- 'bpmn:DataOutputAssociation': function (parentGfx, element) {
- var fill = (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke = (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor);
- return renderer('bpmn:Association')(parentGfx, element, {
- markerEnd: marker('association-end', fill, stroke)
- });
- },
- 'bpmn:MessageFlow': function (parentGfx, element) {
- var semantic = (0, _BpmnRenderUtil.getSemantic)(element),
- di = (0, _BpmnRenderUtil.getDi)(element);
- var fill = (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke = (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor);
- var pathData = createPathFromConnection(element);
- var attrs = {
- markerEnd: marker('messageflow-end', fill, stroke),
- markerStart: marker('messageflow-start', fill, stroke),
- strokeDasharray: '10, 12',
- strokeLinecap: 'round',
- strokeLinejoin: 'round',
- strokeWidth: '1.5px',
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- };
- var path = drawPath(parentGfx, pathData, attrs);
-
- if (semantic.messageRef) {
- var midPoint = path.getPointAtLength(path.getTotalLength() / 2);
- var markerPathData = pathMap.getScaledPath('MESSAGE_FLOW_MARKER', {
- abspos: {
- x: midPoint.x,
- y: midPoint.y
- }
- });
- var messageAttrs = {
- strokeWidth: 1
- };
- if (di.messageVisibleKind === 'initiating') {
- messageAttrs.fill = 'white';
- messageAttrs.stroke = 'black';
- } else {
- messageAttrs.fill = '#888';
- messageAttrs.stroke = 'white';
- }
+/***/ }),
- drawPath(parentGfx, markerPathData, messageAttrs);
- }
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/util/LineAttachmentUtil.js":
+/*!*****************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/util/LineAttachmentUtil.js ***!
+ \*****************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ getAttachment: () => (/* binding */ getAttachment)
+/* harmony export */ });
+/**
+ * @typedef {import('diagram-js/lib/util/Types').Point} Point
+ *
+ * @typedef { {
+* type: 'bendpoint' | 'segment';
+* position: Point;
+* segmentIndex: number;
+* bendpointIndex?: number;
+* relativeLocation?: number;
+* } } Attachment
+*/
+
+var sqrt = Math.sqrt,
+ min = Math.min,
+ max = Math.max,
+ abs = Math.abs;
+
+/**
+ * Calculate the square (power to two) of a number.
+ *
+ * @param {number} n
+ *
+ * @return {number}
+ */
+function sq(n) {
+ return Math.pow(n, 2);
+}
- return path;
- },
- 'bpmn:DataObject': function (parentGfx, element) {
- var pathData = pathMap.getScaledPath('DATA_OBJECT_PATH', {
- xScaleFactor: 1,
- yScaleFactor: 1,
- containerWidth: element.width,
- containerHeight: element.height,
- position: {
- mx: 0.474,
- my: 0.296
- }
- });
- var elementObject = drawPath(parentGfx, pathData, {
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- fillOpacity: DEFAULT_FILL_OPACITY,
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- var semantic = (0, _BpmnRenderUtil.getSemantic)(element);
+/**
+ * Get distance between two points.
+ *
+ * @param {Point} p1
+ * @param {Point} p2
+ *
+ * @return {number}
+ */
+function getDistance(p1, p2) {
+ return sqrt(sq(p1.x - p2.x) + sq(p1.y - p2.y));
+}
- if ((0, _BpmnRenderUtil.isCollection)(semantic)) {
- renderDataItemCollection(parentGfx, element);
- }
+/**
+ * Return the attachment of the given point on the specified line.
+ *
+ * The attachment is either a bendpoint (attached to the given point)
+ * or segment (attached to a location on a line segment) attachment:
+ *
+ * ```javascript
+ * var pointAttachment = {
+ * type: 'bendpoint',
+ * bendpointIndex: 3,
+ * position: { x: 10, y: 10 } // the attach point on the line
+ * };
+ *
+ * var segmentAttachment = {
+ * type: 'segment',
+ * segmentIndex: 2,
+ * relativeLocation: 0.31, // attach point location between 0 (at start) and 1 (at end)
+ * position: { x: 10, y: 10 } // the attach point on the line
+ * };
+ * ```
+ *
+ * @param {Point} point
+ * @param {Point[]} line
+ *
+ * @return {Attachment}
+ */
+function getAttachment(point, line) {
+
+ var idx = 0,
+ segmentStart,
+ segmentEnd,
+ segmentStartDistance,
+ segmentEndDistance,
+ attachmentPosition,
+ minDistance,
+ intersections,
+ attachment,
+ attachmentDistance,
+ closestAttachmentDistance,
+ closestAttachment;
+
+ for (idx = 0; idx < line.length - 1; idx++) {
+
+ segmentStart = line[idx];
+ segmentEnd = line[idx + 1];
+
+ if (pointsEqual(segmentStart, segmentEnd)) {
+ intersections = [ segmentStart ];
+ } else {
+ segmentStartDistance = getDistance(point, segmentStart);
+ segmentEndDistance = getDistance(point, segmentEnd);
+
+ minDistance = min(segmentStartDistance, segmentEndDistance);
+
+ intersections = getCircleSegmentIntersections(segmentStart, segmentEnd, point, minDistance);
+ }
+
+ if (intersections.length < 1) {
+ throw new Error('expected between [1, 2] circle -> line intersections');
+ }
+
+ // one intersection -> bendpoint attachment
+ if (intersections.length === 1) {
+ attachment = {
+ type: 'bendpoint',
+ position: intersections[0],
+ segmentIndex: idx,
+ bendpointIndex: pointsEqual(segmentStart, intersections[0]) ? idx : idx + 1
+ };
+ }
+
+ // two intersections -> segment attachment
+ if (intersections.length === 2) {
+
+ attachmentPosition = mid(intersections[0], intersections[1]);
+
+ attachment = {
+ type: 'segment',
+ position: attachmentPosition,
+ segmentIndex: idx,
+ relativeLocation: getDistance(segmentStart, attachmentPosition) / getDistance(segmentStart, segmentEnd)
+ };
+ }
+
+ attachmentDistance = getDistance(attachment.position, point);
+
+ if (!closestAttachment || closestAttachmentDistance > attachmentDistance) {
+ closestAttachment = attachment;
+ closestAttachmentDistance = attachmentDistance;
+ }
+ }
+
+ return closestAttachment;
+}
+
+/**
+ * Get the intersection between a circle and a line segment.
+ *
+ * @param {Point} s1 segment start
+ * @param {Point} s2 segment end
+ * @param {Point} cc circle center
+ * @param {number} cr circle radius
+ *
+ * @return {Point[]} intersections
+ */
+function getCircleSegmentIntersections(s1, s2, cc, cr) {
+
+ var baX = s2.x - s1.x;
+ var baY = s2.y - s1.y;
+ var caX = cc.x - s1.x;
+ var caY = cc.y - s1.y;
+
+ var a = baX * baX + baY * baY;
+ var bBy2 = baX * caX + baY * caY;
+ var c = caX * caX + caY * caY - cr * cr;
+
+ var pBy2 = bBy2 / a;
+ var q = c / a;
+
+ var disc = pBy2 * pBy2 - q;
+
+ // check against negative value to work around
+ // negative, very close to zero results (-4e-15)
+ // being produced in some environments
+ if (disc < 0 && disc > -0.000001) {
+ disc = 0;
+ }
+
+ if (disc < 0) {
+ return [];
+ }
+
+ // if disc == 0 ... dealt with later
+ var tmpSqrt = sqrt(disc);
+ var abScalingFactor1 = -pBy2 + tmpSqrt;
+ var abScalingFactor2 = -pBy2 - tmpSqrt;
+
+ var i1 = {
+ x: s1.x - baX * abScalingFactor1,
+ y: s1.y - baY * abScalingFactor1
+ };
+
+ if (disc === 0) { // abScalingFactor1 == abScalingFactor2
+ return [ i1 ];
+ }
+
+ var i2 = {
+ x: s1.x - baX * abScalingFactor2,
+ y: s1.y - baY * abScalingFactor2
+ };
+
+ // return only points on line segment
+ return [ i1, i2 ].filter(function(p) {
+ return isPointInSegment(p, s1, s2);
+ });
+}
+
+
+function isPointInSegment(p, segmentStart, segmentEnd) {
+ return (
+ fenced(p.x, segmentStart.x, segmentEnd.x) &&
+ fenced(p.y, segmentStart.y, segmentEnd.y)
+ );
+}
+
+function fenced(n, rangeStart, rangeEnd) {
+
+ // use matching threshold to work around
+ // precision errors in intersection computation
+
+ return (
+ n >= min(rangeStart, rangeEnd) - EQUAL_THRESHOLD &&
+ n <= max(rangeStart, rangeEnd) + EQUAL_THRESHOLD
+ );
+}
+
+/**
+ * Calculate the mid between two points.
+ *
+ * @param {Point} p1
+ * @param {Point} p2
+ *
+ * @return {Point}
+ */
+function mid(p1, p2) {
- return elementObject;
- },
- 'bpmn:DataObjectReference': as('bpmn:DataObject'),
- 'bpmn:DataInput': function (parentGfx, element) {
- var arrowPathData = pathMap.getRawPath('DATA_ARROW'); // page
+ return {
+ x: (p1.x + p2.x) / 2,
+ y: (p1.y + p2.y) / 2
+ };
+}
- var elementObject = renderer('bpmn:DataObject')(parentGfx, element);
- /* input arrow path */
+var EQUAL_THRESHOLD = 0.1;
- drawPath(parentGfx, arrowPathData, {
- strokeWidth: 1
- });
- return elementObject;
- },
- 'bpmn:DataOutput': function (parentGfx, element) {
- var arrowPathData = pathMap.getRawPath('DATA_ARROW'); // page
+function pointsEqual(p1, p2) {
- var elementObject = renderer('bpmn:DataObject')(parentGfx, element);
- /* output arrow path */
+ return (
+ abs(p1.x - p2.x) <= EQUAL_THRESHOLD &&
+ abs(p1.y - p2.y) <= EQUAL_THRESHOLD
+ );
+}
- drawPath(parentGfx, arrowPathData, {
- strokeWidth: 1,
- fill: 'black'
- });
- return elementObject;
- },
- 'bpmn:DataStoreReference': function (parentGfx, element) {
- var DATA_STORE_PATH = pathMap.getScaledPath('DATA_STORE', {
- xScaleFactor: 1,
- yScaleFactor: 1,
- containerWidth: element.width,
- containerHeight: element.height,
- position: {
- mx: 0,
- my: 0.133
- }
- });
- var elementStore = drawPath(parentGfx, DATA_STORE_PATH, {
- strokeWidth: 2,
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- fillOpacity: DEFAULT_FILL_OPACITY,
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- return elementStore;
- },
- 'bpmn:BoundaryEvent': function (parentGfx, element) {
- var semantic = (0, _BpmnRenderUtil.getSemantic)(element),
- cancel = semantic.cancelActivity;
- var attrs = {
- strokeWidth: 1,
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- };
-
- if (!cancel) {
- attrs.strokeDasharray = '6';
- attrs.strokeLinecap = 'round';
- } // apply fillOpacity
-
-
- var outerAttrs = (0, _minDash.assign)({}, attrs, {
- fillOpacity: 1
- }); // apply no-fill
-
- var innerAttrs = (0, _minDash.assign)({}, attrs, {
- fill: 'none'
- });
- var outer = renderer('bpmn:Event')(parentGfx, element, outerAttrs);
- /* inner path */
- drawCircle(parentGfx, element.width, element.height, INNER_OUTER_DIST, innerAttrs);
- renderEventContent(element, parentGfx);
- return outer;
- },
- 'bpmn:Group': function (parentGfx, element) {
- var group = drawRect(parentGfx, element.width, element.height, TASK_BORDER_RADIUS, {
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor),
- strokeWidth: 1,
- strokeDasharray: '8,3,1,3',
- fill: 'none',
- pointerEvents: 'none'
- });
- return group;
- },
- 'label': function (parentGfx, element) {
- return renderExternalLabel(parentGfx, element);
- },
- 'bpmn:TextAnnotation': function (parentGfx, element) {
- var style = {
- 'fill': 'none',
- 'stroke': 'none'
- };
- var textElement = drawRect(parentGfx, element.width, element.height, 0, 0, style);
- var textPathData = pathMap.getScaledPath('TEXT_ANNOTATION', {
- xScaleFactor: 1,
- yScaleFactor: 1,
- containerWidth: element.width,
- containerHeight: element.height,
- position: {
- mx: 0.0,
- my: 0.0
- }
- });
- drawPath(parentGfx, textPathData, {
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- var text = (0, _BpmnRenderUtil.getSemantic)(element).text || '';
- renderLabel(parentGfx, text, {
- box: element,
- align: 'left-top',
- padding: 5,
- style: {
- fill: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- }
- });
- return textElement;
- },
- 'ParticipantMultiplicityMarker': function (parentGfx, element) {
- var markerPath = pathMap.getScaledPath('MARKER_PARALLEL', {
- xScaleFactor: 1,
- yScaleFactor: 1,
- containerWidth: element.width,
- containerHeight: element.height,
- position: {
- mx: element.width / 2 / element.width,
- my: (element.height - 15) / element.height
- }
- });
- drawMarker('participant-multiplicity', parentGfx, markerPath, {
- strokeWidth: 1,
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- },
- 'SubProcessMarker': function (parentGfx, element) {
- var markerRect = drawRect(parentGfx, 14, 14, 0, {
- strokeWidth: 1,
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- }); // Process marker is placed in the middle of the box
- // therefore fixed values can be used here
-
- (0, _SvgTransformUtil.translate)(markerRect, element.width / 2 - 7.5, element.height - 20);
- var markerPath = pathMap.getScaledPath('MARKER_SUB_PROCESS', {
- xScaleFactor: 1.5,
- yScaleFactor: 1.5,
- containerWidth: element.width,
- containerHeight: element.height,
- position: {
- mx: (element.width / 2 - 7.5) / element.width,
- my: (element.height - 20) / element.height
- }
- });
- drawMarker('sub-process', parentGfx, markerPath, {
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- },
- 'ParallelMarker': function (parentGfx, element, position) {
- var markerPath = pathMap.getScaledPath('MARKER_PARALLEL', {
- xScaleFactor: 1,
- yScaleFactor: 1,
- containerWidth: element.width,
- containerHeight: element.height,
- position: {
- mx: (element.width / 2 + position.parallel) / element.width,
- my: (element.height - 20) / element.height
- }
- });
- drawMarker('parallel', parentGfx, markerPath, {
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- },
- 'SequentialMarker': function (parentGfx, element, position) {
- var markerPath = pathMap.getScaledPath('MARKER_SEQUENTIAL', {
- xScaleFactor: 1,
- yScaleFactor: 1,
- containerWidth: element.width,
- containerHeight: element.height,
- position: {
- mx: (element.width / 2 + position.seq) / element.width,
- my: (element.height - 19) / element.height
- }
- });
- drawMarker('sequential', parentGfx, markerPath, {
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- },
- 'CompensationMarker': function (parentGfx, element, position) {
- var markerMath = pathMap.getScaledPath('MARKER_COMPENSATION', {
- xScaleFactor: 1,
- yScaleFactor: 1,
- containerWidth: element.width,
- containerHeight: element.height,
- position: {
- mx: (element.width / 2 + position.compensation) / element.width,
- my: (element.height - 13) / element.height
- }
- });
- drawMarker('compensation', parentGfx, markerMath, {
- strokeWidth: 1,
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- },
- 'LoopMarker': function (parentGfx, element, position) {
- var markerPath = pathMap.getScaledPath('MARKER_LOOP', {
- xScaleFactor: 1,
- yScaleFactor: 1,
- containerWidth: element.width,
- containerHeight: element.height,
- position: {
- mx: (element.width / 2 + position.loop) / element.width,
- my: (element.height - 7) / element.height
- }
- });
- drawMarker('loop', parentGfx, markerPath, {
- strokeWidth: 1,
- fill: (0, _BpmnRenderUtil.getFillColor)(element, defaultFillColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor),
- strokeLinecap: 'round',
- strokeMiterlimit: 0.5
- });
- },
- 'AdhocMarker': function (parentGfx, element, position) {
- var markerPath = pathMap.getScaledPath('MARKER_ADHOC', {
- xScaleFactor: 1,
- yScaleFactor: 1,
- containerWidth: element.width,
- containerHeight: element.height,
- position: {
- mx: (element.width / 2 + position.adhoc) / element.width,
- my: (element.height - 15) / element.height
- }
- });
- drawMarker('adhoc', parentGfx, markerPath, {
- strokeWidth: 1,
- fill: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor),
- stroke: (0, _BpmnRenderUtil.getStrokeColor)(element, defaultStrokeColor)
- });
- }
- };
+/***/ }),
- function attachTaskMarkers(parentGfx, element, taskMarkers) {
- var obj = (0, _BpmnRenderUtil.getSemantic)(element);
- var subprocess = taskMarkers && taskMarkers.indexOf('SubProcessMarker') !== -1;
- var position;
-
- if (subprocess) {
- position = {
- seq: -21,
- parallel: -22,
- compensation: -42,
- loop: -18,
- adhoc: 10
- };
- } else {
- position = {
- seq: -3,
- parallel: -6,
- compensation: -27,
- loop: 0,
- adhoc: 10
- };
- }
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/util/LineIntersect.js":
+/*!************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/util/LineIntersect.js ***!
+ \************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- (0, _minDash.forEach)(taskMarkers, function (marker) {
- renderer(marker)(parentGfx, element, position);
- });
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ lineIntersect)
+/* harmony export */ });
+/**
+ * @typedef {import('diagram-js/lib/util/Types').Point} Point
+ */
- if (obj.isForCompensation) {
- renderer('CompensationMarker')(parentGfx, element, position);
- }
+/**
+ * Returns the intersection between two line segments a and b.
+ *
+ * @param {Point} l1s
+ * @param {Point} l1e
+ * @param {Point} l2s
+ * @param {Point} l2e
+ *
+ * @return {Point}
+ */
+function lineIntersect(l1s, l1e, l2s, l2e) {
- if (obj.$type === 'bpmn:AdHocSubProcess') {
- renderer('AdhocMarker')(parentGfx, element, position);
- }
+ // if the lines intersect, the result contains the x and y of the
+ // intersection (treating the lines as infinite) and booleans for
+ // whether line segment 1 or line segment 2 contain the point
+ var denominator, a, b, c, numerator;
- var loopCharacteristics = obj.loopCharacteristics,
- isSequential = loopCharacteristics && loopCharacteristics.isSequential;
+ denominator = ((l2e.y - l2s.y) * (l1e.x - l1s.x)) - ((l2e.x - l2s.x) * (l1e.y - l1s.y));
- if (loopCharacteristics) {
- if (isSequential === undefined) {
- renderer('LoopMarker')(parentGfx, element, position);
- }
+ if (denominator == 0) {
+ return null;
+ }
- if (isSequential === false) {
- renderer('ParallelMarker')(parentGfx, element, position);
- }
+ a = l1s.y - l2s.y;
+ b = l1s.x - l2s.x;
+ numerator = ((l2e.x - l2s.x) * a) - ((l2e.y - l2s.y) * b);
- if (isSequential === true) {
- renderer('SequentialMarker')(parentGfx, element, position);
- }
- }
- }
+ c = numerator / denominator;
- function renderDataItemCollection(parentGfx, element) {
- var yPosition = (element.height - 16) / element.height;
- var pathData = pathMap.getScaledPath('DATA_OBJECT_COLLECTION_PATH', {
- xScaleFactor: 1,
- yScaleFactor: 1,
- containerWidth: element.width,
- containerHeight: element.height,
- position: {
- mx: 0.451,
- my: yPosition
- }
- });
- /* collection path */
+ // if we cast these lines infinitely in
+ // both directions, they intersect here
+ return {
+ x: Math.round(l1s.x + (c * (l1e.x - l1s.x))),
+ y: Math.round(l1s.y + (c * (l1e.y - l1s.y)))
+ };
+}
- drawPath(parentGfx, pathData, {
- strokeWidth: 2
- });
- } // extension API, use at your own risk
+/***/ }),
+/***/ "../node_modules/bpmn-js/lib/features/modeling/behavior/util/NonInterruptingUtil.js":
+/*!******************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/behavior/util/NonInterruptingUtil.js ***!
+ \******************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- this._drawPath = drawPath;
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ NON_INTERRUPTING_EVENT_TYPES: () => (/* binding */ NON_INTERRUPTING_EVENT_TYPES),
+/* harmony export */ canBeNonInterrupting: () => (/* binding */ canBeNonInterrupting),
+/* harmony export */ getInterruptingProperty: () => (/* binding */ getInterruptingProperty)
+/* harmony export */ });
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- (0, _inherits.default)(BpmnRenderer, _BaseRenderer.default);
- BpmnRenderer.$inject = ['config.bpmnRenderer', 'eventBus', 'styles', 'pathMap', 'canvas', 'textRenderer'];
- BpmnRenderer.prototype.canRender = function (element) {
- return (0, _ModelUtil.is)(element, 'bpmn:BaseElement');
- };
- BpmnRenderer.prototype.drawShape = function (parentGfx, element) {
- var type = element.type;
- var h = this.handlers[type];
- /* jshint -W040 */
+const NON_INTERRUPTING_EVENT_TYPES = [
+ 'bpmn:MessageEventDefinition',
+ 'bpmn:TimerEventDefinition',
+ 'bpmn:EscalationEventDefinition',
+ 'bpmn:ConditionalEventDefinition',
+ 'bpmn:SignalEventDefinition'
+];
- return h(parentGfx, element);
- };
+function canBeNonInterrupting(shape) {
- BpmnRenderer.prototype.drawConnection = function (parentGfx, element) {
- var type = element.type;
- var h = this.handlers[type];
- /* jshint -W040 */
+ const businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(shape);
- return h(parentGfx, element);
- };
+ if (
+ !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(businessObject, 'bpmn:BoundaryEvent') &&
+ !((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(businessObject, 'bpmn:StartEvent') && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_1__.isEventSubProcess)(businessObject.$parent))
+ ) {
+ return false;
+ }
- BpmnRenderer.prototype.getShapePath = function (element) {
- if ((0, _ModelUtil.is)(element, 'bpmn:Event')) {
- return (0, _BpmnRenderUtil.getCirclePath)(element);
- }
-
- if ((0, _ModelUtil.is)(element, 'bpmn:Activity')) {
- return (0, _BpmnRenderUtil.getRoundRectPath)(element, TASK_BORDER_RADIUS);
- }
+ const eventDefinitions = businessObject.get('eventDefinitions');
+ if (!eventDefinitions || !eventDefinitions.length) {
+ return false;
+ }
- if ((0, _ModelUtil.is)(element, 'bpmn:Gateway')) {
- return (0, _BpmnRenderUtil.getDiamondPath)(element);
- }
+ return NON_INTERRUPTING_EVENT_TYPES.some(event => (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(eventDefinitions[0], event));
+}
- return (0, _BpmnRenderUtil.getRectPath)(element);
- };
+function getInterruptingProperty(shape) {
+ return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(shape, 'bpmn:BoundaryEvent') ? 'cancelActivity' : 'isInterrupting';
+}
- },{"../features/label-editing/LabelUtil":152,"../util/DiUtil":238,"../util/ModelUtil":240,"./BpmnRenderUtil":118,"diagram-js/lib/draw/BaseRenderer":259,"diagram-js/lib/util/RenderUtil":432,"diagram-js/lib/util/SvgTransformUtil":433,"ids":437,"inherits":438,"min-dash":646,"min-dom":647,"tiny-svg":658}],120:[function(require,module,exports){
- "use strict";
+/***/ }),
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = PathMap;
+/***/ "../node_modules/bpmn-js/lib/features/modeling/cmd/AddLaneHandler.js":
+/*!***************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/cmd/AddLaneHandler.js ***!
+ \***************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- /**
- * Map containing SVG paths needed by BpmnRenderer.
- */
- function PathMap() {
- /**
- * Contains a map of path elements
- *
- * Path definition
- * A parameterized path is defined like this:
- *
- * 'GATEWAY_PARALLEL': {
- * d: 'm {mx},{my} {e.x0},0 0,{e.x1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} ' +
- '-{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z',
- * height: 17.5,
- * width: 17.5,
- * heightElements: [2.5, 7.5],
- * widthElements: [2.5, 7.5]
- * }
- *
- * It's important to specify a correct height and width for the path as the scaling
- * is based on the ratio between the specified height and width in this object and the
- * height and width that is set as scale target (Note x,y coordinates will be scaled with
- * individual ratios).
- * The 'heightElements ' and 'widthElements ' array must contain the values that will be scaled.
- * The scaling is based on the computed ratios.
- * Coordinates on the y axis should be in the heightElement 's array, they will be scaled using
- * the computed ratio coefficient.
- * In the parameterized path the scaled values can be accessed through the 'e' object in {} brackets.
- *
- * The values for the y axis can be accessed in the path string using {e.y0}, {e.y1}, ....
- * The values for the x axis can be accessed in the path string using {e.x0}, {e.x1}, ....
- *
- * The numbers x0, x1 respectively y0, y1, ... map to the corresponding array index.
- *
- */
- this.pathMap = {
- 'EVENT_MESSAGE': {
- d: 'm {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}',
- height: 36,
- width: 36,
- heightElements: [6, 14],
- widthElements: [10.5, 21]
- },
- 'EVENT_SIGNAL': {
- d: 'M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z',
- height: 36,
- width: 36,
- heightElements: [18],
- widthElements: [10, 20]
- },
- 'EVENT_ESCALATION': {
- d: 'M {mx},{my} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z',
- height: 36,
- width: 36,
- heightElements: [20, 7],
- widthElements: [8]
- },
- 'EVENT_CONDITIONAL': {
- d: 'M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z ' + 'M {e.x2},{e.y3} l {e.x0},0 ' + 'M {e.x2},{e.y4} l {e.x0},0 ' + 'M {e.x2},{e.y5} l {e.x0},0 ' + 'M {e.x2},{e.y6} l {e.x0},0 ' + 'M {e.x2},{e.y7} l {e.x0},0 ' + 'M {e.x2},{e.y8} l {e.x0},0 ',
- height: 36,
- width: 36,
- heightElements: [8.5, 14.5, 18, 11.5, 14.5, 17.5, 20.5, 23.5, 26.5],
- widthElements: [10.5, 14.5, 12.5]
- },
- 'EVENT_LINK': {
- d: 'm {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z',
- height: 36,
- width: 36,
- heightElements: [4.4375, 6.75, 7.8125],
- widthElements: [9.84375, 13.5]
- },
- 'EVENT_ERROR': {
- d: 'm {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z',
- height: 36,
- width: 36,
- heightElements: [0.023, 8.737, 8.151, 16.564, 10.591, 8.714],
- widthElements: [0.085, 6.672, 6.97, 4.273, 5.337, 6.636]
- },
- 'EVENT_CANCEL_45': {
- d: 'm {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 ' + '0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z',
- height: 36,
- width: 36,
- heightElements: [4.75, 8.5],
- widthElements: [4.75, 8.5]
- },
- 'EVENT_COMPENSATION': {
- d: 'm {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z',
- height: 36,
- width: 36,
- heightElements: [6.5, 13, 0.4, 6.1],
- widthElements: [9, 9.3, 8.7]
- },
- 'EVENT_TIMER_WH': {
- d: 'M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ',
- height: 36,
- width: 36,
- heightElements: [10, 2],
- widthElements: [3, 7]
- },
- 'EVENT_TIMER_LINE': {
- d: 'M {mx},{my} ' + 'm {e.x0},{e.y0} l -{e.x1},{e.y1} ',
- height: 36,
- width: 36,
- heightElements: [10, 3],
- widthElements: [0, 0]
- },
- 'EVENT_MULTIPLE': {
- d: 'm {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z',
- height: 36,
- width: 36,
- heightElements: [6.28099, 12.56199],
- widthElements: [3.1405, 9.42149, 12.56198]
- },
- 'EVENT_PARALLEL_MULTIPLE': {
- d: 'm {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} ' + '-{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z',
- height: 36,
- width: 36,
- heightElements: [2.56228, 7.68683],
- widthElements: [2.56228, 7.68683]
- },
- 'GATEWAY_EXCLUSIVE': {
- d: 'm {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} ' + '{e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} ' + '{e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z',
- height: 17.5,
- width: 17.5,
- heightElements: [8.5, 6.5312, -6.5312, -8.5],
- widthElements: [6.5, -6.5, 3, -3, 5, -5]
- },
- 'GATEWAY_PARALLEL': {
- d: 'm {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 ' + '0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z',
- height: 30,
- width: 30,
- heightElements: [5, 12.5],
- widthElements: [5, 12.5]
- },
- 'GATEWAY_EVENT_BASED': {
- d: 'm {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z',
- height: 11,
- width: 11,
- heightElements: [-6, 6, 12, -12],
- widthElements: [9, -3, -12]
- },
- 'GATEWAY_COMPLEX': {
- d: 'm {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} ' + '{e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} ' + '{e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} ' + '-{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z',
- height: 17.125,
- width: 17.125,
- heightElements: [4.875, 3.4375, 2.125, 3],
- widthElements: [3.4375, 2.125, 4.875, 3]
- },
- 'DATA_OBJECT_PATH': {
- d: 'm 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0',
- height: 61,
- width: 51,
- heightElements: [10, 50, 60],
- widthElements: [10, 40, 50, 60]
- },
- 'DATA_OBJECT_COLLECTION_PATH': {
- d: 'm {mx}, {my} ' + 'm 0 15 l 0 -15 ' + 'm 4 15 l 0 -15 ' + 'm 4 15 l 0 -15 ',
- height: 61,
- width: 51,
- heightElements: [12],
- widthElements: [1, 6, 12, 15]
- },
- 'DATA_ARROW': {
- d: 'm 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z',
- height: 61,
- width: 51,
- heightElements: [],
- widthElements: []
- },
- 'DATA_STORE': {
- d: 'm {mx},{my} ' + 'l 0,{e.y2} ' + 'c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 ' + 'l 0,-{e.y2} ' + 'c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0' + 'c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 ' + 'm -{e.x2},{e.y0}' + 'c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0' + 'm -{e.x2},{e.y0}' + 'c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0',
- height: 61,
- width: 61,
- heightElements: [7, 10, 45],
- widthElements: [2, 58, 60]
- },
- 'TEXT_ANNOTATION': {
- d: 'm {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0',
- height: 30,
- width: 10,
- heightElements: [30],
- widthElements: [10]
- },
- 'MARKER_SUB_PROCESS': {
- d: 'm{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0',
- height: 10,
- width: 10,
- heightElements: [],
- widthElements: []
- },
- 'MARKER_PARALLEL': {
- d: 'm{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10',
- height: 10,
- width: 10,
- heightElements: [],
- widthElements: []
- },
- 'MARKER_SEQUENTIAL': {
- d: 'm{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0',
- height: 10,
- width: 10,
- heightElements: [],
- widthElements: []
- },
- 'MARKER_COMPENSATION': {
- d: 'm {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z',
- height: 10,
- width: 21,
- heightElements: [],
- widthElements: []
- },
- 'MARKER_LOOP': {
- d: 'm {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 ' + '-6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 ' + '0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 ' + 'l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902',
- height: 13.9,
- width: 13.7,
- heightElements: [],
- widthElements: []
- },
- 'MARKER_ADHOC': {
- d: 'm {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 ' + '3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 ' + '1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 ' + '-3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 ' + '-2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z',
- height: 4,
- width: 15,
- heightElements: [],
- widthElements: []
- },
- 'TASK_TYPE_SEND': {
- d: 'm {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}',
- height: 14,
- width: 21,
- heightElements: [6, 14],
- widthElements: [10.5, 21]
- },
- 'TASK_TYPE_SCRIPT': {
- d: 'm {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 ' + 'c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z ' + 'm -7,-12 l 5,0 ' + 'm -4.5,3 l 4.5,0 ' + 'm -3,3 l 5,0' + 'm -4,3 l 5,0',
- height: 15,
- width: 12.6,
- heightElements: [6, 14],
- widthElements: [10.5, 21]
- },
- 'TASK_TYPE_USER_1': {
- d: 'm {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 ' + '-4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 ' + '0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 ' + 'h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 z' + 'm -8,6 l 0,5.5 m 11,0 l 0,-5'
- },
- 'TASK_TYPE_USER_2': {
- d: 'm {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 ' + '-2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 '
- },
- 'TASK_TYPE_USER_3': {
- d: 'm {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 ' + '4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 ' + '-4.20799998,3.36699999 -4.20699998,4.34799999 z'
- },
- 'TASK_TYPE_MANUAL': {
- d: 'm {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 ' + '-0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 ' + '0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 ' + '-1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 ' + '0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 ' + '-10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 ' + '2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 ' + '-0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 ' + '-1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 ' + '-0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 ' + '0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 ' + '-5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z'
- },
- 'TASK_TYPE_INSTANTIATING_SEND': {
- d: 'm {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6'
- },
- 'TASK_TYPE_SERVICE': {
- d: 'm {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 ' + '0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 ' + '-1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 ' + 'v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 ' + '-0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 ' + '-1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 ' + 'h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.14437 ' + '-0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 ' + 'c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 ' + 'l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 ' + '0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 ' + 'c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z ' + 'm 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 ' + '0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 ' + '0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z'
- },
- 'TASK_TYPE_SERVICE_FILL': {
- d: 'm {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 ' + '0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 ' + '0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z'
- },
- 'TASK_TYPE_BUSINESS_RULE_HEADER': {
- d: 'm {mx},{my} 0,4 20,0 0,-4 z'
- },
- 'TASK_TYPE_BUSINESS_RULE_MAIN': {
- d: 'm {mx},{my} 0,12 20,0 0,-12 z' + 'm 0,8 l 20,0 ' + 'm -13,-4 l 0,8'
- },
- 'MESSAGE_FLOW_MARKER': {
- d: 'm {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6'
- }
- };
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ AddLaneHandler)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/util/Elements */ "../node_modules/diagram-js/lib/util/Elements.js");
+/* harmony import */ var _util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/LaneUtil */ "../node_modules/bpmn-js/lib/features/modeling/util/LaneUtil.js");
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
- this.getRawPath = function getRawPath(pathId) {
- return this.pathMap[pathId].d;
- };
- /**
- * Scales the path to the given height and width.
- * Use case
- * Use case is to scale the content of elements (event, gateways) based
- * on the element bounding box's size.
- *
- * Why not transform
- * Scaling a path with transform() will also scale the stroke and IE does not support
- * the option 'non-scaling-stroke' to prevent this.
- * Also there are use cases where only some parts of a path should be
- * scaled.
- *
- * @param {string} pathId The ID of the path.
- * @param {Object} param
- * Example param object scales the path to 60% size of the container (data.width, data.height).
- *
- * {
- * xScaleFactor: 0.6,
- * yScaleFactor:0.6,
- * containerWidth: data.width,
- * containerHeight: data.height,
- * position: {
- * mx: 0.46,
- * my: 0.2,
- * }
- * }
- *
- *
- * targetpathwidth = xScaleFactor * containerWidth
- * targetpathheight = yScaleFactor * containerHeight
- * Position is used to set the starting coordinate of the path. M is computed:
- *
- * position.x * containerWidth
- * position.y * containerHeight
- *
- * Center of the container position: {
- * mx: 0.5,
- * my: 0.5,
- * }
- * Upper left corner of the container
- * position: {
- * mx: 0.0,
- * my: 0.0,
- * }
- *
- *
- *
- *
- */
-
-
- this.getScaledPath = function getScaledPath(pathId, param) {
- var rawPath = this.pathMap[pathId]; // positioning
- // compute the start point of the path
-
- var mx, my;
-
- if (param.abspos) {
- mx = param.abspos.x;
- my = param.abspos.y;
- } else {
- mx = param.containerWidth * param.position.mx;
- my = param.containerHeight * param.position.my;
- }
- var coordinates = {}; // map for the scaled coordinates
- if (param.position) {
- // path
- var heightRatio = param.containerHeight / rawPath.height * param.yScaleFactor;
- var widthRatio = param.containerWidth / rawPath.width * param.xScaleFactor; // Apply height ratio
- for (var heightIndex = 0; heightIndex < rawPath.heightElements.length; heightIndex++) {
- coordinates['y' + heightIndex] = rawPath.heightElements[heightIndex] * heightRatio;
- } // Apply width ratio
- for (var widthIndex = 0; widthIndex < rawPath.widthElements.length; widthIndex++) {
- coordinates['x' + widthIndex] = rawPath.widthElements[widthIndex] * widthRatio;
- }
- } // Apply value to raw path
- var path = format(rawPath.d, {
- mx: mx,
- my: my,
- e: coordinates
- });
- return path;
- };
- } // helpers //////////////////////
-// copied from https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js
+/**
+ * @typedef {import('diagram-js/lib/command/CommandHandler').default} CommandHandler
+ *
+ * @typedef {import('../Modeling').default} Modeling
+ * @typedef {import('../../space-tool/BpmnSpaceTool').default} SpaceTool
+ */
+/**
+ * A handler that allows us to add a new lane
+ * above or below an existing one.
+ *
+ * @implements {CommandHandler}
+ *
+ * @param {Modeling} modeling
+ * @param {SpaceTool} spaceTool
+ */
+function AddLaneHandler(modeling, spaceTool) {
+ this._modeling = modeling;
+ this._spaceTool = spaceTool;
+}
+
+AddLaneHandler.$inject = [
+ 'modeling',
+ 'spaceTool'
+];
+
+
+AddLaneHandler.prototype.preExecute = function(context) {
+
+ var spaceTool = this._spaceTool,
+ modeling = this._modeling;
+
+ var shape = context.shape,
+ location = context.location;
+
+ var lanesRoot = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.getLanesRoot)(shape);
+
+ var isRoot = lanesRoot === shape,
+ laneParent = isRoot ? shape : shape.parent;
+
+ var existingChildLanes = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.getChildLanes)(laneParent);
+
+ var isHorizontalLane = (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_1__.isHorizontal)(shape);
+
+ // never mix up horizontal/vertical lanes
+ if (isHorizontalLane) {
+ if (location === 'left') {
+ location = 'top';
+ } else
+ if (location === 'right') {
+ location = 'bottom';
+ }
+ } else {
+ if (location === 'top') {
+ location = 'left';
+ } else
+ if (location === 'bottom') {
+ location = 'right';
+ }
+ }
+
+ // (0) add a lane if we currently got none and are adding to root
+ if (!existingChildLanes.length) {
+ var siblingPosition = isHorizontalLane ? {
+ x: shape.x + _util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.LANE_INDENTATION,
+ y: shape.y,
+ width: shape.width - _util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.LANE_INDENTATION,
+ height: shape.height
+ } : {
+ x: shape.x,
+ y: shape.y + _util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.LANE_INDENTATION,
+ width: shape.width,
+ height: shape.height - _util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.LANE_INDENTATION
+ };
+
+ modeling.createShape(
+ {
+ type: 'bpmn:Lane',
+ isHorizontal: isHorizontalLane
+ },
+ siblingPosition,
+ laneParent
+ );
+ }
+
+ // (1) collect affected elements to create necessary space
+ var allAffected = [];
+
+ (0,diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_2__.eachElement)(lanesRoot, function(element) {
+ allAffected.push(element);
+
+ // handle element labels in the diagram root
+ if (element.label) {
+ allAffected.push(element.label);
+ }
+
+ if (element === shape) {
+ return [];
+ }
+
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.filter)(element.children, function(c) {
+ return c !== shape;
+ });
+ });
+
+ var offset,
+ lanePosition,
+ spacePos,
+ direction,
+ axis;
+
+ if (location === 'top') {
+ offset = -120;
+ lanePosition = shape.y;
+ spacePos = lanePosition + 10;
+ direction = 'n';
+ axis = 'y';
+ } else
+ if (location === 'left') {
+ offset = -120;
+ lanePosition = shape.x;
+ spacePos = lanePosition + 10;
+ direction = 'w';
+ axis = 'x';
+ } else
+ if (location === 'bottom') {
+ offset = 120;
+ lanePosition = shape.y + shape.height;
+ spacePos = lanePosition - 10;
+ direction = 's';
+ axis = 'y';
+ } else
+ if (location === 'right') {
+ offset = 120;
+ lanePosition = shape.x + shape.width;
+ spacePos = lanePosition - 10;
+ direction = 'e';
+ axis = 'x';
+ }
+
+ var adjustments = spaceTool.calculateAdjustments(allAffected, axis, offset, spacePos);
+
+ var delta = isHorizontalLane ? { x: 0, y: offset } : { x: offset, y: 0 };
+
+ spaceTool.makeSpace(
+ adjustments.movingShapes,
+ adjustments.resizingShapes,
+ delta,
+ direction,
+ spacePos
+ );
+
+ // (2) create new lane at open space
+ var newLanePosition = isHorizontalLane ? {
+ x: shape.x + (isRoot ? _util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.LANE_INDENTATION : 0),
+ y: lanePosition - (location === 'top' ? 120 : 0),
+ width: shape.width - (isRoot ? _util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.LANE_INDENTATION : 0),
+ height: 120
+ } : {
+ x: lanePosition - (location === 'left' ? 120 : 0),
+ y: shape.y + (isRoot ? _util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.LANE_INDENTATION : 0),
+ width: 120,
+ height: shape.height - (isRoot ? _util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.LANE_INDENTATION : 0)
+ };
+
+ context.newLane = modeling.createShape(
+ {
+ type: 'bpmn:Lane',
+ isHorizontal: isHorizontalLane
+ },
+ newLanePosition,
+ laneParent
+ );
+};
+
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/features/modeling/cmd/IdClaimHandler.js":
+/*!***************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/cmd/IdClaimHandler.js ***!
+ \***************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ IdClaimHandler)
+/* harmony export */ });
+/**
+ * @typedef {import('diagram-js/lib/command/CommandHandler').default} CommandHandler
+ *
+ * @typedef {import('../../../model/Types').Moddle} Moddle
+ */
- var tokenRegex = /\{([^}]+)\}/g,
- objNotationRegex = /(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g; // matches .xxxxx or ["xxxxx"] to run over object properties
+/**
+ * @implements {CommandHandler}
+ *
+ * @param {Moddle} moddle
+ */
+function IdClaimHandler(moddle) {
+ this._moddle = moddle;
+}
- function replacer(all, key, obj) {
- var res = obj;
- key.replace(objNotationRegex, function (all, name, quote, quotedName, isFunc) {
- name = name || quotedName;
+IdClaimHandler.$inject = [ 'moddle' ];
- if (res) {
- if (name in res) {
- res = res[name];
- }
- typeof res == 'function' && isFunc && (res = res());
- }
- });
- res = (res == null || res == obj ? all : res) + '';
- return res;
- }
+IdClaimHandler.prototype.execute = function(context) {
+ var ids = this._moddle.ids,
+ id = context.id,
+ element = context.element,
+ claiming = context.claiming;
- function format(str, obj) {
- return String(str).replace(tokenRegex, function (all, key) {
- return replacer(all, key, obj);
- });
- }
+ if (claiming) {
+ ids.claim(id, element);
+ } else {
+ ids.unclaim(id);
+ }
- },{}],121:[function(require,module,exports){
- "use strict";
+ return [];
+};
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = TextRenderer;
-
- var _minDash = require("min-dash");
-
- var _Text = _interopRequireDefault(require("diagram-js/lib/util/Text"));
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- var DEFAULT_FONT_SIZE = 12;
- var LINE_HEIGHT_RATIO = 1.2;
- var MIN_TEXT_ANNOTATION_HEIGHT = 30;
-
- function TextRenderer(config) {
- var defaultStyle = (0, _minDash.assign)({
- fontFamily: 'Arial, sans-serif',
- fontSize: DEFAULT_FONT_SIZE,
- fontWeight: 'normal',
- lineHeight: LINE_HEIGHT_RATIO
- }, config && config.defaultStyle || {});
- var fontSize = parseInt(defaultStyle.fontSize, 10) - 1;
- var externalStyle = (0, _minDash.assign)({}, defaultStyle, {
- fontSize: fontSize
- }, config && config.externalStyle || {});
- var textUtil = new _Text.default({
- style: defaultStyle
- });
- /**
- * Get the new bounds of an externally rendered,
- * layouted label.
- *
- * @param {Bounds} bounds
- * @param {string} text
- *
- * @return {Bounds}
- */
-
- this.getExternalLabelBounds = function (bounds, text) {
- var layoutedDimensions = textUtil.getDimensions(text, {
- box: {
- width: 90,
- height: 30,
- x: bounds.width / 2 + bounds.x,
- y: bounds.height / 2 + bounds.y
- },
- style: externalStyle
- }); // resize label shape to fit label text
+/**
+ * Command revert implementation.
+ */
+IdClaimHandler.prototype.revert = function(context) {
+ var ids = this._moddle.ids,
+ id = context.id,
+ element = context.element,
+ claiming = context.claiming;
- return {
- x: Math.round(bounds.x + bounds.width / 2 - layoutedDimensions.width / 2),
- y: Math.round(bounds.y),
- width: Math.ceil(layoutedDimensions.width),
- height: Math.ceil(layoutedDimensions.height)
- };
- };
- /**
- * Get the new bounds of text annotation.
- *
- * @param {Bounds} bounds
- * @param {string} text
- *
- * @return {Bounds}
- */
-
-
- this.getTextAnnotationBounds = function (bounds, text) {
- var layoutedDimensions = textUtil.getDimensions(text, {
- box: bounds,
- style: defaultStyle,
- align: 'left-top',
- padding: 5
- });
- return {
- x: bounds.x,
- y: bounds.y,
- width: bounds.width,
- height: Math.max(MIN_TEXT_ANNOTATION_HEIGHT, Math.round(layoutedDimensions.height))
- };
- };
- /**
- * Create a layouted text element.
- *
- * @param {string} text
- * @param {Object} [options]
- *
- * @return {SVGElement} rendered text
- */
-
-
- this.createText = function (text, options) {
- return textUtil.createText(text, options || {});
- };
- /**
- * Get default text style.
- */
+ if (claiming) {
+ ids.unclaim(id);
+ } else {
+ ids.claim(id, element);
+ }
+ return [];
+};
- this.getDefaultStyle = function () {
- return defaultStyle;
- };
- /**
- * Get the external text style.
- */
- this.getExternalStyle = function () {
- return externalStyle;
- };
- }
+/***/ }),
- TextRenderer.$inject = ['config.textRenderer'];
+/***/ "../node_modules/bpmn-js/lib/features/modeling/cmd/ResizeLaneHandler.js":
+/*!******************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/cmd/ResizeLaneHandler.js ***!
+ \******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- },{"diagram-js/lib/util/Text":434,"min-dash":646}],122:[function(require,module,exports){
- "use strict";
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ ResizeLaneHandler)
+/* harmony export */ });
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/LaneUtil */ "../node_modules/bpmn-js/lib/features/modeling/util/LaneUtil.js");
+/* harmony import */ var diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/util/Elements */ "../node_modules/diagram-js/lib/util/Elements.js");
+/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+/* harmony import */ var diagram_js_lib_features_resize_ResizeUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/features/resize/ResizeUtil */ "../node_modules/diagram-js/lib/features/resize/ResizeUtil.js");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _BpmnRenderer = _interopRequireDefault(require("./BpmnRenderer"));
- var _TextRenderer = _interopRequireDefault(require("./TextRenderer"));
- var _PathMap = _interopRequireDefault(require("./PathMap"));
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var _default = {
- __init__: ['bpmnRenderer'],
- bpmnRenderer: ['type', _BpmnRenderer.default],
- textRenderer: ['type', _TextRenderer.default],
- pathMap: ['type', _PathMap.default]
- };
- exports.default = _default;
- },{"./BpmnRenderer":119,"./PathMap":120,"./TextRenderer":121}],123:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = AutoPlace;
- var _BpmnAutoPlaceUtil = require("./BpmnAutoPlaceUtil");
- /**
- * BPMN auto-place behavior.
- *
- * @param {EventBus} eventBus
- */
- function AutoPlace(eventBus) {
- eventBus.on('autoPlace', function (context) {
- var shape = context.shape,
- source = context.source;
- return (0, _BpmnAutoPlaceUtil.getNewShapePosition)(source, shape);
- });
- }
+/**
+ * @typedef {import('diagram-js/lib/command/CommandHandler').default} CommandHandler
+ *
+ * @typedef {import('../Modeling').default} Modeling
+ * @typedef {import('../../space-tool/BpmnSpaceTool').default} SpaceTool
+ *
+ * @typedef {import('../../../model/Types').Shape} Shape
+ *
+ * @typedef {import('diagram-js/lib/util/Types').Rect} Rect
+ */
- AutoPlace.$inject = ['eventBus'];
+/**
+ * A handler that resizes a lane.
+ *
+ * @implements {CommandHandler}
+ *
+ * @param {Modeling} modeling
+ * @param {SpaceTool} spaceTool
+ */
+function ResizeLaneHandler(modeling, spaceTool) {
+ this._modeling = modeling;
+ this._spaceTool = spaceTool;
+}
- },{"./BpmnAutoPlaceUtil":124}],124:[function(require,module,exports){
- "use strict";
+ResizeLaneHandler.$inject = [
+ 'modeling',
+ 'spaceTool'
+];
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.getNewShapePosition = getNewShapePosition;
- exports.getFlowNodePosition = getFlowNodePosition;
- exports.getTextAnnotationPosition = getTextAnnotationPosition;
- exports.getDataElementPosition = getDataElementPosition;
- var _ModelUtil = require("../../util/ModelUtil");
+ResizeLaneHandler.prototype.preExecute = function(context) {
- var _ModelingUtil = require("../modeling/util/ModelingUtil");
+ var shape = context.shape,
+ newBounds = context.newBounds,
+ balanced = context.balanced;
- var _LayoutUtil = require("diagram-js/lib/layout/LayoutUtil");
+ if (balanced !== false) {
+ this.resizeBalanced(shape, newBounds);
+ } else {
+ this.resizeSpace(shape, newBounds);
+ }
+};
- var _AutoPlaceUtil = require("diagram-js/lib/features/auto-place/AutoPlaceUtil");
- /**
- * Find the new position for the target element to
- * connect to source.
- *
- * @param {djs.model.Shape} source
- * @param {djs.model.Shape} element
- *
- * @return {Point}
- */
- function getNewShapePosition(source, element) {
- if ((0, _ModelUtil.is)(element, 'bpmn:TextAnnotation')) {
- return getTextAnnotationPosition(source, element);
- }
+/**
+ * Resize balanced, adjusting next / previous lane sizes.
+ *
+ * @param {Shape} shape
+ * @param {Rect} newBounds
+ */
+ResizeLaneHandler.prototype.resizeBalanced = function(shape, newBounds) {
- if ((0, _ModelingUtil.isAny)(element, ['bpmn:DataObjectReference', 'bpmn:DataStoreReference'])) {
- return getDataElementPosition(source, element);
- }
+ var modeling = this._modeling;
- if ((0, _ModelUtil.is)(element, 'bpmn:FlowNode')) {
- return getFlowNodePosition(source, element);
- }
- }
- /**
- * Always try to place element right of source;
- * compute actual distance from previous nodes in flow.
- */
+ var resizeNeeded = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.computeLanesResize)(shape, newBounds);
+ // resize the lane
+ modeling.resizeShape(shape, newBounds);
- function getFlowNodePosition(source, element) {
- var sourceTrbl = (0, _LayoutUtil.asTRBL)(source);
- var sourceMid = (0, _LayoutUtil.getMid)(source);
- var horizontalDistance = (0, _AutoPlaceUtil.getConnectedDistance)(source, {
- filter: function (connection) {
- return (0, _ModelUtil.is)(connection, 'bpmn:SequenceFlow');
- }
- });
- var margin = 30,
- minDistance = 80,
- orientation = 'left';
+ // resize other lanes as needed
+ resizeNeeded.forEach(function(r) {
+ modeling.resizeShape(r.shape, r.newBounds);
+ });
+};
- if ((0, _ModelUtil.is)(source, 'bpmn:BoundaryEvent')) {
- orientation = (0, _LayoutUtil.getOrientation)(source, source.host, -25);
- if (orientation.indexOf('top') !== -1) {
- margin *= -1;
- }
- }
+/**
+ * Resize, making actual space and moving below / above elements.
+ *
+ * @param {Shape} shape
+ * @param {Rect} newBounds
+ */
+ResizeLaneHandler.prototype.resizeSpace = function(shape, newBounds) {
+ var spaceTool = this._spaceTool;
- var position = {
- x: sourceTrbl.right + horizontalDistance + element.width / 2,
- y: sourceMid.y + getVerticalDistance(orientation, minDistance)
- };
- var nextPositionDirection = {
- y: {
- margin: margin,
- minDistance: minDistance
- }
- };
- return (0, _AutoPlaceUtil.findFreePosition)(source, element, position, (0, _AutoPlaceUtil.generateGetNextPosition)(nextPositionDirection));
- }
+ var shapeTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(shape),
+ newTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(newBounds);
- function getVerticalDistance(orientation, minDistance) {
- if (orientation.indexOf('top') != -1) {
- return -1 * minDistance;
- } else if (orientation.indexOf('bottom') != -1) {
- return minDistance;
- } else {
- return 0;
- }
- }
- /**
- * Always try to place text annotations top right of source.
- */
+ var trblDiff = (0,diagram_js_lib_features_resize_ResizeUtil__WEBPACK_IMPORTED_MODULE_2__.substractTRBL)(newTrbl, shapeTrbl);
+ var lanesRoot = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.getLanesRoot)(shape);
- function getTextAnnotationPosition(source, element) {
- var sourceTrbl = (0, _LayoutUtil.asTRBL)(source);
- var position = {
- x: sourceTrbl.right + element.width / 2,
- y: sourceTrbl.top - 50 - element.height / 2
- };
- var nextPositionDirection = {
- y: {
- margin: -30,
- minDistance: 20
- }
- };
- return (0, _AutoPlaceUtil.findFreePosition)(source, element, position, (0, _AutoPlaceUtil.generateGetNextPosition)(nextPositionDirection));
- }
- /**
- * Always put element bottom right of source.
- */
+ var allAffected = [],
+ allLanes = [];
+ (0,diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_3__.eachElement)(lanesRoot, function(element) {
+ allAffected.push(element);
- function getDataElementPosition(source, element) {
- var sourceTrbl = (0, _LayoutUtil.asTRBL)(source);
- var position = {
- x: sourceTrbl.right - 10 + element.width / 2,
- y: sourceTrbl.bottom + 40 + element.width / 2
- };
- var nextPositionDirection = {
- x: {
- margin: 30,
- minDistance: 30
- }
- };
- return (0, _AutoPlaceUtil.findFreePosition)(source, element, position, (0, _AutoPlaceUtil.generateGetNextPosition)(nextPositionDirection));
- }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:Lane') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:Participant')) {
+ allLanes.push(element);
+ }
- },{"../../util/ModelUtil":240,"../modeling/util/ModelingUtil":211,"diagram-js/lib/features/auto-place/AutoPlaceUtil":269,"diagram-js/lib/layout/LayoutUtil":405}],125:[function(require,module,exports){
- "use strict";
+ return element.children;
+ });
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+ var change,
+ spacePos,
+ direction,
+ offset,
+ adjustments;
- var _autoPlace = _interopRequireDefault(require("diagram-js/lib/features/auto-place"));
+ if (trblDiff.bottom || trblDiff.top) {
- var _BpmnAutoPlace = _interopRequireDefault(require("./BpmnAutoPlace"));
+ change = trblDiff.bottom || trblDiff.top;
+ spacePos = shape.y + (trblDiff.bottom ? shape.height : 0) + (trblDiff.bottom ? -10 : 10);
+ direction = trblDiff.bottom ? 's' : 'n';
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ offset = trblDiff.top > 0 || trblDiff.bottom < 0 ? -change : change;
- var _default = {
- __depends__: [_autoPlace.default],
- __init__: ['bpmnAutoPlace'],
- bpmnAutoPlace: ['type', _BpmnAutoPlace.default]
- };
- exports.default = _default;
+ adjustments = spaceTool.calculateAdjustments(allAffected, 'y', offset, spacePos);
- },{"./BpmnAutoPlace":123,"diagram-js/lib/features/auto-place":270}],126:[function(require,module,exports){
- "use strict";
+ spaceTool.makeSpace(adjustments.movingShapes, adjustments.resizingShapes, { x: 0, y: change }, direction);
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BpmnAutoResize;
- var _AutoResize = _interopRequireDefault(require("diagram-js/lib/features/auto-resize/AutoResize"));
+ if (trblDiff.left || trblDiff.right) {
- var _inherits = _interopRequireDefault(require("inherits"));
+ change = trblDiff.right || trblDiff.left;
+ spacePos = shape.x + (trblDiff.right ? shape.width : 0) + (trblDiff.right ? -10 : 100);
+ direction = trblDiff.right ? 'e' : 'w';
- var _ModelUtil = require("../../util/ModelUtil");
+ offset = trblDiff.left > 0 || trblDiff.right < 0 ? -change : change;
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ adjustments = spaceTool.calculateAdjustments(allLanes, 'x', offset, spacePos);
- /**
- * Sub class of the AutoResize module which implements a BPMN
- * specific resize function.
- */
- function BpmnAutoResize(injector) {
- injector.invoke(_AutoResize.default, this);
- }
+ spaceTool.makeSpace(adjustments.movingShapes, adjustments.resizingShapes, { x: change, y: 0 }, direction);
+ }
+};
- BpmnAutoResize.$inject = ['injector'];
- (0, _inherits.default)(BpmnAutoResize, _AutoResize.default);
- /**
- * Resize shapes and lanes.
- *
- * @param {djs.model.Shape} target
- * @param {Bounds} newBounds
- * @param {Object} hints
- */
+/***/ }),
- BpmnAutoResize.prototype.resize = function (target, newBounds, hints) {
- if ((0, _ModelUtil.is)(target, 'bpmn:Participant')) {
- this._modeling.resizeLane(target, newBounds, null, hints);
- } else {
- this._modeling.resizeShape(target, newBounds, null, hints);
- }
- };
+/***/ "../node_modules/bpmn-js/lib/features/modeling/cmd/SetColorHandler.js":
+/*!****************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/cmd/SetColorHandler.js ***!
+ \****************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- },{"../../util/ModelUtil":240,"diagram-js/lib/features/auto-resize/AutoResize":271,"inherits":438}],127:[function(require,module,exports){
- "use strict";
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ SetColorHandler)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var diagram_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/util/ModelUtil */ "../node_modules/diagram-js/lib/util/ModelUtil.js");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BpmnAutoResizeProvider;
- var _ModelUtil = require("../../util/ModelUtil");
- var _inherits = _interopRequireDefault(require("inherits"));
- var _minDash = require("min-dash");
- var _AutoResizeProvider = _interopRequireDefault(require("diagram-js/lib/features/auto-resize/AutoResizeProvider"));
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- /**
- * This module is a provider for automatically resizing parent BPMN elements
- */
- function BpmnAutoResizeProvider(eventBus, modeling) {
- _AutoResizeProvider.default.call(this, eventBus);
- this._modeling = modeling;
- }
+/**
+ * @typedef {import('diagram-js/lib/command/CommandHandler').default} CommandHandler
+ *
+ * @typedef {import('diagram-js/lib/command/CommandStack').default} CommandStack
+ *
+ * @typedef {import('../../../model/Types').ModdleElement} ModdleElement
+ */
- (0, _inherits.default)(BpmnAutoResizeProvider, _AutoResizeProvider.default);
- BpmnAutoResizeProvider.$inject = ['eventBus', 'modeling'];
- /**
- * Check if the given target can be expanded
- *
- * @param {djs.model.Shape} target
- *
- * @return {boolean}
- */
+var DEFAULT_COLORS = {
+ fill: undefined,
+ stroke: undefined
+};
- BpmnAutoResizeProvider.prototype.canResize = function (elements, target) {
- if (!(0, _ModelUtil.is)(target, 'bpmn:Participant') && !(0, _ModelUtil.is)(target, 'bpmn:Lane') && !(0, _ModelUtil.is)(target, 'bpmn:SubProcess')) {
- return false;
- }
+/**
+ * @implements {CommandHandler}
+ *
+ * @param {CommandStack} commandStack
+ */
+function SetColorHandler(commandStack) {
+ this._commandStack = commandStack;
- var canResize = true;
- (0, _minDash.forEach)(elements, function (element) {
- if ((0, _ModelUtil.is)(element, 'bpmn:Lane') || element.labelTarget) {
- canResize = false;
- return;
- }
- });
- return canResize;
- };
+ this._normalizeColor = function(color) {
- },{"../../util/ModelUtil":240,"diagram-js/lib/features/auto-resize/AutoResizeProvider":272,"inherits":438,"min-dash":646}],128:[function(require,module,exports){
- "use strict";
+ // Remove color for falsy values.
+ if (!color) {
+ return undefined;
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isString)(color)) {
+ var hexColor = colorToHex(color);
- var _BpmnAutoResize = _interopRequireDefault(require("./BpmnAutoResize"));
+ if (hexColor) {
+ return hexColor;
+ }
+ }
- var _BpmnAutoResizeProvider = _interopRequireDefault(require("./BpmnAutoResizeProvider"));
+ throw new Error('invalid color value: ' + color);
+ };
+}
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+SetColorHandler.$inject = [
+ 'commandStack'
+];
- var _default = {
- __init__: ['bpmnAutoResize', 'bpmnAutoResizeProvider'],
- bpmnAutoResize: ['type', _BpmnAutoResize.default],
- bpmnAutoResizeProvider: ['type', _BpmnAutoResizeProvider.default]
- };
- exports.default = _default;
- },{"./BpmnAutoResize":126,"./BpmnAutoResizeProvider":127}],129:[function(require,module,exports){
- "use strict";
+SetColorHandler.prototype.postExecute = function(context) {
+ var elements = context.elements,
+ colors = context.colors || DEFAULT_COLORS;
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = ContextPadProvider;
+ var self = this;
- var _minDash = require("min-dash");
+ var di = {};
- var _ModelUtil = require("../../util/ModelUtil");
+ if ('fill' in colors) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(di, {
+ 'background-color': this._normalizeColor(colors.fill) });
+ }
- var _DiUtil = require("../../util/DiUtil");
+ if ('stroke' in colors) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(di, {
+ 'border-color': this._normalizeColor(colors.stroke) });
+ }
- var _ModelingUtil = require("../modeling/util/ModelingUtil");
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function(element) {
+ var assignedDi = (0,diagram_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.isConnection)(element) ? (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.pick)(di, [ 'border-color' ]) : di,
+ elementDi = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getDi)(element);
- var _LaneUtil = require("../modeling/util/LaneUtil");
+ // TODO @barmac: remove once we drop bpmn.io properties
+ ensureLegacySupport(assignedDi);
- var _Mouse = require("diagram-js/lib/util/Mouse");
+ if ((0,diagram_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.isLabel)(element)) {
- /**
- * A provider for BPMN 2.0 elements context pad
- */
- function ContextPadProvider(config, injector, eventBus, contextPad, modeling, elementFactory, connect, create, popupMenu, canvas, rules, translate) {
- config = config || {};
- contextPad.registerProvider(this);
- this._contextPad = contextPad;
- this._modeling = modeling;
- this._elementFactory = elementFactory;
- this._connect = connect;
- this._create = create;
- this._popupMenu = popupMenu;
- this._canvas = canvas;
- this._rules = rules;
- this._translate = translate;
-
- if (config.autoPlace !== false) {
- this._autoPlace = injector.get('autoPlace', false);
- }
-
- eventBus.on('create.end', 250, function (event) {
- var context = event.context,
- shape = context.shape;
-
- if (!(0, _Mouse.hasPrimaryModifier)(event) || !contextPad.isOpen(shape)) {
- return;
- }
+ // set label colors as bpmndi:BPMNLabel#color
+ self._commandStack.execute('element.updateModdleProperties', {
+ element: element,
+ moddleElement: elementDi.label,
+ properties: {
+ color: di['border-color']
+ }
+ });
+ } else {
- var entries = contextPad.getEntries(shape);
+ // ignore non-compliant di
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.isAny)(elementDi, [ 'bpmndi:BPMNEdge', 'bpmndi:BPMNShape' ])) {
+ return;
+ }
- if (entries.replace) {
- entries.replace.action.click(event, shape);
- }
- });
+ // set colors bpmndi:BPMNEdge or bpmndi:BPMNShape
+ self._commandStack.execute('element.updateProperties', {
+ element: element,
+ properties: {
+ di: assignedDi
}
+ });
+ }
+ });
- ContextPadProvider.$inject = ['config.contextPad', 'injector', 'eventBus', 'contextPad', 'modeling', 'elementFactory', 'connect', 'create', 'popupMenu', 'canvas', 'rules', 'translate'];
+};
- ContextPadProvider.prototype.getContextPadEntries = function (element) {
- var contextPad = this._contextPad,
- modeling = this._modeling,
- elementFactory = this._elementFactory,
- connect = this._connect,
- create = this._create,
- popupMenu = this._popupMenu,
- canvas = this._canvas,
- rules = this._rules,
- autoPlace = this._autoPlace,
- translate = this._translate;
- var actions = {};
+/**
+ * Convert color from rgb(a)/hsl to hex. Returns `null` for unknown color names
+ * and for colors with alpha less than 1.0. This depends on ``
+ * serialization of the `context.fillStyle`.
+ * Cf. https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-fillstyle
+ *
+ * @example
+ *
+ * ```javascript
+ * colorToHex('fuchsia'); // "#ff00ff"
+ *
+ * colorToHex('rgba(1, 2, 3, 0.4)'); // null
+ * ```
+ *
+ * @param {string} color
+ *
+ * @return {string|null}
+ */
+function colorToHex(color) {
+ var context = document.createElement('canvas').getContext('2d');
- if (element.type === 'label') {
- return actions;
- }
+ // (0) Start with transparent to account for browser default values.
+ context.fillStyle = 'transparent';
- var businessObject = element.businessObject;
+ // (1) Assign color so that it's serialized.
+ context.fillStyle = color;
- function startConnect(event, element) {
- connect.start(event, element);
- }
+ // (2) Return null for non-hex serialization result.
+ return /^#[0-9a-fA-F]{6}$/.test(context.fillStyle) ? context.fillStyle : null;
+}
- function removeElement(e) {
- modeling.removeElements([element]);
- }
+/**
+ * Add legacy properties if required.
+ *
+ * @param {ModdleElement} di
+ */
+function ensureLegacySupport(di) {
+ if ('border-color' in di) {
+ di.stroke = di['border-color'];
+ }
- function getReplaceMenuPosition(element) {
- var Y_OFFSET = 5;
- var diagramContainer = canvas.getContainer(),
- pad = contextPad.getPad(element).html;
- var diagramRect = diagramContainer.getBoundingClientRect(),
- padRect = pad.getBoundingClientRect();
- var top = padRect.top - diagramRect.top;
- var left = padRect.left - diagramRect.left;
- var pos = {
- x: left,
- y: top + padRect.height + Y_OFFSET
- };
- return pos;
- }
- /**
- * Create an append action
- *
- * @param {string} type
- * @param {string} className
- * @param {string} [title]
- * @param {Object} [options]
- *
- * @return {Object} descriptor
- */
-
-
- function appendAction(type, className, title, options) {
- if (typeof title !== 'string') {
- options = title;
- title = translate('Append {type}', {
- type: type.replace(/^bpmn:/, '')
- });
- }
+ if ('background-color' in di) {
+ di.fill = di['background-color'];
+ }
+}
- function appendStart(event, element) {
- var shape = elementFactory.createShape((0, _minDash.assign)({
- type: type
- }, options));
- create.start(event, shape, {
- source: element
- });
- }
- var append = autoPlace ? function (event, element) {
- var shape = elementFactory.createShape((0, _minDash.assign)({
- type: type
- }, options));
- autoPlace.append(element, shape);
- } : appendStart;
- return {
- group: 'model',
- className: className,
- title: title,
- action: {
- dragstart: appendStart,
- click: append
- }
- };
- }
+/***/ }),
- function splitLaneHandler(count) {
- return function (event, element) {
- // actual split
- modeling.splitLane(element, count); // refresh context pad after split to
- // get rid of split icons
+/***/ "../node_modules/bpmn-js/lib/features/modeling/cmd/SplitLaneHandler.js":
+/*!*****************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/cmd/SplitLaneHandler.js ***!
+ \*****************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- contextPad.open(element, true);
- };
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ SplitLaneHandler)
+/* harmony export */ });
+/* harmony import */ var _util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/LaneUtil */ "../node_modules/bpmn-js/lib/features/modeling/util/LaneUtil.js");
- if ((0, _ModelingUtil.isAny)(businessObject, ['bpmn:Lane', 'bpmn:Participant']) && (0, _DiUtil.isExpanded)(businessObject)) {
- var childLanes = (0, _LaneUtil.getChildLanes)(element);
- (0, _minDash.assign)(actions, {
- 'lane-insert-above': {
- group: 'lane-insert-above',
- className: 'bpmn-icon-lane-insert-above',
- title: translate('Add Lane above'),
- action: {
- click: function (event, element) {
- modeling.addLane(element, 'top');
- }
- }
- }
- });
- if (childLanes.length < 2) {
- if (element.height >= 120) {
- (0, _minDash.assign)(actions, {
- 'lane-divide-two': {
- group: 'lane-divide',
- className: 'bpmn-icon-lane-divide-two',
- title: translate('Divide into two Lanes'),
- action: {
- click: splitLaneHandler(2)
- }
- }
- });
- }
+/**
+ * @typedef {import('diagram-js/lib/command/CommandHandler').default} CommandHandler
+ *
+ * @typedef {import('../Modeling').default} Modeling
+ * @typedef {import('diagram-js/lib/i18n/translate/translate').default} Translate
+ */
- if (element.height >= 180) {
- (0, _minDash.assign)(actions, {
- 'lane-divide-three': {
- group: 'lane-divide',
- className: 'bpmn-icon-lane-divide-three',
- title: translate('Divide into three Lanes'),
- action: {
- click: splitLaneHandler(3)
- }
- }
- });
- }
- }
+/**
+ * A handler that splits a lane into a number of sub-lanes,
+ * creating new sub lanes, if necessary.
+ *
+ * @implements {CommandHandler}
+ *
+ * @param {Modeling} modeling
+ * @param {Translate} translate
+ */
+function SplitLaneHandler(modeling, translate) {
+ this._modeling = modeling;
+ this._translate = translate;
+}
- (0, _minDash.assign)(actions, {
- 'lane-insert-below': {
- group: 'lane-insert-below',
- className: 'bpmn-icon-lane-insert-below',
- title: translate('Add Lane below'),
- action: {
- click: function (event, element) {
- modeling.addLane(element, 'bottom');
- }
- }
- }
- });
- }
+SplitLaneHandler.$inject = [
+ 'modeling',
+ 'translate'
+];
- if ((0, _ModelUtil.is)(businessObject, 'bpmn:FlowNode')) {
- if ((0, _ModelUtil.is)(businessObject, 'bpmn:EventBasedGateway')) {
- (0, _minDash.assign)(actions, {
- 'append.receive-task': appendAction('bpmn:ReceiveTask', 'bpmn-icon-receive-task', translate('Append ReceiveTask')),
- 'append.message-intermediate-event': appendAction('bpmn:IntermediateCatchEvent', 'bpmn-icon-intermediate-event-catch-message', translate('Append MessageIntermediateCatchEvent'), {
- eventDefinitionType: 'bpmn:MessageEventDefinition'
- }),
- 'append.timer-intermediate-event': appendAction('bpmn:IntermediateCatchEvent', 'bpmn-icon-intermediate-event-catch-timer', translate('Append TimerIntermediateCatchEvent'), {
- eventDefinitionType: 'bpmn:TimerEventDefinition'
- }),
- 'append.condition-intermediate-event': appendAction('bpmn:IntermediateCatchEvent', 'bpmn-icon-intermediate-event-catch-condition', translate('Append ConditionIntermediateCatchEvent'), {
- eventDefinitionType: 'bpmn:ConditionalEventDefinition'
- }),
- 'append.signal-intermediate-event': appendAction('bpmn:IntermediateCatchEvent', 'bpmn-icon-intermediate-event-catch-signal', translate('Append SignalIntermediateCatchEvent'), {
- eventDefinitionType: 'bpmn:SignalEventDefinition'
- })
- });
- } else if (isEventType(businessObject, 'bpmn:BoundaryEvent', 'bpmn:CompensateEventDefinition')) {
- (0, _minDash.assign)(actions, {
- 'append.compensation-activity': appendAction('bpmn:Task', 'bpmn-icon-task', translate('Append compensation activity'), {
- isForCompensation: true
- })
- });
- } else if (!(0, _ModelUtil.is)(businessObject, 'bpmn:EndEvent') && !businessObject.isForCompensation && !isEventType(businessObject, 'bpmn:IntermediateThrowEvent', 'bpmn:LinkEventDefinition') && !(0, _DiUtil.isEventSubProcess)(businessObject)) {
- (0, _minDash.assign)(actions, {
- 'append.end-event': appendAction('bpmn:EndEvent', 'bpmn-icon-end-event-none', translate('Append EndEvent')),
- 'append.gateway': appendAction('bpmn:ExclusiveGateway', 'bpmn-icon-gateway-none', translate('Append Gateway')),
- 'append.append-task': appendAction('bpmn:Task', 'bpmn-icon-task', translate('Append Task')),
- 'append.intermediate-event': appendAction('bpmn:IntermediateThrowEvent', 'bpmn-icon-intermediate-event-none', translate('Append Intermediate/Boundary Event'))
- });
- }
- }
- if (!popupMenu.isEmpty(element, 'bpmn-replace')) {
- // Replace menu entry
- (0, _minDash.assign)(actions, {
- 'replace': {
- group: 'edit',
- className: 'bpmn-icon-screw-wrench',
- title: translate('Change type'),
- action: {
- click: function (event, element) {
- var position = (0, _minDash.assign)(getReplaceMenuPosition(element), {
- cursor: {
- x: event.x,
- y: event.y
- }
- });
- popupMenu.open(element, 'bpmn-replace', position);
- }
- }
- }
- });
- }
+SplitLaneHandler.prototype.preExecute = function(context) {
- if ((0, _ModelingUtil.isAny)(businessObject, ['bpmn:FlowNode', 'bpmn:InteractionNode', 'bpmn:DataObjectReference', 'bpmn:DataStoreReference'])) {
- (0, _minDash.assign)(actions, {
- 'append.text-annotation': appendAction('bpmn:TextAnnotation', 'bpmn-icon-text-annotation'),
- 'connect': {
- group: 'connect',
- className: 'bpmn-icon-connection-multi',
- title: translate('Connect using ' + (businessObject.isForCompensation ? '' : 'Sequence/MessageFlow or ') + 'Association'),
- action: {
- click: startConnect,
- dragstart: startConnect
- }
- }
- });
- }
+ var modeling = this._modeling,
+ translate = this._translate;
- if ((0, _ModelingUtil.isAny)(businessObject, ['bpmn:DataObjectReference', 'bpmn:DataStoreReference'])) {
- (0, _minDash.assign)(actions, {
- 'connect': {
- group: 'connect',
- className: 'bpmn-icon-connection-multi',
- title: translate('Connect using DataInputAssociation'),
- action: {
- click: startConnect,
- dragstart: startConnect
- }
- }
- });
- }
+ var shape = context.shape,
+ newLanesCount = context.count;
- if ((0, _ModelUtil.is)(businessObject, 'bpmn:Group')) {
- (0, _minDash.assign)(actions, {
- 'append.text-annotation': appendAction('bpmn:TextAnnotation', 'bpmn-icon-text-annotation')
- });
- } // delete element entry, only show if allowed by rules
+ var childLanes = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.getChildLanes)(shape),
+ existingLanesCount = childLanes.length;
+ if (existingLanesCount > newLanesCount) {
+ throw new Error(translate('more than {count} child lanes', { count: newLanesCount }));
+ }
- var deleteAllowed = rules.allowed('elements.delete', {
- elements: [element]
- });
+ var newLanesHeight = Math.round(shape.height / newLanesCount);
- if ((0, _minDash.isArray)(deleteAllowed)) {
- // was the element returned as a deletion candidate?
- deleteAllowed = deleteAllowed[0] === element;
- }
+ // Iterate from top to bottom in child lane order,
+ // resizing existing lanes and creating new ones
+ // so that they split the parent proportionally.
+ //
+ // Due to rounding related errors, the bottom lane
+ // needs to take up all the remaining space.
+ var laneY,
+ laneHeight,
+ laneBounds,
+ newLaneAttrs,
+ idx;
- if (deleteAllowed) {
- (0, _minDash.assign)(actions, {
- 'delete': {
- group: 'edit',
- className: 'bpmn-icon-trash',
- title: translate('Remove'),
- action: {
- click: removeElement
- }
- }
- });
- }
+ for (idx = 0; idx < newLanesCount; idx++) {
- return actions;
- }; // helpers /////////
+ laneY = shape.y + idx * newLanesHeight;
+ // if bottom lane
+ if (idx === newLanesCount - 1) {
+ laneHeight = shape.height - (newLanesHeight * idx);
+ } else {
+ laneHeight = newLanesHeight;
+ }
- function isEventType(eventBo, type, definition) {
- var isType = eventBo.$instanceOf(type);
- var isDefinition = false;
- var definitions = eventBo.eventDefinitions || [];
- (0, _minDash.forEach)(definitions, function (def) {
- if (def.$type === definition) {
- isDefinition = true;
- }
- });
- return isType && isDefinition;
- }
+ laneBounds = {
+ x: shape.x + _util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.LANE_INDENTATION,
+ y: laneY,
+ width: shape.width - _util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.LANE_INDENTATION,
+ height: laneHeight
+ };
- },{"../../util/DiUtil":238,"../../util/ModelUtil":240,"../modeling/util/LaneUtil":210,"../modeling/util/ModelingUtil":211,"diagram-js/lib/util/Mouse":428,"min-dash":646}],130:[function(require,module,exports){
- "use strict";
+ if (idx < existingLanesCount) {
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+ // resize existing lane
+ modeling.resizeShape(childLanes[idx], laneBounds);
+ } else {
- var _diagramJsDirectEditing = _interopRequireDefault(require("diagram-js-direct-editing"));
+ // create a new lane at position
+ newLaneAttrs = {
+ type: 'bpmn:Lane'
+ };
- var _contextPad = _interopRequireDefault(require("diagram-js/lib/features/context-pad"));
+ modeling.createShape(newLaneAttrs, laneBounds, shape);
+ }
+ }
+};
- var _selection = _interopRequireDefault(require("diagram-js/lib/features/selection"));
- var _connect = _interopRequireDefault(require("diagram-js/lib/features/connect"));
+/***/ }),
- var _create = _interopRequireDefault(require("diagram-js/lib/features/create"));
+/***/ "../node_modules/bpmn-js/lib/features/modeling/cmd/UpdateCanvasRootHandler.js":
+/*!************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/cmd/UpdateCanvasRootHandler.js ***!
+ \************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var _popupMenu = _interopRequireDefault(require("../popup-menu"));
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ UpdateCanvasRootHandler)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/util/Collections */ "../node_modules/diagram-js/lib/util/Collections.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- var _ContextPadProvider = _interopRequireDefault(require("./ContextPadProvider"));
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var _default = {
- __depends__: [_diagramJsDirectEditing.default, _contextPad.default, _selection.default, _connect.default, _create.default, _popupMenu.default],
- __init__: ['contextPadProvider'],
- contextPadProvider: ['type', _ContextPadProvider.default]
- };
- exports.default = _default;
- },{"../popup-menu":217,"./ContextPadProvider":129,"diagram-js-direct-editing":245,"diagram-js/lib/features/connect":288,"diagram-js/lib/features/context-pad":292,"diagram-js/lib/features/create":297,"diagram-js/lib/features/selection":383}],131:[function(require,module,exports){
- "use strict";
+/**
+ * @typedef {import('diagram-js/lib/command/CommandHandler').default} CommandHandler
+ *
+ * @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
+ * @typedef {import('../Modeling').default} Modeling
+ */
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BpmnCopyPaste;
+/**
+ * @implements {CommandHandler}
+ *
+ * @param {Canvas} canvas
+ * @param {Modeling} modeling
+ */
+function UpdateCanvasRootHandler(canvas, modeling) {
+ this._canvas = canvas;
+ this._modeling = modeling;
+}
- var _ModelUtil = require("../../util/ModelUtil");
+UpdateCanvasRootHandler.$inject = [
+ 'canvas',
+ 'modeling'
+];
- var _minDash = require("min-dash");
- function copyProperties(source, target, properties) {
- if (!(0, _minDash.isArray)(properties)) {
- properties = [properties];
- }
+UpdateCanvasRootHandler.prototype.execute = function(context) {
- (0, _minDash.forEach)(properties, function (property) {
- if (!(0, _minDash.isUndefined)(source[property])) {
- target[property] = source[property];
- }
- });
- }
+ var canvas = this._canvas;
- function removeProperties(element, properties) {
- if (!(0, _minDash.isArray)(properties)) {
- properties = [properties];
- }
+ var newRoot = context.newRoot,
+ newRootBusinessObject = newRoot.businessObject,
+ oldRoot = canvas.getRootElement(),
+ oldRootBusinessObject = oldRoot.businessObject,
+ bpmnDefinitions = oldRootBusinessObject.$parent,
+ diPlane = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getDi)(oldRoot);
- (0, _minDash.forEach)(properties, function (property) {
- if (element[property]) {
- delete element[property];
- }
- });
- }
+ // (1) replace process old <> new root
+ canvas.setRootElement(newRoot);
+ canvas.removeRootElement(oldRoot);
- var LOW_PRIORITY = 750;
+ // (2) update root elements
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_1__.add)(bpmnDefinitions.rootElements, newRootBusinessObject);
+ newRootBusinessObject.$parent = bpmnDefinitions;
- function BpmnCopyPaste(bpmnFactory, eventBus, moddleCopy) {
- eventBus.on('copyPaste.copyElement', LOW_PRIORITY, function (context) {
- var descriptor = context.descriptor,
- element = context.element;
- var businessObject = descriptor.oldBusinessObject = (0, _ModelUtil.getBusinessObject)(element);
- descriptor.type = element.type;
- copyProperties(businessObject, descriptor, 'name');
- descriptor.di = {}; // fill and stroke will be set to DI
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_1__.remove)(bpmnDefinitions.rootElements, oldRootBusinessObject);
+ oldRootBusinessObject.$parent = null;
- copyProperties(businessObject.di, descriptor.di, ['fill', 'stroke']);
- copyProperties(businessObject.di, descriptor, 'isExpanded');
+ // (3) wire di
+ oldRoot.di = null;
- if (isLabel(descriptor)) {
- return descriptor;
- } // default sequence flow
+ diPlane.bpmnElement = newRootBusinessObject;
+ newRoot.di = diPlane;
+ context.oldRoot = oldRoot;
- if (businessObject.default) {
- descriptor.default = businessObject.default.id;
- }
- });
- eventBus.on('moddleCopy.canCopyProperty', function (context) {
- var parent = context.parent,
- property = context.property,
- propertyName = context.propertyName,
- bpmnProcess;
+ // TODO(nikku): return changed elements?
+ // return [ newRoot, oldRoot ];
+ return [];
+};
- if (propertyName === 'processRef' && (0, _ModelUtil.is)(parent, 'bpmn:Participant') && (0, _ModelUtil.is)(property, 'bpmn:Process')) {
- bpmnProcess = bpmnFactory.create('bpmn:Process'); // return copy of process
- return moddleCopy.copyElement(property, bpmnProcess);
- }
- });
- var references;
+UpdateCanvasRootHandler.prototype.revert = function(context) {
- function resolveReferences(descriptor, cache) {
- var businessObject = (0, _ModelUtil.getBusinessObject)(descriptor); // default sequence flows
+ var canvas = this._canvas;
- if (descriptor.default) {
- // relationship cannot be resolved immediately
- references[descriptor.default] = {
- element: businessObject,
- property: 'default'
- };
- } // boundary events
+ var newRoot = context.newRoot,
+ newRootBusinessObject = newRoot.businessObject,
+ oldRoot = context.oldRoot,
+ oldRootBusinessObject = oldRoot.businessObject,
+ bpmnDefinitions = newRootBusinessObject.$parent,
+ diPlane = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getDi)(newRoot);
+ // (1) replace process old <> new root
+ canvas.setRootElement(oldRoot);
+ canvas.removeRootElement(newRoot);
- if (descriptor.host) {
- // relationship can be resolved immediately
- (0, _ModelUtil.getBusinessObject)(descriptor).attachedToRef = (0, _ModelUtil.getBusinessObject)(cache[descriptor.host]);
- }
+ // (2) update root elements
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_1__.remove)(bpmnDefinitions.rootElements, newRootBusinessObject);
+ newRootBusinessObject.$parent = null;
- references = (0, _minDash.omit)(references, (0, _minDash.reduce)(references, function (array, reference, key) {
- var element = reference.element,
- property = reference.property;
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_1__.add)(bpmnDefinitions.rootElements, oldRootBusinessObject);
+ oldRootBusinessObject.$parent = bpmnDefinitions;
- if (key === descriptor.id) {
- element[property] = businessObject;
- array.push(descriptor.id);
- }
+ // (3) wire di
+ newRoot.di = null;
- return array;
- }, []));
- }
+ diPlane.bpmnElement = oldRootBusinessObject;
+ oldRoot.di = diPlane;
- eventBus.on('copyPaste.pasteElements', function () {
- references = {};
- });
- eventBus.on('copyPaste.pasteElement', function (context) {
- var cache = context.cache,
- descriptor = context.descriptor,
- oldBusinessObject = descriptor.oldBusinessObject,
- newBusinessObject; // do NOT copy business object if external label
-
- if (isLabel(descriptor)) {
- descriptor.businessObject = (0, _ModelUtil.getBusinessObject)(cache[descriptor.labelTarget]);
- return;
- }
+ // TODO(nikku): return changed elements?
+ // return [ newRoot, oldRoot ];
- newBusinessObject = bpmnFactory.create(oldBusinessObject.$type);
- descriptor.businessObject = moddleCopy.copyElement(oldBusinessObject, newBusinessObject); // resolve references e.g. default sequence flow
+ return [];
+};
- resolveReferences(descriptor, cache);
- copyProperties(descriptor, newBusinessObject, ['isExpanded', 'name']);
- removeProperties(descriptor, 'oldBusinessObject');
- });
- }
+/***/ }),
- BpmnCopyPaste.$inject = ['bpmnFactory', 'eventBus', 'moddleCopy']; // helpers //////////
+/***/ "../node_modules/bpmn-js/lib/features/modeling/cmd/UpdateFlowNodeRefsHandler.js":
+/*!**************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/cmd/UpdateFlowNodeRefsHandler.js ***!
+ \**************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- function isLabel(element) {
- return !!element.labelTarget;
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ UpdateFlowNodeRefsHandler)
+/* harmony export */ });
+/* harmony import */ var _util_LaneUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/LaneUtil */ "../node_modules/bpmn-js/lib/features/modeling/util/LaneUtil.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/util/Collections */ "../node_modules/diagram-js/lib/util/Collections.js");
+/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
- },{"../../util/ModelUtil":240,"min-dash":646}],132:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = ModdleCopy;
- exports.getPropertyNames = getPropertyNames;
- var _minDash = require("min-dash");
- var DISALLOWED_PROPERTIES = ['artifacts', 'dataInputAssociations', 'dataOutputAssociations', 'default', 'flowElements', 'lanes', 'incoming', 'outgoing'];
- /**
- * @typedef {Function} listener
- *
- * @param {Object} context
- * @param {Array} context.propertyNames
- * @param {ModdleElement} context.sourceElement
- * @param {ModdleElement} context.targetElement
- *
- * @returns {Array|boolean} - Return properties to be copied or false to disallow
- * copying.
- */
- /**
- * @typedef {Function} listener
- *
- * @param {Object} context
- * @param {ModdleElement} context.parent
- * @param {*} context.property
- * @param {string} context.propertyName
- *
- * @returns {*|boolean} - Return copied property or false to disallow
- * copying.
- */
- /**
- * @typedef {Function} listener
- *
- * @param {Object} context
- * @param {ModdleElement} context.parent
- * @param {*} context.property
- * @param {string} context.propertyName
- *
- * @returns {boolean} - Return false to disallow
- * setting copied property.
- */
- /**
- * Utility for copying model properties from source element to target element.
- *
- * @param {EventBus} eventBus
- * @param {BpmnFactory} bpmnFactory
- * @param {BpmnModdle} moddle
- */
- function ModdleCopy(eventBus, bpmnFactory, moddle) {
- this._bpmnFactory = bpmnFactory;
- this._eventBus = eventBus;
- this._moddle = moddle; // copy extension elements last
+/**
+ * @typedef {import('diagram-js/lib/command/CommandHandler').default} CommandHandler
+ *
+ * @typedef {import('diagram-js/lib/core/ElementRegistry').default} ElementRegistry
+ *
+ * @typedef {import('../../../model/Types').Shape} Shape
+ */
- eventBus.on('moddleCopy.canCopyProperties', function (context) {
- var propertyNames = context.propertyNames;
+var FLOW_NODE_REFS_ATTR = 'flowNodeRef',
+ LANES_ATTR = 'lanes';
- if (!propertyNames || !propertyNames.length) {
- return;
- }
- return (0, _minDash.sortBy)(propertyNames, function (propertyName) {
- return propertyName === 'extensionElements';
- });
- }); // default check whether property can be copied
+/**
+ * A handler that updates lane refs on changed elements.
+ *
+ * @implements {CommandHandler}
+ *
+ * @param {ElementRegistry} elementRegistry
+ */
+function UpdateFlowNodeRefsHandler(elementRegistry) {
+ this._elementRegistry = elementRegistry;
+}
- eventBus.on('moddleCopy.canCopyProperty', function (context) {
- var parent = context.parent,
- parentDescriptor = (0, _minDash.isObject)(parent) && parent.$descriptor,
- propertyName = context.propertyName;
+UpdateFlowNodeRefsHandler.$inject = [
+ 'elementRegistry'
+];
- if (propertyName && DISALLOWED_PROPERTIES.indexOf(propertyName) !== -1) {
- // disallow copying property
- return false;
- }
+/**
+ * @param {Shape} flowNodeShapes
+ * @param {Shape} laneShapes
+ *
+ * @return { {
+ * flowNode: Shape;
+ * add: Shape[];
+ * remove: Shape[];
+ * }[] }
+ */
+UpdateFlowNodeRefsHandler.prototype._computeUpdates = function(flowNodeShapes, laneShapes) {
- if (propertyName && parentDescriptor && !(0, _minDash.find)(parentDescriptor.properties, (0, _minDash.matchPattern)({
- name: propertyName
- }))) {
- // disallow copying property
- return false;
- }
- }); // do NOT allow to copy empty extension elements
+ var handledNodes = [];
- eventBus.on('moddleCopy.canSetCopiedProperty', function (context) {
- var property = context.property;
+ var updates = [];
- if (is(property, 'bpmn:ExtensionElements') && (!property.values || !property.values.length)) {
- // disallow setting copied property
- return false;
- }
- });
- }
+ var participantCache = {};
- ModdleCopy.$inject = ['eventBus', 'bpmnFactory', 'moddle'];
- /**
- * Copy model properties of source element to target element.
- *
- * @param {ModdleElement} sourceElement
- * @param {ModdleElement} targetElement
- * @param {Array} [propertyNames]
- *
- * @param {ModdleElement}
- */
+ var allFlowNodeShapes = [];
- ModdleCopy.prototype.copyElement = function (sourceElement, targetElement, propertyNames) {
- var self = this;
+ function isInLaneShape(element, laneShape) {
- if (propertyNames && !(0, _minDash.isArray)(propertyNames)) {
- propertyNames = [propertyNames];
- }
+ var laneTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.asTRBL)(laneShape);
- propertyNames = propertyNames || getPropertyNames(sourceElement.$descriptor);
+ var elementMid = {
+ x: element.x + element.width / 2,
+ y: element.y + element.height / 2
+ };
- var canCopyProperties = this._eventBus.fire('moddleCopy.canCopyProperties', {
- propertyNames: propertyNames,
- sourceElement: sourceElement,
- targetElement: targetElement
- });
+ return elementMid.x > laneTrbl.left &&
+ elementMid.x < laneTrbl.right &&
+ elementMid.y > laneTrbl.top &&
+ elementMid.y < laneTrbl.bottom;
+ }
- if (canCopyProperties === false) {
- return targetElement;
- }
+ function addFlowNodeShape(flowNodeShape) {
+ if (handledNodes.indexOf(flowNodeShape) === -1) {
+ allFlowNodeShapes.push(flowNodeShape);
+ handledNodes.push(flowNodeShape);
+ }
+ }
- if ((0, _minDash.isArray)(canCopyProperties)) {
- propertyNames = canCopyProperties;
- } // copy properties
+ function getAllLaneShapes(flowNodeShape) {
+ var root = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_1__.getLanesRoot)(flowNodeShape);
- (0, _minDash.forEach)(propertyNames, function (propertyName) {
- var sourceProperty;
+ if (!participantCache[root.id]) {
+ participantCache[root.id] = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_1__.collectLanes)(root);
+ }
- if ((0, _minDash.has)(sourceElement, propertyName)) {
- sourceProperty = sourceElement.get(propertyName);
- }
+ return participantCache[root.id];
+ }
- var copiedProperty = self.copyProperty(sourceProperty, targetElement, propertyName);
+ function getNewLanes(flowNodeShape) {
+ if (!flowNodeShape.parent) {
+ return [];
+ }
- var canSetProperty = self._eventBus.fire('moddleCopy.canSetCopiedProperty', {
- parent: targetElement,
- property: copiedProperty,
- propertyName: propertyName
- });
+ var allLaneShapes = getAllLaneShapes(flowNodeShape);
- if (canSetProperty === false) {
- return;
- }
+ return allLaneShapes.filter(function(l) {
+ return isInLaneShape(flowNodeShape, l);
+ }).map(function(shape) {
+ return shape.businessObject;
+ });
+ }
- if ((0, _minDash.isDefined)(copiedProperty)) {
- targetElement.set(propertyName, copiedProperty);
- }
- });
- return targetElement;
- };
- /**
- * Copy model property.
- *
- * @param {*} property
- * @param {ModdleElement} parent
- * @param {string} propertyName
- *
- * @returns {*}
- */
+ laneShapes.forEach(function(laneShape) {
+ var root = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_1__.getLanesRoot)(laneShape);
+ if (!root || handledNodes.indexOf(root) !== -1) {
+ return;
+ }
- ModdleCopy.prototype.copyProperty = function (property, parent, propertyName) {
- var self = this; // allow others to copy property
+ var children = root.children.filter(function(c) {
+ return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(c, 'bpmn:FlowNode');
+ });
- var copiedProperty = this._eventBus.fire('moddleCopy.canCopyProperty', {
- parent: parent,
- property: property,
- propertyName: propertyName
- }); // return if copying is NOT allowed
+ children.forEach(addFlowNodeShape);
+ handledNodes.push(root);
+ });
- if (copiedProperty === false) {
- return;
- }
+ flowNodeShapes.forEach(addFlowNodeShape);
- if (copiedProperty) {
- if ((0, _minDash.isObject)(copiedProperty) && copiedProperty.$type && !copiedProperty.$parent) {
- copiedProperty.$parent = parent;
- }
- return copiedProperty;
- }
+ allFlowNodeShapes.forEach(function(flowNodeShape) {
- var propertyDescriptor = this._moddle.getPropertyDescriptor(parent, propertyName); // do NOT copy Ids and references
+ var flowNode = flowNodeShape.businessObject;
+ var lanes = flowNode.get(LANES_ATTR),
+ remove = lanes.slice(),
+ add = getNewLanes(flowNodeShape);
- if (propertyDescriptor.isId || propertyDescriptor.isReference) {
- return;
- } // copy arrays
+ updates.push({ flowNode: flowNode, remove: remove, add: add });
+ });
+ laneShapes.forEach(function(laneShape) {
- if ((0, _minDash.isArray)(property)) {
- return (0, _minDash.reduce)(property, function (childProperties, childProperty) {
- // recursion
- copiedProperty = self.copyProperty(childProperty, parent, propertyName); // copying might NOT be allowed
+ var lane = laneShape.businessObject;
- if (copiedProperty) {
- copiedProperty.$parent = parent;
- return childProperties.concat(copiedProperty);
- }
+ // lane got removed XX-)
+ if (!laneShape.parent) {
+ lane.get(FLOW_NODE_REFS_ATTR).forEach(function(flowNode) {
+ updates.push({ flowNode: flowNode, remove: [ lane ], add: [] });
+ });
+ }
+ });
- return childProperties;
- }, []);
- } // copy model elements
+ return updates;
+};
+UpdateFlowNodeRefsHandler.prototype.execute = function(context) {
- if ((0, _minDash.isObject)(property) && property.$type) {
- if (this._moddle.getElementDescriptor(property).isGeneric) {
- return;
- }
+ var updates = context.updates;
- copiedProperty = self._bpmnFactory.create(property.$type);
- copiedProperty.$parent = parent; // recursion
+ if (!updates) {
+ updates = context.updates = this._computeUpdates(context.flowNodeShapes, context.laneShapes);
+ }
- copiedProperty = self.copyElement(property, copiedProperty);
- return copiedProperty;
- } // copy primitive properties
+ updates.forEach(function(update) {
- return property;
- }; // helpers //////////
+ var flowNode = update.flowNode,
+ lanes = flowNode.get(LANES_ATTR);
+ // unwire old
+ update.remove.forEach(function(oldLane) {
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__.remove)(lanes, oldLane);
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__.remove)(oldLane.get(FLOW_NODE_REFS_ATTR), flowNode);
+ });
- function getPropertyNames(descriptor, keepDefaultProperties) {
- return (0, _minDash.reduce)(descriptor.properties, function (properties, property) {
- if (keepDefaultProperties && property.default) {
- return properties;
- }
+ // wire new
+ update.add.forEach(function(newLane) {
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__.add)(lanes, newLane);
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__.add)(newLane.get(FLOW_NODE_REFS_ATTR), flowNode);
+ });
+ });
- return properties.concat(property.name);
- }, []);
- }
+ // TODO(nikku): return changed elements
+ // return [ ... ];
- function is(element, type) {
- return element && typeof element.$instanceOf === 'function' && element.$instanceOf(type);
- }
+ return [];
+};
- },{"min-dash":646}],133:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+UpdateFlowNodeRefsHandler.prototype.revert = function(context) {
- var _copyPaste = _interopRequireDefault(require("diagram-js/lib/features/copy-paste"));
+ var updates = context.updates;
- var _BpmnCopyPaste = _interopRequireDefault(require("./BpmnCopyPaste"));
+ updates.forEach(function(update) {
- var _ModdleCopy = _interopRequireDefault(require("./ModdleCopy"));
+ var flowNode = update.flowNode,
+ lanes = flowNode.get(LANES_ATTR);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ // unwire new
+ update.add.forEach(function(newLane) {
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__.remove)(lanes, newLane);
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__.remove)(newLane.get(FLOW_NODE_REFS_ATTR), flowNode);
+ });
- var _default = {
- __depends__: [_copyPaste.default],
- __init__: ['bpmnCopyPaste', 'moddleCopy'],
- bpmnCopyPaste: ['type', _BpmnCopyPaste.default],
- moddleCopy: ['type', _ModdleCopy.default]
- };
- exports.default = _default;
+ // wire old
+ update.remove.forEach(function(oldLane) {
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__.add)(lanes, oldLane);
+ (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__.add)(oldLane.get(FLOW_NODE_REFS_ATTR), flowNode);
+ });
+ });
- },{"./BpmnCopyPaste":131,"./ModdleCopy":132,"diagram-js/lib/features/copy-paste":294}],134:[function(require,module,exports){
- "use strict";
+ // TODO(nikku): return changed elements
+ // return [ ... ];
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BpmnDiOrdering;
+ return [];
+};
- var _BpmnRenderUtil = require("../../draw/BpmnRenderUtil");
- var _ModelUtil = require("../../util/ModelUtil");
+/***/ }),
- var _minDash = require("min-dash");
+/***/ "../node_modules/bpmn-js/lib/features/modeling/cmd/UpdateModdlePropertiesHandler.js":
+/*!******************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/cmd/UpdateModdlePropertiesHandler.js ***!
+ \******************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var _Elements = require("diagram-js/lib/util/Elements");
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ UpdateModdlePropertiesHandler)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- var HIGH_PRIORITY = 2000;
- function BpmnDiOrdering(eventBus, canvas) {
- eventBus.on('saveXML.start', HIGH_PRIORITY, orderDi);
- function orderDi() {
- var root = canvas.getRootElement(),
- rootDi = (0, _ModelUtil.getBusinessObject)(root).di,
- elements,
- diElements;
- elements = (0, _Elements.selfAndAllChildren)([root], false); // only bpmndi:Shape and bpmndi:Edge can be direct children of bpmndi:Plane
- elements = (0, _minDash.filter)(elements, function (element) {
- return element !== root && !element.labelTarget;
- });
- diElements = (0, _minDash.map)(elements, _BpmnRenderUtil.getDi);
- rootDi.set('planeElement', diElements);
- }
- }
+/**
+ * @typedef {import('diagram-js/lib/command/CommandHandler').default} CommandHandler
+ *
+ * @typedef {import('diagram-js/lib/core/ElementRegistry').default} ElementRegistry
+ *
+ * @typedef {import('../../../model/Types').Shape} Shape
+ * @typedef {import('../../../model/Types').ModdleElement} ModdleElement
+ */
- BpmnDiOrdering.$inject = ['eventBus', 'canvas'];
+/**
+ * @implements {CommandHandler}
+ *
+ * @param {ElementRegistry} elementRegistry
+ */
+function UpdateModdlePropertiesHandler(elementRegistry) {
+ this._elementRegistry = elementRegistry;
+}
- },{"../../draw/BpmnRenderUtil":118,"../../util/ModelUtil":240,"diagram-js/lib/util/Elements":420,"min-dash":646}],135:[function(require,module,exports){
- "use strict";
+UpdateModdlePropertiesHandler.$inject = [ 'elementRegistry' ];
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+UpdateModdlePropertiesHandler.prototype.execute = function(context) {
- var _BpmnDiOrdering = _interopRequireDefault(require("../di-ordering/BpmnDiOrdering"));
+ var element = context.element,
+ moddleElement = context.moddleElement,
+ properties = context.properties;
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ if (!moddleElement) {
+ throw new Error(' required');
+ }
- var _default = {
- __init__: ['bpmnDiOrdering'],
- bpmnDiOrdering: ['type', _BpmnDiOrdering.default]
- };
- exports.default = _default;
+ // TODO(nikku): we need to ensure that ID properties
+ // are properly registered / unregistered via
+ // this._moddle.ids.assigned(id)
+ var changed = context.changed || this._getVisualReferences(moddleElement).concat(element);
+ var oldProperties = context.oldProperties || getModdleProperties(moddleElement, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.keys)(properties));
- },{"../di-ordering/BpmnDiOrdering":134}],136:[function(require,module,exports){
- "use strict";
+ setModdleProperties(moddleElement, properties);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BpmnDistributeElements;
+ context.oldProperties = oldProperties;
+ context.changed = changed;
- var _minDash = require("min-dash");
+ return changed;
+};
- var _ModelingUtil = require("../modeling/util/ModelingUtil");
+UpdateModdlePropertiesHandler.prototype.revert = function(context) {
+ var oldProperties = context.oldProperties,
+ moddleElement = context.moddleElement,
+ changed = context.changed;
- /**
- * Registers element exclude filters for elements that
- * currently do not support distribution.
- */
- function BpmnDistributeElements(distributeElements) {
- distributeElements.registerFilter(function (elements) {
- return (0, _minDash.filter)(elements, function (element) {
- var cannotDistribute = (0, _ModelingUtil.isAny)(element, ['bpmn:Association', 'bpmn:BoundaryEvent', 'bpmn:DataInputAssociation', 'bpmn:DataOutputAssociation', 'bpmn:Lane', 'bpmn:MessageFlow', 'bpmn:Participant', 'bpmn:SequenceFlow', 'bpmn:TextAnnotation']);
- return !(element.labelTarget || cannotDistribute);
- });
- });
- }
+ setModdleProperties(moddleElement, oldProperties);
- BpmnDistributeElements.$inject = ['distributeElements'];
+ return changed;
+};
- },{"../modeling/util/ModelingUtil":211,"min-dash":646}],137:[function(require,module,exports){
- "use strict";
+/**
+ * Return visual references of given moddle element within the diagram.
+ *
+ * @param {ModdleElement} moddleElement
+ *
+ * @return {Shape[]}
+ */
+UpdateModdlePropertiesHandler.prototype._getVisualReferences = function(moddleElement) {
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+ var elementRegistry = this._elementRegistry;
- var _distributeElements = _interopRequireDefault(require("diagram-js/lib/features/distribute-elements"));
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(moddleElement, 'bpmn:DataObject')) {
+ return getAllDataObjectReferences(moddleElement, elementRegistry);
+ }
- var _BpmnDistributeElements = _interopRequireDefault(require("./BpmnDistributeElements"));
+ return [];
+};
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var _default = {
- __depends__: [_distributeElements.default],
- __init__: ['bpmnDistributeElements'],
- bpmnDistributeElements: ['type', _BpmnDistributeElements.default]
- };
- exports.default = _default;
+// helpers /////////////////
- },{"./BpmnDistributeElements":136,"diagram-js/lib/features/distribute-elements":299}],138:[function(require,module,exports){
- "use strict";
+function getModdleProperties(moddleElement, propertyNames) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.reduce)(propertyNames, function(result, key) {
+ result[key] = moddleElement.get(key);
+ return result;
+ }, {});
+}
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BpmnEditorActions;
+function setModdleProperties(moddleElement, properties) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(properties, function(value, key) {
+ moddleElement.set(key, value);
+ });
+}
- var _inherits = _interopRequireDefault(require("inherits"));
+function getAllDataObjectReferences(dataObject, elementRegistry) {
+ return elementRegistry.filter(function(element) {
+ return (
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(element, 'bpmn:DataObjectReference') &&
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(element).dataObjectRef === dataObject
+ );
+ });
+}
- var _EditorActions = _interopRequireDefault(require("diagram-js/lib/features/editor-actions/EditorActions"));
- var _minDash = require("min-dash");
+/***/ }),
- var _ModelUtil = require("../../util/ModelUtil");
+/***/ "../node_modules/bpmn-js/lib/features/modeling/cmd/UpdatePropertiesHandler.js":
+/*!************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/cmd/UpdatePropertiesHandler.js ***!
+ \************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var _Elements = require("diagram-js/lib/util/Elements");
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ UpdatePropertiesHandler)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- /**
- * Registers and executes BPMN specific editor actions.
- *
- * @param {Injector} injector
- */
- function BpmnEditorActions(injector) {
- injector.invoke(_EditorActions.default, this);
- }
- (0, _inherits.default)(BpmnEditorActions, _EditorActions.default);
- BpmnEditorActions.$inject = ['injector'];
- /**
- * Register default actions.
- *
- * @param {Injector} injector
- */
- BpmnEditorActions.prototype._registerDefaultActions = function (injector) {
- // (0) invoke super method
- _EditorActions.default.prototype._registerDefaultActions.call(this, injector); // (1) retrieve optional components to integrate with
-
-
- var canvas = injector.get('canvas', false);
- var elementRegistry = injector.get('elementRegistry', false);
- var selection = injector.get('selection', false);
- var spaceTool = injector.get('spaceTool', false);
- var lassoTool = injector.get('lassoTool', false);
- var handTool = injector.get('handTool', false);
- var globalConnect = injector.get('globalConnect', false);
- var distributeElements = injector.get('distributeElements', false);
- var alignElements = injector.get('alignElements', false);
- var directEditing = injector.get('directEditing', false);
- var searchPad = injector.get('searchPad', false);
- var modeling = injector.get('modeling', false); // (2) check components and register actions
-
- if (canvas && elementRegistry && selection) {
- this._registerAction('selectElements', function () {
- // select all elements except for the invisible
- // root element
- var rootElement = canvas.getRootElement();
- var elements = elementRegistry.filter(function (element) {
- return element !== rootElement;
- });
- selection.select(elements);
- return elements;
- });
- }
+/**
+ * @typedef {import('diagram-js/lib/command/CommandHandler').default} CommandHandler
+ * @typedef {import('diagram-js/lib/command/CommandStack').CommandContext} CommandContext
+ *
+ * @typedef {import('diagram-js/lib/core/ElementRegistry').default} ElementRegistry
+ * @typedef {import('../../../model/Types').Moddle} Moddle
+ * @typedef {import('diagram-js/lib/i18n/translate/translate').default} Translate
+ * @typedef {import('../Modeling').default} Modeling
+ * @typedef {import('../../../draw/TextRenderer').default} TextRenderer
+ *
+ * @typedef {import('../../../model/Types').Element} Element
+ */
- if (spaceTool) {
- this._registerAction('spaceTool', function () {
- spaceTool.toggle();
- });
- }
+var DEFAULT_FLOW = 'default',
+ ID = 'id',
+ DI = 'di';
- if (lassoTool) {
- this._registerAction('lassoTool', function () {
- lassoTool.toggle();
- });
- }
+var NULL_DIMENSIONS = {
+ width: 0,
+ height: 0
+};
- if (handTool) {
- this._registerAction('handTool', function () {
- handTool.toggle();
- });
- }
+/**
+ * A handler that implements a BPMN 2.0 property update.
+ *
+ * This should be used to set simple properties on elements with
+ * an underlying BPMN business object.
+ *
+ * Use respective diagram-js provided handlers if you would
+ * like to perform automated modeling.
+ *
+ * @implements {CommandHandler}
+ *
+ * @param {ElementRegistry} elementRegistry
+ * @param {Moddle} moddle
+ * @param {Translate} translate
+ * @param {Modeling} modeling
+ * @param {TextRenderer} textRenderer
+ */
+function UpdatePropertiesHandler(
+ elementRegistry, moddle, translate,
+ modeling, textRenderer) {
+
+ this._elementRegistry = elementRegistry;
+ this._moddle = moddle;
+ this._translate = translate;
+ this._modeling = modeling;
+ this._textRenderer = textRenderer;
+}
+
+UpdatePropertiesHandler.$inject = [
+ 'elementRegistry',
+ 'moddle',
+ 'translate',
+ 'modeling',
+ 'textRenderer'
+];
+
+
+// api //////////////////////
+
+/**
+ * Update a BPMN element's properties.
+ *
+ * @param { {
+ * element: Element;
+ * properties: Record;
+ * } & CommandContext } context
+ *
+ * @return {Element[]}
+ */
+UpdatePropertiesHandler.prototype.execute = function(context) {
- if (globalConnect) {
- this._registerAction('globalConnectTool', function () {
- globalConnect.toggle();
- });
- }
+ var element = context.element,
+ changed = [ element ],
+ translate = this._translate;
- if (selection && distributeElements) {
- this._registerAction('distributeElements', function (opts) {
- var currentSelection = selection.get(),
- type = opts.type;
+ if (!element) {
+ throw new Error(translate('element required'));
+ }
- if (currentSelection.length) {
- distributeElements.trigger(currentSelection, type);
- }
- });
- }
+ var elementRegistry = this._elementRegistry,
+ ids = this._moddle.ids;
- if (selection && alignElements) {
- this._registerAction('alignElements', function (opts) {
- var currentSelection = selection.get(),
- aligneableElements = [],
- type = opts.type;
+ var businessObject = element.businessObject,
+ properties = unwrapBusinessObjects(context.properties),
+ oldProperties = context.oldProperties || getProperties(element, properties);
- if (currentSelection.length) {
- aligneableElements = (0, _minDash.filter)(currentSelection, function (element) {
- return !(0, _ModelUtil.is)(element, 'bpmn:Lane');
- });
- alignElements.trigger(aligneableElements, type);
- }
- });
- }
+ if (isIdChange(properties, businessObject)) {
+ ids.unclaim(businessObject[ID]);
- if (selection && modeling) {
- this._registerAction('setColor', function (opts) {
- var currentSelection = selection.get();
+ elementRegistry.updateId(element, properties[ID]);
- if (currentSelection.length) {
- modeling.setColor(currentSelection, opts);
- }
- });
- }
+ ids.claim(properties[ID], businessObject);
+ }
- if (selection && directEditing) {
- this._registerAction('directEditing', function () {
- var currentSelection = selection.get();
+ // correctly indicate visual changes on default flow updates
+ if (DEFAULT_FLOW in properties) {
- if (currentSelection.length) {
- directEditing.activate(currentSelection[0]);
- }
- });
- }
+ if (properties[DEFAULT_FLOW]) {
+ changed.push(elementRegistry.get(properties[DEFAULT_FLOW].id));
+ }
- if (searchPad) {
- this._registerAction('find', function () {
- searchPad.toggle();
- });
- }
+ if (businessObject[DEFAULT_FLOW]) {
+ changed.push(elementRegistry.get(businessObject[DEFAULT_FLOW].id));
+ }
+ }
- if (canvas && modeling) {
- this._registerAction('moveToOrigin', function () {
- var rootElement = canvas.getRootElement(),
- boundingBox,
- elements;
+ // update properties
+ setProperties(element, properties);
- if ((0, _ModelUtil.is)(rootElement, 'bpmn:Collaboration')) {
- elements = elementRegistry.filter(function (element) {
- return (0, _ModelUtil.is)(element.parent, 'bpmn:Collaboration');
- });
- } else {
- elements = elementRegistry.filter(function (element) {
- return element !== rootElement && !(0, _ModelUtil.is)(element.parent, 'bpmn:SubProcess');
- });
- }
+ // store old values
+ context.oldProperties = oldProperties;
+ context.changed = changed;
- boundingBox = (0, _Elements.getBBox)(elements);
- modeling.moveElements(elements, {
- x: -boundingBox.x,
- y: -boundingBox.y
- }, rootElement);
- });
- }
- };
+ // indicate changed on objects affected by the update
+ return changed;
+};
- },{"../../util/ModelUtil":240,"diagram-js/lib/features/editor-actions/EditorActions":303,"diagram-js/lib/util/Elements":420,"inherits":438,"min-dash":646}],139:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+UpdatePropertiesHandler.prototype.postExecute = function(context) {
+ var element = context.element,
+ label = element.label;
- var _editorActions = _interopRequireDefault(require("diagram-js/lib/features/editor-actions"));
+ var text = label && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(label).name;
- var _BpmnEditorActions = _interopRequireDefault(require("./BpmnEditorActions"));
+ if (!text) {
+ return;
+ }
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ // get layouted text bounds and resize external
+ // external label accordingly
+ var newLabelBounds = this._textRenderer.getExternalLabelBounds(label, text);
- var _default = {
- __depends__: [_editorActions.default],
- editorActions: ['type', _BpmnEditorActions.default]
- };
- exports.default = _default;
+ this._modeling.resizeShape(label, newLabelBounds, NULL_DIMENSIONS);
+};
- },{"./BpmnEditorActions":138,"diagram-js/lib/features/editor-actions":304}],140:[function(require,module,exports){
- "use strict";
+/**
+ * Revert updating a BPMN element's properties.
+ *
+ * @param { {
+ * element: Element;
+ * properties: Record;
+ * oldProperties: Record;
+ * } & CommandContext } context
+ *
+ * @return {Element[]}
+ */
+UpdatePropertiesHandler.prototype.revert = function(context) {
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BpmnGridSnapping;
+ var element = context.element,
+ properties = context.properties,
+ oldProperties = context.oldProperties,
+ businessObject = element.businessObject,
+ elementRegistry = this._elementRegistry,
+ ids = this._moddle.ids;
- var _ModelingUtil = require("../modeling/util/ModelingUtil");
+ // update properties
+ setProperties(element, oldProperties);
- function BpmnGridSnapping(eventBus) {
- eventBus.on(['create.init', 'shape.move.init'], function (event) {
- var context = event.context,
- shape = event.shape;
+ if (isIdChange(properties, businessObject)) {
+ ids.unclaim(properties[ID]);
- if ((0, _ModelingUtil.isAny)(shape, ['bpmn:Participant', 'bpmn:SubProcess', 'bpmn:TextAnnotation'])) {
- if (!context.gridSnappingContext) {
- context.gridSnappingContext = {};
- }
+ elementRegistry.updateId(element, oldProperties[ID]);
- context.gridSnappingContext.snapLocation = 'top-left';
- }
- });
- }
+ ids.claim(oldProperties[ID], businessObject);
+ }
- BpmnGridSnapping.$inject = ['eventBus'];
+ return context.changed;
+};
- },{"../modeling/util/ModelingUtil":211}],141:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = AutoPlaceBehavior;
+function isIdChange(properties, businessObject) {
+ return ID in properties && properties[ID] !== businessObject[ID];
+}
- var _BpmnAutoPlaceUtil = require("../../auto-place/BpmnAutoPlaceUtil");
- var _LayoutUtil = require("diagram-js/lib/layout/LayoutUtil");
+function getProperties(element, properties) {
+ var propertyNames = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.keys)(properties),
+ businessObject = element.businessObject,
+ di = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getDi)(element);
- var _ModelUtil = require("../../../util/ModelUtil");
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.reduce)(propertyNames, function(result, key) {
- var HIGH_PRIORITY = 2000;
+ // handle DI separately
+ if (key !== DI) {
+ result[key] = businessObject.get(key);
- function AutoPlaceBehavior(eventBus, gridSnapping) {
- eventBus.on('autoPlace', HIGH_PRIORITY, function (context) {
- var source = context.source,
- sourceMid = (0, _LayoutUtil.getMid)(source),
- shape = context.shape;
- var position = (0, _BpmnAutoPlaceUtil.getNewShapePosition)(source, shape);
- ['x', 'y'].forEach(function (axis) {
- var options = {}; // do not snap if x/y equal
+ } else {
+ result[key] = getDiProperties(di, (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.keys)(properties.di));
+ }
- if (position[axis] === sourceMid[axis]) {
- return;
- }
+ return result;
+ }, {});
+}
- if (position[axis] > sourceMid[axis]) {
- options.min = position[axis];
- } else {
- options.max = position[axis];
- }
- if ((0, _ModelUtil.is)(shape, 'bpmn:TextAnnotation')) {
- if (isHorizontal(axis)) {
- options.offset = -shape.width / 2;
- } else {
- options.offset = -shape.height / 2;
- }
- }
+function getDiProperties(di, propertyNames) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.reduce)(propertyNames, function(result, key) {
+ result[key] = di && di.get(key);
- position[axis] = gridSnapping.snapValue(position[axis], options);
- }); // must be returned to be considered by auto place
+ return result;
+ }, {});
+}
- return position;
- });
- }
- AutoPlaceBehavior.$inject = ['eventBus', 'gridSnapping']; // helpers //////////
+function setProperties(element, properties) {
+ var businessObject = element.businessObject,
+ di = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getDi)(element);
- function isHorizontal(axis) {
- return axis === 'x';
- }
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(properties, function(value, key) {
- },{"../../../util/ModelUtil":240,"../../auto-place/BpmnAutoPlaceUtil":124,"diagram-js/lib/layout/LayoutUtil":405}],142:[function(require,module,exports){
- "use strict";
+ if (key !== DI) {
+ businessObject.set(key, value);
+ } else {
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = CreateParticipantBehavior;
+ // only update, if di exists
+ if (di) {
+ setDiProperties(di, value);
+ }
+ }
+ });
+}
- var _ModelUtil = require("../../../util/ModelUtil");
- var HIGHER_PRIORITY = 1750;
+function setDiProperties(di, properties) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(properties, function(value, key) {
+ di.set(key, value);
+ });
+}
- function CreateParticipantBehavior(canvas, eventBus, gridSnapping) {
- eventBus.on(['create.start', 'shape.move.start'], HIGHER_PRIORITY, function (event) {
- var context = event.context,
- shape = context.shape,
- rootElement = canvas.getRootElement();
- if (!(0, _ModelUtil.is)(shape, 'bpmn:Participant') || !(0, _ModelUtil.is)(rootElement, 'bpmn:Process') || !rootElement.children.length) {
- return;
- }
+var referencePropertyNames = [ 'default' ];
- var createConstraints = context.createConstraints;
+/**
+ * Make sure we unwrap the actual business object behind diagram element that
+ * may have been passed as arguments.
+ *
+ * @param {Record} properties
+ *
+ * @return {Record} unwrappedProps
+ */
+function unwrapBusinessObjects(properties) {
+
+ var unwrappedProps = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)({}, properties);
+
+ referencePropertyNames.forEach(function(name) {
+ if (name in properties) {
+ unwrappedProps[name] = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(unwrappedProps[name]);
+ }
+ });
+
+ return unwrappedProps;
+}
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/features/modeling/cmd/UpdateSemanticParentHandler.js":
+/*!****************************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/cmd/UpdateSemanticParentHandler.js ***!
+ \****************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ UpdateSemanticParentHandler)
+/* harmony export */ });
+/**
+ * @typedef {import('diagram-js/lib/command/CommandHandler').default} CommandHandler
+ *
+ * @typedef {import('../BpmnUpdater').default} BpmnUpdater
+ */
- if (!createConstraints) {
- return;
- }
+/**
+ * @implements {CommandHandler}
+ *
+ * @param {BpmnUpdater} bpmnUpdater
+ */
+function UpdateSemanticParentHandler(bpmnUpdater) {
+ this._bpmnUpdater = bpmnUpdater;
+}
- shape.width = gridSnapping.snapValue(shape.width, {
- min: shape.width
- });
- shape.height = gridSnapping.snapValue(shape.height, {
- min: shape.height
- });
- });
- }
+UpdateSemanticParentHandler.$inject = [ 'bpmnUpdater' ];
- CreateParticipantBehavior.$inject = ['canvas', 'eventBus', 'gridSnapping'];
- },{"../../../util/ModelUtil":240}],143:[function(require,module,exports){
- "use strict";
+UpdateSemanticParentHandler.prototype.execute = function(context) {
+ var dataStoreBo = context.dataStoreBo,
+ dataStoreDi = context.dataStoreDi,
+ newSemanticParent = context.newSemanticParent,
+ newDiParent = context.newDiParent;
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = LayoutConnectionBehavior;
+ context.oldSemanticParent = dataStoreBo.$parent;
+ context.oldDiParent = dataStoreDi.$parent;
- var _inherits = _interopRequireDefault(require("inherits"));
+ // update semantic parent
+ this._bpmnUpdater.updateSemanticParent(dataStoreBo, newSemanticParent);
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+ // update DI parent
+ this._bpmnUpdater.updateDiParent(dataStoreDi, newDiParent);
- var _Geometry = require("diagram-js/lib/util/Geometry");
+ return [];
+};
- var _minDash = require("min-dash");
+UpdateSemanticParentHandler.prototype.revert = function(context) {
+ var dataStoreBo = context.dataStoreBo,
+ dataStoreDi = context.dataStoreDi,
+ oldSemanticParent = context.oldSemanticParent,
+ oldDiParent = context.oldDiParent;
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ // update semantic parent
+ this._bpmnUpdater.updateSemanticParent(dataStoreBo, oldSemanticParent);
- var HIGH_PRIORITY = 3000;
- /**
- * Snaps connections with Manhattan layout.
- */
+ // update DI parent
+ this._bpmnUpdater.updateDiParent(dataStoreDi, oldDiParent);
- function LayoutConnectionBehavior(eventBus, gridSnapping, modeling) {
- _CommandInterceptor.default.call(this, eventBus);
+ return [];
+};
- this._gridSnapping = gridSnapping;
- var self = this;
- this.postExecuted(['connection.create', 'connection.layout'], HIGH_PRIORITY, function (event) {
- var context = event.context,
- connection = context.connection,
- hints = context.hints || {},
- waypoints = connection.waypoints;
- if (hints.connectionStart || hints.connectionEnd || hints.createElementsBehavior === false) {
- return;
- }
- if (!hasMiddleSegments(waypoints)) {
- return;
- }
+/***/ }),
- modeling.updateWaypoints(connection, self.snapMiddleSegments(waypoints));
- });
- }
+/***/ "../node_modules/bpmn-js/lib/features/modeling/index.js":
+/*!**************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/index.js ***!
+ \**************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- LayoutConnectionBehavior.$inject = ['eventBus', 'gridSnapping', 'modeling'];
- (0, _inherits.default)(LayoutConnectionBehavior, _CommandInterceptor.default);
- /**
- * Snap middle segments of a given connection.
- *
- * @param {Array} waypoints
- *
- * @returns {Array}
- */
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _behavior__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./behavior */ "../node_modules/bpmn-js/lib/features/modeling/behavior/index.js");
+/* harmony import */ var _rules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../rules */ "../node_modules/bpmn-js/lib/features/rules/index.js");
+/* harmony import */ var _di_ordering__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../di-ordering */ "../node_modules/bpmn-js/lib/features/di-ordering/index.js");
+/* harmony import */ var _ordering__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ordering */ "../node_modules/bpmn-js/lib/features/ordering/index.js");
+/* harmony import */ var _replace__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../replace */ "../node_modules/bpmn-js/lib/features/replace/index.js");
+/* harmony import */ var _space_tool__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../space-tool */ "../node_modules/bpmn-js/lib/features/space-tool/index.js");
+/* harmony import */ var diagram_js_lib_command__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! diagram-js/lib/command */ "../node_modules/diagram-js/lib/command/index.js");
+/* harmony import */ var diagram_js_lib_features_label_support__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! diagram-js/lib/features/label-support */ "../node_modules/diagram-js/lib/features/label-support/index.js");
+/* harmony import */ var diagram_js_lib_features_attach_support__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! diagram-js/lib/features/attach-support */ "../node_modules/diagram-js/lib/features/attach-support/index.js");
+/* harmony import */ var diagram_js_lib_features_selection__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! diagram-js/lib/features/selection */ "../node_modules/diagram-js/lib/features/selection/index.js");
+/* harmony import */ var diagram_js_lib_features_change_support__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! diagram-js/lib/features/change-support */ "../node_modules/diagram-js/lib/features/change-support/index.js");
+/* harmony import */ var _BpmnFactory__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./BpmnFactory */ "../node_modules/bpmn-js/lib/features/modeling/BpmnFactory.js");
+/* harmony import */ var _BpmnUpdater__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./BpmnUpdater */ "../node_modules/bpmn-js/lib/features/modeling/BpmnUpdater.js");
+/* harmony import */ var _ElementFactory__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./ElementFactory */ "../node_modules/bpmn-js/lib/features/modeling/ElementFactory.js");
+/* harmony import */ var _Modeling__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Modeling */ "../node_modules/bpmn-js/lib/features/modeling/Modeling.js");
+/* harmony import */ var _BpmnLayouter__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./BpmnLayouter */ "../node_modules/bpmn-js/lib/features/modeling/BpmnLayouter.js");
+/* harmony import */ var diagram_js_lib_layout_CroppingConnectionDocking__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! diagram-js/lib/layout/CroppingConnectionDocking */ "../node_modules/diagram-js/lib/layout/CroppingConnectionDocking.js");
- LayoutConnectionBehavior.prototype.snapMiddleSegments = function (waypoints) {
- var gridSnapping = this._gridSnapping,
- snapped;
- waypoints = waypoints.slice();
- for (var i = 1; i < waypoints.length - 2; i++) {
- snapped = snapSegment(gridSnapping, waypoints[i], waypoints[i + 1]);
- waypoints[i] = snapped[0];
- waypoints[i + 1] = snapped[1];
- }
- return waypoints;
- }; // helpers //////////
- /**
- * Check whether a connection has a middle segments.
- *
- * @param {Array} waypoints
- *
- * @returns {boolean}
- */
- function hasMiddleSegments(waypoints) {
- return waypoints.length > 3;
- }
- /**
- * Check whether an alignment is horizontal.
- *
- * @param {string} aligned
- *
- * @returns {boolean}
- */
- function horizontallyAligned(aligned) {
- return aligned === 'h';
- }
- /**
- * Check whether an alignment is vertical.
- *
- * @param {string} aligned
- *
- * @returns {boolean}
- */
- function verticallyAligned(aligned) {
- return aligned === 'v';
- }
- /**
- * Get middle segments from a given connection.
- *
- * @param {Array} waypoints
- *
- * @returns {Array}
- */
- function snapSegment(gridSnapping, segmentStart, segmentEnd) {
- var aligned = (0, _Geometry.pointsAligned)(segmentStart, segmentEnd);
- var snapped = {};
- if (horizontallyAligned(aligned)) {
- // snap horizontally
- snapped.y = gridSnapping.snapValue(segmentStart.y);
- }
- if (verticallyAligned(aligned)) {
- // snap vertically
- snapped.x = gridSnapping.snapValue(segmentStart.x);
- }
- if ('x' in snapped || 'y' in snapped) {
- segmentStart = (0, _minDash.assign)({}, segmentStart, snapped);
- segmentEnd = (0, _minDash.assign)({}, segmentEnd, snapped);
- }
- return [segmentStart, segmentEnd];
- }
- },{"diagram-js/lib/command/CommandInterceptor":250,"diagram-js/lib/util/Geometry":423,"inherits":438,"min-dash":646}],144:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _AutoPlaceBehavior = _interopRequireDefault(require("./AutoPlaceBehavior"));
- var _CreateParticipantBehavior = _interopRequireDefault(require("./CreateParticipantBehavior"));
- var _LayoutConnectionBehavior = _interopRequireDefault(require("./LayoutConnectionBehavior"));
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __init__: [
+ 'modeling',
+ 'bpmnUpdater'
+ ],
+ __depends__: [
+ _behavior__WEBPACK_IMPORTED_MODULE_0__["default"],
+ _rules__WEBPACK_IMPORTED_MODULE_1__["default"],
+ _di_ordering__WEBPACK_IMPORTED_MODULE_2__["default"],
+ _ordering__WEBPACK_IMPORTED_MODULE_3__["default"],
+ _replace__WEBPACK_IMPORTED_MODULE_4__["default"],
+ diagram_js_lib_command__WEBPACK_IMPORTED_MODULE_5__["default"],
+ diagram_js_lib_features_label_support__WEBPACK_IMPORTED_MODULE_6__["default"],
+ diagram_js_lib_features_attach_support__WEBPACK_IMPORTED_MODULE_7__["default"],
+ diagram_js_lib_features_selection__WEBPACK_IMPORTED_MODULE_8__["default"],
+ diagram_js_lib_features_change_support__WEBPACK_IMPORTED_MODULE_9__["default"],
+ _space_tool__WEBPACK_IMPORTED_MODULE_10__["default"]
+ ],
+ bpmnFactory: [ 'type', _BpmnFactory__WEBPACK_IMPORTED_MODULE_11__["default"] ],
+ bpmnUpdater: [ 'type', _BpmnUpdater__WEBPACK_IMPORTED_MODULE_12__["default"] ],
+ elementFactory: [ 'type', _ElementFactory__WEBPACK_IMPORTED_MODULE_13__["default"] ],
+ modeling: [ 'type', _Modeling__WEBPACK_IMPORTED_MODULE_14__["default"] ],
+ layouter: [ 'type', _BpmnLayouter__WEBPACK_IMPORTED_MODULE_15__["default"] ],
+ connectionDocking: [ 'type', diagram_js_lib_layout_CroppingConnectionDocking__WEBPACK_IMPORTED_MODULE_16__["default"] ]
+});
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+/***/ }),
- var _default = {
- __init__: ['gridSnappingAutoPlaceBehavior', 'gridSnappingCreateParticipantBehavior', 'gridSnappingLayoutConnectionBehavior'],
- gridSnappingAutoPlaceBehavior: ['type', _AutoPlaceBehavior.default],
- gridSnappingCreateParticipantBehavior: ['type', _CreateParticipantBehavior.default],
- gridSnappingLayoutConnectionBehavior: ['type', _LayoutConnectionBehavior.default]
- };
- exports.default = _default;
+/***/ "../node_modules/bpmn-js/lib/features/modeling/util/LaneUtil.js":
+/*!**********************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/util/LaneUtil.js ***!
+ \**********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- },{"./AutoPlaceBehavior":141,"./CreateParticipantBehavior":142,"./LayoutConnectionBehavior":143}],145:[function(require,module,exports){
- "use strict";
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ LANE_INDENTATION: () => (/* binding */ LANE_INDENTATION),
+/* harmony export */ collectLanes: () => (/* binding */ collectLanes),
+/* harmony export */ computeLanesResize: () => (/* binding */ computeLanesResize),
+/* harmony export */ getChildLanes: () => (/* binding */ getChildLanes),
+/* harmony export */ getLanesRoot: () => (/* binding */ getLanesRoot)
+/* harmony export */ });
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _ModelingUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ModelingUtil */ "../node_modules/bpmn-js/lib/features/modeling/util/ModelingUtil.js");
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
+/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+/* harmony import */ var diagram_js_lib_features_resize_ResizeUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/resize/ResizeUtil */ "../node_modules/diagram-js/lib/features/resize/ResizeUtil.js");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _BpmnGridSnapping = _interopRequireDefault(require("./BpmnGridSnapping"));
- var _gridSnapping = _interopRequireDefault(require("diagram-js/lib/features/grid-snapping"));
- var _behavior = _interopRequireDefault(require("./behavior"));
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var _default = {
- __depends__: [_gridSnapping.default, _behavior.default],
- __init__: ['bpmnGridSnapping'],
- bpmnGridSnapping: ['type', _BpmnGridSnapping.default]
- };
- exports.default = _default;
- },{"./BpmnGridSnapping":140,"./behavior":144,"diagram-js/lib/features/grid-snapping":312}],146:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BpmnInteractionEvents;
- var _ModelUtil = require("../../util/ModelUtil");
- var _DiUtil = require("../../util/DiUtil");
+/**
+ * @typedef {import('../../../model/Types').Shape} Shape
+ *
+ * @typedef {import('diagram-js/lib/util/Types').Rect} Rect
+ */
- var LABEL_WIDTH = 30,
- LABEL_HEIGHT = 30;
- /**
- * BPMN-specific hit zones and interaction fixes.
- *
- * @param {EventBus} eventBus
- * @param {InteractionEvents} interactionEvents
- */
+var abs = Math.abs;
- function BpmnInteractionEvents(eventBus, interactionEvents) {
- this._interactionEvents = interactionEvents;
- var self = this;
- eventBus.on(['interactionEvents.createHit', 'interactionEvents.updateHit'], function (context) {
- var element = context.element,
- gfx = context.gfx;
-
- if ((0, _ModelUtil.is)(element, 'bpmn:Lane')) {
- return self.createParticipantHit(element, gfx);
- } else if ((0, _ModelUtil.is)(element, 'bpmn:Participant')) {
- if ((0, _DiUtil.isExpanded)(element)) {
- return self.createParticipantHit(element, gfx);
- } else {
- return self.createDefaultHit(element, gfx);
- }
- } else if ((0, _ModelUtil.is)(element, 'bpmn:SubProcess')) {
- if ((0, _DiUtil.isExpanded)(element)) {
- return self.createSubProcessHit(element, gfx);
- } else {
- return self.createDefaultHit(element, gfx);
- }
- }
- });
- }
- BpmnInteractionEvents.$inject = ['eventBus', 'interactionEvents'];
+function getTRBLResize(oldBounds, newBounds) {
+ return (0,diagram_js_lib_features_resize_ResizeUtil__WEBPACK_IMPORTED_MODULE_0__.substractTRBL)((0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(newBounds), (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(oldBounds));
+}
- BpmnInteractionEvents.prototype.createDefaultHit = function (element, gfx) {
- this._interactionEvents.removeHits(gfx);
- this._interactionEvents.createDefaultHit(element, gfx); // indicate that we created a hit
+var LANE_PARENTS = [
+ 'bpmn:Participant',
+ 'bpmn:Process',
+ 'bpmn:SubProcess'
+];
+var LANE_INDENTATION = 30;
- return true;
- };
- BpmnInteractionEvents.prototype.createParticipantHit = function (element, gfx) {
- // remove existing hits
- this._interactionEvents.removeHits(gfx); // add outline hit
+/**
+ * Return all lanes that are children of the given shape.
+ *
+ * @param {Shape} shape
+ * @param {Shape[]} [collectedShapes]
+ *
+ * @return {Shape[]}
+ */
+function collectLanes(shape, collectedShapes) {
+ collectedShapes = collectedShapes || [];
- this._interactionEvents.createBoxHit(gfx, 'click-stroke', {
- width: element.width,
- height: element.height
- }); // add label hit
+ shape.children.filter(function(s) {
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(s, 'bpmn:Lane')) {
+ collectLanes(s, collectedShapes);
+ collectedShapes.push(s);
+ }
+ });
- this._interactionEvents.createBoxHit(gfx, 'all', {
- width: LABEL_WIDTH,
- height: element.height
- }); // indicate that we created a hit
+ return collectedShapes;
+}
- return true;
- };
+/**
+ * Return all lanes that are direct children of the given shape.
+ *
+ * @param {Shape} shape
+ *
+ * @return {Shape[]}
+ */
+function getChildLanes(shape) {
+ return shape.children.filter(function(c) {
+ return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(c, 'bpmn:Lane');
+ });
+}
- BpmnInteractionEvents.prototype.createSubProcessHit = function (element, gfx) {
- // remove existing hits
- this._interactionEvents.removeHits(gfx); // add outline hit
+/**
+ * Return the parent shape of the given lane.
+ *
+ * @param {Shape} shape
+ *
+ * @return {Shape}
+ */
+function getLanesRoot(shape) {
+ return (0,_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.getParent)(shape, LANE_PARENTS) || shape;
+}
- this._interactionEvents.createBoxHit(gfx, 'click-stroke', {
- width: element.width,
- height: element.height
- }); // add label hit
+/**
+ * Compute the required resize operations for lanes
+ * adjacent to the given shape, assuming it will be
+ * resized to the given new bounds.
+ *
+ * @param {Shape} shape
+ * @param {Rect} newBounds
+ *
+ * @return { {
+ * shape: Shape;
+ * newBounds: Rect;
+ * }[] }
+ */
+function computeLanesResize(shape, newBounds) {
+
+ var rootElement = getLanesRoot(shape);
+
+ var initialShapes = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(rootElement, 'bpmn:Process') ? [] : [ rootElement ];
- this._interactionEvents.createBoxHit(gfx, 'all', {
- width: element.width,
- height: LABEL_HEIGHT
- }); // indicate that we created a hit
+ var allLanes = collectLanes(rootElement, initialShapes),
+ shapeTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(shape),
+ shapeNewTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(newBounds),
+ trblResize = getTRBLResize(shape, newBounds),
+ resizeNeeded = [];
+ var isHorizontalLane = (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isHorizontal)(shape);
- return true;
- };
+ allLanes.forEach(function(other) {
- },{"../../util/DiUtil":238,"../../util/ModelUtil":240}],147:[function(require,module,exports){
- "use strict";
+ if (other === shape) {
+ return;
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+ var topResize = isHorizontalLane ? 0 : trblResize.top,
+ rightResize = isHorizontalLane ? trblResize.right : 0,
+ bottomResize = isHorizontalLane ? 0 : trblResize.bottom,
+ leftResize = isHorizontalLane ? trblResize.left : 0;
- var _BpmnInteractionEvents = _interopRequireDefault(require("./BpmnInteractionEvents"));
+ var otherTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(other);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ if (trblResize.top) {
+ if (abs(otherTrbl.bottom - shapeTrbl.top) < 10) {
+ bottomResize = shapeNewTrbl.top - otherTrbl.bottom;
+ }
- var _default = {
- __init__: ['bpmnInteractionEvents'],
- bpmnInteractionEvents: ['type', _BpmnInteractionEvents.default]
- };
- exports.default = _default;
+ if (abs(otherTrbl.top - shapeTrbl.top) < 5) {
+ topResize = shapeNewTrbl.top - otherTrbl.top;
+ }
+ }
- },{"./BpmnInteractionEvents":146}],148:[function(require,module,exports){
- "use strict";
+ if (trblResize.left) {
+ if (abs(otherTrbl.right - shapeTrbl.left) < 10) {
+ rightResize = shapeNewTrbl.left - otherTrbl.right;
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BpmnKeyboardBindings;
+ if (abs(otherTrbl.left - shapeTrbl.left) < 5) {
+ leftResize = shapeNewTrbl.left - otherTrbl.left;
+ }
+ }
- var _inherits = _interopRequireDefault(require("inherits"));
+ if (trblResize.bottom) {
+ if (abs(otherTrbl.top - shapeTrbl.bottom) < 10) {
+ topResize = shapeNewTrbl.bottom - otherTrbl.top;
+ }
- var _KeyboardBindings = _interopRequireDefault(require("diagram-js/lib/features/keyboard/KeyboardBindings"));
+ if (abs(otherTrbl.bottom - shapeTrbl.bottom) < 5) {
+ bottomResize = shapeNewTrbl.bottom - otherTrbl.bottom;
+ }
+ }
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ if (trblResize.right) {
+ if (abs(otherTrbl.left - shapeTrbl.right) < 10) {
+ leftResize = shapeNewTrbl.right - otherTrbl.left;
+ }
- /**
- * BPMN 2.0 specific keyboard bindings.
- *
- * @param {Injector} injector
- */
- function BpmnKeyboardBindings(injector) {
- injector.invoke(_KeyboardBindings.default, this);
- }
+ if (abs(otherTrbl.right - shapeTrbl.right) < 5) {
+ rightResize = shapeNewTrbl.right - otherTrbl.right;
+ }
+ }
- (0, _inherits.default)(BpmnKeyboardBindings, _KeyboardBindings.default);
- BpmnKeyboardBindings.$inject = ['injector'];
- /**
- * Register available keyboard bindings.
- *
- * @param {Keyboard} keyboard
- * @param {EditorActions} editorActions
- */
+ if (topResize || rightResize || bottomResize || leftResize) {
- BpmnKeyboardBindings.prototype.registerBindings = function (keyboard, editorActions) {
- // inherit default bindings
- _KeyboardBindings.default.prototype.registerBindings.call(this, keyboard, editorActions);
- /**
- * Add keyboard binding if respective editor action
- * is registered.
- *
- * @param {string} action name
- * @param {Function} fn that implements the key binding
- */
-
-
- function addListener(action, fn) {
- if (editorActions.isRegistered(action)) {
- keyboard.addListener(fn);
- }
- } // select all elements
- // CTRL + A
+ resizeNeeded.push({
+ shape: other,
+ newBounds: (0,diagram_js_lib_features_resize_ResizeUtil__WEBPACK_IMPORTED_MODULE_0__.resizeTRBL)(other, {
+ top: topResize,
+ right: rightResize,
+ bottom: bottomResize,
+ left: leftResize
+ })
+ });
+ }
+ });
- addListener('selectElements', function (context) {
- var event = context.keyEvent;
+ return resizeNeeded;
+}
- if (keyboard.isKey(['a', 'A'], event) && keyboard.isCmd(event)) {
- editorActions.trigger('selectElements');
- return true;
- }
- }); // search labels
- // CTRL + F
+/***/ }),
- addListener('find', function (context) {
- var event = context.keyEvent;
+/***/ "../node_modules/bpmn-js/lib/features/modeling/util/ModelingUtil.js":
+/*!**************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/modeling/util/ModelingUtil.js ***!
+ \**************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- if (keyboard.isKey(['f', 'F'], event) && keyboard.isCmd(event)) {
- editorActions.trigger('find');
- return true;
- }
- }); // activate space tool
- // S
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ getParent: () => (/* binding */ getParent),
+/* harmony export */ is: () => (/* reexport safe */ _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is),
+/* harmony export */ isAny: () => (/* reexport safe */ _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.isAny)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- addListener('spaceTool', function (context) {
- var event = context.keyEvent;
- if (keyboard.hasModifier(event)) {
- return;
- }
- if (keyboard.isKey(['s', 'S'], event)) {
- editorActions.trigger('spaceTool');
- return true;
- }
- }); // activate lasso tool
- // L
- addListener('lassoTool', function (context) {
- var event = context.keyEvent;
- if (keyboard.hasModifier(event)) {
- return;
- }
- if (keyboard.isKey(['l', 'L'], event)) {
- editorActions.trigger('lassoTool');
- return true;
- }
- }); // activate hand tool
- // H
+/**
+ * @typedef {import('../../../model/Types').Element} Element
+ */
- addListener('handTool', function (context) {
- var event = context.keyEvent;
+/**
+ * Return the parent of the element with any of the given types.
+ *
+ * @param {Element} element
+ * @param {string|string[]} anyType
+ *
+ * @return {Element|null}
+ */
+function getParent(element, anyType) {
- if (keyboard.hasModifier(event)) {
- return;
- }
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isString)(anyType)) {
+ anyType = [ anyType ];
+ }
- if (keyboard.isKey(['h', 'H'], event)) {
- editorActions.trigger('handTool');
- return true;
- }
- }); // activate global connect tool
- // C
+ while ((element = element.parent)) {
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.isAny)(element, anyType)) {
+ return element;
+ }
+ }
- addListener('globalConnectTool', function (context) {
- var event = context.keyEvent;
+ return null;
+}
- if (keyboard.hasModifier(event)) {
- return;
- }
+/***/ }),
- if (keyboard.isKey(['c', 'C'], event)) {
- editorActions.trigger('globalConnectTool');
- return true;
- }
- }); // activate direct editing
- // E
+/***/ "../node_modules/bpmn-js/lib/features/ordering/BpmnOrderingProvider.js":
+/*!*****************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/ordering/BpmnOrderingProvider.js ***!
+ \*****************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- addListener('directEditing', function (context) {
- var event = context.keyEvent;
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BpmnOrderingProvider)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_features_ordering_OrderingProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/ordering/OrderingProvider */ "../node_modules/diagram-js/lib/features/ordering/OrderingProvider.js");
+/* harmony import */ var _modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../modeling/util/ModelingUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
- if (keyboard.hasModifier(event)) {
- return;
- }
- if (keyboard.isKey(['e', 'E'], event)) {
- editorActions.trigger('directEditing');
- return true;
- }
- });
- };
- },{"diagram-js/lib/features/keyboard/KeyboardBindings":320,"inherits":438}],149:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _keyboard = _interopRequireDefault(require("diagram-js/lib/features/keyboard"));
- var _BpmnKeyboardBindings = _interopRequireDefault(require("./BpmnKeyboardBindings"));
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var _default = {
- __depends__: [_keyboard.default],
- __init__: ['keyboardBindings'],
- keyboardBindings: ['type', _BpmnKeyboardBindings.default]
- };
- exports.default = _default;
+/**
+ * @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('diagram-js/i18n/translate/translate').default} Translate
+ */
- },{"./BpmnKeyboardBindings":148,"diagram-js/lib/features/keyboard":322}],150:[function(require,module,exports){
- "use strict";
+/**
+ * A BPMN-specific ordering provider.
+ *
+ * @param {EventBus} eventBus
+ * @param {Canvas} canvas
+ * @param {Translate} translate
+ */
+function BpmnOrderingProvider(eventBus, canvas, translate) {
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = LabelEditingPreview;
+ diagram_js_lib_features_ordering_OrderingProvider__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- var _tinySvg = require("tiny-svg");
+ var orders = [
+ { type: 'bpmn:SubProcess', order: { level: 6 } },
- var _ModelUtil = require("../../util/ModelUtil");
+ // handle SequenceFlow(s) like message flows and render them always on top
+ {
+ type: 'bpmn:SequenceFlow',
+ order: {
+ level: 9,
+ containers: [
+ 'bpmn:Participant',
+ 'bpmn:FlowElementsContainer'
+ ]
+ }
+ },
+
+ // handle DataAssociation(s) like message flows and render them always on top
+ {
+ type: 'bpmn:DataAssociation',
+ order: {
+ level: 9,
+ containers: [
+ 'bpmn:Collaboration',
+ 'bpmn:FlowElementsContainer'
+ ]
+ }
+ },
+ {
+ type: 'bpmn:TextAnnotation',
+ order: {
+ level: 9
+ }
+ },
+ {
+ type: 'bpmn:MessageFlow', order: {
+ level: 9,
+ containers: [ 'bpmn:Collaboration' ]
+ }
+ },
+ {
+ type: 'bpmn:Association',
+ order: {
+ level: 6,
+ containers: [
+ 'bpmn:Participant',
+ 'bpmn:FlowElementsContainer',
+ 'bpmn:Collaboration'
+ ]
+ }
+ },
+ { type: 'bpmn:BoundaryEvent', order: { level: 8 } },
+ {
+ type: 'bpmn:Group',
+ order: {
+ level: 10,
+ containers: [
+ 'bpmn:Collaboration',
+ 'bpmn:FlowElementsContainer'
+ ]
+ }
+ },
+ { type: 'bpmn:FlowElement', order: { level: 5 } },
+ { type: 'bpmn:Participant', order: { level: -2 } },
+ { type: 'bpmn:Lane', order: { level: -1 } }
+ ];
- var _SvgTransformUtil = require("diagram-js/lib/util/SvgTransformUtil");
+ function computeOrder(element) {
+ if (element.labelTarget) {
+ return { level: 10 };
+ }
- var MARKER_HIDDEN = 'djs-element-hidden',
- MARKER_LABEL_HIDDEN = 'djs-label-hidden';
+ var entry = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.find)(orders, function(o) {
+ return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.isAny)(element, [ o.type ]);
+ });
- function LabelEditingPreview(eventBus, canvas, elementRegistry, pathMap) {
- var self = this;
- var defaultLayer = canvas.getDefaultLayer();
- var element, absoluteElementBBox, gfx;
- eventBus.on('directEditing.activate', function (context) {
- var activeProvider = context.active;
- element = activeProvider.element.label || activeProvider.element; // text annotation
+ return entry && entry.order || { level: 1 };
+ }
- if ((0, _ModelUtil.is)(element, 'bpmn:TextAnnotation')) {
- absoluteElementBBox = canvas.getAbsoluteBBox(element);
- gfx = (0, _tinySvg.create)('g');
- var textPathData = pathMap.getScaledPath('TEXT_ANNOTATION', {
- xScaleFactor: 1,
- yScaleFactor: 1,
- containerWidth: element.width,
- containerHeight: element.height,
- position: {
- mx: 0.0,
- my: 0.0
- }
- });
- var path = self.path = (0, _tinySvg.create)('path');
- (0, _tinySvg.attr)(path, {
- d: textPathData,
- strokeWidth: 2,
- stroke: getStrokeColor(element)
- });
- (0, _tinySvg.append)(gfx, path);
- (0, _tinySvg.append)(defaultLayer, gfx);
- (0, _SvgTransformUtil.translate)(gfx, element.x, element.y);
- }
+ function getOrder(element) {
- if ((0, _ModelUtil.is)(element, 'bpmn:TextAnnotation') || element.labelTarget) {
- canvas.addMarker(element, MARKER_HIDDEN);
- } else if ((0, _ModelUtil.is)(element, 'bpmn:Task') || (0, _ModelUtil.is)(element, 'bpmn:CallActivity') || (0, _ModelUtil.is)(element, 'bpmn:SubProcess') || (0, _ModelUtil.is)(element, 'bpmn:Participant')) {
- canvas.addMarker(element, MARKER_LABEL_HIDDEN);
- }
- });
- eventBus.on('directEditing.resize', function (context) {
- // text annotation
- if ((0, _ModelUtil.is)(element, 'bpmn:TextAnnotation')) {
- var height = context.height,
- dy = context.dy;
- var newElementHeight = Math.max(element.height / absoluteElementBBox.height * (height + dy), 0);
- var textPathData = pathMap.getScaledPath('TEXT_ANNOTATION', {
- xScaleFactor: 1,
- yScaleFactor: 1,
- containerWidth: element.width,
- containerHeight: newElementHeight,
- position: {
- mx: 0.0,
- my: 0.0
- }
- });
- (0, _tinySvg.attr)(self.path, {
- d: textPathData
- });
- }
- });
- eventBus.on(['directEditing.complete', 'directEditing.cancel'], function (context) {
- var activeProvider = context.active;
+ var order = element.order;
- if (activeProvider) {
- canvas.removeMarker(activeProvider.element.label || activeProvider.element, MARKER_HIDDEN);
- canvas.removeMarker(element, MARKER_LABEL_HIDDEN);
- }
+ if (!order) {
+ element.order = order = computeOrder(element);
+ }
- element = undefined;
- absoluteElementBBox = undefined;
+ if (!order) {
+ throw new Error('no order for <' + element.id + '>');
+ }
- if (gfx) {
- (0, _tinySvg.remove)(gfx);
- gfx = undefined;
- }
- });
- }
+ return order;
+ }
- LabelEditingPreview.$inject = ['eventBus', 'canvas', 'elementRegistry', 'pathMap']; // helpers ///////////////////
+ function findActualParent(element, newParent, containers) {
- function getStrokeColor(element, defaultColor) {
- var bo = (0, _ModelUtil.getBusinessObject)(element);
- return bo.di.get('stroke') || defaultColor || 'black';
- }
+ var actualParent = newParent;
- },{"../../util/ModelUtil":240,"diagram-js/lib/util/SvgTransformUtil":433,"tiny-svg":658}],151:[function(require,module,exports){
- "use strict";
+ while (actualParent) {
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = LabelEditingProvider;
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.isAny)(actualParent, containers)) {
+ break;
+ }
- var _minDash = require("min-dash");
+ actualParent = actualParent.parent;
+ }
- var _LabelUtil = require("./LabelUtil");
+ if (!actualParent) {
+ throw new Error('no parent for <' + element.id + '> in <' + (newParent && newParent.id) + '>');
+ }
- var _ModelUtil = require("../../util/ModelUtil");
+ return actualParent;
+ }
- var _CategoryUtil = require("../modeling/behavior/util/CategoryUtil");
+ this.getOrdering = function(element, newParent) {
- var _ModelingUtil = require("../modeling/util/ModelingUtil");
+ // render labels and text annotations always on top
+ if (element.labelTarget || (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.is)(element, 'bpmn:TextAnnotation')) {
+ return {
+ parent: canvas.findRoot(newParent) || canvas.getRootElement(),
+ index: -1
+ };
+ }
- var _DiUtil = require("../../util/DiUtil");
+ var elementOrder = getOrder(element);
- var _LabelUtil2 = require("../../util/LabelUtil");
+ if (elementOrder.containers) {
+ newParent = findActualParent(element, newParent, elementOrder.containers);
+ }
- function LabelEditingProvider(eventBus, bpmnFactory, canvas, directEditing, modeling, resizeHandles, textRenderer) {
- this._bpmnFactory = bpmnFactory;
- this._canvas = canvas;
- this._modeling = modeling;
- this._textRenderer = textRenderer;
- directEditing.registerProvider(this); // listen to dblclick on non-root elements
+ var currentIndex = newParent.children.indexOf(element);
- eventBus.on('element.dblclick', function (event) {
- activateDirectEdit(event.element, true);
- }); // complete on followup canvas operation
+ var insertIndex = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.findIndex)(newParent.children, function(child) {
- eventBus.on(['autoPlace.start', 'canvas.viewbox.changing', 'drag.init', 'element.mousedown', 'popupMenu.open'], function (event) {
- if (directEditing.isActive()) {
- directEditing.complete();
- }
- }); // cancel on command stack changes
+ // do not compare with labels, they are created
+ // in the wrong order (right after elements) during import and
+ // mess up the positioning.
+ if (!element.labelTarget && child.labelTarget) {
+ return false;
+ }
- eventBus.on(['commandStack.changed'], function (e) {
- if (directEditing.isActive()) {
- directEditing.cancel();
- }
- });
- eventBus.on('directEditing.activate', function (event) {
- resizeHandles.removeResizers();
- });
- eventBus.on('create.end', 500, function (event) {
- var context = event.context,
- element = context.shape,
- canExecute = event.context.canExecute,
- isTouch = event.isTouch; // TODO(nikku): we need to find a way to support the
- // direct editing on mobile devices; right now this will
- // break for desworkflowediting on mobile devices
- // as it breaks the user interaction workflow
- // TODO(nre): we should temporarily focus the edited element
- // here and release the focused viewport after the direct edit
- // operation is finished
-
- if (isTouch) {
- return;
- }
+ return elementOrder.level < getOrder(child).level;
+ });
- if (!canExecute) {
- return;
- }
- if (context.hints && context.hints.createElementsBehavior === false) {
- return;
- }
+ // if the element is already in the child list at
+ // a smaller index, we need to adjust the insert index.
+ // this takes into account that the element is being removed
+ // before being re-inserted
+ if (insertIndex !== -1) {
+ if (currentIndex !== -1 && currentIndex < insertIndex) {
+ insertIndex -= 1;
+ }
+ }
- activateDirectEdit(element);
- });
- eventBus.on('autoPlace.end', 500, function (event) {
- activateDirectEdit(event.shape);
- });
+ return {
+ index: insertIndex,
+ parent: newParent
+ };
+ };
+}
- function activateDirectEdit(element, force) {
- if (force || (0, _ModelingUtil.isAny)(element, ['bpmn:Task', 'bpmn:TextAnnotation', 'bpmn:Group']) || isCollapsedSubProcess(element)) {
- directEditing.activate(element);
- }
- }
- }
+BpmnOrderingProvider.$inject = [ 'eventBus', 'canvas', 'translate' ];
- LabelEditingProvider.$inject = ['eventBus', 'bpmnFactory', 'canvas', 'directEditing', 'modeling', 'resizeHandles', 'textRenderer'];
- /**
- * Activate direct editing for activities and text annotations.
- *
- * @param {djs.model.Base} element
- *
- * @return {Object} an object with properties bounds (position and size), text and options
- */
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_3__["default"])(BpmnOrderingProvider, diagram_js_lib_features_ordering_OrderingProvider__WEBPACK_IMPORTED_MODULE_0__["default"]);
- LabelEditingProvider.prototype.activate = function (element) {
- // text
- var text = (0, _LabelUtil.getLabel)(element);
+/***/ }),
- if (text === undefined) {
- return;
- }
+/***/ "../node_modules/bpmn-js/lib/features/ordering/index.js":
+/*!**************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/ordering/index.js ***!
+ \**************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var context = {
- text: text
- }; // bounds
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_i18n_translate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/i18n/translate */ "../node_modules/diagram-js/lib/i18n/translate/index.js");
+/* harmony import */ var _BpmnOrderingProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BpmnOrderingProvider */ "../node_modules/bpmn-js/lib/features/ordering/BpmnOrderingProvider.js");
- var bounds = this.getEditingBBox(element);
- (0, _minDash.assign)(context, bounds);
- var options = {}; // tasks
- if ((0, _ModelingUtil.isAny)(element, ['bpmn:Task', 'bpmn:Participant', 'bpmn:Lane', 'bpmn:CallActivity']) || isCollapsedSubProcess(element)) {
- (0, _minDash.assign)(options, {
- centerVertically: true
- });
- } // external labels
- if ((0, _LabelUtil2.isLabelExternal)(element)) {
- (0, _minDash.assign)(options, {
- autoResize: true
- });
- } // text annotations
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ diagram_js_lib_i18n_translate__WEBPACK_IMPORTED_MODULE_0__["default"]
+ ],
+ __init__: [ 'bpmnOrderingProvider' ],
+ bpmnOrderingProvider: [ 'type', _BpmnOrderingProvider__WEBPACK_IMPORTED_MODULE_1__["default"] ]
+});
+/***/ }),
- if ((0, _ModelUtil.is)(element, 'bpmn:TextAnnotation')) {
- (0, _minDash.assign)(options, {
- resizable: true,
- autoResize: true
- });
- }
+/***/ "../node_modules/bpmn-js/lib/features/outline/OutlineProvider.js":
+/*!***********************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/outline/OutlineProvider.js ***!
+ \***********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- (0, _minDash.assign)(context, {
- options: options
- });
- return context;
- };
- /**
- * Get the editing bounding box based on the element's size and position
- *
- * @param {djs.model.Base} element
- *
- * @return {Object} an object containing information about position
- * and size (fixed or minimum and/or maximum)
- */
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ OutlineProvider)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tiny-svg */ "../node_modules/tiny-svg/dist/index.esm.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/LabelUtil */ "../node_modules/diagram-js/lib/util/ModelUtil.js");
+/* harmony import */ var _OutlineUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./OutlineUtil */ "../node_modules/bpmn-js/lib/features/outline/OutlineUtil.js");
- LabelEditingProvider.prototype.getEditingBBox = function (element) {
- var canvas = this._canvas;
- var target = element.label || element;
- var bbox = canvas.getAbsoluteBBox(target);
- var mid = {
- x: bbox.x + bbox.width / 2,
- y: bbox.y + bbox.height / 2
- }; // default position
- var bounds = {
- x: bbox.x,
- y: bbox.y
- };
- var zoom = canvas.zoom();
-
- var defaultStyle = this._textRenderer.getDefaultStyle(),
- externalStyle = this._textRenderer.getExternalStyle(); // take zoom into account
-
-
- var externalFontSize = externalStyle.fontSize * zoom,
- externalLineHeight = externalStyle.lineHeight,
- defaultFontSize = defaultStyle.fontSize * zoom,
- defaultLineHeight = defaultStyle.lineHeight;
- var style = {
- fontFamily: this._textRenderer.getDefaultStyle().fontFamily,
- fontWeight: this._textRenderer.getDefaultStyle().fontWeight
- }; // adjust for expanded pools AND lanes
-
- if ((0, _ModelUtil.is)(element, 'bpmn:Lane') || isExpandedPool(element)) {
- (0, _minDash.assign)(bounds, {
- width: bbox.height,
- height: 30 * zoom,
- x: bbox.x - bbox.height / 2 + 15 * zoom,
- y: mid.y - 30 * zoom / 2
- });
- (0, _minDash.assign)(style, {
- fontSize: defaultFontSize + 'px',
- lineHeight: defaultLineHeight,
- paddingTop: 7 * zoom + 'px',
- paddingBottom: 7 * zoom + 'px',
- paddingLeft: 5 * zoom + 'px',
- paddingRight: 5 * zoom + 'px',
- transform: 'rotate(-90deg)'
- });
- } // internal labels for tasks and collapsed call activities,
- // sub processes and participants
- if ((0, _ModelingUtil.isAny)(element, ['bpmn:Task', 'bpmn:CallActivity']) || isCollapsedPool(element) || isCollapsedSubProcess(element)) {
- (0, _minDash.assign)(bounds, {
- width: bbox.width,
- height: bbox.height
- });
- (0, _minDash.assign)(style, {
- fontSize: defaultFontSize + 'px',
- lineHeight: defaultLineHeight,
- paddingTop: 7 * zoom + 'px',
- paddingBottom: 7 * zoom + 'px',
- paddingLeft: 5 * zoom + 'px',
- paddingRight: 5 * zoom + 'px'
- });
- } // internal labels for expanded sub processes
- if (isExpandedSubProcess(element)) {
- (0, _minDash.assign)(bounds, {
- width: bbox.width,
- x: bbox.x
- });
- (0, _minDash.assign)(style, {
- fontSize: defaultFontSize + 'px',
- lineHeight: defaultLineHeight,
- paddingTop: 7 * zoom + 'px',
- paddingBottom: 7 * zoom + 'px',
- paddingLeft: 5 * zoom + 'px',
- paddingRight: 5 * zoom + 'px'
- });
- }
- var width = 90 * zoom,
- paddingTop = 7 * zoom,
- paddingBottom = 4 * zoom; // external labels for events, data elements, gateways, groups and connections
- if (target.labelTarget) {
- (0, _minDash.assign)(bounds, {
- width: width,
- height: bbox.height + paddingTop + paddingBottom,
- x: mid.x - width / 2,
- y: bbox.y - paddingTop
- });
- (0, _minDash.assign)(style, {
- fontSize: externalFontSize + 'px',
- lineHeight: externalLineHeight,
- paddingTop: paddingTop + 'px',
- paddingBottom: paddingBottom + 'px'
- });
- } // external label not yet created
+const DEFAULT_OFFSET = 5;
- if ((0, _LabelUtil2.isLabelExternal)(target) && !(0, _LabelUtil2.hasExternalLabel)(target) && !(0, _LabelUtil2.isLabel)(target)) {
- var externalLabelMid = (0, _LabelUtil2.getExternalLabelMid)(element);
- var absoluteBBox = canvas.getAbsoluteBBox({
- x: externalLabelMid.x,
- y: externalLabelMid.y,
- width: 0,
- height: 0
- });
- var height = externalFontSize + paddingTop + paddingBottom;
- (0, _minDash.assign)(bounds, {
- width: width,
- height: height,
- x: absoluteBBox.x - width / 2,
- y: absoluteBBox.y - height / 2
- });
- (0, _minDash.assign)(style, {
- fontSize: externalFontSize + 'px',
- lineHeight: externalLineHeight,
- paddingTop: paddingTop + 'px',
- paddingBottom: paddingBottom + 'px'
- });
- } // text annotations
+/**
+ * BPMN-specific outline provider.
+ *
+ * @implements {BaseOutlineProvider}
+ *
+ * @param {Outline} outline
+ * @param {Styles} styles
+ */
+function OutlineProvider(outline, styles) {
+ this._styles = styles;
+ outline.registerProvider(this);
+}
- if ((0, _ModelUtil.is)(element, 'bpmn:TextAnnotation')) {
- (0, _minDash.assign)(bounds, {
- width: bbox.width,
- height: bbox.height,
- minWidth: 30 * zoom,
- minHeight: 10 * zoom
- });
- (0, _minDash.assign)(style, {
- textAlign: 'left',
- paddingTop: 5 * zoom + 'px',
- paddingBottom: 7 * zoom + 'px',
- paddingLeft: 7 * zoom + 'px',
- paddingRight: 5 * zoom + 'px',
- fontSize: defaultFontSize + 'px',
- lineHeight: defaultLineHeight
- });
- }
+OutlineProvider.$inject = [
+ 'outline',
+ 'styles'
+];
- return {
- bounds: bounds,
- style: style
- };
- };
+/**
+ * Returns outline for a given element.
+ *
+ * @param {Element} element
+ *
+ * @return {Outline}
+ */
+OutlineProvider.prototype.getOutline = function(element) {
- LabelEditingProvider.prototype.update = function (element, newLabel, activeContextText, bounds) {
- var newBounds, bbox;
+ const OUTLINE_STYLE = this._styles.cls('djs-outline', [ 'no-fill' ]);
- if ((0, _ModelUtil.is)(element, 'bpmn:TextAnnotation')) {
- bbox = this._canvas.getAbsoluteBBox(element);
- newBounds = {
- x: element.x,
- y: element.y,
- width: element.width / bbox.width * bounds.width,
- height: element.height / bbox.height * bounds.height
- };
- }
+ var outline;
- if ((0, _ModelUtil.is)(element, 'bpmn:Group')) {
- var businessObject = (0, _ModelUtil.getBusinessObject)(element); // initialize categoryValue if not existing
+ if ((0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_0__.isLabel)(element)) {
+ return;
+ }
- if (!businessObject.categoryValueRef) {
- var rootElement = this._canvas.getRootElement(),
- definitions = (0, _ModelUtil.getBusinessObject)(rootElement).$parent;
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(element, 'bpmn:Gateway')) {
+ outline = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)('rect');
- var categoryValue = (0, _CategoryUtil.createCategoryValue)(definitions, this._bpmnFactory);
- (0, _ModelUtil.getBusinessObject)(element).categoryValueRef = categoryValue;
- }
- }
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(outline.style, {
+ 'transform-box': 'fill-box',
+ 'transform': 'rotate(45deg)',
+ 'transform-origin': 'center'
+ });
- if (isEmptyText(newLabel)) {
- newLabel = null;
- }
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(outline, (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)({
+ x: 2,
+ y: 2,
+ rx: 4,
+ width: element.width - 4,
+ height: element.height - 4,
+ }, OUTLINE_STYLE));
- this._modeling.updateLabel(element, newLabel, newBounds);
- }; // helpers //////////////////////
+ } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.isAny)(element, [ 'bpmn:Task', 'bpmn:SubProcess', 'bpmn:Group' ])) {
+ outline = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)('rect');
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(outline, (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)({
+ x: -DEFAULT_OFFSET,
+ y: -DEFAULT_OFFSET,
+ rx: 14,
+ width: element.width + DEFAULT_OFFSET * 2,
+ height: element.height + DEFAULT_OFFSET * 2
+ }, OUTLINE_STYLE));
- function isCollapsedSubProcess(element) {
- return (0, _ModelUtil.is)(element, 'bpmn:SubProcess') && !(0, _DiUtil.isExpanded)(element);
- }
+ } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(element, 'bpmn:EndEvent')) {
- function isExpandedSubProcess(element) {
- return (0, _ModelUtil.is)(element, 'bpmn:SubProcess') && (0, _DiUtil.isExpanded)(element);
- }
+ outline = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)('circle');
- function isCollapsedPool(element) {
- return (0, _ModelUtil.is)(element, 'bpmn:Participant') && !(0, _DiUtil.isExpanded)(element);
- }
+ // Extra 1px offset needed due to increased stroke-width of end event
+ // which makes it bigger than other events.
- function isExpandedPool(element) {
- return (0, _ModelUtil.is)(element, 'bpmn:Participant') && (0, _DiUtil.isExpanded)(element);
- }
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(outline, (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)({
+ cx: element.width / 2,
+ cy: element.height / 2,
+ r: element.width / 2 + DEFAULT_OFFSET + 1
+ }, OUTLINE_STYLE));
- function isEmptyText(label) {
- return !label || !label.trim();
- }
+ } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(element, 'bpmn:Event')) {
+ outline = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)('circle');
- },{"../../util/DiUtil":238,"../../util/LabelUtil":239,"../../util/ModelUtil":240,"../modeling/behavior/util/CategoryUtil":194,"../modeling/util/ModelingUtil":211,"./LabelUtil":152,"min-dash":646}],152:[function(require,module,exports){
- "use strict";
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(outline, (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)({
+ cx: element.width / 2,
+ cy: element.height / 2,
+ r: element.width / 2 + DEFAULT_OFFSET
+ }, OUTLINE_STYLE));
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.getLabel = getLabel;
- exports.setLabel = setLabel;
+ } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(element, 'bpmn:DataObjectReference') && isStandardSize(element, 'bpmn:DataObjectReference')) {
- var _ModelUtil = require("../../util/ModelUtil");
+ outline = (0,_OutlineUtil__WEBPACK_IMPORTED_MODULE_4__.createPath)(
+ _OutlineUtil__WEBPACK_IMPORTED_MODULE_4__.DATA_OBJECT_REFERENCE_OUTLINE_PATH,
+ { x: -6, y: -6 },
+ OUTLINE_STYLE
+ );
- function getLabelAttr(semantic) {
- if ((0, _ModelUtil.is)(semantic, 'bpmn:FlowElement') || (0, _ModelUtil.is)(semantic, 'bpmn:Participant') || (0, _ModelUtil.is)(semantic, 'bpmn:Lane') || (0, _ModelUtil.is)(semantic, 'bpmn:SequenceFlow') || (0, _ModelUtil.is)(semantic, 'bpmn:MessageFlow') || (0, _ModelUtil.is)(semantic, 'bpmn:DataInput') || (0, _ModelUtil.is)(semantic, 'bpmn:DataOutput')) {
- return 'name';
- }
+ } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(element, 'bpmn:DataStoreReference') && isStandardSize(element, 'bpmn:DataStoreReference')) {
- if ((0, _ModelUtil.is)(semantic, 'bpmn:TextAnnotation')) {
- return 'text';
- }
+ outline = (0,_OutlineUtil__WEBPACK_IMPORTED_MODULE_4__.createPath)(
+ _OutlineUtil__WEBPACK_IMPORTED_MODULE_4__.DATA_STORE_REFERENCE_OUTLINE_PATH,
+ { x: -6, y: -6 },
+ OUTLINE_STYLE
+ );
+ }
- if ((0, _ModelUtil.is)(semantic, 'bpmn:Group')) {
- return 'categoryValueRef';
- }
- }
+ return outline;
+};
- function getCategoryValue(semantic) {
- var categoryValueRef = semantic['categoryValueRef'];
+/**
+ * Updates the outline for a given element.
+ * Returns true if the update for the given element was handled by this provider.
+ *
+ * @param {Element} element
+ * @param {Outline} outline
+ * @returns {boolean}
+ */
+OutlineProvider.prototype.updateOutline = function(element, outline) {
- if (!categoryValueRef) {
- return '';
- }
+ if ((0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_0__.isLabel)(element)) {
+ return;
+ }
- return categoryValueRef.value || '';
- }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.isAny)(element, [ 'bpmn:SubProcess', 'bpmn:Group' ])) {
- function getLabel(element) {
- var semantic = element.businessObject,
- attr = getLabelAttr(semantic);
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(outline, {
+ width: element.width + DEFAULT_OFFSET * 2,
+ height: element.height + DEFAULT_OFFSET * 2
+ });
- if (attr) {
- if (attr === 'categoryValueRef') {
- return getCategoryValue(semantic);
- }
+ return true;
- return semantic[attr] || '';
- }
- }
+ } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.isAny)(element, [
+ 'bpmn:Event',
+ 'bpmn:Gateway',
+ 'bpmn:DataStoreReference',
+ 'bpmn:DataObjectReference'
+ ])) {
+ return true;
+ }
- function setLabel(element, text, isExternal) {
- var semantic = element.businessObject,
- attr = getLabelAttr(semantic);
+ return false;
+};
- if (attr) {
- if (attr === 'categoryValueRef') {
- semantic['categoryValueRef'].value = text;
- } else {
- semantic[attr] = text;
- }
- }
- return element;
- }
+// helpers //////////
- },{"../../util/ModelUtil":240}],153:[function(require,module,exports){
- "use strict";
+function isStandardSize(element, type) {
+ var standardSize;
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = UpdateLabelHandler;
+ if (type === 'bpmn:DataObjectReference') {
+ standardSize = _OutlineUtil__WEBPACK_IMPORTED_MODULE_4__.DATA_OBJECT_REFERENCE_STANDARD_SIZE;
+ } else if (type === 'bpmn:DataStoreReference') {
+ standardSize = _OutlineUtil__WEBPACK_IMPORTED_MODULE_4__.DATA_STORE_REFERENCE_STANDARD_SIZE;
+ }
- var _LabelUtil = require("../LabelUtil");
+ return element.width === standardSize.width
+ && element.height === standardSize.height;
+}
- var _LabelUtil2 = require("../../../util/LabelUtil");
+/***/ }),
- var _ModelUtil = require("../../../util/ModelUtil");
+/***/ "../node_modules/bpmn-js/lib/features/outline/OutlineUtil.js":
+/*!*******************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/outline/OutlineUtil.js ***!
+ \*******************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var NULL_DIMENSIONS = {
- width: 0,
- height: 0
- };
- /**
- * A handler that updates the text of a BPMN element.
- */
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ DATA_OBJECT_REFERENCE_OUTLINE_PATH: () => (/* binding */ DATA_OBJECT_REFERENCE_OUTLINE_PATH),
+/* harmony export */ DATA_OBJECT_REFERENCE_STANDARD_SIZE: () => (/* binding */ DATA_OBJECT_REFERENCE_STANDARD_SIZE),
+/* harmony export */ DATA_STORE_REFERENCE_OUTLINE_PATH: () => (/* binding */ DATA_STORE_REFERENCE_OUTLINE_PATH),
+/* harmony export */ DATA_STORE_REFERENCE_STANDARD_SIZE: () => (/* binding */ DATA_STORE_REFERENCE_STANDARD_SIZE),
+/* harmony export */ createPath: () => (/* binding */ createPath)
+/* harmony export */ });
+/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tiny-svg */ "../node_modules/tiny-svg/dist/index.esm.js");
- function UpdateLabelHandler(modeling, textRenderer) {
- /**
- * Set the label and return the changed elements.
- *
- * Element parameter can be label itself or connection (i.e. sequence flow).
- *
- * @param {djs.model.Base} element
- * @param {string} text
- */
- function setText(element, text) {
- // external label if present
- var label = element.label || element;
- var labelTarget = element.labelTarget || element;
- (0, _LabelUtil.setLabel)(label, text, labelTarget !== label);
- return [label, labelTarget];
- }
-
- function preExecute(ctx) {
- var element = ctx.element,
- businessObject = element.businessObject,
- newLabel = ctx.newLabel;
-
- if (!(0, _LabelUtil2.isLabel)(element) && (0, _LabelUtil2.isLabelExternal)(element) && !(0, _LabelUtil2.hasExternalLabel)(element) && !isEmptyText(newLabel)) {
- // create label
- var paddingTop = 7;
- var labelCenter = (0, _LabelUtil2.getExternalLabelMid)(element);
- labelCenter = {
- x: labelCenter.x,
- y: labelCenter.y + paddingTop
- };
- modeling.createLabel(element, labelCenter, {
- id: businessObject.id + '_label',
- businessObject: businessObject
- });
- }
- }
- function execute(ctx) {
- ctx.oldLabel = (0, _LabelUtil.getLabel)(ctx.element);
- return setText(ctx.element, ctx.newLabel);
- }
+const DATA_OBJECT_REFERENCE_OUTLINE_PATH = 'M44.7648 11.3263L36.9892 2.64074C36.0451 1.58628 34.5651 0.988708 33.1904 0.988708H5.98667C3.22688 0.988708 0.989624 3.34892 0.989624 6.26039V55.0235C0.989624 57.9349 3.22688 60.2952 5.98667 60.2952H40.966C43.7257 60.2952 45.963 57.9349 45.963 55.0235V14.9459C45.963 13.5998 45.6407 12.3048 44.7648 11.3263Z';
+const DATA_STORE_REFERENCE_OUTLINE_PATH = 'M1.03845 48.1347C1.03845 49.3511 1.07295 50.758 1.38342 52.064C1.69949 53.3938 2.32428 54.7154 3.56383 55.6428C6.02533 57.4841 10.1161 58.7685 14.8212 59.6067C19.5772 60.4538 25.1388 60.8738 30.6831 60.8738C36.2276 60.8738 41.7891 60.4538 46.545 59.6067C51.2504 58.7687 55.3412 57.4842 57.8028 55.6429C59.0424 54.7156 59.6673 53.3938 59.9834 52.064C60.2938 50.7579 60.3285 49.351 60.3285 48.1344V13.8415C60.3285 12.6249 60.2938 11.218 59.9834 9.91171C59.6673 8.58194 59.0423 7.2602 57.8027 6.33294C55.341 4.49168 51.2503 3.20723 46.545 2.36914C41.7891 1.522 36.2276 1.10204 30.6831 1.10205C25.1388 1.10206 19.5772 1.52206 14.8213 2.36923C10.1162 3.20734 6.02543 4.49183 3.5639 6.33314C2.32433 7.26038 1.69951 8.58206 1.38343 9.91181C1.07295 11.2179 1.03845 12.6247 1.03845 13.8411V48.1347Z';
- function revert(ctx) {
- return setText(ctx.element, ctx.oldLabel);
- }
+/**
+ * @type {Dimensions}
+ */
+const DATA_OBJECT_REFERENCE_STANDARD_SIZE = { width: 36, height: 50 };
- function postExecute(ctx) {
- var element = ctx.element,
- label = element.label || element,
- newLabel = ctx.newLabel,
- newBounds = ctx.newBounds,
- hints = ctx.hints || {}; // ignore internal labels for elements except text annotations
+/**
+ * @type {Dimensions}
+ */
+const DATA_STORE_REFERENCE_STANDARD_SIZE = { width: 50, height: 50 };
+
+/**
+ * Create a path element with given attributes.
+ * @param {string} path
+ * @param {Object} attrs
+ * @param {Object} OUTLINE_STYLE
+ * @return {SVGElement}
+ */
+function createPath(path, attrs, OUTLINE_STYLE) {
+ return (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.create)('path', {
+ d: path,
+ strokeWidth: 2,
+ transform: `translate(${attrs.x}, ${attrs.y})`,
+ ...OUTLINE_STYLE
+ });
+}
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/features/outline/index.js":
+/*!*************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/outline/index.js ***!
+ \*************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_features_outline__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/outline */ "../node_modules/diagram-js/lib/features/outline/index.js");
+/* harmony import */ var _OutlineProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OutlineProvider */ "../node_modules/bpmn-js/lib/features/outline/OutlineProvider.js");
+
+
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ diagram_js_lib_features_outline__WEBPACK_IMPORTED_MODULE_0__["default"]
+ ],
+ __init__: [ 'outlineProvider' ],
+ outlineProvider: [ 'type', _OutlineProvider__WEBPACK_IMPORTED_MODULE_1__["default"] ]
+});
+
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/features/palette/PaletteProvider.js":
+/*!***********************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/palette/PaletteProvider.js ***!
+ \***********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ PaletteProvider)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+
+
+/**
+ * @typedef {import('diagram-js/lib/features/palette/Palette').default} Palette
+ * @typedef {import('diagram-js/lib/features/create/Create').default} Create
+ * @typedef {import('diagram-js/lib/core/ElementFactory').default} ElementFactory
+ * @typedef {import('../space-tool/BpmnSpaceTool').default} SpaceTool
+ * @typedef {import('diagram-js/lib/features/lasso-tool/LassoTool').default} LassoTool
+ * @typedef {import('diagram-js/lib/features/hand-tool/HandTool').default} HandTool
+ * @typedef {import('diagram-js/lib/features/global-connect/GlobalConnect').default} GlobalConnect
+ * @typedef {import('diagram-js/lib/i18n/translate/translate').default} Translate
+ *
+ * @typedef {import('diagram-js/lib/features/palette/Palette').PaletteEntries} PaletteEntries
+ */
- if (!(0, _LabelUtil2.isLabel)(label) && !(0, _ModelUtil.is)(label, 'bpmn:TextAnnotation')) {
- return;
- }
+/**
+ * A palette provider for BPMN 2.0 elements.
+ *
+ * @param {Palette} palette
+ * @param {Create} create
+ * @param {ElementFactory} elementFactory
+ * @param {SpaceTool} spaceTool
+ * @param {LassoTool} lassoTool
+ * @param {HandTool} handTool
+ * @param {GlobalConnect} globalConnect
+ * @param {Translate} translate
+ */
+function PaletteProvider(
+ palette, create, elementFactory,
+ spaceTool, lassoTool, handTool,
+ globalConnect, translate) {
+
+ this._palette = palette;
+ this._create = create;
+ this._elementFactory = elementFactory;
+ this._spaceTool = spaceTool;
+ this._lassoTool = lassoTool;
+ this._handTool = handTool;
+ this._globalConnect = globalConnect;
+ this._translate = translate;
+
+ palette.registerProvider(this);
+}
+
+PaletteProvider.$inject = [
+ 'palette',
+ 'create',
+ 'elementFactory',
+ 'spaceTool',
+ 'lassoTool',
+ 'handTool',
+ 'globalConnect',
+ 'translate'
+];
+
+/**
+ * @return {PaletteEntries}
+ */
+PaletteProvider.prototype.getPaletteEntries = function() {
+
+ var actions = {},
+ create = this._create,
+ elementFactory = this._elementFactory,
+ spaceTool = this._spaceTool,
+ lassoTool = this._lassoTool,
+ handTool = this._handTool,
+ globalConnect = this._globalConnect,
+ translate = this._translate;
+
+ function createAction(type, group, className, title, options) {
+
+ function createListener(event) {
+ var shape = elementFactory.createShape((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({ type: type }, options));
+ create.start(event, shape);
+ }
+
+ return {
+ group: group,
+ className: className,
+ title: title,
+ action: {
+ dragstart: createListener,
+ click: createListener
+ }
+ };
+ }
+
+ function createSubprocess(event) {
+ var subProcess = elementFactory.createShape({
+ type: 'bpmn:SubProcess',
+ x: 0,
+ y: 0,
+ isExpanded: true
+ });
+
+ var startEvent = elementFactory.createShape({
+ type: 'bpmn:StartEvent',
+ x: 40,
+ y: 82,
+ parent: subProcess
+ });
+
+ create.start(event, [ subProcess, startEvent ], {
+ hints: {
+ autoSelect: [ subProcess ]
+ }
+ });
+ }
+
+ function createParticipant(event) {
+ create.start(event, elementFactory.createParticipantShape());
+ }
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(actions, {
+ 'hand-tool': {
+ group: 'tools',
+ className: 'bpmn-icon-hand-tool',
+ title: translate('Activate hand tool'),
+ action: {
+ click: function(event) {
+ handTool.activateHand(event);
+ }
+ }
+ },
+ 'lasso-tool': {
+ group: 'tools',
+ className: 'bpmn-icon-lasso-tool',
+ title: translate('Activate lasso tool'),
+ action: {
+ click: function(event) {
+ lassoTool.activateSelection(event);
+ }
+ }
+ },
+ 'space-tool': {
+ group: 'tools',
+ className: 'bpmn-icon-space-tool',
+ title: translate('Activate create/remove space tool'),
+ action: {
+ click: function(event) {
+ spaceTool.activateSelection(event);
+ }
+ }
+ },
+ 'global-connect-tool': {
+ group: 'tools',
+ className: 'bpmn-icon-connection-multi',
+ title: translate('Activate global connect tool'),
+ action: {
+ click: function(event) {
+ globalConnect.start(event);
+ }
+ }
+ },
+ 'tool-separator': {
+ group: 'tools',
+ separator: true
+ },
+ 'create.start-event': createAction(
+ 'bpmn:StartEvent', 'event', 'bpmn-icon-start-event-none',
+ translate('Create start event')
+ ),
+ 'create.intermediate-event': createAction(
+ 'bpmn:IntermediateThrowEvent', 'event', 'bpmn-icon-intermediate-event-none',
+ translate('Create intermediate/boundary event')
+ ),
+ 'create.end-event': createAction(
+ 'bpmn:EndEvent', 'event', 'bpmn-icon-end-event-none',
+ translate('Create end event')
+ ),
+ 'create.exclusive-gateway': createAction(
+ 'bpmn:ExclusiveGateway', 'gateway', 'bpmn-icon-gateway-none',
+ translate('Create gateway')
+ ),
+ 'create.task': createAction(
+ 'bpmn:Task', 'activity', 'bpmn-icon-task',
+ translate('Create task')
+ ),
+ 'create.data-object': createAction(
+ 'bpmn:DataObjectReference', 'data-object', 'bpmn-icon-data-object',
+ translate('Create data object reference')
+ ),
+ 'create.data-store': createAction(
+ 'bpmn:DataStoreReference', 'data-store', 'bpmn-icon-data-store',
+ translate('Create data store reference')
+ ),
+ 'create.subprocess-expanded': {
+ group: 'activity',
+ className: 'bpmn-icon-subprocess-expanded',
+ title: translate('Create expanded sub-process'),
+ action: {
+ dragstart: createSubprocess,
+ click: createSubprocess
+ }
+ },
+ 'create.participant-expanded': {
+ group: 'collaboration',
+ className: 'bpmn-icon-participant',
+ title: translate('Create pool/participant'),
+ action: {
+ dragstart: createParticipant,
+ click: createParticipant
+ }
+ },
+ 'create.group': createAction(
+ 'bpmn:Group', 'artifact', 'bpmn-icon-group',
+ translate('Create group')
+ ),
+ });
+
+ return actions;
+};
+
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/features/palette/index.js":
+/*!*************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/palette/index.js ***!
+ \*************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_features_palette__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/palette */ "../node_modules/diagram-js/lib/features/palette/index.js");
+/* harmony import */ var diagram_js_lib_features_create__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/create */ "../node_modules/diagram-js/lib/features/create/index.js");
+/* harmony import */ var _space_tool__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../space-tool */ "../node_modules/bpmn-js/lib/features/space-tool/index.js");
+/* harmony import */ var diagram_js_lib_features_lasso_tool__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/features/lasso-tool */ "../node_modules/diagram-js/lib/features/lasso-tool/index.js");
+/* harmony import */ var diagram_js_lib_features_hand_tool__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! diagram-js/lib/features/hand-tool */ "../node_modules/diagram-js/lib/features/hand-tool/index.js");
+/* harmony import */ var diagram_js_lib_features_global_connect__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! diagram-js/lib/features/global-connect */ "../node_modules/diagram-js/lib/features/global-connect/index.js");
+/* harmony import */ var diagram_js_lib_i18n_translate__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! diagram-js/lib/i18n/translate */ "../node_modules/diagram-js/lib/i18n/translate/index.js");
+/* harmony import */ var _PaletteProvider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./PaletteProvider */ "../node_modules/bpmn-js/lib/features/palette/PaletteProvider.js");
+
+
+
+
+
+
+
+
+
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ diagram_js_lib_features_palette__WEBPACK_IMPORTED_MODULE_0__["default"],
+ diagram_js_lib_features_create__WEBPACK_IMPORTED_MODULE_1__["default"],
+ _space_tool__WEBPACK_IMPORTED_MODULE_2__["default"],
+ diagram_js_lib_features_lasso_tool__WEBPACK_IMPORTED_MODULE_3__["default"],
+ diagram_js_lib_features_hand_tool__WEBPACK_IMPORTED_MODULE_4__["default"],
+ diagram_js_lib_features_global_connect__WEBPACK_IMPORTED_MODULE_5__["default"],
+ diagram_js_lib_i18n_translate__WEBPACK_IMPORTED_MODULE_6__["default"]
+ ],
+ __init__: [ 'paletteProvider' ],
+ paletteProvider: [ 'type', _PaletteProvider__WEBPACK_IMPORTED_MODULE_7__["default"] ]
+});
+
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/features/popup-menu/ReplaceMenuProvider.js":
+/*!******************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/popup-menu/ReplaceMenuProvider.js ***!
+ \******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ ReplaceMenuProvider)
+/* harmony export */ });
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
+/* harmony import */ var _util_TypeUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/TypeUtil */ "../node_modules/bpmn-js/lib/features/popup-menu/util/TypeUtil.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../replace/ReplaceOptions */ "../node_modules/bpmn-js/lib/features/replace/ReplaceOptions.js");
+/* harmony import */ var _modeling_behavior_util_NonInterruptingUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../modeling/behavior/util/NonInterruptingUtil */ "../node_modules/bpmn-js/lib/features/modeling/behavior/util/NonInterruptingUtil.js");
+/* harmony import */ var _util_Icons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./util/Icons */ "../node_modules/bpmn-js/lib/features/popup-menu/util/Icons.js");
- if ((0, _LabelUtil2.isLabel)(label) && isEmptyText(newLabel)) {
- if (hints.removeShape !== false) {
- modeling.removeShape(label, {
- unsetLabel: false
- });
- }
- return;
- }
- var text = (0, _LabelUtil.getLabel)(label); // resize element based on label _or_ pre-defined bounds
- if (typeof newBounds === 'undefined') {
- newBounds = textRenderer.getExternalLabelBounds(label, text);
- } // setting newBounds to false or _null_ will
- // disable the postExecute resize operation
- if (newBounds) {
- modeling.resizeShape(label, newBounds, NULL_DIMENSIONS);
- }
- } // API
- this.preExecute = preExecute;
- this.execute = execute;
- this.revert = revert;
- this.postExecute = postExecute;
- }
- UpdateLabelHandler.$inject = ['modeling', 'textRenderer']; // helpers ///////////////////////
- function isEmptyText(label) {
- return !label || !label.trim();
- }
- },{"../../../util/LabelUtil":239,"../../../util/ModelUtil":240,"../LabelUtil":152}],154:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+/**
+ * @typedef {import('../modeling/BpmnFactory').default} BpmnFactory
+ * @typedef {import('diagram-js/lib/features/popup-menu/PopupMenu').default} PopupMenu
+ * @typedef {import('../modeling/Modeling').default} Modeling
+ * @typedef {import('../replace/BpmnReplace').default} BpmnReplace
+ * @typedef {import('diagram-js/lib/features/Rules').default} Rules
+ * @typedef {import('diagram-js/lib/i18n/translate/translate').default} Translate
+ * @typedef {import('../copy-paste/ModdleCopy').default} ModdleCopy
+ *
+ * @typedef {import('../../model/Types').Element} Element
+ * @typedef {import('../../model/Types').Moddle} Moddle
+ *
+ * @typedef {import('diagram-js/lib/features/popup-menu/PopupMenuProvider').PopupMenuEntries} PopupMenuEntries
+ * @typedef {import('diagram-js/lib/features/popup-menu/PopupMenuProvider').PopupMenuEntry} PopupMenuEntry
+ * @typedef {import('diagram-js/lib/features/popup-menu/PopupMenuProvider').PopupMenuEntryAction} PopupMenuEntryAction
+ * @typedef {import('diagram-js/lib/features/popup-menu/PopupMenuProvider').PopupMenuHeaderEntries} PopupMenuHeaderEntries
+ * @typedef {import('diagram-js/lib/features/popup-menu/PopupMenuProvider').default} PopupMenuProvider
+ * @typedef {import('diagram-js/lib/features/popup-menu/PopupMenu').PopupMenuTarget} PopupMenuTarget
+ *
+ * @typedef {import('./ReplaceOptions').ReplaceOption} ReplaceOption
+ */
- var _changeSupport = _interopRequireDefault(require("diagram-js/lib/features/change-support"));
+/**
+ * A BPMN-specific popup menu provider.
+ *
+ * @implements {PopupMenuProvider}
+ *
+ * @param {BpmnFactory} bpmnFactory
+ * @param {PopupMenu} popupMenu
+ * @param {Modeling} modeling
+ * @param {Moddle} moddle
+ * @param {BpmnReplace} bpmnReplace
+ * @param {Rules} rules
+ * @param {Translate} translate
+ * @param {ModdleCopy} moddleCopy
+ */
+function ReplaceMenuProvider(
+ bpmnFactory, popupMenu, modeling, moddle,
+ bpmnReplace, rules, translate, moddleCopy) {
+
+ this._bpmnFactory = bpmnFactory;
+ this._popupMenu = popupMenu;
+ this._modeling = modeling;
+ this._moddle = moddle;
+ this._bpmnReplace = bpmnReplace;
+ this._rules = rules;
+ this._translate = translate;
+ this._moddleCopy = moddleCopy;
+
+ this._register();
+}
+
+ReplaceMenuProvider.$inject = [
+ 'bpmnFactory',
+ 'popupMenu',
+ 'modeling',
+ 'moddle',
+ 'bpmnReplace',
+ 'rules',
+ 'translate',
+ 'moddleCopy'
+];
+
+ReplaceMenuProvider.prototype._register = function() {
+ this._popupMenu.registerProvider('bpmn-replace', this);
+};
+
+/**
+ * @param {PopupMenuTarget} target
+ *
+ * @return {PopupMenuEntries}
+ */
+ReplaceMenuProvider.prototype.getPopupMenuEntries = function(target) {
- var _resize = _interopRequireDefault(require("diagram-js/lib/features/resize"));
+ var businessObject = target.businessObject;
- var _diagramJsDirectEditing = _interopRequireDefault(require("diagram-js-direct-editing"));
+ var rules = this._rules;
- var _LabelEditingProvider = _interopRequireDefault(require("./LabelEditingProvider"));
+ var filteredReplaceOptions = [];
- var _LabelEditingPreview = _interopRequireDefault(require("./LabelEditingPreview"));
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(target) || !rules.allowed('shape.replace', { element: target })) {
+ return {};
+ }
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ var differentType = (0,_util_TypeUtil__WEBPACK_IMPORTED_MODULE_1__.isDifferentType)(target);
- var _default = {
- __depends__: [_changeSupport.default, _resize.default, _diagramJsDirectEditing.default],
- __init__: ['labelEditingProvider', 'labelEditingPreview'],
- labelEditingProvider: ['type', _LabelEditingProvider.default],
- labelEditingPreview: ['type', _LabelEditingPreview.default]
- };
- exports.default = _default;
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:DataObjectReference')) {
+ return this._createEntries(target, _replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_3__.DATA_OBJECT_REFERENCE);
+ }
- },{"./LabelEditingPreview":150,"./LabelEditingProvider":151,"diagram-js-direct-editing":245,"diagram-js/lib/features/change-support":283,"diagram-js/lib/features/resize":374}],155:[function(require,module,exports){
- "use strict";
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:DataStoreReference') && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target.parent, 'bpmn:Collaboration')) {
+ return this._createEntries(target, _replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_3__.DATA_STORE_REFERENCE);
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BpmnFactory;
+ // start events outside sub processes
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:StartEvent') && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject.$parent, 'bpmn:SubProcess')) {
- var _minDash = require("min-dash");
+ filteredReplaceOptions = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_3__.START_EVENT, differentType);
- var _ModelingUtil = require("./util/ModelingUtil");
+ return this._createEntries(target, filteredReplaceOptions);
+ }
- var _ModelUtil = require("../../util/ModelUtil");
+ // expanded/collapsed pools
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:Participant')) {
- function BpmnFactory(moddle) {
- this._model = moddle;
- }
+ filteredReplaceOptions = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_3__.PARTICIPANT, function(replaceOption) {
+ return (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isExpanded)(target) !== replaceOption.target.isExpanded;
+ });
- BpmnFactory.$inject = ['moddle'];
+ return this._createEntries(target, filteredReplaceOptions);
+ }
- BpmnFactory.prototype._needsId = function (element) {
- return (0, _ModelingUtil.isAny)(element, ['bpmn:RootElement', 'bpmn:FlowElement', 'bpmn:MessageFlow', 'bpmn:DataAssociation', 'bpmn:Artifact', 'bpmn:Participant', 'bpmn:Lane', 'bpmn:LaneSet', 'bpmn:Process', 'bpmn:Collaboration', 'bpmndi:BPMNShape', 'bpmndi:BPMNEdge', 'bpmndi:BPMNDiagram', 'bpmndi:BPMNPlane', 'bpmn:Property', 'bpmn:CategoryValue']);
- };
+ // start events inside event sub processes
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:StartEvent') && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isEventSubProcess)(businessObject.$parent)) {
+ filteredReplaceOptions = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_3__.EVENT_SUB_PROCESS_START_EVENT, function(replaceOption) {
- BpmnFactory.prototype._ensureId = function (element) {
- // generate semantic ids for elements
- // bpmn:SequenceFlow -> SequenceFlow_ID
- var prefix;
-
- if ((0, _ModelUtil.is)(element, 'bpmn:Activity')) {
- prefix = 'Activity';
- } else if ((0, _ModelUtil.is)(element, 'bpmn:Event')) {
- prefix = 'Event';
- } else if ((0, _ModelUtil.is)(element, 'bpmn:Gateway')) {
- prefix = 'Gateway';
- } else if ((0, _ModelingUtil.isAny)(element, ['bpmn:SequenceFlow', 'bpmn:MessageFlow'])) {
- prefix = 'Flow';
- } else {
- prefix = (element.$type || '').replace(/^[^:]*:/g, '');
- }
+ var target = replaceOption.target;
- prefix += '_';
+ var isInterrupting = target.isInterrupting !== false;
- if (!element.id && this._needsId(element)) {
- element.id = this._model.ids.nextPrefixed(prefix, element);
- }
- };
+ var isInterruptingEqual = businessObject.isInterrupting === isInterrupting;
- BpmnFactory.prototype.create = function (type, attrs) {
- var element = this._model.create(type, attrs || {});
+ // filters elements which types and event definition are equal but have have different interrupting types
+ return differentType(replaceOption) || !differentType(replaceOption) && !isInterruptingEqual;
- this._ensureId(element);
+ });
- return element;
- };
+ return this._createEntries(target, filteredReplaceOptions);
+ }
- BpmnFactory.prototype.createDiLabel = function () {
- return this.create('bpmndi:BPMNLabel', {
- bounds: this.createDiBounds()
- });
- };
+ // start events inside sub processes
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:StartEvent') && !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isEventSubProcess)(businessObject.$parent)
+ && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject.$parent, 'bpmn:SubProcess')) {
+ filteredReplaceOptions = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_3__.START_EVENT_SUB_PROCESS, differentType);
- BpmnFactory.prototype.createDiShape = function (semantic, bounds, attrs) {
- return this.create('bpmndi:BPMNShape', (0, _minDash.assign)({
- bpmnElement: semantic,
- bounds: this.createDiBounds(bounds)
- }, attrs));
- };
+ return this._createEntries(target, filteredReplaceOptions);
+ }
- BpmnFactory.prototype.createDiBounds = function (bounds) {
- return this.create('dc:Bounds', bounds);
- };
+ // end events
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:EndEvent')) {
- BpmnFactory.prototype.createDiWaypoints = function (waypoints) {
- var self = this;
- return (0, _minDash.map)(waypoints, function (pos) {
- return self.createDiWaypoint(pos);
- });
- };
+ filteredReplaceOptions = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_3__.END_EVENT, function(replaceOption) {
+ var target = replaceOption.target;
- BpmnFactory.prototype.createDiWaypoint = function (point) {
- return this.create('dc:Point', (0, _minDash.pick)(point, ['x', 'y']));
- };
+ // hide cancel end events outside transactions
+ if (target.eventDefinitionType == 'bpmn:CancelEventDefinition' && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject.$parent, 'bpmn:Transaction')) {
+ return false;
+ }
- BpmnFactory.prototype.createDiEdge = function (semantic, waypoints, attrs) {
- return this.create('bpmndi:BPMNEdge', (0, _minDash.assign)({
- bpmnElement: semantic
- }, attrs));
- };
+ return differentType(replaceOption);
+ });
- BpmnFactory.prototype.createDiPlane = function (semantic) {
- return this.create('bpmndi:BPMNPlane', {
- bpmnElement: semantic
- });
- };
+ return this._createEntries(target, filteredReplaceOptions);
+ }
- },{"../../util/ModelUtil":240,"./util/ModelingUtil":211,"min-dash":646}],156:[function(require,module,exports){
- "use strict";
+ // boundary events
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:BoundaryEvent')) {
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BpmnLayouter;
+ filteredReplaceOptions = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_3__.BOUNDARY_EVENT, function(replaceOption) {
- var _inherits = _interopRequireDefault(require("inherits"));
+ var target = replaceOption.target;
- var _minDash = require("min-dash");
+ if (target.eventDefinitionType == 'bpmn:CancelEventDefinition' &&
+ !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject.attachedToRef, 'bpmn:Transaction')) {
+ return false;
+ }
+ var cancelActivity = target.cancelActivity !== false;
- var _BaseLayouter = _interopRequireDefault(require("diagram-js/lib/layout/BaseLayouter"));
+ var isCancelActivityEqual = businessObject.cancelActivity == cancelActivity;
- var _ManhattanLayout = require("diagram-js/lib/layout/ManhattanLayout");
+ return differentType(replaceOption) || !differentType(replaceOption) && !isCancelActivityEqual;
+ });
- var _LayoutUtil = require("diagram-js/lib/layout/LayoutUtil");
+ return this._createEntries(target, filteredReplaceOptions);
+ }
- var _DiUtil = require("../../util/DiUtil");
+ // intermediate events
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:IntermediateCatchEvent') ||
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:IntermediateThrowEvent')) {
- var _ModelUtil = require("../../util/ModelUtil");
+ filteredReplaceOptions = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_3__.INTERMEDIATE_EVENT, differentType);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ return this._createEntries(target, filteredReplaceOptions);
+ }
- var ATTACH_ORIENTATION_PADDING = -10,
- BOUNDARY_TO_HOST_THRESHOLD = 40;
- var oppositeOrientationMapping = {
- 'top': 'bottom',
- 'top-right': 'bottom-left',
- 'top-left': 'bottom-right',
- 'right': 'left',
- 'bottom': 'top',
- 'bottom-right': 'top-left',
- 'bottom-left': 'top-right',
- 'left': 'right'
- };
- var orientationDirectionMapping = {
- top: 't',
- right: 'r',
- bottom: 'b',
- left: 'l'
- };
+ // gateways
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:Gateway')) {
- function BpmnLayouter() {}
+ filteredReplaceOptions = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_3__.GATEWAY, differentType);
- (0, _inherits.default)(BpmnLayouter, _BaseLayouter.default);
+ return this._createEntries(target, filteredReplaceOptions);
+ }
- BpmnLayouter.prototype.layoutConnection = function (connection, hints) {
- if (!hints) {
- hints = {};
- }
+ // transactions
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:Transaction')) {
- var source = hints.source || connection.source,
- target = hints.target || connection.target,
- waypoints = hints.waypoints || connection.waypoints,
- connectionStart = hints.connectionStart,
- connectionEnd = hints.connectionEnd;
- var manhattanOptions, updatedWaypoints;
+ filteredReplaceOptions = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_3__.TRANSACTION, differentType);
- if (!connectionStart) {
- connectionStart = getConnectionDocking(waypoints && waypoints[0], source);
- }
+ return this._createEntries(target, filteredReplaceOptions);
+ }
- if (!connectionEnd) {
- connectionEnd = getConnectionDocking(waypoints && waypoints[waypoints.length - 1], target);
- } // TODO(nikku): support vertical modeling
- // and invert preferredLayouts accordingly
+ // expanded event sub processes
+ if ((0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isEventSubProcess)(businessObject) && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isExpanded)(target)) {
+ filteredReplaceOptions = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_3__.EVENT_SUB_PROCESS, differentType);
- if ((0, _ModelUtil.is)(connection, 'bpmn:Association') || (0, _ModelUtil.is)(connection, 'bpmn:DataAssociation')) {
- if (waypoints && !isCompensationAssociation(source, target)) {
- return [].concat([connectionStart], waypoints.slice(1, -1), [connectionEnd]);
- }
- }
+ return this._createEntries(target, filteredReplaceOptions);
+ }
- if ((0, _ModelUtil.is)(connection, 'bpmn:MessageFlow')) {
- manhattanOptions = getMessageFlowManhattanOptions(source, target);
- } else if ((0, _ModelUtil.is)(connection, 'bpmn:SequenceFlow') || isCompensationAssociation(source, target)) {
- // layout all connection between flow elements h:h, except for
- // (1) outgoing of boundary events -> layout based on attach orientation and target orientation
- // (2) incoming/outgoing of gateways -> v:h for outgoing, h:v for incoming
- // (3) loops
- if (source === target) {
- manhattanOptions = {
- preferredLayouts: getLoopPreferredLayout(source, connection)
- };
- } else if ((0, _ModelUtil.is)(source, 'bpmn:BoundaryEvent')) {
- manhattanOptions = {
- preferredLayouts: getBoundaryEventPreferredLayouts(source, target, connectionEnd)
- };
- } else if (isExpandedSubProcess(source) || isExpandedSubProcess(target)) {
- manhattanOptions = getSubProcessManhattanOptions(source);
- } else if ((0, _ModelUtil.is)(source, 'bpmn:Gateway')) {
- manhattanOptions = {
- preferredLayouts: ['v:h']
- };
- } else if ((0, _ModelUtil.is)(target, 'bpmn:Gateway')) {
- manhattanOptions = {
- preferredLayouts: ['h:v']
- };
- } else {
- manhattanOptions = {
- preferredLayouts: ['h:h']
- };
- }
- }
+ // expanded sub processes
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:SubProcess') && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isExpanded)(target)) {
- if (manhattanOptions) {
- manhattanOptions = (0, _minDash.assign)(manhattanOptions, hints);
- updatedWaypoints = (0, _ManhattanLayout.withoutRedundantPoints)((0, _ManhattanLayout.repairConnection)(source, target, connectionStart, connectionEnd, waypoints, manhattanOptions));
- }
+ filteredReplaceOptions = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_3__.SUBPROCESS_EXPANDED, differentType);
- return updatedWaypoints || [connectionStart, connectionEnd];
- }; // helpers //////////
+ return this._createEntries(target, filteredReplaceOptions);
+ }
+ // collapsed ad hoc sub processes
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:AdHocSubProcess') && !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isExpanded)(target)) {
- function getAttachOrientation(attachedElement) {
- var hostElement = attachedElement.host;
- return (0, _LayoutUtil.getOrientation)((0, _LayoutUtil.getMid)(attachedElement), hostElement, ATTACH_ORIENTATION_PADDING);
- }
+ filteredReplaceOptions = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_3__.TASK, function(replaceOption) {
- function getMessageFlowManhattanOptions(source, target) {
- return {
- preferredLayouts: ['straight', 'v:v'],
- preserveDocking: getMessageFlowPreserveDocking(source, target)
- };
- }
+ var target = replaceOption.target;
- function getMessageFlowPreserveDocking(source, target) {
- // (1) docking element connected to participant has precedence
- if ((0, _ModelUtil.is)(target, 'bpmn:Participant')) {
- return 'source';
- }
+ var isTargetSubProcess = target.type === 'bpmn:SubProcess';
- if ((0, _ModelUtil.is)(source, 'bpmn:Participant')) {
- return 'target';
- } // (2) docking element connected to expanded sub-process has precedence
+ var isTargetExpanded = target.isExpanded === true;
+ return (0,_util_TypeUtil__WEBPACK_IMPORTED_MODULE_1__.isDifferentType)(target, target) && (!isTargetSubProcess || isTargetExpanded);
+ });
- if (isExpandedSubProcess(target)) {
- return 'source';
- }
+ return this._createEntries(target, filteredReplaceOptions);
+ }
- if (isExpandedSubProcess(source)) {
- return 'target';
- } // (3) docking event has precedence
+ // sequence flows
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:SequenceFlow')) {
+ return this._createSequenceFlowEntries(target, _replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_3__.SEQUENCE_FLOW);
+ }
+ // flow nodes
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:FlowNode')) {
+ filteredReplaceOptions = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_3__.TASK, differentType);
- if ((0, _ModelUtil.is)(target, 'bpmn:Event')) {
- return 'target';
- }
+ // collapsed sub process cannot be replaced with itself
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:SubProcess') && !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isExpanded)(target)) {
+ filteredReplaceOptions = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(filteredReplaceOptions, function(replaceOption) {
+ return replaceOption.label !== 'Sub-process (collapsed)';
+ });
+ }
- if ((0, _ModelUtil.is)(source, 'bpmn:Event')) {
- return 'source';
- }
+ return this._createEntries(target, filteredReplaceOptions);
+ }
- return null;
- }
+ return {};
+};
- function getSubProcessManhattanOptions(source) {
- return {
- preferredLayouts: ['straight', 'h:h'],
- preserveDocking: getSubProcessPreserveDocking(source)
- };
- }
+/**
+ * @param {PopupMenuTarget} target
+ *
+ * @return {PopupMenuHeaderEntries}
+ */
+ReplaceMenuProvider.prototype.getPopupMenuHeaderEntries = function(target) {
+
+ var headerEntries = {};
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target, 'bpmn:Activity') && !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isEventSubProcess)(target)) {
+ headerEntries = {
+ ...headerEntries,
+ ...this._getLoopCharacteristicsHeaderEntries(target)
+ };
+ }
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target, 'bpmn:DataObjectReference')) {
+ headerEntries = {
+ ...headerEntries,
+ ...this._getCollectionHeaderEntries(target)
+ };
+ }
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target, 'bpmn:Participant')) {
+ headerEntries = {
+ ...headerEntries,
+ ...this._getParticipantMultiplicityHeaderEntries(target)
+ };
+ }
+
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target, 'bpmn:SubProcess') &&
+ !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target, 'bpmn:Transaction') &&
+ !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isEventSubProcess)(target)) {
+ headerEntries = {
+ ...headerEntries,
+ ...this._getAdHocHeaderEntries(target)
+ };
+ }
+
+ if ((0,_modeling_behavior_util_NonInterruptingUtil__WEBPACK_IMPORTED_MODULE_5__.canBeNonInterrupting)(target)) {
+ headerEntries = {
+ ...headerEntries,
+ ...this._getNonInterruptingHeaderEntries(target)
+ };
+ }
+
+ return headerEntries;
+};
+
+
+/**
+ * Create popup menu entries for the given target.
+ *
+ * @param {PopupMenuTarget} target
+ * @param {ReplaceOption[]} replaceOptions
+ *
+ * @return {PopupMenuEntries}
+ */
+ReplaceMenuProvider.prototype._createEntries = function(target, replaceOptions) {
+ var entries = {};
- function getSubProcessPreserveDocking(source) {
- return isExpandedSubProcess(source) ? 'target' : 'source';
- }
+ var self = this;
- function getConnectionDocking(point, shape) {
- return point ? point.original || point : (0, _LayoutUtil.getMid)(shape);
- }
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(replaceOptions, function(replaceOption) {
+ entries[ replaceOption.actionName ] = self._createEntry(replaceOption, target);
+ });
- function isCompensationAssociation(source, target) {
- return (0, _ModelUtil.is)(target, 'bpmn:Activity') && (0, _ModelUtil.is)(source, 'bpmn:BoundaryEvent') && target.businessObject.isForCompensation;
- }
+ return entries;
+};
- function isExpandedSubProcess(element) {
- return (0, _ModelUtil.is)(element, 'bpmn:SubProcess') && (0, _DiUtil.isExpanded)(element);
+/**
+ * Creates popup menu entries for the given sequence flow.
+ *
+ * @param {PopupMenuTarget} target
+ * @param {ReplaceOption[]} replaceOptions
+ *
+ * @return {PopupMenuEntries}
+ */
+ReplaceMenuProvider.prototype._createSequenceFlowEntries = function(target, replaceOptions) {
+
+ var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(target);
+
+ var entries = {};
+
+ var modeling = this._modeling,
+ moddle = this._moddle;
+
+ var self = this;
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(replaceOptions, function(replaceOption) {
+
+ switch (replaceOption.actionName) {
+ case 'replace-with-default-flow':
+ if (businessObject.sourceRef.default !== businessObject &&
+ ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject.sourceRef, 'bpmn:ExclusiveGateway') ||
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject.sourceRef, 'bpmn:InclusiveGateway') ||
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject.sourceRef, 'bpmn:ComplexGateway') ||
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject.sourceRef, 'bpmn:Activity'))) {
+
+ entries = {
+ ...entries,
+ [ replaceOption.actionName ]: self._createEntry(replaceOption, target, function() {
+ modeling.updateProperties(target.source, { default: businessObject });
+ })
+ };
+ }
+ break;
+ case 'replace-with-conditional-flow':
+ if (!businessObject.conditionExpression && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject.sourceRef, 'bpmn:Activity')) {
+
+ entries = {
+ ...entries,
+ [ replaceOption.actionName ]: self._createEntry(replaceOption, target, function() {
+ var conditionExpression = moddle.create('bpmn:FormalExpression', { body: '' });
+
+ modeling.updateProperties(target, { conditionExpression: conditionExpression });
+ })
+ };
+ }
+ break;
+ default:
+
+ // conditional flow -> sequence flow
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject.sourceRef, 'bpmn:Activity') && businessObject.conditionExpression) {
+ entries = {
+ ...entries,
+ [ replaceOption.actionName ]: self._createEntry(replaceOption, target, function() {
+ modeling.updateProperties(target, { conditionExpression: undefined });
+ })
+ };
+ }
+
+ // default flow -> sequence flow
+ if (((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject.sourceRef, 'bpmn:ExclusiveGateway') ||
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject.sourceRef, 'bpmn:InclusiveGateway') ||
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject.sourceRef, 'bpmn:ComplexGateway') ||
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject.sourceRef, 'bpmn:Activity')) &&
+ businessObject.sourceRef.default === businessObject) {
+ entries = {
+ ...entries,
+ [ replaceOption.actionName ]: self._createEntry(replaceOption, target, function() {
+ modeling.updateProperties(target.source, { default: undefined });
+ })
+ };
+ }
+ }
+ });
+
+ return entries;
+};
+
+/**
+ * Create a popup menu entry for the given replace option.
+ *
+ * @param {ReplaceOption} replaceOption
+ * @param {PopupMenuTarget} target
+ * @param {PopupMenuEntryAction} [action]
+ *
+ * @return {PopupMenuEntry}
+ */
+ReplaceMenuProvider.prototype._createEntry = function(replaceOption, target, action) {
+ var translate = this._translate;
+ var replaceElement = this._bpmnReplace.replaceElement;
+
+ var replaceAction = function() {
+ return replaceElement(target, replaceOption.target);
+ };
+
+ var label = replaceOption.label;
+ if (label && typeof label === 'function') {
+ label = label(target);
+ }
+
+ action = action || replaceAction;
+
+ return {
+ label: translate(label),
+ className: replaceOption.className,
+ action: action
+ };
+};
+
+/**
+ * Get popup menu header entries for the loop characteristics of the given BPMN element.
+ *
+ * @param {PopupMenuTarget} target
+ *
+ * @return {PopupMenuHeaderEntries}
+ */
+ReplaceMenuProvider.prototype._getLoopCharacteristicsHeaderEntries = function(target) {
+
+ var self = this;
+ var translate = this._translate;
+
+ function toggleLoopEntry(event, entry) {
+
+ // remove
+ if (entry.active) {
+ self._modeling.updateProperties(target, { loopCharacteristics: undefined });
+ return;
+ }
+
+ const currentLoopCharacteristics = target.businessObject.get('loopCharacteristics'),
+ newLoopCharacteristics = self._moddle.create(entry.options.loopCharacteristics);
+
+ // copy old properties
+ if (currentLoopCharacteristics) {
+ self._moddleCopy.copyElement(currentLoopCharacteristics, newLoopCharacteristics);
+ }
+
+ // update `isSequential` property
+ newLoopCharacteristics.set('isSequential', entry.options.isSequential);
+
+ self._modeling.updateProperties(target, { loopCharacteristics: newLoopCharacteristics });
+ }
+
+ var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(target),
+ loopCharacteristics = businessObject.loopCharacteristics;
+
+ var isSequential,
+ isLoop,
+ isParallel;
+
+ if (loopCharacteristics) {
+ isSequential = loopCharacteristics.isSequential;
+ isLoop = loopCharacteristics.isSequential === undefined;
+ isParallel = loopCharacteristics.isSequential !== undefined && !loopCharacteristics.isSequential;
+ }
+
+
+ return {
+ 'toggle-parallel-mi' : {
+ className: 'bpmn-icon-parallel-mi-marker',
+ title: translate('Parallel multi-instance'),
+ active: isParallel,
+ action: toggleLoopEntry,
+ options: {
+ loopCharacteristics: 'bpmn:MultiInstanceLoopCharacteristics',
+ isSequential: false
+ }
+ },
+ 'toggle-sequential-mi': {
+ className: 'bpmn-icon-sequential-mi-marker',
+ title: translate('Sequential multi-instance'),
+ active: isSequential,
+ action: toggleLoopEntry,
+ options: {
+ loopCharacteristics: 'bpmn:MultiInstanceLoopCharacteristics',
+ isSequential: true
+ }
+ },
+ 'toggle-loop': {
+ className: 'bpmn-icon-loop-marker',
+ title: translate('Loop'),
+ active: isLoop,
+ action: toggleLoopEntry,
+ options: {
+ loopCharacteristics: 'bpmn:StandardLoopCharacteristics'
+ }
+ }
+ };
+};
+
+/**
+ * Get popup menu header entries for the collection property of the given BPMN element.
+ *
+ * @param {PopupMenuTarget} target
+ *
+ * @return {PopupMenuHeaderEntries}
+ */
+ReplaceMenuProvider.prototype._getCollectionHeaderEntries = function(target) {
+
+ var self = this;
+ var translate = this._translate;
+
+ var dataObject = target.businessObject.dataObjectRef;
+
+ if (!dataObject) {
+ return {};
+ }
+
+ function toggleIsCollection(event, entry) {
+ self._modeling.updateModdleProperties(
+ target,
+ dataObject,
+ { isCollection: !entry.active });
+ }
+
+ var isCollection = dataObject.isCollection;
+
+ return {
+ 'toggle-is-collection': {
+ className: 'bpmn-icon-parallel-mi-marker',
+ title: translate('Collection'),
+ active: isCollection,
+ action: toggleIsCollection,
+ }
+ };
+};
+
+/**
+ * Get popup menu header entries for the participant multiplicity property of the given BPMN element.
+ *
+ * @param {PopupMenuTarget} target
+ *
+ * @return {PopupMenuHeaderEntries}
+ */
+ReplaceMenuProvider.prototype._getParticipantMultiplicityHeaderEntries = function(target) {
+
+ var self = this;
+ var bpmnFactory = this._bpmnFactory;
+ var translate = this._translate;
+
+ function toggleParticipantMultiplicity(event, entry) {
+ var isActive = entry.active;
+ var participantMultiplicity;
+
+ if (!isActive) {
+ participantMultiplicity = bpmnFactory.create('bpmn:ParticipantMultiplicity');
+ }
+
+ self._modeling.updateProperties(
+ target,
+ { participantMultiplicity: participantMultiplicity });
+ }
+
+ var participantMultiplicity = target.businessObject.participantMultiplicity;
+
+ return {
+ 'toggle-participant-multiplicity': {
+ className: 'bpmn-icon-parallel-mi-marker',
+ title: translate('Participant multiplicity'),
+ active: !!participantMultiplicity,
+ action: toggleParticipantMultiplicity,
+ }
+ };
+};
+
+/**
+ * Get popup menu header entries for the ad-hoc property of the given BPMN element.
+ *
+ * @param {PopupMenuTarget} element
+ *
+ * @return {PopupMenuHeaderEntries}
+ */
+ReplaceMenuProvider.prototype._getAdHocHeaderEntries = function(element) {
+ var translate = this._translate;
+ var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(element);
+
+ var isAdHoc = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:AdHocSubProcess');
+
+ var replaceElement = this._bpmnReplace.replaceElement;
+
+ return {
+ 'toggle-adhoc': {
+ className: 'bpmn-icon-ad-hoc-marker',
+ title: translate('Ad-hoc'),
+ active: isAdHoc,
+ action: function(event, entry) {
+ if (isAdHoc) {
+ return replaceElement(element, { type: 'bpmn:SubProcess' }, {
+ autoResize: false,
+ layoutConnection: false
+ });
+ } else {
+ return replaceElement(element, { type: 'bpmn:AdHocSubProcess' }, {
+ autoResize: false,
+ layoutConnection: false
+ });
}
+ }
+ }
+ };
+};
- function isSame(a, b) {
- return a === b;
- }
- function isAnyOrientation(orientation, orientations) {
- return orientations.indexOf(orientation) !== -1;
- }
+ReplaceMenuProvider.prototype._getNonInterruptingHeaderEntries = function(element) {
+ const translate = this._translate;
+ const businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(element);
+ const self = this;
- function getHorizontalOrientation(orientation) {
- var matches = /right|left/.exec(orientation);
- return matches && matches[0];
- }
+ const interruptingProperty = (0,_modeling_behavior_util_NonInterruptingUtil__WEBPACK_IMPORTED_MODULE_5__.getInterruptingProperty)(element);
- function getVerticalOrientation(orientation) {
- var matches = /top|bottom/.exec(orientation);
- return matches && matches[0];
- }
+ const icon = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(element, 'bpmn:BoundaryEvent') ? _util_Icons__WEBPACK_IMPORTED_MODULE_6__["default"]['intermediate-event-non-interrupting'] : _util_Icons__WEBPACK_IMPORTED_MODULE_6__["default"]['start-event-non-interrupting'];
- function isOppositeOrientation(a, b) {
- return oppositeOrientationMapping[a] === b;
- }
+ const isNonInterrupting = !businessObject[interruptingProperty];
- function isOppositeHorizontalOrientation(a, b) {
- var horizontalOrientation = getHorizontalOrientation(a);
- var oppositeHorizontalOrientation = oppositeOrientationMapping[horizontalOrientation];
- return b.indexOf(oppositeHorizontalOrientation) !== -1;
- }
+ return {
+ 'toggle-non-interrupting': {
+ imageHtml: icon,
+ title: translate('Toggle non-interrupting'),
+ active: isNonInterrupting,
+ action: function() {
+ self._modeling.updateProperties(element, {
+ [interruptingProperty]: !!isNonInterrupting
+ });
+ }
+ }
+ };
+};
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/features/popup-menu/index.js":
+/*!****************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/popup-menu/index.js ***!
+ \****************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_features_popup_menu__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/popup-menu */ "../node_modules/diagram-js/lib/features/popup-menu/index.js");
+/* harmony import */ var _replace__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../replace */ "../node_modules/bpmn-js/lib/features/replace/index.js");
+/* harmony import */ var _ReplaceMenuProvider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ReplaceMenuProvider */ "../node_modules/bpmn-js/lib/features/popup-menu/ReplaceMenuProvider.js");
+/* harmony import */ var _auto_place__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../auto-place */ "../node_modules/bpmn-js/lib/features/auto-place/index.js");
+
+
+
+
+
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ diagram_js_lib_features_popup_menu__WEBPACK_IMPORTED_MODULE_0__["default"],
+ _replace__WEBPACK_IMPORTED_MODULE_1__["default"],
+ _auto_place__WEBPACK_IMPORTED_MODULE_2__["default"]
+ ],
+ __init__: [
+ 'replaceMenuProvider'
+ ],
+ replaceMenuProvider: [ 'type', _ReplaceMenuProvider__WEBPACK_IMPORTED_MODULE_3__["default"] ]
+});
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/features/popup-menu/util/Icons.js":
+/*!*********************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/popup-menu/util/Icons.js ***!
+ \*********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ 'start-event-non-interrupting': `
+
+
+
+
+ `,
+ 'intermediate-event-non-interrupting': `
+
+
+
+
+
+ `
+});
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/features/popup-menu/util/TypeUtil.js":
+/*!************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/popup-menu/util/TypeUtil.js ***!
+ \************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ isDifferentType: () => (/* binding */ isDifferentType)
+/* harmony export */ });
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
+
+
+
+
+/**
+ * @typedef {import('../../../model/Types').Element} Element
+ * @typedef {import('diagram-js/lib/features/popup-menu/PopupMenu').PopupMenuTarget} PopupMenuTarget
+ *
+ * @typedef {(entry: PopupMenuTarget) => boolean} DifferentTypeValidator
+ */
- function isOppositeVerticalOrientation(a, b) {
- var verticalOrientation = getVerticalOrientation(a);
- var oppositeVerticalOrientation = oppositeOrientationMapping[verticalOrientation];
- return b.indexOf(oppositeVerticalOrientation) !== -1;
- }
+/**
+ * Returns true, if an element is from a different type
+ * than a target definition. Takes into account the type,
+ * event definition type and triggeredByEvent property.
+ *
+ * @param {Element} element
+ *
+ * @return {DifferentTypeValidator}
+ */
+function isDifferentType(element) {
- function isHorizontalOrientation(orientation) {
- return orientation === 'right' || orientation === 'left';
- }
+ return function(entry) {
+ var target = entry.target;
- function getLoopPreferredLayout(source, connection) {
- var waypoints = connection.waypoints;
- var orientation = waypoints && waypoints.length && (0, _LayoutUtil.getOrientation)(waypoints[0], source);
+ var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(element),
+ eventDefinition = businessObject.eventDefinitions && businessObject.eventDefinitions[0];
- if (orientation === 'top') {
- return ['t:r'];
- } else if (orientation === 'right') {
- return ['r:b'];
- } else if (orientation === 'left') {
- return ['l:t'];
- }
+ var isTypeEqual = businessObject.$type === target.type;
- return ['b:l'];
- }
+ var isEventDefinitionEqual = (
+ (eventDefinition && eventDefinition.$type) === target.eventDefinitionType
+ );
- function getBoundaryEventPreferredLayouts(source, target, end) {
- var sourceMid = (0, _LayoutUtil.getMid)(source),
- targetMid = (0, _LayoutUtil.getMid)(target),
- attachOrientation = getAttachOrientation(source),
- sourceLayout,
- targetLayout;
- var isLoop = isSame(source.host, target);
- var attachedToSide = isAnyOrientation(attachOrientation, ['top', 'right', 'bottom', 'left']);
- var targetOrientation = (0, _LayoutUtil.getOrientation)(targetMid, sourceMid, {
- x: source.width / 2 + target.width / 2,
- y: source.height / 2 + target.height / 2
- });
+ var isTriggeredByEventEqual = (
- if (isLoop) {
- return getBoundaryEventLoopLayout(attachOrientation, attachedToSide, source, target, end);
- } // source layout
+ // coherse to
+ !!target.triggeredByEvent === !!businessObject.triggeredByEvent
+ );
+ var isExpandedEqual = (
+ target.isExpanded === undefined ||
+ target.isExpanded === (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_1__.isExpanded)(element)
+ );
- sourceLayout = getBoundaryEventSourceLayout(attachOrientation, targetOrientation, attachedToSide); // target layout
+ return !isTypeEqual || !isEventDefinitionEqual || !isTriggeredByEventEqual || !isExpandedEqual;
+ };
+}
- targetLayout = getBoundaryEventTargetLayout(attachOrientation, targetOrientation, attachedToSide);
- return [sourceLayout + ':' + targetLayout];
- }
- function getBoundaryEventLoopLayout(attachOrientation, attachedToSide, source, target, end) {
- var orientation = attachedToSide ? attachOrientation : getVerticalOrientation(attachOrientation),
- sourceLayout = orientationDirectionMapping[orientation],
- targetLayout;
+/***/ }),
- if (attachedToSide) {
- if (isHorizontalOrientation(attachOrientation)) {
- targetLayout = shouldConnectToSameSide('y', source, target, end) ? 'h' : 'b';
- } else {
- targetLayout = shouldConnectToSameSide('x', source, target, end) ? 'v' : 'l';
- }
- } else {
- targetLayout = 'v';
- }
+/***/ "../node_modules/bpmn-js/lib/features/replace-preview/BpmnReplacePreview.js":
+/*!**********************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/replace-preview/BpmnReplacePreview.js ***!
+ \**********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- return [sourceLayout + ':' + targetLayout];
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BpmnReplacePreview)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_util_EscapeUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/util/EscapeUtil */ "../node_modules/diagram-js/lib/util/EscapeUtil.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dom */ "../node_modules/min-dom/dist/index.esm.js");
+/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tiny-svg */ "../node_modules/tiny-svg/dist/index.esm.js");
- function shouldConnectToSameSide(axis, source, target, end) {
- var threshold = BOUNDARY_TO_HOST_THRESHOLD;
- return !(areCloseOnAxis(axis, end, target, threshold) || areCloseOnAxis(axis, end, {
- x: target.x + target.width,
- y: target.y + target.height
- }, threshold) || areCloseOnAxis(axis, end, (0, _LayoutUtil.getMid)(source), threshold));
- }
- function areCloseOnAxis(axis, a, b, threshold) {
- return Math.abs(a[axis] - b[axis]) < threshold;
- }
- function getBoundaryEventSourceLayout(attachOrientation, targetOrientation, attachedToSide) {
- // attached to either top, right, bottom or left side
- if (attachedToSide) {
- return orientationDirectionMapping[attachOrientation];
- } // attached to either top-right, top-left, bottom-right or bottom-left corner
- // same vertical or opposite horizontal orientation
- if (isSame(getVerticalOrientation(attachOrientation), getVerticalOrientation(targetOrientation)) || isOppositeOrientation(getHorizontalOrientation(attachOrientation), getHorizontalOrientation(targetOrientation))) {
- return orientationDirectionMapping[getVerticalOrientation(attachOrientation)];
- } // fallback
- return orientationDirectionMapping[getHorizontalOrientation(attachOrientation)];
- }
- function getBoundaryEventTargetLayout(attachOrientation, targetOrientation, attachedToSide) {
- // attached to either top, right, bottom or left side
- if (attachedToSide) {
- if (isHorizontalOrientation(attachOrientation)) {
- // orientation is right or left
- // opposite horizontal orientation or same orientation
- if (isOppositeHorizontalOrientation(attachOrientation, targetOrientation) || isSame(attachOrientation, targetOrientation)) {
- return 'h';
- } // fallback
- return 'v';
- } else {
- // orientation is top or bottom
- // opposite vertical orientation or same orientation
- if (isOppositeVerticalOrientation(attachOrientation, targetOrientation) || isSame(attachOrientation, targetOrientation)) {
- return 'v';
- } // fallback
- return 'h';
- }
- } // attached to either top-right, top-left, bottom-right or bottom-left corner
- // orientation is right, left
- // or same vertical orientation but also right or left
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('diagram-js/lib/core/ElementRegistry').default} ElementRegistry
+ * @typedef {import('diagram-js/lib/core/ElementFactory').default} ElementFactory
+ * @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
+ * @typedef {import('diagram-js/lib/features/preview-support/PreviewSupport').default} PreviewSupport
+ */
+var LOW_PRIORITY = 250;
- if (isHorizontalOrientation(targetOrientation) || isSame(getVerticalOrientation(attachOrientation), getVerticalOrientation(targetOrientation)) && getHorizontalOrientation(targetOrientation)) {
- return 'h';
- } else {
- return 'v';
- }
- }
+/**
+ * @param {EventBus} eventBus
+ * @param {ElementRegistry} elementRegistry
+ * @param {ElementFactory} elementFactory
+ * @param {Canvas} canvas
+ * @param {PreviewSupport} previewSupport
+ */
+function BpmnReplacePreview(
+ eventBus, elementRegistry, elementFactory,
+ canvas, previewSupport) {
- },{"../../util/DiUtil":238,"../../util/ModelUtil":240,"diagram-js/lib/layout/BaseLayouter":403,"diagram-js/lib/layout/LayoutUtil":405,"diagram-js/lib/layout/ManhattanLayout":406,"inherits":438,"min-dash":646}],157:[function(require,module,exports){
- "use strict";
+ diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BpmnUpdater;
+ /**
+ * Replace the visuals of all elements in the context which can be replaced
+ *
+ * @param {Object} context
+ */
+ function replaceVisual(context) {
- var _minDash = require("min-dash");
+ var replacements = context.canExecute.replacements;
- var _inherits = _interopRequireDefault(require("inherits"));
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(replacements, function(replacement) {
- var _Collections = require("diagram-js/lib/util/Collections");
+ var id = replacement.oldElementId;
- var _model = require("diagram-js/lib/model");
+ var newElement = {
+ type: replacement.newElementType
+ };
- var _ModelUtil = require("../../util/ModelUtil");
+ // if the visual of the element is already replaced
+ if (context.visualReplacements[id]) {
+ return;
+ }
- var _ModelingUtil = require("./util/ModelingUtil");
+ var element = elementRegistry.get(id);
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(newElement, { x: element.x, y: element.y });
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ // create a temporary shape
+ var tempShape = elementFactory.createShape(newElement);
- /**
- * A handler responsible for updating the underlying BPMN 2.0 XML + DI
- * once changes on the diagram happen
- */
- function BpmnUpdater(eventBus, bpmnFactory, connectionDocking, translate) {
- _CommandInterceptor.default.call(this, eventBus);
-
- this._bpmnFactory = bpmnFactory;
- this._translate = translate;
- var self = this; // connection cropping //////////////////////
- // crop connection ends during create/update
-
- function cropConnection(e) {
- var context = e.context,
- hints = context.hints || {},
- connection;
-
- if (!context.cropped && hints.createElementsBehavior !== false) {
- connection = context.connection;
- connection.waypoints = connectionDocking.getCroppedWaypoints(connection);
- context.cropped = true;
- }
- }
+ canvas.addShape(tempShape, element.parent);
- this.executed(['connection.layout', 'connection.create'], cropConnection);
- this.reverted(['connection.layout'], function (e) {
- delete e.context.cropped;
- }); // BPMN + DI update //////////////////////
- // update parent
+ // select the original SVG element related to the element and hide it
+ var gfx = (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.query)('[data-element-id="' + (0,diagram_js_lib_util_EscapeUtil__WEBPACK_IMPORTED_MODULE_3__.escapeCSS)(element.id) + '"]', context.dragGroup);
- function updateParent(e) {
- var context = e.context;
- self.updateParent(context.shape || context.connection, context.oldParent);
- }
+ if (gfx) {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(gfx, { display: 'none' });
+ }
- function reverseUpdateParent(e) {
- var context = e.context;
- var element = context.shape || context.connection,
- // oldParent is the (old) new parent, because we are undoing
- oldParent = context.parent || context.newParent;
- self.updateParent(element, oldParent);
- }
+ // clone the gfx of the temporary shape and add it to the drag group
+ var dragger = previewSupport.addDragger(tempShape, context.dragGroup);
- this.executed(['shape.move', 'shape.create', 'shape.delete', 'connection.create', 'connection.move', 'connection.delete'], ifBpmn(updateParent));
- this.reverted(['shape.move', 'shape.create', 'shape.delete', 'connection.create', 'connection.move', 'connection.delete'], ifBpmn(reverseUpdateParent));
- /*
- * ## Updating Parent
- *
- * When morphing a Process into a Collaboration or vice-versa,
- * make sure that both the *semantic* and *di* parent of each element
- * is updated.
+ context.visualReplacements[id] = dragger;
+
+ canvas.removeShape(tempShape);
+ });
+ }
+
+ /**
+ * Restore the original visuals of the previously replaced elements
*
+ * @param {Object} context
*/
+ function restoreVisual(context) {
- function updateRoot(event) {
- var context = event.context,
- oldRoot = context.oldRoot,
- children = oldRoot.children;
- (0, _minDash.forEach)(children, function (child) {
- if ((0, _ModelUtil.is)(child, 'bpmn:BaseElement')) {
- self.updateParent(child);
- }
- });
- }
+ var visualReplacements = context.visualReplacements;
- this.executed(['canvas.updateRoot'], updateRoot);
- this.reverted(['canvas.updateRoot'], updateRoot); // update bounds
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(visualReplacements, function(dragger, id) {
- function updateBounds(e) {
- var shape = e.context.shape;
+ var originalGfx = (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.query)('[data-element-id="' + (0,diagram_js_lib_util_EscapeUtil__WEBPACK_IMPORTED_MODULE_3__.escapeCSS)(id) + '"]', context.dragGroup);
- if (!(0, _ModelUtil.is)(shape, 'bpmn:BaseElement')) {
- return;
- }
+ if (originalGfx) {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(originalGfx, { display: 'inline' });
+ }
- self.updateBounds(shape);
- }
+ dragger.remove();
- this.executed(['shape.move', 'shape.create', 'shape.resize'], ifBpmn(function (event) {
- // exclude labels because they're handled separately during shape.changed
- if (event.context.shape.type === 'label') {
- return;
- }
+ if (visualReplacements[id]) {
+ delete visualReplacements[id];
+ }
+ });
+ }
- updateBounds(event);
- }));
- this.reverted(['shape.move', 'shape.create', 'shape.resize'], ifBpmn(function (event) {
- // exclude labels because they're handled separately during shape.changed
- if (event.context.shape.type === 'label') {
- return;
- }
+ eventBus.on('shape.move.move', LOW_PRIORITY, function(event) {
- updateBounds(event);
- })); // Handle labels separately. This is necessary, because the label bounds have to be updated
- // every time its shape changes, not only on move, create and resize.
+ var context = event.context,
+ canExecute = context.canExecute;
- eventBus.on('shape.changed', function (event) {
- if (event.element.type === 'label') {
- updateBounds({
- context: {
- shape: event.element
- }
- });
- }
- }); // attach / detach connection
+ if (!context.visualReplacements) {
+ context.visualReplacements = {};
+ }
- function updateConnection(e) {
- self.updateConnection(e.context);
- }
+ if (canExecute && canExecute.replacements) {
+ replaceVisual(context);
+ } else {
+ restoreVisual(context);
+ }
+ });
+}
- this.executed(['connection.create', 'connection.move', 'connection.delete', 'connection.reconnect'], ifBpmn(updateConnection));
- this.reverted(['connection.create', 'connection.move', 'connection.delete', 'connection.reconnect'], ifBpmn(updateConnection)); // update waypoints
+BpmnReplacePreview.$inject = [
+ 'eventBus',
+ 'elementRegistry',
+ 'elementFactory',
+ 'canvas',
+ 'previewSupport'
+];
- function updateConnectionWaypoints(e) {
- self.updateConnectionWaypoints(e.context.connection);
- }
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_5__["default"])(BpmnReplacePreview, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- this.executed(['connection.layout', 'connection.move', 'connection.updateWaypoints'], ifBpmn(updateConnectionWaypoints));
- this.reverted(['connection.layout', 'connection.move', 'connection.updateWaypoints'], ifBpmn(updateConnectionWaypoints)); // update conditional/default flows
+/***/ }),
- this.executed('connection.reconnect', ifBpmn(function (event) {
- var context = event.context,
- connection = context.connection,
- oldSource = context.oldSource,
- newSource = context.newSource,
- connectionBo = (0, _ModelUtil.getBusinessObject)(connection),
- oldSourceBo = (0, _ModelUtil.getBusinessObject)(oldSource),
- newSourceBo = (0, _ModelUtil.getBusinessObject)(newSource); // remove condition from connection on reconnect to new source
- // if new source can NOT have condional sequence flow
+/***/ "../node_modules/bpmn-js/lib/features/replace-preview/index.js":
+/*!*********************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/replace-preview/index.js ***!
+ \*********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- if (connectionBo.conditionExpression && !(0, _ModelingUtil.isAny)(newSourceBo, ['bpmn:Activity', 'bpmn:ExclusiveGateway', 'bpmn:InclusiveGateway'])) {
- context.oldConditionExpression = connectionBo.conditionExpression;
- delete connectionBo.conditionExpression;
- } // remove default from old source flow on reconnect to new source
- // if source changed
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_features_preview_support__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/preview-support */ "../node_modules/diagram-js/lib/features/preview-support/index.js");
+/* harmony import */ var _BpmnReplacePreview__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BpmnReplacePreview */ "../node_modules/bpmn-js/lib/features/replace-preview/BpmnReplacePreview.js");
- if (oldSource !== newSource && oldSourceBo.default === connectionBo) {
- context.oldDefault = oldSourceBo.default;
- delete oldSourceBo.default;
- }
- }));
- this.reverted('connection.reconnect', ifBpmn(function (event) {
- var context = event.context,
- connection = context.connection,
- oldSource = context.oldSource,
- newSource = context.newSource,
- connectionBo = (0, _ModelUtil.getBusinessObject)(connection),
- oldSourceBo = (0, _ModelUtil.getBusinessObject)(oldSource),
- newSourceBo = (0, _ModelUtil.getBusinessObject)(newSource); // add condition to connection on revert reconnect to new source
-
- if (context.oldConditionExpression) {
- connectionBo.conditionExpression = context.oldConditionExpression;
- } // add default to old source on revert reconnect to new source
-
-
- if (context.oldDefault) {
- oldSourceBo.default = context.oldDefault;
- delete newSourceBo.default;
- }
- })); // update attachments
- function updateAttachment(e) {
- self.updateAttachment(e.context);
- }
- this.executed(['element.updateAttachment'], ifBpmn(updateAttachment));
- this.reverted(['element.updateAttachment'], ifBpmn(updateAttachment));
- }
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ diagram_js_lib_features_preview_support__WEBPACK_IMPORTED_MODULE_0__["default"]
+ ],
+ __init__: [ 'bpmnReplacePreview' ],
+ bpmnReplacePreview: [ 'type', _BpmnReplacePreview__WEBPACK_IMPORTED_MODULE_1__["default"] ]
+});
- (0, _inherits.default)(BpmnUpdater, _CommandInterceptor.default);
- BpmnUpdater.$inject = ['eventBus', 'bpmnFactory', 'connectionDocking', 'translate']; // implementation //////////////////////
- BpmnUpdater.prototype.updateAttachment = function (context) {
- var shape = context.shape,
- businessObject = shape.businessObject,
- host = shape.host;
- businessObject.attachedToRef = host && host.businessObject;
- };
+/***/ }),
- BpmnUpdater.prototype.updateParent = function (element, oldParent) {
- // do not update BPMN 2.0 label parent
- if (element instanceof _model.Label) {
- return;
- } // data stores in collaborations are handled separately by DataStoreBehavior
+/***/ "../node_modules/bpmn-js/lib/features/replace/BpmnReplace.js":
+/*!*******************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/replace/BpmnReplace.js ***!
+ \*******************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BpmnReplace)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../modeling/util/ModelingUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
+/* harmony import */ var _copy_paste_ModdleCopy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../copy-paste/ModdleCopy */ "../node_modules/bpmn-js/lib/features/copy-paste/ModdleCopy.js");
- if ((0, _ModelUtil.is)(element, 'bpmn:DataStoreReference') && element.parent && (0, _ModelUtil.is)(element.parent, 'bpmn:Collaboration')) {
- return;
- }
- var parentShape = element.parent;
- var businessObject = element.businessObject,
- parentBusinessObject = parentShape && parentShape.businessObject,
- parentDi = parentBusinessObject && parentBusinessObject.di;
- if ((0, _ModelUtil.is)(element, 'bpmn:FlowNode')) {
- this.updateFlowNodeRefs(businessObject, parentBusinessObject, oldParent && oldParent.businessObject);
- }
- if ((0, _ModelUtil.is)(element, 'bpmn:DataOutputAssociation')) {
- if (element.source) {
- parentBusinessObject = element.source.businessObject;
- } else {
- parentBusinessObject = null;
- }
- }
- if ((0, _ModelUtil.is)(element, 'bpmn:DataInputAssociation')) {
- if (element.target) {
- parentBusinessObject = element.target.businessObject;
- } else {
- parentBusinessObject = null;
- }
- }
- this.updateSemanticParent(businessObject, parentBusinessObject);
- if ((0, _ModelUtil.is)(element, 'bpmn:DataObjectReference') && businessObject.dataObjectRef) {
- this.updateSemanticParent(businessObject.dataObjectRef, parentBusinessObject);
- }
- this.updateDiParent(businessObject.di, parentDi);
- };
- BpmnUpdater.prototype.updateBounds = function (shape) {
- var di = shape.businessObject.di;
- var target = shape instanceof _model.Label ? this._getLabel(di) : di;
- var bounds = target.bounds;
- if (!bounds) {
- bounds = this._bpmnFactory.createDiBounds();
- target.set('bounds', bounds);
- }
+/**
+ * @typedef {import('../modeling/BpmnFactory').default} BpmnFactory
+ * @typedef {import('../modeling/ElementFactory').default} ElementFactory
+ * @typedef {import('../copy-paste/ModdleCopy').default} ModdleCopy
+ * @typedef {import('../modeling/Modeling').default} Modeling
+ * @typedef {import('diagram-js/lib/features/replace/Replace').default} Replace
+ * @typedef {import('diagram-js/lib/features/rules/Rules').default} Rules
+ *
+ * @typedef {import('../../model/Types').Element} Element
+ * @typedef {import('../../model/Types').Shape} Shape
+ * @typedef {import('../../model/Types').ModdleElement} ModdleElement
+ *
+ * @typedef { {
+ * type: string;
+ * cancelActivity: boolean;
+ * instantiate: boolean;
+ * eventGatewayType: string;
+ * triggeredByEvent: boolean;
+ * isInterrupting: boolean;
+ * collapsed: boolean;
+ * isExpanded: boolean;
+ * eventDefinitionType: string;
+ * eventDefinitionAttrs: Object;
+ * host: Shape;
+ * } } TargetElement
+ *
+ * @typedef { {
+ * moveChildren: boolean;
+ * } & Record } Hints
+ */
- (0, _minDash.assign)(bounds, {
- x: shape.x,
- y: shape.y,
- width: shape.width,
- height: shape.height
- });
- };
+function copyProperties(source, target, properties) {
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(properties)) {
+ properties = [ properties ];
+ }
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(properties, function(property) {
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isUndefined)(source[property])) {
+ target[property] = source[property];
+ }
+ });
+}
+
+
+var CUSTOM_PROPERTIES = [
+ 'cancelActivity',
+ 'instantiate',
+ 'eventGatewayType',
+ 'triggeredByEvent',
+ 'isInterrupting'
+];
+
+/**
+ * Check if element should be collapsed or expanded.
+ */
+function shouldToggleCollapsed(element, targetElement) {
- BpmnUpdater.prototype.updateFlowNodeRefs = function (businessObject, newContainment, oldContainment) {
- if (oldContainment === newContainment) {
- return;
- }
+ var oldCollapsed = (
+ element && (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.has)(element, 'collapsed') ? element.collapsed : !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_1__.isExpanded)(element)
+ );
- var oldRefs, newRefs;
+ var targetCollapsed;
- if ((0, _ModelUtil.is)(oldContainment, 'bpmn:Lane')) {
- oldRefs = oldContainment.get('flowNodeRef');
- (0, _Collections.remove)(oldRefs, businessObject);
- }
+ if (targetElement && ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.has)(targetElement, 'collapsed') || (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.has)(targetElement, 'isExpanded'))) {
- if ((0, _ModelUtil.is)(newContainment, 'bpmn:Lane')) {
- newRefs = newContainment.get('flowNodeRef');
- (0, _Collections.add)(newRefs, businessObject);
- }
- }; // update existing sourceElement and targetElement di information
+ // property is explicitly set so use it
+ targetCollapsed = (
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.has)(targetElement, 'collapsed') ? targetElement.collapsed : !targetElement.isExpanded
+ );
+ } else {
+ // keep old state
+ targetCollapsed = oldCollapsed;
+ }
- BpmnUpdater.prototype.updateDiConnection = function (di, newSource, newTarget) {
- if (di.sourceElement && di.sourceElement.bpmnElement !== newSource) {
- di.sourceElement = newSource && newSource.di;
- }
+ if (oldCollapsed !== targetCollapsed) {
+ return true;
+ }
- if (di.targetElement && di.targetElement.bpmnElement !== newTarget) {
- di.targetElement = newTarget && newTarget.di;
- }
- };
+ return false;
+}
- BpmnUpdater.prototype.updateDiParent = function (di, parentDi) {
- if (parentDi && !(0, _ModelUtil.is)(parentDi, 'bpmndi:BPMNPlane')) {
- parentDi = parentDi.$parent;
- }
- if (di.$parent === parentDi) {
- return;
- }
+/**
+ * BPMN-specific replace.
+ *
+ * @param {BpmnFactory} bpmnFactory
+ * @param {ElementFactory} elementFactory
+ * @param {ModdleCopy} moddleCopy
+ * @param {Modeling} modeling
+ * @param {Replace} replace
+ * @param {Rules} rules
+ */
+function BpmnReplace(
+ bpmnFactory,
+ elementFactory,
+ moddleCopy,
+ modeling,
+ replace,
+ rules
+) {
+
+ /**
+ * Prepares a new business object for the replacement element
+ * and triggers the replace operation.
+ *
+ * @param {Element} element
+ * @param {TargetElement} targetElement
+ * @param {Hints} [hints]
+ *
+ * @return {Element}
+ */
+ function replaceElement(element, targetElement, hints) {
- var planeElements = (parentDi || di.$parent).get('planeElement');
+ hints = hints || {};
- if (parentDi) {
- planeElements.push(di);
- di.$parent = parentDi;
- } else {
- (0, _Collections.remove)(planeElements, di);
- di.$parent = null;
- }
- };
+ var type = targetElement.type,
+ oldBusinessObject = element.businessObject;
- function getDefinitions(element) {
- while (element && !(0, _ModelUtil.is)(element, 'bpmn:Definitions')) {
- element = element.$parent;
- }
+ if (isSubProcess(oldBusinessObject) && type === 'bpmn:SubProcess') {
+ if (shouldToggleCollapsed(element, targetElement)) {
- return element;
- }
+ // expanding or collapsing process
+ modeling.toggleCollapse(element);
- BpmnUpdater.prototype.getLaneSet = function (container) {
- var laneSet, laneSets; // bpmn:Lane
+ return element;
+ }
+ }
- if ((0, _ModelUtil.is)(container, 'bpmn:Lane')) {
- laneSet = container.childLaneSet;
+ var newBusinessObject = bpmnFactory.create(type);
- if (!laneSet) {
- laneSet = this._bpmnFactory.create('bpmn:LaneSet');
- container.childLaneSet = laneSet;
- laneSet.$parent = container;
- }
+ var newElement = {
+ type: type,
+ businessObject: newBusinessObject,
+ };
- return laneSet;
- } // bpmn:Participant
+ newElement.di = {};
+ if (type === 'bpmn:ExclusiveGateway') {
+ newElement.di.isMarkerVisible = true;
+ }
- if ((0, _ModelUtil.is)(container, 'bpmn:Participant')) {
- container = container.processRef;
- } // bpmn:FlowElementsContainer
+ // colors will be set to DI
+ copyProperties(element.di, newElement.di, [
+ 'fill',
+ 'stroke',
+ 'background-color',
+ 'border-color',
+ 'color'
+ ]);
+ var elementProps = (0,_copy_paste_ModdleCopy__WEBPACK_IMPORTED_MODULE_2__.getPropertyNames)(oldBusinessObject.$descriptor),
+ newElementProps = (0,_copy_paste_ModdleCopy__WEBPACK_IMPORTED_MODULE_2__.getPropertyNames)(newBusinessObject.$descriptor, true),
+ copyProps = intersection(elementProps, newElementProps);
- laneSets = container.get('laneSets');
- laneSet = laneSets[0];
+ // initialize special properties defined in target definition
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(newBusinessObject, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.pick)(targetElement, CUSTOM_PROPERTIES));
- if (!laneSet) {
- laneSet = this._bpmnFactory.create('bpmn:LaneSet');
- laneSet.$parent = container;
- laneSets.push(laneSet);
- }
+ var properties = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(copyProps, function(propertyName) {
- return laneSet;
- };
+ // copying event definitions, unless we replace
+ if (propertyName === 'eventDefinitions') {
+ return hasEventDefinition(element, targetElement.eventDefinitionType);
+ }
- BpmnUpdater.prototype.updateSemanticParent = function (businessObject, newParent, visualParent) {
- var containment,
- translate = this._translate;
+ // retain loop characteristics if the target element
+ // is not an event sub process
+ if (propertyName === 'loopCharacteristics') {
+ return !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_1__.isEventSubProcess)(newBusinessObject);
+ }
- if (businessObject.$parent === newParent) {
- return;
- }
+ // so the applied properties from 'target' don't get lost
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.has)(newBusinessObject, propertyName)) {
+ return false;
+ }
- if ((0, _ModelUtil.is)(businessObject, 'bpmn:DataInput') || (0, _ModelUtil.is)(businessObject, 'bpmn:DataOutput')) {
- if ((0, _ModelUtil.is)(newParent, 'bpmn:Participant') && 'processRef' in newParent) {
- newParent = newParent.processRef;
- } // already in correct ioSpecification
+ if (propertyName === 'processRef' && targetElement.isExpanded === false) {
+ return false;
+ }
+ if (propertyName === 'triggeredByEvent') {
+ return false;
+ }
- if ('ioSpecification' in newParent && newParent.ioSpecification === businessObject.$parent) {
- return;
- }
- }
+ if (propertyName === 'isForCompensation') {
+ return !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_1__.isEventSubProcess)(newBusinessObject);
+ }
- if ((0, _ModelUtil.is)(businessObject, 'bpmn:Lane')) {
- if (newParent) {
- newParent = this.getLaneSet(newParent);
- }
+ return true;
+ });
- containment = 'lanes';
- } else if ((0, _ModelUtil.is)(businessObject, 'bpmn:FlowElement')) {
- if (newParent) {
- if ((0, _ModelUtil.is)(newParent, 'bpmn:Participant')) {
- newParent = newParent.processRef;
- } else if ((0, _ModelUtil.is)(newParent, 'bpmn:Lane')) {
- do {
- // unwrap Lane -> LaneSet -> (Lane | FlowElementsContainer)
- newParent = newParent.$parent.$parent;
- } while ((0, _ModelUtil.is)(newParent, 'bpmn:Lane'));
- }
- }
+ newBusinessObject = moddleCopy.copyElement(
+ oldBusinessObject,
+ newBusinessObject,
+ properties
+ );
- containment = 'flowElements';
- } else if ((0, _ModelUtil.is)(businessObject, 'bpmn:Artifact')) {
- while (newParent && !(0, _ModelUtil.is)(newParent, 'bpmn:Process') && !(0, _ModelUtil.is)(newParent, 'bpmn:SubProcess') && !(0, _ModelUtil.is)(newParent, 'bpmn:Collaboration')) {
- if ((0, _ModelUtil.is)(newParent, 'bpmn:Participant')) {
- newParent = newParent.processRef;
- break;
- } else {
- newParent = newParent.$parent;
- }
- }
+ // initialize custom BPMN extensions
+ if (targetElement.eventDefinitionType) {
- containment = 'artifacts';
- } else if ((0, _ModelUtil.is)(businessObject, 'bpmn:MessageFlow')) {
- containment = 'messageFlows';
- } else if ((0, _ModelUtil.is)(businessObject, 'bpmn:Participant')) {
- containment = 'participants'; // make sure the participants process is properly attached / detached
- // from the XML document
+ // only initialize with new eventDefinition
+ // if we did not set an event definition yet,
+ // i.e. because we copied it
+ if (!hasEventDefinition(newBusinessObject, targetElement.eventDefinitionType)) {
+ newElement.eventDefinitionType = targetElement.eventDefinitionType;
+ newElement.eventDefinitionAttrs = targetElement.eventDefinitionAttrs;
+ }
+ }
- var process = businessObject.processRef,
- definitions;
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(oldBusinessObject, 'bpmn:Activity')) {
- if (process) {
- definitions = getDefinitions(businessObject.$parent || newParent);
+ if (isSubProcess(oldBusinessObject)) {
- if (businessObject.$parent) {
- (0, _Collections.remove)(definitions.get('rootElements'), process);
- process.$parent = null;
- }
+ // no toggeling, so keep old state
+ newElement.isExpanded = (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_1__.isExpanded)(element);
+ }
+
+ // else if property is explicitly set, use it
+ else if (targetElement && (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.has)(targetElement, 'isExpanded')) {
+ newElement.isExpanded = targetElement.isExpanded;
+
+ // assign default size of new expanded element
+ var defaultSize = elementFactory.getDefaultSize(newBusinessObject, {
+ isExpanded: newElement.isExpanded
+ });
- if (newParent) {
- (0, _Collections.add)(definitions.get('rootElements'), process);
- process.$parent = definitions;
- }
- }
- } else if ((0, _ModelUtil.is)(businessObject, 'bpmn:DataOutputAssociation')) {
- containment = 'dataOutputAssociations';
- } else if ((0, _ModelUtil.is)(businessObject, 'bpmn:DataInputAssociation')) {
- containment = 'dataInputAssociations';
- }
+ newElement.width = defaultSize.width;
+ newElement.height = defaultSize.height;
+
+ // keep element centered
+ newElement.x = element.x - (newElement.width - element.width) / 2;
+ newElement.y = element.y - (newElement.height - element.height) / 2;
+ }
+
+ // TODO: need also to respect min/max Size
+ // copy size, from an expanded subprocess to an expanded alternative subprocess
+ // except bpmn:Task, because Task is always expanded
+ if (((0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_1__.isExpanded)(element) && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(oldBusinessObject, 'bpmn:Task')) && newElement.isExpanded) {
+ newElement.width = element.width;
+ newElement.height = element.height;
+ }
+ }
+
+ // remove children if not expanding sub process
+ if (isSubProcess(oldBusinessObject) && !isSubProcess(newBusinessObject)) {
+ hints.moveChildren = false;
+ }
+
+ // transform collapsed/expanded pools
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(oldBusinessObject, 'bpmn:Participant')) {
+
+ // create expanded pool
+ if (targetElement.isExpanded === true) {
+ newBusinessObject.processRef = bpmnFactory.create('bpmn:Process');
+ } else {
+
+ // remove children when transforming to collapsed pool
+ hints.moveChildren = false;
+ }
+
+ // apply same width and default height
+ newElement.width = element.width;
+ newElement.height = elementFactory.getDefaultSize(newElement).height;
+ }
+
+ if (!rules.allowed('shape.resize', { shape: newBusinessObject })) {
+ newElement.height = elementFactory.getDefaultSize(newElement).height;
+ newElement.width = elementFactory.getDefaultSize(newElement).width;
+ }
+
+ newBusinessObject.name = oldBusinessObject.name;
+
+ // retain default flow's reference between inclusive <-> exclusive gateways and activities
+ if (
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.isAny)(oldBusinessObject, [
+ 'bpmn:ExclusiveGateway',
+ 'bpmn:InclusiveGateway',
+ 'bpmn:Activity'
+ ]) &&
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.isAny)(newBusinessObject, [
+ 'bpmn:ExclusiveGateway',
+ 'bpmn:InclusiveGateway',
+ 'bpmn:Activity'
+ ])
+ ) {
+ newBusinessObject.default = oldBusinessObject.default;
+ }
+
+ if (
+ targetElement.host &&
+ !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(oldBusinessObject, 'bpmn:BoundaryEvent') &&
+ (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(newBusinessObject, 'bpmn:BoundaryEvent')
+ ) {
+ newElement.host = targetElement.host;
+ }
+
+ // The DataStoreReference element is 14px wider than the DataObjectReference element
+ // This ensures that they stay centered on the x axis when replaced
+ if (
+ newElement.type === 'bpmn:DataStoreReference' ||
+ newElement.type === 'bpmn:DataObjectReference'
+ ) {
+ newElement.x = element.x + (element.width - newElement.width) / 2;
+ }
+
+ return replace.replaceElement(element, newElement, { ...hints, targetElement });
+ }
+
+ this.replaceElement = replaceElement;
+}
+
+BpmnReplace.$inject = [
+ 'bpmnFactory',
+ 'elementFactory',
+ 'moddleCopy',
+ 'modeling',
+ 'replace',
+ 'rules'
+];
+
+/**
+ * @param {ModdleElement} businessObject
+ *
+ * @return {boolean}
+ */
+function isSubProcess(businessObject) {
+ return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(businessObject, 'bpmn:SubProcess');
+}
- if (!containment) {
- throw new Error(translate('no parent for {element} in {parent}', {
- element: businessObject.id,
- parent: newParent.id
- }));
- }
+/**
+ * @param {Element|ModdleElement} element
+ * @param {string} type
+ *
+ * @return {boolean}
+ */
+function hasEventDefinition(element, type) {
+ var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(element);
- var children;
+ return type && businessObject.get('eventDefinitions').some(function(definition) {
+ return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(definition, type);
+ });
+}
- if (businessObject.$parent) {
- // remove from old parent
- children = businessObject.$parent.get(containment);
- (0, _Collections.remove)(children, businessObject);
- }
+/**
+ * Compute intersection between two arrays.
+ *
+ * @param {Array} a
+ * @param {Array} b
+ *
+ * @return {Array}
+ */
+function intersection(a, b) {
+ return a.filter(function(item) {
+ return b.includes(item);
+ });
+}
+
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/features/replace/ReplaceOptions.js":
+/*!**********************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/replace/ReplaceOptions.js ***!
+ \**********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ BOUNDARY_EVENT: () => (/* binding */ BOUNDARY_EVENT),
+/* harmony export */ DATA_OBJECT_REFERENCE: () => (/* binding */ DATA_OBJECT_REFERENCE),
+/* harmony export */ DATA_STORE_REFERENCE: () => (/* binding */ DATA_STORE_REFERENCE),
+/* harmony export */ END_EVENT: () => (/* binding */ END_EVENT),
+/* harmony export */ EVENT_SUB_PROCESS: () => (/* binding */ EVENT_SUB_PROCESS),
+/* harmony export */ EVENT_SUB_PROCESS_START_EVENT: () => (/* binding */ EVENT_SUB_PROCESS_START_EVENT),
+/* harmony export */ GATEWAY: () => (/* binding */ GATEWAY),
+/* harmony export */ INTERMEDIATE_EVENT: () => (/* binding */ INTERMEDIATE_EVENT),
+/* harmony export */ PARTICIPANT: () => (/* binding */ PARTICIPANT),
+/* harmony export */ SEQUENCE_FLOW: () => (/* binding */ SEQUENCE_FLOW),
+/* harmony export */ START_EVENT: () => (/* binding */ START_EVENT),
+/* harmony export */ START_EVENT_SUB_PROCESS: () => (/* binding */ START_EVENT_SUB_PROCESS),
+/* harmony export */ SUBPROCESS_EXPANDED: () => (/* binding */ SUBPROCESS_EXPANDED),
+/* harmony export */ TASK: () => (/* binding */ TASK),
+/* harmony export */ TRANSACTION: () => (/* binding */ TRANSACTION)
+/* harmony export */ });
+/**
+ * @typedef { () => string } LabelGetter
+ *
+ * @typedef { {
+ * label: string | LabelGetter;
+ * actionName: string;
+ * className: string;
+ * target?: {
+ * type: string;
+ * isExpanded?: boolean;
+ * isInterrupting?: boolean;
+ * triggeredByEvent?: boolean;
+ * cancelActivity?: boolean;
+ * eventDefinitionType?: string;
+ * eventDefinitionAttrs?: Record
+ * };
+ * } } ReplaceOption
+ */
- if (!newParent) {
- businessObject.$parent = null;
- } else {
- // add to new parent
- children = newParent.get(containment);
- children.push(businessObject);
- businessObject.$parent = newParent;
- }
+/**
+ * @type {ReplaceOption[]}
+ */
+var START_EVENT = [
+ {
+ label: 'Start event',
+ actionName: 'replace-with-none-start',
+ className: 'bpmn-icon-start-event-none',
+ target: {
+ type: 'bpmn:StartEvent'
+ }
+ },
+ {
+ label: 'Intermediate throw event',
+ actionName: 'replace-with-none-intermediate-throwing',
+ className: 'bpmn-icon-intermediate-event-none',
+ target: {
+ type: 'bpmn:IntermediateThrowEvent'
+ }
+ },
+ {
+ label: 'End event',
+ actionName: 'replace-with-none-end',
+ className: 'bpmn-icon-end-event-none',
+ target: {
+ type: 'bpmn:EndEvent'
+ }
+ },
+ {
+ label: 'Message start event',
+ actionName: 'replace-with-message-start',
+ className: 'bpmn-icon-start-event-message',
+ target: {
+ type: 'bpmn:StartEvent',
+ eventDefinitionType: 'bpmn:MessageEventDefinition'
+ }
+ },
+ {
+ label: 'Timer start event',
+ actionName: 'replace-with-timer-start',
+ className: 'bpmn-icon-start-event-timer',
+ target: {
+ type: 'bpmn:StartEvent',
+ eventDefinitionType: 'bpmn:TimerEventDefinition'
+ }
+ },
+ {
+ label: 'Conditional start event',
+ actionName: 'replace-with-conditional-start',
+ className: 'bpmn-icon-start-event-condition',
+ target: {
+ type: 'bpmn:StartEvent',
+ eventDefinitionType: 'bpmn:ConditionalEventDefinition'
+ }
+ },
+ {
+ label: 'Signal start event',
+ actionName: 'replace-with-signal-start',
+ className: 'bpmn-icon-start-event-signal',
+ target: {
+ type: 'bpmn:StartEvent',
+ eventDefinitionType: 'bpmn:SignalEventDefinition'
+ }
+ }
+];
+
+/**
+ * @type {ReplaceOption[]}
+ */
+var START_EVENT_SUB_PROCESS = [
+ {
+ label: 'Start event',
+ actionName: 'replace-with-none-start',
+ className: 'bpmn-icon-start-event-none',
+ target: {
+ type: 'bpmn:StartEvent'
+ }
+ },
+ {
+ label: 'Intermediate throw event',
+ actionName: 'replace-with-none-intermediate-throwing',
+ className: 'bpmn-icon-intermediate-event-none',
+ target: {
+ type: 'bpmn:IntermediateThrowEvent'
+ }
+ },
+ {
+ label: 'End event',
+ actionName: 'replace-with-none-end',
+ className: 'bpmn-icon-end-event-none',
+ target: {
+ type: 'bpmn:EndEvent'
+ }
+ }
+];
+
+/**
+ * @type {ReplaceOption[]}
+ */
+var INTERMEDIATE_EVENT = [
+ {
+ label: 'Start event',
+ actionName: 'replace-with-none-start',
+ className: 'bpmn-icon-start-event-none',
+ target: {
+ type: 'bpmn:StartEvent'
+ }
+ },
+ {
+ label: 'Intermediate throw event',
+ actionName: 'replace-with-none-intermediate-throw',
+ className: 'bpmn-icon-intermediate-event-none',
+ target: {
+ type: 'bpmn:IntermediateThrowEvent'
+ }
+ },
+ {
+ label: 'End event',
+ actionName: 'replace-with-none-end',
+ className: 'bpmn-icon-end-event-none',
+ target: {
+ type: 'bpmn:EndEvent'
+ }
+ },
+ {
+ label: 'Message intermediate catch event',
+ actionName: 'replace-with-message-intermediate-catch',
+ className: 'bpmn-icon-intermediate-event-catch-message',
+ target: {
+ type: 'bpmn:IntermediateCatchEvent',
+ eventDefinitionType: 'bpmn:MessageEventDefinition'
+ }
+ },
+ {
+ label: 'Message intermediate throw event',
+ actionName: 'replace-with-message-intermediate-throw',
+ className: 'bpmn-icon-intermediate-event-throw-message',
+ target: {
+ type: 'bpmn:IntermediateThrowEvent',
+ eventDefinitionType: 'bpmn:MessageEventDefinition'
+ }
+ },
+ {
+ label: 'Timer intermediate catch event',
+ actionName: 'replace-with-timer-intermediate-catch',
+ className: 'bpmn-icon-intermediate-event-catch-timer',
+ target: {
+ type: 'bpmn:IntermediateCatchEvent',
+ eventDefinitionType: 'bpmn:TimerEventDefinition'
+ }
+ },
+ {
+ label: 'Escalation intermediate throw event',
+ actionName: 'replace-with-escalation-intermediate-throw',
+ className: 'bpmn-icon-intermediate-event-throw-escalation',
+ target: {
+ type: 'bpmn:IntermediateThrowEvent',
+ eventDefinitionType: 'bpmn:EscalationEventDefinition'
+ }
+ },
+ {
+ label: 'Conditional intermediate catch event',
+ actionName: 'replace-with-conditional-intermediate-catch',
+ className: 'bpmn-icon-intermediate-event-catch-condition',
+ target: {
+ type: 'bpmn:IntermediateCatchEvent',
+ eventDefinitionType: 'bpmn:ConditionalEventDefinition'
+ }
+ },
+ {
+ label: 'Link intermediate catch event',
+ actionName: 'replace-with-link-intermediate-catch',
+ className: 'bpmn-icon-intermediate-event-catch-link',
+ target: {
+ type: 'bpmn:IntermediateCatchEvent',
+ eventDefinitionType: 'bpmn:LinkEventDefinition',
+ eventDefinitionAttrs: {
+ name: ''
+ }
+ }
+ },
+ {
+ label: 'Link intermediate throw event',
+ actionName: 'replace-with-link-intermediate-throw',
+ className: 'bpmn-icon-intermediate-event-throw-link',
+ target: {
+ type: 'bpmn:IntermediateThrowEvent',
+ eventDefinitionType: 'bpmn:LinkEventDefinition',
+ eventDefinitionAttrs: {
+ name: ''
+ }
+ }
+ },
+ {
+ label: 'Compensation intermediate throw event',
+ actionName: 'replace-with-compensation-intermediate-throw',
+ className: 'bpmn-icon-intermediate-event-throw-compensation',
+ target: {
+ type: 'bpmn:IntermediateThrowEvent',
+ eventDefinitionType: 'bpmn:CompensateEventDefinition'
+ }
+ },
+ {
+ label: 'Signal intermediate catch event',
+ actionName: 'replace-with-signal-intermediate-catch',
+ className: 'bpmn-icon-intermediate-event-catch-signal',
+ target: {
+ type: 'bpmn:IntermediateCatchEvent',
+ eventDefinitionType: 'bpmn:SignalEventDefinition'
+ }
+ },
+ {
+ label: 'Signal intermediate throw event',
+ actionName: 'replace-with-signal-intermediate-throw',
+ className: 'bpmn-icon-intermediate-event-throw-signal',
+ target: {
+ type: 'bpmn:IntermediateThrowEvent',
+ eventDefinitionType: 'bpmn:SignalEventDefinition'
+ }
+ }
+];
+
+/**
+ * @type {ReplaceOption[]}
+ */
+var END_EVENT = [
+ {
+ label: 'Start event',
+ actionName: 'replace-with-none-start',
+ className: 'bpmn-icon-start-event-none',
+ target: {
+ type: 'bpmn:StartEvent'
+ }
+ },
+ {
+ label: 'Intermediate throw event',
+ actionName: 'replace-with-none-intermediate-throw',
+ className: 'bpmn-icon-intermediate-event-none',
+ target: {
+ type: 'bpmn:IntermediateThrowEvent'
+ }
+ },
+ {
+ label: 'End event',
+ actionName: 'replace-with-none-end',
+ className: 'bpmn-icon-end-event-none',
+ target: {
+ type: 'bpmn:EndEvent'
+ }
+ },
+ {
+ label: 'Message end event',
+ actionName: 'replace-with-message-end',
+ className: 'bpmn-icon-end-event-message',
+ target: {
+ type: 'bpmn:EndEvent',
+ eventDefinitionType: 'bpmn:MessageEventDefinition'
+ }
+ },
+ {
+ label: 'Escalation end event',
+ actionName: 'replace-with-escalation-end',
+ className: 'bpmn-icon-end-event-escalation',
+ target: {
+ type: 'bpmn:EndEvent',
+ eventDefinitionType: 'bpmn:EscalationEventDefinition'
+ }
+ },
+ {
+ label: 'Error end event',
+ actionName: 'replace-with-error-end',
+ className: 'bpmn-icon-end-event-error',
+ target: {
+ type: 'bpmn:EndEvent',
+ eventDefinitionType: 'bpmn:ErrorEventDefinition'
+ }
+ },
+ {
+ label: 'Cancel end event',
+ actionName: 'replace-with-cancel-end',
+ className: 'bpmn-icon-end-event-cancel',
+ target: {
+ type: 'bpmn:EndEvent',
+ eventDefinitionType: 'bpmn:CancelEventDefinition'
+ }
+ },
+ {
+ label: 'Compensation end event',
+ actionName: 'replace-with-compensation-end',
+ className: 'bpmn-icon-end-event-compensation',
+ target: {
+ type: 'bpmn:EndEvent',
+ eventDefinitionType: 'bpmn:CompensateEventDefinition'
+ }
+ },
+ {
+ label: 'Signal end event',
+ actionName: 'replace-with-signal-end',
+ className: 'bpmn-icon-end-event-signal',
+ target: {
+ type: 'bpmn:EndEvent',
+ eventDefinitionType: 'bpmn:SignalEventDefinition'
+ }
+ },
+ {
+ label: 'Terminate end event',
+ actionName: 'replace-with-terminate-end',
+ className: 'bpmn-icon-end-event-terminate',
+ target: {
+ type: 'bpmn:EndEvent',
+ eventDefinitionType: 'bpmn:TerminateEventDefinition'
+ }
+ }
+];
+
+/**
+ * @type {ReplaceOption[]}
+ */
+var GATEWAY = [
+ {
+ label: 'Exclusive gateway',
+ actionName: 'replace-with-exclusive-gateway',
+ className: 'bpmn-icon-gateway-xor',
+ target: {
+ type: 'bpmn:ExclusiveGateway'
+ }
+ },
+ {
+ label: 'Parallel gateway',
+ actionName: 'replace-with-parallel-gateway',
+ className: 'bpmn-icon-gateway-parallel',
+ target: {
+ type: 'bpmn:ParallelGateway'
+ }
+ },
+ {
+ label: 'Inclusive gateway',
+ actionName: 'replace-with-inclusive-gateway',
+ className: 'bpmn-icon-gateway-or',
+ target: {
+ type: 'bpmn:InclusiveGateway'
+ }
+ },
+ {
+ label: 'Complex gateway',
+ actionName: 'replace-with-complex-gateway',
+ className: 'bpmn-icon-gateway-complex',
+ target: {
+ type: 'bpmn:ComplexGateway'
+ }
+ },
+ {
+ label: 'Event-based gateway',
+ actionName: 'replace-with-event-based-gateway',
+ className: 'bpmn-icon-gateway-eventbased',
+ target: {
+ type: 'bpmn:EventBasedGateway',
+ instantiate: false,
+ eventGatewayType: 'Exclusive'
+ }
+ }
+
+ // Gateways deactivated until https://github.com/bpmn-io/bpmn-js/issues/194
+ // {
+ // label: 'Event based instantiating Gateway',
+ // actionName: 'replace-with-exclusive-event-based-gateway',
+ // className: 'bpmn-icon-exclusive-event-based',
+ // target: {
+ // type: 'bpmn:EventBasedGateway'
+ // },
+ // options: {
+ // businessObject: { instantiate: true, eventGatewayType: 'Exclusive' }
+ // }
+ // },
+ // {
+ // label: 'Parallel Event based instantiating Gateway',
+ // actionName: 'replace-with-parallel-event-based-instantiate-gateway',
+ // className: 'bpmn-icon-parallel-event-based-instantiate-gateway',
+ // target: {
+ // type: 'bpmn:EventBasedGateway'
+ // },
+ // options: {
+ // businessObject: { instantiate: true, eventGatewayType: 'Parallel' }
+ // }
+ // }
+];
+
+/**
+ * @type {ReplaceOption[]}
+ */
+var SUBPROCESS_EXPANDED = [
+ {
+ label: 'Transaction',
+ actionName: 'replace-with-transaction',
+ className: 'bpmn-icon-transaction',
+ target: {
+ type: 'bpmn:Transaction',
+ isExpanded: true
+ }
+ },
+ {
+ label: 'Event sub-process',
+ actionName: 'replace-with-event-subprocess',
+ className: 'bpmn-icon-event-subprocess-expanded',
+ target: {
+ type: 'bpmn:SubProcess',
+ triggeredByEvent: true,
+ isExpanded: true
+ }
+ },
+ {
+ label: 'Sub-process (collapsed)',
+ actionName: 'replace-with-collapsed-subprocess',
+ className: 'bpmn-icon-subprocess-collapsed',
+ target: {
+ type: 'bpmn:SubProcess',
+ isExpanded: false
+ }
+ }
+];
+
+/**
+ * @type {ReplaceOption[]}
+ */
+var TRANSACTION = [
+ {
+ label: 'Transaction',
+ actionName: 'replace-with-transaction',
+ className: 'bpmn-icon-transaction',
+ target: {
+ type: 'bpmn:Transaction',
+ isExpanded: true
+ }
+ },
+ {
+ label: 'Sub-process',
+ actionName: 'replace-with-subprocess',
+ className: 'bpmn-icon-subprocess-expanded',
+ target: {
+ type: 'bpmn:SubProcess',
+ isExpanded: true
+ }
+ },
+ {
+ label: 'Event sub-process',
+ actionName: 'replace-with-event-subprocess',
+ className: 'bpmn-icon-event-subprocess-expanded',
+ target: {
+ type: 'bpmn:SubProcess',
+ triggeredByEvent: true,
+ isExpanded: true
+ }
+ }
+];
+
+/**
+ * @type {ReplaceOption[]}
+ */
+var EVENT_SUB_PROCESS = TRANSACTION;
- if (visualParent) {
- var diChildren = visualParent.get(containment);
- (0, _Collections.remove)(children, businessObject);
+/**
+ * @type {ReplaceOption[]}
+ */
+var TASK = [
+ {
+ label: 'Task',
+ actionName: 'replace-with-task',
+ className: 'bpmn-icon-task',
+ target: {
+ type: 'bpmn:Task'
+ }
+ },
+ {
+ label: 'User task',
+ actionName: 'replace-with-user-task',
+ className: 'bpmn-icon-user',
+ target: {
+ type: 'bpmn:UserTask'
+ }
+ },
+ {
+ label: 'Service task',
+ actionName: 'replace-with-service-task',
+ className: 'bpmn-icon-service',
+ target: {
+ type: 'bpmn:ServiceTask'
+ }
+ },
+ {
+ label: 'Send task',
+ actionName: 'replace-with-send-task',
+ className: 'bpmn-icon-send',
+ target: {
+ type: 'bpmn:SendTask'
+ }
+ },
+ {
+ label: 'Receive task',
+ actionName: 'replace-with-receive-task',
+ className: 'bpmn-icon-receive',
+ target: {
+ type: 'bpmn:ReceiveTask'
+ }
+ },
+ {
+ label: 'Manual task',
+ actionName: 'replace-with-manual-task',
+ className: 'bpmn-icon-manual',
+ target: {
+ type: 'bpmn:ManualTask'
+ }
+ },
+ {
+ label: 'Business rule task',
+ actionName: 'replace-with-rule-task',
+ className: 'bpmn-icon-business-rule',
+ target: {
+ type: 'bpmn:BusinessRuleTask'
+ }
+ },
+ {
+ label: 'Script task',
+ actionName: 'replace-with-script-task',
+ className: 'bpmn-icon-script',
+ target: {
+ type: 'bpmn:ScriptTask'
+ }
+ },
+ {
+ label: 'Call activity',
+ actionName: 'replace-with-call-activity',
+ className: 'bpmn-icon-call-activity',
+ target: {
+ type: 'bpmn:CallActivity'
+ }
+ },
+ {
+ label: 'Sub-process (collapsed)',
+ actionName: 'replace-with-collapsed-subprocess',
+ className: 'bpmn-icon-subprocess-collapsed',
+ target: {
+ type: 'bpmn:SubProcess',
+ isExpanded: false
+ }
+ },
+ {
+ label: 'Sub-process (expanded)',
+ actionName: 'replace-with-expanded-subprocess',
+ className: 'bpmn-icon-subprocess-expanded',
+ target: {
+ type: 'bpmn:SubProcess',
+ isExpanded: true
+ }
+ }
+];
+
+/**
+ * @type {ReplaceOption[]}
+ */
+var DATA_OBJECT_REFERENCE = [
+ {
+ label: 'Data store reference',
+ actionName: 'replace-with-data-store-reference',
+ className: 'bpmn-icon-data-store',
+ target: {
+ type: 'bpmn:DataStoreReference'
+ }
+ }
+];
+
+/**
+ * @type {ReplaceOption[]}
+ */
+var DATA_STORE_REFERENCE = [
+ {
+ label: 'Data object reference',
+ actionName: 'replace-with-data-object-reference',
+ className: 'bpmn-icon-data-object',
+ target: {
+ type: 'bpmn:DataObjectReference'
+ }
+ }
+];
+
+/**
+ * @type {ReplaceOption[]}
+ */
+var BOUNDARY_EVENT = [
+ {
+ label: 'Message boundary event',
+ actionName: 'replace-with-message-boundary',
+ className: 'bpmn-icon-intermediate-event-catch-message',
+ target: {
+ type: 'bpmn:BoundaryEvent',
+ eventDefinitionType: 'bpmn:MessageEventDefinition',
+ cancelActivity: true
+ }
+ },
+ {
+ label: 'Timer boundary event',
+ actionName: 'replace-with-timer-boundary',
+ className: 'bpmn-icon-intermediate-event-catch-timer',
+ target: {
+ type: 'bpmn:BoundaryEvent',
+ eventDefinitionType: 'bpmn:TimerEventDefinition',
+ cancelActivity: true
+ }
+ },
+ {
+ label: 'Escalation boundary event',
+ actionName: 'replace-with-escalation-boundary',
+ className: 'bpmn-icon-intermediate-event-catch-escalation',
+ target: {
+ type: 'bpmn:BoundaryEvent',
+ eventDefinitionType: 'bpmn:EscalationEventDefinition',
+ cancelActivity: true
+ }
+ },
+ {
+ label: 'Conditional boundary event',
+ actionName: 'replace-with-conditional-boundary',
+ className: 'bpmn-icon-intermediate-event-catch-condition',
+ target: {
+ type: 'bpmn:BoundaryEvent',
+ eventDefinitionType: 'bpmn:ConditionalEventDefinition',
+ cancelActivity: true
+ }
+ },
+ {
+ label: 'Error boundary event',
+ actionName: 'replace-with-error-boundary',
+ className: 'bpmn-icon-intermediate-event-catch-error',
+ target: {
+ type: 'bpmn:BoundaryEvent',
+ eventDefinitionType: 'bpmn:ErrorEventDefinition',
+ cancelActivity: true
+ }
+ },
+ {
+ label: 'Cancel boundary event',
+ actionName: 'replace-with-cancel-boundary',
+ className: 'bpmn-icon-intermediate-event-catch-cancel',
+ target: {
+ type: 'bpmn:BoundaryEvent',
+ eventDefinitionType: 'bpmn:CancelEventDefinition',
+ cancelActivity: true
+ }
+ },
+ {
+ label: 'Signal boundary event',
+ actionName: 'replace-with-signal-boundary',
+ className: 'bpmn-icon-intermediate-event-catch-signal',
+ target: {
+ type: 'bpmn:BoundaryEvent',
+ eventDefinitionType: 'bpmn:SignalEventDefinition',
+ cancelActivity: true
+ }
+ },
+ {
+ label: 'Compensation boundary event',
+ actionName: 'replace-with-compensation-boundary',
+ className: 'bpmn-icon-intermediate-event-catch-compensation',
+ target: {
+ type: 'bpmn:BoundaryEvent',
+ eventDefinitionType: 'bpmn:CompensateEventDefinition',
+ cancelActivity: true
+ }
+ },
+ {
+ label: 'Message boundary event (non-interrupting)',
+ actionName: 'replace-with-non-interrupting-message-boundary',
+ className: 'bpmn-icon-intermediate-event-catch-non-interrupting-message',
+ target: {
+ type: 'bpmn:BoundaryEvent',
+ eventDefinitionType: 'bpmn:MessageEventDefinition',
+ cancelActivity: false
+ }
+ },
+ {
+ label: 'Timer boundary event (non-interrupting)',
+ actionName: 'replace-with-non-interrupting-timer-boundary',
+ className: 'bpmn-icon-intermediate-event-catch-non-interrupting-timer',
+ target: {
+ type: 'bpmn:BoundaryEvent',
+ eventDefinitionType: 'bpmn:TimerEventDefinition',
+ cancelActivity: false
+ }
+ },
+ {
+ label: 'Escalation boundary event (non-interrupting)',
+ actionName: 'replace-with-non-interrupting-escalation-boundary',
+ className: 'bpmn-icon-intermediate-event-catch-non-interrupting-escalation',
+ target: {
+ type: 'bpmn:BoundaryEvent',
+ eventDefinitionType: 'bpmn:EscalationEventDefinition',
+ cancelActivity: false
+ }
+ },
+ {
+ label: 'Conditional boundary event (non-interrupting)',
+ actionName: 'replace-with-non-interrupting-conditional-boundary',
+ className: 'bpmn-icon-intermediate-event-catch-non-interrupting-condition',
+ target: {
+ type: 'bpmn:BoundaryEvent',
+ eventDefinitionType: 'bpmn:ConditionalEventDefinition',
+ cancelActivity: false
+ }
+ },
+ {
+ label: 'Signal boundary event (non-interrupting)',
+ actionName: 'replace-with-non-interrupting-signal-boundary',
+ className: 'bpmn-icon-intermediate-event-catch-non-interrupting-signal',
+ target: {
+ type: 'bpmn:BoundaryEvent',
+ eventDefinitionType: 'bpmn:SignalEventDefinition',
+ cancelActivity: false
+ }
+ }
+];
+
+/**
+ * @type {ReplaceOption[]}
+ */
+var EVENT_SUB_PROCESS_START_EVENT = [
+ {
+ label: 'Message start event',
+ actionName: 'replace-with-message-start',
+ className: 'bpmn-icon-start-event-message',
+ target: {
+ type: 'bpmn:StartEvent',
+ eventDefinitionType: 'bpmn:MessageEventDefinition',
+ isInterrupting: true
+ }
+ },
+ {
+ label: 'Timer start event',
+ actionName: 'replace-with-timer-start',
+ className: 'bpmn-icon-start-event-timer',
+ target: {
+ type: 'bpmn:StartEvent',
+ eventDefinitionType: 'bpmn:TimerEventDefinition',
+ isInterrupting: true
+ }
+ },
+ {
+ label: 'Conditional start event',
+ actionName: 'replace-with-conditional-start',
+ className: 'bpmn-icon-start-event-condition',
+ target: {
+ type: 'bpmn:StartEvent',
+ eventDefinitionType: 'bpmn:ConditionalEventDefinition',
+ isInterrupting: true
+ }
+ },
+ {
+ label: 'Signal start event',
+ actionName: 'replace-with-signal-start',
+ className: 'bpmn-icon-start-event-signal',
+ target: {
+ type: 'bpmn:StartEvent',
+ eventDefinitionType: 'bpmn:SignalEventDefinition',
+ isInterrupting: true
+ }
+ },
+ {
+ label: 'Error start event',
+ actionName: 'replace-with-error-start',
+ className: 'bpmn-icon-start-event-error',
+ target: {
+ type: 'bpmn:StartEvent',
+ eventDefinitionType: 'bpmn:ErrorEventDefinition',
+ isInterrupting: true
+ }
+ },
+ {
+ label: 'Escalation start event',
+ actionName: 'replace-with-escalation-start',
+ className: 'bpmn-icon-start-event-escalation',
+ target: {
+ type: 'bpmn:StartEvent',
+ eventDefinitionType: 'bpmn:EscalationEventDefinition',
+ isInterrupting: true
+ }
+ },
+ {
+ label: 'Compensation start event',
+ actionName: 'replace-with-compensation-start',
+ className: 'bpmn-icon-start-event-compensation',
+ target: {
+ type: 'bpmn:StartEvent',
+ eventDefinitionType: 'bpmn:CompensateEventDefinition',
+ isInterrupting: true
+ }
+ },
+ {
+ label: 'Message start event (non-interrupting)',
+ actionName: 'replace-with-non-interrupting-message-start',
+ className: 'bpmn-icon-start-event-non-interrupting-message',
+ target: {
+ type: 'bpmn:StartEvent',
+ eventDefinitionType: 'bpmn:MessageEventDefinition',
+ isInterrupting: false
+ }
+ },
+ {
+ label: 'Timer start event (non-interrupting)',
+ actionName: 'replace-with-non-interrupting-timer-start',
+ className: 'bpmn-icon-start-event-non-interrupting-timer',
+ target: {
+ type: 'bpmn:StartEvent',
+ eventDefinitionType: 'bpmn:TimerEventDefinition',
+ isInterrupting: false
+ }
+ },
+ {
+ label: 'Conditional start event (non-interrupting)',
+ actionName: 'replace-with-non-interrupting-conditional-start',
+ className: 'bpmn-icon-start-event-non-interrupting-condition',
+ target: {
+ type: 'bpmn:StartEvent',
+ eventDefinitionType: 'bpmn:ConditionalEventDefinition',
+ isInterrupting: false
+ }
+ },
+ {
+ label: 'Signal start event (non-interrupting)',
+ actionName: 'replace-with-non-interrupting-signal-start',
+ className: 'bpmn-icon-start-event-non-interrupting-signal',
+ target: {
+ type: 'bpmn:StartEvent',
+ eventDefinitionType: 'bpmn:SignalEventDefinition',
+ isInterrupting: false
+ }
+ },
+ {
+ label: 'Escalation start event (non-interrupting)',
+ actionName: 'replace-with-non-interrupting-escalation-start',
+ className: 'bpmn-icon-start-event-non-interrupting-escalation',
+ target: {
+ type: 'bpmn:StartEvent',
+ eventDefinitionType: 'bpmn:EscalationEventDefinition',
+ isInterrupting: false
+ }
+ }
+];
+
+/**
+ * @type {ReplaceOption[]}
+ */
+var SEQUENCE_FLOW = [
+ {
+ label: 'Sequence flow',
+ actionName: 'replace-with-sequence-flow',
+ className: 'bpmn-icon-connection'
+ },
+ {
+ label: 'Default flow',
+ actionName: 'replace-with-default-flow',
+ className: 'bpmn-icon-default-flow'
+ },
+ {
+ label: 'Conditional flow',
+ actionName: 'replace-with-conditional-flow',
+ className: 'bpmn-icon-conditional-flow'
+ }
+];
+
+/**
+ * @type {ReplaceOption[]}
+ */
+var PARTICIPANT = [
+ {
+ label: 'Expanded pool/participant',
+ actionName: 'replace-with-expanded-pool',
+ className: 'bpmn-icon-participant',
+ target: {
+ type: 'bpmn:Participant',
+ isExpanded: true
+ }
+ },
+ {
+ label: function(element) {
+ var label = 'Empty pool/participant';
- if (newParent) {
- if (!diChildren) {
- diChildren = [];
- newParent.set(containment, diChildren);
- }
+ if (element.children && element.children.length) {
+ label += ' (removes content)';
+ }
- diChildren.push(businessObject);
- }
- }
- };
+ return label;
+ },
+ actionName: 'replace-with-collapsed-pool',
- BpmnUpdater.prototype.updateConnectionWaypoints = function (connection) {
- connection.businessObject.di.set('waypoint', this._bpmnFactory.createDiWaypoints(connection.waypoints));
- };
+ // TODO(@janstuemmel): maybe design new icon
+ className: 'bpmn-icon-lane',
+ target: {
+ type: 'bpmn:Participant',
+ isExpanded: false
+ }
+ }
+];
- BpmnUpdater.prototype.updateConnection = function (context) {
- var connection = context.connection,
- businessObject = (0, _ModelUtil.getBusinessObject)(connection),
- newSource = (0, _ModelUtil.getBusinessObject)(connection.source),
- newTarget = (0, _ModelUtil.getBusinessObject)(connection.target),
- visualParent;
- if (!(0, _ModelUtil.is)(businessObject, 'bpmn:DataAssociation')) {
- var inverseSet = (0, _ModelUtil.is)(businessObject, 'bpmn:SequenceFlow');
+/***/ }),
- if (businessObject.sourceRef !== newSource) {
- if (inverseSet) {
- (0, _Collections.remove)(businessObject.sourceRef && businessObject.sourceRef.get('outgoing'), businessObject);
+/***/ "../node_modules/bpmn-js/lib/features/replace/index.js":
+/*!*************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/replace/index.js ***!
+ \*************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- if (newSource && newSource.get('outgoing')) {
- newSource.get('outgoing').push(businessObject);
- }
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _copy_paste__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../copy-paste */ "../node_modules/bpmn-js/lib/features/copy-paste/index.js");
+/* harmony import */ var diagram_js_lib_features_replace__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/replace */ "../node_modules/diagram-js/lib/features/replace/index.js");
+/* harmony import */ var diagram_js_lib_features_selection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/features/selection */ "../node_modules/diagram-js/lib/features/selection/index.js");
+/* harmony import */ var _BpmnReplace__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./BpmnReplace */ "../node_modules/bpmn-js/lib/features/replace/BpmnReplace.js");
- businessObject.sourceRef = newSource;
- }
- if (businessObject.targetRef !== newTarget) {
- if (inverseSet) {
- (0, _Collections.remove)(businessObject.targetRef && businessObject.targetRef.get('incoming'), businessObject);
- if (newTarget && newTarget.get('incoming')) {
- newTarget.get('incoming').push(businessObject);
- }
- }
- businessObject.targetRef = newTarget;
- }
- } else if ((0, _ModelUtil.is)(businessObject, 'bpmn:DataInputAssociation')) {
- // handle obnoxious isMsome sourceRef
- businessObject.get('sourceRef')[0] = newSource;
- visualParent = context.parent || context.newParent || newTarget;
- this.updateSemanticParent(businessObject, newTarget, visualParent);
- } else if ((0, _ModelUtil.is)(businessObject, 'bpmn:DataOutputAssociation')) {
- visualParent = context.parent || context.newParent || newSource;
- this.updateSemanticParent(businessObject, newSource, visualParent); // targetRef = new target
- businessObject.targetRef = newTarget;
- }
- this.updateConnectionWaypoints(connection);
- this.updateDiConnection(businessObject.di, newSource, newTarget);
- }; // helpers //////////////////////
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ _copy_paste__WEBPACK_IMPORTED_MODULE_0__["default"],
+ diagram_js_lib_features_replace__WEBPACK_IMPORTED_MODULE_1__["default"],
+ diagram_js_lib_features_selection__WEBPACK_IMPORTED_MODULE_2__["default"]
+ ],
+ bpmnReplace: [ 'type', _BpmnReplace__WEBPACK_IMPORTED_MODULE_3__["default"] ]
+});
- BpmnUpdater.prototype._getLabel = function (di) {
- if (!di.label) {
- di.label = this._bpmnFactory.createDiLabel();
- }
+/***/ }),
- return di.label;
- };
- /**
- * Make sure the event listener is only called
- * if the touched element is a BPMN element.
- *
- * @param {Function} fn
- * @return {Function} guarded function
- */
+/***/ "../node_modules/bpmn-js/lib/features/rules/BpmnRules.js":
+/*!***************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/rules/BpmnRules.js ***!
+ \***************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BpmnRules)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var _modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../modeling/util/ModelingUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../modeling/util/ModelingUtil */ "../node_modules/bpmn-js/lib/features/modeling/util/ModelingUtil.js");
+/* harmony import */ var diagram_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/util/ModelUtil */ "../node_modules/diagram-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
+/* harmony import */ var diagram_js_lib_features_rules_RuleProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/rules/RuleProvider */ "../node_modules/diagram-js/lib/features/rules/RuleProvider.js");
+/* harmony import */ var _snapping_BpmnSnappingUtil__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../snapping/BpmnSnappingUtil */ "../node_modules/bpmn-js/lib/features/snapping/BpmnSnappingUtil.js");
- function ifBpmn(fn) {
- return function (event) {
- var context = event.context,
- element = context.shape || context.connection;
- if ((0, _ModelUtil.is)(element, 'bpmn:BaseElement')) {
- fn(event);
- }
- };
- }
- },{"../../util/ModelUtil":240,"./util/ModelingUtil":211,"diagram-js/lib/command/CommandInterceptor":250,"diagram-js/lib/model":407,"diagram-js/lib/util/Collections":418,"inherits":438,"min-dash":646}],158:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = ElementFactory;
- var _minDash = require("min-dash");
- var _inherits = _interopRequireDefault(require("inherits"));
- var _ModelUtil = require("../../util/ModelUtil");
- var _DiUtil = require("../../util/DiUtil");
- var _ElementFactory = _interopRequireDefault(require("diagram-js/lib/core/ElementFactory"));
- var _LabelUtil = require("../../util/LabelUtil");
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- /**
- * A bpmn-aware factory for diagram-js shapes
- */
- function ElementFactory(bpmnFactory, moddle, translate) {
- _ElementFactory.default.call(this);
- this._bpmnFactory = bpmnFactory;
- this._moddle = moddle;
- this._translate = translate;
- }
- (0, _inherits.default)(ElementFactory, _ElementFactory.default);
- ElementFactory.$inject = ['bpmnFactory', 'moddle', 'translate'];
- ElementFactory.prototype.baseCreate = _ElementFactory.default.prototype.create;
- ElementFactory.prototype.create = function (elementType, attrs) {
- // no special magic for labels,
- // we assume their businessObjects have already been created
- // and wired via attrs
- if (elementType === 'label') {
- return this.baseCreate(elementType, (0, _minDash.assign)({
- type: 'label'
- }, _LabelUtil.DEFAULT_LABEL_SIZE, attrs));
- }
- return this.createBpmnElement(elementType, attrs);
- };
- ElementFactory.prototype.createBpmnElement = function (elementType, attrs) {
- var size,
- translate = this._translate;
- attrs = attrs || {};
- var businessObject = attrs.businessObject;
- if (!businessObject) {
- if (!attrs.type) {
- throw new Error(translate('no shape type specified'));
- }
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ *
+ * @typedef {import('../../model/Types').Connection} Connection
+ * @typedef {import('../../model/Types').Element} Element
+ * @typedef {import('../../model/Types').Shape} Shape
+ * @typedef {import('../../model/Types').ModdleElement} ModdleElement
+ *
+ * @typedef {import('diagram-js/lib/util/Types').Point} Point
+ * @typedef {import('diagram-js/lib/util/Types').Rect} Rect
+ *
+ * @typedef { {
+ * associationDirection?: 'None' | 'One' | 'Both';
+ * type: string;
+ * } | boolean | null } CanConnectResult
+ *
+ * @typedef { {
+ * id: string;
+ * type: string;
+ * } | boolean } CanReplaceResult
+ */
- businessObject = this._bpmnFactory.create(attrs.type);
- }
+/**
+ * BPMN-specific modeling rules.
+ *
+ * @param {EventBus} eventBus
+ */
+function BpmnRules(eventBus) {
+ diagram_js_lib_features_rules_RuleProvider__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
+}
- if (!businessObject.di) {
- if (elementType === 'root') {
- businessObject.di = this._bpmnFactory.createDiPlane(businessObject, [], {
- id: businessObject.id + '_di'
- });
- } else if (elementType === 'connection') {
- businessObject.di = this._bpmnFactory.createDiEdge(businessObject, [], {
- id: businessObject.id + '_di'
- });
- } else {
- businessObject.di = this._bpmnFactory.createDiShape(businessObject, {}, {
- id: businessObject.id + '_di'
- });
- }
- }
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_1__["default"])(BpmnRules, diagram_js_lib_features_rules_RuleProvider__WEBPACK_IMPORTED_MODULE_0__["default"]);
- if ((0, _ModelUtil.is)(businessObject, 'bpmn:Group')) {
- attrs = (0, _minDash.assign)({
- isFrame: true
- }, attrs);
- }
+BpmnRules.$inject = [ 'eventBus' ];
+
+BpmnRules.prototype.init = function() {
+
+ this.addRule('connection.start', function(context) {
+ var source = context.source;
+
+ return canStartConnection(source);
+ });
+
+ this.addRule('connection.create', function(context) {
+ var source = context.source,
+ target = context.target,
+ hints = context.hints || {},
+ targetParent = hints.targetParent,
+ targetAttach = hints.targetAttach;
+
+ // don't allow incoming connections on
+ // newly created boundary events
+ // to boundary events
+ if (targetAttach) {
+ return false;
+ }
+
+ // temporarily set target parent for scoping
+ // checks to work
+ if (targetParent) {
+ target.parent = targetParent;
+ }
+
+ try {
+ return canConnect(source, target);
+ } finally {
- if (attrs.di) {
- (0, _minDash.assign)(businessObject.di, attrs.di);
- delete attrs.di;
- }
+ // unset temporary target parent
+ if (targetParent) {
+ target.parent = null;
+ }
+ }
+ });
- applyAttributes(businessObject, attrs, ['processRef', 'isInterrupting', 'associationDirection', 'isForCompensation']);
+ this.addRule('connection.reconnect', function(context) {
- if (attrs.isExpanded) {
- applyAttribute(businessObject.di, attrs, 'isExpanded');
- }
+ var connection = context.connection,
+ source = context.source,
+ target = context.target;
- if ((0, _ModelUtil.is)(businessObject, 'bpmn:ExclusiveGateway')) {
- businessObject.di.isMarkerVisible = true;
- }
+ return canConnect(source, target, connection);
+ });
- var eventDefinitions, newEventDefinition;
+ this.addRule('connection.updateWaypoints', function(context) {
+ return {
+ type: context.connection.type
+ };
+ });
- if (attrs.eventDefinitionType) {
- eventDefinitions = businessObject.get('eventDefinitions') || [];
- newEventDefinition = this._bpmnFactory.create(attrs.eventDefinitionType, attrs.eventDefinitionAttrs);
+ this.addRule('shape.resize', function(context) {
- if (attrs.eventDefinitionType === 'bpmn:ConditionalEventDefinition') {
- newEventDefinition.condition = this._bpmnFactory.create('bpmn:FormalExpression');
- }
+ var shape = context.shape,
+ newBounds = context.newBounds;
- eventDefinitions.push(newEventDefinition);
- newEventDefinition.$parent = businessObject;
- businessObject.eventDefinitions = eventDefinitions;
- delete attrs.eventDefinitionType;
- }
+ return canResize(shape, newBounds);
+ });
- size = this._getDefaultSize(businessObject);
- attrs = (0, _minDash.assign)({
- businessObject: businessObject,
- id: businessObject.id
- }, size, attrs);
- return this.baseCreate(elementType, attrs);
- };
+ this.addRule('elements.create', function(context) {
+ var elements = context.elements,
+ position = context.position,
+ target = context.target;
- ElementFactory.prototype._getDefaultSize = function (semantic) {
- if ((0, _ModelUtil.is)(semantic, 'bpmn:SubProcess')) {
- if ((0, _DiUtil.isExpanded)(semantic)) {
- return {
- width: 350,
- height: 200
- };
- } else {
- return {
- width: 100,
- height: 80
- };
- }
- }
+ if ((0,diagram_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.isConnection)(target) && !canInsert(elements, target, position)) {
+ return false;
+ }
- if ((0, _ModelUtil.is)(semantic, 'bpmn:Task')) {
- return {
- width: 100,
- height: 80
- };
- }
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.every)(elements, function(element) {
+ if ((0,diagram_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.isConnection)(element)) {
+ return canConnect(element.source, element.target, element);
+ }
- if ((0, _ModelUtil.is)(semantic, 'bpmn:Gateway')) {
- return {
- width: 50,
- height: 50
- };
- }
+ if (element.host) {
+ return canAttach(element, element.host, null, position);
+ }
- if ((0, _ModelUtil.is)(semantic, 'bpmn:Event')) {
- return {
- width: 36,
- height: 36
- };
- }
+ return canCreate(element, target, null, position);
+ });
+ });
- if ((0, _ModelUtil.is)(semantic, 'bpmn:Participant')) {
- if ((0, _DiUtil.isExpanded)(semantic)) {
- return {
- width: 600,
- height: 250
- };
- } else {
- return {
- width: 400,
- height: 60
- };
- }
- }
+ this.addRule('elements.move', function(context) {
- if ((0, _ModelUtil.is)(semantic, 'bpmn:Lane')) {
- return {
- width: 400,
- height: 100
- };
- }
+ var target = context.target,
+ shapes = context.shapes,
+ position = context.position;
- if ((0, _ModelUtil.is)(semantic, 'bpmn:DataObjectReference')) {
- return {
- width: 36,
- height: 50
- };
- }
+ return canAttach(shapes, target, null, position) ||
+ canReplace(shapes, target, position) ||
+ canMove(shapes, target, position) ||
+ canInsert(shapes, target, position);
+ });
- if ((0, _ModelUtil.is)(semantic, 'bpmn:DataStoreReference')) {
- return {
- width: 50,
- height: 50
- };
- }
+ this.addRule('shape.create', function(context) {
+ return canCreate(
+ context.shape,
+ context.target,
+ context.source,
+ context.position
+ );
+ });
- if ((0, _ModelUtil.is)(semantic, 'bpmn:TextAnnotation')) {
- return {
- width: 100,
- height: 30
- };
- }
+ this.addRule('shape.attach', function(context) {
- if ((0, _ModelUtil.is)(semantic, 'bpmn:Group')) {
- return {
- width: 300,
- height: 300
- };
- }
+ return canAttach(
+ context.shape,
+ context.target,
+ null,
+ context.position
+ );
+ });
- return {
- width: 100,
- height: 80
- };
- };
- /**
- * Create participant.
- *
- * @param {boolean|Object} [attrs] attrs
- *
- * @returns {djs.model.Shape}
- */
+ this.addRule('element.copy', function(context) {
+ var element = context.element,
+ elements = context.elements;
+ return canCopy(elements, element);
+ });
+};
- ElementFactory.prototype.createParticipantShape = function (attrs) {
- if (!(0, _minDash.isObject)(attrs)) {
- attrs = {
- isExpanded: attrs
- };
- }
+BpmnRules.prototype.canConnectMessageFlow = canConnectMessageFlow;
- attrs = (0, _minDash.assign)({
- type: 'bpmn:Participant'
- }, attrs || {}); // participants are expanded by default
+BpmnRules.prototype.canConnectSequenceFlow = canConnectSequenceFlow;
- if (attrs.isExpanded !== false) {
- attrs.processRef = this._bpmnFactory.create('bpmn:Process');
- }
+BpmnRules.prototype.canConnectDataAssociation = canConnectDataAssociation;
- return this.createShape(attrs);
- }; // helpers //////////////////////
+BpmnRules.prototype.canConnectAssociation = canConnectAssociation;
- /**
- * Apply attributes from a map to the given element,
- * remove attribute from the map on application.
- *
- * @param {Base} element
- * @param {Object} attrs (in/out map of attributes)
- * @param {Array} attributeNames name of attributes to apply
- */
+BpmnRules.prototype.canConnectCompensationAssociation = canConnectCompensationAssociation;
+BpmnRules.prototype.canMove = canMove;
- function applyAttributes(element, attrs, attributeNames) {
- (0, _minDash.forEach)(attributeNames, function (property) {
- if (attrs[property] !== undefined) {
- applyAttribute(element, attrs, property);
- }
- });
- }
- /**
- * Apply named property to element and drain it from the attrs
- * collection.
- *
- * @param {Base} element
- * @param {Object} attrs (in/out map of attributes)
- * @param {string} attributeName to apply
- */
+BpmnRules.prototype.canAttach = canAttach;
+BpmnRules.prototype.canReplace = canReplace;
- function applyAttribute(element, attrs, attributeName) {
- element[attributeName] = attrs[attributeName];
- delete attrs[attributeName];
- }
+BpmnRules.prototype.canDrop = canDrop;
- },{"../../util/DiUtil":238,"../../util/LabelUtil":239,"../../util/ModelUtil":240,"diagram-js/lib/core/ElementFactory":254,"inherits":438,"min-dash":646}],159:[function(require,module,exports){
- "use strict";
+BpmnRules.prototype.canInsert = canInsert;
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = Modeling;
+BpmnRules.prototype.canCreate = canCreate;
- var _inherits = _interopRequireDefault(require("inherits"));
+BpmnRules.prototype.canConnect = canConnect;
- var _Modeling = _interopRequireDefault(require("diagram-js/lib/features/modeling/Modeling"));
+BpmnRules.prototype.canResize = canResize;
- var _UpdatePropertiesHandler = _interopRequireDefault(require("./cmd/UpdatePropertiesHandler"));
+BpmnRules.prototype.canCopy = canCopy;
- var _UpdateCanvasRootHandler = _interopRequireDefault(require("./cmd/UpdateCanvasRootHandler"));
+/**
+ * Utility functions for rule checking
+ */
- var _AddLaneHandler = _interopRequireDefault(require("./cmd/AddLaneHandler"));
+/**
+ * Checks if given element can be used for starting connection.
+ *
+ * @param {Element} source
+ *
+ * @return {boolean}
+ */
+function canStartConnection(element) {
+ if (nonExistingOrLabel(element)) {
+ return null;
+ }
+
+ return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.isAny)(element, [
+ 'bpmn:FlowNode',
+ 'bpmn:InteractionNode',
+ 'bpmn:DataObjectReference',
+ 'bpmn:DataStoreReference',
+ 'bpmn:Group',
+ 'bpmn:TextAnnotation'
+ ]);
+}
+
+/**
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function nonExistingOrLabel(element) {
+ return !element || (0,diagram_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.isLabel)(element);
+}
- var _SplitLaneHandler = _interopRequireDefault(require("./cmd/SplitLaneHandler"));
+function isSame(a, b) {
+ return a === b;
+}
- var _ResizeLaneHandler = _interopRequireDefault(require("./cmd/ResizeLaneHandler"));
+/**
+ * @param {Element} element
+ *
+ * @return {ModdleElement}
+ */
+function getOrganizationalParent(element) {
- var _UpdateFlowNodeRefsHandler = _interopRequireDefault(require("./cmd/UpdateFlowNodeRefsHandler"));
+ do {
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:Process')) {
+ return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.getBusinessObject)(element);
+ }
- var _IdClaimHandler = _interopRequireDefault(require("./cmd/IdClaimHandler"));
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:Participant')) {
+ return (
+ (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.getBusinessObject)(element).processRef ||
+ (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.getBusinessObject)(element)
+ );
+ }
+ } while ((element = element.parent));
- var _SetColorHandler = _interopRequireDefault(require("./cmd/SetColorHandler"));
+}
- var _UpdateLabelHandler = _interopRequireDefault(require("../label-editing/cmd/UpdateLabelHandler"));
+/**
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function isTextAnnotation(element) {
+ return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:TextAnnotation');
+}
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+/**
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function isGroup(element) {
+ return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:Group') && !element.labelTarget;
+}
- /**
- * BPMN 2.0 modeling features activator
- *
- * @param {EventBus} eventBus
- * @param {ElementFactory} elementFactory
- * @param {CommandStack} commandStack
- * @param {BpmnRules} bpmnRules
- */
- function Modeling(eventBus, elementFactory, commandStack, bpmnRules) {
- _Modeling.default.call(this, eventBus, elementFactory, commandStack);
+/**
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function isCompensationBoundary(element) {
+ return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:BoundaryEvent') &&
+ hasEventDefinition(element, 'bpmn:CompensateEventDefinition');
+}
- this._bpmnRules = bpmnRules;
- }
+/**
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function isForCompensation(element) {
+ return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.getBusinessObject)(element).isForCompensation;
+}
- (0, _inherits.default)(Modeling, _Modeling.default);
- Modeling.$inject = ['eventBus', 'elementFactory', 'commandStack', 'bpmnRules'];
+/**
+ * @param {Element} a
+ * @param {Element} b
+ *
+ * @return {boolean}
+ */
+function isSameOrganization(a, b) {
+ var parentA = getOrganizationalParent(a),
+ parentB = getOrganizationalParent(b);
- Modeling.prototype.getHandlers = function () {
- var handlers = _Modeling.default.prototype.getHandlers.call(this);
+ return parentA === parentB;
+}
- handlers['element.updateProperties'] = _UpdatePropertiesHandler.default;
- handlers['canvas.updateRoot'] = _UpdateCanvasRootHandler.default;
- handlers['lane.add'] = _AddLaneHandler.default;
- handlers['lane.resize'] = _ResizeLaneHandler.default;
- handlers['lane.split'] = _SplitLaneHandler.default;
- handlers['lane.updateRefs'] = _UpdateFlowNodeRefsHandler.default;
- handlers['id.updateClaim'] = _IdClaimHandler.default;
- handlers['element.setColor'] = _SetColorHandler.default;
- handlers['element.updateLabel'] = _UpdateLabelHandler.default;
- return handlers;
- };
+/**
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function isMessageFlowSource(element) {
+ return (
+ (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:InteractionNode') &&
+ !(0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:BoundaryEvent') && (
+ !(0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:Event') || (
+ (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:ThrowEvent') &&
+ hasEventDefinitionOrNone(element, 'bpmn:MessageEventDefinition')
+ )
+ )
+ );
+}
+
+/**
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function isMessageFlowTarget(element) {
+ return (
+ (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:InteractionNode') &&
+ !isForCompensation(element) && (
+ !(0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:Event') || (
+ (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:CatchEvent') &&
+ hasEventDefinitionOrNone(element, 'bpmn:MessageEventDefinition')
+ )
+ ) && !(
+ (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:BoundaryEvent') &&
+ !hasEventDefinition(element, 'bpmn:MessageEventDefinition')
+ )
+ );
+}
+
+/**
+ * @param {Element} element
+ *
+ * @return {ModdleElement}
+ */
+function getScopeParent(element) {
- Modeling.prototype.updateLabel = function (element, newLabel, newBounds, hints) {
- this._commandStack.execute('element.updateLabel', {
- element: element,
- newLabel: newLabel,
- newBounds: newBounds,
- hints: hints || {}
- });
- };
+ var parent = element;
- Modeling.prototype.connect = function (source, target, attrs, hints) {
- var bpmnRules = this._bpmnRules;
+ while ((parent = parent.parent)) {
- if (!attrs) {
- attrs = bpmnRules.canConnect(source, target);
- }
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(parent, 'bpmn:FlowElementsContainer')) {
+ return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.getBusinessObject)(parent);
+ }
- if (!attrs) {
- return;
- }
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(parent, 'bpmn:Participant')) {
+ return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.getBusinessObject)(parent).processRef;
+ }
+ }
- return this.createConnection(source, target, attrs, source.parent, hints);
- };
+ return null;
+}
- Modeling.prototype.updateProperties = function (element, properties) {
- this._commandStack.execute('element.updateProperties', {
- element: element,
- properties: properties
- });
- };
+/**
+ * @param {Element} a
+ * @param {Element} b
+ *
+ * @return {boolean}
+ */
+function isSameScope(a, b) {
+ var scopeParentA = getScopeParent(a),
+ scopeParentB = getScopeParent(b);
- Modeling.prototype.resizeLane = function (laneShape, newBounds, balanced) {
- this._commandStack.execute('lane.resize', {
- shape: laneShape,
- newBounds: newBounds,
- balanced: balanced
- });
- };
+ return scopeParentA === scopeParentB;
+}
- Modeling.prototype.addLane = function (targetLaneShape, location) {
- var context = {
- shape: targetLaneShape,
- location: location
- };
+/**
+ * @param {Element} element
+ * @param {string} eventDefinition
+ *
+ * @return {boolean}
+ */
+function hasEventDefinition(element, eventDefinition) {
+ var businessObject = (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.getBusinessObject)(element);
- this._commandStack.execute('lane.add', context);
+ return !!(0,min_dash__WEBPACK_IMPORTED_MODULE_3__.find)(businessObject.eventDefinitions || [], function(definition) {
+ return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(definition, eventDefinition);
+ });
+}
- return context.newLane;
- };
+/**
+ * @param {Element} element
+ * @param {string} eventDefinition
+ *
+ * @return {boolean}
+ */
+function hasEventDefinitionOrNone(element, eventDefinition) {
+ var businessObject = (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.getBusinessObject)(element);
- Modeling.prototype.splitLane = function (targetLane, count) {
- this._commandStack.execute('lane.split', {
- shape: targetLane,
- count: count
- });
- };
- /**
- * Transform the current diagram into a collaboration.
- *
- * @return {djs.model.Root} the new root element
- */
+ return (businessObject.eventDefinitions || []).every(function(definition) {
+ return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(definition, eventDefinition);
+ });
+}
+/**
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function isSequenceFlowSource(element) {
+ return (
+ (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:FlowNode') &&
+ !(0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:EndEvent') &&
+ !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.isEventSubProcess)(element) &&
+ !((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:IntermediateThrowEvent') &&
+ hasEventDefinition(element, 'bpmn:LinkEventDefinition')
+ ) &&
+ !isCompensationBoundary(element) &&
+ !isForCompensation(element)
+ );
+}
+
+/**
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function isSequenceFlowTarget(element) {
+ return (
+ (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:FlowNode') &&
+ !(0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:StartEvent') &&
+ !(0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:BoundaryEvent') &&
+ !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.isEventSubProcess)(element) &&
+ !((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:IntermediateCatchEvent') &&
+ hasEventDefinition(element, 'bpmn:LinkEventDefinition')
+ ) &&
+ !isForCompensation(element)
+ );
+}
+
+/**
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function isEventBasedTarget(element) {
+ return (
+ (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:ReceiveTask') || (
+ (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:IntermediateCatchEvent') && (
+ hasEventDefinition(element, 'bpmn:MessageEventDefinition') ||
+ hasEventDefinition(element, 'bpmn:TimerEventDefinition') ||
+ hasEventDefinition(element, 'bpmn:ConditionalEventDefinition') ||
+ hasEventDefinition(element, 'bpmn:SignalEventDefinition')
+ )
+ )
+ );
+}
+
+/**
+ * @param {Element} element
+ *
+ * @return {Shape[]}
+ */
+function getParents(element) {
- Modeling.prototype.makeCollaboration = function () {
- var collaborationElement = this._create('root', {
- type: 'bpmn:Collaboration'
- });
+ var parents = [];
- var context = {
- newRoot: collaborationElement
- };
+ while (element) {
+ element = element.parent;
- this._commandStack.execute('canvas.updateRoot', context);
+ if (element) {
+ parents.push(element);
+ }
+ }
- return collaborationElement;
- };
+ return parents;
+}
- Modeling.prototype.updateLaneRefs = function (flowNodeShapes, laneShapes) {
- this._commandStack.execute('lane.updateRefs', {
- flowNodeShapes: flowNodeShapes,
- laneShapes: laneShapes
- });
- };
- /**
- * Transform the current diagram into a process.
- *
- * @return {djs.model.Root} the new root element
- */
+/**
+ * @param {Shape} possibleParent
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function isParent(possibleParent, element) {
+ var allParents = getParents(element);
+ return allParents.indexOf(possibleParent) !== -1;
+}
- Modeling.prototype.makeProcess = function () {
- var processElement = this._create('root', {
- type: 'bpmn:Process'
- });
+/**
+ * @param {Element} source
+ * @param {Element} target
+ * @param {Connection} connection
+ *
+ * @return {CanConnectResult}
+ */
+function canConnect(source, target, connection) {
- var context = {
- newRoot: processElement
- };
+ if (nonExistingOrLabel(source) || nonExistingOrLabel(target)) {
+ return null;
+ }
- this._commandStack.execute('canvas.updateRoot', context);
- };
+ if (!(0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(connection, 'bpmn:DataAssociation')) {
- Modeling.prototype.claimId = function (id, moddleElement) {
- this._commandStack.execute('id.updateClaim', {
- id: id,
- element: moddleElement,
- claiming: true
- });
- };
+ if (canConnectMessageFlow(source, target)) {
+ return { type: 'bpmn:MessageFlow' };
+ }
- Modeling.prototype.unclaimId = function (id, moddleElement) {
- this._commandStack.execute('id.updateClaim', {
- id: id,
- element: moddleElement
- });
- };
+ if (canConnectSequenceFlow(source, target)) {
+ return { type: 'bpmn:SequenceFlow' };
+ }
+ }
- Modeling.prototype.setColor = function (elements, colors) {
- if (!elements.length) {
- elements = [elements];
- }
+ var connectDataAssociation = canConnectDataAssociation(source, target);
- this._commandStack.execute('element.setColor', {
- elements: elements,
- colors: colors
- });
- };
+ if (connectDataAssociation) {
+ return connectDataAssociation;
+ }
- },{"../label-editing/cmd/UpdateLabelHandler":153,"./cmd/AddLaneHandler":200,"./cmd/IdClaimHandler":201,"./cmd/ResizeLaneHandler":202,"./cmd/SetColorHandler":203,"./cmd/SplitLaneHandler":204,"./cmd/UpdateCanvasRootHandler":205,"./cmd/UpdateFlowNodeRefsHandler":206,"./cmd/UpdatePropertiesHandler":207,"diagram-js/lib/features/modeling/Modeling":327,"inherits":438}],160:[function(require,module,exports){
- "use strict";
+ if (canConnectCompensationAssociation(source, target)) {
+ return {
+ type: 'bpmn:Association',
+ associationDirection: 'One'
+ };
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = AdaptiveLabelPositioningBehavior;
+ if (canConnectAssociation(source, target)) {
+ return {
+ type: 'bpmn:Association',
+ associationDirection: 'None'
+ };
+ }
- var _inherits = _interopRequireDefault(require("inherits"));
+ return false;
+}
- var _LayoutUtil = require("diagram-js/lib/layout/LayoutUtil");
+/**
+ * Can an element be dropped into the target element.
+ *
+ * @param {Element} element
+ * @param {Shape} target
+ *
+ * @return {boolean}
+ */
+function canDrop(element, target) {
+
+ // can move labels and groups everywhere
+ if ((0,diagram_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.isLabel)(element) || isGroup(element)) {
+ return true;
+ }
+
+
+ // disallow to create elements on collapsed pools
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(target, 'bpmn:Participant') && !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.isExpanded)(target)) {
+ return false;
+ }
+
+ // allow to create new participants on
+ // existing collaboration and process diagrams
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:Participant')) {
+ return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(target, 'bpmn:Process') || (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(target, 'bpmn:Collaboration');
+ }
+
+ // allow moving DataInput / DataOutput within its original container only
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.isAny)(element, [ 'bpmn:DataInput', 'bpmn:DataOutput' ])) {
+
+ if (element.parent) {
+ return target === element.parent;
+ }
+ }
+
+ // allow creating lanes on participants and other lanes only
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:Lane')) {
+ return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(target, 'bpmn:Participant') || (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(target, 'bpmn:Lane');
+ }
+
+ // disallow dropping boundary events which cannot replace with intermediate event
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:BoundaryEvent') && !isDroppableBoundaryEvent(element)) {
+ return false;
+ }
+
+ // drop flow elements onto flow element containers
+ // and participants
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:FlowElement') && !(0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:DataStoreReference')) {
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(target, 'bpmn:FlowElementsContainer')) {
+ return (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.isExpanded)(target);
+ }
+
+ return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.isAny)(target, [ 'bpmn:Participant', 'bpmn:Lane' ]);
+ }
+
+ // disallow dropping data store reference if there is no process to append to
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:DataStoreReference') && (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(target, 'bpmn:Collaboration')) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.some)((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.getBusinessObject)(target).get('participants'), function(participant) {
+ return !!participant.get('processRef');
+ });
+ }
+
+ // account for the fact that data associations are always
+ // rendered and moved to top (Process or Collaboration level)
+ //
+ // artifacts may be placed wherever, too
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.isAny)(element, [ 'bpmn:Artifact', 'bpmn:DataAssociation', 'bpmn:DataStoreReference' ])) {
+ return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.isAny)(target, [
+ 'bpmn:Collaboration',
+ 'bpmn:Lane',
+ 'bpmn:Participant',
+ 'bpmn:Process',
+ 'bpmn:SubProcess' ]);
+ }
+
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:MessageFlow')) {
+ return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(target, 'bpmn:Collaboration')
+ || element.source.parent == target
+ || element.target.parent == target;
+ }
+
+ return false;
+}
+
+/**
+ * @param {Shape} event
+ *
+ * @return {boolean}
+ */
+function isDroppableBoundaryEvent(event) {
+ return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.getBusinessObject)(event).cancelActivity && (
+ hasNoEventDefinition(event) || hasCommonBoundaryIntermediateEventDefinition(event)
+ );
+}
+
+/**
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function isBoundaryEvent(element) {
+ return !(0,diagram_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.isLabel)(element) && (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:BoundaryEvent');
+}
- var _Math = require("diagram-js/lib/util/Math");
+/**
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function isLane(element) {
+ return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:Lane');
+}
- var _LabelUtil = require("../../../util/LabelUtil");
+/**
+ * `bpmn:IntermediateThrowEvents` are treated as boundary events during create.
+ *
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function isBoundaryCandidate(element) {
+ if (isBoundaryEvent(element)) {
+ return true;
+ }
+
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:IntermediateThrowEvent') && hasNoEventDefinition(element)) {
+ return true;
+ }
+
+ return (
+ (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:IntermediateCatchEvent') &&
+ hasCommonBoundaryIntermediateEventDefinition(element)
+ );
+}
+
+/**
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function hasNoEventDefinition(element) {
+ var businessObject = (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.getBusinessObject)(element);
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+ return businessObject && !(businessObject.eventDefinitions && businessObject.eventDefinitions.length);
+}
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+/**
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function hasCommonBoundaryIntermediateEventDefinition(element) {
+ return hasOneOfEventDefinitions(element, [
+ 'bpmn:MessageEventDefinition',
+ 'bpmn:TimerEventDefinition',
+ 'bpmn:SignalEventDefinition',
+ 'bpmn:ConditionalEventDefinition'
+ ]);
+}
+
+/**
+ * @param {Element} element
+ * @param {string[]} eventDefinitions
+ *
+ * @return {boolean}
+ */
+function hasOneOfEventDefinitions(element, eventDefinitions) {
+ return eventDefinitions.some(function(definition) {
+ return hasEventDefinition(element, definition);
+ });
+}
+
+/**
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function isReceiveTaskAfterEventBasedGateway(element) {
+ return (
+ (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:ReceiveTask') &&
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.find)(element.incoming, function(incoming) {
+ return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(incoming.source, 'bpmn:EventBasedGateway');
+ })
+ );
+}
+
+/**
+ * TODO(philippfromme): remove `source` parameter
+ *
+ * @param {Element[]} elements
+ * @param {Shape} target
+ * @param {Element} source
+ * @param {Point} [position]
+ *
+ * @return {boolean | 'attach'}
+ */
+function canAttach(elements, target, source, position) {
+
+ if (!Array.isArray(elements)) {
+ elements = [ elements ];
+ }
+
+ // only (re-)attach one element at a time
+ if (elements.length !== 1) {
+ return false;
+ }
+
+ var element = elements[0];
+
+ // do not attach labels
+ if ((0,diagram_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.isLabel)(element)) {
+ return false;
+ }
+
+ // only handle boundary events
+ if (!isBoundaryCandidate(element)) {
+ return false;
+ }
+
+ // disallow drop on event sub processes
+ if ((0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.isEventSubProcess)(target)) {
+ return false;
+ }
+
+ // only allow drop on non compensation activities
+ if (!(0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(target, 'bpmn:Activity') || isForCompensation(target)) {
+ return false;
+ }
+
+ // only attach to subprocess border
+ if (position && !(0,_snapping_BpmnSnappingUtil__WEBPACK_IMPORTED_MODULE_6__.getBoundaryAttachment)(position, target)) {
+ return false;
+ }
+
+ // do not attach on receive tasks after event based gateways
+ if (isReceiveTaskAfterEventBasedGateway(target)) {
+ return false;
+ }
+
+ return 'attach';
+}
+
+/**
+ * Check whether the given elements can be replaced. Return all elements which
+ * can be replaced.
+ *
+ * @example
+ *
+ * ```javascript
+ * [{
+ * id: 'IntermediateEvent_1',
+ * type: 'bpmn:StartEvent'
+ * },
+ * {
+ * id: 'Task_1',
+ * type: 'bpmn:ServiceTask'
+ * }]
+ * ```
+ *
+ * @param {Element[]} elements
+ * @param {Shape} [target]
+ * @param {Point} [position]
+ *
+ * @return {CanReplaceResult}
+ */
+function canReplace(elements, target, position) {
+
+ if (!target) {
+ return false;
+ }
+
+ var canExecute = {
+ replacements: []
+ };
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(elements, function(element) {
+
+ if (!(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.isEventSubProcess)(target)) {
+
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:StartEvent') &&
+ element.type !== 'label' &&
+ canDrop(element, target)) {
+
+ // replace a non-interrupting start event by a blank interrupting start event
+ // when the target is not an event sub process
+ if (!(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.isInterrupting)(element)) {
+ canExecute.replacements.push({
+ oldElementId: element.id,
+ newElementType: 'bpmn:StartEvent'
+ });
+ }
+
+ // replace an error/escalation/compensate start event by a blank interrupting start event
+ // when the target is not an event sub process
+ if ((0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.hasErrorEventDefinition)(element) ||
+ (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.hasEscalationEventDefinition)(element) ||
+ (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.hasCompensateEventDefinition)(element)) {
+ canExecute.replacements.push({
+ oldElementId: element.id,
+ newElementType: 'bpmn:StartEvent'
+ });
+ }
+
+ // replace a typed start event by a blank interrupting start event
+ // when the target is a sub process but not an event sub process
+ if (hasOneOfEventDefinitions(element,
+ [
+ 'bpmn:MessageEventDefinition',
+ 'bpmn:TimerEventDefinition',
+ 'bpmn:SignalEventDefinition',
+ 'bpmn:ConditionalEventDefinition'
+ ]) &&
+ (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(target, 'bpmn:SubProcess')) {
+ canExecute.replacements.push({
+ oldElementId: element.id,
+ newElementType: 'bpmn:StartEvent'
+ });
+ }
+ }
+ }
+
+ if (!(0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(target, 'bpmn:Transaction')) {
+ if (hasEventDefinition(element, 'bpmn:CancelEventDefinition') &&
+ element.type !== 'label') {
+
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:EndEvent') && canDrop(element, target)) {
+ canExecute.replacements.push({
+ oldElementId: element.id,
+ newElementType: 'bpmn:EndEvent'
+ });
+ }
+
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:BoundaryEvent') && canAttach(element, target, null, position)) {
+ canExecute.replacements.push({
+ oldElementId: element.id,
+ newElementType: 'bpmn:BoundaryEvent'
+ });
+ }
+ }
+ }
+ });
+
+ return canExecute.replacements.length ? canExecute : false;
+}
+
+/**
+ * @param {Element[]} elements
+ * @param {Shape} target
+ *
+ * @return {boolean}
+ */
+function canMove(elements, target) {
+
+ // do not move selection containing lanes
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_3__.some)(elements, isLane)) {
+ return false;
+ }
+
+ // allow default move check to start move operation
+ if (!target) {
+ return true;
+ }
+
+ return elements.every(function(element) {
+ return canDrop(element, target);
+ });
+}
+
+/**
+ * @param {Shape} shape
+ * @param {Shape} target
+ * @param {Element} source
+ * @param {Point} position
+ *
+ * @return {boolean}
+ */
+function canCreate(shape, target, source, position) {
- var ALIGNMENTS = ['top', 'bottom', 'left', 'right'];
- var ELEMENT_LABEL_DISTANCE = 10;
- /**
- * A component that makes sure that external labels are added
- * together with respective elements and properly updated (DI wise)
- * during move.
- *
- * @param {EventBus} eventBus
- * @param {Modeling} modeling
- */
+ if (!target) {
+ return false;
+ }
- function AdaptiveLabelPositioningBehavior(eventBus, modeling) {
- _CommandInterceptor.default.call(this, eventBus);
+ if ((0,diagram_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.isLabel)(shape) || isGroup(shape)) {
+ return true;
+ }
- this.postExecuted(['connection.create', 'connection.layout', 'connection.updateWaypoints'], function (event) {
- var context = event.context,
- connection = context.connection,
- source = connection.source,
- target = connection.target,
- hints = context.hints || {};
+ if (isSame(source, target)) {
+ return false;
+ }
- if (hints.createElementsBehavior !== false) {
- checkLabelAdjustment(source);
- checkLabelAdjustment(target);
- }
- });
- this.postExecuted(['label.create'], function (event) {
- var context = event.context,
- shape = context.shape,
- hints = context.hints || {};
+ // ensure we do not drop the element
+ // into source
+ if (source && isParent(source, target)) {
+ return false;
+ }
- if (hints.createElementsBehavior !== false) {
- checkLabelAdjustment(shape.labelTarget);
- }
- });
- this.postExecuted(['elements.create'], function (event) {
- var context = event.context,
- elements = context.elements,
- hints = context.hints || {};
-
- if (hints.createElementsBehavior !== false) {
- elements.forEach(function (element) {
- checkLabelAdjustment(element);
- });
- }
- });
+ return canDrop(shape, target, position) || canInsert(shape, target, position);
+}
- function checkLabelAdjustment(element) {
- // skip non-existing labels
- if (!(0, _LabelUtil.hasExternalLabel)(element)) {
- return;
- }
+/**
+ * @param {Shape} shape
+ * @param {Rect} newBounds
+ *
+ * @return {boolean}
+ */
+function canResize(shape, newBounds) {
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(shape, 'bpmn:SubProcess')) {
+ return (
+ (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.isExpanded)(shape) && (
+ !newBounds || (newBounds.width >= 100 && newBounds.height >= 80)
+ )
+ );
+ }
+
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(shape, 'bpmn:Lane')) {
+ return true;
+ }
+
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(shape, 'bpmn:Participant')) {
+ return true;
+ }
+
+ if (isTextAnnotation(shape)) {
+ return true;
+ }
+
+ if (isGroup(shape)) {
+ return true;
+ }
+
+ return false;
+}
+
+/**
+ * Check whether one of of the elements to be connected is a text annotation.
+ *
+ * @param {Element} source
+ * @param {Element} target
+ *
+ * @return {boolean}
+ */
+function isOneTextAnnotation(source, target) {
- var optimalPosition = getOptimalPosition(element); // no optimal position found
+ var sourceTextAnnotation = isTextAnnotation(source),
+ targetTextAnnotation = isTextAnnotation(target);
- if (!optimalPosition) {
- return;
- }
+ return (
+ (sourceTextAnnotation || targetTextAnnotation) &&
+ (sourceTextAnnotation !== targetTextAnnotation)
+ );
+}
- adjustLabelPosition(element, optimalPosition);
- }
+/**
+ * @param {Element} source
+ * @param {Element} target
+ *
+ * @return {CanConnectResult}
+ */
+function canConnectAssociation(source, target) {
+
+ // don't connect parent <-> child
+ if (isParent(target, source) || isParent(source, target)) {
+ return false;
+ }
+
+ // allow connection of associations between and
+ if (isOneTextAnnotation(source, target)) {
+ return true;
+ }
+
+ // can connect associations where we can connect
+ // data associations, too (!)
+ return !!canConnectDataAssociation(source, target);
+}
+
+/**
+ * @param {Element} source
+ * @param {Element} target
+ *
+ * @return {boolean}
+ */
+function canConnectCompensationAssociation(source, target) {
+ return (
+ isSameScope(source, target) &&
+ isCompensationBoundary(source) &&
+ (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(target, 'bpmn:Activity') &&
+ !isHostOfElement(target, source) &&
+ !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.isEventSubProcess)(target)
+ );
+}
+
+/**
+ * @param {Element} source
+ * @param {Element} target
+ *
+ * @return {boolean}
+ */
+function canConnectMessageFlow(source, target) {
+
+ // during connect user might move mouse out of canvas
+ // https://github.com/bpmn-io/bpmn-js/issues/1033
+ if (getRootElement(source) && !getRootElement(target)) {
+ return false;
+ }
+
+ return (
+ isMessageFlowSource(source) &&
+ isMessageFlowTarget(target) &&
+ !isSameOrganization(source, target)
+ );
+}
+
+/**
+ * @param {Element} source
+ * @param {Element} target
+ *
+ * @return {boolean}
+ */
+function canConnectSequenceFlow(source, target) {
+ return isSequenceFlowSource(source) &&
+ isSequenceFlowTarget(target) &&
+ isSameScope(source, target) &&
+ !((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(source, 'bpmn:EventBasedGateway') && !isEventBasedTarget(target));
+}
+
+/**
+ * @param {Element} source
+ * @param {Element} target
+ *
+ * @return {CanConnectResult}
+ */
+function canConnectDataAssociation(source, target) {
- function adjustLabelPosition(element, orientation) {
- var elementMid = (0, _LayoutUtil.getMid)(element),
- label = element.label,
- labelMid = (0, _LayoutUtil.getMid)(label); // ignore labels that are being created
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.isAny)(source, [ 'bpmn:DataObjectReference', 'bpmn:DataStoreReference' ]) &&
+ (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.isAny)(target, [ 'bpmn:Activity', 'bpmn:ThrowEvent' ])) {
+ return { type: 'bpmn:DataInputAssociation' };
+ }
- if (!label.parent) {
- return;
- }
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.isAny)(target, [ 'bpmn:DataObjectReference', 'bpmn:DataStoreReference' ]) &&
+ (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.isAny)(source, [ 'bpmn:Activity', 'bpmn:CatchEvent' ])) {
+ return { type: 'bpmn:DataOutputAssociation' };
+ }
- var elementTrbl = (0, _LayoutUtil.asTRBL)(element);
- var newLabelMid;
+ return false;
+}
- switch (orientation) {
- case 'top':
- newLabelMid = {
- x: elementMid.x,
- y: elementTrbl.top - ELEMENT_LABEL_DISTANCE - label.height / 2
- };
- break;
+/**
+ * @param {Shape} shape
+ * @param {Connection} connection
+ * @param {Point} position
+ *
+ * @return {boolean}
+ */
+function canInsert(shape, connection, position) {
+ if (!connection) {
+ return false;
+ }
+
+ if (Array.isArray(shape)) {
+ if (shape.length !== 1) {
+ return false;
+ }
+
+ shape = shape[ 0 ];
+ }
+
+ if (connection.source === shape ||
+ connection.target === shape) {
+ return false;
+ }
+
+ // return true if shape can be inserted into connection parent
+ return (
+ (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.isAny)(connection, [ 'bpmn:SequenceFlow', 'bpmn:MessageFlow' ]) &&
+ !(0,diagram_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.isLabel)(connection) &&
+ (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(shape, 'bpmn:FlowNode') &&
+ !(0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(shape, 'bpmn:BoundaryEvent') &&
+ canDrop(shape, connection.parent, position));
+}
+
+/**
+ * @param {Element[]} elements
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function includes(elements, element) {
+ return (elements && element) && elements.indexOf(element) !== -1;
+}
- case 'left':
- newLabelMid = {
- x: elementTrbl.left - ELEMENT_LABEL_DISTANCE - label.width / 2,
- y: elementMid.y
- };
- break;
+/**
+ * @param {Element[]} elements
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function canCopy(elements, element) {
+ if ((0,diagram_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.isLabel)(element)) {
+ return true;
+ }
- case 'bottom':
- newLabelMid = {
- x: elementMid.x,
- y: elementTrbl.bottom + ELEMENT_LABEL_DISTANCE + label.height / 2
- };
- break;
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:Lane') && !includes(elements, element.parent)) {
+ return false;
+ }
- case 'right':
- newLabelMid = {
- x: elementTrbl.right + ELEMENT_LABEL_DISTANCE + label.width / 2,
- y: elementMid.y
- };
- break;
- }
+ return true;
+}
- var delta = (0, _Math.substract)(newLabelMid, labelMid);
- modeling.moveShape(label, delta);
- }
- }
+/**
+ * @param {Element} element
+ *
+ * @return {Element|null}
+ */
+function getRootElement(element) {
+ return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_7__.getParent)(element, 'bpmn:Process') || (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_7__.getParent)(element, 'bpmn:Collaboration');
+}
- (0, _inherits.default)(AdaptiveLabelPositioningBehavior, _CommandInterceptor.default);
- AdaptiveLabelPositioningBehavior.$inject = ['eventBus', 'modeling']; // helpers //////////////////////
+function isHostOfElement(potentialHost, element) {
+ return potentialHost.attachers.includes(element);
+}
- /**
- * Return alignments which are taken by a boundary's host element
- *
- * @param {Shape} element
- *
- * @return {Array}
- */
- function getTakenHostAlignments(element) {
- var hostElement = element.host,
- elementMid = (0, _LayoutUtil.getMid)(element),
- hostOrientation = (0, _LayoutUtil.getOrientation)(elementMid, hostElement);
- var freeAlignments; // check whether there is a multi-orientation, e.g. 'top-left'
+/***/ }),
- if (hostOrientation.indexOf('-') >= 0) {
- freeAlignments = hostOrientation.split('-');
- } else {
- freeAlignments = [hostOrientation];
- }
+/***/ "../node_modules/bpmn-js/lib/features/rules/index.js":
+/*!***********************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/rules/index.js ***!
+ \***********************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var takenAlignments = ALIGNMENTS.filter(function (alignment) {
- return freeAlignments.indexOf(alignment) === -1;
- });
- return takenAlignments;
- }
- /**
- * Return alignments which are taken by related connections
- *
- * @param {Shape} element
- *
- * @return {Array}
- */
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_features_rules__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/rules */ "../node_modules/diagram-js/lib/features/rules/index.js");
+/* harmony import */ var _BpmnRules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BpmnRules */ "../node_modules/bpmn-js/lib/features/rules/BpmnRules.js");
- function getTakenConnectionAlignments(element) {
- var elementMid = (0, _LayoutUtil.getMid)(element);
- var takenAlignments = [].concat(element.incoming.map(function (c) {
- return c.waypoints[c.waypoints.length - 2];
- }), element.outgoing.map(function (c) {
- return c.waypoints[1];
- })).map(function (point) {
- return getApproximateOrientation(elementMid, point);
- });
- return takenAlignments;
- }
- /**
- * Return the optimal label position around an element
- * or _undefined_, if none was found.
- *
- * @param {Shape} element
- *
- * @return {string} positioning identifier
- */
- function getOptimalPosition(element) {
- var labelMid = (0, _LayoutUtil.getMid)(element.label);
- var elementMid = (0, _LayoutUtil.getMid)(element);
- var labelOrientation = getApproximateOrientation(elementMid, labelMid);
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ diagram_js_lib_features_rules__WEBPACK_IMPORTED_MODULE_0__["default"]
+ ],
+ __init__: [ 'bpmnRules' ],
+ bpmnRules: [ 'type', _BpmnRules__WEBPACK_IMPORTED_MODULE_1__["default"] ]
+});
- if (!isAligned(labelOrientation)) {
- return;
- }
- var takenAlignments = getTakenConnectionAlignments(element);
+/***/ }),
- if (element.host) {
- var takenHostAlignments = getTakenHostAlignments(element);
- takenAlignments = takenAlignments.concat(takenHostAlignments);
- }
+/***/ "../node_modules/bpmn-js/lib/features/search/BpmnSearchProvider.js":
+/*!*************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/search/BpmnSearchProvider.js ***!
+ \*************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var freeAlignments = ALIGNMENTS.filter(function (alignment) {
- return takenAlignments.indexOf(alignment) === -1;
- }); // NOTHING TO DO; label already aligned a.O.K.
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BpmnSearchProvider)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/LabelUtil */ "../node_modules/bpmn-js/lib/util/LabelUtil.js");
- if (freeAlignments.indexOf(labelOrientation) !== -1) {
- return;
- }
- return freeAlignments[0];
- }
- function getApproximateOrientation(p0, p1) {
- return (0, _LayoutUtil.getOrientation)(p1, p0, 5);
- }
- function isAligned(orientation) {
- return ALIGNMENTS.indexOf(orientation) !== -1;
- }
+/**
+ * @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
+ * @typedef {import('diagram-js/lib/core/ElementRegistry').default} ElementRegistry
+ * @typedef {import('diagram-js/lib/features/search-pad/SearchPad').default} SearchPad
+ *
+ * @typedef {import('diagram-js/lib/features/search-pad/SearchPadProvider').default} SearchPadProvider
+ * @typedef {import('diagram-js/lib/features/search-pad/SearchPadProvider').SearchResult} SearchResult
+ */
- },{"../../../util/LabelUtil":239,"diagram-js/lib/command/CommandInterceptor":250,"diagram-js/lib/layout/LayoutUtil":405,"diagram-js/lib/util/Math":427,"inherits":438}],161:[function(require,module,exports){
- "use strict";
+/**
+ * Provides ability to search for BPMN elements.
+ *
+ * @implements {SearchPadProvider}
+ *
+ * @param {ElementRegistry} elementRegistry
+ * @param {SearchPad} searchPad
+ * @param {Canvas} canvas
+ */
+function BpmnSearchProvider(elementRegistry, searchPad, canvas) {
+ this._elementRegistry = elementRegistry;
+ this._canvas = canvas;
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = AppendBehavior;
+ searchPad.registerProvider(this);
+}
- var _inherits = _interopRequireDefault(require("inherits"));
+BpmnSearchProvider.$inject = [
+ 'elementRegistry',
+ 'searchPad',
+ 'canvas'
+];
- var _ModelUtil = require("../../../util/ModelUtil");
+/**
+ * @param {string} pattern
+ *
+ * @return {SearchResult[]}
+ */
+BpmnSearchProvider.prototype.find = function(pattern) {
+ var rootElement = this._canvas.getRootElement();
+
+ var elements = this._elementRegistry.filter(function(element) {
+ if (element.labelTarget) {
+ return false;
+ }
+ return true;
+ });
+
+ // do not include root element
+ elements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(elements, function(element) {
+ return element !== rootElement;
+ });
+
+ elements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.map)(elements, function(element) {
+ return {
+ primaryTokens: matchAndSplit((0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_1__.getLabel)(element), pattern),
+ secondaryTokens: matchAndSplit(element.id, pattern),
+ element: element
+ };
+ });
+
+ // exclude non-matched elements
+ elements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(elements, function(element) {
+ return hasMatched(element.primaryTokens) || hasMatched(element.secondaryTokens);
+ });
+
+ elements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.sortBy)(elements, function(element) {
+ return (0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_1__.getLabel)(element.element) + element.element.id;
+ });
+
+ return elements;
+};
+
+/**
+ * @param {Token[]} tokens
+ *
+ * @return {boolean}
+ */
+function hasMatched(tokens) {
+ var matched = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(tokens, function(token) {
+ return !!token.matched;
+ });
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+ return matched.length > 0;
+}
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+/**
+ * @param {string} text
+ * @param {string} pattern
+ *
+ * @return {Token[]}
+ */
+function matchAndSplit(text, pattern) {
+ var tokens = [],
+ originalText = text;
- function AppendBehavior(eventBus, elementFactory, bpmnRules) {
- _CommandInterceptor.default.call(this, eventBus); // assign correct shape position unless already set
+ if (!text) {
+ return tokens;
+ }
+ text = text.toLowerCase();
+ pattern = pattern.toLowerCase();
- this.preExecute('shape.append', function (context) {
- var source = context.source,
- shape = context.shape;
+ var i = text.indexOf(pattern);
- if (!context.position) {
- if ((0, _ModelUtil.is)(shape, 'bpmn:TextAnnotation')) {
- context.position = {
- x: source.x + source.width / 2 + 75,
- y: source.y - 50 - shape.height / 2
- };
- } else {
- context.position = {
- x: source.x + source.width + 80 + shape.width / 2,
- y: source.y + source.height / 2
- };
- }
- }
- }, true);
- }
+ if (i > -1) {
+ if (i !== 0) {
+ tokens.push({
+ normal: originalText.substr(0, i)
+ });
+ }
- (0, _inherits.default)(AppendBehavior, _CommandInterceptor.default);
- AppendBehavior.$inject = ['eventBus', 'elementFactory', 'bpmnRules'];
+ tokens.push({
+ matched: originalText.substr(i, pattern.length)
+ });
- },{"../../../util/ModelUtil":240,"diagram-js/lib/command/CommandInterceptor":250,"inherits":438}],162:[function(require,module,exports){
- "use strict";
+ if (pattern.length + i < text.length) {
+ tokens.push({
+ normal: originalText.substr(pattern.length + i, text.length)
+ });
+ }
+ } else {
+ tokens.push({
+ normal: originalText
+ });
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = AssociationBehavior;
+ return tokens;
+}
- var _inherits = _interopRequireDefault(require("inherits"));
+/***/ }),
- var _ModelUtil = require("../../../util/ModelUtil");
+/***/ "../node_modules/bpmn-js/lib/features/search/index.js":
+/*!************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/search/index.js ***!
+ \************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_features_search_pad__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/search-pad */ "../node_modules/diagram-js/lib/features/search-pad/index.js");
+/* harmony import */ var _BpmnSearchProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BpmnSearchProvider */ "../node_modules/bpmn-js/lib/features/search/BpmnSearchProvider.js");
- var _minDash = require("min-dash");
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- function AssociationBehavior(injector, modeling) {
- injector.invoke(_CommandInterceptor.default, this);
- this.postExecute('shape.move', function (context) {
- var newParent = context.newParent,
- shape = context.shape;
- var associations = (0, _minDash.filter)(shape.incoming.concat(shape.outgoing), function (connection) {
- return (0, _ModelUtil.is)(connection, 'bpmn:Association');
- });
- (0, _minDash.forEach)(associations, function (association) {
- modeling.moveConnection(association, {
- x: 0,
- y: 0
- }, newParent);
- });
- }, true);
- }
- (0, _inherits.default)(AssociationBehavior, _CommandInterceptor.default);
- AssociationBehavior.$inject = ['injector', 'modeling'];
- },{"../../../util/ModelUtil":240,"diagram-js/lib/command/CommandInterceptor":250,"inherits":438,"min-dash":646}],163:[function(require,module,exports){
- "use strict";
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ diagram_js_lib_features_search_pad__WEBPACK_IMPORTED_MODULE_0__["default"]
+ ],
+ __init__: [ 'bpmnSearch' ],
+ bpmnSearch: [ 'type', _BpmnSearchProvider__WEBPACK_IMPORTED_MODULE_1__["default"] ]
+});
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = AttachEventBehavior;
- var _inherits = _interopRequireDefault(require("inherits"));
+/***/ }),
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+/***/ "../node_modules/bpmn-js/lib/features/snapping/BpmnConnectSnapping.js":
+/*!****************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/snapping/BpmnConnectSnapping.js ***!
+ \****************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var _ModelUtil = require("../../../util/ModelUtil");
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BpmnConnectSnapping)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/snapping/SnapUtil */ "../node_modules/diagram-js/lib/features/snapping/SnapUtil.js");
+/* harmony import */ var diagram_js_lib_features_keyboard_KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/keyboard/KeyboardUtil */ "../node_modules/diagram-js/lib/features/keyboard/KeyboardUtil.js");
+/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+/* harmony import */ var _modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../modeling/util/ModelingUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
- var _ModelingUtil = require("../util/ModelingUtil");
- var _LabelUtil = require("../../../util/LabelUtil");
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var LOW_PRIORITY = 500;
- /**
- * Replace intermediate event with boundary event when creating or moving results in attached event.
- */
- function AttachEventBehavior(bpmnReplace, injector) {
- injector.invoke(_CommandInterceptor.default, this);
- this._bpmnReplace = bpmnReplace;
- var self = this;
- this.postExecuted('elements.create', LOW_PRIORITY, function (context) {
- var elements = context.elements;
- elements = elements.filter(function (shape) {
- var host = shape.host;
- return shouldReplace(shape, host);
- });
- if (elements.length !== 1) {
- return;
- }
- elements.map(function (element) {
- return elements.indexOf(element);
- }).forEach(function (index) {
- var host = elements[index];
- context.elements[index] = self.replaceShape(elements[index], host);
- });
- }, true);
- this.preExecute('elements.move', LOW_PRIORITY, function (context) {
- var shapes = context.shapes,
- host = context.newHost;
- if (shapes.length !== 1) {
- return;
- }
- var shape = shapes[0];
- if (shouldReplace(shape, host)) {
- context.shapes = [self.replaceShape(shape, host)];
- }
- }, true);
- }
- AttachEventBehavior.$inject = ['bpmnReplace', 'injector'];
- (0, _inherits.default)(AttachEventBehavior, _CommandInterceptor.default);
- AttachEventBehavior.prototype.replaceShape = function (shape, host) {
- var eventDefinition = getEventDefinition(shape);
- var boundaryEvent = {
- type: 'bpmn:BoundaryEvent',
- host: host
- };
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ *
+ * @typedef {import('diagram-js/lib/core/EventBus').Event} Event
+ *
+ * @typedef {import('../../model/Types').Shape} Shape
+ *
+ * @typedef {import('diagram-js/lib/util/Types').Axis} Axis
+ * @typedef {import('diagram-js/lib/util/Types').Point} Point
+ */
- if (eventDefinition) {
- boundaryEvent.eventDefinitionType = eventDefinition.$type;
- }
+var HIGHER_PRIORITY = 1250;
- return this._bpmnReplace.replaceElement(shape, boundaryEvent, {
- layoutConnection: false
- });
- }; // helpers //////////
+var BOUNDARY_TO_HOST_THRESHOLD = 40;
+var TARGET_BOUNDS_PADDING = 20,
+ TASK_BOUNDS_PADDING = 10;
- function getEventDefinition(element) {
- var businessObject = (0, _ModelUtil.getBusinessObject)(element),
- eventDefinitions = businessObject.eventDefinitions;
- return eventDefinitions && eventDefinitions[0];
- }
+var TARGET_CENTER_PADDING = 20;
- function shouldReplace(shape, host) {
- return !(0, _LabelUtil.isLabel)(shape) && (0, _ModelingUtil.isAny)(shape, ['bpmn:IntermediateThrowEvent', 'bpmn:IntermediateCatchEvent']) && !!host;
- }
+var AXES = [ 'x', 'y' ];
- },{"../../../util/LabelUtil":239,"../../../util/ModelUtil":240,"../util/ModelingUtil":211,"diagram-js/lib/command/CommandInterceptor":250,"inherits":438}],164:[function(require,module,exports){
- "use strict";
+var abs = Math.abs;
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BoundaryEventBehavior;
+/**
+ * Snap during connect.
+ *
+ * @param {EventBus} eventBus
+ */
+function BpmnConnectSnapping(eventBus) {
+ eventBus.on([
+ 'connect.hover',
+ 'connect.move',
+ 'connect.end',
+ ], HIGHER_PRIORITY, function(event) {
+ var context = event.context,
+ canExecute = context.canExecute,
+ start = context.start,
+ hover = context.hover,
+ source = context.source,
+ target = context.target;
+
+ // do NOT snap on CMD
+ if (event.originalEvent && (0,diagram_js_lib_features_keyboard_KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__.isCmd)(event.originalEvent)) {
+ return;
+ }
+
+ if (!context.initialConnectionStart) {
+ context.initialConnectionStart = context.connectionStart;
+ }
+
+ // snap hover
+ if (canExecute && hover) {
+ snapToShape(event, hover, getTargetBoundsPadding(hover));
+ }
+
+ if (hover && isAnyType(canExecute, [
+ 'bpmn:Association',
+ 'bpmn:DataInputAssociation',
+ 'bpmn:DataOutputAssociation',
+ 'bpmn:SequenceFlow'
+ ])) {
+ context.connectionStart = (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.mid)(start);
+
+ // snap hover
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.isAny)(hover, [ 'bpmn:Event', 'bpmn:Gateway' ])) {
+ snapToPosition(event, (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.mid)(hover));
+ }
+
+ // snap hover
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.isAny)(hover, [ 'bpmn:Task', 'bpmn:SubProcess' ])) {
+ snapToTargetMid(event, hover);
+ }
+
+ // snap source and target
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.is)(source, 'bpmn:BoundaryEvent') && target === source.host) {
+ snapBoundaryEventLoop(event);
+ }
+
+ } else if (isType(canExecute, 'bpmn:MessageFlow')) {
+
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.is)(start, 'bpmn:Event')) {
+
+ // snap start
+ context.connectionStart = (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.mid)(start);
+ }
+
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.is)(hover, 'bpmn:Event')) {
+
+ // snap hover
+ snapToPosition(event, (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.mid)(hover));
+ }
+
+ } else {
+
+ // un-snap source
+ context.connectionStart = context.initialConnectionStart;
+ }
+ });
+}
+
+BpmnConnectSnapping.$inject = [ 'eventBus' ];
+
+
+// helpers //////////
+
+/**
+ * Snap to the given target if the event is inside the bounds of the target.
+ *
+ * @param {Event} event
+ * @param {Shape} target
+ * @param {number} padding
+ */
+function snapToShape(event, target, padding) {
+ AXES.forEach(function(axis) {
+ var dimensionForAxis = getDimensionForAxis(axis, target);
+
+ if (event[ axis ] < target[ axis ] + padding) {
+ (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.setSnapped)(event, axis, target[ axis ] + padding);
+ } else if (event[ axis ] > target[ axis ] + dimensionForAxis - padding) {
+ (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.setSnapped)(event, axis, target[ axis ] + dimensionForAxis - padding);
+ }
+ });
+}
+
+/**
+ * Snap to the target mid if the event is in the target mid.
+ *
+ * @param {Event} event
+ * @param {Shape} target
+ */
+function snapToTargetMid(event, target) {
+ var targetMid = (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.mid)(target);
+
+ AXES.forEach(function(axis) {
+ if (isMid(event, target, axis)) {
+ (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.setSnapped)(event, axis, targetMid[ axis ]);
+ }
+ });
+}
+
+/**
+ * Snap to prevent a loop overlapping a boundary event.
+ *
+ * @param {Event} event
+ */
+function snapBoundaryEventLoop(event) {
+ var context = event.context,
+ source = context.source,
+ target = context.target;
+
+ if (isReverse(context)) {
+ return;
+ }
+
+ var sourceMid = (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.mid)(source),
+ orientation = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.getOrientation)(sourceMid, target, -10),
+ axes = [];
+
+ if (/top|bottom/.test(orientation)) {
+ axes.push('x');
+ }
+
+ if (/left|right/.test(orientation)) {
+ axes.push('y');
+ }
+
+ axes.forEach(function(axis) {
+ var coordinate = event[ axis ], newCoordinate;
+
+ if (abs(coordinate - sourceMid[ axis ]) < BOUNDARY_TO_HOST_THRESHOLD) {
+ if (coordinate > sourceMid[ axis ]) {
+ newCoordinate = sourceMid[ axis ] + BOUNDARY_TO_HOST_THRESHOLD;
+ }
+ else {
+ newCoordinate = sourceMid[ axis ] - BOUNDARY_TO_HOST_THRESHOLD;
+ }
+
+ (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.setSnapped)(event, axis, newCoordinate);
+ }
+ });
+}
+
+/**
+ * @param {Event} event
+ * @param {Point} position
+ */
+function snapToPosition(event, position) {
+ (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.setSnapped)(event, 'x', position.x);
+ (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.setSnapped)(event, 'y', position.y);
+}
+
+function isType(attrs, type) {
+ return attrs && attrs.type === type;
+}
+
+function isAnyType(attrs, types) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.some)(types, function(type) {
+ return isType(attrs, type);
+ });
+}
+
+/**
+ * @param {Axis} axis
+ * @param {Shape} element
+ *
+ * @return {number}
+ */
+function getDimensionForAxis(axis, element) {
+ return axis === 'x' ? element.width : element.height;
+}
- var _inherits = _interopRequireDefault(require("inherits"));
+/**
+ * @param {Shape} target
+ *
+ * @return {number}
+ */
+function getTargetBoundsPadding(target) {
+ if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target, 'bpmn:Task')) {
+ return TASK_BOUNDS_PADDING;
+ } else {
+ return TARGET_BOUNDS_PADDING;
+ }
+}
+
+/**
+ * @param {Event} event
+ * @param {Shape} target
+ * @param {Axis} axis
+ *
+ * @return {boolean}
+ */
+function isMid(event, target, axis) {
+ return event[ axis ] > target[ axis ] + TARGET_CENTER_PADDING
+ && event[ axis ] < target[ axis ] + getDimensionForAxis(axis, target) - TARGET_CENTER_PADDING;
+}
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+function isReverse(context) {
+ var hover = context.hover,
+ source = context.source;
- var _ModelUtil = require("../../../util/ModelUtil");
+ return hover && source && hover === source;
+}
- var _minDash = require("min-dash");
+/***/ }),
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+/***/ "../node_modules/bpmn-js/lib/features/snapping/BpmnCreateMoveSnapping.js":
+/*!*******************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/snapping/BpmnCreateMoveSnapping.js ***!
+ \*******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- /**
- * BPMN specific boundary event behavior
- */
- function BoundaryEventBehavior(eventBus, modeling) {
- _CommandInterceptor.default.call(this, eventBus);
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BpmnCreateMoveSnapping)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_features_snapping_CreateMoveSnapping__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/snapping/CreateMoveSnapping */ "../node_modules/diagram-js/lib/features/snapping/CreateMoveSnapping.js");
+/* harmony import */ var diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/snapping/SnapUtil */ "../node_modules/diagram-js/lib/features/snapping/SnapUtil.js");
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+/* harmony import */ var _BpmnSnappingUtil__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./BpmnSnappingUtil */ "../node_modules/bpmn-js/lib/features/snapping/BpmnSnappingUtil.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
- function getBoundaryEvents(element) {
- return (0, _minDash.filter)(element.attachers, function (attacher) {
- return (0, _ModelUtil.is)(attacher, 'bpmn:BoundaryEvent');
- });
- } // remove after connecting to event-based gateway
- this.postExecute('connection.create', function (event) {
- var source = event.context.source,
- target = event.context.target,
- boundaryEvents = getBoundaryEvents(target);
- if ((0, _ModelUtil.is)(source, 'bpmn:EventBasedGateway') && (0, _ModelUtil.is)(target, 'bpmn:ReceiveTask') && boundaryEvents.length > 0) {
- modeling.removeElements(boundaryEvents);
- }
- }); // remove after replacing connected gateway with event-based gateway
- this.postExecute('connection.reconnect', function (event) {
- var oldSource = event.context.oldSource,
- newSource = event.context.newSource;
- if ((0, _ModelUtil.is)(oldSource, 'bpmn:Gateway') && (0, _ModelUtil.is)(newSource, 'bpmn:EventBasedGateway')) {
- (0, _minDash.forEach)(newSource.outgoing, function (connection) {
- var target = connection.target,
- attachedboundaryEvents = getBoundaryEvents(target);
- if ((0, _ModelUtil.is)(target, 'bpmn:ReceiveTask') && attachedboundaryEvents.length > 0) {
- modeling.removeElements(attachedboundaryEvents);
- }
- });
- }
- });
- }
- BoundaryEventBehavior.$inject = ['eventBus', 'modeling'];
- (0, _inherits.default)(BoundaryEventBehavior, _CommandInterceptor.default);
- },{"../../../util/ModelUtil":240,"diagram-js/lib/command/CommandInterceptor":250,"inherits":438,"min-dash":646}],165:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = CreateBehavior;
- var _inherits = _interopRequireDefault(require("inherits"));
- var _ModelUtil = require("../../../util/ModelUtil");
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
- var _ModelingUtil = require("../util/ModelingUtil");
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- function CreateBehavior(injector) {
- injector.invoke(_CommandInterceptor.default, this);
- this.preExecute('shape.create', 1500, function (event) {
- var context = event.context,
- parent = context.parent,
- shape = context.shape;
+/**
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('didi').Injector} Injector
+ *
+ * @typedef {import('diagram-js/lib/features/snapping/SnapContext').default} SnapContext
+ * @typedef {import('diagram-js/lib/features/snapping/SnapContext').SnapPoints} SnapPoints
+ *
+ * @typedef {import('diagram-js/lib/core/EventBus').Event} Event
+ *
+ * @typedef {import('../../model/Types').Element} Element
+ * @typedef {import('../../model/Types').Shape} Shape
+ */
- if ((0, _ModelUtil.is)(parent, 'bpmn:Lane') && !(0, _ModelUtil.is)(shape, 'bpmn:Lane')) {
- context.parent = (0, _ModelingUtil.getParent)(parent, 'bpmn:Participant');
- }
- });
- }
+var HIGH_PRIORITY = 1500;
- CreateBehavior.$inject = ['injector'];
- (0, _inherits.default)(CreateBehavior, _CommandInterceptor.default);
- },{"../../../util/ModelUtil":240,"../util/ModelingUtil":211,"diagram-js/lib/command/CommandInterceptor":250,"inherits":438}],166:[function(require,module,exports){
- "use strict";
+/**
+ * Snap during create and move.
+ *
+ * @param {EventBus} eventBus
+ * @param {Injector} injector
+ */
+function BpmnCreateMoveSnapping(eventBus, injector) {
+ injector.invoke(diagram_js_lib_features_snapping_CreateMoveSnapping__WEBPACK_IMPORTED_MODULE_0__["default"], this);
+
+ // creating first participant
+ eventBus.on([ 'create.move', 'create.end' ], HIGH_PRIORITY, setSnappedIfConstrained);
+
+ // snap boundary events
+ eventBus.on([
+ 'create.move',
+ 'create.end',
+ 'shape.move.move',
+ 'shape.move.end'
+ ], HIGH_PRIORITY, function(event) {
+ var context = event.context,
+ canExecute = context.canExecute,
+ target = context.target;
+
+ var canAttach = canExecute && (canExecute === 'attach' || canExecute.attach);
+
+ if (canAttach && !(0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.isSnapped)(event)) {
+ snapBoundaryEvent(event, target);
+ }
+ });
+}
+
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_2__["default"])(BpmnCreateMoveSnapping, diagram_js_lib_features_snapping_CreateMoveSnapping__WEBPACK_IMPORTED_MODULE_0__["default"]);
+
+BpmnCreateMoveSnapping.$inject = [
+ 'eventBus',
+ 'injector'
+];
+
+/**
+ * @param {Event} event
+ *
+ * @return {SnapContext}
+ */
+BpmnCreateMoveSnapping.prototype.initSnap = function(event) {
+ var snapContext = diagram_js_lib_features_snapping_CreateMoveSnapping__WEBPACK_IMPORTED_MODULE_0__["default"].prototype.initSnap.call(this, event);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = CreateDataObjectBehavior;
+ var shape = event.shape;
- var _inherits = _interopRequireDefault(require("inherits"));
+ var isMove = !!this._elementRegistry.get(shape.id);
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+ // snap to docking points
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(shape.outgoing, function(connection) {
+ var docking = connection.waypoints[0];
- var _ModelUtil = require("../../../util/ModelUtil");
+ docking = docking.original || docking;
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ snapContext.setSnapOrigin(connection.id + '-docking', getDockingSnapOrigin(docking, isMove, event));
+ });
- /**
- * BPMN specific create data object behavior
- */
- function CreateDataObjectBehavior(eventBus, bpmnFactory, moddle) {
- _CommandInterceptor.default.call(this, eventBus);
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(shape.incoming, function(connection) {
+ var docking = connection.waypoints[connection.waypoints.length - 1];
- this.preExecute('shape.create', function (event) {
- var context = event.context,
- shape = context.shape;
+ docking = docking.original || docking;
- if ((0, _ModelUtil.is)(shape, 'bpmn:DataObjectReference') && shape.type !== 'label') {
- // create a DataObject every time a DataObjectReference is created
- var dataObject = bpmnFactory.create('bpmn:DataObject'); // set the reference to the DataObject
+ snapContext.setSnapOrigin(connection.id + '-docking', getDockingSnapOrigin(docking, isMove, event));
+ });
- shape.businessObject.dataObjectRef = dataObject;
- }
- });
- }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(shape, 'bpmn:Participant')) {
- CreateDataObjectBehavior.$inject = ['eventBus', 'bpmnFactory', 'moddle'];
- (0, _inherits.default)(CreateDataObjectBehavior, _CommandInterceptor.default);
+ // snap to borders with higher priority
+ snapContext.setSnapLocations([ 'top-left', 'bottom-right', 'mid' ]);
+ }
- },{"../../../util/ModelUtil":240,"diagram-js/lib/command/CommandInterceptor":250,"inherits":438}],167:[function(require,module,exports){
- "use strict";
+ return snapContext;
+};
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = CreateParticipantBehavior;
- exports.PARTICIPANT_BORDER_WIDTH = void 0;
+/**
+ * @param {SnapPoints} snapPoints
+ * @param {Shape} shape
+ * @param {Shape} target
+ *
+ * @return {SnapPoints}
+ */
+BpmnCreateMoveSnapping.prototype.addSnapTargetPoints = function(snapPoints, shape, target) {
+ diagram_js_lib_features_snapping_CreateMoveSnapping__WEBPACK_IMPORTED_MODULE_0__["default"].prototype.addSnapTargetPoints.call(this, snapPoints, shape, target);
- var _inherits = _interopRequireDefault(require("inherits"));
+ var snapTargets = this.getSnapTargets(shape, target);
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(snapTargets, function(snapTarget) {
- var _ModelUtil = require("../../../util/ModelUtil");
+ // handle TRBL alignment
+ //
+ // * with container elements
+ // * with text annotations
+ if (isContainer(snapTarget) || areAll([ shape, snapTarget ], 'bpmn:TextAnnotation')) {
+ snapPoints.add('top-left', (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.topLeft)(snapTarget));
+ snapPoints.add('bottom-right', (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.bottomRight)(snapTarget));
+ }
+ });
- var _LabelUtil = require("../../../util/LabelUtil");
+ var elementRegistry = this._elementRegistry;
- var _Elements = require("diagram-js/lib/util/Elements");
+ // snap to docking points if not create mode
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(shape.incoming, function(connection) {
+ if (elementRegistry.get(shape.id)) {
- var _minDash = require("min-dash");
+ if (!includes(snapTargets, connection.source)) {
+ snapPoints.add('mid', (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.getMid)(connection.source));
+ }
- var _LayoutUtil = require("diagram-js/lib/layout/LayoutUtil");
+ var docking = connection.waypoints[0];
+ snapPoints.add(connection.id + '-docking', docking.original || docking);
+ }
+ });
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(shape.outgoing, function(connection) {
+ if (elementRegistry.get(shape.id)) {
- var HORIZONTAL_PARTICIPANT_PADDING = 20,
- VERTICAL_PARTICIPANT_PADDING = 20;
- var PARTICIPANT_BORDER_WIDTH = 30;
- exports.PARTICIPANT_BORDER_WIDTH = PARTICIPANT_BORDER_WIDTH;
- var HIGH_PRIORITY = 2000;
- /**
- * BPMN-specific behavior for creating participants.
- */
+ if (!includes(snapTargets, connection.target)) {
+ snapPoints.add('mid', (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.getMid)(connection.target));
+ }
- function CreateParticipantBehavior(canvas, eventBus, modeling) {
- _CommandInterceptor.default.call(this, eventBus); // fit participant
+ var docking = connection.waypoints[ connection.waypoints.length - 1 ];
+ snapPoints.add(connection.id + '-docking', docking.original || docking);
+ }
+ });
- eventBus.on(['create.start', 'shape.move.start'], HIGH_PRIORITY, function (event) {
- var context = event.context,
- shape = context.shape,
- rootElement = canvas.getRootElement();
+ // add sequence flow parents as snap targets
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(target, 'bpmn:SequenceFlow')) {
+ snapPoints = this.addSnapTargetPoints(snapPoints, shape, target.parent);
+ }
- if (!(0, _ModelUtil.is)(shape, 'bpmn:Participant') || !(0, _ModelUtil.is)(rootElement, 'bpmn:Process') || !rootElement.children.length) {
- return;
- } // ignore connections, groups and labels
+ return snapPoints;
+};
+/**
+ * @param {Shape} shape
+ * @param {Shape} target
+ *
+ * @return {Shape[]}
+ */
+BpmnCreateMoveSnapping.prototype.getSnapTargets = function(shape, target) {
+ return diagram_js_lib_features_snapping_CreateMoveSnapping__WEBPACK_IMPORTED_MODULE_0__["default"].prototype.getSnapTargets.call(this, shape, target)
+ .filter(function(snapTarget) {
- var children = rootElement.children.filter(function (element) {
- return !(0, _ModelUtil.is)(element, 'bpmn:Group') && !(0, _LabelUtil.isLabel)(element) && !isConnection(element);
- }); // ensure for available children to calculate bounds
+ // do not snap to lanes
+ return !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(snapTarget, 'bpmn:Lane');
+ });
+};
- if (!children.length) {
- return;
- }
+// helpers //////////
- var childrenBBox = (0, _Elements.getBBox)(children);
- var participantBounds = getParticipantBounds(shape, childrenBBox); // assign width and height
+/**
+ * @param {Shape} event
+ * @param {Shape} target
+ */
+function snapBoundaryEvent(event, target) {
+ var targetTRBL = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.asTRBL)(target);
+
+ var direction = (0,_BpmnSnappingUtil__WEBPACK_IMPORTED_MODULE_6__.getBoundaryAttachment)(event, target);
+
+ var context = event.context,
+ shape = context.shape;
+
+ var offset;
+
+ if (shape.parent) {
+ offset = { x: 0, y: 0 };
+ } else {
+ offset = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.getMid)(shape);
+ }
+
+ if (/top/.test(direction)) {
+ (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.setSnapped)(event, 'y', targetTRBL.top - offset.y);
+ } else if (/bottom/.test(direction)) {
+ (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.setSnapped)(event, 'y', targetTRBL.bottom - offset.y);
+ }
+
+ if (/left/.test(direction)) {
+ (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.setSnapped)(event, 'x', targetTRBL.left - offset.x);
+ } else if (/right/.test(direction)) {
+ (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.setSnapped)(event, 'x', targetTRBL.right - offset.x);
+ }
+}
+
+/**
+ * @param {Element[]} elements
+ * @param {string} type
+ *
+ * @return {boolean}
+ */
+function areAll(elements, type) {
+ return elements.every(function(el) {
+ return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(el, type);
+ });
+}
+
+/**
+ * @param {Element} element
+ */
+function isContainer(element) {
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:SubProcess') && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_7__.isExpanded)(element)) {
+ return true;
+ }
- (0, _minDash.assign)(shape, participantBounds); // assign create constraints
+ return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:Participant');
+}
- context.createConstraints = getParticipantCreateConstraints(shape, childrenBBox);
- }); // force hovering process when creating first participant
+/**
+ * @param {Event} event
+ */
+function setSnappedIfConstrained(event) {
+ var context = event.context,
+ createConstraints = context.createConstraints;
+
+ if (!createConstraints) {
+ return;
+ }
+
+ var top = createConstraints.top,
+ right = createConstraints.right,
+ bottom = createConstraints.bottom,
+ left = createConstraints.left;
+
+ if ((left && left >= event.x) || (right && right <= event.x)) {
+ (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.setSnapped)(event, 'x', event.x);
+ }
+
+ if ((top && top >= event.y) || (bottom && bottom <= event.y)) {
+ (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.setSnapped)(event, 'y', event.y);
+ }
+}
+
+function includes(array, value) {
+ return array.indexOf(value) !== -1;
+}
+
+function getDockingSnapOrigin(docking, isMove, event) {
+ return isMove ? (
+ {
+ x: docking.x - event.x,
+ y: docking.y - event.y
+ }
+ ) : {
+ x: docking.x,
+ y: docking.y
+ };
+}
+
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/features/snapping/BpmnSnappingUtil.js":
+/*!*************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/snapping/BpmnSnappingUtil.js ***!
+ \*************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ getBoundaryAttachment: () => (/* binding */ getBoundaryAttachment)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+
+
+/**
+ * @typedef {import('diagram-js/lib/util/Types').DirectionTRBL} DirectionTRBL
+ * @typedef {import('diagram-js/lib/util/Types').Point} Point
+ * @typedef {import('diagram-js/lib/util/Types').Rect} Rect
+ */
- eventBus.on('create.start', HIGH_PRIORITY, function (event) {
- var context = event.context,
- shape = context.shape,
- rootElement = canvas.getRootElement(),
- rootElementGfx = canvas.getGraphics(rootElement);
+/**
+ * @param {Point} position
+ * @param {Rect} targetBounds
+ *
+ * @return {DirectionTRBL|null}
+ */
+function getBoundaryAttachment(position, targetBounds) {
- function ensureHoveringProcess(event) {
- event.element = rootElement;
- event.gfx = rootElementGfx;
- }
+ var orientation = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.getOrientation)(position, targetBounds, -15);
- if ((0, _ModelUtil.is)(shape, 'bpmn:Participant') && (0, _ModelUtil.is)(rootElement, 'bpmn:Process')) {
- eventBus.on('element.hover', HIGH_PRIORITY, ensureHoveringProcess);
- eventBus.once('create.cleanup', function () {
- eventBus.off('element.hover', ensureHoveringProcess);
- });
- }
- });
+ if (orientation !== 'intersect') {
+ return orientation;
+ } else {
+ return null;
+ }
+}
- function ensureCollaboration(context) {
- var parent = context.parent,
- collaboration;
- var rootElement = canvas.getRootElement();
+/***/ }),
- if ((0, _ModelUtil.is)(rootElement, 'bpmn:Collaboration')) {
- collaboration = rootElement;
- } else {
- // update root element by making collaboration
- collaboration = modeling.makeCollaboration(); // re-use process when creating first participant
+/***/ "../node_modules/bpmn-js/lib/features/snapping/index.js":
+/*!**************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/snapping/index.js ***!
+ \**************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- context.process = parent;
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _BpmnConnectSnapping__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BpmnConnectSnapping */ "../node_modules/bpmn-js/lib/features/snapping/BpmnConnectSnapping.js");
+/* harmony import */ var _BpmnCreateMoveSnapping__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BpmnCreateMoveSnapping */ "../node_modules/bpmn-js/lib/features/snapping/BpmnCreateMoveSnapping.js");
+/* harmony import */ var diagram_js_lib_features_snapping__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/snapping */ "../node_modules/diagram-js/lib/features/snapping/index.js");
- context.parent = collaboration;
- } // turn process into collaboration before adding participant
- this.preExecute('shape.create', function (context) {
- var parent = context.parent,
- shape = context.shape;
- if ((0, _ModelUtil.is)(shape, 'bpmn:Participant') && (0, _ModelUtil.is)(parent, 'bpmn:Process')) {
- ensureCollaboration(context);
- }
- }, true);
- this.execute('shape.create', function (context) {
- var process = context.process,
- shape = context.shape;
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [ diagram_js_lib_features_snapping__WEBPACK_IMPORTED_MODULE_0__["default"] ],
+ __init__: [
+ 'connectSnapping',
+ 'createMoveSnapping'
+ ],
+ connectSnapping: [ 'type', _BpmnConnectSnapping__WEBPACK_IMPORTED_MODULE_1__["default"] ],
+ createMoveSnapping: [ 'type', _BpmnCreateMoveSnapping__WEBPACK_IMPORTED_MODULE_2__["default"] ]
+});
- if (process) {
- context.oldProcessRef = shape.businessObject.processRef; // re-use process when creating first participant
+/***/ }),
- shape.businessObject.processRef = process.businessObject;
- }
- }, true);
- this.revert('shape.create', function (context) {
- var process = context.process,
- shape = context.shape;
-
- if (process) {
- // re-use process when creating first participant
- shape.businessObject.processRef = context.oldProcessRef;
- }
- }, true);
- this.postExecute('shape.create', function (context) {
- var process = context.process,
- shape = context.shape;
-
- if (process) {
- // move children from process to participant
- var processChildren = process.children.slice();
- modeling.moveElements(processChildren, {
- x: 0,
- y: 0
- }, shape);
- }
- }, true); // turn process into collaboration when creating participants
+/***/ "../node_modules/bpmn-js/lib/features/space-tool/BpmnSpaceTool.js":
+/*!************************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/space-tool/BpmnSpaceTool.js ***!
+ \************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- this.preExecute('elements.create', HIGH_PRIORITY, function (context) {
- var elements = context.elements,
- parent = context.parent,
- participant;
- var hasParticipants = findParticipant(elements);
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BpmnSpaceTool)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var diagram_js_lib_features_space_tool_SpaceTool__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/space-tool/SpaceTool */ "../node_modules/diagram-js/lib/features/space-tool/SpaceTool.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
- if (hasParticipants && (0, _ModelUtil.is)(parent, 'bpmn:Process')) {
- ensureCollaboration(context);
- participant = findParticipant(elements);
- context.oldProcessRef = participant.businessObject.processRef; // re-use process when creating first participant
- participant.businessObject.processRef = parent.businessObject;
- }
- }, true);
- this.revert('elements.create', function (context) {
- var elements = context.elements,
- process = context.process,
- participant;
- if (process) {
- participant = findParticipant(elements); // re-use process when creating first participant
- participant.businessObject.processRef = context.oldProcessRef;
- }
- }, true);
- this.postExecute('elements.create', function (context) {
- var elements = context.elements,
- process = context.process,
- participant;
-
- if (process) {
- participant = findParticipant(elements); // move children from process to first participant
-
- var processChildren = process.children.slice();
- modeling.moveElements(processChildren, {
- x: 0,
- y: 0
- }, participant);
- }
- }, true);
- }
- CreateParticipantBehavior.$inject = ['canvas', 'eventBus', 'modeling'];
- (0, _inherits.default)(CreateParticipantBehavior, _CommandInterceptor.default); // helpers //////////
- function getParticipantBounds(shape, childrenBBox) {
- childrenBBox = {
- width: childrenBBox.width + HORIZONTAL_PARTICIPANT_PADDING * 2 + PARTICIPANT_BORDER_WIDTH,
- height: childrenBBox.height + VERTICAL_PARTICIPANT_PADDING * 2
- };
- var width = Math.max(shape.width, childrenBBox.width),
- height = Math.max(shape.height, childrenBBox.height);
- return {
- x: -width / 2,
- y: -height / 2,
- width: width,
- height: height
- };
- }
- function getParticipantCreateConstraints(shape, childrenBBox) {
- childrenBBox = (0, _LayoutUtil.asTRBL)(childrenBBox);
- return {
- bottom: childrenBBox.top + shape.height / 2 - VERTICAL_PARTICIPANT_PADDING,
- left: childrenBBox.right - shape.width / 2 + HORIZONTAL_PARTICIPANT_PADDING,
- top: childrenBBox.bottom - shape.height / 2 + VERTICAL_PARTICIPANT_PADDING,
- right: childrenBBox.left + shape.width / 2 - HORIZONTAL_PARTICIPANT_PADDING - PARTICIPANT_BORDER_WIDTH
- };
- }
- function isConnection(element) {
- return !!element.waypoints;
- }
+/**
+ * @typedef {import('didi').Injector} Injector
+ *
+ * @typedef {import('../../model/Types').Shape} Shape
+ *
+ * @typedef {import('diagram-js/lib/util/Types').Axis} Axis
+ * @typedef {import('diagram-js/lib/util/Types').Point} Point
+ */
- function findParticipant(elements) {
- return (0, _minDash.find)(elements, function (element) {
- return (0, _ModelUtil.is)(element, 'bpmn:Participant');
- });
- }
+/**
+ * @param {Injector} injector
+ */
+function BpmnSpaceTool(injector) {
+ injector.invoke(diagram_js_lib_features_space_tool_SpaceTool__WEBPACK_IMPORTED_MODULE_0__["default"], this);
+}
- },{"../../../util/LabelUtil":239,"../../../util/ModelUtil":240,"diagram-js/lib/command/CommandInterceptor":250,"diagram-js/lib/layout/LayoutUtil":405,"diagram-js/lib/util/Elements":420,"inherits":438,"min-dash":646}],168:[function(require,module,exports){
- "use strict";
+BpmnSpaceTool.$inject = [
+ 'injector'
+];
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = DataInputAssociationBehavior;
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_1__["default"])(BpmnSpaceTool, diagram_js_lib_features_space_tool_SpaceTool__WEBPACK_IMPORTED_MODULE_0__["default"]);
- var _inherits = _interopRequireDefault(require("inherits"));
+/**
+ * @param {Shape[]} elements
+ * @param {Axis} axis
+ * @param {Point} delta
+ * @param {number} start
+ *
+ * @return {Object}
+ */
+BpmnSpaceTool.prototype.calculateAdjustments = function(elements, axis, delta, start) {
+ var adjustments = diagram_js_lib_features_space_tool_SpaceTool__WEBPACK_IMPORTED_MODULE_0__["default"].prototype.calculateAdjustments.call(this, elements, axis, delta, start);
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+ // do not resize:
+ //
+ // * text annotations (horizontally/vertically)
+ // * empty horizontal pools (vertically)
+ // * empty vertical pools (horizontally)
+ adjustments.resizingShapes = adjustments.resizingShapes.filter(function(shape) {
- var _Collections = require("diagram-js/lib/util/Collections");
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:TextAnnotation')) {
+ return false;
+ }
- var _minDash = require("min-dash");
+ if (isCollapsedPool(shape)) {
+ if (axis === 'y' && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_3__.isHorizontal)(shape) || axis === 'x' && !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_3__.isHorizontal)(shape)) {
+ return false;
+ }
+ }
- var _ModelUtil = require("../../../util/ModelUtil");
+ return true;
+ });
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ return adjustments;
+};
- var TARGET_REF_PLACEHOLDER_NAME = '__targetRef_placeholder';
- /**
- * This behavior makes sure we always set a fake
- * DataInputAssociation#targetRef as demanded by the BPMN 2.0
- * XSD schema.
- *
- * The reference is set to a bpmn:Property{ name: '__targetRef_placeholder' }
- * which is created on the fly and cleaned up afterwards if not needed
- * anymore.
- *
- * @param {EventBus} eventBus
- * @param {BpmnFactory} bpmnFactory
- */
- function DataInputAssociationBehavior(eventBus, bpmnFactory) {
- _CommandInterceptor.default.call(this, eventBus);
+// helpers ///////////
- this.executed(['connection.create', 'connection.delete', 'connection.move', 'connection.reconnect'], ifDataInputAssociation(fixTargetRef));
- this.reverted(['connection.create', 'connection.delete', 'connection.move', 'connection.reconnect'], ifDataInputAssociation(fixTargetRef));
+function isCollapsedPool(shape) {
+ return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:Participant') && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(shape).processRef;
+}
- function usesTargetRef(element, targetRef, removedConnection) {
- var inputAssociations = element.get('dataInputAssociations');
- return (0, _minDash.find)(inputAssociations, function (association) {
- return association !== removedConnection && association.targetRef === targetRef;
- });
- }
+/***/ }),
- function getTargetRef(element, create) {
- var properties = element.get('properties');
- var targetRefProp = (0, _minDash.find)(properties, function (p) {
- return p.name === TARGET_REF_PLACEHOLDER_NAME;
- });
+/***/ "../node_modules/bpmn-js/lib/features/space-tool/index.js":
+/*!****************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/features/space-tool/index.js ***!
+ \****************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- if (!targetRefProp && create) {
- targetRefProp = bpmnFactory.create('bpmn:Property', {
- name: TARGET_REF_PLACEHOLDER_NAME
- });
- (0, _Collections.add)(properties, targetRefProp);
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_features_space_tool__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/space-tool */ "../node_modules/diagram-js/lib/features/space-tool/index.js");
+/* harmony import */ var _BpmnSpaceTool__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BpmnSpaceTool */ "../node_modules/bpmn-js/lib/features/space-tool/BpmnSpaceTool.js");
- return targetRefProp;
- }
- function cleanupTargetRef(element, connection) {
- var targetRefProp = getTargetRef(element);
- if (!targetRefProp) {
- return;
- }
- if (!usesTargetRef(element, targetRefProp, connection)) {
- (0, _Collections.remove)(element.get('properties'), targetRefProp);
- }
- }
- /**
- * Make sure targetRef is set to a valid property or
- * `null` if the connection is detached.
- *
- * @param {Event} event
- */
-
-
- function fixTargetRef(event) {
- var context = event.context,
- connection = context.connection,
- connectionBo = connection.businessObject,
- target = connection.target,
- targetBo = target && target.businessObject,
- newTarget = context.newTarget,
- newTargetBo = newTarget && newTarget.businessObject,
- oldTarget = context.oldTarget || context.target,
- oldTargetBo = oldTarget && oldTarget.businessObject;
- var dataAssociation = connection.businessObject,
- targetRefProp;
-
- if (oldTargetBo && oldTargetBo !== targetBo) {
- cleanupTargetRef(oldTargetBo, connectionBo);
- }
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [ diagram_js_lib_features_space_tool__WEBPACK_IMPORTED_MODULE_0__["default"] ],
+ spaceTool: [ 'type', _BpmnSpaceTool__WEBPACK_IMPORTED_MODULE_1__["default"] ]
+});
- if (newTargetBo && newTargetBo !== targetBo) {
- cleanupTargetRef(newTargetBo, connectionBo);
- }
+/***/ }),
- if (targetBo) {
- targetRefProp = getTargetRef(targetBo, true);
- dataAssociation.targetRef = targetRefProp;
- } else {
- dataAssociation.targetRef = null;
- }
- }
- }
+/***/ "../node_modules/bpmn-js/lib/import/BpmnImporter.js":
+/*!**********************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/import/BpmnImporter.js ***!
+ \**********************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- DataInputAssociationBehavior.$inject = ['eventBus', 'bpmnFactory'];
- (0, _inherits.default)(DataInputAssociationBehavior, _CommandInterceptor.default);
- /**
- * Only call the given function when the event
- * touches a bpmn:DataInputAssociation.
- *
- * @param {Function} fn
- * @return {Function}
- */
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BpmnImporter)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/LabelUtil */ "../node_modules/bpmn-js/lib/util/LabelUtil.js");
+/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/DiUtil */ "../node_modules/bpmn-js/lib/util/DiUtil.js");
+/* harmony import */ var _Util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Util */ "../node_modules/bpmn-js/lib/import/Util.js");
- function ifDataInputAssociation(fn) {
- return function (event) {
- var context = event.context,
- connection = context.connection;
- if ((0, _ModelUtil.is)(connection, 'bpmn:DataInputAssociation')) {
- return fn(event);
- }
- };
- }
- },{"../../../util/ModelUtil":240,"diagram-js/lib/command/CommandInterceptor":250,"diagram-js/lib/util/Collections":418,"inherits":438,"min-dash":646}],169:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = DataStoreBehavior;
- var _inherits = _interopRequireDefault(require("inherits"));
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
- var _ModelUtil = require("../../../util/ModelUtil");
- var _ModelingUtil = require("../util/ModelingUtil");
- var _UpdateSemanticParentHandler = _interopRequireDefault(require("../cmd/UpdateSemanticParentHandler"));
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- /**
- * BPMN specific data store behavior
- */
- function DataStoreBehavior(canvas, commandStack, elementRegistry, eventBus) {
- _CommandInterceptor.default.call(this, eventBus);
- commandStack.registerHandler('dataStore.updateContainment', _UpdateSemanticParentHandler.default);
+/**
+ * @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
+ * @typedef {import('diagram-js/lib/core/ElementRegistry').default} ElementRegistry
+ * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
+ * @typedef {import('diagram-js/lib/i18n/translate/translate').default} Translate
+ *
+ * @typedef {import('../features/modeling/ElementFactory').default} ElementFactory
+ * @typedef {import('../draw/TextRenderer').default} TextRenderer
+ *
+ * @typedef {import('../model/Types').Element} Element
+ * @typedef {import('../model/Types').Label} Label
+ * @typedef {import('../model/Types').Shape} Shape
+ * @typedef {import('../model/Types').Connection} Connection
+ * @typedef {import('../model/Types').Root} Root
+ * @typedef {import('../model/Types').ModdleElement} ModdleElement
+ */
- function getFirstParticipant() {
- return elementRegistry.filter(function (element) {
- return (0, _ModelUtil.is)(element, 'bpmn:Participant');
- })[0];
- }
+/**
+ * @param {ModdleElement} semantic
+ * @param {ModdleElement} di
+ * @param {Object} [attrs=null]
+ *
+ * @return {Object}
+ */
+function elementData(semantic, di, attrs) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({
+ id: semantic.id,
+ type: semantic.$type,
+ businessObject: semantic,
+ di: di
+ }, attrs);
+}
+
+function getWaypoints(di, source, target) {
+
+ var waypoints = di.waypoint;
+
+ if (!waypoints || waypoints.length < 2) {
+ return [ (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(source), (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(target) ];
+ }
+
+ return waypoints.map(function(p) {
+ return { x: p.x, y: p.y };
+ });
+}
+
+function notYetDrawn(translate, semantic, refSemantic, property) {
+ return new Error(translate('element {element} referenced by {referenced}#{property} not yet drawn', {
+ element: (0,_Util__WEBPACK_IMPORTED_MODULE_2__.elementToString)(refSemantic),
+ referenced: (0,_Util__WEBPACK_IMPORTED_MODULE_2__.elementToString)(semantic),
+ property: property
+ }));
+}
+
+
+/**
+ * An importer that adds bpmn elements to the canvas
+ *
+ * @param {EventBus} eventBus
+ * @param {Canvas} canvas
+ * @param {ElementFactory} elementFactory
+ * @param {ElementRegistry} elementRegistry
+ * @param {Function} translate
+ * @param {TextRenderer} textRenderer
+ */
+function BpmnImporter(
+ eventBus, canvas, elementFactory,
+ elementRegistry, translate, textRenderer) {
+
+ this._eventBus = eventBus;
+ this._canvas = canvas;
+ this._elementFactory = elementFactory;
+ this._elementRegistry = elementRegistry;
+ this._translate = translate;
+ this._textRenderer = textRenderer;
+}
+
+BpmnImporter.$inject = [
+ 'eventBus',
+ 'canvas',
+ 'elementFactory',
+ 'elementRegistry',
+ 'translate',
+ 'textRenderer'
+];
+
+
+/**
+ * Add a BPMN element (semantic) to the canvas making it a child of the
+ * given parent.
+ *
+ * @param {ModdleElement} semantic
+ * @param {ModdleElement} di
+ * @param {Shape} parentElement
+ *
+ * @return {Shape | Root | Connection}
+ */
+BpmnImporter.prototype.add = function(semantic, di, parentElement) {
+ var element,
+ translate = this._translate,
+ hidden;
- function getDataStores(element) {
- return element.children.filter(function (child) {
- return (0, _ModelUtil.is)(child, 'bpmn:DataStoreReference') && !child.labelTarget;
- });
- }
+ var parentIndex;
- function updateDataStoreParent(dataStore, newDataStoreParent) {
- var dataStoreBo = dataStore.businessObject || dataStore;
- newDataStoreParent = newDataStoreParent || getFirstParticipant();
+ // ROOT ELEMENT
+ // handle the special case that we deal with a
+ // invisible root element (process, subprocess or collaboration)
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(di, 'bpmndi:BPMNPlane')) {
- if (newDataStoreParent) {
- var newDataStoreParentBo = newDataStoreParent.businessObject || newDataStoreParent;
- commandStack.execute('dataStore.updateContainment', {
- dataStoreBo: dataStoreBo,
- newSemanticParent: newDataStoreParentBo.processRef || newDataStoreParentBo,
- newDiParent: newDataStoreParentBo.di
- });
- }
- } // disable auto-resize for data stores
+ var attrs = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(semantic, 'bpmn:SubProcess')
+ ? { id: semantic.id + '_plane' }
+ : {};
+ // add a virtual element (not being drawn)
+ element = this._elementFactory.createRoot(elementData(semantic, di, attrs));
- this.preExecute('shape.create', function (event) {
- var context = event.context,
- shape = context.shape;
+ this._canvas.addRootElement(element);
+ }
- if ((0, _ModelUtil.is)(shape, 'bpmn:DataStoreReference') && shape.type !== 'label') {
- if (!context.hints) {
- context.hints = {};
- } // prevent auto resizing
+ // SHAPE
+ else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(di, 'bpmndi:BPMNShape')) {
+ var collapsed = !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isExpanded)(semantic, di),
+ isFrame = isFrameElement(semantic);
- context.hints.autoResize = false;
- }
- }); // disable auto-resize for data stores
+ hidden = parentElement && (parentElement.hidden || parentElement.collapsed);
- this.preExecute('elements.move', function (event) {
- var context = event.context,
- shapes = context.shapes;
- var dataStoreReferences = shapes.filter(function (shape) {
- return (0, _ModelUtil.is)(shape, 'bpmn:DataStoreReference');
- });
+ var bounds = di.bounds;
- if (dataStoreReferences.length) {
- if (!context.hints) {
- context.hints = {};
- } // prevent auto resizing for data store references
+ element = this._elementFactory.createShape(elementData(semantic, di, {
+ collapsed: collapsed,
+ hidden: hidden,
+ x: Math.round(bounds.x),
+ y: Math.round(bounds.y),
+ width: Math.round(bounds.width),
+ height: Math.round(bounds.height),
+ isFrame: isFrame
+ }));
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(semantic, 'bpmn:BoundaryEvent')) {
+ this._attachBoundary(semantic, element);
+ }
- context.hints.autoResize = shapes.filter(function (shape) {
- return !(0, _ModelUtil.is)(shape, 'bpmn:DataStoreReference');
- });
- }
- }); // update parent on data store created
+ // insert lanes behind other flow nodes (cf. #727)
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(semantic, 'bpmn:Lane')) {
+ parentIndex = 0;
+ }
- this.postExecute('shape.create', function (event) {
- var context = event.context,
- shape = context.shape,
- parent = shape.parent;
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(semantic, 'bpmn:DataStoreReference')) {
- if ((0, _ModelUtil.is)(shape, 'bpmn:DataStoreReference') && shape.type !== 'label' && (0, _ModelUtil.is)(parent, 'bpmn:Collaboration')) {
- updateDataStoreParent(shape);
- }
- }); // update parent on data store moved
+ // check whether data store is inside our outside of its semantic parent
+ if (!isPointInsideBBox(parentElement, (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(bounds))) {
+ parentElement = this._canvas.findRoot(parentElement);
+ }
+ }
- this.postExecute('shape.move', function (event) {
- var context = event.context,
- shape = context.shape,
- oldParent = context.oldParent,
- parent = shape.parent;
+ this._canvas.addShape(element, parentElement, parentIndex);
+ }
- if ((0, _ModelUtil.is)(oldParent, 'bpmn:Collaboration')) {
- // do nothing if not necessary
- return;
- }
+ // CONNECTION
+ else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(di, 'bpmndi:BPMNEdge')) {
- if ((0, _ModelUtil.is)(shape, 'bpmn:DataStoreReference') && shape.type !== 'label' && (0, _ModelUtil.is)(parent, 'bpmn:Collaboration')) {
- var participant = (0, _ModelUtil.is)(oldParent, 'bpmn:Participant') ? oldParent : getAncestor(oldParent, 'bpmn:Participant');
- updateDataStoreParent(shape, participant);
- }
- }); // update data store parents on participant or subprocess deleted
-
- this.postExecute('shape.delete', function (event) {
- var context = event.context,
- shape = context.shape,
- rootElement = canvas.getRootElement();
-
- if ((0, _ModelingUtil.isAny)(shape, ['bpmn:Participant', 'bpmn:SubProcess']) && (0, _ModelUtil.is)(rootElement, 'bpmn:Collaboration')) {
- getDataStores(rootElement).filter(function (dataStore) {
- return isDescendant(dataStore, shape);
- }).forEach(function (dataStore) {
- updateDataStoreParent(dataStore);
- });
- }
- }); // update data store parents on collaboration -> process
-
- this.postExecute('canvas.updateRoot', function (event) {
- var context = event.context,
- oldRoot = context.oldRoot,
- newRoot = context.newRoot;
- var dataStores = getDataStores(oldRoot);
- dataStores.forEach(function (dataStore) {
- if ((0, _ModelUtil.is)(newRoot, 'bpmn:Process')) {
- updateDataStoreParent(dataStore, newRoot);
- }
- });
- });
- }
+ var source = this._getSource(semantic),
+ target = this._getTarget(semantic);
- DataStoreBehavior.$inject = ['canvas', 'commandStack', 'elementRegistry', 'eventBus'];
- (0, _inherits.default)(DataStoreBehavior, _CommandInterceptor.default); // helpers //////////
+ hidden = parentElement && (parentElement.hidden || parentElement.collapsed);
- function isDescendant(descendant, ancestor) {
- var descendantBo = descendant.businessObject || descendant,
- ancestorBo = ancestor.businessObject || ancestor;
+ element = this._elementFactory.createConnection(elementData(semantic, di, {
+ hidden: hidden,
+ source: source,
+ target: target,
+ waypoints: getWaypoints(di, source, target)
+ }));
- while (descendantBo.$parent) {
- if (descendantBo.$parent === ancestorBo.processRef || ancestorBo) {
- return true;
- }
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(semantic, 'bpmn:DataAssociation')) {
- descendantBo = descendantBo.$parent;
- }
+ // render always on top; this ensures DataAssociations
+ // are rendered correctly across different "hacks" people
+ // love to model such as cross participant / sub process
+ // associations
+ parentElement = this._canvas.findRoot(parentElement);
+ }
- return false;
- }
+ this._canvas.addConnection(element, parentElement, parentIndex);
+ } else {
+ throw new Error(translate('unknown di {di} for element {semantic}', {
+ di: (0,_Util__WEBPACK_IMPORTED_MODULE_2__.elementToString)(di),
+ semantic: (0,_Util__WEBPACK_IMPORTED_MODULE_2__.elementToString)(semantic)
+ }));
+ }
- function getAncestor(element, type) {
- while (element.parent) {
- if ((0, _ModelUtil.is)(element.parent, type)) {
- return element.parent;
- }
+ // (optional) LABEL
+ if ((0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_5__.isLabelExternal)(semantic) && (0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_5__.getLabel)(element)) {
+ this.addLabel(semantic, di, element);
+ }
- element = element.parent;
- }
- }
- },{"../../../util/ModelUtil":240,"../cmd/UpdateSemanticParentHandler":208,"../util/ModelingUtil":211,"diagram-js/lib/command/CommandInterceptor":250,"inherits":438}],170:[function(require,module,exports){
- "use strict";
+ this._eventBus.fire('bpmnElement.added', { element: element });
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = DeleteLaneBehavior;
+ return element;
+};
- var _inherits = _interopRequireDefault(require("inherits"));
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+/**
+ * Attach a boundary element to the given host.
+ *
+ * @param {ModdleElement} boundarySemantic
+ * @param {Shape} boundaryElement
+ */
+BpmnImporter.prototype._attachBoundary = function(boundarySemantic, boundaryElement) {
+ var translate = this._translate;
+ var hostSemantic = boundarySemantic.attachedToRef;
- var _ModelUtil = require("../../../util/ModelUtil");
+ if (!hostSemantic) {
+ throw new Error(translate('missing {semantic}#attachedToRef', {
+ semantic: (0,_Util__WEBPACK_IMPORTED_MODULE_2__.elementToString)(boundarySemantic)
+ }));
+ }
- var _LaneUtil = require("../util/LaneUtil");
+ var host = this._elementRegistry.get(hostSemantic.id),
+ attachers = host && host.attachers;
- var _Elements = require("diagram-js/lib/util/Elements");
+ if (!host) {
+ throw notYetDrawn(translate, boundarySemantic, hostSemantic, 'attachedToRef');
+ }
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ // wire element.host <> host.attachers
+ boundaryElement.host = host;
- var LOW_PRIORITY = 500;
- /**
- * BPMN specific delete lane behavior
- */
+ if (!attachers) {
+ host.attachers = attachers = [];
+ }
- function DeleteLaneBehavior(eventBus, modeling, spaceTool) {
- _CommandInterceptor.default.call(this, eventBus);
-
- function compensateLaneDelete(shape, oldParent) {
- var siblings = (0, _LaneUtil.getChildLanes)(oldParent);
- var topAffected = [];
- var bottomAffected = [];
- (0, _Elements.eachElement)(siblings, function (element) {
- if (element.y > shape.y) {
- bottomAffected.push(element);
- } else {
- topAffected.push(element);
- }
+ if (attachers.indexOf(boundaryElement) === -1) {
+ attachers.push(boundaryElement);
+ }
+};
- return element.children;
- });
- if (!siblings.length) {
- return;
- }
+/**
+ * Add a label to a given element.
+ *
+ * @param {ModdleElement} semantic
+ * @param {ModdleElement} di
+ * @param {Element} element
+ *
+ * @return {Label}
+ */
+BpmnImporter.prototype.addLabel = function(semantic, di, element) {
+ var bounds,
+ text,
+ label;
- var offset;
+ bounds = (0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_5__.getExternalLabelBounds)(di, element);
- if (bottomAffected.length && topAffected.length) {
- offset = shape.height / 2;
- } else {
- offset = shape.height;
- }
+ text = (0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_5__.getLabel)(element);
- var topAdjustments, bottomAdjustments;
+ if (text) {
- if (topAffected.length) {
- topAdjustments = spaceTool.calculateAdjustments(topAffected, 'y', offset, shape.y - 10);
- spaceTool.makeSpace(topAdjustments.movingShapes, topAdjustments.resizingShapes, {
- x: 0,
- y: offset
- }, 's');
- }
+ // get corrected bounds from actual layouted text
+ bounds = this._textRenderer.getExternalLabelBounds(bounds, text);
+ }
- if (bottomAffected.length) {
- bottomAdjustments = spaceTool.calculateAdjustments(bottomAffected, 'y', -offset, shape.y + shape.height + 10);
- spaceTool.makeSpace(bottomAdjustments.movingShapes, bottomAdjustments.resizingShapes, {
- x: 0,
- y: -offset
- }, 'n');
- }
- }
- /**
- * Adjust sizes of other lanes after lane deletion
- */
+ label = this._elementFactory.createLabel(elementData(semantic, di, {
+ id: semantic.id + '_label',
+ labelTarget: element,
+ type: 'label',
+ hidden: element.hidden || !(0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_5__.getLabel)(element),
+ x: Math.round(bounds.x),
+ y: Math.round(bounds.y),
+ width: Math.round(bounds.width),
+ height: Math.round(bounds.height)
+ }));
+ return this._canvas.addShape(label, element.parent);
+};
- this.postExecuted('shape.delete', LOW_PRIORITY, function (event) {
- var context = event.context,
- hints = context.hints,
- shape = context.shape,
- oldParent = context.oldParent; // only compensate lane deletes
+/**
+ * Get the source or target of the given connection.
+ *
+ * @param {ModdleElement} semantic
+ * @param {'source' | 'target'} side
+ *
+ * @return {Element}
+ */
+BpmnImporter.prototype._getConnectedElement = function(semantic, side) {
- if (!(0, _ModelUtil.is)(shape, 'bpmn:Lane')) {
- return;
- } // compensate root deletes only
+ var element,
+ refSemantic,
+ type = semantic.$type,
+ translate = this._translate;
+ refSemantic = semantic[side + 'Ref'];
- if (hints && hints.nested) {
- return;
- }
+ // handle mysterious isMany DataAssociation#sourceRef
+ if (side === 'source' && type === 'bpmn:DataInputAssociation') {
+ refSemantic = refSemantic && refSemantic[0];
+ }
- compensateLaneDelete(shape, oldParent);
- });
- }
+ // fix source / target for DataInputAssociation / DataOutputAssociation
+ if (side === 'source' && type === 'bpmn:DataOutputAssociation' ||
+ side === 'target' && type === 'bpmn:DataInputAssociation') {
- DeleteLaneBehavior.$inject = ['eventBus', 'modeling', 'spaceTool'];
- (0, _inherits.default)(DeleteLaneBehavior, _CommandInterceptor.default);
+ refSemantic = semantic.$parent;
+ }
- },{"../../../util/ModelUtil":240,"../util/LaneUtil":210,"diagram-js/lib/command/CommandInterceptor":250,"diagram-js/lib/util/Elements":420,"inherits":438}],171:[function(require,module,exports){
- "use strict";
+ element = refSemantic && this._getElement(refSemantic);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = DetachEventBehavior;
+ if (element) {
+ return element;
+ }
- var _inherits = _interopRequireDefault(require("inherits"));
+ if (refSemantic) {
+ throw notYetDrawn(translate, semantic, refSemantic, side + 'Ref');
+ } else {
+ throw new Error(translate('{semantic}#{side} Ref not specified', {
+ semantic: (0,_Util__WEBPACK_IMPORTED_MODULE_2__.elementToString)(semantic),
+ side: side
+ }));
+ }
+};
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+BpmnImporter.prototype._getSource = function(semantic) {
+ return this._getConnectedElement(semantic, 'source');
+};
- var _ModelUtil = require("../../../util/ModelUtil");
+BpmnImporter.prototype._getTarget = function(semantic) {
+ return this._getConnectedElement(semantic, 'target');
+};
- var _LabelUtil = require("../../../util/LabelUtil");
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+BpmnImporter.prototype._getElement = function(semantic) {
+ return this._elementRegistry.get(semantic.id);
+};
- var LOW_PRIORITY = 500;
- /**
- * Replace boundary event with intermediate event when creating or moving results in detached event.
- */
- function DetachEventBehavior(bpmnReplace, injector) {
- injector.invoke(_CommandInterceptor.default, this);
- this._bpmnReplace = bpmnReplace;
- var self = this;
- this.postExecuted('elements.create', LOW_PRIORITY, function (context) {
- var elements = context.elements;
- elements.filter(function (shape) {
- var host = shape.host;
- return shouldReplace(shape, host);
- }).map(function (shape) {
- return elements.indexOf(shape);
- }).forEach(function (index) {
- context.elements[index] = self.replaceShape(elements[index]);
- });
- }, true);
- this.preExecute('elements.move', LOW_PRIORITY, function (context) {
- var shapes = context.shapes,
- newHost = context.newHost;
- shapes.forEach(function (shape, index) {
- var host = shape.host;
-
- if (shouldReplace(shape, includes(shapes, host) ? host : newHost)) {
- shapes[index] = self.replaceShape(shape);
- }
- });
- }, true);
- }
+// helpers ////////////////////
- DetachEventBehavior.$inject = ['bpmnReplace', 'injector'];
- (0, _inherits.default)(DetachEventBehavior, _CommandInterceptor.default);
+function isPointInsideBBox(bbox, point) {
+ var x = point.x,
+ y = point.y;
- DetachEventBehavior.prototype.replaceShape = function (shape) {
- var eventDefinition = getEventDefinition(shape),
- intermediateEvent;
+ return x >= bbox.x &&
+ x <= bbox.x + bbox.width &&
+ y >= bbox.y &&
+ y <= bbox.y + bbox.height;
+}
- if (eventDefinition) {
- intermediateEvent = {
- type: 'bpmn:IntermediateCatchEvent',
- eventDefinitionType: eventDefinition.$type
- };
- } else {
- intermediateEvent = {
- type: 'bpmn:IntermediateThrowEvent'
- };
- }
+function isFrameElement(semantic) {
+ return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(semantic, 'bpmn:Group');
+}
- return this._bpmnReplace.replaceElement(shape, intermediateEvent, {
- layoutConnection: false
- });
- }; // helpers //////////
+/***/ }),
- function getEventDefinition(element) {
- var businessObject = (0, _ModelUtil.getBusinessObject)(element),
- eventDefinitions = businessObject.eventDefinitions;
- return eventDefinitions && eventDefinitions[0];
- }
+/***/ "../node_modules/bpmn-js/lib/import/BpmnTreeWalker.js":
+/*!************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/import/BpmnTreeWalker.js ***!
+ \************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- function shouldReplace(shape, host) {
- return !(0, _LabelUtil.isLabel)(shape) && (0, _ModelUtil.is)(shape, 'bpmn:BoundaryEvent') && !host;
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BpmnTreeWalker)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _Util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Util */ "../node_modules/bpmn-js/lib/import/Util.js");
+/* harmony import */ var _util_CompatibilityUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/CompatibilityUtil */ "../node_modules/bpmn-js/lib/util/CompatibilityUtil.js");
- function includes(array, item) {
- return array.indexOf(item) !== -1;
- }
- },{"../../../util/LabelUtil":239,"../../../util/ModelUtil":240,"diagram-js/lib/command/CommandInterceptor":250,"inherits":438}],172:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = DropOnFlowBehavior;
- var _inherits = _interopRequireDefault(require("inherits"));
- var _minDash = require("min-dash");
- var _LayoutUtil = require("diagram-js/lib/layout/LayoutUtil");
+/**
+ * @typedef {import('diagram-js/lib/i18n/translate/translate').default} Translate
+ *
+ * @typedef {import('../model/Types').ModdleElement} ModdleElement
+ */
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+/**
+ * Returns true if an element is of the given meta-model type.
+ *
+ * @param {ModdleElement} element
+ * @param {string} type
+ *
+ * @return {boolean}
+ */
+function is(element, type) {
+ return element.$instanceOf(type);
+}
- var _LineIntersection = require("diagram-js/lib/util/LineIntersection");
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+/**
+ * Find a suitable display candidate for definitions where the DI does not
+ * correctly specify one.
+ *
+ * @param {ModdleElement} definitions
+ *
+ * @return {ModdleElement}
+ */
+function findDisplayCandidate(definitions) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(definitions.rootElements, function(e) {
+ return is(e, 'bpmn:Process') || is(e, 'bpmn:Collaboration');
+ });
+}
+
+/**
+ * @param {Record<'element' | 'root' | 'error', Function>} handler
+ * @param {Translate} translate
+ */
+function BpmnTreeWalker(handler, translate) {
- function DropOnFlowBehavior(eventBus, bpmnRules, modeling) {
- _CommandInterceptor.default.call(this, eventBus);
- /**
- * Reconnect start / end of a connection after
- * dropping an element on a flow.
- */
+ // list of containers already walked
+ var handledElements = {};
+ // list of elements to handle deferred to ensure
+ // prerequisites are drawn
+ var deferred = [];
- function insertShape(shape, targetFlow, positionOrBounds) {
- var waypoints = targetFlow.waypoints,
- waypointsBefore,
- waypointsAfter,
- dockingPoint,
- source,
- target,
- incomingConnection,
- outgoingConnection,
- oldOutgoing = shape.outgoing.slice(),
- oldIncoming = shape.incoming.slice();
- var mid;
+ var diMap = {};
- if ((0, _minDash.isNumber)(positionOrBounds.width)) {
- mid = (0, _LayoutUtil.getMid)(positionOrBounds);
- } else {
- mid = positionOrBounds;
- }
+ // Helpers //////////////////////
- var intersection = (0, _LineIntersection.getApproxIntersection)(waypoints, mid);
+ function contextual(fn, ctx) {
+ return function(e) {
+ fn(e, ctx);
+ };
+ }
- if (intersection) {
- waypointsBefore = waypoints.slice(0, intersection.index);
- waypointsAfter = waypoints.slice(intersection.index + (intersection.bendpoint ? 1 : 0)); // due to inaccuracy intersection might have been found
+ function handled(element) {
+ handledElements[element.id] = element;
+ }
- if (!waypointsBefore.length || !waypointsAfter.length) {
- return;
- }
+ function isHandled(element) {
+ return handledElements[element.id];
+ }
- dockingPoint = intersection.bendpoint ? waypoints[intersection.index] : mid; // if last waypointBefore is inside shape's bounds, ignore docking point
+ function visit(element, ctx) {
- if (!isPointInsideBBox(shape, waypointsBefore[waypointsBefore.length - 1])) {
- waypointsBefore.push(copy(dockingPoint));
- } // if first waypointAfter is inside shape's bounds, ignore docking point
+ var gfx = element.gfx;
+ // avoid multiple rendering of elements
+ if (gfx) {
+ throw new Error(
+ translate('already rendered {element}', { element: (0,_Util__WEBPACK_IMPORTED_MODULE_1__.elementToString)(element) })
+ );
+ }
- if (!isPointInsideBBox(shape, waypointsAfter[0])) {
- waypointsAfter.unshift(copy(dockingPoint));
- }
- }
+ // call handler
+ return handler.element(element, diMap[element.id], ctx);
+ }
- source = targetFlow.source;
- target = targetFlow.target;
+ function visitRoot(element, diagram) {
+ return handler.root(element, diMap[element.id], diagram);
+ }
- if (bpmnRules.canConnect(source, shape, targetFlow)) {
- // reconnect source -> inserted shape
- modeling.reconnectEnd(targetFlow, shape, waypointsBefore || mid);
- incomingConnection = targetFlow;
- }
+ function visitIfDi(element, ctx) {
- if (bpmnRules.canConnect(shape, target, targetFlow)) {
- if (!incomingConnection) {
- // reconnect inserted shape -> end
- modeling.reconnectStart(targetFlow, shape, waypointsAfter || mid);
- outgoingConnection = targetFlow;
- } else {
- outgoingConnection = modeling.connect(shape, target, {
- type: targetFlow.type,
- waypoints: waypointsAfter
- });
- }
- }
+ try {
+ var gfx = diMap[element.id] && visit(element, ctx);
- var duplicateConnections = [].concat(incomingConnection && (0, _minDash.filter)(oldIncoming, function (connection) {
- return connection.source === incomingConnection.source;
- }) || [], outgoingConnection && (0, _minDash.filter)(oldOutgoing, function (connection) {
- return connection.target === outgoingConnection.target;
- }) || []);
+ handled(element);
- if (duplicateConnections.length) {
- modeling.removeElements(duplicateConnections);
- }
- }
+ return gfx;
+ } catch (e) {
+ logError(e.message, { element: element, error: e });
- this.preExecute('elements.move', function (context) {
- var newParent = context.newParent,
- shapes = context.shapes,
- delta = context.delta,
- shape = shapes[0];
+ console.error(translate('failed to import {element}', { element: (0,_Util__WEBPACK_IMPORTED_MODULE_1__.elementToString)(element) }));
+ console.error(e);
+ }
+ }
- if (!shape || !newParent) {
- return;
- } // if the new parent is a connection,
- // change it to the new parent's parent
+ function logError(message, context) {
+ handler.error(message, context);
+ }
+ // DI handling //////////////////////
- if (newParent && newParent.waypoints) {
- context.newParent = newParent = newParent.parent;
- }
+ var registerDi = this.registerDi = function registerDi(di) {
+ var bpmnElement = di.bpmnElement;
- var shapeMid = (0, _LayoutUtil.getMid)(shape);
- var newShapeMid = {
- x: shapeMid.x + delta.x,
- y: shapeMid.y + delta.y
- }; // find a connection which intersects with the
- // element's mid point
+ if (bpmnElement) {
+ if (diMap[bpmnElement.id]) {
+ logError(
+ translate('multiple DI elements defined for {element}', {
+ element: (0,_Util__WEBPACK_IMPORTED_MODULE_1__.elementToString)(bpmnElement)
+ }),
+ { element: bpmnElement }
+ );
+ } else {
+ diMap[bpmnElement.id] = di;
- var connection = (0, _minDash.find)(newParent.children, function (element) {
- var canInsert = bpmnRules.canInsert(shapes, element);
- return canInsert && (0, _LineIntersection.getApproxIntersection)(element.waypoints, newShapeMid);
- });
+ (0,_util_CompatibilityUtil__WEBPACK_IMPORTED_MODULE_2__.ensureCompatDiRef)(bpmnElement);
+ }
+ } else {
+ logError(
+ translate('no bpmnElement referenced in {element}', {
+ element: (0,_Util__WEBPACK_IMPORTED_MODULE_1__.elementToString)(di)
+ }),
+ { element: di }
+ );
+ }
+ };
- if (connection) {
- context.targetFlow = connection;
- context.position = newShapeMid;
- }
- }, true);
- this.postExecuted('elements.move', function (context) {
- var shapes = context.shapes,
- targetFlow = context.targetFlow,
- position = context.position;
-
- if (targetFlow) {
- insertShape(shapes[0], targetFlow, position);
- }
- }, true);
- this.preExecute('shape.create', function (context) {
- var parent = context.parent,
- shape = context.shape;
-
- if (bpmnRules.canInsert(shape, parent)) {
- context.targetFlow = parent;
- context.parent = parent.parent;
- }
- }, true);
- this.postExecuted('shape.create', function (context) {
- var shape = context.shape,
- targetFlow = context.targetFlow,
- positionOrBounds = context.position;
-
- if (targetFlow) {
- insertShape(shape, targetFlow, positionOrBounds);
- }
- }, true);
- }
+ function handleDiagram(diagram) {
+ handlePlane(diagram.plane);
+ }
- (0, _inherits.default)(DropOnFlowBehavior, _CommandInterceptor.default);
- DropOnFlowBehavior.$inject = ['eventBus', 'bpmnRules', 'modeling']; // helpers /////////////////////
+ function handlePlane(plane) {
+ registerDi(plane);
- function isPointInsideBBox(bbox, point) {
- var x = point.x,
- y = point.y;
- return x >= bbox.x && x <= bbox.x + bbox.width && y >= bbox.y && y <= bbox.y + bbox.height;
- }
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(plane.planeElement, handlePlaneElement);
+ }
- function copy(obj) {
- return (0, _minDash.assign)({}, obj);
- }
+ function handlePlaneElement(planeElement) {
+ registerDi(planeElement);
+ }
- },{"diagram-js/lib/command/CommandInterceptor":250,"diagram-js/lib/layout/LayoutUtil":405,"diagram-js/lib/util/LineIntersection":426,"inherits":438,"min-dash":646}],173:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = EventBasedGatewayBehavior;
+ // Semantic handling //////////////////////
- var _inherits = _interopRequireDefault(require("inherits"));
+ /**
+ * Handle definitions and return the rendered diagram (if any).
+ *
+ * @param {ModdleElement} definitions to walk and import
+ * @param {ModdleElement} [diagram] specific diagram to import and display
+ *
+ * @throws {Error} if no diagram to display could be found
+ */
+ this.handleDefinitions = function handleDefinitions(definitions, diagram) {
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+ // make sure we walk the correct bpmnElement
- var _ModelUtil = require("../../../util/ModelUtil");
+ var diagrams = definitions.diagrams;
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ if (diagram && diagrams.indexOf(diagram) === -1) {
+ throw new Error(translate('diagram not part of bpmn:Definitions'));
+ }
- function EventBasedGatewayBehavior(eventBus, modeling) {
- _CommandInterceptor.default.call(this, eventBus);
- /**
- * Remove existing sequence flows of event-based target before connecting
- * from event-based gateway.
- */
+ if (!diagram && diagrams && diagrams.length) {
+ diagram = diagrams[0];
+ }
+ // no diagram -> nothing to import
+ if (!diagram) {
+ throw new Error(translate('no diagram to display'));
+ }
- this.preExecuted('connection.create', function (event) {
- var context = event.context,
- source = context.source,
- target = context.target,
- existingIncomingConnections = target.incoming.slice();
+ // load DI from selected diagram only
+ diMap = {};
+ handleDiagram(diagram);
- if (context.hints && context.hints.createElementsBehavior === false) {
- return;
- }
- if ((0, _ModelUtil.is)(source, 'bpmn:EventBasedGateway') && target.incoming.length) {
- existingIncomingConnections.filter(isSequenceFlow).forEach(function (sequenceFlow) {
- modeling.removeConnection(sequenceFlow);
- });
- }
- });
- /**
- * After replacing shape with event-based gateway, remove incoming sequence
- * flows of event-based targets which do not belong to event-based gateway
- * source.
- */
-
- this.preExecuted('shape.replace', function (event) {
- var newShape = event.context.newShape,
- newShapeTargets,
- newShapeTargetsIncomingSequenceFlows;
-
- if (!(0, _ModelUtil.is)(newShape, 'bpmn:EventBasedGateway')) {
- return;
- }
+ var plane = diagram.plane;
- newShapeTargets = newShape.outgoing.filter(isSequenceFlow).map(function (sequenceFlow) {
- return sequenceFlow.target;
- });
- newShapeTargetsIncomingSequenceFlows = newShapeTargets.reduce(function (sequenceFlows, target) {
- var incomingSequenceFlows = target.incoming.filter(isSequenceFlow);
- return sequenceFlows.concat(incomingSequenceFlows);
- }, []);
- newShapeTargetsIncomingSequenceFlows.forEach(function (sequenceFlow) {
- if (sequenceFlow.source !== newShape) {
- modeling.removeConnection(sequenceFlow);
- }
- });
- });
- }
+ if (!plane) {
+ throw new Error(translate(
+ 'no plane for {element}',
+ { element: (0,_Util__WEBPACK_IMPORTED_MODULE_1__.elementToString)(diagram) }
+ ));
+ }
- EventBasedGatewayBehavior.$inject = ['eventBus', 'modeling'];
- (0, _inherits.default)(EventBasedGatewayBehavior, _CommandInterceptor.default); // helpers //////////////////////
+ var rootElement = plane.bpmnElement;
- function isSequenceFlow(connection) {
- return (0, _ModelUtil.is)(connection, 'bpmn:SequenceFlow');
- }
+ // ensure we default to a suitable display candidate (process or collaboration),
+ // even if non is specified in DI
+ if (!rootElement) {
+ rootElement = findDisplayCandidate(definitions);
- },{"../../../util/ModelUtil":240,"diagram-js/lib/command/CommandInterceptor":250,"inherits":438}],174:[function(require,module,exports){
- "use strict";
+ if (!rootElement) {
+ throw new Error(translate('no process or collaboration to display'));
+ } else {
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = FixHoverBehavior;
+ logError(
+ translate('correcting missing bpmnElement on {plane} to {rootElement}', {
+ plane: (0,_Util__WEBPACK_IMPORTED_MODULE_1__.elementToString)(plane),
+ rootElement: (0,_Util__WEBPACK_IMPORTED_MODULE_1__.elementToString)(rootElement)
+ })
+ );
- var _LaneUtil = require("../util/LaneUtil");
+ // correct DI on the fly
+ plane.bpmnElement = rootElement;
+ registerDi(plane);
+ }
+ }
- var _ModelUtil = require("../../../util/ModelUtil");
- var _ModelingUtil = require("../util/ModelingUtil");
+ var ctx = visitRoot(rootElement, plane);
- var HIGH_PRIORITY = 1500;
- var HIGHEST_PRIORITY = 2000;
- /**
- * Correct hover targets in certain situations to improve diagram interaction.
- *
- * @param {ElementRegistry} elementRegistry
- * @param {EventBus} eventBus
- * @param {Canvas} canvas
- */
+ if (is(rootElement, 'bpmn:Process') || is(rootElement, 'bpmn:SubProcess')) {
+ handleProcess(rootElement, ctx);
+ } else if (is(rootElement, 'bpmn:Collaboration')) {
+ handleCollaboration(rootElement, ctx);
- function FixHoverBehavior(elementRegistry, eventBus, canvas) {
- eventBus.on(['create.hover', 'create.move', 'create.end', 'shape.move.hover', 'shape.move.move', 'shape.move.end'], HIGH_PRIORITY, function (event) {
- var context = event.context,
- shape = context.shape || event.shape,
- hover = event.hover; // ensure elements are not dropped onto a bpmn:Lane but onto
- // the underlying bpmn:Participant
+ // force drawing of everything not yet drawn that is part of the target DI
+ handleUnhandledProcesses(definitions.rootElements, ctx);
+ } else {
+ throw new Error(
+ translate('unsupported bpmnElement for {plane}: {rootElement}', {
+ plane: (0,_Util__WEBPACK_IMPORTED_MODULE_1__.elementToString)(plane),
+ rootElement: (0,_Util__WEBPACK_IMPORTED_MODULE_1__.elementToString)(rootElement)
+ })
+ );
+ }
- if ((0, _ModelUtil.is)(hover, 'bpmn:Lane') && !(0, _ModelingUtil.isAny)(shape, ['bpmn:Lane', 'bpmn:Participant'])) {
- event.hover = (0, _LaneUtil.getLanesRoot)(hover);
- event.hoverGfx = elementRegistry.getGraphics(event.hover);
- }
+ // handle all deferred elements
+ handleDeferred(deferred);
+ };
- var rootElement = canvas.getRootElement(); // ensure bpmn:Group and label elements are dropped
- // always onto the root
+ var handleDeferred = this.handleDeferred = function handleDeferred() {
- if (hover !== rootElement && (shape.labelTarget || (0, _ModelUtil.is)(shape, 'bpmn:Group'))) {
- event.hover = rootElement;
- event.hoverGfx = elementRegistry.getGraphics(event.hover);
- }
- });
- eventBus.on(['connect.hover', 'connect.out', 'connect.end', 'connect.cleanup', 'global-connect.hover', 'global-connect.out', 'global-connect.end', 'global-connect.cleanup'], HIGH_PRIORITY, function (event) {
- var hover = event.hover; // ensure connections start/end on bpmn:Participant,
- // not the underlying bpmn:Lane
+ var fn;
- if ((0, _ModelUtil.is)(hover, 'bpmn:Lane')) {
- event.hover = (0, _LaneUtil.getLanesRoot)(hover) || hover;
- event.hoverGfx = elementRegistry.getGraphics(event.hover);
- }
- });
- eventBus.on(['bendpoint.move.hover'], HIGH_PRIORITY, function (event) {
- var context = event.context,
- hover = event.hover,
- type = context.type; // ensure reconnect start/end on bpmn:Participant,
- // not the underlying bpmn:Lane
-
- if ((0, _ModelUtil.is)(hover, 'bpmn:Lane') && /reconnect/.test(type)) {
- event.hover = (0, _LaneUtil.getLanesRoot)(hover) || hover;
- event.hoverGfx = elementRegistry.getGraphics(event.hover);
- }
- });
- eventBus.on(['connect.start'], HIGH_PRIORITY, function (event) {
- var context = event.context,
- start = context.start; // ensure connect start on bpmn:Participant,
- // not the underlying bpmn:Lane
+ // drain deferred until empty
+ while (deferred.length) {
+ fn = deferred.shift();
- if ((0, _ModelUtil.is)(start, 'bpmn:Lane')) {
- context.start = (0, _LaneUtil.getLanesRoot)(start) || start;
- }
- }); // allow movement of participants from lanes
+ fn();
+ }
+ };
- eventBus.on('shape.move.start', HIGHEST_PRIORITY, function (event) {
- var shape = event.shape;
+ function handleProcess(process, context) {
+ handleFlowElementsContainer(process, context);
+ handleIoSpecification(process.ioSpecification, context);
- if ((0, _ModelUtil.is)(shape, 'bpmn:Lane')) {
- event.shape = (0, _LaneUtil.getLanesRoot)(shape) || shape;
- }
- });
- }
+ handleArtifacts(process.artifacts, context);
- FixHoverBehavior.$inject = ['elementRegistry', 'eventBus', 'canvas'];
+ // log process handled
+ handled(process);
+ }
- },{"../../../util/ModelUtil":240,"../util/LaneUtil":210,"../util/ModelingUtil":211}],175:[function(require,module,exports){
- "use strict";
+ function handleUnhandledProcesses(rootElements, ctx) {
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = GroupBehavior;
+ // walk through all processes that have not yet been drawn and draw them
+ // if they contain lanes with DI information.
+ // we do this to pass the free-floating lane test cases in the MIWG test suite
+ var processes = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(rootElements, function(e) {
+ return !isHandled(e) && is(e, 'bpmn:Process') && e.laneSets;
+ });
- var _inherits = _interopRequireDefault(require("inherits"));
+ processes.forEach(contextual(handleProcess, ctx));
+ }
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+ function handleMessageFlow(messageFlow, context) {
+ visitIfDi(messageFlow, context);
+ }
- var _Collections = require("diagram-js/lib/util/Collections");
+ function handleMessageFlows(messageFlows, context) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(messageFlows, contextual(handleMessageFlow, context));
+ }
- var _ModelUtil = require("../../../util/ModelUtil");
+ function handleDataAssociation(association, context) {
+ visitIfDi(association, context);
+ }
- var _CategoryUtil = require("./util/CategoryUtil");
+ function handleDataInput(dataInput, context) {
+ visitIfDi(dataInput, context);
+ }
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ function handleDataOutput(dataOutput, context) {
+ visitIfDi(dataOutput, context);
+ }
- var HIGH_PRIORITY = 2000;
- /**
- * BPMN specific Group behavior
- */
+ function handleArtifact(artifact, context) {
- function GroupBehavior(bpmnFactory, canvas, elementRegistry, eventBus, injector, moddleCopy) {
- injector.invoke(_CommandInterceptor.default, this);
- /**
- * Gets process definitions
- *
- * @return {ModdleElement} definitions
- */
+ // bpmn:TextAnnotation
+ // bpmn:Group
+ // bpmn:Association
- function getDefinitions() {
- var rootElement = canvas.getRootElement(),
- businessObject = (0, _ModelUtil.getBusinessObject)(rootElement);
- return businessObject.$parent;
- }
- /**
- * Removes a referenced category value for a given group shape
- *
- * @param {djs.model.Shape} shape
- */
+ visitIfDi(artifact, context);
+ }
+ function handleArtifacts(artifacts, context) {
- function removeReferencedCategoryValue(shape) {
- var businessObject = (0, _ModelUtil.getBusinessObject)(shape),
- categoryValue = businessObject.categoryValueRef;
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(artifacts, function(e) {
+ if (is(e, 'bpmn:Association')) {
+ deferred.push(function() {
+ handleArtifact(e, context);
+ });
+ } else {
+ handleArtifact(e, context);
+ }
+ });
+ }
+
+ function handleIoSpecification(ioSpecification, context) {
+
+ if (!ioSpecification) {
+ return;
+ }
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(ioSpecification.dataInputs, contextual(handleDataInput, context));
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(ioSpecification.dataOutputs, contextual(handleDataOutput, context));
+ }
+
+ var handleSubProcess = this.handleSubProcess = function handleSubProcess(subProcess, context) {
+ handleFlowElementsContainer(subProcess, context);
+ handleArtifacts(subProcess.artifacts, context);
+ };
+
+ function handleFlowNode(flowNode, context) {
+ var childCtx = visitIfDi(flowNode, context);
+
+ if (is(flowNode, 'bpmn:SubProcess')) {
+ handleSubProcess(flowNode, childCtx || context);
+ }
+
+ if (is(flowNode, 'bpmn:Activity')) {
+ handleIoSpecification(flowNode.ioSpecification, context);
+ }
+
+ // defer handling of associations
+ // affected types:
+ //
+ // * bpmn:Activity
+ // * bpmn:ThrowEvent
+ // * bpmn:CatchEvent
+ //
+ deferred.push(function() {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(flowNode.dataInputAssociations, contextual(handleDataAssociation, context));
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(flowNode.dataOutputAssociations, contextual(handleDataAssociation, context));
+ });
+ }
+
+ function handleSequenceFlow(sequenceFlow, context) {
+ visitIfDi(sequenceFlow, context);
+ }
+
+ function handleDataElement(dataObject, context) {
+ visitIfDi(dataObject, context);
+ }
+
+ function handleLane(lane, context) {
+
+ deferred.push(function() {
+
+ var newContext = visitIfDi(lane, context);
+
+ if (lane.childLaneSet) {
+ handleLaneSet(lane.childLaneSet, newContext || context);
+ }
+
+ wireFlowNodeRefs(lane);
+ });
+ }
+
+ function handleLaneSet(laneSet, context) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(laneSet.lanes, contextual(handleLane, context));
+ }
+
+ function handleLaneSets(laneSets, context) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(laneSets, contextual(handleLaneSet, context));
+ }
+
+ function handleFlowElementsContainer(container, context) {
+ handleFlowElements(container.flowElements, context);
+
+ if (container.laneSets) {
+ handleLaneSets(container.laneSets, context);
+ }
+ }
+
+ function handleFlowElements(flowElements, context) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(flowElements, function(e) {
+ if (is(e, 'bpmn:SequenceFlow')) {
+ deferred.push(function() {
+ handleSequenceFlow(e, context);
+ });
+ } else if (is(e, 'bpmn:BoundaryEvent')) {
+ deferred.unshift(function() {
+ handleFlowNode(e, context);
+ });
+ } else if (is(e, 'bpmn:FlowNode')) {
+ handleFlowNode(e, context);
+ } else if (is(e, 'bpmn:DataObject')) {
+
+ // SKIP (assume correct referencing via DataObjectReference)
+ } else if (is(e, 'bpmn:DataStoreReference')) {
+ handleDataElement(e, context);
+ } else if (is(e, 'bpmn:DataObjectReference')) {
+ handleDataElement(e, context);
+ } else {
+ logError(
+ translate('unrecognized flowElement {element} in context {context}', {
+ element: (0,_Util__WEBPACK_IMPORTED_MODULE_1__.elementToString)(e),
+ context: (context ? (0,_Util__WEBPACK_IMPORTED_MODULE_1__.elementToString)(context.businessObject) : 'null')
+ }),
+ { element: e, context: context }
+ );
+ }
+ });
+ }
- if (!categoryValue) {
- return;
- }
+ function handleParticipant(participant, context) {
+ var newCtx = visitIfDi(participant, context);
- var category = categoryValue.$parent;
+ var process = participant.processRef;
+ if (process) {
+ handleProcess(process, newCtx || context);
+ }
+ }
- if (!categoryValue) {
- return;
- }
+ function handleCollaboration(collaboration, context) {
- (0, _Collections.remove)(category.categoryValue, categoryValue); // cleanup category if it is empty
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(collaboration.participants, contextual(handleParticipant, context));
- if (category && !category.categoryValue.length) {
- removeCategory(category);
- }
- }
- /**
- * Removes a given category from the definitions
- *
- * @param {ModdleElement} category
- */
+ handleArtifacts(collaboration.artifacts, context);
+ // handle message flows latest in the process
+ deferred.push(function() {
+ handleMessageFlows(collaboration.messageFlows, context);
+ });
+ }
- function removeCategory(category) {
- var definitions = getDefinitions();
- (0, _Collections.remove)(definitions.get('rootElements'), category);
- }
- /**
- * Returns all group element in the current registry
- *
- * @return {Array} a list of group shapes
- */
+ function wireFlowNodeRefs(lane) {
- function getGroupElements() {
- return elementRegistry.filter(function (e) {
- return (0, _ModelUtil.is)(e, 'bpmn:Group');
- });
- }
- /**
- * Returns true if given categoryValue is referenced in one of the given elements
- *
- * @param {Array} elements
- * @param {ModdleElement} categoryValue
- * @return {boolean}
- */
+ // wire the virtual flowNodeRefs <-> relationship
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(lane.flowNodeRef, function(flowNode) {
+ var lanes = flowNode.get('lanes');
+ if (lanes) {
+ lanes.push(lane);
+ }
+ });
+ }
+}
- function isReferenced(elements, categoryValue) {
- return elements.some(function (e) {
- var businessObject = (0, _ModelUtil.getBusinessObject)(e);
- return businessObject.categoryValueRef && businessObject.categoryValueRef === categoryValue;
- });
- }
- /**
- * remove referenced category + value when group was deleted
- */
+/***/ }),
- this.executed('shape.delete', function (event) {
- var context = event.context,
- shape = context.shape;
+/***/ "../node_modules/bpmn-js/lib/import/Importer.js":
+/*!******************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/import/Importer.js ***!
+ \******************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- if ((0, _ModelUtil.is)(shape, 'bpmn:Group')) {
- var businessObject = (0, _ModelUtil.getBusinessObject)(shape),
- categoryValueRef = businessObject.categoryValueRef,
- groupElements = getGroupElements();
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ importBpmnDiagram: () => (/* binding */ importBpmnDiagram)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _BpmnTreeWalker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BpmnTreeWalker */ "../node_modules/bpmn-js/lib/import/BpmnTreeWalker.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
- if (!isReferenced(groupElements, categoryValueRef)) {
- removeReferencedCategoryValue(shape);
- }
- }
- });
- /**
- * re-attach removed category
- */
-
- this.reverted('shape.delete', function (event) {
- var context = event.context,
- shape = context.shape;
-
- if ((0, _ModelUtil.is)(shape, 'bpmn:Group')) {
- var businessObject = (0, _ModelUtil.getBusinessObject)(shape),
- categoryValueRef = businessObject.categoryValueRef,
- definitions = getDefinitions(),
- category = categoryValueRef ? categoryValueRef.$parent : null;
- (0, _Collections.add)(category.get('categoryValue'), categoryValueRef);
- (0, _Collections.add)(definitions.get('rootElements'), category);
- }
- });
- /**
- * create new category + value when group was created
- */
- this.execute('shape.create', function (event) {
- var context = event.context,
- shape = context.shape,
- businessObject = (0, _ModelUtil.getBusinessObject)(shape);
- if ((0, _ModelUtil.is)(businessObject, 'bpmn:Group') && !businessObject.categoryValueRef) {
- var definitions = getDefinitions(),
- categoryValue = (0, _CategoryUtil.createCategoryValue)(definitions, bpmnFactory); // link the reference to the Group
- businessObject.categoryValueRef = categoryValue;
- }
- });
- this.revert('shape.create', function (event) {
- var context = event.context,
- shape = context.shape;
- if ((0, _ModelUtil.is)(shape, 'bpmn:Group')) {
- removeReferencedCategoryValue(shape);
- delete (0, _ModelUtil.getBusinessObject)(shape).categoryValueRef;
- }
- }); // copy bpmn:CategoryValue when copying element
- eventBus.on('moddleCopy.canCopyProperty', HIGH_PRIORITY, function (context) {
- var property = context.property,
- categoryValue;
- if ((0, _ModelUtil.is)(property, 'bpmn:CategoryValue')) {
- categoryValue = (0, _CategoryUtil.createCategoryValue)(getDefinitions(), bpmnFactory); // return copy of category
+/**
+ * @typedef {import('../model/Types').ModdleElement} ModdleElement
+ *
+ * @typedef { {
+ * warnings: string[];
+ * } } ImportBPMNDiagramResult
+ *
+ * @typedef {ImportBPMNDiagramResult & Error} ImportBPMNDiagramError
+ */
- return moddleCopy.copyElement(property, categoryValue);
- }
- });
- }
+/**
+ * Import the definitions into a diagram.
+ *
+ * Errors and warnings are reported through the specified callback.
+ *
+ * @param {ModdleElement} diagram
+ * @param {ModdleElement} definitions
+ * @param {ModdleElement} [bpmnDiagram] The diagram to be rendered (if not
+ * provided, the first one will be rendered).
+ *
+ * @return {Promise}
+ */
+function importBpmnDiagram(diagram, definitions, bpmnDiagram) {
- GroupBehavior.$inject = ['bpmnFactory', 'canvas', 'elementRegistry', 'eventBus', 'injector', 'moddleCopy'];
- (0, _inherits.default)(GroupBehavior, _CommandInterceptor.default);
+ var importer,
+ eventBus,
+ translate,
+ canvas;
- },{"../../../util/ModelUtil":240,"./util/CategoryUtil":194,"diagram-js/lib/command/CommandInterceptor":250,"diagram-js/lib/util/Collections":418,"inherits":438}],176:[function(require,module,exports){
- "use strict";
+ var error,
+ warnings = [];
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = ImportDockingFix;
+ /**
+ * Walk the diagram semantically, importing (=drawing)
+ * all elements you encounter.
+ *
+ * @param {ModdleElement} definitions
+ * @param {ModdleElement} bpmnDiagram
+ */
+ function render(definitions, bpmnDiagram) {
- var _LayoutUtil = require("diagram-js/lib/layout/LayoutUtil");
+ var visitor = {
- var _LineIntersect = _interopRequireDefault(require("./util/LineIntersect"));
+ root: function(element, di) {
+ return importer.add(element, di);
+ },
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ element: function(element, di, parentShape) {
+ return importer.add(element, di, parentShape);
+ },
- /**
- * Fix broken dockings after DI imports.
- *
- * @param {EventBus} eventBus
- */
- function ImportDockingFix(eventBus) {
- function adjustDocking(startPoint, nextPoint, elementMid) {
- var elementTop = {
- x: elementMid.x,
- y: elementMid.y - 50
- };
- var elementLeft = {
- x: elementMid.x - 50,
- y: elementMid.y
- };
- var verticalIntersect = (0, _LineIntersect.default)(startPoint, nextPoint, elementMid, elementTop),
- horizontalIntersect = (0, _LineIntersect.default)(startPoint, nextPoint, elementMid, elementLeft); // original is horizontal or vertical center cross intersection
+ error: function(message, context) {
+ warnings.push({ message: message, context: context });
+ }
+ };
- var centerIntersect;
+ var walker = new _BpmnTreeWalker__WEBPACK_IMPORTED_MODULE_0__["default"](visitor, translate);
- if (verticalIntersect && horizontalIntersect) {
- if (getDistance(verticalIntersect, elementMid) > getDistance(horizontalIntersect, elementMid)) {
- centerIntersect = horizontalIntersect;
- } else {
- centerIntersect = verticalIntersect;
- }
- } else {
- centerIntersect = verticalIntersect || horizontalIntersect;
- }
- startPoint.original = centerIntersect;
- }
+ bpmnDiagram = bpmnDiagram || (definitions.diagrams && definitions.diagrams[0]);
- function fixDockings(connection) {
- var waypoints = connection.waypoints;
- adjustDocking(waypoints[0], waypoints[1], (0, _LayoutUtil.getMid)(connection.source));
- adjustDocking(waypoints[waypoints.length - 1], waypoints[waypoints.length - 2], (0, _LayoutUtil.getMid)(connection.target));
- }
+ var diagramsToImport = getDiagramsToImport(definitions, bpmnDiagram);
- eventBus.on('bpmnElement.added', function (e) {
- var element = e.element;
+ if (!diagramsToImport) {
+ throw new Error(translate('no diagram to display'));
+ }
- if (element.waypoints) {
- fixDockings(element);
- }
- });
- }
+ // traverse BPMN 2.0 document model,
+ // starting at definitions
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(diagramsToImport, function(diagram) {
+ walker.handleDefinitions(definitions, diagram);
+ });
- ImportDockingFix.$inject = ['eventBus']; // helpers //////////////////////
+ var rootId = bpmnDiagram.plane.bpmnElement.id;
- function getDistance(p1, p2) {
- return Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2));
- }
+ // we do need to account for different ways we create root elements
+ // each nested imported do have the `_plane` suffix, while
+ // the root is found under the business object ID
+ canvas.setRootElement(
+ canvas.findRoot(rootId + '_plane') || canvas.findRoot(rootId)
+ );
+ }
- },{"./util/LineIntersect":198,"diagram-js/lib/layout/LayoutUtil":405}],177:[function(require,module,exports){
- "use strict";
+ return new Promise(function(resolve, reject) {
+ try {
+ importer = diagram.get('bpmnImporter');
+ eventBus = diagram.get('eventBus');
+ translate = diagram.get('translate');
+ canvas = diagram.get('canvas');
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = IsHorizontalFix;
+ eventBus.fire('import.render.start', { definitions: definitions });
- var _inherits = _interopRequireDefault(require("inherits"));
+ render(definitions, bpmnDiagram);
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+ eventBus.fire('import.render.complete', {
+ error: error,
+ warnings: warnings
+ });
- var _ModelUtil = require("../../../util/ModelUtil");
+ return resolve({ warnings: warnings });
+ } catch (e) {
- var _ModelingUtil = require("../util/ModelingUtil");
+ e.warnings = warnings;
+ return reject(e);
+ }
+ });
+}
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+/**
+ * Returns all diagrams in the same hierarchy as the requested diagram.
+ * Includes all parent and sub process diagrams.
+ *
+ * @param {ModdleElement} definitions
+ * @param {ModdleElement} bpmnDiagram
+ *
+ * @return {ModdleElement[]}
+ */
+function getDiagramsToImport(definitions, bpmnDiagram) {
+ if (!bpmnDiagram) {
+ return;
+ }
- /**
- * A component that makes sure that each created or updated
- * Pool and Lane is assigned an isHorizontal property set to true.
- *
- * @param {EventBus} eventBus
- */
- function IsHorizontalFix(eventBus) {
- _CommandInterceptor.default.call(this, eventBus);
+ var bpmnElement = bpmnDiagram.plane.bpmnElement,
+ rootElement = bpmnElement;
+
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(bpmnElement, 'bpmn:Process') && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(bpmnElement, 'bpmn:Collaboration')) {
+ rootElement = findRootProcess(bpmnElement);
+ }
+
+ // in case the process is part of a collaboration, the plane references the
+ // collaboration, not the process
+ var collaboration;
- var elementTypesToUpdate = ['bpmn:Participant', 'bpmn:Lane'];
- this.executed(['shape.move', 'shape.create', 'shape.resize'], function (event) {
- var bo = (0, _ModelUtil.getBusinessObject)(event.context.shape);
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(rootElement, 'bpmn:Collaboration')) {
+ collaboration = rootElement;
+ } else {
+ collaboration = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.find)(definitions.rootElements, function(element) {
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(element, 'bpmn:Collaboration')) {
+ return;
+ }
+
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.find)(element.participants, function(participant) {
+ return participant.processRef === rootElement;
+ });
+ });
+ }
+
+ var rootElements = [ rootElement ];
- if ((0, _ModelingUtil.isAny)(bo, elementTypesToUpdate) && !bo.di.get('isHorizontal')) {
- // set attribute directly to avoid modeling#updateProperty side effects
- bo.di.set('isHorizontal', true);
- }
- });
- }
+ // all collaboration processes can contain sub-diagrams
+ if (collaboration) {
+ rootElements = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.map)(collaboration.participants, function(participant) {
+ return participant.processRef;
+ });
- IsHorizontalFix.$inject = ['eventBus'];
- (0, _inherits.default)(IsHorizontalFix, _CommandInterceptor.default);
+ rootElements.push(collaboration);
+ }
- },{"../../../util/ModelUtil":240,"../util/ModelingUtil":211,"diagram-js/lib/command/CommandInterceptor":250,"inherits":438}],178:[function(require,module,exports){
- "use strict";
+ var allChildren = selfAndAllFlowElements(rootElements);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = LabelBehavior;
- exports.getReferencePointDelta = getReferencePointDelta;
- exports.getReferencePoint = getReferencePoint;
- exports.asEdges = asEdges;
+ // if we have multiple diagrams referencing the same element, we
+ // use the first in the file
+ var diagramsToImport = [ bpmnDiagram ];
+ var handledElements = [ bpmnElement ];
- var _minDash = require("min-dash");
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(definitions.diagrams, function(diagram) {
+ var businessObject = diagram.plane.bpmnElement;
- var _inherits = _interopRequireDefault(require("inherits"));
+ if (
+ allChildren.indexOf(businessObject) !== -1 &&
+ handledElements.indexOf(businessObject) === -1
+ ) {
+ diagramsToImport.push(diagram);
+ handledElements.push(businessObject);
+ }
+ });
- var _ModelUtil = require("../../../util/ModelUtil");
- var _LabelUtil = require("../../../util/LabelUtil");
+ return diagramsToImport;
+}
- var _LabelUtil2 = require("../../label-editing/LabelUtil");
+function selfAndAllFlowElements(elements) {
+ var result = [];
- var _LabelLayoutUtil = require("./util/LabelLayoutUtil");
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(elements, function(element) {
+ if (!element) {
+ return;
+ }
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+ result.push(element);
- var _AttachUtil = require("diagram-js/lib/util/AttachUtil");
+ result = result.concat(selfAndAllFlowElements(element.flowElements));
+ });
- var _LayoutUtil = require("diagram-js/lib/layout/LayoutUtil");
+ return result;
+}
- var _PositionUtil = require("diagram-js/lib/util/PositionUtil");
+function findRootProcess(element) {
+ var parent = element;
- var _GeometricUtil = require("./util/GeometricUtil");
+ while (parent) {
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(parent, 'bpmn:Process')) {
+ return parent;
+ }
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ parent = parent.$parent;
+ }
+}
- var DEFAULT_LABEL_DIMENSIONS = {
- width: 90,
- height: 20
- };
- var NAME_PROPERTY = 'name';
- var TEXT_PROPERTY = 'text';
- /**
- * A component that makes sure that external labels are added
- * together with respective elements and properly updated (DI wise)
- * during move.
- *
- * @param {EventBus} eventBus
- * @param {Modeling} modeling
- * @param {BpmnFactory} bpmnFactory
- * @param {TextRenderer} textRenderer
- */
- function LabelBehavior(eventBus, modeling, bpmnFactory, textRenderer) {
- _CommandInterceptor.default.call(this, eventBus); // update label if name property was updated
+/***/ }),
+/***/ "../node_modules/bpmn-js/lib/import/Util.js":
+/*!**************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/import/Util.js ***!
+ \**************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- this.postExecute('element.updateProperties', function (e) {
- var context = e.context,
- element = context.element,
- properties = context.properties;
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ elementToString: () => (/* binding */ elementToString)
+/* harmony export */ });
+function elementToString(e) {
+ if (!e) {
+ return '';
+ }
- if (NAME_PROPERTY in properties) {
- modeling.updateLabel(element, properties[NAME_PROPERTY]);
- }
+ return '<' + e.$type + (e.id ? ' id="' + e.id : '') + '" />';
+}
- if (TEXT_PROPERTY in properties && (0, _ModelUtil.is)(element, 'bpmn:TextAnnotation')) {
- var newBounds = textRenderer.getTextAnnotationBounds({
- x: element.x,
- y: element.y,
- width: element.width,
- height: element.height
- }, properties[TEXT_PROPERTY] || '');
- modeling.updateLabel(element, properties.text, newBounds);
- }
- }); // create label shape after shape/connection was created
+/***/ }),
- this.postExecute(['shape.create', 'connection.create'], function (e) {
- var context = e.context,
- hints = context.hints || {};
+/***/ "../node_modules/bpmn-js/lib/import/index.js":
+/*!***************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/import/index.js ***!
+ \***************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- if (hints.createElementsBehavior === false) {
- return;
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_i18n_translate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/i18n/translate */ "../node_modules/diagram-js/lib/i18n/translate/index.js");
+/* harmony import */ var _BpmnImporter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BpmnImporter */ "../node_modules/bpmn-js/lib/import/BpmnImporter.js");
- var element = context.shape || context.connection,
- businessObject = element.businessObject;
- if ((0, _LabelUtil.isLabel)(element) || !(0, _LabelUtil.isLabelExternal)(element)) {
- return;
- } // only create label if attribute available
- if (!(0, _LabelUtil2.getLabel)(element)) {
- return;
- }
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ diagram_js_lib_i18n_translate__WEBPACK_IMPORTED_MODULE_0__["default"]
+ ],
+ bpmnImporter: [ 'type', _BpmnImporter__WEBPACK_IMPORTED_MODULE_1__["default"] ]
+});
- var labelCenter = (0, _LabelUtil.getExternalLabelMid)(element); // we don't care about x and y
+/***/ }),
- var labelDimensions = textRenderer.getExternalLabelBounds(DEFAULT_LABEL_DIMENSIONS, (0, _LabelUtil2.getLabel)(element));
- modeling.createLabel(element, labelCenter, {
- id: businessObject.id + '_label',
- businessObject: businessObject,
- width: labelDimensions.width,
- height: labelDimensions.height
- });
- }); // update label after label shape was deleted
+/***/ "../node_modules/bpmn-js/lib/util/CompatibilityUtil.js":
+/*!*************************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/util/CompatibilityUtil.js ***!
+ \*************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- this.postExecute('shape.delete', function (event) {
- var context = event.context,
- labelTarget = context.labelTarget,
- hints = context.hints || {}; // check if label
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ ensureCompatDiRef: () => (/* binding */ ensureCompatDiRef)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
- if (labelTarget && hints.unsetLabel !== false) {
- modeling.updateLabel(labelTarget, null, null, {
- removeShape: false
- });
- }
- }); // update di information on label creation
- this.postExecute(['label.create'], function (event) {
- var context = event.context,
- element = context.shape,
- businessObject,
- di; // we want to trigger on real labels only
+/**
+ * @typedef {import('../model/Types').ModdleElement} ModdleElement
+ */
- if (!element.labelTarget) {
- return;
- } // we want to trigger on BPMN elements only
+// TODO(nikku): remove with future bpmn-js version
- if (!(0, _ModelUtil.is)(element.labelTarget || element, 'bpmn:BaseElement')) {
- return;
- }
+var DI_ERROR_MESSAGE = 'Tried to access di from the businessObject. The di is available through the diagram element only. For more information, see https://github.com/bpmn-io/bpmn-js/issues/1472';
- businessObject = element.businessObject, di = businessObject.di;
+/**
+ * @private
+ *
+ * @param {ModdleElement} businessObject
+ */
+function ensureCompatDiRef(businessObject) {
+
+ // bpmnElement can have multiple independent DIs
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.has)(businessObject, 'di')) {
+ Object.defineProperty(businessObject, 'di', {
+ enumerable: false,
+ get: function() {
+ throw new Error(DI_ERROR_MESSAGE);
+ }
+ });
+ }
+}
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/util/DiUtil.js":
+/*!**************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/util/DiUtil.js ***!
+ \**************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ hasCompensateEventDefinition: () => (/* binding */ hasCompensateEventDefinition),
+/* harmony export */ hasErrorEventDefinition: () => (/* binding */ hasErrorEventDefinition),
+/* harmony export */ hasEscalationEventDefinition: () => (/* binding */ hasEscalationEventDefinition),
+/* harmony export */ hasEventDefinition: () => (/* binding */ hasEventDefinition),
+/* harmony export */ isEventSubProcess: () => (/* binding */ isEventSubProcess),
+/* harmony export */ isExpanded: () => (/* binding */ isExpanded),
+/* harmony export */ isHorizontal: () => (/* binding */ isHorizontal),
+/* harmony export */ isInterrupting: () => (/* binding */ isInterrupting)
+/* harmony export */ });
+/* harmony import */ var _ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+
+
+
+
+/**
+ * @typedef {import('../model/Types').Element} Element
+ * @typedef {import('../model/Types').ModdleElement} ModdleElement
+ */
- if (!di.label) {
- di.label = bpmnFactory.create('bpmndi:BPMNLabel', {
- bounds: bpmnFactory.create('dc:Bounds')
- });
- }
+/**
+ * @param {Element} element
+ * @param {ModdleElement} [di]
+ *
+ * @return {boolean}
+ */
+function isExpanded(element, di) {
- (0, _minDash.assign)(di.label.bounds, {
- x: element.x,
- y: element.y,
- width: element.width,
- height: element.height
- });
- });
+ if ((0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:CallActivity')) {
+ return false;
+ }
- function getVisibleLabelAdjustment(event) {
- var context = event.context,
- connection = context.connection,
- label = connection.label,
- hints = (0, _minDash.assign)({}, context.hints),
- newWaypoints = context.newWaypoints || connection.waypoints,
- oldWaypoints = context.oldWaypoints;
+ if ((0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:SubProcess')) {
+ di = di || (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getDi)(element);
- if (typeof hints.startChanged === 'undefined') {
- hints.startChanged = !!hints.connectionStart;
- }
+ if (di && (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(di, 'bpmndi:BPMNPlane')) {
+ return true;
+ }
- if (typeof hints.endChanged === 'undefined') {
- hints.endChanged = !!hints.connectionEnd;
- }
+ return di && !!di.isExpanded;
+ }
- return (0, _LabelLayoutUtil.getLabelAdjustment)(label, newWaypoints, oldWaypoints, hints);
- }
+ if ((0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Participant')) {
+ return !!(0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(element).processRef;
+ }
- this.postExecute(['connection.layout', 'connection.updateWaypoints'], function (event) {
- var context = event.context,
- hints = context.hints || {};
+ return true;
+}
- if (hints.labelBehavior === false) {
- return;
- }
+/**
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function isHorizontal(element) {
- var connection = context.connection,
- label = connection.label,
- labelAdjustment; // handle missing label as well as the case
- // that the label parent does not exist (yet),
- // because it is being pasted / created via multi element create
- //
- // Cf. https://github.com/bpmn-io/bpmn-js/pull/1227
+ if (!(0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Participant') && !(0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Lane')) {
+ return undefined;
+ }
- if (!label || !label.parent) {
- return;
- }
+ var isHorizontal = (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getDi)(element).isHorizontal;
- labelAdjustment = getVisibleLabelAdjustment(event);
- modeling.moveShape(label, labelAdjustment);
- }); // keep label position on shape replace
+ if (isHorizontal === undefined) {
+ return true;
+ }
- this.postExecute(['shape.replace'], function (event) {
- var context = event.context,
- newShape = context.newShape,
- oldShape = context.oldShape;
- var businessObject = (0, _ModelUtil.getBusinessObject)(newShape);
+ return isHorizontal;
+}
- if (businessObject && (0, _LabelUtil.isLabelExternal)(businessObject) && oldShape.label && newShape.label) {
- newShape.label.x = oldShape.label.x;
- newShape.label.y = oldShape.label.y;
- }
- }); // move external label after resizing
-
- this.postExecute('shape.resize', function (event) {
- var context = event.context,
- shape = context.shape,
- newBounds = context.newBounds,
- oldBounds = context.oldBounds;
-
- if ((0, _LabelUtil.hasExternalLabel)(shape)) {
- var label = shape.label,
- labelMid = (0, _LayoutUtil.getMid)(label),
- edges = asEdges(oldBounds); // get nearest border point to label as reference point
-
- var referencePoint = getReferencePoint(labelMid, edges);
- var delta = getReferencePointDelta(referencePoint, oldBounds, newBounds);
- modeling.moveShape(label, delta);
- }
- });
- }
+/**
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function isInterrupting(element) {
+ return element && (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(element).isInterrupting !== false;
+}
- (0, _inherits.default)(LabelBehavior, _CommandInterceptor.default);
- LabelBehavior.$inject = ['eventBus', 'modeling', 'bpmnFactory', 'textRenderer']; // helpers //////////////////////
+/**
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function isEventSubProcess(element) {
+ return element && !!(0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(element).triggeredByEvent;
+}
- /**
- * Calculates a reference point delta relative to a new position
- * of a certain element's bounds
- *
- * @param {Point} point
- * @param {Bounds} oldBounds
- * @param {Bounds} newBounds
- *
- * @return {Delta} delta
- */
+/**
+ * @param {Element} element
+ * @param {string} eventType
+ *
+ * @return {boolean}
+ */
+function hasEventDefinition(element, eventType) {
+ var eventDefinitions = (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(element).eventDefinitions;
- function getReferencePointDelta(referencePoint, oldBounds, newBounds) {
- var newReferencePoint = (0, _AttachUtil.getNewAttachPoint)(referencePoint, oldBounds, newBounds);
- return (0, _LayoutUtil.roundPoint)((0, _PositionUtil.delta)(newReferencePoint, referencePoint));
- }
- /**
- * Generates the nearest point (reference point) for a given point
- * onto given set of lines
- *
- * @param {Array} lines
- * @param {Point} point
- *
- * @param {Point}
- */
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.some)(eventDefinitions, function(event) {
+ return (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(event, eventType);
+ });
+}
+/**
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function hasErrorEventDefinition(element) {
+ return hasEventDefinition(element, 'bpmn:ErrorEventDefinition');
+}
- function getReferencePoint(point, lines) {
- if (!lines.length) {
- return;
- }
+/**
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function hasEscalationEventDefinition(element) {
+ return hasEventDefinition(element, 'bpmn:EscalationEventDefinition');
+}
- var nearestLine = getNearestLine(point, lines);
- return (0, _GeometricUtil.perpendicularFoot)(point, nearestLine);
- }
- /**
- * Convert the given bounds to a lines array containing all edges
- *
- * @param {Bounds|Point} bounds
- *
- * @return Array
- */
+/**
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function hasCompensateEventDefinition(element) {
+ return hasEventDefinition(element, 'bpmn:CompensateEventDefinition');
+}
+
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/util/DrilldownUtil.js":
+/*!*********************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/util/DrilldownUtil.js ***!
+ \*********************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ getPlaneIdFromShape: () => (/* binding */ getPlaneIdFromShape),
+/* harmony export */ getShapeIdFromPlane: () => (/* binding */ getShapeIdFromPlane),
+/* harmony export */ isPlane: () => (/* binding */ isPlane),
+/* harmony export */ planeSuffix: () => (/* binding */ planeSuffix),
+/* harmony export */ toPlaneId: () => (/* binding */ toPlaneId)
+/* harmony export */ });
+/* harmony import */ var _ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+
+
+/**
+ * @typedef {import('../model/Types').Element} Element
+ * @typedef {import('../model/Types').ModdleElement} ModdleElement
+ */
+var planeSuffix = '_plane';
- function asEdges(bounds) {
- return [[// top
- {
- x: bounds.x,
- y: bounds.y
- }, {
- x: bounds.x + (bounds.width || 0),
- y: bounds.y
- }], [// right
- {
- x: bounds.x + (bounds.width || 0),
- y: bounds.y
- }, {
- x: bounds.x + (bounds.width || 0),
- y: bounds.y + (bounds.height || 0)
- }], [// bottom
- {
- x: bounds.x,
- y: bounds.y + (bounds.height || 0)
- }, {
- x: bounds.x + (bounds.width || 0),
- y: bounds.y + (bounds.height || 0)
- }], [// left
- {
- x: bounds.x,
- y: bounds.y
- }, {
- x: bounds.x,
- y: bounds.y + (bounds.height || 0)
- }]];
- }
- /**
- * Returns the nearest line for a given point by distance
- * @param {Point} point
- * @param Array lines
- *
- * @return Array
- */
+/**
+ * Get primary shape ID for a plane.
+ *
+ * @param {Element|ModdleElement} element
+ *
+ * @return {string}
+ */
+function getShapeIdFromPlane(element) {
+ var id = element.id;
+ return removePlaneSuffix(id);
+}
- function getNearestLine(point, lines) {
- var distances = lines.map(function (l) {
- return {
- line: l,
- distance: (0, _GeometricUtil.getDistancePointLine)(point, l)
- };
- });
- var sorted = (0, _minDash.sortBy)(distances, 'distance');
- return sorted[0].line;
- }
+/**
+ * Get plane ID for a primary shape.
+ *
+ * @param {Element|ModdleElement} element
+ *
+ * @return {string}
+ */
+function getPlaneIdFromShape(element) {
+ var id = element.id;
- },{"../../../util/LabelUtil":239,"../../../util/ModelUtil":240,"../../label-editing/LabelUtil":152,"./util/GeometricUtil":195,"./util/LabelLayoutUtil":196,"diagram-js/lib/command/CommandInterceptor":250,"diagram-js/lib/layout/LayoutUtil":405,"diagram-js/lib/util/AttachUtil":416,"diagram-js/lib/util/PositionUtil":430,"inherits":438,"min-dash":646}],179:[function(require,module,exports){
- "use strict";
+ if ((0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:SubProcess')) {
+ return addPlaneSuffix(id);
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = ModelingFeedback;
+ return id;
+}
- var _ModelUtil = require("../../../util/ModelUtil");
+/**
+ * Get plane ID for primary shape ID.
+ *
+ * @param {string} id
+ *
+ * @return {string}
+ */
+function toPlaneId(id) {
+ return addPlaneSuffix(id);
+}
- var COLLAB_ERR_MSG = 'flow elements must be children of pools/participants',
- PROCESS_ERR_MSG = 'participants cannot be pasted onto a non-empty process diagram';
+/**
+ * Check wether element is plane.
+ *
+ * @param {Element|ModdleElement} element
+ *
+ * @return {boolean}
+ */
+function isPlane(element) {
+ var di = (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getDi)(element);
- function ModelingFeedback(eventBus, tooltips, translate) {
- function showError(position, message, timeout) {
- tooltips.add({
- position: {
- x: position.x + 5,
- y: position.y + 5
- },
- type: 'error',
- timeout: timeout || 2000,
- html: '' + message + '
'
- });
- }
+ return (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(di, 'bpmndi:BPMNPlane');
+}
- eventBus.on(['shape.move.rejected', 'create.rejected'], function (event) {
- var context = event.context,
- shape = context.shape,
- target = context.target;
+function addPlaneSuffix(id) {
+ return id + planeSuffix;
+}
- if ((0, _ModelUtil.is)(target, 'bpmn:Collaboration') && (0, _ModelUtil.is)(shape, 'bpmn:FlowNode')) {
- showError(event, translate(COLLAB_ERR_MSG));
- }
- });
- eventBus.on(['elements.paste.rejected'], function (event) {
- var context = event.context,
- position = context.position,
- target = context.target;
+function removePlaneSuffix(id) {
+ return id.replace(new RegExp(planeSuffix + '$'), '');
+}
- if ((0, _ModelUtil.is)(target, 'bpmn:Collaboration')) {
- showError(position, translate(COLLAB_ERR_MSG));
- }
+/***/ }),
- if ((0, _ModelUtil.is)(target, 'bpmn:Process')) {
- showError(position, translate(PROCESS_ERR_MSG), 3000);
- }
- });
- }
+/***/ "../node_modules/bpmn-js/lib/util/LabelUtil.js":
+/*!*****************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/util/LabelUtil.js ***!
+ \*****************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- ModelingFeedback.$inject = ['eventBus', 'tooltips', 'translate'];
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ DEFAULT_LABEL_SIZE: () => (/* binding */ DEFAULT_LABEL_SIZE),
+/* harmony export */ FLOW_LABEL_INDENT: () => (/* binding */ FLOW_LABEL_INDENT),
+/* harmony export */ getExternalLabelBounds: () => (/* binding */ getExternalLabelBounds),
+/* harmony export */ getExternalLabelMid: () => (/* binding */ getExternalLabelMid),
+/* harmony export */ getFlowLabelPosition: () => (/* binding */ getFlowLabelPosition),
+/* harmony export */ getLabel: () => (/* binding */ getLabel),
+/* harmony export */ getWaypointsMid: () => (/* binding */ getWaypointsMid),
+/* harmony export */ hasExternalLabel: () => (/* binding */ hasExternalLabel),
+/* harmony export */ isLabel: () => (/* reexport safe */ diagram_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.isLabel),
+/* harmony export */ isLabelExternal: () => (/* binding */ isLabelExternal),
+/* harmony export */ setLabel: () => (/* binding */ setLabel)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ModelUtil */ "../node_modules/bpmn-js/lib/util/ModelUtil.js");
+/* harmony import */ var diagram_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/util/ModelUtil */ "../node_modules/diagram-js/lib/util/ModelUtil.js");
- },{"../../../util/ModelUtil":240}],180:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = RemoveElementBehavior;
- var _inherits = _interopRequireDefault(require("inherits"));
- var _ModelUtil = require("../../../util/ModelUtil");
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
- var _LineIntersect = _interopRequireDefault(require("./util/LineIntersect"));
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- function RemoveElementBehavior(eventBus, bpmnRules, modeling) {
- _CommandInterceptor.default.call(this, eventBus);
- /**
- * Combine sequence flows when deleting an element
- * if there is one incoming and one outgoing
- * sequence flow
- */
+/**
+ * @typedef {import('diagram-js/lib/util/Types').Point} Point
+ * @typedef {import('diagram-js/lib/util/Types').Rect} Rect
+ *
+ * @typedef {import('../model/Types').Element} Element
+ * @typedef {import('../model/Types').ModdleElement} ModdleElement
+ */
+var DEFAULT_LABEL_SIZE = {
+ width: 90,
+ height: 20
+};
- this.preExecute('shape.delete', function (e) {
- var shape = e.context.shape; // only handle [a] -> [shape] -> [b] patterns
+var FLOW_LABEL_INDENT = 15;
- if (shape.incoming.length !== 1 || shape.outgoing.length !== 1) {
- return;
- }
- var inConnection = shape.incoming[0],
- outConnection = shape.outgoing[0]; // only handle sequence flows
+/**
+ * Return true if the given semantic has an external label.
+ *
+ * @param {Element} semantic
+ *
+ * @return {boolean}
+ */
+function isLabelExternal(semantic) {
+ return (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:Event') ||
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:Gateway') ||
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:DataStoreReference') ||
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:DataObjectReference') ||
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:DataInput') ||
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:DataOutput') ||
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:SequenceFlow') ||
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:MessageFlow') ||
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:Group');
+}
+
+/**
+ * Return true if the given element has an external label.
+ *
+ * @param {Element} element
+ *
+ * @return {boolean}
+ */
+function hasExternalLabel(element) {
+ return (0,diagram_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.isLabel)(element.label);
+}
- if (!(0, _ModelUtil.is)(inConnection, 'bpmn:SequenceFlow') || !(0, _ModelUtil.is)(outConnection, 'bpmn:SequenceFlow')) {
- return;
- }
+/**
+ * Get the position of a sequence flow label.
+ *
+ * @param {Point[]} waypoints
+ *
+ * @return {Point}
+ */
+function getFlowLabelPosition(waypoints) {
- if (bpmnRules.canConnect(inConnection.source, outConnection.target, inConnection)) {
- // compute new, combined waypoints
- var newWaypoints = getNewWaypoints(inConnection.waypoints, outConnection.waypoints);
- modeling.reconnectEnd(inConnection, outConnection.target, newWaypoints);
- }
- });
- }
+ // get the waypoints mid
+ var mid = waypoints.length / 2 - 1;
- (0, _inherits.default)(RemoveElementBehavior, _CommandInterceptor.default);
- RemoveElementBehavior.$inject = ['eventBus', 'bpmnRules', 'modeling']; // helpers //////////////////////
+ var first = waypoints[Math.floor(mid)];
+ var second = waypoints[Math.ceil(mid + 0.01)];
- function getDocking(point) {
- return point.original || point;
- }
+ // get position
+ var position = getWaypointsMid(waypoints);
- function getNewWaypoints(inWaypoints, outWaypoints) {
- var intersection = (0, _LineIntersect.default)(getDocking(inWaypoints[inWaypoints.length - 2]), getDocking(inWaypoints[inWaypoints.length - 1]), getDocking(outWaypoints[1]), getDocking(outWaypoints[0]));
+ // calculate angle
+ var angle = Math.atan((second.y - first.y) / (second.x - first.x));
- if (intersection) {
- return [].concat(inWaypoints.slice(0, inWaypoints.length - 1), [intersection], outWaypoints.slice(1));
- } else {
- return [getDocking(inWaypoints[0]), getDocking(outWaypoints[outWaypoints.length - 1])];
- }
- }
+ var x = position.x,
+ y = position.y;
- },{"../../../util/ModelUtil":240,"./util/LineIntersect":198,"diagram-js/lib/command/CommandInterceptor":250,"inherits":438}],181:[function(require,module,exports){
- "use strict";
+ if (Math.abs(angle) < Math.PI / 2) {
+ y -= FLOW_LABEL_INDENT;
+ } else {
+ x += FLOW_LABEL_INDENT;
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = RemoveParticipantBehavior;
+ return { x: x, y: y };
+}
- var _inherits = _interopRequireDefault(require("inherits"));
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+/**
+ * Get the middle of a number of waypoints.
+ *
+ * @param {Point[]} waypoints
+ *
+ * @return {Point}
+ */
+function getWaypointsMid(waypoints) {
- var _ModelUtil = require("../../../util/ModelUtil");
+ var mid = waypoints.length / 2 - 1;
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ var first = waypoints[Math.floor(mid)];
+ var second = waypoints[Math.ceil(mid + 0.01)];
- /**
- * BPMN specific remove behavior
- */
- function RemoveParticipantBehavior(eventBus, modeling) {
- _CommandInterceptor.default.call(this, eventBus);
- /**
- * morph collaboration diagram into process diagram
- * after the last participant has been removed
- */
+ return {
+ x: first.x + (second.x - first.x) / 2,
+ y: first.y + (second.y - first.y) / 2
+ };
+}
+/**
+ * Get the middle of the external label of an element.
+ *
+ * @param {Element} element
+ *
+ * @return {Point}
+ */
+function getExternalLabelMid(element) {
+
+ if (element.waypoints) {
+ return getFlowLabelPosition(element.waypoints);
+ } else if ((0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(element, 'bpmn:Group')) {
+ return {
+ x: element.x + element.width / 2,
+ y: element.y + DEFAULT_LABEL_SIZE.height / 2
+ };
+ } else {
+ return {
+ x: element.x + element.width / 2,
+ y: element.y + element.height + DEFAULT_LABEL_SIZE.height / 2
+ };
+ }
+}
+
+
+/**
+ * Return the bounds of an elements label, parsed from the elements DI or
+ * generated from its bounds.
+ *
+ * @param {ModdleElement} di
+ * @param {Element} element
+ *
+ * @return {Rect}
+ */
+function getExternalLabelBounds(di, element) {
- this.preExecute('shape.delete', function (context) {
- var shape = context.shape,
- parent = shape.parent; // activate the behavior if the shape to be removed
- // is a participant
+ var mid,
+ size,
+ bounds,
+ label = di.label;
- if ((0, _ModelUtil.is)(shape, 'bpmn:Participant')) {
- context.collaborationRoot = parent;
- }
- }, true);
- this.postExecute('shape.delete', function (context) {
- var collaborationRoot = context.collaborationRoot;
+ if (label && label.bounds) {
+ bounds = label.bounds;
- if (collaborationRoot && !collaborationRoot.businessObject.participants.length) {
- // replace empty collaboration with process diagram
- modeling.makeProcess();
- }
- }, true);
- }
+ size = {
+ width: Math.max(DEFAULT_LABEL_SIZE.width, bounds.width),
+ height: bounds.height
+ };
- RemoveParticipantBehavior.$inject = ['eventBus', 'modeling'];
- (0, _inherits.default)(RemoveParticipantBehavior, _CommandInterceptor.default);
+ mid = {
+ x: bounds.x + bounds.width / 2,
+ y: bounds.y + bounds.height / 2
+ };
+ } else {
- },{"../../../util/ModelUtil":240,"diagram-js/lib/command/CommandInterceptor":250,"inherits":438}],182:[function(require,module,exports){
- "use strict";
+ mid = getExternalLabelMid(element);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = ReplaceConnectionBehavior;
+ size = DEFAULT_LABEL_SIZE;
+ }
- var _minDash = require("min-dash");
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({
+ x: mid.x - size.width / 2,
+ y: mid.y - size.height / 2
+ }, size);
+}
- var _inherits = _interopRequireDefault(require("inherits"));
+/**
+ * @param {ModdleElement} semantic
+ *
+ * @returns {string}
+ */
+function getLabelAttr(semantic) {
+ if (
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:FlowElement') ||
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:Participant') ||
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:Lane') ||
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:SequenceFlow') ||
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:MessageFlow') ||
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:DataInput') ||
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:DataOutput')
+ ) {
+ return 'name';
+ }
+
+ if ((0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:TextAnnotation')) {
+ return 'text';
+ }
+
+ if ((0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:Group')) {
+ return 'categoryValueRef';
+ }
+}
+
+/**
+ * @param {ModdleElement} semantic
+ *
+ * @returns {string}
+ */
+function getCategoryValue(semantic) {
+ var categoryValueRef = semantic['categoryValueRef'];
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+ if (!categoryValueRef) {
+ return '';
+ }
- var _ModelUtil = require("../../../util/ModelUtil");
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ return categoryValueRef.value || '';
+}
- function ReplaceConnectionBehavior(eventBus, modeling, bpmnRules, injector) {
- _CommandInterceptor.default.call(this, eventBus);
+/**
+ * @param {Element} element
+ *
+ * @return {string}
+ */
+function getLabel(element) {
+ var semantic = element.businessObject,
+ attr = getLabelAttr(semantic);
- var dragging = injector.get('dragging', false);
+ if (attr) {
- function fixConnection(connection) {
- var source = connection.source,
- target = connection.target,
- parent = connection.parent; // do not do anything if connection
- // is already deleted (may happen due to other
- // behaviors plugged-in before)
+ if (attr === 'categoryValueRef') {
- if (!parent) {
- return;
- }
+ return getCategoryValue(semantic);
+ }
- var replacementType, remove;
- /**
- * Check if incoming or outgoing connections
- * can stay or could be substituted with an
- * appropriate replacement.
- *
- * This holds true for SequenceFlow <> MessageFlow.
- */
-
- if ((0, _ModelUtil.is)(connection, 'bpmn:SequenceFlow')) {
- if (!bpmnRules.canConnectSequenceFlow(source, target)) {
- remove = true;
- }
+ return semantic[attr] || '';
+ }
+}
- if (bpmnRules.canConnectMessageFlow(source, target)) {
- replacementType = 'bpmn:MessageFlow';
- }
- } // transform message flows into sequence flows, if possible
+/**
+ * @param {Element} element
+ * @param {string} text
+ *
+ * @return {Element}
+ */
+function setLabel(element, text) {
+ var semantic = element.businessObject,
+ attr = getLabelAttr(semantic);
- if ((0, _ModelUtil.is)(connection, 'bpmn:MessageFlow')) {
- if (!bpmnRules.canConnectMessageFlow(source, target)) {
- remove = true;
- }
+ if (attr) {
- if (bpmnRules.canConnectSequenceFlow(source, target)) {
- replacementType = 'bpmn:SequenceFlow';
- }
- }
+ if (attr === 'categoryValueRef') {
+ semantic['categoryValueRef'].value = text;
+ } else {
+ semantic[attr] = text;
+ }
- if ((0, _ModelUtil.is)(connection, 'bpmn:Association') && !bpmnRules.canConnectAssociation(source, target)) {
- remove = true;
- } // remove invalid connection,
- // unless it has been removed already
+ }
+ return element;
+}
- if (remove) {
- modeling.removeConnection(connection);
- } // replace SequenceFlow <> MessageFlow
+/***/ }),
- if (replacementType) {
- modeling.connect(source, target, {
- type: replacementType,
- waypoints: connection.waypoints.slice()
- });
- }
- }
+/***/ "../node_modules/bpmn-js/lib/util/ModelUtil.js":
+/*!*****************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/util/ModelUtil.js ***!
+ \*****************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- function replaceReconnectedConnection(event) {
- var context = event.context,
- connection = context.connection,
- source = context.newSource || connection.source,
- target = context.newTarget || connection.target,
- allowed,
- replacement;
- allowed = bpmnRules.canConnect(source, target);
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ getBusinessObject: () => (/* binding */ getBusinessObject),
+/* harmony export */ getDi: () => (/* binding */ getDi),
+/* harmony export */ is: () => (/* binding */ is),
+/* harmony export */ isAny: () => (/* binding */ isAny)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
- if (!allowed || allowed.type === connection.type) {
- return;
- }
- replacement = modeling.connect(source, target, {
- type: allowed.type,
- waypoints: connection.waypoints.slice()
- }); // remove old connection
+/**
+ * @typedef { import('../model/Types').Element } Element
+ * @typedef { import('../model/Types').ModdleElement } ModdleElement
+ */
- modeling.removeConnection(connection); // replace connection in context to reconnect end/start
+/**
+ * Is an element of the given BPMN type?
+ *
+ * @param {Element|ModdleElement} element
+ * @param {string} type
+ *
+ * @return {boolean}
+ */
+function is(element, type) {
+ var bo = getBusinessObject(element);
- context.connection = replacement;
+ return bo && (typeof bo.$instanceOf === 'function') && bo.$instanceOf(type);
+}
- if (dragging) {
- cleanDraggingSelection(connection, replacement);
- }
- } // monkey-patch selection saved in dragging in order to re-select it when operation is finished
+/**
+ * Return true if element has any of the given types.
+ *
+ * @param {Element|ModdleElement} element
+ * @param {string[]} types
+ *
+ * @return {boolean}
+ */
+function isAny(element, types) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.some)(types, function(t) {
+ return is(element, t);
+ });
+}
+
+/**
+ * Return the business object for a given element.
+ *
+ * @param {Element|ModdleElement} element
+ *
+ * @return {ModdleElement}
+ */
+function getBusinessObject(element) {
+ return (element && element.businessObject) || element;
+}
- function cleanDraggingSelection(oldConnection, newConnection) {
- var context = dragging.context(),
- previousSelection = context && context.payload.previousSelection,
- index; // do nothing if not dragging or no selection was present
+/**
+ * Return the di object for a given element.
+ *
+ * @param {Element} element
+ *
+ * @return {ModdleElement}
+ */
+function getDi(element) {
+ return element && element.di;
+}
+
+/***/ }),
+
+/***/ "../node_modules/bpmn-js/lib/util/PoweredByUtil.js":
+/*!*********************************************************!*\
+ !*** ../node_modules/bpmn-js/lib/util/PoweredByUtil.js ***!
+ \*********************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ BPMNIO_IMG: () => (/* binding */ BPMNIO_IMG),
+/* harmony export */ LINK_STYLES: () => (/* binding */ LINK_STYLES),
+/* harmony export */ LOGO_STYLES: () => (/* binding */ LOGO_STYLES),
+/* harmony export */ open: () => (/* binding */ open)
+/* harmony export */ });
+/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dom */ "../node_modules/min-dom/dist/index.esm.js");
+/**
+ * This file must not be changed or exchanged.
+ *
+ * @see http://bpmn.io/license for more information.
+ */
- if (!previousSelection || !previousSelection.length) {
- return;
- }
- index = previousSelection.indexOf(oldConnection);
- if (index === -1) {
- return;
- }
- previousSelection.splice(index, 1, newConnection);
- } // lifecycle hooks
-
-
- this.postExecuted('elements.move', function (context) {
- var closure = context.closure,
- allConnections = closure.allConnections;
- (0, _minDash.forEach)(allConnections, fixConnection);
- }, true);
- this.preExecute('connection.reconnect', replaceReconnectedConnection);
- this.postExecuted('element.updateProperties', function (event) {
- var context = event.context,
- properties = context.properties,
- element = context.element,
- businessObject = element.businessObject,
- connection; // remove condition on change to default
-
- if (properties.default) {
- connection = (0, _minDash.find)(element.outgoing, (0, _minDash.matchPattern)({
- id: element.businessObject.default.id
- }));
-
- if (connection) {
- modeling.updateProperties(connection, {
- conditionExpression: undefined
- });
- }
- } // remove default from source on change to conditional
+// inlined ../../resources/logo.svg
+var BPMNIO_LOGO_SVG = ' ';
+
+var BPMNIO_IMG = BPMNIO_LOGO_SVG;
+
+var LOGO_STYLES = {
+ verticalAlign: 'middle'
+};
+
+var LINK_STYLES = {
+ 'color': '#404040'
+};
+
+var LIGHTBOX_STYLES = {
+ 'zIndex': '1001',
+ 'position': 'fixed',
+ 'top': '0',
+ 'left': '0',
+ 'right': '0',
+ 'bottom': '0'
+};
+
+var BACKDROP_STYLES = {
+ 'width': '100%',
+ 'height': '100%',
+ 'background': 'rgba(40,40,40,0.2)'
+};
+
+var NOTICE_STYLES = {
+ 'position': 'absolute',
+ 'left': '50%',
+ 'top': '40%',
+ 'transform': 'translate(-50%)',
+ 'width': '260px',
+ 'padding': '10px',
+ 'background': 'white',
+ 'boxShadow': '0 1px 4px rgba(0,0,0,0.3)',
+ 'fontFamily': 'Helvetica, Arial, sans-serif',
+ 'fontSize': '14px',
+ 'display': 'flex',
+ 'lineHeight': '1.3'
+};
+
+var LIGHTBOX_MARKUP =
+ '';
+
+
+var lightbox;
+
+function createLightbox() {
+ lightbox = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.domify)(LIGHTBOX_MARKUP);
+
+ (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.assignStyle)(lightbox, LIGHTBOX_STYLES);
+ (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.assignStyle)((0,min_dom__WEBPACK_IMPORTED_MODULE_0__.query)('svg', lightbox), LOGO_STYLES);
+ (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.assignStyle)((0,min_dom__WEBPACK_IMPORTED_MODULE_0__.query)('.backdrop', lightbox), BACKDROP_STYLES);
+ (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.assignStyle)((0,min_dom__WEBPACK_IMPORTED_MODULE_0__.query)('.notice', lightbox), NOTICE_STYLES);
+ (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.assignStyle)((0,min_dom__WEBPACK_IMPORTED_MODULE_0__.query)('.link', lightbox), LINK_STYLES, {
+ 'margin': '15px 20px 15px 10px',
+ 'alignSelf': 'center'
+ });
+}
+
+function open() {
+
+ if (!lightbox) {
+ createLightbox();
+
+ min_dom__WEBPACK_IMPORTED_MODULE_0__.delegate.bind(lightbox, '.backdrop', 'click', function(event) {
+ document.body.removeChild(lightbox);
+ });
+ }
+
+ document.body.appendChild(lightbox);
+}
+
+
+/***/ }),
+
+/***/ "../node_modules/bpmnlint/lib/resolver/static-resolver.js":
+/*!****************************************************************!*\
+ !*** ../node_modules/bpmnlint/lib/resolver/static-resolver.js ***!
+ \****************************************************************/
+/***/ ((module) => {
+
+function StaticResolver(cache) {
+ this.cache = cache;
+}
+
+module.exports = StaticResolver;
+
+
+StaticResolver.prototype.resolveRule = function(pkg, ruleName) {
+ return this.resolve('rule', pkg, ruleName);
+};
+
+StaticResolver.prototype.resolveConfig = function(pkg, configName) {
+ return this.resolve('config', pkg, configName);
+};
+
+StaticResolver.prototype.resolve = function(type, pkg, name) {
+ const id = `${pkg}/${name}`;
+
+ const resolved = this.cache[`${type}:${id}`];
+
+ if (!resolved) {
+ throw new Error(`unknown ${type} <${id}>`);
+ }
+
+ return resolved;
+};
+
+/***/ }),
+
+/***/ "../node_modules/css-loader/dist/cjs.js!../node_modules/@bpmn-io/properties-panel/assets/properties-panel.css":
+/*!********************************************************************************************************************!*\
+ !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/@bpmn-io/properties-panel/assets/properties-panel.css ***!
+ \********************************************************************************************************************/
+/***/ ((module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../css-loader/dist/runtime/sourceMaps.js */ "../node_modules/css-loader/dist/runtime/sourceMaps.js");
+/* harmony import */ var _css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ "../node_modules/css-loader/dist/runtime/api.js");
+/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
+/* harmony import */ var _css_loader_dist_cjs_js_dist_assets_properties_panel_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! -!../../../css-loader/dist/cjs.js!../dist/assets/properties-panel.css */ "../node_modules/css-loader/dist/cjs.js!../node_modules/@bpmn-io/properties-panel/dist/assets/properties-panel.css");
+// Imports
+
+
+
+var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
+___CSS_LOADER_EXPORT___.i(_css_loader_dist_cjs_js_dist_assets_properties_panel_css__WEBPACK_IMPORTED_MODULE_2__["default"]);
+// Module
+___CSS_LOADER_EXPORT___.push([module.id, `/**
+ * Compatibility with @bpmn-io/properties-panel < v3.4.0
+ */`, "",{"version":3,"sources":["webpack://./../node_modules/@bpmn-io/properties-panel/assets/properties-panel.css"],"names":[],"mappings":"AAAA;;EAEE","sourcesContent":["/**\n * Compatibility with @bpmn-io/properties-panel < v3.4.0\n */\n@import '../dist/assets/properties-panel.css'"],"sourceRoot":""}]);
+// Exports
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
- if (properties.conditionExpression && businessObject.sourceRef.default === businessObject) {
- modeling.updateProperties(element.source, {
- default: undefined
- });
- }
- });
- }
+/***/ }),
- (0, _inherits.default)(ReplaceConnectionBehavior, _CommandInterceptor.default);
- ReplaceConnectionBehavior.$inject = ['eventBus', 'modeling', 'bpmnRules', 'injector'];
+/***/ "../node_modules/css-loader/dist/cjs.js!../node_modules/@bpmn-io/properties-panel/dist/assets/properties-panel.css":
+/*!*************************************************************************************************************************!*\
+ !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/@bpmn-io/properties-panel/dist/assets/properties-panel.css ***!
+ \*************************************************************************************************************************/
+/***/ ((module, __webpack_exports__, __webpack_require__) => {
- },{"../../../util/ModelUtil":240,"diagram-js/lib/command/CommandInterceptor":250,"inherits":438,"min-dash":646}],183:[function(require,module,exports){
- "use strict";
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../css-loader/dist/runtime/sourceMaps.js */ "../node_modules/css-loader/dist/runtime/sourceMaps.js");
+/* harmony import */ var _css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../css-loader/dist/runtime/api.js */ "../node_modules/css-loader/dist/runtime/api.js");
+/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
+// Imports
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = ReplaceElementBehaviour;
- var _inherits = _interopRequireDefault(require("inherits"));
+var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
+// Module
+___CSS_LOADER_EXPORT___.push([module.id, `/**
+ * Theming
+ */
+ .bio-properties-panel,
+ .djs-parent {
+ --color-grey-225-10-15: hsl(225, 10%, 15%);
+ --color-grey-225-10-35: hsl(225, 10%, 35%);
+ --color-grey-225-10-55: hsl(225, 10%, 55%);
+ --color-grey-225-10-75: hsl(225, 10%, 75%);
+ --color-grey-225-10-80: hsl(225, 10%, 80%);
+ --color-grey-225-10-85: hsl(225, 10%, 85%);
+ --color-grey-225-10-90: hsl(225, 10%, 90%);
+ --color-grey-225-10-95: hsl(225, 10%, 95%);
+ --color-grey-225-10-97: hsl(225, 10%, 97%);
+ --color-grey-0-0-22: hsl(0, 0%, 22%);
+
+ --color-blue-205-100-35: hsl(205, 100%, 35%);
+ --color-blue-205-100-45: hsl(205, 100%, 45%);
+ --color-blue-205-100-50: hsl(205, 100%, 50%);
+ --color-blue-205-100-85: hsl(205, 100%, 85%);
+ --color-blue-205-100-95: hsl(205, 100%, 95%);
+ --color-blue-219-99-53: hsl(219, 99%, 53%);
+ --color-blue-218-100-74: hsl(218, 100%, 74%);
+ --color-green-150-86-44: hsl(150, 86%, 44%);
+
+ --color-red-360-100-40: hsl(360, 100%, 40%);
+ --color-red-360-100-45: hsl(360, 100%, 45%);
+ --color-red-360-100-92: hsl(360, 100%, 92%);
+ --color-red-360-100-97: hsl(360, 100%, 97%);
+ --color-white: white;
+ --color-black: black;
+ --color-transparent: transparent;
+
+}
+
+.bio-properties-panel {
+ --text-base-color: var(--color-grey-225-10-15);
+ --text-error-color: var(--color-red-360-100-45);
+ --link-color: var(--color-blue-205-100-50);
+
+ --description-color: var(--color-grey-225-10-35);
+ --description-code-background-color: var(--color-grey-225-10-97);
+ --description-code-border-color: var(--color-grey-225-10-85);
+ --description-list-item-color: var(--color-grey-225-10-35);
+
+ --placeholder-color: var(--color-grey-225-10-35);
+ --placeholder-background-color: var(--color-grey-225-10-95);
+
+ --header-background-color: var(--color-grey-225-10-95);
+ --header-icon-fill-color: var(--color-grey-225-10-15);
+ --header-bottom-border-color: var(--color-grey-225-10-75);
+
+ --group-background-color: var(--color-white);
+ --group-bottom-border-color: var(--color-grey-225-10-75);
+
+ --sticky-group-background-color: var(--color-grey-225-10-95);
+ --sticky-group-bottom-border-color: var(--color-grey-225-10-75);
+
+ --add-entry-fill-color: var(--color-grey-225-10-35);
+ --add-entry-hover-fill-color: var(--color-white);
+ --add-entry-hover-background-color: var(--color-blue-205-100-50);
+ --add-entry-label-color: var(--color-white);
+
+ --remove-entry-fill-color: var(--color-red-360-100-45);
+ --remove-entry-hover-background-color: var(--color-red-360-100-92);
+
+ --arrow-fill-color: var(--color-grey-225-10-35);
+ --arrow-hover-background-color: var(--color-grey-225-10-95);
+
+ --dot-color: var(--color-grey-225-10-35);
+ --dot-color-error: var(--color-red-360-100-45);
+
+ --list-badge-color: var(--color-white);
+ --list-badge-background-color: var(--color-grey-225-10-35);
+
+ --input-background-color: var(--color-grey-225-10-97);
+ --input-border-color: var(--color-grey-225-10-75);
+
+ --input-focus-background-color: var(--color-blue-205-100-95);
+ --input-focus-border-color: var(--color-blue-205-100-50);
+
+ --input-error-background-color: var(--color-red-360-100-97);
+ --input-error-border-color: var(--color-red-360-100-45);
+ --input-error-focus-border-color: var(--color-red-360-100-45);
+
+ --input-disabled-color: var(--color-grey-225-10-55);
+ --input-disabled-background-color: var(--color-grey-225-10-97);
+ --input-disabled-border-color: var(--color-grey-225-10-90);
+
+ --toggle-switch-on-background-color: var(--color-blue-205-100-50);
+ --toggle-switch-off-background-color: var(--color-grey-225-10-75);
+ --toggle-switch-switcher-background-color: var(--color-white);
+
+ --side-line-background-color: var(--color-grey-225-10-35);
+ --side-line-extension-background-color: var(--color-grey-225-10-35);
+
+ --list-entry-dot-background-color: var(--color-grey-225-10-35);
+ --list-entry-header-button-fill-color: var(--color-grey-225-10-35);
+ --list-entry-add-entry-empty-background-color: var(--color-blue-205-100-50);
+ --list-entry-add-entry-empty-hover-background-color: var(--color-blue-205-100-45);
+ --list-entry-add-entry-label-color: var(--color-white);
+ --list-entry-add-entry-background-color: var(--color-blue-205-100-50);
+ --list-entry-add-entry-fill-color: var(--color-white);
+
+ --dropdown-item-background-color: var(--color-white);
+ --dropdown-item-hover-background-color: var(--color-grey-225-10-95);
+ --dropdown-separator-background-color: var(--color-grey-225-10-75);
+
+ --feel-background-color: transparent;
+ --feel-active-color: var(--color-blue-205-100-45);
+ --feel-inactive-color: var(--color-grey-225-10-35);
+ --feel-hover-color: var(--color-grey-225-10-15);
+ --feel-hover-background-color: var(--color-grey-225-10-97);
+ --feel-active-background-color: transparent;
+ --feel-required-color: var(--color-grey-225-10-55);
+ --feel-open-popup-color: hsla(0, 0%, 32%, 1);
+ --feel-open-popup-background-color: var(--color-white);
+ --feel-open-popup-hover-color: hsla(219, 99%, 53%, 1);
+
+ --feel-indicator-background-color: var(--color-grey-225-10-90);
+
+ --feelers-select-color: var(--color-blue-205-100-85);
+
+ --text-size-base: 16px;
+ --text-size-small: 14px;
+ --text-size-smallest: 13px;
+ --text-line-height: 21px;
+ --line-height-condensed: 17px;
+
+ --font-family: sans-serif;
+ --font-family-monospace: monospace;
+
+ display: flex;
+ flex-direction: column;
+ flex: 1;
+ position: relative;
+ height: 100%;
+ width: 100%;
+ overflow: hidden;
+}
+
+.bio-properties-panel {
+ color: var(--text-base-color);
+}
+
+.bio-properties-panel * {
+ font-size: var(--text-size-base);
+ line-height: var(--text-line-height);
+ font-weight: 400;
+ box-sizing: border-box;
+}
+
+.bio-properties-panel {
+ font-family: var(--font-family);
+}
+
+/**
+ * Placeholder (empty, multi select, ...)
+ */
+.bio-properties-panel-placeholder {
+ position: absolute;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ background-color: var(--placeholder-background-color);
+}
+
+.bio-properties-panel-placeholder-text {
+ color: var(--placeholder-color);
+ font-size: var(--text-size-base);
+ text-align: center;
+ margin: 12px 48px;
+}
+
+/**
+ * Header
+ */
+.bio-properties-panel-header {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ font-size: var(--text-size-base);
+ padding: 16px 10px;
+ background-color: var(--header-background-color);
+ border-bottom: 1px solid var(--header-bottom-border-color);
+ width: 100%;
+ z-index: 10;
+ max-height: 64px;
+ overflow: hidden;
+}
+
+.bio-properties-panel-header-icon {
+ fill: var(--header-icon-fill-color);
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: center;
+ width: 32px;
+ height: 32px;
+}
+
+.bio-properties-panel-header-labels {
+ overflow: hidden;
+ margin-left: 12px;
+ user-select: none;
+}
+
+.bio-properties-panel-header-type {
+ font-size: var(--text-size-smallest);
+ font-weight: 600;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ text-transform: uppercase;
+}
+
+.bio-properties-panel-header-label {
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ margin-top: -6px;
+}
+
+.bio-properties-panel-header-actions {
+ margin-left: auto;
+ margin-top: auto;
+}
+
+/**
+ * Scroll container
+ */
+.bio-properties-panel-scroll-container {
+ overflow-y: auto;
+ overflow-x: hidden;
+ flex: 1;
+}
+
+/**
+ * Groups
+ */
+.bio-properties-panel-group {
+ background-color: var(--group-background-color);
+ border-bottom: 1px solid var(--group-bottom-border-color);
+ position: relative;
+}
+
+.bio-properties-panel-group-header {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ font-size: var(--text-size-base);
+ height: 32px;
+ user-select: none;
+ justify-content: space-between;
+ margin-bottom: -1px; /* avoid double borders */
+ position: relative; /* browsers not supporting sticky */
+ position: -webkit-sticky; /* for safari */
+ position: sticky;
+ top: 0;
+ z-index: 10;
+}
+
+.bio-properties-panel-group-header .bio-properties-panel-group-header-title {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ margin: 1px 12px 0;
+}
+
+.bio-properties-panel-group-header.open .bio-properties-panel-group-header-title {
+ font-weight: 500;
+}
+
+.bio-properties-panel-group-header.sticky {
+ background-color: var(--sticky-group-background-color);
+ border-bottom: 1px solid var(--sticky-group-bottom-border-color);
+}
+
+.bio-properties-panel-group-header-buttons {
+ display: flex;
+}
+
+.bio-properties-panel-group-header-buttons .bio-properties-panel-group-header-button {
+ display: inline-flex;
+ justify-content: center;
+ align-items: center;
+ align-self: center;
+ height: 22px;
+ line-height: 22px;
+ min-width: 22px;
+ margin: 5px;
+ padding: 0 3px;
+ border: none;
+ background: none;
+}
+
+.bio-properties-panel-group-header-buttons .bio-properties-panel-group-header-buttons:last-child {
+ margin-right: 0;
+}
+
+.bio-properties-panel-add-entry {
+ fill: var(--add-entry-fill-color);
+ border-radius: 11px;
+}
+
+.bio-properties-panel-group-header.empty .bio-properties-panel-add-entry {
+ margin-right: 69px;
+}
+
+.bio-properties-panel-group-header.empty .bio-properties-panel-add-entry:hover {
+ margin-right: 19px;
+}
+
+.bio-properties-panel-group-header.empty .bio-properties-panel-add-entry-label {
+ display: none;
+ color: var(--add-entry-label-color);
+ padding: 0 6px 0 2px;
+}
+
+.bio-properties-panel-group-header-button.bio-properties-panel-add-entry:hover {
+ background-color: var(--add-entry-hover-background-color);
+ fill: var(--add-entry-hover-fill-color);
+}
+
+.bio-properties-panel-group-header-button.bio-properties-panel-add-entry:hover .bio-properties-panel-add-entry-label {
+ display: block;
+}
+
+.bio-properties-panel-group-entries {
+ display: none;
+}
+
+.bio-properties-panel-group-entries.open {
+ display: block;
+}
+
+.bio-properties-panel-arrow {
+ display: flex;
+ justify-content: center;
+ text-align: center;
+ fill: var(--arrow-fill-color);
+ min-width: 22px;
+ border-radius: 11px;
+ border: none;
+ background: none;
+}
+
+.bio-properties-panel-arrow:hover {
+ background-color: var(--arrow-hover-background-color);
+}
+
+.bio-properties-panel-arrow-down {
+ transform: rotate(90deg);
+}
+
+.bio-properties-panel-dot {
+ align-self: center;
+ height: 8px;
+ min-width: 8px;
+ border-radius: 50%;
+ margin: 12px;
+ background-color: var(--dot-color);
+}
+
+.bio-properties-panel-dot--error {
+ --dot-color: var(--dot-color-error);
+}
+
+/**
+ * Lists
+ */
+.bio-properties-panel-list {
+ display: none;
+}
+
+.bio-properties-panel-list.open {
+ display: block;
+ margin-bottom: 6px;
+ padding-bottom: 2px;
+}
+
+.bio-properties-panel-list-badge {
+ height: 22px;
+ min-width: 22px;
+ color: var(--list-badge-color);
+ border-radius: 11px;
+ font-size: var(--text-size-small);
+ line-height: 22px;
+ text-align: center;
+ user-select: none;
+ padding: 0 5px;
+ margin: 5px;
+ background-color: var(--list-badge-background-color);
+}
+
+.bio-properties-panel-list-badge--error {
+ --list-badge-background-color: var(--dot-color-error);
+}
+
+/**
+ * Basic entries
+ */
+.bio-properties-panel-entry {
+ margin: 2px 32px 6px 12px;
+}
+
+.bio-properties-panel-entry:last-child {
+ padding-bottom: 10px;
+}
+
+.bio-properties-panel-label {
+ display: block;
+ font-size: var(--text-size-small);
+ margin: 2px 0 1px;
+}
+
+.bio-properties-panel-description,
+.bio-properties-panel-description p,
+.bio-properties-panel-description span,
+.bio-properties-panel-description div {
+ color: var(--description-color);
+ display: block;
+ margin: 2px 0 4px;
+ line-height: var(--line-height-condensed);
+ font-weight: 400;
+ font-size: var(--text-size-small);
+}
+
+.bio-properties-panel-description code {
+ color: var(--description-color);
+ font-family: var(--font-family);
+ font-size: var(--text-size-small);
+ line-height: var(--line-height-condensed);
+ padding: 0 2px;
+ background-color: var(--description-code-background-color);
+ border: 1px solid var(--description-code-border-color);
+ border-radius: 3px;
+}
+
+.bio-properties-panel-description pre code {
+ width: 100%;
+ display: block;
+ overflow-x: auto;
+ padding: 4px 6px;
+ font-family: var(--font-family-monospace);
+}
+
+.bio-properties-panel-description ul {
+ padding: 0;
+ margin: 0 0 0 12px;
+ list-style-type: disc;
+}
+
+.bio-properties-panel-description li {
+ color: var(--description-list-item-color);
+ margin: 0 0 0 12px;
+}
+
+.bio-properties-panel-description a {
+ color: var(--link-color);
+ font-size: var(--text-size-small);
+ text-decoration: underline;
+}
+
+.bio-properties-panel-feelers-editor.bio-properties-panel-input {
+ padding: 0;
+}
+
+.bio-properties-panel-feelers-input .cm-editor
+{
+ min-height: 32px;
+ max-height: 215px;
+ background-color: transparent;
+}
+
+.bio-properties-panel-feelers-editor .cm-editor.cm-focused,
+.bio-properties-panel-feelers-input .cm-editor.cm-focused {
+ outline: none;
+}
+
+.bio-properties-panel-input {
+ padding: 3px 6px 2px;
+ border: 1px solid var(--input-border-color);
+ border-radius: 2px;
+ background-color: var(--input-background-color);
+ font-size: var(--text-size-base);
+ font-family: inherit;
+}
+
+.bio-properties-panel-input[type=number],
+select.bio-properties-panel-input,
+textarea.bio-properties-panel-input,
+.bio-properties-panel-input[type=text] {
+ display: block;
+ width: 100%;
+}
+
+textarea.bio-properties-panel-input {
+ min-height: 28px;
+}
+
+.bio-properties-panel-input:focus,
+.bio-properties-panel-input:focus-within {
+ outline: none;
+ background-color: var(--input-focus-background-color);
+ border: 1px solid var(--input-focus-border-color);
+}
+
+.bio-properties-panel-textfield:focus-within,
+.bio-properties-panel-feel-entry:focus-within {
+ --input-background-color: var(--input-focus-background-color);
+ --input-border-color: var(--input-focus-border-color);
+}
+
+.bio-properties-panel-input:disabled {
+ border-color: var(--input-disabled-border-color);
+ background-color: var(--input-disabled-background-color);
+ color: var(--input-disabled-color);
+}
+
+select.bio-properties-panel-input {
+ padding: 4px 6px;
+}
+
+.bio-properties-panel-input-monospace {
+ font-family: var(--font-family-monospace);
+}
+
+.bio-properties-panel-input[type="checkbox"], .bio-properties-panel-input[type="radio"] {
+ margin: 0;
+ vertical-align: middle;
+}
+
+.bio-properties-panel-input[type="checkbox"]:focus {
+ outline: 2px solid var(--input-focus-border-color);
+ outline-offset: 0;
+}
+
+.bio-properties-panel-checkbox > .bio-properties-panel-label {
+ display: inline-block;
+ font-size: var(--text-size-base);
+ margin-left: 6px;
+ margin-top: auto;
+ vertical-align: middle;
+}
+
+.bio-properties-panel-checkbox-entry + .bio-properties-panel-checkbox-entry {
+ margin-top: -8px;
+}
+
+.bio-properties-panel-checkbox-entry > .bio-properties-panel-description {
+ margin-left: 18px;
+}
+
+textarea.bio-properties-panel-input {
+ resize: vertical;
+}
+
+.bio-properties-panel-entry.has-error .bio-properties-panel-input,
+.bio-properties-panel-entry.has-error .bio-properties-panel-feel-editor__open-popup-placeholder {
+ border-color: var(--input-error-border-color);
+ background-color: var(--input-error-background-color);
+}
+
+.bio-properties-panel-entry.has-error .bio-properties-panel-feel-indicator {
+ border-color: var(--input-error-border-color);
+}
+
+.bio-properties-panel-entry.has-error .bio-properties-panel-input:focus,
+.bio-properties-panel-entry.has-error .bio-properties-panel-feel-indicator:focus {
+ border-color: var(--input-error-focus-border-color);
+}
+
+.bio-properties-panel-entry .bio-properties-panel-error {
+ color: var(--text-error-color);
+ margin: 4px 0;
+ font-size: var(--text-size-small);
+}
+
+.bio-properties-panel-simple {
+ width: 100%;
+ margin-right: 8px;
+}
+
+.bio-properties-panel-simple + .bio-properties-panel-remove-entry {
+ margin: auto;
+}
+
+/**
+ * Toggle Switch
+ */
+.bio-properties-panel-toggle-switch-entry + .bio-properties-panel-toggle-switch-entry {
+ margin-top: -8px;
+}
+
+.bio-properties-panel-toggle-switch-entry > .bio-properties-panel-description {
+ margin-left: 38px;
+}
+
+.bio-properties-panel-toggle-switch .bio-properties-panel-field-wrapper {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+}
+
+.bio-properties-panel-toggle-switch.inline {
+ display: flex;
+ flex-direction: row;
+}
+
+.bio-properties-panel-toggle-switch.inline .bio-properties-panel-field-wrapper {
+ margin-left: auto;
+}
+
+.bio-properties-panel-toggle-switch > .bio-properties-panel-label {
+ font-size: var(--text-size-base);
+}
+
+.bio-properties-panel-toggle-switch.inline > .bio-properties-panel-label {
+ font-size: var(--text-size-small);
+}
+
+.bio-properties-panel-toggle-switch .bio-properties-panel-toggle-switch__label {
+ margin: 0;
+ margin-left: 6px;
+ font-size: var(--text-size-base);
+}
+
+.bio-properties-panel-toggle-switch .bio-properties-panel-toggle-switch__switcher {
+ position: relative;
+ width: 32px;
+ height: 16px;
+}
+
+.bio-properties-panel-toggle-switch .bio-properties-panel-toggle-switch__switcher:focus-within {
+ outline: 2px solid var(--input-focus-border-color);
+ outline-offset: 1px;
+}
+
+.bio-properties-panel-toggle-switch .bio-properties-panel-toggle-switch__switcher input[type='checkbox'] {
+ opacity: 0;
+ width: 0;
+ height: 0;
+}
+
+.bio-properties-panel-toggle-switch .bio-properties-panel-toggle-switch__switcher .bio-properties-panel-toggle-switch__slider {
+ position: absolute;
+ cursor: pointer;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background-color: var(--toggle-switch-off-background-color);
+ -webkit-transition: 0.4s;
+ transition: 0.4s;
+ border-radius: 34px;
+}
+
+.bio-properties-panel-toggle-switch .bio-properties-panel-toggle-switch__switcher .bio-properties-panel-toggle-switch__slider:before {
+ position: absolute;
+ content: "";
+ height: 12px;
+ width: 12px;
+ left: 2px;
+ bottom: 2px;
+ background-color: var(--toggle-switch-switcher-background-color);
+ -webkit-transition: 0.4s;
+ transition: 0.4s;
+ border-radius: 50%;
+}
+
+.bio-properties-panel-toggle-switch .bio-properties-panel-toggle-switch__switcher input[type='checkbox']:checked + .bio-properties-panel-toggle-switch__slider {
+ background-color: var(--toggle-switch-on-background-color);
+ box-shadow: 0 0 1px ;
+}
+
+.bio-properties-panel-toggle-switch .bio-properties-panel-toggle-switch__switcher input[type='checkbox']:checked + .bio-properties-panel-toggle-switch__slider:before {
+ -webkit-transform: translateX(16px);
+ -ms-transform: translateX(16px);
+ transform: translateX(16px);
+}
+
+/**
+ * Collapsible entries
+ */
+.bio-properties-panel-collapsible-entry-entries {
+ position: relative;
+ display: none;
+}
+
+.bio-properties-panel-collapsible-entry-entries .bio-properties-panel-entry:last-child {
+ padding-bottom: 0;
+}
+
+.bio-properties-panel-collapsible-entry-entries.open {
+ display: block;
+}
+
+.bio-properties-panel-collapsible-entry-entries {
+ padding-left: 20px;
+ margin-bottom: 10px;
+ position: relative;
+ display: none;
+}
+
+.bio-properties-panel-collapsible-entry-header {
+ position: relative;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ overflow: hidden;
+}
+
+.bio-properties-panel-collapsible-entry-header .bio-properties-panel-collapsible-entry-header-title {
+ padding: 2px 24px 2px 32px;
+ font-size: var(--text-size-base);
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ user-select: none;
+}
+
+.bio-properties-panel-collapsible-entry-arrow {
+ position: absolute;
+ top: 2px;
+ left: 6px;
+ padding: 0 3px;
+ height: 22px;
+ display: inline-flex;
+ justify-content: center;
+ align-items: center;
+ align-self: center;
+}
+
+.bio-properties-panel-remove-entry {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-right: 5px;
+ padding: 0;
+ width: 22px;
+ height: 22px;
+ fill: var(--remove-entry-fill-color);
+ border-radius: 50%;
+ border: none;
+ background: none;
+ visibility: hidden;
+}
+
+.bio-properties-panel-remove-entry:hover {
+ background-color: var(--remove-entry-hover-background-color);
+}
+
+.bio-properties-panel-list-entry-item:hover .bio-properties-panel-remove-list-entry,
+.bio-properties-panel-collapsible-entry:hover > .bio-properties-panel-collapsible-entry-header .bio-properties-panel-remove-entry,
+.bio-properties-panel-collapsible-entry:focus-within > .bio-properties-panel-collapsible-entry-header .bio-properties-panel-remove-entry
+{
+ visibility: visible;
+}
+
+/* Side line */
+.bio-properties-panel-collapsible-entry-entries::before {
+ content: "";
+ position: absolute;
+ left: 16px;
+ width: 2px;
+ top: -6px;
+ bottom: 12px;
+ background-color: var(--side-line-background-color);
+ border-radius: 1px;
+}
+
+/* Side line extension for non-list entry or open list entry positioned as the last one. */
+.bio-properties-panel-collapsible-entry-entries .bio-properties-panel-entry:not(.bio-properties-panel-list-entry):last-child,
+.bio-properties-panel-list-entry.open:last-child {
+ position: relative;
+}
+
+.bio-properties-panel-collapsible-entry-entries .bio-properties-panel-entry:not(.bio-properties-panel-list-entry):last-child::after,
+.bio-properties-panel-list-entry.open:last-child::after {
+ content: "";
+ position: absolute;
+ left: -16px;
+ width: 2px;
+ top: 0;
+ bottom: -4px;
+ background-color: var(--side-line-extension-background-color);
+ border-radius: 1px;
+}
+
+.bio-properties-panel-list-entry-item .bio-properties-panel-collapsible-entry-entries .bio-properties-panel-entry:last-child::after {
+ left: -18px;
+}
+
+/*
+ * List entry
+ */
+.bio-properties-panel-list-entry {
+ position: relative;
+ margin-right: 5px;
+ margin-bottom: 0;
+}
+
+.bio-properties-panel-list-entry .bio-properties-panel-entry {
+ margin-right: 0;
+}
+
+.bio-properties-panel-list-entry-header {
+ position: relative;
+ overflow: hidden;
+ display: flex;
+ justify-content: space-between;
+ height: 32px;
+}
+
+/* Nested list dot */
+.bio-properties-panel-list-entry::before {
+ content: "";
+ width: 8px;
+ height: 8px;
+ position: absolute;
+ left: -19px;
+ top: 13px;
+ border-radius: 50%;
+ background-color: var(--list-entry-dot-background-color);
+}
+
+.bio-properties-panel-list-entry-header-title {
+ display: block;
+ margin: auto 0;
+ padding: 2px 0;
+ font-size: var(--text-size-base);
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.bio-properties-panel-list-entry-header-title.open {
+ font-weight: 500;
+}
+
+.bio-properties-panel-list-entry-header-buttons {
+ display: flex;
+ align-items: center;
+}
+
+.bio-properties-panel-list-entry-header-buttons > button {
+ display: inline-flex;
+ justify-content: center;
+ align-items: center;
+ align-self: center;
+ height: 22px;
+ line-height: 22px;
+ min-width: 22px;
+ margin: 5px;
+ padding: 0 3px;
+ border: none;
+ background: none;
+ fill: var(--list-entry-header-button-fill-color);
+}
+
+.bio-properties-panel-list-entry-header-buttons > :last-child {
+ margin-right: 0;
+}
+
+.bio-properties-panel-list-entry-items {
+ padding: 0;
+ margin: 0;
+
+ list-style: none;
+}
+
+.bio-properties-panel-list-entry-items:not(.open) {
+ display: none;
+}
+
+.bio-properties-panel-list-entry-item {
+ display: flex;
+ justify-content: space-between;
+}
+
+.bio-properties-panel-list-entry-item .bio-properties-panel-remove-entry {
+ margin-right: 1px;
+}
+
+.bio-properties-panel-list-entry-item .bio-properties-panel-collapsible-entry {
+ width: 100%;
+ margin-right: 4px;
+}
+
+.bio-properties-panel-list-entry-item .bio-properties-panel-collapsible-entry-header {
+ margin-left: -8px;
+}
+
+.bio-properties-panel-list-entry-item .bio-properties-panel-collapsible-entry-arrow {
+ left: 2px;
+}
+
+.bio-properties-panel-list-entry-item .bio-properties-panel-collapsible-entry-header-title {
+ padding-left: 30px;
+}
+
+.bio-properties-panel-list-entry-item .bio-properties-panel-collapsible-entry-entries {
+ padding-left: 10px;
+}
+
+.bio-properties-panel-list-entry-item .bio-properties-panel-collapsible-entry-entries::before {
+ left: 4px;
+}
+
+.bio-properties-panel-list-entry.empty .bio-properties-panel-add-entry {
+ margin-right: 16px;
+ padding-left: 6px;
+}
+
+.bio-properties-panel-list-entry.empty .bio-properties-panel-add-entry-label {
+ color: var(--list-entry-add-entry-label-color);
+ padding: 4px 6px 3px 2px;
+}
+
+.bio-properties-panel-list-entry-header-buttons .bio-properties-panel-add-entry:hover {
+ background-color: var(--list-entry-add-entry-background-color);
+ fill: var(--list-entry-add-entry-fill-color);
+}
+
+.bio-properties-panel-list-entry-item .bio-properties-panel-simple .bio-properties-panel-input {
+ border-radius: 0;
+ margin-bottom: -2px;
+}
+
+.bio-properties-panel-list-entry-item:first-child .bio-properties-panel-simple .bio-properties-panel-input {
+ border-top-left-radius: 2px;
+ border-top-right-radius: 2px;
+}
+
+.bio-properties-panel-list-entry-item:last-child .bio-properties-panel-simple .bio-properties-panel-input {
+ border-bottom-left-radius: 2px;
+ border-bottom-right-radius: 2px;
+}
+
+.bio-properties-panel-dropdown-button {
+ position: relative;
+
+ --dropdown-button-margin: 5px;
+}
+
+.bio-properties-panel-dropdown-button:not(.open) .bio-properties-panel-dropdown-button__menu {
+ display: none;
+}
+
+.bio-properties-panel-dropdown-button__menu {
+ min-width: calc(100% - var(--dropdown-button-margin) * 2);
+ max-width: 240px;
+
+ position: absolute;
+ top: calc(100% - var(--dropdown-button-margin));
+ right: var(--dropdown-button-margin);
+ z-index: 101;
+
+ background-color: var(--dropdown-item-background-color);
+
+ padding: 8px 0;
+
+ box-shadow: 0 1px 4px 0 var(--color-grey-225-10-85), 0 2px 16px 0 var(--color-grey-225-10-75)
+}
+
+.bio-properties-panel-dropdown-button__menu-item {
+ display: block;
+ width: 100%;
+ padding: 4px 12px;
+
+ font-size: var(--text-size-small);
+ appearance: revert;
+ border: unset;
+ background: unset;
+ text-align: unset;
+}
+
+.bio-properties-panel-dropdown-button__menu-item--separator {
+ width: 100%;
+ height: 1px;
+
+ padding: 0;
+ margin: 8px 0;
+
+ background-color: var(--dropdown-separator-background-color);
+}
+
+.bio-properties-panel-dropdown-button__menu-item--actionable {
+ font-size: var(--text-size-base);
+}
+
+.bio-properties-panel-dropdown-button__menu-item--actionable:hover {
+ background-color: var(--dropdown-item-hover-background-color);
+}
+
+.bio-properties-panel-feel-input {
+ position: relative;
+}
+
+.bio-properties-panel-feel-input input {
+ padding-right: 2em
+}
+
+.bio-properties-panel-feel-entry .bio-properties-panel-label {
+ display: flex;
+}
+
+.bio-properties-panel-feel-icon {
+ display: inline-flex;
+ height: 18px;
+ width: 22px;
+ vertical-align: text-bottom;
+ padding: 0;
+ margin: 0 3px;
+ align-items: center;
+ align-self: center;
+ justify-content: center;
+ border: none;
+ background: none;
+ border-radius: 3px;
+}
+
+.bio-properties-panel-feel-icon.optional {
+ cursor: pointer;
+ background: var(--feel-background-color);
+}
+
+.bio-properties-panel-feel-icon svg * {
+ fill: var(--feel-inactive-color);
+}
+
+.bio-properties-panel-feel-icon:hover {
+ background: var(--feel-hover-background-color);
+}
+
+.bio-properties-panel-feel-icon:hover svg * {
+ fill: var(--feel-hover-color);
+}
+
+.bio-properties-panel-feel-icon.active {
+ background: var(--feel-active-background-color);
+}
+
+.bio-properties-panel-feel-icon.active:hover {
+ background: var(--feel-hover-background-color);
+}
+
+.bio-properties-panel-feel-icon.required.active {
+ background: none;
+}
+
+.bio-properties-panel-feel-icon.active svg * {
+ fill: var(--feel-active-color);
+}
+
+.bio-properties-panel-feel-icon.required.active svg * {
+ fill: var(--feel-required-color);
+}
+
+.bio-properties-panel-feel-editor-container {
+ position: relative;
+}
+
+.bio-properties-panel-feel-editor-container.active {
+ font-family: var(--font-family-monospace);
+}
+
+.bio-properties-panel-feel-container {
+ position: relative;
+}
+
+.bio-properties-panel-feel-container .bio-properties-panel-feel-editor-container>div {
+ position: static;
+ padding-left: 2.4em !important;
+ min-height: 28px;
+}
+
+.bio-properties-panel-feel-indicator {
+ position: absolute;
+ border: 1px solid var(--input-border-color);
+ background-color: var(--feel-indicator-background-color);
+ border-right: 0px;
+ border-radius: 2px 0 0 2px;
+ z-index: 1;
+ height: 100%;
+ width: 2em;
+ text-align: center;
+ padding: 2px 6px;
+}
+
+.bio-properties-panel-feel-editor-container .cm-scroller {
+ overflow: hidden !important;
+}
+
+.bio-properties-panel-feelers-editor .cm-editor {
+ background-color: transparent;
+}
+
+
+/* @Note(pinussilvestrus): mitigate low contrast - https://github.com/bpmn-io/cm-theme/issues/4 */
+.bio-properties-panel-feelers-editor .cm-content ::selection {
+ background: var(--feelers-select-color, hsl(205, 100%, 85%));
+}
+
+.bio-properties-panel-feelers-editor .cm-editor.cm-focused {
+ background-color: transparent;
+}
+
+.bio-properties-panel-feel-editor-container .bio-properties-panel-input {
+ resize: none;
+ overflow: hidden;
+ overflow-y: auto;
+}
+
+.bio-properties-panel-feel-editor-container,
+.bio-properties-panel-feel-editor-container .bio-properties-panel-input,
+.bio-properties-panel-feel-container .cm-editor {
+ min-height: 100%;
+}
+
+.bio-properties-panel-feel-checkbox,
+.bio-properties-panel-feel-toggle-switch {
+ padding-top: 1px;
+}
+
+.bio-properties-panel-feel-checkbox .bio-properties-panel-feel-entry:not(.feel-active),
+.bio-properties-panel-feel-toggle-switch .bio-properties-panel-feel-entry:not(.feel-active) {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+}
+
+.bio-properties-panel-feel-checkbox .bio-properties-panel-feel-entry:not(.feel-active) .bio-properties-panel-feel-container,
+.bio-properties-panel-feel-toggle-switch .bio-properties-panel-feel-entry:not(.feel-active) .bio-properties-panel-feel-container {
+ margin-left: auto;
+}
+
+.bio-properties-panel-tooltip-wrapper {
+ text-decoration: underline;
+ text-decoration-style: dotted;
+ text-underline-offset: 2px;
+ font: inherit;
+ display: flex;
+ justify-content: center;
+ width: fit-content;
+}
+
+.bio-properties-panel-tooltip {
+ --tooltip-underline-color: var(--color-blue-219-99-53);
+ --tooltip-background-color: var(--color-grey-0-0-22);
+ --tooltip-link: var(--color-blue-218-100-74);
+ --tooltip-code-background-color: var(--color-grey-225-10-97);
+ --tooltip-code-border-color: var(--color-grey-225-10-85);
+
+ display: flex;
+ color: var(--color-white, white);
+ position: fixed;
+ z-index: 1000;
+ max-width: 300px;
+ font-size: var(--text-size-small);
+ font-family: var(--font-family);
+}
+
+.bio-properties-panel-tooltip.right {
+ padding-right: 6px;
+}
+
+.bio-properties-panel-tooltip.top {
+ flex-direction: column;
+}
+
+.bio-properties-panel-tooltip-content {
+ background-color: var(--tooltip-background-color);
+ padding: 16px;
+ border-radius: 2px;
+ font-weight: 400;
+ white-space: pre-wrap;
+}
+
+.bio-properties-panel-tooltip-content code,
+.bio-properties-panel-tooltip-content pre {
+ color: var(--description-color);
+ font-family: var(--font-family);
+ font-size: var(--text-size-small);
+ line-height: var(--line-height-condensed);
+ padding: 0 2px;
+ background-color: var(--tooltip-code-background-color);
+ border: 1px solid var(--tooltip-code-border-color);
+ border-radius: 3px;
+}
+
+.bio-properties-panel-tooltip-content pre code {
+ border: none;
+}
+
+.bio-properties-panel-tooltip p:first-child {
+ margin-top: 0;
+}
+
+.bio-properties-panel-tooltip p:last-child {
+ margin-bottom: 0;
+}
+
+.bio-properties-panel-tooltip-content a {
+ color: var(--tooltip-link);
+}
+
+.bio-properties-panel-tooltip .bio-properties-panel-tooltip-arrow {
+ width: 0;
+ height: 0;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-left: 5px solid var(--tooltip-background-color);
+ margin-top: 16px;
+}
+
+.bio-properties-panel-tooltip.top .bio-properties-panel-tooltip-arrow {
+ margin-top: -3px;
+ margin-left: calc(50% - 2.5px);
+ transform: rotate(90deg);
+}
+
+.bio-properties-panel-feelers-editor-container .bio-properties-panel-feelers-editor__open-popup-placeholder,
+.bio-properties-panel-feel-editor-container .bio-properties-panel-feel-editor__open-popup-placeholder {
+ display: none;
+ justify-content: center;
+ flex-direction: column;
+ color: hsla(0, 0%, 9%, 0.25);
+ padding: 3px 6px 2px;
+ border: 1px solid var(--input-border-color);
+ border-radius: 2px;
+ background-color: var(--input-background-color);
+ font-size: var(--text-size-base);
+ font-family: inherit;
+ width: 100%;
+ min-height: 100%;
+}
+
+.bio-properties-panel-feelers-editor-container.popupOpen .bio-properties-panel-input,
+.bio-properties-panel-feel-editor-container.popupOpen .bio-properties-panel-input {
+ display: none;
+}
+
+.bio-properties-panel-feelers-editor-container.popupOpen .bio-properties-panel-feelers-editor__open-popup-placeholder,
+.bio-properties-panel-feel-editor-container.popupOpen .bio-properties-panel-feel-editor__open-popup-placeholder {
+ display: flex;
+}
+
+.bio-properties-panel-popup {
+ --popup-background-color: hsla(0, 0%, 96%, 1);
+ --popup-header-background-color: white;
+ --popup-font-color: hsla(0, 0%, 0%, 1);
+ --popup-title-color: hsla(0, 0%, 0%, 1);
+
+ --feel-popup-close-background-color: hsla(219, 99%, 53%, 1);
+ --feel-popup-gutters-background-color: hsla(0, 0%, 90%, 1);
+
+ position: fixed;
+ display: flex;
+ flex: auto;
+ flex-direction: column;
+ font-family: IBM Plex Sans, sans-serif;
+ padding: 0;
+ z-index: 1001;
+ box-shadow: 0px 2px 6px 0px hsla(0, 0%, 0%, 0.3);
+ background-color: var(--popup-background-color);
+ color: var(--popup-font-color);
+ height: auto;
+ width: auto;
+ overflow: hidden;
+ font-size: 14px;
+}
+
+.bio-properties-panel-popup h1,
+.bio-properties-panel-popup h2,
+.bio-properties-panel-popup h3,
+.bio-properties-panel-popup h4 {
+ font-weight: 500;
+ font-size: inherit;
+}
+
+.bio-properties-panel-popup .bio-properties-panel-popup__header,
+.bio-properties-panel-popup .bio-properties-panel-popup__body,
+.bio-properties-panel-popup .bio-properties-panel-popup__footer {
+ padding: 12px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
+.bio-properties-panel-popup .bio-properties-panel-popup__body:not(:first-child) {
+ padding-top: 0;
+ padding-left: 0;
+ padding-right: 0;
+}
+
+.bio-properties-panel-popup .bio-properties-panel-popup__header {
+ --popup-header-line-height: 16px;
+ background-color: var(--popup-header-background-color);
+ margin: 0;
+ font-size: 12px;
+ font-weight: 400;
+ line-height: var(--popup-header-line-height);
+ text-align: left;
+ color: var(--popup-title-color);
+}
+
+.bio-properties-panel-popup .bio-properties-panel-popup__header.draggable {
+ cursor: grab;
+}
+
+.bio-properties-panel-popup .bio-properties-panel-popup__drag-handle {
+ display: flex;
+}
+
+.bio-properties-panel-popup .bio-properties-panel-popup__drag-preview {
+ width: 1px;
+ height: 1px;
+ position: absolute;
+ top: 0;
+}
+
+.bio-properties-panel-popup .bio-properties-panel-popup__title {
+ margin-left: 8px;
+}
+
+.bio-properties-panel-popup .bio-properties-panel-popup__title::first-letter {
+ text-transform: capitalize;
+}
+
+.bio-properties-panel-popup .bio-properties-panel-popup__header .bio-properties-panel-popup__drag-handle svg {
+ margin-left: -4px;
+}
+
+.bio-properties-panel-popup .bio-properties-panel-popup__body {
+ font-size: inherit;
+ height: 100%;
+ display: flex;
+ overflow: auto;
+ padding-bottom: 0;
+}
+
+.bio-properties-panel-popup .bio-properties-panel-popup__footer {
+ position: absolute;
+ bottom: 0;
+ right: 8px;
+}
+
+.bio-properties-panel-feel-popup {
+ min-height: 400px;
+ width: fit-content;
+}
+
+.bio-properties-panel-feel-popup .bio-properties-panel-feel-popup__body {
+ display: flex;
+ margin: 0;
+ padding: 0;
+ height: 100%;
+ width: 100%;
+}
+
+.bio-properties-panel-feel-popup__title-link {
+ margin-left: auto;
+ display: flex;
+}
+
+.bio-properties-panel-feel-popup__title-link svg {
+ width: var(--popup-header-line-height);
+ height: var(--popup-header-line-height);
+ fill: currentColor;
+ margin: 0 0.5em;
+}
+
+.bio-properties-panel-feel-popup .bio-properties-panel-feel-editor-container {
+ display: flex;
+ min-width: 100%;
+}
+
+.bio-properties-panel-feel-popup .bio-properties-panel-feel-editor-container .cm-scroller {
+ overflow: auto !important;
+}
+
+.bio-properties-panel-feel-popup .bio-properties-panel-feelers-editor-container {
+ width: 100%;
+ display: flex;
+}
+
+.bio-properties-panel-feel-popup .bio-properties-panel-feelers-editor-container .bio-properties-panel-feelers-editor {
+ display: flex;
+}
+
+.bio-properties-panel-feel-popup .bio-properties-panel-feelers-editor-container .bio-properties-panel-feelers-editor .cm-editor {
+ width: 100%;
+}
+
+.bio-properties-panel-feel-popup .bio-properties-panel-input {
+ width: 100%;
+ resize: none;
+ padding: 0;
+ overflow: hidden;
+ overflow-y: auto
+}
+
+.bio-properties-panel-feel-popup .bio-properties-panel-open-feel-popup {
+ display: none !important;
+}
+
+.bio-properties-panel-feelers-editor-container .bio-properties-panel-open-feel-popup,
+.bio-properties-panel-feel-container .bio-properties-panel-open-feel-popup {
+ position: absolute;
+ top: 0;
+ right: 0;
+ line-height: 1;
+ padding: 2px 4px;
+ margin: 3px;
+ display: none;
+ background: none;
+ border: none;
+ color: var(--feel-open-popup-color);
+ cursor: pointer;
+}
+
+.bio-properties-panel-feelers-editor-container:hover .bio-properties-panel-open-feel-popup,
+.bio-properties-panel-feel-container:hover .bio-properties-panel-open-feel-popup,
+.bio-properties-panel-feelers-editor-container:focus-within .bio-properties-panel-open-feel-popup,
+.bio-properties-panel-feel-container:focus-within .bio-properties-panel-open-feel-popup {
+ display: block;
+}
+
+.bio-properties-panel-feelers-editor-container .bio-properties-panel-open-feel-popup:hover,
+.bio-properties-panel-feel-container .bio-properties-panel-open-feel-popup:hover {
+ color: var(--feel-open-popup-hover-color);
+}
+
+.bio-properties-panel-feel-popup .bio-properties-panel-popup__footer .bio-properties-panel-feel-popup__close-btn {
+ background: var(--feel-popup-close-background-color);
+ width: 66px;
+ font-weight: 400;
+ font-size: 14px;
+ font-family: inherit;
+ color: white;
+ border: none;
+ height: 32px;
+ cursor: pointer;
+}
+
+.bio-properties-panel-feel-popup .bio-properties-panel-feel-editor-container .cm-editor {
+ width: 100%;
+ height: 100%;
+}
+
+.bio-properties-panel-feel-popup .bio-properties-panel-feel-editor-container .cm-editor .cm-content {
+ padding-left: 4px;
+}
+
+.bio-properties-panel-feel-popup .cm-gutters {
+ background-color: var(--feel-popup-gutters-background-color);
+ border: none;
+ padding: 0;
+}
+
+.bio-properties-panel-feel-popup .cm-gutter {
+ min-width: 32px;
+}
+
+.bio-properties-panel-feel-popup .cm-gutters .cm-lineNumbers .cm-gutterElement {
+ text-align: center;
+}
+`, "",{"version":3,"sources":["webpack://./../node_modules/@bpmn-io/properties-panel/dist/assets/properties-panel.css"],"names":[],"mappings":"AAAA;;EAEE;CACD;;EAEC,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;EAC1C,oCAAoC;;EAEpC,4CAA4C;EAC5C,4CAA4C;EAC5C,4C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EAChB,WAAW;EACX,aAAa;EACb,gBAAgB;EAChB,YAAY;EACZ,mCAAmC;EACnC,eAAe;AACjB;;AAEA;;;;EAIE,cAAc;AAChB;;AAEA;;EAEE,yCAAyC;AAC3C;;AAEA;EACE,oDAAoD;EACpD,WAAW;EACX,gBAAgB;EAChB,eAAe;EACf,oBAAoB;EACpB,YAAY;EACZ,YAAY;EACZ,YAAY;EACZ,eAAe;AACjB;;AAEA;EACE,WAAW;EACX,YAAY;AACd;;AAEA;EACE,iBAAiB;AACnB;;AAEA;EACE,4DAA4D;EAC5D,YAAY;EACZ,UAAU;AACZ;;AAEA;EACE,eAAe;AACjB;;AAEA;EACE,kBAAkB;AACpB","sourcesContent":["/**\n * Theming\n */\n .bio-properties-panel,\n .djs-parent {\n --color-grey-225-10-15: hsl(225, 10%, 15%);\n --color-grey-225-10-35: hsl(225, 10%, 35%);\n --color-grey-225-10-55: hsl(225, 10%, 55%);\n --color-grey-225-10-75: hsl(225, 10%, 75%);\n --color-grey-225-10-80: hsl(225, 10%, 80%);\n --color-grey-225-10-85: hsl(225, 10%, 85%);\n --color-grey-225-10-90: hsl(225, 10%, 90%);\n --color-grey-225-10-95: hsl(225, 10%, 95%);\n --color-grey-225-10-97: hsl(225, 10%, 97%);\n --color-grey-0-0-22: hsl(0, 0%, 22%);\n\n --color-blue-205-100-35: hsl(205, 100%, 35%);\n --color-blue-205-100-45: hsl(205, 100%, 45%);\n --color-blue-205-100-50: hsl(205, 100%, 50%);\n --color-blue-205-100-85: hsl(205, 100%, 85%);\n --color-blue-205-100-95: hsl(205, 100%, 95%);\n --color-blue-219-99-53: hsl(219, 99%, 53%);\n --color-blue-218-100-74: hsl(218, 100%, 74%);\n --color-green-150-86-44: hsl(150, 86%, 44%);\n\n --color-red-360-100-40: hsl(360, 100%, 40%);\n --color-red-360-100-45: hsl(360, 100%, 45%);\n --color-red-360-100-92: hsl(360, 100%, 92%);\n --color-red-360-100-97: hsl(360, 100%, 97%);\n --color-white: white;\n --color-black: black;\n --color-transparent: transparent;\n\n}\n\n.bio-properties-panel {\n --text-base-color: var(--color-grey-225-10-15);\n --text-error-color: var(--color-red-360-100-45);\n --link-color: var(--color-blue-205-100-50);\n\n --description-color: var(--color-grey-225-10-35);\n --description-code-background-color: var(--color-grey-225-10-97);\n --description-code-border-color: var(--color-grey-225-10-85);\n --description-list-item-color: var(--color-grey-225-10-35);\n\n --placeholder-color: var(--color-grey-225-10-35);\n --placeholder-background-color: var(--color-grey-225-10-95);\n\n --header-background-color: var(--color-grey-225-10-95);\n --header-icon-fill-color: var(--color-grey-225-10-15);\n --header-bottom-border-color: var(--color-grey-225-10-75);\n\n --group-background-color: var(--color-white);\n --group-bottom-border-color: var(--color-grey-225-10-75);\n\n --sticky-group-background-color: var(--color-grey-225-10-95);\n --sticky-group-bottom-border-color: var(--color-grey-225-10-75);\n\n --add-entry-fill-color: var(--color-grey-225-10-35);\n --add-entry-hover-fill-color: var(--color-white);\n --add-entry-hover-background-color: var(--color-blue-205-100-50);\n --add-entry-label-color: var(--color-white);\n\n --remove-entry-fill-color: var(--color-red-360-100-45);\n --remove-entry-hover-background-color: var(--color-red-360-100-92);\n\n --arrow-fill-color: var(--color-grey-225-10-35);\n --arrow-hover-background-color: var(--color-grey-225-10-95);\n\n --dot-color: var(--color-grey-225-10-35);\n --dot-color-error: var(--color-red-360-100-45);\n\n --list-badge-color: var(--color-white);\n --list-badge-background-color: var(--color-grey-225-10-35);\n\n --input-background-color: var(--color-grey-225-10-97);\n --input-border-color: var(--color-grey-225-10-75);\n\n --input-focus-background-color: var(--color-blue-205-100-95);\n --input-focus-border-color: var(--color-blue-205-100-50);\n\n --input-error-background-color: var(--color-red-360-100-97);\n --input-error-border-color: var(--color-red-360-100-45);\n --input-error-focus-border-color: var(--color-red-360-100-45);\n\n --input-disabled-color: var(--color-grey-225-10-55);\n --input-disabled-background-color: var(--color-grey-225-10-97);\n --input-disabled-border-color: var(--color-grey-225-10-90);\n\n --toggle-switch-on-background-color: var(--color-blue-205-100-50);\n --toggle-switch-off-background-color: var(--color-grey-225-10-75);\n --toggle-switch-switcher-background-color: var(--color-white);\n\n --side-line-background-color: var(--color-grey-225-10-35);\n --side-line-extension-background-color: var(--color-grey-225-10-35);\n\n --list-entry-dot-background-color: var(--color-grey-225-10-35);\n --list-entry-header-button-fill-color: var(--color-grey-225-10-35);\n --list-entry-add-entry-empty-background-color: var(--color-blue-205-100-50);\n --list-entry-add-entry-empty-hover-background-color: var(--color-blue-205-100-45);\n --list-entry-add-entry-label-color: var(--color-white);\n --list-entry-add-entry-background-color: var(--color-blue-205-100-50);\n --list-entry-add-entry-fill-color: var(--color-white);\n\n --dropdown-item-background-color: var(--color-white);\n --dropdown-item-hover-background-color: var(--color-grey-225-10-95);\n --dropdown-separator-background-color: var(--color-grey-225-10-75);\n\n --feel-background-color: transparent;\n --feel-active-color: var(--color-blue-205-100-45);\n --feel-inactive-color: var(--color-grey-225-10-35);\n --feel-hover-color: var(--color-grey-225-10-15);\n --feel-hover-background-color: var(--color-grey-225-10-97);\n --feel-active-background-color: transparent;\n --feel-required-color: var(--color-grey-225-10-55);\n --feel-open-popup-color: hsla(0, 0%, 32%, 1);\n --feel-open-popup-background-color: var(--color-white);\n --feel-open-popup-hover-color: hsla(219, 99%, 53%, 1);\n\n --feel-indicator-background-color: var(--color-grey-225-10-90);\n\n --feelers-select-color: var(--color-blue-205-100-85);\n\n --text-size-base: 14px;\n --text-size-small: 13px;\n --text-size-smallest: 12px;\n --text-line-height: 21px;\n --line-height-condensed: 17px;\n\n --font-family: sans-serif;\n --font-family-monospace: monospace;\n\n display: flex;\n flex-direction: column;\n flex: 1;\n position: relative;\n height: 100%;\n width: 100%;\n overflow: hidden;\n}\n\n.bio-properties-panel {\n color: var(--text-base-color);\n}\n\n.bio-properties-panel * {\n font-size: var(--text-size-base);\n line-height: var(--text-line-height);\n font-weight: 400;\n box-sizing: border-box;\n}\n\n.bio-properties-panel {\n font-family: var(--font-family);\n}\n\n/**\n * Placeholder (empty, multi select, ...)\n */\n.bio-properties-panel-placeholder {\n position: absolute;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: var(--placeholder-background-color);\n}\n\n.bio-properties-panel-placeholder-text {\n color: var(--placeholder-color);\n font-size: var(--text-size-base);\n text-align: center;\n margin: 12px 48px;\n}\n\n/**\n * Header\n */\n.bio-properties-panel-header {\n display: flex;\n flex-direction: row;\n align-items: center;\n font-size: var(--text-size-base);\n padding: 16px 10px;\n background-color: var(--header-background-color);\n border-bottom: 1px solid var(--header-bottom-border-color);\n width: 100%;\n z-index: 10;\n max-height: 64px;\n overflow: hidden;\n}\n\n.bio-properties-panel-header-icon {\n fill: var(--header-icon-fill-color);\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n}\n\n.bio-properties-panel-header-labels {\n overflow: hidden;\n margin-left: 12px;\n user-select: none;\n}\n\n.bio-properties-panel-header-type {\n font-size: var(--text-size-smallest);\n font-weight: 600;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n text-transform: uppercase;\n}\n\n.bio-properties-panel-header-label {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n margin-top: -6px;\n}\n\n.bio-properties-panel-header-actions {\n margin-left: auto;\n margin-top: auto;\n}\n\n/**\n * Scroll container\n */\n.bio-properties-panel-scroll-container {\n overflow-y: auto;\n overflow-x: hidden;\n flex: 1;\n}\n\n/**\n * Groups\n */\n.bio-properties-panel-group {\n background-color: var(--group-background-color);\n border-bottom: 1px solid var(--group-bottom-border-color);\n position: relative;\n}\n\n.bio-properties-panel-group-header {\n display: flex;\n flex-direction: row;\n align-items: center;\n font-size: var(--text-size-base);\n height: 32px;\n user-select: none;\n justify-content: space-between;\n margin-bottom: -1px; /* avoid double borders */\n position: relative; /* browsers not supporting sticky */\n position: -webkit-sticky; /* for safari */\n position: sticky;\n top: 0;\n z-index: 10;\n}\n\n.bio-properties-panel-group-header .bio-properties-panel-group-header-title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin: 1px 12px 0;\n}\n\n.bio-properties-panel-group-header.open .bio-properties-panel-group-header-title {\n font-weight: 500;\n}\n\n.bio-properties-panel-group-header.sticky {\n background-color: var(--sticky-group-background-color);\n border-bottom: 1px solid var(--sticky-group-bottom-border-color);\n}\n\n.bio-properties-panel-group-header-buttons {\n display: flex;\n}\n\n.bio-properties-panel-group-header-buttons .bio-properties-panel-group-header-button {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n align-self: center;\n height: 22px;\n line-height: 22px;\n min-width: 22px;\n margin: 5px;\n padding: 0 3px;\n border: none;\n background: none;\n}\n\n.bio-properties-panel-group-header-buttons .bio-properties-panel-group-header-buttons:last-child {\n margin-right: 0;\n}\n\n.bio-properties-panel-add-entry {\n fill: var(--add-entry-fill-color);\n border-radius: 11px;\n}\n\n.bio-properties-panel-group-header.empty .bio-properties-panel-add-entry {\n margin-right: 69px;\n}\n\n.bio-properties-panel-group-header.empty .bio-properties-panel-add-entry:hover {\n margin-right: 19px;\n}\n\n.bio-properties-panel-group-header.empty .bio-properties-panel-add-entry-label {\n display: none;\n color: var(--add-entry-label-color);\n padding: 0 6px 0 2px;\n}\n\n.bio-properties-panel-group-header-button.bio-properties-panel-add-entry:hover {\n background-color: var(--add-entry-hover-background-color);\n fill: var(--add-entry-hover-fill-color);\n}\n\n.bio-properties-panel-group-header-button.bio-properties-panel-add-entry:hover .bio-properties-panel-add-entry-label {\n display: block;\n}\n\n.bio-properties-panel-group-entries {\n display: none;\n}\n\n.bio-properties-panel-group-entries.open {\n display: block;\n}\n\n.bio-properties-panel-arrow {\n display: flex;\n justify-content: center;\n text-align: center;\n fill: var(--arrow-fill-color);\n min-width: 22px;\n border-radius: 11px;\n border: none;\n background: none;\n}\n\n.bio-properties-panel-arrow:hover {\n background-color: var(--arrow-hover-background-color);\n}\n\n.bio-properties-panel-arrow-down {\n transform: rotate(90deg);\n}\n\n.bio-properties-panel-dot {\n align-self: center;\n height: 8px;\n min-width: 8px;\n border-radius: 50%;\n margin: 12px;\n background-color: var(--dot-color);\n}\n\n.bio-properties-panel-dot--error {\n --dot-color: var(--dot-color-error);\n}\n\n/**\n * Lists\n */\n.bio-properties-panel-list {\n display: none;\n}\n\n.bio-properties-panel-list.open {\n display: block;\n margin-bottom: 6px;\n padding-bottom: 2px;\n}\n\n.bio-properties-panel-list-badge {\n height: 22px;\n min-width: 22px;\n color: var(--list-badge-color);\n border-radius: 11px;\n font-size: var(--text-size-small);\n line-height: 22px;\n text-align: center;\n user-select: none;\n padding: 0 5px;\n margin: 5px;\n background-color: var(--list-badge-background-color);\n}\n\n.bio-properties-panel-list-badge--error {\n --list-badge-background-color: var(--dot-color-error);\n}\n\n/**\n * Basic entries\n */\n.bio-properties-panel-entry {\n margin: 2px 32px 6px 12px;\n}\n\n.bio-properties-panel-entry:last-child {\n padding-bottom: 10px;\n}\n\n.bio-properties-panel-label {\n display: block;\n font-size: var(--text-size-small);\n margin: 2px 0 1px;\n}\n\n.bio-properties-panel-description,\n.bio-properties-panel-description p,\n.bio-properties-panel-description span,\n.bio-properties-panel-description div {\n color: var(--description-color);\n display: block;\n margin: 2px 0 4px;\n line-height: var(--line-height-condensed);\n font-weight: 400;\n font-size: var(--text-size-small);\n}\n\n.bio-properties-panel-description code {\n color: var(--description-color);\n font-family: var(--font-family);\n font-size: var(--text-size-small);\n line-height: var(--line-height-condensed);\n padding: 0 2px;\n background-color: var(--description-code-background-color);\n border: 1px solid var(--description-code-border-color);\n border-radius: 3px;\n}\n\n.bio-properties-panel-description pre code {\n width: 100%;\n display: block;\n overflow-x: auto;\n padding: 4px 6px;\n font-family: var(--font-family-monospace);\n}\n\n.bio-properties-panel-description ul {\n padding: 0;\n margin: 0 0 0 12px;\n list-style-type: disc;\n}\n\n.bio-properties-panel-description li {\n color: var(--description-list-item-color);\n margin: 0 0 0 12px;\n}\n\n.bio-properties-panel-description a {\n color: var(--link-color);\n font-size: var(--text-size-small);\n text-decoration: underline;\n}\n\n.bio-properties-panel-feelers-editor.bio-properties-panel-input {\n padding: 0;\n}\n\n.bio-properties-panel-feelers-input .cm-editor\n{\n min-height: 32px;\n max-height: 215px;\n background-color: transparent;\n}\n\n.bio-properties-panel-feelers-editor .cm-editor.cm-focused,\n.bio-properties-panel-feelers-input .cm-editor.cm-focused {\n outline: none;\n}\n\n.bio-properties-panel-input {\n padding: 3px 6px 2px;\n border: 1px solid var(--input-border-color);\n border-radius: 2px;\n background-color: var(--input-background-color);\n font-size: var(--text-size-base);\n font-family: inherit;\n}\n\n.bio-properties-panel-input[type=number],\nselect.bio-properties-panel-input,\ntextarea.bio-properties-panel-input,\n.bio-properties-panel-input[type=text] {\n display: block;\n width: 100%;\n}\n\ntextarea.bio-properties-panel-input {\n min-height: 28px;\n}\n\n.bio-properties-panel-input:focus,\n.bio-properties-panel-input:focus-within {\n outline: none;\n background-color: var(--input-focus-background-color);\n border: 1px solid var(--input-focus-border-color);\n}\n\n.bio-properties-panel-textfield:focus-within,\n.bio-properties-panel-feel-entry:focus-within {\n --input-background-color: var(--input-focus-background-color);\n --input-border-color: var(--input-focus-border-color);\n}\n\n.bio-properties-panel-input:disabled {\n border-color: var(--input-disabled-border-color);\n background-color: var(--input-disabled-background-color);\n color: var(--input-disabled-color);\n}\n\nselect.bio-properties-panel-input {\n padding: 4px 6px;\n}\n\n.bio-properties-panel-input-monospace {\n font-family: var(--font-family-monospace);\n}\n\n.bio-properties-panel-input[type=\"checkbox\"], .bio-properties-panel-input[type=\"radio\"] {\n margin: 0;\n vertical-align: middle;\n}\n\n.bio-properties-panel-input[type=\"checkbox\"]:focus {\n outline: 2px solid var(--input-focus-border-color);\n outline-offset: 0;\n}\n\n.bio-properties-panel-checkbox > .bio-properties-panel-label {\n display: inline-block;\n font-size: var(--text-size-base);\n margin-left: 6px;\n margin-top: auto;\n vertical-align: middle;\n}\n\n.bio-properties-panel-checkbox-entry + .bio-properties-panel-checkbox-entry {\n margin-top: -8px;\n}\n\n.bio-properties-panel-checkbox-entry > .bio-properties-panel-description {\n margin-left: 18px;\n}\n\ntextarea.bio-properties-panel-input {\n resize: vertical;\n}\n\n.bio-properties-panel-entry.has-error .bio-properties-panel-input,\n.bio-properties-panel-entry.has-error .bio-properties-panel-feel-editor__open-popup-placeholder {\n border-color: var(--input-error-border-color);\n background-color: var(--input-error-background-color);\n}\n\n.bio-properties-panel-entry.has-error .bio-properties-panel-feel-indicator {\n border-color: var(--input-error-border-color);\n}\n\n.bio-properties-panel-entry.has-error .bio-properties-panel-input:focus,\n.bio-properties-panel-entry.has-error .bio-properties-panel-feel-indicator:focus {\n border-color: var(--input-error-focus-border-color);\n}\n\n.bio-properties-panel-entry .bio-properties-panel-error {\n color: var(--text-error-color);\n margin: 4px 0;\n font-size: var(--text-size-small);\n}\n\n.bio-properties-panel-simple {\n width: 100%;\n margin-right: 8px;\n}\n\n.bio-properties-panel-simple + .bio-properties-panel-remove-entry {\n margin: auto;\n}\n\n/**\n * Toggle Switch\n */\n.bio-properties-panel-toggle-switch-entry + .bio-properties-panel-toggle-switch-entry {\n margin-top: -8px;\n}\n\n.bio-properties-panel-toggle-switch-entry > .bio-properties-panel-description {\n margin-left: 38px;\n}\n\n.bio-properties-panel-toggle-switch .bio-properties-panel-field-wrapper {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.bio-properties-panel-toggle-switch.inline {\n display: flex;\n flex-direction: row;\n}\n\n.bio-properties-panel-toggle-switch.inline .bio-properties-panel-field-wrapper {\n margin-left: auto;\n}\n\n.bio-properties-panel-toggle-switch > .bio-properties-panel-label {\n font-size: var(--text-size-base);\n}\n\n.bio-properties-panel-toggle-switch.inline > .bio-properties-panel-label {\n font-size: var(--text-size-small);\n}\n\n.bio-properties-panel-toggle-switch .bio-properties-panel-toggle-switch__label {\n margin: 0;\n margin-left: 6px;\n font-size: var(--text-size-base);\n}\n\n.bio-properties-panel-toggle-switch .bio-properties-panel-toggle-switch__switcher {\n position: relative;\n width: 32px;\n height: 16px;\n}\n\n.bio-properties-panel-toggle-switch .bio-properties-panel-toggle-switch__switcher:focus-within {\n outline: 2px solid var(--input-focus-border-color);\n outline-offset: 1px;\n}\n\n.bio-properties-panel-toggle-switch .bio-properties-panel-toggle-switch__switcher input[type='checkbox'] {\n opacity: 0;\n width: 0;\n height: 0;\n}\n\n.bio-properties-panel-toggle-switch .bio-properties-panel-toggle-switch__switcher .bio-properties-panel-toggle-switch__slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: var(--toggle-switch-off-background-color);\n -webkit-transition: 0.4s;\n transition: 0.4s;\n border-radius: 34px;\n}\n\n.bio-properties-panel-toggle-switch .bio-properties-panel-toggle-switch__switcher .bio-properties-panel-toggle-switch__slider:before {\n position: absolute;\n content: \"\";\n height: 12px;\n width: 12px;\n left: 2px;\n bottom: 2px;\n background-color: var(--toggle-switch-switcher-background-color);\n -webkit-transition: 0.4s;\n transition: 0.4s;\n border-radius: 50%;\n}\n\n.bio-properties-panel-toggle-switch .bio-properties-panel-toggle-switch__switcher input[type='checkbox']:checked + .bio-properties-panel-toggle-switch__slider {\n background-color: var(--toggle-switch-on-background-color);\n box-shadow: 0 0 1px ;\n}\n\n.bio-properties-panel-toggle-switch .bio-properties-panel-toggle-switch__switcher input[type='checkbox']:checked + .bio-properties-panel-toggle-switch__slider:before {\n -webkit-transform: translateX(16px);\n -ms-transform: translateX(16px);\n transform: translateX(16px);\n}\n\n/**\n * Collapsible entries\n */\n.bio-properties-panel-collapsible-entry-entries {\n position: relative;\n display: none;\n}\n\n.bio-properties-panel-collapsible-entry-entries .bio-properties-panel-entry:last-child {\n padding-bottom: 0;\n}\n\n.bio-properties-panel-collapsible-entry-entries.open {\n display: block;\n}\n\n.bio-properties-panel-collapsible-entry-entries {\n padding-left: 20px;\n margin-bottom: 10px;\n position: relative;\n display: none;\n}\n\n.bio-properties-panel-collapsible-entry-header {\n position: relative;\n display: flex;\n justify-content: space-between;\n align-items: center;\n overflow: hidden;\n}\n\n.bio-properties-panel-collapsible-entry-header .bio-properties-panel-collapsible-entry-header-title {\n padding: 2px 24px 2px 32px;\n font-size: var(--text-size-base);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n user-select: none;\n}\n\n.bio-properties-panel-collapsible-entry-arrow {\n position: absolute;\n top: 2px;\n left: 6px;\n padding: 0 3px;\n height: 22px;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n align-self: center;\n}\n\n.bio-properties-panel-remove-entry {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 5px;\n padding: 0;\n width: 22px;\n height: 22px;\n fill: var(--remove-entry-fill-color);\n border-radius: 50%;\n border: none;\n background: none;\n visibility: hidden;\n}\n\n.bio-properties-panel-remove-entry:hover {\n background-color: var(--remove-entry-hover-background-color);\n}\n\n.bio-properties-panel-list-entry-item:hover .bio-properties-panel-remove-list-entry,\n.bio-properties-panel-collapsible-entry:hover > .bio-properties-panel-collapsible-entry-header .bio-properties-panel-remove-entry,\n.bio-properties-panel-collapsible-entry:focus-within > .bio-properties-panel-collapsible-entry-header .bio-properties-panel-remove-entry\n{\n visibility: visible;\n}\n\n/* Side line */\n.bio-properties-panel-collapsible-entry-entries::before {\n content: \"\";\n position: absolute;\n left: 16px;\n width: 2px;\n top: -6px;\n bottom: 12px;\n background-color: var(--side-line-background-color);\n border-radius: 1px;\n}\n\n/* Side line extension for non-list entry or open list entry positioned as the last one. */\n.bio-properties-panel-collapsible-entry-entries .bio-properties-panel-entry:not(.bio-properties-panel-list-entry):last-child,\n.bio-properties-panel-list-entry.open:last-child {\n position: relative;\n}\n\n.bio-properties-panel-collapsible-entry-entries .bio-properties-panel-entry:not(.bio-properties-panel-list-entry):last-child::after,\n.bio-properties-panel-list-entry.open:last-child::after {\n content: \"\";\n position: absolute;\n left: -16px;\n width: 2px;\n top: 0;\n bottom: -4px;\n background-color: var(--side-line-extension-background-color);\n border-radius: 1px;\n}\n\n.bio-properties-panel-list-entry-item .bio-properties-panel-collapsible-entry-entries .bio-properties-panel-entry:last-child::after {\n left: -18px;\n}\n\n/*\n * List entry\n */\n.bio-properties-panel-list-entry {\n position: relative;\n margin-right: 5px;\n margin-bottom: 0;\n}\n\n.bio-properties-panel-list-entry .bio-properties-panel-entry {\n margin-right: 0;\n}\n\n.bio-properties-panel-list-entry-header {\n position: relative;\n overflow: hidden;\n display: flex;\n justify-content: space-between;\n height: 32px;\n}\n\n/* Nested list dot */\n.bio-properties-panel-list-entry::before {\n content: \"\";\n width: 8px;\n height: 8px;\n position: absolute;\n left: -19px;\n top: 13px;\n border-radius: 50%;\n background-color: var(--list-entry-dot-background-color);\n}\n\n.bio-properties-panel-list-entry-header-title {\n display: block;\n margin: auto 0;\n padding: 2px 0;\n font-size: var(--text-size-base);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.bio-properties-panel-list-entry-header-title.open {\n font-weight: 500;\n}\n\n.bio-properties-panel-list-entry-header-buttons {\n display: flex;\n align-items: center;\n}\n\n.bio-properties-panel-list-entry-header-buttons > button {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n align-self: center;\n height: 22px;\n line-height: 22px;\n min-width: 22px;\n margin: 5px;\n padding: 0 3px;\n border: none;\n background: none;\n fill: var(--list-entry-header-button-fill-color);\n}\n\n.bio-properties-panel-list-entry-header-buttons > :last-child {\n margin-right: 0;\n}\n\n.bio-properties-panel-list-entry-items {\n padding: 0;\n margin: 0;\n\n list-style: none;\n}\n\n.bio-properties-panel-list-entry-items:not(.open) {\n display: none;\n}\n\n.bio-properties-panel-list-entry-item {\n display: flex;\n justify-content: space-between;\n}\n\n.bio-properties-panel-list-entry-item .bio-properties-panel-remove-entry {\n margin-right: 1px;\n}\n\n.bio-properties-panel-list-entry-item .bio-properties-panel-collapsible-entry {\n width: 100%;\n margin-right: 4px;\n}\n\n.bio-properties-panel-list-entry-item .bio-properties-panel-collapsible-entry-header {\n margin-left: -8px;\n}\n\n.bio-properties-panel-list-entry-item .bio-properties-panel-collapsible-entry-arrow {\n left: 2px;\n}\n\n.bio-properties-panel-list-entry-item .bio-properties-panel-collapsible-entry-header-title {\n padding-left: 30px;\n}\n\n.bio-properties-panel-list-entry-item .bio-properties-panel-collapsible-entry-entries {\n padding-left: 10px;\n}\n\n.bio-properties-panel-list-entry-item .bio-properties-panel-collapsible-entry-entries::before {\n left: 4px;\n}\n\n.bio-properties-panel-list-entry.empty .bio-properties-panel-add-entry {\n margin-right: 16px;\n padding-left: 6px;\n}\n\n.bio-properties-panel-list-entry.empty .bio-properties-panel-add-entry-label {\n color: var(--list-entry-add-entry-label-color);\n padding: 4px 6px 3px 2px;\n}\n\n.bio-properties-panel-list-entry-header-buttons .bio-properties-panel-add-entry:hover {\n background-color: var(--list-entry-add-entry-background-color);\n fill: var(--list-entry-add-entry-fill-color);\n}\n\n.bio-properties-panel-list-entry-item .bio-properties-panel-simple .bio-properties-panel-input {\n border-radius: 0;\n margin-bottom: -2px;\n}\n\n.bio-properties-panel-list-entry-item:first-child .bio-properties-panel-simple .bio-properties-panel-input {\n border-top-left-radius: 2px;\n border-top-right-radius: 2px;\n}\n\n.bio-properties-panel-list-entry-item:last-child .bio-properties-panel-simple .bio-properties-panel-input {\n border-bottom-left-radius: 2px;\n border-bottom-right-radius: 2px;\n}\n\n.bio-properties-panel-dropdown-button {\n position: relative;\n\n --dropdown-button-margin: 5px;\n}\n\n.bio-properties-panel-dropdown-button:not(.open) .bio-properties-panel-dropdown-button__menu {\n display: none;\n}\n\n.bio-properties-panel-dropdown-button__menu {\n min-width: calc(100% - var(--dropdown-button-margin) * 2);\n max-width: 240px;\n\n position: absolute;\n top: calc(100% - var(--dropdown-button-margin));\n right: var(--dropdown-button-margin);\n z-index: 101;\n\n background-color: var(--dropdown-item-background-color);\n\n padding: 8px 0;\n\n box-shadow: 0 1px 4px 0 var(--color-grey-225-10-85), 0 2px 16px 0 var(--color-grey-225-10-75)\n}\n\n.bio-properties-panel-dropdown-button__menu-item {\n display: block;\n width: 100%;\n padding: 4px 12px;\n\n font-size: var(--text-size-small);\n appearance: revert;\n border: unset;\n background: unset;\n text-align: unset;\n}\n\n.bio-properties-panel-dropdown-button__menu-item--separator {\n width: 100%;\n height: 1px;\n\n padding: 0;\n margin: 8px 0;\n\n background-color: var(--dropdown-separator-background-color);\n}\n\n.bio-properties-panel-dropdown-button__menu-item--actionable {\n font-size: var(--text-size-base);\n}\n\n.bio-properties-panel-dropdown-button__menu-item--actionable:hover {\n background-color: var(--dropdown-item-hover-background-color);\n}\n\n.bio-properties-panel-feel-input {\n position: relative;\n}\n\n.bio-properties-panel-feel-input input {\n padding-right: 2em\n}\n\n.bio-properties-panel-feel-entry .bio-properties-panel-label {\n display: flex;\n}\n\n.bio-properties-panel-feel-icon {\n display: inline-flex;\n height: 18px;\n width: 22px;\n vertical-align: text-bottom;\n padding: 0;\n margin: 0 3px;\n align-items: center;\n align-self: center;\n justify-content: center;\n border: none;\n background: none;\n border-radius: 3px;\n}\n\n.bio-properties-panel-feel-icon.optional {\n cursor: pointer;\n background: var(--feel-background-color);\n}\n\n.bio-properties-panel-feel-icon svg * {\n fill: var(--feel-inactive-color);\n}\n\n.bio-properties-panel-feel-icon:hover {\n background: var(--feel-hover-background-color);\n}\n\n.bio-properties-panel-feel-icon:hover svg * {\n fill: var(--feel-hover-color);\n}\n\n.bio-properties-panel-feel-icon.active {\n background: var(--feel-active-background-color);\n}\n\n.bio-properties-panel-feel-icon.active:hover {\n background: var(--feel-hover-background-color);\n}\n\n.bio-properties-panel-feel-icon.required.active {\n background: none;\n}\n\n.bio-properties-panel-feel-icon.active svg * {\n fill: var(--feel-active-color);\n}\n\n.bio-properties-panel-feel-icon.required.active svg * {\n fill: var(--feel-required-color);\n}\n\n.bio-properties-panel-feel-editor-container {\n position: relative;\n}\n\n.bio-properties-panel-feel-editor-container.active {\n font-family: var(--font-family-monospace);\n}\n\n.bio-properties-panel-feel-container {\n position: relative;\n}\n\n.bio-properties-panel-feel-container .bio-properties-panel-feel-editor-container>div {\n position: static;\n padding-left: 2.4em !important;\n min-height: 28px;\n}\n\n.bio-properties-panel-feel-indicator {\n position: absolute;\n border: 1px solid var(--input-border-color);\n background-color: var(--feel-indicator-background-color);\n border-right: 0px;\n border-radius: 2px 0 0 2px;\n z-index: 1;\n height: 100%;\n width: 2em;\n text-align: center;\n padding: 2px 6px;\n}\n\n.bio-properties-panel-feel-editor-container .cm-scroller {\n overflow: hidden !important;\n}\n\n.bio-properties-panel-feelers-editor .cm-editor {\n background-color: transparent;\n}\n\n\n/* @Note(pinussilvestrus): mitigate low contrast - https://github.com/bpmn-io/cm-theme/issues/4 */\n.bio-properties-panel-feelers-editor .cm-content ::selection {\n background: var(--feelers-select-color, hsl(205, 100%, 85%));\n}\n\n.bio-properties-panel-feelers-editor .cm-editor.cm-focused {\n background-color: transparent;\n}\n\n.bio-properties-panel-feel-editor-container .bio-properties-panel-input {\n resize: none;\n overflow: hidden;\n overflow-y: auto;\n}\n\n.bio-properties-panel-feel-editor-container,\n.bio-properties-panel-feel-editor-container .bio-properties-panel-input,\n.bio-properties-panel-feel-container .cm-editor {\n min-height: 100%;\n}\n\n.bio-properties-panel-feel-checkbox,\n.bio-properties-panel-feel-toggle-switch {\n padding-top: 1px;\n}\n\n.bio-properties-panel-feel-checkbox .bio-properties-panel-feel-entry:not(.feel-active),\n.bio-properties-panel-feel-toggle-switch .bio-properties-panel-feel-entry:not(.feel-active) {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.bio-properties-panel-feel-checkbox .bio-properties-panel-feel-entry:not(.feel-active) .bio-properties-panel-feel-container,\n.bio-properties-panel-feel-toggle-switch .bio-properties-panel-feel-entry:not(.feel-active) .bio-properties-panel-feel-container {\n margin-left: auto;\n}\n\n.bio-properties-panel-tooltip-wrapper {\n text-decoration: underline;\n text-decoration-style: dotted;\n text-underline-offset: 2px;\n font: inherit;\n display: flex;\n justify-content: center;\n width: fit-content;\n}\n\n.bio-properties-panel-tooltip {\n --tooltip-underline-color: var(--color-blue-219-99-53);\n --tooltip-background-color: var(--color-grey-0-0-22);\n --tooltip-link: var(--color-blue-218-100-74);\n --tooltip-code-background-color: var(--color-grey-225-10-97);\n --tooltip-code-border-color: var(--color-grey-225-10-85);\n\n display: flex;\n color: var(--color-white, white);\n position: fixed;\n z-index: 1000;\n max-width: 300px;\n font-size: var(--text-size-small);\n font-family: var(--font-family);\n}\n\n.bio-properties-panel-tooltip.right {\n padding-right: 6px;\n}\n\n.bio-properties-panel-tooltip.top {\n flex-direction: column;\n}\n\n.bio-properties-panel-tooltip-content {\n background-color: var(--tooltip-background-color);\n padding: 16px;\n border-radius: 2px;\n font-weight: 400;\n white-space: pre-wrap;\n}\n\n.bio-properties-panel-tooltip-content code,\n.bio-properties-panel-tooltip-content pre {\n color: var(--description-color);\n font-family: var(--font-family);\n font-size: var(--text-size-small);\n line-height: var(--line-height-condensed);\n padding: 0 2px;\n background-color: var(--tooltip-code-background-color);\n border: 1px solid var(--tooltip-code-border-color);\n border-radius: 3px;\n}\n\n.bio-properties-panel-tooltip-content pre code {\n border: none;\n}\n\n.bio-properties-panel-tooltip p:first-child {\n margin-top: 0;\n}\n\n.bio-properties-panel-tooltip p:last-child {\n margin-bottom: 0;\n}\n\n.bio-properties-panel-tooltip-content a {\n color: var(--tooltip-link);\n}\n\n.bio-properties-panel-tooltip .bio-properties-panel-tooltip-arrow {\n width: 0; \n height: 0; \n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n border-left: 5px solid var(--tooltip-background-color);\n margin-top: 16px;\n}\n\n.bio-properties-panel-tooltip.top .bio-properties-panel-tooltip-arrow {\n margin-top: -3px;\n margin-left: calc(50% - 2.5px);\n transform: rotate(90deg);\n}\n\n.bio-properties-panel-feelers-editor-container .bio-properties-panel-feelers-editor__open-popup-placeholder,\n.bio-properties-panel-feel-editor-container .bio-properties-panel-feel-editor__open-popup-placeholder {\n display: none;\n justify-content: center;\n flex-direction: column;\n color: hsla(0, 0%, 9%, 0.25);\n padding: 3px 6px 2px;\n border: 1px solid var(--input-border-color);\n border-radius: 2px;\n background-color: var(--input-background-color);\n font-size: var(--text-size-base);\n font-family: inherit;\n width: 100%;\n min-height: 100%;\n}\n\n.bio-properties-panel-feelers-editor-container.popupOpen .bio-properties-panel-input,\n.bio-properties-panel-feel-editor-container.popupOpen .bio-properties-panel-input {\n display: none;\n}\n\n.bio-properties-panel-feelers-editor-container.popupOpen .bio-properties-panel-feelers-editor__open-popup-placeholder,\n.bio-properties-panel-feel-editor-container.popupOpen .bio-properties-panel-feel-editor__open-popup-placeholder {\n display: flex;\n}\n\n.bio-properties-panel-popup {\n --popup-background-color: hsla(0, 0%, 96%, 1);\n --popup-header-background-color: white;\n --popup-font-color: hsla(0, 0%, 0%, 1);\n --popup-title-color: hsla(0, 0%, 0%, 1);\n\n --feel-popup-close-background-color: hsla(219, 99%, 53%, 1);\n --feel-popup-gutters-background-color: hsla(0, 0%, 90%, 1);\n\n position: fixed;\n display: flex;\n flex: auto;\n flex-direction: column;\n font-family: IBM Plex Sans, sans-serif;\n padding: 0;\n z-index: 1001;\n box-shadow: 0px 2px 6px 0px hsla(0, 0%, 0%, 0.3);\n background-color: var(--popup-background-color);\n color: var(--popup-font-color);\n height: auto;\n width: auto;\n overflow: hidden;\n font-size: 14px;\n}\n\n.bio-properties-panel-popup h1, \n.bio-properties-panel-popup h2, \n.bio-properties-panel-popup h3, \n.bio-properties-panel-popup h4 {\n font-weight: 500;\n font-size: inherit;\n}\n\n.bio-properties-panel-popup .bio-properties-panel-popup__header,\n.bio-properties-panel-popup .bio-properties-panel-popup__body,\n.bio-properties-panel-popup .bio-properties-panel-popup__footer {\n padding: 12px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.bio-properties-panel-popup .bio-properties-panel-popup__body:not(:first-child) {\n padding-top: 0;\n padding-left: 0;\n padding-right: 0;\n}\n\n.bio-properties-panel-popup .bio-properties-panel-popup__header {\n --popup-header-line-height: 16px;\n background-color: var(--popup-header-background-color);\n margin: 0;\n font-size: 12px;\n font-weight: 400;\n line-height: var(--popup-header-line-height);\n text-align: left;\n color: var(--popup-title-color);\n}\n\n.bio-properties-panel-popup .bio-properties-panel-popup__header.draggable {\n cursor: grab;\n}\n\n.bio-properties-panel-popup .bio-properties-panel-popup__drag-handle {\n display: flex;\n}\n\n.bio-properties-panel-popup .bio-properties-panel-popup__drag-preview {\n width: 1px;\n height: 1px;\n position: absolute;\n top: 0;\n}\n\n.bio-properties-panel-popup .bio-properties-panel-popup__title {\n margin-left: 8px;\n}\n\n.bio-properties-panel-popup .bio-properties-panel-popup__title::first-letter {\n text-transform: capitalize;\n}\n\n.bio-properties-panel-popup .bio-properties-panel-popup__header .bio-properties-panel-popup__drag-handle svg {\n margin-left: -4px;\n}\n\n.bio-properties-panel-popup .bio-properties-panel-popup__body {\n font-size: inherit;\n height: 100%;\n display: flex;\n overflow: auto;\n padding-bottom: 0;\n}\n\n.bio-properties-panel-popup .bio-properties-panel-popup__footer {\n position: absolute;\n bottom: 0;\n right: 8px;\n}\n\n.bio-properties-panel-feel-popup {\n min-height: 400px;\n width: fit-content;\n}\n\n.bio-properties-panel-feel-popup .bio-properties-panel-feel-popup__body {\n display: flex;\n margin: 0;\n padding: 0;\n height: 100%;\n width: 100%;\n}\n\n.bio-properties-panel-feel-popup__title-link {\n margin-left: auto; \n display: flex;\n}\n\n.bio-properties-panel-feel-popup__title-link svg {\n width: var(--popup-header-line-height);\n height: var(--popup-header-line-height);\n fill: currentColor;\n margin: 0 0.5em;\n}\n\n.bio-properties-panel-feel-popup .bio-properties-panel-feel-editor-container {\n display: flex;\n min-width: 100%;\n}\n\n.bio-properties-panel-feel-popup .bio-properties-panel-feel-editor-container .cm-scroller {\n overflow: auto !important;\n}\n\n.bio-properties-panel-feel-popup .bio-properties-panel-feelers-editor-container {\n width: 100%;\n display: flex;\n}\n\n.bio-properties-panel-feel-popup .bio-properties-panel-feelers-editor-container .bio-properties-panel-feelers-editor {\n display: flex;\n}\n\n.bio-properties-panel-feel-popup .bio-properties-panel-feelers-editor-container .bio-properties-panel-feelers-editor .cm-editor {\n width: 100%;\n}\n\n.bio-properties-panel-feel-popup .bio-properties-panel-input {\n width: 100%;\n resize: none;\n padding: 0;\n overflow: hidden;\n overflow-y: auto\n}\n\n.bio-properties-panel-feel-popup .bio-properties-panel-open-feel-popup {\n display: none !important;\n}\n\n.bio-properties-panel-feelers-editor-container .bio-properties-panel-open-feel-popup,\n.bio-properties-panel-feel-container .bio-properties-panel-open-feel-popup {\n position: absolute;\n top: 0;\n right: 0;\n line-height: 1;\n padding: 2px 4px;\n margin: 3px;\n display: none;\n background: none;\n border: none;\n color: var(--feel-open-popup-color);\n cursor: pointer;\n}\n\n.bio-properties-panel-feelers-editor-container:hover .bio-properties-panel-open-feel-popup,\n.bio-properties-panel-feel-container:hover .bio-properties-panel-open-feel-popup,\n.bio-properties-panel-feelers-editor-container:focus-within .bio-properties-panel-open-feel-popup,\n.bio-properties-panel-feel-container:focus-within .bio-properties-panel-open-feel-popup {\n display: block;\n}\n\n.bio-properties-panel-feelers-editor-container .bio-properties-panel-open-feel-popup:hover,\n.bio-properties-panel-feel-container .bio-properties-panel-open-feel-popup:hover {\n color: var(--feel-open-popup-hover-color);\n}\n\n.bio-properties-panel-feel-popup .bio-properties-panel-popup__footer .bio-properties-panel-feel-popup__close-btn {\n background: var(--feel-popup-close-background-color);\n width: 66px;\n font-weight: 400;\n font-size: 14px;\n font-family: inherit;\n color: white;\n border: none;\n height: 32px;\n cursor: pointer;\n}\n\n.bio-properties-panel-feel-popup .bio-properties-panel-feel-editor-container .cm-editor {\n width: 100%;\n height: 100%;\n}\n\n.bio-properties-panel-feel-popup .bio-properties-panel-feel-editor-container .cm-editor .cm-content {\n padding-left: 4px;\n}\n\n.bio-properties-panel-feel-popup .cm-gutters {\n background-color: var(--feel-popup-gutters-background-color);\n border: none;\n padding: 0;\n}\n\n.bio-properties-panel-feel-popup .cm-gutter {\n min-width: 32px;\n}\n\n.bio-properties-panel-feel-popup .cm-gutters .cm-lineNumbers .cm-gutterElement {\n text-align: center;\n}\n"],"sourceRoot":""}]);
+// Exports
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
+
+
+/***/ }),
+
+/***/ "../node_modules/css-loader/dist/cjs.js!../node_modules/bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css":
+/*!******************************************************************************************************************!*\
+ !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css ***!
+ \******************************************************************************************************************/
+/***/ ((module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../css-loader/dist/runtime/sourceMaps.js */ "../node_modules/css-loader/dist/runtime/sourceMaps.js");
+/* harmony import */ var _css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../css-loader/dist/runtime/api.js */ "../node_modules/css-loader/dist/runtime/api.js");
+/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
+/* harmony import */ var _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../css-loader/dist/runtime/getUrl.js */ "../node_modules/css-loader/dist/runtime/getUrl.js");
+/* harmony import */ var _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__);
+// Imports
+
+
+
+var ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require__(/*! ../font/bpmn.eot?16406289 */ "../node_modules/bpmn-js/dist/assets/bpmn-font/font/bpmn.eot?16406289"), __webpack_require__.b);
+var ___CSS_LOADER_URL_IMPORT_1___ = new URL(/* asset import */ __webpack_require__(/*! ../font/bpmn.svg?16406289 */ "../node_modules/bpmn-js/dist/assets/bpmn-font/font/bpmn.svg?16406289"), __webpack_require__.b);
+var ___CSS_LOADER_URL_IMPORT_2___ = new URL(/* asset import */ __webpack_require__(/*! data:application/octet-stream;base64,d09GRgABAAAAAD6EAAsAAAAAukAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAARAAAAGA+JEs0Y21hcAAAAYgAAAJyAAAHdFN1l/hnbHlmAAAD/AAANDcAAKHsuTD6FGhlYWQAADg0AAAAMAAAADYjByJvaGhlYQAAOGQAAAAbAAAAJAc8A79obXR4AAA4gAAAABEAAAGwpeAAAGxvY2EAADiUAAAA2gAAANrvU9ESbWF4cAAAOXAAAAAfAAAAIAGWBHZuYW1lAAA5kAAAAVIAAAI9ejh1lXBvc3QAADrkAAADngAACigQ+Ny7eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGF+wTiBgZWBgamKaQ8DA0MPhGZ8wGDIyAQUZWBlZsAKAtJcUxgOvGB88ZA56H8WQxTzGoZpQGFGFEVMALXcDdZ4nOXVR1JUUQCF4b+hQaJIzkmUJEEyAgJKRslRspLtbbIEywkMYHZ3off0caRLEOqj4N3zN93FA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nD+nTOWKbt5KgaxiQNs1zJG2XHXPQEUDBMhOWxoIZQKg6GTB+R7hRenpv2l2YzvC+ZuHly8JYPSV+vPD+H7qBatxLlxkTuY6XbJKPpwVTavSUpZMTT+PsnJzCH8MxsH/KMe0tly1TYNvRf4tycleTeSAzpwDJztNlLDJeu14FOBHVM0gtircLU4I/ulkvMwdoqe11lpatH0HfxQqU/C98p6VqSftsBm+AKlRAsNhR1S0Y6jpmMKFpJSbWKJFnS/eqaJmQiq1CNK5NxZ4boNKpTNnuCnRlFM5HXhkwmTKxrComPaNNFi4CFlo+4fTwjYVarW7bk9/DsAniu4bRbCVtwebRdEmKKeb0XD92kqNZknFOhBR13Js9ZQI85hZsTU1qqPnlQulvkTatz6TylG+GFOF0Y0vBO8TidnpLJ0yzFpPgvVbLLzy+6uHag1fiJ6SkLmhdfM6HmsW343mR9WjGu/Lq7GiMeUjPvlvekF6b9xG2jRXPlqxdqX66mkAO5d/K1UKRd1HdfOtXt6tK9MF0fjYhZFqjeIwptw8uRsd1Idch+1bMTxipN15bmLJAt6plHlvfszlO8hHKJbp08xM/eItVzEHnKK0vp5FA3WRQMVJivwmY+GV6j9Cubgm551PKjB8uz5xgW7UqP0rO4e3LaRU/djrY85G4d2vP5dZxfk1uCSXIZHCMb9Eiocd3ELKWmlGi7ZNKNREYnhbqSnq4LZozKDsxEs54akbdEbqFFlFIgas1YxspPEpdxYvOxS6z7vTFg6ai5pKt9rZK4ZenY5ZRSWf/OdX90nLQZmKYbURoHY00yHNQLkO0peXePDx2XZkSHzAHPHmq1/wGvxJ0SAAA="), __webpack_require__.b);
+var ___CSS_LOADER_URL_IMPORT_3___ = new URL(/* asset import */ __webpack_require__(/*! data:application/octet-stream;base64,AAEAAAALAIAAAwAwR1NVQiCLJXoAAAE4AAAAVE9TLzI+JEs0AAABjAAAAGBjbWFwU3WX+AAAA5wAAAd0Z2x5Zrkw+hQAAAvsAACh7GhlYWQjByJvAAAA4AAAADZoaGVhBzwDvwAAALwAAAAk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AAA6DgAAAA0AADoOQAA6DkAAAA1AADoOgAA6DoAAAA2AADoOwAA6DsAAAA3AADoPAAA6DwAAAA4AADoPQAA6D0AAAA5AADoPgAA6D4AAAA6AADoPwAA6D8AAAA7AADoQAAA6EAAAAA8AADoQQAA6EEAAAA9AADoQgAA6EIAAAA+AADoQwAA6EMAAAA/AADoRAAA6EQAAABAAADoRQAA6EUAAABBAADoRgAA6EYAAABCAADoRwAA6EcAAABDAADoSAAA6EgAAABEAADoSQAA6EkAAABFAADoSgAA6EoAAABGAADoSwAA6EsAAABHAADoTAAA6EwAAABIAADoTQAA6E0AAABJAADoTgAA6E4AAABKAADoTwAA6E8AAABLAADoUAAA6FAAAABMAADoUQAA6FEAAABNAADoUgAA6FIAAABOAADoUwAA6FMAAABPAADoVAAA6FQAAABQAADoVQAA6FUAAABRAADoVgAA6FYAAABSAADoVwAA6FcAAABTAADoWAAA6FgAAABUAADoWQAA6FkAAABVAADoWgAA6FoAAABWAADoWwAA6FsAAABXAADoXAAA6FwAAABYAADoXQAA6F0AAABZAADoXgAA6F4AAABaAADoXwAA6F8AAABbAADoYAAA6GAAAABcAADoYQAA6GEAAABdAADoYgAA6GIAAABeAADoYwAA6GMAAABfAADoZAAA6GQAAABgAADoZQAA6GUAAABhAADoZgAA6GYAAABiAADoZwAA6GcAAABjAADoaAAA6GgAAABkAADoaQAA6GkAAABlAADoawAA6GsAAABmAADoxAAA6MQAAABnAADo2wAA6NsAAABoAADo3AAA6NwAAABpAADo4AAA6OAAAABqAADo4QAA6OEAAABrAAAAAAB+AOIBvgbaB0oKcArECt4L0BEmEd4SlhMAE3wUSBlsGdYdKh1EHh4eRB5qHtofTB/4ILYhGiF0IcQiAiJoIywkHiSYJPolXCY+JlwmlCckJ5YoMijkKUwpjCoqKmoqlirqK2QrwCwULHYs3i0+Lfguoi8QL6QwojC6MZox7jKeMvIzoDRWNeI2iDm4Odw6nDroO6Q8kD0+PrxAMEDaQb5CDEMeQ1xDqESGRShKVkpwS6Z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XRjaC1ub24taW50ZXJydXB0aW5nLW11bHRpcGxlMGludGVybWVkaWF0ZS1ldmVudC1jYXRjaC1ub24taW50ZXJydXB0aW5nLXNpZ25hbCFpbnRlcm1lZGlhdGUtZXZlbnQtdGhyb3ctbXVsdGlwbGUkc3RhcnQtZXZlbnQtbm9uLWludGVycnVwdGluZy1tZXNzYWdlDWFkLWhvYy1tYXJrZXIMc2VydmljZS10YXNrCXRhc2stbm9uZRNjb21wZW5zYXRpb24tbWFya2VyJXN0YXJ0LWV2ZW50LW5vbi1pbnRlcnJ1cHRpbmctbXVsdGlwbGUfaW50ZXJtZWRpYXRlLWV2ZW50LXRocm93LXNpZ25hbDNpbnRlcm1lZGlhdGUtZXZlbnQtY2F0Y2gtbm9uLWludGVycnVwdGluZy1jb25kaXRpb24LcGFydGljaXBhbnQZZXZlbnQtc3VicHJvY2Vzcy1leHBhbmRlZBFsYW5lLWluc2VydC1iZWxvdwpzcGFjZS10b29sEGNvbm5lY3Rpb24tbXVsdGkEbGFuZQpsYXNzby10b29sEWxhbmUtaW5zZXJ0LWFib3ZlEWxhbmUtZGl2aWRlLXRocmVlD2xhbmUtZGl2aWRlLXR3bwpkYXRhLWlucHV0C2RhdGEtb3V0cHV0CWhhbmQtdG9vbAVncm91cA90ZXh0LWFubm90YXRpb24LdHJhbnNhY3Rpb24Mc2NyZXctd3JlbmNoCmNvbm5lY3Rpb24QY29uZGl0aW9uYWwtZmxvdwxkZWZhdWx0LWZsb3cAAA=="), __webpack_require__.b);
+var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
+var ___CSS_LOADER_URL_REPLACEMENT_0___ = _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_0___);
+var ___CSS_LOADER_URL_REPLACEMENT_1___ = _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_0___, { hash: "#iefix" });
+var ___CSS_LOADER_URL_REPLACEMENT_2___ = _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_1___, { hash: "#bpmn" });
+var ___CSS_LOADER_URL_REPLACEMENT_3___ = _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_2___);
+var ___CSS_LOADER_URL_REPLACEMENT_4___ = _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_3___);
+// Module
+___CSS_LOADER_EXPORT___.push([module.id, `@font-face {
+ font-family: 'bpmn';
+ src: url(${___CSS_LOADER_URL_REPLACEMENT_0___});
+ src: url(${___CSS_LOADER_URL_REPLACEMENT_1___}) format('embedded-opentype'),
+ url(${___CSS_LOADER_URL_REPLACEMENT_2___}) format('svg');
+ font-weight: normal;
+ font-style: normal;
+}
+@font-face {
+ font-family: 'bpmn';
+ src: url(${___CSS_LOADER_URL_REPLACEMENT_3___}) format('woff'),
+ url(${___CSS_LOADER_URL_REPLACEMENT_4___}) format('truetype');
+}
+/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
+/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
+/*
+@media screen and (-webkit-min-device-pixel-ratio:0) {
+ @font-face {
+ font-family: 'bpmn';
+ src: url('../font/bpmn.svg?16406289#bpmn') format('svg');
+ }
+}
+*/
+
+[class^="bpmn-icon-"]:before, [class*=" bpmn-icon-"]:before {
+ font-family: "bpmn";
+ font-style: normal;
+ font-weight: normal;
+ speak: never;
+
+ display: inline-block;
+ text-decoration: inherit;
+ width: 1em;
+ /* margin-right: .2em; */
+ text-align: center;
+ /* opacity: .8; */
+
+ /* For safety - reset parent styles, that can break glyph codes*/
+ font-variant: normal;
+ text-transform: none;
+
+ /* fix buttons height, for twitter bootstrap */
+ line-height: 1em;
+
+ /* Animation center compensation - margins should be symmetric */
+ /* remove if not needed */
+ /* margin-left: .2em; */
+
+ /* you can be more comfortable with increased icons size */
+ /* font-size: 120%; */
+
+ /* Font smoothing. That was taken from TWBS */
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+
+ /* Uncomment for 3D effect */
+ /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
+}
+
+.bpmn-icon-trash:before { content: '\\e801'; } /* '' */
+.bpmn-icon-gateway-parallel:before { content: '\\e804'; } /* '' */
+.bpmn-icon-intermediate-event-catch-cancel:before { content: '\\e805'; } /* '' */
+.bpmn-icon-intermediate-event-catch-non-interrupting-message:before { content: '\\e806'; } /* '' */
+.bpmn-icon-start-event-compensation:before { content: '\\e807'; } /* '' */
+.bpmn-icon-start-event-non-interrupting-parallel-multiple:before { content: '\\e808'; } /* '' */
+.bpmn-icon-loop-marker:before { content: '\\e809'; } /* '' */
+.bpmn-icon-parallel-mi-marker:before { content: '\\e80a'; } /* '' */
+.bpmn-icon-start-event-non-interrupting-signal:before { content: '\\e80b'; } /* '' */
+.bpmn-icon-intermediate-event-catch-non-interrupting-timer:before { content: '\\e80c'; } /* '' */
+.bpmn-icon-intermediate-event-catch-parallel-multiple:before { content: '\\e80d'; } /* '' */
+.bpmn-icon-intermediate-event-catch-compensation:before { content: '\\e80e'; } /* '' */
+.bpmn-icon-gateway-xor:before { content: '\\e80f'; } /* '' */
+.bpmn-icon-end-event-cancel:before { content: '\\e811'; } /* '' */
+.bpmn-icon-intermediate-event-catch-condition:before { content: '\\e812'; } /* '' */
+.bpmn-icon-intermediate-event-catch-non-interrupting-parallel-multiple:before { content: '\\e813'; } /* '' */
+.bpmn-icon-start-event-condition:before { content: '\\e814'; } /* '' */
+.bpmn-icon-start-event-non-interrupting-timer:before { content: '\\e815'; } /* '' */
+.bpmn-icon-sequential-mi-marker:before { content: '\\e816'; } /* '' */
+.bpmn-icon-user-task:before { content: '\\e817'; } /* '' */
+.bpmn-icon-business-rule:before { content: '\\e818'; } /* '' */
+.bpmn-icon-sub-process-marker:before { content: '\\e819'; } /* '' */
+.bpmn-icon-start-event-parallel-multiple:before { content: '\\e81a'; } /* '' */
+.bpmn-icon-start-event-error:before { content: '\\e81b'; } /* '' */
+.bpmn-icon-intermediate-event-catch-signal:before { content: '\\e81c'; } /* '' */
+.bpmn-icon-intermediate-event-catch-error:before { content: '\\e81d'; } /* '' */
+.bpmn-icon-end-event-compensation:before { content: '\\e81e'; } /* '' */
+.bpmn-icon-subprocess-collapsed:before { content: '\\e81f'; } /* '' */
+.bpmn-icon-subprocess-expanded:before { content: '\\e820'; } /* '' */
+.bpmn-icon-task:before { content: '\\e821'; } /* '' */
+.bpmn-icon-end-event-error:before { content: '\\e822'; } /* '' */
+.bpmn-icon-intermediate-event-catch-escalation:before { content: '\\e823'; } /* '' */
+.bpmn-icon-intermediate-event-catch-timer:before { content: '\\e824'; } /* '' */
+.bpmn-icon-start-event-escalation:before { content: '\\e825'; } /* '' */
+.bpmn-icon-start-event-signal:before { content: '\\e826'; } /* '' */
+.bpmn-icon-business-rule-task:before { content: '\\e827'; } /* '' */
+.bpmn-icon-manual:before { content: '\\e828'; } /* '' */
+.bpmn-icon-receive:before { content: '\\e829'; } /* '' */
+.bpmn-icon-call-activity:before { content: '\\e82a'; } /* '' */
+.bpmn-icon-start-event-timer:before { content: '\\e82b'; } /* '' */
+.bpmn-icon-start-event-message:before { content: '\\e82c'; } /* '' */
+.bpmn-icon-intermediate-event-none:before { content: '\\e82d'; } /* '' */
+.bpmn-icon-intermediate-event-catch-link:before { content: '\\e82e'; } /* '' */
+.bpmn-icon-end-event-escalation:before { content: '\\e82f'; } /* '' */
+.bpmn-icon-bpmn-io:before { content: '\\e831'; } /* '' */
+.bpmn-icon-gateway-complex:before { content: '\\e832'; } /* '' */
+.bpmn-icon-gateway-eventbased:before { content: '\\e833'; } /* '' */
+.bpmn-icon-gateway-none:before { content: '\\e834'; } /* '' */
+.bpmn-icon-gateway-or:before { content: '\\e835'; } /* '' */
+.bpmn-icon-end-event-terminate:before { content: '\\e836'; } /* '' */
+.bpmn-icon-end-event-signal:before { content: '\\e837'; } /* '' */
+.bpmn-icon-end-event-none:before { content: '\\e838'; } /* '' */
+.bpmn-icon-end-event-multiple:before { content: '\\e839'; } /* '' */
+.bpmn-icon-end-event-message:before { content: '\\e83a'; } /* '' */
+.bpmn-icon-end-event-link:before { content: '\\e83b'; } /* '' */
+.bpmn-icon-intermediate-event-catch-message:before { content: '\\e83c'; } /* '' */
+.bpmn-icon-intermediate-event-throw-compensation:before { content: '\\e83d'; } /* '' */
+.bpmn-icon-start-event-multiple:before { content: '\\e83e'; } /* '' */
+.bpmn-icon-script:before { content: '\\e83f'; } /* '' */
+.bpmn-icon-manual-task:before { content: '\\e840'; } /* '' */
+.bpmn-icon-send:before { content: '\\e841'; } /* '' */
+.bpmn-icon-service:before { content: '\\e842'; } /* '' */
+.bpmn-icon-receive-task:before { content: '\\e843'; } /* '' */
+.bpmn-icon-user:before { content: '\\e844'; } /* '' */
+.bpmn-icon-start-event-none:before { content: '\\e845'; } /* '' */
+.bpmn-icon-intermediate-event-throw-escalation:before { content: '\\e846'; } /* '' */
+.bpmn-icon-intermediate-event-catch-multiple:before { content: '\\e847'; } /* '' */
+.bpmn-icon-intermediate-event-catch-non-interrupting-escalation:before { content: '\\e848'; } /* '' */
+.bpmn-icon-intermediate-event-throw-link:before { content: '\\e849'; } /* '' */
+.bpmn-icon-start-event-non-interrupting-condition:before { content: '\\e84a'; } /* '' */
+.bpmn-icon-data-object:before { content: '\\e84b'; } /* '' */
+.bpmn-icon-script-task:before { content: '\\e84c'; } /* '' */
+.bpmn-icon-send-task:before { content: '\\e84d'; } /* '' */
+.bpmn-icon-data-store:before { content: '\\e84e'; } /* '' */
+.bpmn-icon-start-event-non-interrupting-escalation:before { content: '\\e84f'; } /* '' */
+.bpmn-icon-intermediate-event-throw-message:before { content: '\\e850'; } /* '' */
+.bpmn-icon-intermediate-event-catch-non-interrupting-multiple:before { content: '\\e851'; } /* '' */
+.bpmn-icon-intermediate-event-catch-non-interrupting-signal:before { content: '\\e852'; } /* '' */
+.bpmn-icon-intermediate-event-throw-multiple:before { content: '\\e853'; } /* '' */
+.bpmn-icon-start-event-non-interrupting-message:before { content: '\\e854'; } /* '' */
+.bpmn-icon-ad-hoc-marker:before { content: '\\e855'; } /* '' */
+.bpmn-icon-service-task:before { content: '\\e856'; } /* '' */
+.bpmn-icon-task-none:before { content: '\\e857'; } /* '' */
+.bpmn-icon-compensation-marker:before { content: '\\e858'; } /* '' */
+.bpmn-icon-start-event-non-interrupting-multiple:before { content: '\\e859'; } /* '' */
+.bpmn-icon-intermediate-event-throw-signal:before { content: '\\e85a'; } /* '' */
+.bpmn-icon-intermediate-event-catch-non-interrupting-condition:before { content: '\\e85b'; } /* '' */
+.bpmn-icon-participant:before { content: '\\e85c'; } /* '' */
+.bpmn-icon-event-subprocess-expanded:before { content: '\\e85d'; } /* '' */
+.bpmn-icon-lane-insert-below:before { content: '\\e85e'; } /* '' */
+.bpmn-icon-space-tool:before { content: '\\e85f'; } /* '' */
+.bpmn-icon-connection-multi:before { content: '\\e860'; } /* '' */
+.bpmn-icon-lane:before { content: '\\e861'; } /* '' */
+.bpmn-icon-lasso-tool:before { content: '\\e862'; } /* '' */
+.bpmn-icon-lane-insert-above:before { content: '\\e863'; } /* '' */
+.bpmn-icon-lane-divide-three:before { content: '\\e864'; } /* '' */
+.bpmn-icon-lane-divide-two:before { content: '\\e865'; } /* '' */
+.bpmn-icon-data-input:before { content: '\\e866'; } /* '' */
+.bpmn-icon-data-output:before { content: '\\e867'; } /* '' */
+.bpmn-icon-hand-tool:before { content: '\\e868'; } /* '' */
+.bpmn-icon-group:before { content: '\\e869'; } /* '' */
+.bpmn-icon-text-annotation:before { content: '\\e86b'; } /* '' */
+.bpmn-icon-transaction:before { content: '\\e8c4'; } /* '' */
+.bpmn-icon-screw-wrench:before { content: '\\e8db'; } /* '' */
+.bpmn-icon-connection:before { content: '\\e8dc'; } /* '' */
+.bpmn-icon-conditional-flow:before { content: '\\e8e0'; } /* '' */
+.bpmn-icon-default-flow:before { content: '\\e8e1'; } /* '' */
+`, "",{"version":3,"sources":["webpack://./../node_modules/bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css"],"names":[],"mappings":"AAAA;EACE,mBAAmB;EACnB,4CAAqC;EACrC;4DACwD;EACxD,mBAAmB;EACnB,kBAAkB;AACpB;AACA;EACE,mBAAmB;EACnB;iEAC4p8D;AAC9p8D;AACA,gGAAgG;AAChG,2FAA2F;AAC3F;;;;;;;CAOC;;AAED;EACE,mBAAmB;EACnB,kBAAkB;EAClB,mBAAmB;EACnB,YAAY;;EAEZ,qBAAqB;EACrB,wBAAwB;EACxB,UAAU;EACV,wBAAwB;EACxB,kBAAkB;EAClB,iBAAiB;;EAEjB,gEAAgE;EAChE,oBAAoB;EACpB,oBAAoB;;EAEpB,8CAA8C;EAC9C,gBAAgB;;EAEhB,gEAAgE;EAChE,yBAAyB;EACzB,uBAAuB;;EAEvB,0DAA0D;EAC1D,qBAAqB;;EAErB,6CAA6C;EAC7C,mCAAmC;EACnC,kCAAkC;;EAElC,4BAA4B;EAC5B,uDAAuD;AACzD;;AAEA,0BAA0B,gBAAgB,EAAE,EAAE,QAAQ;AACtD,qCAAqC,gBAAgB,EAAE,EAAE,QAAQ;AACjE,oDAAoD,gBAAgB,EAAE,EAAE,QAAQ;AAChF,sEAAsE,gBAAgB,EAAE,EAAE,QAAQ;AAClG,6CAA6C,gBAAgB,EAAE,EAAE,QAAQ;AACzE,mEAAmE,gBAAgB,EAAE,EAAE,QAAQ;AAC/F,gCAAgC,gBAAgB,EAAE,EAAE,QAAQ;AAC5D,uCAAuC,gBAAgB,EAAE,EAAE,QAAQ;AACnE,wDAAwD,gBAAgB,EAAE,EAAE,QAAQ;AACpF,oEAAoE,gBAAgB,EAAE,EA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AAE,QAAQ;AAChE,+BAA+B,gBAAgB,EAAE,EAAE,QAAQ;AAC3D,gCAAgC,gBAAgB,EAAE,EAAE,QAAQ;AAC5D,8BAA8B,gBAAgB,EAAE,EAAE,QAAQ;AAC1D,0BAA0B,gBAAgB,EAAE,EAAE,QAAQ;AACtD,oCAAoC,gBAAgB,EAAE,EAAE,QAAQ;AAChE,gCAAgC,gBAAgB,EAAE,EAAE,QAAQ;AAC5D,iCAAiC,gBAAgB,EAAE,EAAE,QAAQ;AAC7D,+BAA+B,gBAAgB,EAAE,EAAE,QAAQ;AAC3D,qCAAqC,gBAAgB,EAAE,EAAE,QAAQ;AACjE,iCAAiC,gBAAgB,EAAE,EAAE,QAAQ","sourcesContent":["@font-face {\n font-family: 'bpmn';\n src: url('../font/bpmn.eot?16406289');\n src: url('../font/bpmn.eot?16406289#iefix') format('embedded-opentype'),\n url('../font/bpmn.svg?16406289#bpmn') format('svg');\n font-weight: normal;\n font-style: normal;\n}\n@font-face {\n font-family: 'bpmn';\n src: url('data:application/octet-stream;base64,d09GRgABAAAAAD6EAAsAAAAAukAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAARAAAAGA+JEs0Y21hcAAAAYgAAAJyAAAHdFN1l/hnbHlmAAAD/AAANDcAAKHsuTD6FGhlYWQAADg0AAAAMAAAADYjByJvaGhlYQAAOGQAAAAbAAAAJAc8A79obXR4AAA4gAAAABEAAAGwpeAAAGxvY2EAADiUAAAA2gAAANrvU9ESbWF4cAAAOXAAAAAfAAAAIAGWBHZuYW1lAAA5kAAAAVIAAAI9ejh1lXBvc3QAADrkAAADngAACigQ+Ny7eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGF+wTiBgZWBgamKaQ8DA0MPhGZ8wGDIyAQUZWBlZsAKAtJcUxgOvGB88ZA56H8WQxTzGoZpQ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A6AADoPwAA6D8AAAA7AADoQAAA6EAAAAA8AADoQQAA6EEAAAA9AADoQgAA6EIAAAA+AADoQwAA6EMAAAA/AADoRAAA6EQAAABAAADoRQAA6EUAAABBAADoRgAA6EYAAABCAADoRwAA6EcAAABDAADoSAAA6EgAAABEAADoSQAA6EkAAABFAADoSgAA6EoAAABGAADoSwAA6EsAAABHAADoTAAA6EwAAABIAADoTQAA6E0AAABJAADoTgAA6E4AAABKAADoTwAA6E8AAABLAADoUAAA6FAAAABMAADoUQAA6FEAAABNAADoUgAA6FIAAABOAADoUwAA6FMAAABPAADoVAAA6FQAAABQAADoVQAA6FUAAABRAADoVgAA6FYAAABSAADoVwAA6FcAAABTAADoWAAA6FgAAABUAADoWQAA6FkAAABVAADoWgAA6FoAAABWAADoWwAA6FsAAABXAADoXAAA6FwAAABYAADoXQAA6F0AAABZAADoXgAA6F4AAABaAADoXwAA6F8AAABbAADoYAAA6GAAAABcAADoYQAA6GEAAABdAADoYgAA6GIAAABeAADoYwAA6GMAAABfAADoZAAA6GQAAABgAADoZQAA6GUAAABhAADoZgAA6GYAAABiAADoZwAA6GcAAABjAADoaAAA6GgAAABkAADoaQAA6GkAAABlAADoawAA6GsAAABmAADoxAAA6MQAAABnAADo2wAA6NsAAABoAADo3AAA6NwAAABpAADo4AAA6OAAAABqAADo4QAA6OEAAABrAAAAAAB+AOIBvgbaB0oKcArECt4L0BEmEd4SlhMAE3wUSBlsGdYdKh1EHh4eRB5qHtofTB/4ILYhGiF0IcQiAiJoIywkHiSYJPolXCY+JlwmlCckJ5YoMijkKUwpjCoqKmoqlirqK2QrwCwULHYs3i0+Lfguoi8QL6QwojC6MZox7jKeMvIzoDRWNeI2iDm4Odw6nDroO6Q8kD0+PrxAMEDaQb5CDEMeQ1xDqESGRShKVkpwS6ZL7kwWTERMWkyaTOJNPE12TahN0E8iT7hP6lBUUIpQsFDaUPYAAAAFAAD/wAM7AucAGwAsADEAQABNAAABBiIHDgEdAQcOARYzITI2Ji8BNT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Rlcm1lZGlhdGUtZXZlbnQtdGhyb3ctbXVsdGlwbGUkc3RhcnQtZXZlbnQtbm9uLWludGVycnVwdGluZy1tZXNzYWdlDWFkLWhvYy1tYXJrZXIMc2VydmljZS10YXNrCXRhc2stbm9uZRNjb21wZW5zYXRpb24tbWFya2VyJXN0YXJ0LWV2ZW50LW5vbi1pbnRlcnJ1cHRpbmctbXVsdGlwbGUfaW50ZXJtZWRpYXRlLWV2ZW50LXRocm93LXNpZ25hbDNpbnRlcm1lZGlhdGUtZXZlbnQtY2F0Y2gtbm9uLWludGVycnVwdGluZy1jb25kaXRpb24LcGFydGljaXBhbnQZZXZlbnQtc3VicHJvY2Vzcy1leHBhbmRlZBFsYW5lLWluc2VydC1iZWxvdwpzcGFjZS10b29sEGNvbm5lY3Rpb24tbXVsdGkEbGFuZQpsYXNzby10b29sEWxhbmUtaW5zZXJ0LWFib3ZlEWxhbmUtZGl2aWRlLXRocmVlD2xhbmUtZGl2aWRlLXR3bwpkYXRhLWlucHV0C2RhdGEtb3V0cHV0CWhhbmQtdG9vbAVncm91cA90ZXh0LWFubm90YXRpb24LdHJhbnNhY3Rpb24Mc2NyZXctd3JlbmNoCmNvbm5lY3Rpb24QY29uZGl0aW9uYWwtZmxvdwxkZWZhdWx0LWZsb3cAAA==') format('truetype');\n}\n/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */\n/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */\n/*\n@media screen and (-webkit-min-device-pixel-ratio:0) {\n @font-face {\n font-family: 'bpmn';\n src: url('../font/bpmn.svg?16406289#bpmn') format('svg');\n }\n}\n*/\n\n[class^=\"bpmn-icon-\"]:before, [class*=\" bpmn-icon-\"]:before {\n font-family: \"bpmn\";\n font-style: normal;\n font-weight: normal;\n speak: never;\n\n display: inline-block;\n text-decoration: inherit;\n width: 1em;\n /* margin-right: .2em; */\n text-align: center;\n /* opacity: .8; */\n\n /* For safety - reset parent styles, that can break glyph codes*/\n font-variant: normal;\n text-transform: none;\n\n /* fix buttons height, for twitter bootstrap */\n line-height: 1em;\n\n /* Animation center compensation - margins should be symmetric */\n /* remove if not needed */\n /* margin-left: .2em; */\n\n /* you can be more comfortable with increased icons size */\n /* font-size: 120%; */\n \n /* Font smoothing. That was taken from TWBS */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n\n /* Uncomment for 3D effect */\n /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */\n}\n\n.bpmn-icon-trash:before { content: '\\e801'; } /* '' */\n.bpmn-icon-gateway-parallel:before { content: '\\e804'; } /* '' */\n.bpmn-icon-intermediate-event-catch-cancel:before { content: '\\e805'; } /* '' */\n.bpmn-icon-intermediate-event-catch-non-interrupting-message:before { content: '\\e806'; } /* '' */\n.bpmn-icon-start-event-compensation:before { content: '\\e807'; } /* '' */\n.bpmn-icon-start-event-non-interrupting-parallel-multiple:before { content: '\\e808'; } /* '' */\n.bpmn-icon-loop-marker:before { content: '\\e809'; } /* '' */\n.bpmn-icon-parallel-mi-marker:before { content: '\\e80a'; } /* '' */\n.bpmn-icon-start-event-non-interrupting-signal:before { content: '\\e80b'; } /* '' */\n.bpmn-icon-intermediate-event-catch-non-interrupting-timer:before { content: '\\e80c'; } /* '' */\n.bpmn-icon-intermediate-event-catch-parallel-multiple:before { content: '\\e80d'; } /* '' */\n.bpmn-icon-intermediate-event-catch-compensation:before { content: '\\e80e'; } /* '' */\n.bpmn-icon-gateway-xor:before { content: '\\e80f'; } /* '' */\n.bpmn-icon-end-event-cancel:before { content: '\\e811'; } /* '' */\n.bpmn-icon-intermediate-event-catch-condition:before { content: '\\e812'; } /* '' */\n.bpmn-icon-intermediate-event-catch-non-interrupting-parallel-multiple:before { content: '\\e813'; } /* '' */\n.bpmn-icon-start-event-condition:before { content: '\\e814'; } /* '' */\n.bpmn-icon-start-event-non-interrupting-timer:before { content: '\\e815'; } /* '' */\n.bpmn-icon-sequential-mi-marker:before { content: '\\e816'; } /* '' */\n.bpmn-icon-user-task:before { content: '\\e817'; } /* '' */\n.bpmn-icon-business-rule:before { content: '\\e818'; } /* '' */\n.bpmn-icon-sub-process-marker:before { content: '\\e819'; } /* '' */\n.bpmn-icon-start-event-parallel-multiple:before { content: '\\e81a'; } /* '' */\n.bpmn-icon-start-event-error:before { content: '\\e81b'; } /* '' */\n.bpmn-icon-intermediate-event-catch-signal:before { content: '\\e81c'; } /* '' */\n.bpmn-icon-intermediate-event-catch-error:before { content: '\\e81d'; } /* '' */\n.bpmn-icon-end-event-compensation:before { content: '\\e81e'; } /* '' */\n.bpmn-icon-subprocess-collapsed:before { content: '\\e81f'; } /* '' */\n.bpmn-icon-subprocess-expanded:before { content: '\\e820'; } /* '' */\n.bpmn-icon-task:before { content: '\\e821'; } /* '' */\n.bpmn-icon-end-event-error:before { content: '\\e822'; } /* '' */\n.bpmn-icon-intermediate-event-catch-escalation:before { content: '\\e823'; } /* '' */\n.bpmn-icon-intermediate-event-catch-timer:before { content: '\\e824'; } /* '' */\n.bpmn-icon-start-event-escalation:before { content: '\\e825'; } /* '' */\n.bpmn-icon-start-event-signal:before { content: '\\e826'; } /* '' */\n.bpmn-icon-business-rule-task:before { content: '\\e827'; } /* '' */\n.bpmn-icon-manual:before { content: '\\e828'; } /* '' */\n.bpmn-icon-receive:before { content: '\\e829'; } /* '' */\n.bpmn-icon-call-activity:before { content: '\\e82a'; } /* '' */\n.bpmn-icon-start-event-timer:before { content: '\\e82b'; } /* '' */\n.bpmn-icon-start-event-message:before { content: '\\e82c'; } /* '' */\n.bpmn-icon-intermediate-event-none:before { content: '\\e82d'; } /* '' */\n.bpmn-icon-intermediate-event-catch-link:before { content: '\\e82e'; } /* '' */\n.bpmn-icon-end-event-escalation:before { content: '\\e82f'; } /* '' */\n.bpmn-icon-bpmn-io:before { content: '\\e831'; } /* '' */\n.bpmn-icon-gateway-complex:before { content: '\\e832'; } /* '' */\n.bpmn-icon-gateway-eventbased:before { content: '\\e833'; } /* '' */\n.bpmn-icon-gateway-none:before { content: '\\e834'; } /* '' */\n.bpmn-icon-gateway-or:before { content: '\\e835'; } /* '' */\n.bpmn-icon-end-event-terminate:before { content: '\\e836'; } /* '' */\n.bpmn-icon-end-event-signal:before { content: '\\e837'; } /* '' */\n.bpmn-icon-end-event-none:before { content: '\\e838'; } /* '' */\n.bpmn-icon-end-event-multiple:before { content: '\\e839'; } /* '' */\n.bpmn-icon-end-event-message:before { content: '\\e83a'; } /* '' */\n.bpmn-icon-end-event-link:before { content: '\\e83b'; } /* '' */\n.bpmn-icon-intermediate-event-catch-message:before { content: '\\e83c'; } /* '' */\n.bpmn-icon-intermediate-event-throw-compensation:before { content: '\\e83d'; } /* '' */\n.bpmn-icon-start-event-multiple:before { content: '\\e83e'; } /* '' */\n.bpmn-icon-script:before { content: '\\e83f'; } /* '' */\n.bpmn-icon-manual-task:before { content: '\\e840'; } /* '' */\n.bpmn-icon-send:before { content: '\\e841'; } /* '' */\n.bpmn-icon-service:before { content: '\\e842'; } /* '' */\n.bpmn-icon-receive-task:before { content: '\\e843'; } /* '' */\n.bpmn-icon-user:before { content: '\\e844'; } /* '' */\n.bpmn-icon-start-event-none:before { content: '\\e845'; } /* '' */\n.bpmn-icon-intermediate-event-throw-escalation:before { content: '\\e846'; } /* '' */\n.bpmn-icon-intermediate-event-catch-multiple:before { content: '\\e847'; } /* '' */\n.bpmn-icon-intermediate-event-catch-non-interrupting-escalation:before { content: '\\e848'; } /* '' */\n.bpmn-icon-intermediate-event-throw-link:before { content: '\\e849'; } /* '' */\n.bpmn-icon-start-event-non-interrupting-condition:before { content: '\\e84a'; } /* '' */\n.bpmn-icon-data-object:before { content: '\\e84b'; } /* '' */\n.bpmn-icon-script-task:before { content: '\\e84c'; } /* '' */\n.bpmn-icon-send-task:before { content: '\\e84d'; } /* '' */\n.bpmn-icon-data-store:before { content: '\\e84e'; } /* '' */\n.bpmn-icon-start-event-non-interrupting-escalation:before { content: '\\e84f'; } /* '' */\n.bpmn-icon-intermediate-event-throw-message:before { content: '\\e850'; } /* '' */\n.bpmn-icon-intermediate-event-catch-non-interrupting-multiple:before { content: '\\e851'; } /* '' */\n.bpmn-icon-intermediate-event-catch-non-interrupting-signal:before { content: '\\e852'; } /* '' */\n.bpmn-icon-intermediate-event-throw-multiple:before { content: '\\e853'; } /* '' */\n.bpmn-icon-start-event-non-interrupting-message:before { content: '\\e854'; } /* '' */\n.bpmn-icon-ad-hoc-marker:before { content: '\\e855'; } /* '' */\n.bpmn-icon-service-task:before { content: '\\e856'; } /* '' */\n.bpmn-icon-task-none:before { content: '\\e857'; } /* '' */\n.bpmn-icon-compensation-marker:before { content: '\\e858'; } /* '' */\n.bpmn-icon-start-event-non-interrupting-multiple:before { content: '\\e859'; } /* '' */\n.bpmn-icon-intermediate-event-throw-signal:before { content: '\\e85a'; } /* '' */\n.bpmn-icon-intermediate-event-catch-non-interrupting-condition:before { content: '\\e85b'; } /* '' */\n.bpmn-icon-participant:before { content: '\\e85c'; } /* '' */\n.bpmn-icon-event-subprocess-expanded:before { content: '\\e85d'; } /* '' */\n.bpmn-icon-lane-insert-below:before { content: '\\e85e'; } /* '' */\n.bpmn-icon-space-tool:before { content: '\\e85f'; } /* '' */\n.bpmn-icon-connection-multi:before { content: '\\e860'; } /* '' */\n.bpmn-icon-lane:before { content: '\\e861'; } /* '' */\n.bpmn-icon-lasso-tool:before { content: '\\e862'; } /* '' */\n.bpmn-icon-lane-insert-above:before { content: '\\e863'; } /* '' */\n.bpmn-icon-lane-divide-three:before { content: '\\e864'; } /* '' */\n.bpmn-icon-lane-divide-two:before { content: '\\e865'; } /* '' */\n.bpmn-icon-data-input:before { content: '\\e866'; } /* '' */\n.bpmn-icon-data-output:before { content: '\\e867'; } /* '' */\n.bpmn-icon-hand-tool:before { content: '\\e868'; } /* '' */\n.bpmn-icon-group:before { content: '\\e869'; } /* '' */\n.bpmn-icon-text-annotation:before { content: '\\e86b'; } /* '' */\n.bpmn-icon-transaction:before { content: '\\e8c4'; } /* '' */\n.bpmn-icon-screw-wrench:before { content: '\\e8db'; } /* '' */\n.bpmn-icon-connection:before { content: '\\e8dc'; } /* '' */\n.bpmn-icon-conditional-flow:before { content: '\\e8e0'; } /* '' */\n.bpmn-icon-default-flow:before { content: '\\e8e1'; } /* '' */\n"],"sourceRoot":""}]);
+// Exports
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
+
+
+/***/ }),
+
+/***/ "../node_modules/css-loader/dist/cjs.js!../node_modules/bpmn-js/dist/assets/bpmn-js.css":
+/*!**********************************************************************************************!*\
+ !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/bpmn-js/dist/assets/bpmn-js.css ***!
+ \**********************************************************************************************/
+/***/ ((module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../css-loader/dist/runtime/sourceMaps.js */ "../node_modules/css-loader/dist/runtime/sourceMaps.js");
+/* harmony import */ var _css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ "../node_modules/css-loader/dist/runtime/api.js");
+/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
+/* harmony import */ var _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../css-loader/dist/runtime/getUrl.js */ "../node_modules/css-loader/dist/runtime/getUrl.js");
+/* harmony import */ var _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__);
+// Imports
+
+
+
+var ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require__(/*! data:image/svg+xml;utf8, */ "data:image/svg+xml;utf8, "), __webpack_require__.b);
+var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
+var ___CSS_LOADER_URL_REPLACEMENT_0___ = _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_0___);
+// Module
+___CSS_LOADER_EXPORT___.push([module.id, `.bjs-container {
+ --bjs-font-family: Arial, sans-serif;
+
+ --color-grey-225-10-15: hsl(225, 10%, 15%);
+ --color-grey-225-10-35: hsl(225, 10%, 35%);
+ --color-grey-225-10-55: hsl(225, 10%, 55%);
+ --color-grey-225-10-75: hsl(225, 10%, 75%);
+ --color-grey-225-10-80: hsl(225, 10%, 80%);
+ --color-grey-225-10-85: hsl(225, 10%, 85%);
+ --color-grey-225-10-90: hsl(225, 10%, 90%);
+ --color-grey-225-10-95: hsl(225, 10%, 95%);
+ --color-grey-225-10-97: hsl(225, 10%, 97%);
+
+ --color-blue-205-100-45: hsl(205, 100%, 45%);
+ --color-blue-205-100-45-opacity-30: hsla(205, 100%, 45%, 30%);
+ --color-blue-205-100-50: hsl(205, 100%, 50%);
+ --color-blue-205-100-95: hsl(205, 100%, 95%);
+
+ --color-green-150-86-44: hsl(150, 86%, 44%);
+
+ --color-red-360-100-40: hsl(360, 100%, 40%);
+ --color-red-360-100-45: hsl(360, 100%, 45%);
+ --color-red-360-100-92: hsl(360, 100%, 92%);
+ --color-red-360-100-97: hsl(360, 100%, 97%);
+
+ --color-white: hsl(0, 0%, 100%);
+ --color-black: hsl(0, 0%, 0%);
+ --color-black-opacity-05: hsla(0, 0%, 0%, 5%);
+ --color-black-opacity-10: hsla(0, 0%, 0%, 10%);
+
+ --breadcrumbs-font-family: var(--bjs-font-family);
+ --breadcrumbs-item-color: var(--color-blue-205-100-50);
+ --breadcrumbs-arrow-color: var(--color-black);
+ --drilldown-fill-color: var(--color-white);
+ --drilldown-background-color: var(--color-blue-205-100-50);
+}
+
+.bjs-breadcrumbs {
+ position: absolute;
+ display: none;
+ flex-wrap: wrap;
+ align-items: center;
+ top: 30px;
+ left: 30px;
+ padding: 0px;
+ margin: 0px;
+ font-family: var(--breadcrumbs-font-family);
+ font-size: 16px;
+ line-height: normal;
+}
+
+.bjs-breadcrumbs-shown .bjs-breadcrumbs {
+ display: flex;
+}
+
+.djs-palette-shown .bjs-breadcrumbs {
+ left: 90px;
+}
+
+.djs-palette-shown.djs-palette-two-column .bjs-breadcrumbs {
+ left: 140px;
+}
+
+.bjs-breadcrumbs li {
+ display: inline-flex;
+ padding-bottom: 5px;
+ align-items: center;
+}
+
+.bjs-breadcrumbs li a {
+ cursor: pointer;
+ color: var(--breadcrumbs-item-color);
+}
+
+.bjs-breadcrumbs li:last-of-type a {
+ color: inherit;
+ cursor: default;
+}
+
+.bjs-breadcrumbs li:not(:first-child)::before {
+ content: url(${___CSS_LOADER_URL_REPLACEMENT_0___});
+ padding: 0 8px;
+ color: var(--breadcrumbs-arrow-color);
+ height: 1em;
+}
+
+.bjs-breadcrumbs .bjs-crumb {
+ display: inline-block;
+ max-width: 200px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.bjs-drilldown {
+ width: 20px;
+ height: 20px;
+
+ padding: 0px;
+ margin-left: -20px;
+
+ cursor: pointer;
+ border: none;
+ border-radius: 2px;
+ outline: none;
+
+ fill: var(--drilldown-fill-color);
+ background-color: var(--drilldown-background-color);
+}
+
+.bjs-drilldown-empty {
+ display: none;
+}
+
+.selected .bjs-drilldown-empty {
+ display: inherit;
+}
+
+[data-popup="align-elements"] .djs-popup-results {
+ display: flex;
+}
+
+[data-popup="align-elements"] .djs-popup-body [data-group] + [data-group] {
+ border-left: 1px solid var(--popup-border-color);
+}
+
+[data-popup="align-elements"] [data-group="align"] {
+ display: grid;
+ grid-template-columns: repeat(3, 1fr);
+}
+
+[data-popup="align-elements"] .djs-popup-body .entry {
+ padding: 6px 8px;
+}
+
+[data-popup="align-elements"] .djs-popup-body .entry:not(:first-child) {
+ margin-top: 0;
+}
+
+[data-popup="align-elements"] .djs-popup-entry-icon {
+ display: block;
+ margin: 0;
+ height: 20px;
+ width: 20px;
+}
+`, "",{"version":3,"sources":["webpack://./../node_modules/bpmn-js/dist/assets/bpmn-js.css"],"names":[],"mappings":"AAAA;EACE,oCAAoC;;EAEpC,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;;EAE1C,4CAA4C;EAC5C,6DAA6D;EAC7D,4CAA4C;EAC5C,4CAA4C;;EAE5C,2CAA2C;;EAE3C,2CAA2C;EAC3C,2CAA2C;EAC3C,2CAA2C;EAC3C,2CAA2C;;EAE3C,+BAA+B;EAC/B,6BAA6B;EAC7B,6CAA6C;EAC7C,8CAA8C;;EAE9C,iDAAiD;EACjD,sDAAsD;EACtD,6CAA6C;EAC7C,0CAA0C;EAC1C,0DAA0D;AAC5D;;AAEA;EACE,kBAAkB;EAClB,aAAa;EACb,eAAe;EACf,mBAAmB;EACnB,SAAS;EACT,UAAU;EACV,YAAY;EACZ,WAAW;EACX,2CAA2C;EAC3C,eAAe;EACf,mBAAmB;AACrB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,WAAW;AACb;;AAEA;EACE,oBAAoB;EACpB,mBAAmB;EACnB,mBAAmB;AACrB;;AAEA;EACE,eAAe;EACf,oCAAoC;AACtC;;AAEA;EACE,cAAc;EACd,eAAe;AACjB;;AAEA;EACE,gDAAkO;EAClO,cAAc;EACd,qCAAqC;EACrC,WAAW;AACb;;AAEA;EACE,qBAAqB;EACrB,gBAAgB;EAChB,gBAAgB;EAChB,uBAAuB;EACvB,mBAAmB;AACrB;;AAEA;EACE,WAAW;EACX,YAAY;;EAEZ,YAAY;EACZ,kBAAkB;;EAElB,eAAe;EACf,YAAY;EACZ,kBAAkB;EAClB,aAAa;;EAEb,iCAAiC;EACjC,mDAAmD;AACrD;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,gBAAgB;AAClB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,gDAAgD;AAClD;;AAEA;EACE,aAAa;EACb,qCAAqC;AACvC;;AAEA;EACE,gBAAgB;AAClB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,cAAc;EACd,SAAS;EACT,YAAY;EACZ,WAAW;AACb","sourcesContent":[".bjs-container {\n --bjs-font-family: Arial, sans-serif;\n\n --color-grey-225-10-15: hsl(225, 10%, 15%);\n --color-grey-225-10-35: hsl(225, 10%, 35%);\n --color-grey-225-10-55: hsl(225, 10%, 55%);\n --color-grey-225-10-75: hsl(225, 10%, 75%);\n --color-grey-225-10-80: hsl(225, 10%, 80%);\n --color-grey-225-10-85: hsl(225, 10%, 85%);\n --color-grey-225-10-90: hsl(225, 10%, 90%);\n --color-grey-225-10-95: hsl(225, 10%, 95%);\n --color-grey-225-10-97: hsl(225, 10%, 97%);\n\n --color-blue-205-100-45: hsl(205, 100%, 45%);\n --color-blue-205-100-45-opacity-30: hsla(205, 100%, 45%, 30%);\n --color-blue-205-100-50: hsl(205, 100%, 50%);\n --color-blue-205-100-95: hsl(205, 100%, 95%);\n\n --color-green-150-86-44: hsl(150, 86%, 44%);\n\n --color-red-360-100-40: hsl(360, 100%, 40%);\n --color-red-360-100-45: hsl(360, 100%, 45%);\n --color-red-360-100-92: hsl(360, 100%, 92%);\n --color-red-360-100-97: hsl(360, 100%, 97%);\n\n --color-white: hsl(0, 0%, 100%);\n --color-black: hsl(0, 0%, 0%);\n --color-black-opacity-05: hsla(0, 0%, 0%, 5%);\n --color-black-opacity-10: hsla(0, 0%, 0%, 10%);\n\n --breadcrumbs-font-family: var(--bjs-font-family);\n --breadcrumbs-item-color: var(--color-blue-205-100-50);\n --breadcrumbs-arrow-color: var(--color-black);\n --drilldown-fill-color: var(--color-white);\n --drilldown-background-color: var(--color-blue-205-100-50);\n}\n\n.bjs-breadcrumbs {\n position: absolute;\n display: none;\n flex-wrap: wrap;\n align-items: center;\n top: 30px;\n left: 30px;\n padding: 0px;\n margin: 0px;\n font-family: var(--breadcrumbs-font-family);\n font-size: 16px;\n line-height: normal;\n}\n\n.bjs-breadcrumbs-shown .bjs-breadcrumbs {\n display: flex;\n}\n\n.djs-palette-shown .bjs-breadcrumbs {\n left: 90px;\n}\n\n.djs-palette-shown.djs-palette-two-column .bjs-breadcrumbs {\n left: 140px;\n}\n\n.bjs-breadcrumbs li {\n display: inline-flex;\n padding-bottom: 5px;\n align-items: center;\n}\n\n.bjs-breadcrumbs li a {\n cursor: pointer;\n color: var(--breadcrumbs-item-color);\n}\n\n.bjs-breadcrumbs li:last-of-type a {\n color: inherit;\n cursor: default;\n}\n\n.bjs-breadcrumbs li:not(:first-child)::before {\n content: url('data:image/svg+xml;utf8, ');\n padding: 0 8px;\n color: var(--breadcrumbs-arrow-color);\n height: 1em;\n}\n\n.bjs-breadcrumbs .bjs-crumb {\n display: inline-block;\n max-width: 200px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.bjs-drilldown {\n width: 20px;\n height: 20px;\n\n padding: 0px;\n margin-left: -20px;\n\n cursor: pointer;\n border: none;\n border-radius: 2px;\n outline: none;\n\n fill: var(--drilldown-fill-color);\n background-color: var(--drilldown-background-color);\n}\n\n.bjs-drilldown-empty {\n display: none;\n}\n\n.selected .bjs-drilldown-empty {\n display: inherit;\n}\n\n[data-popup=\"align-elements\"] .djs-popup-results {\n display: flex;\n}\n\n[data-popup=\"align-elements\"] .djs-popup-body [data-group] + [data-group] {\n border-left: 1px solid var(--popup-border-color);\n}\n\n[data-popup=\"align-elements\"] [data-group=\"align\"] {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n}\n\n[data-popup=\"align-elements\"] .djs-popup-body .entry {\n padding: 6px 8px;\n}\n\n[data-popup=\"align-elements\"] .djs-popup-body .entry:not(:first-child) {\n margin-top: 0;\n}\n\n[data-popup=\"align-elements\"] .djs-popup-entry-icon {\n display: block;\n margin: 0;\n height: 20px;\n width: 20px;\n}\n"],"sourceRoot":""}]);
+// Exports
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
+
+
+/***/ }),
+
+/***/ "../node_modules/css-loader/dist/cjs.js!../node_modules/bpmn-js/dist/assets/diagram-js.css":
+/*!*************************************************************************************************!*\
+ !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/bpmn-js/dist/assets/diagram-js.css ***!
+ \*************************************************************************************************/
+/***/ ((module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../css-loader/dist/runtime/sourceMaps.js */ "../node_modules/css-loader/dist/runtime/sourceMaps.js");
+/* harmony import */ var _css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ "../node_modules/css-loader/dist/runtime/api.js");
+/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
+// Imports
+
+
+var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
+// Module
+___CSS_LOADER_EXPORT___.push([module.id, `/**
+ * color definitions
+ */
+.djs-parent {
+ --color-grey-225-10-15: hsl(225, 10%, 15%);
+ --color-grey-225-10-35: hsl(225, 10%, 35%);
+ --color-grey-225-10-55: hsl(225, 10%, 55%);
+ --color-grey-225-10-75: hsl(225, 10%, 75%);
+ --color-grey-225-10-80: hsl(225, 10%, 80%);
+ --color-grey-225-10-85: hsl(225, 10%, 85%);
+ --color-grey-225-10-90: hsl(225, 10%, 90%);
+ --color-grey-225-10-95: hsl(225, 10%, 95%);
+ --color-grey-225-10-97: hsl(225, 10%, 97%);
+
+ --color-blue-205-100-45: hsl(205, 100%, 45%);
+ --color-blue-205-100-45-opacity-30: hsla(205, 100%, 45%, 30%);
+ --color-blue-205-100-50: hsl(205, 100%, 50%);
+ --color-blue-205-100-50-opacity-15: hsla(205, 100%, 50%, 15%);
+ --color-blue-205-100-70: hsl(205, 100%, 75%);
+ --color-blue-205-100-95: hsl(205, 100%, 95%);
+
+ --color-green-150-86-44: hsl(150, 86%, 44%);
+
+ --color-red-360-100-40: hsl(360, 100%, 40%);
+ --color-red-360-100-45: hsl(360, 100%, 45%);
+ --color-red-360-100-92: hsl(360, 100%, 92%);
+ --color-red-360-100-97: hsl(360, 100%, 97%);
+
+ --color-white: hsl(0, 0%, 100%);
+ --color-black: hsl(0, 0%, 0%);
+ --color-black-opacity-10: hsla(0, 0%, 0%, 10%);
+ --color-black-opacity-30: hsla(0, 0%, 0%, 30%);
+
+ --canvas-fill-color: var(--color-white);
+
+ --bendpoint-fill-color: var(--color-blue-205-100-45);
+ --bendpoint-stroke-color: var(--canvas-fill-color);
+
+ --context-pad-entry-background-color: var(--color-white);
+ --context-pad-entry-hover-background-color: var(--color-grey-225-10-95);
+
+ --element-dragger-color: var(--color-blue-205-100-50);
+ --element-hover-outline-fill-color: var(--color-blue-205-100-45);
+ --element-selected-outline-stroke-color: var(--color-blue-205-100-50);
+ --element-selected-outline-secondary-stroke-color: var(--color-blue-205-100-70);
+
+ --lasso-fill-color: var(--color-blue-205-100-50-opacity-15);
+ --lasso-stroke-color: var(--element-selected-outline-stroke-color);
+
+ --palette-entry-color: var(--color-grey-225-10-15);
+ --palette-entry-hover-color: var(--color-blue-205-100-45);
+ --palette-entry-selected-color: var(--color-blue-205-100-50);
+ --palette-separator-color: var(--color-grey-225-10-75);
+ --palette-toggle-hover-background-color: var(--color-grey-225-10-55);
+ --palette-background-color: var(--color-grey-225-10-97);
+ --palette-border-color: var(--color-grey-225-10-75);
+
+ --popup-font-size: 14px;
+ --popup-header-entry-selected-color: var(--color-blue-205-100-50);
+ --popup-header-font-weight: bolder;
+ --popup-background-color: var(--color-white);
+ --popup-border-color: transparent;
+ --popup-shadow-color: var(--color-black-opacity-30);
+ --popup-description-color: var(--color-grey-225-10-55);
+ --popup-no-results-color: var(--color-grey-225-10-55);
+ --popup-entry-title-color: var(--color-grey-225-10-55);
+ --popup-entry-hover-color: var(--color-grey-225-10-95);
+ --popup-search-border-color: var(--color-grey-225-10-75);
+ --popup-search-focus-border-color: var(--color-blue-205-100-50);
+ --popup-search-focus-background-color: var(--color-blue-205-100-95);
+
+ --resizer-fill-color: var(--color-blue-205-100-45);
+ --resizer-stroke-color: var(--canvas-fill-color);
+
+ --search-container-background-color: var(--color-grey-225-10-97);
+ --search-container-border-color: var(--color-blue-205-100-50);
+ --search-container-box-shadow-color: var(--color-blue-205-100-95);
+ --search-container-box-shadow-inset-color: var(--color-grey-225-10-80);
+ --search-input-border-color: var(--color-grey-225-10-75);
+ --search-result-border-color: var(--color-grey-225-10-75);
+ --search-result-highlight-color: var(--color-black);
+ --search-result-selected-color: var(--color-blue-205-100-45-opacity-30);
+
+ --shape-attach-allowed-stroke-color: var(--color-blue-205-100-50);
+ --shape-connect-allowed-fill-color: var(--color-grey-225-10-97);
+ --shape-drop-allowed-fill-color: var(--color-grey-225-10-97);
+ --shape-drop-not-allowed-fill-color: var(--color-red-360-100-97);
+ --shape-resize-preview-stroke-color: var(--color-blue-205-100-50);
+
+ --snap-line-stroke-color: var(--color-blue-205-100-45-opacity-30);
+
+ --space-tool-crosshair-stroke-color: var(--color-black);
+
+ --tooltip-error-background-color: var(--color-red-360-100-97);
+ --tooltip-error-border-color: var(--color-red-360-100-45);
+ --tooltip-error-color: var(--color-red-360-100-45);
+}
+
+/**
+ * outline styles
+ */
- var _minDash = require("min-dash");
+.djs-outline,
+.djs-selection-outline {
+ fill: none;
+ shape-rendering: geometricPrecision;
+ stroke-width: 2px;
+}
+
+.djs-outline {
+ visibility: hidden;
+}
+
+.djs-selection-outline {
+ stroke: var(--element-selected-outline-stroke-color);
+}
+
+.djs-element.selected .djs-outline {
+ visibility: visible;
+
+ stroke: var(--element-selected-outline-stroke-color);
+}
+
+.djs-connection.selected .djs-outline {
+ display: none;
+}
+
+.djs-multi-select .djs-element.selected .djs-outline {
+ stroke: var(--element-selected-outline-secondary-stroke-color);
+ display: block;
+}
+
+.djs-shape.connect-ok .djs-visual > :nth-child(1) {
+ fill: var(--shape-connect-allowed-fill-color) !important;
+}
+
+.djs-shape.connect-not-ok .djs-visual > :nth-child(1),
+.djs-shape.drop-not-ok .djs-visual > :nth-child(1) {
+ fill: var(--shape-drop-not-allowed-fill-color) !important;
+}
+
+.djs-shape.new-parent .djs-visual > :nth-child(1) {
+ fill: var(--shape-drop-allowed-fill-color) !important;
+}
+
+svg.drop-not-ok {
+ background: var(--shape-drop-not-allowed-fill-color) !important;
+}
+
+svg.new-parent {
+ background: var(--shape-drop-allowed-fill-color) !important;
+}
+
+
+/* Override move cursor during drop and connect */
+.drop-not-ok,
+.connect-not-ok,
+.drop-not-ok *,
+.connect-not-ok * {
+ cursor: not-allowed !important;
+}
+
+.drop-ok,
+.connect-ok,
+.drop-ok *,
+.connect-ok * {
+ cursor: default !important;
+}
+
+.djs-element.attach-ok .djs-visual > :nth-child(1) {
+ stroke-width: 5px !important;
+ stroke: var(--shape-attach-allowed-stroke-color) !important;
+}
+
+.djs-frame.connect-not-ok .djs-visual > :nth-child(1),
+.djs-frame.drop-not-ok .djs-visual > :nth-child(1) {
+ stroke-width: 3px !important;
+ stroke: var(--shape-drop-not-allowed-fill-color) !important;
+ fill: none !important;
+}
+
+/**
+* Selection box style
+*
+*/
+.djs-lasso-overlay {
+ fill: var(--lasso-fill-color);
+ stroke: var(--lasso-stroke-color);
+ stroke-width: 2px;
+ shape-rendering: geometricPrecision;
+ pointer-events: none;
+}
+
+/**
+ * Resize styles
+ */
+.djs-resize-overlay {
+ fill: none;
+
+ stroke-dasharray: 5 1 3 1;
+ stroke: var(--shape-resize-preview-stroke-color);
+
+ pointer-events: none;
+}
+
+.djs-resizer-hit {
+ fill: none;
+ pointer-events: all;
+}
+
+.djs-resizer-visual {
+ fill: var(--resizer-fill-color);
+ stroke-width: 1px;
+ stroke: var(--resizer-stroke-color);
+ shape-rendering: geometricPrecision;
+}
+
+.djs-resizer:hover .djs-resizer-visual {
+ stroke: var(--resizer-stroke-color);
+ stroke-opacity: 1;
+}
+
+.djs-cursor-resize-ns,
+.djs-resizer-n,
+.djs-resizer-s {
+ cursor: ns-resize;
+}
+
+.djs-cursor-resize-ew,
+.djs-resizer-e,
+.djs-resizer-w {
+ cursor: ew-resize;
+}
+
+.djs-cursor-resize-nwse,
+.djs-resizer-nw,
+.djs-resizer-se {
+ cursor: nwse-resize;
+}
+
+.djs-cursor-resize-nesw,
+.djs-resizer-ne,
+.djs-resizer-sw {
+ cursor: nesw-resize;
+}
+
+.djs-shape.djs-resizing > .djs-outline {
+ visibility: hidden !important;
+}
+
+.djs-shape.djs-resizing > .djs-resizer {
+ visibility: hidden;
+}
+
+.djs-dragger > .djs-resizer {
+ visibility: hidden;
+}
+
+/**
+ * drag styles
+ */
+.djs-dragger * {
+ fill: none !important;
+ stroke: var(--element-dragger-color) !important;
+}
+
+.djs-dragger tspan,
+.djs-dragger text {
+ fill: var(--element-dragger-color) !important;
+ stroke: none !important;
+}
+
+marker.djs-dragger circle,
+marker.djs-dragger path,
+marker.djs-dragger polygon,
+marker.djs-dragger polyline,
+marker.djs-dragger rect {
+ fill: var(--element-dragger-color) !important;
+ stroke: none !important;
+}
+
+marker.djs-dragger text,
+marker.djs-dragger tspan {
+ fill: none !important;
+ stroke: var(--element-dragger-color) !important;
+}
+
+.djs-dragging,
+.djs-dragging > * {
+ opacity: 0.3 !important;
+ pointer-events: none !important;
+}
+
+/**
+ * no pointer events for visual
+ */
+.djs-visual,
+.djs-outline {
+ pointer-events: none;
+}
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+.djs-element.attach-ok .djs-hit {
+ stroke-width: 60px !important;
+}
- var _DiUtil = require("../../../util/DiUtil");
+/**
+ * all pointer events for hit shape
+ */
+.djs-element > .djs-hit-all,
+.djs-element > .djs-hit-no-move {
+ pointer-events: all;
+}
+
+.djs-element > .djs-hit-stroke,
+.djs-element > .djs-hit-click-stroke {
+ pointer-events: stroke;
+}
+
+/**
+ * shape / connection basic styles
+ */
+.djs-connection .djs-visual {
+ stroke-width: 2px;
+ fill: none;
+}
+
+.djs-cursor-grab {
+ cursor: -webkit-grab;
+ cursor: -moz-grab;
+ cursor: grab;
+}
+
+.djs-cursor-grabbing {
+ cursor: -webkit-grabbing;
+ cursor: -moz-grabbing;
+ cursor: grabbing;
+}
+
+.djs-cursor-crosshair {
+ cursor: crosshair;
+}
+
+.djs-cursor-move {
+ cursor: move;
+}
+
+.djs-cursor-resize-ns {
+ cursor: ns-resize;
+}
+
+.djs-cursor-resize-ew {
+ cursor: ew-resize;
+}
+
+
+/**
+ * snapping
+ */
+.djs-snap-line {
+ stroke: var(--snap-line-stroke-color);
+ stroke-linecap: round;
+ stroke-width: 2px;
+ pointer-events: none;
+}
+
+/**
+ * snapping
+ */
+.djs-crosshair {
+ stroke: var(--space-tool-crosshair-stroke-color);
+ stroke-linecap: round;
+ stroke-width: 1px;
+ pointer-events: none;
+ shape-rendering: geometricPrecision;
+ stroke-dasharray: 5, 5;
+}
+
+/**
+ * palette
+ */
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+.djs-palette {
+ position: absolute;
+ left: 20px;
+ top: 20px;
+
+ box-sizing: border-box;
+ width: 48px;
+}
+
+.djs-palette .separator {
+ margin: 5px;
+ padding-top: 5px;
+
+ border: none;
+ border-bottom: solid 1px var(--palette-separator-color);
+
+ clear: both;
+}
+
+.djs-palette .entry:before {
+ vertical-align: initial;
+}
+
+.djs-palette .djs-palette-toggle {
+ cursor: pointer;
+}
+
+.djs-palette .entry,
+.djs-palette .djs-palette-toggle {
+ color: var(--palette-entry-color);
+ font-size: 30px;
+
+ text-align: center;
+}
+
+.djs-palette .entry {
+ float: left;
+}
+
+.djs-palette .entry img {
+ max-width: 100%;
+}
+
+.djs-palette .djs-palette-entries:after {
+ content: '';
+ display: table;
+ clear: both;
+}
+
+.djs-palette .djs-palette-toggle:hover {
+ background: var(--palette-toggle-hover-background-color);
+}
+
+.djs-palette .entry:hover {
+ color: var(--palette-entry-hover-color);
+}
+
+.djs-palette .highlighted-entry {
+ color: var(--palette-entry-selected-color) !important;
+}
+
+.djs-palette .entry,
+.djs-palette .djs-palette-toggle {
+ width: 46px;
+ height: 46px;
+ line-height: 46px;
+ cursor: default;
+}
+
+/**
+ * Palette open / two-column layout is controlled via
+ * classes on the palette. Events to hook into palette
+ * changed life-cycle are available in addition.
+ */
+.djs-palette.two-column.open {
+ width: 94px;
+}
- /**
- * BPMN-specific replace behavior.
- */
- function ReplaceElementBehaviour(bpmnReplace, bpmnRules, elementRegistry, injector, modeling, selection) {
- injector.invoke(_CommandInterceptor.default, this);
- this._bpmnReplace = bpmnReplace;
- this._elementRegistry = elementRegistry;
- this._selection = selection; // replace elements on move
-
- this.postExecuted(['elements.move'], 500, function (event) {
- var context = event.context,
- target = context.newParent,
- newHost = context.newHost,
- elements = [];
- (0, _minDash.forEach)(context.closure.topLevel, function (topLevelElements) {
- if ((0, _DiUtil.isEventSubProcess)(topLevelElements)) {
- elements = elements.concat(topLevelElements.children);
- } else {
- elements = elements.concat(topLevelElements);
- }
- }); // set target to host if attaching
+.djs-palette:not(.open) .djs-palette-entries {
+ display: none;
+}
- if (elements.length === 1 && newHost) {
- target = newHost;
- }
+.djs-palette:not(.open) {
+ overflow: hidden;
+}
- var canReplace = bpmnRules.canReplace(elements, target);
+.djs-palette.open .djs-palette-toggle {
+ display: none;
+}
- if (canReplace) {
- this.replaceElements(elements, canReplace.replacements, newHost);
- }
- }, this); // update attachments on host replace
-
- this.postExecute(['shape.replace'], 1500, function (e) {
- var context = e.context,
- oldShape = context.oldShape,
- newShape = context.newShape,
- attachers = oldShape.attachers,
- canReplace;
-
- if (attachers && attachers.length) {
- canReplace = bpmnRules.canReplace(attachers, newShape);
- this.replaceElements(attachers, canReplace.replacements);
- }
- }, this); // keep ID on shape replace
-
- this.postExecuted(['shape.replace'], 1500, function (e) {
- var context = e.context,
- oldShape = context.oldShape,
- newShape = context.newShape;
- modeling.unclaimId(oldShape.businessObject.id, oldShape.businessObject);
- modeling.updateProperties(newShape, {
- id: oldShape.id
- });
- });
- }
+/**
+ * context-pad
+ */
+.djs-overlay-context-pad {
+ width: 72px;
+ z-index: 100;
+}
+
+.djs-context-pad {
+ position: absolute;
+ display: none;
+ pointer-events: none;
+ line-height: 1;
+}
+
+.djs-context-pad .entry {
+ width: 22px;
+ height: 22px;
+ text-align: center;
+ display: inline-block;
+ font-size: 22px;
+ margin: 0 2px 2px 0;
+
+ border-radius: 3px;
+
+ cursor: default;
+
+ background-color: var(--context-pad-entry-background-color);
+ box-shadow: 0 0 2px 1px var(--context-pad-entry-background-color);
+ pointer-events: all;
+ vertical-align: middle;
+}
+
+.djs-context-pad .entry:hover {
+ background: var(--context-pad-entry-hover-background-color);
+}
+
+.djs-context-pad.open {
+ display: block;
+}
+
+/**
+ * popup styles
+ */
+.djs-popup-backdrop {
+ position: fixed;
+ width: 100vw;
+ height: 100vh;
+ top: 0;
+ left: 0;
+ z-index: 200;
+ line-height: 1;
+ font-family: "IBM Plex Sans", sans-serif;
+}
+
+.djs-popup {
+ box-sizing: border-box;
+ width: min-content;
+ background: var(--popup-background-color);
+ overflow: hidden;
+ position: absolute;
+
+ box-shadow: 0px 2px 6px var(--popup-shadow-color);
+ border: solid 1px var(--popup-border-color);
+ min-width: 120px;
+ outline: none;
+ font-size: var(--popup-font-size);
+}
+
+.djs-popup-search input {
+ width: 100%;
+ box-sizing: border-box;
+ font-size: var(--popup-font-size);
+ padding: 3px 6px;
+ border-radius: 2px;
+ border: solid 1px var(--popup-search-border-color);
+ line-height: 21px;
+}
+
+.djs-popup-search input:focus {
+ background-color: var(--popup-search-focus-background-color);
+ border: solid 1px var(--popup-search-focus-border-color);
+ outline: none;
+}
+
+.djs-popup-header {
+ display: flex;
+ align-items: stretch;
+ line-height: 20px;
+ margin: 10px 12px 10px 12px;
+}
+
+.djs-popup-header .entry {
+ border-radius: 2px;
+}
+
+.djs-popup-header .entry.active {
+ color: var(--popup-header-entry-selected-color);
+}
+
+.djs-popup-header .entry.disabled {
+ color: inherit;
+}
+
+.djs-popup-search {
+ margin: 10px 12px;
+}
+
+.djs-popup-title {
+ font-size: var(--popup-font-size);
+ font-weight: var(--popup-header-font-weight);
+ flex: 1;
+ margin: 0;
+}
+
+.djs-popup-search {
+ position: relative;
+ width: auto;
+}
+
+.djs-popup-search-icon {
+ position: absolute;
+ left: 8px;
+ top: 7px;
+}
+
+.djs-popup-search input {
+ padding-left: 25px;
+}
+
+.djs-popup-results {
+ margin: 7px 3px 7px 12px;
+ list-style: none;
+ max-height: 280px;
+ overflow: auto;
+ padding-right: 9px;
+}
+
+.djs-popup-group {
+ margin: 0;
+ padding: 0;
+ width: 100%;
+}
+
+.djs-popup-body .entry,
+.djs-popup-body .entry-header {
+ padding: 5px 7px;
+ cursor: default;
+ border-radius: 4px;
+}
+
+.djs-popup-body .entry-header {
+ font-weight: var(--popup-header-font-weight);
+ color: var(--popup-entry-title-color);
+ padding-left: 0;
+}
+
+.djs-popup [class*="icon"] .djs-popup-label,
+.djs-popup-label:not(:first-child) {
+ margin-left: .5em;
+}
+
+.djs-popup [class*="icon"]:before,
+.djs-popup-entry-icon {
+ width: 1em;
+ height: 1em;
+ display: inline-block;
+ font-size: 1.4em;
+ vertical-align: middle;
+}
+
+.djs-popup-body .entry-header:not(:first-child) {
+ margin-top: 8px;
+ margin-bottom: 2px;
+}
+
+.djs-popup-body .entry {
+ display: flex;
+ flex-direction: row;
+ align-items: stretch;
+ height: min-content;
+}
+
+.djs-popup .entry.selected {
+ background-color: var(--popup-entry-hover-color);
+}
+
+.djs-popup-body .entry:not(:first-child) {
+ margin-top: 2px;
+}
+
+.djs-popup-entry-content {
+ display: flex;
+ flex-direction: column;
+ flex: 1;
+ overflow: hidden;
+}
+
+.djs-popup-entry-description {
+ color: var(--popup-description-color);
+}
+
+.djs-popup-label,
+.djs-popup-entry-description {
+ line-height: 1.4em;
+}
+
+.djs-popup-title,
+.djs-popup-label,
+.djs-popup-entry-description,
+.djs-popup .entry-header {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.djs-popup-entry-name {
+ display: flex;
+}
+
+.entry-content {
+ display: flex;
+ flex-direction: column;
+ flex: 1;
+ overflow: hidden;
+}
+
+.djs-popup-body {
+ flex-direction: column;
+ width: auto;
+}
+
+.djs-popup *::-webkit-scrollbar {
+ width: 6px;
+}
+
+.djs-popup *::-webkit-scrollbar-thumb {
+ border-radius: 3px;
+ background-color: rgba(0, 0, 0, 0.2);
+}
+
+.djs-popup *::-webkit-scrollbar-track {
+ box-shadow: none;
+ background: transparent;
+ margin: 0;
+ padding: 5px;
+}
+
+.djs-popup-no-results {
+ padding: 0 12px 12px 12px;
+ color: var(--popup-no-results-color);
+}
+
+.djs-popup-entry-docs {
+ flex: 0;
+ flex-direction: row;
+ align-items: center;
+ padding-left: 5px;
+ display: none;
+}
+
+.djs-popup-body .entry:hover .djs-popup-entry-docs {
+ display: flex;
+}
+
+.djs-popup-entry-docs svg {
+ vertical-align: middle;
+ margin: auto 2px auto 5px;
+}
+
+/**
+ * palette styles
+ */
+.djs-palette {
+ background: var(--palette-background-color);
+ border: solid 1px var(--palette-border-color);
+ border-radius: 2px;
+}
+
+/**
+ * bendpoints
+ */
+.djs-segment-dragger,
+.djs-bendpoint {
+ display: none;
+}
+
+.djs-segment-dragger .djs-visual {
+ display: none;
+
+ fill: var(--bendpoint-fill-color);
+ stroke: var(--bendpoint-stroke-color);
+ stroke-width: 1px;
+ stroke-opacity: 1;
+}
+
+.djs-segment-dragger:hover .djs-visual {
+ display: block;
+}
+
+.djs-bendpoint .djs-visual {
+ fill: var(--bendpoint-fill-color);
+ stroke: var(--bendpoint-stroke-color);
+ stroke-width: 1px;
+}
+
+.djs-segment-dragger:hover,
+.djs-bendpoints.hover .djs-segment-dragger,
+.djs-bendpoints.selected .djs-segment-dragger,
+.djs-bendpoint:hover,
+.djs-bendpoints.hover .djs-bendpoint,
+.djs-bendpoints.selected .djs-bendpoint {
+ display: block;
+}
+
+.djs-drag-active .djs-bendpoints * {
+ display: none;
+}
+
+.djs-bendpoints:not(.hover) .floating {
+ display: none;
+}
+
+.djs-segment-dragger:hover .djs-visual,
+.djs-segment-dragger.djs-dragging .djs-visual,
+.djs-bendpoint:hover .djs-visual,
+.djs-bendpoint.floating .djs-visual {
+ fill: var(--bendpoint-fill-color);
+ stroke: var(--bendpoint-stroke-color);
+ stroke-opacity: 1;
+}
+
+.djs-bendpoint.floating .djs-hit {
+ pointer-events: none;
+}
+
+.djs-segment-dragger .djs-hit,
+.djs-bendpoint .djs-hit {
+ fill: none;
+ pointer-events: all;
+}
+
+.djs-segment-dragger.horizontal .djs-hit {
+ cursor: ns-resize;
+}
+
+.djs-segment-dragger.vertical .djs-hit {
+ cursor: ew-resize;
+}
+
+.djs-segment-dragger.djs-dragging .djs-hit {
+ pointer-events: none;
+}
+
+.djs-updating,
+.djs-updating > * {
+ pointer-events: none !important;
+}
+
+.djs-updating .djs-context-pad,
+.djs-updating .djs-outline,
+.djs-updating .djs-bendpoint,
+.djs-multi-select .djs-bendpoint,
+.djs-multi-select .djs-segment-dragger,
+.connect-ok .djs-bendpoint,
+.connect-not-ok .djs-bendpoint,
+.drop-ok .djs-bendpoint,
+.drop-not-ok .djs-bendpoint {
+ display: none !important;
+}
+
+.djs-segment-dragger.djs-dragging,
+.djs-bendpoint.djs-dragging {
+ display: block;
+ opacity: 1.0;
+}
+
+
+/**
+ * tooltips
+ */
+.djs-tooltip-error {
+ width: 160px;
+ padding: 6px;
- (0, _inherits.default)(ReplaceElementBehaviour, _CommandInterceptor.default);
+ background: var(--tooltip-error-background-color);
+ border: solid 1px var(--tooltip-error-border-color);
+ border-radius: 2px;
+ color: var(--tooltip-error-color);
+ font-size: 12px;
+ line-height: 16px;
- ReplaceElementBehaviour.prototype.replaceElements = function (elements, newElements) {
- var elementRegistry = this._elementRegistry,
- bpmnReplace = this._bpmnReplace,
- selection = this._selection;
- (0, _minDash.forEach)(newElements, function (replacement) {
- var newElement = {
- type: replacement.newElementType
- };
- var oldElement = elementRegistry.get(replacement.oldElementId);
- var idx = elements.indexOf(oldElement);
- elements[idx] = bpmnReplace.replaceElement(oldElement, newElement, {
- select: false
- });
- });
+ opacity: 0.75;
+}
- if (newElements) {
- selection.select(elements);
- }
- };
+.djs-tooltip-error:hover {
+ opacity: 1;
+}
- ReplaceElementBehaviour.$inject = ['bpmnReplace', 'bpmnRules', 'elementRegistry', 'injector', 'modeling', 'selection'];
- },{"../../../util/DiUtil":238,"diagram-js/lib/command/CommandInterceptor":250,"inherits":438,"min-dash":646}],184:[function(require,module,exports){
- "use strict";
+/**
+ * search pad
+ */
+.djs-search-container {
+ position: absolute;
+ top: 20px;
+ left: 0;
+ right: 0;
+ margin-left: auto;
+ margin-right: auto;
+
+ width: 25%;
+ min-width: 300px;
+ max-width: 400px;
+ z-index: 10;
+
+ font-size: 1.05em;
+ opacity: 0.9;
+ background: var(--search-container-background-color);
+ border: solid 1px var(--search-container-border-color);
+ border-radius: 2px;
+ box-shadow: 0 0 0 2px var(--search-container-box-shadow-color), 0 0 0 1px var(--search-container-box-shadow-inset-color) inset;
+}
+
+.djs-search-container:not(.open) {
+ display: none;
+}
+
+.djs-search-input input {
+ font-size: 1.05em;
+ width: 100%;
+ padding: 6px 10px;
+ border: 1px solid var(--search-input-border-color);
+ box-sizing: border-box;
+}
+
+.djs-search-input input:focus {
+ outline: none;
+ border-color: var(--search-input-border-color);
+}
+
+.djs-search-results {
+ position: relative;
+ overflow-y: auto;
+ max-height: 200px;
+}
+
+.djs-search-results:hover {
+ cursor: pointer;
+}
+
+.djs-search-result {
+ width: 100%;
+ padding: 6px 10px;
+ background: white;
+ border-bottom: solid 1px var(--search-result-border-color);
+ border-radius: 1px;
+}
+
+.djs-search-highlight {
+ color: var(--search-result-highlight-color);
+}
+
+.djs-search-result-primary {
+ margin: 0 0 10px;
+}
+
+.djs-search-result-secondary {
+ font-family: monospace;
+ margin: 0;
+}
+
+.djs-search-result:hover {
+ background: var(--search-result-selected-color);
+}
+
+.djs-search-result-selected {
+ background: var(--search-result-selected-color);
+}
+
+.djs-search-result-selected:hover {
+ background: var(--search-result-selected-color);
+}
+
+.djs-search-overlay {
+ background: var(--search-result-selected-color);
+}
+
+/**
+ * hidden styles
+ */
+.djs-element-hidden,
+.djs-element-hidden .djs-hit,
+.djs-element-hidden .djs-outline,
+.djs-label-hidden .djs-label {
+ display: none !important;
+}
+
+.djs-element .djs-hit-stroke,
+.djs-element .djs-hit-click-stroke,
+.djs-element .djs-hit-all {
+ cursor: move;
+}`, "",{"version":3,"sources":["webpack://./../node_modules/bpmn-js/dist/assets/diagram-js.css"],"names":[],"mappings":"AAAA;;EAEE;AACF;EACE,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;;EAE1C,4CAA4C;EAC5C,6DAA6D;EAC7D,4CAA4C;EAC5C,6DAA6D;EAC7D,4CAA4C;EAC5C,4CAA4C;;EAE5C,2CAA2C;;EAE3C,2CAA2C;EAC3C,2CAA2C;EAC3C,2CAA2C;EAC3C,2CAA2C;;EAE3C,+BAA+B;EAC/B,6BAA6B;EAC7B,8CAA8C;EAC9C,8CAA8C;;EAE9C,uCAAuC;;EAEvC,oDAAoD;EACpD,kDAAkD;;EAElD,wDAAwD;EACxD,uEAAuE;;EAEvE,qDAAqD;EACrD,gEAAgE;EAChE,qEAAqE;EACrE,+EAA+E;;EAE/E,2DAA2D;EAC3D,kEAAkE;;EAElE,kDAAkD;EAClD,yDAAyD;EACzD,4DAA4D;EAC5D,sDAAsD;EACtD,oEAAoE;EACpE,uDAAuD;EACvD,mDAAmD;;EAEnD,uBAAuB;EACvB,iEAAiE;EACjE,kCAAkC;EAClC,4CAA4C;EAC5C,iCAAiC;EACjC,mDAAmD;EACnD,sDAAsD;EACtD,qDAAqD;EACrD,sDAAsD;EACtD,uDAAuD;EACvD,wDAAwD;EACxD,+DAA+D;EAC/D,mEAAmE;;EAEnE,kDAAkD;EAClD,gDAAgD;;EAEhD,gEAAgE;EAChE,6DAA6D;EAC7D,iEAAiE;EACjE,sEAAsE;EACtE,wDAAwD;EACxD,yDAAyD;EACzD,mDAAmD;EACnD,uEAAuE;;EAEvE,iEAAiE;EACjE,+DAA+D;EAC/D,4DAA4D;EAC5D,gEAAgE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W;EACX,iBAAiB;EACjB,iBAAiB;EACjB,0DAA0D;EAC1D,kBAAkB;AACpB;;AAEA;EACE,2CAA2C;AAC7C;;AAEA;EACE,gBAAgB;AAClB;;AAEA;EACE,sBAAsB;EACtB,SAAS;AACX;;AAEA;EACE,+CAA+C;AACjD;;AAEA;EACE,+CAA+C;AACjD;;AAEA;EACE,+CAA+C;AACjD;;AAEA;EACE,+CAA+C;AACjD;;AAEA;;EAEE;AACF;;;;EAIE,wBAAwB;AAC1B;;AAEA;;;EAGE,YAAY;AACd","sourcesContent":["/**\n * color definitions\n */\n.djs-parent {\n --color-grey-225-10-15: hsl(225, 10%, 15%);\n --color-grey-225-10-35: hsl(225, 10%, 35%);\n --color-grey-225-10-55: hsl(225, 10%, 55%);\n --color-grey-225-10-75: hsl(225, 10%, 75%);\n --color-grey-225-10-80: hsl(225, 10%, 80%);\n --color-grey-225-10-85: hsl(225, 10%, 85%);\n --color-grey-225-10-90: hsl(225, 10%, 90%);\n --color-grey-225-10-95: hsl(225, 10%, 95%);\n --color-grey-225-10-97: hsl(225, 10%, 97%);\n\n --color-blue-205-100-45: hsl(205, 100%, 45%);\n --color-blue-205-100-45-opacity-30: hsla(205, 100%, 45%, 30%);\n --color-blue-205-100-50: hsl(205, 100%, 50%);\n --color-blue-205-100-50-opacity-15: hsla(205, 100%, 50%, 15%);\n --color-blue-205-100-70: hsl(205, 100%, 75%);\n --color-blue-205-100-95: hsl(205, 100%, 95%);\n\n --color-green-150-86-44: hsl(150, 86%, 44%);\n\n --color-red-360-100-40: hsl(360, 100%, 40%);\n --color-red-360-100-45: hsl(360, 100%, 45%);\n --color-red-360-100-92: hsl(360, 100%, 92%);\n --color-red-360-100-97: hsl(360, 100%, 97%);\n\n --color-white: hsl(0, 0%, 100%);\n --color-black: hsl(0, 0%, 0%);\n --color-black-opacity-10: hsla(0, 0%, 0%, 10%);\n --color-black-opacity-30: hsla(0, 0%, 0%, 30%);\n\n --canvas-fill-color: var(--color-white);\n\n --bendpoint-fill-color: var(--color-blue-205-100-45);\n --bendpoint-stroke-color: var(--canvas-fill-color);\n\n --context-pad-entry-background-color: var(--color-white);\n --context-pad-entry-hover-background-color: var(--color-grey-225-10-95);\n\n --element-dragger-color: var(--color-blue-205-100-50);\n --element-hover-outline-fill-color: var(--color-blue-205-100-45);\n --element-selected-outline-stroke-color: var(--color-blue-205-100-50);\n --element-selected-outline-secondary-stroke-color: var(--color-blue-205-100-70);\n\n --lasso-fill-color: var(--color-blue-205-100-50-opacity-15);\n --lasso-stroke-color: var(--element-selected-outline-stroke-color);\n\n --palette-entry-color: var(--color-grey-225-10-15);\n --palette-entry-hover-color: var(--color-blue-205-100-45);\n --palette-entry-selected-color: var(--color-blue-205-100-50);\n --palette-separator-color: var(--color-grey-225-10-75);\n --palette-toggle-hover-background-color: var(--color-grey-225-10-55);\n --palette-background-color: var(--color-grey-225-10-97);\n --palette-border-color: var(--color-grey-225-10-75);\n\n --popup-font-size: 14px;\n --popup-header-entry-selected-color: var(--color-blue-205-100-50);\n --popup-header-font-weight: bolder;\n --popup-background-color: var(--color-white);\n --popup-border-color: transparent;\n --popup-shadow-color: var(--color-black-opacity-30);\n --popup-description-color: var(--color-grey-225-10-55);\n --popup-no-results-color: var(--color-grey-225-10-55);\n --popup-entry-title-color: var(--color-grey-225-10-55);\n --popup-entry-hover-color: var(--color-grey-225-10-95);\n --popup-search-border-color: var(--color-grey-225-10-75);\n --popup-search-focus-border-color: var(--color-blue-205-100-50);\n --popup-search-focus-background-color: var(--color-blue-205-100-95);\n\n --resizer-fill-color: var(--color-blue-205-100-45);\n --resizer-stroke-color: var(--canvas-fill-color);\n\n --search-container-background-color: var(--color-grey-225-10-97);\n --search-container-border-color: var(--color-blue-205-100-50);\n --search-container-box-shadow-color: var(--color-blue-205-100-95);\n --search-container-box-shadow-inset-color: var(--color-grey-225-10-80);\n --search-input-border-color: var(--color-grey-225-10-75);\n --search-result-border-color: var(--color-grey-225-10-75);\n --search-result-highlight-color: var(--color-black);\n --search-result-selected-color: var(--color-blue-205-100-45-opacity-30);\n\n --shape-attach-allowed-stroke-color: var(--color-blue-205-100-50);\n --shape-connect-allowed-fill-color: var(--color-grey-225-10-97);\n --shape-drop-allowed-fill-color: var(--color-grey-225-10-97);\n --shape-drop-not-allowed-fill-color: var(--color-red-360-100-97);\n --shape-resize-preview-stroke-color: var(--color-blue-205-100-50);\n\n --snap-line-stroke-color: var(--color-blue-205-100-45-opacity-30);\n\n --space-tool-crosshair-stroke-color: var(--color-black);\n\n --tooltip-error-background-color: var(--color-red-360-100-97);\n --tooltip-error-border-color: var(--color-red-360-100-45);\n --tooltip-error-color: var(--color-red-360-100-45);\n}\n\n/**\n * outline styles\n */\n\n.djs-outline,\n.djs-selection-outline {\n fill: none;\n shape-rendering: geometricPrecision;\n stroke-width: 2px;\n}\n\n.djs-outline {\n visibility: hidden;\n}\n\n.djs-selection-outline {\n stroke: var(--element-selected-outline-stroke-color);\n}\n\n.djs-element.selected .djs-outline {\n visibility: visible;\n\n stroke: var(--element-selected-outline-stroke-color);\n}\n\n.djs-connection.selected .djs-outline {\n display: none;\n}\n\n.djs-multi-select .djs-element.selected .djs-outline {\n stroke: var(--element-selected-outline-secondary-stroke-color);\n display: block;\n}\n\n.djs-shape.connect-ok .djs-visual > :nth-child(1) {\n fill: var(--shape-connect-allowed-fill-color) !important;\n}\n\n.djs-shape.connect-not-ok .djs-visual > :nth-child(1),\n.djs-shape.drop-not-ok .djs-visual > :nth-child(1) {\n fill: var(--shape-drop-not-allowed-fill-color) !important;\n}\n\n.djs-shape.new-parent .djs-visual > :nth-child(1) {\n fill: var(--shape-drop-allowed-fill-color) !important;\n}\n\nsvg.drop-not-ok {\n background: var(--shape-drop-not-allowed-fill-color) !important;\n}\n\nsvg.new-parent {\n background: var(--shape-drop-allowed-fill-color) !important;\n}\n\n\n/* Override move cursor during drop and connect */\n.drop-not-ok,\n.connect-not-ok,\n.drop-not-ok *,\n.connect-not-ok * {\n cursor: not-allowed !important;\n}\n\n.drop-ok,\n.connect-ok,\n.drop-ok *,\n.connect-ok * {\n cursor: default !important;\n}\n\n.djs-element.attach-ok .djs-visual > :nth-child(1) {\n stroke-width: 5px !important;\n stroke: var(--shape-attach-allowed-stroke-color) !important;\n}\n\n.djs-frame.connect-not-ok .djs-visual > :nth-child(1),\n.djs-frame.drop-not-ok .djs-visual > :nth-child(1) {\n stroke-width: 3px !important;\n stroke: var(--shape-drop-not-allowed-fill-color) !important;\n fill: none !important;\n}\n\n/**\n* Selection box style\n*\n*/\n.djs-lasso-overlay {\n fill: var(--lasso-fill-color);\n stroke: var(--lasso-stroke-color);\n stroke-width: 2px;\n shape-rendering: geometricPrecision;\n pointer-events: none;\n}\n\n/**\n * Resize styles\n */\n.djs-resize-overlay {\n fill: none;\n\n stroke-dasharray: 5 1 3 1;\n stroke: var(--shape-resize-preview-stroke-color);\n\n pointer-events: none;\n}\n\n.djs-resizer-hit {\n fill: none;\n pointer-events: all;\n}\n\n.djs-resizer-visual {\n fill: var(--resizer-fill-color);\n stroke-width: 1px;\n stroke: var(--resizer-stroke-color);\n shape-rendering: geometricPrecision;\n}\n\n.djs-resizer:hover .djs-resizer-visual {\n stroke: var(--resizer-stroke-color);\n stroke-opacity: 1;\n}\n\n.djs-cursor-resize-ns,\n.djs-resizer-n,\n.djs-resizer-s {\n cursor: ns-resize;\n}\n\n.djs-cursor-resize-ew,\n.djs-resizer-e,\n.djs-resizer-w {\n cursor: ew-resize;\n}\n\n.djs-cursor-resize-nwse,\n.djs-resizer-nw,\n.djs-resizer-se {\n cursor: nwse-resize;\n}\n\n.djs-cursor-resize-nesw,\n.djs-resizer-ne,\n.djs-resizer-sw {\n cursor: nesw-resize;\n}\n\n.djs-shape.djs-resizing > .djs-outline {\n visibility: hidden !important;\n}\n\n.djs-shape.djs-resizing > .djs-resizer {\n visibility: hidden;\n}\n\n.djs-dragger > .djs-resizer {\n visibility: hidden;\n}\n\n/**\n * drag styles\n */\n.djs-dragger * {\n fill: none !important;\n stroke: var(--element-dragger-color) !important;\n}\n\n.djs-dragger tspan,\n.djs-dragger text {\n fill: var(--element-dragger-color) !important;\n stroke: none !important;\n}\n\nmarker.djs-dragger circle,\nmarker.djs-dragger path,\nmarker.djs-dragger polygon,\nmarker.djs-dragger polyline,\nmarker.djs-dragger rect {\n fill: var(--element-dragger-color) !important;\n stroke: none !important;\n}\n\nmarker.djs-dragger text,\nmarker.djs-dragger tspan {\n fill: none !important;\n stroke: var(--element-dragger-color) !important;\n}\n\n.djs-dragging,\n.djs-dragging > * {\n opacity: 0.3 !important;\n pointer-events: none !important;\n}\n\n/**\n * no pointer events for visual\n */\n.djs-visual,\n.djs-outline {\n pointer-events: none;\n}\n\n.djs-element.attach-ok .djs-hit {\n stroke-width: 60px !important;\n}\n\n/**\n * all pointer events for hit shape\n */\n.djs-element > .djs-hit-all,\n.djs-element > .djs-hit-no-move {\n pointer-events: all;\n}\n\n.djs-element > .djs-hit-stroke,\n.djs-element > .djs-hit-click-stroke {\n pointer-events: stroke;\n}\n\n/**\n * shape / connection basic styles\n */\n.djs-connection .djs-visual {\n stroke-width: 2px;\n fill: none;\n}\n\n.djs-cursor-grab {\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.djs-cursor-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.djs-cursor-crosshair {\n cursor: crosshair;\n}\n\n.djs-cursor-move {\n cursor: move;\n}\n\n.djs-cursor-resize-ns {\n cursor: ns-resize;\n}\n\n.djs-cursor-resize-ew {\n cursor: ew-resize;\n}\n\n\n/**\n * snapping\n */\n.djs-snap-line {\n stroke: var(--snap-line-stroke-color);\n stroke-linecap: round;\n stroke-width: 2px;\n pointer-events: none;\n}\n\n/**\n * snapping\n */\n.djs-crosshair {\n stroke: var(--space-tool-crosshair-stroke-color);\n stroke-linecap: round;\n stroke-width: 1px;\n pointer-events: none;\n shape-rendering: geometricPrecision;\n stroke-dasharray: 5, 5;\n}\n\n/**\n * palette\n */\n\n.djs-palette {\n position: absolute;\n left: 20px;\n top: 20px;\n\n box-sizing: border-box;\n width: 48px;\n}\n\n.djs-palette .separator {\n margin: 5px;\n padding-top: 5px;\n\n border: none;\n border-bottom: solid 1px var(--palette-separator-color);\n\n clear: both;\n}\n\n.djs-palette .entry:before {\n vertical-align: initial;\n}\n\n.djs-palette .djs-palette-toggle {\n cursor: pointer;\n}\n\n.djs-palette .entry,\n.djs-palette .djs-palette-toggle {\n color: var(--palette-entry-color);\n font-size: 30px;\n\n text-align: center;\n}\n\n.djs-palette .entry {\n float: left;\n}\n\n.djs-palette .entry img {\n max-width: 100%;\n}\n\n.djs-palette .djs-palette-entries:after {\n content: '';\n display: table;\n clear: both;\n}\n\n.djs-palette .djs-palette-toggle:hover {\n background: var(--palette-toggle-hover-background-color);\n}\n\n.djs-palette .entry:hover {\n color: var(--palette-entry-hover-color);\n}\n\n.djs-palette .highlighted-entry {\n color: var(--palette-entry-selected-color) !important;\n}\n\n.djs-palette .entry,\n.djs-palette .djs-palette-toggle {\n width: 46px;\n height: 46px;\n line-height: 46px;\n cursor: default;\n}\n\n/**\n * Palette open / two-column layout is controlled via\n * classes on the palette. Events to hook into palette\n * changed life-cycle are available in addition.\n */\n.djs-palette.two-column.open {\n width: 94px;\n}\n\n.djs-palette:not(.open) .djs-palette-entries {\n display: none;\n}\n\n.djs-palette:not(.open) {\n overflow: hidden;\n}\n\n.djs-palette.open .djs-palette-toggle {\n display: none;\n}\n\n/**\n * context-pad\n */\n.djs-overlay-context-pad {\n width: 72px;\n z-index: 100;\n}\n\n.djs-context-pad {\n position: absolute;\n display: none;\n pointer-events: none;\n line-height: 1;\n}\n\n.djs-context-pad .entry {\n width: 22px;\n height: 22px;\n text-align: center;\n display: inline-block;\n font-size: 22px;\n margin: 0 2px 2px 0;\n\n border-radius: 3px;\n\n cursor: default;\n\n background-color: var(--context-pad-entry-background-color);\n box-shadow: 0 0 2px 1px var(--context-pad-entry-background-color);\n pointer-events: all;\n vertical-align: middle;\n}\n\n.djs-context-pad .entry:hover {\n background: var(--context-pad-entry-hover-background-color);\n}\n\n.djs-context-pad.open {\n display: block;\n}\n\n/**\n * popup styles\n */\n.djs-popup-backdrop {\n position: fixed;\n width: 100vw;\n height: 100vh;\n top: 0;\n left: 0;\n z-index: 200;\n line-height: 1;\n font-family: \"IBM Plex Sans\", sans-serif;\n}\n\n.djs-popup {\n box-sizing: border-box;\n width: min-content;\n background: var(--popup-background-color);\n overflow: hidden;\n position: absolute;\n\n box-shadow: 0px 2px 6px var(--popup-shadow-color);\n border: solid 1px var(--popup-border-color);\n min-width: 120px;\n outline: none;\n font-size: var(--popup-font-size);\n}\n\n.djs-popup-search input {\n width: 100%;\n box-sizing: border-box;\n font-size: var(--popup-font-size);\n padding: 3px 6px;\n border-radius: 2px;\n border: solid 1px var(--popup-search-border-color);\n line-height: 21px;\n}\n\n.djs-popup-search input:focus {\n background-color: var(--popup-search-focus-background-color);\n border: solid 1px var(--popup-search-focus-border-color);\n outline: none;\n}\n\n.djs-popup-header {\n display: flex;\n align-items: stretch;\n line-height: 20px;\n margin: 10px 12px 10px 12px;\n}\n\n.djs-popup-header .entry {\n border-radius: 2px;\n}\n\n.djs-popup-header .entry.active {\n color: var(--popup-header-entry-selected-color);\n}\n\n.djs-popup-header .entry.disabled {\n color: inherit;\n}\n\n.djs-popup-search {\n margin: 10px 12px;\n}\n\n.djs-popup-title {\n font-size: var(--popup-font-size);\n font-weight: var(--popup-header-font-weight);\n flex: 1;\n margin: 0;\n}\n\n.djs-popup-search {\n position: relative;\n width: auto;\n}\n\n.djs-popup-search-icon {\n position: absolute;\n left: 8px;\n top: 7px;\n}\n\n.djs-popup-search input {\n padding-left: 25px;\n}\n\n.djs-popup-results {\n margin: 7px 3px 7px 12px;\n list-style: none;\n max-height: 280px;\n overflow: auto;\n padding-right: 9px;\n}\n\n.djs-popup-group {\n margin: 0;\n padding: 0;\n width: 100%;\n}\n\n.djs-popup-body .entry,\n.djs-popup-body .entry-header {\n padding: 5px 7px;\n cursor: default;\n border-radius: 4px;\n}\n\n.djs-popup-body .entry-header {\n font-weight: var(--popup-header-font-weight);\n color: var(--popup-entry-title-color);\n padding-left: 0;\n}\n\n.djs-popup [class*=\"icon\"] .djs-popup-label,\n.djs-popup-label:not(:first-child) {\n margin-left: .5em;\n}\n\n.djs-popup [class*=\"icon\"]:before,\n.djs-popup-entry-icon {\n width: 1em;\n height: 1em;\n display: inline-block;\n font-size: 1.4em;\n vertical-align: middle;\n}\n\n.djs-popup-body .entry-header:not(:first-child) {\n margin-top: 8px;\n margin-bottom: 2px;\n}\n\n.djs-popup-body .entry {\n display: flex;\n flex-direction: row;\n align-items: stretch;\n height: min-content;\n}\n\n.djs-popup .entry.selected {\n background-color: var(--popup-entry-hover-color);\n}\n\n.djs-popup-body .entry:not(:first-child) {\n margin-top: 2px;\n}\n\n.djs-popup-entry-content {\n display: flex;\n flex-direction: column;\n flex: 1;\n overflow: hidden;\n}\n\n.djs-popup-entry-description {\n color: var(--popup-description-color);\n}\n\n.djs-popup-label,\n.djs-popup-entry-description {\n line-height: 1.4em;\n}\n\n.djs-popup-title,\n.djs-popup-label,\n.djs-popup-entry-description,\n.djs-popup .entry-header {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.djs-popup-entry-name {\n display: flex;\n}\n\n.entry-content {\n display: flex;\n flex-direction: column;\n flex: 1;\n overflow: hidden;\n}\n\n.djs-popup-body {\n flex-direction: column;\n width: auto;\n}\n\n.djs-popup *::-webkit-scrollbar {\n width: 6px;\n}\n\n.djs-popup *::-webkit-scrollbar-thumb {\n border-radius: 3px;\n background-color: rgba(0, 0, 0, 0.2);\n}\n\n.djs-popup *::-webkit-scrollbar-track {\n box-shadow: none;\n background: transparent;\n margin: 0;\n padding: 5px;\n}\n\n.djs-popup-no-results {\n padding: 0 12px 12px 12px;\n color: var(--popup-no-results-color);\n}\n\n.djs-popup-entry-docs {\n flex: 0;\n flex-direction: row;\n align-items: center;\n padding-left: 5px;\n display: none;\n}\n\n.djs-popup-body .entry:hover .djs-popup-entry-docs {\n display: flex;\n}\n\n.djs-popup-entry-docs svg {\n vertical-align: middle;\n margin: auto 2px auto 5px;\n}\n\n/**\n * palette styles\n */\n.djs-palette {\n background: var(--palette-background-color);\n border: solid 1px var(--palette-border-color);\n border-radius: 2px;\n}\n\n/**\n * bendpoints\n */\n.djs-segment-dragger,\n.djs-bendpoint {\n display: none;\n}\n\n.djs-segment-dragger .djs-visual {\n display: none;\n\n fill: var(--bendpoint-fill-color);\n stroke: var(--bendpoint-stroke-color);\n stroke-width: 1px;\n stroke-opacity: 1;\n}\n\n.djs-segment-dragger:hover .djs-visual {\n display: block;\n}\n\n.djs-bendpoint .djs-visual {\n fill: var(--bendpoint-fill-color);\n stroke: var(--bendpoint-stroke-color);\n stroke-width: 1px;\n}\n\n.djs-segment-dragger:hover,\n.djs-bendpoints.hover .djs-segment-dragger,\n.djs-bendpoints.selected .djs-segment-dragger,\n.djs-bendpoint:hover,\n.djs-bendpoints.hover .djs-bendpoint,\n.djs-bendpoints.selected .djs-bendpoint {\n display: block;\n}\n\n.djs-drag-active .djs-bendpoints * {\n display: none;\n}\n\n.djs-bendpoints:not(.hover) .floating {\n display: none;\n}\n\n.djs-segment-dragger:hover .djs-visual,\n.djs-segment-dragger.djs-dragging .djs-visual,\n.djs-bendpoint:hover .djs-visual,\n.djs-bendpoint.floating .djs-visual {\n fill: var(--bendpoint-fill-color);\n stroke: var(--bendpoint-stroke-color);\n stroke-opacity: 1;\n}\n\n.djs-bendpoint.floating .djs-hit {\n pointer-events: none;\n}\n\n.djs-segment-dragger .djs-hit,\n.djs-bendpoint .djs-hit {\n fill: none;\n pointer-events: all;\n}\n\n.djs-segment-dragger.horizontal .djs-hit {\n cursor: ns-resize;\n}\n\n.djs-segment-dragger.vertical .djs-hit {\n cursor: ew-resize;\n}\n\n.djs-segment-dragger.djs-dragging .djs-hit {\n pointer-events: none;\n}\n\n.djs-updating,\n.djs-updating > * {\n pointer-events: none !important;\n}\n\n.djs-updating .djs-context-pad,\n.djs-updating .djs-outline,\n.djs-updating .djs-bendpoint,\n.djs-multi-select .djs-bendpoint,\n.djs-multi-select .djs-segment-dragger,\n.connect-ok .djs-bendpoint,\n.connect-not-ok .djs-bendpoint,\n.drop-ok .djs-bendpoint,\n.drop-not-ok .djs-bendpoint {\n display: none !important;\n}\n\n.djs-segment-dragger.djs-dragging,\n.djs-bendpoint.djs-dragging {\n display: block;\n opacity: 1.0;\n}\n\n\n/**\n * tooltips\n */\n.djs-tooltip-error {\n width: 160px;\n padding: 6px;\n\n background: var(--tooltip-error-background-color);\n border: solid 1px var(--tooltip-error-border-color);\n border-radius: 2px;\n color: var(--tooltip-error-color);\n font-size: 12px;\n line-height: 16px;\n\n opacity: 0.75;\n}\n\n.djs-tooltip-error:hover {\n opacity: 1;\n}\n\n\n/**\n * search pad\n */\n.djs-search-container {\n position: absolute;\n top: 20px;\n left: 0;\n right: 0;\n margin-left: auto;\n margin-right: auto;\n\n width: 25%;\n min-width: 300px;\n max-width: 400px;\n z-index: 10;\n\n font-size: 1.05em;\n opacity: 0.9;\n background: var(--search-container-background-color);\n border: solid 1px var(--search-container-border-color);\n border-radius: 2px;\n box-shadow: 0 0 0 2px var(--search-container-box-shadow-color), 0 0 0 1px var(--search-container-box-shadow-inset-color) inset;\n}\n\n.djs-search-container:not(.open) {\n display: none;\n}\n\n.djs-search-input input {\n font-size: 1.05em;\n width: 100%;\n padding: 6px 10px;\n border: 1px solid var(--search-input-border-color);\n box-sizing: border-box;\n}\n\n.djs-search-input input:focus {\n outline: none;\n border-color: var(--search-input-border-color);\n}\n\n.djs-search-results {\n position: relative;\n overflow-y: auto;\n max-height: 200px;\n}\n\n.djs-search-results:hover {\n cursor: pointer;\n}\n\n.djs-search-result {\n width: 100%;\n padding: 6px 10px;\n background: white;\n border-bottom: solid 1px var(--search-result-border-color);\n border-radius: 1px;\n}\n\n.djs-search-highlight {\n color: var(--search-result-highlight-color);\n}\n\n.djs-search-result-primary {\n margin: 0 0 10px;\n}\n\n.djs-search-result-secondary {\n font-family: monospace;\n margin: 0;\n}\n\n.djs-search-result:hover {\n background: var(--search-result-selected-color);\n}\n\n.djs-search-result-selected {\n background: var(--search-result-selected-color);\n}\n\n.djs-search-result-selected:hover {\n background: var(--search-result-selected-color);\n}\n\n.djs-search-overlay {\n background: var(--search-result-selected-color);\n}\n\n/**\n * hidden styles\n */\n.djs-element-hidden,\n.djs-element-hidden .djs-hit,\n.djs-element-hidden .djs-outline,\n.djs-label-hidden .djs-label {\n display: none !important;\n}\n\n.djs-element .djs-hit-stroke,\n.djs-element .djs-hit-click-stroke,\n.djs-element .djs-hit-all {\n cursor: move;\n}"],"sourceRoot":""}]);
+// Exports
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
+
+
+/***/ }),
+
+/***/ "../node_modules/css-loader/dist/cjs.js!../node_modules/less-loader/dist/cjs.js!./src/style.less":
+/*!*******************************************************************************************************!*\
+ !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/less-loader/dist/cjs.js!./src/style.less ***!
+ \*******************************************************************************************************/
+/***/ ((module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "../node_modules/css-loader/dist/runtime/sourceMaps.js");
+/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "../node_modules/css-loader/dist/runtime/api.js");
+/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
+// Imports
+
+
+var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
+// Module
+___CSS_LOADER_EXPORT___.push([module.id, `* {
+ box-sizing: border-box;
+}
+body,
+html {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 12px;
+ height: 100%;
+ max-height: 100%;
+ padding: 0;
+ margin: 0;
+}
+#js-properties-panel {
+ width: 500px;
+}
+a:link {
+ text-decoration: none;
+}
+.content {
+ position: relative;
+ width: 100%;
+ height: 100%;
+ display: flex;
+}
+.content > .message {
+ width: 100%;
+ height: 100%;
+ text-align: center;
+ display: table;
+ font-size: 16px;
+ color: #111;
+}
+.content > .message .note {
+ vertical-align: middle;
+ text-align: center;
+ display: table-cell;
+}
+.content > .message.error .details {
+ max-width: 500px;
+ font-size: 12px;
+ margin: 20px auto;
+ text-align: left;
+ color: #BD2828;
+}
+.content > .message.error pre {
+ border: solid 1px #BD2828;
+ background: #fefafa;
+ padding: 10px;
+ color: #BD2828;
+}
+.content:not(.with-error) .error,
+.content.with-error .intro,
+.content.with-diagram .intro {
+ display: none;
+}
+.content .canvas {
+ width: 100%;
+}
+.content .canvas,
+.content .properties-panel-parent {
+ display: none;
+}
+.content.with-diagram .canvas,
+.content.with-diagram .properties-panel-parent {
+ display: block;
+}
+.buttons {
+ position: fixed;
+ bottom: 20px;
+ left: 20px;
+ padding: 0;
+ margin: 0;
+ list-style: none;
+}
+.buttons > li {
+ display: inline-block;
+ margin-right: 10px;
+}
+.buttons > li > a {
+ background: #DDD;
+ border: solid 1px #666;
+ display: inline-block;
+ padding: 5px;
+}
+.buttons a {
+ opacity: 0.3;
+}
+.buttons a.active {
+ opacity: 1;
+}
+.properties-panel-parent {
+ border-left: 1px solid #ccc;
+ overflow: auto;
+ direction: ltr;
+}
+.properties-panel-parent:empty {
+ display: none;
+}
+.properties-panel-parent > .djs-properties-panel {
+ padding-bottom: 70px;
+ min-height: 100%;
+}
+`, "",{"version":3,"sources":["webpack://./src/style.less"],"names":[],"mappings":"AAAA;EACE,sBAAA;AACF;AAEA;;EAEE,2DAAA;EAEA,eAAA;EAEA,YAAA;EACA,gBAAA;EACA,UAAA;EACA,SAAA;AAFF;AAKA;EACE,YAAA;AAHF;AAMA;EACE,qBAAA;AAJF;AAOA;EACE,kBAAA;EACA,WAAA;EACA,YAAA;EACA,aAAA;AALF;AACA;EAOI,WAAA;EACA,YAAA;EACA,kBAAA;EACA,cAAA;EAEA,eAAA;EACA,WAAA;AANJ;AAPA;EAgBM,sBAAA;EACA,kBAAA;EACA,mBAAA;AANN;AASI;EAEI,gBAAA;EACA,eAAA;EACA,iBAAA;EACA,gBAAA;EACA,cAAA;AARR;AAEI;EAUI,yBAAA;EACA,mBAAA;EACA,aAAA;EACA,cAAA;AATR;AAaE;;;EAGE,aAAA;AAXJ;AA9BA;EA6CI,WAAA;AAZJ;AAjCA;;EAkDI,aAAA;AAbJ;AAgBE;;EAGI,cAAA;AAfN;AAqBA;EACE,eAAA;EACA,YAAA;EACA,UAAA;EAEA,UAAA;EACA,SAAA;EACA,gBAAA;AApBF;AAaA;EAUI,qBAAA;EACA,kBAAA;AApBJ;AASA;EAcM,gBAAA;EACA,sBAAA;EACA,qBAAA;EACA,YAAA;AApBN;AAGA;EAsBI,YAAA;AAtBJ;AAAA;EA0BI,UAAA;AAvBJ;AA2BA;EACE,2BAAA;EACA,cAAA;AAzBF;AA0BE;EACE,aAAA;AAxBJ;AAoBA;EAOI,oBAAA;EACA,gBAAA;AAxBJ","sourcesContent":["* {\n box-sizing: border-box;\n}\n\nbody,\nhtml {\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n\n font-size: 12px;\n\n height: 100%;\n max-height: 100%;\n padding: 0;\n margin: 0;\n}\n\n#js-properties-panel {\n width: 400px;\n}\n\na:link {\n text-decoration: none;\n}\n\n.content {\n position: relative;\n width: 100%;\n height: 100%;\n display: flex;\n\n > .message {\n width: 100%;\n height: 100%;\n text-align: center;\n display: table;\n\n font-size: 16px;\n color: #111;\n\n .note {\n vertical-align: middle;\n text-align: center;\n display: table-cell;\n }\n\n &.error {\n .details {\n max-width: 500px;\n font-size: 12px;\n margin: 20px auto;\n text-align: left;\n color: #BD2828;\n }\n\n pre {\n border: solid 1px #BD2828;\n background: #fefafa;\n padding: 10px;\n color: #BD2828;\n }\n }\n }\n &:not(.with-error) .error,\n &.with-error .intro,\n &.with-diagram .intro {\n display: none;\n }\n\n .canvas {\n width: 100%;\n }\n\n .canvas,\n .properties-panel-parent {\n display: none;\n }\n\n &.with-diagram {\n .canvas,\n .properties-panel-parent {\n display: block;\n }\n }\n}\n\n\n.buttons {\n position: fixed;\n bottom: 20px;\n left: 20px;\n\n padding: 0;\n margin: 0;\n list-style: none;\n\n > li {\n display: inline-block;\n margin-right: 10px;\n\n > a {\n background: #DDD;\n border: solid 1px #666;\n display: inline-block;\n padding: 5px;\n }\n }\n\n a {\n opacity: 0.3;\n }\n\n a.active {\n opacity: 1.0;\n }\n}\n\n.properties-panel-parent {\n border-left: 1px solid #ccc;\n overflow: auto;\n &:empty {\n display: none;\n }\n > .djs-properties-panel {\n padding-bottom: 70px;\n min-height:100%;\n }\n}\n"],"sourceRoot":""}]);
+// Exports
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
+
+
+/***/ }),
+
+/***/ "../node_modules/css-loader/dist/runtime/api.js":
+/*!******************************************************!*\
+ !*** ../node_modules/css-loader/dist/runtime/api.js ***!
+ \******************************************************/
+/***/ ((module) => {
+
+"use strict";
+
+
+/*
+ MIT License http://www.opensource.org/licenses/mit-license.php
+ Author Tobias Koppers @sokra
+*/
+module.exports = function (cssWithMappingToString) {
+ var list = [];
+
+ // return the list of modules as css string
+ list.toString = function toString() {
+ return this.map(function (item) {
+ var content = "";
+ var needLayer = typeof item[5] !== "undefined";
+ if (item[4]) {
+ content += "@supports (".concat(item[4], ") {");
+ }
+ if (item[2]) {
+ content += "@media ".concat(item[2], " {");
+ }
+ if (needLayer) {
+ content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
+ }
+ content += cssWithMappingToString(item);
+ if (needLayer) {
+ content += "}";
+ }
+ if (item[2]) {
+ content += "}";
+ }
+ if (item[4]) {
+ content += "}";
+ }
+ return content;
+ }).join("");
+ };
+
+ // import a list of modules into the list
+ list.i = function i(modules, media, dedupe, supports, layer) {
+ if (typeof modules === "string") {
+ modules = [[null, modules, undefined]];
+ }
+ var alreadyImportedModules = {};
+ if (dedupe) {
+ for (var k = 0; k < this.length; k++) {
+ var id = this[k][0];
+ if (id != null) {
+ alreadyImportedModules[id] = true;
+ }
+ }
+ }
+ for (var _k = 0; _k < modules.length; _k++) {
+ var item = [].concat(modules[_k]);
+ if (dedupe && alreadyImportedModules[item[0]]) {
+ continue;
+ }
+ if (typeof layer !== "undefined") {
+ if (typeof item[5] === "undefined") {
+ item[5] = layer;
+ } else {
+ item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
+ item[5] = layer;
+ }
+ }
+ if (media) {
+ if (!item[2]) {
+ item[2] = media;
+ } else {
+ item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
+ item[2] = media;
+ }
+ }
+ if (supports) {
+ if (!item[4]) {
+ item[4] = "".concat(supports);
+ } else {
+ item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
+ item[4] = supports;
+ }
+ }
+ list.push(item);
+ }
+ };
+ return list;
+};
+
+/***/ }),
+
+/***/ "../node_modules/css-loader/dist/runtime/getUrl.js":
+/*!*********************************************************!*\
+ !*** ../node_modules/css-loader/dist/runtime/getUrl.js ***!
+ \*********************************************************/
+/***/ ((module) => {
+
+"use strict";
+
+
+module.exports = function (url, options) {
+ if (!options) {
+ options = {};
+ }
+ if (!url) {
+ return url;
+ }
+ url = String(url.__esModule ? url.default : url);
+
+ // If url is already wrapped in quotes, remove them
+ if (/^['"].*['"]$/.test(url)) {
+ url = url.slice(1, -1);
+ }
+ if (options.hash) {
+ url += options.hash;
+ }
+
+ // Should url be wrapped?
+ // See https://drafts.csswg.org/css-values-3/#urls
+ if (/["'() \t\n]|(%20)/.test(url) || options.needQuotes) {
+ return "\"".concat(url.replace(/"/g, '\\"').replace(/\n/g, "\\n"), "\"");
+ }
+ return url;
+};
+
+/***/ }),
+
+/***/ "../node_modules/css-loader/dist/runtime/sourceMaps.js":
+/*!*************************************************************!*\
+ !*** ../node_modules/css-loader/dist/runtime/sourceMaps.js ***!
+ \*************************************************************/
+/***/ ((module) => {
+
+"use strict";
+
+
+module.exports = function (item) {
+ var content = item[1];
+ var cssMapping = item[3];
+ if (!cssMapping) {
+ return content;
+ }
+ if (typeof btoa === "function") {
+ var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));
+ var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
+ var sourceMapping = "/*# ".concat(data, " */");
+ return [content].concat([sourceMapping]).join("\n");
+ }
+ return [content].join("\n");
+};
+
+/***/ }),
+
+/***/ "../node_modules/diagram-js-direct-editing/lib/DirectEditing.js":
+/*!**********************************************************************!*\
+ !*** ../node_modules/diagram-js-direct-editing/lib/DirectEditing.js ***!
+ \**********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ DirectEditing)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _TextBox_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TextBox.js */ "../node_modules/diagram-js-direct-editing/lib/TextBox.js");
+
+
+
+
+
+/**
+ * A direct editing component that allows users
+ * to edit an elements text directly in the diagram
+ *
+ * @param {EventBus} eventBus the event bus
+ */
+function DirectEditing(eventBus, canvas) {
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = ResizeBehavior;
- exports.TEXT_ANNOTATION_MIN_DIMENSIONS = exports.SUB_PROCESS_MIN_DIMENSIONS = exports.PARTICIPANT_MIN_DIMENSIONS = exports.LANE_MIN_DIMENSIONS = void 0;
+ this._eventBus = eventBus;
- var _ModelUtil = require("../../../util/ModelUtil");
+ this._providers = [];
+ this._textbox = new _TextBox_js__WEBPACK_IMPORTED_MODULE_0__["default"]({
+ container: canvas.getContainer(),
+ keyHandler: (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.bind)(this._handleKey, this),
+ resizeHandler: (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.bind)(this._handleResize, this)
+ });
+}
- var _DiUtil = require("../../../util/DiUtil");
+DirectEditing.$inject = [ 'eventBus', 'canvas' ];
- var _ResizeUtil = require("./util/ResizeUtil");
- var HIGH_PRIORITY = 1500;
- var LANE_MIN_DIMENSIONS = {
- width: 300,
- height: 60
- };
- exports.LANE_MIN_DIMENSIONS = LANE_MIN_DIMENSIONS;
- var PARTICIPANT_MIN_DIMENSIONS = {
- width: 300,
- height: 150
- };
- exports.PARTICIPANT_MIN_DIMENSIONS = PARTICIPANT_MIN_DIMENSIONS;
- var SUB_PROCESS_MIN_DIMENSIONS = {
- width: 140,
- height: 120
- };
- exports.SUB_PROCESS_MIN_DIMENSIONS = SUB_PROCESS_MIN_DIMENSIONS;
- var TEXT_ANNOTATION_MIN_DIMENSIONS = {
- width: 50,
- height: 30
- };
- /**
- * Set minimum bounds/resize constraints on resize.
- *
- * @param {EventBus} eventBus
- */
+/**
+ * Register a direct editing provider
- exports.TEXT_ANNOTATION_MIN_DIMENSIONS = TEXT_ANNOTATION_MIN_DIMENSIONS;
+ * @param {Object} provider the provider, must expose an #activate(element) method that returns
+ * an activation context ({ bounds: {x, y, width, height }, text }) if
+ * direct editing is available for the given element.
+ * Additionally the provider must expose a #update(element, value) method
+ * to receive direct editing updates.
+ */
+DirectEditing.prototype.registerProvider = function(provider) {
+ this._providers.push(provider);
+};
- function ResizeBehavior(eventBus) {
- eventBus.on('resize.start', HIGH_PRIORITY, function (event) {
- var context = event.context,
- shape = context.shape,
- direction = context.direction,
- balanced = context.balanced;
- if ((0, _ModelUtil.is)(shape, 'bpmn:Lane') || (0, _ModelUtil.is)(shape, 'bpmn:Participant')) {
- context.resizeConstraints = (0, _ResizeUtil.getParticipantResizeConstraints)(shape, direction, balanced);
- }
+/**
+ * Returns true if direct editing is currently active
+ *
+ * @param {djs.model.Base} [element]
+ *
+ * @return {boolean}
+ */
+DirectEditing.prototype.isActive = function(element) {
+ return !!(this._active && (!element || this._active.element === element));
+};
- if ((0, _ModelUtil.is)(shape, 'bpmn:Participant')) {
- context.minDimensions = PARTICIPANT_MIN_DIMENSIONS;
- }
- if ((0, _ModelUtil.is)(shape, 'bpmn:SubProcess') && (0, _DiUtil.isExpanded)(shape)) {
- context.minDimensions = SUB_PROCESS_MIN_DIMENSIONS;
- }
+/**
+ * Cancel direct editing, if it is currently active
+ */
+DirectEditing.prototype.cancel = function() {
+ if (!this._active) {
+ return;
+ }
- if ((0, _ModelUtil.is)(shape, 'bpmn:TextAnnotation')) {
- context.minDimensions = TEXT_ANNOTATION_MIN_DIMENSIONS;
- }
- });
- }
+ this._fire('cancel');
+ this.close();
+};
- ResizeBehavior.$inject = ['eventBus'];
- },{"../../../util/DiUtil":238,"../../../util/ModelUtil":240,"./util/ResizeUtil":199}],185:[function(require,module,exports){
- "use strict";
+DirectEditing.prototype._fire = function(event, context) {
+ this._eventBus.fire('directEditing.' + event, context || { active: this._active });
+};
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = ResizeLaneBehavior;
+DirectEditing.prototype.close = function() {
+ this._textbox.destroy();
- var _ModelUtil = require("../../../util/ModelUtil");
+ this._fire('deactivate');
- var _LayoutUtil = require("diagram-js/lib/layout/LayoutUtil");
+ this._active = null;
- var _Mouse = require("diagram-js/lib/util/Mouse");
+ this.resizable = undefined;
+};
- var SLIGHTLY_HIGHER_PRIORITY = 1001;
- /**
- * Invoke {@link Modeling#resizeLane} instead of
- * {@link Modeling#resizeShape} when resizing a Lane
- * or Participant shape.
- */
- function ResizeLaneBehavior(eventBus, modeling) {
- eventBus.on('resize.start', SLIGHTLY_HIGHER_PRIORITY + 500, function (event) {
- var context = event.context,
- shape = context.shape;
+DirectEditing.prototype.complete = function() {
- if ((0, _ModelUtil.is)(shape, 'bpmn:Lane') || (0, _ModelUtil.is)(shape, 'bpmn:Participant')) {
- // should we resize the opposite lane(s) in
- // order to compensate for the resize operation?
- context.balanced = !(0, _Mouse.hasPrimaryModifier)(event);
- }
- });
- /**
- * Intercept resize end and call resize lane function instead.
- */
+ var active = this._active;
- eventBus.on('resize.end', SLIGHTLY_HIGHER_PRIORITY, function (event) {
- var context = event.context,
- shape = context.shape,
- canExecute = context.canExecute,
- newBounds = context.newBounds;
+ if (!active) {
+ return;
+ }
- if ((0, _ModelUtil.is)(shape, 'bpmn:Lane') || (0, _ModelUtil.is)(shape, 'bpmn:Participant')) {
- if (canExecute) {
- // ensure we have actual pixel values for new bounds
- // (important when zoom level was > 1 during move)
- newBounds = (0, _LayoutUtil.roundBounds)(newBounds); // perform the actual resize
+ var containerBounds,
+ previousBounds = active.context.bounds,
+ newBounds = this.$textbox.getBoundingClientRect(),
+ newText = this.getValue(),
+ previousText = active.context.text;
- modeling.resizeLane(shape, newBounds, context.balanced);
- } // stop propagation
+ if (
+ newText !== previousText ||
+ newBounds.height !== previousBounds.height ||
+ newBounds.width !== previousBounds.width
+ ) {
+ containerBounds = this._textbox.container.getBoundingClientRect();
+ active.provider.update(active.element, newText, active.context.text, {
+ x: newBounds.left - containerBounds.left,
+ y: newBounds.top - containerBounds.top,
+ width: newBounds.width,
+ height: newBounds.height
+ });
+ }
- return false;
- }
- });
- }
+ this._fire('complete');
- ResizeLaneBehavior.$inject = ['eventBus', 'modeling'];
+ this.close();
+};
- },{"../../../util/ModelUtil":240,"diagram-js/lib/layout/LayoutUtil":405,"diagram-js/lib/util/Mouse":428}],186:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = RootElementReferenceBehavior;
+DirectEditing.prototype.getValue = function() {
+ return this._textbox.getValue();
+};
- var _inherits = _interopRequireDefault(require("inherits"));
- var _minDash = require("min-dash");
+DirectEditing.prototype._handleKey = function(e) {
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+ // stop bubble
+ e.stopPropagation();
- var _Collections = require("diagram-js/lib/util/Collections");
+ var key = e.keyCode || e.charCode;
- var _ModelUtil = require("../../../util/ModelUtil");
+ // ESC
+ if (key === 27) {
+ e.preventDefault();
+ return this.cancel();
+ }
- var _ModelingUtil = require("../util/ModelingUtil");
+ // Enter
+ if (key === 13 && !e.shiftKey) {
+ e.preventDefault();
+ return this.complete();
+ }
+};
- var _DiUtil = require("../../../util/DiUtil");
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+DirectEditing.prototype._handleResize = function(event) {
+ this._fire('resize', event);
+};
- var LOW_PRIORITY = 500;
- /**
- * Add referenced root elements (error, escalation, message, signal) if they don't exist.
- * Copy referenced root elements on copy & paste.
- */
- function RootElementReferenceBehavior(bpmnjs, eventBus, injector, moddleCopy, bpmnFactory) {
- injector.invoke(_CommandInterceptor.default, this);
+/**
+ * Activate direct editing on the given element
+ *
+ * @param {Object} ElementDescriptor the descriptor for a shape or connection
+ * @return {Boolean} true if the activation was possible
+ */
+DirectEditing.prototype.activate = function(element) {
+ if (this.isActive()) {
+ this.cancel();
+ }
- function canHaveRootElementReference(element) {
- return (0, _ModelingUtil.isAny)(element, ['bpmn:ReceiveTask', 'bpmn:SendTask']) || hasAnyEventDefinition(element, ['bpmn:ErrorEventDefinition', 'bpmn:EscalationEventDefinition', 'bpmn:MessageEventDefinition', 'bpmn:SignalEventDefinition']);
- }
+ // the direct editing context
+ var context;
- function hasRootElement(rootElement) {
- var definitions = bpmnjs.getDefinitions(),
- rootElements = definitions.get('rootElements');
- return !!(0, _minDash.find)(rootElements, (0, _minDash.matchPattern)({
- id: rootElement.id
- }));
- }
+ var provider = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.find)(this._providers, function(p) {
+ return ((context = p.activate(element))) ? p : null;
+ });
- function getRootElementReferencePropertyName(eventDefinition) {
- if ((0, _ModelUtil.is)(eventDefinition, 'bpmn:ErrorEventDefinition')) {
- return 'errorRef';
- } else if ((0, _ModelUtil.is)(eventDefinition, 'bpmn:EscalationEventDefinition')) {
- return 'escalationRef';
- } else if ((0, _ModelUtil.is)(eventDefinition, 'bpmn:MessageEventDefinition')) {
- return 'messageRef';
- } else if ((0, _ModelUtil.is)(eventDefinition, 'bpmn:SignalEventDefinition')) {
- return 'signalRef';
- }
- }
-
- function getRootElement(businessObject) {
- if ((0, _ModelingUtil.isAny)(businessObject, ['bpmn:ReceiveTask', 'bpmn:SendTask'])) {
- return businessObject.get('messageRef');
- }
-
- var eventDefinitions = businessObject.get('eventDefinitions'),
- eventDefinition = eventDefinitions[0];
- return eventDefinition.get(getRootElementReferencePropertyName(eventDefinition));
- }
+ // check if activation took place
+ if (context) {
+ this.$textbox = this._textbox.create(
+ context.bounds,
+ context.style,
+ context.text,
+ context.options
+ );
- function setRootElement(businessObject, rootElement) {
- if ((0, _ModelingUtil.isAny)(businessObject, ['bpmn:ReceiveTask', 'bpmn:SendTask'])) {
- return businessObject.set('messageRef', rootElement);
- }
+ this._active = {
+ element: element,
+ context: context,
+ provider: provider
+ };
- var eventDefinitions = businessObject.get('eventDefinitions'),
- eventDefinition = eventDefinitions[0];
- return eventDefinition.set(getRootElementReferencePropertyName(eventDefinition), rootElement);
- } // create shape
+ if (context.options && context.options.resizable) {
+ this.resizable = true;
+ }
+ this._fire('activate');
+ }
- this.executed('shape.create', function (context) {
- var shape = context.shape;
+ return !!context;
+};
- if (!canHaveRootElementReference(shape)) {
- return;
- }
- var businessObject = (0, _ModelUtil.getBusinessObject)(shape),
- rootElement = getRootElement(businessObject),
- rootElements;
+/***/ }),
- if (rootElement && !hasRootElement(rootElement)) {
- rootElements = bpmnjs.getDefinitions().get('rootElements'); // add root element
+/***/ "../node_modules/diagram-js-direct-editing/lib/TextBox.js":
+/*!****************************************************************!*\
+ !*** ../node_modules/diagram-js-direct-editing/lib/TextBox.js ***!
+ \****************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- (0, _Collections.add)(rootElements, rootElement);
- context.addedRootElement = rootElement;
- }
- }, true);
- this.reverted('shape.create', function (context) {
- var addedRootElement = context.addedRootElement;
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ TextBox)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dom */ "../node_modules/min-dom/dist/index.esm.js");
- if (!addedRootElement) {
- return;
- }
- var rootElements = bpmnjs.getDefinitions().get('rootElements'); // remove root element
- (0, _Collections.remove)(rootElements, addedRootElement);
- }, true);
- eventBus.on('copyPaste.copyElement', function (context) {
- var descriptor = context.descriptor,
- element = context.element;
- if (!canHaveRootElementReference(element)) {
- return;
- }
+var min = Math.min,
+ max = Math.max;
- var businessObject = (0, _ModelUtil.getBusinessObject)(element),
- rootElement = getRootElement(businessObject);
+function preventDefault(e) {
+ e.preventDefault();
+}
- if (rootElement) {
- descriptor.referencedRootElement = rootElement;
- }
- });
- eventBus.on('copyPaste.pasteElement', LOW_PRIORITY, function (context) {
- var descriptor = context.descriptor,
- businessObject = descriptor.businessObject;
+function stopPropagation(e) {
+ e.stopPropagation();
+}
- if (!canHaveRootElementReference(businessObject)) {
- return;
- }
+function isTextNode(node) {
+ return node.nodeType === Node.TEXT_NODE;
+}
- var referencedRootElement = descriptor.referencedRootElement;
+function toArray(nodeList) {
+ return [].slice.call(nodeList);
+}
- if (!referencedRootElement) {
- return;
- }
+/**
+ * Initializes a container for a content editable div.
+ *
+ * Structure:
+ *
+ * container
+ * parent
+ * content
+ * resize-handle
+ *
+ * @param {object} options
+ * @param {DOMElement} options.container The DOM element to append the contentContainer to
+ * @param {Function} options.keyHandler Handler for key events
+ * @param {Function} options.resizeHandler Handler for resize events
+ */
+function TextBox(options) {
+ this.container = options.container;
- if (!hasRootElement(referencedRootElement)) {
- referencedRootElement = moddleCopy.copyElement(referencedRootElement, bpmnFactory.create(referencedRootElement.$type));
- }
+ this.parent = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.domify)(
+ ''
+ );
- setRootElement(businessObject, referencedRootElement);
- });
- }
+ this.content = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.query)('[contenteditable]', this.parent);
- RootElementReferenceBehavior.$inject = ['bpmnjs', 'eventBus', 'injector', 'moddleCopy', 'bpmnFactory'];
- (0, _inherits.default)(RootElementReferenceBehavior, _CommandInterceptor.default); // helpers //////////
+ this.keyHandler = options.keyHandler || function() {};
+ this.resizeHandler = options.resizeHandler || function() {};
- function hasAnyEventDefinition(element, types) {
- if (!(0, _minDash.isArray)(types)) {
- types = [types];
- }
+ this.autoResize = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.bind)(this.autoResize, this);
+ this.handlePaste = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.bind)(this.handlePaste, this);
+}
- return (0, _minDash.some)(types, function (type) {
- return (0, _DiUtil.hasEventDefinition)(element, type);
- });
- }
- },{"../../../util/DiUtil":238,"../../../util/ModelUtil":240,"../util/ModelingUtil":211,"diagram-js/lib/command/CommandInterceptor":250,"diagram-js/lib/util/Collections":418,"inherits":438,"min-dash":646}],187:[function(require,module,exports){
- "use strict";
+/**
+ * Create a text box with the given position, size, style and text content
+ *
+ * @param {Object} bounds
+ * @param {Number} bounds.x absolute x position
+ * @param {Number} bounds.y absolute y position
+ * @param {Number} [bounds.width] fixed width value
+ * @param {Number} [bounds.height] fixed height value
+ * @param {Number} [bounds.maxWidth] maximum width value
+ * @param {Number} [bounds.maxHeight] maximum height value
+ * @param {Number} [bounds.minWidth] minimum width value
+ * @param {Number} [bounds.minHeight] minimum height value
+ * @param {Object} [style]
+ * @param {String} value text content
+ *
+ * @return {DOMElement} The created content DOM element
+ */
+TextBox.prototype.create = function(bounds, style, value, options) {
+ var self = this;
+
+ var parent = this.parent,
+ content = this.content,
+ container = this.container;
+
+ options = this.options = options || {};
+
+ style = this.style = style || {};
+
+ var parentStyle = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.pick)(style, [
+ 'width',
+ 'height',
+ 'maxWidth',
+ 'maxHeight',
+ 'minWidth',
+ 'minHeight',
+ 'left',
+ 'top',
+ 'backgroundColor',
+ 'position',
+ 'overflow',
+ 'border',
+ 'wordWrap',
+ 'textAlign',
+ 'outline',
+ 'transform'
+ ]);
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(parent.style, {
+ width: bounds.width + 'px',
+ height: bounds.height + 'px',
+ maxWidth: bounds.maxWidth + 'px',
+ maxHeight: bounds.maxHeight + 'px',
+ minWidth: bounds.minWidth + 'px',
+ minHeight: bounds.minHeight + 'px',
+ left: bounds.x + 'px',
+ top: bounds.y + 'px',
+ backgroundColor: '#ffffff',
+ position: 'absolute',
+ overflow: 'visible',
+ border: '1px solid #ccc',
+ boxSizing: 'border-box',
+ wordWrap: 'normal',
+ textAlign: 'center',
+ outline: 'none'
+ }, parentStyle);
+
+ var contentStyle = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.pick)(style, [
+ 'fontFamily',
+ 'fontSize',
+ 'fontWeight',
+ 'lineHeight',
+ 'padding',
+ 'paddingTop',
+ 'paddingRight',
+ 'paddingBottom',
+ 'paddingLeft'
+ ]);
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(content.style, {
+ boxSizing: 'border-box',
+ width: '100%',
+ outline: 'none',
+ wordWrap: 'break-word'
+ }, contentStyle);
+
+ if (options.centerVertically) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(content.style, {
+ position: 'absolute',
+ top: '50%',
+ transform: 'translate(0, -50%)'
+ }, contentStyle);
+ }
+
+ content.innerText = value;
+
+ min_dom__WEBPACK_IMPORTED_MODULE_0__.event.bind(content, 'keydown', this.keyHandler);
+ min_dom__WEBPACK_IMPORTED_MODULE_0__.event.bind(content, 'mousedown', stopPropagation);
+ min_dom__WEBPACK_IMPORTED_MODULE_0__.event.bind(content, 'paste', self.handlePaste);
+
+ if (options.autoResize) {
+ min_dom__WEBPACK_IMPORTED_MODULE_0__.event.bind(content, 'input', this.autoResize);
+ }
+
+ if (options.resizable) {
+ this.resizable(style);
+ }
+
+ container.appendChild(parent);
+
+ // set selection to end of text
+ this.setSelection(content.lastChild, content.lastChild && content.lastChild.length);
+
+ return parent;
+};
+
+/**
+ * Intercept paste events to remove formatting from pasted text.
+ */
+TextBox.prototype.handlePaste = function(e) {
+ var options = this.options,
+ style = this.style;
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = SpaceToolBehavior;
+ e.preventDefault();
- var _minDash = require("min-dash");
+ var text;
- var _ModelUtil = require("../../../util/ModelUtil");
+ if (e.clipboardData) {
- var _DiUtil = require("../../../util/DiUtil");
+ // Chrome, Firefox, Safari
+ text = e.clipboardData.getData('text/plain');
+ } else {
- var _ResizeBehavior = require("./ResizeBehavior");
+ // Internet Explorer
+ text = window.clipboardData.getData('Text');
+ }
- var _LaneUtil = require("../util/LaneUtil");
+ this.insertText(text);
- var max = Math.max;
+ if (options.autoResize) {
+ var hasResized = this.autoResize(style);
- function SpaceToolBehavior(eventBus) {
- eventBus.on('spaceTool.getMinDimensions', function (context) {
- var shapes = context.shapes,
- axis = context.axis,
- start = context.start,
- minDimensions = {};
- (0, _minDash.forEach)(shapes, function (shape) {
- var id = shape.id;
+ if (hasResized) {
+ this.resizeHandler(hasResized);
+ }
+ }
+};
- if ((0, _ModelUtil.is)(shape, 'bpmn:Participant')) {
- if (isHorizontal(axis)) {
- minDimensions[id] = _ResizeBehavior.PARTICIPANT_MIN_DIMENSIONS;
- } else {
- minDimensions[id] = {
- width: _ResizeBehavior.PARTICIPANT_MIN_DIMENSIONS.width,
- height: getParticipantMinHeight(shape, start)
- };
- }
- }
+TextBox.prototype.insertText = function(text) {
+ text = normalizeEndOfLineSequences(text);
- if ((0, _ModelUtil.is)(shape, 'bpmn:SubProcess') && (0, _DiUtil.isExpanded)(shape)) {
- minDimensions[id] = _ResizeBehavior.SUB_PROCESS_MIN_DIMENSIONS;
- }
+ // insertText command not supported by Internet Explorer
+ var success = document.execCommand('insertText', false, text);
- if ((0, _ModelUtil.is)(shape, 'bpmn:TextAnnotation')) {
- minDimensions[id] = _ResizeBehavior.TEXT_ANNOTATION_MIN_DIMENSIONS;
- }
- });
- return minDimensions;
- });
- }
+ if (success) {
+ return;
+ }
- SpaceToolBehavior.$inject = ['eventBus']; // helpers //////////
+ this._insertTextIE(text);
+};
- function isHorizontal(axis) {
- return axis === 'x';
- }
- /**
- * Get minimum height for participant taking lanes into account.
- *
- * @param {} participant
- * @param {number} start
- *
- * @returns {Object}
- */
+TextBox.prototype._insertTextIE = function(text) {
+ // Internet Explorer
+ var range = this.getSelection(),
+ startContainer = range.startContainer,
+ endContainer = range.endContainer,
+ startOffset = range.startOffset,
+ endOffset = range.endOffset,
+ commonAncestorContainer = range.commonAncestorContainer;
- function getParticipantMinHeight(participant, start) {
- var lanesMinHeight;
+ var childNodesArray = toArray(commonAncestorContainer.childNodes);
- if (!hasChildLanes(participant)) {
- return _ResizeBehavior.PARTICIPANT_MIN_DIMENSIONS.height;
- }
+ var container,
+ offset;
- lanesMinHeight = getLanesMinHeight(participant, start);
- return max(_ResizeBehavior.PARTICIPANT_MIN_DIMENSIONS.height, lanesMinHeight);
- }
+ if (isTextNode(commonAncestorContainer)) {
+ var containerTextContent = startContainer.textContent;
- function hasChildLanes(element) {
- return !!(0, _LaneUtil.getChildLanes)(element).length;
- }
+ startContainer.textContent =
+ containerTextContent.substring(0, startOffset)
+ + text
+ + containerTextContent.substring(endOffset);
- function getLanesMinHeight(participant, resizeStart) {
- var lanes = (0, _LaneUtil.getChildLanes)(participant),
- resizedLane; // find the nested lane which is currently resized
+ container = startContainer;
+ offset = startOffset + text.length;
- resizedLane = findResizedLane(lanes, resizeStart); // resized lane cannot shrink below the minimum height
- // but remaining lanes' dimensions are kept intact
+ } else if (startContainer === this.content && endContainer === this.content) {
+ var textNode = document.createTextNode(text);
- return participant.height - resizedLane.height + _ResizeBehavior.LANE_MIN_DIMENSIONS.height;
- }
- /**
- * Find nested lane which is currently resized.
- *
- * @param {Array} lanes
- * @param {number} resizeStart
- */
+ this.content.insertBefore(textNode, childNodesArray[startOffset]);
+ container = textNode;
+ offset = textNode.textContent.length;
+ } else {
+ var startContainerChildIndex = childNodesArray.indexOf(startContainer),
+ endContainerChildIndex = childNodesArray.indexOf(endContainer);
- function findResizedLane(lanes, resizeStart) {
- var i, lane, childLanes;
+ childNodesArray.forEach(function(childNode, index) {
- for (i = 0; i < lanes.length; i++) {
- lane = lanes[i]; // resizing current lane or a lane nested
+ if (index === startContainerChildIndex) {
+ childNode.textContent =
+ startContainer.textContent.substring(0, startOffset) +
+ text +
+ endContainer.textContent.substring(endOffset);
+ } else if (index > startContainerChildIndex && index <= endContainerChildIndex) {
+ (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.remove)(childNode);
+ }
+ });
- if (resizeStart >= lane.y && resizeStart <= lane.y + lane.height) {
- childLanes = (0, _LaneUtil.getChildLanes)(lane); // a nested lane is resized
+ container = startContainer;
+ offset = startOffset + text.length;
+ }
- if (childLanes.length) {
- return findResizedLane(childLanes, resizeStart);
- } // current lane is the resized one
+ if (container && offset !== undefined) {
+ // is necessary in Internet Explorer
+ setTimeout(function() {
+ self.setSelection(container, offset);
+ });
+ }
+};
- return lane;
- }
- }
- }
+/**
+ * Automatically resize element vertically to fit its content.
+ */
+TextBox.prototype.autoResize = function() {
+ var parent = this.parent,
+ content = this.content;
+
+ var fontSize = parseInt(this.style.fontSize) || 12;
+
+ if (content.scrollHeight > parent.offsetHeight ||
+ content.scrollHeight < parent.offsetHeight - fontSize) {
+ var bounds = parent.getBoundingClientRect();
+
+ var height = content.scrollHeight;
+ parent.style.height = height + 'px';
+
+ this.resizeHandler({
+ width: bounds.width,
+ height: bounds.height,
+ dx: 0,
+ dy: height - bounds.height
+ });
+ }
+};
+
+/**
+ * Make an element resizable by adding a resize handle.
+ */
+TextBox.prototype.resizable = function() {
+ var self = this;
- },{"../../../util/DiUtil":238,"../../../util/ModelUtil":240,"../util/LaneUtil":210,"./ResizeBehavior":184,"min-dash":646}],188:[function(require,module,exports){
- "use strict";
+ var parent = this.parent,
+ resizeHandle = this.resizeHandle;
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = SubProcessStartEventBehavior;
+ var minWidth = parseInt(this.style.minWidth) || 0,
+ minHeight = parseInt(this.style.minHeight) || 0,
+ maxWidth = parseInt(this.style.maxWidth) || Infinity,
+ maxHeight = parseInt(this.style.maxHeight) || Infinity;
- var _inherits = _interopRequireDefault(require("inherits"));
+ if (!resizeHandle) {
+ resizeHandle = this.resizeHandle = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.domify)(
+ '
'
+ );
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+ var startX, startY, startWidth, startHeight;
- var _ModelUtil = require("../../../util/ModelUtil");
+ var onMouseDown = function(e) {
+ preventDefault(e);
+ stopPropagation(e);
- var _DiUtil = require("../../../util/DiUtil.js");
+ startX = e.clientX;
+ startY = e.clientY;
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ var bounds = parent.getBoundingClientRect();
- /**
- * Add start event replacing element with expanded sub process.
- *
- * @param {Injector} injector
- * @param {Modeling} modeling
- */
- function SubProcessStartEventBehavior(injector, modeling) {
- injector.invoke(_CommandInterceptor.default, this);
- this.postExecuted('shape.replace', function (event) {
- var oldShape = event.context.oldShape,
- newShape = event.context.newShape;
+ startWidth = bounds.width;
+ startHeight = bounds.height;
- if (!(0, _ModelUtil.is)(newShape, 'bpmn:SubProcess') || !(0, _ModelUtil.is)(oldShape, 'bpmn:Task') || !(0, _DiUtil.isExpanded)(newShape)) {
- return;
- }
+ min_dom__WEBPACK_IMPORTED_MODULE_0__.event.bind(document, 'mousemove', onMouseMove);
+ min_dom__WEBPACK_IMPORTED_MODULE_0__.event.bind(document, 'mouseup', onMouseUp);
+ };
- var position = getStartEventPosition(newShape);
- modeling.createShape({
- type: 'bpmn:StartEvent'
- }, position, newShape);
- });
- }
+ var onMouseMove = function(e) {
+ preventDefault(e);
+ stopPropagation(e);
- SubProcessStartEventBehavior.$inject = ['injector', 'modeling'];
- (0, _inherits.default)(SubProcessStartEventBehavior, _CommandInterceptor.default); // helpers //////////
+ var newWidth = min(max(startWidth + e.clientX - startX, minWidth), maxWidth);
+ var newHeight = min(max(startHeight + e.clientY - startY, minHeight), maxHeight);
- function getStartEventPosition(shape) {
- return {
- x: shape.x + shape.width / 6,
- y: shape.y + shape.height / 2
- };
- }
+ parent.style.width = newWidth + 'px';
+ parent.style.height = newHeight + 'px';
- },{"../../../util/DiUtil.js":238,"../../../util/ModelUtil":240,"diagram-js/lib/command/CommandInterceptor":250,"inherits":438}],189:[function(require,module,exports){
- "use strict";
+ self.resizeHandler({
+ width: startWidth,
+ height: startHeight,
+ dx: e.clientX - startX,
+ dy: e.clientY - startY
+ });
+ };
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = ToggleElementCollapseBehaviour;
+ var onMouseUp = function(e) {
+ preventDefault(e);
+ stopPropagation(e);
- var _inherits = _interopRequireDefault(require("inherits"));
+ min_dom__WEBPACK_IMPORTED_MODULE_0__.event.unbind(document,'mousemove', onMouseMove, false);
+ min_dom__WEBPACK_IMPORTED_MODULE_0__.event.unbind(document, 'mouseup', onMouseUp, false);
+ };
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+ min_dom__WEBPACK_IMPORTED_MODULE_0__.event.bind(resizeHandle, 'mousedown', onMouseDown);
+ }
- var _ModelUtil = require("../../../util/ModelUtil");
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(resizeHandle.style, {
+ position: 'absolute',
+ bottom: '0px',
+ right: '0px',
+ cursor: 'nwse-resize',
+ width: '0',
+ height: '0',
+ borderTop: (parseInt(this.style.fontSize) / 4 || 3) + 'px solid transparent',
+ borderRight: (parseInt(this.style.fontSize) / 4 || 3) + 'px solid #ccc',
+ borderBottom: (parseInt(this.style.fontSize) / 4 || 3) + 'px solid #ccc',
+ borderLeft: (parseInt(this.style.fontSize) / 4 || 3) + 'px solid transparent'
+ });
- var _ResizeUtil = require("diagram-js/lib/features/resize/ResizeUtil");
+ parent.appendChild(resizeHandle);
+};
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var LOW_PRIORITY = 500;
+/**
+ * Clear content and style of the textbox, unbind listeners and
+ * reset CSS style.
+ */
+TextBox.prototype.destroy = function() {
+ var parent = this.parent,
+ content = this.content,
+ resizeHandle = this.resizeHandle;
- function ToggleElementCollapseBehaviour(eventBus, elementFactory, modeling, resize) {
- _CommandInterceptor.default.call(this, eventBus);
+ // clear content
+ content.innerText = '';
- function hideEmptyLabels(children) {
- if (children.length) {
- children.forEach(function (child) {
- if (child.type === 'label' && !child.businessObject.name) {
- child.hidden = true;
- }
- });
- }
- }
+ // clear styles
+ parent.removeAttribute('style');
+ content.removeAttribute('style');
- function expandedBounds(shape, defaultSize) {
- var children = shape.children,
- newBounds = defaultSize,
- visibleElements,
- visibleBBox;
- visibleElements = filterVisible(children).concat([shape]);
- visibleBBox = (0, _ResizeUtil.computeChildrenBBox)(visibleElements);
-
- if (visibleBBox) {
- // center to visibleBBox with max(defaultSize, childrenBounds)
- newBounds.width = Math.max(visibleBBox.width, newBounds.width);
- newBounds.height = Math.max(visibleBBox.height, newBounds.height);
- newBounds.x = visibleBBox.x + (visibleBBox.width - newBounds.width) / 2;
- newBounds.y = visibleBBox.y + (visibleBBox.height - newBounds.height) / 2;
- } else {
- // center to collapsed shape with defaultSize
- newBounds.x = shape.x + (shape.width - newBounds.width) / 2;
- newBounds.y = shape.y + (shape.height - newBounds.height) / 2;
- }
+ min_dom__WEBPACK_IMPORTED_MODULE_0__.event.unbind(content, 'keydown', this.keyHandler);
+ min_dom__WEBPACK_IMPORTED_MODULE_0__.event.unbind(content, 'mousedown', stopPropagation);
+ min_dom__WEBPACK_IMPORTED_MODULE_0__.event.unbind(content, 'input', this.autoResize);
+ min_dom__WEBPACK_IMPORTED_MODULE_0__.event.unbind(content, 'paste', this.handlePaste);
- return newBounds;
- }
+ if (resizeHandle) {
+ resizeHandle.removeAttribute('style');
- function collapsedBounds(shape, defaultSize) {
- return {
- x: shape.x + (shape.width - defaultSize.width) / 2,
- y: shape.y + (shape.height - defaultSize.height) / 2,
- width: defaultSize.width,
- height: defaultSize.height
- };
- }
+ (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.remove)(resizeHandle);
+ }
- this.executed(['shape.toggleCollapse'], LOW_PRIORITY, function (e) {
- var context = e.context,
- shape = context.shape;
+ (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.remove)(parent);
+};
- if (!(0, _ModelUtil.is)(shape, 'bpmn:SubProcess')) {
- return;
- }
- if (!shape.collapsed) {
- // all children got made visible through djs, hide empty labels
- hideEmptyLabels(shape.children); // remove collapsed marker
+TextBox.prototype.getValue = function() {
+ return this.content.innerText.trim();
+};
- (0, _ModelUtil.getBusinessObject)(shape).di.isExpanded = true;
- } else {
- // place collapsed marker
- (0, _ModelUtil.getBusinessObject)(shape).di.isExpanded = false;
- }
- });
- this.reverted(['shape.toggleCollapse'], LOW_PRIORITY, function (e) {
- var context = e.context;
- var shape = context.shape; // revert removing/placing collapsed marker
-
- if (!shape.collapsed) {
- (0, _ModelUtil.getBusinessObject)(shape).di.isExpanded = true;
- } else {
- (0, _ModelUtil.getBusinessObject)(shape).di.isExpanded = false;
- }
- });
- this.postExecuted(['shape.toggleCollapse'], LOW_PRIORITY, function (e) {
- var shape = e.context.shape,
- defaultSize = elementFactory._getDefaultSize(shape),
- newBounds;
-
- if (shape.collapsed) {
- // resize to default size of collapsed shapes
- newBounds = collapsedBounds(shape, defaultSize);
- } else {
- // resize to bounds of max(visible children, defaultSize)
- newBounds = expandedBounds(shape, defaultSize);
- }
- modeling.resizeShape(shape, newBounds, null, {
- autoResize: shape.collapsed ? false : 'nwse'
- });
- });
- }
+TextBox.prototype.getSelection = function() {
+ var selection = window.getSelection(),
+ range = selection.getRangeAt(0);
- (0, _inherits.default)(ToggleElementCollapseBehaviour, _CommandInterceptor.default);
- ToggleElementCollapseBehaviour.$inject = ['eventBus', 'elementFactory', 'modeling']; // helpers //////////////////////
+ return range;
+};
- function filterVisible(elements) {
- return elements.filter(function (e) {
- return !e.hidden;
- });
- }
- },{"../../../util/ModelUtil":240,"diagram-js/lib/command/CommandInterceptor":250,"diagram-js/lib/features/resize/ResizeUtil":373,"inherits":438}],190:[function(require,module,exports){
- "use strict";
+TextBox.prototype.setSelection = function(container, offset) {
+ var range = document.createRange();
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = UnclaimIdBehavior;
+ if (container === null) {
+ range.selectNodeContents(this.content);
+ } else {
+ range.setStart(container, offset);
+ range.setEnd(container, offset);
+ }
- var _inherits = _interopRequireDefault(require("inherits"));
+ var selection = window.getSelection();
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+ selection.removeAllRanges();
+ selection.addRange(range);
+};
- var _ModelUtil = require("../../../util/ModelUtil");
+// helpers //////////
- var _DiUtil = require("../../../util/DiUtil");
+function normalizeEndOfLineSequences(string) {
+ return string.replace(/\r\n|\r|\n/g, '\n');
+}
- var _LabelUtil = require("../../../util/LabelUtil");
+/***/ }),
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+/***/ "../node_modules/diagram-js-direct-editing/lib/index.js":
+/*!**************************************************************!*\
+ !*** ../node_modules/diagram-js-direct-editing/lib/index.js ***!
+ \**************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- /**
- * Unclaims model IDs on element deletion.
- *
- * @param {Canvas} canvas
- * @param {Injector} injector
- * @param {Moddle} moddle
- * @param {Modeling} modeling
- */
- function UnclaimIdBehavior(canvas, injector, moddle, modeling) {
- injector.invoke(_CommandInterceptor.default, this);
- this.preExecute('shape.delete', function (event) {
- var context = event.context,
- shape = context.shape,
- shapeBo = shape.businessObject;
-
- if ((0, _LabelUtil.isLabel)(shape)) {
- return;
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var diagram_js_lib_features_interaction_events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/interaction-events */ "../node_modules/diagram-js/lib/features/interaction-events/index.js");
+/* harmony import */ var _DirectEditing_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DirectEditing.js */ "../node_modules/diagram-js-direct-editing/lib/DirectEditing.js");
- if ((0, _ModelUtil.is)(shape, 'bpmn:Participant') && (0, _DiUtil.isExpanded)(shape)) {
- moddle.ids.unclaim(shapeBo.processRef.id);
- }
- modeling.unclaimId(shapeBo.id, shapeBo);
- });
- this.preExecute('connection.delete', function (event) {
- var context = event.context,
- connection = context.connection,
- connectionBo = connection.businessObject;
- modeling.unclaimId(connectionBo.id, connectionBo);
- });
- this.preExecute('canvas.updateRoot', function () {
- var rootElement = canvas.getRootElement(),
- rootElementBo = rootElement.businessObject;
- moddle.ids.unclaim(rootElementBo.id);
- });
- }
- (0, _inherits.default)(UnclaimIdBehavior, _CommandInterceptor.default);
- UnclaimIdBehavior.$inject = ['canvas', 'injector', 'moddle', 'modeling'];
- },{"../../../util/DiUtil":238,"../../../util/LabelUtil":239,"../../../util/ModelUtil":240,"diagram-js/lib/command/CommandInterceptor":250,"inherits":438}],191:[function(require,module,exports){
- "use strict";
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ diagram_js_lib_features_interaction_events__WEBPACK_IMPORTED_MODULE_1__["default"]
+ ],
+ __init__: [ 'directEditing' ],
+ directEditing: [ 'type', _DirectEditing_js__WEBPACK_IMPORTED_MODULE_0__["default"] ]
+});
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = DeleteSequenceFlowBehavior;
+/***/ }),
- var _inherits = _interopRequireDefault(require("inherits"));
+/***/ "../node_modules/diagram-js/lib/Diagram.js":
+/*!*************************************************!*\
+ !*** ../node_modules/diagram-js/lib/Diagram.js ***!
+ \*************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ Diagram)
+/* harmony export */ });
+/* harmony import */ var didi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! didi */ "../node_modules/didi/dist/index.js");
+/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./core */ "../node_modules/diagram-js/lib/core/index.js");
- var _ModelUtil = require("../../../util/ModelUtil");
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- /**
- * A behavior that unsets the Default property of
- * sequence flow source on element delete, if the
- * removed element is the Gateway or Task's default flow.
- *
- * @param {EventBus} eventBus
- * @param {Modeling} modeling
- */
- function DeleteSequenceFlowBehavior(eventBus, modeling) {
- _CommandInterceptor.default.call(this, eventBus);
- this.preExecute('connection.delete', function (event) {
- var context = event.context,
- connection = context.connection,
- source = connection.source;
+/**
+ * @typedef {import('didi').InjectionContext} InjectionContext
+ * @typedef {import('didi').LocalsMap} LocalsMap
+ * @typedef {import('didi').ModuleDeclaration} ModuleDeclaration
+ *
+ * @typedef { {
+ * modules?: ModuleDeclaration[];
+ * } & Record } DiagramOptions
+ */
- if (isDefaultFlow(connection, source)) {
- modeling.updateProperties(source, {
- 'default': null
- });
- }
- });
- }
+/**
+ * Bootstrap an injector from a list of modules, instantiating a number of default components
+ *
+ * @param {ModuleDeclaration[]} modules
+ *
+ * @return {Injector} a injector to use to access the components
+ */
+function bootstrap(modules) {
+ var injector = new didi__WEBPACK_IMPORTED_MODULE_0__.Injector(modules);
- (0, _inherits.default)(DeleteSequenceFlowBehavior, _CommandInterceptor.default);
- DeleteSequenceFlowBehavior.$inject = ['eventBus', 'modeling']; // helpers //////////////////////
+ injector.init();
- function isDefaultFlow(connection, source) {
- if (!(0, _ModelUtil.is)(connection, 'bpmn:SequenceFlow')) {
- return false;
- }
+ return injector;
+}
- var sourceBo = (0, _ModelUtil.getBusinessObject)(source),
- sequenceFlow = (0, _ModelUtil.getBusinessObject)(connection);
- return sourceBo.get('default') === sequenceFlow;
- }
+/**
+ * Creates an injector from passed options.
+ *
+ * @param {DiagramOptions} [options]
+ *
+ * @return {Injector}
+ */
+function createInjector(options) {
- },{"../../../util/ModelUtil":240,"diagram-js/lib/command/CommandInterceptor":250,"inherits":438}],192:[function(require,module,exports){
- "use strict";
+ options = options || {};
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = UpdateFlowNodeRefsBehavior;
+ /**
+ * @type { ModuleDeclaration }
+ */
+ var configModule = {
+ 'config': [ 'value', options ]
+ };
- var _inherits = _interopRequireDefault(require("inherits"));
+ var modules = [ configModule, _core__WEBPACK_IMPORTED_MODULE_1__["default"] ].concat(options.modules || []);
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+ return bootstrap(modules);
+}
- var _ModelUtil = require("../../../util/ModelUtil");
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+/**
+ * The main diagram-js entry point that bootstraps the diagram with the given
+ * configuration.
+ *
+ * To register extensions with the diagram, pass them as Array to the constructor.
+ *
+ * @class
+ * @constructor
+ *
+ * @example Creating a plug-in that logs whenever a shape is added to the canvas.
+ *
+ * ```javascript
+ * // plug-in implementation
+ * function MyLoggingPlugin(eventBus) {
+ * eventBus.on('shape.added', function(event) {
+ * console.log('shape ', event.shape, ' was added to the diagram');
+ * });
+ * }
+ *
+ * // export as module
+ * export default {
+ * __init__: [ 'myLoggingPlugin' ],
+ * myLoggingPlugin: [ 'type', MyLoggingPlugin ]
+ * };
+ * ```
+ *
+ * Use the plug-in in a Diagram instance:
+ *
+ * ```javascript
+ * import MyLoggingModule from 'path-to-my-logging-plugin';
+ *
+ * var diagram = new Diagram({
+ * modules: [
+ * MyLoggingModule
+ * ]
+ * });
+ *
+ * diagram.invoke([ 'canvas', function(canvas) {
+ * // add shape to drawing canvas
+ * canvas.addShape({ x: 10, y: 10 });
+ * });
+ *
+ * // 'shape ... was added to the diagram' logged to console
+ * ```
+ *
+ * @param {DiagramOptions} [options]
+ * @param {Injector} [injector] An (optional) injector to bootstrap the diagram with.
+ */
+function Diagram(options, injector) {
- var LOW_PRIORITY = 500,
- HIGH_PRIORITY = 5000;
- /**
- * BPMN specific delete lane behavior
- */
+ this._injector = injector = injector || createInjector(options);
- function UpdateFlowNodeRefsBehavior(eventBus, modeling, translate) {
- _CommandInterceptor.default.call(this, eventBus);
- /**
- * Ok, this is it:
- *
- * We have to update the Lane#flowNodeRefs _and_
- * FlowNode#lanes with every FlowNode move/resize and
- * Lane move/resize.
- *
- * We want to group that stuff to recompute containments
- * as efficient as possible.
- *
- * Yea!
- */
- // the update context
-
-
- var context;
-
- function initContext() {
- context = context || new UpdateContext();
- context.enter();
- return context;
- }
-
- function getContext() {
- if (!context) {
- throw new Error(translate('out of bounds release'));
- }
+ // API
- return context;
- }
+ /**
+ * Resolves a diagram service.
+ *
+ * @template T
+ *
+ * @param {string} name The name of the service to get.
+ * @param {boolean} [strict=true] If false, resolve missing services to null.
+ *
+ * @return {T|null}
+ */
+ this.get = injector.get;
- function releaseContext() {
- if (!context) {
- throw new Error(translate('out of bounds release'));
- }
+ /**
+ * Executes a function with its dependencies injected.
+ *
+ * @template T
+ *
+ * @param {Function} func function to be invoked
+ * @param {InjectionContext} [context] context of the invocation
+ * @param {LocalsMap} [locals] locals provided
+ *
+ * @return {T|null}
+ */
+ this.invoke = injector.invoke;
- var triggerUpdate = context.leave();
+ // init
- if (triggerUpdate) {
- modeling.updateLaneRefs(context.flowNodes, context.lanes);
- context = null;
- }
+ // indicate via event
- return triggerUpdate;
- }
- var laneRefUpdateEvents = ['spaceTool', 'lane.add', 'lane.resize', 'lane.split', 'elements.create', 'elements.delete', 'elements.move', 'shape.create', 'shape.delete', 'shape.move', 'shape.resize']; // listen to a lot of stuff to group lane updates
+ /**
+ * An event indicating that all plug-ins are loaded.
+ *
+ * Use this event to fire other events to interested plug-ins
+ *
+ * @memberOf Diagram
+ *
+ * @event diagram.init
+ *
+ * @example
+ *
+ * ```javascript
+ * eventBus.on('diagram.init', function() {
+ * eventBus.fire('my-custom-event', { foo: 'BAR' });
+ * });
+ * ```
+ *
+ * @type {Object}
+ */
+ this.get('eventBus').fire('diagram.init');
+}
- this.preExecute(laneRefUpdateEvents, HIGH_PRIORITY, function (event) {
- initContext();
- });
- this.postExecuted(laneRefUpdateEvents, LOW_PRIORITY, function (event) {
- releaseContext();
- }); // Mark flow nodes + lanes that need an update
- this.preExecute(['shape.create', 'shape.move', 'shape.delete', 'shape.resize'], function (event) {
- var context = event.context,
- shape = context.shape;
- var updateContext = getContext(); // no need to update labels
+/**
+ * Destroys the diagram
+ */
+Diagram.prototype.destroy = function() {
+ this.get('eventBus').fire('diagram.destroy');
+};
- if (shape.labelTarget) {
- return;
- }
+/**
+ * Clear the diagram, removing all contents.
+ */
+Diagram.prototype.clear = function() {
+ this.get('eventBus').fire('diagram.clear');
+};
- if ((0, _ModelUtil.is)(shape, 'bpmn:Lane')) {
- updateContext.addLane(shape);
- }
- if ((0, _ModelUtil.is)(shape, 'bpmn:FlowNode')) {
- updateContext.addFlowNode(shape);
- }
- });
- }
+/***/ }),
- UpdateFlowNodeRefsBehavior.$inject = ['eventBus', 'modeling', 'translate'];
- (0, _inherits.default)(UpdateFlowNodeRefsBehavior, _CommandInterceptor.default);
+/***/ "../node_modules/diagram-js/lib/command/CommandInterceptor.js":
+/*!********************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/command/CommandInterceptor.js ***!
+ \********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- function UpdateContext() {
- this.flowNodes = [];
- this.lanes = [];
- this.counter = 0;
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ CommandInterceptor)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
- this.addLane = function (lane) {
- this.lanes.push(lane);
- };
- this.addFlowNode = function (flowNode) {
- this.flowNodes.push(flowNode);
- };
+/**
+ * @typedef {import('../core/Types').ElementLike} ElementLike
+ * @typedef {import('../core/EventBus').default} EventBus
+ * @typedef {import('./CommandStack').CommandContext} CommandContext
+ *
+ * @typedef {string|string[]} Events
+ * @typedef { (context: CommandContext) => ElementLike[] | void } HandlerFunction
+ * @typedef { (context: CommandContext) => void } ComposeHandlerFunction
+ */
- this.enter = function () {
- this.counter++;
- };
+var DEFAULT_PRIORITY = 1000;
- this.leave = function () {
- this.counter--;
- return !this.counter;
- };
- }
+/**
+ * A utility that can be used to plug into the command execution for
+ * extension and/or validation.
+ *
+ * @class
+ * @constructor
+ *
+ * @example
+ *
+ * ```javascript
+ * import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
+ *
+ * class CommandLogger extends CommandInterceptor {
+ * constructor(eventBus) {
+ * super(eventBus);
+ *
+ * this.preExecute('shape.create', (event) => {
+ * console.log('commandStack.shape-create.preExecute', event);
+ * });
+ * }
+ * ```
+ *
+ * @param {EventBus} eventBus
+ */
+function CommandInterceptor(eventBus) {
- },{"../../../util/ModelUtil":240,"diagram-js/lib/command/CommandInterceptor":250,"inherits":438}],193:[function(require,module,exports){
- "use strict";
+ /**
+ * @type {EventBus}
+ */
+ this._eventBus = eventBus;
+}
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+CommandInterceptor.$inject = [ 'eventBus' ];
- var _AdaptiveLabelPositioningBehavior = _interopRequireDefault(require("./AdaptiveLabelPositioningBehavior"));
+function unwrapEvent(fn, that) {
+ return function(event) {
+ return fn.call(that || null, event.context, event.command, event);
+ };
+}
- var _AppendBehavior = _interopRequireDefault(require("./AppendBehavior"));
- var _AssociationBehavior = _interopRequireDefault(require("./AssociationBehavior"));
+/**
+ * Intercept a command during one of the phases.
+ *
+ * @param {Events} [events] command(s) to intercept
+ * @param {string} [hook] phase to intercept
+ * @param {number} [priority]
+ * @param {ComposeHandlerFunction|HandlerFunction} handlerFn
+ * @param {boolean} [unwrap] whether the event should be unwrapped
+ * @param {any} [that]
+ */
+CommandInterceptor.prototype.on = function(events, hook, priority, handlerFn, unwrap, that) {
- var _AttachEventBehavior = _interopRequireDefault(require("./AttachEventBehavior"));
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isFunction)(hook) || (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(hook)) {
+ that = unwrap;
+ unwrap = handlerFn;
+ handlerFn = priority;
+ priority = hook;
+ hook = null;
+ }
- var _BoundaryEventBehavior = _interopRequireDefault(require("./BoundaryEventBehavior"));
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isFunction)(priority)) {
+ that = unwrap;
+ unwrap = handlerFn;
+ handlerFn = priority;
+ priority = DEFAULT_PRIORITY;
+ }
- var _RootElementReferenceBehavior = _interopRequireDefault(require("./RootElementReferenceBehavior"));
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isObject)(unwrap)) {
+ that = unwrap;
+ unwrap = false;
+ }
- var _CreateBehavior = _interopRequireDefault(require("./CreateBehavior"));
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isFunction)(handlerFn)) {
+ throw new Error('handlerFn must be a function');
+ }
- var _FixHoverBehavior = _interopRequireDefault(require("./FixHoverBehavior"));
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(events)) {
+ events = [ events ];
+ }
- var _CreateDataObjectBehavior = _interopRequireDefault(require("./CreateDataObjectBehavior"));
+ var eventBus = this._eventBus;
- var _CreateParticipantBehavior = _interopRequireDefault(require("./CreateParticipantBehavior"));
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(events, function(event) {
- var _DataInputAssociationBehavior = _interopRequireDefault(require("./DataInputAssociationBehavior"));
+ // concat commandStack(.event)?(.hook)?
+ var fullEvent = [ 'commandStack', event, hook ].filter(function(e) { return e; }).join('.');
- var _DataStoreBehavior = _interopRequireDefault(require("./DataStoreBehavior"));
+ eventBus.on(fullEvent, priority, unwrap ? unwrapEvent(handlerFn, that) : handlerFn, that);
+ });
+};
- var _DeleteLaneBehavior = _interopRequireDefault(require("./DeleteLaneBehavior"));
+/**
+ * Add a phase of command interceptor.
+ *
+ * @param {Events} [events] command(s) to intercept
+ * @param {number} [priority]
+ * @param {ComposeHandlerFunction|HandlerFunction} handlerFn
+ * @param {boolean} [unwrap] whether the event should be unwrapped
+ * @param {any} [that]
+ */
+CommandInterceptor.prototype.canExecute = createHook('canExecute');
- var _DetachEventBehavior = _interopRequireDefault(require("./DetachEventBehavior"));
+/**
+ * Add a phase of command interceptor.
+ *
+ * @param {Events} [events] command(s) to intercept
+ * @param {number} [priority]
+ * @param {ComposeHandlerFunction|HandlerFunction} handlerFn
+ * @param {boolean} [unwrap] whether the event should be unwrapped
+ * @param {any} [that]
+ */
+CommandInterceptor.prototype.preExecute = createHook('preExecute');
- var _DropOnFlowBehavior = _interopRequireDefault(require("./DropOnFlowBehavior"));
+/**
+ * Add a phase of command interceptor.
+ *
+ * @param {Events} [events] command(s) to intercept
+ * @param {number} [priority]
+ * @param {ComposeHandlerFunction|HandlerFunction} handlerFn
+ * @param {boolean} [unwrap] whether the event should be unwrapped
+ * @param {any} [that]
+ */
+CommandInterceptor.prototype.preExecuted = createHook('preExecuted');
- var _EventBasedGatewayBehavior = _interopRequireDefault(require("./EventBasedGatewayBehavior"));
+/**
+ * Add a phase of command interceptor.
+ *
+ * @param {Events} [events] command(s) to intercept
+ * @param {number} [priority]
+ * @param {ComposeHandlerFunction|HandlerFunction} handlerFn
+ * @param {boolean} [unwrap] whether the event should be unwrapped
+ * @param {any} [that]
+ */
+CommandInterceptor.prototype.execute = createHook('execute');
- var _GroupBehavior = _interopRequireDefault(require("./GroupBehavior"));
+/**
+ * Add a phase of command interceptor.
+ *
+ * @param {Events} [events] command(s) to intercept
+ * @param {number} [priority]
+ * @param {ComposeHandlerFunction|HandlerFunction} handlerFn
+ * @param {boolean} [unwrap] whether the event should be unwrapped
+ * @param {any} [that]
+ */
+CommandInterceptor.prototype.executed = createHook('executed');
- var _ImportDockingFix = _interopRequireDefault(require("./ImportDockingFix"));
+/**
+ * Add a phase of command interceptor.
+ *
+ * @param {Events} [events] command(s) to intercept
+ * @param {number} [priority]
+ * @param {ComposeHandlerFunction|HandlerFunction} handlerFn
+ * @param {boolean} [unwrap] whether the event should be unwrapped
+ * @param {any} [that]
+ */
+CommandInterceptor.prototype.postExecute = createHook('postExecute');
- var _IsHorizontalFix = _interopRequireDefault(require("./IsHorizontalFix"));
+/**
+ * Add a phase of command interceptor.
+ *
+ * @param {Events} [events] command(s) to intercept
+ * @param {number} [priority]
+ * @param {ComposeHandlerFunction|HandlerFunction} handlerFn
+ * @param {boolean} [unwrap] whether the event should be unwrapped
+ * @param {any} [that]
+ */
+CommandInterceptor.prototype.postExecuted = createHook('postExecuted');
- var _LabelBehavior = _interopRequireDefault(require("./LabelBehavior"));
+/**
+ * Add a phase of command interceptor.
+ *
+ * @param {Events} [events] command(s) to intercept
+ * @param {number} [priority]
+ * @param {ComposeHandlerFunction|HandlerFunction} handlerFn
+ * @param {boolean} [unwrap] whether the event should be unwrapped
+ * @param {any} [that]
+ */
+CommandInterceptor.prototype.revert = createHook('revert');
- var _ModelingFeedback = _interopRequireDefault(require("./ModelingFeedback"));
+/**
+ * Add a phase of command interceptor.
+ *
+ * @param {Events} [events] command(s) to intercept
+ * @param {number} [priority]
+ * @param {ComposeHandlerFunction|HandlerFunction} handlerFn
+ * @param {boolean} [unwrap] whether the event should be unwrapped
+ * @param {any} [that]
+ */
+CommandInterceptor.prototype.reverted = createHook('reverted');
- var _ReplaceConnectionBehavior = _interopRequireDefault(require("./ReplaceConnectionBehavior"));
+/*
+ * Add prototype methods for each phase of command execution (e.g. execute,
+ * revert).
+ *
+ * @param {string} hook
+ *
+ * @return { (
+ * events?: Events,
+ * priority?: number,
+ * handlerFn: ComposeHandlerFunction|HandlerFunction,
+ * unwrap?: boolean
+ * ) => any }
+ */
+function createHook(hook) {
- var _RemoveParticipantBehavior = _interopRequireDefault(require("./RemoveParticipantBehavior"));
+ /**
+ * @this {CommandInterceptor}
+ *
+ * @param {Events} [events]
+ * @param {number} [priority]
+ * @param {ComposeHandlerFunction|HandlerFunction} handlerFn
+ * @param {boolean} [unwrap]
+ * @param {any} [that]
+ */
+ const hookFn = function(events, priority, handlerFn, unwrap, that) {
- var _ReplaceElementBehaviour = _interopRequireDefault(require("./ReplaceElementBehaviour"));
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isFunction)(events) || (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(events)) {
+ that = unwrap;
+ unwrap = handlerFn;
+ handlerFn = priority;
+ priority = events;
+ events = null;
+ }
- var _ResizeBehavior = _interopRequireDefault(require("./ResizeBehavior"));
+ this.on(events, hook, priority, handlerFn, unwrap, that);
+ };
- var _ResizeLaneBehavior = _interopRequireDefault(require("./ResizeLaneBehavior"));
+ return hookFn;
+}
- var _RemoveElementBehavior = _interopRequireDefault(require("./RemoveElementBehavior"));
- var _SpaceToolBehavior = _interopRequireDefault(require("./SpaceToolBehavior"));
+/***/ }),
- var _SubProcessStartEventBehavior = _interopRequireDefault(require("./SubProcessStartEventBehavior"));
+/***/ "../node_modules/diagram-js/lib/command/CommandStack.js":
+/*!**************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/command/CommandStack.js ***!
+ \**************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var _ToggleElementCollapseBehaviour = _interopRequireDefault(require("./ToggleElementCollapseBehaviour"));
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ CommandStack)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
- var _UnclaimIdBehavior = _interopRequireDefault(require("./UnclaimIdBehavior"));
- var _UpdateFlowNodeRefsBehavior = _interopRequireDefault(require("./UpdateFlowNodeRefsBehavior"));
+/**
+ * @typedef {import('didi').Injector} Injector
+ *
+ * @typedef {import('../core/Types').ElementLike} ElementLike
+ *
+ * @typedef {import('../core/EventBus').default} EventBus
+ * @typedef {import('./CommandHandler').default} CommandHandler
+ *
+ * @typedef { any } CommandContext
+ * @typedef { {
+ * new (...args: any[]) : CommandHandler
+ * } } CommandHandlerConstructor
+ * @typedef { {
+ * [key: string]: CommandHandler;
+ * } } CommandHandlerMap
+ * @typedef { {
+ * command: string;
+ * context: any;
+ * id?: any;
+ * } } CommandStackAction
+ * @typedef { {
+ * actions: CommandStackAction[];
+ * dirty: ElementLike[];
+ * trigger: 'execute' | 'undo' | 'redo' | 'clear' | null;
+ * atomic?: boolean;
+ * } } CurrentExecution
+ */
- var _UnsetDefaultFlowBehavior = _interopRequireDefault(require("./UnsetDefaultFlowBehavior"));
+/**
+ * A service that offers un- and redoable execution of commands.
+ *
+ * The command stack is responsible for executing modeling actions
+ * in a un- and redoable manner. To do this it delegates the actual
+ * command execution to {@link CommandHandler}s.
+ *
+ * Command handlers provide {@link CommandHandler#execute(ctx)} and
+ * {@link CommandHandler#revert(ctx)} methods to un- and redo a command
+ * identified by a command context.
+ *
+ *
+ * ## Life-Cycle events
+ *
+ * In the process the command stack fires a number of life-cycle events
+ * that other components to participate in the command execution.
+ *
+ * * preExecute
+ * * preExecuted
+ * * execute
+ * * executed
+ * * postExecute
+ * * postExecuted
+ * * revert
+ * * reverted
+ *
+ * A special event is used for validating, whether a command can be
+ * performed prior to its execution.
+ *
+ * * canExecute
+ *
+ * Each of the events is fired as `commandStack.{eventName}` and
+ * `commandStack.{commandName}.{eventName}`, respectively. This gives
+ * components fine grained control on where to hook into.
+ *
+ * The event object fired transports `command`, the name of the
+ * command and `context`, the command context.
+ *
+ *
+ * ## Creating Command Handlers
+ *
+ * Command handlers should provide the {@link CommandHandler#execute(ctx)}
+ * and {@link CommandHandler#revert(ctx)} methods to implement
+ * redoing and undoing of a command.
+ *
+ * A command handler _must_ ensure undo is performed properly in order
+ * not to break the undo chain. It must also return the shapes that
+ * got changed during the `execute` and `revert` operations.
+ *
+ * Command handlers may execute other modeling operations (and thus
+ * commands) in their `preExecute(d)` and `postExecute(d)` phases. The command
+ * stack will properly group all commands together into a logical unit
+ * that may be re- and undone atomically.
+ *
+ * Command handlers must not execute other commands from within their
+ * core implementation (`execute`, `revert`).
+ *
+ *
+ * ## Change Tracking
+ *
+ * During the execution of the CommandStack it will keep track of all
+ * elements that have been touched during the command's execution.
+ *
+ * At the end of the CommandStack execution it will notify interested
+ * components via an 'elements.changed' event with all the dirty
+ * elements.
+ *
+ * The event can be picked up by components that are interested in the fact
+ * that elements have been changed. One use case for this is updating
+ * their graphical representation after moving / resizing or deletion.
+ *
+ * @see CommandHandler
+ *
+ * @param {EventBus} eventBus
+ * @param {Injector} injector
+ */
+function CommandStack(eventBus, injector) {
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ /**
+ * A map of all registered command handlers.
+ *
+ * @type {CommandHandlerMap}
+ */
+ this._handlerMap = {};
- var _default = {
- __init__: ['adaptiveLabelPositioningBehavior', 'appendBehavior', 'associationBehavior', 'attachEventBehavior', 'boundaryEventBehavior', 'rootElementReferenceBehavior', 'createBehavior', 'fixHoverBehavior', 'createDataObjectBehavior', 'createParticipantBehavior', 'dataStoreBehavior', 'dataInputAssociationBehavior', 'deleteLaneBehavior', 'detachEventBehavior', 'dropOnFlowBehavior', 'eventBasedGatewayBehavior', 'groupBehavior', 'importDockingFix', 'isHorizontalFix', 'labelBehavior', 'modelingFeedback', 'removeElementBehavior', 'removeParticipantBehavior', 'replaceConnectionBehavior', 'replaceElementBehaviour', 'resizeBehavior', 'resizeLaneBehavior', 'toggleElementCollapseBehaviour', 'spaceToolBehavior', 'subProcessStartEventBehavior', 'unclaimIdBehavior', 'unsetDefaultFlowBehavior', 'updateFlowNodeRefsBehavior'],
- adaptiveLabelPositioningBehavior: ['type', _AdaptiveLabelPositioningBehavior.default],
- appendBehavior: ['type', _AppendBehavior.default],
- associationBehavior: ['type', _AssociationBehavior.default],
- attachEventBehavior: ['type', _AttachEventBehavior.default],
- boundaryEventBehavior: ['type', _BoundaryEventBehavior.default],
- rootElementReferenceBehavior: ['type', _RootElementReferenceBehavior.default],
- createBehavior: ['type', _CreateBehavior.default],
- fixHoverBehavior: ['type', _FixHoverBehavior.default],
- createDataObjectBehavior: ['type', _CreateDataObjectBehavior.default],
- createParticipantBehavior: ['type', _CreateParticipantBehavior.default],
- dataInputAssociationBehavior: ['type', _DataInputAssociationBehavior.default],
- dataStoreBehavior: ['type', _DataStoreBehavior.default],
- deleteLaneBehavior: ['type', _DeleteLaneBehavior.default],
- detachEventBehavior: ['type', _DetachEventBehavior.default],
- dropOnFlowBehavior: ['type', _DropOnFlowBehavior.default],
- eventBasedGatewayBehavior: ['type', _EventBasedGatewayBehavior.default],
- groupBehavior: ['type', _GroupBehavior.default],
- importDockingFix: ['type', _ImportDockingFix.default],
- isHorizontalFix: ['type', _IsHorizontalFix.default],
- labelBehavior: ['type', _LabelBehavior.default],
- modelingFeedback: ['type', _ModelingFeedback.default],
- replaceConnectionBehavior: ['type', _ReplaceConnectionBehavior.default],
- removeParticipantBehavior: ['type', _RemoveParticipantBehavior.default],
- replaceElementBehaviour: ['type', _ReplaceElementBehaviour.default],
- resizeBehavior: ['type', _ResizeBehavior.default],
- resizeLaneBehavior: ['type', _ResizeLaneBehavior.default],
- removeElementBehavior: ['type', _RemoveElementBehavior.default],
- toggleElementCollapseBehaviour: ['type', _ToggleElementCollapseBehaviour.default],
- spaceToolBehavior: ['type', _SpaceToolBehavior.default],
- subProcessStartEventBehavior: ['type', _SubProcessStartEventBehavior.default],
- unclaimIdBehavior: ['type', _UnclaimIdBehavior.default],
- updateFlowNodeRefsBehavior: ['type', _UpdateFlowNodeRefsBehavior.default],
- unsetDefaultFlowBehavior: ['type', _UnsetDefaultFlowBehavior.default]
- };
- exports.default = _default;
+ /**
+ * A stack containing all re/undoable actions on the diagram
+ *
+ * @type {CommandStackAction[]}
+ */
+ this._stack = [];
- },{"./AdaptiveLabelPositioningBehavior":160,"./AppendBehavior":161,"./AssociationBehavior":162,"./AttachEventBehavior":163,"./BoundaryEventBehavior":164,"./CreateBehavior":165,"./CreateDataObjectBehavior":166,"./CreateParticipantBehavior":167,"./DataInputAssociationBehavior":168,"./DataStoreBehavior":169,"./DeleteLaneBehavior":170,"./DetachEventBehavior":171,"./DropOnFlowBehavior":172,"./EventBasedGatewayBehavior":173,"./FixHoverBehavior":174,"./GroupBehavior":175,"./ImportDockingFix":176,"./IsHorizontalFix":177,"./LabelBehavior":178,"./ModelingFeedback":179,"./RemoveElementBehavior":180,"./RemoveParticipantBehavior":181,"./ReplaceConnectionBehavior":182,"./ReplaceElementBehaviour":183,"./ResizeBehavior":184,"./ResizeLaneBehavior":185,"./RootElementReferenceBehavior":186,"./SpaceToolBehavior":187,"./SubProcessStartEventBehavior":188,"./ToggleElementCollapseBehaviour":189,"./UnclaimIdBehavior":190,"./UnsetDefaultFlowBehavior":191,"./UpdateFlowNodeRefsBehavior":192}],194:[function(require,module,exports){
- "use strict";
+ /**
+ * The current index on the stack
+ *
+ * @type {number}
+ */
+ this._stackIdx = -1;
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.createCategoryValue = createCategoryValue;
+ /**
+ * Current active commandStack execution
+ *
+ * @type {CurrentExecution}
+ */
+ this._currentExecution = {
+ actions: [],
+ dirty: [],
+ trigger: null
+ };
+
+ /**
+ * @type {Injector}
+ */
+ this._injector = injector;
- var _Collections = require("diagram-js/lib/util/Collections");
+ /**
+ * @type EventBus
+ */
+ this._eventBus = eventBus;
- var _ModelUtil = require("../../../../util/ModelUtil");
+ /**
+ * @type { number }
+ */
+ this._uid = 1;
- /**
- * Creates a new bpmn:CategoryValue inside a new bpmn:Category
- *
- * @param {ModdleElement} definitions
- * @param {BpmnFactory} bpmnFactory
- *
- * @return {ModdleElement} categoryValue.
- */
- function createCategoryValue(definitions, bpmnFactory) {
- var categoryValue = bpmnFactory.create('bpmn:CategoryValue'),
- category = bpmnFactory.create('bpmn:Category', {
- categoryValue: [categoryValue]
- }); // add to correct place
+ eventBus.on([
+ 'diagram.destroy',
+ 'diagram.clear'
+ ], function() {
+ this.clear(false);
+ }, this);
+}
- (0, _Collections.add)(definitions.get('rootElements'), category);
- (0, _ModelUtil.getBusinessObject)(category).$parent = definitions;
- (0, _ModelUtil.getBusinessObject)(categoryValue).$parent = category;
- return categoryValue;
- }
+CommandStack.$inject = [ 'eventBus', 'injector' ];
- },{"../../../../util/ModelUtil":240,"diagram-js/lib/util/Collections":418}],195:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.vectorLength = vectorLength;
- exports.getAngle = getAngle;
- exports.rotateVector = rotateVector;
- exports.perpendicularFoot = perpendicularFoot;
- exports.getDistancePointLine = getDistancePointLine;
- exports.getDistancePointPoint = getDistancePointPoint;
+/**
+ * Execute a command.
+ *
+ * @param {string} command The command to execute.
+ * @param {CommandContext} context The context with which to execute the command.
+ */
+CommandStack.prototype.execute = function(command, context) {
+ if (!command) {
+ throw new Error('command required');
+ }
- /**
- * Returns the length of a vector
- *
- * @param {Vector}
- * @return {Float}
- */
- function vectorLength(v) {
- return Math.sqrt(Math.pow(v.x, 2) + Math.pow(v.y, 2));
- }
- /**
- * Calculates the angle between a line a the yAxis
- *
- * @param {Array}
- * @return {Float}
- */
+ this._currentExecution.trigger = 'execute';
+ const action = { command: command, context: context };
- function getAngle(line) {
- // return value is between 0, 180 and -180, -0
- // @janstuemmel: maybe replace return a/b with b/a
- return Math.atan((line[1].y - line[0].y) / (line[1].x - line[0].x));
- }
- /**
- * Rotates a vector by a given angle
- *
- * @param {Vector}
- * @param {Float} Angle in radians
- * @return {Vector}
- */
+ this._pushAction(action);
+ this._internalExecute(action);
+ this._popAction();
+};
- function rotateVector(vector, angle) {
- return !angle ? vector : {
- x: Math.cos(angle) * vector.x - Math.sin(angle) * vector.y,
- y: Math.sin(angle) * vector.x + Math.cos(angle) * vector.y
- };
- }
- /**
- * Solves a 2D equation system
- * a + r*b = c, where a,b,c are 2D vectors
- *
- * @param {Vector}
- * @param {Vector}
- * @param {Vector}
- * @return {Float}
- */
+/**
+ * Check whether a command can be executed.
+ *
+ * Implementors may hook into the mechanism on two ways:
+ *
+ * * in event listeners:
+ *
+ * Users may prevent the execution via an event listener.
+ * It must prevent the default action for `commandStack.(.)canExecute` events.
+ *
+ * * in command handlers:
+ *
+ * If the method {@link CommandHandler#canExecute} is implemented in a handler
+ * it will be called to figure out whether the execution is allowed.
+ *
+ * @param {string} command The command to execute.
+ * @param {CommandContext} context The context with which to execute the command.
+ *
+ * @return {boolean} Whether the command can be executed with the given context.
+ */
+CommandStack.prototype.canExecute = function(command, context) {
+ const action = { command: command, context: context };
- function solveLambaSystem(a, b, c) {
- // the 2d system
- var system = [{
- n: a[0] - c[0],
- lambda: b[0]
- }, {
- n: a[1] - c[1],
- lambda: b[1]
- }]; // solve
+ const handler = this._getHandler(command);
- var n = system[0].n * b[0] + system[1].n * b[1],
- l = system[0].lambda * b[0] + system[1].lambda * b[1];
- return -n / l;
- }
- /**
- * Position of perpendicular foot
- *
- * @param {Point}
- * @param [ {Point}, {Point} ] line defined through two points
- * @return {Point} the perpendicular foot position
- */
+ let result = this._fire(command, 'canExecute', action);
+ // handler#canExecute will only be called if no listener
+ // decided on a result already
+ if (result === undefined) {
+ if (!handler) {
+ return false;
+ }
- function perpendicularFoot(point, line) {
- var a = line[0],
- b = line[1]; // relative position of b from a
+ if (handler.canExecute) {
+ result = handler.canExecute(context);
+ }
+ }
- var bd = {
- x: b.x - a.x,
- y: b.y - a.y
- }; // solve equation system to the parametrized vectors param real value
+ return result;
+};
- var r = solveLambaSystem([a.x, a.y], [bd.x, bd.y], [point.x, point.y]);
- return {
- x: a.x + r * bd.x,
- y: a.y + r * bd.y
- };
- }
- /**
- * Calculates the distance between a point and a line
- *
- * @param {Point}
- * @param [ {Point}, {Point} ] line defined through two points
- * @return {Float} distance
- */
+/**
+ * Clear the command stack, erasing all undo / redo history.
+ *
+ * @param {boolean} [emit=true] Whether to fire an event. Defaults to `true`.
+ */
+CommandStack.prototype.clear = function(emit) {
+ this._stack.length = 0;
+ this._stackIdx = -1;
- function getDistancePointLine(point, line) {
- var pfPoint = perpendicularFoot(point, line); // distance vector
+ if (emit !== false) {
+ this._fire('changed', { trigger: 'clear' });
+ }
+};
- var connectionVector = {
- x: pfPoint.x - point.x,
- y: pfPoint.y - point.y
- };
- return vectorLength(connectionVector);
- }
- /**
- * Calculates the distance between two points
- *
- * @param {Point}
- * @param {Point}
- * @return {Float} distance
- */
+/**
+ * Undo last command(s)
+ */
+CommandStack.prototype.undo = function() {
+ let action = this._getUndoAction(),
+ next;
- function getDistancePointPoint(point1, point2) {
- return vectorLength({
- x: point1.x - point2.x,
- y: point1.y - point2.y
- });
- }
+ if (action) {
+ this._currentExecution.trigger = 'undo';
- },{}],196:[function(require,module,exports){
- "use strict";
+ this._pushAction(action);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.findNewLabelLineStartIndex = findNewLabelLineStartIndex;
- exports.getLabelAdjustment = getLabelAdjustment;
+ while (action) {
+ this._internalUndo(action);
+ next = this._getUndoAction();
- var _GeometricUtil = require("./GeometricUtil");
+ if (!next || next.id !== action.id) {
+ break;
+ }
- var _LineAttachmentUtil = require("./LineAttachmentUtil");
+ action = next;
+ }
- var _LayoutUtil = require("diagram-js/lib/layout/LayoutUtil");
+ this._popAction();
+ }
+};
- function findNewLabelLineStartIndex(oldWaypoints, newWaypoints, attachment, hints) {
- var index = attachment.segmentIndex;
- var offset = newWaypoints.length - oldWaypoints.length; // segmentMove happened
- if (hints.segmentMove) {
- var oldSegmentStartIndex = hints.segmentMove.segmentStartIndex,
- newSegmentStartIndex = hints.segmentMove.newSegmentStartIndex; // if label was on moved segment return new segment index
+/**
+ * Redo last command(s)
+ */
+CommandStack.prototype.redo = function() {
+ let action = this._getRedoAction(),
+ next;
- if (index === oldSegmentStartIndex) {
- return newSegmentStartIndex;
- } // label is after new segment index
+ if (action) {
+ this._currentExecution.trigger = 'redo';
+ this._pushAction(action);
- if (index >= newSegmentStartIndex) {
- return index + offset < newSegmentStartIndex ? newSegmentStartIndex : index + offset;
- } // if label is before new segment index
+ while (action) {
+ this._internalExecute(action, true);
+ next = this._getRedoAction();
+ if (!next || next.id !== action.id) {
+ break;
+ }
- return index;
- } // bendpointMove happened
+ action = next;
+ }
+ this._popAction();
+ }
+};
- if (hints.bendpointMove) {
- var insert = hints.bendpointMove.insert,
- bendpointIndex = hints.bendpointMove.bendpointIndex,
- newIndex; // waypoints length didnt change
- if (offset === 0) {
- return index;
- } // label behind new/removed bendpoint
+/**
+ * Register a handler instance with the command stack.
+ *
+ * @param {string} command Command to be executed.
+ * @param {CommandHandler} handler Handler to execute the command.
+ */
+CommandStack.prototype.register = function(command, handler) {
+ this._setHandler(command, handler);
+};
- if (index >= bendpointIndex) {
- newIndex = insert ? index + 1 : index - 1;
- } // label before new/removed bendpoint
+/**
+ * Register a handler type with the command stack by instantiating it and
+ * injecting its dependencies.
+ *
+ * @param {string} command Command to be executed.
+ * @param {CommandHandlerConstructor} handlerCls Constructor to instantiate a {@link CommandHandler}.
+ */
+CommandStack.prototype.registerHandler = function(command, handlerCls) {
+ if (!command || !handlerCls) {
+ throw new Error('command and handlerCls must be defined');
+ }
- if (index < bendpointIndex) {
- newIndex = index; // decide label should take right or left segment
+ const handler = this._injector.instantiate(handlerCls);
+ this.register(command, handler);
+};
- if (insert && attachment.type !== 'bendpoint' && bendpointIndex - 1 === index) {
- var rel = relativePositionMidWaypoint(newWaypoints, bendpointIndex);
+/**
+ * @return {boolean}
+ */
+CommandStack.prototype.canUndo = function() {
+ return !!this._getUndoAction();
+};
- if (rel < attachment.relativeLocation) {
- newIndex++;
- }
- }
- }
+/**
+ * @return {boolean}
+ */
+CommandStack.prototype.canRedo = function() {
+ return !!this._getRedoAction();
+};
- return newIndex;
- } // start/end changed
+// stack access //////////////////////
+CommandStack.prototype._getRedoAction = function() {
+ return this._stack[this._stackIdx + 1];
+};
- if (offset === 0) {
- return index;
- }
- if (hints.connectionStart) {
- return index === 0 ? 0 : null;
- }
+CommandStack.prototype._getUndoAction = function() {
+ return this._stack[this._stackIdx];
+};
- if (hints.connectionEnd) {
- return index === oldWaypoints.length - 2 ? newWaypoints.length - 2 : null;
- } // if nothing fits, return null
+// internal functionality //////////////////////
- return null;
- }
- /**
- * Calculate the required adjustment (move delta) for the given label
- * after the connection waypoints got updated.
- *
- * @param {djs.model.Label} label
- * @param {Array} newWaypoints
- * @param {Array} oldWaypoints
- * @param {Object} hints
- *
- * @return {Point} delta
- */
+CommandStack.prototype._internalUndo = function(action) {
+ const command = action.command,
+ context = action.context;
+ const handler = this._getHandler(command);
- function getLabelAdjustment(label, newWaypoints, oldWaypoints, hints) {
- var x = 0,
- y = 0;
- var labelPosition = getLabelMid(label); // get closest attachment
+ // guard against illegal nested command stack invocations
+ this._atomicDo(() => {
+ this._fire(command, 'revert', action);
- var attachment = (0, _LineAttachmentUtil.getAttachment)(labelPosition, oldWaypoints),
- oldLabelLineIndex = attachment.segmentIndex,
- newLabelLineIndex = findNewLabelLineStartIndex(oldWaypoints, newWaypoints, attachment, hints);
+ if (handler.revert) {
+ this._markDirty(handler.revert(context));
+ }
- if (newLabelLineIndex === null) {
- return {
- x: x,
- y: y
- };
- } // should never happen
- // TODO(@janstuemmel): throw an error here when connectionSegmentMove is refactored
+ this._revertedAction(action);
+ this._fire(command, 'reverted', action);
+ });
+};
- if (newLabelLineIndex < 0 || newLabelLineIndex > newWaypoints.length - 2) {
- return {
- x: x,
- y: y
- };
- }
- var oldLabelLine = getLine(oldWaypoints, oldLabelLineIndex),
- newLabelLine = getLine(newWaypoints, newLabelLineIndex),
- oldFoot = attachment.position;
- var relativeFootPosition = getRelativeFootPosition(oldLabelLine, oldFoot),
- angleDelta = getAngleDelta(oldLabelLine, newLabelLine); // special rule if label on bendpoint
+CommandStack.prototype._fire = function(command, qualifier, event) {
+ if (arguments.length < 3) {
+ event = qualifier;
+ qualifier = null;
+ }
- if (attachment.type === 'bendpoint') {
- var offset = newWaypoints.length - oldWaypoints.length,
- oldBendpointIndex = attachment.bendpointIndex,
- oldBendpoint = oldWaypoints[oldBendpointIndex]; // bendpoint position hasn't changed, return same position
+ const names = qualifier ? [ command + '.' + qualifier, qualifier ] : [ command ];
+ let result;
- if (newWaypoints.indexOf(oldBendpoint) !== -1) {
- return {
- x: x,
- y: y
- };
- } // new bendpoint and old bendpoint have same index, then just return the offset
+ event = this._eventBus.createEvent(event);
+ for (const name of names) {
+ result = this._eventBus.fire('commandStack.' + name, event);
- if (offset === 0) {
- var newBendpoint = newWaypoints[oldBendpointIndex];
- return {
- x: newBendpoint.x - attachment.position.x,
- y: newBendpoint.y - attachment.position.y
- };
- } // if bendpoints get removed
+ if (event.cancelBubble) {
+ break;
+ }
+ }
+ return result;
+};
- if (offset < 0 && oldBendpointIndex !== 0 && oldBendpointIndex < oldWaypoints.length - 1) {
- relativeFootPosition = relativePositionMidWaypoint(oldWaypoints, oldBendpointIndex);
- }
- }
+CommandStack.prototype._createId = function() {
+ return this._uid++;
+};
- var newFoot = {
- x: (newLabelLine[1].x - newLabelLine[0].x) * relativeFootPosition + newLabelLine[0].x,
- y: (newLabelLine[1].y - newLabelLine[0].y) * relativeFootPosition + newLabelLine[0].y
- }; // the rotated vector to label
+CommandStack.prototype._atomicDo = function(fn) {
- var newLabelVector = (0, _GeometricUtil.rotateVector)({
- x: labelPosition.x - oldFoot.x,
- y: labelPosition.y - oldFoot.y
- }, angleDelta); // the new relative position
+ const execution = this._currentExecution;
- x = newFoot.x + newLabelVector.x - labelPosition.x;
- y = newFoot.y + newLabelVector.y - labelPosition.y;
- return (0, _LayoutUtil.roundPoint)({
- x: x,
- y: y
- });
- } // HELPERS //////////////////////
+ execution.atomic = true;
+ try {
+ fn();
+ } finally {
+ execution.atomic = false;
+ }
+};
- function relativePositionMidWaypoint(waypoints, idx) {
- var distanceSegment1 = (0, _GeometricUtil.getDistancePointPoint)(waypoints[idx - 1], waypoints[idx]),
- distanceSegment2 = (0, _GeometricUtil.getDistancePointPoint)(waypoints[idx], waypoints[idx + 1]);
- var relativePosition = distanceSegment1 / (distanceSegment1 + distanceSegment2);
- return relativePosition;
- }
+CommandStack.prototype._internalExecute = function(action, redo) {
+ const command = action.command,
+ context = action.context;
- function getLabelMid(label) {
- return {
- x: label.x + label.width / 2,
- y: label.y + label.height / 2
- };
- }
+ const handler = this._getHandler(command);
- function getAngleDelta(l1, l2) {
- var a1 = (0, _GeometricUtil.getAngle)(l1),
- a2 = (0, _GeometricUtil.getAngle)(l2);
- return a2 - a1;
- }
+ if (!handler) {
+ throw new Error('no command handler registered for <' + command + '>');
+ }
- function getLine(waypoints, idx) {
- return [waypoints[idx], waypoints[idx + 1]];
- }
+ this._pushAction(action);
- function getRelativeFootPosition(line, foot) {
- var length = (0, _GeometricUtil.getDistancePointPoint)(line[0], line[1]),
- lengthToFoot = (0, _GeometricUtil.getDistancePointPoint)(line[0], foot);
- return length === 0 ? 0 : lengthToFoot / length;
- }
+ if (!redo) {
+ this._fire(command, 'preExecute', action);
- },{"./GeometricUtil":195,"./LineAttachmentUtil":197,"diagram-js/lib/layout/LayoutUtil":405}],197:[function(require,module,exports){
- "use strict";
+ if (handler.preExecute) {
+ handler.preExecute(context);
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.getAttachment = getAttachment;
- var sqrt = Math.sqrt,
- min = Math.min,
- max = Math.max,
- abs = Math.abs;
- /**
- * Calculate the square (power to two) of a number.
- *
- * @param {number} n
- *
- * @return {number}
- */
+ this._fire(command, 'preExecuted', action);
+ }
- function sq(n) {
- return Math.pow(n, 2);
- }
- /**
- * Get distance between two points.
- *
- * @param {Point} p1
- * @param {Point} p2
- *
- * @return {number}
- */
+ // guard against illegal nested command stack invocations
+ this._atomicDo(() => {
+ this._fire(command, 'execute', action);
- function getDistance(p1, p2) {
- return sqrt(sq(p1.x - p2.x) + sq(p1.y - p2.y));
- }
- /**
- * Return the attachment of the given point on the specified line.
- *
- * The attachment is either a bendpoint (attached to the given point)
- * or segment (attached to a location on a line segment) attachment:
- *
- * ```javascript
- * var pointAttachment = {
- * type: 'bendpoint',
- * bendpointIndex: 3,
- * position: { x: 10, y: 10 } // the attach point on the line
- * };
- *
- * var segmentAttachment = {
- * type: 'segment',
- * segmentIndex: 2,
- * relativeLocation: 0.31, // attach point location between 0 (at start) and 1 (at end)
- * position: { x: 10, y: 10 } // the attach point on the line
- * };
- * ```
- *
- * @param {Point} point
- * @param {Array} line
- *
- * @return {Object} attachment
- */
+ if (handler.execute) {
+ // actual execute + mark return results as dirty
+ this._markDirty(handler.execute(context));
+ }
- function getAttachment(point, line) {
- var idx = 0,
- segmentStart,
- segmentEnd,
- segmentStartDistance,
- segmentEndDistance,
- attachmentPosition,
- minDistance,
- intersections,
- attachment,
- attachmentDistance,
- closestAttachmentDistance,
- closestAttachment;
-
- for (idx = 0; idx < line.length - 1; idx++) {
- segmentStart = line[idx];
- segmentEnd = line[idx + 1];
-
- if (pointsEqual(segmentStart, segmentEnd)) {
- intersections = [segmentStart];
- } else {
- segmentStartDistance = getDistance(point, segmentStart);
- segmentEndDistance = getDistance(point, segmentEnd);
- minDistance = min(segmentStartDistance, segmentEndDistance);
- intersections = getCircleSegmentIntersections(segmentStart, segmentEnd, point, minDistance);
- }
+ // log to stack
+ this._executedAction(action, redo);
- if (intersections.length < 1) {
- throw new Error('expected between [1, 2] circle -> line intersections');
- } // one intersection -> bendpoint attachment
-
-
- if (intersections.length === 1) {
- attachment = {
- type: 'bendpoint',
- position: intersections[0],
- segmentIndex: idx,
- bendpointIndex: pointsEqual(segmentStart, intersections[0]) ? idx : idx + 1
- };
- } // two intersections -> segment attachment
-
-
- if (intersections.length === 2) {
- attachmentPosition = mid(intersections[0], intersections[1]);
- attachment = {
- type: 'segment',
- position: attachmentPosition,
- segmentIndex: idx,
- relativeLocation: getDistance(segmentStart, attachmentPosition) / getDistance(segmentStart, segmentEnd)
- };
- }
+ this._fire(command, 'executed', action);
+ });
- attachmentDistance = getDistance(attachment.position, point);
+ if (!redo) {
+ this._fire(command, 'postExecute', action);
- if (!closestAttachment || closestAttachmentDistance > attachmentDistance) {
- closestAttachment = attachment;
- closestAttachmentDistance = attachmentDistance;
- }
- }
+ if (handler.postExecute) {
+ handler.postExecute(context);
+ }
- return closestAttachment;
- }
- /**
- * Gets the intersection between a circle and a line segment.
- *
- * @param {Point} s1 segment start
- * @param {Point} s2 segment end
- * @param {Point} cc circle center
- * @param {number} cr circle radius
- *
- * @return {Array} intersections
- */
+ this._fire(command, 'postExecuted', action);
+ }
+ this._popAction();
+};
- function getCircleSegmentIntersections(s1, s2, cc, cr) {
- var baX = s2.x - s1.x;
- var baY = s2.y - s1.y;
- var caX = cc.x - s1.x;
- var caY = cc.y - s1.y;
- var a = baX * baX + baY * baY;
- var bBy2 = baX * caX + baY * caY;
- var c = caX * caX + caY * caY - cr * cr;
- var pBy2 = bBy2 / a;
- var q = c / a;
- var disc = pBy2 * pBy2 - q; // check against negative value to work around
- // negative, very close to zero results (-4e-15)
- // being produced in some environments
- if (disc < 0 && disc > -0.000001) {
- disc = 0;
- }
+CommandStack.prototype._pushAction = function(action) {
- if (disc < 0) {
- return [];
- } // if disc == 0 ... dealt with later
+ const execution = this._currentExecution,
+ actions = execution.actions;
+ const baseAction = actions[0];
- var tmpSqrt = sqrt(disc);
- var abScalingFactor1 = -pBy2 + tmpSqrt;
- var abScalingFactor2 = -pBy2 - tmpSqrt;
- var i1 = {
- x: s1.x - baX * abScalingFactor1,
- y: s1.y - baY * abScalingFactor1
- };
+ if (execution.atomic) {
+ throw new Error('illegal invocation in or phase (action: ' + action.command + ')');
+ }
- if (disc === 0) {
- // abScalingFactor1 == abScalingFactor2
- return [i1];
- }
+ if (!action.id) {
+ action.id = (baseAction && baseAction.id) || this._createId();
+ }
- var i2 = {
- x: s1.x - baX * abScalingFactor2,
- y: s1.y - baY * abScalingFactor2
- }; // return only points on line segment
+ actions.push(action);
+};
- return [i1, i2].filter(function (p) {
- return isPointInSegment(p, s1, s2);
- });
- }
- function isPointInSegment(p, segmentStart, segmentEnd) {
- return fenced(p.x, segmentStart.x, segmentEnd.x) && fenced(p.y, segmentStart.y, segmentEnd.y);
- }
+CommandStack.prototype._popAction = function() {
+ const execution = this._currentExecution,
+ trigger = execution.trigger,
+ actions = execution.actions,
+ dirty = execution.dirty;
- function fenced(n, rangeStart, rangeEnd) {
- // use matching threshold to work around
- // precision errors in intersection computation
- return n >= min(rangeStart, rangeEnd) - EQUAL_THRESHOLD && n <= max(rangeStart, rangeEnd) + EQUAL_THRESHOLD;
- }
- /**
- * Calculate mid of two points.
- *
- * @param {Point} p1
- * @param {Point} p2
- *
- * @return {Point}
- */
+ actions.pop();
+ if (!actions.length) {
+ this._eventBus.fire('elements.changed', { elements: (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.uniqueBy)('id', dirty.reverse()) });
- function mid(p1, p2) {
- return {
- x: (p1.x + p2.x) / 2,
- y: (p1.y + p2.y) / 2
- };
- }
+ dirty.length = 0;
- var EQUAL_THRESHOLD = 0.1;
+ this._fire('changed', { trigger: trigger });
- function pointsEqual(p1, p2) {
- return abs(p1.x - p2.x) <= EQUAL_THRESHOLD && abs(p1.y - p2.y) <= EQUAL_THRESHOLD;
- }
+ execution.trigger = null;
+ }
+};
- },{}],198:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = lineIntersect;
+CommandStack.prototype._markDirty = function(elements) {
+ const execution = this._currentExecution;
- /**
- * Returns the intersection between two line segments a and b.
- *
- * @param {Point} l1s
- * @param {Point} l1e
- * @param {Point} l2s
- * @param {Point} l2e
- *
- * @return {Point}
- */
- function lineIntersect(l1s, l1e, l2s, l2e) {
- // if the lines intersect, the result contains the x and y of the
- // intersection (treating the lines as infinite) and booleans for
- // whether line segment 1 or line segment 2 contain the point
- var denominator, a, b, c, numerator;
- denominator = (l2e.y - l2s.y) * (l1e.x - l1s.x) - (l2e.x - l2s.x) * (l1e.y - l1s.y);
-
- if (denominator == 0) {
- return null;
- }
+ if (!elements) {
+ return;
+ }
- a = l1s.y - l2s.y;
- b = l1s.x - l2s.x;
- numerator = (l2e.x - l2s.x) * a - (l2e.y - l2s.y) * b;
- c = numerator / denominator; // if we cast these lines infinitely in
- // both directions, they intersect here
+ elements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(elements) ? elements : [ elements ];
- return {
- x: Math.round(l1s.x + c * (l1e.x - l1s.x)),
- y: Math.round(l1s.y + c * (l1e.y - l1s.y))
- };
- }
+ execution.dirty = execution.dirty.concat(elements);
+};
- },{}],199:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.getParticipantResizeConstraints = getParticipantResizeConstraints;
+CommandStack.prototype._executedAction = function(action, redo) {
+ const stackIdx = ++this._stackIdx;
- var _ModelUtil = require("../../../../util/ModelUtil");
+ if (!redo) {
+ this._stack.splice(stackIdx, this._stack.length, action);
+ }
+};
- var _LayoutUtil = require("diagram-js/lib/layout/LayoutUtil");
- var _LaneUtil = require("../../../modeling/util/LaneUtil");
+CommandStack.prototype._revertedAction = function(action) {
+ this._stackIdx--;
+};
- var _ResizeBehavior = require("../ResizeBehavior");
- var abs = Math.abs,
- min = Math.min,
- max = Math.max;
+CommandStack.prototype._getHandler = function(command) {
+ return this._handlerMap[command];
+};
- function addToTrbl(trbl, attr, value, choice) {
- var current = trbl[attr]; // make sure to set the value if it does not exist
- // or apply the correct value by comparing against
- // choice(value, currentValue)
+CommandStack.prototype._setHandler = function(command, handler) {
+ if (!command || !handler) {
+ throw new Error('command and handler required');
+ }
- trbl[attr] = current === undefined ? value : choice(value, current);
- }
+ if (this._handlerMap[command]) {
+ throw new Error('overriding handler for command <' + command + '>');
+ }
- function addMin(trbl, attr, value) {
- return addToTrbl(trbl, attr, value, min);
- }
+ this._handlerMap[command] = handler;
+};
- function addMax(trbl, attr, value) {
- return addToTrbl(trbl, attr, value, max);
- }
- var LANE_RIGHT_PADDING = 20,
- LANE_LEFT_PADDING = 50,
- LANE_TOP_PADDING = 20,
- LANE_BOTTOM_PADDING = 20;
+/***/ }),
- function getParticipantResizeConstraints(laneShape, resizeDirection, balanced) {
- var lanesRoot = (0, _LaneUtil.getLanesRoot)(laneShape);
- var isFirst = true,
- isLast = true; // max top/bottom size for lanes
+/***/ "../node_modules/diagram-js/lib/command/index.js":
+/*!*******************************************************!*\
+ !*** ../node_modules/diagram-js/lib/command/index.js ***!
+ \*******************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var allLanes = (0, _LaneUtil.collectLanes)(lanesRoot, [lanesRoot]);
- var laneTrbl = (0, _LayoutUtil.asTRBL)(laneShape);
- var maxTrbl = {},
- minTrbl = {};
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _CommandStack__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CommandStack */ "../node_modules/diagram-js/lib/command/CommandStack.js");
- if (/e/.test(resizeDirection)) {
- minTrbl.right = laneTrbl.left + _ResizeBehavior.LANE_MIN_DIMENSIONS.width;
- } else if (/w/.test(resizeDirection)) {
- minTrbl.left = laneTrbl.right - _ResizeBehavior.LANE_MIN_DIMENSIONS.width;
- }
- allLanes.forEach(function (other) {
- var otherTrbl = (0, _LayoutUtil.asTRBL)(other);
+/**
+ * @type { import('didi').ModuleDeclaration }
+ */
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ commandStack: [ 'type', _CommandStack__WEBPACK_IMPORTED_MODULE_0__["default"] ]
+});
- if (/n/.test(resizeDirection)) {
- if (otherTrbl.top < laneTrbl.top - 10) {
- isFirst = false;
- } // max top size (based on next element)
+/***/ }),
- if (balanced && abs(laneTrbl.top - otherTrbl.bottom) < 10) {
- addMax(maxTrbl, 'top', otherTrbl.top + _ResizeBehavior.LANE_MIN_DIMENSIONS.height);
- } // min top size (based on self or nested element)
+/***/ "../node_modules/diagram-js/lib/core/Canvas.js":
+/*!*****************************************************!*\
+ !*** ../node_modules/diagram-js/lib/core/Canvas.js ***!
+ \*****************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ Canvas)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dom */ "../node_modules/min-dom/dist/index.esm.js");
+/* harmony import */ var _util_Collections__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/Collections */ "../node_modules/diagram-js/lib/util/Collections.js");
+/* harmony import */ var _util_Elements__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/Elements */ "../node_modules/diagram-js/lib/util/Elements.js");
+/* harmony import */ var _layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tiny-svg */ "../node_modules/tiny-svg/dist/index.esm.js");
- if (abs(laneTrbl.top - otherTrbl.top) < 5) {
- addMin(minTrbl, 'top', otherTrbl.bottom - _ResizeBehavior.LANE_MIN_DIMENSIONS.height);
- }
- }
- if (/s/.test(resizeDirection)) {
- if (otherTrbl.bottom > laneTrbl.bottom + 10) {
- isLast = false;
- } // max bottom size (based on previous element)
- if (balanced && abs(laneTrbl.bottom - otherTrbl.top) < 10) {
- addMin(maxTrbl, 'bottom', otherTrbl.bottom - _ResizeBehavior.LANE_MIN_DIMENSIONS.height);
- } // min bottom size (based on self or nested element)
- if (abs(laneTrbl.bottom - otherTrbl.bottom) < 5) {
- addMax(minTrbl, 'bottom', otherTrbl.top + _ResizeBehavior.LANE_MIN_DIMENSIONS.height);
- }
- }
- }); // max top/bottom/left/right size based on flow nodes
- var flowElements = lanesRoot.children.filter(function (s) {
- return !s.hidden && !s.waypoints && ((0, _ModelUtil.is)(s, 'bpmn:FlowElement') || (0, _ModelUtil.is)(s, 'bpmn:Artifact'));
- });
- flowElements.forEach(function (flowElement) {
- var flowElementTrbl = (0, _LayoutUtil.asTRBL)(flowElement);
- if (isFirst && /n/.test(resizeDirection)) {
- addMin(minTrbl, 'top', flowElementTrbl.top - LANE_TOP_PADDING);
- }
- if (/e/.test(resizeDirection)) {
- addMax(minTrbl, 'right', flowElementTrbl.right + LANE_RIGHT_PADDING);
- }
- if (isLast && /s/.test(resizeDirection)) {
- addMax(minTrbl, 'bottom', flowElementTrbl.bottom + LANE_BOTTOM_PADDING);
- }
- if (/w/.test(resizeDirection)) {
- addMin(minTrbl, 'left', flowElementTrbl.left - LANE_LEFT_PADDING);
- }
- });
- return {
- min: minTrbl,
- max: maxTrbl
- };
- }
- },{"../../../../util/ModelUtil":240,"../../../modeling/util/LaneUtil":210,"../ResizeBehavior":184,"diagram-js/lib/layout/LayoutUtil":405}],200:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = AddLaneHandler;
- var _minDash = require("min-dash");
- var _Elements = require("diagram-js/lib/util/Elements");
+/**
+ * @typedef {import('./Types').ConnectionLike} ConnectionLike
+ * @typedef {import('./Types').RootLike} RootLike
+ * @typedef {import('./Types').ParentLike } ParentLike
+ * @typedef {import('./Types').ShapeLike} ShapeLike
+ *
+ * @typedef { {
+ * container?: HTMLElement;
+ * deferUpdate?: boolean;
+ * width?: number;
+ * height?: number;
+ * } } CanvasConfig
+ * @typedef { {
+ * group: SVGElement;
+ * index: number;
+ * visible: boolean;
+ * } } CanvasLayer
+ * @typedef { {
+ * [key: string]: CanvasLayer;
+ * } } CanvasLayers
+ * @typedef { {
+ * rootElement: ShapeLike;
+ * layer: CanvasLayer;
+ * } } CanvasPlane
+ * @typedef { {
+ * scale: number;
+ * inner: Rect;
+ * outer: Dimensions;
+ * } & Rect } CanvasViewbox
+ *
+ * @typedef {import('./ElementRegistry').default} ElementRegistry
+ * @typedef {import('./EventBus').default} EventBus
+ * @typedef {import('./GraphicsFactory').default} GraphicsFactory
+ *
+ * @typedef {import('../util/Types').Dimensions} Dimensions
+ * @typedef {import('../util/Types').Point} Point
+ * @typedef {import('../util/Types').Rect} Rect
+ * @typedef {import('../util/Types').RectTRBL} RectTRBL
+ */
- var _LaneUtil = require("../util/LaneUtil");
+function round(number, resolution) {
+ return Math.round(number * resolution) / resolution;
+}
- /**
- * A handler that allows us to add a new lane
- * above or below an existing one.
- *
- * @param {Modeling} modeling
- * @param {SpaceTool} spaceTool
- */
- function AddLaneHandler(modeling, spaceTool) {
- this._modeling = modeling;
- this._spaceTool = spaceTool;
- }
-
- AddLaneHandler.$inject = ['modeling', 'spaceTool'];
-
- AddLaneHandler.prototype.preExecute = function (context) {
- var spaceTool = this._spaceTool,
- modeling = this._modeling;
- var shape = context.shape,
- location = context.location;
- var lanesRoot = (0, _LaneUtil.getLanesRoot)(shape);
- var isRoot = lanesRoot === shape,
- laneParent = isRoot ? shape : shape.parent;
- var existingChildLanes = (0, _LaneUtil.getChildLanes)(laneParent); // (0) add a lane if we currently got none and are adding to root
-
- if (!existingChildLanes.length) {
- modeling.createShape({
- type: 'bpmn:Lane'
- }, {
- x: shape.x + _LaneUtil.LANE_INDENTATION,
- y: shape.y,
- width: shape.width - _LaneUtil.LANE_INDENTATION,
- height: shape.height
- }, laneParent);
- } // (1) collect affected elements to create necessary space
-
-
- var allAffected = [];
- (0, _Elements.eachElement)(lanesRoot, function (element) {
- allAffected.push(element); // handle element labels in the diagram root
-
- if (element.label) {
- allAffected.push(element.label);
- }
+function ensurePx(number) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(number) ? number + 'px' : number;
+}
- if (element === shape) {
- return [];
- }
+function findRoot(element) {
+ while (element.parent) {
+ element = element.parent;
+ }
- return (0, _minDash.filter)(element.children, function (c) {
- return c !== shape;
- });
- });
- var offset = location === 'top' ? -120 : 120,
- lanePosition = location === 'top' ? shape.y : shape.y + shape.height,
- spacePos = lanePosition + (location === 'top' ? 10 : -10),
- direction = location === 'top' ? 'n' : 's';
- var adjustments = spaceTool.calculateAdjustments(allAffected, 'y', offset, spacePos);
- spaceTool.makeSpace(adjustments.movingShapes, adjustments.resizingShapes, {
- x: 0,
- y: offset
- }, direction, spacePos); // (2) create new lane at open space
-
- context.newLane = modeling.createShape({
- type: 'bpmn:Lane'
- }, {
- x: shape.x + (isRoot ? _LaneUtil.LANE_INDENTATION : 0),
- y: lanePosition - (location === 'top' ? 120 : 0),
- width: shape.width - (isRoot ? _LaneUtil.LANE_INDENTATION : 0),
- height: 120
- }, laneParent);
- };
+ return element;
+}
- },{"../util/LaneUtil":210,"diagram-js/lib/util/Elements":420,"min-dash":646}],201:[function(require,module,exports){
- "use strict";
+/**
+ * Creates a HTML container element for a SVG element with
+ * the given configuration
+ *
+ * @param {CanvasConfig} options
+ *
+ * @return {HTMLElement} the container element
+ */
+function createContainer(options) {
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = IdClaimHandler;
+ options = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, { width: '100%', height: '100%' }, options);
- function IdClaimHandler(moddle) {
- this._moddle = moddle;
- }
+ const container = options.container || document.body;
- IdClaimHandler.$inject = ['moddle'];
+ // create a around the svg element with the respective size
+ // this way we can always get the correct container size
+ // (this is impossible for
elements at the moment)
+ const parent = document.createElement('div');
+ parent.setAttribute('class', 'djs-container djs-parent');
- IdClaimHandler.prototype.execute = function (context) {
- var ids = this._moddle.ids,
- id = context.id,
- element = context.element,
- claiming = context.claiming;
+ (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.assignStyle)(parent, {
+ position: 'relative',
+ overflow: 'hidden',
+ width: ensurePx(options.width),
+ height: ensurePx(options.height)
+ });
- if (claiming) {
- ids.claim(id, element);
- } else {
- ids.unclaim(id);
- }
- };
- /**
- * Command revert implementation.
- */
+ container.appendChild(parent);
+ return parent;
+}
- IdClaimHandler.prototype.revert = function (context) {
- var ids = this._moddle.ids,
- id = context.id,
- element = context.element,
- claiming = context.claiming;
+function createGroup(parent, cls, childIndex) {
+ const group = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)('g');
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.classes)(group).add(cls);
- if (claiming) {
- ids.unclaim(id);
- } else {
- ids.claim(id, element);
- }
- };
+ const index = childIndex !== undefined ? childIndex : parent.childNodes.length - 1;
- },{}],202:[function(require,module,exports){
- "use strict";
+ // must ensure second argument is node or _null_
+ // cf. https://developer.mozilla.org/en-US/docs/Web/API/Node/insertBefore
+ parent.insertBefore(group, parent.childNodes[index] || null);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = ResizeLaneHandler;
+ return group;
+}
- var _ModelUtil = require("../../../util/ModelUtil");
+const BASE_LAYER = 'base';
- var _LaneUtil = require("../util/LaneUtil");
+// render plane contents behind utility layers
+const PLANE_LAYER_INDEX = 0;
+const UTILITY_LAYER_INDEX = 1;
- var _Elements = require("diagram-js/lib/util/Elements");
- var _LayoutUtil = require("diagram-js/lib/layout/LayoutUtil");
+const REQUIRED_MODEL_ATTRS = {
+ shape: [ 'x', 'y', 'width', 'height' ],
+ connection: [ 'waypoints' ]
+};
- var _ResizeUtil = require("diagram-js/lib/features/resize/ResizeUtil");
+/**
+ * The main drawing canvas.
+ *
+ * @class
+ * @constructor
+ *
+ * @emits Canvas#canvas.init
+ *
+ * @param {CanvasConfig|null} config
+ * @param {EventBus} eventBus
+ * @param {GraphicsFactory} graphicsFactory
+ * @param {ElementRegistry} elementRegistry
+ */
+function Canvas(config, eventBus, graphicsFactory, elementRegistry) {
+ this._eventBus = eventBus;
+ this._elementRegistry = elementRegistry;
+ this._graphicsFactory = graphicsFactory;
- /**
- * A handler that resizes a lane.
- *
- * @param {Modeling} modeling
- */
- function ResizeLaneHandler(modeling, spaceTool) {
- this._modeling = modeling;
- this._spaceTool = spaceTool;
- }
+ /**
+ * @type {number}
+ */
+ this._rootsIdx = 0;
- ResizeLaneHandler.$inject = ['modeling', 'spaceTool'];
+ /**
+ * @type {CanvasLayers}
+ */
+ this._layers = {};
- ResizeLaneHandler.prototype.preExecute = function (context) {
- var shape = context.shape,
- newBounds = context.newBounds,
- balanced = context.balanced;
+ /**
+ * @type {CanvasPlane[]}
+ */
+ this._planes = [];
- if (balanced !== false) {
- this.resizeBalanced(shape, newBounds);
- } else {
- this.resizeSpace(shape, newBounds);
- }
- };
- /**
- * Resize balanced, adjusting next / previous lane sizes.
- *
- * @param {djs.model.Shape} shape
- * @param {Bounds} newBounds
- */
+ /**
+ * @type {RootLike|null}
+ */
+ this._rootElement = null;
+
+ this._init(config || {});
+}
+
+Canvas.$inject = [
+ 'config.canvas',
+ 'eventBus',
+ 'graphicsFactory',
+ 'elementRegistry'
+];
+
+/**
+ * Creates a element that is wrapped into a .
+ * This way we are always able to correctly figure out the size of the svg element
+ * by querying the parent node.
+
+ * (It is not possible to get the size of a svg element cross browser @ 2014-04-01)
+
+ *
+ *
+ * ...
+ *
+ *
+ *
+ * @param {CanvasConfig} config
+ */
+Canvas.prototype._init = function(config) {
+
+ const eventBus = this._eventBus;
+
+ // html container
+ const container = this._container = createContainer(config);
+
+ const svg = this._svg = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)('svg');
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(svg, { width: '100%', height: '100%' });
+
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.append)(container, svg);
+
+ const viewport = this._viewport = createGroup(svg, 'viewport');
+
+ // debounce canvas.viewbox.changed events when deferUpdate is set
+ // to help with potential performance issues
+ if (config.deferUpdate) {
+ this._viewboxChanged = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.debounce)((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.bind)(this._viewboxChanged, this), 300);
+ }
+
+ eventBus.on('diagram.init', () => {
+
+ /**
+ * An event indicating that the canvas is ready to be drawn on.
+ *
+ * @memberOf Canvas
+ *
+ * @event canvas.init
+ *
+ * @type {Object}
+ * @property {SVGElement} svg the created svg element
+ * @property {SVGElement} viewport the direct parent of diagram elements and shapes
+ */
+ eventBus.fire('canvas.init', {
+ svg: svg,
+ viewport: viewport
+ });
+
+ });
+
+ // reset viewbox on shape changes to
+ // recompute the viewbox
+ eventBus.on([
+ 'shape.added',
+ 'connection.added',
+ 'shape.removed',
+ 'connection.removed',
+ 'elements.changed',
+ 'root.set'
+ ], () => {
+ delete this._cachedViewbox;
+ });
+
+ eventBus.on('diagram.destroy', 500, this._destroy, this);
+ eventBus.on('diagram.clear', 500, this._clear, this);
+};
+
+Canvas.prototype._destroy = function() {
+ this._eventBus.fire('canvas.destroy', {
+ svg: this._svg,
+ viewport: this._viewport
+ });
+
+ const parent = this._container.parentNode;
+
+ if (parent) {
+ parent.removeChild(this._container);
+ }
+
+ delete this._svg;
+ delete this._container;
+ delete this._layers;
+ delete this._planes;
+ delete this._rootElement;
+ delete this._viewport;
+};
+
+Canvas.prototype._clear = function() {
+
+ const allElements = this._elementRegistry.getAll();
+
+ // remove all elements
+ allElements.forEach(element => {
+ const type = (0,_util_Elements__WEBPACK_IMPORTED_MODULE_3__.getType)(element);
+
+ if (type === 'root') {
+ this.removeRootElement(element);
+ } else {
+ this._removeElement(element, type);
+ }
+ });
+
+ // remove all planes
+ this._planes = [];
+ this._rootElement = null;
+
+ // force recomputation of view box
+ delete this._cachedViewbox;
+};
+
+/**
+ * Returns the default layer on which
+ * all elements are drawn.
+ *
+ * @return {SVGElement} The SVG element of the layer.
+ */
+Canvas.prototype.getDefaultLayer = function() {
+ return this.getLayer(BASE_LAYER, PLANE_LAYER_INDEX);
+};
+/**
+ * Returns a layer that is used to draw elements
+ * or annotations on it.
+ *
+ * Non-existing layers retrieved through this method
+ * will be created. During creation, the optional index
+ * may be used to create layers below or above existing layers.
+ * A layer with a certain index is always created above all
+ * existing layers with the same index.
+ *
+ * @param {string} name The name of the layer.
+ * @param {number} [index] The index of the layer.
+ *
+ * @return {SVGElement} The SVG element of the layer.
+ */
+Canvas.prototype.getLayer = function(name, index) {
- ResizeLaneHandler.prototype.resizeBalanced = function (shape, newBounds) {
- var modeling = this._modeling;
- var resizeNeeded = (0, _LaneUtil.computeLanesResize)(shape, newBounds); // resize the lane
+ if (!name) {
+ throw new Error('must specify a name');
+ }
- modeling.resizeShape(shape, newBounds); // resize other lanes as needed
+ let layer = this._layers[name];
- resizeNeeded.forEach(function (r) {
- modeling.resizeShape(r.shape, r.newBounds);
- });
- };
- /**
- * Resize, making actual space and moving below / above elements.
- *
- * @param {djs.model.Shape} shape
- * @param {Bounds} newBounds
- */
+ if (!layer) {
+ layer = this._layers[name] = this._createLayer(name, index);
+ }
+ // throw an error if layer creation / retrival is
+ // requested on different index
+ if (typeof index !== 'undefined' && layer.index !== index) {
+ throw new Error('layer <' + name + '> already created at index <' + index + '>');
+ }
- ResizeLaneHandler.prototype.resizeSpace = function (shape, newBounds) {
- var spaceTool = this._spaceTool;
- var shapeTrbl = (0, _LayoutUtil.asTRBL)(shape),
- newTrbl = (0, _LayoutUtil.asTRBL)(newBounds);
- var trblDiff = (0, _ResizeUtil.substractTRBL)(newTrbl, shapeTrbl);
- var lanesRoot = (0, _LaneUtil.getLanesRoot)(shape);
- var allAffected = [],
- allLanes = [];
- (0, _Elements.eachElement)(lanesRoot, function (element) {
- allAffected.push(element);
+ return layer.group;
+};
- if ((0, _ModelUtil.is)(element, 'bpmn:Lane') || (0, _ModelUtil.is)(element, 'bpmn:Participant')) {
- allLanes.push(element);
- }
+/**
+ * For a given index, return the number of layers that have a higher index and
+ * are visible.
+ *
+ * This is used to determine the node a layer should be inserted at.
+ *
+ * @param {number} index
+ *
+ * @return {number}
+ */
+Canvas.prototype._getChildIndex = function(index) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.reduce)(this._layers, function(childIndex, layer) {
+ if (layer.visible && index >= layer.index) {
+ childIndex++;
+ }
+
+ return childIndex;
+ }, 0);
+};
+
+/**
+ * Creates a given layer and returns it.
+ *
+ * @param {string} name
+ * @param {number} [index=0]
+ *
+ * @return {CanvasLayer}
+ */
+Canvas.prototype._createLayer = function(name, index) {
- return element.children;
- });
- var change, spacePos, direction, offset, adjustments;
-
- if (trblDiff.bottom || trblDiff.top) {
- change = trblDiff.bottom || trblDiff.top;
- spacePos = shape.y + (trblDiff.bottom ? shape.height : 0) + (trblDiff.bottom ? -10 : 10);
- direction = trblDiff.bottom ? 's' : 'n';
- offset = trblDiff.top > 0 || trblDiff.bottom < 0 ? -change : change;
- adjustments = spaceTool.calculateAdjustments(allAffected, 'y', offset, spacePos);
- spaceTool.makeSpace(adjustments.movingShapes, adjustments.resizingShapes, {
- x: 0,
- y: change
- }, direction);
- }
-
- if (trblDiff.left || trblDiff.right) {
- change = trblDiff.right || trblDiff.left;
- spacePos = shape.x + (trblDiff.right ? shape.width : 0) + (trblDiff.right ? -10 : 100);
- direction = trblDiff.right ? 'e' : 'w';
- offset = trblDiff.left > 0 || trblDiff.right < 0 ? -change : change;
- adjustments = spaceTool.calculateAdjustments(allLanes, 'x', offset, spacePos);
- spaceTool.makeSpace(adjustments.movingShapes, adjustments.resizingShapes, {
- x: change,
- y: 0
- }, direction);
- }
- };
+ if (typeof index === 'undefined') {
+ index = UTILITY_LAYER_INDEX;
+ }
- },{"../../../util/ModelUtil":240,"../util/LaneUtil":210,"diagram-js/lib/features/resize/ResizeUtil":373,"diagram-js/lib/layout/LayoutUtil":405,"diagram-js/lib/util/Elements":420}],203:[function(require,module,exports){
- "use strict";
+ const childIndex = this._getChildIndex(index);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = SetColorHandler;
+ return {
+ group: createGroup(this._viewport, 'layer-' + name, childIndex),
+ index: index,
+ visible: true
+ };
+};
- var _minDash = require("min-dash");
- var DEFAULT_COLORS = {
- fill: undefined,
- stroke: undefined
- };
+/**
+ * Shows a given layer.
+ *
+ * @param {string} name The name of the layer.
+ *
+ * @return {SVGElement} The SVG element of the layer.
+ */
+Canvas.prototype.showLayer = function(name) {
- function SetColorHandler(commandStack) {
- this._commandStack = commandStack;
- }
+ if (!name) {
+ throw new Error('must specify a name');
+ }
- SetColorHandler.$inject = ['commandStack'];
+ const layer = this._layers[name];
- SetColorHandler.prototype.postExecute = function (context) {
- var elements = context.elements,
- colors = context.colors || DEFAULT_COLORS;
- var self = this;
- var di = {};
+ if (!layer) {
+ throw new Error('layer <' + name + '> does not exist');
+ }
- if ('fill' in colors) {
- (0, _minDash.assign)(di, {
- fill: colors.fill
- });
- }
+ const viewport = this._viewport;
+ const group = layer.group;
+ const index = layer.index;
- if ('stroke' in colors) {
- (0, _minDash.assign)(di, {
- stroke: colors.stroke
- });
- }
+ if (layer.visible) {
+ return group;
+ }
- (0, _minDash.forEach)(elements, function (element) {
- self._commandStack.execute('element.updateProperties', {
- element: element,
- properties: {
- di: di
- }
- });
- });
- };
+ const childIndex = this._getChildIndex(index);
- },{"min-dash":646}],204:[function(require,module,exports){
- "use strict";
+ viewport.insertBefore(group, viewport.childNodes[childIndex] || null);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = SplitLaneHandler;
+ layer.visible = true;
- var _LaneUtil = require("../util/LaneUtil");
+ return group;
+};
- /**
- * A handler that splits a lane into a number of sub-lanes,
- * creating new sub lanes, if necessary.
- *
- * @param {Modeling} modeling
- */
- function SplitLaneHandler(modeling, translate) {
- this._modeling = modeling;
- this._translate = translate;
- }
+/**
+ * Hides a given layer.
+ *
+ * @param {string} name The name of the layer.
+ *
+ * @return {SVGElement} The SVG element of the layer.
+ */
+Canvas.prototype.hideLayer = function(name) {
- SplitLaneHandler.$inject = ['modeling', 'translate'];
+ if (!name) {
+ throw new Error('must specify a name');
+ }
- SplitLaneHandler.prototype.preExecute = function (context) {
- var modeling = this._modeling,
- translate = this._translate;
- var shape = context.shape,
- newLanesCount = context.count;
- var childLanes = (0, _LaneUtil.getChildLanes)(shape),
- existingLanesCount = childLanes.length;
+ const layer = this._layers[name];
- if (existingLanesCount > newLanesCount) {
- throw new Error(translate('more than {count} child lanes', {
- count: newLanesCount
- }));
- }
+ if (!layer) {
+ throw new Error('layer <' + name + '> does not exist');
+ }
- var newLanesHeight = Math.round(shape.height / newLanesCount); // Iterate from top to bottom in child lane order,
- // resizing existing lanes and creating new ones
- // so that they split the parent proportionally.
- //
- // Due to rounding related errors, the bottom lane
- // needs to take up all the remaining space.
+ const group = layer.group;
- var laneY, laneHeight, laneBounds, newLaneAttrs, idx;
+ if (!layer.visible) {
+ return group;
+ }
- for (idx = 0; idx < newLanesCount; idx++) {
- laneY = shape.y + idx * newLanesHeight; // if bottom lane
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.remove)(group);
- if (idx === newLanesCount - 1) {
- laneHeight = shape.height - newLanesHeight * idx;
- } else {
- laneHeight = newLanesHeight;
- }
+ layer.visible = false;
- laneBounds = {
- x: shape.x + _LaneUtil.LANE_INDENTATION,
- y: laneY,
- width: shape.width - _LaneUtil.LANE_INDENTATION,
- height: laneHeight
- };
+ return group;
+};
- if (idx < existingLanesCount) {
- // resize existing lane
- modeling.resizeShape(childLanes[idx], laneBounds);
- } else {
- // create a new lane at position
- newLaneAttrs = {
- type: 'bpmn:Lane'
- };
- modeling.createShape(newLaneAttrs, laneBounds, shape);
- }
- }
- };
- },{"../util/LaneUtil":210}],205:[function(require,module,exports){
- "use strict";
+Canvas.prototype._removeLayer = function(name) {
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = UpdateCanvasRootHandler;
+ const layer = this._layers[name];
- var _Collections = require("diagram-js/lib/util/Collections");
+ if (layer) {
+ delete this._layers[name];
- function UpdateCanvasRootHandler(canvas, modeling) {
- this._canvas = canvas;
- this._modeling = modeling;
- }
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.remove)(layer.group);
+ }
+};
- UpdateCanvasRootHandler.$inject = ['canvas', 'modeling'];
+/**
+ * Returns the currently active layer. Can be null.
+ *
+ * @return {CanvasLayer|null} The active layer of `null`.
+ */
+Canvas.prototype.getActiveLayer = function() {
+ const plane = this._findPlaneForRoot(this.getRootElement());
- UpdateCanvasRootHandler.prototype.execute = function (context) {
- var canvas = this._canvas;
- var newRoot = context.newRoot,
- newRootBusinessObject = newRoot.businessObject,
- oldRoot = canvas.getRootElement(),
- oldRootBusinessObject = oldRoot.businessObject,
- bpmnDefinitions = oldRootBusinessObject.$parent,
- diPlane = oldRootBusinessObject.di; // (1) replace process old <> new root
+ if (!plane) {
+ return null;
+ }
- canvas.setRootElement(newRoot, true); // (2) update root elements
+ return plane.layer;
+};
- (0, _Collections.add)(bpmnDefinitions.rootElements, newRootBusinessObject);
- newRootBusinessObject.$parent = bpmnDefinitions;
- (0, _Collections.remove)(bpmnDefinitions.rootElements, oldRootBusinessObject);
- oldRootBusinessObject.$parent = null; // (3) wire di
- oldRootBusinessObject.di = null;
- diPlane.bpmnElement = newRootBusinessObject;
- newRootBusinessObject.di = diPlane;
- context.oldRoot = oldRoot; // TODO(nikku): return changed elements?
- // return [ newRoot, oldRoot ];
- };
+/**
+ * Returns the plane which contains the given element.
+ *
+ * @param {ShapeLike|ConnectionLike|string} element The element or its ID.
+ *
+ * @return {RootLike|undefined} The root of the element.
+ */
+Canvas.prototype.findRoot = function(element) {
+ if (typeof element === 'string') {
+ element = this._elementRegistry.get(element);
+ }
- UpdateCanvasRootHandler.prototype.revert = function (context) {
- var canvas = this._canvas;
- var newRoot = context.newRoot,
- newRootBusinessObject = newRoot.businessObject,
- oldRoot = context.oldRoot,
- oldRootBusinessObject = oldRoot.businessObject,
- bpmnDefinitions = newRootBusinessObject.$parent,
- diPlane = newRootBusinessObject.di; // (1) replace process old <> new root
-
- canvas.setRootElement(oldRoot, true); // (2) update root elements
-
- (0, _Collections.remove)(bpmnDefinitions.rootElements, newRootBusinessObject);
- newRootBusinessObject.$parent = null;
- (0, _Collections.add)(bpmnDefinitions.rootElements, oldRootBusinessObject);
- oldRootBusinessObject.$parent = bpmnDefinitions; // (3) wire di
-
- newRootBusinessObject.di = null;
- diPlane.bpmnElement = oldRootBusinessObject;
- oldRootBusinessObject.di = diPlane; // TODO(nikku): return changed elements?
- // return [ newRoot, oldRoot ];
- };
+ if (!element) {
+ return;
+ }
- },{"diagram-js/lib/util/Collections":418}],206:[function(require,module,exports){
- "use strict";
+ const plane = this._findPlaneForRoot(
+ findRoot(element)
+ ) || {};
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = UpdateFlowNodeRefsHandler;
+ return plane.rootElement;
+};
- var _LaneUtil = require("../util/LaneUtil");
+/**
+ * Return a list of all root elements on the diagram.
+ *
+ * @return {(RootLike)[]} The list of root elements.
+ */
+Canvas.prototype.getRootElements = function() {
+ return this._planes.map(function(plane) {
+ return plane.rootElement;
+ });
+};
+
+Canvas.prototype._findPlaneForRoot = function(rootElement) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(this._planes, function(plane) {
+ return plane.rootElement === rootElement;
+ });
+};
+
+
+/**
+ * Returns the html element that encloses the
+ * drawing canvas.
+ *
+ * @return {HTMLElement} The HTML element of the container.
+ */
+Canvas.prototype.getContainer = function() {
+ return this._container;
+};
- var _ModelUtil = require("../../../util/ModelUtil");
- var _Collections = require("diagram-js/lib/util/Collections");
+// markers //////////////////////
- var _LayoutUtil = require("diagram-js/lib/layout/LayoutUtil");
+Canvas.prototype._updateMarker = function(element, marker, add) {
+ let container;
- var FLOW_NODE_REFS_ATTR = 'flowNodeRef',
- LANES_ATTR = 'lanes';
- /**
- * A handler that updates lane refs on changed elements
- */
+ if (!element.id) {
+ element = this._elementRegistry.get(element);
+ }
- function UpdateFlowNodeRefsHandler(elementRegistry) {
- this._elementRegistry = elementRegistry;
- }
+ // we need to access all
+ container = this._elementRegistry._elements[element.id];
- UpdateFlowNodeRefsHandler.$inject = ['elementRegistry'];
+ if (!container) {
+ return;
+ }
- UpdateFlowNodeRefsHandler.prototype.computeUpdates = function (flowNodeShapes, laneShapes) {
- var handledNodes = [];
- var updates = [];
- var participantCache = {};
- var allFlowNodeShapes = [];
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)([ container.gfx, container.secondaryGfx ], function(gfx) {
+ if (gfx) {
- function isInLaneShape(element, laneShape) {
- var laneTrbl = (0, _LayoutUtil.asTRBL)(laneShape);
- var elementMid = {
- x: element.x + element.width / 2,
- y: element.y + element.height / 2
- };
- return elementMid.x > laneTrbl.left && elementMid.x < laneTrbl.right && elementMid.y > laneTrbl.top && elementMid.y < laneTrbl.bottom;
- }
+ // invoke either addClass or removeClass based on mode
+ if (add) {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.classes)(gfx).add(marker);
+ } else {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.classes)(gfx).remove(marker);
+ }
+ }
+ });
- function addFlowNodeShape(flowNodeShape) {
- if (handledNodes.indexOf(flowNodeShape) === -1) {
- allFlowNodeShapes.push(flowNodeShape);
- handledNodes.push(flowNodeShape);
- }
- }
+ /**
+ * An event indicating that a marker has been updated for an element
+ *
+ * @event element.marker.update
+ * @type {Object}
+ * @property {Element} element the shape
+ * @property {SVGElement} gfx the graphical representation of the shape
+ * @property {string} marker
+ * @property {boolean} add true if the marker was added, false if it got removed
+ */
+ this._eventBus.fire('element.marker.update', { element: element, gfx: container.gfx, marker: marker, add: !!add });
+};
- function getAllLaneShapes(flowNodeShape) {
- var root = (0, _LaneUtil.getLanesRoot)(flowNodeShape);
- if (!participantCache[root.id]) {
- participantCache[root.id] = (0, _LaneUtil.collectLanes)(root);
- }
+/**
+ * Adds a marker to an element (basically a css class).
+ *
+ * Fires the element.marker.update event, making it possible to
+ * integrate extension into the marker life-cycle, too.
+ *
+ * @example
+ *
+ * ```javascript
+ * canvas.addMarker('foo', 'some-marker');
+ *
+ * const fooGfx = canvas.getGraphics('foo');
+ *
+ * fooGfx; //
...
+ * ```
+ *
+ * @param {ShapeLike|ConnectionLike|string} element The element or its ID.
+ * @param {string} marker The marker.
+ */
+Canvas.prototype.addMarker = function(element, marker) {
+ this._updateMarker(element, marker, true);
+};
- return participantCache[root.id];
- }
- function getNewLanes(flowNodeShape) {
- if (!flowNodeShape.parent) {
- return [];
- }
+/**
+ * Remove a marker from an element.
+ *
+ * Fires the element.marker.update event, making it possible to
+ * integrate extension into the marker life-cycle, too.
+ *
+ * @param {ShapeLike|ConnectionLike|string} element The element or its ID.
+ * @param {string} marker The marker.
+ */
+Canvas.prototype.removeMarker = function(element, marker) {
+ this._updateMarker(element, marker, false);
+};
- var allLaneShapes = getAllLaneShapes(flowNodeShape);
- return allLaneShapes.filter(function (l) {
- return isInLaneShape(flowNodeShape, l);
- }).map(function (shape) {
- return shape.businessObject;
- });
- }
+/**
+ * Check whether an element has a given marker.
+ *
+ * @param {ShapeLike|ConnectionLike|string} element The element or its ID.
+ * @param {string} marker The marker.
+ */
+Canvas.prototype.hasMarker = function(element, marker) {
+ if (!element.id) {
+ element = this._elementRegistry.get(element);
+ }
- laneShapes.forEach(function (laneShape) {
- var root = (0, _LaneUtil.getLanesRoot)(laneShape);
+ const gfx = this.getGraphics(element);
- if (!root || handledNodes.indexOf(root) !== -1) {
- return;
- }
+ return (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.classes)(gfx).has(marker);
+};
- var children = root.children.filter(function (c) {
- return (0, _ModelUtil.is)(c, 'bpmn:FlowNode');
- });
- children.forEach(addFlowNodeShape);
- handledNodes.push(root);
- });
- flowNodeShapes.forEach(addFlowNodeShape);
- allFlowNodeShapes.forEach(function (flowNodeShape) {
- var flowNode = flowNodeShape.businessObject;
- var lanes = flowNode.get(LANES_ATTR),
- remove = lanes.slice(),
- add = getNewLanes(flowNodeShape);
- updates.push({
- flowNode: flowNode,
- remove: remove,
- add: add
- });
- });
- laneShapes.forEach(function (laneShape) {
- var lane = laneShape.businessObject; // lane got removed XX-)
-
- if (!laneShape.parent) {
- lane.get(FLOW_NODE_REFS_ATTR).forEach(function (flowNode) {
- updates.push({
- flowNode: flowNode,
- remove: [lane],
- add: []
- });
- });
- }
- });
- return updates;
- };
-
- UpdateFlowNodeRefsHandler.prototype.execute = function (context) {
- var updates = context.updates;
+/**
+ * Toggles a marker on an element.
+ *
+ * Fires the element.marker.update event, making it possible to
+ * integrate extension into the marker life-cycle, too.
+ *
+ * @param {ShapeLike|ConnectionLike|string} element The element or its ID.
+ * @param {string} marker The marker.
+ */
+Canvas.prototype.toggleMarker = function(element, marker) {
+ if (this.hasMarker(element, marker)) {
+ this.removeMarker(element, marker);
+ } else {
+ this.addMarker(element, marker);
+ }
+};
+
+/**
+ * Returns the current root element.
+ *
+ * Supports two different modes for handling root elements:
+ *
+ * 1. if no root element has been added before, an implicit root will be added
+ * and returned. This is used in applications that don't require explicit
+ * root elements.
+ *
+ * 2. when root elements have been added before calling `getRootElement`,
+ * root elements can be null. This is used for applications that want to manage
+ * root elements themselves.
+ *
+ * @return {RootLike} The current root element.
+ */
+Canvas.prototype.getRootElement = function() {
+ const rootElement = this._rootElement;
- if (!updates) {
- updates = context.updates = this.computeUpdates(context.flowNodeShapes, context.laneShapes);
- }
+ // can return null if root elements are present but none was set yet
+ if (rootElement || this._planes.length) {
+ return rootElement;
+ }
- updates.forEach(function (update) {
- var flowNode = update.flowNode,
- lanes = flowNode.get(LANES_ATTR); // unwire old
+ return this.setRootElement(this.addRootElement(null));
+};
- update.remove.forEach(function (oldLane) {
- (0, _Collections.remove)(lanes, oldLane);
- (0, _Collections.remove)(oldLane.get(FLOW_NODE_REFS_ATTR), flowNode);
- }); // wire new
+/**
+ * Adds a given root element and returns it.
+ *
+ * @param {RootLike} [rootElement] The root element to be added.
+ *
+ * @return {RootLike} The added root element or an implicit root element.
+ */
+Canvas.prototype.addRootElement = function(rootElement) {
+ const idx = this._rootsIdx++;
- update.add.forEach(function (newLane) {
- (0, _Collections.add)(lanes, newLane);
- (0, _Collections.add)(newLane.get(FLOW_NODE_REFS_ATTR), flowNode);
- });
- }); // TODO(nikku): return changed elements
- // return [ ... ];
- };
+ if (!rootElement) {
+ rootElement = {
+ id: '__implicitroot_' + idx,
+ children: [],
+ isImplicit: true
+ };
+ }
- UpdateFlowNodeRefsHandler.prototype.revert = function (context) {
- var updates = context.updates;
- updates.forEach(function (update) {
- var flowNode = update.flowNode,
- lanes = flowNode.get(LANES_ATTR); // unwire new
+ const layerName = rootElement.layer = 'root-' + idx;
- update.add.forEach(function (newLane) {
- (0, _Collections.remove)(lanes, newLane);
- (0, _Collections.remove)(newLane.get(FLOW_NODE_REFS_ATTR), flowNode);
- }); // wire old
+ this._ensureValid('root', rootElement);
- update.remove.forEach(function (oldLane) {
- (0, _Collections.add)(lanes, oldLane);
- (0, _Collections.add)(oldLane.get(FLOW_NODE_REFS_ATTR), flowNode);
- });
- }); // TODO(nikku): return changed elements
- // return [ ... ];
- };
+ const layer = this.getLayer(layerName, PLANE_LAYER_INDEX);
- },{"../../../util/ModelUtil":240,"../util/LaneUtil":210,"diagram-js/lib/layout/LayoutUtil":405,"diagram-js/lib/util/Collections":418}],207:[function(require,module,exports){
- "use strict";
+ this.hideLayer(layerName);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = UpdatePropertiesHandler;
+ this._addRoot(rootElement, layer);
- var _minDash = require("min-dash");
+ this._planes.push({
+ rootElement: rootElement,
+ layer: layer
+ });
- var _ModelUtil = require("../../../util/ModelUtil");
+ return rootElement;
+};
- var DEFAULT_FLOW = 'default',
- ID = 'id',
- DI = 'di';
- var NULL_DIMENSIONS = {
- width: 0,
- height: 0
- };
- /**
- * A handler that implements a BPMN 2.0 property update.
- *
- * This should be used to set simple properties on elements with
- * an underlying BPMN business object.
- *
- * Use respective diagram-js provided handlers if you would
- * like to perform automated modeling.
- */
+/**
+ * Removes a given root element and returns it.
+ *
+ * @param {RootLike|string} rootElement element or element ID
+ *
+ * @return {RootLike|undefined} removed element
+ */
+Canvas.prototype.removeRootElement = function(rootElement) {
- function UpdatePropertiesHandler(elementRegistry, moddle, translate, modeling, textRenderer) {
- this._elementRegistry = elementRegistry;
- this._moddle = moddle;
- this._translate = translate;
- this._modeling = modeling;
- this._textRenderer = textRenderer;
- }
+ if (typeof rootElement === 'string') {
+ rootElement = this._elementRegistry.get(rootElement);
+ }
- UpdatePropertiesHandler.$inject = ['elementRegistry', 'moddle', 'translate', 'modeling', 'textRenderer']; // api //////////////////////
+ const plane = this._findPlaneForRoot(rootElement);
- /**
- * Updates a BPMN element with a list of new properties
- *
- * @param {Object} context
- * @param {djs.model.Base} context.element the element to update
- * @param {Object} context.properties a list of properties to set on the element's
- * businessObject (the BPMN model element)
- *
- * @return {Array
} the updated element
- */
+ if (!plane) {
+ return;
+ }
- UpdatePropertiesHandler.prototype.execute = function (context) {
- var element = context.element,
- changed = [element],
- translate = this._translate;
+ // hook up life-cycle events
+ this._removeRoot(rootElement);
- if (!element) {
- throw new Error(translate('element required'));
- }
+ // clean up layer
+ this._removeLayer(rootElement.layer);
- var elementRegistry = this._elementRegistry,
- ids = this._moddle.ids;
- var businessObject = element.businessObject,
- properties = unwrapBusinessObjects(context.properties),
- oldProperties = context.oldProperties || getProperties(businessObject, properties);
+ // clean up plane
+ this._planes = this._planes.filter(function(plane) {
+ return plane.rootElement !== rootElement;
+ });
- if (isIdChange(properties, businessObject)) {
- ids.unclaim(businessObject[ID]);
- elementRegistry.updateId(element, properties[ID]);
- ids.claim(properties[ID], businessObject);
- } // correctly indicate visual changes on default flow updates
+ // clean up active root
+ if (this._rootElement === rootElement) {
+ this._rootElement = null;
+ }
+ return rootElement;
+};
- if (DEFAULT_FLOW in properties) {
- if (properties[DEFAULT_FLOW]) {
- changed.push(elementRegistry.get(properties[DEFAULT_FLOW].id));
- }
- if (businessObject[DEFAULT_FLOW]) {
- changed.push(elementRegistry.get(businessObject[DEFAULT_FLOW].id));
- }
- } // update properties
+/**
+ * Sets a given element as the new root element for the canvas
+ * and returns the new root element.
+ *
+ * @param {RootLike} rootElement The root element to be set.
+ *
+ * @return {RootLike} The set root element.
+ */
+Canvas.prototype.setRootElement = function(rootElement) {
+ if (rootElement === this._rootElement) {
+ return;
+ }
- setProperties(businessObject, properties); // store old values
+ let plane;
- context.oldProperties = oldProperties;
- context.changed = changed; // indicate changed on objects affected by the update
+ if (!rootElement) {
+ throw new Error('rootElement required');
+ }
- return changed;
- };
+ plane = this._findPlaneForRoot(rootElement);
- UpdatePropertiesHandler.prototype.postExecute = function (context) {
- var element = context.element,
- label = element.label;
- var text = label && (0, _ModelUtil.getBusinessObject)(label).name;
+ // give set add semantics for backwards compatibility
+ if (!plane) {
+ rootElement = this.addRootElement(rootElement);
+ }
- if (!text) {
- return;
- } // get layouted text bounds and resize external
- // external label accordingly
+ this._setRoot(rootElement);
+ return rootElement;
+};
- var newLabelBounds = this._textRenderer.getExternalLabelBounds(label, text);
- this._modeling.resizeShape(label, newLabelBounds, NULL_DIMENSIONS);
- };
- /**
- * Reverts the update on a BPMN elements properties.
- *
- * @param {Object} context
- *
- * @return {djs.model.Base} the updated element
- */
+Canvas.prototype._removeRoot = function(element) {
+ const elementRegistry = this._elementRegistry,
+ eventBus = this._eventBus;
+ // simulate element remove event sequence
+ eventBus.fire('root.remove', { element: element });
+ eventBus.fire('root.removed', { element: element });
- UpdatePropertiesHandler.prototype.revert = function (context) {
- var element = context.element,
- properties = context.properties,
- oldProperties = context.oldProperties,
- businessObject = element.businessObject,
- elementRegistry = this._elementRegistry,
- ids = this._moddle.ids; // update properties
+ elementRegistry.remove(element);
+};
- setProperties(businessObject, oldProperties);
- if (isIdChange(properties, businessObject)) {
- ids.unclaim(properties[ID]);
- elementRegistry.updateId(element, oldProperties[ID]);
- ids.claim(oldProperties[ID], businessObject);
- }
+Canvas.prototype._addRoot = function(element, gfx) {
+ const elementRegistry = this._elementRegistry,
+ eventBus = this._eventBus;
- return context.changed;
- };
+ // resemble element add event sequence
+ eventBus.fire('root.add', { element: element });
- function isIdChange(properties, businessObject) {
- return ID in properties && properties[ID] !== businessObject[ID];
- }
+ elementRegistry.add(element, gfx);
- function getProperties(businessObject, properties) {
- var propertyNames = (0, _minDash.keys)(properties);
- return (0, _minDash.reduce)(propertyNames, function (result, key) {
- // handle DI separately
- if (key !== DI) {
- result[key] = businessObject.get(key);
- } else {
- result[key] = getDiProperties(businessObject.di, (0, _minDash.keys)(properties.di));
- }
+ eventBus.fire('root.added', { element: element, gfx: gfx });
+};
- return result;
- }, {});
- }
- function getDiProperties(di, propertyNames) {
- return (0, _minDash.reduce)(propertyNames, function (result, key) {
- result[key] = di.get(key);
- return result;
- }, {});
- }
+Canvas.prototype._setRoot = function(rootElement, layer) {
- function setProperties(businessObject, properties) {
- (0, _minDash.forEach)(properties, function (value, key) {
- if (key !== DI) {
- businessObject.set(key, value);
- } else {
- // only update, if businessObject.di exists
- if (businessObject.di) {
- setDiProperties(businessObject.di, value);
- }
- }
- });
- }
+ const currentRoot = this._rootElement;
- function setDiProperties(di, properties) {
- (0, _minDash.forEach)(properties, function (value, key) {
- di.set(key, value);
- });
- }
+ if (currentRoot) {
- var referencePropertyNames = ['default'];
- /**
- * Make sure we unwrap the actual business object
- * behind diagram element that may have been
- * passed as arguments.
- *
- * @param {Object} properties
- *
- * @return {Object} unwrappedProps
- */
+ // un-associate previous root element
+ this._elementRegistry.updateGraphics(currentRoot, null, true);
- function unwrapBusinessObjects(properties) {
- var unwrappedProps = (0, _minDash.assign)({}, properties);
- referencePropertyNames.forEach(function (name) {
- if (name in properties) {
- unwrappedProps[name] = (0, _ModelUtil.getBusinessObject)(unwrappedProps[name]);
- }
- });
- return unwrappedProps;
- }
+ // hide previous layer
+ this.hideLayer(currentRoot.layer);
+ }
- },{"../../../util/ModelUtil":240,"min-dash":646}],208:[function(require,module,exports){
- "use strict";
+ if (rootElement) {
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = UpdateSemanticParentHandler;
+ if (!layer) {
+ layer = this._findPlaneForRoot(rootElement).layer;
+ }
- function UpdateSemanticParentHandler(bpmnUpdater) {
- this._bpmnUpdater = bpmnUpdater;
- }
+ // associate element with
+ this._elementRegistry.updateGraphics(rootElement, this._svg, true);
- UpdateSemanticParentHandler.$inject = ['bpmnUpdater'];
+ // show root layer
+ this.showLayer(rootElement.layer);
+ }
- UpdateSemanticParentHandler.prototype.execute = function (context) {
- var dataStoreBo = context.dataStoreBo,
- newSemanticParent = context.newSemanticParent,
- newDiParent = context.newDiParent;
- context.oldSemanticParent = dataStoreBo.$parent;
- context.oldDiParent = dataStoreBo.di.$parent; // update semantic parent
+ this._rootElement = rootElement;
- this._bpmnUpdater.updateSemanticParent(dataStoreBo, newSemanticParent); // update DI parent
+ this._eventBus.fire('root.set', { element: rootElement });
+};
+Canvas.prototype._ensureValid = function(type, element) {
+ if (!element.id) {
+ throw new Error('element must have an id');
+ }
- this._bpmnUpdater.updateDiParent(dataStoreBo.di, newDiParent);
- };
+ if (this._elementRegistry.get(element.id)) {
+ throw new Error('element <' + element.id + '> already exists');
+ }
- UpdateSemanticParentHandler.prototype.revert = function (context) {
- var dataStoreBo = context.dataStoreBo,
- oldSemanticParent = context.oldSemanticParent,
- oldDiParent = context.oldDiParent; // update semantic parent
+ const requiredAttrs = REQUIRED_MODEL_ATTRS[type];
- this._bpmnUpdater.updateSemanticParent(dataStoreBo, oldSemanticParent); // update DI parent
+ const valid = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.every)(requiredAttrs, function(attr) {
+ return typeof element[attr] !== 'undefined';
+ });
+ if (!valid) {
+ throw new Error(
+ 'must supply { ' + requiredAttrs.join(', ') + ' } with ' + type);
+ }
+};
- this._bpmnUpdater.updateDiParent(dataStoreBo.di, oldDiParent);
- };
+Canvas.prototype._setParent = function(element, parent, parentIndex) {
+ (0,_util_Collections__WEBPACK_IMPORTED_MODULE_4__.add)(parent.children, element, parentIndex);
+ element.parent = parent;
+};
- },{}],209:[function(require,module,exports){
- "use strict";
+/**
+ * Adds an element to the canvas.
+ *
+ * This wires the parent <-> child relationship between the element and
+ * a explicitly specified parent or an implicit root element.
+ *
+ * During add it emits the events
+ *
+ * * <{type}.add> (element, parent)
+ * * <{type}.added> (element, gfx)
+ *
+ * Extensions may hook into these events to perform their magic.
+ *
+ * @param {string} type
+ * @param {ConnectionLike|ShapeLike} element
+ * @param {ShapeLike} [parent]
+ * @param {number} [parentIndex]
+ *
+ * @return {ConnectionLike|ShapeLike} The added element.
+ */
+Canvas.prototype._addElement = function(type, element, parent, parentIndex) {
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+ parent = parent || this.getRootElement();
- var _behavior = _interopRequireDefault(require("./behavior"));
+ const eventBus = this._eventBus,
+ graphicsFactory = this._graphicsFactory;
- var _rules = _interopRequireDefault(require("../rules"));
+ this._ensureValid(type, element);
- var _diOrdering = _interopRequireDefault(require("../di-ordering"));
+ eventBus.fire(type + '.add', { element: element, parent: parent });
- var _ordering = _interopRequireDefault(require("../ordering"));
+ this._setParent(element, parent, parentIndex);
- var _replace = _interopRequireDefault(require("../replace"));
+ // create graphics
+ const gfx = graphicsFactory.create(type, element, parentIndex);
- var _command = _interopRequireDefault(require("diagram-js/lib/command"));
+ this._elementRegistry.add(element, gfx);
- var _tooltips = _interopRequireDefault(require("diagram-js/lib/features/tooltips"));
+ // update its visual
+ graphicsFactory.update(type, element, gfx);
- var _labelSupport = _interopRequireDefault(require("diagram-js/lib/features/label-support"));
+ eventBus.fire(type + '.added', { element: element, gfx: gfx });
- var _attachSupport = _interopRequireDefault(require("diagram-js/lib/features/attach-support"));
+ return element;
+};
- var _selection = _interopRequireDefault(require("diagram-js/lib/features/selection"));
+/**
+ * Adds a shape to the canvas.
+ *
+ * @param {ShapeLike} shape The shape to be added
+ * @param {ParentLike} [parent] The shape's parent.
+ * @param {number} [parentIndex] The index at which to add the shape to the parent's children.
+ *
+ * @return {ShapeLike} The added shape.
+ */
+Canvas.prototype.addShape = function(shape, parent, parentIndex) {
+ return this._addElement('shape', shape, parent, parentIndex);
+};
- var _changeSupport = _interopRequireDefault(require("diagram-js/lib/features/change-support"));
+/**
+ * Adds a connection to the canvas.
+ *
+ * @param {ConnectionLike} connection The connection to be added.
+ * @param {ParentLike} [parent] The connection's parent.
+ * @param {number} [parentIndex] The index at which to add the connection to the parent's children.
+ *
+ * @return {ConnectionLike} The added connection.
+ */
+Canvas.prototype.addConnection = function(connection, parent, parentIndex) {
+ return this._addElement('connection', connection, parent, parentIndex);
+};
- var _spaceTool = _interopRequireDefault(require("diagram-js/lib/features/space-tool"));
- var _BpmnFactory = _interopRequireDefault(require("./BpmnFactory"));
+/**
+ * Internal remove element
+ */
+Canvas.prototype._removeElement = function(element, type) {
- var _BpmnUpdater = _interopRequireDefault(require("./BpmnUpdater"));
+ const elementRegistry = this._elementRegistry,
+ graphicsFactory = this._graphicsFactory,
+ eventBus = this._eventBus;
- var _ElementFactory = _interopRequireDefault(require("./ElementFactory"));
+ element = elementRegistry.get(element.id || element);
- var _Modeling = _interopRequireDefault(require("./Modeling"));
+ if (!element) {
- var _BpmnLayouter = _interopRequireDefault(require("./BpmnLayouter"));
+ // element was removed already
+ return;
+ }
- var _CroppingConnectionDocking = _interopRequireDefault(require("diagram-js/lib/layout/CroppingConnectionDocking"));
+ eventBus.fire(type + '.remove', { element: element });
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ graphicsFactory.remove(element);
- var _default = {
- __init__: ['modeling', 'bpmnUpdater'],
- __depends__: [_behavior.default, _rules.default, _diOrdering.default, _ordering.default, _replace.default, _command.default, _tooltips.default, _labelSupport.default, _attachSupport.default, _selection.default, _changeSupport.default, _spaceTool.default],
- bpmnFactory: ['type', _BpmnFactory.default],
- bpmnUpdater: ['type', _BpmnUpdater.default],
- elementFactory: ['type', _ElementFactory.default],
- modeling: ['type', _Modeling.default],
- layouter: ['type', _BpmnLayouter.default],
- connectionDocking: ['type', _CroppingConnectionDocking.default]
- };
- exports.default = _default;
+ // unset parent <-> child relationship
+ (0,_util_Collections__WEBPACK_IMPORTED_MODULE_4__.remove)(element.parent && element.parent.children, element);
+ element.parent = null;
- },{"../di-ordering":135,"../ordering":213,"../replace":223,"../rules":225,"./BpmnFactory":155,"./BpmnLayouter":156,"./BpmnUpdater":157,"./ElementFactory":158,"./Modeling":159,"./behavior":193,"diagram-js/lib/command":252,"diagram-js/lib/features/attach-support":266,"diagram-js/lib/features/change-support":283,"diagram-js/lib/features/label-support":324,"diagram-js/lib/features/selection":383,"diagram-js/lib/features/space-tool":393,"diagram-js/lib/features/tooltips":397,"diagram-js/lib/layout/CroppingConnectionDocking":404}],210:[function(require,module,exports){
- "use strict";
+ eventBus.fire(type + '.removed', { element: element });
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.collectLanes = collectLanes;
- exports.getChildLanes = getChildLanes;
- exports.getLanesRoot = getLanesRoot;
- exports.computeLanesResize = computeLanesResize;
- exports.LANE_INDENTATION = void 0;
+ elementRegistry.remove(element);
- var _ModelUtil = require("../../../util/ModelUtil");
+ return element;
+};
- var _ModelingUtil = require("./ModelingUtil");
- var _LayoutUtil = require("diagram-js/lib/layout/LayoutUtil");
+/**
+ * Removes a shape from the canvas.
+ *
+ * @fires ShapeRemoveEvent
+ * @fires ShapeRemovedEvent
+ *
+ * @param {ShapeLike|string} shape The shape or its ID.
+ *
+ * @return {ShapeLike} The removed shape.
+ */
+Canvas.prototype.removeShape = function(shape) {
- var _ResizeUtil = require("diagram-js/lib/features/resize/ResizeUtil");
+ /**
+ * An event indicating that a shape is about to be removed from the canvas.
+ *
+ * @memberOf Canvas
+ *
+ * @event ShapeRemoveEvent
+ * @type {Object}
+ * @property {ShapeLike} element The shape.
+ * @property {SVGElement} gfx The graphical element.
+ */
- var abs = Math.abs;
+ /**
+ * An event indicating that a shape has been removed from the canvas.
+ *
+ * @memberOf Canvas
+ *
+ * @event ShapeRemovedEvent
+ * @type {Object}
+ * @property {ShapeLike} element The shape.
+ * @property {SVGElement} gfx The graphical element.
+ */
+ return this._removeElement(shape, 'shape');
+};
- function getTRBLResize(oldBounds, newBounds) {
- return (0, _ResizeUtil.substractTRBL)((0, _LayoutUtil.asTRBL)(newBounds), (0, _LayoutUtil.asTRBL)(oldBounds));
- }
- var LANE_PARENTS = ['bpmn:Participant', 'bpmn:Process', 'bpmn:SubProcess'];
- var LANE_INDENTATION = 30;
- /**
- * Collect all lane shapes in the given paren
- *
- * @param {djs.model.Shape} shape
- * @param {Array} [collectedShapes]
- *
- * @return {Array}
- */
+/**
+ * Removes a connection from the canvas.
+ *
+ * @fires ConnectionRemoveEvent
+ * @fires ConnectionRemovedEvent
+ *
+ * @param {ConnectionLike|string} connection The connection or its ID.
+ *
+ * @return {ConnectionLike} The removed connection.
+ */
+Canvas.prototype.removeConnection = function(connection) {
- exports.LANE_INDENTATION = LANE_INDENTATION;
+ /**
+ * An event indicating that a connection is about to be removed from the canvas.
+ *
+ * @memberOf Canvas
+ *
+ * @event ConnectionRemoveEvent
+ * @type {Object}
+ * @property {ConnectionLike} element The connection.
+ * @property {SVGElement} gfx The graphical element.
+ */
- function collectLanes(shape, collectedShapes) {
- collectedShapes = collectedShapes || [];
- shape.children.filter(function (s) {
- if ((0, _ModelUtil.is)(s, 'bpmn:Lane')) {
- collectLanes(s, collectedShapes);
- collectedShapes.push(s);
- }
- });
- return collectedShapes;
- }
- /**
- * Return the lane children of the given element.
- *
- * @param {djs.model.Shape} shape
- *
- * @return {Array}
- */
+ /**
+ * An event indicating that a connection has been removed from the canvas.
+ *
+ * @memberOf Canvas
+ *
+ * @event ConnectionRemovedEvent
+ * @type {Object}
+ * @property {ConnectionLike} element The connection.
+ * @property {SVGElement} gfx The graphical element.
+ */
+ return this._removeElement(connection, 'connection');
+};
- function getChildLanes(shape) {
- return shape.children.filter(function (c) {
- return (0, _ModelUtil.is)(c, 'bpmn:Lane');
- });
- }
- /**
- * Return the root element containing the given lane shape
- *
- * @param {djs.model.Shape} shape
- *
- * @return {djs.model.Shape}
- */
+/**
+ * Returns the graphical element of an element.
+ *
+ * @param {ShapeLike|ConnectionLike|string} element The element or its ID.
+ * @param {boolean} [secondary=false] Whether to return the secondary graphical element.
+ *
+ * @return {SVGElement} The graphical element.
+ */
+Canvas.prototype.getGraphics = function(element, secondary) {
+ return this._elementRegistry.getGraphics(element, secondary);
+};
- function getLanesRoot(shape) {
- return (0, _ModelingUtil.getParent)(shape, LANE_PARENTS) || shape;
- }
- /**
- * Compute the required resize operations for lanes
- * adjacent to the given shape, assuming it will be
- * resized to the given new bounds.
- *
- * @param {djs.model.Shape} shape
- * @param {Bounds} newBounds
- *
- * @return {Array}
- */
+/**
+ * Perform a viewbox update via a given change function.
+ *
+ * @param {Function} changeFn
+ */
+Canvas.prototype._changeViewbox = function(changeFn) {
+ // notify others of the upcoming viewbox change
+ this._eventBus.fire('canvas.viewbox.changing');
- function computeLanesResize(shape, newBounds) {
- var rootElement = getLanesRoot(shape);
- var initialShapes = (0, _ModelUtil.is)(rootElement, 'bpmn:Process') ? [] : [rootElement];
- var allLanes = collectLanes(rootElement, initialShapes),
- shapeTrbl = (0, _LayoutUtil.asTRBL)(shape),
- shapeNewTrbl = (0, _LayoutUtil.asTRBL)(newBounds),
- trblResize = getTRBLResize(shape, newBounds),
- resizeNeeded = [];
- allLanes.forEach(function (other) {
- if (other === shape) {
- return;
- }
+ // perform actual change
+ changeFn.apply(this);
- var topResize = 0,
- rightResize = trblResize.right,
- bottomResize = 0,
- leftResize = trblResize.left;
- var otherTrbl = (0, _LayoutUtil.asTRBL)(other);
+ // reset the cached viewbox so that
+ // a new get operation on viewbox or zoom
+ // triggers a viewbox re-computation
+ this._cachedViewbox = null;
- if (trblResize.top) {
- if (abs(otherTrbl.bottom - shapeTrbl.top) < 10) {
- bottomResize = shapeNewTrbl.top - otherTrbl.bottom;
- }
+ // notify others of the change; this step
+ // may or may not be debounced
+ this._viewboxChanged();
+};
- if (abs(otherTrbl.top - shapeTrbl.top) < 5) {
- topResize = shapeNewTrbl.top - otherTrbl.top;
- }
- }
+Canvas.prototype._viewboxChanged = function() {
+ this._eventBus.fire('canvas.viewbox.changed', { viewbox: this.viewbox() });
+};
- if (trblResize.bottom) {
- if (abs(otherTrbl.top - shapeTrbl.bottom) < 10) {
- topResize = shapeNewTrbl.bottom - otherTrbl.top;
- }
- if (abs(otherTrbl.bottom - shapeTrbl.bottom) < 5) {
- bottomResize = shapeNewTrbl.bottom - otherTrbl.bottom;
- }
- }
+/**
+ * Gets or sets the view box of the canvas, i.e. the
+ * area that is currently displayed.
+ *
+ * The getter may return a cached viewbox (if it is currently
+ * changing). To force a recomputation, pass `false` as the first argument.
+ *
+ * @example
+ *
+ * ```javascript
+ * canvas.viewbox({ x: 100, y: 100, width: 500, height: 500 })
+ *
+ * // sets the visible area of the diagram to (100|100) -> (600|100)
+ * // and and scales it according to the diagram width
+ *
+ * const viewbox = canvas.viewbox(); // pass `false` to force recomputing the box.
+ *
+ * console.log(viewbox);
+ * // {
+ * // inner: Dimensions,
+ * // outer: Dimensions,
+ * // scale,
+ * // x, y,
+ * // width, height
+ * // }
+ *
+ * // if the current diagram is zoomed and scrolled, you may reset it to the
+ * // default zoom via this method, too:
+ *
+ * const zoomedAndScrolledViewbox = canvas.viewbox();
+ *
+ * canvas.viewbox({
+ * x: 0,
+ * y: 0,
+ * width: zoomedAndScrolledViewbox.outer.width,
+ * height: zoomedAndScrolledViewbox.outer.height
+ * });
+ * ```
+ *
+ * @param {Rect} [box] The viewbox to be set.
+ *
+ * @return {CanvasViewbox} The set viewbox.
+ */
+Canvas.prototype.viewbox = function(box) {
+
+ if (box === undefined && this._cachedViewbox) {
+ return this._cachedViewbox;
+ }
+
+ const viewport = this._viewport,
+ outerBox = this.getSize();
+ let innerBox,
+ matrix,
+ activeLayer,
+ transform,
+ scale,
+ x, y;
+
+ if (!box) {
+
+ // compute the inner box based on the
+ // diagrams active layer. This allows us to exclude
+ // external components, such as overlays
+
+ activeLayer = this._rootElement ? this.getActiveLayer() : null;
+ innerBox = activeLayer && activeLayer.getBBox() || {};
+
+ transform = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.transform)(viewport);
+ matrix = transform ? transform.matrix : (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.createMatrix)();
+ scale = round(matrix.a, 1000);
+
+ x = round(-matrix.e || 0, 1000);
+ y = round(-matrix.f || 0, 1000);
+
+ box = this._cachedViewbox = {
+ x: x ? x / scale : 0,
+ y: y ? y / scale : 0,
+ width: outerBox.width / scale,
+ height: outerBox.height / scale,
+ scale: scale,
+ inner: {
+ width: innerBox.width || 0,
+ height: innerBox.height || 0,
+ x: innerBox.x || 0,
+ y: innerBox.y || 0
+ },
+ outer: outerBox
+ };
+
+ return box;
+ } else {
+
+ this._changeViewbox(function() {
+ scale = Math.min(outerBox.width / box.width, outerBox.height / box.height);
+
+ const matrix = this._svg.createSVGMatrix()
+ .scale(scale)
+ .translate(-box.x, -box.y);
+
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.transform)(viewport, matrix);
+ });
+ }
+
+ return box;
+};
+
+
+/**
+ * Gets or sets the scroll of the canvas.
+ *
+ * @param {Point} [delta] The scroll to be set.
+ *
+ * @return {Point}
+ */
+Canvas.prototype.scroll = function(delta) {
- if (topResize || rightResize || bottomResize || leftResize) {
- resizeNeeded.push({
- shape: other,
- newBounds: (0, _ResizeUtil.resizeTRBL)(other, {
- top: topResize,
- right: rightResize,
- bottom: bottomResize,
- left: leftResize
- })
- });
- }
- });
- return resizeNeeded;
- }
+ const node = this._viewport;
+ let matrix = node.getCTM();
- },{"../../../util/ModelUtil":240,"./ModelingUtil":211,"diagram-js/lib/features/resize/ResizeUtil":373,"diagram-js/lib/layout/LayoutUtil":405}],211:[function(require,module,exports){
- "use strict";
+ if (delta) {
+ this._changeViewbox(function() {
+ delta = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({ dx: 0, dy: 0 }, delta || {});
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.isAny = isAny;
- exports.getParent = getParent;
+ matrix = this._svg.createSVGMatrix().translate(delta.dx, delta.dy).multiply(matrix);
- var _minDash = require("min-dash");
+ setCTM(node, matrix);
+ });
+ }
- var _ModelUtil = require("../../../util/ModelUtil");
+ return { x: matrix.e, y: matrix.f };
+};
- /**
- * Return true if element has any of the given types.
- *
- * @param {djs.model.Base} element
- * @param {Array} types
- *
- * @return {boolean}
- */
- function isAny(element, types) {
- return (0, _minDash.some)(types, function (t) {
- return (0, _ModelUtil.is)(element, t);
- });
- }
- /**
- * Return the parent of the element with any of the given types.
- *
- * @param {djs.model.Base} element
- * @param {string|Array} anyType
- *
- * @return {djs.model.Base}
- */
+/**
+ * Scrolls the viewbox to contain the given element.
+ * Optionally specify a padding to be applied to the edges.
+ *
+ * @param {ShapeLike|ConnectionLike|string} element The element to scroll to or its ID.
+ * @param {RectTRBL|number} [padding=100] The padding to be applied. Can also specify top, bottom, left and right.
+ */
+Canvas.prototype.scrollToElement = function(element, padding) {
+ let defaultPadding = 100;
+ if (typeof element === 'string') {
+ element = this._elementRegistry.get(element);
+ }
- function getParent(element, anyType) {
- if (typeof anyType === 'string') {
- anyType = [anyType];
- }
+ // set to correct rootElement
+ const rootElement = this.findRoot(element);
- while (element = element.parent) {
- if (isAny(element, anyType)) {
- return element;
- }
- }
+ if (rootElement !== this.getRootElement()) {
+ this.setRootElement(rootElement);
+ }
- return null;
- }
+ // element is rootElement, do not change viewport
+ if (rootElement === element) {
+ return;
+ }
- },{"../../../util/ModelUtil":240,"min-dash":646}],212:[function(require,module,exports){
- "use strict";
+ if (!padding) {
+ padding = {};
+ }
+ if (typeof padding === 'number') {
+ defaultPadding = padding;
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BpmnOrderingProvider;
+ padding = {
+ top: padding.top || defaultPadding,
+ right: padding.right || defaultPadding,
+ bottom: padding.bottom || defaultPadding,
+ left: padding.left || defaultPadding
+ };
- var _inherits = _interopRequireDefault(require("inherits"));
+ const elementBounds = (0,_util_Elements__WEBPACK_IMPORTED_MODULE_3__.getBBox)(element),
+ elementTrbl = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.asTRBL)(elementBounds),
+ viewboxBounds = this.viewbox(),
+ zoom = this.zoom();
+ let dx, dy;
- var _OrderingProvider = _interopRequireDefault(require("diagram-js/lib/features/ordering/OrderingProvider"));
+ // shrink viewboxBounds with padding
+ viewboxBounds.y += padding.top / zoom;
+ viewboxBounds.x += padding.left / zoom;
+ viewboxBounds.width -= (padding.right + padding.left) / zoom;
+ viewboxBounds.height -= (padding.bottom + padding.top) / zoom;
- var _ModelingUtil = require("../modeling/util/ModelingUtil");
+ const viewboxTrbl = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.asTRBL)(viewboxBounds);
- var _minDash = require("min-dash");
+ const canFit = elementBounds.width < viewboxBounds.width && elementBounds.height < viewboxBounds.height;
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ if (!canFit) {
- /**
- * a simple ordering provider that makes sure:
- *
- * (0) labels and groups are rendered always on top
- * (1) elements are ordered by a {level} property
- */
- function BpmnOrderingProvider(eventBus, canvas, translate) {
- _OrderingProvider.default.call(this, eventBus);
+ // top-left when element can't fit
+ dx = elementBounds.x - viewboxBounds.x;
+ dy = elementBounds.y - viewboxBounds.y;
- var orders = [{
- type: 'bpmn:SubProcess',
- order: {
- level: 6
- }
- }, {
- type: 'bpmn:SequenceFlow',
- order: {
- level: 3,
- containers: ['bpmn:Participant', 'bpmn:FlowElementsContainer']
- }
- }, // handle DataAssociation(s) like message flows and render them always on top
- {
- type: 'bpmn:DataAssociation',
- order: {
- level: 9,
- containers: ['bpmn:Collaboration', 'bpmn:Process']
- }
- }, {
- type: 'bpmn:MessageFlow',
- order: {
- level: 9,
- containers: ['bpmn:Collaboration']
- }
- }, {
- type: 'bpmn:Association',
- order: {
- level: 6,
- containers: ['bpmn:Participant', 'bpmn:FlowElementsContainer', 'bpmn:Collaboration']
- }
- }, {
- type: 'bpmn:BoundaryEvent',
- order: {
- level: 8
- }
- }, {
- type: 'bpmn:Group',
- order: {
- level: 10,
- containers: ['bpmn:Collaboration', 'bpmn:Process']
- }
- }, {
- type: 'bpmn:FlowElement',
- order: {
- level: 5
- }
- }, {
- type: 'bpmn:Participant',
- order: {
- level: -2
- }
- }, {
- type: 'bpmn:Lane',
- order: {
- level: -1
- }
- }];
+ } else {
- function computeOrder(element) {
- if (element.labelTarget) {
- return {
- level: 10
- };
- }
+ const dRight = Math.max(0, elementTrbl.right - viewboxTrbl.right),
+ dLeft = Math.min(0, elementTrbl.left - viewboxTrbl.left),
+ dBottom = Math.max(0, elementTrbl.bottom - viewboxTrbl.bottom),
+ dTop = Math.min(0, elementTrbl.top - viewboxTrbl.top);
- var entry = (0, _minDash.find)(orders, function (o) {
- return (0, _ModelingUtil.isAny)(element, [o.type]);
- });
- return entry && entry.order || {
- level: 1
- };
- }
+ dx = dRight || dLeft;
+ dy = dBottom || dTop;
- function getOrder(element) {
- var order = element.order;
+ }
- if (!order) {
- element.order = order = computeOrder(element);
- }
+ this.scroll({ dx: -dx * zoom, dy: -dy * zoom });
+};
- return order;
- }
+/**
+ * Gets or sets the current zoom of the canvas, optionally zooming to the
+ * specified position.
+ *
+ * The getter may return a cached zoom level. Call it with `false` as the first
+ * argument to force recomputation of the current level.
+ *
+ * @param {number|'fit-viewport'} [newScale] The new zoom level, either a number,
+ * i.e. 0.9, or `fit-viewport` to adjust the size to fit the current viewport.
+ * @param {Point} [center] The reference point { x: ..., y: ...} to zoom to.
+ *
+ * @return {number} The set zoom level.
+ */
+Canvas.prototype.zoom = function(newScale, center) {
- function findActualParent(element, newParent, containers) {
- var actualParent = newParent;
+ if (!newScale) {
+ return this.viewbox(newScale).scale;
+ }
- while (actualParent) {
- if ((0, _ModelingUtil.isAny)(actualParent, containers)) {
- break;
- }
+ if (newScale === 'fit-viewport') {
+ return this._fitViewport(center);
+ }
- actualParent = actualParent.parent;
- }
+ let outer,
+ matrix;
- if (!actualParent) {
- throw new Error(translate('no parent for {element} in {parent}', {
- element: element.id,
- parent: newParent.id
- }));
- }
+ this._changeViewbox(function() {
- return actualParent;
- }
+ if (typeof center !== 'object') {
+ outer = this.viewbox().outer;
- this.getOrdering = function (element, newParent) {
- // render labels always on top
- if (element.labelTarget) {
- return {
- parent: canvas.getRootElement(),
- index: -1
- };
- }
+ center = {
+ x: outer.width / 2,
+ y: outer.height / 2
+ };
+ }
- var elementOrder = getOrder(element);
+ matrix = this._setZoom(newScale, center);
+ });
- if (elementOrder.containers) {
- newParent = findActualParent(element, newParent, elementOrder.containers);
- }
+ return round(matrix.a, 1000);
+};
- var currentIndex = newParent.children.indexOf(element);
- var insertIndex = (0, _minDash.findIndex)(newParent.children, function (child) {
- // do not compare with labels, they are created
- // in the wrong order (right after elements) during import and
- // mess up the positioning.
- if (!element.labelTarget && child.labelTarget) {
- return false;
- }
+function setCTM(node, m) {
+ const mstr = 'matrix(' + m.a + ',' + m.b + ',' + m.c + ',' + m.d + ',' + m.e + ',' + m.f + ')';
+ node.setAttribute('transform', mstr);
+}
- return elementOrder.level < getOrder(child).level;
- }); // if the element is already in the child list at
- // a smaller index, we need to adjust the insert index.
- // this takes into account that the element is being removed
- // before being re-inserted
+Canvas.prototype._fitViewport = function(center) {
- if (insertIndex !== -1) {
- if (currentIndex !== -1 && currentIndex < insertIndex) {
- insertIndex -= 1;
- }
- }
+ const vbox = this.viewbox(),
+ outer = vbox.outer,
+ inner = vbox.inner;
+ let newScale,
+ newViewbox;
- return {
- index: insertIndex,
- parent: newParent
- };
- };
- }
+ // display the complete diagram without zooming in.
+ // instead of relying on internal zoom, we perform a
+ // hard reset on the canvas viewbox to realize this
+ //
+ // if diagram does not need to be zoomed in, we focus it around
+ // the diagram origin instead
- BpmnOrderingProvider.$inject = ['eventBus', 'canvas', 'translate'];
- (0, _inherits.default)(BpmnOrderingProvider, _OrderingProvider.default);
+ if (inner.x >= 0 &&
+ inner.y >= 0 &&
+ inner.x + inner.width <= outer.width &&
+ inner.y + inner.height <= outer.height &&
+ !center) {
- },{"../modeling/util/ModelingUtil":211,"diagram-js/lib/features/ordering/OrderingProvider":357,"inherits":438,"min-dash":646}],213:[function(require,module,exports){
- "use strict";
+ newViewbox = {
+ x: 0,
+ y: 0,
+ width: Math.max(inner.width + inner.x, outer.width),
+ height: Math.max(inner.height + inner.y, outer.height)
+ };
+ } else {
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+ newScale = Math.min(1, outer.width / inner.width, outer.height / inner.height);
+ newViewbox = {
+ x: inner.x + (center ? inner.width / 2 - outer.width / newScale / 2 : 0),
+ y: inner.y + (center ? inner.height / 2 - outer.height / newScale / 2 : 0),
+ width: outer.width / newScale,
+ height: outer.height / newScale
+ };
+ }
- var _translate = _interopRequireDefault(require("diagram-js/lib/i18n/translate"));
+ this.viewbox(newViewbox);
- var _BpmnOrderingProvider = _interopRequireDefault(require("./BpmnOrderingProvider"));
+ return this.viewbox(false).scale;
+};
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var _default = {
- __depends__: [_translate.default],
- __init__: ['bpmnOrderingProvider'],
- bpmnOrderingProvider: ['type', _BpmnOrderingProvider.default]
- };
- exports.default = _default;
+Canvas.prototype._setZoom = function(scale, center) {
- },{"./BpmnOrderingProvider":212,"diagram-js/lib/i18n/translate":401}],214:[function(require,module,exports){
- "use strict";
+ const svg = this._svg,
+ viewport = this._viewport;
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = PaletteProvider;
+ const matrix = svg.createSVGMatrix();
+ const point = svg.createSVGPoint();
- var _minDash = require("min-dash");
+ let centerPoint,
+ originalPoint,
+ currentMatrix,
+ scaleMatrix,
+ newMatrix;
- /**
- * A palette provider for BPMN 2.0 elements.
- */
- function PaletteProvider(palette, create, elementFactory, spaceTool, lassoTool, handTool, globalConnect, translate) {
- this._palette = palette;
- this._create = create;
- this._elementFactory = elementFactory;
- this._spaceTool = spaceTool;
- this._lassoTool = lassoTool;
- this._handTool = handTool;
- this._globalConnect = globalConnect;
- this._translate = translate;
- palette.registerProvider(this);
- }
-
- PaletteProvider.$inject = ['palette', 'create', 'elementFactory', 'spaceTool', 'lassoTool', 'handTool', 'globalConnect', 'translate'];
-
- PaletteProvider.prototype.getPaletteEntries = function (element) {
- var actions = {},
- create = this._create,
- elementFactory = this._elementFactory,
- spaceTool = this._spaceTool,
- lassoTool = this._lassoTool,
- handTool = this._handTool,
- globalConnect = this._globalConnect,
- translate = this._translate;
-
- function createAction(type, group, className, title, options) {
- function createListener(event) {
- var shape = elementFactory.createShape((0, _minDash.assign)({
- type: type
- }, options));
-
- if (options) {
- shape.businessObject.di.isExpanded = options.isExpanded;
- }
+ currentMatrix = viewport.getCTM();
- create.start(event, shape);
- }
+ const currentScale = currentMatrix.a;
- var shortType = type.replace(/^bpmn:/, '');
- return {
- group: group,
- className: className,
- title: title || translate('Create {type}', {
- type: shortType
- }),
- action: {
- dragstart: createListener,
- click: createListener
- }
- };
- }
+ if (center) {
+ centerPoint = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(point, center);
- function createSubprocess(event) {
- var subProcess = elementFactory.createShape({
- type: 'bpmn:SubProcess',
- x: 0,
- y: 0,
- isExpanded: true
- });
- var startEvent = elementFactory.createShape({
- type: 'bpmn:StartEvent',
- x: 40,
- y: 82,
- parent: subProcess
- });
- create.start(event, [subProcess, startEvent], {
- hints: {
- autoSelect: [startEvent]
- }
- });
- }
+ // revert applied viewport transformations
+ originalPoint = centerPoint.matrixTransform(currentMatrix.inverse());
- function createParticipant(event) {
- create.start(event, elementFactory.createParticipantShape());
- }
+ // create scale matrix
+ scaleMatrix = matrix
+ .translate(originalPoint.x, originalPoint.y)
+ .scale(1 / currentScale * scale)
+ .translate(-originalPoint.x, -originalPoint.y);
- (0, _minDash.assign)(actions, {
- 'hand-tool': {
- group: 'tools',
- className: 'bpmn-icon-hand-tool',
- title: translate('Activate the hand tool'),
- action: {
- click: function (event) {
- handTool.activateHand(event);
- }
- }
- },
- 'lasso-tool': {
- group: 'tools',
- className: 'bpmn-icon-lasso-tool',
- title: translate('Activate the lasso tool'),
- action: {
- click: function (event) {
- lassoTool.activateSelection(event);
- }
- }
- },
- 'space-tool': {
- group: 'tools',
- className: 'bpmn-icon-space-tool',
- title: translate('Activate the create/remove space tool'),
- action: {
- click: function (event) {
- spaceTool.activateSelection(event);
- }
- }
- },
- 'global-connect-tool': {
- group: 'tools',
- className: 'bpmn-icon-connection-multi',
- title: translate('Activate the global connect tool'),
- action: {
- click: function (event) {
- globalConnect.toggle(event);
- }
- }
- },
- 'tool-separator': {
- group: 'tools',
- separator: true
- },
- 'create.start-event': createAction('bpmn:StartEvent', 'event', 'bpmn-icon-start-event-none', translate('Create StartEvent')),
- 'create.intermediate-event': createAction('bpmn:IntermediateThrowEvent', 'event', 'bpmn-icon-intermediate-event-none', translate('Create Intermediate/Boundary Event')),
- 'create.end-event': createAction('bpmn:EndEvent', 'event', 'bpmn-icon-end-event-none', translate('Create EndEvent')),
- 'create.exclusive-gateway': createAction('bpmn:ExclusiveGateway', 'gateway', 'bpmn-icon-gateway-none', translate('Create Gateway')),
- 'create.task': createAction('bpmn:Task', 'activity', 'bpmn-icon-task', translate('Create Task')),
- 'create.data-object': createAction('bpmn:DataObjectReference', 'data-object', 'bpmn-icon-data-object', translate('Create DataObjectReference')),
- 'create.data-store': createAction('bpmn:DataStoreReference', 'data-store', 'bpmn-icon-data-store', translate('Create DataStoreReference')),
- 'create.subprocess-expanded': {
- group: 'activity',
- className: 'bpmn-icon-subprocess-expanded',
- title: translate('Create expanded SubProcess'),
- action: {
- dragstart: createSubprocess,
- click: createSubprocess
- }
- },
- 'create.participant-expanded': {
- group: 'collaboration',
- className: 'bpmn-icon-participant',
- title: translate('Create Pool/Participant'),
- action: {
- dragstart: createParticipant,
- click: createParticipant
- }
- },
- 'create.group': createAction('bpmn:Group', 'artifact', 'bpmn-icon-group', translate('Create Group'))
- });
- return actions;
- };
+ newMatrix = currentMatrix.multiply(scaleMatrix);
+ } else {
+ newMatrix = matrix.scale(scale);
+ }
- },{"min-dash":646}],215:[function(require,module,exports){
- "use strict";
+ setCTM(this._viewport, newMatrix);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+ return newMatrix;
+};
- var _palette = _interopRequireDefault(require("diagram-js/lib/features/palette"));
- var _create = _interopRequireDefault(require("diagram-js/lib/features/create"));
+/**
+ * Returns the size of the canvas.
+ *
+ * @return {Dimensions} The size of the canvas.
+ */
+Canvas.prototype.getSize = function() {
+ return {
+ width: this._container.clientWidth,
+ height: this._container.clientHeight
+ };
+};
- var _spaceTool = _interopRequireDefault(require("diagram-js/lib/features/space-tool"));
- var _lassoTool = _interopRequireDefault(require("diagram-js/lib/features/lasso-tool"));
+/**
+ * Returns the absolute bounding box of an element.
+ *
+ * The absolute bounding box may be used to display overlays in the callers
+ * (browser) coordinate system rather than the zoomed in/out canvas coordinates.
+ *
+ * @param {ShapeLike|ConnectionLike} element The element.
+ *
+ * @return {Rect} The element's absolute bounding box.
+ */
+Canvas.prototype.getAbsoluteBBox = function(element) {
+ const vbox = this.viewbox();
+ let bbox;
+
+ // connection
+ // use svg bbox
+ if (element.waypoints) {
+ const gfx = this.getGraphics(element);
+
+ bbox = gfx.getBBox();
+ }
+
+ // shapes
+ // use data
+ else {
+ bbox = element;
+ }
+
+ const x = bbox.x * vbox.scale - vbox.x * vbox.scale;
+ const y = bbox.y * vbox.scale - vbox.y * vbox.scale;
+
+ const width = bbox.width * vbox.scale;
+ const height = bbox.height * vbox.scale;
+
+ return {
+ x: x,
+ y: y,
+ width: width,
+ height: height
+ };
+};
+
+/**
+ * Fires an event so other modules can react to the canvas resizing.
+ */
+Canvas.prototype.resized = function() {
- var _handTool = _interopRequireDefault(require("diagram-js/lib/features/hand-tool"));
+ // force recomputation of view box
+ delete this._cachedViewbox;
- var _globalConnect = _interopRequireDefault(require("diagram-js/lib/features/global-connect"));
+ this._eventBus.fire('canvas.resized');
+};
- var _translate = _interopRequireDefault(require("diagram-js/lib/i18n/translate"));
- var _PaletteProvider = _interopRequireDefault(require("./PaletteProvider"));
+/***/ }),
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+/***/ "../node_modules/diagram-js/lib/core/ElementFactory.js":
+/*!*************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/core/ElementFactory.js ***!
+ \*************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var _default = {
- __depends__: [_palette.default, _create.default, _spaceTool.default, _lassoTool.default, _handTool.default, _globalConnect.default, _translate.default],
- __init__: ['paletteProvider'],
- paletteProvider: ['type', _PaletteProvider.default]
- };
- exports.default = _default;
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ ElementFactory)
+/* harmony export */ });
+/* harmony import */ var _model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../model */ "../node_modules/diagram-js/lib/model/index.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
- },{"./PaletteProvider":214,"diagram-js/lib/features/create":297,"diagram-js/lib/features/global-connect":306,"diagram-js/lib/features/hand-tool":314,"diagram-js/lib/features/lasso-tool":326,"diagram-js/lib/features/palette":363,"diagram-js/lib/features/space-tool":393,"diagram-js/lib/i18n/translate":401}],216:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = ReplaceMenuProvider;
- var _ModelUtil = require("../../util/ModelUtil");
- var _DiUtil = require("../../util/DiUtil");
+/**
+ * @typedef {import('../model/Types').Element} Element
+ * @typedef {import('../model/Types').Connection} Connection
+ * @typedef {import('../model/Types').Label} Label
+ * @typedef {import('../model/Types').Root} Root
+ * @typedef {import('../model/Types').Shape} Shape
+ */
- var _TypeUtil = require("./util/TypeUtil");
+/**
+ * A factory for model elements.
+ *
+ * @template {Connection} [T=Connection]
+ * @template {Label} [U=Label]
+ * @template {Root} [V=Root]
+ * @template {Shape} [W=Shape]
+ */
+function ElementFactory() {
+ this._uid = 12;
+}
- var _minDash = require("min-dash");
+/**
+ * Create a root element.
+ *
+ * @param {Partial} [attrs]
+ *
+ * @return {V} The created root element.
+ */
+ElementFactory.prototype.createRoot = function(attrs) {
+ return this.create('root', attrs);
+};
- var replaceOptions = _interopRequireWildcard(require("../replace/ReplaceOptions"));
+/**
+ * Create a label.
+ *
+ * @param {Partial} [attrs]
+ *
+ * @return {U} The created label.
+ */
+ElementFactory.prototype.createLabel = function(attrs) {
+ return this.create('label', attrs);
+};
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+/**
+ * Create a shape.
+ *
+ * @param {Partial} [attrs]
+ *
+ * @return {W} The created shape.
+ */
+ElementFactory.prototype.createShape = function(attrs) {
+ return this.create('shape', attrs);
+};
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+/**
+ * Create a connection.
+ *
+ * @param {Partial} [attrs]
+ *
+ * @return {T} The created connection.
+ */
+ElementFactory.prototype.createConnection = function(attrs) {
+ return this.create('connection', attrs);
+};
- /**
- * This module is an element agnostic replace menu provider for the popup menu.
- */
- function ReplaceMenuProvider(popupMenu, modeling, moddle, bpmnReplace, rules, translate) {
- this._popupMenu = popupMenu;
- this._modeling = modeling;
- this._moddle = moddle;
- this._bpmnReplace = bpmnReplace;
- this._rules = rules;
- this._translate = translate;
- this.register();
- }
+/**
+ * Create a root element.
+ *
+ * @overlord
+ * @param {'root'} type
+ * @param {Partial} [attrs]
+ * @return {V}
+ */
+/**
+ * Create a shape.
+ *
+ * @overlord
+ * @param {'shape'} type
+ * @param {Partial} [attrs]
+ * @return {W}
+ */
+/**
+ * Create a connection.
+ *
+ * @overlord
+ * @param {'connection'} type
+ * @param {Partial} [attrs]
+ * @return {T}
+ */
+/**
+ * Create a label.
+ *
+ * @param {'label'} type
+ * @param {Partial} [attrs]
+ * @return {U}
+ */
+ElementFactory.prototype.create = function(type, attrs) {
- ReplaceMenuProvider.$inject = ['popupMenu', 'modeling', 'moddle', 'bpmnReplace', 'rules', 'translate'];
- /**
- * Register replace menu provider in the popup menu
- */
+ attrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, attrs || {});
- ReplaceMenuProvider.prototype.register = function () {
- this._popupMenu.registerProvider('bpmn-replace', this);
- };
- /**
- * Get all entries from replaceOptions for the given element and apply filters
- * on them. Get for example only elements, which are different from the current one.
- *
- * @param {djs.model.Base} element
- *
- * @return {Array} a list of menu entry items
- */
+ if (!attrs.id) {
+ attrs.id = type + '_' + (this._uid++);
+ }
+ return (0,_model__WEBPACK_IMPORTED_MODULE_1__.create)(type, attrs);
+};
- ReplaceMenuProvider.prototype.getEntries = function (element) {
- var businessObject = element.businessObject;
- var rules = this._rules;
- var entries;
+/***/ }),
- if (!rules.allowed('shape.replace', {
- element: element
- })) {
- return [];
- }
+/***/ "../node_modules/diagram-js/lib/core/ElementRegistry.js":
+/*!**************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/core/ElementRegistry.js ***!
+ \**************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var differentType = (0, _TypeUtil.isDifferentType)(element); // start events outside event sub processes
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ ElementRegistry)
+/* harmony export */ });
+/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tiny-svg */ "../node_modules/tiny-svg/dist/index.esm.js");
+var ELEMENT_ID = 'data-element-id';
- if ((0, _ModelUtil.is)(businessObject, 'bpmn:StartEvent') && !(0, _DiUtil.isEventSubProcess)(businessObject.$parent)) {
- entries = (0, _minDash.filter)(replaceOptions.START_EVENT, differentType);
- return this._createEntries(element, entries);
- } // expanded/collapsed pools
- if ((0, _ModelUtil.is)(businessObject, 'bpmn:Participant')) {
- entries = (0, _minDash.filter)(replaceOptions.PARTICIPANT, function (entry) {
- return (0, _DiUtil.isExpanded)(businessObject) !== entry.target.isExpanded;
- });
- return this._createEntries(element, entries);
- } // start events inside event sub processes
+/**
+ * @typedef {import('./Types').ElementLike} ElementLike
+ *
+ * @typedef {import('./EventBus').default} EventBus
+ *
+ * @typedef { (element: ElementLike, gfx: SVGElement) => boolean|any } ElementRegistryFilterCallback
+ * @typedef { (element: ElementLike, gfx: SVGElement) => any } ElementRegistryForEachCallback
+ */
+/**
+ * A registry that keeps track of all shapes in the diagram.
+ *
+ * @class
+ * @constructor
+ *
+ * @param {EventBus} eventBus
+ */
+function ElementRegistry(eventBus) {
+
+ /**
+ * @type { {
+ * [id: string]: {
+ * element: ElementLike;
+ * gfx?: SVGElement;
+ * secondaryGfx?: SVGElement;
+ * }
+ * } }
+ */
+ this._elements = {};
- if ((0, _ModelUtil.is)(businessObject, 'bpmn:StartEvent') && (0, _DiUtil.isEventSubProcess)(businessObject.$parent)) {
- entries = (0, _minDash.filter)(replaceOptions.EVENT_SUB_PROCESS_START_EVENT, function (entry) {
- var target = entry.target;
- var isInterrupting = target.isInterrupting !== false;
- var isInterruptingEqual = (0, _ModelUtil.getBusinessObject)(element).isInterrupting === isInterrupting; // filters elements which types and event definition are equal but have have different interrupting types
+ this._eventBus = eventBus;
+}
- return differentType(entry) || !differentType(entry) && !isInterruptingEqual;
- });
- return this._createEntries(element, entries);
- } // end events
+ElementRegistry.$inject = [ 'eventBus' ];
+/**
+ * Add an element and its graphical representation(s) to the registry.
+ *
+ * @param {ElementLike} element The element to be added.
+ * @param {SVGElement} gfx The primary graphical representation.
+ * @param {SVGElement} [secondaryGfx] The secondary graphical representation.
+ */
+ElementRegistry.prototype.add = function(element, gfx, secondaryGfx) {
- if ((0, _ModelUtil.is)(businessObject, 'bpmn:EndEvent')) {
- entries = (0, _minDash.filter)(replaceOptions.END_EVENT, function (entry) {
- var target = entry.target; // hide cancel end events outside transactions
+ var id = element.id;
- if (target.eventDefinitionType == 'bpmn:CancelEventDefinition' && !(0, _ModelUtil.is)(businessObject.$parent, 'bpmn:Transaction')) {
- return false;
- }
+ this._validateId(id);
- return differentType(entry);
- });
- return this._createEntries(element, entries);
- } // boundary events
+ // associate dom node with element
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(gfx, ELEMENT_ID, id);
+ if (secondaryGfx) {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(secondaryGfx, ELEMENT_ID, id);
+ }
- if ((0, _ModelUtil.is)(businessObject, 'bpmn:BoundaryEvent')) {
- entries = (0, _minDash.filter)(replaceOptions.BOUNDARY_EVENT, function (entry) {
- var target = entry.target;
+ this._elements[id] = { element: element, gfx: gfx, secondaryGfx: secondaryGfx };
+};
- if (target.eventDefinition == 'bpmn:CancelEventDefinition' && !(0, _ModelUtil.is)(businessObject.attachedToRef, 'bpmn:Transaction')) {
- return false;
- }
+/**
+ * Remove an element from the registry.
+ *
+ * @param {ElementLike|string} element
+ */
+ElementRegistry.prototype.remove = function(element) {
+ var elements = this._elements,
+ id = element.id || element,
+ container = id && elements[id];
- var cancelActivity = target.cancelActivity !== false;
- var isCancelActivityEqual = businessObject.cancelActivity == cancelActivity;
- return differentType(entry) || !differentType(entry) && !isCancelActivityEqual;
- });
- return this._createEntries(element, entries);
- } // intermediate events
+ if (container) {
+ // unset element id on gfx
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(container.gfx, ELEMENT_ID, '');
- if ((0, _ModelUtil.is)(businessObject, 'bpmn:IntermediateCatchEvent') || (0, _ModelUtil.is)(businessObject, 'bpmn:IntermediateThrowEvent')) {
- entries = (0, _minDash.filter)(replaceOptions.INTERMEDIATE_EVENT, differentType);
- return this._createEntries(element, entries);
- } // gateways
+ if (container.secondaryGfx) {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(container.secondaryGfx, ELEMENT_ID, '');
+ }
+ delete elements[id];
+ }
+};
- if ((0, _ModelUtil.is)(businessObject, 'bpmn:Gateway')) {
- entries = (0, _minDash.filter)(replaceOptions.GATEWAY, differentType);
- return this._createEntries(element, entries);
- } // transactions
+/**
+ * Update an elements ID.
+ *
+ * @param {ElementLike|string} element The element or its ID.
+ * @param {string} newId The new ID.
+ */
+ElementRegistry.prototype.updateId = function(element, newId) {
+ this._validateId(newId);
- if ((0, _ModelUtil.is)(businessObject, 'bpmn:Transaction')) {
- entries = (0, _minDash.filter)(replaceOptions.TRANSACTION, differentType);
- return this._createEntries(element, entries);
- } // expanded event sub processes
+ if (typeof element === 'string') {
+ element = this.get(element);
+ }
+ this._eventBus.fire('element.updateId', {
+ element: element,
+ newId: newId
+ });
- if ((0, _DiUtil.isEventSubProcess)(businessObject) && (0, _DiUtil.isExpanded)(businessObject)) {
- entries = (0, _minDash.filter)(replaceOptions.EVENT_SUB_PROCESS, differentType);
- return this._createEntries(element, entries);
- } // expanded sub processes
+ var gfx = this.getGraphics(element),
+ secondaryGfx = this.getGraphics(element, true);
+ this.remove(element);
- if ((0, _ModelUtil.is)(businessObject, 'bpmn:SubProcess') && (0, _DiUtil.isExpanded)(businessObject)) {
- entries = (0, _minDash.filter)(replaceOptions.SUBPROCESS_EXPANDED, differentType);
- return this._createEntries(element, entries);
- } // collapsed ad hoc sub processes
+ element.id = newId;
+ this.add(element, gfx, secondaryGfx);
+};
- if ((0, _ModelUtil.is)(businessObject, 'bpmn:AdHocSubProcess') && !(0, _DiUtil.isExpanded)(businessObject)) {
- entries = (0, _minDash.filter)(replaceOptions.TASK, function (entry) {
- var target = entry.target;
- var isTargetSubProcess = target.type === 'bpmn:SubProcess';
- var isTargetExpanded = target.isExpanded === true;
- return (0, _TypeUtil.isDifferentType)(element, target) && (!isTargetSubProcess || isTargetExpanded);
- });
- return this._createEntries(element, entries);
- } // sequence flows
+/**
+ * Update the graphical representation of an element.
+ *
+ * @param {ElementLike|string} filter The element or its ID.
+ * @param {SVGElement} gfx The new graphical representation.
+ * @param {boolean} [secondary=false] Whether to update the secondary graphical representation.
+ */
+ElementRegistry.prototype.updateGraphics = function(filter, gfx, secondary) {
+ var id = filter.id || filter;
+ var container = this._elements[id];
- if ((0, _ModelUtil.is)(businessObject, 'bpmn:SequenceFlow')) {
- return this._createSequenceFlowEntries(element, replaceOptions.SEQUENCE_FLOW);
- } // flow nodes
+ if (secondary) {
+ container.secondaryGfx = gfx;
+ } else {
+ container.gfx = gfx;
+ }
+ if (gfx) {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(gfx, ELEMENT_ID, id);
+ }
- if ((0, _ModelUtil.is)(businessObject, 'bpmn:FlowNode')) {
- entries = (0, _minDash.filter)(replaceOptions.TASK, differentType); // collapsed SubProcess can not be replaced with itself
+ return gfx;
+};
- if ((0, _ModelUtil.is)(businessObject, 'bpmn:SubProcess') && !(0, _DiUtil.isExpanded)(businessObject)) {
- entries = (0, _minDash.filter)(entries, function (entry) {
- return entry.label !== 'Sub Process (collapsed)';
- });
- }
+/**
+ * Get the element with the given ID or graphical representation.
+ *
+ * @example
+ *
+ * ```javascript
+ * elementRegistry.get('SomeElementId_1');
+ *
+ * elementRegistry.get(gfx);
+ * ```
+ *
+ * @param {string|SVGElement} filter The elements ID or graphical representation.
+ *
+ * @return {ElementLike|undefined} The element.
+ */
+ElementRegistry.prototype.get = function(filter) {
+ var id;
- return this._createEntries(element, entries);
- }
+ if (typeof filter === 'string') {
+ id = filter;
+ } else {
+ id = filter && (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(filter, ELEMENT_ID);
+ }
- return [];
- };
- /**
- * Get a list of header items for the given element. This includes buttons
- * for multi instance markers and for the ad hoc marker.
- *
- * @param {djs.model.Base} element
- *
- * @return {Array} a list of menu entry items
- */
+ var container = this._elements[id];
+ return container && container.element;
+};
+/**
+ * Return all elements that match a given filter function.
+ *
+ * @param {ElementRegistryFilterCallback} fn The filter function.
+ *
+ * @return {ElementLike[]} The matching elements.
+ */
+ElementRegistry.prototype.filter = function(fn) {
- ReplaceMenuProvider.prototype.getHeaderEntries = function (element) {
- var headerEntries = [];
+ var filtered = [];
- if ((0, _ModelUtil.is)(element, 'bpmn:Activity') && !(0, _DiUtil.isEventSubProcess)(element)) {
- headerEntries = headerEntries.concat(this._getLoopEntries(element));
- }
+ this.forEach(function(element, gfx) {
+ if (fn(element, gfx)) {
+ filtered.push(element);
+ }
+ });
- if ((0, _ModelUtil.is)(element, 'bpmn:SubProcess') && !(0, _ModelUtil.is)(element, 'bpmn:Transaction') && !(0, _DiUtil.isEventSubProcess)(element)) {
- headerEntries.push(this._getAdHocEntry(element));
- }
+ return filtered;
+};
- return headerEntries;
- };
- /**
- * Creates an array of menu entry objects for a given element and filters the replaceOptions
- * according to a filter function.
- *
- * @param {djs.model.Base} element
- * @param {Object} replaceOptions
- *
- * @return {Array} a list of menu items
- */
+/**
+ * Return the first element that matches the given filter function.
+ *
+ * @param {ElementRegistryFilterCallback} fn The filter function.
+ *
+ * @return {ElementLike|undefined} The matching element.
+ */
+ElementRegistry.prototype.find = function(fn) {
+ var map = this._elements,
+ keys = Object.keys(map);
+
+ for (var i = 0; i < keys.length; i++) {
+ var id = keys[i],
+ container = map[id],
+ element = container.element,
+ gfx = container.gfx;
+
+ if (fn(element, gfx)) {
+ return element;
+ }
+ }
+};
+
+/**
+ * Get all elements.
+ *
+ * @return {ElementLike[]} All elements.
+ */
+ElementRegistry.prototype.getAll = function() {
+ return this.filter(function(e) { return e; });
+};
+/**
+ * Execute a given function for each element.
+ *
+ * @param {ElementRegistryForEachCallback} fn The function to execute.
+ */
+ElementRegistry.prototype.forEach = function(fn) {
- ReplaceMenuProvider.prototype._createEntries = function (element, replaceOptions) {
- var menuEntries = [];
- var self = this;
- (0, _minDash.forEach)(replaceOptions, function (definition) {
- var entry = self._createMenuEntry(definition, element);
+ var map = this._elements;
- menuEntries.push(entry);
- });
- return menuEntries;
- };
- /**
- * Creates an array of menu entry objects for a given sequence flow.
- *
- * @param {djs.model.Base} element
- * @param {Object} replaceOptions
+ Object.keys(map).forEach(function(id) {
+ var container = map[id],
+ element = container.element,
+ gfx = container.gfx;
- * @return {Array} a list of menu items
- */
+ return fn(element, gfx);
+ });
+};
+/**
+ * Return the graphical representation of an element.
+ *
+ * @example
+ *
+ * ```javascript
+ * elementRegistry.getGraphics('SomeElementId_1');
+ *
+ * elementRegistry.getGraphics(rootElement); //
+ *
+ * elementRegistry.getGraphics(rootElement, true); //
+ * ```
+ *
+ * @param {ElementLike|string} filter The element or its ID.
+ * @param {boolean} [secondary=false] Whether to return the secondary graphical representation.
+ *
+ * @return {SVGElement} The graphical representation.
+ */
+ElementRegistry.prototype.getGraphics = function(filter, secondary) {
+ var id = filter.id || filter;
- ReplaceMenuProvider.prototype._createSequenceFlowEntries = function (element, replaceOptions) {
- var businessObject = (0, _ModelUtil.getBusinessObject)(element);
- var menuEntries = [];
- var modeling = this._modeling,
- moddle = this._moddle;
- var self = this;
- (0, _minDash.forEach)(replaceOptions, function (entry) {
- switch (entry.actionName) {
- case 'replace-with-default-flow':
- if (businessObject.sourceRef.default !== businessObject && ((0, _ModelUtil.is)(businessObject.sourceRef, 'bpmn:ExclusiveGateway') || (0, _ModelUtil.is)(businessObject.sourceRef, 'bpmn:InclusiveGateway') || (0, _ModelUtil.is)(businessObject.sourceRef, 'bpmn:ComplexGateway') || (0, _ModelUtil.is)(businessObject.sourceRef, 'bpmn:Activity'))) {
- menuEntries.push(self._createMenuEntry(entry, element, function () {
- modeling.updateProperties(element.source, {
- default: businessObject
- });
- }));
- }
+ var container = this._elements[id];
+ return container && (secondary ? container.secondaryGfx : container.gfx);
+};
- break;
+/**
+ * Validate an ID and throw an error if invalid.
+ *
+ * @param {string} id
+ *
+ * @throws {Error} Error indicating that the ID is invalid or already assigned.
+ */
+ElementRegistry.prototype._validateId = function(id) {
+ if (!id) {
+ throw new Error('element must have an id');
+ }
- case 'replace-with-conditional-flow':
- if (!businessObject.conditionExpression && (0, _ModelUtil.is)(businessObject.sourceRef, 'bpmn:Activity')) {
- menuEntries.push(self._createMenuEntry(entry, element, function () {
- var conditionExpression = moddle.create('bpmn:FormalExpression', {
- body: ''
- });
- modeling.updateProperties(element, {
- conditionExpression: conditionExpression
- });
- }));
- }
+ if (this._elements[id]) {
+ throw new Error('element with id ' + id + ' already added');
+ }
+};
- break;
- default:
- // default flows
- if ((0, _ModelUtil.is)(businessObject.sourceRef, 'bpmn:Activity') && businessObject.conditionExpression) {
- return menuEntries.push(self._createMenuEntry(entry, element, function () {
- modeling.updateProperties(element, {
- conditionExpression: undefined
- });
- }));
- } // conditional flows
-
-
- if (((0, _ModelUtil.is)(businessObject.sourceRef, 'bpmn:ExclusiveGateway') || (0, _ModelUtil.is)(businessObject.sourceRef, 'bpmn:InclusiveGateway') || (0, _ModelUtil.is)(businessObject.sourceRef, 'bpmn:ComplexGateway') || (0, _ModelUtil.is)(businessObject.sourceRef, 'bpmn:Activity')) && businessObject.sourceRef.default === businessObject) {
- return menuEntries.push(self._createMenuEntry(entry, element, function () {
- modeling.updateProperties(element.source, {
- default: undefined
- });
- }));
- }
+/***/ }),
- }
- });
- return menuEntries;
- };
- /**
- * Creates and returns a single menu entry item.
- *
- * @param {Object} definition a single replace options definition object
- * @param {djs.model.Base} element
- * @param {Function} [action] an action callback function which gets called when
- * the menu entry is being triggered.
- *
- * @return {Object} menu entry item
- */
+/***/ "../node_modules/diagram-js/lib/core/EventBus.js":
+/*!*******************************************************!*\
+ !*** ../node_modules/diagram-js/lib/core/EventBus.js ***!
+ \*******************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ EventBus)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
- ReplaceMenuProvider.prototype._createMenuEntry = function (definition, element, action) {
- var translate = this._translate;
- var replaceElement = this._bpmnReplace.replaceElement;
- var replaceAction = function () {
- return replaceElement(element, definition.target);
- };
+var FN_REF = '__fn';
- action = action || replaceAction;
- var menuEntry = {
- label: translate(definition.label),
- className: definition.className,
- id: definition.actionName,
- action: action
- };
- return menuEntry;
- };
- /**
- * Get a list of menu items containing buttons for multi instance markers
- *
- * @param {djs.model.Base} element
- *
- * @return {Array} a list of menu items
- */
+var DEFAULT_PRIORITY = 1000;
+var slice = Array.prototype.slice;
- ReplaceMenuProvider.prototype._getLoopEntries = function (element) {
- var self = this;
- var translate = this._translate;
+/**
+ * @typedef { {
+ * stopPropagation(): void;
+ * preventDefault(): void;
+ * cancelBubble: boolean;
+ * defaultPrevented: boolean;
+ * returnValue: any;
+ * } } Event
+ */
- function toggleLoopEntry(event, entry) {
- var loopCharacteristics;
+/**
+ * @template E
+ *
+ * @typedef { (event: E & Event, ...any) => any } EventBusEventCallback
+ */
- if (entry.active) {
- loopCharacteristics = undefined;
- } else {
- loopCharacteristics = self._moddle.create(entry.options.loopCharacteristics);
+/**
+ * @typedef { {
+ * priority: number;
+ * next: EventBusListener | null;
+ * callback: EventBusEventCallback;
+ * } } EventBusListener
+ */
- if (entry.options.isSequential) {
- loopCharacteristics.isSequential = entry.options.isSequential;
- }
- }
+/**
+ * A general purpose event bus.
+ *
+ * This component is used to communicate across a diagram instance.
+ * Other parts of a diagram can use it to listen to and broadcast events.
+ *
+ *
+ * ## Registering for Events
+ *
+ * The event bus provides the {@link EventBus#on} and {@link EventBus#once}
+ * methods to register for events. {@link EventBus#off} can be used to
+ * remove event registrations. Listeners receive an instance of {@link Event}
+ * as the first argument. It allows them to hook into the event execution.
+ *
+ * ```javascript
+ *
+ * // listen for event
+ * eventBus.on('foo', function(event) {
+ *
+ * // access event type
+ * event.type; // 'foo'
+ *
+ * // stop propagation to other listeners
+ * event.stopPropagation();
+ *
+ * // prevent event default
+ * event.preventDefault();
+ * });
+ *
+ * // listen for event with custom payload
+ * eventBus.on('bar', function(event, payload) {
+ * console.log(payload);
+ * });
+ *
+ * // listen for event returning value
+ * eventBus.on('foobar', function(event) {
+ *
+ * // stop event propagation + prevent default
+ * return false;
+ *
+ * // stop event propagation + return custom result
+ * return {
+ * complex: 'listening result'
+ * };
+ * });
+ *
+ *
+ * // listen with custom priority (default=1000, higher is better)
+ * eventBus.on('priorityfoo', 1500, function(event) {
+ * console.log('invoked first!');
+ * });
+ *
+ *
+ * // listen for event and pass the context (`this`)
+ * eventBus.on('foobar', function(event) {
+ * this.foo();
+ * }, this);
+ * ```
+ *
+ *
+ * ## Emitting Events
+ *
+ * Events can be emitted via the event bus using {@link EventBus#fire}.
+ *
+ * ```javascript
+ *
+ * // false indicates that the default action
+ * // was prevented by listeners
+ * if (eventBus.fire('foo') === false) {
+ * console.log('default has been prevented!');
+ * };
+ *
+ *
+ * // custom args + return value listener
+ * eventBus.on('sum', function(event, a, b) {
+ * return a + b;
+ * });
+ *
+ * // you can pass custom arguments + retrieve result values.
+ * var sum = eventBus.fire('sum', 1, 2);
+ * console.log(sum); // 3
+ * ```
+ */
+function EventBus() {
- self._modeling.updateProperties(element, {
- loopCharacteristics: loopCharacteristics
- });
- }
+ /**
+ * @type { Record }
+ */
+ this._listeners = {};
- var businessObject = (0, _ModelUtil.getBusinessObject)(element),
- loopCharacteristics = businessObject.loopCharacteristics;
- var isSequential, isLoop, isParallel;
+ // cleanup on destroy on lowest priority to allow
+ // message passing until the bitter end
+ this.on('diagram.destroy', 1, this._destroy, this);
+}
- if (loopCharacteristics) {
- isSequential = loopCharacteristics.isSequential;
- isLoop = loopCharacteristics.isSequential === undefined;
- isParallel = loopCharacteristics.isSequential !== undefined && !loopCharacteristics.isSequential;
- }
- var loopEntries = [{
- id: 'toggle-parallel-mi',
- className: 'bpmn-icon-parallel-mi-marker',
- title: translate('Parallel Multi Instance'),
- active: isParallel,
- action: toggleLoopEntry,
- options: {
- loopCharacteristics: 'bpmn:MultiInstanceLoopCharacteristics',
- isSequential: false
- }
- }, {
- id: 'toggle-sequential-mi',
- className: 'bpmn-icon-sequential-mi-marker',
- title: translate('Sequential Multi Instance'),
- active: isSequential,
- action: toggleLoopEntry,
- options: {
- loopCharacteristics: 'bpmn:MultiInstanceLoopCharacteristics',
- isSequential: true
- }
- }, {
- id: 'toggle-loop',
- className: 'bpmn-icon-loop-marker',
- title: translate('Loop'),
- active: isLoop,
- action: toggleLoopEntry,
- options: {
- loopCharacteristics: 'bpmn:StandardLoopCharacteristics'
- }
- }];
- return loopEntries;
- };
- /**
- * Get the menu items containing a button for the ad hoc marker
- *
- * @param {djs.model.Base} element
- *
- * @return {Object} a menu item
- */
+/**
+ * Register an event listener for events with the given name.
+ *
+ * The callback will be invoked with `event, ...additionalArguments`
+ * that have been passed to {@link EventBus#fire}.
+ *
+ * Returning false from a listener will prevent the events default action
+ * (if any is specified). To stop an event from being processed further in
+ * other listeners execute {@link Event#stopPropagation}.
+ *
+ * Returning anything but `undefined` from a listener will stop the listener propagation.
+ *
+ * @template T
+ *
+ * @param {string|string[]} events to subscribe to
+ * @param {number} [priority=1000] listen priority
+ * @param {EventBusEventCallback} callback
+ * @param {any} [that] callback context
+ */
+EventBus.prototype.on = function(events, priority, callback, that) {
+ events = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(events) ? events : [ events ];
- ReplaceMenuProvider.prototype._getAdHocEntry = function (element) {
- var translate = this._translate;
- var businessObject = (0, _ModelUtil.getBusinessObject)(element);
- var isAdHoc = (0, _ModelUtil.is)(businessObject, 'bpmn:AdHocSubProcess');
- var replaceElement = this._bpmnReplace.replaceElement;
- var adHocEntry = {
- id: 'toggle-adhoc',
- className: 'bpmn-icon-ad-hoc-marker',
- title: translate('Ad-hoc'),
- active: isAdHoc,
- action: function (event, entry) {
- if (isAdHoc) {
- return replaceElement(element, {
- type: 'bpmn:SubProcess'
- }, {
- autoResize: false,
- layoutConnection: false
- });
- } else {
- return replaceElement(element, {
- type: 'bpmn:AdHocSubProcess'
- }, {
- autoResize: false,
- layoutConnection: false
- });
- }
- }
- };
- return adHocEntry;
- };
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isFunction)(priority)) {
+ that = callback;
+ callback = priority;
+ priority = DEFAULT_PRIORITY;
+ }
- },{"../../util/DiUtil":238,"../../util/ModelUtil":240,"../replace/ReplaceOptions":222,"./util/TypeUtil":218,"min-dash":646}],217:[function(require,module,exports){
- "use strict";
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(priority)) {
+ throw new Error('priority must be a number');
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+ var actualCallback = callback;
- var _popupMenu = _interopRequireDefault(require("diagram-js/lib/features/popup-menu"));
+ if (that) {
+ actualCallback = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.bind)(callback, that);
- var _replace = _interopRequireDefault(require("../replace"));
+ // make sure we remember and are able to remove
+ // bound callbacks via {@link #off} using the original
+ // callback
+ actualCallback[FN_REF] = callback[FN_REF] || callback;
+ }
- var _ReplaceMenuProvider = _interopRequireDefault(require("./ReplaceMenuProvider"));
+ var self = this;
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ events.forEach(function(e) {
+ self._addListener(e, {
+ priority: priority,
+ callback: actualCallback,
+ next: null
+ });
+ });
+};
- var _default = {
- __depends__: [_popupMenu.default, _replace.default],
- __init__: ['replaceMenuProvider'],
- replaceMenuProvider: ['type', _ReplaceMenuProvider.default]
- };
- exports.default = _default;
+/**
+ * Register an event listener that is called only once.
+ *
+ * @template T
+ *
+ * @param {string|string[]} events to subscribe to
+ * @param {number} [priority=1000] the listen priority
+ * @param {EventBusEventCallback} callback
+ * @param {any} [that] callback context
+ */
+EventBus.prototype.once = function(events, priority, callback, that) {
+ var self = this;
- },{"../replace":223,"./ReplaceMenuProvider":216,"diagram-js/lib/features/popup-menu":365}],218:[function(require,module,exports){
- "use strict";
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isFunction)(priority)) {
+ that = callback;
+ callback = priority;
+ priority = DEFAULT_PRIORITY;
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.isDifferentType = isDifferentType;
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(priority)) {
+ throw new Error('priority must be a number');
+ }
- var _ModelUtil = require("../../../util/ModelUtil");
+ function wrappedCallback() {
+ wrappedCallback.__isTomb = true;
- var _DiUtil = require("../../../util/DiUtil");
+ var result = callback.apply(that, arguments);
- /**
- * Returns true, if an element is from a different type
- * than a target definition. Takes into account the type,
- * event definition type and triggeredByEvent property.
- *
- * @param {djs.model.Base} element
- *
- * @return {boolean}
- */
- function isDifferentType(element) {
- return function (entry) {
- var target = entry.target;
- var businessObject = (0, _ModelUtil.getBusinessObject)(element),
- eventDefinition = businessObject.eventDefinitions && businessObject.eventDefinitions[0];
- var isTypeEqual = businessObject.$type === target.type;
- var isEventDefinitionEqual = (eventDefinition && eventDefinition.$type) === target.eventDefinitionType;
- var isTriggeredByEventEqual = businessObject.triggeredByEvent === target.triggeredByEvent;
- var isExpandedEqual = target.isExpanded === undefined || target.isExpanded === (0, _DiUtil.isExpanded)(businessObject);
- return !isTypeEqual || !isEventDefinitionEqual || !isTriggeredByEventEqual || !isExpandedEqual;
- };
- }
+ self.off(events, wrappedCallback);
- },{"../../../util/DiUtil":238,"../../../util/ModelUtil":240}],219:[function(require,module,exports){
- "use strict";
+ return result;
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BpmnReplacePreview;
+ // make sure we remember and are able to remove
+ // bound callbacks via {@link #off} using the original
+ // callback
+ wrappedCallback[FN_REF] = callback;
- var _CommandInterceptor = _interopRequireDefault(require("diagram-js/lib/command/CommandInterceptor"));
+ this.on(events, priority, wrappedCallback);
+};
- var _inherits = _interopRequireDefault(require("inherits"));
- var _css = _interopRequireDefault(require("css.escape"));
+/**
+ * Removes event listeners by event and callback.
+ *
+ * If no callback is given, all listeners for a given event name are being removed.
+ *
+ * @param {string|string[]} events
+ * @param {EventBusEventCallback} [callback]
+ */
+EventBus.prototype.off = function(events, callback) {
- var _minDash = require("min-dash");
+ events = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(events) ? events : [ events ];
- var _minDom = require("min-dom");
+ var self = this;
- var _tinySvg = require("tiny-svg");
+ events.forEach(function(event) {
+ self._removeListener(event, callback);
+ });
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+};
- var LOW_PRIORITY = 250;
- function BpmnReplacePreview(eventBus, elementRegistry, elementFactory, canvas, previewSupport) {
- _CommandInterceptor.default.call(this, eventBus);
- /**
- * Replace the visuals of all elements in the context which can be replaced
- *
- * @param {Object} context
- */
+/**
+ * Create an event recognized be the event bus.
+ *
+ * @param {Object} data Event data.
+ *
+ * @return {Event} An event that will be recognized by the event bus.
+ */
+EventBus.prototype.createEvent = function(data) {
+ var event = new InternalEvent();
+ event.init(data);
- function replaceVisual(context) {
- var replacements = context.canExecute.replacements;
- (0, _minDash.forEach)(replacements, function (replacement) {
- var id = replacement.oldElementId;
- var newElement = {
- type: replacement.newElementType
- }; // if the visual of the element is already replaced
+ return event;
+};
- if (context.visualReplacements[id]) {
- return;
- }
- var element = elementRegistry.get(id);
- (0, _minDash.assign)(newElement, {
- x: element.x,
- y: element.y
- }); // create a temporary shape
+/**
+ * Fires an event.
+ *
+ * @example
+ *
+ * ```javascript
+ * // fire event by name
+ * events.fire('foo');
+ *
+ * // fire event object with nested type
+ * var event = { type: 'foo' };
+ * events.fire(event);
+ *
+ * // fire event with explicit type
+ * var event = { x: 10, y: 20 };
+ * events.fire('element.moved', event);
+ *
+ * // pass additional arguments to the event
+ * events.on('foo', function(event, bar) {
+ * alert(bar);
+ * });
+ *
+ * events.fire({ type: 'foo' }, 'I am bar!');
+ * ```
+ *
+ * @param {string} [type] event type
+ * @param {Object} [data] event or event data
+ * @param {...any} [args] additional arguments the callback will be called with.
+ *
+ * @return {any} The return value. Will be set to `false` if the default was prevented.
+ */
+EventBus.prototype.fire = function(type, data) {
+ var event,
+ firstListener,
+ returnValue,
+ args;
+
+ args = slice.call(arguments);
+
+ if (typeof type === 'object') {
+ data = type;
+ type = data.type;
+ }
+
+ if (!type) {
+ throw new Error('no event type specified');
+ }
+
+ firstListener = this._listeners[type];
+
+ if (!firstListener) {
+ return;
+ }
+
+ // we make sure we fire instances of our home made
+ // events here. We wrap them only once, though
+ if (data instanceof InternalEvent) {
+
+ // we are fine, we alread have an event
+ event = data;
+ } else {
+ event = this.createEvent(data);
+ }
+
+ // ensure we pass the event as the first parameter
+ args[0] = event;
+
+ // original event type (in case we delegate)
+ var originalType = event.type;
+
+ // update event type before delegation
+ if (type !== originalType) {
+ event.type = type;
+ }
+
+ try {
+ returnValue = this._invokeListeners(event, args, firstListener);
+ } finally {
+
+ // reset event type after delegation
+ if (type !== originalType) {
+ event.type = originalType;
+ }
+ }
+
+ // set the return value to false if the event default
+ // got prevented and no other return value exists
+ if (returnValue === undefined && event.defaultPrevented) {
+ returnValue = false;
+ }
+
+ return returnValue;
+};
+
+/**
+ * Handle an error by firing an event.
+ *
+ * @param {Error} error The error to be handled.
+ *
+ * @return {boolean} Whether the error was handled.
+ */
+EventBus.prototype.handleError = function(error) {
+ return this.fire('error', { error: error }) === false;
+};
- var tempShape = elementFactory.createShape(newElement);
- canvas.addShape(tempShape, element.parent); // select the original SVG element related to the element and hide it
- var gfx = (0, _minDom.query)('[data-element-id="' + (0, _css.default)(element.id) + '"]', context.dragGroup);
+EventBus.prototype._destroy = function() {
+ this._listeners = {};
+};
- if (gfx) {
- (0, _tinySvg.attr)(gfx, {
- display: 'none'
- });
- } // clone the gfx of the temporary shape and add it to the drag group
+/**
+ * @param {Event} event
+ * @param {any[]} args
+ * @param {EventBusListener} listener
+ *
+ * @return {any}
+ */
+EventBus.prototype._invokeListeners = function(event, args, listener) {
+ var returnValue;
- var dragger = previewSupport.addDragger(tempShape, context.dragGroup);
- context.visualReplacements[id] = dragger;
- canvas.removeShape(tempShape);
- });
- }
- /**
- * Restore the original visuals of the previously replaced elements
- *
- * @param {Object} context
- */
+ while (listener) {
+ // handle stopped propagation
+ if (event.cancelBubble) {
+ break;
+ }
- function restoreVisual(context) {
- var visualReplacements = context.visualReplacements;
- (0, _minDash.forEach)(visualReplacements, function (dragger, id) {
- var originalGfx = (0, _minDom.query)('[data-element-id="' + (0, _css.default)(id) + '"]', context.dragGroup);
+ returnValue = this._invokeListener(event, args, listener);
- if (originalGfx) {
- (0, _tinySvg.attr)(originalGfx, {
- display: 'inline'
- });
- }
+ listener = listener.next;
+ }
- dragger.remove();
+ return returnValue;
+};
- if (visualReplacements[id]) {
- delete visualReplacements[id];
- }
- });
- }
+/**
+ * @param {Event} event
+ * @param {any[]} args
+ * @param {EventBusListener} listener
+ *
+ * @return {any}
+ */
+EventBus.prototype._invokeListener = function(event, args, listener) {
- eventBus.on('shape.move.move', LOW_PRIORITY, function (event) {
- var context = event.context,
- canExecute = context.canExecute;
+ var returnValue;
- if (!context.visualReplacements) {
- context.visualReplacements = {};
- }
+ if (listener.callback.__isTomb) {
+ return returnValue;
+ }
- if (canExecute && canExecute.replacements) {
- replaceVisual(context);
- } else {
- restoreVisual(context);
- }
- });
- }
+ try {
- BpmnReplacePreview.$inject = ['eventBus', 'elementRegistry', 'elementFactory', 'canvas', 'previewSupport'];
- (0, _inherits.default)(BpmnReplacePreview, _CommandInterceptor.default);
+ // returning false prevents the default action
+ returnValue = invokeFunction(listener.callback, args);
- },{"css.escape":244,"diagram-js/lib/command/CommandInterceptor":250,"inherits":438,"min-dash":646,"min-dom":647,"tiny-svg":658}],220:[function(require,module,exports){
- "use strict";
+ // stop propagation on return value
+ if (returnValue !== undefined) {
+ event.returnValue = returnValue;
+ event.stopPropagation();
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+ // prevent default on return false
+ if (returnValue === false) {
+ event.preventDefault();
+ }
+ } catch (error) {
+ if (!this.handleError(error)) {
+ console.error('unhandled error in event listener', error);
- var _previewSupport = _interopRequireDefault(require("diagram-js/lib/features/preview-support"));
+ throw error;
+ }
+ }
- var _BpmnReplacePreview = _interopRequireDefault(require("./BpmnReplacePreview"));
+ return returnValue;
+};
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+/**
+ * Add new listener with a certain priority to the list
+ * of listeners (for the given event).
+ *
+ * The semantics of listener registration / listener execution are
+ * first register, first serve: New listeners will always be inserted
+ * after existing listeners with the same priority.
+ *
+ * Example: Inserting two listeners with priority 1000 and 1300
+ *
+ * * before: [ 1500, 1500, 1000, 1000 ]
+ * * after: [ 1500, 1500, (new=1300), 1000, 1000, (new=1000) ]
+ *
+ * @param {string} event
+ * @param {EventBusListener} newListener
+ */
+EventBus.prototype._addListener = function(event, newListener) {
- var _default = {
- __depends__: [_previewSupport.default],
- __init__: ['bpmnReplacePreview'],
- bpmnReplacePreview: ['type', _BpmnReplacePreview.default]
- };
- exports.default = _default;
+ var listener = this._getListeners(event),
+ previousListener;
- },{"./BpmnReplacePreview":219,"diagram-js/lib/features/preview-support":367}],221:[function(require,module,exports){
- "use strict";
+ // no prior listeners
+ if (!listener) {
+ this._setListeners(event, newListener);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BpmnReplace;
+ return;
+ }
- var _minDash = require("min-dash");
+ // ensure we order listeners by priority from
+ // 0 (high) to n > 0 (low)
+ while (listener) {
- var _ModelUtil = require("../../util/ModelUtil");
+ if (listener.priority < newListener.priority) {
- var _ModelingUtil = require("../modeling/util/ModelingUtil");
+ newListener.next = listener;
- var _DiUtil = require("../../util/DiUtil");
+ if (previousListener) {
+ previousListener.next = newListener;
+ } else {
+ this._setListeners(event, newListener);
+ }
- var _ModdleCopy = require("../copy-paste/ModdleCopy");
+ return;
+ }
- function copyProperties(source, target, properties) {
- if (!(0, _minDash.isArray)(properties)) {
- properties = [properties];
- }
+ previousListener = listener;
+ listener = listener.next;
+ }
- (0, _minDash.forEach)(properties, function (property) {
- if (!(0, _minDash.isUndefined)(source[property])) {
- target[property] = source[property];
- }
- });
- }
+ // add new listener to back
+ previousListener.next = newListener;
+};
- var CUSTOM_PROPERTIES = ['cancelActivity', 'instantiate', 'eventGatewayType', 'triggeredByEvent', 'isInterrupting'];
- function toggeling(element, target) {
- var oldCollapsed = element && (0, _minDash.has)(element, 'collapsed') ? element.collapsed : !(0, _DiUtil.isExpanded)(element);
- var targetCollapsed;
+/**
+ * @param {string} name
+ *
+ * @return {EventBusListener}
+ */
+EventBus.prototype._getListeners = function(name) {
+ return this._listeners[name];
+};
- if (target && ((0, _minDash.has)(target, 'collapsed') || (0, _minDash.has)(target, 'isExpanded'))) {
- // property is explicitly set so use it
- targetCollapsed = (0, _minDash.has)(target, 'collapsed') ? target.collapsed : !target.isExpanded;
- } else {
- // keep old state
- targetCollapsed = oldCollapsed;
- }
+/**
+ * @param {string} name
+ * @param {EventBusListener} listener
+ */
+EventBus.prototype._setListeners = function(name, listener) {
+ this._listeners[name] = listener;
+};
- if (oldCollapsed !== targetCollapsed) {
- element.collapsed = oldCollapsed;
- return true;
- }
+EventBus.prototype._removeListener = function(event, callback) {
- return false;
- }
- /**
- * This module takes care of replacing BPMN elements
- */
+ var listener = this._getListeners(event),
+ nextListener,
+ previousListener,
+ listenerCallback;
+ if (!callback) {
- function BpmnReplace(bpmnFactory, elementFactory, moddleCopy, modeling, replace, selection) {
- /**
- * Prepares a new business object for the replacement element
- * and triggers the replace operation.
- *
- * @param {djs.model.Base} element
- * @param {Object} target
- * @param {Object} [hints]
- *
- * @return {djs.model.Base} the newly created element
- */
- function replaceElement(element, target, hints) {
- hints = hints || {};
- var type = target.type,
- oldBusinessObject = element.businessObject;
-
- if (isSubProcess(oldBusinessObject)) {
- if (type === 'bpmn:SubProcess') {
- if (toggeling(element, target)) {
- // expanding or collapsing process
- modeling.toggleCollapse(element);
- return element;
- }
- }
- }
+ // clear listeners
+ this._setListeners(event, null);
- var newBusinessObject = bpmnFactory.create(type);
- var newElement = {
- type: type,
- businessObject: newBusinessObject
- };
- var elementProps = (0, _ModdleCopy.getPropertyNames)(oldBusinessObject.$descriptor),
- newElementProps = (0, _ModdleCopy.getPropertyNames)(newBusinessObject.$descriptor, true),
- copyProps = intersection(elementProps, newElementProps); // initialize special properties defined in target definition
+ return;
+ }
- (0, _minDash.assign)(newBusinessObject, (0, _minDash.pick)(target, CUSTOM_PROPERTIES));
- var properties = (0, _minDash.filter)(copyProps, function (propertyName) {
- // copying event definitions, unless we replace
- if (propertyName === 'eventDefinitions') {
- return hasEventDefinition(element, target.eventDefinitionType);
- } // retain loop characteristics if the target element
- // is not an event sub process
+ while (listener) {
+ nextListener = listener.next;
- if (propertyName === 'loopCharacteristics') {
- return !(0, _DiUtil.isEventSubProcess)(newBusinessObject);
- } // so the applied properties from 'target' don't get lost
+ listenerCallback = listener.callback;
+ if (listenerCallback === callback || listenerCallback[FN_REF] === callback) {
+ if (previousListener) {
+ previousListener.next = nextListener;
+ } else {
- if (newBusinessObject.hasOwnProperty(propertyName)) {
- return false;
- }
+ // new first listener
+ this._setListeners(event, nextListener);
+ }
+ }
- if (propertyName === 'processRef' && target.isExpanded === false) {
- return false;
- }
+ previousListener = listener;
+ listener = nextListener;
+ }
+};
- if (propertyName === 'triggeredByEvent') {
- return false;
- }
+/**
+ * A event that is emitted via the event bus.
+ */
+function InternalEvent() { }
- return true;
- });
- newBusinessObject = moddleCopy.copyElement(oldBusinessObject, newBusinessObject, properties); // initialize custom BPMN extensions
-
- if (target.eventDefinitionType) {
- // only initialize with new eventDefinition
- // if we did not set an event definition yet,
- // i.e. because we copied it
- if (!hasEventDefinition(newBusinessObject, target.eventDefinitionType)) {
- newElement.eventDefinitionType = target.eventDefinitionType;
- newElement.eventDefinitionAttrs = target.eventDefinitionAttrs;
- }
- }
+InternalEvent.prototype.stopPropagation = function() {
+ this.cancelBubble = true;
+};
- if ((0, _ModelUtil.is)(oldBusinessObject, 'bpmn:Activity')) {
- if (isSubProcess(oldBusinessObject)) {
- // no toggeling, so keep old state
- newElement.isExpanded = (0, _DiUtil.isExpanded)(oldBusinessObject);
- } // else if property is explicitly set, use it
- else if (target && (0, _minDash.has)(target, 'isExpanded')) {
- newElement.isExpanded = target.isExpanded;
- } // TODO: need also to respect min/max Size
- // copy size, from an expanded subprocess to an expanded alternative subprocess
- // except bpmn:Task, because Task is always expanded
-
-
- if ((0, _DiUtil.isExpanded)(oldBusinessObject) && !(0, _ModelUtil.is)(oldBusinessObject, 'bpmn:Task') && newElement.isExpanded) {
- newElement.width = element.width;
- newElement.height = element.height;
- }
- } // remove children if not expanding sub process
+InternalEvent.prototype.preventDefault = function() {
+ this.defaultPrevented = true;
+};
+InternalEvent.prototype.init = function(data) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(this, data || {});
+};
- if (isSubProcess(oldBusinessObject) && !isSubProcess(newBusinessObject)) {
- hints.moveChildren = false;
- } // transform collapsed/expanded pools
+/**
+ * Invoke function. Be fast...
+ *
+ * @param {Function} fn
+ * @param {any[]} args
+ *
+ * @return {any}
+ */
+function invokeFunction(fn, args) {
+ return fn.apply(null, args);
+}
- if ((0, _ModelUtil.is)(oldBusinessObject, 'bpmn:Participant')) {
- // create expanded pool
- if (target.isExpanded === true) {
- newBusinessObject.processRef = bpmnFactory.create('bpmn:Process');
- } else {
- // remove children when transforming to collapsed pool
- hints.moveChildren = false;
- } // apply same width and default height
+/***/ }),
- newElement.width = element.width;
- newElement.height = elementFactory._getDefaultSize(newBusinessObject).height;
- }
+/***/ "../node_modules/diagram-js/lib/core/GraphicsFactory.js":
+/*!**************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/core/GraphicsFactory.js ***!
+ \**************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- newBusinessObject.name = oldBusinessObject.name; // retain default flow's reference between inclusive <-> exclusive gateways and activities
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ GraphicsFactory)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _util_GraphicsUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/GraphicsUtil */ "../node_modules/diagram-js/lib/util/GraphicsUtil.js");
+/* harmony import */ var _util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/SvgTransformUtil */ "../node_modules/diagram-js/lib/util/SvgTransformUtil.js");
+/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dom */ "../node_modules/min-dom/dist/index.esm.js");
+/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tiny-svg */ "../node_modules/tiny-svg/dist/index.esm.js");
+/* harmony import */ var _util_Elements__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/Elements */ "../node_modules/diagram-js/lib/util/Elements.js");
- if ((0, _ModelingUtil.isAny)(oldBusinessObject, ['bpmn:ExclusiveGateway', 'bpmn:InclusiveGateway', 'bpmn:Activity']) && (0, _ModelingUtil.isAny)(newBusinessObject, ['bpmn:ExclusiveGateway', 'bpmn:InclusiveGateway', 'bpmn:Activity'])) {
- newBusinessObject.default = oldBusinessObject.default;
- }
- if (target.host && !(0, _ModelUtil.is)(oldBusinessObject, 'bpmn:BoundaryEvent') && (0, _ModelUtil.is)(newBusinessObject, 'bpmn:BoundaryEvent')) {
- newElement.host = target.host;
- }
- newElement.di = {}; // fill and stroke will be set to DI
- copyProperties(oldBusinessObject.di, newElement.di, ['fill', 'stroke']);
- newElement = replace.replaceElement(element, newElement, hints);
- if (hints.select !== false) {
- selection.select(newElement);
- }
- return newElement;
- }
- this.replaceElement = replaceElement;
- }
- BpmnReplace.$inject = ['bpmnFactory', 'elementFactory', 'moddleCopy', 'modeling', 'replace', 'selection'];
- function isSubProcess(bo) {
- return (0, _ModelUtil.is)(bo, 'bpmn:SubProcess');
- }
- function hasEventDefinition(element, type) {
- var bo = (0, _ModelUtil.getBusinessObject)(element);
- return type && bo.get('eventDefinitions').some(function (definition) {
- return (0, _ModelUtil.is)(definition, type);
- });
- }
- /**
- * Compute intersection between two arrays.
- */
- function intersection(a1, a2) {
- return a1.filter(function (el) {
- return a2.indexOf(el) !== -1;
- });
- }
+/**
+ * @typedef {import('./Types').ConnectionLike} ConnectionLike
+ * @typedef {import('./Types').ElementLike} ElementLike
+ * @typedef {import('./Types').ShapeLike} ShapeLike
+ *
+ * @typedef {import('./ElementRegistry').default} ElementRegistry
+ * @typedef {import('./EventBus').default} EventBus
+ */
- },{"../../util/DiUtil":238,"../../util/ModelUtil":240,"../copy-paste/ModdleCopy":132,"../modeling/util/ModelingUtil":211,"min-dash":646}],222:[function(require,module,exports){
- "use strict";
+/**
+ * A factory that creates graphical elements.
+ *
+ * @param {EventBus} eventBus
+ * @param {ElementRegistry} elementRegistry
+ */
+function GraphicsFactory(eventBus, elementRegistry) {
+ this._eventBus = eventBus;
+ this._elementRegistry = elementRegistry;
+}
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.PARTICIPANT = exports.SEQUENCE_FLOW = exports.EVENT_SUB_PROCESS_START_EVENT = exports.BOUNDARY_EVENT = exports.TASK = exports.EVENT_SUB_PROCESS = exports.TRANSACTION = exports.SUBPROCESS_EXPANDED = exports.GATEWAY = exports.END_EVENT = exports.INTERMEDIATE_EVENT = exports.START_EVENT = void 0;
- var START_EVENT = [{
- label: 'Start Event',
- actionName: 'replace-with-none-start',
- className: 'bpmn-icon-start-event-none',
- target: {
- type: 'bpmn:StartEvent'
- }
- }, {
- label: 'Intermediate Throw Event',
- actionName: 'replace-with-none-intermediate-throwing',
- className: 'bpmn-icon-intermediate-event-none',
- target: {
- type: 'bpmn:IntermediateThrowEvent'
- }
- }, {
- label: 'End Event',
- actionName: 'replace-with-none-end',
- className: 'bpmn-icon-end-event-none',
- target: {
- type: 'bpmn:EndEvent'
- }
- }, {
- label: 'Message Start Event',
- actionName: 'replace-with-message-start',
- className: 'bpmn-icon-start-event-message',
- target: {
- type: 'bpmn:StartEvent',
- eventDefinitionType: 'bpmn:MessageEventDefinition'
- }
- }, {
- label: 'Timer Start Event',
- actionName: 'replace-with-timer-start',
- className: 'bpmn-icon-start-event-timer',
- target: {
- type: 'bpmn:StartEvent',
- eventDefinitionType: 'bpmn:TimerEventDefinition'
- }
- }, {
- label: 'Conditional Start Event',
- actionName: 'replace-with-conditional-start',
- className: 'bpmn-icon-start-event-condition',
- target: {
- type: 'bpmn:StartEvent',
- eventDefinitionType: 'bpmn:ConditionalEventDefinition'
- }
- }, {
- label: 'Signal Start Event',
- actionName: 'replace-with-signal-start',
- className: 'bpmn-icon-start-event-signal',
- target: {
- type: 'bpmn:StartEvent',
- eventDefinitionType: 'bpmn:SignalEventDefinition'
- }
- }];
- exports.START_EVENT = START_EVENT;
- var INTERMEDIATE_EVENT = [{
- label: 'Start Event',
- actionName: 'replace-with-none-start',
- className: 'bpmn-icon-start-event-none',
- target: {
- type: 'bpmn:StartEvent'
- }
- }, {
- label: 'Intermediate Throw Event',
- actionName: 'replace-with-none-intermediate-throw',
- className: 'bpmn-icon-intermediate-event-none',
- target: {
- type: 'bpmn:IntermediateThrowEvent'
- }
- }, {
- label: 'End Event',
- actionName: 'replace-with-none-end',
- className: 'bpmn-icon-end-event-none',
- target: {
- type: 'bpmn:EndEvent'
- }
- }, {
- label: 'Message Intermediate Catch Event',
- actionName: 'replace-with-message-intermediate-catch',
- className: 'bpmn-icon-intermediate-event-catch-message',
- target: {
- type: 'bpmn:IntermediateCatchEvent',
- eventDefinitionType: 'bpmn:MessageEventDefinition'
- }
- }, {
- label: 'Message Intermediate Throw Event',
- actionName: 'replace-with-message-intermediate-throw',
- className: 'bpmn-icon-intermediate-event-throw-message',
- target: {
- type: 'bpmn:IntermediateThrowEvent',
- eventDefinitionType: 'bpmn:MessageEventDefinition'
- }
- }, {
- label: 'Timer Intermediate Catch Event',
- actionName: 'replace-with-timer-intermediate-catch',
- className: 'bpmn-icon-intermediate-event-catch-timer',
- target: {
- type: 'bpmn:IntermediateCatchEvent',
- eventDefinitionType: 'bpmn:TimerEventDefinition'
- }
- }, {
- label: 'Escalation Intermediate Throw Event',
- actionName: 'replace-with-escalation-intermediate-throw',
- className: 'bpmn-icon-intermediate-event-throw-escalation',
- target: {
- type: 'bpmn:IntermediateThrowEvent',
- eventDefinitionType: 'bpmn:EscalationEventDefinition'
- }
- }, {
- label: 'Conditional Intermediate Catch Event',
- actionName: 'replace-with-conditional-intermediate-catch',
- className: 'bpmn-icon-intermediate-event-catch-condition',
- target: {
- type: 'bpmn:IntermediateCatchEvent',
- eventDefinitionType: 'bpmn:ConditionalEventDefinition'
- }
- }, {
- label: 'Link Intermediate Catch Event',
- actionName: 'replace-with-link-intermediate-catch',
- className: 'bpmn-icon-intermediate-event-catch-link',
- target: {
- type: 'bpmn:IntermediateCatchEvent',
- eventDefinitionType: 'bpmn:LinkEventDefinition',
- eventDefinitionAttrs: {
- name: ''
- }
- }
- }, {
- label: 'Link Intermediate Throw Event',
- actionName: 'replace-with-link-intermediate-throw',
- className: 'bpmn-icon-intermediate-event-throw-link',
- target: {
- type: 'bpmn:IntermediateThrowEvent',
- eventDefinitionType: 'bpmn:LinkEventDefinition',
- eventDefinitionAttrs: {
- name: ''
- }
- }
- }, {
- label: 'Compensation Intermediate Throw Event',
- actionName: 'replace-with-compensation-intermediate-throw',
- className: 'bpmn-icon-intermediate-event-throw-compensation',
- target: {
- type: 'bpmn:IntermediateThrowEvent',
- eventDefinitionType: 'bpmn:CompensateEventDefinition'
- }
- }, {
- label: 'Signal Intermediate Catch Event',
- actionName: 'replace-with-signal-intermediate-catch',
- className: 'bpmn-icon-intermediate-event-catch-signal',
- target: {
- type: 'bpmn:IntermediateCatchEvent',
- eventDefinitionType: 'bpmn:SignalEventDefinition'
- }
- }, {
- label: 'Signal Intermediate Throw Event',
- actionName: 'replace-with-signal-intermediate-throw',
- className: 'bpmn-icon-intermediate-event-throw-signal',
- target: {
- type: 'bpmn:IntermediateThrowEvent',
- eventDefinitionType: 'bpmn:SignalEventDefinition'
- }
- }];
- exports.INTERMEDIATE_EVENT = INTERMEDIATE_EVENT;
- var END_EVENT = [{
- label: 'Start Event',
- actionName: 'replace-with-none-start',
- className: 'bpmn-icon-start-event-none',
- target: {
- type: 'bpmn:StartEvent'
- }
- }, {
- label: 'Intermediate Throw Event',
- actionName: 'replace-with-none-intermediate-throw',
- className: 'bpmn-icon-intermediate-event-none',
- target: {
- type: 'bpmn:IntermediateThrowEvent'
- }
- }, {
- label: 'End Event',
- actionName: 'replace-with-none-end',
- className: 'bpmn-icon-end-event-none',
- target: {
- type: 'bpmn:EndEvent'
- }
- }, {
- label: 'Message End Event',
- actionName: 'replace-with-message-end',
- className: 'bpmn-icon-end-event-message',
- target: {
- type: 'bpmn:EndEvent',
- eventDefinitionType: 'bpmn:MessageEventDefinition'
- }
- }, {
- label: 'Escalation End Event',
- actionName: 'replace-with-escalation-end',
- className: 'bpmn-icon-end-event-escalation',
- target: {
- type: 'bpmn:EndEvent',
- eventDefinitionType: 'bpmn:EscalationEventDefinition'
- }
- }, {
- label: 'Error End Event',
- actionName: 'replace-with-error-end',
- className: 'bpmn-icon-end-event-error',
- target: {
- type: 'bpmn:EndEvent',
- eventDefinitionType: 'bpmn:ErrorEventDefinition'
- }
- }, {
- label: 'Cancel End Event',
- actionName: 'replace-with-cancel-end',
- className: 'bpmn-icon-end-event-cancel',
- target: {
- type: 'bpmn:EndEvent',
- eventDefinitionType: 'bpmn:CancelEventDefinition'
- }
- }, {
- label: 'Compensation End Event',
- actionName: 'replace-with-compensation-end',
- className: 'bpmn-icon-end-event-compensation',
- target: {
- type: 'bpmn:EndEvent',
- eventDefinitionType: 'bpmn:CompensateEventDefinition'
- }
- }, {
- label: 'Signal End Event',
- actionName: 'replace-with-signal-end',
- className: 'bpmn-icon-end-event-signal',
- target: {
- type: 'bpmn:EndEvent',
- eventDefinitionType: 'bpmn:SignalEventDefinition'
- }
- }, {
- label: 'Terminate End Event',
- actionName: 'replace-with-terminate-end',
- className: 'bpmn-icon-end-event-terminate',
- target: {
- type: 'bpmn:EndEvent',
- eventDefinitionType: 'bpmn:TerminateEventDefinition'
- }
- }];
- exports.END_EVENT = END_EVENT;
- var GATEWAY = [{
- label: 'Exclusive Gateway',
- actionName: 'replace-with-exclusive-gateway',
- className: 'bpmn-icon-gateway-xor',
- target: {
- type: 'bpmn:ExclusiveGateway'
- }
- }, {
- label: 'Parallel Gateway',
- actionName: 'replace-with-parallel-gateway',
- className: 'bpmn-icon-gateway-parallel',
- target: {
- type: 'bpmn:ParallelGateway'
- }
- }, {
- label: 'Inclusive Gateway',
- actionName: 'replace-with-inclusive-gateway',
- className: 'bpmn-icon-gateway-or',
- target: {
- type: 'bpmn:InclusiveGateway'
- }
- }, {
- label: 'Complex Gateway',
- actionName: 'replace-with-complex-gateway',
- className: 'bpmn-icon-gateway-complex',
- target: {
- type: 'bpmn:ComplexGateway'
- }
- }, {
- label: 'Event based Gateway',
- actionName: 'replace-with-event-based-gateway',
- className: 'bpmn-icon-gateway-eventbased',
- target: {
- type: 'bpmn:EventBasedGateway',
- instantiate: false,
- eventGatewayType: 'Exclusive'
- }
- } // Gateways deactivated until https://github.com/bpmn-io/bpmn-js/issues/194
-// {
-// label: 'Event based instantiating Gateway',
-// actionName: 'replace-with-exclusive-event-based-gateway',
-// className: 'bpmn-icon-exclusive-event-based',
-// target: {
-// type: 'bpmn:EventBasedGateway'
-// },
-// options: {
-// businessObject: { instantiate: true, eventGatewayType: 'Exclusive' }
-// }
-// },
-// {
-// label: 'Parallel Event based instantiating Gateway',
-// actionName: 'replace-with-parallel-event-based-instantiate-gateway',
-// className: 'bpmn-icon-parallel-event-based-instantiate-gateway',
-// target: {
-// type: 'bpmn:EventBasedGateway'
-// },
-// options: {
-// businessObject: { instantiate: true, eventGatewayType: 'Parallel' }
-// }
-// }
- ];
- exports.GATEWAY = GATEWAY;
- var SUBPROCESS_EXPANDED = [{
- label: 'Transaction',
- actionName: 'replace-with-transaction',
- className: 'bpmn-icon-transaction',
- target: {
- type: 'bpmn:Transaction',
- isExpanded: true
- }
- }, {
- label: 'Event Sub Process',
- actionName: 'replace-with-event-subprocess',
- className: 'bpmn-icon-event-subprocess-expanded',
- target: {
- type: 'bpmn:SubProcess',
- triggeredByEvent: true,
- isExpanded: true
- }
- }, {
- label: 'Sub Process (collapsed)',
- actionName: 'replace-with-collapsed-subprocess',
- className: 'bpmn-icon-subprocess-collapsed',
- target: {
- type: 'bpmn:SubProcess',
- isExpanded: false
- }
- }];
- exports.SUBPROCESS_EXPANDED = SUBPROCESS_EXPANDED;
- var TRANSACTION = [{
- label: 'Sub Process',
- actionName: 'replace-with-subprocess',
- className: 'bpmn-icon-subprocess-expanded',
- target: {
- type: 'bpmn:SubProcess',
- isExpanded: true
- }
- }, {
- label: 'Event Sub Process',
- actionName: 'replace-with-event-subprocess',
- className: 'bpmn-icon-event-subprocess-expanded',
- target: {
- type: 'bpmn:SubProcess',
- triggeredByEvent: true,
- isExpanded: true
- }
- }];
- exports.TRANSACTION = TRANSACTION;
- var EVENT_SUB_PROCESS = [{
- label: 'Sub Process',
- actionName: 'replace-with-subprocess',
- className: 'bpmn-icon-subprocess-expanded',
- target: {
- type: 'bpmn:SubProcess',
- isExpanded: true
- }
- }, {
- label: 'Transaction',
- actionName: 'replace-with-transaction',
- className: 'bpmn-icon-transaction',
- target: {
- type: 'bpmn:Transaction',
- isExpanded: true
- }
- }];
- exports.EVENT_SUB_PROCESS = EVENT_SUB_PROCESS;
- var TASK = [{
- label: 'Task',
- actionName: 'replace-with-task',
- className: 'bpmn-icon-task',
- target: {
- type: 'bpmn:Task'
- }
- }, {
- label: 'Send Task',
- actionName: 'replace-with-send-task',
- className: 'bpmn-icon-send',
- target: {
- type: 'bpmn:SendTask'
- }
- }, {
- label: 'Receive Task',
- actionName: 'replace-with-receive-task',
- className: 'bpmn-icon-receive',
- target: {
- type: 'bpmn:ReceiveTask'
- }
- }, {
- label: 'User Task',
- actionName: 'replace-with-user-task',
- className: 'bpmn-icon-user',
- target: {
- type: 'bpmn:UserTask'
- }
- }, {
- label: 'Manual Task',
- actionName: 'replace-with-manual-task',
- className: 'bpmn-icon-manual',
- target: {
- type: 'bpmn:ManualTask'
- }
- }, {
- label: 'Business Rule Task',
- actionName: 'replace-with-rule-task',
- className: 'bpmn-icon-business-rule',
- target: {
- type: 'bpmn:BusinessRuleTask'
- }
- }, {
- label: 'Service Task',
- actionName: 'replace-with-service-task',
- className: 'bpmn-icon-service',
- target: {
- type: 'bpmn:ServiceTask'
- }
- }, {
- label: 'Script Task',
- actionName: 'replace-with-script-task',
- className: 'bpmn-icon-script',
- target: {
- type: 'bpmn:ScriptTask'
- }
- }, {
- label: 'Call Activity',
- actionName: 'replace-with-call-activity',
- className: 'bpmn-icon-call-activity',
- target: {
- type: 'bpmn:CallActivity'
- }
- }, {
- label: 'Sub Process (collapsed)',
- actionName: 'replace-with-collapsed-subprocess',
- className: 'bpmn-icon-subprocess-collapsed',
- target: {
- type: 'bpmn:SubProcess',
- isExpanded: false
- }
- }, {
- label: 'Sub Process (expanded)',
- actionName: 'replace-with-expanded-subprocess',
- className: 'bpmn-icon-subprocess-expanded',
- target: {
- type: 'bpmn:SubProcess',
- isExpanded: true
- }
- }];
- exports.TASK = TASK;
- var BOUNDARY_EVENT = [{
- label: 'Message Boundary Event',
- actionName: 'replace-with-message-boundary',
- className: 'bpmn-icon-intermediate-event-catch-message',
- target: {
- type: 'bpmn:BoundaryEvent',
- eventDefinitionType: 'bpmn:MessageEventDefinition'
- }
- }, {
- label: 'Timer Boundary Event',
- actionName: 'replace-with-timer-boundary',
- className: 'bpmn-icon-intermediate-event-catch-timer',
- target: {
- type: 'bpmn:BoundaryEvent',
- eventDefinitionType: 'bpmn:TimerEventDefinition'
- }
- }, {
- label: 'Escalation Boundary Event',
- actionName: 'replace-with-escalation-boundary',
- className: 'bpmn-icon-intermediate-event-catch-escalation',
- target: {
- type: 'bpmn:BoundaryEvent',
- eventDefinitionType: 'bpmn:EscalationEventDefinition'
- }
- }, {
- label: 'Conditional Boundary Event',
- actionName: 'replace-with-conditional-boundary',
- className: 'bpmn-icon-intermediate-event-catch-condition',
- target: {
- type: 'bpmn:BoundaryEvent',
- eventDefinitionType: 'bpmn:ConditionalEventDefinition'
- }
- }, {
- label: 'Error Boundary Event',
- actionName: 'replace-with-error-boundary',
- className: 'bpmn-icon-intermediate-event-catch-error',
- target: {
- type: 'bpmn:BoundaryEvent',
- eventDefinitionType: 'bpmn:ErrorEventDefinition'
- }
- }, {
- label: 'Cancel Boundary Event',
- actionName: 'replace-with-cancel-boundary',
- className: 'bpmn-icon-intermediate-event-catch-cancel',
- target: {
- type: 'bpmn:BoundaryEvent',
- eventDefinitionType: 'bpmn:CancelEventDefinition'
- }
- }, {
- label: 'Signal Boundary Event',
- actionName: 'replace-with-signal-boundary',
- className: 'bpmn-icon-intermediate-event-catch-signal',
- target: {
- type: 'bpmn:BoundaryEvent',
- eventDefinitionType: 'bpmn:SignalEventDefinition'
- }
- }, {
- label: 'Compensation Boundary Event',
- actionName: 'replace-with-compensation-boundary',
- className: 'bpmn-icon-intermediate-event-catch-compensation',
- target: {
- type: 'bpmn:BoundaryEvent',
- eventDefinitionType: 'bpmn:CompensateEventDefinition'
- }
- }, {
- label: 'Message Boundary Event (non-interrupting)',
- actionName: 'replace-with-non-interrupting-message-boundary',
- className: 'bpmn-icon-intermediate-event-catch-non-interrupting-message',
- target: {
- type: 'bpmn:BoundaryEvent',
- eventDefinitionType: 'bpmn:MessageEventDefinition',
- cancelActivity: false
- }
- }, {
- label: 'Timer Boundary Event (non-interrupting)',
- actionName: 'replace-with-non-interrupting-timer-boundary',
- className: 'bpmn-icon-intermediate-event-catch-non-interrupting-timer',
- target: {
- type: 'bpmn:BoundaryEvent',
- eventDefinitionType: 'bpmn:TimerEventDefinition',
- cancelActivity: false
- }
- }, {
- label: 'Escalation Boundary Event (non-interrupting)',
- actionName: 'replace-with-non-interrupting-escalation-boundary',
- className: 'bpmn-icon-intermediate-event-catch-non-interrupting-escalation',
- target: {
- type: 'bpmn:BoundaryEvent',
- eventDefinitionType: 'bpmn:EscalationEventDefinition',
- cancelActivity: false
- }
- }, {
- label: 'Conditional Boundary Event (non-interrupting)',
- actionName: 'replace-with-non-interrupting-conditional-boundary',
- className: 'bpmn-icon-intermediate-event-catch-non-interrupting-condition',
- target: {
- type: 'bpmn:BoundaryEvent',
- eventDefinitionType: 'bpmn:ConditionalEventDefinition',
- cancelActivity: false
- }
- }, {
- label: 'Signal Boundary Event (non-interrupting)',
- actionName: 'replace-with-non-interrupting-signal-boundary',
- className: 'bpmn-icon-intermediate-event-catch-non-interrupting-signal',
- target: {
- type: 'bpmn:BoundaryEvent',
- eventDefinitionType: 'bpmn:SignalEventDefinition',
- cancelActivity: false
- }
- }];
- exports.BOUNDARY_EVENT = BOUNDARY_EVENT;
- var EVENT_SUB_PROCESS_START_EVENT = [{
- label: 'Message Start Event',
- actionName: 'replace-with-message-start',
- className: 'bpmn-icon-start-event-message',
- target: {
- type: 'bpmn:StartEvent',
- eventDefinitionType: 'bpmn:MessageEventDefinition'
- }
- }, {
- label: 'Timer Start Event',
- actionName: 'replace-with-timer-start',
- className: 'bpmn-icon-start-event-timer',
- target: {
- type: 'bpmn:StartEvent',
- eventDefinitionType: 'bpmn:TimerEventDefinition'
- }
- }, {
- label: 'Conditional Start Event',
- actionName: 'replace-with-conditional-start',
- className: 'bpmn-icon-start-event-condition',
- target: {
- type: 'bpmn:StartEvent',
- eventDefinitionType: 'bpmn:ConditionalEventDefinition'
- }
- }, {
- label: 'Signal Start Event',
- actionName: 'replace-with-signal-start',
- className: 'bpmn-icon-start-event-signal',
- target: {
- type: 'bpmn:StartEvent',
- eventDefinitionType: 'bpmn:SignalEventDefinition'
- }
- }, {
- label: 'Error Start Event',
- actionName: 'replace-with-error-start',
- className: 'bpmn-icon-start-event-error',
- target: {
- type: 'bpmn:StartEvent',
- eventDefinitionType: 'bpmn:ErrorEventDefinition'
- }
- }, {
- label: 'Escalation Start Event',
- actionName: 'replace-with-escalation-start',
- className: 'bpmn-icon-start-event-escalation',
- target: {
- type: 'bpmn:StartEvent',
- eventDefinitionType: 'bpmn:EscalationEventDefinition'
- }
- }, {
- label: 'Compensation Start Event',
- actionName: 'replace-with-compensation-start',
- className: 'bpmn-icon-start-event-compensation',
- target: {
- type: 'bpmn:StartEvent',
- eventDefinitionType: 'bpmn:CompensateEventDefinition'
- }
- }, {
- label: 'Message Start Event (non-interrupting)',
- actionName: 'replace-with-non-interrupting-message-start',
- className: 'bpmn-icon-start-event-non-interrupting-message',
- target: {
- type: 'bpmn:StartEvent',
- eventDefinitionType: 'bpmn:MessageEventDefinition',
- isInterrupting: false
- }
- }, {
- label: 'Timer Start Event (non-interrupting)',
- actionName: 'replace-with-non-interrupting-timer-start',
- className: 'bpmn-icon-start-event-non-interrupting-timer',
- target: {
- type: 'bpmn:StartEvent',
- eventDefinitionType: 'bpmn:TimerEventDefinition',
- isInterrupting: false
- }
- }, {
- label: 'Conditional Start Event (non-interrupting)',
- actionName: 'replace-with-non-interrupting-conditional-start',
- className: 'bpmn-icon-start-event-non-interrupting-condition',
- target: {
- type: 'bpmn:StartEvent',
- eventDefinitionType: 'bpmn:ConditionalEventDefinition',
- isInterrupting: false
- }
- }, {
- label: 'Signal Start Event (non-interrupting)',
- actionName: 'replace-with-non-interrupting-signal-start',
- className: 'bpmn-icon-start-event-non-interrupting-signal',
- target: {
- type: 'bpmn:StartEvent',
- eventDefinitionType: 'bpmn:SignalEventDefinition',
- isInterrupting: false
- }
- }, {
- label: 'Escalation Start Event (non-interrupting)',
- actionName: 'replace-with-non-interrupting-escalation-start',
- className: 'bpmn-icon-start-event-non-interrupting-escalation',
- target: {
- type: 'bpmn:StartEvent',
- eventDefinitionType: 'bpmn:EscalationEventDefinition',
- isInterrupting: false
- }
- }];
- exports.EVENT_SUB_PROCESS_START_EVENT = EVENT_SUB_PROCESS_START_EVENT;
- var SEQUENCE_FLOW = [{
- label: 'Sequence Flow',
- actionName: 'replace-with-sequence-flow',
- className: 'bpmn-icon-connection'
- }, {
- label: 'Default Flow',
- actionName: 'replace-with-default-flow',
- className: 'bpmn-icon-default-flow'
- }, {
- label: 'Conditional Flow',
- actionName: 'replace-with-conditional-flow',
- className: 'bpmn-icon-conditional-flow'
- }];
- exports.SEQUENCE_FLOW = SEQUENCE_FLOW;
- var PARTICIPANT = [{
- label: 'Expanded Pool',
- actionName: 'replace-with-expanded-pool',
- className: 'bpmn-icon-participant',
- target: {
- type: 'bpmn:Participant',
- isExpanded: true
- }
- }, {
- label: 'Collapsed Pool',
- actionName: 'replace-with-collapsed-pool',
- // TODO(@janstuemmel): maybe design new icon
- className: 'bpmn-icon-lane',
- target: {
- type: 'bpmn:Participant',
- isExpanded: false
- }
- }];
- exports.PARTICIPANT = PARTICIPANT;
-
- },{}],223:[function(require,module,exports){
- "use strict";
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+GraphicsFactory.$inject = [ 'eventBus' , 'elementRegistry' ];
- var _copyPaste = _interopRequireDefault(require("../copy-paste"));
+/**
+ * @param { { parent?: any } } element
+ * @return {SVGElement}
+ */
+GraphicsFactory.prototype._getChildrenContainer = function(element) {
- var _replace = _interopRequireDefault(require("diagram-js/lib/features/replace"));
+ var gfx = this._elementRegistry.getGraphics(element);
- var _selection = _interopRequireDefault(require("diagram-js/lib/features/selection"));
+ var childrenGfx;
- var _BpmnReplace = _interopRequireDefault(require("./BpmnReplace"));
+ // root element
+ if (!element.parent) {
+ childrenGfx = gfx;
+ } else {
+ childrenGfx = (0,_util_GraphicsUtil__WEBPACK_IMPORTED_MODULE_0__.getChildren)(gfx);
+ if (!childrenGfx) {
+ childrenGfx = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('g');
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.classes)(childrenGfx).add('djs-children');
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.append)(gfx.parentNode, childrenGfx);
+ }
+ }
- var _default = {
- __depends__: [_copyPaste.default, _replace.default, _selection.default],
- bpmnReplace: ['type', _BpmnReplace.default]
- };
- exports.default = _default;
+ return childrenGfx;
+};
- },{"../copy-paste":133,"./BpmnReplace":221,"diagram-js/lib/features/replace":369,"diagram-js/lib/features/selection":383}],224:[function(require,module,exports){
- "use strict";
+/**
+ * Clears the graphical representation of the element and returns the
+ * cleared visual (the element).
+ */
+GraphicsFactory.prototype._clear = function(gfx) {
+ var visual = (0,_util_GraphicsUtil__WEBPACK_IMPORTED_MODULE_0__.getVisual)(gfx);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BpmnRules;
+ (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.clear)(visual);
- var _minDash = require("min-dash");
+ return visual;
+};
- var _inherits = _interopRequireDefault(require("inherits"));
+/**
+ * Creates a gfx container for shapes and connections
+ *
+ * The layout is as follows:
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * @param {string} type the type of the element, i.e. shape | connection
+ * @param {SVGElement} childrenGfx
+ * @param {number} [parentIndex] position to create container in parent
+ * @param {boolean} [isFrame] is frame element
+ *
+ * @return {SVGElement}
+ */
+GraphicsFactory.prototype._createContainer = function(
+ type, childrenGfx, parentIndex, isFrame
+) {
+ var outerGfx = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('g');
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.classes)(outerGfx).add('djs-group');
- var _ModelUtil = require("../../util/ModelUtil");
+ // insert node at position
+ if (typeof parentIndex !== 'undefined') {
+ prependTo(outerGfx, childrenGfx, childrenGfx.childNodes[parentIndex]);
+ } else {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.append)(childrenGfx, outerGfx);
+ }
- var _ModelingUtil = require("../modeling/util/ModelingUtil");
+ var gfx = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('g');
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.classes)(gfx).add('djs-element');
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.classes)(gfx).add('djs-' + type);
- var _LabelUtil = require("../../util/LabelUtil");
+ if (isFrame) {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.classes)(gfx).add('djs-frame');
+ }
- var _DiUtil = require("../../util/DiUtil");
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.append)(outerGfx, gfx);
- var _RuleProvider = _interopRequireDefault(require("diagram-js/lib/features/rules/RuleProvider"));
+ // create visual
+ var visual = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('g');
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.classes)(visual).add('djs-visual');
- var _BpmnSnappingUtil = require("../snapping/BpmnSnappingUtil");
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.append)(gfx, visual);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ return gfx;
+};
- /**
- * BPMN specific modeling rule
- */
- function BpmnRules(eventBus) {
- _RuleProvider.default.call(this, eventBus);
- }
+/**
+ * Create a graphical element.
+ *
+ * @param { 'shape' | 'connection' | 'label' | 'root' } type The type of the element.
+ * @param {ElementLike} element The element.
+ * @param {number} [parentIndex] The index at which to add the graphical element to its parent's children.
+ *
+ * @return {SVGElement} The graphical element.
+ */
+GraphicsFactory.prototype.create = function(type, element, parentIndex) {
+ var childrenGfx = this._getChildrenContainer(element.parent);
+ return this._createContainer(type, childrenGfx, parentIndex, (0,_util_Elements__WEBPACK_IMPORTED_MODULE_3__.isFrameElement)(element));
+};
- (0, _inherits.default)(BpmnRules, _RuleProvider.default);
- BpmnRules.$inject = ['eventBus'];
+/**
+ * Update the containments of the given elements.
+ *
+ * @param {ElementLike[]} elements The elements.
+ */
+GraphicsFactory.prototype.updateContainments = function(elements) {
- BpmnRules.prototype.init = function () {
- this.addRule('connection.start', function (context) {
- var source = context.source;
- return canStartConnection(source);
- });
- this.addRule('connection.create', function (context) {
- var source = context.source,
- target = context.target,
- hints = context.hints || {},
- targetParent = hints.targetParent,
- targetAttach = hints.targetAttach; // don't allow incoming connections on
- // newly created boundary events
- // to boundary events
-
- if (targetAttach) {
- return false;
- } // temporarily set target parent for scoping
- // checks to work
+ var self = this,
+ elementRegistry = this._elementRegistry,
+ parents;
+ parents = (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.reduce)(elements, function(map, e) {
- if (targetParent) {
- target.parent = targetParent;
- }
+ if (e.parent) {
+ map[e.parent.id] = e.parent;
+ }
- try {
- return canConnect(source, target);
- } finally {
- // unset temporary target parent
- if (targetParent) {
- target.parent = null;
- }
- }
- });
- this.addRule('connection.reconnect', function (context) {
- var connection = context.connection,
- source = context.source,
- target = context.target;
- return canConnect(source, target, connection);
- });
- this.addRule('connection.updateWaypoints', function (context) {
- return {
- type: context.connection.type
- };
- });
- this.addRule('shape.resize', function (context) {
- var shape = context.shape,
- newBounds = context.newBounds;
- return canResize(shape, newBounds);
- });
- this.addRule('elements.create', function (context) {
- var elements = context.elements,
- position = context.position,
- target = context.target;
- return (0, _minDash.every)(elements, function (element) {
- if (isConnection(element)) {
- return canConnect(element.source, element.target, element);
- }
+ return map;
+ }, {});
- if (element.host) {
- return canAttach(element, element.host, null, position);
- }
+ // update all parents of changed and reorganized their children
+ // in the correct order (as indicated in our model)
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.forEach)(parents, function(parent) {
- return canCreate(element, target, null, position);
- });
- });
- this.addRule('elements.move', function (context) {
- var target = context.target,
- shapes = context.shapes,
- position = context.position;
- return canAttach(shapes, target, null, position) || canReplace(shapes, target, position) || canMove(shapes, target, position) || canInsert(shapes, target, position);
- });
- this.addRule('shape.create', function (context) {
- return canCreate(context.shape, context.target, context.source, context.position);
- });
- this.addRule('shape.attach', function (context) {
- return canAttach(context.shape, context.target, null, context.position);
- });
- this.addRule('element.copy', function (context) {
- var element = context.element,
- elements = context.elements;
- return canCopy(elements, element);
- });
- };
+ var children = parent.children;
- BpmnRules.prototype.canConnectMessageFlow = canConnectMessageFlow;
- BpmnRules.prototype.canConnectSequenceFlow = canConnectSequenceFlow;
- BpmnRules.prototype.canConnectDataAssociation = canConnectDataAssociation;
- BpmnRules.prototype.canConnectAssociation = canConnectAssociation;
- BpmnRules.prototype.canMove = canMove;
- BpmnRules.prototype.canAttach = canAttach;
- BpmnRules.prototype.canReplace = canReplace;
- BpmnRules.prototype.canDrop = canDrop;
- BpmnRules.prototype.canInsert = canInsert;
- BpmnRules.prototype.canCreate = canCreate;
- BpmnRules.prototype.canConnect = canConnect;
- BpmnRules.prototype.canResize = canResize;
- BpmnRules.prototype.canCopy = canCopy;
- /**
- * Utility functions for rule checking
- */
+ if (!children) {
+ return;
+ }
- /**
- * Checks if given element can be used for starting connection.
- *
- * @param {Element} source
- * @return {boolean}
- */
+ var childrenGfx = self._getChildrenContainer(parent);
- function canStartConnection(element) {
- if (nonExistingOrLabel(element)) {
- return null;
- }
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.forEach)(children.slice().reverse(), function(child) {
+ var childGfx = elementRegistry.getGraphics(child);
- return (0, _ModelingUtil.isAny)(element, ['bpmn:FlowNode', 'bpmn:InteractionNode', 'bpmn:DataObjectReference', 'bpmn:DataStoreReference', 'bpmn:Group']);
- }
+ prependTo(childGfx.parentNode, childrenGfx);
+ });
+ });
+};
- function nonExistingOrLabel(element) {
- return !element || (0, _LabelUtil.isLabel)(element);
- }
+/**
+ * Draw a shape.
+ *
+ * @param {SVGElement} visual The graphical element.
+ * @param {ShapeLike} element The shape.
+ * @param {Object} attrs Optional attributes.
+ *
+ * @return {SVGElement}
+ */
+GraphicsFactory.prototype.drawShape = function(visual, element, attrs = {}) {
+ var eventBus = this._eventBus;
- function isSame(a, b) {
- return a === b;
- }
+ return eventBus.fire('render.shape', { gfx: visual, element, attrs });
+};
- function getOrganizationalParent(element) {
- do {
- if ((0, _ModelUtil.is)(element, 'bpmn:Process')) {
- return (0, _ModelUtil.getBusinessObject)(element);
- }
+/**
+ * Get the path of a shape.
+ *
+ * @param {ShapeLike} element The shape.
+ *
+ * @return {string} The path of the shape.
+ */
+GraphicsFactory.prototype.getShapePath = function(element) {
+ var eventBus = this._eventBus;
- if ((0, _ModelUtil.is)(element, 'bpmn:Participant')) {
- return (0, _ModelUtil.getBusinessObject)(element).processRef || (0, _ModelUtil.getBusinessObject)(element);
- }
- } while (element = element.parent);
- }
+ return eventBus.fire('render.getShapePath', element);
+};
- function isTextAnnotation(element) {
- return (0, _ModelUtil.is)(element, 'bpmn:TextAnnotation');
- }
+/**
+ * Draw a connection.
+ *
+ * @param {SVGElement} visual The graphical element.
+ * @param {ConnectionLike} element The connection.
+ * @param {Object} attrs Optional attributes.
+ *
+ * @return {SVGElement}
+ */
+GraphicsFactory.prototype.drawConnection = function(visual, element, attrs = {}) {
+ var eventBus = this._eventBus;
- function isGroup(element) {
- return (0, _ModelUtil.is)(element, 'bpmn:Group') && !element.labelTarget;
- }
+ return eventBus.fire('render.connection', { gfx: visual, element, attrs });
+};
- function isCompensationBoundary(element) {
- return (0, _ModelUtil.is)(element, 'bpmn:BoundaryEvent') && hasEventDefinition(element, 'bpmn:CompensateEventDefinition');
- }
+/**
+ * Get the path of a connection.
+ *
+ * @param {ConnectionLike} connection The connection.
+ *
+ * @return {string} The path of the connection.
+ */
+GraphicsFactory.prototype.getConnectionPath = function(connection) {
+ var eventBus = this._eventBus;
- function isForCompensation(e) {
- return (0, _ModelUtil.getBusinessObject)(e).isForCompensation;
- }
+ return eventBus.fire('render.getConnectionPath', connection);
+};
- function isSameOrganization(a, b) {
- var parentA = getOrganizationalParent(a),
- parentB = getOrganizationalParent(b);
- return parentA === parentB;
- }
+/**
+ * Update an elements graphical representation.
+ *
+ * @param {'shape'|'connection'} type
+ * @param {ElementLike} element
+ * @param {SVGElement} gfx
+ */
+GraphicsFactory.prototype.update = function(type, element, gfx) {
+
+ // do NOT update root element
+ if (!element.parent) {
+ return;
+ }
+
+ var visual = this._clear(gfx);
+
+ // redraw
+ if (type === 'shape') {
+ this.drawShape(visual, element);
+
+ // update positioning
+ (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_5__.translate)(gfx, element.x, element.y);
+ } else
+ if (type === 'connection') {
+ this.drawConnection(visual, element);
+ } else {
+ throw new Error('unknown type: ' + type);
+ }
+
+ if (element.hidden) {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(gfx, 'display', 'none');
+ } else {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(gfx, 'display', 'block');
+ }
+};
+
+/**
+ * Remove a graphical element.
+ *
+ * @param {ElementLike} element The element.
+ */
+GraphicsFactory.prototype.remove = function(element) {
+ var gfx = this._elementRegistry.getGraphics(element);
- function isMessageFlowSource(element) {
- return (0, _ModelUtil.is)(element, 'bpmn:InteractionNode') && !(0, _ModelUtil.is)(element, 'bpmn:BoundaryEvent') && (!(0, _ModelUtil.is)(element, 'bpmn:Event') || (0, _ModelUtil.is)(element, 'bpmn:ThrowEvent') && hasEventDefinitionOrNone(element, 'bpmn:MessageEventDefinition'));
- }
+ // remove
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.remove)(gfx.parentNode);
+};
- function isMessageFlowTarget(element) {
- return (0, _ModelUtil.is)(element, 'bpmn:InteractionNode') && !(0, _ModelUtil.is)(element, 'bpmn:BoundaryEvent') && !isForCompensation(element) && (!(0, _ModelUtil.is)(element, 'bpmn:Event') || (0, _ModelUtil.is)(element, 'bpmn:CatchEvent') && hasEventDefinitionOrNone(element, 'bpmn:MessageEventDefinition'));
- }
- function getScopeParent(element) {
- var parent = element;
+// helpers //////////
- while (parent = parent.parent) {
- if ((0, _ModelUtil.is)(parent, 'bpmn:FlowElementsContainer')) {
- return (0, _ModelUtil.getBusinessObject)(parent);
- }
+function prependTo(newNode, parentNode, siblingNode) {
+ var node = siblingNode || parentNode.firstChild;
- if ((0, _ModelUtil.is)(parent, 'bpmn:Participant')) {
- return (0, _ModelUtil.getBusinessObject)(parent).processRef;
- }
- }
+ // do not prepend node to itself to prevent IE from crashing
+ // https://github.com/bpmn-io/bpmn-js/issues/746
+ if (newNode === node) {
+ return;
+ }
- return null;
- }
+ parentNode.insertBefore(newNode, node);
+}
- function isSameScope(a, b) {
- var scopeParentA = getScopeParent(a),
- scopeParentB = getScopeParent(b);
- return scopeParentA === scopeParentB;
- }
- function hasEventDefinition(element, eventDefinition) {
- var bo = (0, _ModelUtil.getBusinessObject)(element);
- return !!(0, _minDash.find)(bo.eventDefinitions || [], function (definition) {
- return (0, _ModelUtil.is)(definition, eventDefinition);
- });
- }
+/***/ }),
- function hasEventDefinitionOrNone(element, eventDefinition) {
- var bo = (0, _ModelUtil.getBusinessObject)(element);
- return (bo.eventDefinitions || []).every(function (definition) {
- return (0, _ModelUtil.is)(definition, eventDefinition);
- });
- }
+/***/ "../node_modules/diagram-js/lib/core/index.js":
+/*!****************************************************!*\
+ !*** ../node_modules/diagram-js/lib/core/index.js ***!
+ \****************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- function isSequenceFlowSource(element) {
- return (0, _ModelUtil.is)(element, 'bpmn:FlowNode') && !(0, _ModelUtil.is)(element, 'bpmn:EndEvent') && !(0, _DiUtil.isEventSubProcess)(element) && !((0, _ModelUtil.is)(element, 'bpmn:IntermediateThrowEvent') && hasEventDefinition(element, 'bpmn:LinkEventDefinition')) && !isCompensationBoundary(element) && !isForCompensation(element);
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _draw__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../draw */ "../node_modules/diagram-js/lib/draw/index.js");
+/* harmony import */ var _Canvas__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Canvas */ "../node_modules/diagram-js/lib/core/Canvas.js");
+/* harmony import */ var _ElementRegistry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ElementRegistry */ "../node_modules/diagram-js/lib/core/ElementRegistry.js");
+/* harmony import */ var _ElementFactory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ElementFactory */ "../node_modules/diagram-js/lib/core/ElementFactory.js");
+/* harmony import */ var _EventBus__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./EventBus */ "../node_modules/diagram-js/lib/core/EventBus.js");
+/* harmony import */ var _GraphicsFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./GraphicsFactory */ "../node_modules/diagram-js/lib/core/GraphicsFactory.js");
- function isSequenceFlowTarget(element) {
- return (0, _ModelUtil.is)(element, 'bpmn:FlowNode') && !(0, _ModelUtil.is)(element, 'bpmn:StartEvent') && !(0, _ModelUtil.is)(element, 'bpmn:BoundaryEvent') && !(0, _DiUtil.isEventSubProcess)(element) && !((0, _ModelUtil.is)(element, 'bpmn:IntermediateCatchEvent') && hasEventDefinition(element, 'bpmn:LinkEventDefinition')) && !isForCompensation(element);
- }
- function isEventBasedTarget(element) {
- return (0, _ModelUtil.is)(element, 'bpmn:ReceiveTask') || (0, _ModelUtil.is)(element, 'bpmn:IntermediateCatchEvent') && (hasEventDefinition(element, 'bpmn:MessageEventDefinition') || hasEventDefinition(element, 'bpmn:TimerEventDefinition') || hasEventDefinition(element, 'bpmn:ConditionalEventDefinition') || hasEventDefinition(element, 'bpmn:SignalEventDefinition'));
- }
- function isConnection(element) {
- return element.waypoints;
- }
- function getParents(element) {
- var parents = [];
- while (element) {
- element = element.parent;
- if (element) {
- parents.push(element);
- }
- }
- return parents;
- }
- function isParent(possibleParent, element) {
- var allParents = getParents(element);
- return allParents.indexOf(possibleParent) !== -1;
- }
+/**
+ * @type { import('didi').ModuleDeclaration }
+ */
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [ _draw__WEBPACK_IMPORTED_MODULE_0__["default"] ],
+ __init__: [ 'canvas' ],
+ canvas: [ 'type', _Canvas__WEBPACK_IMPORTED_MODULE_1__["default"] ],
+ elementRegistry: [ 'type', _ElementRegistry__WEBPACK_IMPORTED_MODULE_2__["default"] ],
+ elementFactory: [ 'type', _ElementFactory__WEBPACK_IMPORTED_MODULE_3__["default"] ],
+ eventBus: [ 'type', _EventBus__WEBPACK_IMPORTED_MODULE_4__["default"] ],
+ graphicsFactory: [ 'type', _GraphicsFactory__WEBPACK_IMPORTED_MODULE_5__["default"] ]
+});
+
+/***/ }),
+
+/***/ "../node_modules/diagram-js/lib/draw/BaseRenderer.js":
+/*!***********************************************************!*\
+ !*** ../node_modules/diagram-js/lib/draw/BaseRenderer.js ***!
+ \***********************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BaseRenderer)
+/* harmony export */ });
+var DEFAULT_RENDER_PRIORITY = 1000;
+
+/**
+ * @typedef {import('../core/Types').ElementLike} Element
+ * @typedef {import('../core/Types').ConnectionLike} Connection
+ * @typedef {import('../core/Types').ShapeLike} Shape
+ *
+ * @typedef {import('../core/EventBus').default} EventBus
+ */
- function canConnect(source, target, connection) {
- if (nonExistingOrLabel(source) || nonExistingOrLabel(target)) {
- return null;
- }
+/**
+ * The base implementation of shape and connection renderers.
+ *
+ * @param {EventBus} eventBus
+ * @param {number} [renderPriority=1000]
+ */
+function BaseRenderer(eventBus, renderPriority) {
+ var self = this;
+
+ renderPriority = renderPriority || DEFAULT_RENDER_PRIORITY;
+
+ eventBus.on([ 'render.shape', 'render.connection' ], renderPriority, function(evt, context) {
+ var type = evt.type,
+ element = context.element,
+ visuals = context.gfx,
+ attrs = context.attrs;
+
+ if (self.canRender(element)) {
+ if (type === 'render.shape') {
+ return self.drawShape(visuals, element, attrs);
+ } else {
+ return self.drawConnection(visuals, element, attrs);
+ }
+ }
+ });
+
+ eventBus.on([ 'render.getShapePath', 'render.getConnectionPath' ], renderPriority, function(evt, element) {
+ if (self.canRender(element)) {
+ if (evt.type === 'render.getShapePath') {
+ return self.getShapePath(element);
+ } else {
+ return self.getConnectionPath(element);
+ }
+ }
+ });
+}
+
+/**
+ * Checks whether an element can be rendered.
+ *
+ * @param {Element} element The element to be rendered.
+ *
+ * @return {boolean} Whether the element can be rendered.
+ */
+BaseRenderer.prototype.canRender = function(element) {};
- if (!(0, _ModelUtil.is)(connection, 'bpmn:DataAssociation')) {
- if (canConnectMessageFlow(source, target)) {
- return {
- type: 'bpmn:MessageFlow'
- };
- }
+/**
+ * Draws a shape.
+ *
+ * @param {SVGElement} visuals The SVG element to draw the shape into.
+ * @param {Shape} shape The shape to be drawn.
+ *
+ * @return {SVGElement} The SVG element of the shape drawn.
+ */
+BaseRenderer.prototype.drawShape = function(visuals, shape) {};
- if (canConnectSequenceFlow(source, target)) {
- return {
- type: 'bpmn:SequenceFlow'
- };
- }
- }
+/**
+ * Draws a connection.
+ *
+ * @param {SVGElement} visuals The SVG element to draw the connection into.
+ * @param {Connection} connection The connection to be drawn.
+ *
+ * @return {SVGElement} The SVG element of the connection drawn.
+ */
+BaseRenderer.prototype.drawConnection = function(visuals, connection) {};
- var connectDataAssociation = canConnectDataAssociation(source, target);
+/**
+ * Gets the SVG path of the graphical representation of a shape.
+ *
+ * @param {Shape} shape The shape.
+ *
+ * @return {string} The SVG path of the shape.
+ */
+BaseRenderer.prototype.getShapePath = function(shape) {};
- if (connectDataAssociation) {
- return connectDataAssociation;
- }
+/**
+ * Gets the SVG path of the graphical representation of a connection.
+ *
+ * @param {Connection} connection The connection.
+ *
+ * @return {string} The SVG path of the connection.
+ */
+BaseRenderer.prototype.getConnectionPath = function(connection) {};
- if (isCompensationBoundary(source) && isForCompensation(target)) {
- return {
- type: 'bpmn:Association',
- associationDirection: 'One'
- };
- }
- if (canConnectAssociation(source, target)) {
- return {
- type: 'bpmn:Association'
- };
- }
+/***/ }),
- return false;
- }
- /**
- * Can an element be dropped into the target element
- *
- * @return {boolean}
- */
+/***/ "../node_modules/diagram-js/lib/draw/DefaultRenderer.js":
+/*!**************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/draw/DefaultRenderer.js ***!
+ \**************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ DefaultRenderer)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var _BaseRenderer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BaseRenderer */ "../node_modules/diagram-js/lib/draw/BaseRenderer.js");
+/* harmony import */ var _util_RenderUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/RenderUtil */ "../node_modules/diagram-js/lib/util/RenderUtil.js");
+/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tiny-svg */ "../node_modules/tiny-svg/dist/index.esm.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _util_Elements__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/Elements */ "../node_modules/diagram-js/lib/util/Elements.js");
- function canDrop(element, target, position) {
- // can move labels and groups everywhere
- if ((0, _LabelUtil.isLabel)(element) || isGroup(element)) {
- return true;
- } // disallow to create elements on collapsed pools
- if ((0, _ModelUtil.is)(target, 'bpmn:Participant') && !(0, _DiUtil.isExpanded)(target)) {
- return false;
- } // allow to create new participants on
- // existing collaboration and process diagrams
- if ((0, _ModelUtil.is)(element, 'bpmn:Participant')) {
- return (0, _ModelUtil.is)(target, 'bpmn:Process') || (0, _ModelUtil.is)(target, 'bpmn:Collaboration');
- } // allow moving DataInput / DataOutput within its original container only
- if ((0, _ModelingUtil.isAny)(element, ['bpmn:DataInput', 'bpmn:DataOutput'])) {
- if (element.parent) {
- return target === element.parent;
- }
- } // allow creating lanes on participants and other lanes only
- if ((0, _ModelUtil.is)(element, 'bpmn:Lane')) {
- return (0, _ModelUtil.is)(target, 'bpmn:Participant') || (0, _ModelUtil.is)(target, 'bpmn:Lane');
- } // disallow dropping boundary events which cannot replace with intermediate event
- if ((0, _ModelUtil.is)(element, 'bpmn:BoundaryEvent') && !isDroppableBoundaryEvent(element)) {
- return false;
- } // drop flow elements onto flow element containers
- // and participants
+/**
+ * @typedef {import('../core/EventBus').default} EventBus
+ * @typedef {import('./Styles').default} Styles
+ */
- if ((0, _ModelUtil.is)(element, 'bpmn:FlowElement') && !(0, _ModelUtil.is)(element, 'bpmn:DataStoreReference')) {
- if ((0, _ModelUtil.is)(target, 'bpmn:FlowElementsContainer')) {
- return (0, _DiUtil.isExpanded)(target);
- }
+// apply default renderer with lowest possible priority
+// so that it only kicks in if noone else could render
+var DEFAULT_RENDER_PRIORITY = 1;
- return (0, _ModelingUtil.isAny)(target, ['bpmn:Participant', 'bpmn:Lane']);
- } // account for the fact that data associations are always
- // rendered and moved to top (Process or Collaboration level)
- //
- // artifacts may be placed wherever, too
+/**
+ * The default renderer used for shapes and connections.
+ *
+ * @param {EventBus} eventBus
+ * @param {Styles} styles
+ */
+function DefaultRenderer(eventBus, styles) {
+ _BaseRenderer__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus, DEFAULT_RENDER_PRIORITY);
- if ((0, _ModelingUtil.isAny)(element, ['bpmn:Artifact', 'bpmn:DataAssociation', 'bpmn:DataStoreReference'])) {
- return (0, _ModelingUtil.isAny)(target, ['bpmn:Collaboration', 'bpmn:Lane', 'bpmn:Participant', 'bpmn:Process', 'bpmn:SubProcess']);
- }
+ this.CONNECTION_STYLE = styles.style([ 'no-fill' ], { strokeWidth: 5, stroke: 'fuchsia' });
+ this.SHAPE_STYLE = styles.style({ fill: 'white', stroke: 'fuchsia', strokeWidth: 2 });
+ this.FRAME_STYLE = styles.style([ 'no-fill' ], { stroke: 'fuchsia', strokeDasharray: 4, strokeWidth: 2 });
+}
- if ((0, _ModelUtil.is)(element, 'bpmn:MessageFlow')) {
- return (0, _ModelUtil.is)(target, 'bpmn:Collaboration') || element.source.parent == target || element.target.parent == target;
- }
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_1__["default"])(DefaultRenderer, _BaseRenderer__WEBPACK_IMPORTED_MODULE_0__["default"]);
- return false;
- }
- function isDroppableBoundaryEvent(event) {
- return (0, _ModelUtil.getBusinessObject)(event).cancelActivity && (hasNoEventDefinition(event) || hasCommonBoundaryIntermediateEventDefinition(event));
- }
+/**
+ * @private
+ */
+DefaultRenderer.prototype.canRender = function() {
+ return true;
+};
- function isBoundaryEvent(element) {
- return !(0, _LabelUtil.isLabel)(element) && (0, _ModelUtil.is)(element, 'bpmn:BoundaryEvent');
- }
+/**
+ * @private
+ */
+DefaultRenderer.prototype.drawShape = function drawShape(visuals, element, attrs) {
+ var rect = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)('rect');
- function isLane(element) {
- return (0, _ModelUtil.is)(element, 'bpmn:Lane');
- }
- /**
- * We treat IntermediateThrowEvents as boundary events during create,
- * this must be reflected in the rules.
- */
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(rect, {
+ x: 0,
+ y: 0,
+ width: element.width || 0,
+ height: element.height || 0
+ });
+ if ((0,_util_Elements__WEBPACK_IMPORTED_MODULE_3__.isFrameElement)(element)) {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(rect, (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)({}, this.FRAME_STYLE, attrs || {}));
+ } else {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(rect, (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)({}, this.SHAPE_STYLE, attrs || {}));
+ }
- function isBoundaryCandidate(element) {
- if (isBoundaryEvent(element)) {
- return true;
- }
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.append)(visuals, rect);
- if ((0, _ModelUtil.is)(element, 'bpmn:IntermediateThrowEvent') && hasNoEventDefinition(element)) {
- return true;
- }
+ return rect;
+};
- return (0, _ModelUtil.is)(element, 'bpmn:IntermediateCatchEvent') && hasCommonBoundaryIntermediateEventDefinition(element);
- }
+/**
+ * @private
+ */
+DefaultRenderer.prototype.drawConnection = function drawConnection(visuals, connection, attrs) {
- function hasNoEventDefinition(element) {
- var bo = (0, _ModelUtil.getBusinessObject)(element);
- return bo && !(bo.eventDefinitions && bo.eventDefinitions.length);
- }
+ var line = (0,_util_RenderUtil__WEBPACK_IMPORTED_MODULE_5__.createLine)(connection.waypoints, (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)({}, this.CONNECTION_STYLE, attrs || {}));
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.append)(visuals, line);
- function hasCommonBoundaryIntermediateEventDefinition(element) {
- return hasOneOfEventDefinitions(element, ['bpmn:MessageEventDefinition', 'bpmn:TimerEventDefinition', 'bpmn:SignalEventDefinition', 'bpmn:ConditionalEventDefinition']);
- }
+ return line;
+};
- function hasOneOfEventDefinitions(element, eventDefinitions) {
- return eventDefinitions.some(function (definition) {
- return hasEventDefinition(element, definition);
- });
- }
+/**
+ * @private
+ */
+DefaultRenderer.prototype.getShapePath = function getShapePath(shape) {
+
+ var x = shape.x,
+ y = shape.y,
+ width = shape.width,
+ height = shape.height;
+
+ var shapePath = [
+ [ 'M', x, y ],
+ [ 'l', width, 0 ],
+ [ 'l', 0, height ],
+ [ 'l', -width, 0 ],
+ [ 'z' ]
+ ];
+
+ return (0,_util_RenderUtil__WEBPACK_IMPORTED_MODULE_5__.componentsToPath)(shapePath);
+};
+
+/**
+ * @private
+ */
+DefaultRenderer.prototype.getConnectionPath = function getConnectionPath(connection) {
+ var waypoints = connection.waypoints;
- function isReceiveTaskAfterEventBasedGateway(element) {
- return (0, _ModelUtil.is)(element, 'bpmn:ReceiveTask') && (0, _minDash.find)(element.incoming, function (incoming) {
- return (0, _ModelUtil.is)(incoming.source, 'bpmn:EventBasedGateway');
- });
- }
+ var idx, point, connectionPath = [];
- function canAttach(elements, target, source, position) {
- if (!Array.isArray(elements)) {
- elements = [elements];
- } // only (re-)attach one element at a time
+ for (idx = 0; (point = waypoints[idx]); idx++) {
+ // take invisible docking into account
+ // when creating the path
+ point = point.original || point;
- if (elements.length !== 1) {
- return false;
- }
+ connectionPath.push([ idx === 0 ? 'M' : 'L', point.x, point.y ]);
+ }
- var element = elements[0]; // do not attach labels
+ return (0,_util_RenderUtil__WEBPACK_IMPORTED_MODULE_5__.componentsToPath)(connectionPath);
+};
- if ((0, _LabelUtil.isLabel)(element)) {
- return false;
- } // only handle boundary events
+DefaultRenderer.$inject = [ 'eventBus', 'styles' ];
- if (!isBoundaryCandidate(element)) {
- return false;
- } // disallow drop on event sub processes
+/***/ }),
+/***/ "../node_modules/diagram-js/lib/draw/Styles.js":
+/*!*****************************************************!*\
+ !*** ../node_modules/diagram-js/lib/draw/Styles.js ***!
+ \*****************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- if ((0, _DiUtil.isEventSubProcess)(target)) {
- return false;
- } // only allow drop on non compensation activities
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ Styles)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
- if (!(0, _ModelUtil.is)(target, 'bpmn:Activity') || isForCompensation(target)) {
- return false;
- } // only attach to subprocess border
+/**
+ * A component that manages shape styles
+ */
+function Styles() {
+
+ var defaultTraits = {
+
+ 'no-fill': {
+ fill: 'none'
+ },
+ 'no-border': {
+ strokeOpacity: 0.0
+ },
+ 'no-events': {
+ pointerEvents: 'none'
+ }
+ };
+
+ var self = this;
+
+ /**
+ * Builds a style definition from a className, a list of traits and an object
+ * of additional attributes.
+ *
+ * @param {string} className
+ * @param {string[]} [traits]
+ * @param {Object} [additionalAttrs]
+ *
+ * @return {Object} the style definition
+ */
+ this.cls = function(className, traits, additionalAttrs) {
+ var attrs = this.style(traits, additionalAttrs);
- if (position && !(0, _BpmnSnappingUtil.getBoundaryAttachment)(position, target)) {
- return false;
- } // do not attach on receive tasks after event based gateways
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(attrs, { 'class': className });
+ };
+ /**
+ * Builds a style definition from a list of traits and an object of additional
+ * attributes.
+ *
+ * @param {string[]} [traits]
+ * @param {Object} additionalAttrs
+ *
+ * @return {Object} the style definition
+ */
+ this.style = function(traits, additionalAttrs) {
- if (isReceiveTaskAfterEventBasedGateway(target)) {
- return false;
- }
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(traits) && !additionalAttrs) {
+ additionalAttrs = traits;
+ traits = [];
+ }
- return 'attach';
- }
- /**
- * Defines how to replace elements for a given target.
- *
- * Returns an array containing all elements which will be replaced.
- *
- * @example
- *
- * [{ id: 'IntermediateEvent_2',
- * type: 'bpmn:StartEvent'
- * },
- * { id: 'IntermediateEvent_5',
- * type: 'bpmn:EndEvent'
- * }]
- *
- * @param {Array} elements
- * @param {Object} target
- *
- * @return {Object} an object containing all elements which have to be replaced
- */
+ var attrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.reduce)(traits, function(attrs, t) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(attrs, defaultTraits[t] || {});
+ }, {});
+ return additionalAttrs ? (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(attrs, additionalAttrs) : attrs;
+ };
- function canReplace(elements, target, position) {
- if (!target) {
- return false;
- }
- var canExecute = {
- replacements: []
- };
- (0, _minDash.forEach)(elements, function (element) {
- if (!(0, _DiUtil.isEventSubProcess)(target)) {
- if ((0, _ModelUtil.is)(element, 'bpmn:StartEvent') && element.type !== 'label' && canDrop(element, target)) {
- // replace a non-interrupting start event by a blank interrupting start event
- // when the target is not an event sub process
- if (!(0, _DiUtil.isInterrupting)(element)) {
- canExecute.replacements.push({
- oldElementId: element.id,
- newElementType: 'bpmn:StartEvent'
- });
- } // replace an error/escalation/compensate start event by a blank interrupting start event
- // when the target is not an event sub process
+ /**
+ * Computes a style definition from a list of traits and an object of
+ * additional attributes, with custom style definition object.
+ *
+ * @param {Object} custom
+ * @param {string[]} [traits]
+ * @param {Object} defaultStyles
+ *
+ * @return {Object} the style definition
+ */
+ this.computeStyle = function(custom, traits, defaultStyles) {
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(traits)) {
+ defaultStyles = traits;
+ traits = [];
+ }
+ return self.style(traits || [], (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, defaultStyles, custom || {}));
+ };
+}
- if ((0, _DiUtil.hasErrorEventDefinition)(element) || (0, _DiUtil.hasEscalationEventDefinition)(element) || (0, _DiUtil.hasCompensateEventDefinition)(element)) {
- canExecute.replacements.push({
- oldElementId: element.id,
- newElementType: 'bpmn:StartEvent'
- });
- }
- }
- }
- if (!(0, _ModelUtil.is)(target, 'bpmn:Transaction')) {
- if (hasEventDefinition(element, 'bpmn:CancelEventDefinition') && element.type !== 'label') {
- if ((0, _ModelUtil.is)(element, 'bpmn:EndEvent') && canDrop(element, target)) {
- canExecute.replacements.push({
- oldElementId: element.id,
- newElementType: 'bpmn:EndEvent'
- });
- }
+/***/ }),
- if ((0, _ModelUtil.is)(element, 'bpmn:BoundaryEvent') && canAttach(element, target, null, position)) {
- canExecute.replacements.push({
- oldElementId: element.id,
- newElementType: 'bpmn:BoundaryEvent'
- });
- }
- }
- }
- });
- return canExecute.replacements.length ? canExecute : false;
- }
+/***/ "../node_modules/diagram-js/lib/draw/index.js":
+/*!****************************************************!*\
+ !*** ../node_modules/diagram-js/lib/draw/index.js ***!
+ \****************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- function canMove(elements, target) {
- // do not move selection containing lanes
- if ((0, _minDash.some)(elements, isLane)) {
- return false;
- } // allow default move check to start move operation
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _DefaultRenderer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DefaultRenderer */ "../node_modules/diagram-js/lib/draw/DefaultRenderer.js");
+/* harmony import */ var _Styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Styles */ "../node_modules/diagram-js/lib/draw/Styles.js");
- if (!target) {
- return true;
- }
- return elements.every(function (element) {
- return canDrop(element, target);
- });
- }
+/**
+ * @type { import('didi').ModuleDeclaration }
+ */
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __init__: [ 'defaultRenderer' ],
+ defaultRenderer: [ 'type', _DefaultRenderer__WEBPACK_IMPORTED_MODULE_0__["default"] ],
+ styles: [ 'type', _Styles__WEBPACK_IMPORTED_MODULE_1__["default"] ]
+});
- function canCreate(shape, target, source, position) {
- if (!target) {
- return false;
- }
- if ((0, _LabelUtil.isLabel)(shape) || isGroup(shape)) {
- return true;
- }
+/***/ }),
- if (isSame(source, target)) {
- return false;
- } // ensure we do not drop the element
- // into source
+/***/ "../node_modules/diagram-js/lib/features/align-elements/AlignElements.js":
+/*!*******************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/align-elements/AlignElements.js ***!
+ \*******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ AlignElements)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
- if (source && isParent(source, target)) {
- return false;
- }
- return canDrop(shape, target, position) || canInsert(shape, target, position);
- }
+/**
+ * @typedef {import('../../model/Types').Element} Element
+ *
+ * @typedef {import('../modeling/Modeling').default} Modeling
+ * @typedef {import('../rules/Rules').default} Rules
+ *
+ * @typedef {import('../../util/Types').Axis} Axis
+ * @typedef {import('../../util/Types').Dimension} Dimension
+ *
+ * @typedef { 'top' | 'right' | 'bottom' | 'left' | 'center' | 'middle' } Alignment
+ */
- function canResize(shape, newBounds) {
- if ((0, _ModelUtil.is)(shape, 'bpmn:SubProcess')) {
- return (0, _DiUtil.isExpanded)(shape) && (!newBounds || newBounds.width >= 100 && newBounds.height >= 80);
- }
+function last(arr) {
+ return arr && arr[arr.length - 1];
+}
- if ((0, _ModelUtil.is)(shape, 'bpmn:Lane')) {
- return !newBounds || newBounds.width >= 130 && newBounds.height >= 60;
- }
+function sortTopOrMiddle(element) {
+ return element.y;
+}
- if ((0, _ModelUtil.is)(shape, 'bpmn:Participant')) {
- return !newBounds || newBounds.width >= 250 && newBounds.height >= 50;
- }
+function sortLeftOrCenter(element) {
+ return element.x;
+}
- if (isTextAnnotation(shape)) {
- return true;
- }
+/**
+ * Sorting functions for different alignments.
+ *
+ * @type {Record}
+ */
+var ALIGNMENT_SORTING = {
+ left: sortLeftOrCenter,
+ center: sortLeftOrCenter,
+ right: function(element) {
+ return element.x + element.width;
+ },
+ top: sortTopOrMiddle,
+ middle: sortTopOrMiddle,
+ bottom: function(element) {
+ return element.y + element.height;
+ }
+};
+
+/**
+ * @param {Modeling} modeling
+ * @param {Rules} rules
+ */
+function AlignElements(modeling, rules) {
+ this._modeling = modeling;
+ this._rules = rules;
+}
- if (isGroup(shape)) {
- return true;
- }
+AlignElements.$inject = [ 'modeling', 'rules' ];
- return false;
- }
- /**
- * Check, whether one side of the relationship
- * is a text annotation.
- */
+/**
+ * Get relevant axis and dimension for given alignment.
+ *
+ * @param {Alignment} type
+ *
+ * @return { {
+ * axis: Axis;
+ * dimension: Dimension;
+ * } }
+ */
+AlignElements.prototype._getOrientationDetails = function(type) {
+ var vertical = [ 'top', 'bottom', 'middle' ],
+ axis = 'x',
+ dimension = 'width';
+
+ if (vertical.indexOf(type) !== -1) {
+ axis = 'y';
+ dimension = 'height';
+ }
+
+ return {
+ axis: axis,
+ dimension: dimension
+ };
+};
+
+AlignElements.prototype._isType = function(type, types) {
+ return types.indexOf(type) !== -1;
+};
+
+/**
+ * Get point on relevant axis for given alignment.
+ *
+ * @param {Alignment} type
+ * @param {Element[]} sortedElements
+ *
+ * @return {Partial>}
+ */
+AlignElements.prototype._alignmentPosition = function(type, sortedElements) {
+ var orientation = this._getOrientationDetails(type),
+ axis = orientation.axis,
+ dimension = orientation.dimension,
+ alignment = {},
+ centers = {},
+ hasSharedCenters = false,
+ centeredElements,
+ firstElement,
+ lastElement;
- function isOneTextAnnotation(source, target) {
- var sourceTextAnnotation = isTextAnnotation(source),
- targetTextAnnotation = isTextAnnotation(target);
- return (sourceTextAnnotation || targetTextAnnotation) && sourceTextAnnotation !== targetTextAnnotation;
- }
+ function getMiddleOrTop(first, last) {
+ return Math.round((first[axis] + last[axis] + last[dimension]) / 2);
+ }
- function canConnectAssociation(source, target) {
- // do not connect connections
- if (isConnection(source) || isConnection(target)) {
- return false;
- } // compensation boundary events are exception
+ if (this._isType(type, [ 'left', 'top' ])) {
+ alignment[type] = sortedElements[0][axis];
+ } else if (this._isType(type, [ 'right', 'bottom' ])) {
+ lastElement = last(sortedElements);
- if (isCompensationBoundary(source) && isForCompensation(target)) {
- return true;
- } // don't connect parent <-> child
+ alignment[type] = lastElement[axis] + lastElement[dimension];
+ } else if (this._isType(type, [ 'center', 'middle' ])) {
- if (isParent(target, source) || isParent(source, target)) {
- return false;
- } // allow connection of associations between and
+ // check if there is a center shared by more than one shape
+ // if not, just take the middle of the range
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(sortedElements, function(element) {
+ var center = element[axis] + Math.round(element[dimension] / 2);
+ if (centers[center]) {
+ centers[center].elements.push(element);
+ } else {
+ centers[center] = {
+ elements: [ element ],
+ center: center
+ };
+ }
+ });
- if (isOneTextAnnotation(source, target)) {
- return true;
- } // can connect associations where we can connect
- // data associations, too (!)
+ centeredElements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.sortBy)(centers, function(center) {
+ if (center.elements.length > 1) {
+ hasSharedCenters = true;
+ }
+ return center.elements.length;
+ });
- return !!canConnectDataAssociation(source, target);
- }
+ if (hasSharedCenters) {
+ alignment[type] = last(centeredElements).center;
- function canConnectMessageFlow(source, target) {
- // during connect user might move mouse out of canvas
- // https://github.com/bpmn-io/bpmn-js/issues/1033
- if (getRootElement(source) && !getRootElement(target)) {
- return false;
- }
+ return alignment;
+ }
- return isMessageFlowSource(source) && isMessageFlowTarget(target) && !isSameOrganization(source, target);
- }
+ firstElement = sortedElements[0];
- function canConnectSequenceFlow(source, target) {
- if (isEventBasedTarget(target) && target.incoming.length > 0 && areOutgoingEventBasedGatewayConnections(target.incoming) && !(0, _ModelUtil.is)(source, 'bpmn:EventBasedGateway')) {
- return false;
- }
+ sortedElements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.sortBy)(sortedElements, function(element) {
+ return element[axis] + element[dimension];
+ });
- return isSequenceFlowSource(source) && isSequenceFlowTarget(target) && isSameScope(source, target) && !((0, _ModelUtil.is)(source, 'bpmn:EventBasedGateway') && !isEventBasedTarget(target));
- }
+ lastElement = last(sortedElements);
- function canConnectDataAssociation(source, target) {
- if ((0, _ModelingUtil.isAny)(source, ['bpmn:DataObjectReference', 'bpmn:DataStoreReference']) && (0, _ModelingUtil.isAny)(target, ['bpmn:Activity', 'bpmn:ThrowEvent'])) {
- return {
- type: 'bpmn:DataInputAssociation'
- };
- }
+ alignment[type] = getMiddleOrTop(firstElement, lastElement);
+ }
- if ((0, _ModelingUtil.isAny)(target, ['bpmn:DataObjectReference', 'bpmn:DataStoreReference']) && (0, _ModelingUtil.isAny)(source, ['bpmn:Activity', 'bpmn:CatchEvent'])) {
- return {
- type: 'bpmn:DataOutputAssociation'
- };
- }
+ return alignment;
+};
- return false;
- }
+/**
+ * Align elements on relevant axis for given alignment.
+ *
+ * @param {Element[]} elements
+ * @param {Alignment} type
+ */
+AlignElements.prototype.trigger = function(elements, type) {
+ var modeling = this._modeling,
+ allowed;
- function canInsert(shape, flow, position) {
- if (!flow) {
- return false;
- }
+ // filter out elements which cannot be aligned
+ var filteredElements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(elements, function(element) {
+ return !(element.waypoints || element.host || element.labelTarget);
+ });
- if (Array.isArray(shape)) {
- if (shape.length !== 1) {
- return false;
- }
+ // filter out elements via rules
+ allowed = this._rules.allowed('elements.align', { elements: filteredElements });
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(allowed)) {
+ filteredElements = allowed;
+ }
- shape = shape[0];
- }
+ if (filteredElements.length < 2 || !allowed) {
+ return;
+ }
- if (flow.source === shape || flow.target === shape) {
- return false;
- } // return true if we can drop on the
- // underlying flow parent
- //
- // at this point we are not really able to talk
- // about connection rules (yet)
+ var sortFn = ALIGNMENT_SORTING[type];
+ var sortedElements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.sortBy)(filteredElements, sortFn);
- return (0, _ModelingUtil.isAny)(flow, ['bpmn:SequenceFlow', 'bpmn:MessageFlow']) && !(0, _LabelUtil.isLabel)(flow) && (0, _ModelUtil.is)(shape, 'bpmn:FlowNode') && !(0, _ModelUtil.is)(shape, 'bpmn:BoundaryEvent') && canDrop(shape, flow.parent, position);
- }
+ var alignment = this._alignmentPosition(type, sortedElements);
- function includes(elements, element) {
- return elements && element && elements.indexOf(element) !== -1;
- }
+ modeling.alignElements(sortedElements, alignment);
+};
- function canCopy(elements, element) {
- if ((0, _LabelUtil.isLabel)(element)) {
- return true;
- }
- if ((0, _ModelUtil.is)(element, 'bpmn:Lane') && !includes(elements, element.parent)) {
- return false;
- }
+/***/ }),
- return true;
- }
+/***/ "../node_modules/diagram-js/lib/features/align-elements/index.js":
+/*!***********************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/align-elements/index.js ***!
+ \***********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- function isOutgoingEventBasedGatewayConnection(connection) {
- if (connection && connection.source) {
- return (0, _ModelUtil.is)(connection.source, 'bpmn:EventBasedGateway');
- }
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _AlignElements__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AlignElements */ "../node_modules/diagram-js/lib/features/align-elements/AlignElements.js");
- function areOutgoingEventBasedGatewayConnections(connections) {
- connections = connections || [];
- return connections.some(isOutgoingEventBasedGatewayConnection);
- }
- function getRootElement(element) {
- return (0, _ModelingUtil.getParent)(element, 'bpmn:Process') || (0, _ModelingUtil.getParent)(element, 'bpmn:Collaboration');
- }
+/**
+ * @type { import('didi').ModuleDeclaration }
+ */
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __init__: [ 'alignElements' ],
+ alignElements: [ 'type', _AlignElements__WEBPACK_IMPORTED_MODULE_0__["default"] ]
+});
- },{"../../util/DiUtil":238,"../../util/LabelUtil":239,"../../util/ModelUtil":240,"../modeling/util/ModelingUtil":211,"../snapping/BpmnSnappingUtil":230,"diagram-js/lib/features/rules/RuleProvider":375,"inherits":438,"min-dash":646}],225:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+/***/ }),
- var _rules = _interopRequireDefault(require("diagram-js/lib/features/rules"));
+/***/ "../node_modules/diagram-js/lib/features/attach-support/AttachSupport.js":
+/*!*******************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/attach-support/AttachSupport.js ***!
+ \*******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var _BpmnRules = _interopRequireDefault(require("./BpmnRules"));
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ AttachSupport)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _util_Removal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/Removal */ "../node_modules/diagram-js/lib/util/Removal.js");
+/* harmony import */ var _util_AttachUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/AttachUtil */ "../node_modules/diagram-js/lib/util/AttachUtil.js");
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var _default = {
- __depends__: [_rules.default],
- __init__: ['bpmnRules'],
- bpmnRules: ['type', _BpmnRules.default]
- };
- exports.default = _default;
- },{"./BpmnRules":224,"diagram-js/lib/features/rules":377}],226:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BpmnSearchProvider;
- var _minDash = require("min-dash");
- var _LabelUtil = require("../label-editing/LabelUtil");
- /**
- * Provides ability to search through BPMN elements
- */
- function BpmnSearchProvider(elementRegistry, searchPad, canvas) {
- this._elementRegistry = elementRegistry;
- this._canvas = canvas;
- searchPad.registerProvider(this);
- }
- BpmnSearchProvider.$inject = ['elementRegistry', 'searchPad', 'canvas'];
- /**
- * Finds all elements that match given pattern
- *
- * :
- * {
- * primaryTokens: >,
- * secondaryTokens: >,
- * element:
- * }
- *
- * :
- * {
- * normal|matched:
- * }
- *
- * @param {string} pattern
- * @return {Array}
- */
- BpmnSearchProvider.prototype.find = function (pattern) {
- var rootElement = this._canvas.getRootElement();
- var elements = this._elementRegistry.filter(function (element) {
- if (element.labelTarget) {
- return false;
- }
+/**
+ * @typedef {import('didi').Injector} Injector
+ *
+ * @typedef {import('../../model/Types').Element} Element
+ *
+ * @typedef {import('../../core/Canvas').default} Canvas
+ * @typedef {import('../../core/EventBus').default} EventBus
+ * @typedef {import('../rules/Rules').default} Rules
+ * @typedef {import('../modeling/Modeling').default} Modeling
+ */
- return true;
- }); // do not include root element
+var LOW_PRIORITY = 251,
+ HIGH_PRIORITY = 1401;
+var MARKER_ATTACH = 'attach-ok';
- elements = (0, _minDash.filter)(elements, function (element) {
- return element !== rootElement;
- });
- elements = (0, _minDash.map)(elements, function (element) {
- return {
- primaryTokens: matchAndSplit((0, _LabelUtil.getLabel)(element), pattern),
- secondaryTokens: matchAndSplit(element.id, pattern),
- element: element
- };
- }); // exclude non-matched elements
- elements = (0, _minDash.filter)(elements, function (element) {
- return hasMatched(element.primaryTokens) || hasMatched(element.secondaryTokens);
- });
- elements = (0, _minDash.sortBy)(elements, function (element) {
- return (0, _LabelUtil.getLabel)(element.element) + element.element.id;
- });
- return elements;
- };
+/**
+ * Adds the notion of attached elements to the modeler.
+ *
+ * Optionally depends on `diagram-js/lib/features/move` to render
+ * the attached elements during move preview.
+ *
+ * Optionally depends on `diagram-js/lib/features/label-support`
+ * to render attached labels during move preview.
+ *
+ * @param {Injector} injector
+ * @param {EventBus} eventBus
+ * @param {Canvas} canvas
+ * @param {Rules} rules
+ * @param {Modeling} modeling
+ */
+function AttachSupport(injector, eventBus, canvas, rules, modeling) {
- function hasMatched(tokens) {
- var matched = (0, _minDash.filter)(tokens, function (t) {
- return !!t.matched;
- });
- return matched.length > 0;
- }
+ _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- function matchAndSplit(text, pattern) {
- var tokens = [],
- originalText = text;
+ var movePreview = injector.get('movePreview', false);
- if (!text) {
- return tokens;
- }
- text = text.toLowerCase();
- pattern = pattern.toLowerCase();
- var i = text.indexOf(pattern);
+ // remove all the attached elements from the shapes to be validated
+ // add all the attached shapes to the overall list of moved shapes
+ eventBus.on('shape.move.start', HIGH_PRIORITY, function(e) {
- if (i > -1) {
- if (i !== 0) {
- tokens.push({
- normal: originalText.substr(0, i)
- });
- }
+ var context = e.context,
+ shapes = context.shapes,
+ validatedShapes = context.validatedShapes;
- tokens.push({
- matched: originalText.substr(i, pattern.length)
- });
+ context.shapes = addAttached(shapes);
- if (pattern.length + i < text.length) {
- tokens.push({
- normal: originalText.substr(pattern.length + i, text.length)
- });
- }
- } else {
- tokens.push({
- normal: originalText
- });
- }
+ context.validatedShapes = removeAttached(validatedShapes);
+ });
- return tokens;
- }
+ // add attachers to the visual's group
+ movePreview && eventBus.on('shape.move.start', LOW_PRIORITY, function(e) {
- },{"../label-editing/LabelUtil":152,"min-dash":646}],227:[function(require,module,exports){
- "use strict";
+ var context = e.context,
+ shapes = context.shapes,
+ attachers = getAttachers(shapes);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(attachers, function(attacher) {
+ movePreview.makeDraggable(context, attacher, true);
- var _searchPad = _interopRequireDefault(require("diagram-js/lib/features/search-pad"));
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(attacher.labels, function(label) {
+ movePreview.makeDraggable(context, label, true);
+ });
+ });
+ });
- var _BpmnSearchProvider = _interopRequireDefault(require("./BpmnSearchProvider"));
+ // add attach-ok marker to current host
+ movePreview && eventBus.on('shape.move.start', function(event) {
+ var context = event.context,
+ shapes = context.shapes;
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ if (shapes.length !== 1) {
+ return;
+ }
- var _default = {
- __depends__: [_searchPad.default],
- __init__: ['bpmnSearch'],
- bpmnSearch: ['type', _BpmnSearchProvider.default]
- };
- exports.default = _default;
+ var shape = shapes[0];
- },{"./BpmnSearchProvider":226,"diagram-js/lib/features/search-pad":379}],228:[function(require,module,exports){
- "use strict";
+ var host = shape.host;
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BpmnConnectSnapping;
+ if (host) {
+ canvas.addMarker(host, MARKER_ATTACH);
- var _SnapUtil = require("diagram-js/lib/features/snapping/SnapUtil");
+ eventBus.once([
+ 'shape.move.out',
+ 'shape.move.cleanup'
+ ], function() {
+ canvas.removeMarker(host, MARKER_ATTACH);
+ });
+ }
+ });
- var _KeyboardUtil = require("diagram-js/lib/features/keyboard/KeyboardUtil");
+ // add all attachers to move closure
+ this.preExecuted('elements.move', HIGH_PRIORITY, function(e) {
+ var context = e.context,
+ closure = context.closure,
+ shapes = context.shapes,
+ attachers = getAttachers(shapes);
- var _LayoutUtil = require("diagram-js/lib/layout/LayoutUtil");
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(attachers, function(attacher) {
+ closure.add(attacher, closure.topLevel[attacher.host.id]);
+ });
+ });
- var _ModelUtil = require("../../util/ModelUtil");
+ // perform the attaching after shapes are done moving
+ this.postExecuted('elements.move', function(e) {
- var _ModelingUtil = require("../modeling/util/ModelingUtil");
+ var context = e.context,
+ shapes = context.shapes,
+ newHost = context.newHost,
+ attachers;
- var _minDash = require("min-dash");
+ // only single elements can be attached
+ // multiply elements can be detached
+ if (newHost && shapes.length !== 1) {
+ return;
+ }
- var HIGHER_PRIORITY = 1250;
- var BOUNDARY_TO_HOST_THRESHOLD = 40;
- var TARGET_BOUNDS_PADDING = 20,
- TASK_BOUNDS_PADDING = 10;
- var TARGET_CENTER_PADDING = 20;
- var AXES = ['x', 'y'];
- var abs = Math.abs;
- /**
- * Snap during connect.
- *
- * @param {EventBus} eventBus
- */
+ if (newHost) {
+ attachers = shapes;
+ } else {
- function BpmnConnectSnapping(eventBus) {
- eventBus.on(['connect.hover', 'connect.move', 'connect.end'], HIGHER_PRIORITY, function (event) {
- var context = event.context,
- canExecute = context.canExecute,
- start = context.start,
- hover = context.hover,
- source = context.source,
- target = context.target; // do NOT snap on CMD
+ // find attachers moved without host
+ attachers = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.filter)(shapes, function(shape) {
+ var host = shape.host;
- if (event.originalEvent && (0, _KeyboardUtil.isCmd)(event.originalEvent)) {
- return;
- }
+ return isAttacher(shape) && !includes(shapes, host);
+ });
+ }
- if (!context.initialConnectionStart) {
- context.initialConnectionStart = context.connectionStart;
- } // snap hover
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(attachers, function(attacher) {
+ modeling.updateAttachment(attacher, newHost);
+ });
+ });
+ // ensure invalid attachment connections are removed
+ this.postExecuted('elements.move', function(e) {
- if (canExecute && hover) {
- snapToShape(event, hover, getTargetBoundsPadding(hover));
- }
+ var shapes = e.context.shapes;
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(shapes, function(shape) {
- if (hover && isAnyType(canExecute, ['bpmn:Association', 'bpmn:DataInputAssociation', 'bpmn:DataOutputAssociation', 'bpmn:SequenceFlow'])) {
- context.connectionStart = (0, _SnapUtil.mid)(start); // snap hover
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(shape.attachers, function(attacher) {
+
+ // remove invalid outgoing connections
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(attacher.outgoing.slice(), function(connection) {
+ var allowed = rules.allowed('connection.reconnect', {
+ connection: connection,
+ source: connection.source,
+ target: connection.target
+ });
+
+ if (!allowed) {
+ modeling.removeConnection(connection);
+ }
+ });
- if ((0, _ModelingUtil.isAny)(hover, ['bpmn:Event', 'bpmn:Gateway'])) {
- snapToPosition(event, (0, _SnapUtil.mid)(hover));
- } // snap hover
+ // remove invalid incoming connections
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(attacher.incoming.slice(), function(connection) {
+ var allowed = rules.allowed('connection.reconnect', {
+ connection: connection,
+ source: connection.source,
+ target: connection.target
+ });
+
+ if (!allowed) {
+ modeling.removeConnection(connection);
+ }
+ });
+ });
+ });
+ });
+
+ this.postExecute('shape.create', function(e) {
+ var context = e.context,
+ shape = context.shape,
+ host = context.host;
+
+ if (host) {
+ modeling.updateAttachment(shape, host);
+ }
+ });
+
+ // update attachments if the host is replaced
+ this.postExecute('shape.replace', function(e) {
+
+ var context = e.context,
+ oldShape = context.oldShape,
+ newShape = context.newShape;
+
+ // move the attachers to the new host
+ (0,_util_Removal__WEBPACK_IMPORTED_MODULE_2__.saveClear)(oldShape.attachers, function(attacher) {
+ var allowed = rules.allowed('elements.move', {
+ target: newShape,
+ shapes: [ attacher ]
+ });
+
+ if (allowed === 'attach') {
+ modeling.updateAttachment(attacher, newShape);
+ } else {
+ modeling.removeShape(attacher);
+ }
+ });
+
+ // move attachers if new host has different size
+ if (newShape.attachers.length) {
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(newShape.attachers, function(attacher) {
+ var delta = (0,_util_AttachUtil__WEBPACK_IMPORTED_MODULE_3__.getNewAttachShapeDelta)(attacher, oldShape, newShape);
+ modeling.moveShape(attacher, delta, attacher.parent);
+ });
+ }
+
+ });
+
+ // move shape on host resize
+ this.postExecute('shape.resize', function(event) {
+ var context = event.context,
+ shape = context.shape,
+ oldBounds = context.oldBounds,
+ newBounds = context.newBounds,
+ attachers = shape.attachers,
+ hints = context.hints || {};
+
+ if (hints.attachSupport === false) {
+ return;
+ }
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(attachers, function(attacher) {
+ var delta = (0,_util_AttachUtil__WEBPACK_IMPORTED_MODULE_3__.getNewAttachShapeDelta)(attacher, oldBounds, newBounds);
+
+ modeling.moveShape(attacher, delta, attacher.parent);
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(attacher.labels, function(label) {
+ modeling.moveShape(label, delta, label.parent);
+ });
+ });
+ });
+
+ // remove attachments
+ this.preExecute('shape.delete', function(event) {
+
+ var shape = event.context.shape;
+
+ (0,_util_Removal__WEBPACK_IMPORTED_MODULE_2__.saveClear)(shape.attachers, function(attacher) {
+ modeling.removeShape(attacher);
+ });
+
+ if (shape.host) {
+ modeling.updateAttachment(shape, null);
+ }
+ });
+}
+
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_4__["default"])(AttachSupport, _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
+
+AttachSupport.$inject = [
+ 'injector',
+ 'eventBus',
+ 'canvas',
+ 'rules',
+ 'modeling'
+];
+
+
+/**
+ * Return attachers of the given shapes
+ *
+ * @param {Element[]} shapes
+ * @return {Element[]}
+ */
+function getAttachers(shapes) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.flatten)((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.map)(shapes, function(s) {
+ return s.attachers || [];
+ }));
+}
+
+/**
+ * Return a combined list of elements and
+ * attachers.
+ *
+ * @param {Element[]} elements
+ * @return {Element[]} filtered
+ */
+function addAttached(elements) {
+ var attachers = getAttachers(elements);
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.unionBy)('id', elements, attachers);
+}
- if ((0, _ModelingUtil.isAny)(hover, ['bpmn:Task', 'bpmn:SubProcess'])) {
- snapToTargetMid(event, hover);
- } // snap source and target
+/**
+ * Return a filtered list of elements that do not
+ * contain attached elements with hosts being part
+ * of the selection.
+ *
+ * @param {Element[]} elements
+ *
+ * @return {Element[]} filtered
+ */
+function removeAttached(elements) {
+ var ids = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.groupBy)(elements, 'id');
- if ((0, _ModelUtil.is)(source, 'bpmn:BoundaryEvent') && target === source.host) {
- snapBoundaryEventLoop(event);
- }
- } else if (isType(canExecute, 'bpmn:MessageFlow')) {
- if ((0, _ModelUtil.is)(start, 'bpmn:Event')) {
- // snap start
- context.connectionStart = (0, _SnapUtil.mid)(start);
- }
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.filter)(elements, function(element) {
+ while (element) {
- if ((0, _ModelUtil.is)(hover, 'bpmn:Event')) {
- // snap hover
- snapToPosition(event, (0, _SnapUtil.mid)(hover));
- }
- } else {
- // un-snap source
- context.connectionStart = context.initialConnectionStart;
- }
- });
- }
+ // host in selection
+ if (element.host && ids[element.host.id]) {
+ return false;
+ }
- BpmnConnectSnapping.$inject = ['eventBus']; // helpers //////////
-// snap to target if event in target
+ element = element.parent;
+ }
- function snapToShape(event, target, padding) {
- AXES.forEach(function (axis) {
- var dimensionForAxis = getDimensionForAxis(axis, target);
+ return true;
+ });
+}
- if (event[axis] < target[axis] + padding) {
- (0, _SnapUtil.setSnapped)(event, axis, target[axis] + padding);
- } else if (event[axis] > target[axis] + dimensionForAxis - padding) {
- (0, _SnapUtil.setSnapped)(event, axis, target[axis] + dimensionForAxis - padding);
- }
- });
- } // snap to target mid if event in target mid
+function isAttacher(shape) {
+ return !!shape.host;
+}
+function includes(array, item) {
+ return array.indexOf(item) !== -1;
+}
- function snapToTargetMid(event, target) {
- var targetMid = (0, _SnapUtil.mid)(target);
- AXES.forEach(function (axis) {
- if (isMid(event, target, axis)) {
- (0, _SnapUtil.setSnapped)(event, axis, targetMid[axis]);
- }
- });
- } // snap to prevent loop overlapping boundary event
+/***/ }),
+/***/ "../node_modules/diagram-js/lib/features/attach-support/index.js":
+/*!***********************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/attach-support/index.js ***!
+ \***********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- function snapBoundaryEventLoop(event) {
- var context = event.context,
- source = context.source,
- target = context.target;
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _rules__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rules */ "../node_modules/diagram-js/lib/features/rules/index.js");
+/* harmony import */ var _AttachSupport__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AttachSupport */ "../node_modules/diagram-js/lib/features/attach-support/AttachSupport.js");
- if (isReverse(context)) {
- return;
- }
- var sourceMid = (0, _SnapUtil.mid)(source),
- orientation = (0, _LayoutUtil.getOrientation)(sourceMid, target, -10),
- axes = [];
- if (/top|bottom/.test(orientation)) {
- axes.push('x');
- }
- if (/left|right/.test(orientation)) {
- axes.push('y');
- }
+/**
+ * @type { import('didi').ModuleDeclaration }
+ */
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ _rules__WEBPACK_IMPORTED_MODULE_0__["default"]
+ ],
+ __init__: [ 'attachSupport' ],
+ attachSupport: [ 'type', _AttachSupport__WEBPACK_IMPORTED_MODULE_1__["default"] ]
+});
- axes.forEach(function (axis) {
- var coordinate = event[axis],
- newCoordinate;
- if (abs(coordinate - sourceMid[axis]) < BOUNDARY_TO_HOST_THRESHOLD) {
- if (coordinate > sourceMid[axis]) {
- newCoordinate = sourceMid[axis] + BOUNDARY_TO_HOST_THRESHOLD;
- } else {
- newCoordinate = sourceMid[axis] - BOUNDARY_TO_HOST_THRESHOLD;
- }
+/***/ }),
- (0, _SnapUtil.setSnapped)(event, axis, newCoordinate);
- }
- });
- }
+/***/ "../node_modules/diagram-js/lib/features/auto-place/AutoPlace.js":
+/*!***********************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/auto-place/AutoPlace.js ***!
+ \***********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- function snapToPosition(event, position) {
- (0, _SnapUtil.setSnapped)(event, 'x', position.x);
- (0, _SnapUtil.setSnapped)(event, 'y', position.y);
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ AutoPlace)
+/* harmony export */ });
+/* harmony import */ var _layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+/* harmony import */ var _AutoPlaceUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AutoPlaceUtil */ "../node_modules/diagram-js/lib/features/auto-place/AutoPlaceUtil.js");
- function isType(attrs, type) {
- return attrs && attrs.type === type;
- }
- function isAnyType(attrs, types) {
- return (0, _minDash.some)(types, function (type) {
- return isType(attrs, type);
- });
- }
- function getDimensionForAxis(axis, element) {
- return axis === 'x' ? element.width : element.height;
- }
- function getTargetBoundsPadding(target) {
- if ((0, _ModelUtil.is)(target, 'bpmn:Task')) {
- return TASK_BOUNDS_PADDING;
- } else {
- return TARGET_BOUNDS_PADDING;
- }
- }
+/**
+ * @typedef {import('../../core/Types').ShapeLike} Shape
+ *
+ * @typedef {import('../../util/Types').Point} Point
+ *
+ * @typedef {import('../../core/Canvas').default} Canvas
+ * @typedef {import('../../core/EventBus').default} EventBus
+ * @typedef {import('../modeling/Modeling').default} Modeling
+ */
- function isMid(event, target, axis) {
- return event[axis] > target[axis] + TARGET_CENTER_PADDING && event[axis] < target[axis] + getDimensionForAxis(axis, target) - TARGET_CENTER_PADDING;
- }
+var LOW_PRIORITY = 100;
- function isReverse(context) {
- var hover = context.hover,
- source = context.source;
- return hover && source && hover === source;
- }
- },{"../../util/ModelUtil":240,"../modeling/util/ModelingUtil":211,"diagram-js/lib/features/keyboard/KeyboardUtil":321,"diagram-js/lib/features/snapping/SnapUtil":387,"diagram-js/lib/layout/LayoutUtil":405,"min-dash":646}],229:[function(require,module,exports){
- "use strict";
+/**
+ * A service that places elements connected to existing ones
+ * to an appropriate position in an _automated_ fashion.
+ *
+ * @param {EventBus} eventBus
+ * @param {Modeling} modeling
+ * @param {Canvas} canvas
+ */
+function AutoPlace(eventBus, modeling, canvas) {
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BpmnCreateMoveSnapping;
+ eventBus.on('autoPlace', LOW_PRIORITY, function(context) {
+ var shape = context.shape,
+ source = context.source;
- var _inherits = _interopRequireDefault(require("inherits"));
+ return getNewShapePosition(source, shape);
+ });
- var _CreateMoveSnapping = _interopRequireDefault(require("diagram-js/lib/features/snapping/CreateMoveSnapping"));
+ eventBus.on('autoPlace.end', function(event) {
+ canvas.scrollToElement(event.shape);
+ });
- var _SnapUtil = require("diagram-js/lib/features/snapping/SnapUtil");
+ /**
+ * Append shape to source at appropriate position.
+ *
+ * @param {Shape} source
+ * @param {Shape} shape
+ *
+ * @return {Shape} appended shape
+ */
+ this.append = function(source, shape, hints) {
- var _DiUtil = require("../../util/DiUtil");
+ eventBus.fire('autoPlace.start', {
+ source: source,
+ shape: shape
+ });
- var _ModelUtil = require("../../util/ModelUtil");
+ // allow others to provide the position
+ var position = eventBus.fire('autoPlace', {
+ source: source,
+ shape: shape
+ });
- var _LayoutUtil = require("diagram-js/lib/layout/LayoutUtil");
+ var newShape = modeling.appendShape(source, shape, position, source.parent, hints);
- var _BpmnSnappingUtil = require("./BpmnSnappingUtil");
+ eventBus.fire('autoPlace.end', {
+ source: source,
+ shape: newShape
+ });
- var _minDash = require("min-dash");
+ return newShape;
+ };
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+}
- var HIGH_PRIORITY = 1500;
- /**
- * Snap during create and move.
- *
- * @param {EventBus} eventBus
- * @param {Injector} injector
- */
+AutoPlace.$inject = [
+ 'eventBus',
+ 'modeling',
+ 'canvas'
+];
- function BpmnCreateMoveSnapping(eventBus, injector) {
- injector.invoke(_CreateMoveSnapping.default, this); // creating first participant
+// helpers //////////
- eventBus.on(['create.move', 'create.end'], HIGH_PRIORITY, setSnappedIfConstrained); // snap boundary events
+/**
+ * Find the new position for the target element to
+ * connect to source.
+ *
+ * @param {Shape} source
+ * @param {Shape} element
+ * @param {Object} [hints]
+ * @param {Object} [hints.defaultDistance]
+ *
+ * @return {Point}
+ */
+function getNewShapePosition(source, element, hints) {
+ if (!hints) {
+ hints = {};
+ }
+
+ var distance = hints.defaultDistance || _AutoPlaceUtil__WEBPACK_IMPORTED_MODULE_0__.DEFAULT_DISTANCE;
+
+ var sourceMid = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(source),
+ sourceTrbl = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(source);
+
+ // simply put element right next to source
+ return {
+ x: sourceTrbl.right + distance + element.width / 2,
+ y: sourceMid.y
+ };
+}
+
+/***/ }),
+
+/***/ "../node_modules/diagram-js/lib/features/auto-place/AutoPlaceSelectionBehavior.js":
+/*!****************************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/auto-place/AutoPlaceSelectionBehavior.js ***!
+ \****************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ AutoPlaceSelectionBehavior)
+/* harmony export */ });
+/**
+ * @typedef {import('../../core/EventBus').default} EventBus
+ * @typedef {import('../selection/Selection').default} Selection
+ */
- eventBus.on(['create.move', 'create.end', 'shape.move.move', 'shape.move.end'], HIGH_PRIORITY, function (event) {
- var context = event.context,
- canExecute = context.canExecute,
- target = context.target;
- var canAttach = canExecute && (canExecute === 'attach' || canExecute.attach);
+/**
+ * Select element after auto placement.
+ *
+ * @param {EventBus} eventBus
+ * @param {Selection} selection
+ */
+function AutoPlaceSelectionBehavior(eventBus, selection) {
- if (canAttach && !(0, _SnapUtil.isSnapped)(event)) {
- snapBoundaryEvent(event, target);
- }
- });
- }
+ eventBus.on('autoPlace.end', 500, function(e) {
+ selection.select(e.shape);
+ });
- (0, _inherits.default)(BpmnCreateMoveSnapping, _CreateMoveSnapping.default);
- BpmnCreateMoveSnapping.$inject = ['eventBus', 'injector'];
+}
- BpmnCreateMoveSnapping.prototype.initSnap = function (event) {
- var snapContext = _CreateMoveSnapping.default.prototype.initSnap.call(this, event);
+AutoPlaceSelectionBehavior.$inject = [
+ 'eventBus',
+ 'selection'
+];
- var shape = event.shape;
- var isMove = !!this._elementRegistry.get(shape.id); // snap to docking points
+/***/ }),
- (0, _minDash.forEach)(shape.outgoing, function (connection) {
- var docking = connection.waypoints[0];
- docking = docking.original || docking;
- snapContext.setSnapOrigin(connection.id + '-docking', getDockingSnapOrigin(docking, isMove, event));
- });
- (0, _minDash.forEach)(shape.incoming, function (connection) {
- var docking = connection.waypoints[connection.waypoints.length - 1];
- docking = docking.original || docking;
- snapContext.setSnapOrigin(connection.id + '-docking', getDockingSnapOrigin(docking, isMove, event));
- });
+/***/ "../node_modules/diagram-js/lib/features/auto-place/AutoPlaceUtil.js":
+/*!***************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/auto-place/AutoPlaceUtil.js ***!
+ \***************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- if ((0, _ModelUtil.is)(shape, 'bpmn:Participant')) {
- // snap to borders with higher priority
- snapContext.setSnapLocations(['top-left', 'bottom-right', 'mid']);
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ DEFAULT_DISTANCE: () => (/* binding */ DEFAULT_DISTANCE),
+/* harmony export */ findFreePosition: () => (/* binding */ findFreePosition),
+/* harmony export */ generateGetNextPosition: () => (/* binding */ generateGetNextPosition),
+/* harmony export */ getConnectedAtPosition: () => (/* binding */ getConnectedAtPosition),
+/* harmony export */ getConnectedDistance: () => (/* binding */ getConnectedDistance)
+/* harmony export */ });
+/* harmony import */ var _layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
- return snapContext;
- };
- BpmnCreateMoveSnapping.prototype.addSnapTargetPoints = function (snapPoints, shape, target) {
- _CreateMoveSnapping.default.prototype.addSnapTargetPoints.call(this, snapPoints, shape, target);
-
- var snapTargets = this.getSnapTargets(shape, target);
- (0, _minDash.forEach)(snapTargets, function (snapTarget) {
- // handle TRBL alignment
- //
- // * with container elements
- // * with text annotations
- if (isContainer(snapTarget) || areAll([shape, snapTarget], 'bpmn:TextAnnotation')) {
- snapPoints.add('top-left', (0, _SnapUtil.topLeft)(snapTarget));
- snapPoints.add('bottom-right', (0, _SnapUtil.bottomRight)(snapTarget));
- }
- });
- var elementRegistry = this._elementRegistry; // snap to docking points if not create mode
- (0, _minDash.forEach)(shape.incoming, function (connection) {
- if (elementRegistry.get(shape.id)) {
- if (!includes(snapTargets, connection.source)) {
- snapPoints.add('mid', (0, _LayoutUtil.getMid)(connection.source));
- }
- var docking = connection.waypoints[0];
- snapPoints.add(connection.id + '-docking', docking.original || docking);
- }
- });
- (0, _minDash.forEach)(shape.outgoing, function (connection) {
- if (elementRegistry.get(shape.id)) {
- if (!includes(snapTargets, connection.target)) {
- snapPoints.add('mid', (0, _LayoutUtil.getMid)(connection.target));
- }
+/**
+ * @typedef {import('../../model/Types').Connection} Connection
+ * @typedef {import('../../model/Types').Element} Element
+ * @typedef {import('../../model/Types').Shape} Shape
+ *
+ * @typedef {import('../../util/Types').Point} Point
+ */
- var docking = connection.waypoints[connection.waypoints.length - 1];
- snapPoints.add(connection.id + '-docking', docking.original || docking);
- }
- }); // add sequence flow parents as snap targets
+// padding to detect element placement
+var PLACEMENT_DETECTION_PAD = 10;
- if ((0, _ModelUtil.is)(target, 'bpmn:SequenceFlow')) {
- snapPoints = this.addSnapTargetPoints(snapPoints, shape, target.parent);
- }
+var DEFAULT_DISTANCE = 50;
- return snapPoints;
- };
+var DEFAULT_MAX_DISTANCE = 250;
- BpmnCreateMoveSnapping.prototype.getSnapTargets = function (shape, target) {
- return _CreateMoveSnapping.default.prototype.getSnapTargets.call(this, shape, target).filter(function (snapTarget) {
- // do not snap to lanes
- return !(0, _ModelUtil.is)(snapTarget, 'bpmn:Lane');
- });
- }; // helpers //////////
+/**
+ * Get free position starting from given position.
+ *
+ * @param {Shape} source
+ * @param {Shape} element
+ * @param {Point} position
+ * @param {(element: Element, position: Point, connectedAtPosition: Element) => Point} getNextPosition
+ *
+ * @return {Point}
+ */
+function findFreePosition(source, element, position, getNextPosition) {
+ var connectedAtPosition;
- function snapBoundaryEvent(event, target) {
- var targetTRBL = (0, _LayoutUtil.asTRBL)(target);
- var direction = (0, _BpmnSnappingUtil.getBoundaryAttachment)(event, target);
- var context = event.context,
- shape = context.shape;
- var offset;
+ while ((connectedAtPosition = getConnectedAtPosition(source, position, element))) {
+ position = getNextPosition(element, position, connectedAtPosition);
+ }
- if (shape.parent) {
- offset = {
- x: 0,
- y: 0
- };
- } else {
- offset = (0, _LayoutUtil.getMid)(shape);
- }
+ return position;
+}
- if (/top/.test(direction)) {
- (0, _SnapUtil.setSnapped)(event, 'y', targetTRBL.top - offset.y);
- } else if (/bottom/.test(direction)) {
- (0, _SnapUtil.setSnapped)(event, 'y', targetTRBL.bottom - offset.y);
- }
+/**
+ * Returns function that returns next position.
+ *
+ * @param {Object} nextPositionDirection
+ * @param {Object} [nextPositionDirection.x]
+ * @param {Object} [nextPositionDirection.y]
+ *
+ * @return {(element: Element, previousPosition: Point, connectedAtPosition: Element) => Point}
+ */
+function generateGetNextPosition(nextPositionDirection) {
+ return function(element, previousPosition, connectedAtPosition) {
+ var nextPosition = {
+ x: previousPosition.x,
+ y: previousPosition.y
+ };
- if (/left/.test(direction)) {
- (0, _SnapUtil.setSnapped)(event, 'x', targetTRBL.left - offset.x);
- } else if (/right/.test(direction)) {
- (0, _SnapUtil.setSnapped)(event, 'x', targetTRBL.right - offset.x);
- }
- }
+ [ 'x', 'y' ].forEach(function(axis) {
- function areAll(elements, type) {
- return elements.every(function (el) {
- return (0, _ModelUtil.is)(el, type);
- });
- }
+ var nextPositionDirectionForAxis = nextPositionDirection[ axis ];
- function isContainer(element) {
- if ((0, _ModelUtil.is)(element, 'bpmn:SubProcess') && (0, _DiUtil.isExpanded)(element)) {
- return true;
- }
+ if (!nextPositionDirectionForAxis) {
+ return;
+ }
- return (0, _ModelUtil.is)(element, 'bpmn:Participant');
- }
+ var dimension = axis === 'x' ? 'width' : 'height';
- function setSnappedIfConstrained(event) {
- var context = event.context,
- createConstraints = context.createConstraints;
+ var margin = nextPositionDirectionForAxis.margin,
+ minDistance = nextPositionDirectionForAxis.minDistance;
- if (!createConstraints) {
- return;
- }
+ if (margin < 0) {
+ nextPosition[ axis ] = Math.min(
+ connectedAtPosition[ axis ] + margin - element[ dimension ] / 2,
+ previousPosition[ axis ] - minDistance + margin
+ );
+ } else {
+ nextPosition[ axis ] = Math.max(
+ connectedAtPosition[ axis ] + connectedAtPosition[ dimension ] + margin + element[ dimension ] / 2,
+ previousPosition[ axis ] + minDistance + margin
+ );
+ }
+ });
- var top = createConstraints.top,
- right = createConstraints.right,
- bottom = createConstraints.bottom,
- left = createConstraints.left;
+ return nextPosition;
+ };
+}
- if (left && left >= event.x || right && right <= event.x) {
- (0, _SnapUtil.setSnapped)(event, 'x', event.x);
- }
+/**
+ * Return connected element at given position and within given bounds. Takes
+ * connected elements from host and attachers into account, too.
+ *
+ * @param {Shape} source
+ * @param {Point} position
+ * @param {Shape} element
+ *
+ * @return {Shape|undefined}
+ */
+function getConnectedAtPosition(source, position, element) {
+
+ var bounds = {
+ x: position.x - (element.width / 2),
+ y: position.y - (element.height / 2),
+ width: element.width,
+ height: element.height
+ };
+
+ var closure = getAutoPlaceClosure(source);
+
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(closure, function(target) {
+
+ if (target === element) {
+ return false;
+ }
+
+ var orientation = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getOrientation)(target, bounds, PLACEMENT_DETECTION_PAD);
+
+ return orientation === 'intersect';
+ });
+}
+
+/**
+* Compute optimal distance between source and target based on existing connections to and from source.
+* Assumes left-to-right and top-to-down modeling.
+*
+* @param {Shape} source
+* @param {Object} [hints]
+* @param {number} [hints.defaultDistance]
+* @param {string} [hints.direction]
+* @param {(connection: Connection) => boolean} [hints.filter]
+* @param {(connection: Connection) => number} [hints.getWeight]
+* @param {number} [hints.maxDistance]
+* @param {'start'|'center'|'end'} [hints.reference]
+*
+* @return {number}
+*/
+function getConnectedDistance(source, hints) {
+ if (!hints) {
+ hints = {};
+ }
+
+ // targets > sources by default
+ function getDefaultWeight(connection) {
+ return connection.source === source ? 1 : -1;
+ }
+
+ var defaultDistance = hints.defaultDistance || DEFAULT_DISTANCE,
+ direction = hints.direction || 'e',
+ filter = hints.filter,
+ getWeight = hints.getWeight || getDefaultWeight,
+ maxDistance = hints.maxDistance || DEFAULT_MAX_DISTANCE,
+ reference = hints.reference || 'start';
+
+ if (!filter) {
+ filter = noneFilter;
+ }
+
+ function getDistance(a, b) {
+ if (direction === 'n') {
+ if (reference === 'start') {
+ return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(a).top - (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(b).bottom;
+ } else if (reference === 'center') {
+ return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(a).top - (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(b).y;
+ } else {
+ return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(a).top - (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(b).top;
+ }
+ } else if (direction === 'w') {
+ if (reference === 'start') {
+ return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(a).left - (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(b).right;
+ } else if (reference === 'center') {
+ return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(a).left - (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(b).x;
+ } else {
+ return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(a).left - (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(b).left;
+ }
+ } else if (direction === 's') {
+ if (reference === 'start') {
+ return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(b).top - (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(a).bottom;
+ } else if (reference === 'center') {
+ return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(b).y - (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(a).bottom;
+ } else {
+ return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(b).bottom - (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(a).bottom;
+ }
+ } else {
+ if (reference === 'start') {
+ return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(b).left - (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(a).right;
+ } else if (reference === 'center') {
+ return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(b).x - (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(a).right;
+ } else {
+ return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(b).right - (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(a).right;
+ }
+ }
+ }
+
+ var sourcesDistances = source.incoming
+ .filter(filter)
+ .map(function(connection) {
+ var weight = getWeight(connection);
+
+ var distance = weight < 0
+ ? getDistance(connection.source, source)
+ : getDistance(source, connection.source);
+
+ return {
+ id: connection.source.id,
+ distance: distance,
+ weight: weight
+ };
+ });
+
+ var targetsDistances = source.outgoing
+ .filter(filter)
+ .map(function(connection) {
+ var weight = getWeight(connection);
+
+ var distance = weight > 0
+ ? getDistance(source, connection.target)
+ : getDistance(connection.target, source);
+
+ return {
+ id: connection.target.id,
+ distance: distance,
+ weight: weight
+ };
+ });
+
+ var distances = sourcesDistances.concat(targetsDistances).reduce(function(accumulator, currentValue) {
+ accumulator[ currentValue.id + '__weight_' + currentValue.weight ] = currentValue;
+
+ return accumulator;
+ }, {});
+
+ var distancesGrouped = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.reduce)(distances, function(accumulator, currentValue) {
+ var distance = currentValue.distance,
+ weight = currentValue.weight;
+
+ if (distance < 0 || distance > maxDistance) {
+ return accumulator;
+ }
+
+ if (!accumulator[ String(distance) ]) {
+ accumulator[ String(distance) ] = 0;
+ }
+
+ accumulator[ String(distance) ] += 1 * weight;
+
+ if (!accumulator.distance || accumulator[ accumulator.distance ] < accumulator[ String(distance) ]) {
+ accumulator.distance = distance;
+ }
+
+ return accumulator;
+ }, {});
+
+ return distancesGrouped.distance || defaultDistance;
+}
+
+/**
+ * Returns all elements connected to given source.
+ *
+ * This includes:
+ *
+ * - elements connected to source
+ * - elements connected to host if source is an attacher
+ * - elements connected to attachers if source is a host
+ *
+ * @param {Shape} source
+ *
+ * @return {Shape[]}
+ */
+function getAutoPlaceClosure(source) {
- if (top && top >= event.y || bottom && bottom <= event.y) {
- (0, _SnapUtil.setSnapped)(event, 'y', event.y);
- }
- }
+ var allConnected = getConnected(source);
- function includes(array, value) {
- return array.indexOf(value) !== -1;
- }
+ if (source.host) {
+ allConnected = allConnected.concat(getConnected(source.host));
+ }
- function getDockingSnapOrigin(docking, isMove, event) {
- return isMove ? {
- x: docking.x - event.x,
- y: docking.y - event.y
- } : {
- x: docking.x,
- y: docking.y
- };
- }
+ if (source.attachers) {
+ allConnected = allConnected.concat(source.attachers.reduce(function(shapes, attacher) {
+ return shapes.concat(getConnected(attacher));
+ }, []));
+ }
- },{"../../util/DiUtil":238,"../../util/ModelUtil":240,"./BpmnSnappingUtil":230,"diagram-js/lib/features/snapping/CreateMoveSnapping":384,"diagram-js/lib/features/snapping/SnapUtil":387,"diagram-js/lib/layout/LayoutUtil":405,"inherits":438,"min-dash":646}],230:[function(require,module,exports){
- "use strict";
+ return allConnected;
+}
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.getBoundaryAttachment = getBoundaryAttachment;
+/**
+ * Get all connected elements.
+ *
+ * @param {Shape} element
+ *
+ * @returns {Shape[]}
+ */
+function getConnected(element) {
+ return getTargets(element).concat(getSources(element));
+}
- var _LayoutUtil = require("diagram-js/lib/layout/LayoutUtil");
+function getSources(shape) {
+ return shape.incoming.map(function(connection) {
+ return connection.source;
+ });
+}
- function getBoundaryAttachment(position, targetBounds) {
- var orientation = (0, _LayoutUtil.getOrientation)(position, targetBounds, -15);
+function getTargets(shape) {
+ return shape.outgoing.map(function(connection) {
+ return connection.target;
+ });
+}
- if (orientation !== 'intersect') {
- return orientation;
- } else {
- return null;
- }
- }
+function noneFilter() {
+ return true;
+}
- },{"diagram-js/lib/layout/LayoutUtil":405}],231:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+/***/ }),
- var _BpmnConnectSnapping = _interopRequireDefault(require("./BpmnConnectSnapping"));
+/***/ "../node_modules/diagram-js/lib/features/auto-place/index.js":
+/*!*******************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/auto-place/index.js ***!
+ \*******************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var _BpmnCreateMoveSnapping = _interopRequireDefault(require("./BpmnCreateMoveSnapping"));
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _AutoPlace__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AutoPlace */ "../node_modules/diagram-js/lib/features/auto-place/AutoPlace.js");
+/* harmony import */ var _AutoPlaceSelectionBehavior__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AutoPlaceSelectionBehavior */ "../node_modules/diagram-js/lib/features/auto-place/AutoPlaceSelectionBehavior.js");
- var _snapping = _interopRequireDefault(require("diagram-js/lib/features/snapping"));
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var _default = {
- __depends__: [_snapping.default],
- __init__: ['connectSnapping', 'createMoveSnapping'],
- connectSnapping: ['type', _BpmnConnectSnapping.default],
- createMoveSnapping: ['type', _BpmnCreateMoveSnapping.default]
- };
- exports.default = _default;
- },{"./BpmnConnectSnapping":228,"./BpmnCreateMoveSnapping":229,"diagram-js/lib/features/snapping":389}],232:[function(require,module,exports){
- "use strict";
+/**
+ * @type { import('didi').ModuleDeclaration }
+ */
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __init__: [ 'autoPlaceSelectionBehavior' ],
+ autoPlace: [ 'type', _AutoPlace__WEBPACK_IMPORTED_MODULE_0__["default"] ],
+ autoPlaceSelectionBehavior: [ 'type', _AutoPlaceSelectionBehavior__WEBPACK_IMPORTED_MODULE_1__["default"] ]
+});
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BpmnImporter;
+/***/ }),
- var _minDash = require("min-dash");
+/***/ "../node_modules/diagram-js/lib/features/auto-resize/AutoResize.js":
+/*!*************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/auto-resize/AutoResize.js ***!
+ \*************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var _ModelUtil = require("../util/ModelUtil");
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ AutoResize)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var _util_Elements__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/Elements */ "../node_modules/diagram-js/lib/util/Elements.js");
+/* harmony import */ var _layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
- var _LabelUtil = require("../util/LabelUtil");
- var _LayoutUtil = require("diagram-js/lib/layout/LayoutUtil");
- var _DiUtil = require("../util/DiUtil");
- var _LabelUtil2 = require("../features/label-editing/LabelUtil");
- var _Util = require("./Util");
- function elementData(semantic, attrs) {
- return (0, _minDash.assign)({
- id: semantic.id,
- type: semantic.$type,
- businessObject: semantic
- }, attrs);
- }
- function getWaypoints(bo, source, target) {
- var waypoints = bo.di.waypoint;
- if (!waypoints || waypoints.length < 2) {
- return [(0, _LayoutUtil.getMid)(source), (0, _LayoutUtil.getMid)(target)];
- }
- return waypoints.map(function (p) {
- return {
- x: p.x,
- y: p.y
- };
- });
- }
- function notYetDrawn(translate, semantic, refSemantic, property) {
- return new Error(translate('element {element} referenced by {referenced}#{property} not yet drawn', {
- element: (0, _Util.elementToString)(refSemantic),
- referenced: (0, _Util.elementToString)(semantic),
- property: property
- }));
- }
- /**
- * An importer that adds bpmn elements to the canvas
- *
- * @param {EventBus} eventBus
- * @param {Canvas} canvas
- * @param {ElementFactory} elementFactory
- * @param {ElementRegistry} elementRegistry
- * @param {Function} translate
- * @param {TextRenderer} textRenderer
- */
+/**
+ * @typedef {import('../../model/Types').Element} Element
+ * @typedef {import('../../model/Types').Shape} Shape
+ *
+ * @typedef {import('../../util/Types').Direction} Direction
+ * @typedef {import('../../util/Types').Rect} Rect
+ * @typedef {import('../../util/Types').RectTRBL} RectTRBL
+ *
+ * @typedef {import('../../core/ElementRegistry').default} ElementRegistry
+ * @typedef {import('../../core/EventBus').default} EventBus
+ * @typedef {import('../modeling/Modeling').default} Modeling
+ * @typedef {import('../rules/Rules').default} Rules
+ */
+/**
+ * An auto resize component that takes care of expanding a parent element
+ * if child elements are created or moved close the parents edge.
+ *
+ * @param {EventBus} eventBus
+ * @param {ElementRegistry} elementRegistry
+ * @param {Modeling} modeling
+ * @param {Rules} rules
+ */
+function AutoResize(eventBus, elementRegistry, modeling, rules) {
- function BpmnImporter(eventBus, canvas, elementFactory, elementRegistry, translate, textRenderer) {
- this._eventBus = eventBus;
- this._canvas = canvas;
- this._elementFactory = elementFactory;
- this._elementRegistry = elementRegistry;
- this._translate = translate;
- this._textRenderer = textRenderer;
- }
+ _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- BpmnImporter.$inject = ['eventBus', 'canvas', 'elementFactory', 'elementRegistry', 'translate', 'textRenderer'];
- /**
- * Add bpmn element (semantic) to the canvas onto the
- * specified parent shape.
- */
+ this._elementRegistry = elementRegistry;
+ this._modeling = modeling;
+ this._rules = rules;
- BpmnImporter.prototype.add = function (semantic, parentElement) {
- var di = semantic.di,
- element,
- translate = this._translate,
- hidden;
- var parentIndex; // ROOT ELEMENT
- // handle the special case that we deal with a
- // invisible root element (process or collaboration)
-
- if ((0, _ModelUtil.is)(di, 'bpmndi:BPMNPlane')) {
- // add a virtual element (not being drawn)
- element = this._elementFactory.createRoot(elementData(semantic));
-
- this._canvas.setRootElement(element);
- } // SHAPE
- else if ((0, _ModelUtil.is)(di, 'bpmndi:BPMNShape')) {
- var collapsed = !(0, _DiUtil.isExpanded)(semantic),
- isFrame = isFrameElement(semantic);
- hidden = parentElement && (parentElement.hidden || parentElement.collapsed);
- var bounds = semantic.di.bounds;
- element = this._elementFactory.createShape(elementData(semantic, {
- collapsed: collapsed,
- hidden: hidden,
- x: Math.round(bounds.x),
- y: Math.round(bounds.y),
- width: Math.round(bounds.width),
- height: Math.round(bounds.height),
- isFrame: isFrame
- }));
+ var self = this;
- if ((0, _ModelUtil.is)(semantic, 'bpmn:BoundaryEvent')) {
- this._attachBoundary(semantic, element);
- } // insert lanes behind other flow nodes (cf. #727)
+ this.postExecuted([ 'shape.create' ], function(event) {
+ var context = event.context,
+ hints = context.hints || {},
+ shape = context.shape,
+ parent = context.parent || context.newParent;
+ if (hints.autoResize === false) {
+ return;
+ }
- if ((0, _ModelUtil.is)(semantic, 'bpmn:Lane')) {
- parentIndex = 0;
- }
+ self._expand([ shape ], parent);
+ });
- if ((0, _ModelUtil.is)(semantic, 'bpmn:DataStoreReference')) {
- // check whether data store is inside our outside of its semantic parent
- if (!isPointInsideBBox(parentElement, (0, _LayoutUtil.getMid)(bounds))) {
- parentElement = this._canvas.getRootElement();
- }
- }
+ this.postExecuted([ 'elements.move' ], function(event) {
+ var context = event.context,
+ elements = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.flatten)((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.values)(context.closure.topLevel)),
+ hints = context.hints;
- this._canvas.addShape(element, parentElement, parentIndex);
- } // CONNECTION
- else if ((0, _ModelUtil.is)(di, 'bpmndi:BPMNEdge')) {
- var source = this._getSource(semantic),
- target = this._getTarget(semantic);
-
- hidden = parentElement && (parentElement.hidden || parentElement.collapsed);
- element = this._elementFactory.createConnection(elementData(semantic, {
- hidden: hidden,
- source: source,
- target: target,
- waypoints: getWaypoints(semantic, source, target)
- }));
+ var autoResize = hints ? hints.autoResize : true;
- if ((0, _ModelUtil.is)(semantic, 'bpmn:DataAssociation')) {
- // render always on top; this ensures DataAssociations
- // are rendered correctly across different "hacks" people
- // love to model such as cross participant / sub process
- // associations
- parentElement = null;
- } // insert sequence flows behind other flow nodes (cf. #727)
+ if (autoResize === false) {
+ return;
+ }
+ var expandings = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.groupBy)(elements, function(element) {
+ return element.parent.id;
+ });
- if ((0, _ModelUtil.is)(semantic, 'bpmn:SequenceFlow')) {
- parentIndex = 0;
- }
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(expandings, function(elements, parentId) {
- this._canvas.addConnection(element, parentElement, parentIndex);
- } else {
- throw new Error(translate('unknown di {di} for element {semantic}', {
- di: (0, _Util.elementToString)(di),
- semantic: (0, _Util.elementToString)(semantic)
- }));
- } // (optional) LABEL
+ // optionally filter elements to be considered when resizing
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isArray)(autoResize)) {
+ elements = elements.filter(function(element) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.find)(autoResize, (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.matchPattern)({ id: element.id }));
+ });
+ }
+ self._expand(elements, parentId);
+ });
+ });
- if ((0, _LabelUtil.isLabelExternal)(semantic) && (0, _LabelUtil2.getLabel)(element)) {
- this.addLabel(semantic, element);
- }
+ this.postExecuted([ 'shape.toggleCollapse' ], function(event) {
+ var context = event.context,
+ hints = context.hints,
+ shape = context.shape;
- this._eventBus.fire('bpmnElement.added', {
- element: element
- });
+ if (hints && hints.autoResize === false) {
+ return;
+ }
- return element;
- };
- /**
- * Attach the boundary element to the given host
- *
- * @param {ModdleElement} boundarySemantic
- * @param {djs.model.Base} boundaryElement
- */
+ if (shape.collapsed) {
+ return;
+ }
+ self._expand(shape.children || [], shape);
+ });
- BpmnImporter.prototype._attachBoundary = function (boundarySemantic, boundaryElement) {
- var translate = this._translate;
- var hostSemantic = boundarySemantic.attachedToRef;
+ this.postExecuted([ 'shape.resize' ], function(event) {
+ var context = event.context,
+ hints = context.hints,
+ shape = context.shape,
+ parent = shape.parent;
- if (!hostSemantic) {
- throw new Error(translate('missing {semantic}#attachedToRef', {
- semantic: (0, _Util.elementToString)(boundarySemantic)
- }));
- }
+ if (hints && hints.autoResize === false) {
+ return;
+ }
- var host = this._elementRegistry.get(hostSemantic.id),
- attachers = host && host.attachers;
+ if (parent) {
+ self._expand([ shape ], parent);
+ }
+ });
- if (!host) {
- throw notYetDrawn(translate, boundarySemantic, hostSemantic, 'attachedToRef');
- } // wire element.host <> host.attachers
+}
+AutoResize.$inject = [
+ 'eventBus',
+ 'elementRegistry',
+ 'modeling',
+ 'rules'
+];
- boundaryElement.host = host;
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_2__["default"])(AutoResize, _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- if (!attachers) {
- host.attachers = attachers = [];
- }
- if (attachers.indexOf(boundaryElement) === -1) {
- attachers.push(boundaryElement);
- }
- };
- /**
- * add label for an element
- */
+/**
+ * Calculate the new bounds of the target shape, given
+ * a number of elements have been moved or added into the parent.
+ *
+ * This method considers the current size, the added elements as well as
+ * the provided padding for the new bounds.
+ *
+ * @param {Shape[]} elements
+ * @param {Shape} target
+ */
+AutoResize.prototype._getOptimalBounds = function(elements, target) {
+ var offset = this.getOffset(target),
+ padding = this.getPadding(target);
- BpmnImporter.prototype.addLabel = function (semantic, element) {
- var bounds, text, label;
- bounds = (0, _LabelUtil.getExternalLabelBounds)(semantic, element);
- text = (0, _LabelUtil2.getLabel)(element);
+ var elementsTrbl = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.asTRBL)((0,_util_Elements__WEBPACK_IMPORTED_MODULE_4__.getBBox)(elements)),
+ targetTrbl = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.asTRBL)(target);
- if (text) {
- // get corrected bounds from actual layouted text
- bounds = this._textRenderer.getExternalLabelBounds(bounds, text);
- }
+ var newTrbl = {};
- label = this._elementFactory.createLabel(elementData(semantic, {
- id: semantic.id + '_label',
- labelTarget: element,
- type: 'label',
- hidden: element.hidden || !(0, _LabelUtil2.getLabel)(element),
- x: Math.round(bounds.x),
- y: Math.round(bounds.y),
- width: Math.round(bounds.width),
- height: Math.round(bounds.height)
- }));
- return this._canvas.addShape(label, element.parent);
- };
- /**
- * Return the drawn connection end based on the given side.
- *
- * @throws {Error} if the end is not yet drawn
- */
+ if (elementsTrbl.top - targetTrbl.top < padding.top) {
+ newTrbl.top = elementsTrbl.top - offset.top;
+ }
+ if (elementsTrbl.left - targetTrbl.left < padding.left) {
+ newTrbl.left = elementsTrbl.left - offset.left;
+ }
- BpmnImporter.prototype._getEnd = function (semantic, side) {
- var element,
- refSemantic,
- type = semantic.$type,
- translate = this._translate;
- refSemantic = semantic[side + 'Ref']; // handle mysterious isMany DataAssociation#sourceRef
+ if (targetTrbl.right - elementsTrbl.right < padding.right) {
+ newTrbl.right = elementsTrbl.right + offset.right;
+ }
- if (side === 'source' && type === 'bpmn:DataInputAssociation') {
- refSemantic = refSemantic && refSemantic[0];
- } // fix source / target for DataInputAssociation / DataOutputAssociation
+ if (targetTrbl.bottom - elementsTrbl.bottom < padding.bottom) {
+ newTrbl.bottom = elementsTrbl.bottom + offset.bottom;
+ }
+ return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.asBounds)((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)({}, targetTrbl, newTrbl));
+};
- if (side === 'source' && type === 'bpmn:DataOutputAssociation' || side === 'target' && type === 'bpmn:DataInputAssociation') {
- refSemantic = semantic.$parent;
- }
- element = refSemantic && this._getElement(refSemantic);
+/**
+ * Expand the target shape respecting rules, offset and padding
+ *
+ * @param {Shape[]} elements
+ * @param {Shape|string} target The target or its ID.
+ */
+AutoResize.prototype._expand = function(elements, target) {
- if (element) {
- return element;
- }
+ if (typeof target === 'string') {
+ target = this._elementRegistry.get(target);
+ }
- if (refSemantic) {
- throw notYetDrawn(translate, semantic, refSemantic, side + 'Ref');
- } else {
- throw new Error(translate('{semantic}#{side} Ref not specified', {
- semantic: (0, _Util.elementToString)(semantic),
- side: side
- }));
- }
- };
+ var allowed = this._rules.allowed('element.autoResize', {
+ elements: elements,
+ target: target
+ });
- BpmnImporter.prototype._getSource = function (semantic) {
- return this._getEnd(semantic, 'source');
- };
+ if (!allowed) {
+ return;
+ }
- BpmnImporter.prototype._getTarget = function (semantic) {
- return this._getEnd(semantic, 'target');
- };
+ // calculate the new bounds
+ var newBounds = this._getOptimalBounds(elements, target);
- BpmnImporter.prototype._getElement = function (semantic) {
- return this._elementRegistry.get(semantic.id);
- }; // helpers ////////////////////
+ if (!boundsChanged(newBounds, target)) {
+ return;
+ }
+ var resizeDirections = getResizeDirections((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.pick)(target, [ 'x', 'y', 'width', 'height' ]), newBounds);
- function isPointInsideBBox(bbox, point) {
- var x = point.x,
- y = point.y;
- return x >= bbox.x && x <= bbox.x + bbox.width && y >= bbox.y && y <= bbox.y + bbox.height;
- }
+ // resize the parent shape
+ this.resize(target, newBounds, {
+ autoResize: resizeDirections
+ });
- function isFrameElement(semantic) {
- return (0, _ModelUtil.is)(semantic, 'bpmn:Group');
- }
+ var parent = target.parent;
- },{"../features/label-editing/LabelUtil":152,"../util/DiUtil":238,"../util/LabelUtil":239,"../util/ModelUtil":240,"./Util":235,"diagram-js/lib/layout/LayoutUtil":405,"min-dash":646}],233:[function(require,module,exports){
- "use strict";
+ // recursively expand parent elements
+ if (parent) {
+ this._expand([ target ], parent);
+ }
+};
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BpmnTreeWalker;
- var _minDash = require("min-dash");
+/**
+ * Get the amount to expand the given shape in each direction.
+ *
+ * @param {Shape} shape
+ *
+ * @return {RectTRBL}
+ */
+AutoResize.prototype.getOffset = function(shape) {
+ return { top: 60, bottom: 60, left: 100, right: 100 };
+};
- var _objectRefs = _interopRequireDefault(require("object-refs"));
- var _Util = require("./Util");
+/**
+ * Get the activation threshold for each side for which
+ * resize triggers.
+ *
+ * @param {Shape} shape
+ *
+ * @return {RectTRBL}
+ */
+AutoResize.prototype.getPadding = function(shape) {
+ return { top: 2, bottom: 2, left: 15, right: 15 };
+};
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var diRefs = new _objectRefs.default({
- name: 'bpmnElement',
- enumerable: true
- }, {
- name: 'di',
- configurable: true
- });
- /**
- * Returns true if an element has the given meta-model type
- *
- * @param {ModdleElement} element
- * @param {string} type
- *
- * @return {boolean}
- */
+/**
+ * Perform the actual resize operation.
+ *
+ * @param {Shape} shape
+ * @param {Rect} newBounds
+ * @param {Object} [hints]
+ * @param {string} [hints.autoResize]
+ */
+AutoResize.prototype.resize = function(shape, newBounds, hints) {
+ this._modeling.resizeShape(shape, newBounds, null, hints);
+};
+
+
+function boundsChanged(newBounds, oldBounds) {
+ return (
+ newBounds.x !== oldBounds.x ||
+ newBounds.y !== oldBounds.y ||
+ newBounds.width !== oldBounds.width ||
+ newBounds.height !== oldBounds.height
+ );
+}
+
+/**
+ * Get directions of resize as {n|w|s|e} e.g. "nw".
+ *
+ * @param {Rect} oldBounds
+ * @param {Rect} newBounds
+ *
+ * @return {Direction} Resize directions as {n|w|s|e}.
+ */
+function getResizeDirections(oldBounds, newBounds) {
+ var directions = '';
- function is(element, type) {
- return element.$instanceOf(type);
- }
- /**
- * Find a suitable display candidate for definitions where the DI does not
- * correctly specify one.
- */
+ oldBounds = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.asTRBL)(oldBounds);
+ newBounds = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.asTRBL)(newBounds);
+ if (oldBounds.top > newBounds.top) {
+ directions = directions.concat('n');
+ }
- function findDisplayCandidate(definitions) {
- return (0, _minDash.find)(definitions.rootElements, function (e) {
- return is(e, 'bpmn:Process') || is(e, 'bpmn:Collaboration');
- });
- }
+ if (oldBounds.right < newBounds.right) {
+ directions = directions.concat('w');
+ }
- function BpmnTreeWalker(handler, translate) {
- // list of containers already walked
- var handledElements = {}; // list of elements to handle deferred to ensure
- // prerequisites are drawn
+ if (oldBounds.bottom < newBounds.bottom) {
+ directions = directions.concat('s');
+ }
- var deferred = []; // Helpers //////////////////////
+ if (oldBounds.left > newBounds.left) {
+ directions = directions.concat('e');
+ }
- function contextual(fn, ctx) {
- return function (e) {
- fn(e, ctx);
- };
- }
+ return directions;
+}
- function handled(element) {
- handledElements[element.id] = element;
- }
+/***/ }),
- function isHandled(element) {
- return handledElements[element.id];
- }
+/***/ "../node_modules/diagram-js/lib/features/auto-resize/AutoResizeProvider.js":
+/*!*********************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/auto-resize/AutoResizeProvider.js ***!
+ \*********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- function visit(element, ctx) {
- var gfx = element.gfx; // avoid multiple rendering of elements
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ AutoResizeProvider)
+/* harmony export */ });
+/* harmony import */ var _rules_RuleProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rules/RuleProvider */ "../node_modules/diagram-js/lib/features/rules/RuleProvider.js");
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
- if (gfx) {
- throw new Error(translate('already rendered {element}', {
- element: (0, _Util.elementToString)(element)
- }));
- } // call handler
- return handler.element(element, ctx);
- }
- function visitRoot(element, diagram) {
- return handler.root(element, diagram);
- }
+/**
+ * @typedef {import('../../model/Types').Shape} Shape
+ *
+ * @typedef {import('../../core/EventBus').default} EventBus
+ */
- function visitIfDi(element, ctx) {
- try {
- var gfx = element.di && visit(element, ctx);
- handled(element);
- return gfx;
- } catch (e) {
- logError(e.message, {
- element: element,
- error: e
- });
- console.error(translate('failed to import {element}', {
- element: (0, _Util.elementToString)(element)
- }));
- console.error(e);
- }
- }
+/**
+ * This is a base rule provider for the element.autoResize rule.
+ *
+ * @param {EventBus} eventBus
+ */
+function AutoResizeProvider(eventBus) {
- function logError(message, context) {
- handler.error(message, context);
- } // DI handling //////////////////////
+ _rules_RuleProvider__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
+ var self = this;
- function registerDi(di) {
- var bpmnElement = di.bpmnElement;
+ this.addRule('element.autoResize', function(context) {
+ return self.canResize(context.elements, context.target);
+ });
+}
- if (bpmnElement) {
- if (bpmnElement.di) {
- logError(translate('multiple DI elements defined for {element}', {
- element: (0, _Util.elementToString)(bpmnElement)
- }), {
- element: bpmnElement
- });
- } else {
- diRefs.bind(bpmnElement, 'di');
- bpmnElement.di = di;
- }
- } else {
- logError(translate('no bpmnElement referenced in {element}', {
- element: (0, _Util.elementToString)(di)
- }), {
- element: di
- });
- }
- }
+AutoResizeProvider.$inject = [ 'eventBus' ];
- function handleDiagram(diagram) {
- handlePlane(diagram.plane);
- }
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_1__["default"])(AutoResizeProvider, _rules_RuleProvider__WEBPACK_IMPORTED_MODULE_0__["default"]);
- function handlePlane(plane) {
- registerDi(plane);
- (0, _minDash.forEach)(plane.planeElement, handlePlaneElement);
- }
+/**
+ * Needs to be implemented by sub classes to allow actual auto resize
+ *
+ * @param {Shape[]} elements
+ * @param {Shape} target
+ *
+ * @return {boolean}
+ */
+AutoResizeProvider.prototype.canResize = function(elements, target) {
+ return false;
+};
- function handlePlaneElement(planeElement) {
- registerDi(planeElement);
- } // Semantic handling //////////////////////
+/***/ }),
- /**
- * Handle definitions and return the rendered diagram (if any)
- *
- * @param {ModdleElement} definitions to walk and import
- * @param {ModdleElement} [diagram] specific diagram to import and display
- *
- * @throws {Error} if no diagram to display could be found
- */
+/***/ "../node_modules/diagram-js/lib/features/auto-scroll/AutoScroll.js":
+/*!*************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/auto-scroll/AutoScroll.js ***!
+ \*************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ AutoScroll)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _util_Event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/Event */ "../node_modules/diagram-js/lib/util/Event.js");
- function handleDefinitions(definitions, diagram) {
- // make sure we walk the correct bpmnElement
- var diagrams = definitions.diagrams;
- if (diagram && diagrams.indexOf(diagram) === -1) {
- throw new Error(translate('diagram not part of bpmn:Definitions'));
- }
- if (!diagram && diagrams && diagrams.length) {
- diagram = diagrams[0];
- } // no diagram -> nothing to import
+/**
+ * @typedef {import('../../util/Types').Point} Point
+ *
+ * @typedef {import('../../core/EventBus').default} EventBus
+ * @typedef {import('../../core/Canvas').default} Canvas
+ */
- if (!diagram) {
- throw new Error(translate('no diagram to display'));
- } // load DI from selected diagram only
+/**
+ * Initiates canvas scrolling if current cursor point is close to a border.
+ * Cancelled when current point moves back inside the scrolling borders
+ * or cancelled manually.
+ *
+ * Default options :
+ * scrollThresholdIn: [ 20, 20, 20, 20 ],
+ * scrollThresholdOut: [ 0, 0, 0, 0 ],
+ * scrollRepeatTimeout: 15,
+ * scrollStep: 10
+ *
+ * Threshold order:
+ * [ left, top, right, bottom ]
+ *
+ * @param {Object} config
+ * @param {EventBus} eventBus
+ * @param {Canvas} canvas
+ */
+function AutoScroll(config, eventBus, canvas) {
+ this._canvas = canvas;
- handleDiagram(diagram);
- var plane = diagram.plane;
+ this._opts = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({
+ scrollThresholdIn: [ 20, 20, 20, 20 ],
+ scrollThresholdOut: [ 0, 0, 0, 0 ],
+ scrollRepeatTimeout: 15,
+ scrollStep: 10
+ }, config);
- if (!plane) {
- throw new Error(translate('no plane for {element}', {
- element: (0, _Util.elementToString)(diagram)
- }));
- }
+ var self = this;
- var rootElement = plane.bpmnElement; // ensure we default to a suitable display candidate (process or collaboration),
- // even if non is specified in DI
+ eventBus.on('drag.move', function(e) {
+ var point = self._toBorderPoint(e);
- if (!rootElement) {
- rootElement = findDisplayCandidate(definitions);
+ self.startScroll(point);
+ });
- if (!rootElement) {
- throw new Error(translate('no process or collaboration to display'));
- } else {
- logError(translate('correcting missing bpmnElement on {plane} to {rootElement}', {
- plane: (0, _Util.elementToString)(plane),
- rootElement: (0, _Util.elementToString)(rootElement)
- })); // correct DI on the fly
+ eventBus.on([ 'drag.cleanup' ], function() {
+ self.stopScroll();
+ });
+}
- plane.bpmnElement = rootElement;
- registerDi(plane);
- }
- }
+AutoScroll.$inject = [
+ 'config.autoScroll',
+ 'eventBus',
+ 'canvas'
+];
- var ctx = visitRoot(rootElement, plane);
- if (is(rootElement, 'bpmn:Process')) {
- handleProcess(rootElement, ctx);
- } else if (is(rootElement, 'bpmn:Collaboration')) {
- handleCollaboration(rootElement, ctx); // force drawing of everything not yet drawn that is part of the target DI
+/**
+ * Starts scrolling loop.
+ * Point is given in global scale in canvas container box plane.
+ *
+ * @param {Point} point
+ */
+AutoScroll.prototype.startScroll = function(point) {
+
+ var canvas = this._canvas;
+ var opts = this._opts;
+ var self = this;
+
+ var clientRect = canvas.getContainer().getBoundingClientRect();
+
+ var diff = [
+ point.x,
+ point.y,
+ clientRect.width - point.x,
+ clientRect.height - point.y
+ ];
+
+ this.stopScroll();
+
+ var dx = 0,
+ dy = 0;
+
+ for (var i = 0; i < 4; i++) {
+ if (between(diff[i], opts.scrollThresholdOut[i], opts.scrollThresholdIn[i])) {
+ if (i === 0) {
+ dx = opts.scrollStep;
+ } else if (i == 1) {
+ dy = opts.scrollStep;
+ } else if (i == 2) {
+ dx = -opts.scrollStep;
+ } else if (i == 3) {
+ dy = -opts.scrollStep;
+ }
+ }
+ }
+
+ if (dx !== 0 || dy !== 0) {
+ canvas.scroll({ dx: dx, dy: dy });
+
+ this._scrolling = setTimeout(function() {
+ self.startScroll(point);
+ }, opts.scrollRepeatTimeout);
+ }
+};
+
+function between(val, start, end) {
+ if (start < val && val < end) {
+ return true;
+ }
+
+ return false;
+}
+
+
+/**
+ * Stops scrolling loop.
+ */
+AutoScroll.prototype.stopScroll = function() {
+ clearTimeout(this._scrolling);
+};
- handleUnhandledProcesses(definitions.rootElements, ctx);
- } else {
- throw new Error(translate('unsupported bpmnElement for {plane}: {rootElement}', {
- plane: (0, _Util.elementToString)(plane),
- rootElement: (0, _Util.elementToString)(rootElement)
- }));
- } // handle all deferred elements
+/**
+ * Overrides defaults options.
+ *
+ * @param {Object} options
+ */
+AutoScroll.prototype.setOptions = function(options) {
+ this._opts = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, this._opts, options);
+};
- handleDeferred(deferred);
- }
- function handleDeferred() {
- var fn; // drain deferred until empty
+/**
+ * Converts event to a point in canvas container plane in global scale.
+ *
+ * @param {Event} event
+ * @return {Point}
+ */
+AutoScroll.prototype._toBorderPoint = function(event) {
+ var clientRect = this._canvas._container.getBoundingClientRect();
- while (deferred.length) {
- fn = deferred.shift();
- fn();
- }
- }
+ var globalPosition = (0,_util_Event__WEBPACK_IMPORTED_MODULE_1__.toPoint)(event.originalEvent);
- function handleProcess(process, context) {
- handleFlowElementsContainer(process, context);
- handleIoSpecification(process.ioSpecification, context);
- handleArtifacts(process.artifacts, context); // log process handled
+ return {
+ x: globalPosition.x - clientRect.left,
+ y: globalPosition.y - clientRect.top
+ };
+};
- handled(process);
- }
+/***/ }),
- function handleUnhandledProcesses(rootElements, ctx) {
- // walk through all processes that have not yet been drawn and draw them
- // if they contain lanes with DI information.
- // we do this to pass the free-floating lane test cases in the MIWG test suite
- var processes = (0, _minDash.filter)(rootElements, function (e) {
- return !isHandled(e) && is(e, 'bpmn:Process') && e.laneSets;
- });
- processes.forEach(contextual(handleProcess, ctx));
- }
+/***/ "../node_modules/diagram-js/lib/features/auto-scroll/index.js":
+/*!********************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/auto-scroll/index.js ***!
+ \********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- function handleMessageFlow(messageFlow, context) {
- visitIfDi(messageFlow, context);
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _dragging__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../dragging */ "../node_modules/diagram-js/lib/features/dragging/index.js");
+/* harmony import */ var _AutoScroll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AutoScroll */ "../node_modules/diagram-js/lib/features/auto-scroll/AutoScroll.js");
- function handleMessageFlows(messageFlows, context) {
- (0, _minDash.forEach)(messageFlows, contextual(handleMessageFlow, context));
- }
- function handleDataAssociation(association, context) {
- visitIfDi(association, context);
- }
- function handleDataInput(dataInput, context) {
- visitIfDi(dataInput, context);
- }
- function handleDataOutput(dataOutput, context) {
- visitIfDi(dataOutput, context);
- }
- function handleArtifact(artifact, context) {
- // bpmn:TextAnnotation
- // bpmn:Group
- // bpmn:Association
- visitIfDi(artifact, context);
- }
+/**
+ * @type { import('didi').ModuleDeclaration }
+ */
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ _dragging__WEBPACK_IMPORTED_MODULE_0__["default"],
+ ],
+ __init__: [ 'autoScroll' ],
+ autoScroll: [ 'type', _AutoScroll__WEBPACK_IMPORTED_MODULE_1__["default"] ]
+});
+
+/***/ }),
+
+/***/ "../node_modules/diagram-js/lib/features/bendpoints/BendpointMove.js":
+/*!***************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/bendpoints/BendpointMove.js ***!
+ \***************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BendpointMove),
+/* harmony export */ isReverse: () => (/* binding */ isReverse)
+/* harmony export */ });
+/* harmony import */ var _layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+
+
+/**
+ * @typedef {import('didi').Injector} Injector
+ *
+ * @typedef {import('../../core/Canvas').default} Canvas
+ * @typedef {import('../dragging/Dragging').default} Dragging
+ * @typedef {import('../../core/EventBus').default} EventBus
+ * @typedef {import('../modeling/Modeling').default} Modeling
+ * @typedef {import('../rules/Rules').default} Rules
+ */
- function handleArtifacts(artifacts, context) {
- (0, _minDash.forEach)(artifacts, function (e) {
- if (is(e, 'bpmn:Association')) {
- deferred.push(function () {
- handleArtifact(e, context);
- });
- } else {
- handleArtifact(e, context);
- }
- });
- }
+var round = Math.round;
- function handleIoSpecification(ioSpecification, context) {
- if (!ioSpecification) {
- return;
- }
+var RECONNECT_START = 'reconnectStart',
+ RECONNECT_END = 'reconnectEnd',
+ UPDATE_WAYPOINTS = 'updateWaypoints';
- (0, _minDash.forEach)(ioSpecification.dataInputs, contextual(handleDataInput, context));
- (0, _minDash.forEach)(ioSpecification.dataOutputs, contextual(handleDataOutput, context));
- }
- function handleSubProcess(subProcess, context) {
- handleFlowElementsContainer(subProcess, context);
- handleArtifacts(subProcess.artifacts, context);
- }
+/**
+ * Move bendpoints through drag and drop to add/remove bendpoints or reconnect connection.
+ *
+ * @param {Injector} injector
+ * @param {EventBus} eventBus
+ * @param {Canvas} canvas
+ * @param {Dragging} dragging
+ * @param {Rules} rules
+ * @param {Modeling} modeling
+ */
+function BendpointMove(injector, eventBus, canvas, dragging, rules, modeling) {
+ this._injector = injector;
+
+ this.start = function(event, connection, bendpointIndex, insert) {
+ var gfx = canvas.getGraphics(connection),
+ source = connection.source,
+ target = connection.target,
+ waypoints = connection.waypoints,
+ type;
+
+ if (!insert && bendpointIndex === 0) {
+ type = RECONNECT_START;
+ } else
+ if (!insert && bendpointIndex === waypoints.length - 1) {
+ type = RECONNECT_END;
+ } else {
+ type = UPDATE_WAYPOINTS;
+ }
+
+ var command = type === UPDATE_WAYPOINTS ? 'connection.updateWaypoints' : 'connection.reconnect';
+
+ var allowed = rules.allowed(command, {
+ connection: connection,
+ source: source,
+ target: target
+ });
+
+ if (allowed === false) {
+ allowed = rules.allowed(command, {
+ connection: connection,
+ source: target,
+ target: source
+ });
+ }
+
+ if (allowed === false) {
+ return;
+ }
+
+ dragging.init(event, 'bendpoint.move', {
+ data: {
+ connection: connection,
+ connectionGfx: gfx,
+ context: {
+ allowed: allowed,
+ bendpointIndex: bendpointIndex,
+ connection: connection,
+ source: source,
+ target: target,
+ insert: insert,
+ type: type
+ }
+ }
+ });
+ };
+
+ eventBus.on('bendpoint.move.hover', function(event) {
+ var context = event.context,
+ connection = context.connection,
+ source = connection.source,
+ target = connection.target,
+ hover = event.hover,
+ type = context.type;
+
+ // cache hover state
+ context.hover = hover;
+
+ var allowed;
+
+ if (!hover) {
+ return;
+ }
+
+ var command = type === UPDATE_WAYPOINTS ? 'connection.updateWaypoints' : 'connection.reconnect';
+
+ allowed = context.allowed = rules.allowed(command, {
+ connection: connection,
+ source: type === RECONNECT_START ? hover : source,
+ target: type === RECONNECT_END ? hover : target
+ });
+
+ if (allowed) {
+ context.source = type === RECONNECT_START ? hover : source;
+ context.target = type === RECONNECT_END ? hover : target;
+
+ return;
+ }
+
+ if (allowed === false) {
+ allowed = context.allowed = rules.allowed(command, {
+ connection: connection,
+ source: type === RECONNECT_END ? hover : target,
+ target: type === RECONNECT_START ? hover : source
+ });
+ }
+
+ if (allowed) {
+ context.source = type === RECONNECT_END ? hover : target;
+ context.target = type === RECONNECT_START ? hover : source;
+ }
+ });
+
+ eventBus.on([ 'bendpoint.move.out', 'bendpoint.move.cleanup' ], function(event) {
+ var context = event.context,
+ type = context.type;
+
+ context.hover = null;
+ context.source = null;
+ context.target = null;
+
+ if (type !== UPDATE_WAYPOINTS) {
+ context.allowed = false;
+ }
+ });
+
+ eventBus.on('bendpoint.move.end', function(event) {
+ var context = event.context,
+ allowed = context.allowed,
+ bendpointIndex = context.bendpointIndex,
+ connection = context.connection,
+ insert = context.insert,
+ newWaypoints = connection.waypoints.slice(),
+ source = context.source,
+ target = context.target,
+ type = context.type,
+ hints = context.hints || {};
+
+ // ensure integer values (important if zoom level was > 1 during move)
+ var docking = {
+ x: round(event.x),
+ y: round(event.y)
+ };
+
+ if (!allowed) {
+ return false;
+ }
+
+ if (type === UPDATE_WAYPOINTS) {
+ if (insert) {
+
+ // insert new bendpoint
+ newWaypoints.splice(bendpointIndex, 0, docking);
+ } else {
+
+ // swap previous waypoint with moved one
+ newWaypoints[bendpointIndex] = docking;
+ }
+
+ // pass hints about actual moved bendpoint
+ // useful for connection/label layout
+ hints.bendpointMove = {
+ insert: insert,
+ bendpointIndex: bendpointIndex
+ };
- function handleFlowNode(flowNode, context) {
- var childCtx = visitIfDi(flowNode, context);
+ newWaypoints = this.cropWaypoints(connection, newWaypoints);
- if (is(flowNode, 'bpmn:SubProcess')) {
- handleSubProcess(flowNode, childCtx || context);
- }
+ modeling.updateWaypoints(connection, (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.filterRedundantWaypoints)(newWaypoints), hints);
+ } else {
+ if (type === RECONNECT_START) {
+ hints.docking = 'source';
- if (is(flowNode, 'bpmn:Activity')) {
- handleIoSpecification(flowNode.ioSpecification, context);
- } // defer handling of associations
- // affected types:
- //
- // * bpmn:Activity
- // * bpmn:ThrowEvent
- // * bpmn:CatchEvent
- //
+ if (isReverse(context)) {
+ hints.docking = 'target';
+ hints.newWaypoints = newWaypoints.reverse();
+ }
+ } else if (type === RECONNECT_END) {
+ hints.docking = 'target';
- deferred.push(function () {
- (0, _minDash.forEach)(flowNode.dataInputAssociations, contextual(handleDataAssociation, context));
- (0, _minDash.forEach)(flowNode.dataOutputAssociations, contextual(handleDataAssociation, context));
- });
- }
+ if (isReverse(context)) {
+ hints.docking = 'source';
- function handleSequenceFlow(sequenceFlow, context) {
- visitIfDi(sequenceFlow, context);
- }
+ hints.newWaypoints = newWaypoints.reverse();
+ }
+ }
- function handleDataElement(dataObject, context) {
- visitIfDi(dataObject, context);
- }
+ modeling.reconnect(connection, source, target, docking, hints);
+ }
+ }, this);
+}
- function handleLane(lane, context) {
- deferred.push(function () {
- var newContext = visitIfDi(lane, context);
+BendpointMove.$inject = [
+ 'injector',
+ 'eventBus',
+ 'canvas',
+ 'dragging',
+ 'rules',
+ 'modeling'
+];
- if (lane.childLaneSet) {
- handleLaneSet(lane.childLaneSet, newContext || context);
- }
+BendpointMove.prototype.cropWaypoints = function(connection, newWaypoints) {
+ var connectionDocking = this._injector.get('connectionDocking', false);
- wireFlowNodeRefs(lane);
- });
- }
+ if (!connectionDocking) {
+ return newWaypoints;
+ }
- function handleLaneSet(laneSet, context) {
- (0, _minDash.forEach)(laneSet.lanes, contextual(handleLane, context));
- }
+ var waypoints = connection.waypoints;
- function handleLaneSets(laneSets, context) {
- (0, _minDash.forEach)(laneSets, contextual(handleLaneSet, context));
- }
+ connection.waypoints = newWaypoints;
- function handleFlowElementsContainer(container, context) {
- handleFlowElements(container.flowElements, context);
+ connection.waypoints = connectionDocking.getCroppedWaypoints(connection);
- if (container.laneSets) {
- handleLaneSets(container.laneSets, context);
- }
- }
+ newWaypoints = connection.waypoints;
- function handleFlowElements(flowElements, context) {
- (0, _minDash.forEach)(flowElements, function (e) {
- if (is(e, 'bpmn:SequenceFlow')) {
- deferred.push(function () {
- handleSequenceFlow(e, context);
- });
- } else if (is(e, 'bpmn:BoundaryEvent')) {
- deferred.unshift(function () {
- handleFlowNode(e, context);
- });
- } else if (is(e, 'bpmn:FlowNode')) {
- handleFlowNode(e, context);
- } else if (is(e, 'bpmn:DataObject')) {// SKIP (assume correct referencing via DataObjectReference)
- } else if (is(e, 'bpmn:DataStoreReference')) {
- handleDataElement(e, context);
- } else if (is(e, 'bpmn:DataObjectReference')) {
- handleDataElement(e, context);
- } else {
- logError(translate('unrecognized flowElement {element} in context {context}', {
- element: (0, _Util.elementToString)(e),
- context: context ? (0, _Util.elementToString)(context.businessObject) : 'null'
- }), {
- element: e,
- context: context
- });
- }
- });
- }
+ connection.waypoints = waypoints;
- function handleParticipant(participant, context) {
- var newCtx = visitIfDi(participant, context);
- var process = participant.processRef;
+ return newWaypoints;
+};
- if (process) {
- handleProcess(process, newCtx || context);
- }
- }
- function handleCollaboration(collaboration) {
- (0, _minDash.forEach)(collaboration.participants, contextual(handleParticipant));
- handleArtifacts(collaboration.artifacts); // handle message flows latest in the process
+// helpers //////////
- deferred.push(function () {
- handleMessageFlows(collaboration.messageFlows);
- });
- }
+function isReverse(context) {
+ var hover = context.hover,
+ source = context.source,
+ target = context.target,
+ type = context.type;
- function wireFlowNodeRefs(lane) {
- // wire the virtual flowNodeRefs <-> relationship
- (0, _minDash.forEach)(lane.flowNodeRef, function (flowNode) {
- var lanes = flowNode.get('lanes');
+ if (type === RECONNECT_START) {
+ return hover && target && hover === target && source !== target;
+ }
- if (lanes) {
- lanes.push(lane);
- }
- });
- } // API //////////////////////
+ if (type === RECONNECT_END) {
+ return hover && source && hover === source && source !== target;
+ }
+}
+/***/ }),
- return {
- handleDeferred: handleDeferred,
- handleDefinitions: handleDefinitions,
- handleSubProcess: handleSubProcess,
- registerDi: registerDi
- };
- }
+/***/ "../node_modules/diagram-js/lib/features/bendpoints/BendpointMovePreview.js":
+/*!**********************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/bendpoints/BendpointMovePreview.js ***!
+ \**********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- },{"./Util":235,"min-dash":646,"object-refs":651}],234:[function(require,module,exports){
- "use strict";
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BendpointMovePreview)
+/* harmony export */ });
+/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tiny-svg */ "../node_modules/tiny-svg/dist/index.esm.js");
+/* harmony import */ var _BendpointUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BendpointUtil */ "../node_modules/diagram-js/lib/features/bendpoints/BendpointUtil.js");
+/* harmony import */ var _util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/SvgTransformUtil */ "../node_modules/diagram-js/lib/util/SvgTransformUtil.js");
+/* harmony import */ var _BendpointMove__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BendpointMove */ "../node_modules/diagram-js/lib/features/bendpoints/BendpointMove.js");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.importBpmnDiagram = importBpmnDiagram;
- var _BpmnTreeWalker = _interopRequireDefault(require("./BpmnTreeWalker"));
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- /**
- * The importBpmnDiagram result.
- *
- * @typedef {Object} ImportBPMNDiagramResult
- *
- * @property {Array} warnings
- */
- /**
- * The importBpmnDiagram error.
- *
- * @typedef {Error} ImportBPMNDiagramError
- *
- * @property {Array} warnings
- */
- /**
- * Import the definitions into a diagram.
- *
- * Errors and warnings are reported through the specified callback.
- *
- * @param {djs.Diagram} diagram
- * @param {ModdleElement} definitions
- * @param {ModdleElement} [bpmnDiagram] the diagram to be rendered
- * (if not provided, the first one will be rendered)
- *
- * Returns {Promise}
- */
- function importBpmnDiagram(diagram, definitions, bpmnDiagram) {
- var importer, eventBus, translate;
- var error,
- warnings = [];
- /**
- * Walk the diagram semantically, importing (=drawing)
- * all elements you encounter.
- *
- * @param {ModdleElement} definitions
- * @param {ModdleElement} bpmnDiagram
- */
-
- function render(definitions, bpmnDiagram) {
- var visitor = {
- root: function (element) {
- return importer.add(element);
- },
- element: function (element, parentShape) {
- return importer.add(element, parentShape);
- },
- error: function (message, context) {
- warnings.push({
- message: message,
- context: context
- });
- }
- };
- var walker = new _BpmnTreeWalker.default(visitor, translate); // traverse BPMN 2.0 document model,
- // starting at definitions
- walker.handleDefinitions(definitions, bpmnDiagram);
- }
- return new Promise(function (resolve, reject) {
- try {
- importer = diagram.get('bpmnImporter');
- eventBus = diagram.get('eventBus');
- translate = diagram.get('translate');
- eventBus.fire('import.render.start', {
- definitions: definitions
- });
- render(definitions, bpmnDiagram);
- eventBus.fire('import.render.complete', {
- error: error,
- warnings: warnings
- });
- return resolve({
- warnings: warnings
- });
- } catch (e) {
- e.warnings = warnings;
- return reject(e);
- }
- });
- }
+/**
+ * @typedef {import('didi').Injector} Injector
+ *
+ * @typedef {import('../bendpoints/BendpointMove').default} BendpointMove
+ * @typedef {import('../../core/Canvas').default} Canvas
+ * @typedef {import('../../core/EventBus').default} EventBus
+ */
- },{"./BpmnTreeWalker":233}],235:[function(require,module,exports){
- "use strict";
+var RECONNECT_START = 'reconnectStart',
+ RECONNECT_END = 'reconnectEnd',
+ UPDATE_WAYPOINTS = 'updateWaypoints';
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.elementToString = elementToString;
+var MARKER_OK = 'connect-ok',
+ MARKER_NOT_OK = 'connect-not-ok',
+ MARKER_CONNECT_HOVER = 'connect-hover',
+ MARKER_CONNECT_UPDATING = 'djs-updating',
+ MARKER_DRAGGER = 'djs-dragging';
- function elementToString(e) {
- if (!e) {
- return '';
- }
+var HIGH_PRIORITY = 1100;
+
+/**
+ * Preview connection while moving bendpoints.
+ *
+ * @param {BendpointMove} bendpointMove
+ * @param {Injector} injector
+ * @param {EventBus} eventBus
+ * @param {Canvas} canvas
+ */
+function BendpointMovePreview(bendpointMove, injector, eventBus, canvas) {
+ this._injector = injector;
+
+ var connectionPreview = injector.get('connectionPreview', false);
+
+ eventBus.on('bendpoint.move.start', function(event) {
+ var context = event.context,
+ bendpointIndex = context.bendpointIndex,
+ connection = context.connection,
+ insert = context.insert,
+ waypoints = connection.waypoints,
+ newWaypoints = waypoints.slice();
+
+ context.waypoints = waypoints;
+
+ if (insert) {
+
+ // insert placeholder for new bendpoint
+ newWaypoints.splice(bendpointIndex, 0, { x: event.x, y: event.y });
+ }
+
+ connection.waypoints = newWaypoints;
+
+ // add dragger gfx
+ var draggerGfx = context.draggerGfx = (0,_BendpointUtil__WEBPACK_IMPORTED_MODULE_0__.addBendpoint)(canvas.getLayer('overlays'));
+
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.classes)(draggerGfx).add('djs-dragging');
+
+ canvas.addMarker(connection, MARKER_DRAGGER);
+ canvas.addMarker(connection, MARKER_CONNECT_UPDATING);
+ });
+
+ eventBus.on('bendpoint.move.hover', function(event) {
+ var context = event.context,
+ allowed = context.allowed,
+ hover = context.hover,
+ type = context.type;
+
+ if (hover) {
+ canvas.addMarker(hover, MARKER_CONNECT_HOVER);
+
+ if (type === UPDATE_WAYPOINTS) {
+ return;
+ }
+
+ if (allowed) {
+ canvas.removeMarker(hover, MARKER_NOT_OK);
+ canvas.addMarker(hover, MARKER_OK);
+ } else if (allowed === false) {
+ canvas.removeMarker(hover, MARKER_OK);
+ canvas.addMarker(hover, MARKER_NOT_OK);
+ }
+ }
+ });
+
+ eventBus.on([
+ 'bendpoint.move.out',
+ 'bendpoint.move.cleanup'
+ ], HIGH_PRIORITY, function(event) {
+ var context = event.context,
+ hover = context.hover,
+ target = context.target;
+
+ if (hover) {
+ canvas.removeMarker(hover, MARKER_CONNECT_HOVER);
+ canvas.removeMarker(hover, target ? MARKER_OK : MARKER_NOT_OK);
+ }
+ });
+
+ eventBus.on('bendpoint.move.move', function(event) {
+ var context = event.context,
+ allowed = context.allowed,
+ bendpointIndex = context.bendpointIndex,
+ draggerGfx = context.draggerGfx,
+ hover = context.hover,
+ type = context.type,
+ connection = context.connection,
+ source = connection.source,
+ target = connection.target,
+ newWaypoints = connection.waypoints.slice(),
+ bendpoint = { x: event.x, y: event.y },
+ hints = context.hints || {},
+ drawPreviewHints = {};
+
+ if (connectionPreview) {
+ if (hints.connectionStart) {
+ drawPreviewHints.connectionStart = hints.connectionStart;
+ }
+
+ if (hints.connectionEnd) {
+ drawPreviewHints.connectionEnd = hints.connectionEnd;
+ }
+
+
+ if (type === RECONNECT_START) {
+ if ((0,_BendpointMove__WEBPACK_IMPORTED_MODULE_2__.isReverse)(context)) {
+ drawPreviewHints.connectionEnd = drawPreviewHints.connectionEnd || bendpoint;
+
+ drawPreviewHints.source = target;
+ drawPreviewHints.target = hover || source;
+
+ newWaypoints = newWaypoints.reverse();
+ } else {
+ drawPreviewHints.connectionStart = drawPreviewHints.connectionStart || bendpoint;
- return '<' + e.$type + (e.id ? ' id="' + e.id : '') + '" />';
+ drawPreviewHints.source = hover || source;
+ drawPreviewHints.target = target;
}
+ } else if (type === RECONNECT_END) {
+ if ((0,_BendpointMove__WEBPACK_IMPORTED_MODULE_2__.isReverse)(context)) {
+ drawPreviewHints.connectionStart = drawPreviewHints.connectionStart || bendpoint;
- },{}],236:[function(require,module,exports){
- "use strict";
+ drawPreviewHints.source = hover || target;
+ drawPreviewHints.target = source;
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+ newWaypoints = newWaypoints.reverse();
+ } else {
+ drawPreviewHints.connectionEnd = drawPreviewHints.connectionEnd || bendpoint;
- var _translate = _interopRequireDefault(require("diagram-js/lib/i18n/translate"));
+ drawPreviewHints.source = source;
+ drawPreviewHints.target = hover || target;
+ }
- var _BpmnImporter = _interopRequireDefault(require("./BpmnImporter"));
+ } else {
+ drawPreviewHints.noCropping = true;
+ drawPreviewHints.noLayout = true;
+ newWaypoints[ bendpointIndex ] = bendpoint;
+ }
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ if (type === UPDATE_WAYPOINTS) {
+ newWaypoints = bendpointMove.cropWaypoints(connection, newWaypoints);
+ }
- var _default = {
- __depends__: [_translate.default],
- bpmnImporter: ['type', _BpmnImporter.default]
- };
- exports.default = _default;
+ drawPreviewHints.waypoints = newWaypoints;
- },{"./BpmnImporter":232,"diagram-js/lib/i18n/translate":401}],237:[function(require,module,exports){
- "use strict";
+ connectionPreview.drawPreview(context, allowed, drawPreviewHints);
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.wrapForCompatibility = wrapForCompatibility;
+ (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_3__.translate)(draggerGfx, event.x, event.y);
+ }, this);
- var _minDash = require("min-dash");
+ eventBus.on([
+ 'bendpoint.move.end',
+ 'bendpoint.move.cancel'
+ ], HIGH_PRIORITY, function(event) {
+ var context = event.context,
+ connection = context.connection,
+ draggerGfx = context.draggerGfx,
+ hover = context.hover,
+ target = context.target,
+ waypoints = context.waypoints;
-// TODO(nikku): remove with future bpmn-js version
+ connection.waypoints = waypoints;
- /**
- * Wraps APIs to check:
- *
- * 1) If a callback is passed -> Warn users about callback deprecation.
- * 2) If Promise class is implemented in current environment.
- *
- * @private
- */
- function wrapForCompatibility(api) {
- return function () {
- if (!window.Promise) {
- throw new Error('Promises is not supported in this environment. Please polyfill Promise.');
- }
+ // remove dragger gfx
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.remove)(draggerGfx);
- var argLen = arguments.length;
-
- if (argLen >= 1 && (0, _minDash.isFunction)(arguments[argLen - 1])) {
- var callback = arguments[argLen - 1];
- console.warn(new Error('Passing callbacks to ' + api.name + ' is deprecated and will be removed in a future major release. ' + 'Please switch to promises: https://bpmn.io/l/moving-to-promises.html'));
- var argsWithoutCallback = Array.prototype.slice.call(arguments, 0, -1);
- api.apply(this, argsWithoutCallback).then(function (result) {
- var firstKey = Object.keys(result)[0]; // The APIs we are wrapping all resolve a single item depending on the API.
- // For instance, importXML resolves { warnings } and saveXML returns { xml }.
- // That's why we can call the callback with the first item of result.
-
- return callback(null, result[firstKey]); // Passing a second paramter instead of catch because we don't want to
- // catch errors thrown by callback().
- }, function (err) {
- return callback(err, err.warnings);
- });
- } else {
- return api.apply(this, arguments);
- }
- };
- }
+ canvas.removeMarker(connection, MARKER_CONNECT_UPDATING);
+ canvas.removeMarker(connection, MARKER_DRAGGER);
- },{"min-dash":646}],238:[function(require,module,exports){
- "use strict";
+ if (hover) {
+ canvas.removeMarker(hover, MARKER_OK);
+ canvas.removeMarker(hover, target ? MARKER_OK : MARKER_NOT_OK);
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.isExpanded = isExpanded;
- exports.isInterrupting = isInterrupting;
- exports.isEventSubProcess = isEventSubProcess;
- exports.hasEventDefinition = hasEventDefinition;
- exports.hasErrorEventDefinition = hasErrorEventDefinition;
- exports.hasEscalationEventDefinition = hasEscalationEventDefinition;
- exports.hasCompensateEventDefinition = hasCompensateEventDefinition;
+ if (connectionPreview) {
+ connectionPreview.cleanUp(context);
+ }
+ });
+}
- var _ModelUtil = require("./ModelUtil");
+BendpointMovePreview.$inject = [
+ 'bendpointMove',
+ 'injector',
+ 'eventBus',
+ 'canvas'
+];
- var _minDash = require("min-dash");
+/***/ }),
- function isExpanded(element) {
- if ((0, _ModelUtil.is)(element, 'bpmn:CallActivity')) {
- return false;
- }
+/***/ "../node_modules/diagram-js/lib/features/bendpoints/BendpointSnapping.js":
+/*!*******************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/bendpoints/BendpointSnapping.js ***!
+ \*******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- if ((0, _ModelUtil.is)(element, 'bpmn:SubProcess')) {
- return !!(0, _ModelUtil.getBusinessObject)(element).di.isExpanded;
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ BendpointSnapping)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../snapping/SnapUtil */ "../node_modules/diagram-js/lib/features/snapping/SnapUtil.js");
+/* harmony import */ var _BendpointUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BendpointUtil */ "../node_modules/diagram-js/lib/features/bendpoints/BendpointUtil.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/ModelUtil */ "../node_modules/diagram-js/lib/util/ModelUtil.js");
- if ((0, _ModelUtil.is)(element, 'bpmn:Participant')) {
- return !!(0, _ModelUtil.getBusinessObject)(element).processRef;
- }
- return true;
- }
- function isInterrupting(element) {
- return element && (0, _ModelUtil.getBusinessObject)(element).isInterrupting !== false;
- }
- function isEventSubProcess(element) {
- return element && !!(0, _ModelUtil.getBusinessObject)(element).triggeredByEvent;
- }
- function hasEventDefinition(element, eventType) {
- var bo = (0, _ModelUtil.getBusinessObject)(element),
- hasEventDefinition = false;
- if (bo.eventDefinitions) {
- (0, _minDash.forEach)(bo.eventDefinitions, function (event) {
- if ((0, _ModelUtil.is)(event, eventType)) {
- hasEventDefinition = true;
- }
- });
- }
- return hasEventDefinition;
- }
- function hasErrorEventDefinition(element) {
- return hasEventDefinition(element, 'bpmn:ErrorEventDefinition');
- }
+/**
+ * @typedef {import('../../core/EventBus').default} EventBus
+ */
+var abs = Math.abs,
+ round = Math.round;
- function hasEscalationEventDefinition(element) {
- return hasEventDefinition(element, 'bpmn:EscalationEventDefinition');
- }
+var TOLERANCE = 10;
- function hasCompensateEventDefinition(element) {
- return hasEventDefinition(element, 'bpmn:CompensateEventDefinition');
- }
+/**
+ * @param {EventBus} eventBus
+ */
+function BendpointSnapping(eventBus) {
- },{"./ModelUtil":240,"min-dash":646}],239:[function(require,module,exports){
- "use strict";
+ function snapTo(values, value) {
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.isLabelExternal = isLabelExternal;
- exports.hasExternalLabel = hasExternalLabel;
- exports.getFlowLabelPosition = getFlowLabelPosition;
- exports.getWaypointsMid = getWaypointsMid;
- exports.getExternalLabelMid = getExternalLabelMid;
- exports.getExternalLabelBounds = getExternalLabelBounds;
- exports.isLabel = isLabel;
- exports.FLOW_LABEL_INDENT = exports.DEFAULT_LABEL_SIZE = void 0;
-
- var _minDash = require("min-dash");
-
- var _ModelUtil = require("./ModelUtil");
-
- var DEFAULT_LABEL_SIZE = {
- width: 90,
- height: 20
- };
- exports.DEFAULT_LABEL_SIZE = DEFAULT_LABEL_SIZE;
- var FLOW_LABEL_INDENT = 15;
- /**
- * Returns true if the given semantic has an external label
- *
- * @param {BpmnElement} semantic
- * @return {boolean} true if has label
- */
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(values)) {
+ var i = values.length;
- exports.FLOW_LABEL_INDENT = FLOW_LABEL_INDENT;
+ while (i--) if (abs(values[i] - value) <= TOLERANCE) {
+ return values[i];
+ }
+ } else {
+ values = +values;
+ var rem = value % values;
- function isLabelExternal(semantic) {
- return (0, _ModelUtil.is)(semantic, 'bpmn:Event') || (0, _ModelUtil.is)(semantic, 'bpmn:Gateway') || (0, _ModelUtil.is)(semantic, 'bpmn:DataStoreReference') || (0, _ModelUtil.is)(semantic, 'bpmn:DataObjectReference') || (0, _ModelUtil.is)(semantic, 'bpmn:DataInput') || (0, _ModelUtil.is)(semantic, 'bpmn:DataOutput') || (0, _ModelUtil.is)(semantic, 'bpmn:SequenceFlow') || (0, _ModelUtil.is)(semantic, 'bpmn:MessageFlow') || (0, _ModelUtil.is)(semantic, 'bpmn:Group');
- }
- /**
- * Returns true if the given element has an external label
- *
- * @param {djs.model.shape} element
- * @return {boolean} true if has label
- */
+ if (rem < TOLERANCE) {
+ return value - rem;
+ }
+ if (rem > values - TOLERANCE) {
+ return value - rem + values;
+ }
+ }
- function hasExternalLabel(element) {
- return isLabel(element.label);
- }
- /**
- * Get the position for sequence flow labels
- *
- * @param {Array} waypoints
- * @return {Point} the label position
- */
+ return value;
+ }
+ function getSnapPoint(element, event) {
- function getFlowLabelPosition(waypoints) {
- // get the waypoints mid
- var mid = waypoints.length / 2 - 1;
- var first = waypoints[Math.floor(mid)];
- var second = waypoints[Math.ceil(mid + 0.01)]; // get position
+ if (element.waypoints) {
+ return (0,_BendpointUtil__WEBPACK_IMPORTED_MODULE_1__.getClosestPointOnConnection)(event, element);
+ }
- var position = getWaypointsMid(waypoints); // calculate angle
+ if (element.width) {
+ return {
+ x: round(element.width / 2 + element.x),
+ y: round(element.height / 2 + element.y)
+ };
+ }
+ }
- var angle = Math.atan((second.y - first.y) / (second.x - first.x));
- var x = position.x,
- y = position.y;
+ // connection segment snapping //////////////////////
- if (Math.abs(angle) < Math.PI / 2) {
- y -= FLOW_LABEL_INDENT;
- } else {
- x += FLOW_LABEL_INDENT;
- }
+ function getConnectionSegmentSnaps(event) {
- return {
- x: x,
- y: y
- };
- }
- /**
- * Get the middle of a number of waypoints
- *
- * @param {Array} waypoints
- * @return {Point} the mid point
- */
+ var context = event.context,
+ snapPoints = context.snapPoints,
+ connection = context.connection,
+ waypoints = connection.waypoints,
+ segmentStart = context.segmentStart,
+ segmentStartIndex = context.segmentStartIndex,
+ segmentEnd = context.segmentEnd,
+ segmentEndIndex = context.segmentEndIndex,
+ axis = context.axis;
+ if (snapPoints) {
+ return snapPoints;
+ }
- function getWaypointsMid(waypoints) {
- var mid = waypoints.length / 2 - 1;
- var first = waypoints[Math.floor(mid)];
- var second = waypoints[Math.ceil(mid + 0.01)];
- return {
- x: first.x + (second.x - first.x) / 2,
- y: first.y + (second.y - first.y) / 2
- };
- }
+ var referenceWaypoints = [
+ waypoints[segmentStartIndex - 1],
+ segmentStart,
+ segmentEnd,
+ waypoints[segmentEndIndex + 1]
+ ];
- function getExternalLabelMid(element) {
- if (element.waypoints) {
- return getFlowLabelPosition(element.waypoints);
- } else if ((0, _ModelUtil.is)(element, 'bpmn:Group')) {
- return {
- x: element.x + element.width / 2,
- y: element.y + DEFAULT_LABEL_SIZE.height / 2
- };
- } else {
- return {
- x: element.x + element.width / 2,
- y: element.y + element.height + DEFAULT_LABEL_SIZE.height / 2
- };
- }
- }
- /**
- * Returns the bounds of an elements label, parsed from the elements DI or
- * generated from its bounds.
- *
- * @param {BpmnElement} semantic
- * @param {djs.model.Base} element
- */
+ if (segmentStartIndex < 2) {
+ referenceWaypoints.unshift(getSnapPoint(connection.source, event));
+ }
+ if (segmentEndIndex > waypoints.length - 3) {
+ referenceWaypoints.unshift(getSnapPoint(connection.target, event));
+ }
- function getExternalLabelBounds(semantic, element) {
- var mid,
- size,
- bounds,
- di = semantic.di,
- label = di.label;
+ context.snapPoints = snapPoints = { horizontal: [] , vertical: [] };
- if (label && label.bounds) {
- bounds = label.bounds;
- size = {
- width: Math.max(DEFAULT_LABEL_SIZE.width, bounds.width),
- height: bounds.height
- };
- mid = {
- x: bounds.x + bounds.width / 2,
- y: bounds.y + bounds.height / 2
- };
- } else {
- mid = getExternalLabelMid(element);
- size = DEFAULT_LABEL_SIZE;
- }
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(referenceWaypoints, function(p) {
- return (0, _minDash.assign)({
- x: mid.x - size.width / 2,
- y: mid.y - size.height / 2
- }, size);
+ // we snap on existing bendpoints only,
+ // not placeholders that are inserted during add
+ if (p) {
+ p = p.original || p;
+
+ if (axis === 'y') {
+ snapPoints.horizontal.push(p.y);
}
- function isLabel(element) {
- return element && !!element.labelTarget;
+ if (axis === 'x') {
+ snapPoints.vertical.push(p.x);
}
+ }
+ });
- },{"./ModelUtil":240,"min-dash":646}],240:[function(require,module,exports){
- "use strict";
+ return snapPoints;
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.is = is;
- exports.getBusinessObject = getBusinessObject;
+ eventBus.on('connectionSegment.move.move', 1500, function(event) {
+ var snapPoints = getConnectionSegmentSnaps(event),
+ x = event.x,
+ y = event.y,
+ sx, sy;
- /**
- * Is an element of the given BPMN type?
- *
- * @param {djs.model.Base|ModdleElement} element
- * @param {string} type
- *
- * @return {boolean}
- */
- function is(element, type) {
- var bo = getBusinessObject(element);
- return bo && typeof bo.$instanceOf === 'function' && bo.$instanceOf(type);
- }
- /**
- * Return the business object for a given element.
- *
- * @param {djs.model.Base|ModdleElement} element
- *
- * @return {ModdleElement}
- */
+ if (!snapPoints) {
+ return;
+ }
+ // snap
+ sx = snapTo(snapPoints.vertical, x);
+ sy = snapTo(snapPoints.horizontal, y);
+
+
+ // correction x/y
+ var cx = (x - sx),
+ cy = (y - sy);
- function getBusinessObject(element) {
- return element && element.businessObject || element;
- }
+ // update delta
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(event, {
+ dx: event.dx - cx,
+ dy: event.dy - cy,
+ x: sx,
+ y: sy
+ });
+
+ // only set snapped if actually snapped
+ if (cx || snapPoints.vertical.indexOf(x) !== -1) {
+ (0,_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_2__.setSnapped)(event, 'x', sx);
+ }
- },{}],241:[function(require,module,exports){
- "use strict";
+ if (cy || snapPoints.horizontal.indexOf(y) !== -1) {
+ (0,_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_2__.setSnapped)(event, 'y', sy);
+ }
+ });
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.open = open;
- exports.LINK_STYLES = exports.BPMNIO_IMG = void 0;
- var _minDom = require("min-dom");
+ // bendpoint snapping //////////////////////
- /**
- * This file must not be changed or exchanged.
- *
- * @see http://bpmn.io/license for more information.
- */
-// inlined ../../resources/logo.svg
- var BPMNIO_LOGO_SVG = ' ';
- var BPMNIO_IMG = BPMNIO_LOGO_SVG;
- exports.BPMNIO_IMG = BPMNIO_IMG;
+ function getBendpointSnaps(context) {
- function css(attrs) {
- return attrs.join(';');
- }
+ var snapPoints = context.snapPoints,
+ waypoints = context.connection.waypoints,
+ bendpointIndex = context.bendpointIndex;
- var LINK_STYLES = css(['color: #404040']);
- exports.LINK_STYLES = LINK_STYLES;
- var LIGHTBOX_STYLES = css(['z-index: 1001', 'position: fixed', 'top: 0', 'left: 0', 'right: 0', 'bottom: 0']);
- var BACKDROP_STYLES = css(['width: 100%', 'height: 100%', 'background: rgba(40,40,40,0.2)']);
- var NOTICE_STYLES = css(['position: absolute', 'left: 50%', 'top: 40%', 'transform: translate(-50%)', 'width: 260px', 'padding: 10px', 'background: white', 'box-shadow: 0 1px 4px rgba(0,0,0,0.3)', 'font-family: Helvetica, Arial, sans-serif', 'font-size: 14px', 'display: flex', 'line-height: 1.3']);
- var LIGHTBOX_MARKUP = '';
- var lightbox;
+ if (snapPoints) {
+ return snapPoints;
+ }
+
+ var referenceWaypoints = [ waypoints[bendpointIndex - 1], waypoints[bendpointIndex + 1] ];
+
+ context.snapPoints = snapPoints = { horizontal: [] , vertical: [] };
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(referenceWaypoints, function(p) {
+
+ // we snap on existing bendpoints only,
+ // not placeholders that are inserted during add
+ if (p) {
+ p = p.original || p;
+
+ snapPoints.horizontal.push(p.y);
+ snapPoints.vertical.push(p.x);
+ }
+ });
- function open() {
- if (!lightbox) {
- lightbox = (0, _minDom.domify)(LIGHTBOX_MARKUP);
+ return snapPoints;
+ }
- _minDom.delegate.bind(lightbox, '.backdrop', 'click', function (event) {
- document.body.removeChild(lightbox);
- });
- }
+ // Snap Endpoint of new connection
+ eventBus.on([
+ 'connect.hover',
+ 'connect.move',
+ 'connect.end'
+ ], 1500, function(event) {
+ var context = event.context,
+ hover = context.hover,
+ hoverMid = hover && getSnapPoint(hover, event);
- document.body.appendChild(lightbox);
- }
+ // only snap on connections, elements can have multiple connect endpoints
+ if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.isConnection)(hover) || !hoverMid || !hoverMid.x || !hoverMid.y) {
+ return;
+ }
- },{"min-dom":647}],242:[function(require,module,exports){
- "use strict";
+ (0,_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_2__.setSnapped)(event, 'x', hoverMid.x);
+ (0,_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_2__.setSnapped)(event, 'y', hoverMid.y);
+ });
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+ eventBus.on([ 'bendpoint.move.move', 'bendpoint.move.end' ], 1500, function(event) {
- var _minDash = require("min-dash");
+ var context = event.context,
+ snapPoints = getBendpointSnaps(context),
+ hover = context.hover,
+ hoverMid = hover && getSnapPoint(hover, event),
+ x = event.x,
+ y = event.y,
+ sx, sy;
- var _moddle = require("moddle");
+ if (!snapPoints) {
+ return;
+ }
- var _moddleXml = require("moddle-xml");
+ // snap to hover mid
+ sx = snapTo(hoverMid ? snapPoints.vertical.concat([ hoverMid.x ]) : snapPoints.vertical, x);
+ sy = snapTo(hoverMid ? snapPoints.horizontal.concat([ hoverMid.y ]) : snapPoints.horizontal, y);
- /**
- * A sub class of {@link Moddle} with support for import and export of BPMN 2.0 xml files.
- *
- * @class BpmnModdle
- * @extends Moddle
- *
- * @param {Object|Array} packages to use for instantiating the model
- * @param {Object} [options] additional options to pass over
- */
- function BpmnModdle(packages, options) {
- _moddle.Moddle.call(this, packages, options);
- }
+ // correction x/y
+ var cx = (x - sx),
+ cy = (y - sy);
- BpmnModdle.prototype = Object.create(_moddle.Moddle.prototype);
- /**
- * The fromXML result.
- *
- * @typedef {Object} ParseResult
- *
- * @property {ModdleElement} rootElement
- * @property {Array} references
- * @property {Array} warnings
- * @property {Object} elementsById - a mapping containing each ID -> ModdleElement
- */
+ // update delta
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(event, {
+ dx: event.dx - cx,
+ dy: event.dy - cy,
+ x: event.x - cx,
+ y: event.y - cy
+ });
- /**
- * The fromXML error.
- *
- * @typedef {Error} ParseError
- *
- * @property {Array} warnings
- */
+ // only set snapped if actually snapped
+ if (cx || snapPoints.vertical.indexOf(x) !== -1) {
+ (0,_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_2__.setSnapped)(event, 'x', sx);
+ }
- /**
- * Instantiates a BPMN model tree from a given xml string.
- *
- * @param {String} xmlStr
- * @param {String} [typeName='bpmn:Definitions'] name of the root element
- * @param {Object} [options] options to pass to the underlying reader
- *
- * @returns {Promise}
- */
+ if (cy || snapPoints.horizontal.indexOf(y) !== -1) {
+ (0,_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_2__.setSnapped)(event, 'y', sy);
+ }
+ });
+}
- BpmnModdle.prototype.fromXML = function (xmlStr, typeName, options) {
- if (!(0, _minDash.isString)(typeName)) {
- options = typeName;
- typeName = 'bpmn:Definitions';
- }
- var reader = new _moddleXml.Reader((0, _minDash.assign)({
- model: this,
- lax: true
- }, options));
- var rootHandler = reader.handler(typeName);
- return reader.fromXML(xmlStr, rootHandler);
- };
- /**
- * The toXML result.
- *
- * @typedef {Object} SerializationResult
- *
- * @property {String} xml
- */
+BendpointSnapping.$inject = [ 'eventBus' ];
- /**
- * Serializes a BPMN 2.0 object tree to XML.
- *
- * @param {String} element the root element, typically an instance of `bpmn:Definitions`
- * @param {Object} [options] to pass to the underlying writer
- *
- * @returns {Promise}
- */
+/***/ }),
- BpmnModdle.prototype.toXML = function (element, options) {
- var writer = new _moddleXml.Writer(options);
- return new Promise(function (resolve, reject) {
- try {
- var result = writer.toXML(element);
- return resolve({
- xml: result
- });
- } catch (err) {
- return reject(err);
- }
- });
- };
+/***/ "../node_modules/diagram-js/lib/features/bendpoints/BendpointUtil.js":
+/*!***************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/bendpoints/BendpointUtil.js ***!
+ \***************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var name = "BPMN20";
- var uri = "http://www.omg.org/spec/BPMN/20100524/MODEL";
- var prefix = "bpmn";
- var associations = [];
- var types = [{
- name: "Interface",
- superClass: ["RootElement"],
- properties: [{
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "operations",
- type: "Operation",
- isMany: true
- }, {
- name: "implementationRef",
- isAttr: true,
- type: "String"
- }]
- }, {
- name: "Operation",
- superClass: ["BaseElement"],
- properties: [{
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "inMessageRef",
- type: "Message",
- isReference: true
- }, {
- name: "outMessageRef",
- type: "Message",
- isReference: true
- }, {
- name: "errorRef",
- type: "Error",
- isMany: true,
- isReference: true
- }, {
- name: "implementationRef",
- isAttr: true,
- type: "String"
- }]
- }, {
- name: "EndPoint",
- superClass: ["RootElement"]
- }, {
- name: "Auditing",
- superClass: ["BaseElement"]
- }, {
- name: "GlobalTask",
- superClass: ["CallableElement"],
- properties: [{
- name: "resources",
- type: "ResourceRole",
- isMany: true
- }]
- }, {
- name: "Monitoring",
- superClass: ["BaseElement"]
- }, {
- name: "Performer",
- superClass: ["ResourceRole"]
- }, {
- name: "Process",
- superClass: ["FlowElementsContainer", "CallableElement"],
- properties: [{
- name: "processType",
- type: "ProcessType",
- isAttr: true
- }, {
- name: "isClosed",
- isAttr: true,
- type: "Boolean"
- }, {
- name: "auditing",
- type: "Auditing"
- }, {
- name: "monitoring",
- type: "Monitoring"
- }, {
- name: "properties",
- type: "Property",
- isMany: true
- }, {
- name: "laneSets",
- isMany: true,
- replaces: "FlowElementsContainer#laneSets",
- type: "LaneSet"
- }, {
- name: "flowElements",
- isMany: true,
- replaces: "FlowElementsContainer#flowElements",
- type: "FlowElement"
- }, {
- name: "artifacts",
- type: "Artifact",
- isMany: true
- }, {
- name: "resources",
- type: "ResourceRole",
- isMany: true
- }, {
- name: "correlationSubscriptions",
- type: "CorrelationSubscription",
- isMany: true
- }, {
- name: "supports",
- type: "Process",
- isMany: true,
- isReference: true
- }, {
- name: "definitionalCollaborationRef",
- type: "Collaboration",
- isAttr: true,
- isReference: true
- }, {
- name: "isExecutable",
- isAttr: true,
- type: "Boolean"
- }]
- }, {
- name: "LaneSet",
- superClass: ["BaseElement"],
- properties: [{
- name: "lanes",
- type: "Lane",
- isMany: true
- }, {
- name: "name",
- isAttr: true,
- type: "String"
- }]
- }, {
- name: "Lane",
- superClass: ["BaseElement"],
- properties: [{
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "partitionElementRef",
- type: "BaseElement",
- isAttr: true,
- isReference: true
- }, {
- name: "partitionElement",
- type: "BaseElement"
- }, {
- name: "flowNodeRef",
- type: "FlowNode",
- isMany: true,
- isReference: true
- }, {
- name: "childLaneSet",
- type: "LaneSet",
- xml: {
- serialize: "xsi:type"
- }
- }]
- }, {
- name: "GlobalManualTask",
- superClass: ["GlobalTask"]
- }, {
- name: "ManualTask",
- superClass: ["Task"]
- }, {
- name: "UserTask",
- superClass: ["Task"],
- properties: [{
- name: "renderings",
- type: "Rendering",
- isMany: true
- }, {
- name: "implementation",
- isAttr: true,
- type: "String"
- }]
- }, {
- name: "Rendering",
- superClass: ["BaseElement"]
- }, {
- name: "HumanPerformer",
- superClass: ["Performer"]
- }, {
- name: "PotentialOwner",
- superClass: ["HumanPerformer"]
- }, {
- name: "GlobalUserTask",
- superClass: ["GlobalTask"],
- properties: [{
- name: "implementation",
- isAttr: true,
- type: "String"
- }, {
- name: "renderings",
- type: "Rendering",
- isMany: true
- }]
- }, {
- name: "Gateway",
- isAbstract: true,
- superClass: ["FlowNode"],
- properties: [{
- name: "gatewayDirection",
- type: "GatewayDirection",
- "default": "Unspecified",
- isAttr: true
- }]
- }, {
- name: "EventBasedGateway",
- superClass: ["Gateway"],
- properties: [{
- name: "instantiate",
- "default": false,
- isAttr: true,
- type: "Boolean"
- }, {
- name: "eventGatewayType",
- type: "EventBasedGatewayType",
- isAttr: true,
- "default": "Exclusive"
- }]
- }, {
- name: "ComplexGateway",
- superClass: ["Gateway"],
- properties: [{
- name: "activationCondition",
- type: "Expression",
- xml: {
- serialize: "xsi:type"
- }
- }, {
- name: "default",
- type: "SequenceFlow",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "ExclusiveGateway",
- superClass: ["Gateway"],
- properties: [{
- name: "default",
- type: "SequenceFlow",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "InclusiveGateway",
- superClass: ["Gateway"],
- properties: [{
- name: "default",
- type: "SequenceFlow",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "ParallelGateway",
- superClass: ["Gateway"]
- }, {
- name: "RootElement",
- isAbstract: true,
- superClass: ["BaseElement"]
- }, {
- name: "Relationship",
- superClass: ["BaseElement"],
- properties: [{
- name: "type",
- isAttr: true,
- type: "String"
- }, {
- name: "direction",
- type: "RelationshipDirection",
- isAttr: true
- }, {
- name: "source",
- isMany: true,
- isReference: true,
- type: "Element"
- }, {
- name: "target",
- isMany: true,
- isReference: true,
- type: "Element"
- }]
- }, {
- name: "BaseElement",
- isAbstract: true,
- properties: [{
- name: "id",
- isAttr: true,
- type: "String",
- isId: true
- }, {
- name: "documentation",
- type: "Documentation",
- isMany: true
- }, {
- name: "extensionDefinitions",
- type: "ExtensionDefinition",
- isMany: true,
- isReference: true
- }, {
- name: "extensionElements",
- type: "ExtensionElements"
- }]
- }, {
- name: "Extension",
- properties: [{
- name: "mustUnderstand",
- "default": false,
- isAttr: true,
- type: "Boolean"
- }, {
- name: "definition",
- type: "ExtensionDefinition",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "ExtensionDefinition",
- properties: [{
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "extensionAttributeDefinitions",
- type: "ExtensionAttributeDefinition",
- isMany: true
- }]
- }, {
- name: "ExtensionAttributeDefinition",
- properties: [{
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "type",
- isAttr: true,
- type: "String"
- }, {
- name: "isReference",
- "default": false,
- isAttr: true,
- type: "Boolean"
- }, {
- name: "extensionDefinition",
- type: "ExtensionDefinition",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "ExtensionElements",
- properties: [{
- name: "valueRef",
- isAttr: true,
- isReference: true,
- type: "Element"
- }, {
- name: "values",
- type: "Element",
- isMany: true
- }, {
- name: "extensionAttributeDefinition",
- type: "ExtensionAttributeDefinition",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "Documentation",
- superClass: ["BaseElement"],
- properties: [{
- name: "text",
- type: "String",
- isBody: true
- }, {
- name: "textFormat",
- "default": "text/plain",
- isAttr: true,
- type: "String"
- }]
- }, {
- name: "Event",
- isAbstract: true,
- superClass: ["FlowNode", "InteractionNode"],
- properties: [{
- name: "properties",
- type: "Property",
- isMany: true
- }]
- }, {
- name: "IntermediateCatchEvent",
- superClass: ["CatchEvent"]
- }, {
- name: "IntermediateThrowEvent",
- superClass: ["ThrowEvent"]
- }, {
- name: "EndEvent",
- superClass: ["ThrowEvent"]
- }, {
- name: "StartEvent",
- superClass: ["CatchEvent"],
- properties: [{
- name: "isInterrupting",
- "default": true,
- isAttr: true,
- type: "Boolean"
- }]
- }, {
- name: "ThrowEvent",
- isAbstract: true,
- superClass: ["Event"],
- properties: [{
- name: "dataInputs",
- type: "DataInput",
- isMany: true
- }, {
- name: "dataInputAssociations",
- type: "DataInputAssociation",
- isMany: true
- }, {
- name: "inputSet",
- type: "InputSet"
- }, {
- name: "eventDefinitions",
- type: "EventDefinition",
- isMany: true
- }, {
- name: "eventDefinitionRef",
- type: "EventDefinition",
- isMany: true,
- isReference: true
- }]
- }, {
- name: "CatchEvent",
- isAbstract: true,
- superClass: ["Event"],
- properties: [{
- name: "parallelMultiple",
- isAttr: true,
- type: "Boolean",
- "default": false
- }, {
- name: "dataOutputs",
- type: "DataOutput",
- isMany: true
- }, {
- name: "dataOutputAssociations",
- type: "DataOutputAssociation",
- isMany: true
- }, {
- name: "outputSet",
- type: "OutputSet"
- }, {
- name: "eventDefinitions",
- type: "EventDefinition",
- isMany: true
- }, {
- name: "eventDefinitionRef",
- type: "EventDefinition",
- isMany: true,
- isReference: true
- }]
- }, {
- name: "BoundaryEvent",
- superClass: ["CatchEvent"],
- properties: [{
- name: "cancelActivity",
- "default": true,
- isAttr: true,
- type: "Boolean"
- }, {
- name: "attachedToRef",
- type: "Activity",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "EventDefinition",
- isAbstract: true,
- superClass: ["RootElement"]
- }, {
- name: "CancelEventDefinition",
- superClass: ["EventDefinition"]
- }, {
- name: "ErrorEventDefinition",
- superClass: ["EventDefinition"],
- properties: [{
- name: "errorRef",
- type: "Error",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "TerminateEventDefinition",
- superClass: ["EventDefinition"]
- }, {
- name: "EscalationEventDefinition",
- superClass: ["EventDefinition"],
- properties: [{
- name: "escalationRef",
- type: "Escalation",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "Escalation",
- properties: [{
- name: "structureRef",
- type: "ItemDefinition",
- isAttr: true,
- isReference: true
- }, {
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "escalationCode",
- isAttr: true,
- type: "String"
- }],
- superClass: ["RootElement"]
- }, {
- name: "CompensateEventDefinition",
- superClass: ["EventDefinition"],
- properties: [{
- name: "waitForCompletion",
- isAttr: true,
- type: "Boolean",
- "default": true
- }, {
- name: "activityRef",
- type: "Activity",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "TimerEventDefinition",
- superClass: ["EventDefinition"],
- properties: [{
- name: "timeDate",
- type: "Expression",
- xml: {
- serialize: "xsi:type"
- }
- }, {
- name: "timeCycle",
- type: "Expression",
- xml: {
- serialize: "xsi:type"
- }
- }, {
- name: "timeDuration",
- type: "Expression",
- xml: {
- serialize: "xsi:type"
- }
- }]
- }, {
- name: "LinkEventDefinition",
- superClass: ["EventDefinition"],
- properties: [{
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "target",
- type: "LinkEventDefinition",
- isAttr: true,
- isReference: true
- }, {
- name: "source",
- type: "LinkEventDefinition",
- isMany: true,
- isReference: true
- }]
- }, {
- name: "MessageEventDefinition",
- superClass: ["EventDefinition"],
- properties: [{
- name: "messageRef",
- type: "Message",
- isAttr: true,
- isReference: true
- }, {
- name: "operationRef",
- type: "Operation",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "ConditionalEventDefinition",
- superClass: ["EventDefinition"],
- properties: [{
- name: "condition",
- type: "Expression",
- xml: {
- serialize: "xsi:type"
- }
- }]
- }, {
- name: "SignalEventDefinition",
- superClass: ["EventDefinition"],
- properties: [{
- name: "signalRef",
- type: "Signal",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "Signal",
- superClass: ["RootElement"],
- properties: [{
- name: "structureRef",
- type: "ItemDefinition",
- isAttr: true,
- isReference: true
- }, {
- name: "name",
- isAttr: true,
- type: "String"
- }]
- }, {
- name: "ImplicitThrowEvent",
- superClass: ["ThrowEvent"]
- }, {
- name: "DataState",
- superClass: ["BaseElement"],
- properties: [{
- name: "name",
- isAttr: true,
- type: "String"
- }]
- }, {
- name: "ItemAwareElement",
- superClass: ["BaseElement"],
- properties: [{
- name: "itemSubjectRef",
- type: "ItemDefinition",
- isAttr: true,
- isReference: true
- }, {
- name: "dataState",
- type: "DataState"
- }]
- }, {
- name: "DataAssociation",
- superClass: ["BaseElement"],
- properties: [{
- name: "sourceRef",
- type: "ItemAwareElement",
- isMany: true,
- isReference: true
- }, {
- name: "targetRef",
- type: "ItemAwareElement",
- isReference: true
- }, {
- name: "transformation",
- type: "FormalExpression",
- xml: {
- serialize: "property"
- }
- }, {
- name: "assignment",
- type: "Assignment",
- isMany: true
- }]
- }, {
- name: "DataInput",
- superClass: ["ItemAwareElement"],
- properties: [{
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "isCollection",
- "default": false,
- isAttr: true,
- type: "Boolean"
- }, {
- name: "inputSetRef",
- type: "InputSet",
- isMany: true,
- isVirtual: true,
- isReference: true
- }, {
- name: "inputSetWithOptional",
- type: "InputSet",
- isMany: true,
- isVirtual: true,
- isReference: true
- }, {
- name: "inputSetWithWhileExecuting",
- type: "InputSet",
- isMany: true,
- isVirtual: true,
- isReference: true
- }]
- }, {
- name: "DataOutput",
- superClass: ["ItemAwareElement"],
- properties: [{
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "isCollection",
- "default": false,
- isAttr: true,
- type: "Boolean"
- }, {
- name: "outputSetRef",
- type: "OutputSet",
- isMany: true,
- isVirtual: true,
- isReference: true
- }, {
- name: "outputSetWithOptional",
- type: "OutputSet",
- isMany: true,
- isVirtual: true,
- isReference: true
- }, {
- name: "outputSetWithWhileExecuting",
- type: "OutputSet",
- isMany: true,
- isVirtual: true,
- isReference: true
- }]
- }, {
- name: "InputSet",
- superClass: ["BaseElement"],
- properties: [{
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "dataInputRefs",
- type: "DataInput",
- isMany: true,
- isReference: true
- }, {
- name: "optionalInputRefs",
- type: "DataInput",
- isMany: true,
- isReference: true
- }, {
- name: "whileExecutingInputRefs",
- type: "DataInput",
- isMany: true,
- isReference: true
- }, {
- name: "outputSetRefs",
- type: "OutputSet",
- isMany: true,
- isReference: true
- }]
- }, {
- name: "OutputSet",
- superClass: ["BaseElement"],
- properties: [{
- name: "dataOutputRefs",
- type: "DataOutput",
- isMany: true,
- isReference: true
- }, {
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "inputSetRefs",
- type: "InputSet",
- isMany: true,
- isReference: true
- }, {
- name: "optionalOutputRefs",
- type: "DataOutput",
- isMany: true,
- isReference: true
- }, {
- name: "whileExecutingOutputRefs",
- type: "DataOutput",
- isMany: true,
- isReference: true
- }]
- }, {
- name: "Property",
- superClass: ["ItemAwareElement"],
- properties: [{
- name: "name",
- isAttr: true,
- type: "String"
- }]
- }, {
- name: "DataInputAssociation",
- superClass: ["DataAssociation"]
- }, {
- name: "DataOutputAssociation",
- superClass: ["DataAssociation"]
- }, {
- name: "InputOutputSpecification",
- superClass: ["BaseElement"],
- properties: [{
- name: "dataInputs",
- type: "DataInput",
- isMany: true
- }, {
- name: "dataOutputs",
- type: "DataOutput",
- isMany: true
- }, {
- name: "inputSets",
- type: "InputSet",
- isMany: true
- }, {
- name: "outputSets",
- type: "OutputSet",
- isMany: true
- }]
- }, {
- name: "DataObject",
- superClass: ["FlowElement", "ItemAwareElement"],
- properties: [{
- name: "isCollection",
- "default": false,
- isAttr: true,
- type: "Boolean"
- }]
- }, {
- name: "InputOutputBinding",
- properties: [{
- name: "inputDataRef",
- type: "InputSet",
- isAttr: true,
- isReference: true
- }, {
- name: "outputDataRef",
- type: "OutputSet",
- isAttr: true,
- isReference: true
- }, {
- name: "operationRef",
- type: "Operation",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "Assignment",
- superClass: ["BaseElement"],
- properties: [{
- name: "from",
- type: "Expression",
- xml: {
- serialize: "xsi:type"
- }
- }, {
- name: "to",
- type: "Expression",
- xml: {
- serialize: "xsi:type"
- }
- }]
- }, {
- name: "DataStore",
- superClass: ["RootElement", "ItemAwareElement"],
- properties: [{
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "capacity",
- isAttr: true,
- type: "Integer"
- }, {
- name: "isUnlimited",
- "default": true,
- isAttr: true,
- type: "Boolean"
- }]
- }, {
- name: "DataStoreReference",
- superClass: ["ItemAwareElement", "FlowElement"],
- properties: [{
- name: "dataStoreRef",
- type: "DataStore",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "DataObjectReference",
- superClass: ["ItemAwareElement", "FlowElement"],
- properties: [{
- name: "dataObjectRef",
- type: "DataObject",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "ConversationLink",
- superClass: ["BaseElement"],
- properties: [{
- name: "sourceRef",
- type: "InteractionNode",
- isAttr: true,
- isReference: true
- }, {
- name: "targetRef",
- type: "InteractionNode",
- isAttr: true,
- isReference: true
- }, {
- name: "name",
- isAttr: true,
- type: "String"
- }]
- }, {
- name: "ConversationAssociation",
- superClass: ["BaseElement"],
- properties: [{
- name: "innerConversationNodeRef",
- type: "ConversationNode",
- isAttr: true,
- isReference: true
- }, {
- name: "outerConversationNodeRef",
- type: "ConversationNode",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "CallConversation",
- superClass: ["ConversationNode"],
- properties: [{
- name: "calledCollaborationRef",
- type: "Collaboration",
- isAttr: true,
- isReference: true
- }, {
- name: "participantAssociations",
- type: "ParticipantAssociation",
- isMany: true
- }]
- }, {
- name: "Conversation",
- superClass: ["ConversationNode"]
- }, {
- name: "SubConversation",
- superClass: ["ConversationNode"],
- properties: [{
- name: "conversationNodes",
- type: "ConversationNode",
- isMany: true
- }]
- }, {
- name: "ConversationNode",
- isAbstract: true,
- superClass: ["InteractionNode", "BaseElement"],
- properties: [{
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "participantRef",
- type: "Participant",
- isMany: true,
- isReference: true
- }, {
- name: "messageFlowRefs",
- type: "MessageFlow",
- isMany: true,
- isReference: true
- }, {
- name: "correlationKeys",
- type: "CorrelationKey",
- isMany: true
- }]
- }, {
- name: "GlobalConversation",
- superClass: ["Collaboration"]
- }, {
- name: "PartnerEntity",
- superClass: ["RootElement"],
- properties: [{
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "participantRef",
- type: "Participant",
- isMany: true,
- isReference: true
- }]
- }, {
- name: "PartnerRole",
- superClass: ["RootElement"],
- properties: [{
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "participantRef",
- type: "Participant",
- isMany: true,
- isReference: true
- }]
- }, {
- name: "CorrelationProperty",
- superClass: ["RootElement"],
- properties: [{
- name: "correlationPropertyRetrievalExpression",
- type: "CorrelationPropertyRetrievalExpression",
- isMany: true
- }, {
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "type",
- type: "ItemDefinition",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "Error",
- superClass: ["RootElement"],
- properties: [{
- name: "structureRef",
- type: "ItemDefinition",
- isAttr: true,
- isReference: true
- }, {
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "errorCode",
- isAttr: true,
- type: "String"
- }]
- }, {
- name: "CorrelationKey",
- superClass: ["BaseElement"],
- properties: [{
- name: "correlationPropertyRef",
- type: "CorrelationProperty",
- isMany: true,
- isReference: true
- }, {
- name: "name",
- isAttr: true,
- type: "String"
- }]
- }, {
- name: "Expression",
- superClass: ["BaseElement"],
- isAbstract: false,
- properties: [{
- name: "body",
- isBody: true,
- type: "String"
- }]
- }, {
- name: "FormalExpression",
- superClass: ["Expression"],
- properties: [{
- name: "language",
- isAttr: true,
- type: "String"
- }, {
- name: "evaluatesToTypeRef",
- type: "ItemDefinition",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "Message",
- superClass: ["RootElement"],
- properties: [{
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "itemRef",
- type: "ItemDefinition",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "ItemDefinition",
- superClass: ["RootElement"],
- properties: [{
- name: "itemKind",
- type: "ItemKind",
- isAttr: true
- }, {
- name: "structureRef",
- isAttr: true,
- type: "String"
- }, {
- name: "isCollection",
- "default": false,
- isAttr: true,
- type: "Boolean"
- }, {
- name: "import",
- type: "Import",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "FlowElement",
- isAbstract: true,
- superClass: ["BaseElement"],
- properties: [{
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "auditing",
- type: "Auditing"
- }, {
- name: "monitoring",
- type: "Monitoring"
- }, {
- name: "categoryValueRef",
- type: "CategoryValue",
- isMany: true,
- isReference: true
- }]
- }, {
- name: "SequenceFlow",
- superClass: ["FlowElement"],
- properties: [{
- name: "isImmediate",
- isAttr: true,
- type: "Boolean"
- }, {
- name: "conditionExpression",
- type: "Expression",
- xml: {
- serialize: "xsi:type"
- }
- }, {
- name: "sourceRef",
- type: "FlowNode",
- isAttr: true,
- isReference: true
- }, {
- name: "targetRef",
- type: "FlowNode",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "FlowElementsContainer",
- isAbstract: true,
- superClass: ["BaseElement"],
- properties: [{
- name: "laneSets",
- type: "LaneSet",
- isMany: true
- }, {
- name: "flowElements",
- type: "FlowElement",
- isMany: true
- }]
- }, {
- name: "CallableElement",
- isAbstract: true,
- superClass: ["RootElement"],
- properties: [{
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "ioSpecification",
- type: "InputOutputSpecification",
- xml: {
- serialize: "property"
- }
- }, {
- name: "supportedInterfaceRef",
- type: "Interface",
- isMany: true,
- isReference: true
- }, {
- name: "ioBinding",
- type: "InputOutputBinding",
- isMany: true,
- xml: {
- serialize: "property"
- }
- }]
- }, {
- name: "FlowNode",
- isAbstract: true,
- superClass: ["FlowElement"],
- properties: [{
- name: "incoming",
- type: "SequenceFlow",
- isMany: true,
- isReference: true
- }, {
- name: "outgoing",
- type: "SequenceFlow",
- isMany: true,
- isReference: true
- }, {
- name: "lanes",
- type: "Lane",
- isMany: true,
- isVirtual: true,
- isReference: true
- }]
- }, {
- name: "CorrelationPropertyRetrievalExpression",
- superClass: ["BaseElement"],
- properties: [{
- name: "messagePath",
- type: "FormalExpression"
- }, {
- name: "messageRef",
- type: "Message",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "CorrelationPropertyBinding",
- superClass: ["BaseElement"],
- properties: [{
- name: "dataPath",
- type: "FormalExpression"
- }, {
- name: "correlationPropertyRef",
- type: "CorrelationProperty",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "Resource",
- superClass: ["RootElement"],
- properties: [{
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "resourceParameters",
- type: "ResourceParameter",
- isMany: true
- }]
- }, {
- name: "ResourceParameter",
- superClass: ["BaseElement"],
- properties: [{
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "isRequired",
- isAttr: true,
- type: "Boolean"
- }, {
- name: "type",
- type: "ItemDefinition",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "CorrelationSubscription",
- superClass: ["BaseElement"],
- properties: [{
- name: "correlationKeyRef",
- type: "CorrelationKey",
- isAttr: true,
- isReference: true
- }, {
- name: "correlationPropertyBinding",
- type: "CorrelationPropertyBinding",
- isMany: true
- }]
- }, {
- name: "MessageFlow",
- superClass: ["BaseElement"],
- properties: [{
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "sourceRef",
- type: "InteractionNode",
- isAttr: true,
- isReference: true
- }, {
- name: "targetRef",
- type: "InteractionNode",
- isAttr: true,
- isReference: true
- }, {
- name: "messageRef",
- type: "Message",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "MessageFlowAssociation",
- superClass: ["BaseElement"],
- properties: [{
- name: "innerMessageFlowRef",
- type: "MessageFlow",
- isAttr: true,
- isReference: true
- }, {
- name: "outerMessageFlowRef",
- type: "MessageFlow",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "InteractionNode",
- isAbstract: true,
- properties: [{
- name: "incomingConversationLinks",
- type: "ConversationLink",
- isMany: true,
- isVirtual: true,
- isReference: true
- }, {
- name: "outgoingConversationLinks",
- type: "ConversationLink",
- isMany: true,
- isVirtual: true,
- isReference: true
- }]
- }, {
- name: "Participant",
- superClass: ["InteractionNode", "BaseElement"],
- properties: [{
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "interfaceRef",
- type: "Interface",
- isMany: true,
- isReference: true
- }, {
- name: "participantMultiplicity",
- type: "ParticipantMultiplicity"
- }, {
- name: "endPointRefs",
- type: "EndPoint",
- isMany: true,
- isReference: true
- }, {
- name: "processRef",
- type: "Process",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "ParticipantAssociation",
- superClass: ["BaseElement"],
- properties: [{
- name: "innerParticipantRef",
- type: "Participant",
- isAttr: true,
- isReference: true
- }, {
- name: "outerParticipantRef",
- type: "Participant",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "ParticipantMultiplicity",
- properties: [{
- name: "minimum",
- "default": 0,
- isAttr: true,
- type: "Integer"
- }, {
- name: "maximum",
- "default": 1,
- isAttr: true,
- type: "Integer"
- }],
- superClass: ["BaseElement"]
- }, {
- name: "Collaboration",
- superClass: ["RootElement"],
- properties: [{
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "isClosed",
- isAttr: true,
- type: "Boolean"
- }, {
- name: "participants",
- type: "Participant",
- isMany: true
- }, {
- name: "messageFlows",
- type: "MessageFlow",
- isMany: true
- }, {
- name: "artifacts",
- type: "Artifact",
- isMany: true
- }, {
- name: "conversations",
- type: "ConversationNode",
- isMany: true
- }, {
- name: "conversationAssociations",
- type: "ConversationAssociation"
- }, {
- name: "participantAssociations",
- type: "ParticipantAssociation",
- isMany: true
- }, {
- name: "messageFlowAssociations",
- type: "MessageFlowAssociation",
- isMany: true
- }, {
- name: "correlationKeys",
- type: "CorrelationKey",
- isMany: true
- }, {
- name: "choreographyRef",
- type: "Choreography",
- isMany: true,
- isReference: true
- }, {
- name: "conversationLinks",
- type: "ConversationLink",
- isMany: true
- }]
- }, {
- name: "ChoreographyActivity",
- isAbstract: true,
- superClass: ["FlowNode"],
- properties: [{
- name: "participantRef",
- type: "Participant",
- isMany: true,
- isReference: true
- }, {
- name: "initiatingParticipantRef",
- type: "Participant",
- isAttr: true,
- isReference: true
- }, {
- name: "correlationKeys",
- type: "CorrelationKey",
- isMany: true
- }, {
- name: "loopType",
- type: "ChoreographyLoopType",
- "default": "None",
- isAttr: true
- }]
- }, {
- name: "CallChoreography",
- superClass: ["ChoreographyActivity"],
- properties: [{
- name: "calledChoreographyRef",
- type: "Choreography",
- isAttr: true,
- isReference: true
- }, {
- name: "participantAssociations",
- type: "ParticipantAssociation",
- isMany: true
- }]
- }, {
- name: "SubChoreography",
- superClass: ["ChoreographyActivity", "FlowElementsContainer"],
- properties: [{
- name: "artifacts",
- type: "Artifact",
- isMany: true
- }]
- }, {
- name: "ChoreographyTask",
- superClass: ["ChoreographyActivity"],
- properties: [{
- name: "messageFlowRef",
- type: "MessageFlow",
- isMany: true,
- isReference: true
- }]
- }, {
- name: "Choreography",
- superClass: ["Collaboration", "FlowElementsContainer"]
- }, {
- name: "GlobalChoreographyTask",
- superClass: ["Choreography"],
- properties: [{
- name: "initiatingParticipantRef",
- type: "Participant",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "TextAnnotation",
- superClass: ["Artifact"],
- properties: [{
- name: "text",
- type: "String"
- }, {
- name: "textFormat",
- "default": "text/plain",
- isAttr: true,
- type: "String"
- }]
- }, {
- name: "Group",
- superClass: ["Artifact"],
- properties: [{
- name: "categoryValueRef",
- type: "CategoryValue",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "Association",
- superClass: ["Artifact"],
- properties: [{
- name: "associationDirection",
- type: "AssociationDirection",
- isAttr: true
- }, {
- name: "sourceRef",
- type: "BaseElement",
- isAttr: true,
- isReference: true
- }, {
- name: "targetRef",
- type: "BaseElement",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "Category",
- superClass: ["RootElement"],
- properties: [{
- name: "categoryValue",
- type: "CategoryValue",
- isMany: true
- }, {
- name: "name",
- isAttr: true,
- type: "String"
- }]
- }, {
- name: "Artifact",
- isAbstract: true,
- superClass: ["BaseElement"]
- }, {
- name: "CategoryValue",
- superClass: ["BaseElement"],
- properties: [{
- name: "categorizedFlowElements",
- type: "FlowElement",
- isMany: true,
- isVirtual: true,
- isReference: true
- }, {
- name: "value",
- isAttr: true,
- type: "String"
- }]
- }, {
- name: "Activity",
- isAbstract: true,
- superClass: ["FlowNode"],
- properties: [{
- name: "isForCompensation",
- "default": false,
- isAttr: true,
- type: "Boolean"
- }, {
- name: "default",
- type: "SequenceFlow",
- isAttr: true,
- isReference: true
- }, {
- name: "ioSpecification",
- type: "InputOutputSpecification",
- xml: {
- serialize: "property"
- }
- }, {
- name: "boundaryEventRefs",
- type: "BoundaryEvent",
- isMany: true,
- isReference: true
- }, {
- name: "properties",
- type: "Property",
- isMany: true
- }, {
- name: "dataInputAssociations",
- type: "DataInputAssociation",
- isMany: true
- }, {
- name: "dataOutputAssociations",
- type: "DataOutputAssociation",
- isMany: true
- }, {
- name: "startQuantity",
- "default": 1,
- isAttr: true,
- type: "Integer"
- }, {
- name: "resources",
- type: "ResourceRole",
- isMany: true
- }, {
- name: "completionQuantity",
- "default": 1,
- isAttr: true,
- type: "Integer"
- }, {
- name: "loopCharacteristics",
- type: "LoopCharacteristics"
- }]
- }, {
- name: "ServiceTask",
- superClass: ["Task"],
- properties: [{
- name: "implementation",
- isAttr: true,
- type: "String"
- }, {
- name: "operationRef",
- type: "Operation",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "SubProcess",
- superClass: ["Activity", "FlowElementsContainer", "InteractionNode"],
- properties: [{
- name: "triggeredByEvent",
- "default": false,
- isAttr: true,
- type: "Boolean"
- }, {
- name: "artifacts",
- type: "Artifact",
- isMany: true
- }]
- }, {
- name: "LoopCharacteristics",
- isAbstract: true,
- superClass: ["BaseElement"]
- }, {
- name: "MultiInstanceLoopCharacteristics",
- superClass: ["LoopCharacteristics"],
- properties: [{
- name: "isSequential",
- "default": false,
- isAttr: true,
- type: "Boolean"
- }, {
- name: "behavior",
- type: "MultiInstanceBehavior",
- "default": "All",
- isAttr: true
- }, {
- name: "loopCardinality",
- type: "Expression",
- xml: {
- serialize: "xsi:type"
- }
- }, {
- name: "loopDataInputRef",
- type: "ItemAwareElement",
- isReference: true
- }, {
- name: "loopDataOutputRef",
- type: "ItemAwareElement",
- isReference: true
- }, {
- name: "inputDataItem",
- type: "DataInput",
- xml: {
- serialize: "property"
- }
- }, {
- name: "outputDataItem",
- type: "DataOutput",
- xml: {
- serialize: "property"
- }
- }, {
- name: "complexBehaviorDefinition",
- type: "ComplexBehaviorDefinition",
- isMany: true
- }, {
- name: "completionCondition",
- type: "Expression",
- xml: {
- serialize: "xsi:type"
- }
- }, {
- name: "oneBehaviorEventRef",
- type: "EventDefinition",
- isAttr: true,
- isReference: true
- }, {
- name: "noneBehaviorEventRef",
- type: "EventDefinition",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "StandardLoopCharacteristics",
- superClass: ["LoopCharacteristics"],
- properties: [{
- name: "testBefore",
- "default": false,
- isAttr: true,
- type: "Boolean"
- }, {
- name: "loopCondition",
- type: "Expression",
- xml: {
- serialize: "xsi:type"
- }
- }, {
- name: "loopMaximum",
- type: "Integer",
- isAttr: true
- }]
- }, {
- name: "CallActivity",
- superClass: ["Activity"],
- properties: [{
- name: "calledElement",
- type: "String",
- isAttr: true
- }]
- }, {
- name: "Task",
- superClass: ["Activity", "InteractionNode"]
- }, {
- name: "SendTask",
- superClass: ["Task"],
- properties: [{
- name: "implementation",
- isAttr: true,
- type: "String"
- }, {
- name: "operationRef",
- type: "Operation",
- isAttr: true,
- isReference: true
- }, {
- name: "messageRef",
- type: "Message",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "ReceiveTask",
- superClass: ["Task"],
- properties: [{
- name: "implementation",
- isAttr: true,
- type: "String"
- }, {
- name: "instantiate",
- "default": false,
- isAttr: true,
- type: "Boolean"
- }, {
- name: "operationRef",
- type: "Operation",
- isAttr: true,
- isReference: true
- }, {
- name: "messageRef",
- type: "Message",
- isAttr: true,
- isReference: true
- }]
- }, {
- name: "ScriptTask",
- superClass: ["Task"],
- properties: [{
- name: "scriptFormat",
- isAttr: true,
- type: "String"
- }, {
- name: "script",
- type: "String"
- }]
- }, {
- name: "BusinessRuleTask",
- superClass: ["Task"],
- properties: [{
- name: "implementation",
- isAttr: true,
- type: "String"
- }]
- }, {
- name: "AdHocSubProcess",
- superClass: ["SubProcess"],
- properties: [{
- name: "completionCondition",
- type: "Expression",
- xml: {
- serialize: "xsi:type"
- }
- }, {
- name: "ordering",
- type: "AdHocOrdering",
- isAttr: true
- }, {
- name: "cancelRemainingInstances",
- "default": true,
- isAttr: true,
- type: "Boolean"
- }]
- }, {
- name: "Transaction",
- superClass: ["SubProcess"],
- properties: [{
- name: "protocol",
- isAttr: true,
- type: "String"
- }, {
- name: "method",
- isAttr: true,
- type: "String"
- }]
- }, {
- name: "GlobalScriptTask",
- superClass: ["GlobalTask"],
- properties: [{
- name: "scriptLanguage",
- isAttr: true,
- type: "String"
- }, {
- name: "script",
- isAttr: true,
- type: "String"
- }]
- }, {
- name: "GlobalBusinessRuleTask",
- superClass: ["GlobalTask"],
- properties: [{
- name: "implementation",
- isAttr: true,
- type: "String"
- }]
- }, {
- name: "ComplexBehaviorDefinition",
- superClass: ["BaseElement"],
- properties: [{
- name: "condition",
- type: "FormalExpression"
- }, {
- name: "event",
- type: "ImplicitThrowEvent"
- }]
- }, {
- name: "ResourceRole",
- superClass: ["BaseElement"],
- properties: [{
- name: "resourceRef",
- type: "Resource",
- isReference: true
- }, {
- name: "resourceParameterBindings",
- type: "ResourceParameterBinding",
- isMany: true
- }, {
- name: "resourceAssignmentExpression",
- type: "ResourceAssignmentExpression"
- }, {
- name: "name",
- isAttr: true,
- type: "String"
- }]
- }, {
- name: "ResourceParameterBinding",
- properties: [{
- name: "expression",
- type: "Expression",
- xml: {
- serialize: "xsi:type"
- }
- }, {
- name: "parameterRef",
- type: "ResourceParameter",
- isAttr: true,
- isReference: true
- }],
- superClass: ["BaseElement"]
- }, {
- name: "ResourceAssignmentExpression",
- properties: [{
- name: "expression",
- type: "Expression",
- xml: {
- serialize: "xsi:type"
- }
- }],
- superClass: ["BaseElement"]
- }, {
- name: "Import",
- properties: [{
- name: "importType",
- isAttr: true,
- type: "String"
- }, {
- name: "location",
- isAttr: true,
- type: "String"
- }, {
- name: "namespace",
- isAttr: true,
- type: "String"
- }]
- }, {
- name: "Definitions",
- superClass: ["BaseElement"],
- properties: [{
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "targetNamespace",
- isAttr: true,
- type: "String"
- }, {
- name: "expressionLanguage",
- "default": "http://www.w3.org/1999/XPath",
- isAttr: true,
- type: "String"
- }, {
- name: "typeLanguage",
- "default": "http://www.w3.org/2001/XMLSchema",
- isAttr: true,
- type: "String"
- }, {
- name: "imports",
- type: "Import",
- isMany: true
- }, {
- name: "extensions",
- type: "Extension",
- isMany: true
- }, {
- name: "rootElements",
- type: "RootElement",
- isMany: true
- }, {
- name: "diagrams",
- isMany: true,
- type: "bpmndi:BPMNDiagram"
- }, {
- name: "exporter",
- isAttr: true,
- type: "String"
- }, {
- name: "relationships",
- type: "Relationship",
- isMany: true
- }, {
- name: "exporterVersion",
- isAttr: true,
- type: "String"
- }]
- }];
- var enumerations = [{
- name: "ProcessType",
- literalValues: [{
- name: "None"
- }, {
- name: "Public"
- }, {
- name: "Private"
- }]
- }, {
- name: "GatewayDirection",
- literalValues: [{
- name: "Unspecified"
- }, {
- name: "Converging"
- }, {
- name: "Diverging"
- }, {
- name: "Mixed"
- }]
- }, {
- name: "EventBasedGatewayType",
- literalValues: [{
- name: "Parallel"
- }, {
- name: "Exclusive"
- }]
- }, {
- name: "RelationshipDirection",
- literalValues: [{
- name: "None"
- }, {
- name: "Forward"
- }, {
- name: "Backward"
- }, {
- name: "Both"
- }]
- }, {
- name: "ItemKind",
- literalValues: [{
- name: "Physical"
- }, {
- name: "Information"
- }]
- }, {
- name: "ChoreographyLoopType",
- literalValues: [{
- name: "None"
- }, {
- name: "Standard"
- }, {
- name: "MultiInstanceSequential"
- }, {
- name: "MultiInstanceParallel"
- }]
- }, {
- name: "AssociationDirection",
- literalValues: [{
- name: "None"
- }, {
- name: "One"
- }, {
- name: "Both"
- }]
- }, {
- name: "MultiInstanceBehavior",
- literalValues: [{
- name: "None"
- }, {
- name: "One"
- }, {
- name: "All"
- }, {
- name: "Complex"
- }]
- }, {
- name: "AdHocOrdering",
- literalValues: [{
- name: "Parallel"
- }, {
- name: "Sequential"
- }]
- }];
- var xml = {
- tagAlias: "lowerCase",
- typePrefix: "t"
- };
- var BpmnPackage = {
- name: name,
- uri: uri,
- prefix: prefix,
- associations: associations,
- types: types,
- enumerations: enumerations,
- xml: xml
- };
- var name$1 = "BPMNDI";
- var uri$1 = "http://www.omg.org/spec/BPMN/20100524/DI";
- var prefix$1 = "bpmndi";
- var types$1 = [{
- name: "BPMNDiagram",
- properties: [{
- name: "plane",
- type: "BPMNPlane",
- redefines: "di:Diagram#rootElement"
- }, {
- name: "labelStyle",
- type: "BPMNLabelStyle",
- isMany: true
- }],
- superClass: ["di:Diagram"]
- }, {
- name: "BPMNPlane",
- properties: [{
- name: "bpmnElement",
- isAttr: true,
- isReference: true,
- type: "bpmn:BaseElement",
- redefines: "di:DiagramElement#modelElement"
- }],
- superClass: ["di:Plane"]
- }, {
- name: "BPMNShape",
- properties: [{
- name: "bpmnElement",
- isAttr: true,
- isReference: true,
- type: "bpmn:BaseElement",
- redefines: "di:DiagramElement#modelElement"
- }, {
- name: "isHorizontal",
- isAttr: true,
- type: "Boolean"
- }, {
- name: "isExpanded",
- isAttr: true,
- type: "Boolean"
- }, {
- name: "isMarkerVisible",
- isAttr: true,
- type: "Boolean"
- }, {
- name: "label",
- type: "BPMNLabel"
- }, {
- name: "isMessageVisible",
- isAttr: true,
- type: "Boolean"
- }, {
- name: "participantBandKind",
- type: "ParticipantBandKind",
- isAttr: true
- }, {
- name: "choreographyActivityShape",
- type: "BPMNShape",
- isAttr: true,
- isReference: true
- }],
- superClass: ["di:LabeledShape"]
- }, {
- name: "BPMNEdge",
- properties: [{
- name: "label",
- type: "BPMNLabel"
- }, {
- name: "bpmnElement",
- isAttr: true,
- isReference: true,
- type: "bpmn:BaseElement",
- redefines: "di:DiagramElement#modelElement"
- }, {
- name: "sourceElement",
- isAttr: true,
- isReference: true,
- type: "di:DiagramElement",
- redefines: "di:Edge#source"
- }, {
- name: "targetElement",
- isAttr: true,
- isReference: true,
- type: "di:DiagramElement",
- redefines: "di:Edge#target"
- }, {
- name: "messageVisibleKind",
- type: "MessageVisibleKind",
- isAttr: true,
- "default": "initiating"
- }],
- superClass: ["di:LabeledEdge"]
- }, {
- name: "BPMNLabel",
- properties: [{
- name: "labelStyle",
- type: "BPMNLabelStyle",
- isAttr: true,
- isReference: true,
- redefines: "di:DiagramElement#style"
- }],
- superClass: ["di:Label"]
- }, {
- name: "BPMNLabelStyle",
- properties: [{
- name: "font",
- type: "dc:Font"
- }],
- superClass: ["di:Style"]
- }];
- var enumerations$1 = [{
- name: "ParticipantBandKind",
- literalValues: [{
- name: "top_initiating"
- }, {
- name: "middle_initiating"
- }, {
- name: "bottom_initiating"
- }, {
- name: "top_non_initiating"
- }, {
- name: "middle_non_initiating"
- }, {
- name: "bottom_non_initiating"
- }]
- }, {
- name: "MessageVisibleKind",
- literalValues: [{
- name: "initiating"
- }, {
- name: "non_initiating"
- }]
- }];
- var associations$1 = [];
- var BpmnDiPackage = {
- name: name$1,
- uri: uri$1,
- prefix: prefix$1,
- types: types$1,
- enumerations: enumerations$1,
- associations: associations$1
- };
- var name$2 = "DC";
- var uri$2 = "http://www.omg.org/spec/DD/20100524/DC";
- var prefix$2 = "dc";
- var types$2 = [{
- name: "Boolean"
- }, {
- name: "Integer"
- }, {
- name: "Real"
- }, {
- name: "String"
- }, {
- name: "Font",
- properties: [{
- name: "name",
- type: "String",
- isAttr: true
- }, {
- name: "size",
- type: "Real",
- isAttr: true
- }, {
- name: "isBold",
- type: "Boolean",
- isAttr: true
- }, {
- name: "isItalic",
- type: "Boolean",
- isAttr: true
- }, {
- name: "isUnderline",
- type: "Boolean",
- isAttr: true
- }, {
- name: "isStrikeThrough",
- type: "Boolean",
- isAttr: true
- }]
- }, {
- name: "Point",
- properties: [{
- name: "x",
- type: "Real",
- "default": "0",
- isAttr: true
- }, {
- name: "y",
- type: "Real",
- "default": "0",
- isAttr: true
- }]
- }, {
- name: "Bounds",
- properties: [{
- name: "x",
- type: "Real",
- "default": "0",
- isAttr: true
- }, {
- name: "y",
- type: "Real",
- "default": "0",
- isAttr: true
- }, {
- name: "width",
- type: "Real",
- isAttr: true
- }, {
- name: "height",
- type: "Real",
- isAttr: true
- }]
- }];
- var associations$2 = [];
- var DcPackage = {
- name: name$2,
- uri: uri$2,
- prefix: prefix$2,
- types: types$2,
- associations: associations$2
- };
- var name$3 = "DI";
- var uri$3 = "http://www.omg.org/spec/DD/20100524/DI";
- var prefix$3 = "di";
- var types$3 = [{
- name: "DiagramElement",
- isAbstract: true,
- properties: [{
- name: "id",
- isAttr: true,
- isId: true,
- type: "String"
- }, {
- name: "extension",
- type: "Extension"
- }, {
- name: "owningDiagram",
- type: "Diagram",
- isReadOnly: true,
- isVirtual: true,
- isReference: true
- }, {
- name: "owningElement",
- type: "DiagramElement",
- isReadOnly: true,
- isVirtual: true,
- isReference: true
- }, {
- name: "modelElement",
- isReadOnly: true,
- isVirtual: true,
- isReference: true,
- type: "Element"
- }, {
- name: "style",
- type: "Style",
- isReadOnly: true,
- isVirtual: true,
- isReference: true
- }, {
- name: "ownedElement",
- type: "DiagramElement",
- isReadOnly: true,
- isMany: true,
- isVirtual: true
- }]
- }, {
- name: "Node",
- isAbstract: true,
- superClass: ["DiagramElement"]
- }, {
- name: "Edge",
- isAbstract: true,
- superClass: ["DiagramElement"],
- properties: [{
- name: "source",
- type: "DiagramElement",
- isReadOnly: true,
- isVirtual: true,
- isReference: true
- }, {
- name: "target",
- type: "DiagramElement",
- isReadOnly: true,
- isVirtual: true,
- isReference: true
- }, {
- name: "waypoint",
- isUnique: false,
- isMany: true,
- type: "dc:Point",
- xml: {
- serialize: "xsi:type"
- }
- }]
- }, {
- name: "Diagram",
- isAbstract: true,
- properties: [{
- name: "id",
- isAttr: true,
- isId: true,
- type: "String"
- }, {
- name: "rootElement",
- type: "DiagramElement",
- isReadOnly: true,
- isVirtual: true
- }, {
- name: "name",
- isAttr: true,
- type: "String"
- }, {
- name: "documentation",
- isAttr: true,
- type: "String"
- }, {
- name: "resolution",
- isAttr: true,
- type: "Real"
- }, {
- name: "ownedStyle",
- type: "Style",
- isReadOnly: true,
- isMany: true,
- isVirtual: true
- }]
- }, {
- name: "Shape",
- isAbstract: true,
- superClass: ["Node"],
- properties: [{
- name: "bounds",
- type: "dc:Bounds"
- }]
- }, {
- name: "Plane",
- isAbstract: true,
- superClass: ["Node"],
- properties: [{
- name: "planeElement",
- type: "DiagramElement",
- subsettedProperty: "DiagramElement-ownedElement",
- isMany: true
- }]
- }, {
- name: "LabeledEdge",
- isAbstract: true,
- superClass: ["Edge"],
- properties: [{
- name: "ownedLabel",
- type: "Label",
- isReadOnly: true,
- subsettedProperty: "DiagramElement-ownedElement",
- isMany: true,
- isVirtual: true
- }]
- }, {
- name: "LabeledShape",
- isAbstract: true,
- superClass: ["Shape"],
- properties: [{
- name: "ownedLabel",
- type: "Label",
- isReadOnly: true,
- subsettedProperty: "DiagramElement-ownedElement",
- isMany: true,
- isVirtual: true
- }]
- }, {
- name: "Label",
- isAbstract: true,
- superClass: ["Node"],
- properties: [{
- name: "bounds",
- type: "dc:Bounds"
- }]
- }, {
- name: "Style",
- isAbstract: true,
- properties: [{
- name: "id",
- isAttr: true,
- isId: true,
- type: "String"
- }]
- }, {
- name: "Extension",
- properties: [{
- name: "values",
- isMany: true,
- type: "Element"
- }]
- }];
- var associations$3 = [];
- var xml$1 = {
- tagAlias: "lowerCase"
- };
- var DiPackage = {
- name: name$3,
- uri: uri$3,
- prefix: prefix$3,
- types: types$3,
- associations: associations$3,
- xml: xml$1
- };
- var name$4 = "bpmn.io colors for BPMN";
- var uri$4 = "http://bpmn.io/schema/bpmn/biocolor/1.0";
- var prefix$4 = "bioc";
- var types$4 = [{
- name: "ColoredShape",
- "extends": ["bpmndi:BPMNShape"],
- properties: [{
- name: "stroke",
- isAttr: true,
- type: "String"
- }, {
- name: "fill",
- isAttr: true,
- type: "String"
- }]
- }, {
- name: "ColoredEdge",
- "extends": ["bpmndi:BPMNEdge"],
- properties: [{
- name: "stroke",
- isAttr: true,
- type: "String"
- }, {
- name: "fill",
- isAttr: true,
- type: "String"
- }]
- }];
- var enumerations$2 = [];
- var associations$4 = [];
- var BiocPackage = {
- name: name$4,
- uri: uri$4,
- prefix: prefix$4,
- types: types$4,
- enumerations: enumerations$2,
- associations: associations$4
- };
- var packages = {
- bpmn: BpmnPackage,
- bpmndi: BpmnDiPackage,
- dc: DcPackage,
- di: DiPackage,
- bioc: BiocPackage
- };
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ BENDPOINT_CLS: () => (/* binding */ BENDPOINT_CLS),
+/* harmony export */ SEGMENT_DRAGGER_CLS: () => (/* binding */ SEGMENT_DRAGGER_CLS),
+/* harmony export */ addBendpoint: () => (/* binding */ addBendpoint),
+/* harmony export */ addSegmentDragger: () => (/* binding */ addSegmentDragger),
+/* harmony export */ calculateSegmentMoveRegion: () => (/* binding */ calculateSegmentMoveRegion),
+/* harmony export */ getClosestPointOnConnection: () => (/* binding */ getClosestPointOnConnection),
+/* harmony export */ getConnectionIntersection: () => (/* binding */ getConnectionIntersection),
+/* harmony export */ toCanvasCoordinates: () => (/* binding */ toCanvasCoordinates)
+/* harmony export */ });
+/* harmony import */ var _util_Event__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/Event */ "../node_modules/diagram-js/lib/util/Event.js");
+/* harmony import */ var _util_Geometry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/Geometry */ "../node_modules/diagram-js/lib/util/Geometry.js");
+/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tiny-svg */ "../node_modules/tiny-svg/dist/index.esm.js");
+/* harmony import */ var _util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/SvgTransformUtil */ "../node_modules/diagram-js/lib/util/SvgTransformUtil.js");
+/* harmony import */ var _util_LineIntersection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/LineIntersection */ "../node_modules/diagram-js/lib/util/LineIntersection.js");
+/* harmony import */ var _GeometricUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./GeometricUtil */ "../node_modules/diagram-js/lib/features/bendpoints/GeometricUtil.js");
- function simple(additionalPackages, options) {
- var pks = (0, _minDash.assign)({}, packages, additionalPackages);
- return new BpmnModdle(pks, options);
- }
- var _default = simple;
- exports.default = _default;
- },{"min-dash":646,"moddle":650,"moddle-xml":649}],243:[function(require,module,exports){
- module.exports={
- "name": "Camunda",
- "uri": "http://camunda.org/schema/1.0/bpmn",
- "prefix": "camunda",
- "xml": {
- "tagAlias": "lowerCase"
- },
- "associations": [],
- "types": [
- {
- "name": "Definitions",
- "isAbstract": true,
- "extends": [
- "bpmn:Definitions"
- ],
- "properties": [
- {
- "name": "diagramRelationId",
- "isAttr": true,
- "type": "String"
- }
- ]
- },
- {
- "name": "InOutBinding",
- "superClass": [
- "Element"
- ],
- "isAbstract": true,
- "properties": [
- {
- "name": "source",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "sourceExpression",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "target",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "businessKey",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "local",
- "isAttr": true,
- "type": "Boolean",
- "default": false
- },
- {
- "name": "variables",
- "isAttr": true,
- "type": "String"
- }
- ]
- },
- {
- "name": "In",
- "superClass": [
- "InOutBinding"
- ],
- "meta": {
- "allowedIn": [
- "bpmn:CallActivity",
- "bpmn:SignalEventDefinition"
- ]
- }
- },
- {
- "name": "Out",
- "superClass": [
- "InOutBinding"
- ],
- "meta": {
- "allowedIn": [
- "bpmn:CallActivity"
- ]
- }
- },
- {
- "name": "AsyncCapable",
- "isAbstract": true,
- "extends": [
- "bpmn:Activity",
- "bpmn:Gateway",
- "bpmn:Event"
- ],
- "properties": [
- {
- "name": "async",
- "isAttr": true,
- "type": "Boolean",
- "default": false
- },
- {
- "name": "asyncBefore",
- "isAttr": true,
- "type": "Boolean",
- "default": false
- },
- {
- "name": "asyncAfter",
- "isAttr": true,
- "type": "Boolean",
- "default": false
- },
- {
- "name": "exclusive",
- "isAttr": true,
- "type": "Boolean",
- "default": true
- }
- ]
- },
- {
- "name": "JobPriorized",
- "isAbstract": true,
- "extends": [
- "bpmn:Process",
- "camunda:AsyncCapable"
- ],
- "properties": [
- {
- "name": "jobPriority",
- "isAttr": true,
- "type": "String"
- }
- ]
- },
- {
- "name": "SignalEventDefinition",
- "isAbstract": true,
- "extends": [
- "bpmn:SignalEventDefinition"
- ],
- "properties": [
- {
- "name": "async",
- "isAttr": true,
- "type": "Boolean",
- "default": false
- }
- ]
- },
- {
- "name": "ErrorEventDefinition",
- "isAbstract": true,
- "extends": [
- "bpmn:ErrorEventDefinition"
- ],
- "properties": [
- {
- "name": "errorCodeVariable",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "errorMessageVariable",
- "isAttr": true,
- "type": "String"
- }
- ]
- },
- {
- "name": "Error",
- "isAbstract": true,
- "extends": [
- "bpmn:Error"
- ],
- "properties": [
- {
- "name": "camunda:errorMessage",
- "isAttr": true,
- "type": "String"
- }
- ]
- },
- {
- "name": "PotentialStarter",
- "superClass": [
- "Element"
- ],
- "properties": [
- {
- "name": "resourceAssignmentExpression",
- "type": "bpmn:ResourceAssignmentExpression"
- }
- ]
- },
- {
- "name": "FormSupported",
- "isAbstract": true,
- "extends": [
- "bpmn:StartEvent",
- "bpmn:UserTask"
- ],
- "properties": [
- {
- "name": "formHandlerClass",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "formKey",
- "isAttr": true,
- "type": "String"
- }
- ]
- },
- {
- "name": "TemplateSupported",
- "isAbstract": true,
- "extends": [
- "bpmn:Process",
- "bpmn:FlowElement"
- ],
- "properties": [
- {
- "name": "modelerTemplate",
- "isAttr": true,
- "type": "String"
- }
- ]
- },
- {
- "name": "Initiator",
- "isAbstract": true,
- "extends": [ "bpmn:StartEvent" ],
- "properties": [
- {
- "name": "initiator",
- "isAttr": true,
- "type": "String"
- }
- ]
- },
- {
- "name": "ScriptTask",
- "isAbstract": true,
- "extends": [
- "bpmn:ScriptTask"
- ],
- "properties": [
- {
- "name": "resultVariable",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "resource",
- "isAttr": true,
- "type": "String"
- }
- ]
- },
- {
- "name": "Process",
- "isAbstract": true,
- "extends": [
- "bpmn:Process"
- ],
- "properties": [
- {
- "name": "candidateStarterGroups",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "candidateStarterUsers",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "versionTag",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "historyTimeToLive",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "isStartableInTasklist",
- "isAttr": true,
- "type": "Boolean",
- "default": true
- }
- ]
- },
- {
- "name": "EscalationEventDefinition",
- "isAbstract": true,
- "extends": [
- "bpmn:EscalationEventDefinition"
- ],
- "properties": [
- {
- "name": "escalationCodeVariable",
- "isAttr": true,
- "type": "String"
- }
- ]
- },
- {
- "name": "FormalExpression",
- "isAbstract": true,
- "extends": [
- "bpmn:FormalExpression"
- ],
- "properties": [
- {
- "name": "resource",
- "isAttr": true,
- "type": "String"
- }
- ]
- },
- {
- "name": "Assignable",
- "extends": [ "bpmn:UserTask" ],
- "properties": [
- {
- "name": "assignee",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "candidateUsers",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "candidateGroups",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "dueDate",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "followUpDate",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "priority",
- "isAttr": true,
- "type": "String"
- }
- ]
- },
- {
- "name": "CallActivity",
- "extends": [ "bpmn:CallActivity" ],
- "properties": [
- {
- "name": "calledElementBinding",
- "isAttr": true,
- "type": "String",
- "default": "latest"
- },
- {
- "name": "calledElementVersion",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "calledElementVersionTag",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "calledElementTenantId",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "caseRef",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "caseBinding",
- "isAttr": true,
- "type": "String",
- "default": "latest"
- },
- {
- "name": "caseVersion",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "caseTenantId",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "variableMappingClass",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "variableMappingDelegateExpression",
- "isAttr": true,
- "type": "String"
- }
- ]
- },
- {
- "name": "ServiceTaskLike",
- "extends": [
- "bpmn:ServiceTask",
- "bpmn:BusinessRuleTask",
- "bpmn:SendTask",
- "bpmn:MessageEventDefinition"
- ],
- "properties": [
- {
- "name": "expression",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "class",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "delegateExpression",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "resultVariable",
- "isAttr": true,
- "type": "String"
- }
- ]
- },
- {
- "name": "DmnCapable",
- "extends": [
- "bpmn:BusinessRuleTask"
- ],
- "properties": [
- {
- "name": "decisionRef",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "decisionRefBinding",
- "isAttr": true,
- "type": "String",
- "default": "latest"
- },
- {
- "name": "decisionRefVersion",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "mapDecisionResult",
- "isAttr": true,
- "type": "String",
- "default": "resultList"
- },
- {
- "name": "decisionRefTenantId",
- "isAttr": true,
- "type": "String"
- }
- ]
- },
- {
- "name": "ExternalCapable",
- "extends": [
- "camunda:ServiceTaskLike"
- ],
- "properties": [
- {
- "name": "type",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "topic",
- "isAttr": true,
- "type": "String"
- }
- ]
- },
- {
- "name": "TaskPriorized",
- "extends": [
- "bpmn:Process",
- "camunda:ExternalCapable"
- ],
- "properties": [
- {
- "name": "taskPriority",
- "isAttr": true,
- "type": "String"
- }
- ]
- },
- {
- "name": "Properties",
- "superClass": [
- "Element"
- ],
- "meta": {
- "allowedIn": [ "*" ]
- },
- "properties": [
- {
- "name": "values",
- "type": "Property",
- "isMany": true
- }
- ]
- },
- {
- "name": "Property",
- "superClass": [
- "Element"
- ],
- "properties": [
- {
- "name": "id",
- "type": "String",
- "isAttr": true
- },
- {
- "name": "name",
- "type": "String",
- "isAttr": true
- },
- {
- "name": "value",
- "type": "String",
- "isAttr": true
- }
- ]
- },
- {
- "name": "Connector",
- "superClass": [
- "Element"
- ],
- "meta": {
- "allowedIn": [
- "camunda:ServiceTaskLike"
- ]
- },
- "properties": [
- {
- "name": "inputOutput",
- "type": "InputOutput"
- },
- {
- "name": "connectorId",
- "type": "String"
- }
- ]
- },
- {
- "name": "InputOutput",
- "superClass": [
- "Element"
- ],
- "meta": {
- "allowedIn": [
- "bpmn:FlowNode",
- "camunda:Connector"
- ]
- },
- "properties": [
- {
- "name": "inputOutput",
- "type": "InputOutput"
- },
- {
- "name": "connectorId",
- "type": "String"
- },
- {
- "name": "inputParameters",
- "isMany": true,
- "type": "InputParameter"
- },
- {
- "name": "outputParameters",
- "isMany": true,
- "type": "OutputParameter"
- }
- ]
- },
- {
- "name": "InputOutputParameter",
- "properties": [
- {
- "name": "name",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "value",
- "isBody": true,
- "type": "String"
- },
- {
- "name": "definition",
- "type": "InputOutputParameterDefinition"
- }
- ]
- },
- {
- "name": "InputOutputParameterDefinition",
- "isAbstract": true
- },
- {
- "name": "List",
- "superClass": [ "InputOutputParameterDefinition" ],
- "properties": [
- {
- "name": "items",
- "isMany": true,
- "type": "InputOutputParameterDefinition"
- }
- ]
- },
- {
- "name": "Map",
- "superClass": [ "InputOutputParameterDefinition" ],
- "properties": [
- {
- "name": "entries",
- "isMany": true,
- "type": "Entry"
- }
- ]
- },
- {
- "name": "Entry",
- "properties": [
- {
- "name": "key",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "value",
- "isBody": true,
- "type": "String"
- },
- {
- "name": "definition",
- "type": "InputOutputParameterDefinition"
- }
- ]
- },
- {
- "name": "Value",
- "superClass": [
- "InputOutputParameterDefinition"
- ],
- "properties": [
- {
- "name": "id",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "name",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "value",
- "isBody": true,
- "type": "String"
- }
- ]
- },
- {
- "name": "Script",
- "superClass": [ "InputOutputParameterDefinition" ],
- "properties": [
- {
- "name": "scriptFormat",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "resource",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "value",
- "isBody": true,
- "type": "String"
- }
- ]
- },
- {
- "name": "Field",
- "superClass": [ "Element" ],
- "meta": {
- "allowedIn": [
- "camunda:ServiceTaskLike",
- "camunda:ExecutionListener",
- "camunda:TaskListener"
- ]
- },
- "properties": [
- {
- "name": "name",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "expression",
- "type": "String"
- },
- {
- "name": "stringValue",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "string",
- "type": "String"
- }
- ]
- },
- {
- "name": "InputParameter",
- "superClass": [ "InputOutputParameter" ]
- },
- {
- "name": "OutputParameter",
- "superClass": [ "InputOutputParameter" ]
- },
- {
- "name": "Collectable",
- "isAbstract": true,
- "extends": [ "bpmn:MultiInstanceLoopCharacteristics" ],
- "superClass": [ "camunda:AsyncCapable" ],
- "properties": [
- {
- "name": "collection",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "elementVariable",
- "isAttr": true,
- "type": "String"
- }
- ]
- },
- {
- "name": "FailedJobRetryTimeCycle",
- "superClass": [ "Element" ],
- "meta": {
- "allowedIn": [
- "camunda:AsyncCapable",
- "bpmn:MultiInstanceLoopCharacteristics"
- ]
- },
- "properties": [
- {
- "name": "body",
- "isBody": true,
- "type": "String"
- }
- ]
- },
- {
- "name": "ExecutionListener",
- "superClass": [ "Element" ],
- "meta": {
- "allowedIn": [
- "bpmn:Task",
- "bpmn:ServiceTask",
- "bpmn:UserTask",
- "bpmn:BusinessRuleTask",
- "bpmn:ScriptTask",
- "bpmn:ReceiveTask",
- "bpmn:ManualTask",
- "bpmn:ExclusiveGateway",
- "bpmn:SequenceFlow",
- "bpmn:ParallelGateway",
- "bpmn:InclusiveGateway",
- "bpmn:EventBasedGateway",
- "bpmn:StartEvent",
- "bpmn:IntermediateCatchEvent",
- "bpmn:IntermediateThrowEvent",
- "bpmn:EndEvent",
- "bpmn:BoundaryEvent",
- "bpmn:CallActivity",
- "bpmn:SubProcess",
- "bpmn:Process"
- ]
- },
- "properties": [
- {
- "name": "expression",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "class",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "delegateExpression",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "event",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "script",
- "type": "Script"
- },
- {
- "name": "fields",
- "type": "Field",
- "isMany": true
- }
- ]
- },
- {
- "name": "TaskListener",
- "superClass": [ "Element" ],
- "meta": {
- "allowedIn": [
- "bpmn:UserTask"
- ]
- },
- "properties": [
- {
- "name": "expression",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "class",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "delegateExpression",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "event",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "script",
- "type": "Script"
- },
- {
- "name": "fields",
- "type": "Field",
- "isMany": true
- },
- {
- "name": "id",
- "type": "String",
- "isAttr": true
- },
- {
- "name": "eventDefinitions",
- "type": "bpmn:TimerEventDefinition",
- "isMany": true
- }
- ]
- },
- {
- "name": "FormProperty",
- "superClass": [ "Element" ],
- "meta": {
- "allowedIn": [
- "bpmn:StartEvent",
- "bpmn:UserTask"
- ]
- },
- "properties": [
- {
- "name": "id",
- "type": "String",
- "isAttr": true
- },
- {
- "name": "name",
- "type": "String",
- "isAttr": true
- },
- {
- "name": "type",
- "type": "String",
- "isAttr": true
- },
- {
- "name": "required",
- "type": "String",
- "isAttr": true
- },
- {
- "name": "readable",
- "type": "String",
- "isAttr": true
- },
- {
- "name": "writable",
- "type": "String",
- "isAttr": true
- },
- {
- "name": "variable",
- "type": "String",
- "isAttr": true
- },
- {
- "name": "expression",
- "type": "String",
- "isAttr": true
- },
- {
- "name": "datePattern",
- "type": "String",
- "isAttr": true
- },
- {
- "name": "default",
- "type": "String",
- "isAttr": true
- },
- {
- "name": "values",
- "type": "Value",
- "isMany": true
- }
- ]
- },
- {
- "name": "FormData",
- "superClass": [ "Element" ],
- "meta": {
- "allowedIn": [
- "bpmn:StartEvent",
- "bpmn:UserTask"
- ]
- },
- "properties": [
- {
- "name": "fields",
- "type": "FormField",
- "isMany": true
- },
- {
- "name": "businessKey",
- "type": "String",
- "isAttr": true
- }
- ]
- },
- {
- "name": "FormField",
- "superClass": [ "Element" ],
- "properties": [
- {
- "name": "id",
- "type": "String",
- "isAttr": true
- },
- {
- "name": "label",
- "type": "String",
- "isAttr": true
- },
- {
- "name": "type",
- "type": "String",
- "isAttr": true
- },
- {
- "name": "datePattern",
- "type": "String",
- "isAttr": true
- },
- {
- "name": "defaultValue",
- "type": "String",
- "isAttr": true
- },
- {
- "name": "properties",
- "type": "Properties"
- },
- {
- "name": "validation",
- "type": "Validation"
- },
- {
- "name": "values",
- "type": "Value",
- "isMany": true
- }
- ]
- },
- {
- "name": "Validation",
- "superClass": [ "Element" ],
- "properties": [
- {
- "name": "constraints",
- "type": "Constraint",
- "isMany": true
- }
- ]
- },
- {
- "name": "Constraint",
- "superClass": [ "Element" ],
- "properties": [
- {
- "name": "name",
- "type": "String",
- "isAttr": true
- },
- {
- "name": "config",
- "type": "String",
- "isAttr": true
- }
- ]
- },
- {
- "name": "ConditionalEventDefinition",
- "isAbstract": true,
- "extends": [
- "bpmn:ConditionalEventDefinition"
- ],
- "properties": [
- {
- "name": "variableName",
- "isAttr": true,
- "type": "String"
- },
- {
- "name": "variableEvent",
- "isAttr": true,
- "type": "String"
- }
- ]
- }
- ],
- "emumerations": [ ]
- }
-
- },{}],244:[function(require,module,exports){
- (function (global){
- /*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
- ;(function(root, factory) {
- // https://github.com/umdjs/umd/blob/master/returnExports.js
- if (typeof exports == 'object') {
- // For Node.js.
- module.exports = factory(root);
- } else if (typeof define == 'function' && define.amd) {
- // For AMD. Register as an anonymous module.
- define([], factory.bind(root, root));
- } else {
- // For browser globals (not exposing the function separately).
- factory(root);
- }
- }(typeof global != 'undefined' ? global : this, function(root) {
- if (root.CSS && root.CSS.escape) {
- return root.CSS.escape;
- }
- // https://drafts.csswg.org/cssom/#serialize-an-identifier
- var cssEscape = function(value) {
- if (arguments.length == 0) {
- throw new TypeError('`CSS.escape` requires an argument.');
- }
- var string = String(value);
- var length = string.length;
- var index = -1;
- var codeUnit;
- var result = '';
- var firstCodeUnit = string.charCodeAt(0);
- while (++index < length) {
- codeUnit = string.charCodeAt(index);
- // Note: there’s no need to special-case astral symbols, surrogate
- // pairs, or lone surrogates.
-
- // If the character is NULL (U+0000), then the REPLACEMENT CHARACTER
- // (U+FFFD).
- if (codeUnit == 0x0000) {
- result += '\uFFFD';
- continue;
- }
- if (
- // If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
- // U+007F, […]
- (codeUnit >= 0x0001 && codeUnit <= 0x001F) || codeUnit == 0x007F ||
- // If the character is the first character and is in the range [0-9]
- // (U+0030 to U+0039), […]
- (index == 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039) ||
- // If the character is the second character and is in the range [0-9]
- // (U+0030 to U+0039) and the first character is a `-` (U+002D), […]
- (
- index == 1 &&
- codeUnit >= 0x0030 && codeUnit <= 0x0039 &&
- firstCodeUnit == 0x002D
- )
- ) {
- // https://drafts.csswg.org/cssom/#escape-a-character-as-code-point
- result += '\\' + codeUnit.toString(16) + ' ';
- continue;
- }
- if (
- // If the character is the first character and is a `-` (U+002D), and
- // there is no second character, […]
- index == 0 &&
- length == 1 &&
- codeUnit == 0x002D
- ) {
- result += '\\' + string.charAt(index);
- continue;
- }
- // If the character is not handled by one of the above rules and is
- // greater than or equal to U+0080, is `-` (U+002D) or `_` (U+005F), or
- // is in one of the ranges [0-9] (U+0030 to U+0039), [A-Z] (U+0041 to
- // U+005A), or [a-z] (U+0061 to U+007A), […]
- if (
- codeUnit >= 0x0080 ||
- codeUnit == 0x002D ||
- codeUnit == 0x005F ||
- codeUnit >= 0x0030 && codeUnit <= 0x0039 ||
- codeUnit >= 0x0041 && codeUnit <= 0x005A ||
- codeUnit >= 0x0061 && codeUnit <= 0x007A
- ) {
- // the character itself
- result += string.charAt(index);
- continue;
- }
- // Otherwise, the escaped character.
- // https://drafts.csswg.org/cssom/#escape-a-character
- result += '\\' + string.charAt(index);
- }
- return result;
- };
- if (!root.CSS) {
- root.CSS = {};
- }
- root.CSS.escape = cssEscape;
- return cssEscape;
+/**
+ * @typedef {import('../../core/Types').ConnectionLike} Connection
+ *
+ * @typedef {import('../../util/Types').Point} Point
+ */
- }));
+var BENDPOINT_CLS = 'djs-bendpoint';
+var SEGMENT_DRAGGER_CLS = 'djs-segment-dragger';
- }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+function toCanvasCoordinates(canvas, event) {
- },{}],245:[function(require,module,exports){
- "use strict";
+ var position = (0,_util_Event__WEBPACK_IMPORTED_MODULE_0__.toPoint)(event),
+ clientRect = canvas._container.getBoundingClientRect(),
+ offset;
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+ // canvas relative position
- var _interactionEvents = _interopRequireDefault(require("diagram-js/lib/features/interaction-events"));
+ offset = {
+ x: clientRect.left,
+ y: clientRect.top
+ };
- var _DirectEditing = _interopRequireDefault(require("./lib/DirectEditing"));
+ // update actual event payload with canvas relative measures
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ var viewbox = canvas.viewbox();
- var _default = {
- __depends__: [_interactionEvents.default],
- __init__: ['directEditing'],
- directEditing: ['type', _DirectEditing.default]
- };
- exports.default = _default;
+ return {
+ x: viewbox.x + (position.x - offset.x) / viewbox.scale,
+ y: viewbox.y + (position.y - offset.y) / viewbox.scale
+ };
+}
- },{"./lib/DirectEditing":246,"diagram-js/lib/features/interaction-events":316}],246:[function(require,module,exports){
- "use strict";
+function getConnectionIntersection(canvas, waypoints, event) {
+ var localPosition = toCanvasCoordinates(canvas, event),
+ intersection = (0,_util_LineIntersection__WEBPACK_IMPORTED_MODULE_1__.getApproxIntersection)(waypoints, localPosition);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = DirectEditing;
+ return intersection;
+}
- var _minDash = require("min-dash");
+function addBendpoint(parentGfx, cls) {
+ var groupGfx = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)('g');
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.classes)(groupGfx).add(BENDPOINT_CLS);
- var _TextBox = _interopRequireDefault(require("./TextBox"));
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.append)(parentGfx, groupGfx);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ var visual = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)('circle');
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(visual, {
+ cx: 0,
+ cy: 0,
+ r: 4
+ });
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.classes)(visual).add('djs-visual');
- /**
- * A direct editing component that allows users
- * to edit an elements text directly in the diagram
- *
- * @param {EventBus} eventBus the event bus
- */
- function DirectEditing(eventBus, canvas) {
- this._eventBus = eventBus;
- this._providers = [];
- this._textbox = new _TextBox.default({
- container: canvas.getContainer(),
- keyHandler: (0, _minDash.bind)(this._handleKey, this),
- resizeHandler: (0, _minDash.bind)(this._handleResize, this)
- });
- }
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.append)(groupGfx, visual);
- DirectEditing.$inject = ['eventBus', 'canvas'];
- /**
- * Register a direct editing provider
+ var hit = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)('circle');
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(hit, {
+ cx: 0,
+ cy: 0,
+ r: 10
+ });
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.classes)(hit).add('djs-hit');
- * @param {Object} provider the provider, must expose an #activate(element) method that returns
- * an activation context ({ bounds: {x, y, width, height }, text }) if
- * direct editing is available for the given element.
- * Additionally the provider must expose a #update(element, value) method
- * to receive direct editing updates.
- */
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.append)(groupGfx, hit);
- DirectEditing.prototype.registerProvider = function (provider) {
- this._providers.push(provider);
- };
- /**
- * Returns true if direct editing is currently active
- *
- * @return {Boolean}
- */
+ if (cls) {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.classes)(groupGfx).add(cls);
+ }
+ return groupGfx;
+}
- DirectEditing.prototype.isActive = function () {
- return !!this._active;
- };
- /**
- * Cancel direct editing, if it is currently active
- */
+function createParallelDragger(parentGfx, segmentStart, segmentEnd, alignment) {
+ var draggerGfx = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)('g');
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.append)(parentGfx, draggerGfx);
- DirectEditing.prototype.cancel = function () {
- if (!this._active) {
- return;
- }
+ var width = 18,
+ height = 6,
+ padding = 11,
+ hitWidth = calculateHitWidth(segmentStart, segmentEnd, alignment),
+ hitHeight = height + padding;
- this._fire('cancel');
+ var visual = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)('rect');
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(visual, {
+ x: -width / 2,
+ y: -height / 2,
+ width: width,
+ height: height
+ });
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.classes)(visual).add('djs-visual');
- this.close();
- };
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.append)(draggerGfx, visual);
- DirectEditing.prototype._fire = function (event, context) {
- this._eventBus.fire('directEditing.' + event, context || {
- active: this._active
- });
- };
+ var hit = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)('rect');
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(hit, {
+ x: -hitWidth / 2,
+ y: -hitHeight / 2,
+ width: hitWidth,
+ height: hitHeight
+ });
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.classes)(hit).add('djs-hit');
- DirectEditing.prototype.close = function () {
- this._textbox.destroy();
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.append)(draggerGfx, hit);
- this._fire('deactivate');
+ (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_3__.rotate)(draggerGfx, alignment === 'v' ? 90 : 0, 0, 0);
- this._active = null;
- this.resizable = undefined;
- };
+ return draggerGfx;
+}
- DirectEditing.prototype.complete = function () {
- var active = this._active;
- if (!active) {
- return;
- }
+function addSegmentDragger(parentGfx, segmentStart, segmentEnd) {
- var containerBounds,
- previousBounds = active.context.bounds,
- newBounds = this.$textbox.getBoundingClientRect(),
- newText = this.getValue(),
- previousText = active.context.text;
+ var groupGfx = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)('g'),
+ mid = (0,_util_Geometry__WEBPACK_IMPORTED_MODULE_4__.getMidPoint)(segmentStart, segmentEnd),
+ alignment = (0,_util_Geometry__WEBPACK_IMPORTED_MODULE_4__.pointsAligned)(segmentStart, segmentEnd);
- if (newText !== previousText || newBounds.height !== previousBounds.height || newBounds.width !== previousBounds.width) {
- containerBounds = this._textbox.container.getBoundingClientRect();
- active.provider.update(active.element, newText, active.context.text, {
- x: newBounds.left - containerBounds.left,
- y: newBounds.top - containerBounds.top,
- width: newBounds.width,
- height: newBounds.height
- });
- }
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.append)(parentGfx, groupGfx);
- this._fire('complete');
+ createParallelDragger(groupGfx, segmentStart, segmentEnd, alignment);
- this.close();
- };
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.classes)(groupGfx).add(SEGMENT_DRAGGER_CLS);
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.classes)(groupGfx).add(alignment === 'h' ? 'horizontal' : 'vertical');
- DirectEditing.prototype.getValue = function () {
- return this._textbox.getValue();
- };
+ (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_3__.translate)(groupGfx, mid.x, mid.y);
- DirectEditing.prototype._handleKey = function (e) {
- // stop bubble
- e.stopPropagation();
- var key = e.keyCode || e.charCode; // ESC
+ return groupGfx;
+}
- if (key === 27) {
- e.preventDefault();
- return this.cancel();
- } // Enter
+/**
+ * Calculates region for segment move which is 2/3 of the full segment length
+ * @param {number} segmentLength
+ *
+ * @return {number}
+ */
+function calculateSegmentMoveRegion(segmentLength) {
+ return Math.abs(Math.round(segmentLength * 2 / 3));
+}
+/**
+ * Returns the point with the closest distance that is on the connection path.
+ *
+ * @param {Point} position
+ * @param {Connection} connection
+ * @return {Point}
+ */
+function getClosestPointOnConnection(position, connection) {
+ var segment = getClosestSegment(position, connection);
- if (key === 13 && !e.shiftKey) {
- e.preventDefault();
- return this.complete();
- }
- };
+ return (0,_GeometricUtil__WEBPACK_IMPORTED_MODULE_5__.perpendicularFoot)(position, segment);
+}
- DirectEditing.prototype._handleResize = function (event) {
- this._fire('resize', event);
- };
- /**
- * Activate direct editing on the given element
- *
- * @param {Object} ElementDescriptor the descriptor for a shape or connection
- * @return {Boolean} true if the activation was possible
- */
+// helper //////////
- DirectEditing.prototype.activate = function (element) {
- if (this.isActive()) {
- this.cancel();
- } // the direct editing context
+function calculateHitWidth(segmentStart, segmentEnd, alignment) {
+ var segmentLengthXAxis = segmentEnd.x - segmentStart.x,
+ segmentLengthYAxis = segmentEnd.y - segmentStart.y;
+ return alignment === 'h' ?
+ calculateSegmentMoveRegion(segmentLengthXAxis) :
+ calculateSegmentMoveRegion(segmentLengthYAxis);
+}
- var context;
- var provider = (0, _minDash.find)(this._providers, function (p) {
- return (context = p.activate(element)) ? p : null;
- }); // check if activation took place
+function getClosestSegment(position, connection) {
+ var waypoints = connection.waypoints;
- if (context) {
- this.$textbox = this._textbox.create(context.bounds, context.style, context.text, context.options);
- this._active = {
- element: element,
- context: context,
- provider: provider
- };
+ var minDistance = Infinity,
+ segmentIndex;
- if (context.options && context.options.resizable) {
- this.resizable = true;
- }
+ for (var i = 0; i < waypoints.length - 1; i++) {
+ var start = waypoints[i],
+ end = waypoints[i + 1],
+ distance = (0,_GeometricUtil__WEBPACK_IMPORTED_MODULE_5__.getDistancePointLine)(position, [ start, end ]);
- this._fire('activate');
- }
-
- return !!context;
- };
+ if (distance < minDistance) {
+ minDistance = distance;
+ segmentIndex = i;
+ }
+ }
- },{"./TextBox":247,"min-dash":646}],247:[function(require,module,exports){
- "use strict";
+ return [ waypoints[segmentIndex], waypoints[segmentIndex + 1] ];
+}
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = TextBox;
+/***/ }),
- var _minDash = require("min-dash");
+/***/ "../node_modules/diagram-js/lib/features/bendpoints/Bendpoints.js":
+/*!************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/bendpoints/Bendpoints.js ***!
+ \************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var _minDom = require("min-dom");
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ Bendpoints)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dom */ "../node_modules/min-dom/dist/index.esm.js");
+/* harmony import */ var _BendpointUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BendpointUtil */ "../node_modules/diagram-js/lib/features/bendpoints/BendpointUtil.js");
+/* harmony import */ var _util_EscapeUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/EscapeUtil */ "../node_modules/diagram-js/lib/util/EscapeUtil.js");
+/* harmony import */ var _util_Geometry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/Geometry */ "../node_modules/diagram-js/lib/util/Geometry.js");
+/* harmony import */ var _util_Mouse__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../util/Mouse */ "../node_modules/diagram-js/lib/util/Mouse.js");
+/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tiny-svg */ "../node_modules/tiny-svg/dist/index.esm.js");
+/* harmony import */ var _util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../util/SvgTransformUtil */ "../node_modules/diagram-js/lib/util/SvgTransformUtil.js");
- var min = Math.min,
- max = Math.max;
- function preventDefault(e) {
- e.preventDefault();
- }
- function stopPropagation(e) {
- e.stopPropagation();
- }
- function isTextNode(node) {
- return node.nodeType === Node.TEXT_NODE;
- }
- function toArray(nodeList) {
- return [].slice.call(nodeList);
- }
- /**
- * Initializes a container for a content editable div.
- *
- * Structure:
- *
- * container
- * parent
- * content
- * resize-handle
- *
- * @param {object} options
- * @param {DOMElement} options.container The DOM element to append the contentContainer to
- * @param {Function} options.keyHandler Handler for key events
- * @param {Function} options.resizeHandler Handler for resize events
- */
- function TextBox(options) {
- this.container = options.container;
- this.parent = (0, _minDom.domify)('');
- this.content = (0, _minDom.query)('[contenteditable]', this.parent);
- this.keyHandler = options.keyHandler || function () {};
- this.resizeHandler = options.resizeHandler || function () {};
- this.autoResize = (0, _minDash.bind)(this.autoResize, this);
- this.handlePaste = (0, _minDash.bind)(this.handlePaste, this);
- }
- /**
- * Create a text box with the given position, size, style and text content
- *
- * @param {Object} bounds
- * @param {Number} bounds.x absolute x position
- * @param {Number} bounds.y absolute y position
- * @param {Number} [bounds.width] fixed width value
- * @param {Number} [bounds.height] fixed height value
- * @param {Number} [bounds.maxWidth] maximum width value
- * @param {Number} [bounds.maxHeight] maximum height value
- * @param {Number} [bounds.minWidth] minimum width value
- * @param {Number} [bounds.minHeight] minimum height value
- * @param {Object} [style]
- * @param {String} value text content
- *
- * @return {DOMElement} The created content DOM element
- */
- TextBox.prototype.create = function (bounds, style, value, options) {
- var self = this;
- var parent = this.parent,
- content = this.content,
- container = this.container;
- options = this.options = options || {};
- style = this.style = style || {};
- var parentStyle = (0, _minDash.pick)(style, ['width', 'height', 'maxWidth', 'maxHeight', 'minWidth', 'minHeight', 'left', 'top', 'backgroundColor', 'position', 'overflow', 'border', 'wordWrap', 'textAlign', 'outline', 'transform']);
- (0, _minDash.assign)(parent.style, {
- width: bounds.width + 'px',
- height: bounds.height + 'px',
- maxWidth: bounds.maxWidth + 'px',
- maxHeight: bounds.maxHeight + 'px',
- minWidth: bounds.minWidth + 'px',
- minHeight: bounds.minHeight + 'px',
- left: bounds.x + 'px',
- top: bounds.y + 'px',
- backgroundColor: '#ffffff',
- position: 'absolute',
- overflow: 'visible',
- border: '1px solid #ccc',
- boxSizing: 'border-box',
- wordWrap: 'normal',
- textAlign: 'center',
- outline: 'none'
- }, parentStyle);
- var contentStyle = (0, _minDash.pick)(style, ['fontFamily', 'fontSize', 'fontWeight', 'lineHeight', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft']);
- (0, _minDash.assign)(content.style, {
- boxSizing: 'border-box',
- width: '100%',
- outline: 'none',
- wordWrap: 'break-word'
- }, contentStyle);
-
- if (options.centerVertically) {
- (0, _minDash.assign)(content.style, {
- position: 'absolute',
- top: '50%',
- transform: 'translate(0, -50%)'
- }, contentStyle);
- }
-
- content.innerText = value;
-
- _minDom.event.bind(content, 'keydown', this.keyHandler);
-
- _minDom.event.bind(content, 'mousedown', stopPropagation);
-
- _minDom.event.bind(content, 'paste', self.handlePaste);
-
- if (options.autoResize) {
- _minDom.event.bind(content, 'input', this.autoResize);
- }
-
- if (options.resizable) {
- this.resizable(style);
- }
-
- container.appendChild(parent); // set selection to end of text
-
- this.setSelection(content.lastChild, content.lastChild && content.lastChild.length);
- return parent;
- };
- /**
- * Intercept paste events to remove formatting from pasted text.
- */
- TextBox.prototype.handlePaste = function (e) {
- var options = this.options,
- style = this.style;
- e.preventDefault();
- var text;
- if (e.clipboardData) {
- // Chrome, Firefox, Safari
- text = e.clipboardData.getData('text/plain');
- } else {
- // Internet Explorer
- text = window.clipboardData.getData('Text');
- }
- this.insertText(text);
+/**
+ * @typedef {import('../bendpoints/BendpointMove').default} BendpointMove
+ * @typedef {import('../../core/Canvas').default} Canvas
+ * @typedef {import('../bendpoints/ConnectionSegmentMove').default} ConnectionSegmentMove
+ * @typedef {import('../../core/EventBus').default} EventBus
+ * @typedef {import('../interaction-events/InteractionEvents').default} InteractionEvents
+ */
- if (options.autoResize) {
- var hasResized = this.autoResize(style);
+/**
+ * A service that adds editable bendpoints to connections.
+ *
+ * @param {EventBus} eventBus
+ * @param {Canvas} canvas
+ * @param {InteractionEvents} interactionEvents
+ * @param {BendpointMove} bendpointMove
+ * @param {ConnectionSegmentMove} connectionSegmentMove
+ */
+function Bendpoints(
+ eventBus, canvas, interactionEvents,
+ bendpointMove, connectionSegmentMove) {
- if (hasResized) {
- this.resizeHandler(hasResized);
- }
- }
- };
+ /**
+ * Returns true if intersection point is inside middle region of segment, adjusted by
+ * optional threshold
+ */
+ function isIntersectionMiddle(intersection, waypoints, treshold) {
+ var idx = intersection.index,
+ p = intersection.point,
+ p0, p1, mid, aligned, xDelta, yDelta;
+
+ if (idx <= 0 || intersection.bendpoint) {
+ return false;
+ }
+
+ p0 = waypoints[idx - 1];
+ p1 = waypoints[idx];
+ mid = (0,_util_Geometry__WEBPACK_IMPORTED_MODULE_0__.getMidPoint)(p0, p1),
+ aligned = (0,_util_Geometry__WEBPACK_IMPORTED_MODULE_0__.pointsAligned)(p0, p1);
+ xDelta = Math.abs(p.x - mid.x);
+ yDelta = Math.abs(p.y - mid.y);
+
+ return aligned && xDelta <= treshold && yDelta <= treshold;
+ }
+
+ /**
+ * Calculates the threshold from a connection's middle which fits the two-third-region
+ */
+ function calculateIntersectionThreshold(connection, intersection) {
+ var waypoints = connection.waypoints,
+ relevantSegment, alignment, segmentLength, threshold;
- TextBox.prototype.insertText = function (text) {
- // insertText command not supported by Internet Explorer
- var success = document.execCommand('insertText', false, text);
+ if (intersection.index <= 0 || intersection.bendpoint) {
+ return null;
+ }
- if (success) {
- return;
- }
+ // segment relative to connection intersection
+ relevantSegment = {
+ start: waypoints[intersection.index - 1],
+ end: waypoints[intersection.index]
+ };
- this._insertTextIE(text);
- };
+ alignment = (0,_util_Geometry__WEBPACK_IMPORTED_MODULE_0__.pointsAligned)(relevantSegment.start, relevantSegment.end);
- TextBox.prototype._insertTextIE = function (text) {
- // Internet Explorer
- var range = this.getSelection(),
- startContainer = range.startContainer,
- endContainer = range.endContainer,
- startOffset = range.startOffset,
- endOffset = range.endOffset,
- commonAncestorContainer = range.commonAncestorContainer;
- var childNodesArray = toArray(commonAncestorContainer.childNodes);
- var container, offset;
-
- if (isTextNode(commonAncestorContainer)) {
- var containerTextContent = startContainer.textContent;
- startContainer.textContent = containerTextContent.substring(0, startOffset) + text + containerTextContent.substring(endOffset);
- container = startContainer;
- offset = startOffset + text.length;
- } else if (startContainer === this.content && endContainer === this.content) {
- var textNode = document.createTextNode(text);
- this.content.insertBefore(textNode, childNodesArray[startOffset]);
- container = textNode;
- offset = textNode.textContent.length;
- } else {
- var startContainerChildIndex = childNodesArray.indexOf(startContainer),
- endContainerChildIndex = childNodesArray.indexOf(endContainer);
- childNodesArray.forEach(function (childNode, index) {
- if (index === startContainerChildIndex) {
- childNode.textContent = startContainer.textContent.substring(0, startOffset) + text + endContainer.textContent.substring(endOffset);
- } else if (index > startContainerChildIndex && index <= endContainerChildIndex) {
- (0, _minDom.remove)(childNode);
- }
- });
- container = startContainer;
- offset = startOffset + text.length;
- }
+ if (!alignment) {
+ return null;
+ }
- if (container && offset !== undefined) {
- // is necessary in Internet Explorer
- setTimeout(function () {
- self.setSelection(container, offset);
- });
- }
- };
- /**
- * Automatically resize element vertically to fit its content.
- */
+ if (alignment === 'h') {
+ segmentLength = relevantSegment.end.x - relevantSegment.start.x;
+ } else {
+ segmentLength = relevantSegment.end.y - relevantSegment.start.y;
+ }
+ // calculate threshold relative to 2/3 of segment length
+ threshold = (0,_BendpointUtil__WEBPACK_IMPORTED_MODULE_1__.calculateSegmentMoveRegion)(segmentLength) / 2;
- TextBox.prototype.autoResize = function () {
- var parent = this.parent,
- content = this.content;
- var fontSize = parseInt(this.style.fontSize) || 12;
-
- if (content.scrollHeight > parent.offsetHeight || content.scrollHeight < parent.offsetHeight - fontSize) {
- var bounds = parent.getBoundingClientRect();
- var height = content.scrollHeight;
- parent.style.height = height + 'px';
- this.resizeHandler({
- width: bounds.width,
- height: bounds.height,
- dx: 0,
- dy: height - bounds.height
- });
- }
- };
- /**
- * Make an element resizable by adding a resize handle.
- */
+ return threshold;
+ }
+ function activateBendpointMove(event, connection) {
+ var waypoints = connection.waypoints,
+ intersection = (0,_BendpointUtil__WEBPACK_IMPORTED_MODULE_1__.getConnectionIntersection)(canvas, waypoints, event),
+ threshold;
- TextBox.prototype.resizable = function () {
- var self = this;
- var parent = this.parent,
- resizeHandle = this.resizeHandle;
- var minWidth = parseInt(this.style.minWidth) || 0,
- minHeight = parseInt(this.style.minHeight) || 0,
- maxWidth = parseInt(this.style.maxWidth) || Infinity,
- maxHeight = parseInt(this.style.maxHeight) || Infinity;
+ if (!intersection) {
+ return;
+ }
- if (!resizeHandle) {
- resizeHandle = this.resizeHandle = (0, _minDom.domify)('
');
- var startX, startY, startWidth, startHeight;
+ threshold = calculateIntersectionThreshold(connection, intersection);
- var onMouseDown = function (e) {
- preventDefault(e);
- stopPropagation(e);
- startX = e.clientX;
- startY = e.clientY;
- var bounds = parent.getBoundingClientRect();
- startWidth = bounds.width;
- startHeight = bounds.height;
+ if (isIntersectionMiddle(intersection, waypoints, threshold)) {
+ connectionSegmentMove.start(event, connection, intersection.index);
+ } else {
+ bendpointMove.start(event, connection, intersection.index, !intersection.bendpoint);
+ }
- _minDom.event.bind(document, 'mousemove', onMouseMove);
+ // we've handled the event
+ return true;
+ }
- _minDom.event.bind(document, 'mouseup', onMouseUp);
- };
+ function bindInteractionEvents(node, eventName, element) {
- var onMouseMove = function (e) {
- preventDefault(e);
- stopPropagation(e);
- var newWidth = min(max(startWidth + e.clientX - startX, minWidth), maxWidth);
- var newHeight = min(max(startHeight + e.clientY - startY, minHeight), maxHeight);
- parent.style.width = newWidth + 'px';
- parent.style.height = newHeight + 'px';
- self.resizeHandler({
- width: startWidth,
- height: startHeight,
- dx: e.clientX - startX,
- dy: e.clientY - startY
- });
- };
+ min_dom__WEBPACK_IMPORTED_MODULE_2__.event.bind(node, eventName, function(event) {
+ interactionEvents.triggerMouseEvent(eventName, event, element);
+ event.stopPropagation();
+ });
+ }
- var onMouseUp = function (e) {
- preventDefault(e);
- stopPropagation(e);
+ function getBendpointsContainer(element, create) {
- _minDom.event.unbind(document, 'mousemove', onMouseMove, false);
+ var layer = canvas.getLayer('overlays'),
+ gfx = (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.query)('.djs-bendpoints[data-element-id="' + (0,_util_EscapeUtil__WEBPACK_IMPORTED_MODULE_3__.escapeCSS)(element.id) + '"]', layer);
- _minDom.event.unbind(document, 'mouseup', onMouseUp, false);
- };
+ if (!gfx && create) {
+ gfx = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.create)('g');
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(gfx, { 'data-element-id': element.id });
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.classes)(gfx).add('djs-bendpoints');
- _minDom.event.bind(resizeHandle, 'mousedown', onMouseDown);
- }
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.append)(layer, gfx);
- (0, _minDash.assign)(resizeHandle.style, {
- position: 'absolute',
- bottom: '0px',
- right: '0px',
- cursor: 'nwse-resize',
- width: '0',
- height: '0',
- borderTop: (parseInt(this.style.fontSize) / 4 || 3) + 'px solid transparent',
- borderRight: (parseInt(this.style.fontSize) / 4 || 3) + 'px solid #ccc',
- borderBottom: (parseInt(this.style.fontSize) / 4 || 3) + 'px solid #ccc',
- borderLeft: (parseInt(this.style.fontSize) / 4 || 3) + 'px solid transparent'
- });
- parent.appendChild(resizeHandle);
- };
- /**
- * Clear content and style of the textbox, unbind listeners and
- * reset CSS style.
- */
+ bindInteractionEvents(gfx, 'mousedown', element);
+ bindInteractionEvents(gfx, 'click', element);
+ bindInteractionEvents(gfx, 'dblclick', element);
+ }
+ return gfx;
+ }
- TextBox.prototype.destroy = function () {
- var parent = this.parent,
- content = this.content,
- resizeHandle = this.resizeHandle; // clear content
+ function getSegmentDragger(idx, parentGfx) {
+ return (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.query)(
+ '.djs-segment-dragger[data-segment-idx="' + idx + '"]',
+ parentGfx
+ );
+ }
- content.innerText = ''; // clear styles
+ function createBendpoints(gfx, connection) {
+ connection.waypoints.forEach(function(p, idx) {
+ var bendpoint = (0,_BendpointUtil__WEBPACK_IMPORTED_MODULE_1__.addBendpoint)(gfx);
- parent.removeAttribute('style');
- content.removeAttribute('style');
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.append)(gfx, bendpoint);
- _minDom.event.unbind(content, 'keydown', this.keyHandler);
+ (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_5__.translate)(bendpoint, p.x, p.y);
+ });
- _minDom.event.unbind(content, 'mousedown', stopPropagation);
+ // add floating bendpoint
+ (0,_BendpointUtil__WEBPACK_IMPORTED_MODULE_1__.addBendpoint)(gfx, 'floating');
+ }
- _minDom.event.unbind(content, 'input', this.autoResize);
+ function createSegmentDraggers(gfx, connection) {
- _minDom.event.unbind(content, 'paste', this.handlePaste);
+ var waypoints = connection.waypoints;
- if (resizeHandle) {
- resizeHandle.removeAttribute('style');
- (0, _minDom.remove)(resizeHandle);
- }
+ var segmentStart,
+ segmentEnd,
+ segmentDraggerGfx;
- (0, _minDom.remove)(parent);
- };
+ for (var i = 1; i < waypoints.length; i++) {
- TextBox.prototype.getValue = function () {
- return this.content.innerText.trim();
- };
+ segmentStart = waypoints[i - 1];
+ segmentEnd = waypoints[i];
- TextBox.prototype.getSelection = function () {
- var selection = window.getSelection(),
- range = selection.getRangeAt(0);
- return range;
- };
+ if ((0,_util_Geometry__WEBPACK_IMPORTED_MODULE_0__.pointsAligned)(segmentStart, segmentEnd)) {
+ segmentDraggerGfx = (0,_BendpointUtil__WEBPACK_IMPORTED_MODULE_1__.addSegmentDragger)(gfx, segmentStart, segmentEnd);
- TextBox.prototype.setSelection = function (container, offset) {
- var range = document.createRange();
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(segmentDraggerGfx, { 'data-segment-idx': i });
- if (container === null) {
- range.selectNodeContents(this.content);
- } else {
- range.setStart(container, offset);
- range.setEnd(container, offset);
- }
+ bindInteractionEvents(segmentDraggerGfx, 'mousemove', connection);
+ }
+ }
+ }
- var selection = window.getSelection();
- selection.removeAllRanges();
- selection.addRange(range);
- };
+ function clearBendpoints(gfx) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_6__.forEach)((0,min_dom__WEBPACK_IMPORTED_MODULE_2__.queryAll)('.' + _BendpointUtil__WEBPACK_IMPORTED_MODULE_1__.BENDPOINT_CLS, gfx), function(node) {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.remove)(node);
+ });
+ }
- },{"min-dash":646,"min-dom":647}],248:[function(require,module,exports){
- "use strict";
+ function clearSegmentDraggers(gfx) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_6__.forEach)((0,min_dom__WEBPACK_IMPORTED_MODULE_2__.queryAll)('.' + _BendpointUtil__WEBPACK_IMPORTED_MODULE_1__.SEGMENT_DRAGGER_CLS, gfx), function(node) {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.remove)(node);
+ });
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- Object.defineProperty(exports, "default", {
- enumerable: true,
- get: function () {
- return _Diagram.default;
- }
- });
+ function addHandles(connection) {
- var _Diagram = _interopRequireDefault(require("./lib/Diagram"));
+ var gfx = getBendpointsContainer(connection);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ if (!gfx) {
+ gfx = getBendpointsContainer(connection, true);
- },{"./lib/Diagram":249}],249:[function(require,module,exports){
- "use strict";
+ createBendpoints(gfx, connection);
+ createSegmentDraggers(gfx, connection);
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = Diagram;
+ return gfx;
+ }
- var _didi = require("didi");
+ function updateHandles(connection) {
- var _core = _interopRequireDefault(require("./core"));
+ var gfx = getBendpointsContainer(connection);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ if (gfx) {
+ clearSegmentDraggers(gfx);
+ clearBendpoints(gfx);
+ createSegmentDraggers(gfx, connection);
+ createBendpoints(gfx, connection);
+ }
+ }
- /**
- * Bootstrap an injector from a list of modules, instantiating a number of default components
- *
- * @ignore
- * @param {Array} bootstrapModules
- *
- * @return {didi.Injector} a injector to use to access the components
- */
- function bootstrap(bootstrapModules) {
- var modules = [],
- components = [];
+ function updateFloatingBendpointPosition(parentGfx, intersection) {
+ var floating = (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.query)('.floating', parentGfx),
+ point = intersection.point;
- function hasModule(m) {
- return modules.indexOf(m) >= 0;
- }
+ if (!floating) {
+ return;
+ }
- function addModule(m) {
- modules.push(m);
- }
+ (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_5__.translate)(floating, point.x, point.y);
- function visit(m) {
- if (hasModule(m)) {
- return;
- }
+ }
- (m.__depends__ || []).forEach(visit);
+ function updateSegmentDraggerPosition(parentGfx, intersection, waypoints) {
- if (hasModule(m)) {
- return;
- }
+ var draggerGfx = getSegmentDragger(intersection.index, parentGfx),
+ segmentStart = waypoints[intersection.index - 1],
+ segmentEnd = waypoints[intersection.index],
+ point = intersection.point,
+ mid = (0,_util_Geometry__WEBPACK_IMPORTED_MODULE_0__.getMidPoint)(segmentStart, segmentEnd),
+ alignment = (0,_util_Geometry__WEBPACK_IMPORTED_MODULE_0__.pointsAligned)(segmentStart, segmentEnd),
+ draggerVisual, relativePosition;
- addModule(m);
- (m.__init__ || []).forEach(function (c) {
- components.push(c);
- });
- }
+ if (!draggerGfx) {
+ return;
+ }
- bootstrapModules.forEach(visit);
- var injector = new _didi.Injector(modules);
- components.forEach(function (c) {
- try {
- // eagerly resolve component (fn or string)
- injector[typeof c === 'string' ? 'get' : 'invoke'](c);
- } catch (e) {
- console.error('Failed to instantiate component');
- console.error(e.stack);
- throw e;
- }
- });
- return injector;
- }
- /**
- * Creates an injector from passed options.
- *
- * @ignore
- * @param {Object} options
- * @return {didi.Injector}
- */
+ draggerVisual = getDraggerVisual(draggerGfx);
+ relativePosition = {
+ x: point.x - mid.x,
+ y: point.y - mid.y
+ };
- function createInjector(options) {
- options = options || {};
- var configModule = {
- 'config': ['value', options]
- };
- var modules = [configModule, _core.default].concat(options.modules || []);
- return bootstrap(modules);
- }
- /**
- * The main diagram-js entry point that bootstraps the diagram with the given
- * configuration.
- *
- * To register extensions with the diagram, pass them as Array to the constructor.
- *
- * @class djs.Diagram
- * @memberOf djs
- * @constructor
- *
- * @example
- *
- * Creating a plug-in that logs whenever a shape is added to the canvas.
- *
- * // plug-in implemenentation
- * function MyLoggingPlugin(eventBus) {
- * eventBus.on('shape.added', function(event) {
- * console.log('shape ', event.shape, ' was added to the diagram');
- * });
- * }
- *
- * // export as module
- * export default {
- * __init__: [ 'myLoggingPlugin' ],
- * myLoggingPlugin: [ 'type', MyLoggingPlugin ]
- * };
- *
- *
- * // instantiate the diagram with the new plug-in
- *
- * import MyLoggingModule from 'path-to-my-logging-plugin';
- *
- * var diagram = new Diagram({
- * modules: [
- * MyLoggingModule
- * ]
- * });
- *
- * diagram.invoke([ 'canvas', function(canvas) {
- * // add shape to drawing canvas
- * canvas.addShape({ x: 10, y: 10 });
- * });
- *
- * // 'shape ... was added to the diagram' logged to console
- *
- * @param {Object} options
- * @param {Array} [options.modules] external modules to instantiate with the diagram
- * @param {didi.Injector} [injector] an (optional) injector to bootstrap the diagram with
- */
+ if (alignment === 'v') {
+ // rotate position
+ relativePosition = {
+ x: relativePosition.y,
+ y: relativePosition.x
+ };
+ }
- function Diagram(options, injector) {
- // create injector unless explicitly specified
- this.injector = injector = injector || createInjector(options); // API
-
- /**
- * Resolves a diagram service
- *
- * @method Diagram#get
- *
- * @param {string} name the name of the diagram service to be retrieved
- * @param {boolean} [strict=true] if false, resolve missing services to null
- */
-
- this.get = injector.get;
- /**
- * Executes a function into which diagram services are injected
- *
- * @method Diagram#invoke
- *
- * @param {Function|Object[]} fn the function to resolve
- * @param {Object} locals a number of locals to use to resolve certain dependencies
- */
-
- this.invoke = injector.invoke; // init
- // indicate via event
-
- /**
- * An event indicating that all plug-ins are loaded.
- *
- * Use this event to fire other events to interested plug-ins
- *
- * @memberOf Diagram
- *
- * @event diagram.init
- *
- * @example
- *
- * eventBus.on('diagram.init', function() {
- * eventBus.fire('my-custom-event', { foo: 'BAR' });
- * });
- *
- * @type {Object}
- */
-
- this.get('eventBus').fire('diagram.init');
- }
- /**
- * Destroys the diagram
- *
- * @method Diagram#destroy
- */
+ (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_5__.translate)(draggerVisual, relativePosition.x, relativePosition.y);
+ }
+ eventBus.on('connection.changed', function(event) {
+ updateHandles(event.element);
+ });
- Diagram.prototype.destroy = function () {
- this.get('eventBus').fire('diagram.destroy');
- };
- /**
- * Clear the diagram, removing all contents.
- */
+ eventBus.on('connection.remove', function(event) {
+ var gfx = getBendpointsContainer(event.element);
+ if (gfx) {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.remove)(gfx);
+ }
+ });
- Diagram.prototype.clear = function () {
- this.get('eventBus').fire('diagram.clear');
- };
+ eventBus.on('element.marker.update', function(event) {
- },{"./core":258,"didi":435}],250:[function(require,module,exports){
- "use strict";
+ var element = event.element,
+ bendpointsGfx;
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = CommandInterceptor;
+ if (!element.waypoints) {
+ return;
+ }
- var _minDash = require("min-dash");
+ bendpointsGfx = addHandles(element);
- var DEFAULT_PRIORITY = 1000;
- /**
- * A utility that can be used to plug-in into the command execution for
- * extension and/or validation.
- *
- * @param {EventBus} eventBus
- *
- * @example
- *
- * import inherits from 'inherits';
- *
- * import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
- *
- * function CommandLogger(eventBus) {
- * CommandInterceptor.call(this, eventBus);
- *
- * this.preExecute(function(event) {
- * console.log('command pre-execute', event);
- * });
- * }
- *
- * inherits(CommandLogger, CommandInterceptor);
- *
- */
+ if (event.add) {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.classes)(bendpointsGfx).add(event.marker);
+ } else {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.classes)(bendpointsGfx).remove(event.marker);
+ }
+ });
- function CommandInterceptor(eventBus) {
- this._eventBus = eventBus;
- }
+ eventBus.on('element.mousemove', function(event) {
- CommandInterceptor.$inject = ['eventBus'];
+ var element = event.element,
+ waypoints = element.waypoints,
+ bendpointsGfx,
+ intersection;
- function unwrapEvent(fn, that) {
- return function (event) {
- return fn.call(that || null, event.context, event.command, event);
- };
- }
- /**
- * Register an interceptor for a command execution
- *
- * @param {string|Array} [events] list of commands to register on
- * @param {string} [hook] command hook, i.e. preExecute, executed to listen on
- * @param {number} [priority] the priority on which to hook into the execution
- * @param {Function} handlerFn interceptor to be invoked with (event)
- * @param {boolean} unwrap if true, unwrap the event and pass (context, command, event) to the
- * listener instead
- * @param {Object} [that] Pass context (`this`) to the handler function
- */
+ if (waypoints) {
+ bendpointsGfx = getBendpointsContainer(element, true);
+ intersection = (0,_BendpointUtil__WEBPACK_IMPORTED_MODULE_1__.getConnectionIntersection)(canvas, waypoints, event.originalEvent);
- CommandInterceptor.prototype.on = function (events, hook, priority, handlerFn, unwrap, that) {
- if ((0, _minDash.isFunction)(hook) || (0, _minDash.isNumber)(hook)) {
- that = unwrap;
- unwrap = handlerFn;
- handlerFn = priority;
- priority = hook;
- hook = null;
- }
+ if (!intersection) {
+ return;
+ }
- if ((0, _minDash.isFunction)(priority)) {
- that = unwrap;
- unwrap = handlerFn;
- handlerFn = priority;
- priority = DEFAULT_PRIORITY;
- }
+ updateFloatingBendpointPosition(bendpointsGfx, intersection);
- if ((0, _minDash.isObject)(unwrap)) {
- that = unwrap;
- unwrap = false;
- }
+ if (!intersection.bendpoint) {
+ updateSegmentDraggerPosition(bendpointsGfx, intersection, waypoints);
+ }
- if (!(0, _minDash.isFunction)(handlerFn)) {
- throw new Error('handlerFn must be a function');
- }
+ }
+ });
- if (!(0, _minDash.isArray)(events)) {
- events = [events];
- }
+ eventBus.on('element.mousedown', function(event) {
- var eventBus = this._eventBus;
- (0, _minDash.forEach)(events, function (event) {
- // concat commandStack(.event)?(.hook)?
- var fullEvent = ['commandStack', event, hook].filter(function (e) {
- return e;
- }).join('.');
- eventBus.on(fullEvent, priority, unwrap ? unwrapEvent(handlerFn, that) : handlerFn, that);
- });
- };
+ if (!(0,_util_Mouse__WEBPACK_IMPORTED_MODULE_7__.isPrimaryButton)(event)) {
+ return;
+ }
- var hooks = ['canExecute', 'preExecute', 'preExecuted', 'execute', 'executed', 'postExecute', 'postExecuted', 'revert', 'reverted'];
- /*
- * Install hook shortcuts
- *
- * This will generate the CommandInterceptor#(preExecute|...|reverted) methods
- * which will in term forward to CommandInterceptor#on.
- */
-
- (0, _minDash.forEach)(hooks, function (hook) {
- /**
- * {canExecute|preExecute|preExecuted|execute|executed|postExecute|postExecuted|revert|reverted}
- *
- * A named hook for plugging into the command execution
- *
- * @param {string|Array} [events] list of commands to register on
- * @param {number} [priority] the priority on which to hook into the execution
- * @param {Function} handlerFn interceptor to be invoked with (event)
- * @param {boolean} [unwrap=false] if true, unwrap the event and pass (context, command, event) to the
- * listener instead
- * @param {Object} [that] Pass context (`this`) to the handler function
- */
- CommandInterceptor.prototype[hook] = function (events, priority, handlerFn, unwrap, that) {
- if ((0, _minDash.isFunction)(events) || (0, _minDash.isNumber)(events)) {
- that = unwrap;
- unwrap = handlerFn;
- handlerFn = priority;
- priority = events;
- events = null;
- }
+ var originalEvent = event.originalEvent,
+ element = event.element;
- this.on(events, hook, priority, handlerFn, unwrap, that);
- };
- });
+ if (!element.waypoints) {
+ return;
+ }
- },{"min-dash":646}],251:[function(require,module,exports){
- "use strict";
+ return activateBendpointMove(originalEvent, element);
+ });
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = CommandStack;
+ eventBus.on('selection.changed', function(event) {
+ var newSelection = event.newSelection,
+ primary = newSelection[0];
- var _minDash = require("min-dash");
+ if (primary && primary.waypoints) {
+ addHandles(primary);
+ }
+ });
- /**
- * A service that offers un- and redoable execution of commands.
- *
- * The command stack is responsible for executing modeling actions
- * in a un- and redoable manner. To do this it delegates the actual
- * command execution to {@link CommandHandler}s.
- *
- * Command handlers provide {@link CommandHandler#execute(ctx)} and
- * {@link CommandHandler#revert(ctx)} methods to un- and redo a command
- * identified by a command context.
- *
- *
- * ## Life-Cycle events
- *
- * In the process the command stack fires a number of life-cycle events
- * that other components to participate in the command execution.
- *
- * * preExecute
- * * preExecuted
- * * execute
- * * executed
- * * postExecute
- * * postExecuted
- * * revert
- * * reverted
- *
- * A special event is used for validating, whether a command can be
- * performed prior to its execution.
- *
- * * canExecute
- *
- * Each of the events is fired as `commandStack.{eventName}` and
- * `commandStack.{commandName}.{eventName}`, respectively. This gives
- * components fine grained control on where to hook into.
- *
- * The event object fired transports `command`, the name of the
- * command and `context`, the command context.
- *
- *
- * ## Creating Command Handlers
- *
- * Command handlers should provide the {@link CommandHandler#execute(ctx)}
- * and {@link CommandHandler#revert(ctx)} methods to implement
- * redoing and undoing of a command.
- *
- * A command handler _must_ ensure undo is performed properly in order
- * not to break the undo chain. It must also return the shapes that
- * got changed during the `execute` and `revert` operations.
- *
- * Command handlers may execute other modeling operations (and thus
- * commands) in their `preExecute` and `postExecute` phases. The command
- * stack will properly group all commands together into a logical unit
- * that may be re- and undone atomically.
- *
- * Command handlers must not execute other commands from within their
- * core implementation (`execute`, `revert`).
- *
- *
- * ## Change Tracking
- *
- * During the execution of the CommandStack it will keep track of all
- * elements that have been touched during the command's execution.
- *
- * At the end of the CommandStack execution it will notify interested
- * components via an 'elements.changed' event with all the dirty
- * elements.
- *
- * The event can be picked up by components that are interested in the fact
- * that elements have been changed. One use case for this is updating
- * their graphical representation after moving / resizing or deletion.
- *
- * @see CommandHandler
- *
- * @param {EventBus} eventBus
- * @param {Injector} injector
- */
- function CommandStack(eventBus, injector) {
- /**
- * A map of all registered command handlers.
- *
- * @type {Object}
- */
- this._handlerMap = {};
- /**
- * A stack containing all re/undoable actions on the diagram
- *
- * @type {Array}
- */
-
- this._stack = [];
- /**
- * The current index on the stack
- *
- * @type {number}
- */
-
- this._stackIdx = -1;
- /**
- * Current active commandStack execution
- *
- * @type {Object}
- */
-
- this._currentExecution = {
- actions: [],
- dirty: []
- };
- this._injector = injector;
- this._eventBus = eventBus;
- this._uid = 1;
- eventBus.on(['diagram.destroy', 'diagram.clear'], function () {
- this.clear(false);
- }, this);
- }
+ eventBus.on('element.hover', function(event) {
+ var element = event.element;
- CommandStack.$inject = ['eventBus', 'injector'];
- /**
- * Execute a command
- *
- * @param {string} command the command to execute
- * @param {Object} context the environment to execute the command in
- */
+ if (element.waypoints) {
+ addHandles(element);
+ interactionEvents.registerEvent(event.gfx, 'mousemove', 'element.mousemove');
+ }
+ });
- CommandStack.prototype.execute = function (command, context) {
- if (!command) {
- throw new Error('command required');
- }
+ eventBus.on('element.out', function(event) {
+ interactionEvents.unregisterEvent(event.gfx, 'mousemove', 'element.mousemove');
+ });
- var action = {
- command: command,
- context: context
- };
+ // update bendpoint container data attribute on element ID change
+ eventBus.on('element.updateId', function(context) {
+ var element = context.element,
+ newId = context.newId;
- this._pushAction(action);
+ if (element.waypoints) {
+ var bendpointContainer = getBendpointsContainer(element);
- this._internalExecute(action);
+ if (bendpointContainer) {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(bendpointContainer, { 'data-element-id': newId });
+ }
+ }
+ });
- this._popAction(action);
- };
- /**
- * Ask whether a given command can be executed.
- *
- * Implementors may hook into the mechanism on two ways:
- *
- * * in event listeners:
- *
- * Users may prevent the execution via an event listener.
- * It must prevent the default action for `commandStack.(.)canExecute` events.
- *
- * * in command handlers:
- *
- * If the method {@link CommandHandler#canExecute} is implemented in a handler
- * it will be called to figure out whether the execution is allowed.
- *
- * @param {string} command the command to execute
- * @param {Object} context the environment to execute the command in
- *
- * @return {boolean} true if the command can be executed
- */
+ // API
+ this.addHandles = addHandles;
+ this.updateHandles = updateHandles;
+ this.getBendpointsContainer = getBendpointsContainer;
+ this.getSegmentDragger = getSegmentDragger;
+}
- CommandStack.prototype.canExecute = function (command, context) {
- var action = {
- command: command,
- context: context
- };
+Bendpoints.$inject = [
+ 'eventBus',
+ 'canvas',
+ 'interactionEvents',
+ 'bendpointMove',
+ 'connectionSegmentMove'
+];
- var handler = this._getHandler(command);
- var result = this._fire(command, 'canExecute', action); // handler#canExecute will only be called if no listener
- // decided on a result already
+// helper /////////////
- if (result === undefined) {
- if (!handler) {
- return false;
- }
+function getDraggerVisual(draggerGfx) {
+ return (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.query)('.djs-visual', draggerGfx);
+}
- if (handler.canExecute) {
- result = handler.canExecute(context);
- }
- }
+/***/ }),
- return result;
- };
- /**
- * Clear the command stack, erasing all undo / redo history
- */
+/***/ "../node_modules/diagram-js/lib/features/bendpoints/ConnectionSegmentMove.js":
+/*!***********************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/bendpoints/ConnectionSegmentMove.js ***!
+ \***********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ ConnectionSegmentMove)
+/* harmony export */ });
+/* harmony import */ var _util_Geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/Geometry */ "../node_modules/diagram-js/lib/util/Geometry.js");
+/* harmony import */ var _BendpointUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BendpointUtil */ "../node_modules/diagram-js/lib/features/bendpoints/BendpointUtil.js");
+/* harmony import */ var _layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tiny-svg */ "../node_modules/tiny-svg/dist/index.esm.js");
+/* harmony import */ var _util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/SvgTransformUtil */ "../node_modules/diagram-js/lib/util/SvgTransformUtil.js");
- CommandStack.prototype.clear = function (emit) {
- this._stack.length = 0;
- this._stackIdx = -1;
- if (emit !== false) {
- this._fire('changed');
- }
- };
- /**
- * Undo last command(s)
- */
- CommandStack.prototype.undo = function () {
- var action = this._getUndoAction(),
- next;
- if (action) {
- this._pushAction(action);
- while (action) {
- this._internalUndo(action);
+var MARKER_CONNECT_HOVER = 'connect-hover',
+ MARKER_CONNECT_UPDATING = 'djs-updating';
- next = this._getUndoAction();
- if (!next || next.id !== action.id) {
- break;
- }
- action = next;
- }
- this._popAction();
- }
- };
- /**
- * Redo last command(s)
- */
+/**
+ * @typedef {import('../../model/Types').Shape} Shape
+ *
+ * @typedef {import('../../util/Types').Axis} Axis
+ * @typedef {import('../../util/Types').Point} Point
+ *
+ * @typedef {import('didi').Injector} Injector
+ *
+ * @typedef {import('../../core/Canvas').default} Canvas
+ * @typedef {import('../dragging/Dragging').default} Dragging
+ * @typedef {import('../../core/EventBus').default} EventBus
+ * @typedef {import('../../core/GraphicsFactory').default} GraphicsFactory
+ * @typedef {import('../modeling/Modeling').default} Modeling
+ */
- CommandStack.prototype.redo = function () {
- var action = this._getRedoAction(),
- next;
+function axisAdd(point, axis, delta) {
+ return axisSet(point, axis, point[axis] + delta);
+}
- if (action) {
- this._pushAction(action);
+function axisSet(point, axis, value) {
+ return {
+ x: (axis === 'x' ? value : point.x),
+ y: (axis === 'y' ? value : point.y)
+ };
+}
- while (action) {
- this._internalExecute(action, true);
+function axisFenced(position, segmentStart, segmentEnd, axis) {
- next = this._getRedoAction();
+ var maxValue = Math.max(segmentStart[axis], segmentEnd[axis]),
+ minValue = Math.min(segmentStart[axis], segmentEnd[axis]);
- if (!next || next.id !== action.id) {
- break;
- }
+ var padding = 20;
- action = next;
- }
+ var fencedValue = Math.min(Math.max(minValue + padding, position[axis]), maxValue - padding);
- this._popAction();
- }
- };
- /**
- * Register a handler instance with the command stack
- *
- * @param {string} command
- * @param {CommandHandler} handler
- */
+ return axisSet(segmentStart, axis, fencedValue);
+}
+function flipAxis(axis) {
+ return axis === 'x' ? 'y' : 'x';
+}
- CommandStack.prototype.register = function (command, handler) {
- this._setHandler(command, handler);
- };
- /**
- * Register a handler type with the command stack
- * by instantiating it and injecting its dependencies.
- *
- * @param {string} command
- * @param {Function} a constructor for a {@link CommandHandler}
- */
+/**
+ * Get the docking point on the given element.
+ *
+ * Compute a reasonable docking, if non exists.
+ *
+ * @param {Point} point
+ * @param {Shape} referenceElement
+ * @param {Axis} moveAxis
+ *
+ * @return {Point}
+ */
+function getDocking(point, referenceElement, moveAxis) {
+ var referenceMid,
+ inverseAxis;
- CommandStack.prototype.registerHandler = function (command, handlerCls) {
- if (!command || !handlerCls) {
- throw new Error('command and handlerCls must be defined');
- }
+ if (point.original) {
+ return point.original;
+ } else {
+ referenceMid = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.getMid)(referenceElement);
+ inverseAxis = flipAxis(moveAxis);
- var handler = this._injector.instantiate(handlerCls);
+ return axisSet(point, inverseAxis, referenceMid[inverseAxis]);
+ }
+}
- this.register(command, handler);
- };
+/**
+ * A component that implements moving of bendpoints.
+ *
+ * @param {Injector} injector
+ * @param {EventBus} eventBus
+ * @param {Canvas} canvas
+ * @param {Canvas} dragging
+ * @param {GraphicsFactory} graphicsFactory
+ * @param {Modeling} modeling
+ */
+function ConnectionSegmentMove(
+ injector, eventBus, canvas,
+ dragging, graphicsFactory, modeling) {
+
+ // optional connection docking integration
+ var connectionDocking = injector.get('connectionDocking', false);
+
+
+ // API
+
+ this.start = function(event, connection, idx) {
+
+ var context,
+ gfx = canvas.getGraphics(connection),
+ segmentStartIndex = idx - 1,
+ segmentEndIndex = idx,
+ waypoints = connection.waypoints,
+ segmentStart = waypoints[segmentStartIndex],
+ segmentEnd = waypoints[segmentEndIndex],
+ intersection = (0,_BendpointUtil__WEBPACK_IMPORTED_MODULE_1__.getConnectionIntersection)(canvas, waypoints, event),
+ direction, axis, dragPosition;
+
+ direction = (0,_util_Geometry__WEBPACK_IMPORTED_MODULE_2__.pointsAligned)(segmentStart, segmentEnd);
+
+ // do not move diagonal connection
+ if (!direction) {
+ return;
+ }
+
+ // the axis where we are going to move things
+ axis = direction === 'v' ? 'x' : 'y';
+
+ if (segmentStartIndex === 0) {
+ segmentStart = getDocking(segmentStart, connection.source, axis);
+ }
+
+ if (segmentEndIndex === waypoints.length - 1) {
+ segmentEnd = getDocking(segmentEnd, connection.target, axis);
+ }
+
+ if (intersection) {
+ dragPosition = intersection.point;
+ } else {
+
+ // set to segment center as default
+ dragPosition = {
+ x: (segmentStart.x + segmentEnd.x) / 2,
+ y: (segmentStart.y + segmentEnd.y) / 2
+ };
+ }
+
+ context = {
+ connection: connection,
+ segmentStartIndex: segmentStartIndex,
+ segmentEndIndex: segmentEndIndex,
+ segmentStart: segmentStart,
+ segmentEnd: segmentEnd,
+ axis: axis,
+ dragPosition: dragPosition
+ };
+
+ dragging.init(event, dragPosition, 'connectionSegment.move', {
+ cursor: axis === 'x' ? 'resize-ew' : 'resize-ns',
+ data: {
+ connection: connection,
+ connectionGfx: gfx,
+ context: context
+ }
+ });
+ };
+
+ /**
+ * Crop connection if connection cropping is provided.
+ *
+ * @param {Connection} connection
+ * @param {Point[]} newWaypoints
+ *
+ * @return {Point[]} cropped connection waypoints
+ */
+ function cropConnection(connection, newWaypoints) {
- CommandStack.prototype.canUndo = function () {
- return !!this._getUndoAction();
- };
+ // crop connection, if docking service is provided only
+ if (!connectionDocking) {
+ return newWaypoints;
+ }
- CommandStack.prototype.canRedo = function () {
- return !!this._getRedoAction();
- }; // stack access //////////////////////
+ var oldWaypoints = connection.waypoints,
+ croppedWaypoints;
+ // temporary set new waypoints
+ connection.waypoints = newWaypoints;
- CommandStack.prototype._getRedoAction = function () {
- return this._stack[this._stackIdx + 1];
- };
+ croppedWaypoints = connectionDocking.getCroppedWaypoints(connection);
- CommandStack.prototype._getUndoAction = function () {
- return this._stack[this._stackIdx];
- }; // internal functionality //////////////////////
+ // restore old waypoints
+ connection.waypoints = oldWaypoints;
+ return croppedWaypoints;
+ }
- CommandStack.prototype._internalUndo = function (action) {
- var self = this;
- var command = action.command,
- context = action.context;
+ // DRAGGING IMPLEMENTATION
- var handler = this._getHandler(command); // guard against illegal nested command stack invocations
+ function redrawConnection(data) {
+ graphicsFactory.update('connection', data.connection, data.connectionGfx);
+ }
+ function updateDragger(context, segmentOffset, event) {
- this._atomicDo(function () {
- self._fire(command, 'revert', action);
+ var newWaypoints = context.newWaypoints,
+ segmentStartIndex = context.segmentStartIndex + segmentOffset,
+ segmentStart = newWaypoints[segmentStartIndex],
+ segmentEndIndex = context.segmentEndIndex + segmentOffset,
+ segmentEnd = newWaypoints[segmentEndIndex],
+ axis = flipAxis(context.axis);
- if (handler.revert) {
- self._markDirty(handler.revert(context));
- }
+ // make sure the dragger does not move
+ // outside the connection
+ var draggerPosition = axisFenced(event, segmentStart, segmentEnd, axis);
- self._revertedAction(action);
+ // update dragger
+ (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_3__.translate)(context.draggerGfx, draggerPosition.x, draggerPosition.y);
+ }
- self._fire(command, 'reverted', action);
- });
- };
+ /**
+ * Filter waypoints for redundant ones (i.e. on the same axis).
+ * Returns the filtered waypoints and the offset related to the segment move.
+ *
+ * @param {Point[]} waypoints
+ * @param {Integer} segmentStartIndex of moved segment start
+ *
+ * @return {Object} { filteredWaypoints, segmentOffset }
+ */
+ function filterRedundantWaypoints(waypoints, segmentStartIndex) {
- CommandStack.prototype._fire = function (command, qualifier, event) {
- if (arguments.length < 3) {
- event = qualifier;
- qualifier = null;
- }
+ var segmentOffset = 0;
- var names = qualifier ? [command + '.' + qualifier, qualifier] : [command],
- i,
- name,
- result;
- event = this._eventBus.createEvent(event);
+ var filteredWaypoints = waypoints.filter(function(r, idx) {
+ if ((0,_util_Geometry__WEBPACK_IMPORTED_MODULE_2__.pointsOnLine)(waypoints[idx - 1], waypoints[idx + 1], r)) {
- for (i = 0; name = names[i]; i++) {
- result = this._eventBus.fire('commandStack.' + name, event);
+ // remove point and increment offset
+ segmentOffset = idx <= segmentStartIndex ? segmentOffset - 1 : segmentOffset;
+ return false;
+ }
- if (event.cancelBubble) {
- break;
- }
- }
+ // dont remove point
+ return true;
+ });
- return result;
- };
+ return {
+ waypoints: filteredWaypoints,
+ segmentOffset: segmentOffset
+ };
+ }
- CommandStack.prototype._createId = function () {
- return this._uid++;
- };
+ eventBus.on('connectionSegment.move.start', function(event) {
- CommandStack.prototype._atomicDo = function (fn) {
- var execution = this._currentExecution;
- execution.atomic = true;
+ var context = event.context,
+ connection = event.connection,
+ layer = canvas.getLayer('overlays');
- try {
- fn();
- } finally {
- execution.atomic = false;
- }
- };
+ context.originalWaypoints = connection.waypoints.slice();
- CommandStack.prototype._internalExecute = function (action, redo) {
- var self = this;
- var command = action.command,
- context = action.context;
+ // add dragger gfx
+ context.draggerGfx = (0,_BendpointUtil__WEBPACK_IMPORTED_MODULE_1__.addSegmentDragger)(layer, context.segmentStart, context.segmentEnd);
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.classes)(context.draggerGfx).add('djs-dragging');
- var handler = this._getHandler(command);
+ canvas.addMarker(connection, MARKER_CONNECT_UPDATING);
+ });
- if (!handler) {
- throw new Error('no command handler registered for <' + command + '>');
- }
+ eventBus.on('connectionSegment.move.move', function(event) {
- this._pushAction(action);
+ var context = event.context,
+ connection = context.connection,
+ segmentStartIndex = context.segmentStartIndex,
+ segmentEndIndex = context.segmentEndIndex,
+ segmentStart = context.segmentStart,
+ segmentEnd = context.segmentEnd,
+ axis = context.axis;
- if (!redo) {
- this._fire(command, 'preExecute', action);
+ var newWaypoints = context.originalWaypoints.slice(),
+ newSegmentStart = axisAdd(segmentStart, axis, event['d' + axis]),
+ newSegmentEnd = axisAdd(segmentEnd, axis, event['d' + axis]);
- if (handler.preExecute) {
- handler.preExecute(context);
- }
+ // original waypoint count and added / removed
+ // from start waypoint delta. We use the later
+ // to retrieve the updated segmentStartIndex / segmentEndIndex
+ var waypointCount = newWaypoints.length,
+ segmentOffset = 0;
- this._fire(command, 'preExecuted', action);
- } // guard against illegal nested command stack invocations
+ // move segment start / end by axis delta
+ newWaypoints[segmentStartIndex] = newSegmentStart;
+ newWaypoints[segmentEndIndex] = newSegmentEnd;
+ var sourceToSegmentOrientation,
+ targetToSegmentOrientation;
- this._atomicDo(function () {
- self._fire(command, 'execute', action);
+ // handle first segment
+ if (segmentStartIndex < 2) {
+ sourceToSegmentOrientation = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.getOrientation)(connection.source, newSegmentStart);
- if (handler.execute) {
- // actual execute + mark return results as dirty
- self._markDirty(handler.execute(context));
- } // log to stack
+ // first bendpoint, remove first segment if intersecting
+ if (segmentStartIndex === 1) {
+ if (sourceToSegmentOrientation === 'intersect') {
+ newWaypoints.shift();
+ newWaypoints[0] = newSegmentStart;
+ segmentOffset--;
+ }
+ }
- self._executedAction(action, redo);
+ // docking point, add segment if not intersecting anymore
+ else {
+ if (sourceToSegmentOrientation !== 'intersect') {
+ newWaypoints.unshift(segmentStart);
+ segmentOffset++;
+ }
+ }
+ }
- self._fire(command, 'executed', action);
- });
+ // handle last segment
+ if (segmentEndIndex > waypointCount - 3) {
+ targetToSegmentOrientation = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.getOrientation)(connection.target, newSegmentEnd);
- if (!redo) {
- this._fire(command, 'postExecute', action);
+ // last bendpoint, remove last segment if intersecting
+ if (segmentEndIndex === waypointCount - 2) {
- if (handler.postExecute) {
- handler.postExecute(context);
- }
+ if (targetToSegmentOrientation === 'intersect') {
+ newWaypoints.pop();
+ newWaypoints[newWaypoints.length - 1] = newSegmentEnd;
+ }
+ }
- this._fire(command, 'postExecuted', action);
- }
+ // last bendpoint, remove last segment if intersecting
+ else {
+ if (targetToSegmentOrientation !== 'intersect') {
+ newWaypoints.push(segmentEnd);
+ }
+ }
+ }
+
+ // update connection waypoints
+ context.newWaypoints = connection.waypoints = cropConnection(connection, newWaypoints);
- this._popAction(action);
- };
+ // update dragger position
+ updateDragger(context, segmentOffset, event);
- CommandStack.prototype._pushAction = function (action) {
- var execution = this._currentExecution,
- actions = execution.actions;
- var baseAction = actions[0];
+ // save segmentOffset in context
+ context.newSegmentStartIndex = segmentStartIndex + segmentOffset;
- if (execution.atomic) {
- throw new Error('illegal invocation in or phase (action: ' + action.command + ')');
- }
+ // redraw connection
+ redrawConnection(event);
+ });
- if (!action.id) {
- action.id = baseAction && baseAction.id || this._createId();
- }
+ eventBus.on('connectionSegment.move.hover', function(event) {
- actions.push(action);
- };
+ event.context.hover = event.hover;
+ canvas.addMarker(event.hover, MARKER_CONNECT_HOVER);
+ });
+
+ eventBus.on([
+ 'connectionSegment.move.out',
+ 'connectionSegment.move.cleanup'
+ ], function(event) {
+
+ // remove connect marker
+ // if it was added
+ var hover = event.context.hover;
+
+ if (hover) {
+ canvas.removeMarker(hover, MARKER_CONNECT_HOVER);
+ }
+ });
+
+ eventBus.on('connectionSegment.move.cleanup', function(event) {
+
+ var context = event.context,
+ connection = context.connection;
+
+ // remove dragger gfx
+ if (context.draggerGfx) {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.remove)(context.draggerGfx);
+ }
+
+ canvas.removeMarker(connection, MARKER_CONNECT_UPDATING);
+ });
+
+ eventBus.on([
+ 'connectionSegment.move.cancel',
+ 'connectionSegment.move.end'
+ ], function(event) {
+ var context = event.context,
+ connection = context.connection;
+
+ connection.waypoints = context.originalWaypoints;
+
+ redrawConnection(event);
+ });
+
+ eventBus.on('connectionSegment.move.end', function(event) {
+
+ var context = event.context,
+ connection = context.connection,
+ newWaypoints = context.newWaypoints,
+ newSegmentStartIndex = context.newSegmentStartIndex;
+
+ // ensure we have actual pixel values bendpoint
+ // coordinates (important when zoom level was > 1 during move)
+ newWaypoints = newWaypoints.map(function(p) {
+ return {
+ original: p.original,
+ x: Math.round(p.x),
+ y: Math.round(p.y)
+ };
+ });
+
+ // apply filter redunant waypoints
+ var filtered = filterRedundantWaypoints(newWaypoints, newSegmentStartIndex);
+
+ // get filtered waypoints
+ var filteredWaypoints = filtered.waypoints,
+ croppedWaypoints = cropConnection(connection, filteredWaypoints),
+ segmentOffset = filtered.segmentOffset;
+
+ var hints = {
+ segmentMove: {
+ segmentStartIndex: context.segmentStartIndex,
+ newSegmentStartIndex: newSegmentStartIndex + segmentOffset
+ }
+ };
+
+ modeling.updateWaypoints(connection, croppedWaypoints, hints);
+ });
+}
+
+ConnectionSegmentMove.$inject = [
+ 'injector',
+ 'eventBus',
+ 'canvas',
+ 'dragging',
+ 'graphicsFactory',
+ 'modeling'
+];
+
+
+/***/ }),
+
+/***/ "../node_modules/diagram-js/lib/features/bendpoints/GeometricUtil.js":
+/*!***************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/bendpoints/GeometricUtil.js ***!
+ \***************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ getAngle: () => (/* binding */ getAngle),
+/* harmony export */ getDistancePointLine: () => (/* binding */ getDistancePointLine),
+/* harmony export */ getDistancePointPoint: () => (/* binding */ getDistancePointPoint),
+/* harmony export */ perpendicularFoot: () => (/* binding */ perpendicularFoot),
+/* harmony export */ rotateVector: () => (/* binding */ rotateVector),
+/* harmony export */ vectorLength: () => (/* binding */ vectorLength)
+/* harmony export */ });
+/**
+ * @typedef {import('../../util/Types').Point} Point
+ * @typedef {import('../../util/Types').Vector} Vector
+ */
- CommandStack.prototype._popAction = function () {
- var execution = this._currentExecution,
- actions = execution.actions,
- dirty = execution.dirty;
- actions.pop();
+/**
+ * Returns the length of a vector.
+ *
+ * @param {Vector} vector
+ *
+ * @return {number}
+ */
+function vectorLength(vector) {
+ return Math.sqrt(Math.pow(vector.x, 2) + Math.pow(vector.y, 2));
+}
- if (!actions.length) {
- this._eventBus.fire('elements.changed', {
- elements: (0, _minDash.uniqueBy)('id', dirty.reverse())
- });
- dirty.length = 0;
+/**
+ * Calculates the angle between a line a the Y axis.
+ *
+ * @param {Point[]} line
+ *
+ * @return {number}
+ */
+function getAngle(line) {
- this._fire('changed');
- }
- };
+ // return value is between 0, 180 and -180, -0
+ // @janstuemmel: maybe replace return a/b with b/a
+ return Math.atan((line[1].y - line[0].y) / (line[1].x - line[0].x));
+}
- CommandStack.prototype._markDirty = function (elements) {
- var execution = this._currentExecution;
- if (!elements) {
- return;
- }
+/**
+ * Rotates a vector by a given angle.
+ *
+ * @param {Vector} vector
+ * @param {number} angle The angle in radians.
+ *
+ * @return {Vector}
+ */
+function rotateVector(vector, angle) {
+ return (!angle) ? vector : {
+ x: Math.cos(angle) * vector.x - Math.sin(angle) * vector.y,
+ y: Math.sin(angle) * vector.x + Math.cos(angle) * vector.y
+ };
+}
- elements = (0, _minDash.isArray)(elements) ? elements : [elements];
- execution.dirty = execution.dirty.concat(elements);
- };
- CommandStack.prototype._executedAction = function (action, redo) {
- var stackIdx = ++this._stackIdx;
+/**
+ * Solves a 2D equation system
+ * a + r*b = c, where a,b,c are 2D vectors
+ *
+ * @param {Vector} a
+ * @param {Vector} b
+ * @param {Vector} c
+ *
+ * @return {number}
+ */
+function solveLambaSystem(a, b, c) {
- if (!redo) {
- this._stack.splice(stackIdx, this._stack.length, action);
- }
- };
+ // the 2d system
+ var system = [
+ { n: a[0] - c[0], lambda: b[0] },
+ { n: a[1] - c[1], lambda: b[1] }
+ ];
- CommandStack.prototype._revertedAction = function (action) {
- this._stackIdx--;
- };
+ // solve
+ var n = system[0].n * b[0] + system[1].n * b[1],
+ l = system[0].lambda * b[0] + system[1].lambda * b[1];
- CommandStack.prototype._getHandler = function (command) {
- return this._handlerMap[command];
- };
+ return -n / l;
+}
- CommandStack.prototype._setHandler = function (command, handler) {
- if (!command || !handler) {
- throw new Error('command and handler required');
- }
- if (this._handlerMap[command]) {
- throw new Error('overriding handler for command <' + command + '>');
- }
+/**
+ * Calculates the position of the perpendicular foot.
+ *
+ * @param {Point} point
+ * @param {Point[]} line
+ *
+ * @return {Point}
+ */
+function perpendicularFoot(point, line) {
- this._handlerMap[command] = handler;
- };
+ var a = line[0], b = line[1];
- },{"min-dash":646}],252:[function(require,module,exports){
- "use strict";
+ // relative position of b from a
+ var bd = { x: b.x - a.x, y: b.y - a.y };
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+ // solve equation system to the parametrized vectors param real value
+ var r = solveLambaSystem([ a.x, a.y ], [ bd.x, bd.y ], [ point.x, point.y ]);
- var _CommandStack = _interopRequireDefault(require("./CommandStack"));
+ return { x: a.x + r * bd.x, y: a.y + r * bd.y };
+}
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var _default = {
- commandStack: ['type', _CommandStack.default]
- };
- exports.default = _default;
+/**
+ * Calculates the distance between a point and a line.
+ *
+ * @param {Point} point
+ * @param {Point[]} line
+ *
+ * @return {number}
+ */
+function getDistancePointLine(point, line) {
- },{"./CommandStack":251}],253:[function(require,module,exports){
- "use strict";
+ var pfPoint = perpendicularFoot(point, line);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = Canvas;
+ // distance vector
+ var connectionVector = {
+ x: pfPoint.x - point.x,
+ y: pfPoint.y - point.y
+ };
- var _minDash = require("min-dash");
+ return vectorLength(connectionVector);
+}
- var _Collections = require("../util/Collections");
- var _Elements = require("../util/Elements");
+/**
+ * Calculates the distance between two points.
+ *
+ * @param {Point} point1
+ * @param {Point} point2
+ *
+ * @return {number}
+ */
+function getDistancePointPoint(point1, point2) {
- var _tinySvg = require("tiny-svg");
+ return vectorLength({
+ x: point1.x - point2.x,
+ y: point1.y - point2.y
+ });
+}
- function round(number, resolution) {
- return Math.round(number * resolution) / resolution;
- }
+/***/ }),
- function ensurePx(number) {
- return (0, _minDash.isNumber)(number) ? number + 'px' : number;
- }
- /**
- * Creates a HTML container element for a SVG element with
- * the given configuration
- *
- * @param {Object} options
- * @return {HTMLElement} the container element
- */
+/***/ "../node_modules/diagram-js/lib/features/bendpoints/index.js":
+/*!*******************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/bendpoints/index.js ***!
+ \*******************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _dragging__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../dragging */ "../node_modules/diagram-js/lib/features/dragging/index.js");
+/* harmony import */ var _rules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../rules */ "../node_modules/diagram-js/lib/features/rules/index.js");
+/* harmony import */ var _Bendpoints__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Bendpoints */ "../node_modules/diagram-js/lib/features/bendpoints/Bendpoints.js");
+/* harmony import */ var _BendpointMove__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./BendpointMove */ "../node_modules/diagram-js/lib/features/bendpoints/BendpointMove.js");
+/* harmony import */ var _BendpointMovePreview__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BendpointMovePreview */ "../node_modules/diagram-js/lib/features/bendpoints/BendpointMovePreview.js");
+/* harmony import */ var _ConnectionSegmentMove__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ConnectionSegmentMove */ "../node_modules/diagram-js/lib/features/bendpoints/ConnectionSegmentMove.js");
+/* harmony import */ var _BendpointSnapping__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./BendpointSnapping */ "../node_modules/diagram-js/lib/features/bendpoints/BendpointSnapping.js");
- function createContainer(options) {
- options = (0, _minDash.assign)({}, {
- width: '100%',
- height: '100%'
- }, options);
- var container = options.container || document.body; // create a around the svg element with the respective size
- // this way we can always get the correct container size
- // (this is impossible for
elements at the moment)
-
- var parent = document.createElement('div');
- parent.setAttribute('class', 'djs-container');
- (0, _minDash.assign)(parent.style, {
- position: 'relative',
- overflow: 'hidden',
- width: ensurePx(options.width),
- height: ensurePx(options.height)
- });
- container.appendChild(parent);
- return parent;
- }
- function createGroup(parent, cls, childIndex) {
- var group = (0, _tinySvg.create)('g');
- (0, _tinySvg.classes)(group).add(cls);
- var index = childIndex !== undefined ? childIndex : parent.childNodes.length - 1; // must ensure second argument is node or _null_
- // cf. https://developer.mozilla.org/en-US/docs/Web/API/Node/insertBefore
- parent.insertBefore(group, parent.childNodes[index] || null);
- return group;
- }
- var BASE_LAYER = 'base';
- var REQUIRED_MODEL_ATTRS = {
- shape: ['x', 'y', 'width', 'height'],
- connection: ['waypoints']
- };
- /**
- * The main drawing canvas.
- *
- * @class
- * @constructor
- *
- * @emits Canvas#canvas.init
- *
- * @param {Object} config
- * @param {EventBus} eventBus
- * @param {GraphicsFactory} graphicsFactory
- * @param {ElementRegistry} elementRegistry
- */
- function Canvas(config, eventBus, graphicsFactory, elementRegistry) {
- this._eventBus = eventBus;
- this._elementRegistry = elementRegistry;
- this._graphicsFactory = graphicsFactory;
- this._init(config || {});
- }
- Canvas.$inject = ['config.canvas', 'eventBus', 'graphicsFactory', 'elementRegistry'];
- Canvas.prototype._init = function (config) {
- var eventBus = this._eventBus; // Creates a element that is wrapped into a .
- // This way we are always able to correctly figure out the size of the svg element
- // by querying the parent node.
- //
- // (It is not possible to get the size of a svg element cross browser @ 2014-04-01)
- //
- //
- //
- // ...
- //
- //
- // html container
-
- var container = this._container = createContainer(config);
- var svg = this._svg = (0, _tinySvg.create)('svg');
- (0, _tinySvg.attr)(svg, {
- width: '100%',
- height: '100%'
- });
- (0, _tinySvg.append)(container, svg);
- var viewport = this._viewport = createGroup(svg, 'viewport');
- this._layers = {}; // debounce canvas.viewbox.changed events
- // for smoother diagram interaction
-
- if (config.deferUpdate !== false) {
- this._viewboxChanged = (0, _minDash.debounce)((0, _minDash.bind)(this._viewboxChanged, this), 300);
- }
-
- eventBus.on('diagram.init', function () {
- /**
- * An event indicating that the canvas is ready to be drawn on.
- *
- * @memberOf Canvas
- *
- * @event canvas.init
- *
- * @type {Object}
- * @property {SVGElement} svg the created svg element
- * @property {SVGElement} viewport the direct parent of diagram elements and shapes
- */
- eventBus.fire('canvas.init', {
- svg: svg,
- viewport: viewport
- });
- }, this); // reset viewbox on shape changes to
- // recompute the viewbox
-
- eventBus.on(['shape.added', 'connection.added', 'shape.removed', 'connection.removed', 'elements.changed'], function () {
- delete this._cachedViewbox;
- }, this);
- eventBus.on('diagram.destroy', 500, this._destroy, this);
- eventBus.on('diagram.clear', 500, this._clear, this);
- };
- Canvas.prototype._destroy = function (emit) {
- this._eventBus.fire('canvas.destroy', {
- svg: this._svg,
- viewport: this._viewport
- });
- var parent = this._container.parentNode;
+/**
+ * @type { import('didi').ModuleDeclaration }
+ */
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ _dragging__WEBPACK_IMPORTED_MODULE_0__["default"],
+ _rules__WEBPACK_IMPORTED_MODULE_1__["default"]
+ ],
+ __init__: [ 'bendpoints', 'bendpointSnapping', 'bendpointMovePreview' ],
+ bendpoints: [ 'type', _Bendpoints__WEBPACK_IMPORTED_MODULE_2__["default"] ],
+ bendpointMove: [ 'type', _BendpointMove__WEBPACK_IMPORTED_MODULE_3__["default"] ],
+ bendpointMovePreview: [ 'type', _BendpointMovePreview__WEBPACK_IMPORTED_MODULE_4__["default"] ],
+ connectionSegmentMove: [ 'type', _ConnectionSegmentMove__WEBPACK_IMPORTED_MODULE_5__["default"] ],
+ bendpointSnapping: [ 'type', _BendpointSnapping__WEBPACK_IMPORTED_MODULE_6__["default"] ]
+});
+
+
+/***/ }),
+
+/***/ "../node_modules/diagram-js/lib/features/change-support/ChangeSupport.js":
+/*!*******************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/change-support/ChangeSupport.js ***!
+ \*******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ ChangeSupport)
+/* harmony export */ });
+/* harmony import */ var _util_Elements__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/Elements */ "../node_modules/diagram-js/lib/util/Elements.js");
+
+
+/**
+ * @typedef {import('../../core/Canvas').default} Canvas
+ * @typedef {import('../../core/ElementRegistry').default} ElementRegistry
+ * @typedef {import('../../core/EventBus').default} EventBus
+ * @typedef {import('../../core/GraphicsFactory').default} GraphicsFactory
+ */
- if (parent) {
- parent.removeChild(this._container);
- }
+/**
+ * Adds change support to the diagram, including
+ *
+ *
+ * redrawing shapes and connections on change
+ *
+ *
+ * @param {EventBus} eventBus
+ * @param {Canvas} canvas
+ * @param {ElementRegistry} elementRegistry
+ * @param {GraphicsFactory} graphicsFactory
+ */
+function ChangeSupport(
+ eventBus, canvas, elementRegistry,
+ graphicsFactory) {
- delete this._svg;
- delete this._container;
- delete this._layers;
- delete this._rootElement;
- delete this._viewport;
- };
- Canvas.prototype._clear = function () {
- var self = this;
+ // redraw shapes / connections on change
- var allElements = this._elementRegistry.getAll(); // remove all elements
+ eventBus.on('element.changed', function(event) {
+ var element = event.element;
- allElements.forEach(function (element) {
- var type = (0, _Elements.getType)(element);
+ // element might have been deleted and replaced by new element with same ID
+ // thus check for parent of element except for root element
+ if (element.parent || element === canvas.getRootElement()) {
+ event.gfx = elementRegistry.getGraphics(element);
+ }
- if (type === 'root') {
- self.setRootElement(null, true);
- } else {
- self._removeElement(element, type);
- }
- }); // force recomputation of view box
+ // shape + gfx may have been deleted
+ if (!event.gfx) {
+ return;
+ }
- delete this._cachedViewbox;
- };
- /**
- * Returns the default layer on which
- * all elements are drawn.
- *
- * @returns {SVGElement}
- */
+ eventBus.fire((0,_util_Elements__WEBPACK_IMPORTED_MODULE_0__.getType)(element) + '.changed', event);
+ });
+ eventBus.on('elements.changed', function(event) {
- Canvas.prototype.getDefaultLayer = function () {
- return this.getLayer(BASE_LAYER, 0);
- };
- /**
- * Returns a layer that is used to draw elements
- * or annotations on it.
- *
- * Non-existing layers retrieved through this method
- * will be created. During creation, the optional index
- * may be used to create layers below or above existing layers.
- * A layer with a certain index is always created above all
- * existing layers with the same index.
- *
- * @param {string} name
- * @param {number} index
- *
- * @returns {SVGElement}
- */
+ var elements = event.elements;
+ elements.forEach(function(e) {
+ eventBus.fire('element.changed', { element: e });
+ });
- Canvas.prototype.getLayer = function (name, index) {
- if (!name) {
- throw new Error('must specify a name');
- }
+ graphicsFactory.updateContainments(elements);
+ });
- var layer = this._layers[name];
+ eventBus.on('shape.changed', function(event) {
+ graphicsFactory.update('shape', event.element, event.gfx);
+ });
- if (!layer) {
- layer = this._layers[name] = this._createLayer(name, index);
- } // throw an error if layer creation / retrival is
- // requested on different index
+ eventBus.on('connection.changed', function(event) {
+ graphicsFactory.update('connection', event.element, event.gfx);
+ });
+}
+ChangeSupport.$inject = [
+ 'eventBus',
+ 'canvas',
+ 'elementRegistry',
+ 'graphicsFactory'
+];
- if (typeof index !== 'undefined' && layer.index !== index) {
- throw new Error('layer <' + name + '> already created at index <' + index + '>');
- }
+/***/ }),
- return layer.group;
- };
- /**
- * Creates a given layer and returns it.
- *
- * @param {string} name
- * @param {number} [index=0]
- *
- * @return {Object} layer descriptor with { index, group: SVGGroup }
- */
+/***/ "../node_modules/diagram-js/lib/features/change-support/index.js":
+/*!***********************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/change-support/index.js ***!
+ \***********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _ChangeSupport__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ChangeSupport */ "../node_modules/diagram-js/lib/features/change-support/ChangeSupport.js");
- Canvas.prototype._createLayer = function (name, index) {
- if (!index) {
- index = 0;
- }
- var childIndex = (0, _minDash.reduce)(this._layers, function (childIndex, layer) {
- if (index >= layer.index) {
- childIndex++;
- }
- return childIndex;
- }, 0);
- return {
- group: createGroup(this._viewport, 'layer-' + name, childIndex),
- index: index
- };
- };
- /**
- * Returns the html element that encloses the
- * drawing canvas.
- *
- * @return {DOMNode}
- */
+/**
+ * @type { import('didi').ModuleDeclaration }
+ */
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __init__: [ 'changeSupport' ],
+ changeSupport: [ 'type', _ChangeSupport__WEBPACK_IMPORTED_MODULE_0__["default"] ]
+});
+
+/***/ }),
+
+/***/ "../node_modules/diagram-js/lib/features/clipboard/Clipboard.js":
+/*!**********************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/clipboard/Clipboard.js ***!
+ \**********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ Clipboard)
+/* harmony export */ });
+/**
+ * A clip board stub
+ */
+function Clipboard() {}
- Canvas.prototype.getContainer = function () {
- return this._container;
- }; // markers //////////////////////
+Clipboard.prototype.get = function() {
+ return this._data;
+};
+Clipboard.prototype.set = function(data) {
+ this._data = data;
+};
- Canvas.prototype._updateMarker = function (element, marker, add) {
- var container;
+Clipboard.prototype.clear = function() {
+ var data = this._data;
- if (!element.id) {
- element = this._elementRegistry.get(element);
- } // we need to access all
+ delete this._data;
+ return data;
+};
- container = this._elementRegistry._elements[element.id];
+Clipboard.prototype.isEmpty = function() {
+ return !this._data;
+};
- if (!container) {
- return;
- }
+/***/ }),
- (0, _minDash.forEach)([container.gfx, container.secondaryGfx], function (gfx) {
- if (gfx) {
- // invoke either addClass or removeClass based on mode
- if (add) {
- (0, _tinySvg.classes)(gfx).add(marker);
- } else {
- (0, _tinySvg.classes)(gfx).remove(marker);
- }
- }
- });
- /**
- * An event indicating that a marker has been updated for an element
- *
- * @event element.marker.update
- * @type {Object}
- * @property {djs.model.Element} element the shape
- * @property {Object} gfx the graphical representation of the shape
- * @property {string} marker
- * @property {boolean} add true if the marker was added, false if it got removed
- */
-
- this._eventBus.fire('element.marker.update', {
- element: element,
- gfx: container.gfx,
- marker: marker,
- add: !!add
- });
- };
- /**
- * Adds a marker to an element (basically a css class).
- *
- * Fires the element.marker.update event, making it possible to
- * integrate extension into the marker life-cycle, too.
- *
- * @example
- * canvas.addMarker('foo', 'some-marker');
- *
- * var fooGfx = canvas.getGraphics('foo');
- *
- * fooGfx; //
...
- *
- * @param {string|djs.model.Base} element
- * @param {string} marker
- */
+/***/ "../node_modules/diagram-js/lib/features/clipboard/index.js":
+/*!******************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/clipboard/index.js ***!
+ \******************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _Clipboard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Clipboard */ "../node_modules/diagram-js/lib/features/clipboard/Clipboard.js");
- Canvas.prototype.addMarker = function (element, marker) {
- this._updateMarker(element, marker, true);
- };
- /**
- * Remove a marker from an element.
- *
- * Fires the element.marker.update event, making it possible to
- * integrate extension into the marker life-cycle, too.
- *
- * @param {string|djs.model.Base} element
- * @param {string} marker
- */
- Canvas.prototype.removeMarker = function (element, marker) {
- this._updateMarker(element, marker, false);
- };
- /**
- * Check the existence of a marker on element.
- *
- * @param {string|djs.model.Base} element
- * @param {string} marker
- */
+/**
+ * @type { import('didi').ModuleDeclaration }
+ */
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ clipboard: [ 'type', _Clipboard__WEBPACK_IMPORTED_MODULE_0__["default"] ]
+});
- Canvas.prototype.hasMarker = function (element, marker) {
- if (!element.id) {
- element = this._elementRegistry.get(element);
- }
+/***/ }),
- var gfx = this.getGraphics(element);
- return (0, _tinySvg.classes)(gfx).has(marker);
- };
- /**
- * Toggles a marker on an element.
- *
- * Fires the element.marker.update event, making it possible to
- * integrate extension into the marker life-cycle, too.
- *
- * @param {string|djs.model.Base} element
- * @param {string} marker
- */
+/***/ "../node_modules/diagram-js/lib/features/complex-preview/ComplexPreview.js":
+/*!*********************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/complex-preview/ComplexPreview.js ***!
+ \*********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ ComplexPreview)
+/* harmony export */ });
+/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tiny-svg */ "../node_modules/tiny-svg/dist/index.esm.js");
+/* harmony import */ var _util_GraphicsUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/GraphicsUtil */ "../node_modules/diagram-js/lib/util/GraphicsUtil.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/ModelUtil */ "../node_modules/diagram-js/lib/util/ModelUtil.js");
+/* harmony import */ var _util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/SvgTransformUtil */ "../node_modules/diagram-js/lib/util/SvgTransformUtil.js");
- Canvas.prototype.toggleMarker = function (element, marker) {
- if (this.hasMarker(element, marker)) {
- this.removeMarker(element, marker);
- } else {
- this.addMarker(element, marker);
- }
- };
- Canvas.prototype.getRootElement = function () {
- if (!this._rootElement) {
- this.setRootElement({
- id: '__implicitroot',
- children: []
- });
- }
- return this._rootElement;
- }; // root element handling //////////////////////
- /**
- * Sets a given element as the new root element for the canvas
- * and returns the new root element.
- *
- * @param {Object|djs.model.Root} element
- * @param {boolean} [override] whether to override the current root element, if any
- *
- * @return {Object|djs.model.Root} new root element
- */
- Canvas.prototype.setRootElement = function (element, override) {
- if (element) {
- this._ensureValid('root', element);
- }
- var currentRoot = this._rootElement,
- elementRegistry = this._elementRegistry,
- eventBus = this._eventBus;
- if (currentRoot) {
- if (!override) {
- throw new Error('rootElement already set, need to specify override');
- } // simulate element remove event sequence
+/**
+ * @typedef {import('../../model/Types').Element} Element
+ * @typedef {import('../../model/Types').Shape} Shape
+ * @typedef {import('../../util/Types').Point} Point
+ * @typedef {import('../../util/Types').Rect} Rect
+ *
+ * @typedef { { element: Element, delta: Point } } MovedOption
+ * @typedef { { shape: Shape, bounds: Rect } } ResizedOption
+ *
+ * @typedef { {
+ * created?: Element[],
+ * removed?: Element[],
+ * moved?: MovedOption[],
+ * resized?: ResizedOption[]
+ * } } CreateOptions
+ */
+const LAYER_NAME = 'complex-preview';
- eventBus.fire('root.remove', {
- element: currentRoot
- });
- eventBus.fire('root.removed', {
- element: currentRoot
- });
- elementRegistry.remove(currentRoot);
- }
+/**
+ * Complex preview for shapes and connections.
+ */
+class ComplexPreview {
+ constructor(canvas, graphicsFactory, previewSupport) {
+ this._canvas = canvas;
+ this._graphicsFactory = graphicsFactory;
+ this._previewSupport = previewSupport;
- if (element) {
- var gfx = this.getDefaultLayer(); // resemble element add event sequence
+ this._markers = [];
+ }
- eventBus.fire('root.add', {
- element: element
- });
- elementRegistry.add(element, gfx, this._svg);
- eventBus.fire('root.added', {
- element: element,
- gfx: gfx
- });
- }
+ /**
+ * Create complex preview.
+ *
+ * @param {CreateOptions} options
+ */
+ create(options) {
- this._rootElement = element;
- return element;
- }; // add functionality //////////////////////
+ // there can only be one complex preview at a time
+ this.cleanUp();
+ const {
+ created = [],
+ moved = [],
+ removed = [],
+ resized = []
+ } = options;
- Canvas.prototype._ensureValid = function (type, element) {
- if (!element.id) {
- throw new Error('element must have an id');
- }
+ const layer = this._canvas.getLayer(LAYER_NAME);
- if (this._elementRegistry.get(element.id)) {
- throw new Error('element with id ' + element.id + ' already exists');
- }
+ // shapes and connections to be created
+ created.filter(element => !isHidden(element)).forEach(element => {
+ let gfx;
- var requiredAttrs = REQUIRED_MODEL_ATTRS[type];
- var valid = (0, _minDash.every)(requiredAttrs, function (attr) {
- return typeof element[attr] !== 'undefined';
- });
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.isConnection)(element)) {
+ gfx = this._graphicsFactory._createContainer('connection', (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('g'));
- if (!valid) {
- throw new Error('must supply { ' + requiredAttrs.join(', ') + ' } with ' + type);
- }
- };
+ this._graphicsFactory.drawConnection((0,_util_GraphicsUtil__WEBPACK_IMPORTED_MODULE_2__.getVisual)(gfx), element);
+ } else {
+ gfx = this._graphicsFactory._createContainer('shape', (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('g'));
- Canvas.prototype._setParent = function (element, parent, parentIndex) {
- (0, _Collections.add)(parent.children, element, parentIndex);
- element.parent = parent;
- };
- /**
- * Adds an element to the canvas.
- *
- * This wires the parent <-> child relationship between the element and
- * a explicitly specified parent or an implicit root element.
- *
- * During add it emits the events
- *
- * * <{type}.add> (element, parent)
- * * <{type}.added> (element, gfx)
- *
- * Extensions may hook into these events to perform their magic.
- *
- * @param {string} type
- * @param {Object|djs.model.Base} element
- * @param {Object|djs.model.Base} [parent]
- * @param {number} [parentIndex]
- *
- * @return {Object|djs.model.Base} the added element
- */
+ this._graphicsFactory.drawShape((0,_util_GraphicsUtil__WEBPACK_IMPORTED_MODULE_2__.getVisual)(gfx), element);
+ (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_3__.translate)(gfx, element.x, element.y);
+ }
- Canvas.prototype._addElement = function (type, element, parent, parentIndex) {
- parent = parent || this.getRootElement();
- var eventBus = this._eventBus,
- graphicsFactory = this._graphicsFactory;
+ this._previewSupport.addDragger(element, layer, gfx);
+ });
- this._ensureValid(type, element);
+ // elements to be moved
+ moved.forEach(({ element, delta }) => {
+ this._previewSupport.addDragger(element, layer, undefined, 'djs-dragging');
- eventBus.fire(type + '.add', {
- element: element,
- parent: parent
- });
+ this._canvas.addMarker(element, 'djs-element-hidden');
- this._setParent(element, parent, parentIndex); // create graphics
+ this._markers.push([ element, 'djs-element-hidden' ]);
+ const dragger = this._previewSupport.addDragger(element, layer);
- var gfx = graphicsFactory.create(type, element, parentIndex);
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.isConnection)(element)) {
+ (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_3__.translate)(dragger, delta.x, delta.y);
+ } else {
+ (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_3__.translate)(dragger, element.x + delta.x, element.y + delta.y);
+ }
+ });
- this._elementRegistry.add(element, gfx); // update its visual
+ // elements to be removed
+ removed.forEach(element => {
+ this._previewSupport.addDragger(element, layer, undefined, 'djs-dragging');
+ this._canvas.addMarker(element, 'djs-element-hidden');
- graphicsFactory.update(type, element, gfx);
- eventBus.fire(type + '.added', {
- element: element,
- gfx: gfx
- });
- return element;
- };
- /**
- * Adds a shape to the canvas
- *
- * @param {Object|djs.model.Shape} shape to add to the diagram
- * @param {djs.model.Base} [parent]
- * @param {number} [parentIndex]
- *
- * @return {djs.model.Shape} the added shape
- */
+ this._markers.push([ element, 'djs-element-hidden' ]);
+ });
+ // elements to be resized
+ resized.forEach(({ shape, bounds }) => {
+ this._canvas.addMarker(shape, 'djs-hidden');
- Canvas.prototype.addShape = function (shape, parent, parentIndex) {
- return this._addElement('shape', shape, parent, parentIndex);
- };
- /**
- * Adds a connection to the canvas
- *
- * @param {Object|djs.model.Connection} connection to add to the diagram
- * @param {djs.model.Base} [parent]
- * @param {number} [parentIndex]
- *
- * @return {djs.model.Connection} the added connection
- */
+ this._markers.push([ shape, 'djs-hidden' ]);
+ this._previewSupport.addDragger(shape, layer, undefined, 'djs-dragging');
- Canvas.prototype.addConnection = function (connection, parent, parentIndex) {
- return this._addElement('connection', connection, parent, parentIndex);
- };
- /**
- * Internal remove element
- */
+ const gfx = this._graphicsFactory._createContainer('shape', (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('g'));
+ this._graphicsFactory.drawShape((0,_util_GraphicsUtil__WEBPACK_IMPORTED_MODULE_2__.getVisual)(gfx), shape, {
+ width: bounds.width,
+ height: bounds.height
+ });
- Canvas.prototype._removeElement = function (element, type) {
- var elementRegistry = this._elementRegistry,
- graphicsFactory = this._graphicsFactory,
- eventBus = this._eventBus;
- element = elementRegistry.get(element.id || element);
+ (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_3__.translate)(gfx, bounds.x, bounds.y);
- if (!element) {
- // element was removed already
- return;
- }
+ this._previewSupport.addDragger(shape, layer, gfx);
+ });
+ }
- eventBus.fire(type + '.remove', {
- element: element
- });
- graphicsFactory.remove(element); // unset parent <-> child relationship
+ cleanUp() {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.clear)(this._canvas.getLayer(LAYER_NAME));
- (0, _Collections.remove)(element.parent && element.parent.children, element);
- element.parent = null;
- eventBus.fire(type + '.removed', {
- element: element
- });
- elementRegistry.remove(element);
- return element;
- };
- /**
- * Removes a shape from the canvas
- *
- * @param {string|djs.model.Shape} shape or shape id to be removed
- *
- * @return {djs.model.Shape} the removed shape
- */
+ this._markers.forEach(([ element, marker ]) => this._canvas.removeMarker(element, marker));
+ this._markers = [];
- Canvas.prototype.removeShape = function (shape) {
- /**
- * An event indicating that a shape is about to be removed from the canvas.
- *
- * @memberOf Canvas
- *
- * @event shape.remove
- * @type {Object}
- * @property {djs.model.Shape} element the shape descriptor
- * @property {Object} gfx the graphical representation of the shape
- */
-
- /**
- * An event indicating that a shape has been removed from the canvas.
- *
- * @memberOf Canvas
- *
- * @event shape.removed
- * @type {Object}
- * @property {djs.model.Shape} element the shape descriptor
- * @property {Object} gfx the graphical representation of the shape
- */
- return this._removeElement(shape, 'shape');
- };
- /**
- * Removes a connection from the canvas
- *
- * @param {string|djs.model.Connection} connection or connection id to be removed
- *
- * @return {djs.model.Connection} the removed connection
- */
+ this._previewSupport.cleanUp();
+ }
+ show() {
+ this._canvas.showLayer(LAYER_NAME);
+ }
- Canvas.prototype.removeConnection = function (connection) {
- /**
- * An event indicating that a connection is about to be removed from the canvas.
- *
- * @memberOf Canvas
- *
- * @event connection.remove
- * @type {Object}
- * @property {djs.model.Connection} element the connection descriptor
- * @property {Object} gfx the graphical representation of the connection
- */
-
- /**
- * An event indicating that a connection has been removed from the canvas.
- *
- * @memberOf Canvas
- *
- * @event connection.removed
- * @type {Object}
- * @property {djs.model.Connection} element the connection descriptor
- * @property {Object} gfx the graphical representation of the connection
- */
- return this._removeElement(connection, 'connection');
- };
- /**
- * Return the graphical object underlaying a certain diagram element
- *
- * @param {string|djs.model.Base} element descriptor of the element
- * @param {boolean} [secondary=false] whether to return the secondary connected element
- *
- * @return {SVGElement}
- */
+ hide() {
+ this._canvas.hideLayer(LAYER_NAME);
+ }
+}
+ComplexPreview.$inject = [
+ 'canvas',
+ 'graphicsFactory',
+ 'previewSupport'
+];
- Canvas.prototype.getGraphics = function (element, secondary) {
- return this._elementRegistry.getGraphics(element, secondary);
- };
- /**
- * Perform a viewbox update via a given change function.
- *
- * @param {Function} changeFn
- */
+function isHidden(element) {
+ return element.hidden;
+}
+/***/ }),
- Canvas.prototype._changeViewbox = function (changeFn) {
- // notify others of the upcoming viewbox change
- this._eventBus.fire('canvas.viewbox.changing'); // perform actual change
+/***/ "../node_modules/diagram-js/lib/features/complex-preview/index.js":
+/*!************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/complex-preview/index.js ***!
+ \************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _preview_support__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../preview-support */ "../node_modules/diagram-js/lib/features/preview-support/index.js");
+/* harmony import */ var _ComplexPreview__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ComplexPreview */ "../node_modules/diagram-js/lib/features/complex-preview/ComplexPreview.js");
- changeFn.apply(this); // reset the cached viewbox so that
- // a new get operation on viewbox or zoom
- // triggers a viewbox re-computation
- this._cachedViewbox = null; // notify others of the change; this step
- // may or may not be debounced
- this._viewboxChanged();
- };
- Canvas.prototype._viewboxChanged = function () {
- this._eventBus.fire('canvas.viewbox.changed', {
- viewbox: this.viewbox()
- });
- };
- /**
- * Gets or sets the view box of the canvas, i.e. the
- * area that is currently displayed.
- *
- * The getter may return a cached viewbox (if it is currently
- * changing). To force a recomputation, pass `false` as the first argument.
- *
- * @example
- *
- * canvas.viewbox({ x: 100, y: 100, width: 500, height: 500 })
- *
- * // sets the visible area of the diagram to (100|100) -> (600|100)
- * // and and scales it according to the diagram width
- *
- * var viewbox = canvas.viewbox(); // pass `false` to force recomputing the box.
- *
- * console.log(viewbox);
- * // {
- * // inner: Dimensions,
- * // outer: Dimensions,
- * // scale,
- * // x, y,
- * // width, height
- * // }
- *
- * // if the current diagram is zoomed and scrolled, you may reset it to the
- * // default zoom via this method, too:
- *
- * var zoomedAndScrolledViewbox = canvas.viewbox();
- *
- * canvas.viewbox({
- * x: 0,
- * y: 0,
- * width: zoomedAndScrolledViewbox.outer.width,
- * height: zoomedAndScrolledViewbox.outer.height
- * });
- *
- * @param {Object} [box] the new view box to set
- * @param {number} box.x the top left X coordinate of the canvas visible in view box
- * @param {number} box.y the top left Y coordinate of the canvas visible in view box
- * @param {number} box.width the visible width
- * @param {number} box.height
- *
- * @return {Object} the current view box
- */
+/**
+ * @type { import('didi').ModuleDeclaration }
+ */
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [ _preview_support__WEBPACK_IMPORTED_MODULE_0__["default"] ],
+ __init__: [ 'complexPreview' ],
+ complexPreview: [ 'type', _ComplexPreview__WEBPACK_IMPORTED_MODULE_1__["default"] ]
+});
+/***/ }),
- Canvas.prototype.viewbox = function (box) {
- if (box === undefined && this._cachedViewbox) {
- return this._cachedViewbox;
- }
-
- var viewport = this._viewport,
- innerBox,
- outerBox = this.getSize(),
- matrix,
- transform,
- scale,
- x,
- y;
-
- if (!box) {
- // compute the inner box based on the
- // diagrams default layer. This allows us to exclude
- // external components, such as overlays
- innerBox = this.getDefaultLayer().getBBox();
- transform = (0, _tinySvg.transform)(viewport);
- matrix = transform ? transform.matrix : (0, _tinySvg.createMatrix)();
- scale = round(matrix.a, 1000);
- x = round(-matrix.e || 0, 1000);
- y = round(-matrix.f || 0, 1000);
- box = this._cachedViewbox = {
- x: x ? x / scale : 0,
- y: y ? y / scale : 0,
- width: outerBox.width / scale,
- height: outerBox.height / scale,
- scale: scale,
- inner: {
- width: innerBox.width,
- height: innerBox.height,
- x: innerBox.x,
- y: innerBox.y
- },
- outer: outerBox
- };
- return box;
- } else {
- this._changeViewbox(function () {
- scale = Math.min(outerBox.width / box.width, outerBox.height / box.height);
+/***/ "../node_modules/diagram-js/lib/features/connect/Connect.js":
+/*!******************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/connect/Connect.js ***!
+ \******************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var matrix = this._svg.createSVGMatrix().scale(scale).translate(-box.x, -box.y);
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ Connect),
+/* harmony export */ isReverse: () => (/* binding */ isReverse)
+/* harmony export */ });
+/* harmony import */ var _layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
- (0, _tinySvg.transform)(viewport, matrix);
- });
- }
- return box;
- };
- /**
- * Gets or sets the scroll of the canvas.
- *
- * @param {Object} [delta] the new scroll to apply.
- *
- * @param {number} [delta.dx]
- * @param {number} [delta.dy]
- */
- Canvas.prototype.scroll = function (delta) {
- var node = this._viewport;
- var matrix = node.getCTM();
+/**
+ * @typedef {import('../../model/Types').Element} Element
+ *
+ * @typedef {import('../../util/Types').Point} Point
+ *
+ * @typedef {import('../dragging/Dragging').default} Dragging
+ * @typedef {import('../../core/EventBus').default} EventBus
+ * @typedef {import('../modeling/Modeling').default} Modeling
+ * @typedef {import('../rules/Rules').default} Rules
+ */
- if (delta) {
- this._changeViewbox(function () {
- delta = (0, _minDash.assign)({
- dx: 0,
- dy: 0
- }, delta || {});
- matrix = this._svg.createSVGMatrix().translate(delta.dx, delta.dy).multiply(matrix);
- setCTM(node, matrix);
- });
- }
+/**
+ * @param {EventBus} eventBus
+ * @param {Dragging} dragging
+ * @param {Modeling} modeling
+ * @param {Rules} rules
+ */
+function Connect(eventBus, dragging, modeling, rules) {
- return {
- x: matrix.e,
- y: matrix.f
- };
- };
- /**
- * Gets or sets the current zoom of the canvas, optionally zooming
- * to the specified position.
- *
- * The getter may return a cached zoom level. Call it with `false` as
- * the first argument to force recomputation of the current level.
- *
- * @param {string|number} [newScale] the new zoom level, either a number, i.e. 0.9,
- * or `fit-viewport` to adjust the size to fit the current viewport
- * @param {string|Point} [center] the reference point { x: .., y: ..} to zoom to, 'auto' to zoom into mid or null
- *
- * @return {number} the current scale
- */
+ // rules
+ function canConnect(source, target) {
+ return rules.allowed('connection.create', {
+ source: source,
+ target: target
+ });
+ }
- Canvas.prototype.zoom = function (newScale, center) {
- if (!newScale) {
- return this.viewbox(newScale).scale;
- }
+ function canConnectReverse(source, target) {
+ return canConnect(target, source);
+ }
- if (newScale === 'fit-viewport') {
- return this._fitViewport(center);
- }
- var outer, matrix;
+ // event handlers
- this._changeViewbox(function () {
- if (typeof center !== 'object') {
- outer = this.viewbox().outer;
- center = {
- x: outer.width / 2,
- y: outer.height / 2
- };
- }
+ eventBus.on('connect.hover', function(event) {
+ var context = event.context,
+ start = context.start,
+ hover = event.hover,
+ canExecute;
- matrix = this._setZoom(newScale, center);
- });
+ // cache hover state
+ context.hover = hover;
- return round(matrix.a, 1000);
- };
+ canExecute = context.canExecute = canConnect(start, hover);
- function setCTM(node, m) {
- var mstr = 'matrix(' + m.a + ',' + m.b + ',' + m.c + ',' + m.d + ',' + m.e + ',' + m.f + ')';
- node.setAttribute('transform', mstr);
- }
+ // ignore hover
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNil)(canExecute)) {
+ return;
+ }
- Canvas.prototype._fitViewport = function (center) {
- var vbox = this.viewbox(),
- outer = vbox.outer,
- inner = vbox.inner,
- newScale,
- newViewbox; // display the complete diagram without zooming in.
- // instead of relying on internal zoom, we perform a
- // hard reset on the canvas viewbox to realize this
- //
- // if diagram does not need to be zoomed in, we focus it around
- // the diagram origin instead
-
- if (inner.x >= 0 && inner.y >= 0 && inner.x + inner.width <= outer.width && inner.y + inner.height <= outer.height && !center) {
- newViewbox = {
- x: 0,
- y: 0,
- width: Math.max(inner.width + inner.x, outer.width),
- height: Math.max(inner.height + inner.y, outer.height)
- };
- } else {
- newScale = Math.min(1, outer.width / inner.width, outer.height / inner.height);
- newViewbox = {
- x: inner.x + (center ? inner.width / 2 - outer.width / newScale / 2 : 0),
- y: inner.y + (center ? inner.height / 2 - outer.height / newScale / 2 : 0),
- width: outer.width / newScale,
- height: outer.height / newScale
- };
- }
+ if (canExecute !== false) {
+ context.source = start;
+ context.target = hover;
- this.viewbox(newViewbox);
- return this.viewbox(false).scale;
- };
+ return;
+ }
- Canvas.prototype._setZoom = function (scale, center) {
- var svg = this._svg,
- viewport = this._viewport;
- var matrix = svg.createSVGMatrix();
- var point = svg.createSVGPoint();
- var centerPoint, originalPoint, currentMatrix, scaleMatrix, newMatrix;
- currentMatrix = viewport.getCTM();
- var currentScale = currentMatrix.a;
+ canExecute = context.canExecute = canConnectReverse(start, hover);
- if (center) {
- centerPoint = (0, _minDash.assign)(point, center); // revert applied viewport transformations
+ // ignore hover
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNil)(canExecute)) {
+ return;
+ }
- originalPoint = centerPoint.matrixTransform(currentMatrix.inverse()); // create scale matrix
+ if (canExecute !== false) {
+ context.source = hover;
+ context.target = start;
+ }
+ });
- scaleMatrix = matrix.translate(originalPoint.x, originalPoint.y).scale(1 / currentScale * scale).translate(-originalPoint.x, -originalPoint.y);
- newMatrix = currentMatrix.multiply(scaleMatrix);
- } else {
- newMatrix = matrix.scale(scale);
- }
+ eventBus.on([ 'connect.out', 'connect.cleanup' ], function(event) {
+ var context = event.context;
- setCTM(this._viewport, newMatrix);
- return newMatrix;
- };
- /**
- * Returns the size of the canvas
- *
- * @return {Dimensions}
- */
+ context.hover = null;
+ context.source = null;
+ context.target = null;
+ context.canExecute = false;
+ });
- Canvas.prototype.getSize = function () {
- return {
- width: this._container.clientWidth,
- height: this._container.clientHeight
- };
+ eventBus.on('connect.end', function(event) {
+ var context = event.context,
+ canExecute = context.canExecute,
+ connectionStart = context.connectionStart,
+ connectionEnd = {
+ x: event.x,
+ y: event.y
+ },
+ source = context.source,
+ target = context.target;
+
+ if (!canExecute) {
+ return false;
+ }
+
+ var attrs = null,
+ hints = {
+ connectionStart: isReverse(context) ? connectionEnd : connectionStart,
+ connectionEnd: isReverse(context) ? connectionStart : connectionEnd
};
- /**
- * Return the absolute bounding box for the given element
- *
- * The absolute bounding box may be used to display overlays in the
- * callers (browser) coordinate system rather than the zoomed in/out
- * canvas coordinates.
- *
- * @param {ElementDescriptor} element
- * @return {Bounds} the absolute bounding box
- */
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isObject)(canExecute)) {
+ attrs = canExecute;
+ }
- Canvas.prototype.getAbsoluteBBox = function (element) {
- var vbox = this.viewbox();
- var bbox; // connection
- // use svg bbox
+ context.connection = modeling.connect(source, target, attrs, hints);
+ });
- if (element.waypoints) {
- var gfx = this.getGraphics(element);
- bbox = gfx.getBBox();
- } // shapes
- // use data
- else {
- bbox = element;
- }
-
- var x = bbox.x * vbox.scale - vbox.x * vbox.scale;
- var y = bbox.y * vbox.scale - vbox.y * vbox.scale;
- var width = bbox.width * vbox.scale;
- var height = bbox.height * vbox.scale;
- return {
- x: x,
- y: y,
- width: width,
- height: height
- };
- };
- /**
- * Fires an event in order other modules can react to the
- * canvas resizing
- */
+ // API
- Canvas.prototype.resized = function () {
- // force recomputation of view box
- delete this._cachedViewbox;
+ /**
+ * Start connect operation.
+ *
+ * @param {MouseEvent|TouchEvent} event
+ * @param {Element} start
+ * @param {Point} [connectionStart]
+ * @param {boolean} [autoActivate=false]
+ */
+ this.start = function(event, start, connectionStart, autoActivate) {
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isObject)(connectionStart)) {
+ autoActivate = connectionStart;
+ connectionStart = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(start);
+ }
+
+ dragging.init(event, 'connect', {
+ autoActivate: autoActivate,
+ data: {
+ shape: start,
+ context: {
+ start: start,
+ connectionStart: connectionStart
+ }
+ }
+ });
+ };
+}
+
+Connect.$inject = [
+ 'eventBus',
+ 'dragging',
+ 'modeling',
+ 'rules'
+];
+
+
+// helpers //////////
+
+function isReverse(context) {
+ var hover = context.hover,
+ source = context.source,
+ target = context.target;
+
+ return hover && source && hover === source && source !== target;
+}
+
+/***/ }),
+
+/***/ "../node_modules/diagram-js/lib/features/connect/ConnectPreview.js":
+/*!*************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/connect/ConnectPreview.js ***!
+ \*************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ ConnectPreview)
+/* harmony export */ });
+/* harmony import */ var _Connect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Connect */ "../node_modules/diagram-js/lib/features/connect/Connect.js");
+
+
+/**
+ * @typedef {import('didi').Injector} Injector
+ *
+ * @typedef {import('../../core/Canvas').default} Canvas
+ * @typedef {import('../../core/EventBus').default} EventBus
+ */
- this._eventBus.fire('canvas.resized');
- };
+var HIGH_PRIORITY = 1100,
+ LOW_PRIORITY = 900;
- },{"../util/Collections":418,"../util/Elements":420,"min-dash":646,"tiny-svg":658}],254:[function(require,module,exports){
- "use strict";
+var MARKER_OK = 'connect-ok',
+ MARKER_NOT_OK = 'connect-not-ok';
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = ElementFactory;
+/**
+ * Shows connection preview during connect.
+ *
+ * @param {Injector} injector
+ * @param {EventBus} eventBus
+ * @param {Canvas} canvas
+ */
+function ConnectPreview(injector, eventBus, canvas) {
+ var connectionPreview = injector.get('connectionPreview', false);
+
+ connectionPreview && eventBus.on('connect.move', function(event) {
+ var context = event.context,
+ canConnect = context.canExecute,
+ hover = context.hover,
+ source = context.source,
+ start = context.start,
+ startPosition = context.startPosition,
+ target = context.target,
+ connectionStart = context.connectionStart || startPosition,
+ connectionEnd = context.connectionEnd || {
+ x: event.x,
+ y: event.y
+ },
+ previewStart = connectionStart,
+ previewEnd = connectionEnd;
+
+ if ((0,_Connect__WEBPACK_IMPORTED_MODULE_0__.isReverse)(context)) {
+ previewStart = connectionEnd;
+ previewEnd = connectionStart;
+ }
+
+ connectionPreview.drawPreview(context, canConnect, {
+ source: source || start,
+ target: target || hover,
+ connectionStart: previewStart,
+ connectionEnd: previewEnd
+ });
+ });
+
+ eventBus.on('connect.hover', LOW_PRIORITY, function(event) {
+ var context = event.context,
+ hover = event.hover,
+ canExecute = context.canExecute;
+
+ // ignore hover
+ if (canExecute === null) {
+ return;
+ }
+
+ canvas.addMarker(hover, canExecute ? MARKER_OK : MARKER_NOT_OK);
+ });
+
+ eventBus.on([
+ 'connect.out',
+ 'connect.cleanup'
+ ], HIGH_PRIORITY, function(event) {
+ var hover = event.hover;
+
+ if (hover) {
+ canvas.removeMarker(hover, MARKER_OK);
+ canvas.removeMarker(hover, MARKER_NOT_OK);
+ }
+ });
+
+ connectionPreview && eventBus.on('connect.cleanup', function(event) {
+ connectionPreview.cleanUp(event.context);
+ });
+}
+
+ConnectPreview.$inject = [
+ 'injector',
+ 'eventBus',
+ 'canvas'
+];
+
+
+/***/ }),
+
+/***/ "../node_modules/diagram-js/lib/features/connect/index.js":
+/*!****************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/connect/index.js ***!
+ \****************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../selection */ "../node_modules/diagram-js/lib/features/selection/index.js");
+/* harmony import */ var _rules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../rules */ "../node_modules/diagram-js/lib/features/rules/index.js");
+/* harmony import */ var _dragging__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../dragging */ "../node_modules/diagram-js/lib/features/dragging/index.js");
+/* harmony import */ var _Connect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Connect */ "../node_modules/diagram-js/lib/features/connect/Connect.js");
+/* harmony import */ var _ConnectPreview__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ConnectPreview */ "../node_modules/diagram-js/lib/features/connect/ConnectPreview.js");
+
+
+
+
+
+
+
+
+/**
+ * @type { import('didi').ModuleDeclaration }
+ */
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ _selection__WEBPACK_IMPORTED_MODULE_0__["default"],
+ _rules__WEBPACK_IMPORTED_MODULE_1__["default"],
+ _dragging__WEBPACK_IMPORTED_MODULE_2__["default"]
+ ],
+ __init__: [
+ 'connectPreview'
+ ],
+ connect: [ 'type', _Connect__WEBPACK_IMPORTED_MODULE_3__["default"] ],
+ connectPreview: [ 'type', _ConnectPreview__WEBPACK_IMPORTED_MODULE_4__["default"] ]
+});
- var _model = require("../model");
- var _minDash = require("min-dash");
+/***/ }),
- /**
- * A factory for diagram-js shapes
- */
- function ElementFactory() {
- this._uid = 12;
- }
+/***/ "../node_modules/diagram-js/lib/features/connection-preview/ConnectionPreview.js":
+/*!***************************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/connection-preview/ConnectionPreview.js ***!
+ \***************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- ElementFactory.prototype.createRoot = function (attrs) {
- return this.create('root', attrs);
- };
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ ConnectionPreview)
+/* harmony export */ });
+/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tiny-svg */ "../node_modules/tiny-svg/dist/index.esm.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../layout/LayoutUtil */ "../node_modules/diagram-js/lib/layout/LayoutUtil.js");
+/* harmony import */ var _util_RenderUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/RenderUtil */ "../node_modules/diagram-js/lib/util/RenderUtil.js");
- ElementFactory.prototype.createLabel = function (attrs) {
- return this.create('label', attrs);
- };
- ElementFactory.prototype.createShape = function (attrs) {
- return this.create('shape', attrs);
- };
- ElementFactory.prototype.createConnection = function (attrs) {
- return this.create('connection', attrs);
- };
- /**
- * Create a model element with the given type and
- * a number of pre-set attributes.
- *
- * @param {string} type
- * @param {Object} attrs
- * @return {djs.model.Base} the newly created model instance
- */
- ElementFactory.prototype.create = function (type, attrs) {
- attrs = (0, _minDash.assign)({}, attrs || {});
- if (!attrs.id) {
- attrs.id = type + '_' + this._uid++;
- }
- return (0, _model.create)(type, attrs);
- };
- },{"../model":407,"min-dash":646}],255:[function(require,module,exports){
- "use strict";
+/**
+ * @typedef {import('../../model/Types').Element} Element
+ * @typedef {import('../../model/Types').Connection} Connection
+ * @typedef {import('../../model/Types').Shape} Shape
+ *
+ * @typedef {import('../../util/Types').Point} Point
+ *
+ * @typedef {import('didi').Injector} Injector
+ *
+ * @typedef {import('../../core/Canvas').default} Canvas
+ * @typedef {import('../../core/ElementFactory').default} ElementFactory
+ * @typedef {import('../../core/GraphicsFactory').default} GraphicsFactory
+ */
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = ElementRegistry;
+var MARKER_CONNECTION_PREVIEW = 'djs-dragger';
- var _tinySvg = require("tiny-svg");
+/**
+ * Draws connection preview. Optionally, this can use layouter and connection docking to draw
+ * better looking previews.
+ *
+ * @param {Injector} injector
+ * @param {Canvas} canvas
+ * @param {GraphicsFactory} graphicsFactory
+ * @param {ElementFactory} elementFactory
+ */
+function ConnectionPreview(
+ injector,
+ canvas,
+ graphicsFactory,
+ elementFactory
+) {
+ this._canvas = canvas;
+ this._graphicsFactory = graphicsFactory;
+ this._elementFactory = elementFactory;
+
+ // optional components
+ this._connectionDocking = injector.get('connectionDocking', false);
+ this._layouter = injector.get('layouter', false);
+}
+
+ConnectionPreview.$inject = [
+ 'injector',
+ 'canvas',
+ 'graphicsFactory',
+ 'elementFactory'
+];
+
+/**
+ * Draw connection preview.
+ *
+ * Provide at least one of
and to create a preview.
+ * In the clean up stage, call `connectionPreview#cleanUp` with the context to remove preview.
+ *
+ * @param {Object} context
+ * @param {Object|boolean} canConnect
+ * @param {Object} hints
+ * @param {Element} [hints.source] source element
+ * @param {Element} [hints.target] target element
+ * @param {Point} [hints.connectionStart] connection preview start
+ * @param {Point} [hints.connectionEnd] connection preview end
+ * @param {Point[]} [hints.waypoints] provided waypoints for preview
+ * @param {boolean} [hints.noLayout] true if preview should not be laid out
+ * @param {boolean} [hints.noCropping] true if preview should not be cropped
+ * @param {boolean} [hints.noNoop] true if simple connection should not be drawn
+ */
+ConnectionPreview.prototype.drawPreview = function(context, canConnect, hints) {
+
+ hints = hints || {};
+
+ var connectionPreviewGfx = context.connectionPreviewGfx,
+ getConnection = context.getConnection,
+ source = hints.source,
+ target = hints.target,
+ waypoints = hints.waypoints,
+ connectionStart = hints.connectionStart,
+ connectionEnd = hints.connectionEnd,
+ noLayout = hints.noLayout,
+ noCropping = hints.noCropping,
+ noNoop = hints.noNoop,
+ connection;
+
+ var self = this;
+
+ if (!connectionPreviewGfx) {
+ connectionPreviewGfx = context.connectionPreviewGfx = this.createConnectionPreviewGfx();
+ }
+
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.clear)(connectionPreviewGfx);
+
+ if (!getConnection) {
+ getConnection = context.getConnection = cacheReturnValues(function(canConnect, source, target) {
+ return self.getConnection(canConnect, source, target);
+ });
+ }
+
+ if (canConnect) {
+ connection = getConnection(canConnect, source, target);
+ }
+
+ if (!connection) {
+ !noNoop && this.drawNoopPreview(connectionPreviewGfx, hints);
+ return;
+ }
+
+ connection.waypoints = waypoints || [];
+
+ // optional layout
+ if (this._layouter && !noLayout) {
+ connection.waypoints = this._layouter.layoutConnection(connection, {
+ source: source,
+ target: target,
+ connectionStart: connectionStart,
+ connectionEnd: connectionEnd,
+ waypoints: hints.waypoints || connection.waypoints
+ });
+ }
+
+ // fallback if no waypoints were provided nor created with layouter
+ if (!connection.waypoints || !connection.waypoints.length) {
+ connection.waypoints = [
+ source ? (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(source) : connectionStart,
+ target ? (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(target) : connectionEnd
+ ];
+ }
+
+ // optional cropping
+ if (this._connectionDocking && (source || target) && !noCropping) {
+ connection.waypoints = this._connectionDocking.getCroppedWaypoints(connection, source, target);
+ }
+
+ this._graphicsFactory.drawConnection(connectionPreviewGfx, connection, {
+ stroke: 'var(--element-dragger-color)'
+ });
+};
+
+/**
+ * Draw simple connection between source and target or provided points.
+ *
+ * @param {SVGElement} connectionPreviewGfx container for the connection
+ * @param {Object} hints
+ * @param {Element} [hints.source] source element
+ * @param {Element} [hints.target] target element
+ * @param {Point} [hints.connectionStart] required if source is not provided
+ * @param {Point} [hints.connectionEnd] required if target is not provided
+ */
+ConnectionPreview.prototype.drawNoopPreview = function(connectionPreviewGfx, hints) {
+ var source = hints.source,
+ target = hints.target,
+ start = hints.connectionStart || (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(source),
+ end = hints.connectionEnd || (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(target);
- var ELEMENT_ID = 'data-element-id';
+ var waypoints = this.cropWaypoints(start, end, source, target);
- /**
- * @class
- *
- * A registry that keeps track of all shapes in the diagram.
- */
- function ElementRegistry(eventBus) {
- this._elements = {};
- this._eventBus = eventBus;
- }
+ var connection = this.createNoopConnection(waypoints[0], waypoints[1]);
- ElementRegistry.$inject = ['eventBus'];
- /**
- * Register a pair of (element, gfx, (secondaryGfx)).
- *
- * @param {djs.model.Base} element
- * @param {SVGElement} gfx
- * @param {SVGElement} [secondaryGfx] optional other element to register, too
- */
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.append)(connectionPreviewGfx, connection);
+};
- ElementRegistry.prototype.add = function (element, gfx, secondaryGfx) {
- var id = element.id;
+/**
+ * Return cropped waypoints.
+ *
+ * @param {Point} start
+ * @param {Point} end
+ * @param {Element} source
+ * @param {Element} target
+ *
+ * @return {Point[]}
+ */
+ConnectionPreview.prototype.cropWaypoints = function(start, end, source, target) {
+ var graphicsFactory = this._graphicsFactory,
+ sourcePath = source && graphicsFactory.getShapePath(source),
+ targetPath = target && graphicsFactory.getShapePath(target),
+ connectionPath = graphicsFactory.getConnectionPath({ waypoints: [ start, end ] });
- this._validateId(id); // associate dom node with element
+ start = (source && (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getElementLineIntersection)(sourcePath, connectionPath, true)) || start;
+ end = (target && (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getElementLineIntersection)(targetPath, connectionPath, false)) || end;
+ return [ start, end ];
+};
- (0, _tinySvg.attr)(gfx, ELEMENT_ID, id);
+/**
+ * Remove connection preview container if it exists.
+ *
+ * @param {Object} [context]
+ * @param {SVGElement} [context.connectionPreviewGfx] preview container
+ */
+ConnectionPreview.prototype.cleanUp = function(context) {
+ if (context && context.connectionPreviewGfx) {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.remove)(context.connectionPreviewGfx);
+ }
+};
+
+/**
+ * Get connection that connects source and target.
+ *
+ * @param {Object|boolean} canConnect
+ *
+ * @return {Connection}
+ */
+ConnectionPreview.prototype.getConnection = function(canConnect) {
+ var attrs = ensureConnectionAttrs(canConnect);
- if (secondaryGfx) {
- (0, _tinySvg.attr)(secondaryGfx, ELEMENT_ID, id);
- }
+ return this._elementFactory.createConnection(attrs);
+};
- this._elements[id] = {
- element: element,
- gfx: gfx,
- secondaryGfx: secondaryGfx
- };
- };
- /**
- * Removes an element from the registry.
- *
- * @param {djs.model.Base} element
- */
+/**
+ * Add and return preview graphics.
+ *
+ * @return {SVGElement}
+ */
+ConnectionPreview.prototype.createConnectionPreviewGfx = function() {
+ var gfx = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.create)('g');
- ElementRegistry.prototype.remove = function (element) {
- var elements = this._elements,
- id = element.id || element,
- container = id && elements[id];
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(gfx, {
+ pointerEvents: 'none'
+ });
- if (container) {
- // unset element id on gfx
- (0, _tinySvg.attr)(container.gfx, ELEMENT_ID, '');
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.classes)(gfx).add(MARKER_CONNECTION_PREVIEW);
- if (container.secondaryGfx) {
- (0, _tinySvg.attr)(container.secondaryGfx, ELEMENT_ID, '');
- }
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.append)(this._canvas.getActiveLayer(), gfx);
- delete elements[id];
- }
- };
- /**
- * Update the id of an element
- *
- * @param {djs.model.Base} element
- * @param {string} newId
- */
+ return gfx;
+};
+/**
+ * Create and return simple connection.
+ *
+ * @param {Point} start
+ * @param {Point} end
+ *
+ * @return {SVGElement}
+ */
+ConnectionPreview.prototype.createNoopConnection = function(start, end) {
+ return (0,_util_RenderUtil__WEBPACK_IMPORTED_MODULE_2__.createLine)([ start, end ], {
+ 'stroke': '#333',
+ 'strokeDasharray': [ 1 ],
+ 'strokeWidth': 2,
+ 'pointer-events': 'none'
+ });
+};
+
+// helpers //////////
+
+/**
+ * Returns function that returns cached return values referenced by stringified first argument.
+ *
+ * @param {Function} fn
+ *
+ * @return {Function}
+ */
+function cacheReturnValues(fn) {
+ var returnValues = {};
- ElementRegistry.prototype.updateId = function (element, newId) {
- this._validateId(newId);
+ /**
+ * Return cached return value referenced by stringified first argument.
+ *
+ * @return {*}
+ */
+ return function(firstArgument) {
+ var key = JSON.stringify(firstArgument);
- if (typeof element === 'string') {
- element = this.get(element);
- }
+ var returnValue = returnValues[key];
- this._eventBus.fire('element.updateId', {
- element: element,
- newId: newId
- });
+ if (!returnValue) {
+ returnValue = returnValues[key] = fn.apply(null, arguments);
+ }
- var gfx = this.getGraphics(element),
- secondaryGfx = this.getGraphics(element, true);
- this.remove(element);
- element.id = newId;
- this.add(element, gfx, secondaryGfx);
- };
- /**
- * Return the model element for a given id or graphics.
- *
- * @example
- *
- * elementRegistry.get('SomeElementId_1');
- * elementRegistry.get(gfx);
- *
- *
- * @param {string|SVGElement} filter for selecting the element
- *
- * @return {djs.model.Base}
- */
+ return returnValue;
+ };
+}
+/**
+ * Ensure connection attributes is object.
+ *
+ * @param {Object|boolean} canConnect
+ *
+ * @return {Object}
+ */
+function ensureConnectionAttrs(canConnect) {
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_3__.isObject)(canConnect)) {
+ return canConnect;
+ } else {
+ return {};
+ }
+}
- ElementRegistry.prototype.get = function (filter) {
- var id;
- if (typeof filter === 'string') {
- id = filter;
- } else {
- id = filter && (0, _tinySvg.attr)(filter, ELEMENT_ID);
- }
+/***/ }),
- var container = this._elements[id];
- return container && container.element;
- };
- /**
- * Return all elements that match a given filter function.
- *
- * @param {Function} fn
- *
- * @return {Array}
- */
+/***/ "../node_modules/diagram-js/lib/features/connection-preview/index.js":
+/*!***************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/connection-preview/index.js ***!
+ \***************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _ConnectionPreview__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ConnectionPreview */ "../node_modules/diagram-js/lib/features/connection-preview/ConnectionPreview.js");
- ElementRegistry.prototype.filter = function (fn) {
- var filtered = [];
- this.forEach(function (element, gfx) {
- if (fn(element, gfx)) {
- filtered.push(element);
- }
- });
- return filtered;
- };
- /**
- * Return all rendered model elements.
- *
- * @return {Array}
- */
- ElementRegistry.prototype.getAll = function () {
- return this.filter(function (e) {
- return e;
- });
- };
- /**
- * Iterate over all diagram elements.
- *
- * @param {Function} fn
- */
+/**
+ * @type { import('didi').ModuleDeclaration }
+ */
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __init__: [ 'connectionPreview' ],
+ connectionPreview: [ 'type', _ConnectionPreview__WEBPACK_IMPORTED_MODULE_0__["default"] ]
+});
- ElementRegistry.prototype.forEach = function (fn) {
- var map = this._elements;
- Object.keys(map).forEach(function (id) {
- var container = map[id],
- element = container.element,
- gfx = container.gfx;
- return fn(element, gfx);
- });
- };
- /**
- * Return the graphical representation of an element or its id.
- *
- * @example
- * elementRegistry.getGraphics('SomeElementId_1');
- * elementRegistry.getGraphics(rootElement); //
- *
- * elementRegistry.getGraphics(rootElement, true); //
- *
- *
- * @param {string|djs.model.Base} filter
- * @param {boolean} [secondary=false] whether to return the secondary connected element
- *
- * @return {SVGElement}
- */
+/***/ }),
+/***/ "../node_modules/diagram-js/lib/features/context-pad/ContextPad.js":
+/*!*************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/context-pad/ContextPad.js ***!
+ \*************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- ElementRegistry.prototype.getGraphics = function (filter, secondary) {
- var id = filter.id || filter;
- var container = this._elements[id];
- return container && (secondary ? container.secondaryGfx : container.gfx);
- };
- /**
- * Validate the suitability of the given id and signals a problem
- * with an exception.
- *
- * @param {string} id
- *
- * @throws {Error} if id is empty or already assigned
- */
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ ContextPad)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dom */ "../node_modules/min-dom/dist/index.esm.js");
+/* harmony import */ var _util_Elements__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/Elements */ "../node_modules/diagram-js/lib/util/Elements.js");
+/* harmony import */ var _util_EscapeUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/EscapeUtil */ "../node_modules/diagram-js/lib/util/EscapeUtil.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/ModelUtil */ "../node_modules/diagram-js/lib/util/ModelUtil.js");
- ElementRegistry.prototype._validateId = function (id) {
- if (!id) {
- throw new Error('element must have an id');
- }
- if (this._elements[id]) {
- throw new Error('element with id ' + id + ' already added');
- }
- };
- },{"tiny-svg":658}],256:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = EventBus;
- var _minDash = require("min-dash");
- var FN_REF = '__fn';
- var DEFAULT_PRIORITY = 1000;
- var slice = Array.prototype.slice;
- /**
- * A general purpose event bus.
- *
- * This component is used to communicate across a diagram instance.
- * Other parts of a diagram can use it to listen to and broadcast events.
- *
- *
- * ## Registering for Events
- *
- * The event bus provides the {@link EventBus#on} and {@link EventBus#once}
- * methods to register for events. {@link EventBus#off} can be used to
- * remove event registrations. Listeners receive an instance of {@link Event}
- * as the first argument. It allows them to hook into the event execution.
- *
- * ```javascript
- *
- * // listen for event
- * eventBus.on('foo', function(event) {
- *
- * // access event type
- * event.type; // 'foo'
- *
- * // stop propagation to other listeners
- * event.stopPropagation();
- *
- * // prevent event default
- * event.preventDefault();
- * });
- *
- * // listen for event with custom payload
- * eventBus.on('bar', function(event, payload) {
- * console.log(payload);
- * });
- *
- * // listen for event returning value
- * eventBus.on('foobar', function(event) {
- *
- * // stop event propagation + prevent default
- * return false;
- *
- * // stop event propagation + return custom result
- * return {
- * complex: 'listening result'
- * };
- * });
- *
- *
- * // listen with custom priority (default=1000, higher is better)
- * eventBus.on('priorityfoo', 1500, function(event) {
- * console.log('invoked first!');
- * });
- *
- *
- * // listen for event and pass the context (`this`)
- * eventBus.on('foobar', function(event) {
- * this.foo();
- * }, this);
- * ```
- *
- *
- * ## Emitting Events
- *
- * Events can be emitted via the event bus using {@link EventBus#fire}.
- *
- * ```javascript
- *
- * // false indicates that the default action
- * // was prevented by listeners
- * if (eventBus.fire('foo') === false) {
- * console.log('default has been prevented!');
- * };
- *
- *
- * // custom args + return value listener
- * eventBus.on('sum', function(event, a, b) {
- * return a + b;
- * });
- *
- * // you can pass custom arguments + retrieve result values.
- * var sum = eventBus.fire('sum', 1, 2);
- * console.log(sum); // 3
- * ```
- */
-
- function EventBus() {
- this._listeners = {}; // cleanup on destroy on lowest priority to allow
- // message passing until the bitter end
-
- this.on('diagram.destroy', 1, this._destroy, this);
- }
- /**
- * Register an event listener for events with the given name.
- *
- * The callback will be invoked with `event, ...additionalArguments`
- * that have been passed to {@link EventBus#fire}.
- *
- * Returning false from a listener will prevent the events default action
- * (if any is specified). To stop an event from being processed further in
- * other listeners execute {@link Event#stopPropagation}.
- *
- * Returning anything but `undefined` from a listener will stop the listener propagation.
- *
- * @param {string|Array} events
- * @param {number} [priority=1000] the priority in which this listener is called, larger is higher
- * @param {Function} callback
- * @param {Object} [that] Pass context (`this`) to the callback
- */
- EventBus.prototype.on = function (events, priority, callback, that) {
- events = (0, _minDash.isArray)(events) ? events : [events];
- if ((0, _minDash.isFunction)(priority)) {
- that = callback;
- callback = priority;
- priority = DEFAULT_PRIORITY;
- }
- if (!(0, _minDash.isNumber)(priority)) {
- throw new Error('priority must be a number');
- }
+/**
+ * @typedef {import('../../model/Types').Element} Element
+ *
+ * @typedef {import('../../util/Types').Rect} Rect
+ *
+ * @typedef {import('../../core/Canvas').default} Canvas
+ * @typedef {import('../../core/EventBus').default} EventBus
+ * @typedef {import('../overlays/Overlays').default} Overlays
+ *
+ * @typedef {import('../overlays/Overlays').Overlay} Overlay
+ *
+ * @typedef {import('./ContextPadProvider').default} ContextPadProvider
+ * @typedef {import('./ContextPadProvider').ContextPadEntries} ContextPadEntries
+ *
+ * @typedef { {
+ * scale?: {
+ * min?: number;
+ * max?: number;
+ * };
+ * } } ContextPadConfig
+ */
- var actualCallback = callback;
+/**
+ * @template {Element} [ElementType=Element]
+ *
+ * @typedef {ElementType|ElementType[]} ContextPadTarget
+ */
- if (that) {
- actualCallback = (0, _minDash.bind)(callback, that); // make sure we remember and are able to remove
- // bound callbacks via {@link #off} using the original
- // callback
+var entrySelector = '.entry';
- actualCallback[FN_REF] = callback[FN_REF] || callback;
- }
+var DEFAULT_PRIORITY = 1000;
+var CONTEXT_PAD_PADDING = 12;
+var HOVER_DELAY = 300;
- var self = this;
- events.forEach(function (e) {
- self._addListener(e, {
- priority: priority,
- callback: actualCallback,
- next: null
- });
- });
- };
- /**
- * Register an event listener that is executed only once.
- *
- * @param {string} event the event name to register for
- * @param {number} [priority=1000] the priority in which this listener is called, larger is higher
- * @param {Function} callback the callback to execute
- * @param {Object} [that] Pass context (`this`) to the callback
- */
+/**
+ * A context pad that displays element specific, contextual actions next
+ * to a diagram element.
+ *
+ * @param {Canvas} canvas
+ * @param {ContextPadConfig} config
+ * @param {EventBus} eventBus
+ * @param {Overlays} overlays
+ */
+function ContextPad(canvas, config, eventBus, overlays) {
+ this._canvas = canvas;
+ this._eventBus = eventBus;
+ this._overlays = overlays;
- EventBus.prototype.once = function (event, priority, callback, that) {
- var self = this;
+ var scale = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isDefined)(config && config.scale) ? config.scale : {
+ min: 1,
+ max: 1.5
+ };
- if ((0, _minDash.isFunction)(priority)) {
- that = callback;
- callback = priority;
- priority = DEFAULT_PRIORITY;
- }
+ this._overlaysConfig = {
+ scale: scale
+ };
- if (!(0, _minDash.isNumber)(priority)) {
- throw new Error('priority must be a number');
- }
+ this._current = null;
- function wrappedCallback() {
- var result = callback.apply(that, arguments);
- self.off(event, wrappedCallback);
- return result;
- } // make sure we remember and are able to remove
- // bound callbacks via {@link #off} using the original
- // callback
+ this._init();
+}
+ContextPad.$inject = [
+ 'canvas',
+ 'config.contextPad',
+ 'eventBus',
+ 'overlays'
+];
- wrappedCallback[FN_REF] = callback;
- this.on(event, priority, wrappedCallback);
- };
- /**
- * Removes event listeners by event and callback.
- *
- * If no callback is given, all listeners for a given event name are being removed.
- *
- * @param {string|Array} events
- * @param {Function} [callback]
- */
+/**
+ * Registers events needed for interaction with other components.
+ */
+ContextPad.prototype._init = function() {
+ var self = this;
+
+ this._eventBus.on('selection.changed', function(event) {
+
+ var selection = event.newSelection;
+
+ var target = selection.length
+ ? selection.length === 1
+ ? selection[0]
+ : selection
+ : null;
+
+ if (target) {
+ self.open(target, true);
+ } else {
+ self.close();
+ }
+ });
+
+ this._eventBus.on('elements.changed', function(event) {
+ var elements = event.elements,
+ current = self._current;
+
+ if (!current) {
+ return;
+ }
+
+ var currentTarget = current.target;
+
+ var currentChanged = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.some)(
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(currentTarget) ? currentTarget : [ currentTarget ],
+ function(element) {
+ return includes(elements, element);
+ }
+ );
+
+ // re-open if elements in current selection changed
+ if (currentChanged) {
+ self.open(currentTarget, true);
+ }
+ });
+};
+
+/**
+ * @overlord
+ *
+ * Register a context pad provider with the default priority. See
+ * {@link ContextPadProvider} for examples.
+ *
+ * @param {ContextPadProvider} provider
+ */
- EventBus.prototype.off = function (events, callback) {
- events = (0, _minDash.isArray)(events) ? events : [events];
- var self = this;
- events.forEach(function (event) {
- self._removeListener(event, callback);
- });
- };
- /**
- * Create an EventBus event.
- *
- * @param {Object} data
- *
- * @return {Object} event, recognized by the eventBus
- */
+/**
+ * Register a context pad provider with the given priority. See
+ * {@link ContextPadProvider} for examples.
+ *
+ * @param {number} priority
+ * @param {ContextPadProvider} provider
+ */
+ContextPad.prototype.registerProvider = function(priority, provider) {
+ if (!provider) {
+ provider = priority;
+ priority = DEFAULT_PRIORITY;
+ }
+ this._eventBus.on('contextPad.getProviders', priority, function(event) {
+ event.providers.push(provider);
+ });
+};
- EventBus.prototype.createEvent = function (data) {
- var event = new InternalEvent();
- event.init(data);
- return event;
- };
- /**
- * Fires a named event.
- *
- * @example
- *
- * // fire event by name
- * events.fire('foo');
- *
- * // fire event object with nested type
- * var event = { type: 'foo' };
- * events.fire(event);
- *
- * // fire event with explicit type
- * var event = { x: 10, y: 20 };
- * events.fire('element.moved', event);
- *
- * // pass additional arguments to the event
- * events.on('foo', function(event, bar) {
- * alert(bar);
- * });
- *
- * events.fire({ type: 'foo' }, 'I am bar!');
- *
- * @param {string} [name] the optional event name
- * @param {Object} [event] the event object
- * @param {...Object} additional arguments to be passed to the callback functions
- *
- * @return {boolean} the events return value, if specified or false if the
- * default action was prevented by listeners
- */
+/**
+ * Get context pad entries for given elements.
+ *
+ * @param {ContextPadTarget} target
+ *
+ * @return {ContextPadEntries} list of entries
+ */
+ContextPad.prototype.getEntries = function(target) {
+ var providers = this._getProviders();
- EventBus.prototype.fire = function (type, data) {
- var event, firstListener, returnValue, args;
- args = slice.call(arguments);
+ var provideFn = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(target)
+ ? 'getMultiElementContextPadEntries'
+ : 'getContextPadEntries';
- if (typeof type === 'object') {
- data = type;
- type = data.type;
- }
+ var entries = {};
- if (!type) {
- throw new Error('no event type specified');
- }
+ // loop through all providers and their entries.
+ // group entries by id so that overriding an entry is possible
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(providers, function(provider) {
- firstListener = this._listeners[type];
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isFunction)(provider[provideFn])) {
+ return;
+ }
- if (!firstListener) {
- return;
- } // we make sure we fire instances of our home made
- // events here. We wrap them only once, though
+ var entriesOrUpdater = provider[provideFn](target);
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isFunction)(entriesOrUpdater)) {
+ entries = entriesOrUpdater(entries);
+ } else {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(entriesOrUpdater, function(entry, id) {
+ entries[id] = entry;
+ });
+ }
+ });
- if (data instanceof InternalEvent) {
- // we are fine, we alread have an event
- event = data;
- } else {
- event = this.createEvent(data);
- } // ensure we pass the event as the first parameter
+ return entries;
+};
- args[0] = event; // original event type (in case we delegate)
+/**
+ * Trigger context pad via DOM event.
+ *
+ * The entry to trigger is determined by the target element.
+ *
+ * @param {string} action
+ * @param {Event} event
+ * @param {boolean} [autoActivate=false]
+ */
+ContextPad.prototype.trigger = function(action, event, autoActivate) {
- var originalType = event.type; // update event type before delegation
+ var entry,
+ originalEvent,
+ button = event.delegateTarget || event.target;
- if (type !== originalType) {
- event.type = type;
- }
+ if (!button) {
+ return event.preventDefault();
+ }
- try {
- returnValue = this._invokeListeners(event, args, firstListener);
- } finally {
- // reset event type after delegation
- if (type !== originalType) {
- event.type = originalType;
- }
- } // set the return value to false if the event default
- // got prevented and no other return value exists
+ entry = (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.attr)(button, 'data-action');
+ originalEvent = event.originalEvent || event;
+ if (action === 'mouseover') {
+ this._timeout = setTimeout(() => {
+ this._mouseout = this.triggerEntry(entry, 'hover', originalEvent, autoActivate);
+ }, HOVER_DELAY);
+ } else if (action === 'mouseout') {
+ clearTimeout(this._timeout);
- if (returnValue === undefined && event.defaultPrevented) {
- returnValue = false;
- }
+ if (this._mouseout) {
+ this._mouseout();
- return returnValue;
- };
+ this._mouseout = null;
+ }
+ }
- EventBus.prototype.handleError = function (error) {
- return this.fire('error', {
- error: error
- }) === false;
- };
+ return this.triggerEntry(entry, action, originalEvent, autoActivate);
+};
- EventBus.prototype._destroy = function () {
- this._listeners = {};
- };
+/**
+ * Trigger action on context pad entry entry, e.g. click, mouseover or mouseout.
+ *
+ * @param {string} entryId
+ * @param {string} action
+ * @param {Event} event
+ * @param {boolean} [autoActivate=false]
+ */
+ContextPad.prototype.triggerEntry = function(entryId, action, event, autoActivate) {
- EventBus.prototype._invokeListeners = function (event, args, listener) {
- var returnValue;
+ if (!this.isShown()) {
+ return;
+ }
- while (listener) {
- // handle stopped propagation
- if (event.cancelBubble) {
- break;
- }
+ var target = this._current.target,
+ entries = this._current.entries;
- returnValue = this._invokeListener(event, args, listener);
- listener = listener.next;
- }
+ var entry = entries[entryId];
- return returnValue;
- };
+ if (!entry) {
+ return;
+ }
- EventBus.prototype._invokeListener = function (event, args, listener) {
- var returnValue;
+ var handler = entry.action;
- try {
- // returning false prevents the default action
- returnValue = invokeFunction(listener.callback, args); // stop propagation on return value
+ if (this._eventBus.fire('contextPad.trigger', { entry, event }) === false) {
+ return;
+ }
- if (returnValue !== undefined) {
- event.returnValue = returnValue;
- event.stopPropagation();
- } // prevent default on return false
+ // simple action (via callback function)
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isFunction)(handler)) {
+ if (action === 'click') {
+ return handler(event, target, autoActivate);
+ }
+ } else {
+ if (handler[action]) {
+ return handler[action](event, target, autoActivate);
+ }
+ }
+ // silence other actions
+ event.preventDefault();
+};
- if (returnValue === false) {
- event.preventDefault();
- }
- } catch (e) {
- if (!this.handleError(e)) {
- console.error('unhandled error in event listener');
- console.error(e.stack);
- throw e;
- }
- }
- return returnValue;
- };
- /*
- * Add new listener with a certain priority to the list
- * of listeners (for the given event).
- *
- * The semantics of listener registration / listener execution are
- * first register, first serve: New listeners will always be inserted
- * after existing listeners with the same priority.
- *
- * Example: Inserting two listeners with priority 1000 and 1300
- *
- * * before: [ 1500, 1500, 1000, 1000 ]
- * * after: [ 1500, 1500, (new=1300), 1000, 1000, (new=1000) ]
+/**
+ * Open the context pad for given elements.
*
- * @param {string} event
- * @param {Object} listener { priority, callback }
+ * @param {ContextPadTarget} target
+ * @param {boolean} [force=false] - Force re-opening context pad.
*/
+ContextPad.prototype.open = function(target, force) {
+ if (!force && this.isOpen(target)) {
+ return;
+ }
+ this.close();
- EventBus.prototype._addListener = function (event, newListener) {
- var listener = this._getListeners(event),
- previousListener; // no prior listeners
+ this._updateAndOpen(target);
+};
+ContextPad.prototype._getProviders = function() {
- if (!listener) {
- this._setListeners(event, newListener);
+ var event = this._eventBus.createEvent({
+ type: 'contextPad.getProviders',
+ providers: []
+ });
- return;
- } // ensure we order listeners by priority from
- // 0 (high) to n > 0 (low)
+ this._eventBus.fire(event);
+ return event.providers;
+};
- while (listener) {
- if (listener.priority < newListener.priority) {
- newListener.next = listener;
- if (previousListener) {
- previousListener.next = newListener;
- } else {
- this._setListeners(event, newListener);
- }
+/**
+ * @param {ContextPadTarget} target
+ */
+ContextPad.prototype._updateAndOpen = function(target) {
+ var entries = this.getEntries(target),
+ pad = this.getPad(target),
+ html = pad.html,
+ image;
- return;
- }
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(entries, function(entry, id) {
+ var grouping = entry.group || 'default',
+ control = (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.domify)(entry.html || '
'),
+ container;
- previousListener = listener;
- listener = listener.next;
- } // add new listener to back
+ (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.attr)(control, 'data-action', id);
+ container = (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.query)('[data-group=' + (0,_util_EscapeUtil__WEBPACK_IMPORTED_MODULE_2__.escapeCSS)(grouping) + ']', html);
+ if (!container) {
+ container = (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.domify)('
');
+ (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.attr)(container, 'data-group', grouping);
- previousListener.next = newListener;
- };
+ html.appendChild(container);
+ }
- EventBus.prototype._getListeners = function (name) {
- return this._listeners[name];
- };
+ container.appendChild(control);
- EventBus.prototype._setListeners = function (name, listener) {
- this._listeners[name] = listener;
- };
+ if (entry.className) {
+ addClasses(control, entry.className);
+ }
- EventBus.prototype._removeListener = function (event, callback) {
- var listener = this._getListeners(event),
- nextListener,
- previousListener,
- listenerCallback;
+ if (entry.title) {
+ (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.attr)(control, 'title', entry.title);
+ }
- if (!callback) {
- // clear listeners
- this._setListeners(event, null);
+ if (entry.imageUrl) {
+ image = (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.domify)(' ');
+ (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'src', entry.imageUrl);
+ image.style.width = '100%';
+ image.style.height = '100%';
- return;
- }
+ control.appendChild(image);
+ }
+ });
- while (listener) {
- nextListener = listener.next;
- listenerCallback = listener.callback;
+ (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.classes)(html).add('open');
- if (listenerCallback === callback || listenerCallback[FN_REF] === callback) {
- if (previousListener) {
- previousListener.next = nextListener;
- } else {
- // new first listener
- this._setListeners(event, nextListener);
- }
- }
+ this._current = {
+ target: target,
+ entries: entries,
+ pad: pad
+ };
- previousListener = listener;
- listener = nextListener;
- }
- };
- /**
- * A event that is emitted via the event bus.
- */
+ this._eventBus.fire('contextPad.open', { current: this._current });
+};
+/**
+ * @param {ContextPadTarget} target
+ *
+ * @return {Overlay}
+ */
+ContextPad.prototype.getPad = function(target) {
+ if (this.isOpen()) {
+ return this._current.pad;
+ }
- function InternalEvent() {}
+ var self = this;
- InternalEvent.prototype.stopPropagation = function () {
- this.cancelBubble = true;
- };
+ var overlays = this._overlays;
- InternalEvent.prototype.preventDefault = function () {
- this.defaultPrevented = true;
- };
+ var html = (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.domify)('
');
- InternalEvent.prototype.init = function (data) {
- (0, _minDash.assign)(this, data || {});
- };
- /**
- * Invoke function. Be fast...
- *
- * @param {Function} fn
- * @param {Array} args
- *
- * @return {Any}
- */
+ var position = this._getPosition(target);
+ var overlaysConfig = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({
+ html: html
+ }, this._overlaysConfig, position);
- function invokeFunction(fn, args) {
- return fn.apply(null, args);
- }
+ min_dom__WEBPACK_IMPORTED_MODULE_1__.delegate.bind(html, entrySelector, 'click', function(event) {
+ self.trigger('click', event);
+ });
- },{"min-dash":646}],257:[function(require,module,exports){
- "use strict";
+ min_dom__WEBPACK_IMPORTED_MODULE_1__.delegate.bind(html, entrySelector, 'dragstart', function(event) {
+ self.trigger('dragstart', event);
+ });
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = GraphicsFactory;
+ min_dom__WEBPACK_IMPORTED_MODULE_1__.delegate.bind(html, entrySelector, 'mouseover', function(event) {
+ self.trigger('mouseover', event);
+ });
- var _minDash = require("min-dash");
+ min_dom__WEBPACK_IMPORTED_MODULE_1__.delegate.bind(html, entrySelector, 'mouseout', function(event) {
+ self.trigger('mouseout', event);
+ });
- var _GraphicsUtil = require("../util/GraphicsUtil");
+ // stop propagation of mouse events
+ min_dom__WEBPACK_IMPORTED_MODULE_1__.event.bind(html, 'mousedown', function(event) {
+ event.stopPropagation();
+ });
- var _SvgTransformUtil = require("../util/SvgTransformUtil");
+ var activeRootElement = this._canvas.getRootElement();
- var _minDom = require("min-dom");
+ this._overlayId = overlays.add(activeRootElement, 'context-pad', overlaysConfig);
- var _tinySvg = require("tiny-svg");
+ var pad = overlays.get(this._overlayId);
- var _Elements = require("../util/Elements");
+ this._eventBus.fire('contextPad.create', {
+ target: target,
+ pad: pad
+ });
- /**
- * A factory that creates graphical elements
- *
- * @param {EventBus} eventBus
- * @param {ElementRegistry} elementRegistry
- */
- function GraphicsFactory(eventBus, elementRegistry) {
- this._eventBus = eventBus;
- this._elementRegistry = elementRegistry;
- }
+ return pad;
+};
- GraphicsFactory.$inject = ['eventBus', 'elementRegistry'];
- GraphicsFactory.prototype._getChildrenContainer = function (element) {
- var gfx = this._elementRegistry.getGraphics(element);
+/**
+ * Close the context pad
+ */
+ContextPad.prototype.close = function() {
+ if (!this.isOpen()) {
+ return;
+ }
- var childrenGfx; // root element
+ clearTimeout(this._timeout);
- if (!element.parent) {
- childrenGfx = gfx;
- } else {
- childrenGfx = (0, _GraphicsUtil.getChildren)(gfx);
+ this._overlays.remove(this._overlayId);
- if (!childrenGfx) {
- childrenGfx = (0, _tinySvg.create)('g');
- (0, _tinySvg.classes)(childrenGfx).add('djs-children');
- (0, _tinySvg.append)(gfx.parentNode, childrenGfx);
- }
- }
+ this._overlayId = null;
- return childrenGfx;
- };
- /**
- * Clears the graphical representation of the element and returns the
- * cleared visual (the element).
- */
+ this._eventBus.fire('contextPad.close', { current: this._current });
+ this._current = null;
+};
- GraphicsFactory.prototype._clear = function (gfx) {
- var visual = (0, _GraphicsUtil.getVisual)(gfx);
- (0, _minDom.clear)(visual);
- return visual;
- };
- /**
- * Creates a gfx container for shapes and connections
- *
- * The layout is as follows:
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- * @param {string} type the type of the element, i.e. shape | connection
- * @param {SVGElement} [childrenGfx]
- * @param {number} [parentIndex] position to create container in parent
- * @param {boolean} [isFrame] is frame element
- *
- * @return {SVGElement}
- */
+/**
+ * Check if pad is open.
+ *
+ * If target is provided, check if it is opened
+ * for the given target (single or multiple elements).
+ *
+ * @param {ContextPadTarget} [target]
+ * @return {boolean}
+ */
+ContextPad.prototype.isOpen = function(target) {
+ var current = this._current;
+
+ if (!current) {
+ return false;
+ }
+
+ // basic no-args is open check
+ if (!target) {
+ return true;
+ }
+
+ var currentTarget = current.target;
+
+ // strict handling of single vs. multi-selection
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(target) !== (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(currentTarget)) {
+ return false;
+ }
+
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(target)) {
+ return (
+ target.length === currentTarget.length &&
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.every)(target, function(element) {
+ return includes(currentTarget, element);
+ })
+ );
+ } else {
+ return currentTarget === target;
+ }
+};
+
+
+/**
+ * Check if pad is open and not hidden.
+ *
+ * @return {boolean}
+ */
+ContextPad.prototype.isShown = function() {
+ return this.isOpen() && this._overlays.isShown();
+};
- GraphicsFactory.prototype._createContainer = function (type, childrenGfx, parentIndex, isFrame) {
- var outerGfx = (0, _tinySvg.create)('g');
- (0, _tinySvg.classes)(outerGfx).add('djs-group'); // insert node at position
+/**
+ * Get contex pad position.
+ *
+ * If target is a connection, the context pad will be placed according to the
+ * connection's last waypoint.
+ *
+ * If multiple targets, the context pad will be placed according to the bounding
+ * box containing all targets.
+ *
+ * @param {ContextPadTarget} target
+ *
+ * @return {Rect}
+ */
+ContextPad.prototype._getPosition = function(target) {
- if (typeof parentIndex !== 'undefined') {
- prependTo(outerGfx, childrenGfx, childrenGfx.childNodes[parentIndex]);
- } else {
- (0, _tinySvg.append)(childrenGfx, outerGfx);
- }
+ target = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.isConnection)(target) ? getLastWaypoint(target) : target;
- var gfx = (0, _tinySvg.create)('g');
- (0, _tinySvg.classes)(gfx).add('djs-element');
- (0, _tinySvg.classes)(gfx).add('djs-' + type);
+ var elements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(target) ? target : [ target ];
+ var bBox = (0,_util_Elements__WEBPACK_IMPORTED_MODULE_4__.getBBox)(elements);
- if (isFrame) {
- (0, _tinySvg.classes)(gfx).add('djs-frame');
- }
+ return {
+ position: {
+ left: bBox.x + bBox.width + CONTEXT_PAD_PADDING,
+ top: bBox.y - CONTEXT_PAD_PADDING / 2
+ }
+ };
+};
- (0, _tinySvg.append)(outerGfx, gfx); // create visual
- var visual = (0, _tinySvg.create)('g');
- (0, _tinySvg.classes)(visual).add('djs-visual');
- (0, _tinySvg.append)(gfx, visual);
- return gfx;
- };
+// helpers //////////
- GraphicsFactory.prototype.create = function (type, element, parentIndex) {
- var childrenGfx = this._getChildrenContainer(element.parent);
+function addClasses(element, classNames) {
+ var classes = (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.classes)(element);
- return this._createContainer(type, childrenGfx, parentIndex, (0, _Elements.isFrameElement)(element));
- };
+ classNames = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(classNames) ? classNames : classNames.split(/\s+/g);
- GraphicsFactory.prototype.updateContainments = function (elements) {
- var self = this,
- elementRegistry = this._elementRegistry,
- parents;
- parents = (0, _minDash.reduce)(elements, function (map, e) {
- if (e.parent) {
- map[e.parent.id] = e.parent;
- }
+ classNames.forEach(function(cls) {
+ classes.add(cls);
+ });
+}
- return map;
- }, {}); // update all parents of changed and reorganized their children
- // in the correct order (as indicated in our model)
+/**
+ * @param {any[]} array
+ * @param {any} item
+ *
+ * @return {boolean}
+ */
+function includes(array, item) {
+ return array.indexOf(item) !== -1;
+}
- (0, _minDash.forEach)(parents, function (parent) {
- var children = parent.children;
+function getLastWaypoint(connection) {
+ return connection.waypoints[connection.waypoints.length - 1];
+}
- if (!children) {
- return;
- }
+/***/ }),
- var childrenGfx = self._getChildrenContainer(parent);
+/***/ "../node_modules/diagram-js/lib/features/context-pad/index.js":
+/*!********************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/context-pad/index.js ***!
+ \********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- (0, _minDash.forEach)(children.slice().reverse(), function (child) {
- var childGfx = elementRegistry.getGraphics(child);
- prependTo(childGfx.parentNode, childrenGfx);
- });
- });
- };
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _interaction_events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../interaction-events */ "../node_modules/diagram-js/lib/features/interaction-events/index.js");
+/* harmony import */ var _overlays__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../overlays */ "../node_modules/diagram-js/lib/features/overlays/index.js");
+/* harmony import */ var _ContextPad__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ContextPad */ "../node_modules/diagram-js/lib/features/context-pad/ContextPad.js");
- GraphicsFactory.prototype.drawShape = function (visual, element) {
- var eventBus = this._eventBus;
- return eventBus.fire('render.shape', {
- gfx: visual,
- element: element
- });
- };
- GraphicsFactory.prototype.getShapePath = function (element) {
- var eventBus = this._eventBus;
- return eventBus.fire('render.getShapePath', element);
- };
- GraphicsFactory.prototype.drawConnection = function (visual, element) {
- var eventBus = this._eventBus;
- return eventBus.fire('render.connection', {
- gfx: visual,
- element: element
- });
- };
- GraphicsFactory.prototype.getConnectionPath = function (waypoints) {
- var eventBus = this._eventBus;
- return eventBus.fire('render.getConnectionPath', waypoints);
- };
- GraphicsFactory.prototype.update = function (type, element, gfx) {
- // do NOT update root element
- if (!element.parent) {
- return;
- }
- var visual = this._clear(gfx); // redraw
+/**
+ * @type { import('didi').ModuleDeclaration }
+ */
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ _interaction_events__WEBPACK_IMPORTED_MODULE_0__["default"],
+ _overlays__WEBPACK_IMPORTED_MODULE_1__["default"]
+ ],
+ contextPad: [ 'type', _ContextPad__WEBPACK_IMPORTED_MODULE_2__["default"] ]
+});
+/***/ }),
- if (type === 'shape') {
- this.drawShape(visual, element); // update positioning
+/***/ "../node_modules/diagram-js/lib/features/copy-paste/CopyPaste.js":
+/*!***********************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/copy-paste/CopyPaste.js ***!
+ \***********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- (0, _SvgTransformUtil.translate)(gfx, element.x, element.y);
- } else if (type === 'connection') {
- this.drawConnection(visual, element);
- } else {
- throw new Error('unknown type: ' + type);
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ CopyPaste)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _util_Elements__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/Elements */ "../node_modules/diagram-js/lib/util/Elements.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/ModelUtil */ "../node_modules/diagram-js/lib/util/ModelUtil.js");
- if (element.hidden) {
- (0, _tinySvg.attr)(gfx, 'display', 'none');
- } else {
- (0, _tinySvg.attr)(gfx, 'display', 'block');
- }
- };
- GraphicsFactory.prototype.remove = function (element) {
- var gfx = this._elementRegistry.getGraphics(element); // remove
- (0, _tinySvg.remove)(gfx.parentNode);
- }; // helpers //////////
- function prependTo(newNode, parentNode, siblingNode) {
- var node = siblingNode || parentNode.firstChild; // do not prepend node to itself to prevent IE from crashing
- // https://github.com/bpmn-io/bpmn-js/issues/746
- if (newNode === node) {
- return;
- }
- parentNode.insertBefore(newNode, node);
- }
+/**
+ * @typedef {import('../../core/Types').ElementLike} Element
+ * @typedef {import('../../core/Types').ShapeLike} Shape
+ *
+ * @typedef {import('../../util/Types').Point} Point
+ *
+ * @typedef {import('../../core/Canvas').default} Canvas
+ * @typedef {import('../clipboard/Clipboard').default} Clipboard
+ * @typedef {import('../create/Create').default} Create
+ * @typedef {import('../../core/ElementFactory').default} ElementFactory
+ * @typedef {import('../../core/EventBus').default} EventBus
+ * @typedef {import('../modeling/Modeling').default} Modeling
+ * @typedef {import('../mouse/Mouse').default} Mouse
+ * @typedef {import('../rules/Rules').default} Rules
+ */
- },{"../util/Elements":420,"../util/GraphicsUtil":424,"../util/SvgTransformUtil":433,"min-dash":646,"min-dom":647,"tiny-svg":658}],258:[function(require,module,exports){
- "use strict";
+/**
+ * @typedef { (event: { elements: Element[] }) => Element[]|boolean } CopyPasteCanCopyElementsListener
+ */
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+/**
+ * @typedef { (event: { descriptor: any, element: Element, elements: Element[] }) => void } CopyPasteCopyElementListener
+ */
- var _draw = _interopRequireDefault(require("../draw"));
+/**
+ * @typedef { (event: { element: Element, children: Element[] }) => void } CopyPasteCreateTreeListener
+ */
- var _Canvas = _interopRequireDefault(require("./Canvas"));
+/**
+ * @typedef { (event: { elements: any, tree: any }) => void } CopyPasteElementsCopiedListener
+ */
- var _ElementRegistry = _interopRequireDefault(require("./ElementRegistry"));
+/**
+ * @typedef { (event: { cache: any, descriptor: any }) => void } CopyPastePasteElementListener
+ */
- var _ElementFactory = _interopRequireDefault(require("./ElementFactory"));
+/**
+ * @typedef { (event: { hints: any }) => void } CopyPastePasteElementsListener
+ */
- var _EventBus = _interopRequireDefault(require("./EventBus"));
+/**
+ * Copy and paste elements.
+ *
+ * @param {Canvas} canvas
+ * @param {Create} create
+ * @param {Clipboard} clipboard
+ * @param {ElementFactory} elementFactory
+ * @param {EventBus} eventBus
+ * @param {Modeling} modeling
+ * @param {Mouse} mouse
+ * @param {Rules} rules
+ */
+function CopyPaste(
+ canvas,
+ create,
+ clipboard,
+ elementFactory,
+ eventBus,
+ modeling,
+ mouse,
+ rules
+) {
+
+ this._canvas = canvas;
+ this._create = create;
+ this._clipboard = clipboard;
+ this._elementFactory = elementFactory;
+ this._eventBus = eventBus;
+ this._modeling = modeling;
+ this._mouse = mouse;
+ this._rules = rules;
+
+ eventBus.on('copyPaste.copyElement', function(context) {
+ var descriptor = context.descriptor,
+ element = context.element,
+ elements = context.elements;
+
+ // default priority (priority = 1)
+ descriptor.priority = 1;
+
+ descriptor.id = element.id;
+
+ var parentCopied = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(elements, function(e) {
+ return e === element.parent;
+ });
+
+ // do NOT reference parent if parent wasn't copied
+ if (parentCopied) {
+ descriptor.parent = element.parent.id;
+ }
+
+ // attachers (priority = 2)
+ if (isAttacher(element)) {
+ descriptor.priority = 2;
+
+ descriptor.host = element.host.id;
+ }
+
+ // connections (priority = 3)
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.isConnection)(element)) {
+ descriptor.priority = 3;
+
+ descriptor.source = element.source.id;
+ descriptor.target = element.target.id;
+
+ descriptor.waypoints = copyWaypoints(element);
+ }
+
+ // labels (priority = 4)
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.isLabel)(element)) {
+ descriptor.priority = 4;
+
+ descriptor.labelTarget = element.labelTarget.id;
+ }
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)([ 'x', 'y', 'width', 'height' ], function(property) {
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(element[ property ])) {
+ descriptor[ property ] = element[ property ];
+ }
+ });
+
+ descriptor.hidden = element.hidden;
+ descriptor.collapsed = element.collapsed;
+
+ });
+
+ eventBus.on('copyPaste.pasteElements', function(context) {
+ var hints = context.hints;
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(hints, {
+ createElementsBehavior: false
+ });
+ });
+}
+
+CopyPaste.$inject = [
+ 'canvas',
+ 'create',
+ 'clipboard',
+ 'elementFactory',
+ 'eventBus',
+ 'modeling',
+ 'mouse',
+ 'rules'
+];
+
+
+/**
+ * Copy elements.
+ *
+ * @param {Element[]} elements
+ *
+ * @return {Object}
+ */
+CopyPaste.prototype.copy = function(elements) {
+ var allowed,
+ tree;
+
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(elements)) {
+ elements = elements ? [ elements ] : [];
+ }
+
+ allowed = this._eventBus.fire('copyPaste.canCopyElements', {
+ elements: elements
+ });
+
+ if (allowed === false) {
+ tree = {};
+ } else {
+ tree = this.createTree((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(allowed) ? allowed : elements);
+ }
+
+ // we set an empty tree, selection of elements
+ // to copy was empty.
+ this._clipboard.set(tree);
+
+ this._eventBus.fire('copyPaste.elementsCopied', {
+ elements: elements,
+ tree: tree
+ });
+
+ return tree;
+};
+
+/**
+ * Paste elements.
+ *
+ * @param {Object} [context]
+ * @param {Shape} [context.element] The optional parent.
+ * @param {Point} [context.point] The optional position.
+ * @param {Object} [context.hints] The optional hints.
+ */
+CopyPaste.prototype.paste = function(context) {
+ var tree = this._clipboard.get();
- var _GraphicsFactory = _interopRequireDefault(require("./GraphicsFactory"));
+ if (this._clipboard.isEmpty()) {
+ return;
+ }
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ var hints = context && context.hints || {};
- var _default = {
- __depends__: [_draw.default],
- __init__: ['canvas'],
- canvas: ['type', _Canvas.default],
- elementRegistry: ['type', _ElementRegistry.default],
- elementFactory: ['type', _ElementFactory.default],
- eventBus: ['type', _EventBus.default],
- graphicsFactory: ['type', _GraphicsFactory.default]
- };
- exports.default = _default;
+ this._eventBus.fire('copyPaste.pasteElements', {
+ hints: hints
+ });
- },{"../draw":262,"./Canvas":253,"./ElementFactory":254,"./ElementRegistry":255,"./EventBus":256,"./GraphicsFactory":257}],259:[function(require,module,exports){
- "use strict";
+ var elements = this._createElements(tree);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BaseRenderer;
- var DEFAULT_RENDER_PRIORITY = 1000;
- /**
- * The base implementation of shape and connection renderers.
- *
- * @param {EventBus} eventBus
- * @param {number} [renderPriority=1000]
- */
+ // paste directly
+ if (context && context.element && context.point) {
+ return this._paste(elements, context.element, context.point, hints);
+ }
- function BaseRenderer(eventBus, renderPriority) {
- var self = this;
- renderPriority = renderPriority || DEFAULT_RENDER_PRIORITY;
- eventBus.on(['render.shape', 'render.connection'], renderPriority, function (evt, context) {
- var type = evt.type,
- element = context.element,
- visuals = context.gfx;
-
- if (self.canRender(element)) {
- if (type === 'render.shape') {
- return self.drawShape(visuals, element);
- } else {
- return self.drawConnection(visuals, element);
- }
- }
- });
- eventBus.on(['render.getShapePath', 'render.getConnectionPath'], renderPriority, function (evt, element) {
- if (self.canRender(element)) {
- if (evt.type === 'render.getShapePath') {
- return self.getShapePath(element);
- } else {
- return self.getConnectionPath(element);
- }
- }
- });
- }
- /**
- * Should check whether *this* renderer can render
- * the element/connection.
- *
- * @param {element} element
- *
- * @returns {boolean}
- */
+ this._create.start(this._mouse.getLastMoveEvent(), elements, {
+ hints: hints || {}
+ });
+};
+/**
+ * Paste elements directly.
+ *
+ * @param {Element[]} elements
+ * @param {Shape} target
+ * @param {Point} position
+ * @param {Object} [hints]
+ */
+CopyPaste.prototype._paste = function(elements, target, position, hints) {
+
+ // make sure each element has x and y
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function(element) {
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(element.x)) {
+ element.x = 0;
+ }
+
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(element.y)) {
+ element.y = 0;
+ }
+ });
+
+ var bbox = (0,_util_Elements__WEBPACK_IMPORTED_MODULE_2__.getBBox)(elements);
+
+ // center elements around cursor
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function(element) {
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.isConnection)(element)) {
+ element.waypoints = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.map)(element.waypoints, function(waypoint) {
+ return {
+ x: waypoint.x - bbox.x - bbox.width / 2,
+ y: waypoint.y - bbox.y - bbox.height / 2
+ };
+ });
+ }
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(element, {
+ x: element.x - bbox.x - bbox.width / 2,
+ y: element.y - bbox.y - bbox.height / 2
+ });
+ });
+
+ return this._modeling.createElements(elements, position, target, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, hints));
+};
+
+/**
+ * Create elements from tree.
+ */
+CopyPaste.prototype._createElements = function(tree) {
+ var self = this;
- BaseRenderer.prototype.canRender = function () {};
- /**
- * Provides the shape's snap svg element to be drawn on the `canvas`.
- *
- * @param {djs.Graphics} visuals
- * @param {Shape} shape
- *
- * @returns {Snap.svg} [returns a Snap.svg paper element ]
- */
+ var eventBus = this._eventBus;
+ var cache = {};
- BaseRenderer.prototype.drawShape = function () {};
- /**
- * Provides the shape's snap svg element to be drawn on the `canvas`.
- *
- * @param {djs.Graphics} visuals
- * @param {Connection} connection
- *
- * @returns {Snap.svg} [returns a Snap.svg paper element ]
- */
+ var elements = [];
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(tree, function(branch, depth) {
- BaseRenderer.prototype.drawConnection = function () {};
- /**
- * Gets the SVG path of a shape that represents it's visual bounds.
- *
- * @param {Shape} shape
- *
- * @return {string} svg path
- */
+ depth = parseInt(depth, 10);
+ // sort by priority
+ branch = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.sortBy)(branch, 'priority');
- BaseRenderer.prototype.getShapePath = function () {};
- /**
- * Gets the SVG path of a connection that represents it's visual bounds.
- *
- * @param {Connection} connection
- *
- * @return {string} svg path
- */
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(branch, function(descriptor) {
+ // remove priority
+ var attrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.omit)(descriptor, [ 'priority' ]));
- BaseRenderer.prototype.getConnectionPath = function () {};
+ if (cache[ descriptor.parent ]) {
+ attrs.parent = cache[ descriptor.parent ];
+ } else {
+ delete attrs.parent;
+ }
- },{}],260:[function(require,module,exports){
- "use strict";
+ eventBus.fire('copyPaste.pasteElement', {
+ cache: cache,
+ descriptor: attrs
+ });
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = DefaultRenderer;
+ var element;
- var _inherits = _interopRequireDefault(require("inherits"));
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.isConnection)(attrs)) {
+ attrs.source = cache[ descriptor.source ];
+ attrs.target = cache[ descriptor.target ];
- var _BaseRenderer = _interopRequireDefault(require("./BaseRenderer"));
+ element = cache[ descriptor.id ] = self.createConnection(attrs);
- var _RenderUtil = require("../util/RenderUtil");
+ elements.push(element);
- var _tinySvg = require("tiny-svg");
+ return;
+ }
- var _Elements = require("../util/Elements");
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.isLabel)(attrs)) {
+ attrs.labelTarget = cache[ attrs.labelTarget ];
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ element = cache[ descriptor.id ] = self.createLabel(attrs);
-// apply default renderer with lowest possible priority
-// so that it only kicks in if noone else could render
- var DEFAULT_RENDER_PRIORITY = 1;
- /**
- * The default renderer used for shapes and connections.
- *
- * @param {EventBus} eventBus
- * @param {Styles} styles
- */
+ elements.push(element);
- function DefaultRenderer(eventBus, styles) {
- //
- _BaseRenderer.default.call(this, eventBus, DEFAULT_RENDER_PRIORITY);
+ return;
+ }
- this.CONNECTION_STYLE = styles.style(['no-fill'], {
- strokeWidth: 5,
- stroke: 'fuchsia'
- });
- this.SHAPE_STYLE = styles.style({
- fill: 'white',
- stroke: 'fuchsia',
- strokeWidth: 2
- });
- this.FRAME_STYLE = styles.style(['no-fill'], {
- stroke: 'fuchsia',
- strokeDasharray: 4,
- strokeWidth: 2
- });
- }
+ if (attrs.host) {
+ attrs.host = cache[ attrs.host ];
+ }
- (0, _inherits.default)(DefaultRenderer, _BaseRenderer.default);
+ element = cache[ descriptor.id ] = self.createShape(attrs);
- DefaultRenderer.prototype.canRender = function () {
- return true;
- };
+ elements.push(element);
+ });
- DefaultRenderer.prototype.drawShape = function drawShape(visuals, element) {
- var rect = (0, _tinySvg.create)('rect');
- (0, _tinySvg.attr)(rect, {
- x: 0,
- y: 0,
- width: element.width || 0,
- height: element.height || 0
- });
+ });
- if ((0, _Elements.isFrameElement)(element)) {
- (0, _tinySvg.attr)(rect, this.FRAME_STYLE);
- } else {
- (0, _tinySvg.attr)(rect, this.SHAPE_STYLE);
- }
+ return elements;
+};
- (0, _tinySvg.append)(visuals, rect);
- return rect;
- };
+CopyPaste.prototype.createConnection = function(attrs) {
+ var connection = this._elementFactory.createConnection((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.omit)(attrs, [ 'id' ]));
- DefaultRenderer.prototype.drawConnection = function drawConnection(visuals, connection) {
- var line = (0, _RenderUtil.createLine)(connection.waypoints, this.CONNECTION_STYLE);
- (0, _tinySvg.append)(visuals, line);
- return line;
- };
+ return connection;
+};
- DefaultRenderer.prototype.getShapePath = function getShapePath(shape) {
- var x = shape.x,
- y = shape.y,
- width = shape.width,
- height = shape.height;
- var shapePath = [['M', x, y], ['l', width, 0], ['l', 0, height], ['l', -width, 0], ['z']];
- return (0, _RenderUtil.componentsToPath)(shapePath);
- };
+CopyPaste.prototype.createLabel = function(attrs) {
+ var label = this._elementFactory.createLabel((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.omit)(attrs, [ 'id' ]));
- DefaultRenderer.prototype.getConnectionPath = function getConnectionPath(connection) {
- var waypoints = connection.waypoints;
- var idx,
- point,
- connectionPath = [];
+ return label;
+};
- for (idx = 0; point = waypoints[idx]; idx++) {
- // take invisible docking into account
- // when creating the path
- point = point.original || point;
- connectionPath.push([idx === 0 ? 'M' : 'L', point.x, point.y]);
- }
+CopyPaste.prototype.createShape = function(attrs) {
+ var shape = this._elementFactory.createShape((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.omit)(attrs, [ 'id' ]));
- return (0, _RenderUtil.componentsToPath)(connectionPath);
- };
+ return shape;
+};
- DefaultRenderer.$inject = ['eventBus', 'styles'];
+/**
+ * Check wether element has relations to other elements e.g. attachers, labels and connections.
+ *
+ * @param {Object} element
+ * @param {Element[]} elements
+ *
+ * @return {boolean}
+ */
+CopyPaste.prototype.hasRelations = function(element, elements) {
+ var labelTarget,
+ source,
+ target;
- },{"../util/Elements":420,"../util/RenderUtil":432,"./BaseRenderer":259,"inherits":438,"tiny-svg":658}],261:[function(require,module,exports){
- "use strict";
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.isConnection)(element)) {
+ source = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(elements, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.matchPattern)({ id: element.source.id }));
+ target = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(elements, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.matchPattern)({ id: element.target.id }));
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = Styles;
+ if (!source || !target) {
+ return false;
+ }
+ }
- var _minDash = require("min-dash");
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.isLabel)(element)) {
+ labelTarget = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(elements, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.matchPattern)({ id: element.labelTarget.id }));
- /**
- * A component that manages shape styles
- */
- function Styles() {
- var defaultTraits = {
- 'no-fill': {
- fill: 'none'
- },
- 'no-border': {
- strokeOpacity: 0.0
- },
- 'no-events': {
- pointerEvents: 'none'
- }
- };
- var self = this;
- /**
- * Builds a style definition from a className, a list of traits and an object of additional attributes.
- *
- * @param {string} className
- * @param {Array} traits
- * @param {Object} additionalAttrs
- *
- * @return {Object} the style defintion
- */
-
- this.cls = function (className, traits, additionalAttrs) {
- var attrs = this.style(traits, additionalAttrs);
- return (0, _minDash.assign)(attrs, {
- 'class': className
- });
- };
- /**
- * Builds a style definition from a list of traits and an object of additional attributes.
- *
- * @param {Array} traits
- * @param {Object} additionalAttrs
- *
- * @return {Object} the style defintion
- */
-
-
- this.style = function (traits, additionalAttrs) {
- if (!(0, _minDash.isArray)(traits) && !additionalAttrs) {
- additionalAttrs = traits;
- traits = [];
- }
+ if (!labelTarget) {
+ return false;
+ }
+ }
- var attrs = (0, _minDash.reduce)(traits, function (attrs, t) {
- return (0, _minDash.assign)(attrs, defaultTraits[t] || {});
- }, {});
- return additionalAttrs ? (0, _minDash.assign)(attrs, additionalAttrs) : attrs;
- };
+ return true;
+};
- this.computeStyle = function (custom, traits, defaultStyles) {
- if (!(0, _minDash.isArray)(traits)) {
- defaultStyles = traits;
- traits = [];
- }
+/**
+ * Create a tree-like structure from elements.
+ *
+ * @example
+ *
+ * ```javascript
+ * tree: {
+ * 0: [
+ * { id: 'Shape_1', priority: 1, ... },
+ * { id: 'Shape_2', priority: 1, ... },
+ * { id: 'Connection_1', source: 'Shape_1', target: 'Shape_2', priority: 3, ... },
+ * ...
+ * ],
+ * 1: [
+ * { id: 'Shape_3', parent: 'Shape1', priority: 1, ... },
+ * ...
+ * ]
+ * };
+ * ```
+ *
+ * @param {Element[]} elements
+ *
+ * @return {Object}
+ */
+CopyPaste.prototype.createTree = function(elements) {
+ var rules = this._rules,
+ self = this;
+
+ var tree = {},
+ elementsData = [];
+
+ var parents = (0,_util_Elements__WEBPACK_IMPORTED_MODULE_2__.getParents)(elements);
+
+ function canCopy(element, elements) {
+ return rules.allowed('element.copy', {
+ element: element,
+ elements: elements
+ });
+ }
+
+ function addElementData(element, depth) {
+
+ // (1) check wether element has already been added
+ var foundElementData = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(elementsData, function(elementsData) {
+ return element === elementsData.element;
+ });
+
+ // (2) add element if not already added
+ if (!foundElementData) {
+ elementsData.push({
+ element: element,
+ depth: depth
+ });
+
+ return;
+ }
+
+ // (3) update depth
+ if (foundElementData.depth < depth) {
+ elementsData = removeElementData(foundElementData, elementsData);
+
+ elementsData.push({
+ element: foundElementData.element,
+ depth: depth
+ });
+ }
+ }
+
+ function removeElementData(elementData, elementsData) {
+ var index = elementsData.indexOf(elementData);
+
+ if (index !== -1) {
+ elementsData.splice(index, 1);
+ }
+
+ return elementsData;
+ }
+
+ // (1) add elements
+ (0,_util_Elements__WEBPACK_IMPORTED_MODULE_2__.eachElement)(parents, function(element, _index, depth) {
+
+ // do NOT add external labels directly
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.isLabel)(element)) {
+ return;
+ }
+
+ // always copy external labels
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(element.labels, function(label) {
+ addElementData(label, depth);
+ });
+
+ function addRelatedElements(elements) {
+ elements && elements.length && (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function(element) {
+
+ // add external labels
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(element.labels, function(label) {
+ addElementData(label, depth);
+ });
- return self.style(traits || [], (0, _minDash.assign)({}, defaultStyles, custom || {}));
- };
- }
+ addElementData(element, depth);
+ });
+ }
- },{"min-dash":646}],262:[function(require,module,exports){
- "use strict";
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)([ element.attachers, element.incoming, element.outgoing ], addRelatedElements);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+ addElementData(element, depth);
- var _DefaultRenderer = _interopRequireDefault(require("./DefaultRenderer"));
+ var children = [];
- var _Styles = _interopRequireDefault(require("./Styles"));
+ if (element.children) {
+ children = element.children.slice();
+ }
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ // allow others to add children to tree
+ self._eventBus.fire('copyPaste.createTree', {
+ element: element,
+ children: children
+ });
- var _default = {
- __init__: ['defaultRenderer'],
- defaultRenderer: ['type', _DefaultRenderer.default],
- styles: ['type', _Styles.default]
- };
- exports.default = _default;
+ return children;
+ });
- },{"./DefaultRenderer":260,"./Styles":261}],263:[function(require,module,exports){
- "use strict";
+ elements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.map)(elementsData, function(elementData) {
+ return elementData.element;
+ });
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = AlignElements;
+ // (2) copy elements
+ elementsData = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.map)(elementsData, function(elementData) {
+ elementData.descriptor = {};
- var _minDash = require("min-dash");
+ self._eventBus.fire('copyPaste.copyElement', {
+ descriptor: elementData.descriptor,
+ element: elementData.element,
+ elements: elements
+ });
- function last(arr) {
- return arr && arr[arr.length - 1];
- }
+ return elementData;
+ });
- function sortTopOrMiddle(element) {
- return element.y;
- }
+ // (3) sort elements by priority
+ elementsData = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.sortBy)(elementsData, function(elementData) {
+ return elementData.descriptor.priority;
+ });
- function sortLeftOrCenter(element) {
- return element.x;
- }
- /**
- * Sorting functions for different types of alignment
- *
- * @type {Object}
- *
- * @return {Function}
- */
+ elements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.map)(elementsData, function(elementData) {
+ return elementData.element;
+ });
+ // (4) create tree
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elementsData, function(elementData) {
+ var depth = elementData.depth;
- var ALIGNMENT_SORTING = {
- left: sortLeftOrCenter,
- center: sortLeftOrCenter,
- right: function (element) {
- return element.x + element.width;
- },
- top: sortTopOrMiddle,
- middle: sortTopOrMiddle,
- bottom: function (element) {
- return element.y + element.height;
- }
- };
-
- function AlignElements(modeling) {
- this._modeling = modeling;
- }
-
- AlignElements.$inject = ['modeling'];
- /**
- * Get the relevant "axis" and "dimension" related to the current type of alignment
- *
- * @param {string} type left|right|center|top|bottom|middle
- *
- * @return {Object} { axis, dimension }
- */
-
- AlignElements.prototype._getOrientationDetails = function (type) {
- var vertical = ['top', 'bottom', 'middle'],
- axis = 'x',
- dimension = 'width';
-
- if (vertical.indexOf(type) !== -1) {
- axis = 'y';
- dimension = 'height';
- }
-
- return {
- axis: axis,
- dimension: dimension
- };
- };
-
- AlignElements.prototype._isType = function (type, types) {
- return types.indexOf(type) !== -1;
- };
- /**
- * Get a point on the relevant axis where elements should align to
- *
- * @param {string} type left|right|center|top|bottom|middle
- * @param {Array} sortedElements
- *
- * @return {Object}
- */
-
-
- AlignElements.prototype._alignmentPosition = function (type, sortedElements) {
- var orientation = this._getOrientationDetails(type),
- axis = orientation.axis,
- dimension = orientation.dimension,
- alignment = {},
- centers = {},
- hasSharedCenters = false,
- centeredElements,
- firstElement,
- lastElement;
-
- function getMiddleOrTop(first, last) {
- return Math.round((first[axis] + last[axis] + last[dimension]) / 2);
- }
-
- if (this._isType(type, ['left', 'top'])) {
- alignment[type] = sortedElements[0][axis];
- } else if (this._isType(type, ['right', 'bottom'])) {
- lastElement = last(sortedElements);
- alignment[type] = lastElement[axis] + lastElement[dimension];
- } else if (this._isType(type, ['center', 'middle'])) {
- // check if there is a center shared by more than one shape
- // if not, just take the middle of the range
- (0, _minDash.forEach)(sortedElements, function (element) {
- var center = element[axis] + Math.round(element[dimension] / 2);
-
- if (centers[center]) {
- centers[center].elements.push(element);
- } else {
- centers[center] = {
- elements: [element],
- center: center
- };
- }
- });
- centeredElements = (0, _minDash.sortBy)(centers, function (center) {
- if (center.elements.length > 1) {
- hasSharedCenters = true;
- }
+ if (!self.hasRelations(elementData.element, elements)) {
+ removeElement(elementData.element, elements);
- return center.elements.length;
- });
-
- if (hasSharedCenters) {
- alignment[type] = last(centeredElements).center;
- return alignment;
- }
-
- firstElement = sortedElements[0];
- sortedElements = (0, _minDash.sortBy)(sortedElements, function (element) {
- return element[axis] + element[dimension];
- });
- lastElement = last(sortedElements);
- alignment[type] = getMiddleOrTop(firstElement, lastElement);
- }
+ return;
+ }
- return alignment;
- };
- /**
- * Executes the alignment of a selection of elements
- *
- * @param {Array} elements [description]
- * @param {string} type left|right|center|top|bottom|middle
- */
+ if (!canCopy(elementData.element, elements)) {
+ removeElement(elementData.element, elements);
+ return;
+ }
- AlignElements.prototype.trigger = function (elements, type) {
- var modeling = this._modeling;
- var filteredElements = (0, _minDash.filter)(elements, function (element) {
- return !(element.waypoints || element.host || element.labelTarget);
- });
- var sortFn = ALIGNMENT_SORTING[type];
- var sortedElements = (0, _minDash.sortBy)(filteredElements, sortFn);
+ if (!tree[depth]) {
+ tree[depth] = [];
+ }
- var alignment = this._alignmentPosition(type, sortedElements);
+ tree[depth].push(elementData.descriptor);
+ });
- modeling.alignElements(sortedElements, alignment);
- };
+ return tree;
+};
- },{"min-dash":646}],264:[function(require,module,exports){
- "use strict";
+// helpers //////////
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+function isAttacher(element) {
+ return !!element.host;
+}
- var _AlignElements = _interopRequireDefault(require("./AlignElements"));
+function copyWaypoints(element) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.map)(element.waypoints, function(waypoint) {
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ waypoint = copyWaypoint(waypoint);
- var _default = {
- __init__: ['alignElements'],
- alignElements: ['type', _AlignElements.default]
- };
- exports.default = _default;
+ if (waypoint.original) {
+ waypoint.original = copyWaypoint(waypoint.original);
+ }
- },{"./AlignElements":263}],265:[function(require,module,exports){
- "use strict";
+ return waypoint;
+ });
+}
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = AttachSupport;
+function copyWaypoint(waypoint) {
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, waypoint);
+}
- var _minDash = require("min-dash");
+function removeElement(element, elements) {
+ var index = elements.indexOf(element);
- var _Removal = require("../../util/Removal");
+ if (index === -1) {
+ return elements;
+ }
- var _AttachUtil = require("../../util/AttachUtil");
+ return elements.splice(index, 1);
+}
- var _inherits = _interopRequireDefault(require("inherits"));
+/***/ }),
- var _CommandInterceptor = _interopRequireDefault(require("../../command/CommandInterceptor"));
+/***/ "../node_modules/diagram-js/lib/features/copy-paste/index.js":
+/*!*******************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/copy-paste/index.js ***!
+ \*******************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _clipboard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../clipboard */ "../node_modules/diagram-js/lib/features/clipboard/index.js");
+/* harmony import */ var _create__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../create */ "../node_modules/diagram-js/lib/features/create/index.js");
+/* harmony import */ var _mouse__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../mouse */ "../node_modules/diagram-js/lib/features/mouse/index.js");
+/* harmony import */ var _rules__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../rules */ "../node_modules/diagram-js/lib/features/rules/index.js");
+/* harmony import */ var _CopyPaste__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CopyPaste */ "../node_modules/diagram-js/lib/features/copy-paste/CopyPaste.js");
- var LOW_PRIORITY = 251,
- HIGH_PRIORITY = 1401;
- var MARKER_ATTACH = 'attach-ok';
- /**
- * Adds the notion of attached elements to the modeler.
- *
- * Optionally depends on `diagram-js/lib/features/move` to render
- * the attached elements during move preview.
- *
- * Optionally depends on `diagram-js/lib/features/label-support`
- * to render attached labels during move preview.
- *
- * @param {didi.Injector} injector
- * @param {EventBus} eventBus
- * @param {Canvas} canvas
- * @param {Rules} rules
- * @param {Modeling} modeling
- */
- function AttachSupport(injector, eventBus, canvas, rules, modeling) {
- _CommandInterceptor.default.call(this, eventBus);
-
- var movePreview = injector.get('movePreview', false); // remove all the attached elements from the shapes to be validated
- // add all the attached shapes to the overall list of moved shapes
-
- eventBus.on('shape.move.start', HIGH_PRIORITY, function (e) {
- var context = e.context,
- shapes = context.shapes,
- validatedShapes = context.validatedShapes;
- context.shapes = addAttached(shapes);
- context.validatedShapes = removeAttached(validatedShapes);
- }); // add attachers to the visual's group
-
- movePreview && eventBus.on('shape.move.start', LOW_PRIORITY, function (e) {
- var context = e.context,
- shapes = context.shapes,
- attachers = getAttachers(shapes);
- (0, _minDash.forEach)(attachers, function (attacher) {
- movePreview.makeDraggable(context, attacher, true);
- (0, _minDash.forEach)(attacher.labels, function (label) {
- movePreview.makeDraggable(context, label, true);
- });
- });
- }); // add attach-ok marker to current host
- movePreview && eventBus.on('shape.move.start', function (event) {
- var context = event.context,
- shapes = context.shapes;
- if (shapes.length !== 1) {
- return;
- }
- var shape = shapes[0];
- var host = shape.host;
- if (host) {
- canvas.addMarker(host, MARKER_ATTACH);
- eventBus.once(['shape.move.out', 'shape.move.cleanup'], function () {
- canvas.removeMarker(host, MARKER_ATTACH);
- });
- }
- }); // add all attachers to move closure
-
- this.preExecuted('elements.move', HIGH_PRIORITY, function (e) {
- var context = e.context,
- closure = context.closure,
- shapes = context.shapes,
- attachers = getAttachers(shapes);
- (0, _minDash.forEach)(attachers, function (attacher) {
- closure.add(attacher, closure.topLevel[attacher.host.id]);
- });
- }); // perform the attaching after shapes are done moving
- this.postExecuted('elements.move', function (e) {
- var context = e.context,
- shapes = context.shapes,
- newHost = context.newHost,
- attachers; // only single elements can be attached
- // multiply elements can be detached
- if (newHost && shapes.length !== 1) {
- return;
- }
+/**
+ * @type { import('didi').ModuleDeclaration }
+ */
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ _clipboard__WEBPACK_IMPORTED_MODULE_0__["default"],
+ _create__WEBPACK_IMPORTED_MODULE_1__["default"],
+ _mouse__WEBPACK_IMPORTED_MODULE_2__["default"],
+ _rules__WEBPACK_IMPORTED_MODULE_3__["default"]
+ ],
+ __init__: [ 'copyPaste' ],
+ copyPaste: [ 'type', _CopyPaste__WEBPACK_IMPORTED_MODULE_4__["default"] ]
+});
- if (newHost) {
- attachers = shapes;
- } else {
- // find attachers moved without host
- attachers = (0, _minDash.filter)(shapes, function (shape) {
- var host = shape.host;
- return isAttacher(shape) && !includes(shapes, host);
- });
- }
- (0, _minDash.forEach)(attachers, function (attacher) {
- modeling.updateAttachment(attacher, newHost);
- });
- }); // ensure invalid attachment connections are removed
-
- this.postExecuted('elements.move', function (e) {
- var shapes = e.context.shapes;
- (0, _minDash.forEach)(shapes, function (shape) {
- (0, _minDash.forEach)(shape.attachers, function (attacher) {
- // remove invalid outgoing connections
- (0, _minDash.forEach)(attacher.outgoing.slice(), function (connection) {
- var allowed = rules.allowed('connection.reconnect', {
- connection: connection,
- source: connection.source,
- target: connection.target
- });
+/***/ }),
- if (!allowed) {
- modeling.removeConnection(connection);
- }
- }); // remove invalid incoming connections
+/***/ "../node_modules/diagram-js/lib/features/create/Create.js":
+/*!****************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/create/Create.js ***!
+ \****************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- (0, _minDash.forEach)(attacher.incoming.slice(), function (connection) {
- var allowed = rules.allowed('connection.reconnect', {
- connection: connection,
- source: connection.source,
- target: connection.target
- });
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ Create)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _util_Elements__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/Elements */ "../node_modules/diagram-js/lib/util/Elements.js");
+/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/ModelUtil */ "../node_modules/diagram-js/lib/util/ModelUtil.js");
+var MARKER_OK = 'drop-ok',
+ MARKER_NOT_OK = 'drop-not-ok',
+ MARKER_ATTACH = 'attach-ok',
+ MARKER_NEW_PARENT = 'new-parent';
- if (!allowed) {
- modeling.removeConnection(connection);
- }
- });
- });
- });
- });
- this.postExecute('shape.create', function (e) {
- var context = e.context,
- shape = context.shape,
- host = context.host;
- if (host) {
- modeling.updateAttachment(shape, host);
- }
- }); // update attachments if the host is replaced
- this.postExecute('shape.replace', function (e) {
- var context = e.context,
- oldShape = context.oldShape,
- newShape = context.newShape; // move the attachers to the new host
- (0, _Removal.saveClear)(oldShape.attachers, function (attacher) {
- var allowed = rules.allowed('elements.move', {
- target: newShape,
- shapes: [attacher]
- });
- if (allowed === 'attach') {
- modeling.updateAttachment(attacher, newShape);
- } else {
- modeling.removeShape(attacher);
- }
- }); // move attachers if new host has different size
- if (newShape.attachers.length) {
- (0, _minDash.forEach)(newShape.attachers, function (attacher) {
- var delta = (0, _AttachUtil.getNewAttachShapeDelta)(attacher, oldShape, newShape);
- modeling.moveShape(attacher, delta, attacher.parent);
- });
- }
- }); // move shape on host resize
- this.postExecute('shape.resize', function (event) {
- var context = event.context,
- shape = context.shape,
- oldBounds = context.oldBounds,
- newBounds = context.newBounds,
- attachers = shape.attachers,
- hints = context.hints || {};
+/**
+ * @typedef {import('../../core/Types').ElementLike} Element
+ * @typedef {import('../../core/Types').ShapeLike} Shape
+ *
+ * @typedef {import('../../util/Types').Point} Point
+ *
+ * @typedef {import('../../core/Canvas').default} Canvas
+ * @typedef {import('../dragging/Dragging').default} Dragging
+ * @typedef {import('../../core/EventBus').default} EventBus
+ * @typedef {import('../modeling/Modeling').default} Modeling
+ * @typedef {import('../rules/Rules').default} Rules
+ */
- if (hints.attachSupport === false) {
- return;
- }
+var PREFIX = 'create';
- (0, _minDash.forEach)(attachers, function (attacher) {
- var delta = (0, _AttachUtil.getNewAttachShapeDelta)(attacher, oldBounds, newBounds);
- modeling.moveShape(attacher, delta, attacher.parent);
- (0, _minDash.forEach)(attacher.labels, function (label) {
- modeling.moveShape(label, delta, label.parent);
- });
- });
- }); // remove attachments
+var HIGH_PRIORITY = 2000;
- this.preExecute('shape.delete', function (event) {
- var shape = event.context.shape;
- (0, _Removal.saveClear)(shape.attachers, function (attacher) {
- modeling.removeShape(attacher);
- });
- if (shape.host) {
- modeling.updateAttachment(shape, null);
- }
- });
- }
+/**
+ * Create new elements through drag and drop.
+ *
+ * @param {Canvas} canvas
+ * @param {Dragging} dragging
+ * @param {EventBus} eventBus
+ * @param {Modeling} modeling
+ * @param {Rules} rules
+ */
+function Create(
+ canvas,
+ dragging,
+ eventBus,
+ modeling,
+ rules
+) {
+
+ // rules //////////
+
+ /**
+ * Check wether elements can be created.
+ *
+ * @param {Element[]} elements
+ * @param {Shape} target
+ * @param {Point} position
+ * @param {Element} [source]
+ *
+ * @return {boolean|null|Object}
+ */
+ function canCreate(elements, target, position, source, hints) {
+ if (!target) {
+ return false;
+ }
+
+ // ignore child elements and external labels
+ elements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(elements, function(element) {
+ var labelTarget = element.labelTarget;
+
+ return !element.parent && !((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.isLabel)(element) && elements.indexOf(labelTarget) !== -1);
+ });
+
+ var shape = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(elements, function(element) {
+ return !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.isConnection)(element);
+ });
+
+ var attach = false,
+ connect = false,
+ create = false;
+
+ // (1) attaching single shapes
+ if (isSingleShape(elements)) {
+ attach = rules.allowed('shape.attach', {
+ position: position,
+ shape: shape,
+ target: target
+ });
+ }
+
+ if (!attach) {
+
+ // (2) creating elements
+ if (isSingleShape(elements)) {
+ create = rules.allowed('shape.create', {
+ position: position,
+ shape: shape,
+ source: source,
+ target: target
+ });
+ } else {
+ create = rules.allowed('elements.create', {
+ elements: elements,
+ position: position,
+ target: target
+ });
+ }
+
+ }
+
+ var connectionTarget = hints.connectionTarget;
+
+ // (3) appending single shapes
+ if (create || attach) {
+ if (shape && source) {
+ connect = rules.allowed('connection.create', {
+ source: connectionTarget === source ? shape : source,
+ target: connectionTarget === source ? source : shape,
+ hints: {
+ targetParent: target,
+ targetAttach: attach
+ }
+ });
+ }
+
+ return {
+ attach: attach,
+ connect: connect
+ };
+ }
+
+ // ignore wether or not elements can be created
+ if (create === null || attach === null) {
+ return null;
+ }
+
+ return false;
+ }
+
+ function setMarker(element, marker) {
+ [ MARKER_ATTACH, MARKER_OK, MARKER_NOT_OK, MARKER_NEW_PARENT ].forEach(function(m) {
+
+ if (m === marker) {
+ canvas.addMarker(element, m);
+ } else {
+ canvas.removeMarker(element, m);
+ }
+ });
+ }
+
+ // event handling //////////
+
+ eventBus.on([ 'create.move', 'create.hover' ], function(event) {
+ var context = event.context,
+ elements = context.elements,
+ hover = event.hover,
+ source = context.source,
+ hints = context.hints || {};
+
+ if (!hover) {
+ context.canExecute = false;
+ context.target = null;
+
+ return;
+ }
+
+ ensureConstraints(event);
+
+ var position = {
+ x: event.x,
+ y: event.y
+ };
+
+ var canExecute = context.canExecute = hover && canCreate(elements, hover, position, source, hints);
+
+ if (hover && canExecute !== null) {
+ context.target = hover;
+
+ if (canExecute && canExecute.attach) {
+ setMarker(hover, MARKER_ATTACH);
+ } else {
+ setMarker(hover, canExecute ? MARKER_NEW_PARENT : MARKER_NOT_OK);
+ }
+ }
+ });
+
+ eventBus.on([ 'create.end', 'create.out', 'create.cleanup' ], function(event) {
+ var hover = event.hover;
+
+ if (hover) {
+ setMarker(hover, null);
+ }
+ });
+
+ eventBus.on('create.end', function(event) {
+ var context = event.context,
+ source = context.source,
+ shape = context.shape,
+ elements = context.elements,
+ target = context.target,
+ canExecute = context.canExecute,
+ attach = canExecute && canExecute.attach,
+ connect = canExecute && canExecute.connect,
+ hints = context.hints || {};
+
+ if (canExecute === false || !target) {
+ return false;
+ }
+
+ ensureConstraints(event);
+
+ var position = {
+ x: event.x,
+ y: event.y
+ };
+
+ if (connect) {
+ shape = modeling.appendShape(source, shape, position, target, {
+ attach: attach,
+ connection: connect === true ? {} : connect,
+ connectionTarget: hints.connectionTarget
+ });
+ } else {
+ elements = modeling.createElements(elements, position, target, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, hints, {
+ attach: attach
+ }));
+
+ // update shape
+ shape = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(elements, function(element) {
+ return !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.isConnection)(element);
+ });
+ }
+
+ // update elements and shape
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(context, {
+ elements: elements,
+ shape: shape
+ });
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(event, {
+ elements: elements,
+ shape: shape
+ });
+ });
+
+ function cancel() {
+ var context = dragging.context();
+
+ if (context && context.prefix === PREFIX) {
+ dragging.cancel();
+ }
+ }
+
+ // cancel on that is not result of
+ eventBus.on('create.init', function() {
+ eventBus.on('elements.changed', cancel);
+
+ eventBus.once([ 'create.cancel', 'create.end' ], HIGH_PRIORITY, function() {
+ eventBus.off('elements.changed', cancel);
+ });
+ });
+
+ // API //////////
+
+ this.start = function(event, elements, context) {
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(elements)) {
+ elements = [ elements ];
+ }
+
+ var shape = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(elements, function(element) {
+ return !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.isConnection)(element);
+ });
+
+ if (!shape) {
+
+ // at least one shape is required
+ return;
+ }
+
+ context = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({
+ elements: elements,
+ hints: {},
+ shape: shape
+ }, context || {});
+
+ // make sure each element has x and y
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function(element) {
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(element.x)) {
+ element.x = 0;
+ }
+
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(element.y)) {
+ element.y = 0;
+ }
+ });
+
+ var visibleElements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(elements, function(element) {
+ return !element.hidden;
+ });
+
+ var bbox = (0,_util_Elements__WEBPACK_IMPORTED_MODULE_2__.getBBox)(visibleElements);
+
+ // center elements around cursor
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function(element) {
+ if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.isConnection)(element)) {
+ element.waypoints = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.map)(element.waypoints, function(waypoint) {
+ return {
+ x: waypoint.x - bbox.x - bbox.width / 2,
+ y: waypoint.y - bbox.y - bbox.height / 2
+ };
+ });
+ }
+
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(element, {
+ x: element.x - bbox.x - bbox.width / 2,
+ y: element.y - bbox.y - bbox.height / 2
+ });
+ });
+
+ dragging.init(event, PREFIX, {
+ cursor: 'grabbing',
+ autoActivate: true,
+ data: {
+ shape: shape,
+ elements: elements,
+ context: context
+ }
+ });
+ };
+}
+
+Create.$inject = [
+ 'canvas',
+ 'dragging',
+ 'eventBus',
+ 'modeling',
+ 'rules'
+];
+
+// helpers //////////
+
+function ensureConstraints(event) {
+ var context = event.context,
+ createConstraints = context.createConstraints;
+
+ if (!createConstraints) {
+ return;
+ }
+
+ if (createConstraints.left) {
+ event.x = Math.max(event.x, createConstraints.left);
+ }
+
+ if (createConstraints.right) {
+ event.x = Math.min(event.x, createConstraints.right);
+ }
+
+ if (createConstraints.top) {
+ event.y = Math.max(event.y, createConstraints.top);
+ }
+
+ if (createConstraints.bottom) {
+ event.y = Math.min(event.y, createConstraints.bottom);
+ }
+}
+
+function isSingleShape(elements) {
+ return elements && elements.length === 1 && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.isConnection)(elements[ 0 ]);
+}
+
+/***/ }),
+
+/***/ "../node_modules/diagram-js/lib/features/create/CreatePreview.js":
+/*!***********************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/create/CreatePreview.js ***!
+ \***********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ CreatePreview)
+/* harmony export */ });
+/* harmony import */ var _util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/SvgTransformUtil */ "../node_modules/diagram-js/lib/util/SvgTransformUtil.js");
+/* harmony import */ var _util_GraphicsUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/GraphicsUtil */ "../node_modules/diagram-js/lib/util/GraphicsUtil.js");
+/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tiny-svg */ "../node_modules/tiny-svg/dist/index.esm.js");
+
+
+
+
+
+
+/**
+ * @typedef {import('../../core/Canvas').default} Canvas
+ * @typedef {import('../../core/EventBus').default} EventBus
+ * @typedef {import('../../core/GraphicsFactory').default} GraphicsFactory
+ * @typedef {import('../preview-support/PreviewSupport').default} PreviewSupport
+ * @typedef {import('../../draw/Styles').default} Styles
+ */
- (0, _inherits.default)(AttachSupport, _CommandInterceptor.default);
- AttachSupport.$inject = ['injector', 'eventBus', 'canvas', 'rules', 'modeling'];
- /**
- * Return attachers of the given shapes
- *
- * @param {Array} shapes
- * @return {Array}
- */
+var LOW_PRIORITY = 750;
- function getAttachers(shapes) {
- return (0, _minDash.flatten)((0, _minDash.map)(shapes, function (s) {
- return s.attachers || [];
- }));
- }
- /**
- * Return a combined list of elements and
- * attachers.
- *
- * @param {Array} elements
- * @return {Array} filtered
- */
+/**
+ * @param {Canvas} canvas
+ * @param {EventBus} eventBus
+ * @param {GraphicsFactory} graphicsFactory
+ * @param {PreviewSupport} previewSupport
+ * @param {Styles} styles
+ */
+function CreatePreview(
+ canvas,
+ eventBus,
+ graphicsFactory,
+ previewSupport,
+ styles
+) {
+ function createDragGroup(elements) {
+ var dragGroup = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.create)('g');
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(dragGroup, styles.cls('djs-drag-group', [ 'no-events' ]));
- function addAttached(elements) {
- var attachers = getAttachers(elements);
- return (0, _minDash.unionBy)('id', elements, attachers);
- }
- /**
- * Return a filtered list of elements that do not
- * contain attached elements with hosts being part
- * of the selection.
- *
- * @param {Array} elements
- *
- * @return {Array} filtered
- */
+ var childrenGfx = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.create)('g');
+ elements.forEach(function(element) {
- function removeAttached(elements) {
- var ids = (0, _minDash.groupBy)(elements, 'id');
- return (0, _minDash.filter)(elements, function (element) {
- while (element) {
- // host in selection
- if (element.host && ids[element.host.id]) {
- return false;
- }
+ // create graphics
+ var gfx;
- element = element.parent;
- }
+ if (element.hidden) {
+ return;
+ }
- return true;
- });
- }
+ if (element.waypoints) {
+ gfx = graphicsFactory._createContainer('connection', childrenGfx);
- function isAttacher(shape) {
- return !!shape.host;
- }
+ graphicsFactory.drawConnection((0,_util_GraphicsUtil__WEBPACK_IMPORTED_MODULE_1__.getVisual)(gfx), element);
+ } else {
+ gfx = graphicsFactory._createContainer('shape', childrenGfx);
- function includes(array, item) {
- return array.indexOf(item) !== -1;
- }
+ graphicsFactory.drawShape((0,_util_GraphicsUtil__WEBPACK_IMPORTED_MODULE_1__.getVisual)(gfx), element);
- },{"../../command/CommandInterceptor":250,"../../util/AttachUtil":416,"../../util/Removal":431,"inherits":438,"min-dash":646}],266:[function(require,module,exports){
- "use strict";
+ (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_2__.translate)(gfx, element.x, element.y);
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+ // add preview
+ previewSupport.addDragger(element, dragGroup, gfx);
+ });
- var _rules = _interopRequireDefault(require("../rules"));
+ return dragGroup;
+ }
- var _AttachSupport = _interopRequireDefault(require("./AttachSupport"));
+ eventBus.on('create.move', LOW_PRIORITY, function(event) {
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ var hover = event.hover,
+ context = event.context,
+ elements = context.elements,
+ dragGroup = context.dragGroup;
- var _default = {
- __depends__: [_rules.default],
- __init__: ['attachSupport'],
- attachSupport: ['type', _AttachSupport.default]
- };
- exports.default = _default;
+ // lazily create previews
+ if (!dragGroup) {
+ dragGroup = context.dragGroup = createDragGroup(elements);
+ }
- },{"../rules":377,"./AttachSupport":265}],267:[function(require,module,exports){
- "use strict";
+ var activeLayer;
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = AutoPlace;
+ if (hover) {
+ if (!dragGroup.parentNode) {
+ activeLayer = canvas.getActiveLayer();
- var _LayoutUtil = require("../../layout/LayoutUtil");
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.append)(activeLayer, dragGroup);
+ }
- var _AutoPlaceUtil = require("./AutoPlaceUtil");
+ (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_2__.translate)(dragGroup, event.x, event.y);
+ } else {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.remove)(dragGroup);
+ }
+ });
- var LOW_PRIORITY = 100;
- /**
- * A service that places elements connected to existing ones
- * to an appropriate position in an _automated_ fashion.
- *
- * @param {EventBus} eventBus
- * @param {Modeling} modeling
- */
+ eventBus.on('create.cleanup', function(event) {
+ var context = event.context,
+ dragGroup = context.dragGroup;
- function AutoPlace(eventBus, modeling) {
- eventBus.on('autoPlace', LOW_PRIORITY, function (context) {
- var shape = context.shape,
- source = context.source;
- return getNewShapePosition(source, shape);
- });
- /**
- * Append shape to source at appropriate position.
- *
- * @param {djs.model.Shape} source
- * @param {djs.model.Shape} shape
- *
- * @return {djs.model.Shape} appended shape
- */
-
- this.append = function (source, shape, hints) {
- eventBus.fire('autoPlace.start', {
- source: source,
- shape: shape
- }); // allow others to provide the position
-
- var position = eventBus.fire('autoPlace', {
- source: source,
- shape: shape
- });
- var newShape = modeling.appendShape(source, shape, position, source.parent, hints);
- eventBus.fire('autoPlace.end', {
- source: source,
- shape: newShape
- });
- return newShape;
- };
- }
+ if (dragGroup) {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.remove)(dragGroup);
+ }
+ });
+}
- AutoPlace.$inject = ['eventBus', 'modeling']; // helpers //////////
+CreatePreview.$inject = [
+ 'canvas',
+ 'eventBus',
+ 'graphicsFactory',
+ 'previewSupport',
+ 'styles'
+];
- /**
- * Find the new position for the target element to
- * connect to source.
- *
- * @param {djs.model.Shape} source
- * @param {djs.model.Shape} element
- * @param {Object} [hints]
- * @param {Object} [hints.defaultDistance]
- *
- * @returns {Point}
- */
- function getNewShapePosition(source, element, hints) {
- if (!hints) {
- hints = {};
- }
+/***/ }),
- var distance = hints.defaultDistance || _AutoPlaceUtil.DEFAULT_DISTANCE;
- var sourceMid = (0, _LayoutUtil.getMid)(source),
- sourceTrbl = (0, _LayoutUtil.asTRBL)(source); // simply put element right next to source
+/***/ "../node_modules/diagram-js/lib/features/create/index.js":
+/*!***************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/create/index.js ***!
+ \***************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- return {
- x: sourceTrbl.right + distance + element.width / 2,
- y: sourceMid.y
- };
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _dragging__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../dragging */ "../node_modules/diagram-js/lib/features/dragging/index.js");
+/* harmony import */ var _preview_support__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../preview-support */ "../node_modules/diagram-js/lib/features/preview-support/index.js");
+/* harmony import */ var _rules__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../rules */ "../node_modules/diagram-js/lib/features/rules/index.js");
+/* harmony import */ var _selection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../selection */ "../node_modules/diagram-js/lib/features/selection/index.js");
+/* harmony import */ var _Create__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Create */ "../node_modules/diagram-js/lib/features/create/Create.js");
+/* harmony import */ var _CreatePreview__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./CreatePreview */ "../node_modules/diagram-js/lib/features/create/CreatePreview.js");
- },{"../../layout/LayoutUtil":405,"./AutoPlaceUtil":269}],268:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = AutoPlaceSelectionBehavior;
- /**
- * Select element after auto placement.
- *
- * @param {EventBus} eventBus
- * @param {Selection} selection
- */
- function AutoPlaceSelectionBehavior(eventBus, selection) {
- eventBus.on('autoPlace.end', 500, function (e) {
- selection.select(e.shape);
- });
- }
- AutoPlaceSelectionBehavior.$inject = ['eventBus', 'selection'];
- },{}],269:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.findFreePosition = findFreePosition;
- exports.generateGetNextPosition = generateGetNextPosition;
- exports.getConnectedAtPosition = getConnectedAtPosition;
- exports.getConnectedDistance = getConnectedDistance;
- exports.DEFAULT_DISTANCE = void 0;
- var _LayoutUtil = require("../../layout/LayoutUtil");
- var _minDash = require("min-dash");
-// padding to detect element placement
- var PLACEMENT_DETECTION_PAD = 10;
- var DEFAULT_DISTANCE = 50;
- exports.DEFAULT_DISTANCE = DEFAULT_DISTANCE;
- var DEFAULT_MAX_DISTANCE = 250;
- /**
- * Get free position starting from given position.
- *
- * @param {djs.model.Shape} source
- * @param {djs.model.Shape} element
- * @param {Point} position
- * @param {Function} getNextPosition
- *
- * @return {Point}
- */
+/**
+ * @type { import('didi').ModuleDeclaration }
+ */
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ _dragging__WEBPACK_IMPORTED_MODULE_0__["default"],
+ _preview_support__WEBPACK_IMPORTED_MODULE_1__["default"],
+ _rules__WEBPACK_IMPORTED_MODULE_2__["default"],
+ _selection__WEBPACK_IMPORTED_MODULE_3__["default"]
+ ],
+ __init__: [
+ 'create',
+ 'createPreview'
+ ],
+ create: [ 'type', _Create__WEBPACK_IMPORTED_MODULE_4__["default"] ],
+ createPreview: [ 'type', _CreatePreview__WEBPACK_IMPORTED_MODULE_5__["default"] ]
+});
+
+
+/***/ }),
+
+/***/ "../node_modules/diagram-js/lib/features/distribute-elements/DistributeElements.js":
+/*!*****************************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/distribute-elements/DistributeElements.js ***!
+ \*****************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ DistributeElements)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+
+
+/**
+ * @typedef {import('../../model/Types').Element} Element
+ *
+ * @typedef {import('../../util/Types').Axis} Axis
+ * @typedef {import('../../util/Types').Dimension} Dimension
+ * @typedef {import('../../util/Types').Rect} Rect
+ *
+ * @typedef {import('../modeling/Modeling').default} Modeling
+ * @typedef {import('../rules/Rules').default} Rules
+ *
+ * @typedef { {
+ * min: number;
+ * max: number;
+ * } } Range
+ *
+ * @typedef { {
+ * elements: Element[];
+ * range: Range;
+ * } } Group
+ */
- function findFreePosition(source, element, position, getNextPosition) {
- var connectedAtPosition;
+var AXIS_DIMENSIONS = {
+ horizontal: [ 'x', 'width' ],
+ vertical: [ 'y', 'height' ]
+};
- while (connectedAtPosition = getConnectedAtPosition(source, position, element)) {
- position = getNextPosition(element, position, connectedAtPosition);
- }
+var THRESHOLD = 5;
- return position;
- }
- /**
- * Returns function that returns next position.
- *
- * @param {Object} nextPositionDirection
- * @param {Object} [nextPositionDirection.x]
- * @param {Object} [nextPositionDirection.y]
- *
- * @returns {Function}
- */
+/**
+ * Groups and filters elements and then trigger even distribution.
+ *
+ * @param {Modeling} modeling
+ * @param {Rules} rules
+ */
+function DistributeElements(modeling, rules) {
+ this._modeling = modeling;
- function generateGetNextPosition(nextPositionDirection) {
- return function (element, previousPosition, connectedAtPosition) {
- var nextPosition = {
- x: previousPosition.x,
- y: previousPosition.y
- };
- ['x', 'y'].forEach(function (axis) {
- var nextPositionDirectionForAxis = nextPositionDirection[axis];
+ this._filters = [];
- if (!nextPositionDirectionForAxis) {
- return;
- }
+ this.registerFilter(function(elements) {
+ var allowed = rules.allowed('elements.distribute', { elements: elements });
- var dimension = axis === 'x' ? 'width' : 'height';
- var margin = nextPositionDirectionForAxis.margin,
- minDistance = nextPositionDirectionForAxis.minDistance;
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(allowed)) {
+ return allowed;
+ }
- if (margin < 0) {
- nextPosition[axis] = Math.min(connectedAtPosition[axis] + margin - element[dimension] / 2, previousPosition[axis] - minDistance + margin);
- } else {
- nextPosition[axis] = Math.max(connectedAtPosition[axis] + connectedAtPosition[dimension] + margin + element[dimension] / 2, previousPosition[axis] + minDistance + margin);
- }
- });
- return nextPosition;
- };
- }
- /**
- * Return target at given position, if defined.
- *
- * This takes connected elements from host and attachers
- * into account, too.
- */
+ return allowed ? elements : [];
+ });
+}
+DistributeElements.$inject = [ 'modeling', 'rules' ];
- function getConnectedAtPosition(source, position, element) {
- var bounds = {
- x: position.x - element.width / 2,
- y: position.y - element.height / 2,
- width: element.width,
- height: element.height
- };
- var closure = getAutoPlaceClosure(source, element);
- return (0, _minDash.find)(closure, function (target) {
- if (target === element) {
- return false;
- }
- var orientation = (0, _LayoutUtil.getOrientation)(target, bounds, PLACEMENT_DETECTION_PAD);
- return orientation === 'intersect';
- });
- }
- /**
- * Compute optimal distance between source and target based on existing connections to and from source.
- * Assumes left-to-right and top-to-down modeling.
- *
- * @param {djs.model.Shape} source
- * @param {Object} [hints]
- * @param {number} [hints.defaultDistance]
- * @param {string} [hints.direction]
- * @param {Function} [hints.filter]
- * @param {Function} [hints.getWeight]
- * @param {number} [hints.maxDistance]
- * @param {string} [hints.reference]
- *
- * @return {number}
- */
+/**
+ * Registers filter functions that allow external parties to filter
+ * out certain elements.
+ *
+ * @param {(distributableElements: Element[], axis: Axis, dimension: Dimension) => Element[]} filterFn
+ */
+DistributeElements.prototype.registerFilter = function(filterFn) {
+ if (typeof filterFn !== 'function') {
+ throw new Error('the filter has to be a function');
+ }
+ this._filters.push(filterFn);
+};
- function getConnectedDistance(source, hints) {
- if (!hints) {
- hints = {};
- } // targets > sources by default
+/**
+ * Distributes the elements with a given orientation
+ *
+ * @param {Element[]} elements
+ * @param {string} orientation
+ */
+DistributeElements.prototype.trigger = function(elements, orientation) {
+ var modeling = this._modeling;
+ var groups,
+ distributableElements;
- function getDefaultWeight(connection) {
- return connection.source === source ? 1 : -1;
- }
+ if (elements.length < 3) {
+ return;
+ }
- var defaultDistance = hints.defaultDistance || DEFAULT_DISTANCE,
- direction = hints.direction || 'e',
- filter = hints.filter,
- getWeight = hints.getWeight || getDefaultWeight,
- maxDistance = hints.maxDistance || DEFAULT_MAX_DISTANCE,
- reference = hints.reference || 'start';
+ this._setOrientation(orientation);
- if (!filter) {
- filter = noneFilter;
- }
+ distributableElements = this._filterElements(elements);
- function getDistance(a, b) {
- if (direction === 'n') {
- if (reference === 'start') {
- return (0, _LayoutUtil.asTRBL)(a).top - (0, _LayoutUtil.asTRBL)(b).bottom;
- } else if (reference === 'center') {
- return (0, _LayoutUtil.asTRBL)(a).top - (0, _LayoutUtil.getMid)(b).y;
- } else {
- return (0, _LayoutUtil.asTRBL)(a).top - (0, _LayoutUtil.asTRBL)(b).top;
- }
- } else if (direction === 'w') {
- if (reference === 'start') {
- return (0, _LayoutUtil.asTRBL)(a).left - (0, _LayoutUtil.asTRBL)(b).right;
- } else if (reference === 'center') {
- return (0, _LayoutUtil.asTRBL)(a).left - (0, _LayoutUtil.getMid)(b).x;
- } else {
- return (0, _LayoutUtil.asTRBL)(a).left - (0, _LayoutUtil.asTRBL)(b).left;
- }
- } else if (direction === 's') {
- if (reference === 'start') {
- return (0, _LayoutUtil.asTRBL)(b).top - (0, _LayoutUtil.asTRBL)(a).bottom;
- } else if (reference === 'center') {
- return (0, _LayoutUtil.getMid)(b).y - (0, _LayoutUtil.asTRBL)(a).bottom;
- } else {
- return (0, _LayoutUtil.asTRBL)(b).bottom - (0, _LayoutUtil.asTRBL)(a).bottom;
- }
- } else {
- if (reference === 'start') {
- return (0, _LayoutUtil.asTRBL)(b).left - (0, _LayoutUtil.asTRBL)(a).right;
- } else if (reference === 'center') {
- return (0, _LayoutUtil.getMid)(b).x - (0, _LayoutUtil.asTRBL)(a).right;
- } else {
- return (0, _LayoutUtil.asTRBL)(b).right - (0, _LayoutUtil.asTRBL)(a).right;
- }
- }
- }
+ groups = this._createGroups(distributableElements);
- var sourcesDistances = source.incoming.filter(filter).map(function (connection) {
- var weight = getWeight(connection);
- var distance = weight < 0 ? getDistance(connection.source, source) : getDistance(source, connection.source);
- return {
- id: connection.source.id,
- distance: distance,
- weight: weight
- };
- });
- var targetsDistances = source.outgoing.filter(filter).map(function (connection) {
- var weight = getWeight(connection);
- var distance = weight > 0 ? getDistance(source, connection.target) : getDistance(connection.target, source);
- return {
- id: connection.target.id,
- distance: distance,
- weight: weight
- };
- });
- var distances = sourcesDistances.concat(targetsDistances).reduce(function (accumulator, currentValue) {
- accumulator[currentValue.id + '__weight_' + currentValue.weight] = currentValue;
- return accumulator;
- }, {});
- var distancesGrouped = (0, _minDash.reduce)(distances, function (accumulator, currentValue) {
- var distance = currentValue.distance,
- weight = currentValue.weight;
+ // nothing to distribute
+ if (groups.length <= 2) {
+ return;
+ }
- if (distance < 0 || distance > maxDistance) {
- return accumulator;
- }
+ modeling.distributeElements(groups, this._axis, this._dimension);
- if (!accumulator[String(distance)]) {
- accumulator[String(distance)] = 0;
- }
+ return groups;
+};
- accumulator[String(distance)] += 1 * weight;
+/**
+ * Filters the elements with provided filters by external parties
+ *
+ * @param {Element[]} elements
+ *
+ * @return {Element[]}
+ */
+DistributeElements.prototype._filterElements = function(elements) {
+ var filters = this._filters,
+ axis = this._axis,
+ dimension = this._dimension,
+ distributableElements = [].concat(elements);
- if (!accumulator.distance || accumulator[accumulator.distance] < accumulator[String(distance)]) {
- accumulator.distance = distance;
- }
+ if (!filters.length) {
+ return elements;
+ }
- return accumulator;
- }, {});
- return distancesGrouped.distance || defaultDistance;
- }
- /**
- * Returns all connected elements around the given source.
- *
- * This includes:
- *
- * - connected elements
- * - host connected elements
- * - attachers connected elements
- *
- * @param {djs.model.Shape} source
- *
- * @return {Array}
- */
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(filters, function(filterFn) {
+ distributableElements = filterFn(distributableElements, axis, dimension);
+ });
+ return distributableElements;
+};
- function getAutoPlaceClosure(source) {
- var allConnected = getConnected(source);
- if (source.host) {
- allConnected = allConnected.concat(getConnected(source.host));
- }
+/**
+ * Create range (min, max) groups. Also tries to group elements
+ * together that share the same range.
+ *
+ * @example
+ *
+ * ```javascript
+ * const groups = [
+ * {
+ * range: { min: 100, max: 200 },
+ * elements: [ { id: 'shape1', ... } ]
+ * }
+ * ]
+ * ```
+ *
+ * @param {Element[]} elements
+ *
+ * @return {Group[]}
+ */
+DistributeElements.prototype._createGroups = function(elements) {
+ var rangeGroups = [],
+ self = this,
+ axis = this._axis,
+ dimension = this._dimension;
- if (source.attachers) {
- allConnected = allConnected.concat(source.attachers.reduce(function (shapes, attacher) {
- return shapes.concat(getConnected(attacher));
- }, []));
- }
+ if (!axis) {
+ throw new Error('must have a defined "axis" and "dimension"');
+ }
- return allConnected;
- }
+ // sort by 'left->right' or 'top->bottom'
+ var sortedElements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.sortBy)(elements, axis);
- function getConnected(element) {
- return getTargets(element).concat(getSources(element));
- }
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(sortedElements, function(element, idx) {
+ var elementRange = self._findRange(element, axis, dimension),
+ range;
- function getSources(shape) {
- return shape.incoming.map(function (connection) {
- return connection.source;
- });
- }
+ var previous = rangeGroups[rangeGroups.length - 1];
- function getTargets(shape) {
- return shape.outgoing.map(function (connection) {
- return connection.target;
- });
- }
+ if (previous && self._hasIntersection(previous.range, elementRange)) {
+ rangeGroups[rangeGroups.length - 1].elements.push(element);
+ } else {
+ range = { range: elementRange, elements: [ element ] };
- function noneFilter() {
- return true;
- }
+ rangeGroups.push(range);
+ }
+ });
- },{"../../layout/LayoutUtil":405,"min-dash":646}],270:[function(require,module,exports){
- "use strict";
+ return rangeGroups;
+};
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _AutoPlace = _interopRequireDefault(require("./AutoPlace"));
+/**
+ * Maps a direction to the according axis and dimension.
+ *
+ * @param {'horizontal' | 'vertical'} direction 'horizontal' or 'vertical'
+ */
+DistributeElements.prototype._setOrientation = function(direction) {
+ var orientation = AXIS_DIMENSIONS[direction];
- var _AutoPlaceSelectionBehavior = _interopRequireDefault(require("./AutoPlaceSelectionBehavior"));
+ this._axis = orientation[0];
+ this._dimension = orientation[1];
+};
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var _default = {
- __init__: ['autoPlaceSelectionBehavior'],
- autoPlace: ['type', _AutoPlace.default],
- autoPlaceSelectionBehavior: ['type', _AutoPlaceSelectionBehavior.default]
- };
- exports.default = _default;
+/**
+ * Checks if the two ranges intercept each other.
+ *
+ * @param {Range} rangeA
+ * @param {Range} rangeB
+ *
+ * @return {boolean}
+ */
+DistributeElements.prototype._hasIntersection = function(rangeA, rangeB) {
+ return Math.max(rangeA.min, rangeA.max) >= Math.min(rangeB.min, rangeB.max) &&
+ Math.min(rangeA.min, rangeA.max) <= Math.max(rangeB.min, rangeB.max);
+};
- },{"./AutoPlace":267,"./AutoPlaceSelectionBehavior":268}],271:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = AutoResize;
+/**
+ * Returns the min and max values for an element
+ *
+ * @param {Element} element
+ *
+ * @return {Range}
+ */
+DistributeElements.prototype._findRange = function(element) {
+ var axis = element[this._axis],
+ dimension = element[this._dimension];
- var _inherits = _interopRequireDefault(require("inherits"));
+ return {
+ min: axis + THRESHOLD,
+ max: axis + dimension - THRESHOLD
+ };
+};
- var _Elements = require("../../util/Elements");
- var _LayoutUtil = require("../../layout/LayoutUtil");
+/***/ }),
- var _minDash = require("min-dash");
+/***/ "../node_modules/diagram-js/lib/features/distribute-elements/index.js":
+/*!****************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/distribute-elements/index.js ***!
+ \****************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var _CommandInterceptor = _interopRequireDefault(require("../../command/CommandInterceptor"));
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _DistributeElements__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DistributeElements */ "../node_modules/diagram-js/lib/features/distribute-elements/DistributeElements.js");
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- /**
- * An auto resize component that takes care of expanding a parent element
- * if child elements are created or moved close the parents edge.
- *
- * @param {EventBus} eventBus
- * @param {ElementRegistry} elementRegistry
- * @param {Modeling} modeling
- * @param {Rules} rules
- */
- function AutoResize(eventBus, elementRegistry, modeling, rules) {
- _CommandInterceptor.default.call(this, eventBus);
-
- this._elementRegistry = elementRegistry;
- this._modeling = modeling;
- this._rules = rules;
- var self = this;
- this.postExecuted(['shape.create'], function (event) {
- var context = event.context,
- hints = context.hints || {},
- shape = context.shape,
- parent = context.parent || context.newParent;
-
- if (hints.autoResize === false) {
- return;
- }
- self._expand([shape], parent);
- });
- this.postExecuted(['elements.move'], function (event) {
- var context = event.context,
- elements = (0, _minDash.flatten)((0, _minDash.values)(context.closure.topLevel)),
- hints = context.hints;
- var autoResize = hints ? hints.autoResize : true;
+/**
+ * @type { import('didi').ModuleDeclaration }
+ */
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __init__: [ 'distributeElements' ],
+ distributeElements: [ 'type', _DistributeElements__WEBPACK_IMPORTED_MODULE_0__["default"] ]
+});
- if (autoResize === false) {
- return;
- }
- var expandings = (0, _minDash.groupBy)(elements, function (element) {
- return element.parent.id;
- });
- (0, _minDash.forEach)(expandings, function (elements, parentId) {
- // optionally filter elements to be considered when resizing
- if ((0, _minDash.isArray)(autoResize)) {
- elements = elements.filter(function (element) {
- return (0, _minDash.find)(autoResize, (0, _minDash.matchPattern)({
- id: element.id
- }));
- });
- }
+/***/ }),
- self._expand(elements, parentId);
- });
- });
- this.postExecuted(['shape.toggleCollapse'], function (event) {
- var context = event.context,
- hints = context.hints,
- shape = context.shape;
+/***/ "../node_modules/diagram-js/lib/features/dragging/Dragging.js":
+/*!********************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/dragging/Dragging.js ***!
+ \********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- if (hints && hints.autoResize === false) {
- return;
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ Dragging)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! min-dom */ "../node_modules/min-dom/dist/index.esm.js");
+/* harmony import */ var _util_Event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/Event */ "../node_modules/diagram-js/lib/util/Event.js");
+/* harmony import */ var _util_Cursor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/Cursor */ "../node_modules/diagram-js/lib/util/Cursor.js");
+/* harmony import */ var _util_ClickTrap__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../util/ClickTrap */ "../node_modules/diagram-js/lib/util/ClickTrap.js");
+/* harmony import */ var _util_PositionUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/PositionUtil */ "../node_modules/diagram-js/lib/util/PositionUtil.js");
+/* harmony import */ var _keyboard_KeyboardUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../keyboard/KeyboardUtil */ "../node_modules/diagram-js/lib/features/keyboard/KeyboardUtil.js");
+var round = Math.round;
- if (shape.collapsed) {
- return;
- }
- self._expand(shape.children || [], shape);
- });
- this.postExecuted(['shape.resize'], function (event) {
- var context = event.context,
- hints = context.hints,
- shape = context.shape,
- parent = shape.parent;
- if (hints && hints.autoResize === false) {
- return;
- }
- if (parent) {
- self._expand([shape], parent);
- }
- });
- }
- AutoResize.$inject = ['eventBus', 'elementRegistry', 'modeling', 'rules'];
- (0, _inherits.default)(AutoResize, _CommandInterceptor.default);
- /**
- * Calculate the new bounds of the target shape, given
- * a number of elements have been moved or added into the parent.
- *
- * This method considers the current size, the added elements as well as
- * the provided padding for the new bounds.
- *
- * @param {Array} elements
- * @param {djs.model.Shape} target
- */
- AutoResize.prototype._getOptimalBounds = function (elements, target) {
- var offset = this.getOffset(target),
- padding = this.getPadding(target);
- var elementsTrbl = (0, _LayoutUtil.asTRBL)((0, _Elements.getBBox)(elements)),
- targetTrbl = (0, _LayoutUtil.asTRBL)(target);
- var newTrbl = {};
- if (elementsTrbl.top - targetTrbl.top < padding.top) {
- newTrbl.top = elementsTrbl.top - offset.top;
- }
- if (elementsTrbl.left - targetTrbl.left < padding.left) {
- newTrbl.left = elementsTrbl.left - offset.left;
- }
- if (targetTrbl.right - elementsTrbl.right < padding.right) {
- newTrbl.right = elementsTrbl.right + offset.right;
- }
- if (targetTrbl.bottom - elementsTrbl.bottom < padding.bottom) {
- newTrbl.bottom = elementsTrbl.bottom + offset.bottom;
- }
- return (0, _LayoutUtil.asBounds)((0, _minDash.assign)({}, targetTrbl, newTrbl));
- };
- /**
- * Expand the target shape respecting rules, offset and padding
- *
- * @param {Array} elements
- * @param {djs.model.Shape|string} target|targetId
- */
- AutoResize.prototype._expand = function (elements, target) {
- if (typeof target === 'string') {
- target = this._elementRegistry.get(target);
- }
- var allowed = this._rules.allowed('element.autoResize', {
- elements: elements,
- target: target
- });
- if (!allowed) {
- return;
- } // calculate the new bounds
+/**
+ * @typedef {import('../../util/Types').Point} Point
+ *
+ * @typedef {import('../../core/Canvas').default} Canvas
+ * @typedef {import('../../core/ElementRegistry').default} ElementRegistry
+ * @typedef {import('../../core/EventBus').default} EventBus
+ * @typedef {import('../selection/Selection').default} Selection
+ */
+var DRAG_ACTIVE_CLS = 'djs-drag-active';
- var newBounds = this._getOptimalBounds(elements, target);
- if (!boundsChanged(newBounds, target)) {
- return;
- }
+function preventDefault(event) {
+ event.preventDefault();
+}
- var resizeDirections = getResizeDirections((0, _minDash.pick)(target, ['x', 'y', 'width', 'height']), newBounds); // resize the parent shape
+function isTouchEvent(event) {
- this.resize(target, newBounds, {
- autoResize: resizeDirections
- });
- var parent = target.parent; // recursively expand parent elements
+ // check for TouchEvent being available first
+ // (i.e. not available on desktop Firefox)
+ return typeof TouchEvent !== 'undefined' && event instanceof TouchEvent;
+}
- if (parent) {
- this._expand([target], parent);
- }
- };
- /**
- * Get the amount to expand the given shape in each direction.
- *
- * @param {djs.model.Shape} shape
- *
- * @return {TRBL}
- */
+function getLength(point) {
+ return Math.sqrt(Math.pow(point.x, 2) + Math.pow(point.y, 2));
+}
+/**
+ * A helper that fires canvas localized drag events and realizes
+ * the general "drag-and-drop" look and feel.
+ *
+ * Calling {@link Dragging#activate} activates dragging on a canvas.
+ *
+ * It provides the following:
+ *
+ * * emits life cycle events, namespaced with a prefix assigned
+ * during dragging activation
+ * * sets and restores the cursor
+ * * sets and restores the selection if elements still exist
+ * * ensures there can be only one drag operation active at a time
+ *
+ * Dragging may be canceled manually by calling {@link Dragging#cancel}
+ * or by pressing ESC.
+ *
+ *
+ * ## Life-cycle events
+ *
+ * Dragging can be in three different states, off, initialized
+ * and active.
+ *
+ * (1) off: no dragging operation is in progress
+ * (2) initialized: a new drag operation got initialized but not yet
+ * started (i.e. because of no initial move)
+ * (3) started: dragging is in progress
+ *
+ * Eventually dragging will be off again after a drag operation has
+ * been ended or canceled via user click or ESC key press.
+ *
+ * To indicate transitions between these states dragging emits generic
+ * life-cycle events with the `drag.` prefix _and_ events namespaced
+ * to a prefix choosen by a user during drag initialization.
+ *
+ * The following events are emitted (appropriately prefixed) via
+ * the {@link EventBus}.
+ *
+ * * `init`
+ * * `start`
+ * * `move`
+ * * `end`
+ * * `ended` (dragging already in off state)
+ * * `cancel` (only if previously started)
+ * * `canceled` (dragging already in off state, only if previously started)
+ * * `cleanup`
+ *
+ *
+ * @example
+ *
+ * ```javascript
+ * function MyDragComponent(eventBus, dragging) {
+ *
+ * eventBus.on('mydrag.start', function(event) {
+ * console.log('yes, we start dragging');
+ * });
+ *
+ * eventBus.on('mydrag.move', function(event) {
+ * console.log('canvas local coordinates', event.x, event.y, event.dx, event.dy);
+ *
+ * // local drag data is passed with the event
+ * event.context.foo; // "BAR"
+ *
+ * // the original mouse event, too
+ * event.originalEvent; // MouseEvent(...)
+ * });
+ *
+ * eventBus.on('element.click', function(event) {
+ * dragging.init(event, 'mydrag', {
+ * cursor: 'grabbing',
+ * data: {
+ * context: {
+ * foo: "BAR"
+ * }
+ * }
+ * });
+ * });
+ * }
+ * ```
+ *
+ * @param {EventBus} eventBus
+ * @param {Canvas} canvas
+ * @param {Selection} selection
+ * @param {ElementRegistry} elementRegistry
+ */
+function Dragging(eventBus, canvas, selection, elementRegistry) {
- AutoResize.prototype.getOffset = function (shape) {
- return {
- top: 60,
- bottom: 60,
- left: 100,
- right: 100
- };
- };
- /**
- * Get the activation threshold for each side for which
- * resize triggers.
- *
- * @param {djs.model.Shape} shape
- *
- * @return {TRBL}
- */
+ var defaultOptions = {
+ threshold: 5,
+ trapClick: true
+ };
+ // the currently active drag operation
+ // dragging is active as soon as this context exists.
+ //
+ // it is visually _active_ only when a context.active flag is set to true.
+ var context;
- AutoResize.prototype.getPadding = function (shape) {
- return {
- top: 2,
- bottom: 2,
- left: 15,
- right: 15
- };
- };
- /**
- * Perform the actual resize operation.
- *
- * @param {djs.model.Shape} shape
- * @param {Bounds} newBounds
- * @param {Object} [hints]
- * @param {string} [hints.autoResize]
- */
+ /* convert a global event into local coordinates */
+ function toLocalPoint(globalPosition) {
+ var viewbox = canvas.viewbox();
- AutoResize.prototype.resize = function (shape, newBounds, hints) {
- this._modeling.resizeShape(shape, newBounds, null, hints);
- };
+ var clientRect = canvas._container.getBoundingClientRect();
- function boundsChanged(newBounds, oldBounds) {
- return newBounds.x !== oldBounds.x || newBounds.y !== oldBounds.y || newBounds.width !== oldBounds.width || newBounds.height !== oldBounds.height;
- }
- /**
- * Get directions of resize as {n|w|s|e} e.g. "nw".
- *
- * @param {Bounds} oldBounds
- * @param {Bounds} newBounds
- *
- * @returns {string} Resize directions as {n|w|s|e}.
- */
+ return {
+ x: viewbox.x + (globalPosition.x - clientRect.left) / viewbox.scale,
+ y: viewbox.y + (globalPosition.y - clientRect.top) / viewbox.scale
+ };
+ }
+ // helpers
- function getResizeDirections(oldBounds, newBounds) {
- var directions = '';
- oldBounds = (0, _LayoutUtil.asTRBL)(oldBounds);
- newBounds = (0, _LayoutUtil.asTRBL)(newBounds);
+ function fire(type, dragContext) {
+ dragContext = dragContext || context;
- if (oldBounds.top > newBounds.top) {
- directions = directions.concat('n');
- }
+ var event = eventBus.createEvent(
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(
+ {},
+ dragContext.payload,
+ dragContext.data,
+ { isTouch: dragContext.isTouch }
+ )
+ );
- if (oldBounds.right < newBounds.right) {
- directions = directions.concat('w');
- }
+ // default integration
+ if (eventBus.fire('drag.' + type, event) === false) {
+ return false;
+ }
- if (oldBounds.bottom < newBounds.bottom) {
- directions = directions.concat('s');
- }
+ return eventBus.fire(dragContext.prefix + '.' + type, event);
+ }
- if (oldBounds.left > newBounds.left) {
- directions = directions.concat('e');
- }
+ function restoreSelection(previousSelection) {
+ var existingSelection = previousSelection.filter(function(element) {
+ return elementRegistry.get(element.id);
+ });
- return directions;
- }
+ existingSelection.length && selection.select(existingSelection);
+ }
- },{"../../command/CommandInterceptor":250,"../../layout/LayoutUtil":405,"../../util/Elements":420,"inherits":438,"min-dash":646}],272:[function(require,module,exports){
- "use strict";
+ // event listeners
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = AutoResizeProvider;
+ function move(event, activate) {
+ var payload = context.payload,
+ displacement = context.displacement;
- var _RuleProvider = _interopRequireDefault(require("../rules/RuleProvider"));
+ var globalStart = context.globalStart,
+ globalCurrent = (0,_util_Event__WEBPACK_IMPORTED_MODULE_1__.toPoint)(event),
+ globalDelta = (0,_util_PositionUtil__WEBPACK_IMPORTED_MODULE_2__.delta)(globalCurrent, globalStart);
- var _inherits = _interopRequireDefault(require("inherits"));
+ var localStart = context.localStart,
+ localCurrent = toLocalPoint(globalCurrent),
+ localDelta = (0,_util_PositionUtil__WEBPACK_IMPORTED_MODULE_2__.delta)(localCurrent, localStart);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- /**
- * This is a base rule provider for the element.autoResize rule.
- */
- function AutoResizeProvider(eventBus) {
- _RuleProvider.default.call(this, eventBus);
+ // activate context explicitly or once threshold is reached
+ if (!context.active && (activate || getLength(globalDelta) > context.threshold)) {
- var self = this;
- this.addRule('element.autoResize', function (context) {
- return self.canResize(context.elements, context.target);
- });
- }
+ // fire start event with original
+ // starting coordinates
- AutoResizeProvider.$inject = ['eventBus'];
- (0, _inherits.default)(AutoResizeProvider, _RuleProvider.default);
- /**
- * Needs to be implemented by sub classes to allow actual auto resize
- *
- * @param {Array} elements
- * @param {djs.model.Shape} target
- *
- * @return {boolean}
- */
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(payload, {
+ x: round(localStart.x + displacement.x),
+ y: round(localStart.y + displacement.y),
+ dx: 0,
+ dy: 0
+ }, { originalEvent: event });
- AutoResizeProvider.prototype.canResize = function (elements, target) {
- return false;
- };
+ if (false === fire('start')) {
+ return cancel();
+ }
- },{"../rules/RuleProvider":375,"inherits":438}],273:[function(require,module,exports){
- "use strict";
+ context.active = true;
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = AutoScroll;
+ // unset selection and remember old selection
+ // the previous (old) selection will always passed
+ // with the event via the event.previousSelection property
+ if (!context.keepSelection) {
+ payload.previousSelection = selection.get();
+ selection.select(null);
+ }
- var _minDash = require("min-dash");
+ // allow custom cursor
+ if (context.cursor) {
+ (0,_util_Cursor__WEBPACK_IMPORTED_MODULE_3__.set)(context.cursor);
+ }
- var _Event = require("../../util/Event");
+ // indicate dragging via marker on root element
+ canvas.addMarker(canvas.getRootElement(), DRAG_ACTIVE_CLS);
+ }
- /**
- * Initiates canvas scrolling if current cursor point is close to a border.
- * Cancelled when current point moves back inside the scrolling borders
- * or cancelled manually.
- *
- * Default options :
- * scrollThresholdIn: [ 20, 20, 20, 20 ],
- * scrollThresholdOut: [ 0, 0, 0, 0 ],
- * scrollRepeatTimeout: 15,
- * scrollStep: 10
- *
- * Threshold order:
- * [ left, top, right, bottom ]
- */
- function AutoScroll(config, eventBus, canvas) {
- this._canvas = canvas;
- this._opts = (0, _minDash.assign)({
- scrollThresholdIn: [20, 20, 20, 20],
- scrollThresholdOut: [0, 0, 0, 0],
- scrollRepeatTimeout: 15,
- scrollStep: 10
- }, config);
- var self = this;
- eventBus.on('drag.move', function (e) {
- var point = self._toBorderPoint(e);
-
- self.startScroll(point);
- });
- eventBus.on(['drag.cleanup'], function () {
- self.stopScroll();
- });
- }
+ (0,_util_Event__WEBPACK_IMPORTED_MODULE_1__.stopPropagation)(event);
- AutoScroll.$inject = ['config.autoScroll', 'eventBus', 'canvas'];
- /**
- * Starts scrolling loop.
- * Point is given in global scale in canvas container box plane.
- *
- * @param {Object} point { x: X, y: Y }
- */
+ if (context.active) {
- AutoScroll.prototype.startScroll = function (point) {
- var canvas = this._canvas;
- var opts = this._opts;
- var self = this;
- var clientRect = canvas.getContainer().getBoundingClientRect();
- var diff = [point.x, point.y, clientRect.width - point.x, clientRect.height - point.y];
- this.stopScroll();
- var dx = 0,
- dy = 0;
-
- for (var i = 0; i < 4; i++) {
- if (between(diff[i], opts.scrollThresholdOut[i], opts.scrollThresholdIn[i])) {
- if (i === 0) {
- dx = opts.scrollStep;
- } else if (i == 1) {
- dy = opts.scrollStep;
- } else if (i == 2) {
- dx = -opts.scrollStep;
- } else if (i == 3) {
- dy = -opts.scrollStep;
- }
- }
- }
+ // update payload with actual coordinates
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(payload, {
+ x: round(localCurrent.x + displacement.x),
+ y: round(localCurrent.y + displacement.y),
+ dx: round(localDelta.x),
+ dy: round(localDelta.y)
+ }, { originalEvent: event });
- if (dx !== 0 || dy !== 0) {
- canvas.scroll({
- dx: dx,
- dy: dy
- });
- this._scrolling = setTimeout(function () {
- self.startScroll(point);
- }, opts.scrollRepeatTimeout);
- }
- };
+ // emit move event
+ fire('move');
+ }
+ }
- function between(val, start, end) {
- if (start < val && val < end) {
- return true;
- }
+ function end(event) {
+ var previousContext,
+ returnValue = true;
- return false;
- }
- /**
- * Stops scrolling loop.
- */
+ if (context.active) {
+ if (event) {
+ context.payload.originalEvent = event;
- AutoScroll.prototype.stopScroll = function () {
- clearTimeout(this._scrolling);
- };
- /**
- * Overrides defaults options.
- *
- * @param {Object} options
- */
+ // suppress original event (click, ...)
+ // because we just ended a drag operation
+ (0,_util_Event__WEBPACK_IMPORTED_MODULE_1__.stopPropagation)(event);
+ }
+ // implementations may stop restoring the
+ // original state (selections, ...) by preventing the
+ // end events default action
+ returnValue = fire('end');
+ }
- AutoScroll.prototype.setOptions = function (options) {
- this._opts = (0, _minDash.assign)({}, this._opts, options);
- };
- /**
- * Converts event to a point in canvas container plane in global scale.
- *
- * @param {Event} event
- * @return {Point}
- */
+ if (returnValue === false) {
+ fire('rejected');
+ }
+ previousContext = cleanup(returnValue !== true);
- AutoScroll.prototype._toBorderPoint = function (event) {
- var clientRect = this._canvas._container.getBoundingClientRect();
+ // last event to be fired when all drag operations are done
+ // at this point in time no drag operation is in progress anymore
+ fire('ended', previousContext);
+ }
- var globalPosition = (0, _Event.toPoint)(event.originalEvent);
- return {
- x: globalPosition.x - clientRect.left,
- y: globalPosition.y - clientRect.top
- };
- };
- },{"../../util/Event":422,"min-dash":646}],274:[function(require,module,exports){
- "use strict";
+ // cancel active drag operation if the user presses
+ // the ESC key on the keyboard
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+ function checkCancel(event) {
- var _dragging = _interopRequireDefault(require("../dragging"));
+ if ((0,_keyboard_KeyboardUtil__WEBPACK_IMPORTED_MODULE_4__.isKey)('Escape', event)) {
+ preventDefault(event);
- var _AutoScroll = _interopRequireDefault(require("./AutoScroll"));
+ cancel();
+ }
+ }
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var _default = {
- __depends__: [_dragging.default],
- __init__: ['autoScroll'],
- autoScroll: ['type', _AutoScroll.default]
- };
- exports.default = _default;
+ // prevent ghost click that might occur after a finished
+ // drag and drop session
- },{"../dragging":302,"./AutoScroll":273}],275:[function(require,module,exports){
- "use strict";
+ function trapClickAndEnd(event) {
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BendpointMove;
- exports.isReverse = isReverse;
+ var untrap;
- var _LayoutUtil = require("../../layout/LayoutUtil");
+ // trap the click in case we are part of an active
+ // drag operation. This will effectively prevent
+ // the ghost click that cannot be canceled otherwise.
+ if (context.active) {
- var round = Math.round;
- var RECONNECT_START = 'reconnectStart',
- RECONNECT_END = 'reconnectEnd',
- UPDATE_WAYPOINTS = 'updateWaypoints';
- /**
- * Move bendpoints through drag and drop to add/remove bendpoints or reconnect connection.
- */
+ untrap = (0,_util_ClickTrap__WEBPACK_IMPORTED_MODULE_5__.install)(eventBus);
- function BendpointMove(injector, eventBus, canvas, dragging, rules, modeling) {
- this._injector = injector;
-
- this.start = function (event, connection, bendpointIndex, insert) {
- var gfx = canvas.getGraphics(connection),
- source = connection.source,
- target = connection.target,
- waypoints = connection.waypoints,
- type;
-
- if (!insert && bendpointIndex === 0) {
- type = RECONNECT_START;
- } else if (!insert && bendpointIndex === waypoints.length - 1) {
- type = RECONNECT_END;
- } else {
- type = UPDATE_WAYPOINTS;
- }
+ // remove trap after minimal delay
+ setTimeout(untrap, 400);
- var command = type === UPDATE_WAYPOINTS ? 'connection.updateWaypoints' : 'connection.reconnect';
- var allowed = rules.allowed(command, {
- connection: connection,
- source: source,
- target: target
- });
+ // prevent default action (click)
+ preventDefault(event);
+ }
- if (allowed === false) {
- allowed = rules.allowed(command, {
- connection: connection,
- source: target,
- target: source
- });
- }
+ end(event);
+ }
- if (allowed === false) {
- return;
- }
+ function trapTouch(event) {
+ move(event);
+ }
- dragging.init(event, 'bendpoint.move', {
- data: {
- connection: connection,
- connectionGfx: gfx,
- context: {
- allowed: allowed,
- bendpointIndex: bendpointIndex,
- connection: connection,
- source: source,
- target: target,
- insert: insert,
- type: type
- }
- }
- });
- };
+ // update the drag events model element (`hover`) and graphical element (`hoverGfx`)
+ // properties during hover and out and fire {prefix}.hover and {prefix}.out properties
+ // respectively
- eventBus.on('bendpoint.move.hover', function (event) {
- var context = event.context,
- connection = context.connection,
- source = connection.source,
- target = connection.target,
- hover = event.hover,
- type = context.type; // cache hover state
+ function hover(event) {
+ var payload = context.payload;
- context.hover = hover;
- var allowed;
+ payload.hoverGfx = event.gfx;
+ payload.hover = event.element;
- if (!hover) {
- return;
- }
+ fire('hover');
+ }
- var command = type === UPDATE_WAYPOINTS ? 'connection.updateWaypoints' : 'connection.reconnect';
- allowed = context.allowed = rules.allowed(command, {
- connection: connection,
- source: type === RECONNECT_START ? hover : source,
- target: type === RECONNECT_END ? hover : target
- });
+ function out(event) {
+ fire('out');
- if (allowed) {
- context.source = type === RECONNECT_START ? hover : source;
- context.target = type === RECONNECT_END ? hover : target;
- return;
- }
+ var payload = context.payload;
- if (allowed === false) {
- allowed = context.allowed = rules.allowed(command, {
- connection: connection,
- source: type === RECONNECT_END ? hover : target,
- target: type === RECONNECT_START ? hover : source
- });
- }
+ payload.hoverGfx = null;
+ payload.hover = null;
+ }
- if (allowed) {
- context.source = type === RECONNECT_END ? hover : target;
- context.target = type === RECONNECT_START ? hover : source;
- }
- });
- eventBus.on(['bendpoint.move.out', 'bendpoint.move.cleanup'], function (event) {
- var context = event.context;
- context.hover = null;
- context.source = null;
- context.target = null;
- context.allowed = false;
- });
- eventBus.on('bendpoint.move.end', function (event) {
- var context = event.context,
- allowed = context.allowed,
- bendpointIndex = context.bendpointIndex,
- connection = context.connection,
- insert = context.insert,
- newWaypoints = connection.waypoints.slice(),
- source = context.source,
- target = context.target,
- type = context.type,
- hints = context.hints || {}; // ensure integer values (important if zoom level was > 1 during move)
-
- var docking = {
- x: round(event.x),
- y: round(event.y)
- };
- if (!allowed) {
- return false;
- }
+ // life-cycle methods
- if (type === UPDATE_WAYPOINTS) {
- if (insert) {
- // insert new bendpoint
- newWaypoints.splice(bendpointIndex, 0, docking);
- } else {
- // swap previous waypoint with moved one
- newWaypoints[bendpointIndex] = docking;
- } // pass hints about actual moved bendpoint
- // useful for connection/label layout
-
-
- hints.bendpointMove = {
- insert: insert,
- bendpointIndex: bendpointIndex
- };
- newWaypoints = this.cropWaypoints(connection, newWaypoints);
- modeling.updateWaypoints(connection, (0, _LayoutUtil.filterRedundantWaypoints)(newWaypoints), hints);
- } else {
- if (type === RECONNECT_START) {
- hints.docking = 'source';
-
- if (isReverse(context)) {
- hints.docking = 'target';
- hints.newWaypoints = newWaypoints.reverse();
- }
- } else if (type === RECONNECT_END) {
- hints.docking = 'target';
+ function cancel(restore) {
+ var previousContext;
- if (isReverse(context)) {
- hints.docking = 'source';
- hints.newWaypoints = newWaypoints.reverse();
- }
- }
+ if (!context) {
+ return;
+ }
- modeling.reconnect(connection, source, target, docking, hints);
- }
- }, this);
- }
+ var wasActive = context.active;
- BendpointMove.$inject = ['injector', 'eventBus', 'canvas', 'dragging', 'rules', 'modeling'];
+ if (wasActive) {
+ fire('cancel');
+ }
- BendpointMove.prototype.cropWaypoints = function (connection, newWaypoints) {
- var connectionDocking = this._injector.get('connectionDocking', false);
+ previousContext = cleanup(restore);
- if (!connectionDocking) {
- return newWaypoints;
- }
+ if (wasActive) {
- var waypoints = connection.waypoints;
- connection.waypoints = newWaypoints;
- connection.waypoints = connectionDocking.getCroppedWaypoints(connection);
- newWaypoints = connection.waypoints;
- connection.waypoints = waypoints;
- return newWaypoints;
- }; // helpers //////////
+ // last event to be fired when all drag operations are done
+ // at this point in time no drag operation is in progress anymore
+ fire('canceled', previousContext);
+ }
+ }
+ function cleanup(restore) {
+ var previousContext,
+ endDrag;
- function isReverse(context) {
- var hover = context.hover,
- source = context.source,
- target = context.target,
- type = context.type;
+ fire('cleanup');
- if (type === RECONNECT_START) {
- return hover && target && hover === target && source !== target;
- }
+ // reset cursor
+ (0,_util_Cursor__WEBPACK_IMPORTED_MODULE_3__.unset)();
- if (type === RECONNECT_END) {
- return hover && source && hover === source && source !== target;
- }
- }
+ if (context.trapClick) {
+ endDrag = trapClickAndEnd;
+ } else {
+ endDrag = end;
+ }
- },{"../../layout/LayoutUtil":405}],276:[function(require,module,exports){
- "use strict";
+ // reset dom listeners
+ min_dom__WEBPACK_IMPORTED_MODULE_6__.event.unbind(document, 'mousemove', move);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BendpointMovePreview;
+ min_dom__WEBPACK_IMPORTED_MODULE_6__.event.unbind(document, 'dragstart', preventDefault);
+ min_dom__WEBPACK_IMPORTED_MODULE_6__.event.unbind(document, 'selectstart', preventDefault);
- var _tinySvg = require("tiny-svg");
+ min_dom__WEBPACK_IMPORTED_MODULE_6__.event.unbind(document, 'mousedown', endDrag, true);
+ min_dom__WEBPACK_IMPORTED_MODULE_6__.event.unbind(document, 'mouseup', endDrag, true);
- var _BendpointUtil = require("./BendpointUtil");
+ min_dom__WEBPACK_IMPORTED_MODULE_6__.event.unbind(document, 'keyup', checkCancel);
- var _SvgTransformUtil = require("../../util/SvgTransformUtil");
+ min_dom__WEBPACK_IMPORTED_MODULE_6__.event.unbind(document, 'touchstart', trapTouch, true);
+ min_dom__WEBPACK_IMPORTED_MODULE_6__.event.unbind(document, 'touchcancel', cancel, true);
+ min_dom__WEBPACK_IMPORTED_MODULE_6__.event.unbind(document, 'touchmove', move, true);
+ min_dom__WEBPACK_IMPORTED_MODULE_6__.event.unbind(document, 'touchend', end, true);
- var _BendpointMove = require("./BendpointMove");
+ eventBus.off('element.hover', hover);
+ eventBus.off('element.out', out);
- var RECONNECT_START = 'reconnectStart',
- RECONNECT_END = 'reconnectEnd',
- UPDATE_WAYPOINTS = 'updateWaypoints';
- var MARKER_OK = 'connect-ok',
- MARKER_NOT_OK = 'connect-not-ok',
- MARKER_CONNECT_HOVER = 'connect-hover',
- MARKER_CONNECT_UPDATING = 'djs-updating',
- MARKER_ELEMENT_HIDDEN = 'djs-element-hidden';
- var HIGH_PRIORITY = 1100;
- /**
- * Preview connection while moving bendpoints.
- */
+ // remove drag marker on root element
+ canvas.removeMarker(canvas.getRootElement(), DRAG_ACTIVE_CLS);
- function BendpointMovePreview(bendpointMove, injector, eventBus, canvas) {
- this._injector = injector;
- var connectionPreview = injector.get('connectionPreview', false);
- eventBus.on('bendpoint.move.start', function (event) {
- var context = event.context,
- bendpointIndex = context.bendpointIndex,
- connection = context.connection,
- insert = context.insert,
- waypoints = connection.waypoints,
- newWaypoints = waypoints.slice();
- context.waypoints = waypoints;
-
- if (insert) {
- // insert placeholder for new bendpoint
- newWaypoints.splice(bendpointIndex, 0, {
- x: event.x,
- y: event.y
- });
- }
+ // restore selection, unless it has changed
+ var previousSelection = context.payload.previousSelection;
- connection.waypoints = newWaypoints; // add dragger gfx
+ if (restore !== false && previousSelection && !selection.get().length) {
+ restoreSelection(previousSelection);
+ }
- var draggerGfx = context.draggerGfx = (0, _BendpointUtil.addBendpoint)(canvas.getLayer('overlays'));
- (0, _tinySvg.classes)(draggerGfx).add('djs-dragging');
- canvas.addMarker(connection, MARKER_ELEMENT_HIDDEN);
- canvas.addMarker(connection, MARKER_CONNECT_UPDATING);
- });
- eventBus.on('bendpoint.move.hover', function (event) {
- var context = event.context,
- allowed = context.allowed,
- hover = context.hover,
- type = context.type;
+ previousContext = context;
- if (hover) {
- canvas.addMarker(hover, MARKER_CONNECT_HOVER);
+ context = null;
- if (type === UPDATE_WAYPOINTS) {
- return;
- }
+ return previousContext;
+ }
- if (allowed) {
- canvas.removeMarker(hover, MARKER_NOT_OK);
- canvas.addMarker(hover, MARKER_OK);
- } else if (allowed === false) {
- canvas.removeMarker(hover, MARKER_OK);
- canvas.addMarker(hover, MARKER_NOT_OK);
- }
- }
- });
- eventBus.on(['bendpoint.move.out', 'bendpoint.move.cleanup'], HIGH_PRIORITY, function (event) {
- var context = event.context,
- hover = context.hover,
- target = context.target;
-
- if (hover) {
- canvas.removeMarker(hover, MARKER_CONNECT_HOVER);
- canvas.removeMarker(hover, target ? MARKER_OK : MARKER_NOT_OK);
- }
- });
- eventBus.on('bendpoint.move.move', function (event) {
- var context = event.context,
- allowed = context.allowed,
- bendpointIndex = context.bendpointIndex,
- draggerGfx = context.draggerGfx,
- hover = context.hover,
- type = context.type,
- connection = context.connection,
- source = connection.source,
- target = connection.target,
- newWaypoints = connection.waypoints.slice(),
- bendpoint = {
- x: event.x,
- y: event.y
- },
- hints = context.hints || {},
- drawPreviewHints = {};
+ /**
+ * Initialize a drag operation.
+ *
+ * If `localPosition` is given, drag events will be emitted
+ * relative to it.
+ *
+ * @param {MouseEvent|TouchEvent} [event]
+ * @param {Point} [relativeTo] actual diagram local position this drag operation should start at
+ * @param {string} prefix
+ * @param {Object} [options]
+ */
+ function init(event, relativeTo, prefix, options) {
- if (connectionPreview) {
- if (hints.connectionStart) {
- drawPreviewHints.connectionStart = hints.connectionStart;
- }
+ // only one drag operation may be active, at a time
+ if (context) {
+ cancel(false);
+ }
- if (hints.connectionEnd) {
- drawPreviewHints.connectionEnd = hints.connectionEnd;
- }
+ if (typeof relativeTo === 'string') {
+ options = prefix;
+ prefix = relativeTo;
+ relativeTo = null;
+ }
- if (type === RECONNECT_START) {
- if ((0, _BendpointMove.isReverse)(context)) {
- drawPreviewHints.connectionEnd = drawPreviewHints.connectionEnd || bendpoint;
- drawPreviewHints.source = target;
- drawPreviewHints.target = hover || source;
- newWaypoints = newWaypoints.reverse();
- } else {
- drawPreviewHints.connectionStart = drawPreviewHints.connectionStart || bendpoint;
- drawPreviewHints.source = hover || source;
- drawPreviewHints.target = target;
- }
- } else if (type === RECONNECT_END) {
- if ((0, _BendpointMove.isReverse)(context)) {
- drawPreviewHints.connectionStart = drawPreviewHints.connectionStart || bendpoint;
- drawPreviewHints.source = hover || target;
- drawPreviewHints.target = source;
- newWaypoints = newWaypoints.reverse();
- } else {
- drawPreviewHints.connectionEnd = drawPreviewHints.connectionEnd || bendpoint;
- drawPreviewHints.source = source;
- drawPreviewHints.target = hover || target;
- }
- } else {
- drawPreviewHints.noCropping = true;
- drawPreviewHints.noLayout = true;
- newWaypoints[bendpointIndex] = bendpoint;
- }
+ options = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, defaultOptions, options || {});
- if (type === UPDATE_WAYPOINTS) {
- newWaypoints = bendpointMove.cropWaypoints(connection, newWaypoints);
- }
+ var data = options.data || {},
+ originalEvent,
+ globalStart,
+ localStart,
+ endDrag,
+ isTouch;
- drawPreviewHints.waypoints = newWaypoints;
- connectionPreview.drawPreview(context, allowed, drawPreviewHints);
- }
+ if (options.trapClick) {
+ endDrag = trapClickAndEnd;
+ } else {
+ endDrag = end;
+ }
+
+ if (event) {
+ originalEvent = (0,_util_Event__WEBPACK_IMPORTED_MODULE_1__.getOriginal)(event) || event;
+ globalStart = (0,_util_Event__WEBPACK_IMPORTED_MODULE_1__.toPoint)(event);
- (0, _SvgTransformUtil.translate)(draggerGfx, event.x, event.y);
- }, this);
- eventBus.on(['bendpoint.move.end', 'bendpoint.move.cancel'], HIGH_PRIORITY, function (event) {
- var context = event.context,
- connection = context.connection,
- draggerGfx = context.draggerGfx,
- hover = context.hover,
- target = context.target,
- waypoints = context.waypoints;
- connection.waypoints = waypoints; // remove dragger gfx
-
- (0, _tinySvg.remove)(draggerGfx);
- canvas.removeMarker(connection, MARKER_CONNECT_UPDATING);
- canvas.removeMarker(connection, MARKER_ELEMENT_HIDDEN);
-
- if (hover) {
- canvas.removeMarker(hover, MARKER_OK);
- canvas.removeMarker(hover, target ? MARKER_OK : MARKER_NOT_OK);
- }
+ (0,_util_Event__WEBPACK_IMPORTED_MODULE_1__.stopPropagation)(event);
- if (connectionPreview) {
- connectionPreview.cleanUp(context);
- }
- });
- }
+ // prevent default browser dragging behavior
+ if (originalEvent.type === 'dragstart') {
+ preventDefault(originalEvent);
+ }
+ } else {
+ originalEvent = null;
+ globalStart = { x: 0, y: 0 };
+ }
- BendpointMovePreview.$inject = ['bendpointMove', 'injector', 'eventBus', 'canvas'];
+ localStart = toLocalPoint(globalStart);
+
+ if (!relativeTo) {
+ relativeTo = localStart;
+ }
- },{"../../util/SvgTransformUtil":433,"./BendpointMove":275,"./BendpointUtil":278,"tiny-svg":658}],277:[function(require,module,exports){
- "use strict";
+ isTouch = isTouchEvent(originalEvent);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = BendpointSnapping;
+ context = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({
+ prefix: prefix,
+ data: data,
+ payload: {},
+ globalStart: globalStart,
+ displacement: (0,_util_PositionUtil__WEBPACK_IMPORTED_MODULE_2__.delta)(relativeTo, localStart),
+ localStart: localStart,
+ isTouch: isTouch
+ }, options);
- var _minDash = require("min-dash");
+ // skip dom registration if trigger
+ // is set to manual (during testing)
+ if (!options.manual) {
- var _SnapUtil = require("../snapping/SnapUtil");
+ // add dom listeners
- var abs = Math.abs,
- round = Math.round;
- var TOLERANCE = 10;
+ if (isTouch) {
+ min_dom__WEBPACK_IMPORTED_MODULE_6__.event.bind(document, 'touchstart', trapTouch, true);
+ min_dom__WEBPACK_IMPORTED_MODULE_6__.event.bind(document, 'touchcancel', cancel, true);
+ min_dom__WEBPACK_IMPORTED_MODULE_6__.event.bind(document, 'touchmove', move, true);
+ min_dom__WEBPACK_IMPORTED_MODULE_6__.event.bind(document, 'touchend', end, true);
+ } else {
- function BendpointSnapping(eventBus) {
- function snapTo(values, value) {
- if ((0, _minDash.isArray)(values)) {
- var i = values.length;
+ // assume we use the mouse to interact per default
+ min_dom__WEBPACK_IMPORTED_MODULE_6__.event.bind(document, 'mousemove', move);
- while (i--) if (abs(values[i] - value) <= TOLERANCE) {
- return values[i];
- }
- } else {
- values = +values;
- var rem = value % values;
+ // prevent default browser drag and text selection behavior
+ min_dom__WEBPACK_IMPORTED_MODULE_6__.event.bind(document, 'dragstart', preventDefault);
+ min_dom__WEBPACK_IMPORTED_MODULE_6__.event.bind(document, 'selectstart', preventDefault);
- if (rem < TOLERANCE) {
- return value - rem;
- }
+ min_dom__WEBPACK_IMPORTED_MODULE_6__.event.bind(document, 'mousedown', endDrag, true);
+ min_dom__WEBPACK_IMPORTED_MODULE_6__.event.bind(document, 'mouseup', endDrag, true);
+ }
- if (rem > values - TOLERANCE) {
- return value - rem + values;
- }
- }
+ min_dom__WEBPACK_IMPORTED_MODULE_6__.event.bind(document, 'keyup', checkCancel);
- return value;
- }
+ eventBus.on('element.hover', hover);
+ eventBus.on('element.out', out);
+ }
- function mid(element) {
- if (element.width) {
- return {
- x: round(element.width / 2 + element.x),
- y: round(element.height / 2 + element.y)
- };
- }
- } // connection segment snapping //////////////////////
+ fire('init');
+ if (options.autoActivate) {
+ move(event, true);
+ }
+ }
- function getConnectionSegmentSnaps(context) {
- var snapPoints = context.snapPoints,
- connection = context.connection,
- waypoints = connection.waypoints,
- segmentStart = context.segmentStart,
- segmentStartIndex = context.segmentStartIndex,
- segmentEnd = context.segmentEnd,
- segmentEndIndex = context.segmentEndIndex,
- axis = context.axis;
+ // cancel on diagram destruction
+ eventBus.on('diagram.destroy', cancel);
- if (snapPoints) {
- return snapPoints;
- }
- var referenceWaypoints = [waypoints[segmentStartIndex - 1], segmentStart, segmentEnd, waypoints[segmentEndIndex + 1]];
+ // API
- if (segmentStartIndex < 2) {
- referenceWaypoints.unshift(mid(connection.source));
- }
+ this.init = init;
+ this.move = move;
+ this.hover = hover;
+ this.out = out;
+ this.end = end;
- if (segmentEndIndex > waypoints.length - 3) {
- referenceWaypoints.unshift(mid(connection.target));
- }
+ this.cancel = cancel;
- context.snapPoints = snapPoints = {
- horizontal: [],
- vertical: []
- };
- (0, _minDash.forEach)(referenceWaypoints, function (p) {
- // we snap on existing bendpoints only,
- // not placeholders that are inserted during add
- if (p) {
- p = p.original || p;
-
- if (axis === 'y') {
- snapPoints.horizontal.push(p.y);
- }
+ // for introspection
- if (axis === 'x') {
- snapPoints.vertical.push(p.x);
- }
- }
- });
- return snapPoints;
- }
+ this.context = function() {
+ return context;
+ };
- eventBus.on('connectionSegment.move.move', 1500, function (event) {
- var context = event.context,
- snapPoints = getConnectionSegmentSnaps(context),
- x = event.x,
- y = event.y,
- sx,
- sy;
+ this.setOptions = function(options) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(defaultOptions, options);
+ };
+}
- if (!snapPoints) {
- return;
- } // snap
+Dragging.$inject = [
+ 'eventBus',
+ 'canvas',
+ 'selection',
+ 'elementRegistry'
+];
- sx = snapTo(snapPoints.vertical, x);
- sy = snapTo(snapPoints.horizontal, y); // correction x/y
+/***/ }),
- var cx = x - sx,
- cy = y - sy; // update delta
+/***/ "../node_modules/diagram-js/lib/features/dragging/index.js":
+/*!*****************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/dragging/index.js ***!
+ \*****************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- (0, _minDash.assign)(event, {
- dx: event.dx - cx,
- dy: event.dy - cy,
- x: sx,
- y: sy
- }); // only set snapped if actually snapped
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _hover_fix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../hover-fix */ "../node_modules/diagram-js/lib/features/hover-fix/index.js");
+/* harmony import */ var _selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selection */ "../node_modules/diagram-js/lib/features/selection/index.js");
+/* harmony import */ var _Dragging__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Dragging */ "../node_modules/diagram-js/lib/features/dragging/Dragging.js");
- if (cx || snapPoints.vertical.indexOf(x) !== -1) {
- (0, _SnapUtil.setSnapped)(event, 'x', sx);
- }
- if (cy || snapPoints.horizontal.indexOf(y) !== -1) {
- (0, _SnapUtil.setSnapped)(event, 'y', sy);
- }
- }); // bendpoint snapping //////////////////////
- function getBendpointSnaps(context) {
- var snapPoints = context.snapPoints,
- waypoints = context.connection.waypoints,
- bendpointIndex = context.bendpointIndex;
- if (snapPoints) {
- return snapPoints;
- }
- var referenceWaypoints = [waypoints[bendpointIndex - 1], waypoints[bendpointIndex + 1]];
- context.snapPoints = snapPoints = {
- horizontal: [],
- vertical: []
- };
- (0, _minDash.forEach)(referenceWaypoints, function (p) {
- // we snap on existing bendpoints only,
- // not placeholders that are inserted during add
- if (p) {
- p = p.original || p;
- snapPoints.horizontal.push(p.y);
- snapPoints.vertical.push(p.x);
- }
- });
- return snapPoints;
- }
- eventBus.on(['bendpoint.move.move', 'bendpoint.move.end'], 1500, function (event) {
- var context = event.context,
- snapPoints = getBendpointSnaps(context),
- hover = context.hover,
- hoverMid = hover && mid(hover),
- x = event.x,
- y = event.y,
- sx,
- sy;
+/**
+ * @type { import('didi').ModuleDeclaration }
+ */
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ _hover_fix__WEBPACK_IMPORTED_MODULE_0__["default"],
+ _selection__WEBPACK_IMPORTED_MODULE_1__["default"],
+ ],
+ dragging: [ 'type', _Dragging__WEBPACK_IMPORTED_MODULE_2__["default"] ],
+});
+
+/***/ }),
+
+/***/ "../node_modules/diagram-js/lib/features/editor-actions/EditorActions.js":
+/*!*******************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/editor-actions/EditorActions.js ***!
+ \*******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ EditorActions)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+
+
+/**
+ * @typedef {import('didi').Injector} Injector
+ *
+ * @typedef {import('../../core/EventBus').default} EventBus
+ */
- if (!snapPoints) {
- return;
- } // snap to hover mid
+var NOT_REGISTERED_ERROR = 'is not a registered action',
+ IS_REGISTERED_ERROR = 'is already registered';
- sx = snapTo(hoverMid ? snapPoints.vertical.concat([hoverMid.x]) : snapPoints.vertical, x);
- sy = snapTo(hoverMid ? snapPoints.horizontal.concat([hoverMid.y]) : snapPoints.horizontal, y); // correction x/y
+/**
+ * An interface that provides access to modeling actions by decoupling
+ * the one who requests the action to be triggered and the trigger itself.
+ *
+ * It's possible to add new actions by registering them with ´registerAction´
+ * and likewise unregister existing ones with ´unregisterAction´.
+ *
+ *
+ * ## Life-Cycle and configuration
+ *
+ * The editor actions will wait for diagram initialization before
+ * registering default actions _and_ firing an `editorActions.init` event.
+ *
+ * Interested parties may listen to the `editorActions.init` event with
+ * low priority to check, which actions got registered. Other components
+ * may use the event to register their own actions via `registerAction`.
+ *
+ * @param {EventBus} eventBus
+ * @param {Injector} injector
+ */
+function EditorActions(eventBus, injector) {
- var cx = x - sx,
- cy = y - sy; // update delta
+ // initialize actions
+ this._actions = {};
- (0, _minDash.assign)(event, {
- dx: event.dx - cx,
- dy: event.dy - cy,
- x: event.x - cx,
- y: event.y - cy
- }); // only set snapped if actually snapped
+ var self = this;
- if (cx || snapPoints.vertical.indexOf(x) !== -1) {
- (0, _SnapUtil.setSnapped)(event, 'x', sx);
- }
+ eventBus.on('diagram.init', function() {
- if (cy || snapPoints.horizontal.indexOf(y) !== -1) {
- (0, _SnapUtil.setSnapped)(event, 'y', sy);
- }
- });
- }
+ // all diagram modules got loaded; check which ones
+ // are available and register the respective default actions
+ self._registerDefaultActions(injector);
- BendpointSnapping.$inject = ['eventBus'];
+ // ask interested parties to register available editor
+ // actions on diagram initialization
+ eventBus.fire('editorActions.init', {
+ editorActions: self
+ });
+ });
- },{"../snapping/SnapUtil":387,"min-dash":646}],278:[function(require,module,exports){
- "use strict";
+}
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.toCanvasCoordinates = toCanvasCoordinates;
- exports.getConnectionIntersection = getConnectionIntersection;
- exports.addBendpoint = addBendpoint;
- exports.addSegmentDragger = addSegmentDragger;
- exports.calculateSegmentMoveRegion = calculateSegmentMoveRegion;
- exports.SEGMENT_DRAGGER_CLS = exports.BENDPOINT_CLS = void 0;
+EditorActions.$inject = [
+ 'eventBus',
+ 'injector'
+];
- var _Event = require("../../util/Event");
+/**
+ * Register default actions.
+ *
+ * @param {Injector} injector
+ */
+EditorActions.prototype._registerDefaultActions = function(injector) {
+
+ // (1) retrieve optional components to integrate with
+
+ var commandStack = injector.get('commandStack', false);
+ var modeling = injector.get('modeling', false);
+ var selection = injector.get('selection', false);
+ var zoomScroll = injector.get('zoomScroll', false);
+ var copyPaste = injector.get('copyPaste', false);
+ var canvas = injector.get('canvas', false);
+ var rules = injector.get('rules', false);
+ var keyboardMove = injector.get('keyboardMove', false);
+ var keyboardMoveSelection = injector.get('keyboardMoveSelection', false);
+
+ // (2) check components and register actions
+
+ if (commandStack) {
+ this.register('undo', function() {
+ commandStack.undo();
+ });
+
+ this.register('redo', function() {
+ commandStack.redo();
+ });
+ }
+
+ if (copyPaste && selection) {
+ this.register('copy', function() {
+ var selectedElements = selection.get();
+
+ if (selectedElements.length) {
+ return copyPaste.copy(selectedElements);
+ }
+ });
+ }
+
+ if (copyPaste) {
+ this.register('paste', function() {
+ copyPaste.paste();
+ });
+ }
+
+ if (zoomScroll) {
+ this.register('stepZoom', function(opts) {
+ zoomScroll.stepZoom(opts.value);
+ });
+ }
+
+ if (canvas) {
+ this.register('zoom', function(opts) {
+ canvas.zoom(opts.value);
+ });
+ }
+
+ if (modeling && selection && rules) {
+ this.register('removeSelection', function() {
+
+ var selectedElements = selection.get();
+
+ if (!selectedElements.length) {
+ return;
+ }
+
+ var allowed = rules.allowed('elements.delete', { elements: selectedElements }),
+ removableElements;
+
+ if (allowed === false) {
+ return;
+ }
+ else if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(allowed)) {
+ removableElements = allowed;
+ }
+ else {
+ removableElements = selectedElements;
+ }
+
+ if (removableElements.length) {
+ modeling.removeElements(removableElements.slice());
+ }
+ });
+ }
+
+ if (keyboardMove) {
+ this.register('moveCanvas', function(opts) {
+ keyboardMove.moveCanvas(opts);
+ });
+ }
+
+ if (keyboardMoveSelection) {
+ this.register('moveSelection', function(opts) {
+ keyboardMoveSelection.moveSelection(opts.direction, opts.accelerated);
+ });
+ }
+
+};
+
+
+/**
+ * Triggers a registered action
+ *
+ * @param {string} action
+ * @param {Object} opts
+ *
+ * @return {unknown} Returns what the registered listener returns
+ */
+EditorActions.prototype.trigger = function(action, opts) {
+ if (!this._actions[action]) {
+ throw error(action, NOT_REGISTERED_ERROR);
+ }
- var _Geometry = require("../../util/Geometry");
+ return this._actions[action](opts);
+};
- var _tinySvg = require("tiny-svg");
- var _SvgTransformUtil = require("../../util/SvgTransformUtil");
+/**
+ * Registers a collections of actions.
+ * The key of the object will be the name of the action.
+ *
+ * @example
+ *
+ * ```javascript
+ * var actions = {
+ * spaceTool: function() {
+ * spaceTool.activateSelection();
+ * },
+ * lassoTool: function() {
+ * lassoTool.activateSelection();
+ * }
+ * ];
+ *
+ * editorActions.register(actions);
+ *
+ * editorActions.isRegistered('spaceTool'); // true
+ * ```
+ *
+ * @param {Object} actions
+ */
+EditorActions.prototype.register = function(actions, listener) {
+ var self = this;
- var _LineIntersection = require("../../util/LineIntersection");
+ if (typeof actions === 'string') {
+ return this._registerAction(actions, listener);
+ }
- var BENDPOINT_CLS = 'djs-bendpoint';
- exports.BENDPOINT_CLS = BENDPOINT_CLS;
- var SEGMENT_DRAGGER_CLS = 'djs-segment-dragger';
- exports.SEGMENT_DRAGGER_CLS = SEGMENT_DRAGGER_CLS;
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(actions, function(listener, action) {
+ self._registerAction(action, listener);
+ });
+};
- function toCanvasCoordinates(canvas, event) {
- var position = (0, _Event.toPoint)(event),
- clientRect = canvas._container.getBoundingClientRect(),
- offset; // canvas relative position
+/**
+ * Registers a listener to an action key
+ *
+ * @param {string} action
+ * @param {Function} listener
+ */
+EditorActions.prototype._registerAction = function(action, listener) {
+ if (this.isRegistered(action)) {
+ throw error(action, IS_REGISTERED_ERROR);
+ }
+ this._actions[action] = listener;
+};
- offset = {
- x: clientRect.left,
- y: clientRect.top
- }; // update actual event payload with canvas relative measures
+/**
+ * Unregister an existing action
+ *
+ * @param {string} action
+ */
+EditorActions.prototype.unregister = function(action) {
+ if (!this.isRegistered(action)) {
+ throw error(action, NOT_REGISTERED_ERROR);
+ }
- var viewbox = canvas.viewbox();
- return {
- x: viewbox.x + (position.x - offset.x) / viewbox.scale,
- y: viewbox.y + (position.y - offset.y) / viewbox.scale
- };
- }
+ this._actions[action] = undefined;
+};
- function getConnectionIntersection(canvas, waypoints, event) {
- var localPosition = toCanvasCoordinates(canvas, event),
- intersection = (0, _LineIntersection.getApproxIntersection)(waypoints, localPosition);
- return intersection;
- }
+/**
+ * Returns the number of actions that are currently registered
+ *
+ * @return {number}
+ */
+EditorActions.prototype.getActions = function() {
+ return Object.keys(this._actions);
+};
- function addBendpoint(parentGfx, cls) {
- var groupGfx = (0, _tinySvg.create)('g');
- (0, _tinySvg.classes)(groupGfx).add(BENDPOINT_CLS);
- (0, _tinySvg.append)(parentGfx, groupGfx);
- var visual = (0, _tinySvg.create)('circle');
- (0, _tinySvg.attr)(visual, {
- cx: 0,
- cy: 0,
- r: 4
- });
- (0, _tinySvg.classes)(visual).add('djs-visual');
- (0, _tinySvg.append)(groupGfx, visual);
- var hit = (0, _tinySvg.create)('circle');
- (0, _tinySvg.attr)(hit, {
- cx: 0,
- cy: 0,
- r: 10
- });
- (0, _tinySvg.classes)(hit).add('djs-hit');
- (0, _tinySvg.append)(groupGfx, hit);
-
- if (cls) {
- (0, _tinySvg.classes)(groupGfx).add(cls);
- }
-
- return groupGfx;
- }
-
- function createParallelDragger(parentGfx, segmentStart, segmentEnd, alignment) {
- var draggerGfx = (0, _tinySvg.create)('g');
- (0, _tinySvg.append)(parentGfx, draggerGfx);
- var width = 14,
- height = 3,
- padding = 6,
- hitWidth = calculateHitWidth(segmentStart, segmentEnd, alignment),
- hitHeight = height + padding;
- var visual = (0, _tinySvg.create)('rect');
- (0, _tinySvg.attr)(visual, {
- x: -width / 2,
- y: -height / 2,
- width: width,
- height: height
- });
- (0, _tinySvg.classes)(visual).add('djs-visual');
- (0, _tinySvg.append)(draggerGfx, visual);
- var hit = (0, _tinySvg.create)('rect');
- (0, _tinySvg.attr)(hit, {
- x: -hitWidth / 2,
- y: -hitHeight / 2,
- width: hitWidth,
- height: hitHeight
- });
- (0, _tinySvg.classes)(hit).add('djs-hit');
- (0, _tinySvg.append)(draggerGfx, hit);
- (0, _SvgTransformUtil.rotate)(draggerGfx, alignment === 'v' ? 90 : 0, 0, 0);
- return draggerGfx;
- }
-
- function addSegmentDragger(parentGfx, segmentStart, segmentEnd) {
- var groupGfx = (0, _tinySvg.create)('g'),
- mid = (0, _Geometry.getMidPoint)(segmentStart, segmentEnd),
- alignment = (0, _Geometry.pointsAligned)(segmentStart, segmentEnd);
- (0, _tinySvg.append)(parentGfx, groupGfx);
- createParallelDragger(groupGfx, segmentStart, segmentEnd, alignment);
- (0, _tinySvg.classes)(groupGfx).add(SEGMENT_DRAGGER_CLS);
- (0, _tinySvg.classes)(groupGfx).add(alignment === 'h' ? 'horizontal' : 'vertical');
- (0, _SvgTransformUtil.translate)(groupGfx, mid.x, mid.y);
- return groupGfx;
- }
- /**
- * Calculates region for segment move which is 2/3 of the full segment length
- * @param {number} segmentLength
- *
- * @return {number}
- */
+/**
+ * Checks wether the given action is registered
+ *
+ * @param {string} action
+ *
+ * @return {boolean}
+ */
+EditorActions.prototype.isRegistered = function(action) {
+ return !!this._actions[action];
+};
- function calculateSegmentMoveRegion(segmentLength) {
- return Math.abs(Math.round(segmentLength * 2 / 3));
- } // helper //////////
+function error(action, message) {
+ return new Error(action + ' ' + message);
+}
- function calculateHitWidth(segmentStart, segmentEnd, alignment) {
- var segmentLengthXAxis = segmentEnd.x - segmentStart.x,
- segmentLengthYAxis = segmentEnd.y - segmentStart.y;
- return alignment === 'h' ? calculateSegmentMoveRegion(segmentLengthXAxis) : calculateSegmentMoveRegion(segmentLengthYAxis);
- }
+/***/ }),
- },{"../../util/Event":422,"../../util/Geometry":423,"../../util/LineIntersection":426,"../../util/SvgTransformUtil":433,"tiny-svg":658}],279:[function(require,module,exports){
- "use strict";
+/***/ "../node_modules/diagram-js/lib/features/editor-actions/index.js":
+/*!***********************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/editor-actions/index.js ***!
+ \***********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = Bendpoints;
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _EditorActions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./EditorActions */ "../node_modules/diagram-js/lib/features/editor-actions/EditorActions.js");
- var _minDash = require("min-dash");
- var _minDom = require("min-dom");
- var _BendpointUtil = require("./BendpointUtil");
+/**
+ * @type { import('didi').ModuleDeclaration }
+ */
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __init__: [ 'editorActions' ],
+ editorActions: [ 'type', _EditorActions__WEBPACK_IMPORTED_MODULE_0__["default"] ]
+});
+
+
+/***/ }),
+
+/***/ "../node_modules/diagram-js/lib/features/global-connect/GlobalConnect.js":
+/*!*******************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/global-connect/GlobalConnect.js ***!
+ \*******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ GlobalConnect)
+/* harmony export */ });
+var MARKER_OK = 'connect-ok',
+ MARKER_NOT_OK = 'connect-not-ok';
+
+/**
+ * @typedef {import('../../core/Canvas').default} Canvas
+ * @typedef {import('../connect/Connect').default} Connect
+ * @typedef {import('../dragging/Dragging').default} Dragging
+ * @typedef {import('../../core/EventBus').default} EventBus
+ * @typedef {import('../mouse/Mouse').default} Mouse
+ * @typedef {import('../rules/Rules').default} Rules
+ * @typedef {import('../tool-manager/ToolManager').default} ToolManager
+ *
+ * @typedef {import('../../model/Types').Element} Element
+ */
- var _EscapeUtil = require("../../util/EscapeUtil");
+/**
+ * @class
+ * @constructor
+ *
+ * @param {EventBus} eventBus
+ * @param {Dragging} dragging
+ * @param {Connect} connect
+ * @param {Canvas} canvas
+ * @param {ToolManager} toolManager
+ * @param {Rules} rules
+ * @param {Mouse} mouse
+ */
+function GlobalConnect(
+ eventBus, dragging, connect,
+ canvas, toolManager, rules,
+ mouse) {
- var _Geometry = require("../../util/Geometry");
+ var self = this;
- var _tinySvg = require("tiny-svg");
+ this._dragging = dragging;
+ this._rules = rules;
+ this._mouse = mouse;
- var _SvgTransformUtil = require("../../util/SvgTransformUtil");
+ toolManager.registerTool('global-connect', {
+ tool: 'global-connect',
+ dragging: 'global-connect.drag'
+ });
- /**
- * A service that adds editable bendpoints to connections.
- */
- function Bendpoints(eventBus, canvas, interactionEvents, bendpointMove, connectionSegmentMove) {
- /**
- * Returns true if intersection point is inside middle region of segment, adjusted by
- * optional threshold
- */
- function isIntersectionMiddle(intersection, waypoints, treshold) {
- var idx = intersection.index,
- p = intersection.point,
- p0,
- p1,
- mid,
- aligned,
- xDelta,
- yDelta;
-
- if (idx <= 0 || intersection.bendpoint) {
- return false;
- }
+ eventBus.on('global-connect.hover', function(event) {
+ var context = event.context,
+ startTarget = event.hover;
- p0 = waypoints[idx - 1];
- p1 = waypoints[idx];
- mid = (0, _Geometry.getMidPoint)(p0, p1), aligned = (0, _Geometry.pointsAligned)(p0, p1);
- xDelta = Math.abs(p.x - mid.x);
- yDelta = Math.abs(p.y - mid.y);
- return aligned && xDelta <= treshold && yDelta <= treshold;
- }
- /**
- * Calculates the threshold from a connection's middle which fits the two-third-region
- */
+ var canStartConnect = context.canStartConnect = self.canStartConnect(startTarget);
+ // simply ignore hover
+ if (canStartConnect === null) {
+ return;
+ }
- function calculateIntersectionThreshold(connection, intersection) {
- var waypoints = connection.waypoints,
- relevantSegment,
- alignment,
- segmentLength,
- threshold;
+ context.startTarget = startTarget;
- if (intersection.index <= 0 || intersection.bendpoint) {
- return null;
- } // segment relative to connection intersection
+ canvas.addMarker(startTarget, canStartConnect ? MARKER_OK : MARKER_NOT_OK);
+ });
- relevantSegment = {
- start: waypoints[intersection.index - 1],
- end: waypoints[intersection.index]
- };
- alignment = (0, _Geometry.pointsAligned)(relevantSegment.start, relevantSegment.end);
+ eventBus.on([ 'global-connect.out', 'global-connect.cleanup' ], function(event) {
+ var startTarget = event.context.startTarget,
+ canStartConnect = event.context.canStartConnect;
- if (!alignment) {
- return null;
- }
+ if (startTarget) {
+ canvas.removeMarker(startTarget, canStartConnect ? MARKER_OK : MARKER_NOT_OK);
+ }
+ });
- if (alignment === 'h') {
- segmentLength = relevantSegment.end.x - relevantSegment.start.x;
- } else {
- segmentLength = relevantSegment.end.y - relevantSegment.start.y;
- } // calculate threshold relative to 2/3 of segment length
+ eventBus.on([ 'global-connect.ended' ], function(event) {
+ var context = event.context,
+ startTarget = context.startTarget,
+ startPosition = {
+ x: event.x,
+ y: event.y
+ };
- threshold = (0, _BendpointUtil.calculateSegmentMoveRegion)(segmentLength) / 2;
- return threshold;
- }
+ var canStartConnect = self.canStartConnect(startTarget);
- function activateBendpointMove(event, connection) {
- var waypoints = connection.waypoints,
- intersection = (0, _BendpointUtil.getConnectionIntersection)(canvas, waypoints, event),
- threshold;
+ if (!canStartConnect) {
+ return;
+ }
- if (!intersection) {
- return;
- }
+ eventBus.once('element.out', function() {
+ eventBus.once([ 'connect.ended', 'connect.canceled' ], function() {
+ eventBus.fire('global-connect.drag.ended');
+ });
- threshold = calculateIntersectionThreshold(connection, intersection);
+ connect.start(null, startTarget, startPosition);
+ });
- if (isIntersectionMiddle(intersection, waypoints, threshold)) {
- connectionSegmentMove.start(event, connection, intersection.index);
- } else {
- bendpointMove.start(event, connection, intersection.index, !intersection.bendpoint);
- } // we've handled the event
+ return false;
+ });
+}
+GlobalConnect.$inject = [
+ 'eventBus',
+ 'dragging',
+ 'connect',
+ 'canvas',
+ 'toolManager',
+ 'rules',
+ 'mouse'
+];
- return true;
- }
+/**
+ * Initiates tool activity.
+ */
+GlobalConnect.prototype.start = function(event, autoActivate) {
+ this._dragging.init(event, 'global-connect', {
+ autoActivate: autoActivate,
+ trapClick: false,
+ data: {
+ context: {}
+ }
+ });
+};
- function bindInteractionEvents(node, eventName, element) {
- _minDom.event.bind(node, eventName, function (event) {
- interactionEvents.triggerMouseEvent(eventName, event, element);
- event.stopPropagation();
- });
- }
+GlobalConnect.prototype.toggle = function() {
- function getBendpointsContainer(element, create) {
- var layer = canvas.getLayer('overlays'),
- gfx = (0, _minDom.query)('.djs-bendpoints[data-element-id="' + (0, _EscapeUtil.escapeCSS)(element.id) + '"]', layer);
+ if (this.isActive()) {
+ return this._dragging.cancel();
+ }
- if (!gfx && create) {
- gfx = (0, _tinySvg.create)('g');
- (0, _tinySvg.attr)(gfx, {
- 'data-element-id': element.id
- });
- (0, _tinySvg.classes)(gfx).add('djs-bendpoints');
- (0, _tinySvg.append)(layer, gfx);
- bindInteractionEvents(gfx, 'mousedown', element);
- bindInteractionEvents(gfx, 'click', element);
- bindInteractionEvents(gfx, 'dblclick', element);
- }
+ var mouseEvent = this._mouse.getLastMoveEvent();
- return gfx;
- }
+ return this.start(mouseEvent, !!mouseEvent);
+};
- function getSegmentDragger(idx, parentGfx) {
- return (0, _minDom.query)('.djs-segment-dragger[data-segment-idx="' + idx + '"]', parentGfx);
- }
+GlobalConnect.prototype.isActive = function() {
+ var context = this._dragging.context();
- function createBendpoints(gfx, connection) {
- connection.waypoints.forEach(function (p, idx) {
- var bendpoint = (0, _BendpointUtil.addBendpoint)(gfx);
- (0, _tinySvg.append)(gfx, bendpoint);
- (0, _SvgTransformUtil.translate)(bendpoint, p.x, p.y);
- }); // add floating bendpoint
+ return context && /^global-connect/.test(context.prefix);
+};
- (0, _BendpointUtil.addBendpoint)(gfx, 'floating');
- }
+/**
+ * Check if source element can initiate connection.
+ *
+ * @param {Element} startTarget
+ * @return {boolean}
+ */
+GlobalConnect.prototype.canStartConnect = function(startTarget) {
+ return this._rules.allowed('connection.start', { source: startTarget });
+};
- function createSegmentDraggers(gfx, connection) {
- var waypoints = connection.waypoints;
- var segmentStart, segmentEnd, segmentDraggerGfx;
- for (var i = 1; i < waypoints.length; i++) {
- segmentStart = waypoints[i - 1];
- segmentEnd = waypoints[i];
+/***/ }),
- if ((0, _Geometry.pointsAligned)(segmentStart, segmentEnd)) {
- segmentDraggerGfx = (0, _BendpointUtil.addSegmentDragger)(gfx, segmentStart, segmentEnd);
- (0, _tinySvg.attr)(segmentDraggerGfx, {
- 'data-segment-idx': i
- });
- bindInteractionEvents(segmentDraggerGfx, 'mousemove', connection);
- }
- }
- }
+/***/ "../node_modules/diagram-js/lib/features/global-connect/index.js":
+/*!***********************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/global-connect/index.js ***!
+ \***********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- function clearBendpoints(gfx) {
- (0, _minDash.forEach)((0, _minDom.queryAll)('.' + _BendpointUtil.BENDPOINT_CLS, gfx), function (node) {
- (0, _tinySvg.remove)(node);
- });
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _connect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../connect */ "../node_modules/diagram-js/lib/features/connect/index.js");
+/* harmony import */ var _rules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../rules */ "../node_modules/diagram-js/lib/features/rules/index.js");
+/* harmony import */ var _dragging__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../dragging */ "../node_modules/diagram-js/lib/features/dragging/index.js");
+/* harmony import */ var _tool_manager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../tool-manager */ "../node_modules/diagram-js/lib/features/tool-manager/index.js");
+/* harmony import */ var _mouse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../mouse */ "../node_modules/diagram-js/lib/features/mouse/index.js");
+/* harmony import */ var _GlobalConnect__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./GlobalConnect */ "../node_modules/diagram-js/lib/features/global-connect/GlobalConnect.js");
- function clearSegmentDraggers(gfx) {
- (0, _minDash.forEach)((0, _minDom.queryAll)('.' + _BendpointUtil.SEGMENT_DRAGGER_CLS, gfx), function (node) {
- (0, _tinySvg.remove)(node);
- });
- }
- function addHandles(connection) {
- var gfx = getBendpointsContainer(connection);
- if (!gfx) {
- gfx = getBendpointsContainer(connection, true);
- createBendpoints(gfx, connection);
- createSegmentDraggers(gfx, connection);
- }
- return gfx;
- }
- function updateHandles(connection) {
- var gfx = getBendpointsContainer(connection);
- if (gfx) {
- clearSegmentDraggers(gfx);
- clearBendpoints(gfx);
- createSegmentDraggers(gfx, connection);
- createBendpoints(gfx, connection);
- }
- }
- function updateFloatingBendpointPosition(parentGfx, intersection) {
- var floating = (0, _minDom.query)('.floating', parentGfx),
- point = intersection.point;
- if (!floating) {
- return;
- }
- (0, _SvgTransformUtil.translate)(floating, point.x, point.y);
- }
+/**
+ * @type { import('didi').ModuleDeclaration }
+ */
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ _connect__WEBPACK_IMPORTED_MODULE_0__["default"],
+ _rules__WEBPACK_IMPORTED_MODULE_1__["default"],
+ _dragging__WEBPACK_IMPORTED_MODULE_2__["default"],
+ _tool_manager__WEBPACK_IMPORTED_MODULE_3__["default"],
+ _mouse__WEBPACK_IMPORTED_MODULE_4__["default"]
+ ],
+ globalConnect: [ 'type', _GlobalConnect__WEBPACK_IMPORTED_MODULE_5__["default"] ]
+});
- function updateSegmentDraggerPosition(parentGfx, intersection, waypoints) {
- var draggerGfx = getSegmentDragger(intersection.index, parentGfx),
- segmentStart = waypoints[intersection.index - 1],
- segmentEnd = waypoints[intersection.index],
- point = intersection.point,
- mid = (0, _Geometry.getMidPoint)(segmentStart, segmentEnd),
- alignment = (0, _Geometry.pointsAligned)(segmentStart, segmentEnd),
- draggerVisual,
- relativePosition;
- if (!draggerGfx) {
- return;
- }
+/***/ }),
- draggerVisual = getDraggerVisual(draggerGfx);
- relativePosition = {
- x: point.x - mid.x,
- y: point.y - mid.y
- };
+/***/ "../node_modules/diagram-js/lib/features/grid-snapping/GridSnapping.js":
+/*!*****************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/grid-snapping/GridSnapping.js ***!
+ \*****************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- if (alignment === 'v') {
- // rotate position
- relativePosition = {
- x: relativePosition.y,
- y: relativePosition.x
- };
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ GridSnapping)
+/* harmony export */ });
+/* harmony import */ var _snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../snapping/SnapUtil */ "../node_modules/diagram-js/lib/features/snapping/SnapUtil.js");
+/* harmony import */ var _keyboard_KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../keyboard/KeyboardUtil */ "../node_modules/diagram-js/lib/features/keyboard/KeyboardUtil.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var _GridUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GridUtil */ "../node_modules/diagram-js/lib/features/grid-snapping/GridUtil.js");
- (0, _SvgTransformUtil.translate)(draggerVisual, relativePosition.x, relativePosition.y);
- }
- eventBus.on('connection.changed', function (event) {
- updateHandles(event.element);
- });
- eventBus.on('connection.remove', function (event) {
- var gfx = getBendpointsContainer(event.element);
- if (gfx) {
- (0, _tinySvg.remove)(gfx);
- }
- });
- eventBus.on('element.marker.update', function (event) {
- var element = event.element,
- bendpointsGfx;
- if (!element.waypoints) {
- return;
- }
- bendpointsGfx = addHandles(element);
- if (event.add) {
- (0, _tinySvg.classes)(bendpointsGfx).add(event.marker);
- } else {
- (0, _tinySvg.classes)(bendpointsGfx).remove(event.marker);
- }
- });
- eventBus.on('element.mousemove', function (event) {
- var element = event.element,
- waypoints = element.waypoints,
- bendpointsGfx,
- intersection;
- if (waypoints) {
- bendpointsGfx = getBendpointsContainer(element, true);
- intersection = (0, _BendpointUtil.getConnectionIntersection)(canvas, waypoints, event.originalEvent);
- if (!intersection) {
- return;
- }
+/**
+ * @typedef {import('../../core/ElementRegistry').default} ElementRegistry
+ * @typedef {import('../../core/EventBus').default} EventBus
+ */
- updateFloatingBendpointPosition(bendpointsGfx, intersection);
+var LOWER_PRIORITY = 1200;
+var LOW_PRIORITY = 800;
- if (!intersection.bendpoint) {
- updateSegmentDraggerPosition(bendpointsGfx, intersection, waypoints);
- }
- }
- });
- eventBus.on('element.mousedown', function (event) {
- var originalEvent = event.originalEvent,
- element = event.element;
+/**
+ * Basic grid snapping that covers connecting, creating, moving, resizing shapes, moving bendpoints
+ * and connection segments.
+ *
+ * @param {ElementRegistry} elementRegistry
+ * @param {EventBus} eventBus
+ * @param {Object} config
+ */
+function GridSnapping(elementRegistry, eventBus, config) {
+
+ var active = !config || config.active !== false;
+
+ this._eventBus = eventBus;
+
+ var self = this;
+
+ eventBus.on('diagram.init', LOW_PRIORITY, function() {
+ self.setActive(active);
+ });
+
+ eventBus.on([
+ 'create.move',
+ 'create.end',
+ 'bendpoint.move.move',
+ 'bendpoint.move.end',
+ 'connect.move',
+ 'connect.end',
+ 'connectionSegment.move.move',
+ 'connectionSegment.move.end',
+ 'resize.move',
+ 'resize.end',
+ 'shape.move.move',
+ 'shape.move.end'
+ ], LOWER_PRIORITY, function(event) {
+ var originalEvent = event.originalEvent;
+
+ if (!self.active || (originalEvent && (0,_keyboard_KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__.isCmd)(originalEvent))) {
+ return;
+ }
+
+ var context = event.context,
+ gridSnappingContext = context.gridSnappingContext;
+
+ if (!gridSnappingContext) {
+ gridSnappingContext = context.gridSnappingContext = {};
+ }
+
+ [ 'x', 'y' ].forEach(function(axis) {
+ var options = {};
+
+ // allow snapping with offset
+ var snapOffset = getSnapOffset(event, axis, elementRegistry);
+
+ if (snapOffset) {
+ options.offset = snapOffset;
+ }
+
+ // allow snapping with min and max
+ var snapConstraints = getSnapConstraints(event, axis);
+
+ if (snapConstraints) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(options, snapConstraints);
+ }
+
+ if (!(0,_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_2__.isSnapped)(event, axis)) {
+ self.snapEvent(event, axis, options);
+ }
+ });
+ });
+}
+
+/**
+ * Snap an events x or y with optional min, max and offset.
+ *
+ * @param {Object} event
+ * @param {string} axis
+ * @param {number} [options.min]
+ * @param {number} [options.max]
+ * @param {number} [options.offset]
+ */
+GridSnapping.prototype.snapEvent = function(event, axis, options) {
+ var snappedValue = this.snapValue(event[ axis ], options);
- if (!element.waypoints) {
- return;
- }
+ (0,_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_2__.setSnapped)(event, axis, snappedValue);
+};
- return activateBendpointMove(originalEvent, element);
- });
- eventBus.on('selection.changed', function (event) {
- var newSelection = event.newSelection,
- primary = newSelection[0];
+/**
+ * Expose grid spacing for third parties (i.e. extensions).
+ *
+ * @return {number} spacing of grid dots
+ */
+GridSnapping.prototype.getGridSpacing = function() {
+ return _GridUtil__WEBPACK_IMPORTED_MODULE_3__.SPACING;
+};
- if (primary && primary.waypoints) {
- addHandles(primary);
- }
- });
- eventBus.on('element.hover', function (event) {
- var element = event.element;
+/**
+ * Snap value with optional min, max and offset.
+ *
+ * @param {number} value
+ * @param {Object} options
+ * @param {number} [options.min]
+ * @param {number} [options.max]
+ * @param {number} [options.offset]
+ */
+GridSnapping.prototype.snapValue = function(value, options) {
+ var offset = 0;
- if (element.waypoints) {
- addHandles(element);
- interactionEvents.registerEvent(event.gfx, 'mousemove', 'element.mousemove');
- }
- });
- eventBus.on('element.out', function (event) {
- interactionEvents.unregisterEvent(event.gfx, 'mousemove', 'element.mousemove');
- }); // update bendpoint container data attribute on element ID change
+ if (options && options.offset) {
+ offset = options.offset;
+ }
- eventBus.on('element.updateId', function (context) {
- var element = context.element,
- newId = context.newId;
+ value += offset;
- if (element.waypoints) {
- var bendpointContainer = getBendpointsContainer(element);
+ value = (0,_GridUtil__WEBPACK_IMPORTED_MODULE_3__.quantize)(value, _GridUtil__WEBPACK_IMPORTED_MODULE_3__.SPACING);
- if (bendpointContainer) {
- (0, _tinySvg.attr)(bendpointContainer, {
- 'data-element-id': newId
- });
- }
- }
- }); // API
+ var min, max;
- this.addHandles = addHandles;
- this.updateHandles = updateHandles;
- this.getBendpointsContainer = getBendpointsContainer;
- this.getSegmentDragger = getSegmentDragger;
- }
+ if (options && options.min) {
+ min = options.min;
- Bendpoints.$inject = ['eventBus', 'canvas', 'interactionEvents', 'bendpointMove', 'connectionSegmentMove']; // helper /////////////
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isNumber)(min)) {
+ min = (0,_GridUtil__WEBPACK_IMPORTED_MODULE_3__.quantize)(min + offset, _GridUtil__WEBPACK_IMPORTED_MODULE_3__.SPACING, 'ceil');
- function getDraggerVisual(draggerGfx) {
- return (0, _minDom.query)('.djs-visual', draggerGfx);
- }
+ value = Math.max(value, min);
+ }
+ }
- },{"../../util/EscapeUtil":421,"../../util/Geometry":423,"../../util/SvgTransformUtil":433,"./BendpointUtil":278,"min-dash":646,"min-dom":647,"tiny-svg":658}],280:[function(require,module,exports){
- "use strict";
+ if (options && options.max) {
+ max = options.max;
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = ConnectionSegmentMove;
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isNumber)(max)) {
+ max = (0,_GridUtil__WEBPACK_IMPORTED_MODULE_3__.quantize)(max + offset, _GridUtil__WEBPACK_IMPORTED_MODULE_3__.SPACING, 'floor');
- var _Geometry = require("../../util/Geometry");
+ value = Math.min(value, max);
+ }
+ }
- var _BendpointUtil = require("./BendpointUtil");
+ value -= offset;
- var _LayoutUtil = require("../../layout/LayoutUtil");
+ return value;
+};
- var _tinySvg = require("tiny-svg");
+GridSnapping.prototype.isActive = function() {
+ return this.active;
+};
- var _SvgTransformUtil = require("../../util/SvgTransformUtil");
+GridSnapping.prototype.setActive = function(active) {
+ this.active = active;
+
+ this._eventBus.fire('gridSnapping.toggle', { active: active });
+};
+
+GridSnapping.prototype.toggleActive = function() {
+ this.setActive(!this.active);
+};
+
+GridSnapping.$inject = [
+ 'elementRegistry',
+ 'eventBus',
+ 'config.gridSnapping'
+];
+
+// helpers //////////
+
+/**
+ * Get minimum and maximum snap constraints.
+ * Constraints are cached.
+ *
+ * @param {Object} event
+ * @param {Object} event.context
+ * @param {string} axis
+ *
+ * @return {boolean|Object}
+ */
+function getSnapConstraints(event, axis) {
+ var context = event.context,
+ createConstraints = context.createConstraints,
+ resizeConstraints = context.resizeConstraints || {},
+ gridSnappingContext = context.gridSnappingContext,
+ snapConstraints = gridSnappingContext.snapConstraints;
+
+ // cache snap constraints
+ if (snapConstraints && snapConstraints[ axis ]) {
+ return snapConstraints[ axis ];
+ }
+
+ if (!snapConstraints) {
+ snapConstraints = gridSnappingContext.snapConstraints = {};
+ }
+
+ if (!snapConstraints[ axis ]) {
+ snapConstraints[ axis ] = {};
+ }
+
+ var direction = context.direction;
+
+ // create
+ if (createConstraints) {
+ if (isHorizontal(axis)) {
+ snapConstraints.x.min = createConstraints.left;
+ snapConstraints.x.max = createConstraints.right;
+ } else {
+ snapConstraints.y.min = createConstraints.top;
+ snapConstraints.y.max = createConstraints.bottom;
+ }
+ }
+
+ // resize
+ var minResizeConstraints = resizeConstraints.min,
+ maxResizeConstraints = resizeConstraints.max;
+
+ if (minResizeConstraints) {
+ if (isHorizontal(axis)) {
+
+ if (isWest(direction)) {
+ snapConstraints.x.max = minResizeConstraints.left;
+ } else {
+ snapConstraints.x.min = minResizeConstraints.right;
+ }
+
+ } else {
+
+ if (isNorth(direction)) {
+ snapConstraints.y.max = minResizeConstraints.top;
+ } else {
+ snapConstraints.y.min = minResizeConstraints.bottom;
+ }
+
+ }
+ }
+
+ if (maxResizeConstraints) {
+ if (isHorizontal(axis)) {
+
+ if (isWest(direction)) {
+ snapConstraints.x.min = maxResizeConstraints.left;
+ } else {
+ snapConstraints.x.max = maxResizeConstraints.right;
+ }
+
+ } else {
+
+ if (isNorth(direction)) {
+ snapConstraints.y.min = maxResizeConstraints.top;
+ } else {
+ snapConstraints.y.max = maxResizeConstraints.bottom;
+ }
+
+ }
+ }
+
+ return snapConstraints[ axis ];
+}
+
+/**
+ * Get snap offset.
+ * Offset is cached.
+ *
+ * @param {Object} event
+ * @param {string} axis
+ * @param {ElementRegistry} elementRegistry
+ *
+ * @return {number}
+ */
+function getSnapOffset(event, axis, elementRegistry) {
+ var context = event.context,
+ shape = event.shape,
+ gridSnappingContext = context.gridSnappingContext,
+ snapLocation = gridSnappingContext.snapLocation,
+ snapOffset = gridSnappingContext.snapOffset;
+
+ // cache snap offset
+ if (snapOffset && (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isNumber)(snapOffset[ axis ])) {
+ return snapOffset[ axis ];
+ }
+
+ if (!snapOffset) {
+ snapOffset = gridSnappingContext.snapOffset = {};
+ }
+
+ if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isNumber)(snapOffset[ axis ])) {
+ snapOffset[ axis ] = 0;
+ }
+
+ if (!shape) {
+ return snapOffset[ axis ];
+ }
+
+ if (!elementRegistry.get(shape.id)) {
+
+ if (isHorizontal(axis)) {
+ snapOffset[ axis ] += shape[ axis ] + shape.width / 2;
+ } else {
+ snapOffset[ axis ] += shape[ axis ] + shape.height / 2;
+ }
+ }
+
+ if (!snapLocation) {
+ return snapOffset[ axis ];
+ }
+
+ if (axis === 'x') {
+ if (/left/.test(snapLocation)) {
+ snapOffset[ axis ] -= shape.width / 2;
+ } else if (/right/.test(snapLocation)) {
+ snapOffset[ axis ] += shape.width / 2;
+ }
+ } else {
+ if (/top/.test(snapLocation)) {
+ snapOffset[ axis ] -= shape.height / 2;
+ } else if (/bottom/.test(snapLocation)) {
+ snapOffset[ axis ] += shape.height / 2;
+ }
+ }
+
+ return snapOffset[ axis ];
+}
+
+function isHorizontal(axis) {
+ return axis === 'x';
+}
+
+function isNorth(direction) {
+ return direction.indexOf('n') !== -1;
+}
+
+function isWest(direction) {
+ return direction.indexOf('w') !== -1;
+}
+
+/***/ }),
+
+/***/ "../node_modules/diagram-js/lib/features/grid-snapping/GridUtil.js":
+/*!*************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/grid-snapping/GridUtil.js ***!
+ \*************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ SPACING: () => (/* binding */ SPACING),
+/* harmony export */ quantize: () => (/* binding */ quantize)
+/* harmony export */ });
+var SPACING = 10;
+
+function quantize(value, quantum, fn) {
+ if (!fn) {
+ fn = 'round';
+ }
+
+ return Math[ fn ](value / quantum) * quantum;
+}
+
+/***/ }),
+
+/***/ "../node_modules/diagram-js/lib/features/grid-snapping/behavior/ResizeBehavior.js":
+/*!****************************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/grid-snapping/behavior/ResizeBehavior.js ***!
+ \****************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ ResizeBehavior)
+/* harmony export */ });
+/* harmony import */ var inherits_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! inherits-browser */ "../node_modules/inherits-browser/dist/index.es.js");
+/* harmony import */ var _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../command/CommandInterceptor */ "../node_modules/diagram-js/lib/command/CommandInterceptor.js");
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
- var MARKER_CONNECT_HOVER = 'connect-hover',
- MARKER_CONNECT_UPDATING = 'djs-updating';
- function axisAdd(point, axis, delta) {
- return axisSet(point, axis, point[axis] + delta);
- }
- function axisSet(point, axis, value) {
- return {
- x: axis === 'x' ? value : point.x,
- y: axis === 'y' ? value : point.y
- };
- }
- function axisFenced(position, segmentStart, segmentEnd, axis) {
- var maxValue = Math.max(segmentStart[axis], segmentEnd[axis]),
- minValue = Math.min(segmentStart[axis], segmentEnd[axis]);
- var padding = 20;
- var fencedValue = Math.min(Math.max(minValue + padding, position[axis]), maxValue - padding);
- return axisSet(segmentStart, axis, fencedValue);
- }
- function flipAxis(axis) {
- return axis === 'x' ? 'y' : 'x';
- }
- /**
- * Get the docking point on the given element.
- *
- * Compute a reasonable docking, if non exists.
- *
- * @param {Point} point
- * @param {djs.model.Shape} referenceElement
- * @param {string} moveAxis (x|y)
- *
- * @return {Point}
- */
+/**
+ * @typedef {import('../../../model/Types').Shape} Shape
+ *
+ * @typedef {import('../../../util/Types').Rect} Rect
+ *
+ * @typedef {import('../../../core/EventBus').default} EventBus
+ * @typedef {import('../../grid-snapping/GridSnapping').default} GridSnapping
+ */
- function getDocking(point, referenceElement, moveAxis) {
- var referenceMid, inverseAxis;
+/**
+ * Integrates resizing with grid snapping.
+ *
+ * @param {EventBus} eventBus
+ * @param {GridSnapping} gridSnapping
+ */
+function ResizeBehavior(eventBus, gridSnapping) {
+ _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, eventBus);
- if (point.original) {
- return point.original;
- } else {
- referenceMid = (0, _LayoutUtil.getMid)(referenceElement);
- inverseAxis = flipAxis(moveAxis);
- return axisSet(point, inverseAxis, referenceMid[inverseAxis]);
- }
- }
- /**
- * A component that implements moving of bendpoints
- */
+ this._gridSnapping = gridSnapping;
+ var self = this;
- function ConnectionSegmentMove(injector, eventBus, canvas, dragging, graphicsFactory, modeling) {
- // optional connection docking integration
- var connectionDocking = injector.get('connectionDocking', false); // API
-
- this.start = function (event, connection, idx) {
- var context,
- gfx = canvas.getGraphics(connection),
- segmentStartIndex = idx - 1,
- segmentEndIndex = idx,
- waypoints = connection.waypoints,
- segmentStart = waypoints[segmentStartIndex],
- segmentEnd = waypoints[segmentEndIndex],
- intersection = (0, _BendpointUtil.getConnectionIntersection)(canvas, waypoints, event),
- direction,
- axis,
- dragPosition;
- direction = (0, _Geometry.pointsAligned)(segmentStart, segmentEnd); // do not move diagonal connection
-
- if (!direction) {
- return;
- } // the axis where we are going to move things
+ this.preExecute('shape.resize', function(event) {
+ var context = event.context,
+ hints = context.hints || {},
+ autoResize = hints.autoResize;
+ if (!autoResize) {
+ return;
+ }
- axis = direction === 'v' ? 'x' : 'y';
+ var shape = context.shape,
+ newBounds = context.newBounds;
- if (segmentStartIndex === 0) {
- segmentStart = getDocking(segmentStart, connection.source, axis);
- }
+ if ((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isString)(autoResize)) {
+ context.newBounds = self.snapComplex(newBounds, autoResize);
+ } else {
+ context.newBounds = self.snapSimple(shape, newBounds);
+ }
+ });
+}
- if (segmentEndIndex === waypoints.length - 1) {
- segmentEnd = getDocking(segmentEnd, connection.target, axis);
- }
+ResizeBehavior.$inject = [
+ 'eventBus',
+ 'gridSnapping',
+ 'modeling'
+];
- if (intersection) {
- dragPosition = intersection.point;
- } else {
- // set to segment center as default
- dragPosition = {
- x: (segmentStart.x + segmentEnd.x) / 2,
- y: (segmentStart.y + segmentEnd.y) / 2
- };
- }
+(0,inherits_browser__WEBPACK_IMPORTED_MODULE_2__["default"])(ResizeBehavior, _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_0__["default"]);
- context = {
- connection: connection,
- segmentStartIndex: segmentStartIndex,
- segmentEndIndex: segmentEndIndex,
- segmentStart: segmentStart,
- segmentEnd: segmentEnd,
- axis: axis,
- dragPosition: dragPosition
- };
- dragging.init(event, dragPosition, 'connectionSegment.move', {
- cursor: axis === 'x' ? 'resize-ew' : 'resize-ns',
- data: {
- connection: connection,
- connectionGfx: gfx,
- context: context
- }
- });
- };
- /**
- * Crop connection if connection cropping is provided.
- *
- * @param {Connection} connection
- * @param {Array} newWaypoints
- *
- * @return {Array} cropped connection waypoints
- */
-
-
- function cropConnection(connection, newWaypoints) {
- // crop connection, if docking service is provided only
- if (!connectionDocking) {
- return newWaypoints;
- }
+/**
+ * Snap width and height in relation to center.
+ *
+ * @param {Shape} shape
+ * @param {Rect} newBounds
+ *
+ * @return {Rect} Snapped bounds.
+ */
+ResizeBehavior.prototype.snapSimple = function(shape, newBounds) {
+ var gridSnapping = this._gridSnapping;
- var oldWaypoints = connection.waypoints,
- croppedWaypoints; // temporary set new waypoints
+ newBounds.width = gridSnapping.snapValue(newBounds.width, {
+ min: newBounds.width
+ });
- connection.waypoints = newWaypoints;
- croppedWaypoints = connectionDocking.getCroppedWaypoints(connection); // restore old waypoints
+ newBounds.height = gridSnapping.snapValue(newBounds.height, {
+ min: newBounds.height
+ });
- connection.waypoints = oldWaypoints;
- return croppedWaypoints;
- } // DRAGGING IMPLEMENTATION
+ newBounds.x = shape.x + (shape.width / 2) - (newBounds.width / 2);
+ newBounds.y = shape.y + (shape.height / 2) - (newBounds.height / 2);
+ return newBounds;
+};
- function redrawConnection(data) {
- graphicsFactory.update('connection', data.connection, data.connectionGfx);
- }
+/**
+ * Snap x, y, width and height according to given directions.
+ *
+ * @param {Rect} newBounds
+ * @param {string} directions - Directions as {n|w|s|e}.
+ *
+ * @return {Rect} Snapped bounds.
+ */
+ResizeBehavior.prototype.snapComplex = function(newBounds, directions) {
+ if (/w|e/.test(directions)) {
+ newBounds = this.snapHorizontally(newBounds, directions);
+ }
- function updateDragger(context, segmentOffset, event) {
- var newWaypoints = context.newWaypoints,
- segmentStartIndex = context.segmentStartIndex + segmentOffset,
- segmentStart = newWaypoints[segmentStartIndex],
- segmentEndIndex = context.segmentEndIndex + segmentOffset,
- segmentEnd = newWaypoints[segmentEndIndex],
- axis = flipAxis(context.axis); // make sure the dragger does not move
- // outside the connection
+ if (/n|s/.test(directions)) {
+ newBounds = this.snapVertically(newBounds, directions);
+ }
- var draggerPosition = axisFenced(event, segmentStart, segmentEnd, axis); // update dragger
+ return newBounds;
+};
- (0, _SvgTransformUtil.translate)(context.draggerGfx, draggerPosition.x, draggerPosition.y);
- }
- /**
- * Filter waypoints for redundant ones (i.e. on the same axis).
- * Returns the filtered waypoints and the offset related to the segment move.
- *
- * @param {Array} waypoints
- * @param {Integer} segmentStartIndex of moved segment start
- *
- * @return {Object} { filteredWaypoints, segmentOffset }
- */
+/**
+ * Snap in one or both directions horizontally.
+ *
+ * @param {Rect} newBounds
+ * @param {string} directions - Directions as {n|w|s|e}.
+ *
+ * @return {Rect} Snapped bounds.
+ */
+ResizeBehavior.prototype.snapHorizontally = function(newBounds, directions) {
+ var gridSnapping = this._gridSnapping,
+ west = /w/.test(directions),
+ east = /e/.test(directions);
+ var snappedNewBounds = {};
- function filterRedundantWaypoints(waypoints, segmentStartIndex) {
- var segmentOffset = 0;
- var filteredWaypoints = waypoints.filter(function (r, idx) {
- if ((0, _Geometry.pointsOnLine)(waypoints[idx - 1], waypoints[idx + 1], r)) {
- // remove point and increment offset
- segmentOffset = idx <= segmentStartIndex ? segmentOffset - 1 : segmentOffset;
- return false;
- } // dont remove point
+ snappedNewBounds.width = gridSnapping.snapValue(newBounds.width, {
+ min: newBounds.width
+ });
+ if (east) {
- return true;
- });
- return {
- waypoints: filteredWaypoints,
- segmentOffset: segmentOffset
- };
- }
+ // handle
+ if (west) {
+ snappedNewBounds.x = gridSnapping.snapValue(newBounds.x, {
+ max: newBounds.x
+ });
- eventBus.on('connectionSegment.move.start', function (event) {
- var context = event.context,
- connection = event.connection,
- layer = canvas.getLayer('overlays');
- context.originalWaypoints = connection.waypoints.slice(); // add dragger gfx
+ snappedNewBounds.width += gridSnapping.snapValue(newBounds.x - snappedNewBounds.x, {
+ min: newBounds.x - snappedNewBounds.x
+ });
+ }
- context.draggerGfx = (0, _BendpointUtil.addSegmentDragger)(layer, context.segmentStart, context.segmentEnd);
- (0, _tinySvg.classes)(context.draggerGfx).add('djs-dragging');
- canvas.addMarker(connection, MARKER_CONNECT_UPDATING);
- });
- eventBus.on('connectionSegment.move.move', function (event) {
- var context = event.context,
- connection = context.connection,
- segmentStartIndex = context.segmentStartIndex,
- segmentEndIndex = context.segmentEndIndex,
- segmentStart = context.segmentStart,
- segmentEnd = context.segmentEnd,
- axis = context.axis;
- var newWaypoints = context.originalWaypoints.slice(),
- newSegmentStart = axisAdd(segmentStart, axis, event['d' + axis]),
- newSegmentEnd = axisAdd(segmentEnd, axis, event['d' + axis]); // original waypoint count and added / removed
- // from start waypoint delta. We use the later
- // to retrieve the updated segmentStartIndex / segmentEndIndex
-
- var waypointCount = newWaypoints.length,
- segmentOffset = 0; // move segment start / end by axis delta
-
- newWaypoints[segmentStartIndex] = newSegmentStart;
- newWaypoints[segmentEndIndex] = newSegmentEnd;
- var sourceToSegmentOrientation, targetToSegmentOrientation; // handle first segment
-
- if (segmentStartIndex < 2) {
- sourceToSegmentOrientation = (0, _LayoutUtil.getOrientation)(connection.source, newSegmentStart); // first bendpoint, remove first segment if intersecting
-
- if (segmentStartIndex === 1) {
- if (sourceToSegmentOrientation === 'intersect') {
- newWaypoints.shift();
- newWaypoints[0] = newSegmentStart;
- segmentOffset--;
- }
- } // docking point, add segment if not intersecting anymore
- else {
- if (sourceToSegmentOrientation !== 'intersect') {
- newWaypoints.unshift(segmentStart);
- segmentOffset++;
- }
- }
- } // handle last segment
+ // handle
+ else {
+ newBounds.x = newBounds.x + newBounds.width - snappedNewBounds.width;
+ }
+ }
+ // assign snapped x and width
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(newBounds, snappedNewBounds);
- if (segmentEndIndex > waypointCount - 3) {
- targetToSegmentOrientation = (0, _LayoutUtil.getOrientation)(connection.target, newSegmentEnd); // last bendpoint, remove last segment if intersecting
+ return newBounds;
+};
- if (segmentEndIndex === waypointCount - 2) {
- if (targetToSegmentOrientation === 'intersect') {
- newWaypoints.pop();
- newWaypoints[newWaypoints.length - 1] = newSegmentEnd;
- }
- } // last bendpoint, remove last segment if intersecting
- else {
- if (targetToSegmentOrientation !== 'intersect') {
- newWaypoints.push(segmentEnd);
- }
- }
- } // update connection waypoints
+/**
+ * Snap in one or both directions vertically.
+ *
+ * @param {Rect} newBounds
+ * @param {string} directions - Directions as {n|w|s|e}.
+ *
+ * @return {Rect} Snapped bounds.
+ */
+ResizeBehavior.prototype.snapVertically = function(newBounds, directions) {
+ var gridSnapping = this._gridSnapping,
+ north = /n/.test(directions),
+ south = /s/.test(directions);
+
+ var snappedNewBounds = {};
+
+ snappedNewBounds.height = gridSnapping.snapValue(newBounds.height, {
+ min: newBounds.height
+ });
+
+ if (north) {
+
+ // handle
+ if (south) {
+ snappedNewBounds.y = gridSnapping.snapValue(newBounds.y, {
+ max: newBounds.y
+ });
+
+ snappedNewBounds.height += gridSnapping.snapValue(newBounds.y - snappedNewBounds.y, {
+ min: newBounds.y - snappedNewBounds.y
+ });
+ }
+
+ // handle
+ else {
+ newBounds.y = newBounds.y + newBounds.height - snappedNewBounds.height;
+ }
+ }
+
+ // assign snapped y and height
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(newBounds, snappedNewBounds);
+
+ return newBounds;
+};
+
+/***/ }),
+
+/***/ "../node_modules/diagram-js/lib/features/grid-snapping/behavior/SpaceToolBehavior.js":
+/*!*******************************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/grid-snapping/behavior/SpaceToolBehavior.js ***!
+ \*******************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ SpaceToolBehavior)
+/* harmony export */ });
+/**
+ * @typedef {import('../../../core/EventBus').default} EventBus
+ * @typedef {import('../../grid-snapping/GridSnapping').default} GridSnapping
+ */
+var HIGH_PRIORITY = 2000;
- context.newWaypoints = connection.waypoints = cropConnection(connection, newWaypoints); // update dragger position
+/**
+ * Integrates space tool with grid snapping.
+ *
+ * @param {EventBus} eventBus
+ * @param {GridSnapping} gridSnapping
+ */
+function SpaceToolBehavior(eventBus, gridSnapping) {
+ eventBus.on([
+ 'spaceTool.move',
+ 'spaceTool.end'
+ ], HIGH_PRIORITY, function(event) {
+ var context = event.context;
- updateDragger(context, segmentOffset, event); // save segmentOffset in context
+ if (!context.initialized) {
+ return;
+ }
- context.newSegmentStartIndex = segmentStartIndex + segmentOffset; // redraw connection
+ var axis = context.axis;
- redrawConnection(event);
- });
- eventBus.on('connectionSegment.move.hover', function (event) {
- event.context.hover = event.hover;
- canvas.addMarker(event.hover, MARKER_CONNECT_HOVER);
- });
- eventBus.on(['connectionSegment.move.out', 'connectionSegment.move.cleanup'], function (event) {
- // remove connect marker
- // if it was added
- var hover = event.context.hover;
+ var snapped;
- if (hover) {
- canvas.removeMarker(hover, MARKER_CONNECT_HOVER);
- }
- });
- eventBus.on('connectionSegment.move.cleanup', function (event) {
- var context = event.context,
- connection = context.connection; // remove dragger gfx
+ if (axis === 'x') {
- if (context.draggerGfx) {
- (0, _tinySvg.remove)(context.draggerGfx);
- }
+ // snap delta x to multiple of 10
+ snapped = gridSnapping.snapValue(event.dx);
- canvas.removeMarker(connection, MARKER_CONNECT_UPDATING);
- });
- eventBus.on(['connectionSegment.move.cancel', 'connectionSegment.move.end'], function (event) {
- var context = event.context,
- connection = context.connection;
- connection.waypoints = context.originalWaypoints;
- redrawConnection(event);
- });
- eventBus.on('connectionSegment.move.end', function (event) {
- var context = event.context,
- connection = context.connection,
- newWaypoints = context.newWaypoints,
- newSegmentStartIndex = context.newSegmentStartIndex; // ensure we have actual pixel values bendpoint
- // coordinates (important when zoom level was > 1 during move)
-
- newWaypoints = newWaypoints.map(function (p) {
- return {
- original: p.original,
- x: Math.round(p.x),
- y: Math.round(p.y)
- };
- }); // apply filter redunant waypoints
-
- var filtered = filterRedundantWaypoints(newWaypoints, newSegmentStartIndex); // get filtered waypoints
-
- var filteredWaypoints = filtered.waypoints,
- croppedWaypoints = cropConnection(connection, filteredWaypoints),
- segmentOffset = filtered.segmentOffset;
- var hints = {
- segmentMove: {
- segmentStartIndex: context.segmentStartIndex,
- newSegmentStartIndex: newSegmentStartIndex + segmentOffset
- }
- };
- modeling.updateWaypoints(connection, croppedWaypoints, hints);
- });
- }
+ event.x = event.x + snapped - event.dx;
+ event.dx = snapped;
+ } else {
- ConnectionSegmentMove.$inject = ['injector', 'eventBus', 'canvas', 'dragging', 'graphicsFactory', 'modeling'];
+ // snap delta y to multiple of 10
+ snapped = gridSnapping.snapValue(event.dy);
- },{"../../layout/LayoutUtil":405,"../../util/Geometry":423,"../../util/SvgTransformUtil":433,"./BendpointUtil":278,"tiny-svg":658}],281:[function(require,module,exports){
- "use strict";
+ event.y = event.y + snapped - event.dy;
+ event.dy = snapped;
+ }
+ });
+}
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+SpaceToolBehavior.$inject = [
+ 'eventBus',
+ 'gridSnapping'
+];
- var _dragging = _interopRequireDefault(require("../dragging"));
+/***/ }),
- var _rules = _interopRequireDefault(require("../rules"));
+/***/ "../node_modules/diagram-js/lib/features/grid-snapping/behavior/index.js":
+/*!*******************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/grid-snapping/behavior/index.js ***!
+ \*******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var _Bendpoints = _interopRequireDefault(require("./Bendpoints"));
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _ResizeBehavior__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ResizeBehavior */ "../node_modules/diagram-js/lib/features/grid-snapping/behavior/ResizeBehavior.js");
+/* harmony import */ var _SpaceToolBehavior__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SpaceToolBehavior */ "../node_modules/diagram-js/lib/features/grid-snapping/behavior/SpaceToolBehavior.js");
- var _BendpointMove = _interopRequireDefault(require("./BendpointMove"));
- var _BendpointMovePreview = _interopRequireDefault(require("./BendpointMovePreview"));
- var _ConnectionSegmentMove = _interopRequireDefault(require("./ConnectionSegmentMove"));
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __init__: [
+ 'gridSnappingResizeBehavior',
+ 'gridSnappingSpaceToolBehavior'
+ ],
+ gridSnappingResizeBehavior: [ 'type', _ResizeBehavior__WEBPACK_IMPORTED_MODULE_0__["default"] ],
+ gridSnappingSpaceToolBehavior: [ 'type', _SpaceToolBehavior__WEBPACK_IMPORTED_MODULE_1__["default"] ]
+});
- var _BendpointSnapping = _interopRequireDefault(require("./BendpointSnapping"));
+/***/ }),
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+/***/ "../node_modules/diagram-js/lib/features/grid-snapping/index.js":
+/*!**********************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/grid-snapping/index.js ***!
+ \**********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var _default = {
- __depends__: [_dragging.default, _rules.default],
- __init__: ['bendpoints', 'bendpointSnapping', 'bendpointMovePreview'],
- bendpoints: ['type', _Bendpoints.default],
- bendpointMove: ['type', _BendpointMove.default],
- bendpointMovePreview: ['type', _BendpointMovePreview.default],
- connectionSegmentMove: ['type', _ConnectionSegmentMove.default],
- bendpointSnapping: ['type', _BendpointSnapping.default]
- };
- exports.default = _default;
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _GridSnapping__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GridSnapping */ "../node_modules/diagram-js/lib/features/grid-snapping/GridSnapping.js");
+/* harmony import */ var _behavior__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./behavior */ "../node_modules/diagram-js/lib/features/grid-snapping/behavior/index.js");
- },{"../dragging":302,"../rules":377,"./BendpointMove":275,"./BendpointMovePreview":276,"./BendpointSnapping":277,"./Bendpoints":279,"./ConnectionSegmentMove":280}],282:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = ChangeSupport;
- var _Elements = require("../../util/Elements");
- /**
- * Adds change support to the diagram, including
- *
- *
- * redrawing shapes and connections on change
- *
- *
- * @param {EventBus} eventBus
- * @param {Canvas} canvas
- * @param {ElementRegistry} elementRegistry
- * @param {GraphicsFactory} graphicsFactory
- */
- function ChangeSupport(eventBus, canvas, elementRegistry, graphicsFactory) {
- // redraw shapes / connections on change
- eventBus.on('element.changed', function (event) {
- var element = event.element; // element might have been deleted and replaced by new element with same ID
- // thus check for parent of element except for root element
- if (element.parent || element === canvas.getRootElement()) {
- event.gfx = elementRegistry.getGraphics(element);
- } // shape + gfx may have been deleted
+/**
+ * @type { import('didi').ModuleDeclaration }
+ */
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [ _behavior__WEBPACK_IMPORTED_MODULE_0__["default"] ],
+ __init__: [ 'gridSnapping' ],
+ gridSnapping: [ 'type', _GridSnapping__WEBPACK_IMPORTED_MODULE_1__["default"] ]
+});
+/***/ }),
- if (!event.gfx) {
- return;
- }
+/***/ "../node_modules/diagram-js/lib/features/hand-tool/HandTool.js":
+/*!*********************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/hand-tool/HandTool.js ***!
+ \*********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- eventBus.fire((0, _Elements.getType)(element) + '.changed', event);
- });
- eventBus.on('elements.changed', function (event) {
- var elements = event.elements;
- elements.forEach(function (e) {
- eventBus.fire('element.changed', {
- element: e
- });
- });
- graphicsFactory.updateContainments(elements);
- });
- eventBus.on('shape.changed', function (event) {
- graphicsFactory.update('shape', event.element, event.gfx);
- });
- eventBus.on('connection.changed', function (event) {
- graphicsFactory.update('connection', event.element, event.gfx);
- });
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ HandTool)
+/* harmony export */ });
+/* harmony import */ var _util_Mouse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/Mouse */ "../node_modules/diagram-js/lib/util/Mouse.js");
+/* harmony import */ var _features_keyboard_KeyboardUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../features/keyboard/KeyboardUtil */ "../node_modules/diagram-js/lib/features/keyboard/KeyboardUtil.js");
- ChangeSupport.$inject = ['eventBus', 'canvas', 'elementRegistry', 'graphicsFactory'];
- },{"../../util/Elements":420}],283:[function(require,module,exports){
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _ChangeSupport = _interopRequireDefault(require("./ChangeSupport"));
+/**
+ * @typedef {import('didi').Injector} Injector
+ *
+ * @typedef {import('../../core/Canvas').default} Canvas
+ * @typedef {import('../dragging/Dragging').default} Dragging
+ * @typedef {import('../../core/EventBus').default} EventBus
+ * @typedef {import('../mouse/Mouse').default} Mouse
+ * @typedef {import('../tool-manager/ToolManager').default} ToolManager
+ */
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var HIGH_PRIORITY = 1500;
+var HAND_CURSOR = 'grab';
- var _default = {
- __init__: ['changeSupport'],
- changeSupport: ['type', _ChangeSupport.default]
- };
- exports.default = _default;
+/**
+ * @param {EventBus} eventBus
+ * @param {Canvas} canvas
+ * @param {Dragging} dragging
+ * @param {Injector} injector
+ * @param {ToolManager} toolManager
+ * @param {Mouse} mouse
+ */
+function HandTool(
+ eventBus, canvas, dragging,
+ injector, toolManager, mouse) {
- },{"./ChangeSupport":282}],284:[function(require,module,exports){
- "use strict";
+ this._dragging = dragging;
+ this._mouse = mouse;
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = Clipboard;
+ var self = this,
+ keyboard = injector.get('keyboard', false);
- /**
- * A clip board stub
- */
- function Clipboard() {}
+ toolManager.registerTool('hand', {
+ tool: 'hand',
+ dragging: 'hand.move'
+ });
- Clipboard.prototype.get = function () {
- return this._data;
- };
+ eventBus.on('element.mousedown', HIGH_PRIORITY, function(event) {
- Clipboard.prototype.set = function (data) {
- this._data = data;
- };
+ if (!(0,_util_Mouse__WEBPACK_IMPORTED_MODULE_0__.hasPrimaryModifier)(event)) {
+ return;
+ }
+
+ self.activateMove(event.originalEvent, true);
+
+ return false;
+ });
+
+ keyboard && keyboard.addListener(HIGH_PRIORITY, function(e) {
+ if (!isSpace(e.keyEvent) || self.isActive()) {
+ return;
+ }
- Clipboard.prototype.clear = function () {
- var data = this._data;
- delete this._data;
- return data;
- };
+ var mouseEvent = self._mouse.getLastMoveEvent();
+
+ self.activateMove(mouseEvent, !!mouseEvent);
+ }, 'keyboard.keydown');
+
+ keyboard && keyboard.addListener(HIGH_PRIORITY, function(e) {
+ if (!isSpace(e.keyEvent) || !self.isActive()) {
+ return;
+ }
- Clipboard.prototype.isEmpty = function () {
- return !this._data;
- };
+ self.toggle();
+ }, 'keyboard.keyup');
- },{}],285:[function(require,module,exports){
- "use strict";
+ eventBus.on('hand.end', function(event) {
+ var target = event.originalEvent.target;
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+ // only reactive on diagram click
+ // on some occasions, event.hover is not set and we have to check if the target is an svg
+ if (!event.hover && !(target instanceof SVGElement)) {
+ return false;
+ }
- var _Clipboard = _interopRequireDefault(require("./Clipboard"));
+ eventBus.once('hand.ended', function() {
+ self.activateMove(event.originalEvent, { reactivate: true });
+ });
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ });
- var _default = {
- clipboard: ['type', _Clipboard.default]
- };
- exports.default = _default;
+ eventBus.on('hand.move.move', function(event) {
+ var scale = canvas.viewbox().scale;
- },{"./Clipboard":284}],286:[function(require,module,exports){
- "use strict";
+ canvas.scroll({
+ dx: event.dx * scale,
+ dy: event.dy * scale
+ });
+ });
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = Connect;
- exports.isReverse = isReverse;
+ eventBus.on('hand.move.end', function(event) {
+ var context = event.context,
+ reactivate = context.reactivate;
- var _LayoutUtil = require("../../layout/LayoutUtil");
+ // Don't reactivate if the user is using the keyboard keybinding
+ if (!(0,_util_Mouse__WEBPACK_IMPORTED_MODULE_0__.hasPrimaryModifier)(event) && reactivate) {
- var _minDash = require("min-dash");
+ eventBus.once('hand.move.ended', function(event) {
+ self.activateHand(event.originalEvent, true, true);
+ });
- function Connect(eventBus, dragging, modeling, rules) {
- // rules
- function canConnect(source, target) {
- return rules.allowed('connection.create', {
- source: source,
- target: target
- });
- }
+ }
- function canConnectReverse(source, target) {
- return canConnect(target, source);
- } // event handlers
+ return false;
+ });
+}
- eventBus.on('connect.hover', function (event) {
- var context = event.context,
- start = context.start,
- hover = event.hover,
- canExecute; // cache hover state
+HandTool.$inject = [
+ 'eventBus',
+ 'canvas',
+ 'dragging',
+ 'injector',
+ 'toolManager',
+ 'mouse'
+];
- context.hover = hover;
- canExecute = context.canExecute = canConnect(start, hover); // ignore hover
- if ((0, _minDash.isNil)(canExecute)) {
- return;
- }
+HandTool.prototype.activateMove = function(event, autoActivate, context) {
+ if (typeof autoActivate === 'object') {
+ context = autoActivate;
+ autoActivate = false;
+ }
- if (canExecute !== false) {
- context.source = start;
- context.target = hover;
- return;
- }
+ this._dragging.init(event, 'hand.move', {
+ autoActivate: autoActivate,
+ cursor: HAND_CURSOR,
+ data: {
+ context: context || {}
+ }
+ });
+};
- canExecute = context.canExecute = canConnectReverse(start, hover); // ignore hover
+HandTool.prototype.activateHand = function(event, autoActivate, reactivate) {
+ this._dragging.init(event, 'hand', {
+ trapClick: false,
+ autoActivate: autoActivate,
+ cursor: HAND_CURSOR,
+ data: {
+ context: {
+ reactivate: reactivate
+ }
+ }
+ });
+};
- if ((0, _minDash.isNil)(canExecute)) {
- return;
- }
+HandTool.prototype.toggle = function() {
+ if (this.isActive()) {
+ return this._dragging.cancel();
+ }
- if (canExecute !== false) {
- context.source = hover;
- context.target = start;
- }
- });
- eventBus.on(['connect.out', 'connect.cleanup'], function (event) {
- var context = event.context;
- context.hover = null;
- context.source = null;
- context.target = null;
- context.canExecute = false;
- });
- eventBus.on('connect.end', function (event) {
- var context = event.context,
- canExecute = context.canExecute,
- connectionStart = context.connectionStart,
- connectionEnd = {
- x: event.x,
- y: event.y
- },
- source = context.source,
- target = context.target;
+ var mouseEvent = this._mouse.getLastMoveEvent();
- if (!canExecute) {
- return false;
- }
+ this.activateHand(mouseEvent, !!mouseEvent);
+};
- var attrs = null,
- hints = {
- connectionStart: isReverse(context) ? connectionEnd : connectionStart,
- connectionEnd: isReverse(context) ? connectionStart : connectionEnd
- };
+HandTool.prototype.isActive = function() {
+ var context = this._dragging.context();
- if ((0, _minDash.isObject)(canExecute)) {
- attrs = canExecute;
- }
+ if (context) {
+ return /^(hand|hand\.move)$/.test(context.prefix);
+ }
- modeling.connect(source, target, attrs, hints);
- }); // API
-
- /**
- * Start connect operation.
- *
- * @param {DOMEvent} event
- * @param {djs.model.Base} start
- * @param {Point} [connectionStart]
- * @param {boolean} [autoActivate=false]
- */
-
- this.start = function (event, start, connectionStart, autoActivate) {
- if (!(0, _minDash.isObject)(connectionStart)) {
- autoActivate = connectionStart;
- connectionStart = (0, _LayoutUtil.getMid)(start);
- }
+ return false;
+};
- dragging.init(event, 'connect', {
- autoActivate: autoActivate,
- data: {
- shape: start,
- context: {
- start: start,
- connectionStart: connectionStart
- }
- }
- });
- };
- }
+// helpers //////////
- Connect.$inject = ['eventBus', 'dragging', 'modeling', 'rules']; // helpers //////////
+function isSpace(keyEvent) {
+ return (0,_features_keyboard_KeyboardUtil__WEBPACK_IMPORTED_MODULE_1__.isKey)('Space', keyEvent);
+}
- function isReverse(context) {
- var hover = context.hover,
- source = context.source,
- target = context.target;
- return hover && source && hover === source && source !== target;
- }
+/***/ }),
- },{"../../layout/LayoutUtil":405,"min-dash":646}],287:[function(require,module,exports){
- "use strict";
+/***/ "../node_modules/diagram-js/lib/features/hand-tool/index.js":
+/*!******************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/hand-tool/index.js ***!
+ \******************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = ConnectPreview;
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _tool_manager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../tool-manager */ "../node_modules/diagram-js/lib/features/tool-manager/index.js");
+/* harmony import */ var _mouse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../mouse */ "../node_modules/diagram-js/lib/features/mouse/index.js");
+/* harmony import */ var _HandTool__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./HandTool */ "../node_modules/diagram-js/lib/features/hand-tool/HandTool.js");
- var _Connect = require("./Connect");
- var HIGH_PRIORITY = 1100,
- LOW_PRIORITY = 900;
- var MARKER_OK = 'connect-ok',
- MARKER_NOT_OK = 'connect-not-ok';
- /**
- * Shows connection preview during connect.
- *
- * @param {didi.Injector} injector
- * @param {EventBus} eventBus
- * @param {Canvas} canvas
- */
- function ConnectPreview(injector, eventBus, canvas) {
- var connectionPreview = injector.get('connectionPreview', false);
- connectionPreview && eventBus.on('connect.move', function (event) {
- var context = event.context,
- canConnect = context.canExecute,
- hover = context.hover,
- source = context.source,
- start = context.start,
- startPosition = context.startPosition,
- connectionStart = context.connectionStart,
- connectionEnd = context.connectionEnd,
- target = context.target;
-
- if (!connectionStart) {
- connectionStart = (0, _Connect.isReverse)(context) ? {
- x: event.x,
- y: event.y
- } : startPosition;
- }
- if (!connectionEnd) {
- connectionEnd = (0, _Connect.isReverse)(context) ? startPosition : {
- x: event.x,
- y: event.y
- };
- }
- connectionPreview.drawPreview(context, canConnect, {
- source: source || start,
- target: target || hover,
- connectionStart: connectionStart,
- connectionEnd: connectionEnd
- });
- });
- eventBus.on('connect.hover', LOW_PRIORITY, function (event) {
- var context = event.context,
- hover = event.hover,
- canExecute = context.canExecute; // ignore hover
- if (canExecute === null) {
- return;
- }
+/**
+ * @type { import('didi').ModuleDeclaration }
+ */
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __depends__: [
+ _tool_manager__WEBPACK_IMPORTED_MODULE_0__["default"],
+ _mouse__WEBPACK_IMPORTED_MODULE_1__["default"]
+ ],
+ __init__: [ 'handTool' ],
+ handTool: [ 'type', _HandTool__WEBPACK_IMPORTED_MODULE_2__["default"] ]
+});
- canvas.addMarker(hover, canExecute ? MARKER_OK : MARKER_NOT_OK);
- });
- eventBus.on(['connect.out', 'connect.cleanup'], HIGH_PRIORITY, function (event) {
- var hover = event.hover;
- if (hover) {
- canvas.removeMarker(hover, MARKER_OK);
- canvas.removeMarker(hover, MARKER_NOT_OK);
- }
- });
- connectionPreview && eventBus.on('connect.cleanup', function (event) {
- connectionPreview.cleanUp(event.context);
- });
- }
+/***/ }),
- ConnectPreview.$inject = ['injector', 'eventBus', 'canvas'];
+/***/ "../node_modules/diagram-js/lib/features/hover-fix/HoverFix.js":
+/*!*********************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/hover-fix/HoverFix.js ***!
+ \*********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- },{"./Connect":286}],288:[function(require,module,exports){
- "use strict";
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ HoverFix)
+/* harmony export */ });
+/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dom */ "../node_modules/min-dom/dist/index.esm.js");
+/* harmony import */ var _util_Event__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/Event */ "../node_modules/diagram-js/lib/util/Event.js");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _selection = _interopRequireDefault(require("../selection"));
- var _rules = _interopRequireDefault(require("../rules"));
- var _dragging = _interopRequireDefault(require("../dragging"));
+/**
+ * @typedef {import('didi').Injector} Injector
+ *
+ * @typedef {import('../../core/ElementRegistry').default} ElementRegistry
+ * @typedef {import('../../core/EventBus').default} EventBus
+ */
- var _Connect = _interopRequireDefault(require("./Connect"));
+var HIGH_PRIORITY = 1500;
- var _ConnectPreview = _interopRequireDefault(require("./ConnectPreview"));
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+/**
+ * Browsers may swallow certain events (hover, out ...) if users are to
+ * fast with the mouse.
+ *
+ * @see http://stackoverflow.com/questions/7448468/why-cant-i-reliably-capture-a-mouseout-event
+ *
+ * The fix implemented in this component ensure that we
+ *
+ * 1) have a hover state after a successful drag.move event
+ * 2) have an out event when dragging leaves an element
+ *
+ * @param {ElementRegistry} elementRegistry
+ * @param {EventBus} eventBus
+ * @param {Injector} injector
+ */
+function HoverFix(elementRegistry, eventBus, injector) {
- var _default = {
- __depends__: [_selection.default, _rules.default, _dragging.default],
- __init__: ['connectPreview'],
- connect: ['type', _Connect.default],
- connectPreview: ['type', _ConnectPreview.default]
- };
- exports.default = _default;
+ var self = this;
- },{"../dragging":302,"../rules":377,"../selection":383,"./Connect":286,"./ConnectPreview":287}],289:[function(require,module,exports){
- "use strict";
+ var dragging = injector.get('dragging', false);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = ConnectionPreview;
+ /**
+ * Make sure we are god damn hovering!
+ *
+ * @param {Event} dragging event
+ */
+ function ensureHover(event) {
- var _tinySvg = require("tiny-svg");
+ if (event.hover) {
+ return;
+ }
- var _minDash = require("min-dash");
+ var originalEvent = event.originalEvent;
- var _LayoutUtil = require("../../layout/LayoutUtil");
+ var gfx = self._findTargetGfx(originalEvent);
- var MARKER_CONNECTION_PREVIEW = 'djs-connection-preview';
- /**
- * Draws connection preview. Optionally, this can use layouter and connection docking to draw
- * better looking previews.
- *
- * @param {didi.Injector} injector
- * @param {Canvas} canvas
- * @param {GraphicsFactory} graphicsFactory
- * @param {ElementFactory} elementFactory
- */
+ var element = gfx && elementRegistry.get(gfx);
- function ConnectionPreview(injector, canvas, graphicsFactory, elementFactory) {
- this._canvas = canvas;
- this._graphicsFactory = graphicsFactory;
- this._elementFactory = elementFactory; // optional components
+ if (gfx && element) {
- this._connectionDocking = injector.get('connectionDocking', false);
- this._layouter = injector.get('layouter', false);
- }
+ // 1) cancel current mousemove
+ event.stopPropagation();
- ConnectionPreview.$inject = ['injector', 'canvas', 'graphicsFactory', 'elementFactory'];
- /**
- * Draw connection preview.
- *
- * Provide at least one of and to create a preview.
- * In the clean up stage, call `connectionPreview#cleanUp` with the context to remove preview.
- *
- * @param {Object} context
- * @param {Object|boolean} canConnect
- * @param {Object} hints
- * @param {djs.model.shape} [hints.source] source element
- * @param {djs.model.shape} [hints.target] target element
- * @param {Point} [hints.connectionStart] connection preview start
- * @param {Point} [hints.connectionEnd] connection preview end
- * @param {Array} [hints.waypoints] provided waypoints for preview
- * @param {boolean} [hints.noLayout] true if preview should not be laid out
- * @param {boolean} [hints.noCropping] true if preview should not be cropped
- * @param {boolean} [hints.noNoop] true if simple connection should not be drawn
- */
+ // 2) emit fake hover for new target
+ dragging.hover({ element: element, gfx: gfx });
- ConnectionPreview.prototype.drawPreview = function (context, canConnect, hints) {
- hints = hints || {};
- var connectionPreviewGfx = context.connectionPreviewGfx,
- getConnection = context.getConnection,
- source = hints.source,
- target = hints.target,
- waypoints = hints.waypoints,
- connectionStart = hints.connectionStart,
- connectionEnd = hints.connectionEnd,
- noLayout = hints.noLayout,
- noCropping = hints.noCropping,
- noNoop = hints.noNoop,
- connection;
- var self = this;
-
- if (!connectionPreviewGfx) {
- connectionPreviewGfx = context.connectionPreviewGfx = this.createConnectionPreviewGfx();
- }
-
- (0, _tinySvg.clear)(connectionPreviewGfx);
-
- if (!getConnection) {
- getConnection = context.getConnection = cacheReturnValues(function (canConnect, source, target) {
- return self.getConnection(canConnect, source, target);
- });
- }
+ // 3) re-trigger move event
+ dragging.move(originalEvent);
+ }
+ }
- if (canConnect) {
- connection = getConnection(canConnect, source, target);
- }
- if (!connection) {
- !noNoop && this.drawNoopPreview(connectionPreviewGfx, hints);
- return;
- }
+ if (dragging) {
- connection.waypoints = waypoints || []; // optional layout
+ /**
+ * We wait for a specific sequence of events before
+ * emitting a fake drag.hover event.
+ *
+ * Event Sequence:
+ *
+ * drag.start
+ * drag.move >> ensure we are hovering
+ */
+ eventBus.on('drag.start', function(event) {
- if (this._layouter && !noLayout) {
- connection.waypoints = this._layouter.layoutConnection(connection, {
- source: source,
- target: target,
- connectionStart: connectionStart,
- connectionEnd: connectionEnd,
- waypoints: hints.waypoints || connection.waypoints
- });
- } // fallback if no waypoints were provided nor created with layouter
+ eventBus.once('drag.move', HIGH_PRIORITY, function(event) {
+ ensureHover(event);
- if (!connection.waypoints || !connection.waypoints.length) {
- connection.waypoints = [source ? (0, _LayoutUtil.getMid)(source) : connectionStart, target ? (0, _LayoutUtil.getMid)(target) : connectionEnd];
- } // optional cropping
+ });
+ });
+ }
- if (this._connectionDocking && (source || target) && !noCropping) {
- connection.waypoints = this._connectionDocking.getCroppedWaypoints(connection, source, target);
- }
- this._graphicsFactory.drawConnection(connectionPreviewGfx, connection);
- };
- /**
- * Draw simple connection between source and target or provided points.
- *
- * @param {SVGElement} connectionPreviewGfx container for the connection
- * @param {Object} hints
- * @param {djs.model.shape} [hints.source] source element
- * @param {djs.model.shape} [hints.target] target element
- * @param {Point} [hints.connectionStart] required if source is not provided
- * @param {Point} [hints.connectionEnd] required if target is not provided
- */
+ /**
+ * We make sure that element.out is always fired, even if the
+ * browser swallows an element.out event.
+ *
+ * Event sequence:
+ *
+ * element.hover
+ * (element.out >> sometimes swallowed)
+ * element.hover >> ensure we fired element.out
+ */
+ (function() {
+ var hoverGfx;
+ var hover;
+ eventBus.on('element.hover', function(event) {
- ConnectionPreview.prototype.drawNoopPreview = function (connectionPreviewGfx, hints) {
- var source = hints.source,
- target = hints.target,
- start = hints.connectionStart || (0, _LayoutUtil.getMid)(source),
- end = hints.connectionEnd || (0, _LayoutUtil.getMid)(target);
- var waypoints = this.cropWaypoints(start, end, source, target);
- var connection = this.createNoopConnection(waypoints[0], waypoints[1]);
- (0, _tinySvg.append)(connectionPreviewGfx, connection);
- };
- /**
- * Return cropped waypoints.
- *
- * @param {Point} start
- * @param {Point} end
- * @param {djs.model.shape} source
- * @param {djs.model.shape} target
- *
- * @returns {Array}
- */
+ // (1) remember current hover element
+ hoverGfx = event.gfx;
+ hover = event.element;
+ });
+ eventBus.on('element.hover', HIGH_PRIORITY, function(event) {
- ConnectionPreview.prototype.cropWaypoints = function (start, end, source, target) {
- var graphicsFactory = this._graphicsFactory,
- sourcePath = source && graphicsFactory.getShapePath(source),
- targetPath = target && graphicsFactory.getShapePath(target),
- connectionPath = graphicsFactory.getConnectionPath({
- waypoints: [start, end]
- });
- start = source && (0, _LayoutUtil.getElementLineIntersection)(sourcePath, connectionPath, true) || start;
- end = target && (0, _LayoutUtil.getElementLineIntersection)(targetPath, connectionPath, false) || end;
- return [start, end];
- };
- /**
- * Remove connection preview container if it exists.
- *
- * @param {Object} [context]
- * @param {SVGElement} [context.connectionPreviewGfx] preview container
- */
+ // (3) am I on an element still?
+ if (hover) {
+ // (4) that is a problem, gotta "simulate the out"
+ eventBus.fire('element.out', {
+ element: hover,
+ gfx: hoverGfx
+ });
+ }
- ConnectionPreview.prototype.cleanUp = function (context) {
- if (context && context.connectionPreviewGfx) {
- (0, _tinySvg.remove)(context.connectionPreviewGfx);
- }
- };
- /**
- * Get connection that connects source and target.
- *
- * @param {Object|boolean} canConnect
- *
- * @returns {djs.model.connection}
- */
+ });
+ eventBus.on('element.out', function() {
- ConnectionPreview.prototype.getConnection = function (canConnect) {
- var attrs = ensureConnectionAttrs(canConnect);
- return this._elementFactory.createConnection(attrs);
- };
- /**
- * Add and return preview graphics.
- *
- * @returns {SVGElement}
- */
+ // (2) unset hover state if we correctly outed us *GG*
+ hoverGfx = null;
+ hover = null;
+ });
+ })();
- ConnectionPreview.prototype.createConnectionPreviewGfx = function () {
- var gfx = (0, _tinySvg.create)('g');
- (0, _tinySvg.attr)(gfx, {
- pointerEvents: 'none'
- });
- (0, _tinySvg.classes)(gfx).add(MARKER_CONNECTION_PREVIEW);
- (0, _tinySvg.append)(this._canvas.getDefaultLayer(), gfx);
- return gfx;
- };
- /**
- * Create and return simple connection.
- *
- * @param {Point} start
- * @param {Point} end
- *
- * @returns {SVGElement}
- */
+ this._findTargetGfx = function(event) {
+ var position,
+ target;
+ if (!(event instanceof MouseEvent)) {
+ return;
+ }
- ConnectionPreview.prototype.createNoopConnection = function (start, end) {
- var connection = (0, _tinySvg.create)('polyline');
- (0, _tinySvg.attr)(connection, {
- 'stroke': '#333',
- 'strokeDasharray': [1],
- 'strokeWidth': 2,
- 'pointer-events': 'none'
- });
- (0, _tinySvg.attr)(connection, {
- 'points': [start.x, start.y, end.x, end.y]
- });
- return connection;
- }; // helpers //////////
+ position = (0,_util_Event__WEBPACK_IMPORTED_MODULE_0__.toPoint)(event);
- /**
- * Returns function that returns cached return values referenced by stringified first argument.
- *
- * @param {Function} fn
- *
- * @return {Function}
- */
+ // damn expensive operation, ouch!
+ target = document.elementFromPoint(position.x, position.y);
+ return getGfx(target);
+ };
- function cacheReturnValues(fn) {
- var returnValues = {};
- /**
- * Return cached return value referenced by stringified first argument.
- *
- * @returns {*}
- */
+}
- return function (firstArgument) {
- var key = JSON.stringify(firstArgument);
- var returnValue = returnValues[key];
+HoverFix.$inject = [
+ 'elementRegistry',
+ 'eventBus',
+ 'injector'
+];
- if (!returnValue) {
- returnValue = returnValues[key] = fn.apply(null, arguments);
- }
- return returnValue;
- };
- }
- /**
- * Ensure connection attributes is object.
- *
- * @param {Object|boolean} canConnect
- *
- * @returns {Object}
- */
+// helpers /////////////////////
+function getGfx(target) {
+ return (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.closest)(target, 'svg, .djs-element', true);
+}
- function ensureConnectionAttrs(canConnect) {
- if ((0, _minDash.isObject)(canConnect)) {
- return canConnect;
- } else {
- return {};
- }
- }
+/***/ }),
- },{"../../layout/LayoutUtil":405,"min-dash":646,"tiny-svg":658}],290:[function(require,module,exports){
- "use strict";
+/***/ "../node_modules/diagram-js/lib/features/hover-fix/index.js":
+/*!******************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/hover-fix/index.js ***!
+ \******************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _HoverFix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./HoverFix */ "../node_modules/diagram-js/lib/features/hover-fix/HoverFix.js");
- var _ConnectionPreview = _interopRequireDefault(require("./ConnectionPreview"));
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var _default = {
- __init__: ['connectionPreview'],
- connectionPreview: ['type', _ConnectionPreview.default]
- };
- exports.default = _default;
+/**
+ * @type { import('didi').ModuleDeclaration }
+ */
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
+ __init__: [
+ 'hoverFix'
+ ],
+ hoverFix: [ 'type', _HoverFix__WEBPACK_IMPORTED_MODULE_0__["default"] ],
+});
- },{"./ConnectionPreview":289}],291:[function(require,module,exports){
- "use strict";
+/***/ }),
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = ContextPad;
+/***/ "../node_modules/diagram-js/lib/features/interaction-events/InteractionEvents.js":
+/*!***************************************************************************************!*\
+ !*** ../node_modules/diagram-js/lib/features/interaction-events/InteractionEvents.js ***!
+ \***************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- var _minDash = require("min-dash");
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ InteractionEvents)
+/* harmony export */ });
+/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ "../node_modules/min-dash/dist/index.esm.js");
+/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dom */ "../node_modules/min-dom/dist/index.esm.js");
+/* harmony import */ var _util_Mouse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/Mouse */ "../node_modules/diagram-js/lib/util/Mouse.js");
+/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tiny-svg */ "../node_modules/tiny-svg/dist/index.esm.js");
+/* harmony import */ var _util_RenderUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/RenderUtil */ "../node_modules/diagram-js/lib/util/RenderUtil.js");
- var _minDom = require("min-dom");
- var entrySelector = '.entry';
- var DEFAULT_PRIORITY = 1000;
- /**
- * A context pad that displays element specific, contextual actions next
- * to a diagram element.
- *
- * @param {Object} config
- * @param {boolean|Object} [config.scale={ min: 1.0, max: 1.5 }]
- * @param {number} [config.scale.min]
- * @param {number} [config.scale.max]
- * @param {EventBus} eventBus
- * @param {Overlays} overlays
- */
- function ContextPad(config, eventBus, overlays) {
- this._eventBus = eventBus;
- this._overlays = overlays;
- var scale = (0, _minDash.isDefined)(config && config.scale) ? config.scale : {
- min: 1,
- max: 1.5
- };
- this._overlaysConfig = {
- position: {
- right: -9,
- top: -6
- },
- scale: scale
- };
- this._current = null;
- this._init();
- }
- ContextPad.$inject = ['config.contextPad', 'eventBus', 'overlays'];
- /**
- * Registers events needed for interaction with other components
- */
- ContextPad.prototype._init = function () {
- var eventBus = this._eventBus;
- var self = this;
- eventBus.on('selection.changed', function (e) {
- var selection = e.newSelection;
- if (selection.length === 1) {
- self.open(selection[0]);
- } else {
- self.close();
- }
- });
- eventBus.on('elements.delete', function (event) {
- var elements = event.elements;
- (0, _minDash.forEach)(elements, function (e) {
- if (self.isOpen(e)) {
- self.close();
- }
- });
- });
- eventBus.on('element.changed', function (event) {
- var element = event.element,
- current = self._current; // force reopen if element for which we are currently opened changed
- if (current && current.element === element) {
- self.open(element, true);
- }
- });
- };
- /**
- * Register a provider with the context pad
- *
- * @param {number} [priority=1000]
- * @param {ContextPadProvider} provider
- *
- * @example
- * const contextPadProvider = {
- * getContextPadEntries: function(element) {
- * return function(entries) {
- * return {
- * ...entries,
- * 'entry-1': {
- * label: 'My Entry',
- * action: function() { alert("I have been clicked!"); }
- * }
- * };
- * }
- * }
- * };
- *
- * contextPad.registerProvider(800, contextPadProvider);
- */
- ContextPad.prototype.registerProvider = function (priority, provider) {
- if (!provider) {
- provider = priority;
- priority = DEFAULT_PRIORITY;
- }
+/**
+ * @typedef {import('../../model/Types').Element} Element
+ *
+ * @typedef {import('../../core/ElementRegistry').default} ElementRegistry
+ * @typedef {import('../../core/EventBus').default} EventBus
+ * @typedef {import('../../draw/Styles').default} Styles
+ *
+ * @typedef {import('../../util/Types').Point} Point
+ */
- this._eventBus.on('contextPad.getProviders', priority, function (event) {
- event.providers.push(provider);
- });
- };
- /**
- * Returns the context pad entries for a given element
- *
- * @param {djs.element.Base} element
- *
- * @return {Array} list of entries
- */
+function allowAll(event) { return true; }
+function allowPrimaryAndAuxiliary(event) {
+ return (0,_util_Mouse__WEBPACK_IMPORTED_MODULE_0__.isPrimaryButton)(event) || (0,_util_Mouse__WEBPACK_IMPORTED_MODULE_0__.isAuxiliaryButton)(event);
+}
- ContextPad.prototype.getEntries = function (element) {
- var providers = this._getProviders();
+var LOW_PRIORITY = 500;
- var entries = {}; // loop through all providers and their entries.
- // group entries by id so that overriding an entry is possible
- (0, _minDash.forEach)(providers, function (provider) {
- var entriesOrUpdater = provider.getContextPadEntries(element);
+/**
+ * A plugin that provides interaction events for diagram elements.
+ *
+ * It emits the following events:
+ *
+ * * element.click
+ * * element.contextmenu
+ * * element.dblclick
+ * * element.hover
+ * * element.mousedown
+ * * element.mousemove
+ * * element.mouseup
+ * * element.out
+ *
+ * Each event is a tuple { element, gfx, originalEvent }.
+ *
+ * Canceling the event via Event#preventDefault()
+ * prevents the original DOM operation.
+ *
+ * @param {EventBus} eventBus
+ * @param {ElementRegistry} elementRegistry
+ * @param {Styles} styles
+ */
+function InteractionEvents(eventBus, elementRegistry, styles) {
- if ((0, _minDash.isFunction)(entriesOrUpdater)) {
- entries = entriesOrUpdater(entries);
- } else {
- (0, _minDash.forEach)(entriesOrUpdater, function (entry, id) {
- entries[id] = entry;
- });
- }
- });
- return entries;
- };
- /**
- * Trigger an action available on the opened context pad
- *
- * @param {string} action
- * @param {Event} event
- * @param {boolean} [autoActivate=false]
- */
+ var self = this;
+ /**
+ * Fire an interaction event.
+ *
+ * @param {string} type local event name, e.g. element.click.
+ * @param {MouseEvent|TouchEvent} event native event
+ * @param {Element} [element] the diagram element to emit the event on;
+ * defaults to the event target
+ */
+ function fire(type, event, element) {
+
+ if (isIgnored(type, event)) {
+ return;
+ }
+
+ var target, gfx, returnValue;
+
+ if (!element) {
+ target = event.delegateTarget || event.target;
+
+ if (target) {
+ gfx = target;
+ element = elementRegistry.get(gfx);
+ }
+ } else {
+ gfx = elementRegistry.getGraphics(element);
+ }
+
+ if (!gfx || !element) {
+ return;
+ }
+
+ returnValue = eventBus.fire(type, {
+ element: element,
+ gfx: gfx,
+ originalEvent: event
+ });
+
+ if (returnValue === false) {
+ event.stopPropagation();
+ event.preventDefault();
+ }
+ }
+
+ // TODO(nikku): document this
+ var handlers = {};
+
+ function mouseHandler(localEventName) {
+ return handlers[localEventName];
+ }
+
+ function isIgnored(localEventName, event) {
+
+ var filter = ignoredFilters[localEventName] || _util_Mouse__WEBPACK_IMPORTED_MODULE_0__.isPrimaryButton;
+
+ // only react on left mouse button interactions
+ // except for interaction events that are enabled
+ // for secundary mouse button
+ return !filter(event);
+ }
+
+ var bindings = {
+ click: 'element.click',
+ contextmenu: 'element.contextmenu',
+ dblclick: 'element.dblclick',
+ mousedown: 'element.mousedown',
+ mousemove: 'element.mousemove',
+ mouseover: 'element.hover',
+ mouseout: 'element.out',
+ mouseup: 'element.mouseup',
+ };
+
+ var ignoredFilters = {
+ 'element.contextmenu': allowAll,
+ 'element.mousedown': allowPrimaryAndAuxiliary,
+ 'element.mouseup': allowPrimaryAndAuxiliary,
+ 'element.click': allowPrimaryAndAuxiliary,
+ 'element.dblclick': allowPrimaryAndAuxiliary
+ };
+
+
+ // manual event trigger //////////
+
+ /**
+ * Trigger an interaction event (based on a native dom event)
+ * on the target shape or connection.
+ *
+ * @param {string} eventName the name of the triggered DOM event
+ * @param {MouseEvent|TouchEvent} event
+ * @param {Element} targetElement
+ */
+ function triggerMouseEvent(eventName, event, targetElement) {
- ContextPad.prototype.trigger = function (action, event, autoActivate) {
- var element = this._current.element,
- entries = this._current.entries,
- entry,
- handler,
- originalEvent,
- button = event.delegateTarget || event.target;
+ // i.e. element.mousedown...
+ var localEventName = bindings[eventName];
- if (!button) {
- return event.preventDefault();
- }
+ if (!localEventName) {
+ throw new Error('unmapped DOM event name <' + eventName + '>');
+ }
- entry = entries[(0, _minDom.attr)(button, 'data-action')];
- handler = entry.action;
- originalEvent = event.originalEvent || event; // simple action (via callback function)
+ return fire(localEventName, event, targetElement);
+ }
- if ((0, _minDash.isFunction)(handler)) {
- if (action === 'click') {
- return handler(originalEvent, element, autoActivate);
- }
- } else {
- if (handler[action]) {
- return handler[action](originalEvent, element, autoActivate);
- }
- } // silence other actions
+ var ELEMENT_SELECTOR = 'svg, .djs-element';
- event.preventDefault();
- };
- /**
- * Open the context pad for the given element
- *
- * @param {djs.model.Base} element
- * @param {boolean} force if true, force reopening the context pad
- */
+ // event handling ///////
+ function registerEvent(node, event, localEvent, ignoredFilter) {
- ContextPad.prototype.open = function (element, force) {
- if (!force && this.isOpen(element)) {
- return;
- }
+ var handler = handlers[localEvent] = function(event) {
+ fire(localEvent, event);
+ };
- this.close();
+ if (ignoredFilter) {
+ ignoredFilters[localEvent] = ignoredFilter;
+ }
- this._updateAndOpen(element);
- };
+ handler.$delegate = min_dom__WEBPACK_IMPORTED_MODULE_1__.delegate.bind(node, ELEMENT_SELECTOR, event, handler);
+ }
- ContextPad.prototype._getProviders = function (id) {
- var event = this._eventBus.createEvent({
- type: 'contextPad.getProviders',
- providers: []
- });
+ function unregisterEvent(node, event, localEvent) {
- this._eventBus.fire(event);
+ var handler = mouseHandler(localEvent);
- return event.providers;
- };
+ if (!handler) {
+ return;
+ }
- ContextPad.prototype._updateAndOpen = function (element) {
- var entries = this.getEntries(element),
- pad = this.getPad(element),
- html = pad.html;
- (0, _minDash.forEach)(entries, function (entry, id) {
- var grouping = entry.group || 'default',
- control = (0, _minDom.domify)(entry.html || '
'),
- container;
- (0, _minDom.attr)(control, 'data-action', id);
- container = (0, _minDom.query)('[data-group=' + grouping + ']', html);
-
- if (!container) {
- container = (0, _minDom.domify)('
');
- html.appendChild(container);
- }
+ min_dom__WEBPACK_IMPORTED_MODULE_1__.delegate.unbind(node, event, handler.$delegate);
+ }
- container.appendChild(control);
+ function registerEvents(svg) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(bindings, function(val, key) {
+ registerEvent(svg, key, val);
+ });
+ }
- if (entry.className) {
- addClasses(control, entry.className);
- }
+ function unregisterEvents(svg) {
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(bindings, function(val, key) {
+ unregisterEvent(svg, key, val);
+ });
+ }
- if (entry.title) {
- (0, _minDom.attr)(control, 'title', entry.title);
- }
+ eventBus.on('canvas.destroy', function(event) {
+ unregisterEvents(event.svg);
+ });
- if (entry.imageUrl) {
- control.appendChild((0, _minDom.domify)(' '));
- }
- });
- (0, _minDom.classes)(html).add('open');
- this._current = {
- element: element,
- pad: pad,
- entries: entries
- };
+ eventBus.on('canvas.init', function(event) {
+ registerEvents(event.svg);
+ });
- this._eventBus.fire('contextPad.open', {
- current: this._current
- });
- };
- ContextPad.prototype.getPad = function (element) {
- if (this.isOpen()) {
- return this._current.pad;
- }
+ // hit box updating ////////////////
- var self = this;
- var overlays = this._overlays;
- var html = (0, _minDom.domify)('
');
- var overlaysConfig = (0, _minDash.assign)({
- html: html
- }, this._overlaysConfig);
+ eventBus.on([ 'shape.added', 'connection.added' ], function(event) {
+ var element = event.element,
+ gfx = event.gfx;
- _minDom.delegate.bind(html, entrySelector, 'click', function (event) {
- self.trigger('click', event);
- });
+ eventBus.fire('interactionEvents.createHit', { element: element, gfx: gfx });
+ });
- _minDom.delegate.bind(html, entrySelector, 'dragstart', function (event) {
- self.trigger('dragstart', event);
- }); // stop propagation of mouse events
+ // Update djs-hit on change.
+ // A low priortity is necessary, because djs-hit of labels has to be updated
+ // after the label bounds have been updated in the renderer.
+ eventBus.on([
+ 'shape.changed',
+ 'connection.changed'
+ ], LOW_PRIORITY, function(event) {
+ var element = event.element,
+ gfx = event.gfx;
- _minDom.event.bind(html, 'mousedown', function (event) {
- event.stopPropagation();
- });
+ eventBus.fire('interactionEvents.updateHit', { element: element, gfx: gfx });
+ });
- this._overlayId = overlays.add(element, 'context-pad', overlaysConfig);
- var pad = overlays.get(this._overlayId);
+ eventBus.on('interactionEvents.createHit', LOW_PRIORITY, function(event) {
+ var element = event.element,
+ gfx = event.gfx;
- this._eventBus.fire('contextPad.create', {
- element: element,
- pad: pad
- });
+ self.createDefaultHit(element, gfx);
+ });
- return pad;
- };
- /**
- * Close the context pad
- */
+ eventBus.on('interactionEvents.updateHit', function(event) {
+ var element = event.element,
+ gfx = event.gfx;
+ self.updateDefaultHit(element, gfx);
+ });
- ContextPad.prototype.close = function () {
- if (!this.isOpen()) {
- return;
- }
- this._overlays.remove(this._overlayId);
+ // hit styles ////////////
- this._overlayId = null;
+ var STROKE_HIT_STYLE = createHitStyle('djs-hit djs-hit-stroke');
- this._eventBus.fire('contextPad.close', {
- current: this._current
- });
+ var CLICK_STROKE_HIT_STYLE = createHitStyle('djs-hit djs-hit-click-stroke');
- this._current = null;
- };
- /**
- * Check if pad is open. If element is given, will check
- * if pad is opened with given element.
- *
- * @param {Element} element
- * @return {boolean}
- */
+ var ALL_HIT_STYLE = createHitStyle('djs-hit djs-hit-all');
+ var NO_MOVE_HIT_STYLE = createHitStyle('djs-hit djs-hit-no-move');
- ContextPad.prototype.isOpen = function (element) {
- return !!this._current && (!element ? true : this._current.element === element);
- }; // helpers //////////////////////
+ var HIT_TYPES = {
+ 'all': ALL_HIT_STYLE,
+ 'click-stroke': CLICK_STROKE_HIT_STYLE,
+ 'stroke': STROKE_HIT_STYLE,
+ 'no-move': NO_MOVE_HIT_STYLE
+ };
+ function createHitStyle(classNames, attrs) {
- function addClasses(element, classNames) {
- var classes = (0, _minDom.classes)(element);
- var actualClassNames = (0, _minDash.isArray)(classNames) ? classNames : classNames.split(/\s+/g);
- actualClassNames.forEach(function (cls) {
- classes.add(cls);
- });
- }
+ attrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({
+ stroke: 'white',
+ strokeWidth: 15
+ }, attrs || {});
- },{"min-dash":646,"min-dom":647}],292:[function(require,module,exports){
- "use strict";
+ return styles.cls(classNames, [ 'no-fill', 'no-border' ], attrs);
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _interactionEvents = _interopRequireDefault(require("../interaction-events"));
+ // style helpers ///////////////
- var _overlays = _interopRequireDefault(require("../overlays"));
+ function applyStyle(hit, type) {
- var _ContextPad = _interopRequireDefault(require("./ContextPad"));
+ var attrs = HIT_TYPES[type];
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ if (!attrs) {
+ throw new Error('invalid hit type <' + type + '>');
+ }
- var _default = {
- __depends__: [_interactionEvents.default, _overlays.default],
- contextPad: ['type', _ContextPad.default]
- };
- exports.default = _default;
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.attr)(hit, attrs);
- },{"../interaction-events":316,"../overlays":361,"./ContextPad":291}],293:[function(require,module,exports){
- "use strict";
+ return hit;
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = CopyPaste;
+ function appendHit(gfx, hit) {
+ (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.append)(gfx, hit);
+ }
- var _minDash = require("min-dash");
- var _Elements = require("../../util/Elements");
+ // API
- /**
- * @typedef {Function} listener
- *
- * @param {Object} context
- * @param {Array} context.elements
- *
- * @returns {Array|boolean} - Return elements to be copied or false to disallow
- * copying.
- */
+ /**
+ * Remove hints on the given graphics.
+ *
+ * @param {SVGElement} gfx
+ */
+ this.removeHits = function(gfx) {
+ var hits = (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.queryAll)('.djs-hit', gfx);
- /**
- * @typedef {Function} listener
- *
- * @param {Object} context
- * @param {Object} context.descriptor
- * @param {djs.model.Base} context.element
- * @param {Array} context.elements
- */
+ (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(hits, tiny_svg__WEBPACK_IMPORTED_MODULE_3__.remove);
+ };
- /**
- * @typedef {Function} listener
- *
- * @param {Object} context
- * @param {Object} context.elements
- * @param {Object} context.tree
- */
+ /**
+ * Create default hit for the given element.
+ *
+ * @param {Element} element
+ * @param {SVGElement} gfx
+ *
+ * @return {SVGElement} created hit
+ */
+ this.createDefaultHit = function(element, gfx) {
+ var waypoints = element.waypoints,
+ isFrame = element.isFrame,
+ boxType;
+
+ if (waypoints) {
+ return this.createWaypointsHit(gfx, waypoints);
+ } else {
+
+ boxType = isFrame ? 'stroke' : 'all';
+
+ return this.createBoxHit(gfx, boxType, {
+ width: element.width,
+ height: element.height
+ });
+ }
+ };
+
+ /**
+ * Create hits for the given waypoints.
+ *
+ * @param {SVGElement} gfx
+ * @param {Point[]} waypoints
+ *
+ * @return {SVGElement}
+ */
+ this.createWaypointsHit = function(gfx, waypoints) {
- /**
- * @typedef {Function} listener
- *
- * @param {Object} context
- * @param {Object} context.cache - Already created elements.
- * @param {Object} context.descriptor
- */
+ var hit = (0,_util_RenderUtil__WEBPACK_IMPORTED_MODULE_4__.createLine)(waypoints);
- /**
- * @typedef {Function} listener
- *
- * @param {Object} context
- * @param {Object} context.hints - Add hints before pasting.
- */
+ applyStyle(hit, 'stroke');
- /**
- * Copy and paste elements.
- *
- * @param {Canvas} canvas
- * @param {Create} create
- * @param {Clipboard} clipboard
- * @param {ElementFactory} elementFactory
- * @param {EventBus} eventBus
- * @param {Modeling} modeling
- * @param {Mouse} mouse
- * @param {Rules} rules
- */
- function CopyPaste(canvas, create, clipboard, elementFactory, eventBus, modeling, mouse, rules) {
- this._canvas = canvas;
- this._create = create;
- this._clipboard = clipboard;
- this._elementFactory = elementFactory;
- this._eventBus = eventBus;
- this._modeling = modeling;
- this._mouse = mouse;
- this._rules = rules;
- eventBus.on('copyPaste.copyElement', function (context) {
- var descriptor = context.descriptor,
- element = context.element,
- elements = context.elements; // default priority (priority = 1)
-
- descriptor.priority = 1;
- descriptor.id = element.id;
- var parentCopied = (0, _minDash.find)(elements, function (e) {
- return e === element.parent;
- }); // do NOT reference parent if parent wasn't copied
-
- if (parentCopied) {
- descriptor.parent = element.parent.id;
- } // attachers (priority = 2)
-
-
- if (isAttacher(element)) {
- descriptor.priority = 2;
- descriptor.host = element.host.id;
- } // connections (priority = 3)
-
-
- if (isConnection(element)) {
- descriptor.priority = 3;
- descriptor.source = element.source.id;
- descriptor.target = element.target.id;
- descriptor.waypoints = copyWaypoints(element);
- } // labels (priority = 4)
-
-
- if (isLabel(element)) {
- descriptor.priority = 4;
- descriptor.labelTarget = element.labelTarget.id;
- }
+ appendHit(gfx, hit);
- (0, _minDash.forEach)(['x', 'y', 'width', 'height'], function (property) {
- if ((0, _minDash.isNumber)(element[property])) {
- descriptor[property] = element[property];
- }
- });
- descriptor.hidden = element.hidden;
- descriptor.collapsed = element.collapsed;
- });
- eventBus.on('copyPaste.pasteElements', function (context) {
- var hints = context.hints;
- (0, _minDash.assign)(hints, {
- createElementsBehavior: false
- });
- });
- }
+ return hit;
+ };
- CopyPaste.$inject = ['canvas', 'create', 'clipboard', 'elementFactory', 'eventBus', 'modeling', 'mouse', 'rules'];
- /**
- * Copy elements.
- *
- * @param {Array