Skip to content

Commit

Permalink
Added the StyleGroup and DirectionEntry
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Jun 16, 2024
0 parents commit dcbaa09
Show file tree
Hide file tree
Showing 741 changed files with 106,061 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
comment: off

parsers:
javascript:
enable_partials: yes
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist
node_modules
types
66 changes: 66 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"parserOptions": {
"ecmaVersion": 2019
},
"extends": [
"plugin:bpmn-io/browser",
"plugin:bpmn-io/jsx",
"plugin:bpmn-io/node",
"plugin:react-hooks/recommended",
"plugin:prettier/recommended"
],
"rules": {
"import/first": "error",
"import/no-amd": "error",
"import/no-webpack-loader-syntax": "error",
"import/no-restricted-paths": [
"error",
{
"basePath": "./packages",
"zones": [
{
"target": "form-js/src",
"from": ".",
"except": [
"form-js"
]
},
{
"target": "form-js-editor/src",
"from": ".",
"except": [
"form-js-editor"
]
},
{
"target": "form-js-playground/src",
"from": ".",
"except": [
"form-js-playground"
]
},
{
"target": "form-js-viewer/src",
"from": ".",
"except": [
"form-js-viewer"
]
}
]
}
]
},
"overrides": [
{
"files": [
"packages/**/src/**/*.js"
],
"rules": {
"import/no-default-export": "error"
}
}
],
"plugins": [
"import"
]
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!--
Thanks for creating this pull request!
Please make sure to link the issue you are closing as "Closes #issueNr".
This helps us to understand the context of this PR.
-->

Closes #

