├── .gitignore ├── README.md ├── bpmn-custom ├── .eslintrc ├── .gitignore ├── README.md ├── bpmn-custom.png ├── config │ ├── env.js │ ├── jest │ │ ├── cssTransform.js │ │ └── fileTransform.js │ ├── paths.js │ ├── webpack.config.js │ └── webpackDevServer.config.js ├── package-lock.json ├── package.json ├── public │ ├── favicon.ico │ ├── iconfont │ │ ├── demo.css │ │ ├── demo_index.html │ │ ├── iconfont.css │ │ ├── iconfont.eot │ │ ├── iconfont.js │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ ├── iconfont.woff │ │ └── iconfont.woff2 │ └── index.html ├── scripts │ ├── build.js │ ├── start.js │ └── test.js ├── src │ ├── App.jsx │ ├── components │ │ ├── EditingTools │ │ │ ├── index.jsx │ │ │ └── index.module.less │ │ ├── Header │ │ │ ├── index.jsx │ │ │ └── index.module.less │ │ └── index.js │ ├── containers │ │ ├── Bpmn.module.less │ │ ├── Common.less │ │ ├── index.jsx │ │ └── modeler │ │ │ ├── TaskPriorities │ │ │ ├── ColorRenderer.js │ │ │ ├── PriorityOverlay.js │ │ │ ├── ResizeTaskRules.js │ │ │ └── index.js │ │ │ ├── color-picker │ │ │ ├── ColorPicker.js │ │ │ ├── ColoredRenderer.js │ │ │ └── index.js │ │ │ ├── customPalette │ │ │ ├── CustomContextPadProvider.js │ │ │ ├── CustomPalette.js │ │ │ ├── CustomRenderer.js │ │ │ ├── index.js │ │ │ └── palette │ │ │ │ ├── Palette.js │ │ │ │ └── index.js │ │ │ ├── customTranslate │ │ │ ├── customTranslate.js │ │ │ ├── index.js │ │ │ └── translationsGerman.js │ │ │ ├── index.js │ │ │ ├── keyboard │ │ │ ├── BpmnKeyBindings.js │ │ │ └── index.js │ │ │ ├── readOnly │ │ │ ├── index.js │ │ │ └── readOnly.js │ │ │ ├── resizeAllRules │ │ │ ├── ResizeAllRules.js │ │ │ └── index.js │ │ │ └── transactionBoundaries │ │ │ ├── TransactionBoundaries.js │ │ │ ├── Util.js │ │ │ └── index.js │ ├── index.css │ ├── index.js │ ├── resources │ │ ├── defaultData.js │ │ ├── icons │ │ │ ├── caretDowm.svg │ │ │ ├── caretUp.svg │ │ │ ├── download.svg │ │ │ ├── fold.svg │ │ │ ├── image.svg │ │ │ ├── mapClose.svg │ │ │ ├── mapOpen.svg │ │ │ ├── open.svg │ │ │ ├── redo.svg │ │ │ ├── save.svg │ │ │ ├── success.svg │ │ │ ├── undo.svg │ │ │ ├── unfold.svg │ │ │ ├── zoom.svg │ │ │ ├── zoomIn.svg │ │ │ └── zoomOut.svg │ │ └── newDiagram.js │ ├── serviceWorker.js │ └── utils │ │ └── index.js └── yarn.lock ├── bpmn-heatmap ├── .eslintrc ├── .gitignore ├── README.md ├── bpmn-heatmap.png ├── config │ ├── env.js │ ├── jest │ │ ├── cssTransform.js │ │ └── fileTransform.js │ ├── paths.js │ ├── webpack.config.js │ └── webpackDevServer.config.js ├── package-lock.json ├── package.json ├── public │ ├── favicon.ico │ ├── iconfont │ │ ├── demo.css │ │ ├── demo_index.html │ │ ├── iconfont.css │ │ ├── iconfont.eot │ │ ├── iconfont.js │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ ├── iconfont.woff │ │ └── iconfont.woff2 │ └── index.html ├── scripts │ ├── build.js │ ├── start.js │ └── test.js ├── src │ ├── App.jsx │ ├── containers │ │ ├── Bpmn.module.less │ │ ├── Common.less │ │ ├── components │ │ │ └── EditingTools │ │ │ │ ├── index.jsx │ │ │ │ └── index.module.less │ │ ├── index.jsx │ │ └── modeler │ │ │ └── customRenderer │ │ │ ├── CustomRenderer.js │ │ │ └── index.js │ ├── index.css │ ├── index.js │ ├── resources │ │ ├── defaultData.js │ │ ├── icons │ │ │ ├── mapClose.svg │ │ │ ├── mapOpen.svg │ │ │ ├── zoom.svg │ │ │ ├── zoomIn.svg │ │ │ └── zoomOut.svg │ │ └── newDiagram.js │ ├── serviceWorker.js │ └── utils │ │ └── index.js └── yarn.lock └── bpmn-viewer ├── .eslintrc ├── .gitignore ├── README.md ├── bpmn-viewer.png ├── config ├── env.js ├── jest │ ├── cssTransform.js │ └── fileTransform.js ├── paths.js ├── webpack.config.js └── webpackDevServer.config.js ├── package-lock.json ├── package.json ├── public ├── favicon.ico ├── iconfont │ ├── demo.css │ ├── demo_index.html │ ├── iconfont.css │ ├── iconfont.eot │ ├── iconfont.js │ ├── iconfont.svg │ ├── iconfont.ttf │ ├── iconfont.woff │ └── iconfont.woff2 └── index.html ├── scripts ├── build.js ├── start.js └── test.js └── src ├── App.jsx ├── components └── EditingTools │ ├── index.jsx │ └── index.module.less ├── containers ├── Bpmn.module.less ├── Common.less ├── index.jsx └── modeler │ └── customRenderer │ ├── CustomRenderer.js │ └── index.js ├── index.css ├── index.js ├── resources ├── defaultData.js ├── icons │ ├── mapClose.svg │ ├── mapOpen.svg │ ├── zoom.svg │ ├── zoomIn.svg │ └── zoomOut.svg └── newDiagram.js ├── serviceWorker.js └── utils └── index.js /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | /bpmnDemos 14 | 15 | # misc 16 | .DS_Store 17 | .env.local 18 | .env.development.local 19 | .env.test.local 20 | .env.production.local 21 | 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # bpmn-react 2 | bpmn react heatmap bpmn-viewer 3 | -------------------------------------------------------------------------------- /bpmn-custom/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "parser": "babel-eslint", 4 | "extends": ["airbnb"], 5 | "env": { 6 | "browser": true 7 | }, 8 | "globals": { 9 | "$": true, 10 | "_": true 11 | }, 12 | "rules": { 13 | "comma-dangle": [2, "only-multiline"], 14 | "no-plusplus": 0, 15 | "no-mixed-operators": 0, 16 | "no-param-reassign": 0, 17 | "no-else-return": 0, 18 | "guard-for-in": 0, 19 | "no-restricted-syntax": 0, 20 | "linebreak-style": 0, 21 | "no-underscore-dangle": 0, 22 | "react/jsx-boolean-value": 0, 23 | "react/forbid-prop-types": [1, { "forbid": ["any"] }], 24 | "react/jsx-one-expression-per-line": 0, 25 | "import/no-named-as-default": 0, 26 | "import/no-named-as-default-member": 0, 27 | "import/no-unresolved": 0, 28 | "import/prefer-default-export": 0, 29 | "jsx-a11y/label-has-associated-control": 0, 30 | "jsx-a11y/anchor-is-valid": 0, 31 | "jsx-a11y/click-events-have-key-events": 0, 32 | "jsx-a11y/no-noninteractive-tabindex": 0, 33 | "jsx-a11y/no-static-element-interactions": 0, 34 | "jsx-a11y/label-has-for": 0, 35 | "react/prefer-stateless-function": 0, 36 | "object-curly-newline": 0, 37 | "arrow-body-style": 0, 38 | "no-return-assign": 0, 39 | "react/require-default-props": 0, 40 | "no-console": "off", 41 | "no-nested-ternary": 0, 42 | "no-useless-escape": 0, 43 | "no-sparse-arrays": 0, 44 | "consistent-return": 0, 45 | "func-names": 0 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /bpmn-custom/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /bpmn-custom/README.md: -------------------------------------------------------------------------------- 1 | # bpmn2.0-modeler 2 | > web modeler: React+Antd+Bpmn2.0+Axios 3 | 4 | ## start up 5 | - install dependency package:npm install 6 | - run local frontend server:npm run start 7 | 8 | ## achieve results 9 | 10 | ![bpmn-react](./bpmn-custom.png) 11 | -------------------------------------------------------------------------------- /bpmn-custom/bpmn-custom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnoopyoFifi/bpmn-react/39dc80239e89a647c594651392955bba56cbfada/bpmn-custom/bpmn-custom.png -------------------------------------------------------------------------------- /bpmn-custom/config/env.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 'use strict'; 3 | const fs = require('fs'); 4 | const path = require('path'); 5 | const paths = require('./paths'); 6 | 7 | // Make sure that including paths.js after env.js will read .env variables. 8 | delete require.cache[require.resolve('./paths')]; 9 | 10 | const NODE_ENV = process.env.NODE_ENV; 11 | if (!NODE_ENV) { 12 | throw new Error( 13 | 'The NODE_ENV environment variable is required but was not specified.' 14 | ); 15 | } 16 | 17 | // https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use 18 | var dotenvFiles = [ 19 | `${paths.dotenv}.${NODE_ENV}.local`, 20 | `${paths.dotenv}.${NODE_ENV}`, 21 | // Don't include `.env.local` for `test` environment 22 | // since normally you expect tests to produce the same 23 | // results for everyone 24 | NODE_ENV !== 'test' && `${paths.dotenv}.local`, 25 | paths.dotenv, 26 | ].filter(Boolean); 27 | 28 | // Load environment variables from .env* files. Suppress warnings using silent 29 | // if this file is missing. dotenv will never modify any environment variables 30 | // that have already been set. Variable expansion is supported in .env files. 31 | // https://github.com/motdotla/dotenv 32 | // https://github.com/motdotla/dotenv-expand 33 | dotenvFiles.forEach(dotenvFile => { 34 | if (fs.existsSync(dotenvFile)) { 35 | require('dotenv-expand')( 36 | require('dotenv').config({ 37 | path: dotenvFile, 38 | }) 39 | ); 40 | } 41 | }); 42 | 43 | // We support resolving modules according to `NODE_PATH`. 44 | // This lets you use absolute paths in imports inside large monorepos: 45 | // https://github.com/facebook/create-react-app/issues/253. 46 | // It works similar to `NODE_PATH` in Node itself: 47 | // https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders 48 | // Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored. 49 | // Otherwise, we risk importing Node.js core modules into an app instead of Webpack shims. 50 | // https://github.com/facebook/create-react-app/issues/1023#issuecomment-265344421 51 | // We also resolve them to make sure all tools using them work consistently. 52 | const appDirectory = fs.realpathSync(process.cwd()); 53 | process.env.NODE_PATH = (process.env.NODE_PATH || '') 54 | .split(path.delimiter) 55 | .filter(folder => folder && !path.isAbsolute(folder)) 56 | .map(folder => path.resolve(appDirectory, folder)) 57 | .join(path.delimiter); 58 | 59 | // Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be 60 | // injected into the application via DefinePlugin in Webpack configuration. 61 | const REACT_APP = /^REACT_APP_/i; 62 | 63 | function getClientEnvironment(publicUrl) { 64 | const raw = Object.keys(process.env) 65 | .filter(key => REACT_APP.test(key)) 66 | .reduce( 67 | (env, key) => { 68 | env[key] = process.env[key]; 69 | return env; 70 | }, 71 | { 72 | // Useful for determining whether we’re running in production mode. 73 | // Most importantly, it switches React into the correct mode. 74 | NODE_ENV: process.env.NODE_ENV || 'development', 75 | // Useful for resolving the correct path to static assets in `public`. 76 | // For example, . 77 | // This should only be used as an escape hatch. Normally you would put 78 | // images into the `src` and `import` them in code to get their paths. 79 | PUBLIC_URL: publicUrl, 80 | } 81 | ); 82 | // Stringify all values so we can feed into Webpack DefinePlugin 83 | const stringified = { 84 | 'process.env': Object.keys(raw).reduce((env, key) => { 85 | env[key] = JSON.stringify(raw[key]); 86 | return env; 87 | }, {}), 88 | }; 89 | 90 | return { raw, stringified }; 91 | } 92 | 93 | module.exports = getClientEnvironment; 94 | -------------------------------------------------------------------------------- /bpmn-custom/config/jest/cssTransform.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 'use strict'; 3 | // This is a custom Jest transformer turning style imports into empty objects. 4 | // http://facebook.github.io/jest/docs/en/webpack.html 5 | 6 | module.exports = { 7 | process() { 8 | return 'module.exports = {};'; 9 | }, 10 | getCacheKey() { 11 | // The output is always the same. 12 | return 'cssTransform'; 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /bpmn-custom/config/jest/fileTransform.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 'use strict'; 3 | 4 | const path = require('path'); 5 | 6 | // This is a custom Jest transformer turning file imports into filenames. 7 | // http://facebook.github.io/jest/docs/en/webpack.html 8 | 9 | module.exports = { 10 | process(src, filename) { 11 | const assetFilename = JSON.stringify(path.basename(filename)); 12 | 13 | if (filename.match(/\.svg$/)) { 14 | return `const React = require('react'); 15 | module.exports = { 16 | __esModule: true, 17 | default: ${assetFilename}, 18 | ReactComponent: React.forwardRef((props, ref) => ({ 19 | $$typeof: Symbol.for('react.element'), 20 | type: 'svg', 21 | ref: ref, 22 | key: null, 23 | props: Object.assign({}, props, { 24 | children: ${assetFilename} 25 | }) 26 | })), 27 | };`; 28 | } 29 | 30 | return `module.exports = ${assetFilename};`; 31 | }, 32 | }; 33 | -------------------------------------------------------------------------------- /bpmn-custom/config/paths.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 'use strict'; 3 | 4 | const path = require('path'); 5 | const fs = require('fs'); 6 | const url = require('url'); 7 | 8 | // Make sure any symlinks in the project folder are resolved: 9 | // https://github.com/facebook/create-react-app/issues/637 10 | const appDirectory = fs.realpathSync(process.cwd()); 11 | const resolveApp = relativePath => path.resolve(appDirectory, relativePath); 12 | 13 | const envPublicUrl = process.env.PUBLIC_URL; 14 | 15 | function ensureSlash(inputPath, needsSlash) { 16 | const hasSlash = inputPath.endsWith('/'); 17 | if (hasSlash && !needsSlash) { 18 | return inputPath.substr(0, inputPath.length - 1); 19 | } else if (!hasSlash && needsSlash) { 20 | return `${inputPath}/`; 21 | } else { 22 | return inputPath; 23 | } 24 | } 25 | 26 | const getPublicUrl = appPackageJson => 27 | envPublicUrl || require(appPackageJson).homepage; 28 | 29 | // We use `PUBLIC_URL` environment variable or "homepage" field to infer 30 | // "public path" at which the app is served. 31 | // Webpack needs to know it to put the right