@operato/scene-bpmn 1.1.12 → 1.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/base/bpmn-activity.js +2 -2
  3. package/dist/base/bpmn-activity.js.map +1 -1
  4. package/dist/base/bpmn-container-base.d.ts +1 -1
  5. package/dist/base/bpmn-control-base.d.ts +1 -1
  6. package/dist/bpmn-comment.js +1 -2
  7. package/dist/bpmn-comment.js.map +1 -1
  8. package/dist/bpmn-data-object.js +3 -3
  9. package/dist/bpmn-data-object.js.map +1 -1
  10. package/dist/bpmn-data-store.js +1 -1
  11. package/dist/bpmn-data-store.js.map +1 -1
  12. package/dist/bpmn-event.js +2 -2
  13. package/dist/bpmn-event.js.map +1 -1
  14. package/dist/bpmn-expanded-subprocess.js +1 -1
  15. package/dist/bpmn-expanded-subprocess.js.map +1 -1
  16. package/dist/bpmn-gateway.js +2 -2
  17. package/dist/bpmn-gateway.js.map +1 -1
  18. package/dist/bpmn-group.js +1 -1
  19. package/dist/bpmn-group.js.map +1 -1
  20. package/dist/bpmn-message.js +1 -1
  21. package/dist/bpmn-message.js.map +1 -1
  22. package/dist/bpmn-subprocess.js +3 -3
  23. package/dist/bpmn-subprocess.js.map +1 -1
  24. package/dist/bpmn-task.js +4 -4
  25. package/dist/bpmn-task.js.map +1 -1
  26. package/logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json +3 -58
  27. package/logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json +3 -73
  28. package/logs/application-2022-12-09-13.log +12 -0
  29. package/logs/connections-2022-12-09-13.log +70 -0
  30. package/package.json +4 -4
  31. package/src/base/bpmn-activity.ts +3 -3
  32. package/src/bpmn-comment.ts +2 -3
  33. package/src/bpmn-data-object.ts +4 -4
  34. package/src/bpmn-data-store.ts +2 -2
  35. package/src/bpmn-event.ts +3 -3
  36. package/src/bpmn-expanded-subprocess.ts +2 -2
  37. package/src/bpmn-gateway.ts +3 -3
  38. package/src/bpmn-group.ts +2 -2
  39. package/src/bpmn-message.ts +2 -2
  40. package/src/bpmn-subprocess.ts +4 -4
  41. package/src/bpmn-task.ts +5 -5
  42. package/tsconfig.tsbuildinfo +1 -1
  43. package/logs/application-2022-11-04-14.log +0 -6
  44. package/logs/application-2022-11-04-15.log +0 -6
  45. package/logs/application-2022-11-05-06.log +0 -6
  46. package/logs/application-2022-11-05-10.log +0 -6
  47. package/logs/application-2022-11-05-11.log +0 -6
  48. package/logs/application-2022-11-05-16.log +0 -30
  49. package/logs/application-2022-11-05-17.log +0 -6
  50. package/logs/application-2022-11-05-20.log +0 -6
  51. package/logs/application-2022-11-05-23.log +0 -6
  52. package/logs/application-2022-11-06-00.log +0 -6
  53. package/logs/application-2022-11-06-12.log +0 -6
  54. package/logs/application-2022-11-06-14.log +0 -18
  55. package/logs/connections-2022-11-03-10.log +0 -70
  56. package/logs/connections-2022-11-03-11.log +0 -105
  57. package/logs/connections-2022-11-04-11.log +0 -35
  58. package/logs/connections-2022-11-04-14.log +0 -35
  59. package/logs/connections-2022-11-04-15.log +0 -35
  60. package/logs/connections-2022-11-05-06.log +0 -35
  61. package/logs/connections-2022-11-05-10.log +0 -35
  62. package/logs/connections-2022-11-05-11.log +0 -35
  63. package/logs/connections-2022-11-05-16.log +0 -175
  64. package/logs/connections-2022-11-05-17.log +0 -35
  65. package/logs/connections-2022-11-05-20.log +0 -35
  66. package/logs/connections-2022-11-05-23.log +0 -35
  67. package/logs/connections-2022-11-06-00.log +0 -35
  68. package/logs/connections-2022-11-06-12.log +0 -35
  69. package/logs/connections-2022-11-06-14.log +0 -70
