├── README.md ├── README_CN.md ├── basic ├── .editorconfig ├── .env ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── README.md ├── build │ ├── asset-manifest.json │ ├── favicon.svg │ ├── index.html │ ├── manifest.json │ ├── precache-manifest.45069ca4d22eda47818def27f4099965.js │ ├── service-worker.js │ └── static │ │ ├── css │ │ ├── 1.5a09009c.chunk.css │ │ ├── 1.5a09009c.chunk.css.map │ │ ├── main.d50aecde.chunk.css │ │ └── main.d50aecde.chunk.css.map │ │ ├── js │ │ ├── 1.c6a9b5f2.chunk.js │ │ ├── 1.c6a9b5f2.chunk.js.map │ │ ├── main.bd44791c.chunk.js │ │ ├── main.bd44791c.chunk.js.map │ │ ├── runtime~main.638e38a3.js │ │ └── runtime~main.638e38a3.js.map │ │ └── media │ │ ├── bpmn.27b5b190.svg │ │ └── bpmn.609860a7.eot ├── config-overrides.js ├── package-lock.json ├── package.json ├── public │ ├── favicon.svg │ ├── index.html │ ├── javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客.html │ ├── javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files │ │ ├── 0f000Dd29O15Im4ZGHXmF0.jpg │ │ ├── 0f000ji9GQBTQif4KlS1n6.jpg │ │ ├── 1513734357_1880.jpg │ │ ├── 201811070945058586.png │ │ ├── 201811231432284520.jpg │ │ ├── 201812181221437658.png │ │ ├── 20190104131811113.jpeg │ │ ├── 201901081453403307.jpg │ │ ├── 2_qq_24991133 │ │ ├── 3_cuihaiyang.jpg │ │ ├── 3_inber.jpg │ │ ├── 3_lxue1986.jpg │ │ ├── 3_qq_24991133.jpg │ │ ├── 3_wangjun5159.jpg │ │ ├── 3_wyswlp.jpg │ │ ├── MathJax.js.下载 │ │ ├── adx(1).php │ │ ├── adx(2).php │ │ ├── adx(3).php │ │ ├── adx(4).php │ │ ├── adx.php │ │ ├── apiaccept │ │ ├── atom-one-dark.css │ │ ├── baidu-search.js.下载 │ │ ├── baidu_opensug-1.0.0.js.下载 │ │ ├── blog_code-c3a0c33d5c.css │ │ ├── bword.min.js.下载 │ │ ├── bwordcom │ │ ├── bytkl.js.下载 │ │ ├── c.js.下载 │ │ ├── chart-3456820cac.css │ │ ├── common-2dfea49d18.min.js.下载 │ │ ├── content_toolbar.css │ │ ├── content_toolbar.js.下载 │ │ ├── copyright.js.下载 │ │ ├── csdn-S27-ads.js.下载 │ │ ├── csdn-S8-ads.js.下载 │ │ ├── csdn-kf.png │ │ ├── csdn_cs_qr.png │ │ ├── csdnqr@2x.png │ │ ├── detail-53cfe2baf2.min.css │ │ ├── detail-c285c8035f.min.js.下载 │ │ ├── ds.js.下载 │ │ ├── eduwxfix.png │ │ ├── fb.js.下载 │ │ ├── feedLoading.gif │ │ ├── fixed-sidebar.js.下载 │ │ ├── fp.html │ │ ├── goTop-v1.0.min.js.下载 │ │ ├── goTop.min.css │ │ ├── hm.js.下载 │ │ ├── iconfont.js.下载 │ │ ├── indexSuperise.css │ │ ├── indexSuperise.js.下载 │ │ ├── jquery-1.9.1.min.js.下载 │ │ ├── logo_f3c6cd3.js.下载 │ │ ├── main-1.0.6.js.下载 │ │ ├── main.js.下载 │ │ ├── markdown_views-df60374684.css │ │ ├── message-icon.png │ │ ├── mgkokpa.js.下载 │ │ ├── money.png │ │ ├── mvf_news_feed.js.下载 │ │ ├── notify.js.下载 │ │ ├── o.html │ │ ├── paging.css │ │ ├── paging.js.下载 │ │ ├── pc_wap_common-98040b5dc6.js.下载 │ │ ├── pr.js.下载 │ │ ├── pub_footer_1.0.3.css │ │ ├── publib_footer-1.0.3.js.下载 │ │ ├── rlptqpn.js.下载 │ │ ├── s(1).html │ │ ├── s(2).html │ │ ├── s.html │ │ ├── sandalstrap.min.css │ │ ├── sandalstrap.min.js.下载 │ │ ├── saved_resource │ │ ├── saved_resource(1).html │ │ ├── saved_resource(2).html │ │ ├── saved_resource(3).html │ │ ├── saved_resource(4).html │ │ ├── saved_resource(5).html │ │ ├── saved_resource(6).html │ │ ├── saved_resource(7).html │ │ ├── saved_resource.html │ │ ├── sdk-csdn-render.js.下载 │ │ ├── share.js.下载 │ │ ├── share_style0_16.css │ │ ├── skin3-template-9b39979775.min.css │ │ ├── skin3-template-fc7383b956.min.js.下载 │ │ ├── tingyun-rum-blog.js.下载 │ │ ├── track.js.下载 │ │ ├── u=105945598,1736340773&fm=76 │ │ ├── u=114185379,1387215804&fm=76 │ │ ├── u=1154606453,2108161012&fm=76 │ │ ├── u=1291684706,3513580152&fm=76 │ │ ├── u=1510397832,119425028&fm=76 │ │ ├── u=1603335293,2455320230&fm=76 │ │ ├── u=168067224,1668300395&fm=76 │ │ ├── u=1771139914,2393940649&fm=76 │ │ ├── u=1869343208,1142556175&fm=76 │ │ ├── u=286697597,3345667866&fm=76 │ │ ├── u=2878117677,1206458687&fm=76 │ │ ├── u=292560263,2120845313&fm=76 │ │ ├── u=316930680,1897213278&fm=76 │ │ ├── u=3525986259,3889706038&fm=76 │ │ ├── u=4160846947,4100080746&fm=76 │ │ ├── u=4164110243,2307466266&fm=76 │ │ ├── u=4252724345,1907423360&fm=76 │ │ ├── u=501294907,214168386&fm=76 │ │ ├── u=601555112,2505083350&fm=76 │ │ ├── u=693191152,2626022247&fm=76 │ │ ├── u=89957531,1663631515&fm=76 │ │ ├── ui_e37e61c.css │ │ ├── vchm(1).html │ │ ├── vchm.html │ │ └── wh.js.下载 │ └── manifest.json ├── src │ ├── App.js │ ├── containers │ │ ├── Bpmn.module.scss │ │ ├── Common.sass │ │ └── index.js │ ├── index.css │ ├── index.js │ └── sources │ │ └── xml.js └── yarn.lock ├── custom-elements ├── .editorconfig ├── .env ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── README.md ├── build │ ├── asset-manifest.json │ ├── favicon.svg │ ├── index.html │ ├── manifest.json │ ├── precache-manifest.a59e9c8a3d08bcc88dc2897573027171.js │ ├── service-worker.js │ └── static │ │ ├── css │ │ ├── 1.86342c71.chunk.css │ │ ├── 1.86342c71.chunk.css.map │ │ ├── main.796f7c08.chunk.css │ │ └── main.796f7c08.chunk.css.map │ │ ├── js │ │ ├── 1.5b3405d7.chunk.js │ │ ├── 1.5b3405d7.chunk.js.map │ │ ├── main.3eac6ec1.chunk.js │ │ ├── main.3eac6ec1.chunk.js.map │ │ ├── runtime~main.b44014e1.js │ │ └── runtime~main.b44014e1.js.map │ │ └── media │ │ ├── bpmn.27b5b190.svg │ │ └── bpmn.609860a7.eot ├── config-overrides.js ├── package-lock.json ├── package.json ├── public │ ├── favicon.svg │ ├── index.html │ └── manifest.json ├── src │ ├── App.js │ ├── containers │ │ ├── Bpmn.module.scss │ │ ├── Common.sass │ │ ├── index.js │ │ └── modeler │ │ │ ├── customElements │ │ │ ├── CustomElementFactory.js │ │ │ ├── CustomRenderer.js │ │ │ ├── FigureSource │ │ │ │ ├── CustomElements.scss │ │ │ │ ├── end.svg │ │ │ │ ├── index.js │ │ │ │ ├── menu-auto.jpg │ │ │ │ ├── service.svg │ │ │ │ ├── signal.svg │ │ │ │ ├── start.svg │ │ │ │ └── user.svg │ │ │ └── index.js │ │ │ └── index.js │ ├── index.css │ ├── index.js │ └── sources │ │ └── xml.js └── yarn.lock ├── custom-menu ├── .editorconfig ├── .env ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── README.md ├── build │ ├── asset-manifest.json │ ├── favicon.svg │ ├── index.html │ ├── manifest.json │ ├── precache-manifest.2e0652b1bd9cd3b4bbd667a7bfd9ffea.js │ ├── service-worker.js │ └── static │ │ ├── css │ │ ├── 1.5ee1f70a.chunk.css │ │ ├── 1.5ee1f70a.chunk.css.map │ │ ├── main.f5757536.chunk.css │ │ └── main.f5757536.chunk.css.map │ │ ├── js │ │ ├── 1.ae95c491.chunk.js │ │ ├── 1.ae95c491.chunk.js.map │ │ ├── main.a04b2167.chunk.js │ │ ├── main.a04b2167.chunk.js.map │ │ ├── runtime~main.19da3278.js │ │ └── runtime~main.19da3278.js.map │ │ └── media │ │ ├── bpmn.27b5b190.svg │ │ └── bpmn.609860a7.eot ├── config-overrides.js ├── package-lock.json ├── package.json ├── public │ ├── favicon.svg │ ├── index.html │ └── manifest.json ├── src │ ├── App.js │ ├── containers │ │ ├── Bpmn.module.scss │ │ ├── Common.sass │ │ ├── index.js │ │ └── modeler │ │ │ ├── customMenu │ │ │ ├── CustomReplaceMenu.js │ │ │ ├── CustomReplaceOptions.js │ │ │ └── index.js │ │ │ └── index.js │ ├── index.css │ ├── index.js │ └── sources │ │ └── xml.js └── yarn.lock ├── custom-palette ├── .editorconfig ├── .env ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── README.md ├── build │ ├── asset-manifest.json │ ├── favicon.svg │ ├── index.html │ ├── manifest.json │ ├── precache-manifest.c40a2c1297d6479b789d2b125adca67c.js │ ├── service-worker.js │ └── static │ │ ├── css │ │ ├── 1.f513cfd3.chunk.css │ │ ├── 1.f513cfd3.chunk.css.map │ │ ├── main.660e8f0e.chunk.css │ │ └── main.660e8f0e.chunk.css.map │ │ ├── js │ │ ├── 1.4b1d0d21.chunk.js │ │ ├── 1.4b1d0d21.chunk.js.map │ │ ├── main.1d13c36c.chunk.js │ │ ├── main.1d13c36c.chunk.js.map │ │ ├── runtime~main.d4118b90.js │ │ └── runtime~main.d4118b90.js.map │ │ └── media │ │ ├── bpmn.27b5b190.svg │ │ └── bpmn.609860a7.eot ├── config-overrides.js ├── package-lock.json ├── package.json ├── public │ ├── favicon.svg │ ├── index.html │ └── manifest.json ├── src │ ├── App.js │ ├── containers │ │ ├── Bpmn.module.scss │ │ ├── Common.sass │ │ ├── index.js │ │ └── modeler │ │ │ ├── customPalette │ │ │ ├── CustomPalette.js │ │ │ ├── index.js │ │ │ └── palette │ │ │ │ ├── Palette.js │ │ │ │ └── index.js │ │ │ └── index.js │ ├── index.css │ ├── index.js │ └── sources │ │ └── xml.js └── yarn.lock ├── custom-property ├── .editorconfig ├── .env ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── README.md ├── build │ ├── asset-manifest.json │ ├── favicon.svg │ ├── index.html │ ├── manifest.json │ ├── precache-manifest.ba3374d9d0a52b5ccbbcac40fd6dfe5c.js │ ├── service-worker.js │ └── static │ │ ├── css │ │ ├── 1.2495c365.chunk.css │ │ ├── 1.2495c365.chunk.css.map │ │ ├── main.1c2fea40.chunk.css │ │ └── main.1c2fea40.chunk.css.map │ │ ├── js │ │ ├── 1.a8d0a111.chunk.js │ │ ├── 1.a8d0a111.chunk.js.map │ │ ├── main.f86bb268.chunk.js │ │ ├── main.f86bb268.chunk.js.map │ │ ├── runtime~main.d2321c43.js │ │ └── runtime~main.d2321c43.js.map │ │ └── media │ │ ├── bpmn.27b5b190.svg │ │ └── bpmn.609860a7.eot ├── config-overrides.js ├── package-lock.json ├── package.json ├── public │ ├── favicon.svg │ ├── index.html │ └── manifest.json ├── src │ ├── App.js │ ├── containers │ │ ├── Bpmn.module.scss │ │ ├── Common.sass │ │ ├── index.js │ │ └── magic │ │ │ ├── MagicPropertiesProvider.js │ │ │ ├── index.js │ │ │ └── parts │ │ │ ├── CheckboxProps.js │ │ │ ├── DynamicSelectProps.js │ │ │ ├── InputTxtProps.js │ │ │ ├── SelectProps.js │ │ │ └── UserCustomProps.js │ ├── index.css │ ├── index.js │ └── sources │ │ └── xml.js └── yarn.lock ├── custom-toolbar ├── .editorconfig ├── .env ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── README.md ├── build │ ├── asset-manifest.json │ ├── favicon.svg │ ├── index.html │ ├── manifest.json │ ├── precache-manifest.ce61381bf4a13da25469c2ba01a4043f.js │ ├── service-worker.js │ └── static │ │ ├── css │ │ ├── 1.3f7b56af.chunk.css │ │ ├── 1.3f7b56af.chunk.css.map │ │ ├── main.e610d66d.chunk.css │ │ └── main.e610d66d.chunk.css.map │ │ ├── js │ │ ├── 1.511ca7ec.chunk.js │ │ ├── 1.511ca7ec.chunk.js.map │ │ ├── main.9ff758e9.chunk.js │ │ ├── main.9ff758e9.chunk.js.map │ │ ├── runtime~main.bc78d5c8.js │ │ └── runtime~main.bc78d5c8.js.map │ │ └── media │ │ ├── bpmn.27b5b190.svg │ │ ├── bpmn.609860a7.eot │ │ ├── download.ca6eea4c.svg │ │ ├── image.5e662422.svg │ │ ├── open.8f98f401.svg │ │ ├── redo.4cd7b1a2.svg │ │ ├── save.f5764213.svg │ │ ├── undo.58a8043d.svg │ │ ├── zoom.c6eb3314.svg │ │ ├── zoomIn.1ff4151b.svg │ │ └── zoomOut.7fae587c.svg ├── config-overrides.js ├── package-lock.json ├── package.json ├── public │ ├── favicon.svg │ ├── index.html │ └── manifest.json ├── src │ ├── App.js │ ├── components │ │ └── EditingTools │ │ │ ├── index.js │ │ │ └── index.module.scss │ ├── containers │ │ ├── Bpmn.module.scss │ │ ├── Common.sass │ │ ├── index.js │ │ └── magic │ │ │ ├── MagicPropertiesProvider.js │ │ │ ├── index.js │ │ │ └── parts │ │ │ ├── CheckboxProps.js │ │ │ ├── DynamicSelectProps.js │ │ │ ├── InputTxtProps.js │ │ │ ├── SelectProps.js │ │ │ └── UserCustomProps.js │ ├── index.css │ ├── index.js │ └── sources │ │ ├── icons │ │ ├── download.svg │ │ ├── image.svg │ │ ├── newDiagram.js │ │ ├── open.svg │ │ ├── redo.svg │ │ ├── save.svg │ │ ├── undo.svg │ │ ├── zoom.svg │ │ ├── zoomIn.svg │ │ └── zoomOut.svg │ │ └── xml.js └── yarn.lock ├── i18n ├── .editorconfig ├── .env ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── README.md ├── build │ ├── asset-manifest.json │ ├── favicon.svg │ ├── index.html │ ├── manifest.json │ ├── precache-manifest.0bcb5df12e4671d534f5c42461f7330f.js │ ├── service-worker.js │ └── static │ │ ├── css │ │ ├── 1.86a5e77a.chunk.css │ │ ├── 1.86a5e77a.chunk.css.map │ │ ├── main.718d2164.chunk.css │ │ └── main.718d2164.chunk.css.map │ │ ├── js │ │ ├── 1.e620bbde.chunk.js │ │ ├── 1.e620bbde.chunk.js.map │ │ ├── main.1204997c.chunk.js │ │ ├── main.1204997c.chunk.js.map │ │ ├── runtime~main.b2686733.js │ │ └── runtime~main.b2686733.js.map │ │ └── media │ │ ├── bpmn.27b5b190.svg │ │ └── bpmn.609860a7.eot ├── config-overrides.js ├── package-lock.json ├── package.json ├── public │ ├── favicon.svg │ ├── index.html │ └── manifest.json ├── src │ ├── App.js │ ├── containers │ │ ├── Bpmn.module.scss │ │ ├── Common.sass │ │ ├── index.js │ │ └── modeler │ │ │ ├── customTranslate │ │ │ ├── CustomTranslate.js │ │ │ ├── TranslationsGerman.js │ │ │ └── index.js │ │ │ └── index.js │ ├── index.css │ ├── index.js │ └── sources │ │ └── xml.js └── yarn.lock ├── keyboard ├── .editorconfig ├── .env ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── README.md ├── build │ ├── asset-manifest.json │ ├── favicon.svg │ ├── index.html │ ├── manifest.json │ ├── precache-manifest.a3ee6519b80b04f61428e0a201ca35c4.js │ ├── service-worker.js │ └── static │ │ ├── css │ │ ├── 1.75506485.chunk.css │ │ ├── 1.75506485.chunk.css.map │ │ ├── main.ffafc5cc.chunk.css │ │ └── main.ffafc5cc.chunk.css.map │ │ ├── js │ │ ├── 1.554224c8.chunk.js │ │ ├── 1.554224c8.chunk.js.map │ │ ├── main.15d84753.chunk.js │ │ ├── main.15d84753.chunk.js.map │ │ ├── runtime~main.250a5dbe.js │ │ └── runtime~main.250a5dbe.js.map │ │ └── media │ │ ├── bpmn.27b5b190.svg │ │ └── bpmn.609860a7.eot ├── config-overrides.js ├── package-lock.json ├── package.json ├── public │ ├── favicon.svg │ ├── index.html │ └── manifest.json ├── src │ ├── App.js │ ├── containers │ │ ├── Bpmn.module.scss │ │ ├── Common.sass │ │ ├── index.js │ │ └── modeler │ │ │ ├── index.js │ │ │ └── keyboard │ │ │ ├── BpmnKeyBindings.js │ │ │ └── index.js │ ├── index.css │ ├── index.js │ └── sources │ │ └── xml.js └── yarn.lock └── package-lock.json /README_CN.md: -------------------------------------------------------------------------------- 1 | # BPMN Editor 2 | 3 | 这是我在使用 [bpmn-js][16] 框架的时候整理的使用方法,更全更详细的使用方法请参考[官方例子][15] 4 | 5 | - [basic][1] : 基础用法 [演示地址][8] 6 | - [custom-menu][2] : 自定义菜单项 [演示地址][9] 7 | - [custom-palette][3] : 自定义左侧工具栏 [演示地址][10] 8 | - [custom-property][4] : 自定义属性栏 [演示地址][11] 9 | - [custom-toolbar][5] : 自定义顶部导航栏 [演示地址][12] 10 | - [custom-elements][17] : 自定义图源 [演示地址][18] 11 | - [i18n][6] : 国际化 [演示地址][13] 12 | - [keyboard][7] : 键盘快捷键 [演示地址][14] 13 | 14 | 15 | [1]: https://github.com/imdwpeng/bpmn-editor/blob/master/basic/src/containers 16 | [2]: https://github.com/imdwpeng/bpmn-editor/blob/master/custom-menu/src/containers 17 | [3]: https://github.com/imdwpeng/bpmn-editor/blob/master/custom-palette/src/containers 18 | [4]: https://github.com/imdwpeng/bpmn-editor/blob/master/custom-property/src/containers 19 | [5]: https://github.com/imdwpeng/bpmn-editor/blob/master/custom-toolbar/src/containers 20 | [6]: https://github.com/imdwpeng/bpmn-editor/blob/master/i18n/src/containers 21 | [7]: https://github.com/imdwpeng/bpmn-editor/blob/master/keyboard/src/containers 22 | [8]: https://dwpblog.site/bpmn-editor/basic/build/index.html 23 | [9]: https://dwpblog.site/bpmn-editor/custom-menu/build/index.html 24 | [10]: https://dwpblog.site/bpmn-editor/custom-palette/build/index.html 25 | [11]: https://dwpblog.site/bpmn-editor/custom-property/build/index.html 26 | [12]: https://dwpblog.site/bpmn-editor/custom-toolbar/build/index.html 27 | [13]: https://dwpblog.site/bpmn-editor/i18n/build/index.html 28 | [14]: https://dwpblog.site/bpmn-editor/keyboard/build/index.html 29 | [15]: https://github.com/bpmn-io/bpmn-js-examples 30 | [16]: https://github.com/bpmn-io/bpmn-js 31 | [17]: https://github.com/imdwpeng/bpmn-editor/blob/master/custom-elements/src/containers 32 | [18]: https://dwpblog.site/bpmn-editor/custom-elements/build/index.html 33 | -------------------------------------------------------------------------------- /basic/.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = true 14 | 15 | [Makefile] 16 | indent_style = tab 17 | -------------------------------------------------------------------------------- /basic/.env: -------------------------------------------------------------------------------- 1 | SKIP_PREFLIGHT_CHECK=true 2 | -------------------------------------------------------------------------------- /basic/.eslintignore: -------------------------------------------------------------------------------- 1 | dependencies/* 2 | 3 | webpack.config/* 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /basic/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | # /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /basic/README.md: -------------------------------------------------------------------------------- 1 | # Basic Editor 2 | -------------------------------------------------------------------------------- /basic/build/asset-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "main.css": "/bpmn-editor/basic/build/static/css/main.d50aecde.chunk.css", 3 | "main.js": "/bpmn-editor/basic/build/static/js/main.bd44791c.chunk.js", 4 | "main.js.map": "/bpmn-editor/basic/build/static/js/main.bd44791c.chunk.js.map", 5 | "static/css/1.5a09009c.chunk.css": "/bpmn-editor/basic/build/static/css/1.5a09009c.chunk.css", 6 | "static/js/1.c6a9b5f2.chunk.js": "/bpmn-editor/basic/build/static/js/1.c6a9b5f2.chunk.js", 7 | "static/js/1.c6a9b5f2.chunk.js.map": "/bpmn-editor/basic/build/static/js/1.c6a9b5f2.chunk.js.map", 8 | "runtime~main.js": "/bpmn-editor/basic/build/static/js/runtime~main.638e38a3.js", 9 | "runtime~main.js.map": "/bpmn-editor/basic/build/static/js/runtime~main.638e38a3.js.map", 10 | "static/css/1.5a09009c.chunk.css.map": "/bpmn-editor/basic/build/static/css/1.5a09009c.chunk.css.map", 11 | "static/media/Common.sass": "/bpmn-editor/basic/build/static/media/bpmn.27b5b190.svg", 12 | "static/css/main.d50aecde.chunk.css.map": "/bpmn-editor/basic/build/static/css/main.d50aecde.chunk.css.map", 13 | "index.html": "/bpmn-editor/basic/build/index.html", 14 | "precache-manifest.45069ca4d22eda47818def27f4099965.js": "/bpmn-editor/basic/build/precache-manifest.45069ca4d22eda47818def27f4099965.js", 15 | "service-worker.js": "/bpmn-editor/basic/build/service-worker.js" 16 | } -------------------------------------------------------------------------------- /basic/build/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /basic/build/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Bpmn Editor", 3 | "name": "Bpmn Editor", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /basic/build/precache-manifest.45069ca4d22eda47818def27f4099965.js: -------------------------------------------------------------------------------- 1 | self.__precacheManifest = [ 2 | { 3 | "revision": "609860a7b5830bab8c7843e1637290ba", 4 | "url": "/bpmn-editor/basic/build/static/media/bpmn.609860a7.eot" 5 | }, 6 | { 7 | "revision": "27b5b1904737f806dcb193a12156af9a", 8 | "url": "/bpmn-editor/basic/build/static/media/bpmn.27b5b190.svg" 9 | }, 10 | { 11 | "revision": "638e38a36edd3cec07af", 12 | "url": "/bpmn-editor/basic/build/static/js/runtime~main.638e38a3.js" 13 | }, 14 | { 15 | "revision": "bd44791c342d3c00fd22", 16 | "url": "/bpmn-editor/basic/build/static/js/main.bd44791c.chunk.js" 17 | }, 18 | { 19 | "revision": "c6a9b5f284f05625bcaa", 20 | "url": "/bpmn-editor/basic/build/static/js/1.c6a9b5f2.chunk.js" 21 | }, 22 | { 23 | "revision": "bd44791c342d3c00fd22", 24 | "url": "/bpmn-editor/basic/build/static/css/main.d50aecde.chunk.css" 25 | }, 26 | { 27 | "revision": "c6a9b5f284f05625bcaa", 28 | "url": "/bpmn-editor/basic/build/static/css/1.5a09009c.chunk.css" 29 | }, 30 | { 31 | "revision": "318c57d431a0a871ebcf890548bf4e04", 32 | "url": "/bpmn-editor/basic/build/index.html" 33 | } 34 | ]; -------------------------------------------------------------------------------- /basic/build/service-worker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Welcome to your Workbox-powered service worker! 3 | * 4 | * You'll need to register this file in your web app and you should 5 | * disable HTTP caching for this file too. 6 | * See https://goo.gl/nhQhGp 7 | * 8 | * The rest of the code is auto-generated. Please don't update this file 9 | * directly; instead, make changes to your Workbox build configuration 10 | * and re-run your build process. 11 | * See https://goo.gl/2aRDsh 12 | */ 13 | 14 | importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.2/workbox-sw.js"); 15 | 16 | importScripts( 17 | "/bpmn-editor/basic/build/precache-manifest.45069ca4d22eda47818def27f4099965.js" 18 | ); 19 | 20 | workbox.clientsClaim(); 21 | 22 | /** 23 | * The workboxSW.precacheAndRoute() method efficiently caches and responds to 24 | * requests for URLs in the manifest. 25 | * See https://goo.gl/S9QRab 26 | */ 27 | self.__precacheManifest = [].concat(self.__precacheManifest || []); 28 | workbox.precaching.suppressWarnings(); 29 | workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); 30 | 31 | workbox.routing.registerNavigationRoute("/bpmn-editor/basic/build/index.html", { 32 | 33 | blacklist: [/^\/_/,/\/[^\/]+\.[^\/]+$/], 34 | }); 35 | -------------------------------------------------------------------------------- /basic/build/static/js/runtime~main.638e38a3.js: -------------------------------------------------------------------------------- 1 | !function(e){function r(r){for(var n,i,l=r[0],f=r[1],a=r[2],c=0,s=[];c0.2%", 28 | "not dead", 29 | "not ie <= 11", 30 | "not op_mini all" 31 | ], 32 | "devDependencies": { 33 | "babel-eslint": "^9.0.0", 34 | "eslint": "^5.7.0", 35 | "eslint-config-airbnb": "^17.1.0", 36 | "eslint-plugin-compat": "^2.6.2", 37 | "eslint-plugin-import": "^2.14.0", 38 | "eslint-plugin-jsx-a11y": "^6.1.2", 39 | "eslint-plugin-react": "^7.11.1" 40 | }, 41 | "homepage": "https://dwpblog.site/bpmn-editor/basic/build" 42 | } 43 | -------------------------------------------------------------------------------- /basic/public/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /basic/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 22 | React App 23 | 24 | 25 | 28 |
29 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/0f000Dd29O15Im4ZGHXmF0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/0f000Dd29O15Im4ZGHXmF0.jpg -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/0f000ji9GQBTQif4KlS1n6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/0f000ji9GQBTQif4KlS1n6.jpg -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/1513734357_1880.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/1513734357_1880.jpg -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/201811070945058586.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/201811070945058586.png -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/201811231432284520.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/201811231432284520.jpg -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/201812181221437658.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/201812181221437658.png -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/20190104131811113.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/20190104131811113.jpeg -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/201901081453403307.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/201901081453403307.jpg -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/2_qq_24991133: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/2_qq_24991133 -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/3_cuihaiyang.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/3_cuihaiyang.jpg -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/3_inber.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/3_inber.jpg -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/3_lxue1986.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/3_lxue1986.jpg -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/3_qq_24991133.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/3_qq_24991133.jpg -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/3_wangjun5159.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/3_wangjun5159.jpg -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/3_wyswlp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/3_wyswlp.jpg -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/adx(1).php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/adx(1).php -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/adx(2).php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/adx(2).php -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/adx(3).php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/adx(3).php -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/adx(4).php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/adx(4).php -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/adx.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/adx.php -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/atom-one-dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Atom One Dark by Daniel Gamage 4 | Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax 5 | 6 | base: #282c34 7 | mono-1: #abb2bf 8 | mono-2: #818896 9 | mono-3: #5c6370 10 | hue-1: #56b6c2 11 | hue-2: #61aeee 12 | hue-3: #c678dd 13 | hue-4: #98c379 14 | hue-5: #e06c75 15 | hue-5-2: #be5046 16 | hue-6: #d19a66 17 | hue-6-2: #e6c07b 18 | 19 | */ 20 | 21 | .hljs { 22 | display: block; 23 | overflow-x: auto; 24 | padding: 0.5em; 25 | color: #abb2bf; 26 | background: #282c34; 27 | } 28 | 29 | .hljs-comment, 30 | .hljs-quote { 31 | color: #5c6370; 32 | font-style: italic; 33 | } 34 | 35 | .hljs-doctag, 36 | .hljs-keyword, 37 | .hljs-formula { 38 | color: #c678dd; 39 | } 40 | 41 | .hljs-section, 42 | .hljs-name, 43 | .hljs-selector-tag, 44 | .hljs-deletion, 45 | .hljs-subst { 46 | color: #e06c75; 47 | } 48 | 49 | .hljs-literal { 50 | color: #56b6c2; 51 | } 52 | 53 | .hljs-string, 54 | .hljs-regexp, 55 | .hljs-addition, 56 | .hljs-attribute, 57 | .hljs-meta-string { 58 | color: #98c379; 59 | } 60 | 61 | .hljs-built_in, 62 | .hljs-class .hljs-title { 63 | color: #e6c07b; 64 | } 65 | 66 | .hljs-attr, 67 | .hljs-variable, 68 | .hljs-template-variable, 69 | .hljs-type, 70 | .hljs-selector-class, 71 | .hljs-selector-attr, 72 | .hljs-selector-pseudo, 73 | .hljs-number { 74 | color: #d19a66; 75 | } 76 | 77 | .hljs-symbol, 78 | .hljs-bullet, 79 | .hljs-link, 80 | .hljs-meta, 81 | .hljs-selector-id, 82 | .hljs-title { 83 | color: #61aeee; 84 | } 85 | 86 | .hljs-emphasis { 87 | font-style: italic; 88 | } 89 | 90 | .hljs-strong { 91 | font-weight: bold; 92 | } 93 | 94 | .hljs-link { 95 | text-decoration: underline; 96 | } 97 | -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/bwordcom: -------------------------------------------------------------------------------- 1 | baidu_bw_1547623887962({"err_no":0,"errmsg":"","word_list":[],"sample_ids":"","fenlei_data":{"tu":"24004469_oem_dg","tm":"20181122001","tn":"24004469_oem_dg","ssp":"1","ssp2":"1","fenlei":"mv6quAkxTZn0IZRqnWfsnjfYPW-xUvNVgvwM0ZnqmHmLrAm4nWnduHfvPymzu6KYUHYznjD3nHDznW0snfKWUMw85HcYnj0YPjm4gvq-UNqbusK1TL0qnfK1TL0z5HD0IgF_5y9YIZK1rBtEmhkEuz4WTvw8Qh4-IaqLmy4MpMN8PHDdriq9TMwGmvk-Qvw-IA7GUZnEP16vPjTvnHR"},"param_info":{"sa":"","rsv_dl":"gh_pl_sl_csd","fenlei":"mv6quAkxTZn0IZRqnWfsnjfYPW-xUvNVgvwM0ZnqmHmLrAm4nWnduHfvPymzu6KYUHYznjD3nHDznW0snfKWUMw85HcYnj0YPjm4gvq-UNqbusK1TL0qnfK1TL0z5HD0IgF_5y9YIZK1rBtEmhkEuz4WTvw8Qh4-IaqLmy4MpMN8PHDdriq9TMwGmvk-Qvw-IA7GUZnEP16vPjTvnHR","r_tm":"20181122001","r_qid":"a678f9235e465f2f","r_from":"","r_tu":"24004469_oem_dg","r_url":"https:\/\/blog.csdn.net\/wangjun5159\/article\/details\/78647615","r_sp":"bword","r_tn":"24004469_oem_dg"}}) -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/chart-3456820cac.css: -------------------------------------------------------------------------------- 1 | div.chartjs canvas,div.chartjs div.chartjs-legend{display:inline-block}div.chartjs div.chartjs-legend span{display:inline-block;width:20px;height:20px;margin-right:10px;margin-bottom:-5px}div.chartjs div.chartjs-legend ul{list-style-type:none}div.chartjs div.chartjs-legend li{margin-top:10px} -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/copyright.js.下载: -------------------------------------------------------------------------------- 1 | !function(){var i=null;function t(){this.textData=null,this.htmlData=null,i=this}function d(t){if(140 ' 6 | +'' 7 | +'' 8 | +'' 9 | +'' 10 | +'';} 11 | else{result='' 12 | +'';} 21 | return result;} 22 | function checkIE(){var ua=navigator.userAgent;var reg=window['RegExp'];if(/msie (\d+\.\d)/i.test(ua)){return true;} 23 | return false;} 24 | function checkFlash(){var isIE=checkIE();if(isIE){var swf=new ActiveXObject('ShockwaveFlash.ShockwaveFlash');if(swf){return true;}}else{if(navigator.plugins&&navigator.plugins.length>0&&navigator.plugins["Shockwave Flash"]){return true;}} 25 | return false;} 26 | init();})();}catch(e){} -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/feedLoading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/feedLoading.gif -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/fixed-sidebar.js.下载: -------------------------------------------------------------------------------- 1 | !function(n,t,h){if(void 0===n.csdn&&(n.csdn={}),!jQuery)return;n.csdn.fixedSidebar=function(t){var i={targetBox:h(".persion_article"),mainBox:h("main"),sidebar:h("aside"),direction:"right",position:"fixed",top:0,bottom:0,zIndex:99,sidebarRightMargin:8,sidebarLeftMargin:15};t&&h.extend(i,t);var o=i.sidebar.width(),r=i.targetBox.offset().top,s=!0,a=i.sidebar.height();function e(){if("right"===i.direction)var t=i.mainBox.offset().left+i.mainBox.width()-h(n).scrollLeft()+parseInt(i.sidebarLeftMargin);else t=i.mainBox.offset().left-i.sidebar.width()-h(n).scrollLeft()-parseInt(i.sidebarRightMargin);var e;e=h(n).scrollTop(),i.targetBox.height()a?r=i.sidebar.height()-a+r:r-=a-i.sidebar.height(),a=i.sidebar.height()),r+i.sidebar.height()<=h(n).height()?ri.sidebar.height()?i.targetBox.height()<=h(n).height()&&i.targetBox.height()+r-e<=h(n).height()?i.sidebar.css({position:i.position,bottom:parseInt(i.bottom)+"px","z-index":parseInt(i.zIndex),left:t,width:o,top:"auto"}):i.targetBox.height()>h(n).height()&&i.targetBox.height()-e+i.mainBox.offset().top<=h(n).height()?i.sidebar.css({position:i.position,bottom:parseInt(i.bottom)+"px","z-index":parseInt(i.zIndex),left:t,width:o,top:"auto"}):i.sidebar.removeAttr("style"):i.sidebar.removeAttr("style"),s=!0}e(),h(n).on("scroll",function(){s&&(setTimeout(e,200),s=!1)}),h(n).on("resize",function(){e()})}}(window,document,jQuery); -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/fp.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/message-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/message-icon.png -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/money.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/money.png -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/o.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 | 11 |
12 |
13 |
14 | 15 |
16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/paging.css: -------------------------------------------------------------------------------- 1 | .ui-paging-container{color:#666;font-size:12px}.ui-paging-container ul{overflow:hidden;text-align:center}.ui-paging-container li,.ui-paging-container ul{list-style:none}.ui-paging-container li{display:inline-block;padding:3px 6px;margin-left:5px;color:#666}.ui-paging-container li.ui-pager{cursor:pointer;border:1px solid #ddd;border-radius:2px}.ui-paging-container li.focus,.ui-paging-container li.ui-pager:hover{background-color:#288df0;color:#FFF}.ui-paging-container li.ui-paging-ellipse{border:none}.ui-paging-container li.ui-paging-toolbar{padding:0}.ui-paging-container li.ui-paging-toolbar select{height:22px;border:1px solid #ddd;color:#666}.ui-paging-container li.ui-paging-toolbar input{vertical-align:top;line-height:20px;height:20px;padding:0;border:1px solid #ddd;text-align:center;width:30px;margin:0 0 0 5px}.ui-paging-container li.ui-paging-toolbar a{text-decoration:none;display:inline-block;height:20px;border:1px solid #ddd;vertical-align:top;border-radius:2px;line-height:20px;padding:0 3px;cursor:pointer;margin-left:5px;color:#666}.ui-paging-container li.ui-pager-disabled,.ui-paging-container li.ui-pager-disabled:hover{background-color:#f6f6f6;cursor:default;border:none;color:#ddd} -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/pr.js.下载: -------------------------------------------------------------------------------- 1 | window.__baidu_dup_jobruner = {}; 2 | try { 3 | var storage = window.localStorage; 4 | if (storage && storage.removeItem) { 5 | var time = new Date().getTime(); 6 | storage.setItem('___ds_storage__isblock', '0|' + time); 7 | } 8 | } 9 | catch (e) { 10 | } -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/saved_resource(7).html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/skin3-template-9b39979775.min.css: -------------------------------------------------------------------------------- 1 | header{background:url("images/bg-title.png?v4") no-repeat center;background-size:1920px auto;height:100px;}header div.title-box .title-blog a{color:#fff !important}header div.title-box .description{color:#b8b8b8}aside{float:left;}aside .aside-box .aside-content a:hover{color:#ca0c16 !important}main{float:right}.tool-box{top:48px} -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/skin3-template-fc7383b956.min.js.下载: -------------------------------------------------------------------------------- 1 | var toolBar=new ToolMeau({posType:"right",fixTop:48});$(function(){function o(){var o=t.offset().left;e.css("left",o+"px")}var e=$("div.meau-gotop-box"),t=$("div.tool-box"),i=null;$(window).resize(function(){i&&clearTimeout(i),i=setTimeout(o,400)}),o()}); -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=105945598,1736340773&fm=76: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=105945598,1736340773&fm=76 -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=114185379,1387215804&fm=76: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=114185379,1387215804&fm=76 -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=1154606453,2108161012&fm=76: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=1154606453,2108161012&fm=76 -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=1291684706,3513580152&fm=76: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=1291684706,3513580152&fm=76 -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=1510397832,119425028&fm=76: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=1510397832,119425028&fm=76 -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=1603335293,2455320230&fm=76: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=1603335293,2455320230&fm=76 -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=168067224,1668300395&fm=76: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=168067224,1668300395&fm=76 -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=1771139914,2393940649&fm=76: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=1771139914,2393940649&fm=76 -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=1869343208,1142556175&fm=76: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=1869343208,1142556175&fm=76 -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=286697597,3345667866&fm=76: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=286697597,3345667866&fm=76 -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=2878117677,1206458687&fm=76: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=2878117677,1206458687&fm=76 -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=292560263,2120845313&fm=76: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=292560263,2120845313&fm=76 -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=316930680,1897213278&fm=76: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=316930680,1897213278&fm=76 -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=3525986259,3889706038&fm=76: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=3525986259,3889706038&fm=76 -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=4160846947,4100080746&fm=76: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=4160846947,4100080746&fm=76 -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=4164110243,2307466266&fm=76: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=4164110243,2307466266&fm=76 -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=4252724345,1907423360&fm=76: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=4252724345,1907423360&fm=76 -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=501294907,214168386&fm=76: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=501294907,214168386&fm=76 -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=601555112,2505083350&fm=76: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=601555112,2505083350&fm=76 -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=693191152,2626022247&fm=76: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=693191152,2626022247&fm=76 -------------------------------------------------------------------------------- /basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=89957531,1663631515&fm=76: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/basic/public/javascript window获取iframe、iframe获取window、document - wangjun5159的专栏 - CSDN博客_files/u=89957531,1663631515&fm=76 -------------------------------------------------------------------------------- /basic/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Bpmn Editor", 3 | "name": "Bpmn Editor", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /basic/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import EditorBasic from './containers'; 3 | 4 | class App extends Component { 5 | render() { 6 | return ( 7 |
8 | 9 |
10 | ); 11 | } 12 | } 13 | 14 | export default App; 15 | -------------------------------------------------------------------------------- /basic/src/containers/Common.sass: -------------------------------------------------------------------------------- 1 | @import "~bpmn-js/dist/assets/diagram-js.css" 2 | @import "~bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css" 3 | -------------------------------------------------------------------------------- /basic/src/containers/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import BpmnModeler from 'bpmn-js/lib/Modeler'; 3 | import propertiesPanelModule from 'bpmn-js-properties-panel'; 4 | import propertiesProviderModule from 'bpmn-js-properties-panel/lib/provider/camunda'; 5 | import camundaModdleDescriptor from 'camunda-bpmn-moddle/resources/camunda'; 6 | import { diagramXML } from '../sources/xml'; 7 | import './Common.sass'; 8 | import styles from './Bpmn.module.scss'; 9 | 10 | export default class Bpmn extends Component { 11 | componentDidMount() { 12 | this.bpmnModeler = new BpmnModeler({ 13 | container: '#canvas', 14 | propertiesPanel: { 15 | parent: '#properties-panel' 16 | }, 17 | additionalModules: [propertiesPanelModule, propertiesProviderModule], 18 | moddleExtensions: { 19 | camunda: camundaModdleDescriptor 20 | } 21 | }); 22 | 23 | this.renderDiagram(diagramXML); 24 | } 25 | 26 | renderDiagram = (xml) => { 27 | this.bpmnModeler.importXML(xml, (err) => { 28 | if (err) { 29 | console.log('导入失败'); 30 | } else { 31 | console.log('导入成功'); 32 | } 33 | }); 34 | }; 35 | 36 | render() { 37 | return ( 38 |
39 |
40 |
45 |
46 | ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /basic/src/index.css: -------------------------------------------------------------------------------- 1 | html, 2 | body, 3 | #root { 4 | margin: 0; 5 | width: 100%; 6 | height: 100% 7 | } 8 | -------------------------------------------------------------------------------- /basic/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | 6 | ReactDOM.render(, document.getElementById('root')); 7 | -------------------------------------------------------------------------------- /basic/src/sources/xml.js: -------------------------------------------------------------------------------- 1 | export const diagramXML = ` 2 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | `; 23 | -------------------------------------------------------------------------------- /custom-elements/.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = true 14 | 15 | [Makefile] 16 | indent_style = tab 17 | -------------------------------------------------------------------------------- /custom-elements/.env: -------------------------------------------------------------------------------- 1 | SKIP_PREFLIGHT_CHECK=true 2 | -------------------------------------------------------------------------------- /custom-elements/.eslintignore: -------------------------------------------------------------------------------- 1 | dependencies/* 2 | 3 | webpack.config/* 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /custom-elements/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | # /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /custom-elements/README.md: -------------------------------------------------------------------------------- 1 | # Custom Elements 2 | 3 | ------ 4 | 5 | ![此处输入图片的描述][1] 6 | 7 | ## import custom elements 8 | 9 | ```js 10 | // import BpmnModeler from 'bpmn-js/lib/Modeler'; 11 | import BpmnModeler from './modeler'; 12 | 13 | this.bpmnModeler = new BpmnModeler({ 14 | container: '#canvas', 15 | propertiesPanel: { 16 | parent: '#properties-panel' 17 | }, 18 | additionalModules: [propertiesPanelModule, propertiesProviderModule], 19 | moddleExtensions: { 20 | camunda: camundaModdleDescriptor 21 | } 22 | }); 23 | ``` 24 | 25 | ## set custom elements 26 | 27 | [CustomElements][2]: A renderer that knows how to draw custom elements 28 | 29 | 30 | 31 | 32 | 33 | [1]: https://raw.githubusercontent.com/imdwpeng/photoGallery/master/bpmn/custom_elements.png 34 | [2]: https://github.com/imdwpeng/bpmn-editor/blob/master/custom-elements/src/containers/modeler 35 | -------------------------------------------------------------------------------- /custom-elements/build/asset-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "main.css": "/bpmn-editor/custom-elements/build/static/css/main.796f7c08.chunk.css", 3 | "main.js": "/bpmn-editor/custom-elements/build/static/js/main.3eac6ec1.chunk.js", 4 | "main.js.map": "/bpmn-editor/custom-elements/build/static/js/main.3eac6ec1.chunk.js.map", 5 | "static/css/1.86342c71.chunk.css": "/bpmn-editor/custom-elements/build/static/css/1.86342c71.chunk.css", 6 | "static/js/1.5b3405d7.chunk.js": "/bpmn-editor/custom-elements/build/static/js/1.5b3405d7.chunk.js", 7 | "static/js/1.5b3405d7.chunk.js.map": "/bpmn-editor/custom-elements/build/static/js/1.5b3405d7.chunk.js.map", 8 | "runtime~main.js": "/bpmn-editor/custom-elements/build/static/js/runtime~main.b44014e1.js", 9 | "runtime~main.js.map": "/bpmn-editor/custom-elements/build/static/js/runtime~main.b44014e1.js.map", 10 | "static/css/1.86342c71.chunk.css.map": "/bpmn-editor/custom-elements/build/static/css/1.86342c71.chunk.css.map", 11 | "static/media/Common.sass": "/bpmn-editor/custom-elements/build/static/media/bpmn.27b5b190.svg", 12 | "static/css/main.796f7c08.chunk.css.map": "/bpmn-editor/custom-elements/build/static/css/main.796f7c08.chunk.css.map", 13 | "index.html": "/bpmn-editor/custom-elements/build/index.html", 14 | "precache-manifest.a59e9c8a3d08bcc88dc2897573027171.js": "/bpmn-editor/custom-elements/build/precache-manifest.a59e9c8a3d08bcc88dc2897573027171.js", 15 | "service-worker.js": "/bpmn-editor/custom-elements/build/service-worker.js" 16 | } -------------------------------------------------------------------------------- /custom-elements/build/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /custom-elements/build/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Bpmn Editor", 3 | "name": "Bpmn Editor", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /custom-elements/build/precache-manifest.a59e9c8a3d08bcc88dc2897573027171.js: -------------------------------------------------------------------------------- 1 | self.__precacheManifest = [ 2 | { 3 | "revision": "609860a7b5830bab8c7843e1637290ba", 4 | "url": "/bpmn-editor/custom-elements/build/static/media/bpmn.609860a7.eot" 5 | }, 6 | { 7 | "revision": "27b5b1904737f806dcb193a12156af9a", 8 | "url": "/bpmn-editor/custom-elements/build/static/media/bpmn.27b5b190.svg" 9 | }, 10 | { 11 | "revision": "b44014e18379586cd7dd", 12 | "url": "/bpmn-editor/custom-elements/build/static/js/runtime~main.b44014e1.js" 13 | }, 14 | { 15 | "revision": "3eac6ec18a271dfc0bba", 16 | "url": "/bpmn-editor/custom-elements/build/static/js/main.3eac6ec1.chunk.js" 17 | }, 18 | { 19 | "revision": "5b3405d7435d1d0b0d68", 20 | "url": "/bpmn-editor/custom-elements/build/static/js/1.5b3405d7.chunk.js" 21 | }, 22 | { 23 | "revision": "3eac6ec18a271dfc0bba", 24 | "url": "/bpmn-editor/custom-elements/build/static/css/main.796f7c08.chunk.css" 25 | }, 26 | { 27 | "revision": "5b3405d7435d1d0b0d68", 28 | "url": "/bpmn-editor/custom-elements/build/static/css/1.86342c71.chunk.css" 29 | }, 30 | { 31 | "revision": "05e352dd548471c819782c7801d2e817", 32 | "url": "/bpmn-editor/custom-elements/build/index.html" 33 | } 34 | ]; -------------------------------------------------------------------------------- /custom-elements/build/service-worker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Welcome to your Workbox-powered service worker! 3 | * 4 | * You'll need to register this file in your web app and you should 5 | * disable HTTP caching for this file too. 6 | * See https://goo.gl/nhQhGp 7 | * 8 | * The rest of the code is auto-generated. Please don't update this file 9 | * directly; instead, make changes to your Workbox build configuration 10 | * and re-run your build process. 11 | * See https://goo.gl/2aRDsh 12 | */ 13 | 14 | importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.2/workbox-sw.js"); 15 | 16 | importScripts( 17 | "/bpmn-editor/custom-elements/build/precache-manifest.a59e9c8a3d08bcc88dc2897573027171.js" 18 | ); 19 | 20 | workbox.clientsClaim(); 21 | 22 | /** 23 | * The workboxSW.precacheAndRoute() method efficiently caches and responds to 24 | * requests for URLs in the manifest. 25 | * See https://goo.gl/S9QRab 26 | */ 27 | self.__precacheManifest = [].concat(self.__precacheManifest || []); 28 | workbox.precaching.suppressWarnings(); 29 | workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); 30 | 31 | workbox.routing.registerNavigationRoute("/bpmn-editor/custom-elements/build/index.html", { 32 | 33 | blacklist: [/^\/_/,/\/[^\/]+\.[^\/]+$/], 34 | }); 35 | -------------------------------------------------------------------------------- /custom-elements/build/static/js/runtime~main.b44014e1.js: -------------------------------------------------------------------------------- 1 | !function(e){function r(r){for(var n,i,l=r[0],f=r[1],a=r[2],c=0,s=[];c0.2%", 28 | "not dead", 29 | "not ie <= 11", 30 | "not op_mini all" 31 | ], 32 | "devDependencies": { 33 | "babel-eslint": "^9.0.0", 34 | "eslint": "^5.7.0", 35 | "eslint-config-airbnb": "^17.1.0", 36 | "eslint-plugin-compat": "^2.6.2", 37 | "eslint-plugin-import": "^2.14.0", 38 | "eslint-plugin-jsx-a11y": "^6.1.2", 39 | "eslint-plugin-react": "^7.11.1" 40 | }, 41 | "homepage": "https://dwpblog.site/bpmn-editor/custom-elements/build" 42 | } 43 | -------------------------------------------------------------------------------- /custom-elements/public/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /custom-elements/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 22 | React App 23 | 24 | 25 | 28 |
29 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /custom-elements/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Bpmn Editor", 3 | "name": "Bpmn Editor", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /custom-elements/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import EditorBasic from './containers'; 3 | 4 | class App extends Component { 5 | render() { 6 | return ( 7 |
8 | 9 |
10 | ); 11 | } 12 | } 13 | 14 | export default App; 15 | -------------------------------------------------------------------------------- /custom-elements/src/containers/Common.sass: -------------------------------------------------------------------------------- 1 | @import "~bpmn-js/dist/assets/diagram-js.css" 2 | @import "~bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css" 3 | -------------------------------------------------------------------------------- /custom-elements/src/containers/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import propertiesPanelModule from 'bpmn-js-properties-panel'; 3 | import propertiesProviderModule from 'bpmn-js-properties-panel/lib/provider/camunda'; 4 | import camundaModdleDescriptor from 'camunda-bpmn-moddle/resources/camunda'; 5 | import BpmnModeler from './modeler'; 6 | import { diagramXML } from '../sources/xml'; 7 | import './Common.sass'; 8 | import styles from './Bpmn.module.scss'; 9 | 10 | export default class Bpmn extends Component { 11 | componentDidMount() { 12 | this.bpmnModeler = new BpmnModeler({ 13 | container: '#canvas', 14 | propertiesPanel: { 15 | parent: '#properties-panel' 16 | }, 17 | additionalModules: [propertiesPanelModule, propertiesProviderModule], 18 | moddleExtensions: { 19 | camunda: camundaModdleDescriptor 20 | } 21 | }); 22 | 23 | this.renderDiagram(diagramXML); 24 | } 25 | 26 | renderDiagram = (xml) => { 27 | this.bpmnModeler.importXML(xml, (err) => { 28 | if (err) { 29 | console.log('导入失败'); 30 | } else { 31 | console.log('导入成功'); 32 | } 33 | }); 34 | }; 35 | 36 | render() { 37 | return ( 38 |
39 |
40 |
41 |
42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /custom-elements/src/containers/modeler/customElements/FigureSource/menu-auto.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imdwpeng/bpmn-editor/a7ce5cc511262d5803f27b2a514a0e5e76053397/custom-elements/src/containers/modeler/customElements/FigureSource/menu-auto.jpg -------------------------------------------------------------------------------- /custom-elements/src/containers/modeler/customElements/FigureSource/start.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /custom-elements/src/containers/modeler/customElements/FigureSource/user.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /custom-elements/src/containers/modeler/customElements/index.js: -------------------------------------------------------------------------------- 1 | import CustomRenderer from './CustomRenderer'; 2 | import CustomElementFactory from './CustomElementFactory'; 3 | 4 | export default { 5 | __init__: [ 6 | 'customRenderer' 7 | ], 8 | customRenderer: ['type', CustomRenderer], 9 | elementFactory: ['type', CustomElementFactory] 10 | }; 11 | -------------------------------------------------------------------------------- /custom-elements/src/containers/modeler/index.js: -------------------------------------------------------------------------------- 1 | import Modeler from 'bpmn-js/lib/Modeler'; 2 | 3 | import inherits from 'inherits'; 4 | 5 | import CustomElements from './customElements'; 6 | 7 | 8 | export default function CustomModeler(options) { 9 | Modeler.call(this, options); 10 | 11 | this._customElements = []; 12 | } 13 | 14 | inherits(CustomModeler, Modeler); 15 | 16 | CustomModeler.prototype._modules = [].concat( 17 | CustomModeler.prototype._modules, 18 | [ 19 | CustomElements 20 | ] 21 | ); 22 | -------------------------------------------------------------------------------- /custom-elements/src/index.css: -------------------------------------------------------------------------------- 1 | html, 2 | body, 3 | #root { 4 | margin: 0; 5 | width: 100%; 6 | height: 100% 7 | } 8 | -------------------------------------------------------------------------------- /custom-elements/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | 6 | ReactDOM.render(, document.getElementById('root')); 7 | -------------------------------------------------------------------------------- /custom-menu/.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = true 14 | 15 | [Makefile] 16 | indent_style = tab 17 | -------------------------------------------------------------------------------- /custom-menu/.env: -------------------------------------------------------------------------------- 1 | SKIP_PREFLIGHT_CHECK=true 2 | -------------------------------------------------------------------------------- /custom-menu/.eslintignore: -------------------------------------------------------------------------------- 1 | dependencies/* 2 | 3 | webpack.config/* 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /custom-menu/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | # /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /custom-menu/README.md: -------------------------------------------------------------------------------- 1 | # Custom Menu 2 | 3 | ------ 4 | 5 | ![此处输入图片的描述][1] 6 | 7 | ## import custom modeler 8 | 9 | ```js 10 | // import BpmnModeler from 'bpmn-js/lib/Modeler'; 11 | import BpmnModeler from './modeler'; 12 | 13 | this.bpmnModeler = new BpmnModeler({ 14 | container: '#canvas', 15 | propertiesPanel: { 16 | parent: '#properties-panel' 17 | }, 18 | additionalModules: [propertiesPanelModule, propertiesProviderModule], 19 | moddleExtensions: { 20 | camunda: camundaModdleDescriptor 21 | } 22 | }); 23 | ``` 24 | 25 | ## set custom replace options 26 | 27 | ```js 28 | export const START_EVENT = [ 29 | { 30 | label: 'Start Event', 31 | actionName: 'replace-with-none-start', 32 | className: 'bpmn-icon-start-event-none', 33 | target: { 34 | type: 'bpmn:StartEvent' 35 | } 36 | }, 37 | // { 38 | // label: 'Intermediate Throw Event', 39 | // actionName: 'replace-with-none-intermediate-throwing', 40 | // className: 'bpmn-icon-intermediate-event-none', 41 | // target: { 42 | // type: 'bpmn:IntermediateThrowEvent' 43 | // } 44 | // }, 45 | { 46 | label: 'End Event', 47 | actionName: 'replace-with-none-end', 48 | className: 'bpmn-icon-end-event-none', 49 | target: { 50 | type: 'bpmn:EndEvent' 51 | } 52 | } 53 | ... 54 | ] 55 | ... 56 | ``` 57 | 58 | 59 | 60 | 61 | [1]: https://raw.githubusercontent.com/imdwpeng/photoGallery/master/bpmn/custom_menu.png 62 | -------------------------------------------------------------------------------- /custom-menu/build/asset-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "main.css": "/bpmn-editor/custom-menu/build/static/css/main.f5757536.chunk.css", 3 | "main.js": "/bpmn-editor/custom-menu/build/static/js/main.a04b2167.chunk.js", 4 | "main.js.map": "/bpmn-editor/custom-menu/build/static/js/main.a04b2167.chunk.js.map", 5 | "static/css/1.5ee1f70a.chunk.css": "/bpmn-editor/custom-menu/build/static/css/1.5ee1f70a.chunk.css", 6 | "static/js/1.ae95c491.chunk.js": "/bpmn-editor/custom-menu/build/static/js/1.ae95c491.chunk.js", 7 | "static/js/1.ae95c491.chunk.js.map": "/bpmn-editor/custom-menu/build/static/js/1.ae95c491.chunk.js.map", 8 | "runtime~main.js": "/bpmn-editor/custom-menu/build/static/js/runtime~main.19da3278.js", 9 | "runtime~main.js.map": "/bpmn-editor/custom-menu/build/static/js/runtime~main.19da3278.js.map", 10 | "static/css/main.f5757536.chunk.css.map": "/bpmn-editor/custom-menu/build/static/css/main.f5757536.chunk.css.map", 11 | "static/media/Common.sass": "/bpmn-editor/custom-menu/build/static/media/bpmn.27b5b190.svg", 12 | "static/css/1.5ee1f70a.chunk.css.map": "/bpmn-editor/custom-menu/build/static/css/1.5ee1f70a.chunk.css.map", 13 | "index.html": "/bpmn-editor/custom-menu/build/index.html", 14 | "precache-manifest.2e0652b1bd9cd3b4bbd667a7bfd9ffea.js": "/bpmn-editor/custom-menu/build/precache-manifest.2e0652b1bd9cd3b4bbd667a7bfd9ffea.js", 15 | "service-worker.js": "/bpmn-editor/custom-menu/build/service-worker.js" 16 | } -------------------------------------------------------------------------------- /custom-menu/build/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /custom-menu/build/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Bpmn Editor", 3 | "name": "Bpmn Editor", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /custom-menu/build/precache-manifest.2e0652b1bd9cd3b4bbd667a7bfd9ffea.js: -------------------------------------------------------------------------------- 1 | self.__precacheManifest = [ 2 | { 3 | "revision": "609860a7b5830bab8c7843e1637290ba", 4 | "url": "/bpmn-editor/custom-menu/build/static/media/bpmn.609860a7.eot" 5 | }, 6 | { 7 | "revision": "27b5b1904737f806dcb193a12156af9a", 8 | "url": "/bpmn-editor/custom-menu/build/static/media/bpmn.27b5b190.svg" 9 | }, 10 | { 11 | "revision": "19da3278f035d7473523", 12 | "url": "/bpmn-editor/custom-menu/build/static/js/runtime~main.19da3278.js" 13 | }, 14 | { 15 | "revision": "a04b2167d5102ef90e47", 16 | "url": "/bpmn-editor/custom-menu/build/static/js/main.a04b2167.chunk.js" 17 | }, 18 | { 19 | "revision": "ae95c491f8cc62405609", 20 | "url": "/bpmn-editor/custom-menu/build/static/js/1.ae95c491.chunk.js" 21 | }, 22 | { 23 | "revision": "a04b2167d5102ef90e47", 24 | "url": "/bpmn-editor/custom-menu/build/static/css/main.f5757536.chunk.css" 25 | }, 26 | { 27 | "revision": "ae95c491f8cc62405609", 28 | "url": "/bpmn-editor/custom-menu/build/static/css/1.5ee1f70a.chunk.css" 29 | }, 30 | { 31 | "revision": "739ee88d378897002c389d6f81ddc253", 32 | "url": "/bpmn-editor/custom-menu/build/index.html" 33 | } 34 | ]; -------------------------------------------------------------------------------- /custom-menu/build/service-worker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Welcome to your Workbox-powered service worker! 3 | * 4 | * You'll need to register this file in your web app and you should 5 | * disable HTTP caching for this file too. 6 | * See https://goo.gl/nhQhGp 7 | * 8 | * The rest of the code is auto-generated. Please don't update this file 9 | * directly; instead, make changes to your Workbox build configuration 10 | * and re-run your build process. 11 | * See https://goo.gl/2aRDsh 12 | */ 13 | 14 | importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.2/workbox-sw.js"); 15 | 16 | importScripts( 17 | "/bpmn-editor/custom-menu/build/precache-manifest.2e0652b1bd9cd3b4bbd667a7bfd9ffea.js" 18 | ); 19 | 20 | workbox.clientsClaim(); 21 | 22 | /** 23 | * The workboxSW.precacheAndRoute() method efficiently caches and responds to 24 | * requests for URLs in the manifest. 25 | * See https://goo.gl/S9QRab 26 | */ 27 | self.__precacheManifest = [].concat(self.__precacheManifest || []); 28 | workbox.precaching.suppressWarnings(); 29 | workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); 30 | 31 | workbox.routing.registerNavigationRoute("/bpmn-editor/custom-menu/build/index.html", { 32 | 33 | blacklist: [/^\/_/,/\/[^\/]+\.[^\/]+$/], 34 | }); 35 | -------------------------------------------------------------------------------- /custom-menu/build/static/js/runtime~main.19da3278.js: -------------------------------------------------------------------------------- 1 | !function(e){function r(r){for(var n,i,l=r[0],f=r[1],a=r[2],c=0,s=[];c0.2%", 28 | "not dead", 29 | "not ie <= 11", 30 | "not op_mini all" 31 | ], 32 | "devDependencies": { 33 | "babel-eslint": "^9.0.0", 34 | "eslint": "^5.7.0", 35 | "eslint-config-airbnb": "^17.1.0", 36 | "eslint-plugin-compat": "^2.6.2", 37 | "eslint-plugin-import": "^2.14.0", 38 | "eslint-plugin-jsx-a11y": "^6.1.2", 39 | "eslint-plugin-react": "^7.11.1" 40 | }, 41 | "homepage": "https://dwpblog.site/bpmn-editor/custom-menu/build" 42 | } 43 | -------------------------------------------------------------------------------- /custom-menu/public/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /custom-menu/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 22 | React App 23 | 24 | 25 | 28 |
29 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /custom-menu/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Bpmn Editor", 3 | "name": "Bpmn Editor", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /custom-menu/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import EditorBasic from './containers'; 3 | 4 | class App extends Component { 5 | render() { 6 | return ( 7 |
8 | 9 |
10 | ); 11 | } 12 | } 13 | 14 | export default App; 15 | -------------------------------------------------------------------------------- /custom-menu/src/containers/Common.sass: -------------------------------------------------------------------------------- 1 | @import "~bpmn-js/dist/assets/diagram-js.css" 2 | @import "~bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css" 3 | -------------------------------------------------------------------------------- /custom-menu/src/containers/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import propertiesPanelModule from 'bpmn-js-properties-panel'; 3 | import propertiesProviderModule from 'bpmn-js-properties-panel/lib/provider/camunda'; 4 | import camundaModdleDescriptor from 'camunda-bpmn-moddle/resources/camunda'; 5 | import BpmnModeler from './modeler'; 6 | import { diagramXML } from '../sources/xml'; 7 | import './Common.sass'; 8 | import styles from './Bpmn.module.scss'; 9 | 10 | export default class Bpmn extends Component { 11 | componentDidMount() { 12 | this.bpmnModeler = new BpmnModeler({ 13 | container: '#canvas', 14 | propertiesPanel: { 15 | parent: '#properties-panel' 16 | }, 17 | additionalModules: [propertiesPanelModule, propertiesProviderModule], 18 | moddleExtensions: { 19 | camunda: camundaModdleDescriptor 20 | } 21 | }); 22 | 23 | this.renderDiagram(diagramXML); 24 | } 25 | 26 | renderDiagram = (xml) => { 27 | this.bpmnModeler.importXML(xml, (err) => { 28 | if (err) { 29 | console.log('导入失败'); 30 | } else { 31 | console.log('导入成功'); 32 | } 33 | }); 34 | }; 35 | 36 | render() { 37 | return ( 38 |
39 |
40 |
41 |
42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /custom-menu/src/containers/modeler/customMenu/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Eric 3 | * @Date: 2018-06-07 13:20:24 4 | * @Last Modified by: Eric 5 | * @Last Modified time: 2018-06-07 13:20:44 6 | * @功能:自定义菜单中的条目 7 | */ 8 | 9 | import CustomReplaceMenu from './CustomReplaceMenu'; 10 | 11 | export default { 12 | __init__: ['replaceMenuProvider'], 13 | replaceMenuProvider: ['type', CustomReplaceMenu] 14 | }; 15 | -------------------------------------------------------------------------------- /custom-menu/src/containers/modeler/index.js: -------------------------------------------------------------------------------- 1 | import Modeler from 'bpmn-js/lib/Modeler'; 2 | 3 | import inherits from 'inherits'; 4 | 5 | import CustomMenu from './customMenu'; 6 | 7 | export default function CustomModeler(options) { 8 | Modeler.call(this, options); 9 | 10 | this.customElements = []; 11 | } 12 | 13 | inherits(CustomModeler, Modeler); 14 | 15 | CustomModeler.prototype._modules = [].concat( 16 | CustomModeler.prototype._modules, 17 | [ 18 | CustomMenu 19 | ] 20 | ); 21 | -------------------------------------------------------------------------------- /custom-menu/src/index.css: -------------------------------------------------------------------------------- 1 | html, 2 | body, 3 | #root { 4 | margin: 0; 5 | width: 100%; 6 | height: 100% 7 | } 8 | -------------------------------------------------------------------------------- /custom-menu/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | 6 | ReactDOM.render(, document.getElementById('root')); 7 | -------------------------------------------------------------------------------- /custom-menu/src/sources/xml.js: -------------------------------------------------------------------------------- 1 | export const diagramXML = ` 2 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | `; 23 | -------------------------------------------------------------------------------- /custom-palette/.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = true 14 | 15 | [Makefile] 16 | indent_style = tab 17 | -------------------------------------------------------------------------------- /custom-palette/.env: -------------------------------------------------------------------------------- 1 | SKIP_PREFLIGHT_CHECK=true 2 | -------------------------------------------------------------------------------- /custom-palette/.eslintignore: -------------------------------------------------------------------------------- 1 | dependencies/* 2 | 3 | webpack.config/* 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /custom-palette/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | # /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /custom-palette/build/asset-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "main.css": "/bpmn-editor/custom-palette/build/static/css/main.660e8f0e.chunk.css", 3 | "main.js": "/bpmn-editor/custom-palette/build/static/js/main.1d13c36c.chunk.js", 4 | "main.js.map": "/bpmn-editor/custom-palette/build/static/js/main.1d13c36c.chunk.js.map", 5 | "static/css/1.f513cfd3.chunk.css": "/bpmn-editor/custom-palette/build/static/css/1.f513cfd3.chunk.css", 6 | "static/js/1.4b1d0d21.chunk.js": "/bpmn-editor/custom-palette/build/static/js/1.4b1d0d21.chunk.js", 7 | "static/js/1.4b1d0d21.chunk.js.map": "/bpmn-editor/custom-palette/build/static/js/1.4b1d0d21.chunk.js.map", 8 | "runtime~main.js": "/bpmn-editor/custom-palette/build/static/js/runtime~main.d4118b90.js", 9 | "runtime~main.js.map": "/bpmn-editor/custom-palette/build/static/js/runtime~main.d4118b90.js.map", 10 | "static/css/main.660e8f0e.chunk.css.map": "/bpmn-editor/custom-palette/build/static/css/main.660e8f0e.chunk.css.map", 11 | "static/media/Common.sass": "/bpmn-editor/custom-palette/build/static/media/bpmn.27b5b190.svg", 12 | "static/css/1.f513cfd3.chunk.css.map": "/bpmn-editor/custom-palette/build/static/css/1.f513cfd3.chunk.css.map", 13 | "index.html": "/bpmn-editor/custom-palette/build/index.html", 14 | "precache-manifest.c40a2c1297d6479b789d2b125adca67c.js": "/bpmn-editor/custom-palette/build/precache-manifest.c40a2c1297d6479b789d2b125adca67c.js", 15 | "service-worker.js": "/bpmn-editor/custom-palette/build/service-worker.js" 16 | } -------------------------------------------------------------------------------- /custom-palette/build/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /custom-palette/build/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Bpmn Editor", 3 | "name": "Bpmn Editor", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /custom-palette/build/precache-manifest.c40a2c1297d6479b789d2b125adca67c.js: -------------------------------------------------------------------------------- 1 | self.__precacheManifest = [ 2 | { 3 | "revision": "609860a7b5830bab8c7843e1637290ba", 4 | "url": "/bpmn-editor/custom-palette/build/static/media/bpmn.609860a7.eot" 5 | }, 6 | { 7 | "revision": "27b5b1904737f806dcb193a12156af9a", 8 | "url": "/bpmn-editor/custom-palette/build/static/media/bpmn.27b5b190.svg" 9 | }, 10 | { 11 | "revision": "d4118b900ab001434c76", 12 | "url": "/bpmn-editor/custom-palette/build/static/js/runtime~main.d4118b90.js" 13 | }, 14 | { 15 | "revision": "1d13c36c7d2d1cb483b3", 16 | "url": "/bpmn-editor/custom-palette/build/static/js/main.1d13c36c.chunk.js" 17 | }, 18 | { 19 | "revision": "4b1d0d21666d1b855e28", 20 | "url": "/bpmn-editor/custom-palette/build/static/js/1.4b1d0d21.chunk.js" 21 | }, 22 | { 23 | "revision": "1d13c36c7d2d1cb483b3", 24 | "url": "/bpmn-editor/custom-palette/build/static/css/main.660e8f0e.chunk.css" 25 | }, 26 | { 27 | "revision": "4b1d0d21666d1b855e28", 28 | "url": "/bpmn-editor/custom-palette/build/static/css/1.f513cfd3.chunk.css" 29 | }, 30 | { 31 | "revision": "92ef5d54ed25f863aac573b1408753e0", 32 | "url": "/bpmn-editor/custom-palette/build/index.html" 33 | } 34 | ]; -------------------------------------------------------------------------------- /custom-palette/build/service-worker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Welcome to your Workbox-powered service worker! 3 | * 4 | * You'll need to register this file in your web app and you should 5 | * disable HTTP caching for this file too. 6 | * See https://goo.gl/nhQhGp 7 | * 8 | * The rest of the code is auto-generated. Please don't update this file 9 | * directly; instead, make changes to your Workbox build configuration 10 | * and re-run your build process. 11 | * See https://goo.gl/2aRDsh 12 | */ 13 | 14 | importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.2/workbox-sw.js"); 15 | 16 | importScripts( 17 | "/bpmn-editor/custom-palette/build/precache-manifest.c40a2c1297d6479b789d2b125adca67c.js" 18 | ); 19 | 20 | workbox.clientsClaim(); 21 | 22 | /** 23 | * The workboxSW.precacheAndRoute() method efficiently caches and responds to 24 | * requests for URLs in the manifest. 25 | * See https://goo.gl/S9QRab 26 | */ 27 | self.__precacheManifest = [].concat(self.__precacheManifest || []); 28 | workbox.precaching.suppressWarnings(); 29 | workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); 30 | 31 | workbox.routing.registerNavigationRoute("/bpmn-editor/custom-palette/build/index.html", { 32 | 33 | blacklist: [/^\/_/,/\/[^\/]+\.[^\/]+$/], 34 | }); 35 | -------------------------------------------------------------------------------- /custom-palette/build/static/js/runtime~main.d4118b90.js: -------------------------------------------------------------------------------- 1 | !function(e){function r(r){for(var n,i,l=r[0],f=r[1],a=r[2],c=0,s=[];c0.2%", 28 | "not dead", 29 | "not ie <= 11", 30 | "not op_mini all" 31 | ], 32 | "devDependencies": { 33 | "babel-eslint": "^9.0.0", 34 | "eslint": "^5.7.0", 35 | "eslint-config-airbnb": "^17.1.0", 36 | "eslint-plugin-compat": "^2.6.2", 37 | "eslint-plugin-import": "^2.14.0", 38 | "eslint-plugin-jsx-a11y": "^6.1.2", 39 | "eslint-plugin-react": "^7.11.1" 40 | }, 41 | "homepage": "https://dwpblog.site/bpmn-editor/custom-palette/build" 42 | } 43 | -------------------------------------------------------------------------------- /custom-palette/public/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /custom-palette/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 22 | React App 23 | 24 | 25 | 28 |
29 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /custom-palette/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Bpmn Editor", 3 | "name": "Bpmn Editor", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /custom-palette/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import EditorBasic from './containers'; 3 | 4 | class App extends Component { 5 | render() { 6 | return ( 7 |
8 | 9 |
10 | ); 11 | } 12 | } 13 | 14 | export default App; 15 | -------------------------------------------------------------------------------- /custom-palette/src/containers/Common.sass: -------------------------------------------------------------------------------- 1 | @import "~bpmn-js/dist/assets/diagram-js.css" 2 | @import "~bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css" 3 | -------------------------------------------------------------------------------- /custom-palette/src/containers/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import propertiesPanelModule from 'bpmn-js-properties-panel'; 3 | import propertiesProviderModule from 'bpmn-js-properties-panel/lib/provider/camunda'; 4 | import camundaModdleDescriptor from 'camunda-bpmn-moddle/resources/camunda'; 5 | import BpmnModeler from './modeler'; 6 | import { diagramXML } from '../sources/xml'; 7 | import './Common.sass'; 8 | import styles from './Bpmn.module.scss'; 9 | 10 | export default class Bpmn extends Component { 11 | componentDidMount() { 12 | this.bpmnModeler = new BpmnModeler({ 13 | container: '#canvas', 14 | propertiesPanel: { 15 | parent: '#properties-panel' 16 | }, 17 | additionalModules: [propertiesPanelModule, propertiesProviderModule], 18 | moddleExtensions: { 19 | camunda: camundaModdleDescriptor 20 | } 21 | }); 22 | 23 | this.renderDiagram(diagramXML); 24 | } 25 | 26 | renderDiagram = (xml) => { 27 | this.bpmnModeler.importXML(xml, (err) => { 28 | if (err) { 29 | console.log('导入失败'); 30 | } else { 31 | console.log('导入成功'); 32 | } 33 | }); 34 | }; 35 | 36 | render() { 37 | return ( 38 |
39 |
40 |
45 |
46 | ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /custom-palette/src/containers/modeler/customPalette/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Eric 3 | * @Date: 2018-06-07 13:19:34 4 | * @Last Modified by: Eric 5 | * @Last Modified time: 2018-06-07 13:20:02 6 | * @功能:自定义左侧面板 7 | */ 8 | import PaletteModule from './palette'; 9 | import CustomPalette from './CustomPalette'; 10 | 11 | export default { 12 | __depends__: [ 13 | PaletteModule 14 | ], 15 | __init__: ['paletteProvider'], 16 | paletteProvider: ['type', CustomPalette] 17 | }; 18 | -------------------------------------------------------------------------------- /custom-palette/src/containers/modeler/customPalette/palette/index.js: -------------------------------------------------------------------------------- 1 | import Palette from './Palette'; 2 | 3 | export default { 4 | __init__: ['palette'], 5 | palette: ['type', Palette] 6 | }; 7 | -------------------------------------------------------------------------------- /custom-palette/src/containers/modeler/index.js: -------------------------------------------------------------------------------- 1 | import Modeler from 'bpmn-js/lib/Modeler'; 2 | 3 | import inherits from 'inherits'; 4 | 5 | import CustomPalette from './customPalette'; 6 | 7 | export default function CustomModeler(options) { 8 | Modeler.call(this, options); 9 | 10 | this.customElements = []; 11 | } 12 | 13 | inherits(CustomModeler, Modeler); 14 | 15 | CustomModeler.prototype._modules = [].concat( 16 | CustomModeler.prototype._modules, 17 | [ 18 | CustomPalette 19 | ] 20 | ); 21 | -------------------------------------------------------------------------------- /custom-palette/src/index.css: -------------------------------------------------------------------------------- 1 | html, 2 | body, 3 | #root { 4 | margin: 0; 5 | width: 100%; 6 | height: 100% 7 | } 8 | -------------------------------------------------------------------------------- /custom-palette/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | 6 | ReactDOM.render(, document.getElementById('root')); 7 | -------------------------------------------------------------------------------- /custom-palette/src/sources/xml.js: -------------------------------------------------------------------------------- 1 | export const diagramXML = ` 2 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | `; 23 | -------------------------------------------------------------------------------- /custom-property/.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = true 14 | 15 | [Makefile] 16 | indent_style = tab 17 | -------------------------------------------------------------------------------- /custom-property/.env: -------------------------------------------------------------------------------- 1 | SKIP_PREFLIGHT_CHECK=true 2 | -------------------------------------------------------------------------------- /custom-property/.eslintignore: -------------------------------------------------------------------------------- 1 | dependencies/* 2 | 3 | webpack.config/* 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /custom-property/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | # /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /custom-property/build/asset-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "main.css": "/bpmn-editor/custom-property/build/static/css/main.1c2fea40.chunk.css", 3 | "main.js": "/bpmn-editor/custom-property/build/static/js/main.f86bb268.chunk.js", 4 | "main.js.map": "/bpmn-editor/custom-property/build/static/js/main.f86bb268.chunk.js.map", 5 | "static/css/1.2495c365.chunk.css": "/bpmn-editor/custom-property/build/static/css/1.2495c365.chunk.css", 6 | "static/js/1.a8d0a111.chunk.js": "/bpmn-editor/custom-property/build/static/js/1.a8d0a111.chunk.js", 7 | "static/js/1.a8d0a111.chunk.js.map": "/bpmn-editor/custom-property/build/static/js/1.a8d0a111.chunk.js.map", 8 | "runtime~main.js": "/bpmn-editor/custom-property/build/static/js/runtime~main.d2321c43.js", 9 | "runtime~main.js.map": "/bpmn-editor/custom-property/build/static/js/runtime~main.d2321c43.js.map", 10 | "static/css/main.1c2fea40.chunk.css.map": "/bpmn-editor/custom-property/build/static/css/main.1c2fea40.chunk.css.map", 11 | "static/media/Common.sass": "/bpmn-editor/custom-property/build/static/media/bpmn.27b5b190.svg", 12 | "static/css/1.2495c365.chunk.css.map": "/bpmn-editor/custom-property/build/static/css/1.2495c365.chunk.css.map", 13 | "index.html": "/bpmn-editor/custom-property/build/index.html", 14 | "precache-manifest.ba3374d9d0a52b5ccbbcac40fd6dfe5c.js": "/bpmn-editor/custom-property/build/precache-manifest.ba3374d9d0a52b5ccbbcac40fd6dfe5c.js", 15 | "service-worker.js": "/bpmn-editor/custom-property/build/service-worker.js" 16 | } -------------------------------------------------------------------------------- /custom-property/build/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /custom-property/build/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Bpmn Editor", 3 | "name": "Bpmn Editor", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /custom-property/build/precache-manifest.ba3374d9d0a52b5ccbbcac40fd6dfe5c.js: -------------------------------------------------------------------------------- 1 | self.__precacheManifest = [ 2 | { 3 | "revision": "609860a7b5830bab8c7843e1637290ba", 4 | "url": "/bpmn-editor/custom-property/build/static/media/bpmn.609860a7.eot" 5 | }, 6 | { 7 | "revision": "27b5b1904737f806dcb193a12156af9a", 8 | "url": "/bpmn-editor/custom-property/build/static/media/bpmn.27b5b190.svg" 9 | }, 10 | { 11 | "revision": "d2321c4388ba4a6670bc", 12 | "url": "/bpmn-editor/custom-property/build/static/js/runtime~main.d2321c43.js" 13 | }, 14 | { 15 | "revision": "f86bb26823d5971013d5", 16 | "url": "/bpmn-editor/custom-property/build/static/js/main.f86bb268.chunk.js" 17 | }, 18 | { 19 | "revision": "a8d0a111d34e11db46d9", 20 | "url": "/bpmn-editor/custom-property/build/static/js/1.a8d0a111.chunk.js" 21 | }, 22 | { 23 | "revision": "f86bb26823d5971013d5", 24 | "url": "/bpmn-editor/custom-property/build/static/css/main.1c2fea40.chunk.css" 25 | }, 26 | { 27 | "revision": "a8d0a111d34e11db46d9", 28 | "url": "/bpmn-editor/custom-property/build/static/css/1.2495c365.chunk.css" 29 | }, 30 | { 31 | "revision": "c43bef509fdb8e148bcb07349ea410a0", 32 | "url": "/bpmn-editor/custom-property/build/index.html" 33 | } 34 | ]; -------------------------------------------------------------------------------- /custom-property/build/service-worker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Welcome to your Workbox-powered service worker! 3 | * 4 | * You'll need to register this file in your web app and you should 5 | * disable HTTP caching for this file too. 6 | * See https://goo.gl/nhQhGp 7 | * 8 | * The rest of the code is auto-generated. Please don't update this file 9 | * directly; instead, make changes to your Workbox build configuration 10 | * and re-run your build process. 11 | * See https://goo.gl/2aRDsh 12 | */ 13 | 14 | importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.2/workbox-sw.js"); 15 | 16 | importScripts( 17 | "/bpmn-editor/custom-property/build/precache-manifest.ba3374d9d0a52b5ccbbcac40fd6dfe5c.js" 18 | ); 19 | 20 | workbox.clientsClaim(); 21 | 22 | /** 23 | * The workboxSW.precacheAndRoute() method efficiently caches and responds to 24 | * requests for URLs in the manifest. 25 | * See https://goo.gl/S9QRab 26 | */ 27 | self.__precacheManifest = [].concat(self.__precacheManifest || []); 28 | workbox.precaching.suppressWarnings(); 29 | workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); 30 | 31 | workbox.routing.registerNavigationRoute("/bpmn-editor/custom-property/build/index.html", { 32 | 33 | blacklist: [/^\/_/,/\/[^\/]+\.[^\/]+$/], 34 | }); 35 | -------------------------------------------------------------------------------- /custom-property/build/static/js/runtime~main.d2321c43.js: -------------------------------------------------------------------------------- 1 | !function(e){function r(r){for(var n,i,l=r[0],f=r[1],p=r[2],c=0,s=[];c0.2%", 28 | "not dead", 29 | "not ie <= 11", 30 | "not op_mini all" 31 | ], 32 | "devDependencies": { 33 | "babel-eslint": "^9.0.0", 34 | "eslint": "^5.7.0", 35 | "eslint-config-airbnb": "^17.1.0", 36 | "eslint-plugin-compat": "^2.6.2", 37 | "eslint-plugin-import": "^2.14.0", 38 | "eslint-plugin-jsx-a11y": "^6.1.2", 39 | "eslint-plugin-react": "^7.11.1" 40 | }, 41 | "homepage": "https://dwpblog.site/bpmn-editor/custom-property/build" 42 | } 43 | -------------------------------------------------------------------------------- /custom-property/public/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /custom-property/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 22 | React App 23 | 24 | 25 | 28 |
29 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /custom-property/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Bpmn Editor", 3 | "name": "Bpmn Editor", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /custom-property/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import EditorBasic from './containers'; 3 | 4 | class App extends Component { 5 | render() { 6 | return ( 7 |
8 | 9 |
10 | ); 11 | } 12 | } 13 | 14 | export default App; 15 | -------------------------------------------------------------------------------- /custom-property/src/containers/Common.sass: -------------------------------------------------------------------------------- 1 | @import "~bpmn-js/dist/assets/diagram-js.css" 2 | @import "~bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css" 3 | -------------------------------------------------------------------------------- /custom-property/src/containers/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import BpmnModeler from 'bpmn-js/lib/Modeler'; 3 | import propertiesPanelModule from 'bpmn-js-properties-panel'; 4 | import camundaModdleDescriptor from 'camunda-bpmn-moddle/resources/camunda'; 5 | import propertiesProviderModule from './magic'; 6 | import { diagramXML } from '../sources/xml'; 7 | import './Common.sass'; 8 | import styles from './Bpmn.module.scss'; 9 | 10 | export default class Bpmn extends Component { 11 | componentDidMount() { 12 | this.bpmnModeler = new BpmnModeler({ 13 | container: '#canvas', 14 | propertiesPanel: { 15 | parent: '#properties-panel' 16 | }, 17 | additionalModules: [propertiesPanelModule, propertiesProviderModule], 18 | moddleExtensions: { 19 | camunda: camundaModdleDescriptor 20 | } 21 | }); 22 | 23 | this.renderDiagram(diagramXML); 24 | } 25 | 26 | renderDiagram = (xml) => { 27 | this.bpmnModeler.importXML(xml, (err) => { 28 | if (err) { 29 | console.log('导入失败'); 30 | } else { 31 | console.log('导入成功'); 32 | } 33 | }); 34 | }; 35 | 36 | render() { 37 | return ( 38 |
39 |
40 |
45 |
46 | ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /custom-property/src/containers/magic/MagicPropertiesProvider.js: -------------------------------------------------------------------------------- 1 | import inherits from 'inherits'; 2 | import PropertiesActivator from 'bpmn-js-properties-panel/lib/PropertiesActivator'; 3 | 4 | import inputTxtProps from './parts/InputTxtProps'; 5 | import checkboxProps from './parts/CheckboxProps'; 6 | import selectProps from './parts/SelectProps'; 7 | import userCustomProps from './parts/UserCustomProps'; 8 | import DynamicSelectProps from './parts/DynamicSelectProps'; 9 | 10 | function createGeneralTabGroups(element, bpmnFactory, elementRegistry, translate) { 11 | const generalGroup = { 12 | id: 'general', 13 | label: '', 14 | entries: [] 15 | }; 16 | 17 | inputTxtProps(generalGroup, element, bpmnFactory, translate); 18 | checkboxProps(generalGroup, element, bpmnFactory, translate); 19 | selectProps(generalGroup, element, bpmnFactory, translate); 20 | userCustomProps(generalGroup, element, bpmnFactory, translate); 21 | DynamicSelectProps(generalGroup, element, bpmnFactory, translate); 22 | 23 | return [generalGroup]; 24 | } 25 | 26 | export default function MagicPropertiesProvider(eventBus, bpmnFactory, elementRegistry, translate) { 27 | PropertiesActivator.call(this, eventBus); 28 | this.getTabs = function (element) { 29 | const gengralTab = { 30 | id: 'general', 31 | label: '基本信息', 32 | groups: createGeneralTabGroups(element, bpmnFactory, elementRegistry, translate) 33 | }; 34 | 35 | return [gengralTab]; 36 | }; 37 | } 38 | 39 | inherits(MagicPropertiesProvider, PropertiesActivator); 40 | -------------------------------------------------------------------------------- /custom-property/src/containers/magic/index.js: -------------------------------------------------------------------------------- 1 | import MagicPropertiesProvider from './MagicPropertiesProvider'; 2 | 3 | export default { 4 | __init__: ['propertiesProvider'], 5 | propertiesProvider: ['type', MagicPropertiesProvider] 6 | }; 7 | -------------------------------------------------------------------------------- /custom-property/src/containers/magic/parts/CheckboxProps.js: -------------------------------------------------------------------------------- 1 | import entryFactory from 'bpmn-js-properties-panel/lib/factory/EntryFactory'; 2 | 3 | export default function (group, element, bpmnFactory, translate) { 4 | const checkboxGroup = entryFactory.checkbox({ 5 | id: 'customCheckbox', 6 | label: translate('自定义复选框'), 7 | modelProperty: 'camunda:customCheckbox' 8 | }); 9 | 10 | group.entries.push(checkboxGroup); 11 | } 12 | -------------------------------------------------------------------------------- /custom-property/src/containers/magic/parts/InputTxtProps.js: -------------------------------------------------------------------------------- 1 | import entryFactory from 'bpmn-js-properties-panel/lib/factory/EntryFactory'; 2 | 3 | export default function (group, element, bpmnFactory, translate) { 4 | group.entries.push(entryFactory.textField({ 5 | id: 'customTxt', 6 | label: translate('自定义输入框'), 7 | modelProperty: 'camunda:customTxt' 8 | })); 9 | } 10 | -------------------------------------------------------------------------------- /custom-property/src/containers/magic/parts/SelectProps.js: -------------------------------------------------------------------------------- 1 | import entryFactory from 'bpmn-js-properties-panel/lib/factory/EntryFactory'; 2 | import { getBusinessObject } from 'bpmn-js/lib/util/ModelUtil'; 3 | import cmdHelper from 'bpmn-js-properties-panel/lib/helper/CmdHelper'; 4 | 5 | const options = [ 6 | { name: 'html', value: 'html' }, 7 | { name: 'js', value: 'js' }, 8 | { name: 'css', value: 'css' } 9 | ]; 10 | 11 | function getSelect(element) { 12 | const bo = getBusinessObject(element); 13 | const selectedOption = bo.get('camunda:customSelect'); 14 | 15 | return selectedOption; 16 | } 17 | 18 | function setSelect(element, value) { 19 | const obj = {}; 20 | obj['camunda:customSelect'] = value.customSelect; 21 | 22 | return obj; 23 | } 24 | 25 | export default function (group, element, bpmnFactory, translate) { 26 | const selectGroup = entryFactory.selectBox({ 27 | id: 'customSelect', 28 | label: translate('自定义下拉框'), 29 | selectOptions: options, 30 | modelProperty: 'customSelect', 31 | get(el) { 32 | return { 33 | customSelect: getSelect(el) 34 | }; 35 | }, 36 | set(el, value) { 37 | const bo = getBusinessObject(el); 38 | const props = setSelect(el, value); 39 | 40 | return cmdHelper.updateBusinessObject(element, bo, props); 41 | } 42 | }); 43 | 44 | group.entries.push(selectGroup); 45 | } 46 | -------------------------------------------------------------------------------- /custom-property/src/containers/magic/parts/UserCustomProps.js: -------------------------------------------------------------------------------- 1 | import entryFactory from 'bpmn-js-properties-panel/lib/factory/EntryFactory'; 2 | import { is } from 'bpmn-js/lib/util/ModelUtil'; 3 | 4 | export default function (group, element, bpmnFactory, translate) { 5 | if (!is(element, 'bpmn:UserTask')) return; 6 | 7 | group.entries.push(entryFactory.textField({ 8 | id: 'userCustom', 9 | label: translate('用户任务'), 10 | modelProperty: 'camunda:userCustom' 11 | })); 12 | } 13 | -------------------------------------------------------------------------------- /custom-property/src/index.css: -------------------------------------------------------------------------------- 1 | html, 2 | body, 3 | #root { 4 | margin: 0; 5 | width: 100%; 6 | height: 100% 7 | } 8 | -------------------------------------------------------------------------------- /custom-property/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | 6 | ReactDOM.render(, document.getElementById('root')); 7 | -------------------------------------------------------------------------------- /custom-property/src/sources/xml.js: -------------------------------------------------------------------------------- 1 | export const diagramXML = ` 2 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | `; 23 | -------------------------------------------------------------------------------- /custom-toolbar/.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = true 14 | 15 | [Makefile] 16 | indent_style = tab 17 | -------------------------------------------------------------------------------- /custom-toolbar/.env: -------------------------------------------------------------------------------- 1 | SKIP_PREFLIGHT_CHECK=true 2 | -------------------------------------------------------------------------------- /custom-toolbar/.eslintignore: -------------------------------------------------------------------------------- 1 | dependencies/* 2 | 3 | webpack.config/* 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /custom-toolbar/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | # /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /custom-toolbar/README.md: -------------------------------------------------------------------------------- 1 | # Custom Toolbar 2 | 3 | ------ 4 | 5 | ![此处输入图片的描述][1] 6 | 7 | ## import custom toolbar components and set events of toolbar 8 | 9 | ```js 10 | import EditingTools from '../components/EditingTools'; 11 | 12 | ... 13 | // eg. save 14 | handleSave = () => { 15 | this.bpmnModeler.saveXML({ format: true }, (err, xml) => { 16 | console.log(xml); 17 | }); 18 | }; 19 | ... 20 | 21 | // render toolbar 22 | this.handleZoom(0.1)} 30 | onZoomOut={() => this.handleZoom(-0.1)} 31 | onZoomReset={() => this.handleZoom()} 32 | /> 33 | ``` 34 | 35 | ## set component of toolbar 36 | 37 | 38 | 39 | 40 | [1]: https://raw.githubusercontent.com/imdwpeng/photoGallery/master/bpmn/custom_toolbar.png 41 | -------------------------------------------------------------------------------- /custom-toolbar/build/asset-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "main.css": "/bpmn-editor/custom-toolbar/build/static/css/main.e610d66d.chunk.css", 3 | "main.js": "/bpmn-editor/custom-toolbar/build/static/js/main.9ff758e9.chunk.js", 4 | "main.js.map": "/bpmn-editor/custom-toolbar/build/static/js/main.9ff758e9.chunk.js.map", 5 | "static/css/1.3f7b56af.chunk.css": "/bpmn-editor/custom-toolbar/build/static/css/1.3f7b56af.chunk.css", 6 | "static/js/1.511ca7ec.chunk.js": "/bpmn-editor/custom-toolbar/build/static/js/1.511ca7ec.chunk.js", 7 | "static/js/1.511ca7ec.chunk.js.map": "/bpmn-editor/custom-toolbar/build/static/js/1.511ca7ec.chunk.js.map", 8 | "runtime~main.js": "/bpmn-editor/custom-toolbar/build/static/js/runtime~main.bc78d5c8.js", 9 | "runtime~main.js.map": "/bpmn-editor/custom-toolbar/build/static/js/runtime~main.bc78d5c8.js.map", 10 | "static/media/index.module.scss": "/bpmn-editor/custom-toolbar/build/static/media/zoomIn.1ff4151b.svg", 11 | "static/media/Common.sass": "/bpmn-editor/custom-toolbar/build/static/media/bpmn.27b5b190.svg", 12 | "static/css/main.e610d66d.chunk.css.map": "/bpmn-editor/custom-toolbar/build/static/css/main.e610d66d.chunk.css.map", 13 | "static/css/1.3f7b56af.chunk.css.map": "/bpmn-editor/custom-toolbar/build/static/css/1.3f7b56af.chunk.css.map", 14 | "index.html": "/bpmn-editor/custom-toolbar/build/index.html", 15 | "precache-manifest.ce61381bf4a13da25469c2ba01a4043f.js": "/bpmn-editor/custom-toolbar/build/precache-manifest.ce61381bf4a13da25469c2ba01a4043f.js", 16 | "service-worker.js": "/bpmn-editor/custom-toolbar/build/service-worker.js" 17 | } -------------------------------------------------------------------------------- /custom-toolbar/build/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /custom-toolbar/build/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Bpmn Editor", 3 | "name": "Bpmn Editor", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /custom-toolbar/build/service-worker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Welcome to your Workbox-powered service worker! 3 | * 4 | * You'll need to register this file in your web app and you should 5 | * disable HTTP caching for this file too. 6 | * See https://goo.gl/nhQhGp 7 | * 8 | * The rest of the code is auto-generated. Please don't update this file 9 | * directly; instead, make changes to your Workbox build configuration 10 | * and re-run your build process. 11 | * See https://goo.gl/2aRDsh 12 | */ 13 | 14 | importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.2/workbox-sw.js"); 15 | 16 | importScripts( 17 | "/bpmn-editor/custom-toolbar/build/precache-manifest.ce61381bf4a13da25469c2ba01a4043f.js" 18 | ); 19 | 20 | workbox.clientsClaim(); 21 | 22 | /** 23 | * The workboxSW.precacheAndRoute() method efficiently caches and responds to 24 | * requests for URLs in the manifest. 25 | * See https://goo.gl/S9QRab 26 | */ 27 | self.__precacheManifest = [].concat(self.__precacheManifest || []); 28 | workbox.precaching.suppressWarnings(); 29 | workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); 30 | 31 | workbox.routing.registerNavigationRoute("/bpmn-editor/custom-toolbar/build/index.html", { 32 | 33 | blacklist: [/^\/_/,/\/[^\/]+\.[^\/]+$/], 34 | }); 35 | -------------------------------------------------------------------------------- /custom-toolbar/build/static/js/runtime~main.bc78d5c8.js: -------------------------------------------------------------------------------- 1 | !function(e){function r(r){for(var n,i,l=r[0],f=r[1],a=r[2],c=0,s=[];c -------------------------------------------------------------------------------- /custom-toolbar/build/static/media/image.5e662422.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /custom-toolbar/build/static/media/open.8f98f401.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /custom-toolbar/build/static/media/redo.4cd7b1a2.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /custom-toolbar/build/static/media/save.f5764213.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /custom-toolbar/build/static/media/undo.58a8043d.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /custom-toolbar/build/static/media/zoom.c6eb3314.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /custom-toolbar/build/static/media/zoomIn.1ff4151b.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /custom-toolbar/build/static/media/zoomOut.7fae587c.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /custom-toolbar/config-overrides.js: -------------------------------------------------------------------------------- 1 | const { injectBabelPlugin } = require('react-app-rewired'); 2 | const rewireLess = require('react-app-rewire-less'); 3 | 4 | module.exports = function override(config, env) { 5 | config = injectBabelPlugin( 6 | ['import', { libraryName: 'antd', libraryDirectory: 'es', style: true }], // change importing css to less 7 | config, 8 | ); 9 | config = rewireLess.withLoaderOptions({ 10 | javascriptEnabled: true 11 | })(config, env); 12 | return config; 13 | }; 14 | -------------------------------------------------------------------------------- /custom-toolbar/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "workflow-bpmn-editor", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "antd": "^3.10.1", 7 | "babel-plugin-import": "^1.10.0", 8 | "bpmn-js": "^2.5.2", 9 | "bpmn-js-properties-panel": "^0.26.2", 10 | "camunda-bpmn-moddle": "^3.0.0", 11 | "node-sass": "^4.9.4", 12 | "react": "^16.5.2", 13 | "react-app-rewire-less": "^2.1.3", 14 | "react-app-rewired": "^1.6.2", 15 | "react-dom": "^16.5.2", 16 | "react-router-dom": "^4.3.1", 17 | "react-scripts": "2.0.5", 18 | "sass-loader": "^7.1.0" 19 | }, 20 | "scripts": { 21 | "start": "react-app-rewired start", 22 | "build": "react-app-rewired build", 23 | "test": "react-app-rewired test", 24 | "eject": "react-scripts eject" 25 | }, 26 | "browserslist": [ 27 | ">0.2%", 28 | "not dead", 29 | "not ie <= 11", 30 | "not op_mini all" 31 | ], 32 | "devDependencies": { 33 | "babel-eslint": "^9.0.0", 34 | "eslint": "^5.7.0", 35 | "eslint-config-airbnb": "^17.1.0", 36 | "eslint-plugin-compat": "^2.6.2", 37 | "eslint-plugin-import": "^2.14.0", 38 | "eslint-plugin-jsx-a11y": "^6.1.2", 39 | "eslint-plugin-react": "^7.11.1" 40 | }, 41 | "homepage": "https://dwpblog.site/bpmn-editor/custom-toolbar/build" 42 | } 43 | -------------------------------------------------------------------------------- /custom-toolbar/public/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /custom-toolbar/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 22 | React App 23 | 24 | 25 | 28 |
29 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /custom-toolbar/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Bpmn Editor", 3 | "name": "Bpmn Editor", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /custom-toolbar/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import EditorBasic from './containers'; 3 | 4 | class App extends Component { 5 | render() { 6 | return ( 7 |
8 | 9 |
10 | ); 11 | } 12 | } 13 | 14 | export default App; 15 | -------------------------------------------------------------------------------- /custom-toolbar/src/containers/Common.sass: -------------------------------------------------------------------------------- 1 | @import "~bpmn-js/dist/assets/diagram-js.css" 2 | @import "~bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css" 3 | -------------------------------------------------------------------------------- /custom-toolbar/src/containers/magic/MagicPropertiesProvider.js: -------------------------------------------------------------------------------- 1 | import inherits from 'inherits'; 2 | import PropertiesActivator from 'bpmn-js-properties-panel/lib/PropertiesActivator'; 3 | 4 | import inputTxtProps from './parts/InputTxtProps'; 5 | import checkboxProps from './parts/CheckboxProps'; 6 | import selectProps from './parts/SelectProps'; 7 | import userCustomProps from './parts/UserCustomProps'; 8 | import DynamicSelectProps from './parts/DynamicSelectProps'; 9 | 10 | function createGeneralTabGroups(element, bpmnFactory, elementRegistry, translate) { 11 | const generalGroup = { 12 | id: 'general', 13 | label: '', 14 | entries: [] 15 | }; 16 | 17 | inputTxtProps(generalGroup, element, bpmnFactory, translate); 18 | checkboxProps(generalGroup, element, bpmnFactory, translate); 19 | selectProps(generalGroup, element, bpmnFactory, translate); 20 | userCustomProps(generalGroup, element, bpmnFactory, translate); 21 | DynamicSelectProps(generalGroup, element, bpmnFactory, translate); 22 | 23 | return [generalGroup]; 24 | } 25 | 26 | export default function MagicPropertiesProvider(eventBus, bpmnFactory, elementRegistry, translate) { 27 | PropertiesActivator.call(this, eventBus); 28 | this.getTabs = function (element) { 29 | const gengralTab = { 30 | id: 'general', 31 | label: '基本信息', 32 | groups: createGeneralTabGroups(element, bpmnFactory, elementRegistry, translate) 33 | }; 34 | 35 | return [gengralTab]; 36 | }; 37 | } 38 | 39 | inherits(MagicPropertiesProvider, PropertiesActivator); 40 | -------------------------------------------------------------------------------- /custom-toolbar/src/containers/magic/index.js: -------------------------------------------------------------------------------- 1 | import MagicPropertiesProvider from './MagicPropertiesProvider'; 2 | 3 | export default { 4 | __init__: ['propertiesProvider'], 5 | propertiesProvider: ['type', MagicPropertiesProvider] 6 | }; 7 | -------------------------------------------------------------------------------- /custom-toolbar/src/containers/magic/parts/CheckboxProps.js: -------------------------------------------------------------------------------- 1 | import entryFactory from 'bpmn-js-properties-panel/lib/factory/EntryFactory'; 2 | 3 | export default function (group, element, bpmnFactory, translate) { 4 | const checkboxGroup = entryFactory.checkbox({ 5 | id: 'customCheckbox', 6 | label: translate('自定义复选框'), 7 | modelProperty: 'camunda:customCheckbox' 8 | }); 9 | 10 | group.entries.push(checkboxGroup); 11 | } 12 | -------------------------------------------------------------------------------- /custom-toolbar/src/containers/magic/parts/InputTxtProps.js: -------------------------------------------------------------------------------- 1 | import entryFactory from 'bpmn-js-properties-panel/lib/factory/EntryFactory'; 2 | 3 | export default function (group, element, bpmnFactory, translate) { 4 | group.entries.push(entryFactory.textField({ 5 | id: 'customTxt', 6 | label: translate('自定义输入框'), 7 | modelProperty: 'camunda:customTxt' 8 | })); 9 | } 10 | -------------------------------------------------------------------------------- /custom-toolbar/src/containers/magic/parts/SelectProps.js: -------------------------------------------------------------------------------- 1 | import entryFactory from 'bpmn-js-properties-panel/lib/factory/EntryFactory'; 2 | import { getBusinessObject } from 'bpmn-js/lib/util/ModelUtil'; 3 | import cmdHelper from 'bpmn-js-properties-panel/lib/helper/CmdHelper'; 4 | 5 | const options = [ 6 | { name: 'html', value: 'html' }, 7 | { name: 'js', value: 'js' }, 8 | { name: 'css', value: 'css' } 9 | ]; 10 | 11 | function getSelect(element) { 12 | const bo = getBusinessObject(element); 13 | const selectedOption = bo.get('camunda:customSelect'); 14 | 15 | return selectedOption; 16 | } 17 | 18 | function setSelect(element, value) { 19 | const obj = {}; 20 | obj['camunda:customSelect'] = value.customSelect; 21 | 22 | return obj; 23 | } 24 | 25 | export default function (group, element, bpmnFactory, translate) { 26 | const selectGroup = entryFactory.selectBox({ 27 | id: 'customSelect', 28 | label: translate('自定义下拉框'), 29 | selectOptions: options, 30 | modelProperty: 'customSelect', 31 | get(el) { 32 | return { 33 | customSelect: getSelect(el) 34 | }; 35 | }, 36 | set(el, value) { 37 | const bo = getBusinessObject(el); 38 | const props = setSelect(el, value); 39 | 40 | return cmdHelper.updateBusinessObject(element, bo, props); 41 | } 42 | }); 43 | 44 | group.entries.push(selectGroup); 45 | } 46 | -------------------------------------------------------------------------------- /custom-toolbar/src/containers/magic/parts/UserCustomProps.js: -------------------------------------------------------------------------------- 1 | import entryFactory from 'bpmn-js-properties-panel/lib/factory/EntryFactory'; 2 | import { is } from 'bpmn-js/lib/util/ModelUtil'; 3 | 4 | export default function (group, element, bpmnFactory, translate) { 5 | if (!is(element, 'bpmn:UserTask')) return; 6 | 7 | group.entries.push(entryFactory.textField({ 8 | id: 'userCustom', 9 | label: translate('用户任务'), 10 | modelProperty: 'camunda:userCustom' 11 | })); 12 | } 13 | -------------------------------------------------------------------------------- /custom-toolbar/src/index.css: -------------------------------------------------------------------------------- 1 | html, 2 | body, 3 | #root { 4 | margin: 0; 5 | width: 100%; 6 | height: 100% 7 | } 8 | -------------------------------------------------------------------------------- /custom-toolbar/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | 6 | ReactDOM.render(, document.getElementById('root')); 7 | -------------------------------------------------------------------------------- /custom-toolbar/src/sources/icons/download.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /custom-toolbar/src/sources/icons/image.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /custom-toolbar/src/sources/icons/newDiagram.js: -------------------------------------------------------------------------------- 1 | export const diagramXML = ` 2 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | `; 23 | -------------------------------------------------------------------------------- /custom-toolbar/src/sources/icons/open.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /custom-toolbar/src/sources/icons/redo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /custom-toolbar/src/sources/icons/save.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /custom-toolbar/src/sources/icons/undo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /custom-toolbar/src/sources/icons/zoom.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /custom-toolbar/src/sources/icons/zoomIn.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /custom-toolbar/src/sources/icons/zoomOut.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /custom-toolbar/src/sources/xml.js: -------------------------------------------------------------------------------- 1 | export const diagramXML = ` 2 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | `; 23 | -------------------------------------------------------------------------------- /i18n/.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = true 14 | 15 | [Makefile] 16 | indent_style = tab 17 | -------------------------------------------------------------------------------- /i18n/.env: -------------------------------------------------------------------------------- 1 | SKIP_PREFLIGHT_CHECK=true 2 | -------------------------------------------------------------------------------- /i18n/.eslintignore: -------------------------------------------------------------------------------- 1 | dependencies/* 2 | 3 | webpack.config/* 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /i18n/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | # /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /i18n/README.md: -------------------------------------------------------------------------------- 1 | # i18n 2 | 3 | ------ 4 | 5 | ![此处输入图片的描述][1] 6 | 7 | ## import custom modeler 8 | 9 | ```js 10 | // import BpmnModeler from 'bpmn-js/lib/Modeler'; 11 | import BpmnModeler from './modeler'; 12 | 13 | this.bpmnModeler = new BpmnModeler({ 14 | container: '#canvas', 15 | propertiesPanel: { 16 | parent: '#properties-panel' 17 | }, 18 | additionalModules: [propertiesPanelModule, propertiesProviderModule], 19 | moddleExtensions: { 20 | camunda: camundaModdleDescriptor 21 | } 22 | }); 23 | ``` 24 | 25 | ## set translation options 26 | 27 | ```js 28 | export default { 29 | ... 30 | 'Send Task': '发送任务', 31 | 'Receive Task': '接收任务', 32 | 'User Task': '用户任务', 33 | 'Manual Task': '手动任务', 34 | 'Business Rule Task': '业务规则任务', 35 | 'Service Task': '归档任务', 36 | 'Script Task': '脚本任务', 37 | 'Call Activity': '调用活动', 38 | 'Sub Process (collapsed)': '子进程(收起)', 39 | 'Sub Process (expanded)': '子进程(展开)', 40 | ... 41 | }; 42 | ``` 43 | 44 | 45 | 46 | 47 | [1]: https://raw.githubusercontent.com/imdwpeng/photoGallery/master/bpmn/i18n.png 48 | -------------------------------------------------------------------------------- /i18n/build/asset-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "main.css": "/bpmn-editor/i18n/build/static/css/main.718d2164.chunk.css", 3 | "main.js": "/bpmn-editor/i18n/build/static/js/main.1204997c.chunk.js", 4 | "main.js.map": "/bpmn-editor/i18n/build/static/js/main.1204997c.chunk.js.map", 5 | "static/css/1.86a5e77a.chunk.css": "/bpmn-editor/i18n/build/static/css/1.86a5e77a.chunk.css", 6 | "static/js/1.e620bbde.chunk.js": "/bpmn-editor/i18n/build/static/js/1.e620bbde.chunk.js", 7 | "static/js/1.e620bbde.chunk.js.map": "/bpmn-editor/i18n/build/static/js/1.e620bbde.chunk.js.map", 8 | "runtime~main.js": "/bpmn-editor/i18n/build/static/js/runtime~main.b2686733.js", 9 | "runtime~main.js.map": "/bpmn-editor/i18n/build/static/js/runtime~main.b2686733.js.map", 10 | "static/css/main.718d2164.chunk.css.map": "/bpmn-editor/i18n/build/static/css/main.718d2164.chunk.css.map", 11 | "static/media/Common.sass": "/bpmn-editor/i18n/build/static/media/bpmn.27b5b190.svg", 12 | "static/css/1.86a5e77a.chunk.css.map": "/bpmn-editor/i18n/build/static/css/1.86a5e77a.chunk.css.map", 13 | "index.html": "/bpmn-editor/i18n/build/index.html", 14 | "precache-manifest.0bcb5df12e4671d534f5c42461f7330f.js": "/bpmn-editor/i18n/build/precache-manifest.0bcb5df12e4671d534f5c42461f7330f.js", 15 | "service-worker.js": "/bpmn-editor/i18n/build/service-worker.js" 16 | } -------------------------------------------------------------------------------- /i18n/build/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /i18n/build/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Bpmn Editor", 3 | "name": "Bpmn Editor", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /i18n/build/precache-manifest.0bcb5df12e4671d534f5c42461f7330f.js: -------------------------------------------------------------------------------- 1 | self.__precacheManifest = [ 2 | { 3 | "revision": "609860a7b5830bab8c7843e1637290ba", 4 | "url": "/bpmn-editor/i18n/build/static/media/bpmn.609860a7.eot" 5 | }, 6 | { 7 | "revision": "27b5b1904737f806dcb193a12156af9a", 8 | "url": "/bpmn-editor/i18n/build/static/media/bpmn.27b5b190.svg" 9 | }, 10 | { 11 | "revision": "b2686733662a6b34ec05", 12 | "url": "/bpmn-editor/i18n/build/static/js/runtime~main.b2686733.js" 13 | }, 14 | { 15 | "revision": "1204997cda8966458a6e", 16 | "url": "/bpmn-editor/i18n/build/static/js/main.1204997c.chunk.js" 17 | }, 18 | { 19 | "revision": "e620bbde62d957a60b8f", 20 | "url": "/bpmn-editor/i18n/build/static/js/1.e620bbde.chunk.js" 21 | }, 22 | { 23 | "revision": "1204997cda8966458a6e", 24 | "url": "/bpmn-editor/i18n/build/static/css/main.718d2164.chunk.css" 25 | }, 26 | { 27 | "revision": "e620bbde62d957a60b8f", 28 | "url": "/bpmn-editor/i18n/build/static/css/1.86a5e77a.chunk.css" 29 | }, 30 | { 31 | "revision": "ee13271ec32e27814fa3eec040e5cccb", 32 | "url": "/bpmn-editor/i18n/build/index.html" 33 | } 34 | ]; -------------------------------------------------------------------------------- /i18n/build/service-worker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Welcome to your Workbox-powered service worker! 3 | * 4 | * You'll need to register this file in your web app and you should 5 | * disable HTTP caching for this file too. 6 | * See https://goo.gl/nhQhGp 7 | * 8 | * The rest of the code is auto-generated. Please don't update this file 9 | * directly; instead, make changes to your Workbox build configuration 10 | * and re-run your build process. 11 | * See https://goo.gl/2aRDsh 12 | */ 13 | 14 | importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.2/workbox-sw.js"); 15 | 16 | importScripts( 17 | "/bpmn-editor/i18n/build/precache-manifest.0bcb5df12e4671d534f5c42461f7330f.js" 18 | ); 19 | 20 | workbox.clientsClaim(); 21 | 22 | /** 23 | * The workboxSW.precacheAndRoute() method efficiently caches and responds to 24 | * requests for URLs in the manifest. 25 | * See https://goo.gl/S9QRab 26 | */ 27 | self.__precacheManifest = [].concat(self.__precacheManifest || []); 28 | workbox.precaching.suppressWarnings(); 29 | workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); 30 | 31 | workbox.routing.registerNavigationRoute("/bpmn-editor/i18n/build/index.html", { 32 | 33 | blacklist: [/^\/_/,/\/[^\/]+\.[^\/]+$/], 34 | }); 35 | -------------------------------------------------------------------------------- /i18n/build/static/js/runtime~main.b2686733.js: -------------------------------------------------------------------------------- 1 | !function(e){function r(r){for(var t,i,l=r[0],f=r[1],a=r[2],c=0,d=[];c0.2%", 28 | "not dead", 29 | "not ie <= 11", 30 | "not op_mini all" 31 | ], 32 | "devDependencies": { 33 | "babel-eslint": "^9.0.0", 34 | "eslint": "^5.7.0", 35 | "eslint-config-airbnb": "^17.1.0", 36 | "eslint-plugin-compat": "^2.6.2", 37 | "eslint-plugin-import": "^2.14.0", 38 | "eslint-plugin-jsx-a11y": "^6.1.2", 39 | "eslint-plugin-react": "^7.11.1" 40 | }, 41 | "homepage": "https://dwpblog.site/bpmn-editor/i18n/build" 42 | } 43 | -------------------------------------------------------------------------------- /i18n/public/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /i18n/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 22 | React App 23 | 24 | 25 | 28 |
29 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /i18n/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Bpmn Editor", 3 | "name": "Bpmn Editor", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /i18n/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import EditorBasic from './containers'; 3 | 4 | class App extends Component { 5 | render() { 6 | return ( 7 |
8 | 9 |
10 | ); 11 | } 12 | } 13 | 14 | export default App; 15 | -------------------------------------------------------------------------------- /i18n/src/containers/Common.sass: -------------------------------------------------------------------------------- 1 | @import "~bpmn-js/dist/assets/diagram-js.css" 2 | @import "~bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css" 3 | -------------------------------------------------------------------------------- /i18n/src/containers/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import propertiesPanelModule from 'bpmn-js-properties-panel'; 3 | import propertiesProviderModule from 'bpmn-js-properties-panel/lib/provider/camunda'; 4 | import camundaModdleDescriptor from 'camunda-bpmn-moddle/resources/camunda'; 5 | import BpmnModeler from './modeler'; 6 | import { diagramXML } from '../sources/xml'; 7 | import './Common.sass'; 8 | import styles from './Bpmn.module.scss'; 9 | 10 | export default class Bpmn extends Component { 11 | componentDidMount() { 12 | this.bpmnModeler = new BpmnModeler({ 13 | container: '#canvas', 14 | propertiesPanel: { 15 | parent: '#properties-panel' 16 | }, 17 | additionalModules: [propertiesPanelModule, propertiesProviderModule], 18 | moddleExtensions: { 19 | camunda: camundaModdleDescriptor 20 | } 21 | }); 22 | 23 | this.renderDiagram(diagramXML); 24 | } 25 | 26 | renderDiagram = (xml) => { 27 | this.bpmnModeler.importXML(xml, (err) => { 28 | if (err) { 29 | console.log('导入失败'); 30 | } else { 31 | console.log('导入成功'); 32 | } 33 | }); 34 | }; 35 | 36 | render() { 37 | return ( 38 |
39 |
40 |
45 |
46 | ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /i18n/src/containers/modeler/customTranslate/CustomTranslate.js: -------------------------------------------------------------------------------- 1 | import translations from './TranslationsGerman'; 2 | 3 | export default function customTranslate(template, replacements) { 4 | replacements = replacements || {}; 5 | 6 | // Translate 7 | template = translations[template] || template; 8 | 9 | // Replace 10 | return template.replace(/{([^}]+)}/g, (_, key) => { 11 | return replacements[key] || `{${key}}`; 12 | }); 13 | } 14 | -------------------------------------------------------------------------------- /i18n/src/containers/modeler/customTranslate/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Eric 3 | * @Date: 2018-06-07 13:18:30 4 | * @Last Modified by: Eric 5 | * @Last Modified time: 2018-06-07 13:19:13 6 | * @ 功能:自定义语言(i18n) 7 | */ 8 | 9 | import CustomTranslate from './CustomTranslate'; 10 | 11 | export default { 12 | __init__: ['translate'], 13 | translate: ['value', CustomTranslate] 14 | }; 15 | -------------------------------------------------------------------------------- /i18n/src/index.css: -------------------------------------------------------------------------------- 1 | html, 2 | body, 3 | #root { 4 | margin: 0; 5 | width: 100%; 6 | height: 100% 7 | } 8 | -------------------------------------------------------------------------------- /i18n/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | 6 | ReactDOM.render(, document.getElementById('root')); 7 | -------------------------------------------------------------------------------- /i18n/src/sources/xml.js: -------------------------------------------------------------------------------- 1 | export const diagramXML = ` 2 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | `; 23 | -------------------------------------------------------------------------------- /keyboard/.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = true 14 | 15 | [Makefile] 16 | indent_style = tab 17 | -------------------------------------------------------------------------------- /keyboard/.env: -------------------------------------------------------------------------------- 1 | SKIP_PREFLIGHT_CHECK=true 2 | -------------------------------------------------------------------------------- /keyboard/.eslintignore: -------------------------------------------------------------------------------- 1 | dependencies/* 2 | 3 | webpack.config/* 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /keyboard/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | # /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /keyboard/README.md: -------------------------------------------------------------------------------- 1 | # Keyboard 2 | 3 | ------ 4 | 5 | ## import custom modeler && enable keyboard shortcuts 6 | 7 | ```js 8 | // import BpmnModeler from 'bpmn-js/lib/Modeler'; 9 | import BpmnModeler from './modeler'; 10 | 11 | this.bpmnModeler = new BpmnModeler({ 12 | container: '#canvas', 13 | propertiesPanel: { 14 | parent: '#properties-panel' 15 | }, 16 | additionalModules: [propertiesPanelModule, propertiesProviderModule], 17 | moddleExtensions: { 18 | camunda: camundaModdleDescriptor 19 | }, 20 | keyboard: { bindTo: document } //enable keyboard shortcuts 21 | }); 22 | ``` 23 | 24 | ## set custom keyboard 25 | 26 | eg. add cut keyboard shortcuts 27 | ```js 28 | export default function BpmnKeyBindings(keyboard, editorActions) { 29 | keyboard.addListener((key) => { 30 | // cut 31 | // ctrl x 32 | if (key === 88) { 33 | editorActions.trigger('copy'); 34 | editorActions.trigger('removeSelection'); 35 | return true; 36 | } 37 | }); 38 | } 39 | 40 | BpmnKeyBindings.$inject = [ 41 | 'keyboard', 42 | 'editorActions' 43 | ]; 44 | ``` 45 | -------------------------------------------------------------------------------- /keyboard/build/asset-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "main.css": "/bpmn-editor/keyboard/build/static/css/main.ffafc5cc.chunk.css", 3 | "main.js": "/bpmn-editor/keyboard/build/static/js/main.15d84753.chunk.js", 4 | "main.js.map": "/bpmn-editor/keyboard/build/static/js/main.15d84753.chunk.js.map", 5 | "static/css/1.75506485.chunk.css": "/bpmn-editor/keyboard/build/static/css/1.75506485.chunk.css", 6 | "static/js/1.554224c8.chunk.js": "/bpmn-editor/keyboard/build/static/js/1.554224c8.chunk.js", 7 | "static/js/1.554224c8.chunk.js.map": "/bpmn-editor/keyboard/build/static/js/1.554224c8.chunk.js.map", 8 | "runtime~main.js": "/bpmn-editor/keyboard/build/static/js/runtime~main.250a5dbe.js", 9 | "runtime~main.js.map": "/bpmn-editor/keyboard/build/static/js/runtime~main.250a5dbe.js.map", 10 | "static/css/main.ffafc5cc.chunk.css.map": "/bpmn-editor/keyboard/build/static/css/main.ffafc5cc.chunk.css.map", 11 | "static/media/Common.sass": "/bpmn-editor/keyboard/build/static/media/bpmn.27b5b190.svg", 12 | "static/css/1.75506485.chunk.css.map": "/bpmn-editor/keyboard/build/static/css/1.75506485.chunk.css.map", 13 | "index.html": "/bpmn-editor/keyboard/build/index.html", 14 | "precache-manifest.a3ee6519b80b04f61428e0a201ca35c4.js": "/bpmn-editor/keyboard/build/precache-manifest.a3ee6519b80b04f61428e0a201ca35c4.js", 15 | "service-worker.js": "/bpmn-editor/keyboard/build/service-worker.js" 16 | } -------------------------------------------------------------------------------- /keyboard/build/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /keyboard/build/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Bpmn Editor", 3 | "name": "Bpmn Editor", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /keyboard/build/precache-manifest.a3ee6519b80b04f61428e0a201ca35c4.js: -------------------------------------------------------------------------------- 1 | self.__precacheManifest = [ 2 | { 3 | "revision": "609860a7b5830bab8c7843e1637290ba", 4 | "url": "/bpmn-editor/keyboard/build/static/media/bpmn.609860a7.eot" 5 | }, 6 | { 7 | "revision": "27b5b1904737f806dcb193a12156af9a", 8 | "url": "/bpmn-editor/keyboard/build/static/media/bpmn.27b5b190.svg" 9 | }, 10 | { 11 | "revision": "250a5dbe3092f1c92931", 12 | "url": "/bpmn-editor/keyboard/build/static/js/runtime~main.250a5dbe.js" 13 | }, 14 | { 15 | "revision": "15d847539851b26273a5", 16 | "url": "/bpmn-editor/keyboard/build/static/js/main.15d84753.chunk.js" 17 | }, 18 | { 19 | "revision": "554224c817acd2f20658", 20 | "url": "/bpmn-editor/keyboard/build/static/js/1.554224c8.chunk.js" 21 | }, 22 | { 23 | "revision": "15d847539851b26273a5", 24 | "url": "/bpmn-editor/keyboard/build/static/css/main.ffafc5cc.chunk.css" 25 | }, 26 | { 27 | "revision": "554224c817acd2f20658", 28 | "url": "/bpmn-editor/keyboard/build/static/css/1.75506485.chunk.css" 29 | }, 30 | { 31 | "revision": "9d57c737d339b12d5b182585ecd3c57a", 32 | "url": "/bpmn-editor/keyboard/build/index.html" 33 | } 34 | ]; -------------------------------------------------------------------------------- /keyboard/build/service-worker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Welcome to your Workbox-powered service worker! 3 | * 4 | * You'll need to register this file in your web app and you should 5 | * disable HTTP caching for this file too. 6 | * See https://goo.gl/nhQhGp 7 | * 8 | * The rest of the code is auto-generated. Please don't update this file 9 | * directly; instead, make changes to your Workbox build configuration 10 | * and re-run your build process. 11 | * See https://goo.gl/2aRDsh 12 | */ 13 | 14 | importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.2/workbox-sw.js"); 15 | 16 | importScripts( 17 | "/bpmn-editor/keyboard/build/precache-manifest.a3ee6519b80b04f61428e0a201ca35c4.js" 18 | ); 19 | 20 | workbox.clientsClaim(); 21 | 22 | /** 23 | * The workboxSW.precacheAndRoute() method efficiently caches and responds to 24 | * requests for URLs in the manifest. 25 | * See https://goo.gl/S9QRab 26 | */ 27 | self.__precacheManifest = [].concat(self.__precacheManifest || []); 28 | workbox.precaching.suppressWarnings(); 29 | workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); 30 | 31 | workbox.routing.registerNavigationRoute("/bpmn-editor/keyboard/build/index.html", { 32 | 33 | blacklist: [/^\/_/,/\/[^\/]+\.[^\/]+$/], 34 | }); 35 | -------------------------------------------------------------------------------- /keyboard/build/static/js/runtime~main.250a5dbe.js: -------------------------------------------------------------------------------- 1 | !function(e){function r(r){for(var n,i,l=r[0],f=r[1],a=r[2],c=0,d=[];c0.2%", 28 | "not dead", 29 | "not ie <= 11", 30 | "not op_mini all" 31 | ], 32 | "devDependencies": { 33 | "babel-eslint": "^9.0.0", 34 | "eslint": "^5.7.0", 35 | "eslint-config-airbnb": "^17.1.0", 36 | "eslint-plugin-compat": "^2.6.2", 37 | "eslint-plugin-import": "^2.14.0", 38 | "eslint-plugin-jsx-a11y": "^6.1.2", 39 | "eslint-plugin-react": "^7.11.1" 40 | }, 41 | "homepage": "https://dwpblog.site/bpmn-editor/keyboard/build" 42 | } 43 | -------------------------------------------------------------------------------- /keyboard/public/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /keyboard/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 22 | React App 23 | 24 | 25 | 28 |
29 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /keyboard/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Bpmn Editor", 3 | "name": "Bpmn Editor", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /keyboard/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import EditorBasic from './containers'; 3 | 4 | class App extends Component { 5 | render() { 6 | return ( 7 |
8 | 9 |
10 | ); 11 | } 12 | } 13 | 14 | export default App; 15 | -------------------------------------------------------------------------------- /keyboard/src/containers/Common.sass: -------------------------------------------------------------------------------- 1 | @import "~bpmn-js/dist/assets/diagram-js.css" 2 | @import "~bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css" 3 | -------------------------------------------------------------------------------- /keyboard/src/containers/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import BpmnModeler from './modeler'; 3 | import propertiesPanelModule from 'bpmn-js-properties-panel'; 4 | import propertiesProviderModule from 'bpmn-js-properties-panel/lib/provider/camunda'; 5 | import camundaModdleDescriptor from 'camunda-bpmn-moddle/resources/camunda'; 6 | import { diagramXML } from '../sources/xml'; 7 | import './Common.sass'; 8 | import styles from './Bpmn.module.scss'; 9 | 10 | export default class Bpmn extends Component { 11 | componentDidMount() { 12 | this.bpmnModeler = new BpmnModeler({ 13 | container: '#canvas', 14 | propertiesPanel: { 15 | parent: '#properties-panel' 16 | }, 17 | additionalModules: [propertiesPanelModule, propertiesProviderModule], 18 | moddleExtensions: { 19 | camunda: camundaModdleDescriptor 20 | }, 21 | keyboard: { bindTo: document } 22 | }); 23 | 24 | this.renderDiagram(diagramXML); 25 | } 26 | 27 | renderDiagram = (xml) => { 28 | this.bpmnModeler.importXML(xml, (err) => { 29 | if (err) { 30 | console.log('导入失败'); 31 | } else { 32 | console.log('导入成功'); 33 | } 34 | }); 35 | }; 36 | 37 | render() { 38 | return ( 39 |
40 |
41 |
46 |
47 | ); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /keyboard/src/containers/modeler/index.js: -------------------------------------------------------------------------------- 1 | import Modeler from 'bpmn-js/lib/Modeler'; 2 | 3 | import inherits from 'inherits'; 4 | 5 | import KeyboardModule from './keyboard'; 6 | 7 | export default function CustomModeler(options) { 8 | Modeler.call(this, options); 9 | 10 | this.customElements = []; 11 | } 12 | 13 | inherits(CustomModeler, Modeler); 14 | 15 | CustomModeler.prototype._modules = [].concat( 16 | CustomModeler.prototype._modules, 17 | [ 18 | KeyboardModule 19 | ] 20 | ); 21 | -------------------------------------------------------------------------------- /keyboard/src/containers/modeler/keyboard/BpmnKeyBindings.js: -------------------------------------------------------------------------------- 1 | /** 2 | * BPMN 2.0 specific key bindings. 3 | * 4 | * @param {Keyboard} keyboard 5 | * @param {EditorActions} editorActions 6 | */ 7 | export default function BpmnKeyBindings(keyboard, editorActions) { 8 | keyboard.addListener((key) => { 9 | // cut 10 | // ctrl x 11 | if (key === 88) { 12 | editorActions.trigger('copy'); 13 | editorActions.trigger('removeSelection'); 14 | return true; 15 | } 16 | }); 17 | } 18 | 19 | BpmnKeyBindings.$inject = [ 20 | 'keyboard', 21 | 'editorActions' 22 | ]; 23 | -------------------------------------------------------------------------------- /keyboard/src/containers/modeler/keyboard/index.js: -------------------------------------------------------------------------------- 1 | import KeyboardModule from 'diagram-js/lib/features/keyboard'; 2 | 3 | import BpmnKeyBindings from './BpmnKeyBindings'; 4 | 5 | export default { 6 | __depends__: [ 7 | KeyboardModule 8 | ], 9 | __init__: [ 'bpmnKeyBindings' ], 10 | bpmnKeyBindings: [ 'type', BpmnKeyBindings ] 11 | }; 12 | -------------------------------------------------------------------------------- /keyboard/src/index.css: -------------------------------------------------------------------------------- 1 | html, 2 | body, 3 | #root { 4 | margin: 0; 5 | width: 100%; 6 | height: 100% 7 | } 8 | -------------------------------------------------------------------------------- /keyboard/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | 6 | ReactDOM.render(, document.getElementById('root')); 7 | -------------------------------------------------------------------------------- /keyboard/src/sources/xml.js: -------------------------------------------------------------------------------- 1 | export const diagramXML = ` 2 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | `; 23 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "lockfileVersion": 1 3 | } 4 | --------------------------------------------------------------------------------