- [ ] This PR adds a new `form-js` element or visually changes an existing component.
- => In that case, we need to ensure we follow up on this, e.g. by [creating an issue in Tasklist](https://github.com/camunda/tasklist/issues/new/choose)
33 changes: 33 additions & 0 deletions .github/workflows/ADD_TO_HTO_PROJECT.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Add to HTO project

on:
issues:
types:
- opened
- transferred
pull_request:
types:
- opened

jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@9bfe908f2eaa7ba10340b31e314148fcfe6a2458
name: Add to project
id: add-project
with:
project-url: ${{ secrets.HTO_PROJECT_URL }}
github-token: ${{ secrets.ADD_TO_HTO_PROJECT_PAT }}
- name: Define project column
run: echo "COLUMN=${{ github.event_name == 'pull_request' && 'Needs Review' || 'Inbox' }}" >> $GITHUB_ENV
- uses: titoportas/update-project-fields@421a54430b3cdc9eefd8f14f9ce0142ab7678751
name: Update project column
id: update-column
with:
project-url: ${{ secrets.HTO_PROJECT_URL }}
github-token: ${{ secrets.ADD_TO_HTO_PROJECT_PAT }}
item-id: ${{ steps.add-project.outputs.itemId }}
field-keys: Status
field-values: ${{ env.COLUMN }}
43 changes: 43 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI
on: [push, pull_request]
jobs:
Build:
strategy:
matrix:
os: [macos-latest, ubuntu-20.04, windows-latest]
node-version: [20]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache Node.js modules
uses: actions/cache@v4
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install dependencies
run: npm ci
- name: Build
if: runner.os == 'Linux'
env:
COVERAGE: 1
TEST_BROWSERS: Firefox,ChromeHeadless
run: xvfb-run npm run all
- name: Build
if: runner.os != 'Linux'
env:
TEST_BROWSERS: ChromeHeadless
run: npm run all
- name: Upload coverage
uses: codecov/codecov-action@v4
if: runner.os == 'Linux'
56 changes: 56 additions & 0 deletions .github/workflows/DEPLOY_PLAYGROUND_PREVIEW.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Deploy playground preview
on:
pull_request:
types: [labeled, synchronize]
jobs:
deploy-preview:
# check whether the labeled event was deploy-preview || check whether on new commit of PR the label deploy-preview exists
if: github.event.label.name == 'deploy-preview' || contains( github.event.pull_request.labels.*.name, 'deploy-preview')
runs-on: ubuntu-latest
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} # head_ref = branch on PR, ref_name if main / stable/**
steps:
- id: sanitize
name: Sanitize form-playground branch name
uses: camunda/infra-global-github-actions/sanitize-branch-name@main
with:
branch: ${{ env.BRANCH_NAME }}
max_length: '25'
- name: Save form-playground branch name
run: echo "PREVIEW_BRANCH_NAME=demo-${{ steps.sanitize.outputs.branch_name }}" >> $GITHUB_ENV
- name: Check form-playground branch
run: echo "BRANCH_EXISTS=$(git ls-remote --heads https://${{ secrets.ADD_TO_HTO_PROJECT_PAT }}@github.com./camunda/form-playground ${{ env.PREVIEW_BRANCH_NAME }} | wc -l)" >> $GITHUB_ENV
- name: Create form-playground branch
if: env.BRANCH_EXISTS == 0
uses: GuillaumeFalourd/create-other-repo-branch-action@706963eca4b230707b1cfecee6760b519e2cbbf3
with:
repository_owner: camunda
repository_name: form-playground
new_branch_name: ${{ env.PREVIEW_BRANCH_NAME }}
access_token: ${{ secrets.ADD_TO_HTO_PROJECT_PAT }}
- name: Create GitHub deployment
uses: bobheadxi/deployments@648679e8e4915b27893bd7dbc35cb504dc915bc8
id: deployment
with:
step: start
env: ${{ env.PREVIEW_BRANCH_NAME }}
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ env.BRANCH_NAME }}
- name: Trigger Netlify branch build
run: |
curl --location --request POST '${{ secrets.NETLIFY_CUSTOM_BUILD_HOOK }}?trigger_branch=${{ env.PREVIEW_BRANCH_NAME }}&clear_cache=true' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'FORM_JS_BRANCH=${{ env.BRANCH_NAME }}'
- name: Update branch deployment status
# `always()` ensures that the deployment status
# is updated regardless of previous steps failing.
if: always()
uses: bobheadxi/deployments@648679e8e4915b27893bd7dbc35cb504dc915bc8
with:
step: finish
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
env: ${{ env.PREVIEW_BRANCH_NAME }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
env_url: https://${{ env.PREVIEW_BRANCH_NAME }}--camunda-form-playground.netlify.app
ref: ${{ env.BRANCH_NAME }}
33 changes: 33 additions & 0 deletions .github/workflows/MERGE_DEVELOP_TO_V2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Merge develop to v2
on:
push:
branches:
- 'develop'

jobs:
Merge_main_to_develop:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout v2 branch
uses: actions/checkout@v4
with:
ref: v2
fetch-depth: 0
- name: Merge develop to v2 and push
run: |
git config user.name '${{ secrets.BPMN_IO_USERNAME }}'
git config user.email '${{ secrets.BPMN_IO_EMAIL }}'
git merge -m 'Merge develop to v2' --no-edit origin/develop
git push
- name: Notify failure on Slack
if: failure()
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
slack-message: 'Automatic merge of <https://github.com/${{ github.repository }}/tree/${{ github.ref }}|${{ github.ref }}> to <https://github.com/${{ github.repository }}/tree/v2|${{ github.repository }}#v2> failed.'
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
33 changes: 33 additions & 0 deletions .github/workflows/MERGE_MASTER_TO_DEVELOP.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Merge main to develop
on:
push:
branches:
- 'main'

jobs:
Merge_main_to_develop:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout develop
uses: actions/checkout@v4
with:
ref: develop
fetch-depth: 0
- name: Merge main to develop and push
run: |
git config user.name '${{ secrets.BPMN_IO_USERNAME }}'
git config user.email '${{ secrets.BPMN_IO_EMAIL }}'
git merge -m 'Merge main to develop' --no-edit origin/main
git push
- name: Notify failure on Slack
if: failure()
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
slack-message: 'Automatic merge of <https://github.com/${{ github.repository }}/tree/${{ github.ref }}|${{ github.ref }}> to <https://github.com/${{ github.repository }}/tree/develop|${{ github.repository }}#develop> failed.'
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
55 changes: 55 additions & 0 deletions .github/workflows/POST_RELEASE.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Post release
on:
push:
tags:
- 'v[0-9]+.*'
jobs:
post-release:
strategy:
matrix:
os: [ubuntu-latest]
node-version: [20]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set TAG
run: echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: Wait for published
env:
PKG: '@bpmn-io/form-js@${{ env.TAG }}'
run: tasks/stages/await-published
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Check for stable release
run: |
if [[ ${{ env.TAG }} =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]
then echo "STABLE_RELEASE=true" >> $GITHUB_ENV
fi
- name: Update demo
if: ${{ env.STABLE_RELEASE == 'true' }}
env:
BPMN_IO_TOKEN: ${{ secrets.BPMN_IO_TOKEN }}
BPMN_IO_EMAIL: ${{ secrets.BPMN_IO_EMAIL }}
BPMN_IO_USERNAME: ${{ secrets.BPMN_IO_USERNAME }}
BPMN_IO_DEMO_ENDPOINT: ${{ secrets.BPMN_IO_DEMO_ENDPOINT }}
run: tasks/stages/update-demo
- name: Update examples
if: ${{ env.STABLE_RELEASE == 'true' }}
env:
BPMN_IO_TOKEN: ${{ secrets.BPMN_IO_TOKEN }}
BPMN_IO_EMAIL: ${{ secrets.BPMN_IO_EMAIL }}
BPMN_IO_USERNAME: ${{ secrets.BPMN_IO_USERNAME }}
run: tasks/stages/update-examples
- name: Update website
if: ${{ env.STABLE_RELEASE == 'true' }}
env:
BPMN_IO_TOKEN: ${{ secrets.BPMN_IO_TOKEN }}
BPMN_IO_EMAIL: ${{ secrets.BPMN_IO_EMAIL }}
BPMN_IO_USERNAME: ${{ secrets.BPMN_IO_USERNAME }}
run: tasks/stages/update-website
Loading

0 comments on commit dcbaa09

Please sign in to comment.