@@ -1 +1 @@
1
- {"version":3,"file":"bpmn-subprocess.js","sourceRoot":"","sources":["../src/bpmn-subprocess.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAc,MAAM,wBAAwB,CAAA;AAE9D,OAAO,eAAe,MAAM,0BAA0B,CAAA;A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;;;;;;;GAiBX;IACD,KAAK,EAAE;;;;;;;;;;GAUN;CACF,CAAA","sourcesContent":["import { Component, Properties } from '@hatiolab/things-scene'\n\nimport BPMNControlBase from './base/bpmn-control-base'\n\nconst NATURE = {\n mutable: false,\n resizable: true,\n rotatable: false,\n properties: [\n {\n type: 'checkbox',\n label: 'loop',\n name: 'loop'\n },\n {\n type: 'checkbox',\n label: 'multi-instance',\n name: 'multiInstance'\n },\n {\n type: 'checkbox',\n label: 'compensation',\n name: 'compensation'\n },\n {\n type: 'checkbox',\n label: 'adhoc',\n name: 'adhoc'\n },\n {\n type: 'checkbox',\n label: 'call-activity',\n name: 'callActivity'\n },\n {\n type: 'checkbox',\n label: 'transaction',\n name: 'transaction'\n },\n {\n type: 'checkbox',\n label: 'interrupting',\n name: 'interrupting'\n },\n {\n type: 'select',\n label: 'trigger-event',\n name: 'triggerEvent',\n property: {\n options: [\n {\n display: '',\n value: ''\n },\n {\n display: 'message',\n value: 'message'\n },\n {\n display: 'timer',\n value: 'timer'\n },\n {\n display: 'error',\n value: 'error'\n },\n {\n display: 'escalation',\n value: 'escalation'\n },\n {\n display: 'cancel',\n value: 'cancel'\n },\n {\n display: 'compensation',\n value: 'compensation'\n },\n {\n display: 'conditional',\n value: 'conditional'\n },\n {\n display: 'link',\n value: 'link'\n },\n {\n display: 'signal',\n value: 'signal'\n },\n {\n display: 'terminate',\n value: 'terminate'\n },\n {\n display: 'multiple',\n value: 'multiple'\n },\n {\n display: 'parallel multiple',\n value: 'parallel-multiple'\n }\n ]\n }\n },\n {\n // TODO this property might be an array\n type: 'select',\n label: 'boundary-event',\n name: 'boundaryEvent',\n property: {\n options: [\n {\n display: '',\n value: ''\n },\n {\n display: 'message',\n value: 'message'\n },\n {\n display: 'timer',\n value: 'timer'\n },\n {\n display: 'error',\n value: 'error'\n },\n {\n display: 'escalation',\n value: 'escalation'\n },\n {\n display: 'cancel',\n value: 'cancel'\n },\n {\n display: 'compensation',\n value: 'compensation'\n },\n {\n display: 'conditional',\n value: 'conditional'\n },\n {\n display: 'link',\n value: 'link'\n },\n {\n display: 'signal',\n value: 'signal'\n },\n {\n display: 'terminate',\n value: 'terminate'\n },\n {\n display: 'multiple',\n value: 'multiple'\n },\n {\n display: 'parallel multiple',\n value: 'parallel-multiple'\n }\n ]\n }\n }\n ],\n help: '/bpmn/subprocess/subprocess'\n}\n\nexport default class BPMNSubprocess extends BPMNControlBase {\n private markerImages?: HTMLImageElement[]\n\n static get nature() {\n return NATURE\n }\n\n render(ctx: CanvasRenderingContext2D) {\n var { left, top, width, height } = this.bounds\n const { callActivity, interrupting, transaction } = this.state\n\n ctx.translate(left, top)\n ctx.beginPath()\n\n var radius = 10\n\n ctx.moveTo(radius, 0)\n ctx.arcTo(width, 0, width, height, radius)\n ctx.arcTo(width, height, 0, height, radius)\n ctx.arcTo(0, height, 0, 0, radius)\n ctx.arcTo(0, 0, width, 0, radius)\n\n if (transaction) {\n const LINEGAP = 3\n radius -= LINEGAP\n\n ctx.moveTo(radius + LINEGAP, LINEGAP)\n ctx.arcTo(width - LINEGAP, LINEGAP, width - LINEGAP, height - LINEGAP, radius)\n ctx.arcTo(width - LINEGAP, height - LINEGAP, LINEGAP, height, radius)\n ctx.arcTo(LINEGAP, height - LINEGAP, LINEGAP, LINEGAP, radius)\n ctx.arcTo(LINEGAP, LINEGAP, width - LINEGAP, LINEGAP, radius)\n }\n\n this.drawFill(ctx)\n\n if (callActivity) {\n this.drawStroke(ctx, { lineWidth: 5 })\n } else {\n this.drawStroke(ctx, {\n lineWidth: transaction ? 1 : 2,\n lineDash: interrupting ? 'dash' : 'solid'\n })\n }\n\n ctx.beginPath()\n\n const images = this.getMarkerImages() || []\n const start = (width - images.length * 16) / 2\n\n images.forEach((image, index) => {\n this.drawImage(ctx, image, start + index * 16, height - 16, 16, 16)\n })\n\n ctx.translate(-left, -top)\n }\n\n onchange(after: Properties, before: Properties) {\n if (['loop', 'multiInstance', 'adhoc', 'compensation', 'strokeStyle'].find(prop => prop in after)) {\n delete this.markerImages\n }\n }\n\n getMarkerImages(): HTMLImageElement[] | null | undefined {\n if (!this.markerImages) {\n const { strokeStyle } = this.state\n\n this.markerImages = Object.keys(MARKERS)\n .filter(key => key === 'subprocess' || this.state[key])\n .map(key => {\n let image = new Image()\n image.src =\n 'data:image/svg+xml;charset=UTF-8;base64,' + btoa(MARKERS[key].replace(/{{strokeColor}}/g, strokeStyle))\n return image\n })\n }\n\n return this.markerImages\n }\n}\n\nComponent.register('bpmn-subprocess', BPMNSubprocess)\n\nconst MARKERS: { [type: string]: string } = {\n loop: `\n<svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <path class=\"st0\" d=\"M9.5,5.2C4.3,9.7,3.7,17.5,8.1,22.8L5,25.4l7.8,0.6l0.6-7.8L10.2,21c-3.5-4.1-3-10.1,1-13.6s10.1-3,13.6,1\n\ts3,10.1-1,13.6c-1.6,1.4-3.5,2.1-5.4,2.3l-0.2,2.8c2.6-0.2,5.3-1.1,7.4-3c5.2-4.5,5.8-12.3,1.3-17.5S14.7,0.8,9.5,5.2z\"/>\n</svg>\n`,\n multiInstance: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <g>\n <rect x=\"5.5\" y=\"1.9\" class=\"st0\" width=\"3.3\" height=\"25.3\"/>\n <rect x=\"15.9\" y=\"1.9\" class=\"st0\" width=\"3.3\" height=\"25.3\"/>\n <rect x=\"26.2\" y=\"1.9\" class=\"st0\" width=\"3.3\" height=\"25.3\"/>\n </g>\n </svg>\n `,\n compensation: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <g>\n <path class=\"st0\" d=\"M16.1,6.9v15.6l-7.8-7.8L16.1,6.9 M18.1,2.1L5.5,14.7l12.6,12.6V2.1L18.1,2.1z M5.5,14.7L5.5,14.7L5.5,14.7\n L5.5,14.7L5.5,14.7z\"/>\n </g>\n <g>\n <path class=\"st0\" d=\"M27.5,6.9v15.6l-7.8-7.8L27.5,6.9 M29.5,2.1L16.9,14.7l12.6,12.6V2.1L29.5,2.1z M16.9,14.7L16.9,14.7\n L16.9,14.7L16.9,14.7L16.9,14.7z\"/>\n </g>\n </svg>\n `,\n subprocess: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:none;stroke:{{strokeColor}};stroke-width:2;stroke-miterlimit:10;}\n .st1{fill:{{strokeColor}};} \n </style>\n <rect x=\"5.5\" y=\"2.5\" class=\"st0\" width=\"24\" height=\"24\"/>\n <g>\n <g>\n <rect x=\"16.4\" y=\"6\" class=\"st1\" width=\"2.1\" height=\"17\"/>\n </g>\n <g>\n <rect x=\"9\" y=\"13.4\" class=\"st1\" width=\"17\" height=\"2.1\"/>\n </g>\n </g>\n </svg>\n `,\n adhoc: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <path class=\"st0\" d=\"M29.2,10.3c-0.8,0.9-1.7,1.7-2.5,2.2c-0.8,0.5-1.6,0.8-2.4,0.8c-1,0-3-0.6-6.1-1.9C15,10.2,12.6,9.6,11,9.6\n\t\tc-2.1,0-3.9,0.7-5.5,1.9v6.9c0.1,0,0.3-0.2,0.6-0.6C7.9,16,9.5,15,10.9,15c0.8,0,2.9,0.6,6.1,1.9c3.3,1.2,5.7,1.8,7.1,1.8\n\t\tc2,0,3.8-0.6,5.3-1.8v-6.9C29.4,10.1,29.3,10.2,29.2,10.3z\"/>\n </svg>\n `\n}\n"]}
1
+ {"version":3,"file":"bpmn-subprocess.js","sourceRoot":"","sources":["../src/bpmn-subprocess.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAc,MAAM,wBAAwB,CAAA;AAE9D,OAAO,eAAe,MAAM,0BAA0B,CAAA;AAEtD,MAAM,MAAM,GAAG;IACb,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE;QACV;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,MAAM;YACb,IAAI,EAAE,MAAM;SACb;QACD;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,gBAAgB;YACvB,IAAI,EAAE,eAAe;SACtB;QACD;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,cAAc;YACrB,IAAI,EAAE,cAAc;SACrB;QACD;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,OAAO;SACd;QACD;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,cAAc;SACrB;QACD;YACE,IAAI,EAAE,UAAU;YA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,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;iBACrC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,YAAY,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACtD,GAAG,CAAC,GAAG,CAAC,EAAE;gBACT,IAAI,KAAK,GAAG,IAAI,KAAK,EAAE,CAAA;gBACvB,KAAK,CAAC,GAAG;oBACP,0CAA0C,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,kBAAkB,EAAE,WAAW,CAAC,CAAC,CAAA;gBAC1G,OAAO,KAAK,CAAA;YACd,CAAC,CAAC,CAAA;SACL;QAED,OAAO,IAAI,CAAC,YAAY,CAAA;IAC1B,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,cAAc,CAAC,CAAA;AAErD,MAAM,OAAO,GAA+B;IAC1C,IAAI,EAAE;;;;;;;;;CASP;IACC,aAAa,EAAE;;;;;;;;;;;;GAYd;IACD,YAAY,EAAE;;;;;;;;;;;;;;;GAeb;IACD,UAAU,EAAE;;;;;;;;;;;;;;;;;GAiBX;IACD,KAAK,EAAE;;;;;;;;;;GAUN;CACF,CAAA","sourcesContent":["import { Component, Properties } from '@hatiolab/things-scene'\n\nimport BPMNControlBase from './base/bpmn-control-base'\n\nconst NATURE = {\n mutable: false,\n resizable: true,\n rotatable: false,\n properties: [\n {\n type: 'checkbox',\n label: 'loop',\n name: 'loop'\n },\n {\n type: 'checkbox',\n label: 'multi-instance',\n name: 'multiInstance'\n },\n {\n type: 'checkbox',\n label: 'compensation',\n name: 'compensation'\n },\n {\n type: 'checkbox',\n label: 'adhoc',\n name: 'adhoc'\n },\n {\n type: 'checkbox',\n label: 'call-activity',\n name: 'callActivity'\n },\n {\n type: 'checkbox',\n label: 'transaction',\n name: 'transaction'\n },\n {\n type: 'checkbox',\n label: 'interrupting',\n name: 'interrupting'\n },\n {\n type: 'select',\n label: 'trigger-event',\n name: 'triggerEvent',\n property: {\n options: [\n {\n display: '',\n value: ''\n },\n {\n display: 'message',\n value: 'message'\n },\n {\n display: 'timer',\n value: 'timer'\n },\n {\n display: 'error',\n value: 'error'\n },\n {\n display: 'escalation',\n value: 'escalation'\n },\n {\n display: 'cancel',\n value: 'cancel'\n },\n {\n display: 'compensation',\n value: 'compensation'\n },\n {\n display: 'conditional',\n value: 'conditional'\n },\n {\n display: 'link',\n value: 'link'\n },\n {\n display: 'signal',\n value: 'signal'\n },\n {\n display: 'terminate',\n value: 'terminate'\n },\n {\n display: 'multiple',\n value: 'multiple'\n },\n {\n display: 'parallel multiple',\n value: 'parallel-multiple'\n }\n ]\n }\n },\n {\n // TODO this property might be an array\n type: 'select',\n label: 'boundary-event',\n name: 'boundaryEvent',\n property: {\n options: [\n {\n display: '',\n value: ''\n },\n {\n display: 'message',\n value: 'message'\n },\n {\n display: 'timer',\n value: 'timer'\n },\n {\n display: 'error',\n value: 'error'\n },\n {\n display: 'escalation',\n value: 'escalation'\n },\n {\n display: 'cancel',\n value: 'cancel'\n },\n {\n display: 'compensation',\n value: 'compensation'\n },\n {\n display: 'conditional',\n value: 'conditional'\n },\n {\n display: 'link',\n value: 'link'\n },\n {\n display: 'signal',\n value: 'signal'\n },\n {\n display: 'terminate',\n value: 'terminate'\n },\n {\n display: 'multiple',\n value: 'multiple'\n },\n {\n display: 'parallel multiple',\n value: 'parallel-multiple'\n }\n ]\n }\n }\n ],\n help: '/bpmn/subprocess/subprocess'\n}\n\nexport default class BPMNSubprocess extends BPMNControlBase {\n private markerImages?: HTMLImageElement[]\n\n static get nature() {\n return NATURE\n }\n\n render(ctx: CanvasRenderingContext2D) {\n var { left, top, width, height } = this.bounds\n const { callActivity, interrupting, transaction } = this.state\n\n ctx.translate(left, top)\n ctx.beginPath()\n\n var radius = 10\n\n ctx.moveTo(radius, 0)\n ctx.arcTo(width, 0, width, height, radius)\n ctx.arcTo(width, height, 0, height, radius)\n ctx.arcTo(0, height, 0, 0, radius)\n ctx.arcTo(0, 0, width, 0, radius)\n\n if (transaction) {\n const LINEGAP = 3\n radius -= LINEGAP\n\n ctx.moveTo(radius + LINEGAP, LINEGAP)\n ctx.arcTo(width - LINEGAP, LINEGAP, width - LINEGAP, height - LINEGAP, radius)\n ctx.arcTo(width - LINEGAP, height - LINEGAP, LINEGAP, height, radius)\n ctx.arcTo(LINEGAP, height - LINEGAP, LINEGAP, LINEGAP, radius)\n ctx.arcTo(LINEGAP, LINEGAP, width - LINEGAP, LINEGAP, radius)\n }\n\n ctx.translate(-left, -top)\n\n this.drawFill(ctx)\n\n if (callActivity) {\n this.drawStroke(ctx, { lineWidth: 5 })\n } else {\n this.drawStroke(ctx, {\n lineWidth: transaction ? 1 : 2,\n lineDash: interrupting ? 'dash' : 'solid'\n })\n }\n\n ctx.beginPath()\n\n const images = this.getMarkerImages() || []\n const start = left + (width - images.length * 16) / 2\n\n images.forEach((image, index) => {\n this.drawImage(ctx, image, start + index * 16, top + height - 16, 16, 16)\n })\n }\n\n onchange(after: Properties, before: Properties) {\n if (['loop', 'multiInstance', 'adhoc', 'compensation', 'strokeStyle'].find(prop => prop in after)) {\n delete this.markerImages\n }\n }\n\n getMarkerImages(): HTMLImageElement[] | null | undefined {\n if (!this.markerImages) {\n const { strokeStyle } = this.state\n\n this.markerImages = Object.keys(MARKERS)\n .filter(key => key === 'subprocess' || this.state[key])\n .map(key => {\n let image = new Image()\n image.src =\n 'data:image/svg+xml;charset=UTF-8;base64,' + btoa(MARKERS[key].replace(/{{strokeColor}}/g, strokeStyle))\n return image\n })\n }\n\n return this.markerImages\n }\n}\n\nComponent.register('bpmn-subprocess', BPMNSubprocess)\n\nconst MARKERS: { [type: string]: string } = {\n loop: `\n<svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <path class=\"st0\" d=\"M9.5,5.2C4.3,9.7,3.7,17.5,8.1,22.8L5,25.4l7.8,0.6l0.6-7.8L10.2,21c-3.5-4.1-3-10.1,1-13.6s10.1-3,13.6,1\n\ts3,10.1-1,13.6c-1.6,1.4-3.5,2.1-5.4,2.3l-0.2,2.8c2.6-0.2,5.3-1.1,7.4-3c5.2-4.5,5.8-12.3,1.3-17.5S14.7,0.8,9.5,5.2z\"/>\n</svg>\n`,\n multiInstance: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <g>\n <rect x=\"5.5\" y=\"1.9\" class=\"st0\" width=\"3.3\" height=\"25.3\"/>\n <rect x=\"15.9\" y=\"1.9\" class=\"st0\" width=\"3.3\" height=\"25.3\"/>\n <rect x=\"26.2\" y=\"1.9\" class=\"st0\" width=\"3.3\" height=\"25.3\"/>\n </g>\n </svg>\n `,\n compensation: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <g>\n <path class=\"st0\" d=\"M16.1,6.9v15.6l-7.8-7.8L16.1,6.9 M18.1,2.1L5.5,14.7l12.6,12.6V2.1L18.1,2.1z M5.5,14.7L5.5,14.7L5.5,14.7\n L5.5,14.7L5.5,14.7z\"/>\n </g>\n <g>\n <path class=\"st0\" d=\"M27.5,6.9v15.6l-7.8-7.8L27.5,6.9 M29.5,2.1L16.9,14.7l12.6,12.6V2.1L29.5,2.1z M16.9,14.7L16.9,14.7\n L16.9,14.7L16.9,14.7L16.9,14.7z\"/>\n </g>\n </svg>\n `,\n subprocess: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:none;stroke:{{strokeColor}};stroke-width:2;stroke-miterlimit:10;}\n .st1{fill:{{strokeColor}};} \n </style>\n <rect x=\"5.5\" y=\"2.5\" class=\"st0\" width=\"24\" height=\"24\"/>\n <g>\n <g>\n <rect x=\"16.4\" y=\"6\" class=\"st1\" width=\"2.1\" height=\"17\"/>\n </g>\n <g>\n <rect x=\"9\" y=\"13.4\" class=\"st1\" width=\"17\" height=\"2.1\"/>\n </g>\n </g>\n </svg>\n `,\n adhoc: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <path class=\"st0\" d=\"M29.2,10.3c-0.8,0.9-1.7,1.7-2.5,2.2c-0.8,0.5-1.6,0.8-2.4,0.8c-1,0-3-0.6-6.1-1.9C15,10.2,12.6,9.6,11,9.6\n\t\tc-2.1,0-3.9,0.7-5.5,1.9v6.9c0.1,0,0.3-0.2,0.6-0.6C7.9,16,9.5,15,10.9,15c0.8,0,2.9,0.6,6.1,1.9c3.3,1.2,5.7,1.8,7.1,1.8\n\t\tc2,0,3.8-0.6,5.3-1.8v-6.9C29.4,10.1,29.3,10.2,29.2,10.3z\"/>\n </svg>\n `\n}\n"]}
package/dist/bpmn-task.js CHANGED
@@ -223,6 +223,7 @@ export default class BPMNTask extends BPMNControlBase {
223
223
  ctx.arcTo(width, height, 0, height, radius);
224
224
  ctx.arcTo(0, height, 0, 0, radius);
225
225
  ctx.arcTo(0, 0, width, 0, radius);
226
+ ctx.translate(-left, -top);
226
227
  this.drawFill(ctx);
227
228
  if (callActivity) {
228
229
  this.drawStroke(ctx, { lineWidth: 5 });
@@ -235,14 +236,13 @@ export default class BPMNTask extends BPMNControlBase {
235
236
  ctx.beginPath();
236
237
  const image = this.getImageElement();
237
238
  if (image) {
238
- this.drawImage(ctx, image, 0, 0, 24, 24);
239
+ this.drawImage(ctx, image, left, top, 24, 24);
239
240
  }
240
241
  const images = this.getMarkerImages() || [];
241
- const start = (width - images.length * 16) / 2;
242
+ const start = left + (width - images.length * 16) / 2;
242
243
  images.forEach((image, index) => {
243
- this.drawImage(ctx, image, start + index * 16, height - 16, 16, 16);
244
+ this.drawImage(ctx, image, start + index * 16, top + height - 16, 16, 16);
244
245
  });
245
- ctx.translate(-left, -top);
246
246
  }
247
247
  onchange(after, before) {
248
248
  if (['loop', 'multiInstance', 'taskType', 'strokeStyle'].find(prop => prop in after)) {
@@ -1 +1 @@
1
- {"version":3,"file":"bpmn-task.js","sourceRoot":"","sources":["../src/bpmn-task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAc,MAAM,wBAAwB,CAAA;AAE9D,OAAO,eAAe,MAAM,0BAA0B,CAAA;AAEtD,MAAM,MAAM,GAAG;IACb,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE;QACV;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,WAAW;YAClB,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE;gBACR,OAAO,EAAE;oBACP;wBACE,OAAO,EAAE,EAAE;wBACX,KAAK,EAAE,EAAE;qBACV;oBACD;wBACE,OAAO,EAAE,SAAS;wBAClB,K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AAC,GAAG;oBACP,0CAA0C;wBAC1C,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,kBAAkB,EAAE,WAAW,CAAC,CAAC,CAAA;gBACvE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;aAC9B;SACF;QAED,OAAO,IAAI,CAAC,YAAY,CAAA;IAC1B,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAA;AAEzC,MAAM,MAAM,GAA+B;IACzC,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCV;IACC,IAAI,EAAE;;;;;;;;;GASL;IACD,OAAO,EAAE;;;;;;;;;GASR;IACD,IAAI,EAAE;;;;;;;;;;;;;;;;GAgBL;IACD,MAAM,EAAE;;;;;;;;;;;;;;;;;GAiBP;IACD,eAAe,EAAE;;;;;;;;;;;;;;GAchB;IACD,MAAM,EAAE;;;;;;;;;;;;;;;GAeP;CACF,CAAA;AAED,MAAM,OAAO,GAA+B;IAC1C,IAAI,EAAE;;;;;;;;;CASP;IACC,QAAQ,EAAE;;;;;;;;;;;;GAYT;IACD,UAAU,EAAE;;;;;;;;;;;;GAYX;CACF,CAAA","sourcesContent":["import { Component, Properties } from '@hatiolab/things-scene'\n\nimport BPMNControlBase from './base/bpmn-control-base'\n\nconst NATURE = {\n mutable: false,\n resizable: true,\n rotatable: false,\n properties: [\n {\n type: 'select',\n label: 'task-type',\n name: 'taskType',\n property: {\n options: [\n {\n display: '',\n value: ''\n },\n {\n display: 'service',\n value: 'service'\n },\n {\n display: 'send',\n value: 'send'\n },\n {\n display: 'receive',\n value: 'receive'\n },\n {\n display: 'user',\n value: 'user'\n },\n {\n display: 'manual',\n value: 'manual'\n },\n {\n display: 'business rule',\n value: 'business-rule'\n },\n {\n display: 'script',\n value: 'script'\n }\n ]\n }\n },\n {\n type: 'select',\n label: 'multi-instance',\n name: 'multiInstance',\n property: {\n options: [\n {\n display: '',\n value: ''\n },\n {\n display: 'parallel',\n value: 'parallel'\n },\n {\n display: 'sequential',\n value: 'sequential'\n }\n ]\n }\n },\n {\n type: 'checkbox',\n label: 'loop',\n name: 'loop'\n },\n {\n type: 'checkbox',\n label: 'call-activity',\n name: 'callActivity'\n },\n {\n type: 'checkbox',\n label: 'interrupting',\n name: 'interrupting'\n },\n {\n type: 'select',\n label: 'trigger-event',\n name: 'triggerEvent',\n property: {\n options: [\n {\n display: '',\n value: ''\n },\n {\n display: 'message',\n value: 'message'\n },\n {\n display: 'timer',\n value: 'timer'\n },\n {\n display: 'error',\n value: 'error'\n },\n {\n display: 'escalation',\n value: 'escalation'\n },\n {\n display: 'cancel',\n value: 'cancel'\n },\n {\n display: 'compensation',\n value: 'compensation'\n },\n {\n display: 'conditional',\n value: 'conditional'\n },\n {\n display: 'link',\n value: 'link'\n },\n {\n display: 'signal',\n value: 'signal'\n },\n {\n display: 'terminate',\n value: 'terminate'\n },\n {\n display: 'multiple',\n value: 'multiple'\n },\n {\n display: 'parallel multiple',\n value: 'parallel-multiple'\n }\n ]\n }\n },\n {\n // TODO this property might be an array\n type: 'select',\n label: 'boundary-event',\n name: 'boundaryEvent',\n property: {\n options: [\n {\n display: '',\n value: ''\n },\n {\n display: 'message',\n value: 'message'\n },\n {\n display: 'timer',\n value: 'timer'\n },\n {\n display: 'error',\n value: 'error'\n },\n {\n display: 'escalation',\n value: 'escalation'\n },\n {\n display: 'cancel',\n value: 'cancel'\n },\n {\n display: 'compensation',\n value: 'compensation'\n },\n {\n display: 'conditional',\n value: 'conditional'\n },\n {\n display: 'link',\n value: 'link'\n },\n {\n display: 'signal',\n value: 'signal'\n },\n {\n display: 'terminate',\n value: 'terminate'\n },\n {\n display: 'multiple',\n value: 'multiple'\n },\n {\n display: 'parallel multiple',\n value: 'parallel-multiple'\n }\n ]\n }\n }\n ],\n help: '/bpmn/task/task'\n}\n\nexport default class BPMNTask extends BPMNControlBase {\n private imageElement?: HTMLImageElement\n private markerImages?: HTMLImageElement[]\n\n static get nature() {\n return NATURE\n }\n\n render(ctx: CanvasRenderingContext2D) {\n const { left, top, width, height } = this.bounds\n const { callActivity, interrupting } = this.state\n const radius = 9\n\n ctx.translate(left, top)\n ctx.beginPath()\n\n ctx.moveTo(radius, 0)\n ctx.arcTo(width, 0, width, height, radius)\n ctx.arcTo(width, height, 0, height, radius)\n ctx.arcTo(0, height, 0, 0, radius)\n ctx.arcTo(0, 0, width, 0, radius)\n\n this.drawFill(ctx)\n if (callActivity) {\n this.drawStroke(ctx, { lineWidth: 5 })\n } else {\n this.drawStroke(ctx, {\n lineDash: interrupting ? 'dash' : 'solid'\n })\n }\n\n ctx.beginPath()\n\n const image = this.getImageElement()\n if (image) {\n this.drawImage(ctx, image, 0, 0, 24, 24)\n }\n\n const images = this.getMarkerImages() || []\n const start = (width - images.length * 16) / 2\n\n images.forEach((image, index) => {\n this.drawImage(ctx, image, start + index * 16, height - 16, 16, 16)\n })\n\n ctx.translate(-left, -top)\n }\n\n onchange(after: Properties, before: Properties) {\n if (['loop', 'multiInstance', 'taskType', 'strokeStyle'].find(prop => prop in after)) {\n delete this.markerImages\n delete this.imageElement\n }\n }\n\n getImageElement(): HTMLImageElement | null | undefined {\n if (!this.imageElement) {\n const { taskType, strokeStyle } = this.state\n\n if (!taskType) {\n return\n }\n\n const src = IMAGES[taskType]\n if (!src) {\n return\n }\n\n this.imageElement = new Image()\n this.imageElement.src =\n 'data:image/svg+xml;charset=UTF-8;base64,' + btoa(src.replace(/{{strokeColor}}/g, strokeStyle))\n }\n\n return this.imageElement\n }\n\n getMarkerImages(): HTMLImageElement[] | null | undefined {\n if (!this.markerImages) {\n const { loop, multiInstance, strokeStyle } = this.state\n\n this.markerImages = []\n\n if (loop) {\n let image = new Image()\n image.src =\n 'data:image/svg+xml;charset=UTF-8;base64,' + btoa(MARKERS['loop'].replace(/{{strokeColor}}/g, strokeStyle))\n this.markerImages.push(image)\n }\n\n if (multiInstance) {\n let image = new Image()\n image.src =\n 'data:image/svg+xml;charset=UTF-8;base64,' +\n btoa(MARKERS[multiInstance].replace(/{{strokeColor}}/g, strokeStyle))\n this.markerImages.push(image)\n }\n }\n\n return this.markerImages\n }\n}\n\nComponent.register('bpmn-task', BPMNTask)\n\nconst IMAGES: { [type: string]: string } = {\n service: `\n<svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <g>\n <g>\n <path class=\"st0\" d=\"M22.6,11.3l0.3,2.1l0.1,0.6l0.5,0.2c0.5,0.2,0.9,0.5,1.4,0.8l0.5,0.3l0.5-0.2l2-0.8l1.5,2.5l-1.7,1.3\n l-0.5,0.4l0.1,0.6c0,0.2,0.1,0.5,0.1,0.8c0,0.3,0,0.5-0.1,0.8l-0.1,0.6l0.4,0.4l1.7,1.3l-1.5,2.5l-2-0.8l-0.5-0.2l-0.5,0.4\n c-0.4,0.3-0.9,0.6-1.4,0.8L23,25.8l-0.1,0.6l-0.3,2.1h-2.9l-0.3-2.1l-0.1-0.6l-0.5-0.2c-0.5-0.2-0.9-0.5-1.4-0.8l-0.5-0.3\n l-0.5,0.2l-2,0.8l-1.5-2.5l1.7-1.3l0.5-0.4L15,20.6c0-0.2-0.1-0.5-0.1-0.8c0-0.2,0-0.5,0.1-0.8l0.1-0.6l-0.5-0.4L13,16.8l1.5-2.5\n l2,0.8l0.5,0.2l0.5-0.3c0.5-0.4,0.9-0.6,1.4-0.8l0.5-0.2l0.1-0.6l0.3-2.1H22.6 M21.1,24.5c2.5,0,4.6-2.1,4.6-4.6s-2.1-4.6-4.6-4.6\n s-4.6,2.1-4.6,4.6S18.6,24.5,21.1,24.5 M23,10.3h-3.8c-0.2,0-0.4,0.2-0.5,0.4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l0.5-0.3c0.5-0.4,1.1-0.7,1.6-0.9l0.5-0.2L13,9l0.3-2.5H16.8 M17.2,5.5h-4.3\n c-0.3,0-0.5,0.2-0.5,0.5L12,8.9c-0.7,0.3-1.3,0.6-1.8,1.1L7.4,8.8c-0.1,0-0.1,0-0.2,0c-0.2,0-0.4,0.1-0.5,0.3l-2.2,3.7\n c-0.1,0.2-0.1,0.5,0.1,0.7L7,15.3C7,15.6,6.9,16,6.9,16.4c0,0.3,0,0.7,0.1,1.1l-2.3,1.8c-0.2,0.2-0.3,0.5-0.1,0.7l2.2,3.7\n c0.1,0.2,0.3,0.3,0.5,0.3c0.1,0,0.1,0,0.2,0l2.7-1.1c0.1,0.1,0.3,0.2,0.4,0.3l2.1-3.5c-1-0.7-1.6-1.9-1.6-3.2\n c0-2.2,1.8-4.1,4.1-4.1c0.7,0,1.4,0.2,2,0.5l1.9-3.6c-0.2-0.1-0.5-0.3-0.8-0.4L17.8,6C17.7,5.7,17.5,5.5,17.2,5.5L17.2,5.5z\"/>\n </g>\n </g>\n </g>\n</svg>\n`,\n send: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <path class=\"st0\" d=\"M27.1,7.9H7.9c-1.3,0-2.4,1.1-2.4,2.4l0,14.4c0,1.3,1.1,2.4,2.4,2.4h19.2c1.3,0,2.4-1.1,2.4-2.4V10.3\n\tC29.5,9,28.4,7.9,27.1,7.9z M27.1,12.7l-9.6,6l-9.6-6v-2.4l9.6,6l9.6-6V12.7z\"/>\n </svg>\n `,\n receive: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <path class=\"st0\" d=\"M29.5,10.3c0-1.3-1.1-2.4-2.4-2.4H7.9c-1.3,0-2.4,1.1-2.4,2.4v14.4c0,1.3,1.1,2.4,2.4,2.4h19.2c1.3,0,2.4-1.1,2.4-2.4V10.3z\n\t M27.1,9.3l-9.6,7l-9.6-7H27.1z M28.1,25.7H6.9v-16l10.6,8l10.6-8V25.7z\"/>\n </svg>\n `,\n user: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <g>\n <g>\n <path class=\"st0\" d=\"M17.5,6.5c2.8,0,5,2.2,5,5s-2.2,5-5,5s-5-2.2-5-5S14.7,6.5,17.5,6.5 M17.4,20c3.6,0,10.1,3.3,10.1,6.5v2h-20v-2\n C7.5,23.3,13.8,20,17.4,20 M17.5,5.5c-3.3,0-6,2.7-6,6s2.7,6,6,6s6-2.7,6-6S20.8,5.5,17.5,5.5L17.5,5.5z M17.4,19\n c-4,0-10.9,3.6-10.9,7.5v3h22v-3C28.5,22.5,21.4,19,17.4,19L17.4,19z\"/>\n </g>\n <path class=\"st0\" d=\"M14.6,7.2c0,0,2,4.5,7.9,3.9C22.5,11.1,21.8,4.3,14.6,7.2z\"/>\n <path class=\"st0\" d=\"M16.2,9.4c0,0-1.2,1.3-4,1.2l1.2-2.5L14.9,7L16.2,9.4z\"/>\n </g>\n </svg>\n `,\n manual: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:none;stroke:{{strokeColor}};stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}\n </style>\n <g>\n <g>\n <g>\n <path class=\"st0\" d=\"M24,28.5H9.5c-2.2,0-4-1.8-4-4v-7.3c0-1.1,0.4-2.1,1.2-2.9l8-7.9c0,0,1.2,1.3,1.2,1.3\n c0.2,0.2,0.3,0.5,0.3,0.8c0,0.2-0.1,0.4-0.2,0.6c0,0-2.5,4.3-2.5,4.3h11.9c0.8,0,1.5,0.7,1.5,1.5s-0.7,1.5-1.5,1.5h-7v1H28\n c0.8,0,1.5,0.7,1.5,1.5s-0.7,1.5-1.5,1.5h-9.5v1H27c0.8,0,1.5,0.7,1.5,1.5s-0.7,1.5-1.5,1.5h-8.5v1H24c0.8,0,1.5,0.7,1.5,1.5\n S24.8,28.5,24,28.5z\"/>\n </g>\n </g>\n </g>\n </svg>\n `,\n 'business-rule': `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <g>\n <g>\n <path class=\"st0\" d=\"M28.6,11.1v14.8H6.5V11.1h20.3 M26.8,8H8.2c-1.5,0-2.7,1-2.7,2.1v15.8c0,1.2,1.2,1.1,2.7,1.1h18.7c1.5,0,2.7,0.1,2.7-1.1\n V10.1C29.5,8.9,28.3,8,26.8,8L26.8,8z\"/>\n </g>\n <path class=\"st0\" d=\"M29,21.4H6v-1h23V21.4z M28.8,16.4h-23v-1h23V16.4z M14.2,10.6v16h-1v-16H14.2z\"/>\n </g>\n </svg>\n `,\n script: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:none;stroke:{{strokeColor}};stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}\n </style>\n <g>\n <path class=\"st0\" d=\"M7.9,8h20.8c0,0-2.9,1.7-2.6,7.2c0.1,1,0.5,2,1.1,2.9c1.1,1.5,3,4.6,0.4,9h-21c0,0,3.2-5.5,1-9\n C7.6,18,3.8,12.4,7.9,8z\"/>\n <rect class=\"st0\" x=\"9.1\" y=\"11.3\" width=\"14\" height=\"1\"/>\n <rect class=\"st0\" x=\"9.7\" y=\"15\" width=\"14\" height=\"1\"/>\n <rect class=\"st0\" x=\"10.7\" y=\"18.7\" width=\"14\" height=\"1\"/>\n <rect class=\"st0\" x=\"11.7\" y=\"22.3\" width=\"14\" height=\"1\"/>\n </g>\n </svg>\n `\n}\n\nconst MARKERS: { [type: string]: string } = {\n loop: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <path class=\"st0\" d=\"M9.5,5.2C4.3,9.7,3.7,17.5,8.1,22.8L5,25.4l7.8,0.6l0.6-7.8L10.2,21c-3.5-4.1-3-10.1,1-13.6s10.1-3,13.6,1\n s3,10.1-1,13.6c-1.6,1.4-3.5,2.1-5.4,2.3l-0.2,2.8c2.6-0.2,5.3-1.1,7.4-3c5.2-4.5,5.8-12.3,1.3-17.5S14.7,0.8,9.5,5.2z\"/>\n </svg>\n`,\n parallel: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <g>\n <rect x=\"5.5\" y=\"1.9\" class=\"st0\" width=\"3.3\" height=\"25.3\"/>\n <rect x=\"15.9\" y=\"1.9\" class=\"st0\" width=\"3.3\" height=\"25.3\"/>\n <rect x=\"26.2\" y=\"1.9\" class=\"st0\" width=\"3.3\" height=\"25.3\"/>\n </g>\n </svg>\n `,\n sequential: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <g>\n <rect x=\"4.8\" y=\"2.6\" width=\"25.3\" height=\"3.3\" class=\"st0\"/>\n <rect x=\"4.8\" y=\"13\" width=\"25.3\" height=\"3.3\" class=\"st0\"/>\n <rect x=\"4.8\" y=\"23.3\" width=\"25.3\" height=\"3.3\" class=\"st0\"/>\n </g>\n </svg>\n `\n}\n"]}
1
+ {"version":3,"file":"bpmn-task.js","sourceRoot":"","sources":["../src/bpmn-task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAc,MAAM,wBAAwB,CAAA;AAE9D,OAAO,eAAe,MAAM,0BAA0B,CAAA;AAEtD,MAAM,MAAM,GAAG;IACb,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE;QACV;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,WAAW;YAClB,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE;gBACR,OAAO,EAAE;oBACP;wBACE,OAA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K,CAAC,CAAA;aAC9B;YAED,IAAI,aAAa,EAAE;gBACjB,IAAI,KAAK,GAAG,IAAI,KAAK,EAAE,CAAA;gBACvB,KAAK,CAAC,GAAG;oBACP,0CAA0C;wBAC1C,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,kBAAkB,EAAE,WAAW,CAAC,CAAC,CAAA;gBACvE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;aAC9B;SACF;QAED,OAAO,IAAI,CAAC,YAAY,CAAA;IAC1B,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAA;AAEzC,MAAM,MAAM,GAA+B;IACzC,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCV;IACC,IAAI,EAAE;;;;;;;;;GASL;IACD,OAAO,EAAE;;;;;;;;;GASR;IACD,IAAI,EAAE;;;;;;;;;;;;;;;;GAgBL;IACD,MAAM,EAAE;;;;;;;;;;;;;;;;;GAiBP;IACD,eAAe,EAAE;;;;;;;;;;;;;;GAchB;IACD,MAAM,EAAE;;;;;;;;;;;;;;;GAeP;CACF,CAAA;AAED,MAAM,OAAO,GAA+B;IAC1C,IAAI,EAAE;;;;;;;;;CASP;IACC,QAAQ,EAAE;;;;;;;;;;;;GAYT;IACD,UAAU,EAAE;;;;;;;;;;;;GAYX;CACF,CAAA","sourcesContent":["import { Component, Properties } from '@hatiolab/things-scene'\n\nimport BPMNControlBase from './base/bpmn-control-base'\n\nconst NATURE = {\n mutable: false,\n resizable: true,\n rotatable: false,\n properties: [\n {\n type: 'select',\n label: 'task-type',\n name: 'taskType',\n property: {\n options: [\n {\n display: '',\n value: ''\n },\n {\n display: 'service',\n value: 'service'\n },\n {\n display: 'send',\n value: 'send'\n },\n {\n display: 'receive',\n value: 'receive'\n },\n {\n display: 'user',\n value: 'user'\n },\n {\n display: 'manual',\n value: 'manual'\n },\n {\n display: 'business rule',\n value: 'business-rule'\n },\n {\n display: 'script',\n value: 'script'\n }\n ]\n }\n },\n {\n type: 'select',\n label: 'multi-instance',\n name: 'multiInstance',\n property: {\n options: [\n {\n display: '',\n value: ''\n },\n {\n display: 'parallel',\n value: 'parallel'\n },\n {\n display: 'sequential',\n value: 'sequential'\n }\n ]\n }\n },\n {\n type: 'checkbox',\n label: 'loop',\n name: 'loop'\n },\n {\n type: 'checkbox',\n label: 'call-activity',\n name: 'callActivity'\n },\n {\n type: 'checkbox',\n label: 'interrupting',\n name: 'interrupting'\n },\n {\n type: 'select',\n label: 'trigger-event',\n name: 'triggerEvent',\n property: {\n options: [\n {\n display: '',\n value: ''\n },\n {\n display: 'message',\n value: 'message'\n },\n {\n display: 'timer',\n value: 'timer'\n },\n {\n display: 'error',\n value: 'error'\n },\n {\n display: 'escalation',\n value: 'escalation'\n },\n {\n display: 'cancel',\n value: 'cancel'\n },\n {\n display: 'compensation',\n value: 'compensation'\n },\n {\n display: 'conditional',\n value: 'conditional'\n },\n {\n display: 'link',\n value: 'link'\n },\n {\n display: 'signal',\n value: 'signal'\n },\n {\n display: 'terminate',\n value: 'terminate'\n },\n {\n display: 'multiple',\n value: 'multiple'\n },\n {\n display: 'parallel multiple',\n value: 'parallel-multiple'\n }\n ]\n }\n },\n {\n // TODO this property might be an array\n type: 'select',\n label: 'boundary-event',\n name: 'boundaryEvent',\n property: {\n options: [\n {\n display: '',\n value: ''\n },\n {\n display: 'message',\n value: 'message'\n },\n {\n display: 'timer',\n value: 'timer'\n },\n {\n display: 'error',\n value: 'error'\n },\n {\n display: 'escalation',\n value: 'escalation'\n },\n {\n display: 'cancel',\n value: 'cancel'\n },\n {\n display: 'compensation',\n value: 'compensation'\n },\n {\n display: 'conditional',\n value: 'conditional'\n },\n {\n display: 'link',\n value: 'link'\n },\n {\n display: 'signal',\n value: 'signal'\n },\n {\n display: 'terminate',\n value: 'terminate'\n },\n {\n display: 'multiple',\n value: 'multiple'\n },\n {\n display: 'parallel multiple',\n value: 'parallel-multiple'\n }\n ]\n }\n }\n ],\n help: '/bpmn/task/task'\n}\n\nexport default class BPMNTask extends BPMNControlBase {\n private imageElement?: HTMLImageElement\n private markerImages?: HTMLImageElement[]\n\n static get nature() {\n return NATURE\n }\n\n render(ctx: CanvasRenderingContext2D) {\n const { left, top, width, height } = this.bounds\n const { callActivity, interrupting } = this.state\n const radius = 9\n\n ctx.translate(left, top)\n ctx.beginPath()\n\n ctx.moveTo(radius, 0)\n ctx.arcTo(width, 0, width, height, radius)\n ctx.arcTo(width, height, 0, height, radius)\n ctx.arcTo(0, height, 0, 0, radius)\n ctx.arcTo(0, 0, width, 0, radius)\n\n ctx.translate(-left, -top)\n\n this.drawFill(ctx)\n if (callActivity) {\n this.drawStroke(ctx, { lineWidth: 5 })\n } else {\n this.drawStroke(ctx, {\n lineDash: interrupting ? 'dash' : 'solid'\n })\n }\n\n ctx.beginPath()\n\n const image = this.getImageElement()\n if (image) {\n this.drawImage(ctx, image, left, top, 24, 24)\n }\n\n const images = this.getMarkerImages() || []\n const start = left + (width - images.length * 16) / 2\n\n images.forEach((image, index) => {\n this.drawImage(ctx, image, start + index * 16, top + height - 16, 16, 16)\n })\n }\n\n onchange(after: Properties, before: Properties) {\n if (['loop', 'multiInstance', 'taskType', 'strokeStyle'].find(prop => prop in after)) {\n delete this.markerImages\n delete this.imageElement\n }\n }\n\n getImageElement(): HTMLImageElement | null | undefined {\n if (!this.imageElement) {\n const { taskType, strokeStyle } = this.state\n\n if (!taskType) {\n return\n }\n\n const src = IMAGES[taskType]\n if (!src) {\n return\n }\n\n this.imageElement = new Image()\n this.imageElement.src =\n 'data:image/svg+xml;charset=UTF-8;base64,' + btoa(src.replace(/{{strokeColor}}/g, strokeStyle))\n }\n\n return this.imageElement\n }\n\n getMarkerImages(): HTMLImageElement[] | null | undefined {\n if (!this.markerImages) {\n const { loop, multiInstance, strokeStyle } = this.state\n\n this.markerImages = []\n\n if (loop) {\n let image = new Image()\n image.src =\n 'data:image/svg+xml;charset=UTF-8;base64,' + btoa(MARKERS['loop'].replace(/{{strokeColor}}/g, strokeStyle))\n this.markerImages.push(image)\n }\n\n if (multiInstance) {\n let image = new Image()\n image.src =\n 'data:image/svg+xml;charset=UTF-8;base64,' +\n btoa(MARKERS[multiInstance].replace(/{{strokeColor}}/g, strokeStyle))\n this.markerImages.push(image)\n }\n }\n\n return this.markerImages\n }\n}\n\nComponent.register('bpmn-task', BPMNTask)\n\nconst IMAGES: { [type: string]: string } = {\n service: `\n<svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <g>\n <g>\n <path class=\"st0\" d=\"M22.6,11.3l0.3,2.1l0.1,0.6l0.5,0.2c0.5,0.2,0.9,0.5,1.4,0.8l0.5,0.3l0.5-0.2l2-0.8l1.5,2.5l-1.7,1.3\n l-0.5,0.4l0.1,0.6c0,0.2,0.1,0.5,0.1,0.8c0,0.3,0,0.5-0.1,0.8l-0.1,0.6l0.4,0.4l1.7,1.3l-1.5,2.5l-2-0.8l-0.5-0.2l-0.5,0.4\n c-0.4,0.3-0.9,0.6-1.4,0.8L23,25.8l-0.1,0.6l-0.3,2.1h-2.9l-0.3-2.1l-0.1-0.6l-0.5-0.2c-0.5-0.2-0.9-0.5-1.4-0.8l-0.5-0.3\n l-0.5,0.2l-2,0.8l-1.5-2.5l1.7-1.3l0.5-0.4L15,20.6c0-0.2-0.1-0.5-0.1-0.8c0-0.2,0-0.5,0.1-0.8l0.1-0.6l-0.5-0.4L13,16.8l1.5-2.5\n l2,0.8l0.5,0.2l0.5-0.3c0.5-0.4,0.9-0.6,1.4-0.8l0.5-0.2l0.1-0.6l0.3-2.1H22.6 M21.1,24.5c2.5,0,4.6-2.1,4.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c0-0.3-0.1-0.6-0.1-0.9c0-0.2,0-0.5,0.1-0.9\n l0.1-0.6l-0.5-0.4l-2-1.5l1.8-3.1l2.3,0.9l0.5,0.2l0.5-0.3c0.5-0.4,1.1-0.7,1.6-0.9l0.5-0.2L13,9l0.3-2.5H16.8 M17.2,5.5h-4.3\n c-0.3,0-0.5,0.2-0.5,0.5L12,8.9c-0.7,0.3-1.3,0.6-1.8,1.1L7.4,8.8c-0.1,0-0.1,0-0.2,0c-0.2,0-0.4,0.1-0.5,0.3l-2.2,3.7\n c-0.1,0.2-0.1,0.5,0.1,0.7L7,15.3C7,15.6,6.9,16,6.9,16.4c0,0.3,0,0.7,0.1,1.1l-2.3,1.8c-0.2,0.2-0.3,0.5-0.1,0.7l2.2,3.7\n c0.1,0.2,0.3,0.3,0.5,0.3c0.1,0,0.1,0,0.2,0l2.7-1.1c0.1,0.1,0.3,0.2,0.4,0.3l2.1-3.5c-1-0.7-1.6-1.9-1.6-3.2\n c0-2.2,1.8-4.1,4.1-4.1c0.7,0,1.4,0.2,2,0.5l1.9-3.6c-0.2-0.1-0.5-0.3-0.8-0.4L17.8,6C17.7,5.7,17.5,5.5,17.2,5.5L17.2,5.5z\"/>\n </g>\n </g>\n </g>\n</svg>\n`,\n send: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <path class=\"st0\" d=\"M27.1,7.9H7.9c-1.3,0-2.4,1.1-2.4,2.4l0,14.4c0,1.3,1.1,2.4,2.4,2.4h19.2c1.3,0,2.4-1.1,2.4-2.4V10.3\n\tC29.5,9,28.4,7.9,27.1,7.9z M27.1,12.7l-9.6,6l-9.6-6v-2.4l9.6,6l9.6-6V12.7z\"/>\n </svg>\n `,\n receive: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <path class=\"st0\" d=\"M29.5,10.3c0-1.3-1.1-2.4-2.4-2.4H7.9c-1.3,0-2.4,1.1-2.4,2.4v14.4c0,1.3,1.1,2.4,2.4,2.4h19.2c1.3,0,2.4-1.1,2.4-2.4V10.3z\n\t M27.1,9.3l-9.6,7l-9.6-7H27.1z M28.1,25.7H6.9v-16l10.6,8l10.6-8V25.7z\"/>\n </svg>\n `,\n user: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <g>\n <g>\n <path class=\"st0\" d=\"M17.5,6.5c2.8,0,5,2.2,5,5s-2.2,5-5,5s-5-2.2-5-5S14.7,6.5,17.5,6.5 M17.4,20c3.6,0,10.1,3.3,10.1,6.5v2h-20v-2\n C7.5,23.3,13.8,20,17.4,20 M17.5,5.5c-3.3,0-6,2.7-6,6s2.7,6,6,6s6-2.7,6-6S20.8,5.5,17.5,5.5L17.5,5.5z M17.4,19\n c-4,0-10.9,3.6-10.9,7.5v3h22v-3C28.5,22.5,21.4,19,17.4,19L17.4,19z\"/>\n </g>\n <path class=\"st0\" d=\"M14.6,7.2c0,0,2,4.5,7.9,3.9C22.5,11.1,21.8,4.3,14.6,7.2z\"/>\n <path class=\"st0\" d=\"M16.2,9.4c0,0-1.2,1.3-4,1.2l1.2-2.5L14.9,7L16.2,9.4z\"/>\n </g>\n </svg>\n `,\n manual: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:none;stroke:{{strokeColor}};stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}\n </style>\n <g>\n <g>\n <g>\n <path class=\"st0\" d=\"M24,28.5H9.5c-2.2,0-4-1.8-4-4v-7.3c0-1.1,0.4-2.1,1.2-2.9l8-7.9c0,0,1.2,1.3,1.2,1.3\n c0.2,0.2,0.3,0.5,0.3,0.8c0,0.2-0.1,0.4-0.2,0.6c0,0-2.5,4.3-2.5,4.3h11.9c0.8,0,1.5,0.7,1.5,1.5s-0.7,1.5-1.5,1.5h-7v1H28\n c0.8,0,1.5,0.7,1.5,1.5s-0.7,1.5-1.5,1.5h-9.5v1H27c0.8,0,1.5,0.7,1.5,1.5s-0.7,1.5-1.5,1.5h-8.5v1H24c0.8,0,1.5,0.7,1.5,1.5\n S24.8,28.5,24,28.5z\"/>\n </g>\n </g>\n </g>\n </svg>\n `,\n 'business-rule': `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <g>\n <g>\n <path class=\"st0\" d=\"M28.6,11.1v14.8H6.5V11.1h20.3 M26.8,8H8.2c-1.5,0-2.7,1-2.7,2.1v15.8c0,1.2,1.2,1.1,2.7,1.1h18.7c1.5,0,2.7,0.1,2.7-1.1\n V10.1C29.5,8.9,28.3,8,26.8,8L26.8,8z\"/>\n </g>\n <path class=\"st0\" d=\"M29,21.4H6v-1h23V21.4z M28.8,16.4h-23v-1h23V16.4z M14.2,10.6v16h-1v-16H14.2z\"/>\n </g>\n </svg>\n `,\n script: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:none;stroke:{{strokeColor}};stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}\n </style>\n <g>\n <path class=\"st0\" d=\"M7.9,8h20.8c0,0-2.9,1.7-2.6,7.2c0.1,1,0.5,2,1.1,2.9c1.1,1.5,3,4.6,0.4,9h-21c0,0,3.2-5.5,1-9\n C7.6,18,3.8,12.4,7.9,8z\"/>\n <rect class=\"st0\" x=\"9.1\" y=\"11.3\" width=\"14\" height=\"1\"/>\n <rect class=\"st0\" x=\"9.7\" y=\"15\" width=\"14\" height=\"1\"/>\n <rect class=\"st0\" x=\"10.7\" y=\"18.7\" width=\"14\" height=\"1\"/>\n <rect class=\"st0\" x=\"11.7\" y=\"22.3\" width=\"14\" height=\"1\"/>\n </g>\n </svg>\n `\n}\n\nconst MARKERS: { [type: string]: string } = {\n loop: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <path class=\"st0\" d=\"M9.5,5.2C4.3,9.7,3.7,17.5,8.1,22.8L5,25.4l7.8,0.6l0.6-7.8L10.2,21c-3.5-4.1-3-10.1,1-13.6s10.1-3,13.6,1\n s3,10.1-1,13.6c-1.6,1.4-3.5,2.1-5.4,2.3l-0.2,2.8c2.6-0.2,5.3-1.1,7.4-3c5.2-4.5,5.8-12.3,1.3-17.5S14.7,0.8,9.5,5.2z\"/>\n </svg>\n`,\n parallel: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <g>\n <rect x=\"5.5\" y=\"1.9\" class=\"st0\" width=\"3.3\" height=\"25.3\"/>\n <rect x=\"15.9\" y=\"1.9\" class=\"st0\" width=\"3.3\" height=\"25.3\"/>\n <rect x=\"26.2\" y=\"1.9\" class=\"st0\" width=\"3.3\" height=\"25.3\"/>\n </g>\n </svg>\n `,\n sequential: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <g>\n <rect x=\"4.8\" y=\"2.6\" width=\"25.3\" height=\"3.3\" class=\"st0\"/>\n <rect x=\"4.8\" y=\"13\" width=\"25.3\" height=\"3.3\" class=\"st0\"/>\n <rect x=\"4.8\" y=\"23.3\" width=\"25.3\" height=\"3.3\" class=\"st0\"/>\n </g>\n </svg>\n `\n}\n"]}
@@ -6,64 +6,9 @@
6
6
  "auditLog": "logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json",
7
7
  "files": [
8
8
  {
9
- "date": 1667539391709,
10
- "name": "logs/application-2022-11-04-14.log",
11
- "hash": "7f7fed7640fdfc69429569d3ea2cde415a7f1c7281c4339fa29c251d976dbc76"
12
- },
13
- {
14
- "date": 1667544571953,
15
- "name": "logs/application-2022-11-04-15.log",
16
- "hash": "c732fd74ff5cf09677d7fe1956de87e6a39b48c5e319b81d9a4bc4588b1275a1"
17
- },
18
- {
19
- "date": 1667597082103,
20
- "name": "logs/application-2022-11-05-06.log",
21
- "hash": "6bc6cfcec03e585647f69d1b6281a850baefb586083a501f0b5836b6933f1238"
22
- },
23
- {
24
- "date": 1667613281639,
25
- "name": "logs/application-2022-11-05-10.log",
26
- "hash": "442d439a3213747fca38adc12b366263cf9019501d656adde0253f7f0b44417f"
27
- },
28
- {
29
- "date": 1667616038491,
30
- "name": "logs/application-2022-11-05-11.log",
31
- "hash": "c99459ef928e1a22ddb05cca44814950865b44309a8399100b9b4e3ce3821c24"
32
- },
33
- {
34
- "date": 1667633575981,
35
- "name": "logs/application-2022-11-05-16.log",
36
- "hash": "37f16f6825486c44f23f9095594250b8065c5a50d3be3d1c7e28d8c4d53c2a7e"
37
- },
38
- {
39
- "date": 1667637322397,
40
- "name": "logs/application-2022-11-05-17.log",
41
- "hash": "3b760512138f4ae1291a070b6dce19019702b0db3910e305769ada4ac9d390ae"
42
- },
43
- {
44
- "date": 1667648203876,
45
- "name": "logs/application-2022-11-05-20.log",
46
- "hash": "10b861fc26e00ea189134e063925fd03e749f8bdedb8d90b8fd112ec9a6fbb33"
47
- },
48
- {
49
- "date": 1667658659432,
50
- "name": "logs/application-2022-11-05-23.log",
51
- "hash": "61c81cd567ef121dc101febadc22981507edec71533bc306b61716cfeed5ccc7"
52
- },
53
- {
54
- "date": 1667663185909,
55
- "name": "logs/application-2022-11-06-00.log",
56
- "hash": "cfb02bf07e6f1e3aced77574cdad6729c41c9a6e6a5f41240a8d7dc39319e10b"
57
- },
58
- {
59
- "date": 1667706475012,
60
- "name": "logs/application-2022-11-06-12.log",
61
- "hash": "dd895c49e0fb6505f9c27686fb228e03e6cf65b05b2dcc764fff87c768016993"
62
- },
63
- {
64
- "date": 1667711656623,
65
- "name": "logs/application-2022-11-06-14.log",
66
- "hash": "1b0c3ed6a17f767e58be0fee479170777ee2a5b0f32f639ccfd86ccaf4f6f54a"
9
+ "date": 1670559298132,
10
+ "name": "logs/application-2022-12-09-13.log",
11
+ "hash": "2bfb012409ac831ad2b2b136a0efeef18c80b7f81ca208257ee8f6eb16e5374b"
67
12
  }
68
13
  ],
69
14
  "hashType": "sha256"
@@ -6,79 +6,9 @@
6
6
  "auditLog": "logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json",
7
7
  "files": [
8
8
  {
9
- "date": 1667438338735,
10
- "name": "logs/connections-2022-11-03-10.log",
11
- "hash": "53ba4fc3646ad58d25c2719784b36a71cb5af73122db53aa54cf97120c01b755"
12
- },
13
- {
14
- "date": 1667442519853,
15
- "name": "logs/connections-2022-11-03-11.log",
16
- "hash": "2e6e25982e029b45ea868e3607a21b500518da2e8abb2f25f3f29edfa2fe4283"
17
- },
18
- {
19
- "date": 1667529556012,
20
- "name": "logs/connections-2022-11-04-11.log",
21
- "hash": "88de11a91bc0431ee706faa88a705b999c0027a6fc8e8a9b02f9335ed540525a"
22
- },
23
- {
24
- "date": 1667539392698,
25
- "name": "logs/connections-2022-11-04-14.log",
26
- "hash": "5c39466372dc122a57f6e8f7ed63fcac6b2df5176118e9a4f977938ff53192c6"
27
- },
28
- {
29
- "date": 1667544573050,
30
- "name": "logs/connections-2022-11-04-15.log",
31
- "hash": "f9dd2e794d9c9f49679a189d3ec6f391963aaeee210a39b4c089afe934c66b27"
32
- },
33
- {
34
- "date": 1667597083286,
35
- "name": "logs/connections-2022-11-05-06.log",
36
- "hash": "43a73e0d622f36c42ad10fbcc236e6aeed09f70ee12c53001dfbf2d8d1a3b10f"
37
- },
38
- {
39
- "date": 1667613283188,
40
- "name": "logs/connections-2022-11-05-10.log",
41
- "hash": "f56640b5a41dc86b78b4aa58e547c8e058d5fe48b7180a40ddae260f95ebb7e8"
42
- },
43
- {
44
- "date": 1667616039501,
45
- "name": "logs/connections-2022-11-05-11.log",
46
- "hash": "005977bb8b7a1ebfbc7d93fcf32909eda94be00c24cbf9ffb5cb7ad83165cf42"
47
- },
48
- {
49
- "date": 1667633577510,
50
- "name": "logs/connections-2022-11-05-16.log",
51
- "hash": "b0842b45be028c9ceb25fd66b0e8c9b9d5a42495e9940e558f9d1dcd2ae80b70"
52
- },
53
- {
54
- "date": 1667637323340,
55
- "name": "logs/connections-2022-11-05-17.log",
56
- "hash": "40b9af507676b10248248c6e49b61add18bb3b8a7c4c3e625842d811f82a122b"
57
- },
58
- {
59
- "date": 1667648205315,
60
- "name": "logs/connections-2022-11-05-20.log",
61
- "hash": "e1064be56d3fcb012c1a92b9b670dfe212eb4b9da692dc02ba50b3e92aed0f11"
62
- },
63
- {
64
- "date": 1667658660894,
65
- "name": "logs/connections-2022-11-05-23.log",
66
- "hash": "3cbf6fad1e4a4afb5a7053015ad2bdc8d0f579a4733ca6459e0445b2d77eebcd"
67
- },
68
- {
69
- "date": 1667663186961,
70
- "name": "logs/connections-2022-11-06-00.log",
71
- "hash": "460a0734260e86f887869c0d16f9d871a411537404d71832b6d9fe446875b428"
72
- },
73
- {
74
- "date": 1667706476124,
75
- "name": "logs/connections-2022-11-06-12.log",
76
- "hash": "55c3cea79b470acca8f8394b56ea7eb0696e94fad3ebe2e266c204894517e9a9"
77
- },
78
- {
79
- "date": 1667711657827,
80
- "name": "logs/connections-2022-11-06-14.log",
81
- "hash": "0ab588887cb8267072fcf5c1182d32e93fa4ae6daef1183aa8d324e94e43257e"
9
+ "date": 1670559299436,
10
+ "name": "logs/connections-2022-12-09-13.log",
11
+ "hash": "5c8e55a7975db486763e65112df25519932b758af8cf4ef2222e1c9259ddf97d"
82
12
  }
83
13
  ],
84
14
  "hashType": "sha256"
@@ -0,0 +1,12 @@
1
+ 2022-12-09T13:14:58+09:00 info: File Storage is Ready.
2
+ 2022-12-09T13:14:59+09:00 error: oracledb module loading failed
3
+ 2022-12-09T13:15:00+09:00 info: Default DataSource established
4
+ 2022-12-09T13:15:00+09:00 info: Transaction DataSource established
5
+ 2022-12-09T13:15:01+09:00 info: 🚀 Server ready at http://0.0.0.0:3000/graphql
6
+ 2022-12-09T13:15:01+09:00 info: 🚀 Subscriptions ready at ws://0.0.0.0:3000/graphql
7
+ 2022-12-09T13:28:46+09:00 info: File Storage is Ready.
8
+ 2022-12-09T13:28:47+09:00 error: oracledb module loading failed
9
+ 2022-12-09T13:28:48+09:00 info: Default DataSource established
10
+ 2022-12-09T13:28:48+09:00 info: Transaction DataSource established
11
+ 2022-12-09T13:28:48+09:00 info: 🚀 Server ready at http://0.0.0.0:3000/graphql
12
+ 2022-12-09T13:28:48+09:00 info: 🚀 Subscriptions ready at ws://0.0.0.0:3000/graphql
@@ -0,0 +1,70 @@
1
+ 2022-12-09T13:15:01+09:00 info: Initializing ConnectionManager...
2
+ 2022-12-09T13:15:01+09:00 info: Connector 'echo-back-server' started to ready
3
+ 2022-12-09T13:15:01+09:00 info: Connector 'echo-back' started to ready
4
+ 2022-12-09T13:15:01+09:00 info: Connector 'http-connector' started to ready
5
+ 2022-12-09T13:15:01+09:00 info: Connector 'graphql-connector' started to ready
6
+ 2022-12-09T13:15:01+09:00 info: Connector 'sqlite-connector' started to ready
7
+ 2022-12-09T13:15:01+09:00 info: Connector 'postgresql-connector' started to ready
8
+ 2022-12-09T13:15:01+09:00 info: Connector 'mqtt-connector' started to ready
9
+ 2022-12-09T13:15:01+09:00 info: Connector 'mssql-connector' started to ready
10
+ 2022-12-09T13:15:01+09:00 info: Connector 'oracle-connector' started to ready
11
+ 2022-12-09T13:15:01+09:00 info: Connector 'mysql-connector' started to ready
12
+ 2022-12-09T13:15:01+09:00 info: Connector 'socket-server' started to ready
13
+ 2022-12-09T13:15:01+09:00 info: echo-back-servers are ready
14
+ 2022-12-09T13:15:01+09:00 info: echo-back connections are ready
15
+ 2022-12-09T13:15:01+09:00 info: http-connector connections are ready
16
+ 2022-12-09T13:15:01+09:00 info: graphql-connector connections are ready
17
+ 2022-12-09T13:15:01+09:00 info: sqlite-connector connections are ready
18
+ 2022-12-09T13:15:01+09:00 info: postgresql-connector connections are ready
19
+ 2022-12-09T13:15:01+09:00 info: mqtt-connector connections are ready
20
+ 2022-12-09T13:15:01+09:00 info: mssql-connector connections are ready
21
+ 2022-12-09T13:15:01+09:00 info: oracle-connector connections are ready
22
+ 2022-12-09T13:15:01+09:00 info: mysql-connector connections are ready
23
+ 2022-12-09T13:15:01+09:00 info: socket servers are ready
24
+ 2022-12-09T13:15:01+09:00 info: All connector for 'echo-back-server' ready
25
+ 2022-12-09T13:15:01+09:00 info: All connector for 'echo-back' ready
26
+ 2022-12-09T13:15:01+09:00 info: All connector for 'http-connector' ready
27
+ 2022-12-09T13:15:01+09:00 info: All connector for 'graphql-connector' ready
28
+ 2022-12-09T13:15:01+09:00 info: All connector for 'sqlite-connector' ready
29
+ 2022-12-09T13:15:01+09:00 info: All connector for 'postgresql-connector' ready
30
+ 2022-12-09T13:15:01+09:00 info: All connector for 'mqtt-connector' ready
31
+ 2022-12-09T13:15:01+09:00 info: All connector for 'mssql-connector' ready
32
+ 2022-12-09T13:15:01+09:00 info: All connector for 'oracle-connector' ready
33
+ 2022-12-09T13:15:01+09:00 info: All connector for 'mysql-connector' ready
34
+ 2022-12-09T13:15:01+09:00 info: All connector for 'socket-server' ready
35
+ 2022-12-09T13:15:01+09:00 info: ConnectionManager initialization done:
36
+ 2022-12-09T13:28:48+09:00 info: Initializing ConnectionManager...
37
+ 2022-12-09T13:28:48+09:00 info: Connector 'echo-back-server' started to ready
38
+ 2022-12-09T13:28:48+09:00 info: Connector 'echo-back' started to ready
39
+ 2022-12-09T13:28:48+09:00 info: Connector 'http-connector' started to ready
40
+ 2022-12-09T13:28:48+09:00 info: Connector 'graphql-connector' started to ready
41
+ 2022-12-09T13:28:48+09:00 info: Connector 'sqlite-connector' started to ready
42
+ 2022-12-09T13:28:48+09:00 info: Connector 'postgresql-connector' started to ready
43
+ 2022-12-09T13:28:48+09:00 info: Connector 'mqtt-connector' started to ready
44
+ 2022-12-09T13:28:48+09:00 info: Connector 'mssql-connector' started to ready
45
+ 2022-12-09T13:28:48+09:00 info: Connector 'oracle-connector' started to ready
46
+ 2022-12-09T13:28:48+09:00 info: Connector 'mysql-connector' started to ready
47
+ 2022-12-09T13:28:48+09:00 info: Connector 'socket-server' started to ready
48
+ 2022-12-09T13:28:48+09:00 info: echo-back-servers are ready
49
+ 2022-12-09T13:28:48+09:00 info: echo-back connections are ready
50
+ 2022-12-09T13:28:48+09:00 info: http-connector connections are ready
51
+ 2022-12-09T13:28:48+09:00 info: graphql-connector connections are ready
52
+ 2022-12-09T13:28:48+09:00 info: sqlite-connector connections are ready
53
+ 2022-12-09T13:28:48+09:00 info: postgresql-connector connections are ready
54
+ 2022-12-09T13:28:48+09:00 info: mqtt-connector connections are ready
55
+ 2022-12-09T13:28:48+09:00 info: mssql-connector connections are ready
56
+ 2022-12-09T13:28:48+09:00 info: oracle-connector connections are ready
57
+ 2022-12-09T13:28:48+09:00 info: mysql-connector connections are ready
58
+ 2022-12-09T13:28:48+09:00 info: socket servers are ready
59
+ 2022-12-09T13:28:48+09:00 info: All connector for 'echo-back-server' ready
60
+ 2022-12-09T13:28:48+09:00 info: All connector for 'echo-back' ready
61
+ 2022-12-09T13:28:48+09:00 info: All connector for 'http-connector' ready
62
+ 2022-12-09T13:28:48+09:00 info: All connector for 'graphql-connector' ready
63
+ 2022-12-09T13:28:48+09:00 info: All connector for 'sqlite-connector' ready
64
+ 2022-12-09T13:28:48+09:00 info: All connector for 'postgresql-connector' ready
65
+ 2022-12-09T13:28:48+09:00 info: All connector for 'mqtt-connector' ready
66
+ 2022-12-09T13:28:48+09:00 info: All connector for 'mssql-connector' ready
67
+ 2022-12-09T13:28:48+09:00 info: All connector for 'oracle-connector' ready
68
+ 2022-12-09T13:28:48+09:00 info: All connector for 'mysql-connector' ready
69
+ 2022-12-09T13:28:48+09:00 info: All connector for 'socket-server' ready
70
+ 2022-12-09T13:28:48+09:00 info: ConnectionManager initialization done:
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "bpmn components for things-scene",
4
4
  "license": "MIT",
5
5
  "author": "heartyoh",
6
- "version": "1.1.12",
6
+ "version": "1.1.20",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.js",
9
9
  "things-scene": true,
@@ -31,8 +31,8 @@
31
31
  },
32
32
  "devDependencies": {
33
33
  "@hatiolab/prettier-config": "^1.0.0",
34
- "@things-factory/builder": "^6.0.0-alpha.0",
35
- "@things-factory/operato-board": "^6.0.0-alpha.0",
34
+ "@things-factory/builder": "^6.0.0-zeta.0",
35
+ "@things-factory/operato-board": "^6.0.0-zeta.0",
36
36
  "@typescript-eslint/eslint-plugin": "^4.33.0",
37
37
  "@typescript-eslint/parser": "^4.33.0",
38
38
  "@web/dev-server": "^0.1.28",
@@ -57,5 +57,5 @@
57
57
  "prettier --write"
58
58
  ]
59
59
  },
60
- "gitHead": "4fc61da16e2a9b3b02ced90c555ea0462220e09f"
60
+ "gitHead": "777f0c4371e99ccf402ff1e5cda5b69a7451fbcd"
61
61
  }
@@ -17,6 +17,8 @@ export default abstract class BPMNActivity extends BPMNControlBase {
17
17
  ctx.arcTo(0, height, 0, 0, radius)
18
18
  ctx.arcTo(0, 0, width, 0, radius)
19
19
 
20
+ ctx.translate(-left, -top)
21
+
20
22
  this.drawFill(ctx)
21
23
  this.drawStroke(ctx)
22
24
 
@@ -24,9 +26,7 @@ export default abstract class BPMNActivity extends BPMNControlBase {
24
26
 
25
27
  const image = this.getImageElement()
26
28
  if (image) {
27
- this.drawImage(ctx, image, 0, 0, 24, 24)
29
+ this.drawImage(ctx, image, left, top, 24, 24)
28
30
  }
29
-
30
- ctx.translate(-left, -top)
31
31
  }
32
32
  }
@@ -43,11 +43,10 @@ export default class BPMNComment extends BPMNControlBase {
43
43
 
44
44
  ctx.beginPath()
45
45
  ctx.rect(0, 0, width, height)
46
- this.drawFill(ctx)
47
-
48
- ctx.beginPath()
49
46
 
50
47
  ctx.translate(-left, -top)
48
+
49
+ this.drawFill(ctx)
51
50
  }
52
51
 
53
52
  get textBounds(): BOUNDS {
@@ -85,6 +85,8 @@ export default class BPMNDataObject extends BPMNControlBase {
85
85
  ctx.lineTo(0, height)
86
86
  ctx.lineTo(0, 0)
87
87
 
88
+ ctx.translate(-left, -top)
89
+
88
90
  this.drawFill(ctx)
89
91
  this.drawStroke(ctx)
90
92
 
@@ -92,14 +94,12 @@ export default class BPMNDataObject extends BPMNControlBase {
92
94
 
93
95
  const image = this.getImageElement()
94
96
  if (image) {
95
- this.drawImage(ctx, image, 0, 0, corner, corner)
97
+ this.drawImage(ctx, image, left, top, corner, corner)
96
98
  }
97
99
 
98
100
  if (collection) {
99
- this.drawImage(ctx, this.getCollectionImageElement()!, (width - 16) / 2, height - 16, 16, 16)
101
+ this.drawImage(ctx, this.getCollectionImageElement()!, left + (width - 16) / 2, top + height - 16, 16, 16)
100
102
  }
101
-
102
- ctx.translate(-left, -top)
103
103
  }
104
104
 
105
105
  onchange(after: Properties, before: Properties) {
@@ -53,10 +53,10 @@ export default class BPMNDataStore extends BPMNControlBase {
53
53
  ctx.ellipse(width / 2, height - ry, width / 2, ry, 0, startAngle, endAngle, true)
54
54
  ctx.lineTo(width, ry)
55
55
 
56
+ ctx.translate(-left, -top)
57
+
56
58
  this.drawFill(ctx)
57
59
  this.drawStroke(ctx)
58
-
59
- ctx.translate(-left, -top)
60
60
  }
61
61
  }
62
62
 
package/src/bpmn-event.ts CHANGED
@@ -152,6 +152,8 @@ export default class BPMNEvent extends BPMNControlBase {
152
152
  break
153
153
  }
154
154
 
155
+ ctx.translate(-left, -top)
156
+
155
157
  this.drawFill(ctx)
156
158
 
157
159
  this.drawStroke(ctx, {
@@ -163,10 +165,8 @@ export default class BPMNEvent extends BPMNControlBase {
163
165
 
164
166
  const image = this.getImageElement()
165
167
  if (image) {
166
- this.drawImage(ctx, image, width / 6, height / 6, (width * 2) / 3, (height * 2) / 3)
168
+ this.drawImage(ctx, image, left + width / 6, top + height / 6, (width * 2) / 3, (height * 2) / 3)
167
169
  }
168
-
169
- ctx.translate(-left, -top)
170
170
  }
171
171
 
172
172
  onchange(after: Properties, before: Properties) {
@@ -185,6 +185,8 @@ export default class BPMNExpandedSubprocess extends BPMNContainerBase {
185
185
  ctx.arcTo(LINEGAP, LINEGAP, width - LINEGAP, LINEGAP, radius)
186
186
  }
187
187
 
188
+ ctx.translate(-left, -top)
189
+
188
190
  this.drawFill(ctx)
189
191
 
190
192
  if (callActivity) {
@@ -195,8 +197,6 @@ export default class BPMNExpandedSubprocess extends BPMNContainerBase {
195
197
  lineDash: interrupting ? 'dash' : 'solid'
196
198
  })
197
199
  }
198
-
199
- ctx.translate(-left, -top)
200
200
  }
201
201
 
202
202
  get textHidden() {