cnhis-design-vue 3.1.40-beta.11 → 3.1.40-beta.15

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 (425) hide show
  1. package/README.md +87 -87
  2. package/es/_virtual/plugin-vue_export-helper.js +1 -9
  3. package/es/components/annotation-edit/index.js +1 -10
  4. package/es/components/annotation-edit/src/AnnotationEdit.js +1 -164
  5. package/es/components/big-table/index.js +1 -15
  6. package/es/components/big-table/src/BigTable.vue.js +1 -6
  7. package/es/components/big-table/src/BigTable.vue2.js +1 -2498
  8. package/es/components/big-table/src/bigTableEmits.js +1 -53
  9. package/es/components/big-table/src/bigTableProps.js +1 -120
  10. package/es/components/big-table/src/bigTableState.js +1 -62
  11. package/es/components/big-table/src/components/NoData.vue.js +1 -74
  12. package/es/components/big-table/src/components/edit-form/edit-date.js +1 -214
  13. package/es/components/big-table/src/components/edit-form/edit-input.js +1 -95
  14. package/es/components/big-table/src/components/edit-form/edit-select.js +1 -139
  15. package/es/components/big-table/src/components/edit-form/edit-separate.vue.js +1 -103
  16. package/es/components/big-table/src/components/edit-form/edit-time.js +1 -122
  17. package/es/components/big-table/src/components/edit-form/useCommon.js +1 -23
  18. package/es/components/big-table/src/components/input-button.vue.js +1 -39
  19. package/es/components/big-table/src/components/separate.vue.js +1 -30
  20. package/es/components/big-table/src/constants/index.js +1 -3
  21. package/es/components/big-table/src/hooks/index.js +1 -9
  22. package/es/components/big-table/src/hooks/useAnchor.js +1 -49
  23. package/es/components/big-table/src/hooks/useAnnotation.js +1 -21
  24. package/es/components/big-table/src/hooks/useBatchEditing.js +1 -301
  25. package/es/components/big-table/src/hooks/useEdit.js +1 -133
  26. package/es/components/big-table/src/hooks/useEvent.js +1 -95
  27. package/es/components/big-table/src/hooks/useFormat.js +1 -507
  28. package/es/components/big-table/src/hooks/useNestTable.js +1 -86
  29. package/es/components/big-table/src/hooks/useSeparateRow.js +1 -177
  30. package/es/components/big-table/src/hooks/useTableParse.js +1 -142
  31. package/es/components/big-table/src/utils.js +1 -618
  32. package/es/components/bpmn-workflow/index.js +1 -10
  33. package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.js +1 -258
  34. package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/BpmnRenderer.js +1 -1452
  35. package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomPathMap.js +1 -99
  36. package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRenderer.js +1 -114
  37. package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRules.js +1 -40
  38. package/es/components/bpmn-workflow/src/custom/customOtherModule/customViewerRenderer.js +1 -14
  39. package/es/components/bpmn-workflow/src/custom/customOtherModule/zoomScroll.js +1 -10
  40. package/es/components/button-print/index.js +1 -12
  41. package/es/components/button-print/src/ButtonPrint.vue.js +1 -6
  42. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -528
  43. package/es/components/button-print/src/components/EditFormat.vue.js +1 -173
  44. package/es/components/button-print/src/components/IdentityVerification.vue.js +1 -182
  45. package/es/components/button-print/src/components/Preview.vue.js +1 -6
  46. package/es/components/button-print/src/components/Preview.vue2.js +1 -67
  47. package/es/components/button-print/src/utils/browserPrint.d.ts +2 -1
  48. package/es/components/button-print/src/utils/browserPrint.js +1 -43
  49. package/es/components/button-print/src/utils/dialog.js +1 -121
  50. package/es/components/button-print/src/utils/index.js +1 -2
  51. package/es/components/button-print/src/utils/print.d.ts +5 -1
  52. package/es/components/button-print/src/utils/print.js +1 -432
  53. package/es/components/editor/index.js +1 -10
  54. package/es/components/editor/src/Editor.js +1 -77
  55. package/es/components/fabric-chart/index.js +1 -10
  56. package/es/components/fabric-chart/src/FabricChart.vue.js +1 -71
  57. package/es/components/fabric-chart/src/components/PopupMenu.js +1 -118
  58. package/es/components/fabric-chart/src/components/PopupTip.vue.js +1 -34
  59. package/es/components/fabric-chart/src/components/useStyle.js +1 -36
  60. package/es/components/fabric-chart/src/hooks/constant.js +1 -78
  61. package/es/components/fabric-chart/src/hooks/index.js +1 -11
  62. package/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -642
  63. package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +1 -153
  64. package/es/components/fabric-chart/src/hooks/useBottom.js +1 -91
  65. package/es/components/fabric-chart/src/hooks/useCenter.js +1 -734
  66. package/es/components/fabric-chart/src/hooks/useCommon.js +1 -32
  67. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -79
  68. package/es/components/fabric-chart/src/hooks/useDraw.js +1 -182
  69. package/es/components/fabric-chart/src/hooks/useEvent.js +1 -146
  70. package/es/components/fabric-chart/src/hooks/useGrid.js +1 -54
  71. package/es/components/fabric-chart/src/hooks/useLeft.js +1 -331
  72. package/es/components/fabric-chart/src/hooks/useOther.js +1 -95
  73. package/es/components/fabric-chart/src/hooks/useRight.js +1 -22
  74. package/es/components/fabric-chart/src/hooks/useShadow.js +1 -132
  75. package/es/components/fabric-chart/src/hooks/useTemperatureChart.js +1 -341
  76. package/es/components/fabric-chart/src/hooks/useTop.js +1 -154
  77. package/es/components/fabric-chart/src/utils/index.js +1 -15624
  78. package/es/components/fabric-chart/src/utils/utils.js +1 -32
  79. package/es/components/field-set/index.js +1 -10
  80. package/es/components/field-set/src/FieldSet.vue.js +1 -470
  81. package/es/components/form-config/index.d.ts +1 -1
  82. package/es/components/form-config/index.js +1 -10
  83. package/es/components/form-config/src/FormConfig.vue.d.ts +1 -1
  84. package/es/components/form-config/src/FormConfig.vue.js +1 -124
  85. package/es/components/form-config/src/components/FormConfigCreator.vue.js +1 -100
  86. package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +1 -45
  87. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +1 -1
  88. package/es/components/form-config/src/components/FormConfigEdit.vue.js +1 -97
  89. package/es/components/form-config/src/components/FormConfigMaterialItem.js +1 -28
  90. package/es/components/form-config/src/components/index.js +1 -6
  91. package/es/components/form-config/src/components/renderer/CloseButton.vue.js +1 -45
  92. package/es/components/form-config/src/components/renderer/ComplexNode.vue.js +1 -45
  93. package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -60
  94. package/es/components/form-config/src/components/renderer/index.js +1 -3
  95. package/es/components/form-config/src/constants/index.js +1 -61
  96. package/es/components/form-config/src/hooks/index.js +1 -3
  97. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -90
  98. package/es/components/form-config/src/hooks/useDataNormalize.js +1 -35
  99. package/es/components/form-config/src/hooks/usePresetRenderer.js +1 -36
  100. package/es/components/form-config/src/hooks/useSortalbeConfig.js +1 -42
  101. package/es/components/form-config/src/utils/index.js +1 -26
  102. package/es/components/form-render/index.js +1 -30
  103. package/es/components/form-render/src/FormRender.vue.js +1 -239
  104. package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -49
  105. package/es/components/form-render/src/components/renderer/combination.js +1 -114
  106. package/es/components/form-render/src/components/renderer/complex.js +1 -37
  107. package/es/components/form-render/src/components/renderer/date.js +1 -171
  108. package/es/components/form-render/src/components/renderer/formItem.js +1 -128
  109. package/es/components/form-render/src/components/renderer/index.js +1 -43
  110. package/es/components/form-render/src/components/renderer/input.js +1 -50
  111. package/es/components/form-render/src/components/renderer/inputGroup.js +1 -11
  112. package/es/components/form-render/src/components/renderer/inputNumber.js +1 -55
  113. package/es/components/form-render/src/components/renderer/jsonCombination/hooks/useDeepValidate.js +1 -35
  114. package/es/components/form-render/src/components/renderer/jsonCombination/index.js +1 -175
  115. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -274
  116. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.js +1 -71
  117. package/es/components/form-render/src/components/renderer/lineBar/index.js +1 -11
  118. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -111
  119. package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -139
  120. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -244
  121. package/es/components/form-render/src/components/renderer/select.js +1 -176
  122. package/es/components/form-render/src/components/renderer/simpleComponent.js +1 -57
  123. package/es/components/form-render/src/components/renderer/slider.js +1 -38
  124. package/es/components/form-render/src/components/renderer/switch.js +1 -48
  125. package/es/components/form-render/src/components/renderer/textarea.js +1 -36
  126. package/es/components/form-render/src/components/tooltipMessage.vue.js +1 -37
  127. package/es/components/form-render/src/constants/index.js +1 -59
  128. package/es/components/form-render/src/hooks/index.js +1 -15
  129. package/es/components/form-render/src/hooks/useAnchor.js +1 -99
  130. package/es/components/form-render/src/hooks/useAsyncQueue.js +1 -153
  131. package/es/components/form-render/src/hooks/useAutoHidden.js +1 -43
  132. package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -119
  133. package/es/components/form-render/src/hooks/useChangeContext.js +1 -20
  134. package/es/components/form-render/src/hooks/useCommonInjection.js +1 -43
  135. package/es/components/form-render/src/hooks/useCommonLog.js +1 -12
  136. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -225
  137. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -290
  138. package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -65
  139. package/es/components/form-render/src/hooks/useFieldVisitor.js +1 -46
  140. package/es/components/form-render/src/hooks/useFormContext.js +1 -70
  141. package/es/components/form-render/src/hooks/useFormEvent.js +1 -140
  142. package/es/components/form-render/src/hooks/useFormField.js +1 -13
  143. package/es/components/form-render/src/hooks/useFormItemDeps.js +1 -31
  144. package/es/components/form-render/src/hooks/useFormRenderLifeCycle.js +1 -10
  145. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -278
  146. package/es/components/form-render/src/hooks/useFormRequest.js +1 -42
  147. package/es/components/form-render/src/hooks/useFormValidator.js +1 -83
  148. package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -85
  149. package/es/components/form-render/src/hooks/useNuiThemeOverrides.js +1 -18
  150. package/es/components/form-render/src/hooks/usePresetScope.js +1 -22
  151. package/es/components/form-render/src/types/fieldItem.d.ts +2 -1
  152. package/es/components/form-render/src/types/fieldItem.js +1 -1
  153. package/es/components/form-render/src/types/index.js +1 -1
  154. package/es/components/form-render/src/utils/business.js +1 -114
  155. package/es/components/form-render/src/utils/dom.js +1 -38
  156. package/es/components/form-render/src/utils/index.js +1 -241
  157. package/es/components/form-render/src/utils/schema.js +1 -105
  158. package/es/components/grid/index.js +1 -11
  159. package/es/components/grid/src/Grid.js +1 -28
  160. package/es/components/grid/src/hooks.js +1 -168
  161. package/es/components/iho-table/index.js +1 -36
  162. package/es/components/iho-table/src/IhoTable.vue.js +1 -157
  163. package/es/components/iho-table/src/constants/index.js +1 -157
  164. package/es/components/iho-table/src/hooks/export.js +1 -2
  165. package/es/components/iho-table/src/hooks/index.js +1 -2
  166. package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -159
  167. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.js +1 -67
  168. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -26
  169. package/es/components/iho-table/src/hooks/tapHooks/useDomInsertHooks.js +1 -27
  170. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.js +1 -280
  171. package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.js +1 -26
  172. package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.js +1 -38
  173. package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -27
  174. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -164
  175. package/es/components/iho-table/src/hooks/useTableContext.js +1 -17
  176. package/es/components/iho-table/src/hooks/useTablePlugin.js +1 -20
  177. package/es/components/iho-table/src/plugins/anchorPlugin/index.js +1 -19
  178. package/es/components/iho-table/src/plugins/anchorPlugin/tableAnchor.js +1 -51
  179. package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +1 -87
  180. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -48
  181. package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.js +1 -230
  182. package/es/components/iho-table/src/plugins/filterPlugin/index.js +1 -240
  183. package/es/components/iho-table/src/plugins/index.js +1 -47
  184. package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -30
  185. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -127
  186. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -203
  187. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -41
  188. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -21
  189. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +1 -41
  190. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -79
  191. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -64
  192. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -46
  193. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -16
  194. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.js +1 -108
  195. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -163
  196. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separateUtils.js +1 -42
  197. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +1 -50
  198. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -30
  199. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/colorRendererPlugin.js +1 -48
  200. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -62
  201. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/labelRendererPlugin.js +1 -52
  202. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +1 -92
  203. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +1 -59
  204. package/es/components/iho-table/src/plugins/rowClickPlugin/index.js +1 -34
  205. package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index.js +1 -30
  206. package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.js +1 -53
  207. package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +1 -100
  208. package/es/components/iho-table/src/types/index.js +1 -1
  209. package/es/components/iho-table/src/types/pluginType.js +1 -16
  210. package/es/components/iho-table/src/utils/index.js +1 -169
  211. package/es/components/index.js +1 -119
  212. package/es/components/info-header/index.js +1 -10
  213. package/es/components/info-header/src/HiddenContent.vue.js +1 -70
  214. package/es/components/info-header/src/InfoEllipsis.vue.js +1 -43
  215. package/es/components/info-header/src/InfoHeader.vue.js +1 -313
  216. package/es/components/insurance-sdk/index.js +1 -1
  217. package/es/components/insurance-sdk/src/constants/index.js +1 -160
  218. package/es/components/insurance-sdk/src/utils/index.js +1 -1
  219. package/es/components/insurance-sdk/src/utils/insurance.js +1 -268
  220. package/es/components/keyboard/index.d.ts +4 -21
  221. package/es/components/keyboard/index.js +1 -10
  222. package/es/components/keyboard/src/Keyboard.vue.d.ts +4 -21
  223. package/es/components/keyboard/src/Keyboard.vue.js +1 -164
  224. package/es/components/keyboard/src/components/InputNumber.vue.d.ts +2 -19
  225. package/es/components/keyboard/src/components/InputNumber.vue.js +1 -94
  226. package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +4 -21
  227. package/es/components/keyboard/src/components/NumberPanel.vue.js +1 -299
  228. package/es/components/keyboard/src/utils/index.js +1 -5
  229. package/es/components/map/index.js +1 -10
  230. package/es/components/map/src/Map.vue.js +1 -336
  231. package/es/components/recommend-search/index.js +1 -10
  232. package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -63
  233. package/es/components/recommend-search/src/components/BaseSearch.vue.js +1 -157
  234. package/es/components/recommend-search/src/components/RecommendInput.vue.js +1 -125
  235. package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -104
  236. package/es/components/recommend-search/src/components/RecommendSelect.vue.js +1 -146
  237. package/es/components/recommend-search/src/constant/index.js +1 -7
  238. package/es/components/scale-view/index.js +1 -35
  239. package/es/components/scale-view/src/ScaleView.vue.d.ts +0 -3
  240. package/es/components/scale-view/src/ScaleView.vue.js +1 -429
  241. package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -80
  242. package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -117
  243. package/es/components/scale-view/src/components/EvaluatePage.vue.js +1 -141
  244. package/es/components/scale-view/src/components/LoadingCom.vue.js +1 -19
  245. package/es/components/scale-view/src/components/NoData.vue.js +1 -74
  246. package/es/components/scale-view/src/components/ScaleScore.js +1 -63
  247. package/es/components/scale-view/src/components/composables/choose-common.js +1 -83
  248. package/es/components/scale-view/src/components/formitem/address.js +1 -3993
  249. package/es/components/scale-view/src/components/formitem/r-address.js +1 -226
  250. package/es/components/scale-view/src/components/formitem/r-cascader.js +1 -133
  251. package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -281
  252. package/es/components/scale-view/src/components/formitem/r-collection.js +1 -111
  253. package/es/components/scale-view/src/components/formitem/r-datetime.js +1 -212
  254. package/es/components/scale-view/src/components/formitem/r-input.js +1 -86
  255. package/es/components/scale-view/src/components/formitem/r-map.js +1 -106
  256. package/es/components/scale-view/src/components/formitem/r-radio.js +1 -240
  257. package/es/components/scale-view/src/components/formitem/r-select.js +1 -202
  258. package/es/components/scale-view/src/components/formitem/r-sign.js +1 -177
  259. package/es/components/scale-view/src/components/formitem/r-upload.js +1 -215
  260. package/es/components/scale-view/src/components/formitem/sign-com.js +1 -307
  261. package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -129
  262. package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -354
  263. package/es/components/scale-view/src/hooks/scaleview-init.js +1 -437
  264. package/es/components/scale-view/src/hooks/scaleview-props.js +1 -81
  265. package/es/components/scale-view/src/hooks/scaleview-state.js +1 -38
  266. package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -154
  267. package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -187
  268. package/es/components/scale-view/src/hooks/use-component.js +1 -86
  269. package/es/components/scale-view/src/hooks/use-evaluate.js +1 -150
  270. package/es/components/scale-view/src/hooks/use-event.js +1 -129
  271. package/es/components/scale-view/src/hooks/use-noData.js +1 -41
  272. package/es/components/scale-view/src/utils/judge-types.js +1 -36
  273. package/es/components/search-cascader/index.js +1 -10
  274. package/es/components/search-cascader/src/SearchCascader.vue.js +1 -194
  275. package/es/components/search-cascader/src/components/SearchMenu.js +1 -196
  276. package/es/components/search-cascader/src/components/index.js +1 -1
  277. package/es/components/search-cascader/src/constants/index.js +1 -11
  278. package/es/components/search-cascader/src/hooks/index.js +1 -1
  279. package/es/components/search-cascader/src/hooks/useCssVariable.js +1 -7
  280. package/es/components/search-cascader/src/utils/index.js +1 -11
  281. package/es/components/select-label/index.js +1 -15
  282. package/es/components/select-label/src/LabelFormContent.vue.js +1 -447
  283. package/es/components/select-label/src/SelectLabel.vue.js +1 -6
  284. package/es/components/select-label/src/SelectLabel.vue2.js +1 -451
  285. package/es/components/select-label/src/components/label-classify.vue.js +1 -132
  286. package/es/components/select-person/index.js +1 -10
  287. package/es/components/select-person/src/SelectPerson.vue.js +1 -6
  288. package/es/components/select-person/src/SelectPerson.vue2.js +1 -303
  289. package/es/components/select-person/src/utils/index.js +1 -58
  290. package/es/components/shortcut-provider/index.js +1 -12
  291. package/es/components/shortcut-provider/src/ShortcutProvider.vue.js +1 -42
  292. package/es/components/shortcut-provider/src/constants/index.js +1 -8
  293. package/es/components/shortcut-provider/src/hooks/index.js +1 -2
  294. package/es/components/shortcut-provider/src/hooks/useShortcutSignature.js +1 -12
  295. package/es/components/shortcut-provider/src/hooks/useShortcuts.js +1 -188
  296. package/es/components/shortcut-provider/src/utils/index.js +1 -92
  297. package/es/components/shortcut-setter/index.d.ts +1 -1
  298. package/es/components/shortcut-setter/index.js +1 -10
  299. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -1
  300. package/es/components/shortcut-setter/src/ShortcutSetter.vue.js +1 -98
  301. package/es/components/shortcut-setter/src/ShortcutSetterItem.vue.js +1 -76
  302. package/es/components/steps-wheel/index.js +1 -10
  303. package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -376
  304. package/es/components/table-filter/index.js +1 -21
  305. package/es/components/table-filter/src/base-search-com/BaseSearch.vue.d.ts +3 -0
  306. package/es/components/table-filter/src/base-search-com/BaseSearch.vue.js +1 -2272
  307. package/es/components/table-filter/src/classification/Classification-com.vue.js +1 -1315
  308. package/es/components/table-filter/src/classification/search-class-name.vue.js +1 -195
  309. package/es/components/table-filter/src/classification/search-professional-model.vue.js +1 -594
  310. package/es/components/table-filter/src/components/age-com/index.vue.js +1 -185
  311. package/es/components/table-filter/src/components/button-group/ButtonGroup.vue.js +1 -86
  312. package/es/components/table-filter/src/components/button-icon/getBtnIcon.js +1 -30
  313. package/es/components/table-filter/src/components/c-tree-select/tree-select.vue.js +1 -253
  314. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +1 -114
  315. package/es/components/table-filter/src/components/classify-filter/helpers/options.js +1 -14
  316. package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.js +1 -87
  317. package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +1 -147
  318. package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -304
  319. package/es/components/table-filter/src/components/multi-select/multi-select.vue.js +1 -153
  320. package/es/components/table-filter/src/components/out-quick-search/out-quick-search.vue.js +1 -310
  321. package/es/components/table-filter/src/components/range-age/index.vue.js +1 -137
  322. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.js +1 -64
  323. package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -45
  324. package/es/components/table-filter/src/components/render-widget/components/index.js +1 -2
  325. package/es/components/table-filter/src/components/render-widget/enums.js +1 -27
  326. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +1 -70
  327. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -107
  328. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -152
  329. package/es/components/table-filter/src/components/search-condition/SearchCondition.vue.js +1 -1520
  330. package/es/components/table-filter/src/components/search-condition/fieldTypeList.js +1 -171
  331. package/es/components/table-filter/src/components/search-filter/SearchFilter.vue.js +1 -199
  332. package/es/components/table-filter/src/components/search-modal/set-classification.vue.js +1 -241
  333. package/es/components/table-filter/src/components/table-modal/TableModal.vue.js +1 -526
  334. package/es/components/table-filter/src/const/dataOptions.js +1 -107
  335. package/es/components/table-filter/src/const/index.js +1 -5
  336. package/es/components/table-filter/src/directive/flexibleResize.js +1 -157
  337. package/es/components/table-filter/src/directive/preventReClick.js +1 -14
  338. package/es/components/table-filter/src/directive/resize.js +1 -12
  339. package/es/components/table-filter/src/hooks/export.js +1 -1
  340. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -64
  341. package/es/components/table-filter/src/hooks/useMixins.js +1 -532
  342. package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -94
  343. package/es/components/table-filter/src/hooks/useTableSearchCon.js +1 -131
  344. package/es/components/table-filter/src/hooks/useWordBookutils.js +1 -91
  345. package/es/components/table-filter/src/quick-search/QuickSearch.vue.d.ts +4 -3
  346. package/es/components/table-filter/src/quick-search/QuickSearch.vue.js +1 -2038
  347. package/es/components/table-filter/src/tool/generateDefOptions.js +1 -65
  348. package/es/components/table-filter/src/tool/getWidgetType.js +1 -27
  349. package/es/components/table-filter/src/tool/options.js +1 -200
  350. package/es/components/table-filter/src/tool/resizeSensor.js +1 -123
  351. package/es/components/table-filter/src/tool/time-domain.js +1 -100
  352. package/es/components/table-filter/src/tool/transformData.js +1 -169
  353. package/es/components/table-filter/src/tool/utils.js +1 -29
  354. package/es/components/table-filter/src/types/enums.js +1 -67
  355. package/es/components/time-line/index.js +1 -10
  356. package/es/components/time-line/src/TimeLine.vue.js +1 -70
  357. package/es/components/vod-chunk-upload/index.js +1 -14
  358. package/es/components/vod-chunk-upload/src/chunk-upload-new.vue.js +1 -480
  359. package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +1 -70
  360. package/es/components/vod-chunk-upload/src/hooks/upload-data.js +1 -96
  361. package/es/components/vod-chunk-upload/src/hooks/vod-computed.js +1 -79
  362. package/es/components/vod-chunk-upload/src/hooks/vod-data.js +1 -28
  363. package/es/components/vod-chunk-upload/src/vod-chunk-upload/index.js +1 -2
  364. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -332
  365. package/es/components/vod-chunk-upload/src/vod-upload-modal.js +1 -94
  366. package/es/env.d.ts +24 -24
  367. package/es/shared/assets/img/failure.png.js +1 -3
  368. package/es/shared/assets/img/no-permission.png.js +1 -3
  369. package/es/shared/assets/img/nodata.png.js +1 -3
  370. package/es/shared/assets/img/notfound.png.js +1 -3
  371. package/es/shared/assets/img/qr.png.js +1 -3
  372. package/es/shared/assets/img/success.png.js +1 -3
  373. package/es/shared/assets/img/video.png.js +1 -3
  374. package/es/shared/assets/img/video_default_cover.png.js +1 -3
  375. package/es/shared/assets/img/xb_big.png.js +1 -3
  376. package/es/shared/assets/img/xb_small.png.js +1 -3
  377. package/es/shared/components/SelectPage/SelectPage.vue.js +1 -61
  378. package/es/shared/components/SelectPage/index.js +1 -2
  379. package/es/shared/components/SlotRender/SlotRender.js +1 -35
  380. package/es/shared/components/SlotRender/index.js +1 -2
  381. package/es/shared/components/SvgIcon/SvgIcon.vue.js +1 -36
  382. package/es/shared/components/SvgIcon/index.js +1 -2
  383. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -77
  384. package/es/shared/components/TextOverTooltip/index.js +1 -2
  385. package/es/shared/components/VueDraggable/index.js +1 -2
  386. package/es/shared/components/VueDraggable/src/core/componentBuilderHelper.js +1 -35
  387. package/es/shared/components/VueDraggable/src/core/componentStructure.js +1 -54
  388. package/es/shared/components/VueDraggable/src/core/renderHelper.js +1 -47
  389. package/es/shared/components/VueDraggable/src/core/sortableEvents.js +1 -14
  390. package/es/shared/components/VueDraggable/src/util/console.js +1 -9
  391. package/es/shared/components/VueDraggable/src/util/htmlHelper.js +1 -11
  392. package/es/shared/components/VueDraggable/src/util/string.js +1 -11
  393. package/es/shared/components/VueDraggable/src/util/tags.js +1 -130
  394. package/es/shared/components/VueDraggable/src/vuedraggable.js +1 -265
  395. package/es/shared/components/no-data/NoData.vue.js +1 -74
  396. package/es/shared/components/no-data/index.js +1 -2
  397. package/es/shared/components/player-vod/player.js +1 -121
  398. package/es/shared/components/player-vod/video-modal.js +1 -91
  399. package/es/shared/global/variable.js +1 -3
  400. package/es/shared/utils/anime.js +1 -129
  401. package/es/shared/utils/colorLog.js +1 -53
  402. package/es/shared/utils/index.js +1 -167
  403. package/es/shared/utils/loadViewer.js +1 -11
  404. package/es/shared/utils/tapable/AsyncParallelBailHook.js +1 -63
  405. package/es/shared/utils/tapable/AsyncParallelHook.js +1 -27
  406. package/es/shared/utils/tapable/AsyncSeriesBailHook.js +1 -18
  407. package/es/shared/utils/tapable/AsyncSeriesHook.js +1 -27
  408. package/es/shared/utils/tapable/AsyncSeriesLoopHook.js +1 -12
  409. package/es/shared/utils/tapable/AsyncSeriesWaterfallHook.js +1 -22
  410. package/es/shared/utils/tapable/Hook.js +1 -140
  411. package/es/shared/utils/tapable/HookCodeFactory.js +1 -456
  412. package/es/shared/utils/tapable/SyncBailHook.js +1 -19
  413. package/es/shared/utils/tapable/SyncHook.js +1 -34
  414. package/es/shared/utils/tapable/SyncLoopHook.js +1 -13
  415. package/es/shared/utils/tapable/SyncWaterfallHook.js +1 -47
  416. package/es/shared/utils/utilExpand.js +1 -781
  417. package/es/shared/utils/vexutils.js +1 -59
  418. package/package.json +2 -2
  419. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  420. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  421. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  422. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  423. package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
  424. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  425. package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -1,1452 +1 @@
1
- import inherits from 'inherits';
2
- import { assign, forEach, isObject } from 'min-dash';
3
- import BaseRenderer from 'diagram-js/lib/draw/BaseRenderer';
4
- import { isExpanded, isEventSubProcess } from 'bpmn-js/lib/util/DiUtil';
5
- import { getLabel } from 'bpmn-js/lib/features/label-editing/LabelUtil';
6
- import { is } from 'bpmn-js/lib/util/ModelUtil';
7
- import { createLine } from 'diagram-js/lib/util/RenderUtil';
8
- import { getCirclePath, getRoundRectPath, getDiamondPath, getRectPath, getFillColor, getStrokeColor, getSemantic, getLabelColor, getDi, isCollection, isThrowEvent, isTypedEvent } from 'bpmn-js/lib/draw/BpmnRenderUtil';
9
- import { query } from 'min-dom';
10
- import { attr, create, append, classes } from 'tiny-svg';
11
- import { rotate, transform, translate } from 'diagram-js/lib/util/SvgTransformUtil';
12
- import Ids from 'ids';
13
-
14
- var RENDERER_IDS = new Ids();
15
- var TASK_BORDER_RADIUS = 10;
16
- var INNER_OUTER_DIST = 3;
17
- var DEFAULT_FILL_OPACITY = 0.95, HIGH_FILL_OPACITY = 0.35;
18
- var ELEMENT_LABEL_DISTANCE = 10;
19
- function BpmnRenderer(config, eventBus, styles, pathMap, canvas, textRenderer, priority) {
20
- BaseRenderer.call(this, eventBus, priority);
21
- var defaultFillColor = config && config.defaultFillColor, defaultStrokeColor = config && config.defaultStrokeColor, defaultLabelColor = config && config.defaultLabelColor;
22
- var rendererId = RENDERER_IDS.next();
23
- var markers = {};
24
- var computeStyle = styles.computeStyle;
25
- function addMarker(id, options) {
26
- var attrs = assign(
27
- {
28
- fill: "black",
29
- strokeWidth: 1,
30
- strokeLinecap: "round",
31
- strokeDasharray: "none"
32
- },
33
- options.attrs
34
- );
35
- var ref = options.ref || { x: 0, y: 0 };
36
- var scale = options.scale || 1;
37
- if (attrs.strokeDasharray === "none") {
38
- attrs.strokeDasharray = [1e4, 1];
39
- }
40
- var marker2 = create("marker");
41
- attr(options.element, attrs);
42
- append(marker2, options.element);
43
- attr(marker2, {
44
- id,
45
- viewBox: "0 0 20 20",
46
- refX: ref.x,
47
- refY: ref.y,
48
- markerWidth: 20 * scale,
49
- markerHeight: 20 * scale,
50
- orient: "auto"
51
- });
52
- var defs = query("defs", canvas._svg);
53
- if (!defs) {
54
- defs = create("defs");
55
- append(canvas._svg, defs);
56
- }
57
- append(defs, marker2);
58
- markers[id] = marker2;
59
- }
60
- function colorEscape(str) {
61
- return str.replace(/[^0-9a-zA-z]+/g, "_");
62
- }
63
- function marker(type, fill, stroke) {
64
- var id = type + "-" + colorEscape(fill) + "-" + colorEscape(stroke) + "-" + rendererId;
65
- if (!markers[id]) {
66
- createMarker(id, type, fill, stroke);
67
- }
68
- return "url(#" + id + ")";
69
- }
70
- function createMarker(id, type, fill, stroke) {
71
- if (type === "sequenceflow-end") {
72
- var sequenceflowEnd = create("path");
73
- attr(sequenceflowEnd, { d: "M 1 5 L 11 10 L 1 15 Z" });
74
- addMarker(id, {
75
- element: sequenceflowEnd,
76
- ref: { x: 11, y: 10 },
77
- scale: 0.5,
78
- attrs: {
79
- fill: stroke,
80
- stroke
81
- }
82
- });
83
- }
84
- if (type === "messageflow-start") {
85
- var messageflowStart = create("circle");
86
- attr(messageflowStart, { cx: 6, cy: 6, r: 3.5 });
87
- addMarker(id, {
88
- element: messageflowStart,
89
- attrs: {
90
- fill,
91
- stroke
92
- },
93
- ref: { x: 6, y: 6 }
94
- });
95
- }
96
- if (type === "messageflow-end") {
97
- var messageflowEnd = create("path");
98
- attr(messageflowEnd, { d: "m 1 5 l 0 -3 l 7 3 l -7 3 z" });
99
- addMarker(id, {
100
- element: messageflowEnd,
101
- attrs: {
102
- fill,
103
- stroke,
104
- strokeLinecap: "butt"
105
- },
106
- ref: { x: 8.5, y: 5 }
107
- });
108
- }
109
- if (type === "association-start") {
110
- var associationStart = create("path");
111
- attr(associationStart, { d: "M 11 5 L 1 10 L 11 15" });
112
- addMarker(id, {
113
- element: associationStart,
114
- attrs: {
115
- fill: "none",
116
- stroke,
117
- strokeWidth: 1.5
118
- },
119
- ref: { x: 1, y: 10 },
120
- scale: 0.5
121
- });
122
- }
123
- if (type === "association-end") {
124
- var associationEnd = create("path");
125
- attr(associationEnd, { d: "M 1 5 L 11 10 L 1 15" });
126
- addMarker(id, {
127
- element: associationEnd,
128
- attrs: {
129
- fill: "none",
130
- stroke,
131
- strokeWidth: 1.5
132
- },
133
- ref: { x: 12, y: 10 },
134
- scale: 0.5
135
- });
136
- }
137
- if (type === "conditional-flow-marker") {
138
- var conditionalflowMarker = create("path");
139
- attr(conditionalflowMarker, { d: "M 0 10 L 8 6 L 16 10 L 8 14 Z" });
140
- addMarker(id, {
141
- element: conditionalflowMarker,
142
- attrs: {
143
- fill,
144
- stroke
145
- },
146
- ref: { x: -1, y: 10 },
147
- scale: 0.5
148
- });
149
- }
150
- if (type === "conditional-default-flow-marker") {
151
- var conditionaldefaultflowMarker = create("path");
152
- attr(conditionaldefaultflowMarker, { d: "M 6 4 L 10 16" });
153
- addMarker(id, {
154
- element: conditionaldefaultflowMarker,
155
- attrs: {
156
- stroke
157
- },
158
- ref: { x: 0, y: 10 },
159
- scale: 0.5
160
- });
161
- }
162
- }
163
- function drawCircle(parentGfx, width, height, offset, attrs) {
164
- if (isObject(offset)) {
165
- attrs = offset;
166
- offset = 0;
167
- }
168
- offset = offset || 0;
169
- attrs = computeStyle(attrs, {
170
- stroke: "black",
171
- strokeWidth: 2,
172
- fill: "white"
173
- });
174
- if (attrs.fill === "none") {
175
- delete attrs.fillOpacity;
176
- }
177
- var cx = width / 2, cy = height / 2;
178
- var circle = create("circle");
179
- attr(circle, {
180
- cx,
181
- cy,
182
- r: Math.round((width + height) / 4 - offset)
183
- });
184
- attr(circle, attrs);
185
- append(parentGfx, circle);
186
- return circle;
187
- }
188
- function drawRect(parentGfx, width, height, r, offset, attrs) {
189
- if (isObject(offset)) {
190
- attrs = offset;
191
- offset = 0;
192
- }
193
- offset = offset || 0;
194
- attrs = computeStyle(attrs, {
195
- stroke: "black",
196
- strokeWidth: 2,
197
- fill: "white"
198
- });
199
- var rect = create("rect");
200
- attr(rect, {
201
- x: offset,
202
- y: offset,
203
- width: width - offset * 2,
204
- height: height - offset * 2,
205
- rx: r,
206
- ry: r
207
- });
208
- attr(rect, attrs);
209
- append(parentGfx, rect);
210
- return rect;
211
- }
212
- function drawDiamond(parentGfx, width, height, attrs) {
213
- var x_2 = width / 2;
214
- var y_2 = height / 2;
215
- var points = [
216
- { x: x_2, y: 0 },
217
- { x: width, y: y_2 },
218
- { x: x_2, y: height },
219
- { x: 0, y: y_2 }
220
- ];
221
- var pointsString = points.map(function(point) {
222
- return point.x + "," + point.y;
223
- }).join(" ");
224
- attrs = computeStyle(attrs, {
225
- stroke: "black",
226
- strokeWidth: 2,
227
- fill: "white"
228
- });
229
- var polygon = create("polygon");
230
- attr(polygon, {
231
- points: pointsString
232
- });
233
- attr(polygon, attrs);
234
- append(parentGfx, polygon);
235
- return polygon;
236
- }
237
- function drawLine(parentGfx, waypoints, attrs) {
238
- attrs = computeStyle(attrs, ["no-fill"], {
239
- stroke: "black",
240
- strokeWidth: 2,
241
- fill: "none"
242
- });
243
- var line = createLine(waypoints, attrs);
244
- append(parentGfx, line);
245
- return line;
246
- }
247
- function drawPath(parentGfx, d, attrs) {
248
- attrs = computeStyle(attrs, ["no-fill"], {
249
- strokeWidth: 2,
250
- stroke: "black"
251
- });
252
- var path = create("path");
253
- attr(path, { d });
254
- attr(path, attrs);
255
- append(parentGfx, path);
256
- return path;
257
- }
258
- function drawMarker(type, parentGfx, path, attrs) {
259
- return drawPath(parentGfx, path, assign({ "data-marker": type }, attrs));
260
- }
261
- function as(type) {
262
- return function(parentGfx, element) {
263
- return handlers[type](parentGfx, element);
264
- };
265
- }
266
- function renderer(type) {
267
- return handlers[type];
268
- }
269
- function renderEventContent(element, parentGfx) {
270
- var event = getSemantic(element);
271
- var isThrowing = isThrowEvent(event);
272
- if (event.eventDefinitions && event.eventDefinitions.length > 1) {
273
- if (event.parallelMultiple) {
274
- return renderer("bpmn:ParallelMultipleEventDefinition")(parentGfx, element, isThrowing);
275
- } else {
276
- return renderer("bpmn:MultipleEventDefinition")(parentGfx, element, isThrowing);
277
- }
278
- }
279
- if (isTypedEvent(event, "bpmn:MessageEventDefinition")) {
280
- return renderer("bpmn:MessageEventDefinition")(parentGfx, element, isThrowing);
281
- }
282
- if (isTypedEvent(event, "bpmn:TimerEventDefinition")) {
283
- return renderer("bpmn:TimerEventDefinition")(parentGfx, element, isThrowing);
284
- }
285
- if (isTypedEvent(event, "bpmn:ConditionalEventDefinition")) {
286
- return renderer("bpmn:ConditionalEventDefinition")(parentGfx, element);
287
- }
288
- if (isTypedEvent(event, "bpmn:SignalEventDefinition")) {
289
- return renderer("bpmn:SignalEventDefinition")(parentGfx, element, isThrowing);
290
- }
291
- if (isTypedEvent(event, "bpmn:EscalationEventDefinition")) {
292
- return renderer("bpmn:EscalationEventDefinition")(parentGfx, element, isThrowing);
293
- }
294
- if (isTypedEvent(event, "bpmn:LinkEventDefinition")) {
295
- return renderer("bpmn:LinkEventDefinition")(parentGfx, element, isThrowing);
296
- }
297
- if (isTypedEvent(event, "bpmn:ErrorEventDefinition")) {
298
- return renderer("bpmn:ErrorEventDefinition")(parentGfx, element, isThrowing);
299
- }
300
- if (isTypedEvent(event, "bpmn:CancelEventDefinition")) {
301
- return renderer("bpmn:CancelEventDefinition")(parentGfx, element, isThrowing);
302
- }
303
- if (isTypedEvent(event, "bpmn:CompensateEventDefinition")) {
304
- return renderer("bpmn:CompensateEventDefinition")(parentGfx, element, isThrowing);
305
- }
306
- if (isTypedEvent(event, "bpmn:TerminateEventDefinition")) {
307
- return renderer("bpmn:TerminateEventDefinition")(parentGfx, element, isThrowing);
308
- }
309
- return null;
310
- }
311
- function renderLabel(parentGfx, label, options) {
312
- options = assign(
313
- {
314
- size: {
315
- width: 100
316
- }
317
- },
318
- options
319
- );
320
- var text = textRenderer.createText(label || "", options);
321
- classes(text).add("djs-label");
322
- append(parentGfx, text);
323
- return text;
324
- }
325
- function renderEmbeddedLabel(parentGfx, element, align) {
326
- var semantic = getSemantic(element);
327
- return renderLabel(parentGfx, semantic.name, {
328
- box: element,
329
- align,
330
- padding: 5,
331
- style: {
332
- fill: getLabelColor(element, defaultLabelColor, defaultStrokeColor)
333
- }
334
- });
335
- }
336
- function renderExternalLabel(parentGfx, element) {
337
- var box = {
338
- width: 90,
339
- height: 30,
340
- x: element.width / 2 + element.x,
341
- y: element.height / 2 + element.y
342
- };
343
- return renderLabel(parentGfx, getLabel(element), {
344
- box,
345
- fitBox: true,
346
- style: assign({}, textRenderer.getExternalStyle(), {
347
- fill: getLabelColor(element, defaultLabelColor, defaultStrokeColor)
348
- })
349
- });
350
- }
351
- function renderLaneLabel(parentGfx, text, element) {
352
- var textBox = renderLabel(parentGfx, text, {
353
- box: {
354
- height: 30,
355
- width: element.height
356
- },
357
- align: "center-middle",
358
- style: {
359
- fill: getLabelColor(element, defaultLabelColor, defaultStrokeColor)
360
- }
361
- });
362
- var top = -1 * element.height;
363
- transform(textBox, 0, -top, 270);
364
- }
365
- function createPathFromConnection(connection) {
366
- var waypoints = connection.waypoints;
367
- var pathData = "m " + waypoints[0].x + "," + waypoints[0].y;
368
- for (var i = 1; i < waypoints.length; i++) {
369
- pathData += "L" + waypoints[i].x + "," + waypoints[i].y + " ";
370
- }
371
- return pathData;
372
- }
373
- var handlers = this.handlers = {
374
- "bpmn:Event": function(parentGfx, element, attrs) {
375
- if (!("fillOpacity" in attrs)) {
376
- attrs.fillOpacity = DEFAULT_FILL_OPACITY;
377
- }
378
- return drawCircle(parentGfx, element.width, element.height, attrs);
379
- },
380
- "bpmn:StartEvent": function(parentGfx, element) {
381
- var attrs = {
382
- fill: getFillColor(element, defaultFillColor),
383
- stroke: getStrokeColor(element, defaultStrokeColor)
384
- };
385
- var semantic = getSemantic(element);
386
- if (!semantic.isInterrupting) {
387
- attrs = {
388
- strokeDasharray: "6",
389
- strokeLinecap: "round",
390
- fill: getFillColor(element, defaultFillColor),
391
- stroke: getStrokeColor(element, defaultStrokeColor)
392
- };
393
- }
394
- var circle = renderer("bpmn:Event")(parentGfx, element, attrs);
395
- renderEventContent(element, parentGfx);
396
- return circle;
397
- },
398
- "bpmn:MessageEventDefinition": function(parentGfx, element, isThrowing) {
399
- var pathData = pathMap.getScaledPath("EVENT_MESSAGE", {
400
- xScaleFactor: 0.9,
401
- yScaleFactor: 0.9,
402
- containerWidth: element.width,
403
- containerHeight: element.height,
404
- position: {
405
- mx: 0.235,
406
- my: 0.315
407
- }
408
- });
409
- var fill = isThrowing ? getStrokeColor(element, defaultStrokeColor) : getFillColor(element, defaultFillColor);
410
- var stroke = isThrowing ? getFillColor(element, defaultFillColor) : getStrokeColor(element, defaultStrokeColor);
411
- var messagePath = drawPath(parentGfx, pathData, {
412
- strokeWidth: 1,
413
- fill,
414
- stroke
415
- });
416
- return messagePath;
417
- },
418
- "bpmn:TimerEventDefinition": function(parentGfx, element) {
419
- var circle = drawCircle(parentGfx, element.width, element.height, 0.2 * element.height, {
420
- strokeWidth: 2,
421
- fill: getFillColor(element, defaultFillColor),
422
- stroke: getStrokeColor(element, defaultStrokeColor)
423
- });
424
- var pathData = pathMap.getScaledPath("EVENT_TIMER_WH", {
425
- xScaleFactor: 0.75,
426
- yScaleFactor: 0.75,
427
- containerWidth: element.width,
428
- containerHeight: element.height,
429
- position: {
430
- mx: 0.5,
431
- my: 0.5
432
- }
433
- });
434
- drawPath(parentGfx, pathData, {
435
- strokeWidth: 2,
436
- strokeLinecap: "square",
437
- stroke: getStrokeColor(element, defaultStrokeColor)
438
- });
439
- for (var i = 0; i < 12; i++) {
440
- var linePathData = pathMap.getScaledPath("EVENT_TIMER_LINE", {
441
- xScaleFactor: 0.75,
442
- yScaleFactor: 0.75,
443
- containerWidth: element.width,
444
- containerHeight: element.height,
445
- position: {
446
- mx: 0.5,
447
- my: 0.5
448
- }
449
- });
450
- var width = element.width / 2;
451
- var height = element.height / 2;
452
- drawPath(parentGfx, linePathData, {
453
- strokeWidth: 1,
454
- strokeLinecap: "square",
455
- transform: "rotate(" + i * 30 + "," + height + "," + width + ")",
456
- stroke: getStrokeColor(element, defaultStrokeColor)
457
- });
458
- }
459
- return circle;
460
- },
461
- "bpmn:EscalationEventDefinition": function(parentGfx, event, isThrowing) {
462
- var pathData = pathMap.getScaledPath("EVENT_ESCALATION", {
463
- xScaleFactor: 1,
464
- yScaleFactor: 1,
465
- containerWidth: event.width,
466
- containerHeight: event.height,
467
- position: {
468
- mx: 0.5,
469
- my: 0.2
470
- }
471
- });
472
- var fill = isThrowing ? getStrokeColor(event, defaultStrokeColor) : "none";
473
- return drawPath(parentGfx, pathData, {
474
- strokeWidth: 1,
475
- fill,
476
- stroke: getStrokeColor(event, defaultStrokeColor)
477
- });
478
- },
479
- "bpmn:ConditionalEventDefinition": function(parentGfx, event) {
480
- var pathData = pathMap.getScaledPath("EVENT_CONDITIONAL", {
481
- xScaleFactor: 1,
482
- yScaleFactor: 1,
483
- containerWidth: event.width,
484
- containerHeight: event.height,
485
- position: {
486
- mx: 0.5,
487
- my: 0.222
488
- }
489
- });
490
- return drawPath(parentGfx, pathData, {
491
- strokeWidth: 1,
492
- stroke: getStrokeColor(event, defaultStrokeColor)
493
- });
494
- },
495
- "bpmn:LinkEventDefinition": function(parentGfx, event, isThrowing) {
496
- var pathData = pathMap.getScaledPath("EVENT_LINK", {
497
- xScaleFactor: 1,
498
- yScaleFactor: 1,
499
- containerWidth: event.width,
500
- containerHeight: event.height,
501
- position: {
502
- mx: 0.57,
503
- my: 0.263
504
- }
505
- });
506
- var fill = isThrowing ? getStrokeColor(event, defaultStrokeColor) : "none";
507
- return drawPath(parentGfx, pathData, {
508
- strokeWidth: 1,
509
- fill,
510
- stroke: getStrokeColor(event, defaultStrokeColor)
511
- });
512
- },
513
- "bpmn:ErrorEventDefinition": function(parentGfx, event, isThrowing) {
514
- var pathData = pathMap.getScaledPath("EVENT_ERROR", {
515
- xScaleFactor: 1.1,
516
- yScaleFactor: 1.1,
517
- containerWidth: event.width,
518
- containerHeight: event.height,
519
- position: {
520
- mx: 0.2,
521
- my: 0.722
522
- }
523
- });
524
- var fill = isThrowing ? getStrokeColor(event, defaultStrokeColor) : "none";
525
- return drawPath(parentGfx, pathData, {
526
- strokeWidth: 1,
527
- fill,
528
- stroke: getStrokeColor(event, defaultStrokeColor)
529
- });
530
- },
531
- "bpmn:CancelEventDefinition": function(parentGfx, event, isThrowing) {
532
- var pathData = pathMap.getScaledPath("EVENT_CANCEL_45", {
533
- xScaleFactor: 1,
534
- yScaleFactor: 1,
535
- containerWidth: event.width,
536
- containerHeight: event.height,
537
- position: {
538
- mx: 0.638,
539
- my: -0.055
540
- }
541
- });
542
- var fill = isThrowing ? getStrokeColor(event, defaultStrokeColor) : "none";
543
- var path = drawPath(parentGfx, pathData, {
544
- strokeWidth: 1,
545
- fill,
546
- stroke: getStrokeColor(event, defaultStrokeColor)
547
- });
548
- rotate(path, 45);
549
- return path;
550
- },
551
- "bpmn:CompensateEventDefinition": function(parentGfx, event, isThrowing) {
552
- var pathData = pathMap.getScaledPath("EVENT_COMPENSATION", {
553
- xScaleFactor: 1,
554
- yScaleFactor: 1,
555
- containerWidth: event.width,
556
- containerHeight: event.height,
557
- position: {
558
- mx: 0.22,
559
- my: 0.5
560
- }
561
- });
562
- var fill = isThrowing ? getStrokeColor(event, defaultStrokeColor) : "none";
563
- return drawPath(parentGfx, pathData, {
564
- strokeWidth: 1,
565
- fill,
566
- stroke: getStrokeColor(event, defaultStrokeColor)
567
- });
568
- },
569
- "bpmn:SignalEventDefinition": function(parentGfx, event, isThrowing) {
570
- var pathData = pathMap.getScaledPath("EVENT_SIGNAL", {
571
- xScaleFactor: 0.9,
572
- yScaleFactor: 0.9,
573
- containerWidth: event.width,
574
- containerHeight: event.height,
575
- position: {
576
- mx: 0.5,
577
- my: 0.2
578
- }
579
- });
580
- var fill = isThrowing ? getStrokeColor(event, defaultStrokeColor) : "none";
581
- return drawPath(parentGfx, pathData, {
582
- strokeWidth: 1,
583
- fill,
584
- stroke: getStrokeColor(event, defaultStrokeColor)
585
- });
586
- },
587
- "bpmn:MultipleEventDefinition": function(parentGfx, event, isThrowing) {
588
- var pathData = pathMap.getScaledPath("EVENT_MULTIPLE", {
589
- xScaleFactor: 1.1,
590
- yScaleFactor: 1.1,
591
- containerWidth: event.width,
592
- containerHeight: event.height,
593
- position: {
594
- mx: 0.222,
595
- my: 0.36
596
- }
597
- });
598
- var fill = isThrowing ? getStrokeColor(event, defaultStrokeColor) : "none";
599
- return drawPath(parentGfx, pathData, {
600
- strokeWidth: 1,
601
- fill
602
- });
603
- },
604
- "bpmn:ParallelMultipleEventDefinition": function(parentGfx, event) {
605
- var pathData = pathMap.getScaledPath("EVENT_PARALLEL_MULTIPLE", {
606
- xScaleFactor: 1.2,
607
- yScaleFactor: 1.2,
608
- containerWidth: event.width,
609
- containerHeight: event.height,
610
- position: {
611
- mx: 0.458,
612
- my: 0.194
613
- }
614
- });
615
- return drawPath(parentGfx, pathData, {
616
- strokeWidth: 1,
617
- fill: getStrokeColor(event, defaultStrokeColor),
618
- stroke: getStrokeColor(event, defaultStrokeColor)
619
- });
620
- },
621
- "bpmn:EndEvent": function(parentGfx, element) {
622
- var circle = renderer("bpmn:Event")(parentGfx, element, {
623
- strokeWidth: 4,
624
- fill: getFillColor(element, defaultFillColor),
625
- stroke: getStrokeColor(element, defaultStrokeColor)
626
- });
627
- renderEventContent(element, parentGfx);
628
- return circle;
629
- },
630
- "bpmn:TerminateEventDefinition": function(parentGfx, element) {
631
- var circle = drawCircle(parentGfx, element.width, element.height, 8, {
632
- strokeWidth: 4,
633
- fill: getStrokeColor(element, defaultStrokeColor),
634
- stroke: getStrokeColor(element, defaultStrokeColor)
635
- });
636
- return circle;
637
- },
638
- "bpmn:IntermediateEvent": function(parentGfx, element) {
639
- var outer = renderer("bpmn:Event")(parentGfx, element, {
640
- strokeWidth: 1,
641
- fill: getFillColor(element, defaultFillColor),
642
- stroke: getStrokeColor(element, defaultStrokeColor)
643
- });
644
- drawCircle(parentGfx, element.width, element.height, INNER_OUTER_DIST, {
645
- strokeWidth: 1,
646
- fill: getFillColor(element, "none"),
647
- stroke: getStrokeColor(element, defaultStrokeColor)
648
- });
649
- renderEventContent(element, parentGfx);
650
- return outer;
651
- },
652
- "bpmn:IntermediateCatchEvent": as("bpmn:IntermediateEvent"),
653
- "bpmn:IntermediateThrowEvent": as("bpmn:IntermediateEvent"),
654
- "bpmn:Activity": function(parentGfx, element, attrs) {
655
- attrs = attrs || {};
656
- if (!("fillOpacity" in attrs)) {
657
- attrs.fillOpacity = DEFAULT_FILL_OPACITY;
658
- }
659
- return drawRect(parentGfx, element.width, element.height, TASK_BORDER_RADIUS, attrs);
660
- },
661
- "bpmn:Task": function(parentGfx, element) {
662
- var attrs = {
663
- fill: getFillColor(element, defaultFillColor),
664
- stroke: getStrokeColor(element, defaultStrokeColor)
665
- };
666
- var rect = renderer("bpmn:Activity")(parentGfx, element, attrs);
667
- renderEmbeddedLabel(parentGfx, element, "center-middle");
668
- attachTaskMarkers(parentGfx, element);
669
- return rect;
670
- },
671
- "bpmn:ServiceTask": function(parentGfx, element) {
672
- var task = renderer("bpmn:Task")(parentGfx, element);
673
- return task;
674
- },
675
- "bpmn:UserTask": function(parentGfx, element) {
676
- var task = renderer("bpmn:Task")(parentGfx, element);
677
- return task;
678
- },
679
- "bpmn:ManualTask": function(parentGfx, element) {
680
- var task = renderer("bpmn:Task")(parentGfx, element);
681
- var pathData = pathMap.getScaledPath("TASK_TYPE_MANUAL", {
682
- abspos: {
683
- x: 17,
684
- y: 15
685
- }
686
- });
687
- drawPath(parentGfx, pathData, {
688
- strokeWidth: 0.5,
689
- fill: getFillColor(element, defaultFillColor),
690
- stroke: getStrokeColor(element, defaultStrokeColor)
691
- });
692
- return task;
693
- },
694
- "bpmn:SendTask": function(parentGfx, element) {
695
- var task = renderer("bpmn:Task")(parentGfx, element);
696
- var pathData = pathMap.getScaledPath("TASK_TYPE_SEND", {
697
- xScaleFactor: 1,
698
- yScaleFactor: 1,
699
- containerWidth: 21,
700
- containerHeight: 14,
701
- position: {
702
- mx: 0.285,
703
- my: 0.357
704
- }
705
- });
706
- drawPath(parentGfx, pathData, {
707
- strokeWidth: 1,
708
- fill: getStrokeColor(element, defaultStrokeColor),
709
- stroke: getFillColor(element, defaultFillColor)
710
- });
711
- return task;
712
- },
713
- "bpmn:ReceiveTask": function(parentGfx, element) {
714
- var semantic = getSemantic(element);
715
- var task = renderer("bpmn:Task")(parentGfx, element);
716
- var pathData;
717
- if (semantic.instantiate) {
718
- drawCircle(parentGfx, 28, 28, 20 * 0.22, { strokeWidth: 1 });
719
- pathData = pathMap.getScaledPath("TASK_TYPE_INSTANTIATING_SEND", {
720
- abspos: {
721
- x: 7.77,
722
- y: 9.52
723
- }
724
- });
725
- } else {
726
- pathData = pathMap.getScaledPath("TASK_TYPE_SEND", {
727
- xScaleFactor: 0.9,
728
- yScaleFactor: 0.9,
729
- containerWidth: 21,
730
- containerHeight: 14,
731
- position: {
732
- mx: 0.3,
733
- my: 0.4
734
- }
735
- });
736
- }
737
- drawPath(parentGfx, pathData, {
738
- strokeWidth: 1,
739
- fill: getFillColor(element, defaultFillColor),
740
- stroke: getStrokeColor(element, defaultStrokeColor)
741
- });
742
- return task;
743
- },
744
- "bpmn:ScriptTask": function(parentGfx, element) {
745
- var task = renderer("bpmn:Task")(parentGfx, element);
746
- return task;
747
- },
748
- "bpmn:BusinessRuleTask": function(parentGfx, element) {
749
- var task = renderer("bpmn:Task")(parentGfx, element);
750
- var headerPathData = pathMap.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER", {
751
- abspos: {
752
- x: 8,
753
- y: 8
754
- }
755
- });
756
- var businessHeaderPath = drawPath(parentGfx, headerPathData);
757
- attr(businessHeaderPath, {
758
- strokeWidth: 1,
759
- fill: getFillColor(element, "#aaaaaa"),
760
- stroke: getStrokeColor(element, defaultStrokeColor)
761
- });
762
- var headerData = pathMap.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN", {
763
- abspos: {
764
- x: 8,
765
- y: 8
766
- }
767
- });
768
- var businessPath = drawPath(parentGfx, headerData);
769
- attr(businessPath, {
770
- strokeWidth: 1,
771
- stroke: getStrokeColor(element, defaultStrokeColor)
772
- });
773
- return task;
774
- },
775
- "bpmn:SubProcess": function(parentGfx, element, attrs) {
776
- attrs = assign(
777
- {
778
- fill: getFillColor(element, defaultFillColor),
779
- stroke: getStrokeColor(element, defaultStrokeColor)
780
- },
781
- attrs
782
- );
783
- var rect = renderer("bpmn:Activity")(parentGfx, element, attrs);
784
- var expanded = isExpanded(element);
785
- if (isEventSubProcess(element)) {
786
- attr(rect, {
787
- strokeDasharray: "1,2"
788
- });
789
- }
790
- renderEmbeddedLabel(parentGfx, element, expanded ? "center-top" : "center-middle");
791
- if (expanded) {
792
- attachTaskMarkers(parentGfx, element);
793
- } else {
794
- attachTaskMarkers(parentGfx, element, ["SubProcessMarker"]);
795
- }
796
- return rect;
797
- },
798
- "bpmn:AdHocSubProcess": function(parentGfx, element) {
799
- return renderer("bpmn:SubProcess")(parentGfx, element);
800
- },
801
- "bpmn:Transaction": function(parentGfx, element) {
802
- var outer = renderer("bpmn:SubProcess")(parentGfx, element);
803
- var innerAttrs = styles.style(["no-fill", "no-events"], {
804
- stroke: getStrokeColor(element, defaultStrokeColor)
805
- });
806
- drawRect(
807
- parentGfx,
808
- element.width,
809
- element.height,
810
- TASK_BORDER_RADIUS - 2,
811
- INNER_OUTER_DIST,
812
- innerAttrs
813
- );
814
- return outer;
815
- },
816
- "bpmn:CallActivity": function(parentGfx, element) {
817
- return renderer("bpmn:SubProcess")(parentGfx, element, {
818
- strokeWidth: 5
819
- });
820
- },
821
- "bpmn:Participant": function(parentGfx, element) {
822
- var attrs = {
823
- fillOpacity: DEFAULT_FILL_OPACITY,
824
- fill: getFillColor(element, defaultFillColor),
825
- stroke: getStrokeColor(element, defaultStrokeColor)
826
- };
827
- var lane = renderer("bpmn:Lane")(parentGfx, element, attrs);
828
- var expandedPool = isExpanded(element);
829
- if (expandedPool) {
830
- drawLine(
831
- parentGfx,
832
- [
833
- { x: 30, y: 0 },
834
- { x: 30, y: element.height }
835
- ],
836
- {
837
- stroke: getStrokeColor(element, defaultStrokeColor)
838
- }
839
- );
840
- var text = getSemantic(element).name;
841
- renderLaneLabel(parentGfx, text, element);
842
- } else {
843
- var text2 = getSemantic(element).name;
844
- renderLabel(parentGfx, text2, {
845
- box: element,
846
- align: "center-middle",
847
- style: {
848
- fill: getLabelColor(element, defaultLabelColor, defaultStrokeColor)
849
- }
850
- });
851
- }
852
- var participantMultiplicity = !!getSemantic(element).participantMultiplicity;
853
- if (participantMultiplicity) {
854
- renderer("ParticipantMultiplicityMarker")(parentGfx, element);
855
- }
856
- return lane;
857
- },
858
- "bpmn:Lane": function(parentGfx, element, attrs) {
859
- var rect = drawRect(
860
- parentGfx,
861
- element.width,
862
- element.height,
863
- 0,
864
- assign(
865
- {
866
- fill: getFillColor(element, defaultFillColor),
867
- fillOpacity: HIGH_FILL_OPACITY,
868
- stroke: getStrokeColor(element, defaultStrokeColor)
869
- },
870
- attrs
871
- )
872
- );
873
- var semantic = getSemantic(element);
874
- if (semantic.$type === "bpmn:Lane") {
875
- var text = semantic.name;
876
- renderLaneLabel(parentGfx, text, element);
877
- }
878
- return rect;
879
- },
880
- "bpmn:InclusiveGateway": function(parentGfx, element) {
881
- var diamond = renderer("bpmn:Gateway")(parentGfx, element);
882
- drawCircle(parentGfx, element.width, element.height, element.height * 0.24, {
883
- strokeWidth: 2.5,
884
- fill: getFillColor(element, defaultFillColor),
885
- stroke: getStrokeColor(element, defaultStrokeColor)
886
- });
887
- return diamond;
888
- },
889
- "bpmn:ExclusiveGateway": function(parentGfx, element) {
890
- var diamond = renderer("bpmn:Gateway")(parentGfx, element);
891
- var pathData = pathMap.getScaledPath("GATEWAY_EXCLUSIVE", {
892
- xScaleFactor: 0.4,
893
- yScaleFactor: 0.4,
894
- containerWidth: element.width,
895
- containerHeight: element.height,
896
- position: {
897
- mx: 0.32,
898
- my: 0.3
899
- }
900
- });
901
- if (getDi(element).isMarkerVisible) {
902
- drawPath(parentGfx, pathData, {
903
- strokeWidth: 1,
904
- fill: getStrokeColor(element, defaultStrokeColor),
905
- stroke: getStrokeColor(element, defaultStrokeColor)
906
- });
907
- }
908
- return diamond;
909
- },
910
- "bpmn:ComplexGateway": function(parentGfx, element) {
911
- var diamond = renderer("bpmn:Gateway")(parentGfx, element);
912
- var pathData = pathMap.getScaledPath("GATEWAY_COMPLEX", {
913
- xScaleFactor: 0.5,
914
- yScaleFactor: 0.5,
915
- containerWidth: element.width,
916
- containerHeight: element.height,
917
- position: {
918
- mx: 0.46,
919
- my: 0.26
920
- }
921
- });
922
- drawPath(parentGfx, pathData, {
923
- strokeWidth: 1,
924
- fill: getStrokeColor(element, defaultStrokeColor),
925
- stroke: getStrokeColor(element, defaultStrokeColor)
926
- });
927
- return diamond;
928
- },
929
- "bpmn:ParallelGateway": function(parentGfx, element) {
930
- var diamond = renderer("bpmn:Gateway")(parentGfx, element);
931
- var pathData = pathMap.getScaledPath("GATEWAY_PARALLEL", {
932
- xScaleFactor: 0.6,
933
- yScaleFactor: 0.6,
934
- containerWidth: element.width,
935
- containerHeight: element.height,
936
- position: {
937
- mx: 0.46,
938
- my: 0.2
939
- }
940
- });
941
- drawPath(parentGfx, pathData, {
942
- strokeWidth: 1,
943
- fill: getStrokeColor(element, defaultStrokeColor),
944
- stroke: getStrokeColor(element, defaultStrokeColor)
945
- });
946
- return diamond;
947
- },
948
- "bpmn:EventBasedGateway": function(parentGfx, element) {
949
- var semantic = getSemantic(element);
950
- var diamond = renderer("bpmn:Gateway")(parentGfx, element);
951
- drawCircle(parentGfx, element.width, element.height, element.height * 0.2, {
952
- strokeWidth: 1,
953
- fill: "none",
954
- stroke: getStrokeColor(element, defaultStrokeColor)
955
- });
956
- var type = semantic.eventGatewayType;
957
- var instantiate = !!semantic.instantiate;
958
- function drawEvent() {
959
- var pathData2 = pathMap.getScaledPath("GATEWAY_EVENT_BASED", {
960
- xScaleFactor: 0.18,
961
- yScaleFactor: 0.18,
962
- containerWidth: element.width,
963
- containerHeight: element.height,
964
- position: {
965
- mx: 0.36,
966
- my: 0.44
967
- }
968
- });
969
- var attrs = {
970
- strokeWidth: 2,
971
- fill: getFillColor(element, "none"),
972
- stroke: getStrokeColor(element, defaultStrokeColor)
973
- };
974
- drawPath(parentGfx, pathData2, attrs);
975
- }
976
- if (type === "Parallel") {
977
- var pathData = pathMap.getScaledPath("GATEWAY_PARALLEL", {
978
- xScaleFactor: 0.4,
979
- yScaleFactor: 0.4,
980
- containerWidth: element.width,
981
- containerHeight: element.height,
982
- position: {
983
- mx: 0.474,
984
- my: 0.296
985
- }
986
- });
987
- var parallelPath = drawPath(parentGfx, pathData);
988
- attr(parallelPath, {
989
- strokeWidth: 1,
990
- fill: "none"
991
- });
992
- } else if (type === "Exclusive") {
993
- if (!instantiate) {
994
- var innerCircle = drawCircle(parentGfx, element.width, element.height, element.height * 0.26);
995
- attr(innerCircle, {
996
- strokeWidth: 1,
997
- fill: "none",
998
- stroke: getStrokeColor(element, defaultStrokeColor)
999
- });
1000
- }
1001
- drawEvent();
1002
- }
1003
- return diamond;
1004
- },
1005
- "bpmn:Gateway": function(parentGfx, element) {
1006
- var attrs = {
1007
- fill: getFillColor(element, defaultFillColor),
1008
- fillOpacity: DEFAULT_FILL_OPACITY,
1009
- stroke: getStrokeColor(element, defaultStrokeColor)
1010
- };
1011
- return drawDiamond(parentGfx, element.width, element.height, attrs);
1012
- },
1013
- "bpmn:SequenceFlow": function(parentGfx, element) {
1014
- var pathData = createPathFromConnection(element);
1015
- var fill = getFillColor(element, defaultFillColor), stroke = getStrokeColor(element, defaultStrokeColor);
1016
- var attrs = {
1017
- strokeLinejoin: "round",
1018
- markerEnd: marker("sequenceflow-end", fill, stroke),
1019
- stroke: getStrokeColor(element, defaultStrokeColor)
1020
- };
1021
- var path = drawPath(parentGfx, pathData, attrs);
1022
- var sequenceFlow = getSemantic(element);
1023
- var source;
1024
- if (element.source) {
1025
- source = element.source.businessObject;
1026
- if (sequenceFlow.conditionExpression && source.$instanceOf("bpmn:Activity")) {
1027
- attr(path, {
1028
- markerStart: marker("conditional-flow-marker", fill, stroke)
1029
- });
1030
- }
1031
- if (source.default && (source.$instanceOf("bpmn:Gateway") || source.$instanceOf("bpmn:Activity")) && source.default === sequenceFlow) {
1032
- attr(path, {
1033
- markerStart: marker("conditional-default-flow-marker", fill, stroke)
1034
- });
1035
- }
1036
- }
1037
- return path;
1038
- },
1039
- "bpmn:Association": function(parentGfx, element, attrs) {
1040
- var semantic = getSemantic(element);
1041
- var fill = getFillColor(element, defaultFillColor), stroke = getStrokeColor(element, defaultStrokeColor);
1042
- attrs = assign(
1043
- {
1044
- strokeDasharray: "0.5, 5",
1045
- strokeLinecap: "round",
1046
- strokeLinejoin: "round",
1047
- stroke: getStrokeColor(element, defaultStrokeColor)
1048
- },
1049
- attrs || {}
1050
- );
1051
- if (semantic.associationDirection === "One" || semantic.associationDirection === "Both") {
1052
- attrs.markerEnd = marker("association-end", fill, stroke);
1053
- }
1054
- if (semantic.associationDirection === "Both") {
1055
- attrs.markerStart = marker("association-start", fill, stroke);
1056
- }
1057
- return drawLine(parentGfx, element.waypoints, attrs);
1058
- },
1059
- "bpmn:DataInputAssociation": function(parentGfx, element) {
1060
- var fill = getFillColor(element, defaultFillColor), stroke = getStrokeColor(element, defaultStrokeColor);
1061
- return renderer("bpmn:Association")(parentGfx, element, {
1062
- markerEnd: marker("association-end", fill, stroke)
1063
- });
1064
- },
1065
- "bpmn:DataOutputAssociation": function(parentGfx, element) {
1066
- var fill = getFillColor(element, defaultFillColor), stroke = getStrokeColor(element, defaultStrokeColor);
1067
- return renderer("bpmn:Association")(parentGfx, element, {
1068
- markerEnd: marker("association-end", fill, stroke)
1069
- });
1070
- },
1071
- "bpmn:MessageFlow": function(parentGfx, element) {
1072
- var semantic = getSemantic(element), di = getDi(element);
1073
- var fill = getFillColor(element, defaultFillColor), stroke = getStrokeColor(element, defaultStrokeColor);
1074
- var pathData = createPathFromConnection(element);
1075
- var attrs = {
1076
- markerEnd: marker("messageflow-end", fill, stroke),
1077
- markerStart: marker("messageflow-start", fill, stroke),
1078
- strokeDasharray: "10, 12",
1079
- strokeLinecap: "round",
1080
- strokeLinejoin: "round",
1081
- strokeWidth: "1.5px",
1082
- stroke: getStrokeColor(element, defaultStrokeColor)
1083
- };
1084
- var path = drawPath(parentGfx, pathData, attrs);
1085
- if (semantic.messageRef) {
1086
- var midPoint = path.getPointAtLength(path.getTotalLength() / 2);
1087
- var markerPathData = pathMap.getScaledPath("MESSAGE_FLOW_MARKER", {
1088
- abspos: {
1089
- x: midPoint.x,
1090
- y: midPoint.y
1091
- }
1092
- });
1093
- var messageAttrs = { strokeWidth: 1 };
1094
- if (di.messageVisibleKind === "initiating") {
1095
- messageAttrs.fill = "white";
1096
- messageAttrs.stroke = "black";
1097
- } else {
1098
- messageAttrs.fill = "#888";
1099
- messageAttrs.stroke = "white";
1100
- }
1101
- var message = drawPath(parentGfx, markerPathData, messageAttrs);
1102
- var labelText = semantic.messageRef.name;
1103
- var label = renderLabel(parentGfx, labelText, {
1104
- align: "center-top",
1105
- fitBox: true,
1106
- style: {
1107
- fill: getStrokeColor(element, defaultLabelColor, defaultStrokeColor)
1108
- }
1109
- });
1110
- var messageBounds = message.getBBox(), labelBounds = label.getBBox();
1111
- var translateX = midPoint.x - labelBounds.width / 2, translateY = midPoint.y + messageBounds.height / 2 + ELEMENT_LABEL_DISTANCE;
1112
- transform(label, translateX, translateY, 0);
1113
- }
1114
- return path;
1115
- },
1116
- "bpmn:DataObject": function(parentGfx, element) {
1117
- var pathData = pathMap.getScaledPath("DATA_OBJECT_PATH", {
1118
- xScaleFactor: 1,
1119
- yScaleFactor: 1,
1120
- containerWidth: element.width,
1121
- containerHeight: element.height,
1122
- position: {
1123
- mx: 0.474,
1124
- my: 0.296
1125
- }
1126
- });
1127
- var elementObject = drawPath(parentGfx, pathData, {
1128
- fill: getFillColor(element, defaultFillColor),
1129
- fillOpacity: DEFAULT_FILL_OPACITY,
1130
- stroke: getStrokeColor(element, defaultStrokeColor)
1131
- });
1132
- var semantic = getSemantic(element);
1133
- if (isCollection(semantic)) {
1134
- renderDataItemCollection(parentGfx, element);
1135
- }
1136
- return elementObject;
1137
- },
1138
- "bpmn:DataObjectReference": as("bpmn:DataObject"),
1139
- "bpmn:DataInput": function(parentGfx, element) {
1140
- var arrowPathData = pathMap.getRawPath("DATA_ARROW");
1141
- var elementObject = renderer("bpmn:DataObject")(parentGfx, element);
1142
- drawPath(parentGfx, arrowPathData, { strokeWidth: 1 });
1143
- return elementObject;
1144
- },
1145
- "bpmn:DataOutput": function(parentGfx, element) {
1146
- var arrowPathData = pathMap.getRawPath("DATA_ARROW");
1147
- var elementObject = renderer("bpmn:DataObject")(parentGfx, element);
1148
- drawPath(parentGfx, arrowPathData, {
1149
- strokeWidth: 1,
1150
- fill: "black"
1151
- });
1152
- return elementObject;
1153
- },
1154
- "bpmn:DataStoreReference": function(parentGfx, element) {
1155
- var DATA_STORE_PATH = pathMap.getScaledPath("DATA_STORE", {
1156
- xScaleFactor: 1,
1157
- yScaleFactor: 1,
1158
- containerWidth: element.width,
1159
- containerHeight: element.height,
1160
- position: {
1161
- mx: 0,
1162
- my: 0.133
1163
- }
1164
- });
1165
- var elementStore = drawPath(parentGfx, DATA_STORE_PATH, {
1166
- strokeWidth: 2,
1167
- fill: getFillColor(element, defaultFillColor),
1168
- fillOpacity: DEFAULT_FILL_OPACITY,
1169
- stroke: getStrokeColor(element, defaultStrokeColor)
1170
- });
1171
- return elementStore;
1172
- },
1173
- "bpmn:BoundaryEvent": function(parentGfx, element) {
1174
- var semantic = getSemantic(element), cancel = semantic.cancelActivity;
1175
- var attrs = {
1176
- strokeWidth: 1,
1177
- fill: getFillColor(element, defaultFillColor),
1178
- stroke: getStrokeColor(element, defaultStrokeColor)
1179
- };
1180
- if (!cancel) {
1181
- attrs.strokeDasharray = "6";
1182
- attrs.strokeLinecap = "round";
1183
- }
1184
- var outerAttrs = assign({}, attrs, {
1185
- fillOpacity: 1
1186
- });
1187
- var innerAttrs = assign({}, attrs, {
1188
- fill: "none"
1189
- });
1190
- var outer = renderer("bpmn:Event")(parentGfx, element, outerAttrs);
1191
- drawCircle(parentGfx, element.width, element.height, INNER_OUTER_DIST, innerAttrs);
1192
- renderEventContent(element, parentGfx);
1193
- return outer;
1194
- },
1195
- "bpmn:Group": function(parentGfx, element) {
1196
- var group = drawRect(parentGfx, element.width, element.height, TASK_BORDER_RADIUS, {
1197
- stroke: getStrokeColor(element, defaultStrokeColor),
1198
- strokeWidth: 1,
1199
- strokeDasharray: "8,3,1,3",
1200
- fill: "none",
1201
- pointerEvents: "none"
1202
- });
1203
- return group;
1204
- },
1205
- label: function(parentGfx, element) {
1206
- return renderExternalLabel(parentGfx, element);
1207
- },
1208
- "bpmn:TextAnnotation": function(parentGfx, element) {
1209
- var style = {
1210
- fill: "none",
1211
- stroke: "none"
1212
- };
1213
- var textElement = drawRect(parentGfx, element.width, element.height, 0, 0, style);
1214
- var textPathData = pathMap.getScaledPath("TEXT_ANNOTATION", {
1215
- xScaleFactor: 1,
1216
- yScaleFactor: 1,
1217
- containerWidth: element.width,
1218
- containerHeight: element.height,
1219
- position: {
1220
- mx: 0,
1221
- my: 0
1222
- }
1223
- });
1224
- drawPath(parentGfx, textPathData, {
1225
- stroke: getStrokeColor(element, defaultStrokeColor)
1226
- });
1227
- var text = getSemantic(element).text || "";
1228
- renderLabel(parentGfx, text, {
1229
- box: element,
1230
- align: "left-top",
1231
- padding: 5,
1232
- style: {
1233
- fill: getLabelColor(element, defaultLabelColor, defaultStrokeColor)
1234
- }
1235
- });
1236
- return textElement;
1237
- },
1238
- ParticipantMultiplicityMarker: function(parentGfx, element) {
1239
- var markerPath = pathMap.getScaledPath("MARKER_PARALLEL", {
1240
- xScaleFactor: 1,
1241
- yScaleFactor: 1,
1242
- containerWidth: element.width,
1243
- containerHeight: element.height,
1244
- position: {
1245
- mx: element.width / 2 / element.width,
1246
- my: (element.height - 15) / element.height
1247
- }
1248
- });
1249
- drawMarker("participant-multiplicity", parentGfx, markerPath, {
1250
- strokeWidth: 2,
1251
- fill: getFillColor(element, defaultFillColor),
1252
- stroke: getStrokeColor(element, defaultStrokeColor)
1253
- });
1254
- },
1255
- SubProcessMarker: function(parentGfx, element) {
1256
- var markerRect = drawRect(parentGfx, 14, 14, 0, {
1257
- strokeWidth: 1,
1258
- fill: getFillColor(element, defaultFillColor),
1259
- stroke: getStrokeColor(element, defaultStrokeColor)
1260
- });
1261
- translate(markerRect, element.width / 2 - 7.5, element.height - 20);
1262
- var markerPath = pathMap.getScaledPath("MARKER_SUB_PROCESS", {
1263
- xScaleFactor: 1.5,
1264
- yScaleFactor: 1.5,
1265
- containerWidth: element.width,
1266
- containerHeight: element.height,
1267
- position: {
1268
- mx: (element.width / 2 - 7.5) / element.width,
1269
- my: (element.height - 20) / element.height
1270
- }
1271
- });
1272
- drawMarker("sub-process", parentGfx, markerPath, {
1273
- fill: getFillColor(element, defaultFillColor),
1274
- stroke: getStrokeColor(element, defaultStrokeColor)
1275
- });
1276
- },
1277
- ParallelMarker: function(parentGfx, element, position) {
1278
- var markerPath = pathMap.getScaledPath("MARKER_PARALLEL", {
1279
- xScaleFactor: 1,
1280
- yScaleFactor: 1,
1281
- containerWidth: element.width,
1282
- containerHeight: element.height,
1283
- position: {
1284
- mx: (element.width / 2 + position.parallel) / element.width,
1285
- my: (element.height - 20) / element.height
1286
- }
1287
- });
1288
- drawMarker("parallel", parentGfx, markerPath, {
1289
- fill: getFillColor(element, defaultFillColor),
1290
- stroke: getStrokeColor(element, defaultStrokeColor)
1291
- });
1292
- },
1293
- SequentialMarker: function(parentGfx, element, position) {
1294
- var markerPath = pathMap.getScaledPath("MARKER_SEQUENTIAL", {
1295
- xScaleFactor: 1,
1296
- yScaleFactor: 1,
1297
- containerWidth: element.width,
1298
- containerHeight: element.height,
1299
- position: {
1300
- mx: (element.width / 2 + position.seq) / element.width,
1301
- my: (element.height - 19) / element.height
1302
- }
1303
- });
1304
- drawMarker("sequential", parentGfx, markerPath, {
1305
- fill: getFillColor(element, defaultFillColor),
1306
- stroke: getStrokeColor(element, defaultStrokeColor)
1307
- });
1308
- },
1309
- CompensationMarker: function(parentGfx, element, position) {
1310
- var markerMath = pathMap.getScaledPath("MARKER_COMPENSATION", {
1311
- xScaleFactor: 1,
1312
- yScaleFactor: 1,
1313
- containerWidth: element.width,
1314
- containerHeight: element.height,
1315
- position: {
1316
- mx: (element.width / 2 + position.compensation) / element.width,
1317
- my: (element.height - 13) / element.height
1318
- }
1319
- });
1320
- drawMarker("compensation", parentGfx, markerMath, {
1321
- strokeWidth: 1,
1322
- fill: getFillColor(element, defaultFillColor),
1323
- stroke: getStrokeColor(element, defaultStrokeColor)
1324
- });
1325
- },
1326
- LoopMarker: function(parentGfx, element, position) {
1327
- var markerPath = pathMap.getScaledPath("MARKER_LOOP", {
1328
- xScaleFactor: 1,
1329
- yScaleFactor: 1,
1330
- containerWidth: element.width,
1331
- containerHeight: element.height,
1332
- position: {
1333
- mx: (element.width / 2 + position.loop) / element.width,
1334
- my: (element.height - 7) / element.height
1335
- }
1336
- });
1337
- drawMarker("loop", parentGfx, markerPath, {
1338
- strokeWidth: 1,
1339
- fill: getFillColor(element, defaultFillColor),
1340
- stroke: getStrokeColor(element, defaultStrokeColor),
1341
- strokeLinecap: "round",
1342
- strokeMiterlimit: 0.5
1343
- });
1344
- },
1345
- AdhocMarker: function(parentGfx, element, position) {
1346
- var markerPath = pathMap.getScaledPath("MARKER_ADHOC", {
1347
- xScaleFactor: 1,
1348
- yScaleFactor: 1,
1349
- containerWidth: element.width,
1350
- containerHeight: element.height,
1351
- position: {
1352
- mx: (element.width / 2 + position.adhoc) / element.width,
1353
- my: (element.height - 15) / element.height
1354
- }
1355
- });
1356
- drawMarker("adhoc", parentGfx, markerPath, {
1357
- strokeWidth: 1,
1358
- fill: getStrokeColor(element, defaultStrokeColor),
1359
- stroke: getStrokeColor(element, defaultStrokeColor)
1360
- });
1361
- }
1362
- };
1363
- function attachTaskMarkers(parentGfx, element, taskMarkers) {
1364
- var obj = getSemantic(element);
1365
- var subprocess = taskMarkers && taskMarkers.indexOf("SubProcessMarker") !== -1;
1366
- var position;
1367
- if (subprocess) {
1368
- position = {
1369
- seq: -21,
1370
- parallel: -22,
1371
- compensation: -42,
1372
- loop: -18,
1373
- adhoc: 10
1374
- };
1375
- } else {
1376
- position = {
1377
- seq: -3,
1378
- parallel: -6,
1379
- compensation: -27,
1380
- loop: 0,
1381
- adhoc: 10
1382
- };
1383
- }
1384
- forEach(taskMarkers, function(marker2) {
1385
- renderer(marker2)(parentGfx, element, position);
1386
- });
1387
- if (obj.isForCompensation) {
1388
- renderer("CompensationMarker")(parentGfx, element, position);
1389
- }
1390
- if (obj.$type === "bpmn:AdHocSubProcess") {
1391
- renderer("AdhocMarker")(parentGfx, element, position);
1392
- }
1393
- var loopCharacteristics = obj.loopCharacteristics, isSequential = loopCharacteristics && loopCharacteristics.isSequential;
1394
- if (loopCharacteristics) {
1395
- if (isSequential === void 0) {
1396
- renderer("LoopMarker")(parentGfx, element, position);
1397
- }
1398
- if (isSequential === false) {
1399
- renderer("ParallelMarker")(parentGfx, element, position);
1400
- }
1401
- if (isSequential === true) {
1402
- renderer("SequentialMarker")(parentGfx, element, position);
1403
- }
1404
- }
1405
- }
1406
- function renderDataItemCollection(parentGfx, element) {
1407
- var yPosition = (element.height - 18) / element.height;
1408
- var pathData = pathMap.getScaledPath("DATA_OBJECT_COLLECTION_PATH", {
1409
- xScaleFactor: 1,
1410
- yScaleFactor: 1,
1411
- containerWidth: element.width,
1412
- containerHeight: element.height,
1413
- position: {
1414
- mx: 0.33,
1415
- my: yPosition
1416
- }
1417
- });
1418
- drawPath(parentGfx, pathData, {
1419
- strokeWidth: 2
1420
- });
1421
- }
1422
- this._drawPath = drawPath;
1423
- }
1424
- inherits(BpmnRenderer, BaseRenderer);
1425
- BpmnRenderer.$inject = ["config.bpmnRenderer", "eventBus", "styles", "pathMap", "canvas", "textRenderer"];
1426
- BpmnRenderer.prototype.canRender = function(element) {
1427
- return is(element, "bpmn:BaseElement");
1428
- };
1429
- BpmnRenderer.prototype.drawShape = function(parentGfx, element) {
1430
- var type = element.type;
1431
- var h = this.handlers[type];
1432
- return h(parentGfx, element);
1433
- };
1434
- BpmnRenderer.prototype.drawConnection = function(parentGfx, element) {
1435
- var type = element.type;
1436
- var h = this.handlers[type];
1437
- return h(parentGfx, element);
1438
- };
1439
- BpmnRenderer.prototype.getShapePath = function(element) {
1440
- if (is(element, "bpmn:Event")) {
1441
- return getCirclePath(element);
1442
- }
1443
- if (is(element, "bpmn:Activity")) {
1444
- return getRoundRectPath(element, TASK_BORDER_RADIUS);
1445
- }
1446
- if (is(element, "bpmn:Gateway")) {
1447
- return getDiamondPath(element);
1448
- }
1449
- return getRectPath(element);
1450
- };
1451
-
1452
- export { BpmnRenderer as default };
1
+ import t from"inherits";import{assign as e,forEach as i,isObject as n}from"min-dash";import r from"diagram-js/lib/draw/BaseRenderer";import{isExpanded as a,isEventSubProcess as o}from"bpmn-js/lib/util/DiUtil";import{getLabel as l}from"bpmn-js/lib/features/label-editing/LabelUtil";import{is as c}from"bpmn-js/lib/util/ModelUtil";import{createLine as h}from"diagram-js/lib/util/RenderUtil";import{getCirclePath as s,getRoundRectPath as d,getDiamondPath as m,getRectPath as f,getFillColor as p,getStrokeColor as u,getSemantic as k,getLabelColor as g,getDi as b,isCollection as y,isThrowEvent as S,isTypedEvent as E}from"bpmn-js/lib/draw/BpmnRenderUtil";import{query as v}from"min-dom";import{attr as x,create as w,append as W,classes as A}from"tiny-svg";import{rotate as T,transform as P,translate as D}from"diagram-js/lib/util/SvgTransformUtil";import L from"ids";var F=new L;function _(t,c,s,d,m,f,L){r.call(this,c,L);var _=t&&t.defaultFillColor,M=t&&t.defaultStrokeColor,R=t&&t.defaultLabelColor,O=F.next(),N={},H=s.computeStyle;function C(t,i){var n=e({fill:"black",strokeWidth:1,strokeLinecap:"round",strokeDasharray:"none"},i.attrs),r=i.ref||{x:0,y:0},a=i.scale||1;"none"===n.strokeDasharray&&(n.strokeDasharray=[1e4,1]);var o=w("marker");x(i.element,n),W(o,i.element),x(o,{id:t,viewBox:"0 0 20 20",refX:r.x,refY:r.y,markerWidth:20*a,markerHeight:20*a,orient:"auto"});var l=v("defs",m._svg);l||(l=w("defs"),W(m._svg,l)),W(l,o),N[t]=o}function I(t){return t.replace(/[^0-9a-zA-z]+/g,"_")}function G(t,e,i){var n=t+"-"+I(e)+"-"+I(i)+"-"+O;return N[n]||function(t,e,i,n){if("sequenceflow-end"===e){var r=w("path");x(r,{d:"M 1 5 L 11 10 L 1 15 Z"}),C(t,{element:r,ref:{x:11,y:10},scale:.5,attrs:{fill:n,stroke:n}})}if("messageflow-start"===e){var a=w("circle");x(a,{cx:6,cy:6,r:3.5}),C(t,{element:a,attrs:{fill:i,stroke:n},ref:{x:6,y:6}})}if("messageflow-end"===e){var o=w("path");x(o,{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z"}),C(t,{element:o,attrs:{fill:i,stroke:n,strokeLinecap:"butt"},ref:{x:8.5,y:5}})}if("association-start"===e){var l=w("path");x(l,{d:"M 11 5 L 1 10 L 11 15"}),C(t,{element:l,attrs:{fill:"none",stroke:n,strokeWidth:1.5},ref:{x:1,y:10},scale:.5})}if("association-end"===e){var c=w("path");x(c,{d:"M 1 5 L 11 10 L 1 15"}),C(t,{element:c,attrs:{fill:"none",stroke:n,strokeWidth:1.5},ref:{x:12,y:10},scale:.5})}if("conditional-flow-marker"===e){var h=w("path");x(h,{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z"}),C(t,{element:h,attrs:{fill:i,stroke:n},ref:{x:-1,y:10},scale:.5})}if("conditional-default-flow-marker"===e){var s=w("path");x(s,{d:"M 6 4 L 10 16"}),C(t,{element:s,attrs:{stroke:n},ref:{x:0,y:10},scale:.5})}}(n,t,e,i),"url(#"+n+")"}function B(t,e,i,r,a){n(r)&&(a=r,r=0),r=r||0,"none"===(a=H(a,{stroke:"black",strokeWidth:2,fill:"white"})).fill&&delete a.fillOpacity;var o=e/2,l=i/2,c=w("circle");return x(c,{cx:o,cy:l,r:Math.round((e+i)/4-r)}),x(c,a),W(t,c),c}function j(t,e,i,r,a,o){n(a)&&(o=a,a=0),a=a||0,o=H(o,{stroke:"black",strokeWidth:2,fill:"white"});var l=w("rect");return x(l,{x:a,y:a,width:e-2*a,height:i-2*a,rx:r,ry:r}),x(l,o),W(t,l),l}function U(t,e,i){i=H(i,["no-fill"],{stroke:"black",strokeWidth:2,fill:"none"});var n=h(e,i);return W(t,n),n}function K(t,e,i){i=H(i,["no-fill"],{strokeWidth:2,stroke:"black"});var n=w("path");return x(n,{d:e}),x(n,i),W(t,n),n}function V(t,i,n,r){return K(i,n,e({"data-marker":t},r))}function q(t){return function(e,i){return Q[t](e,i)}}function Y(t){return Q[t]}function $(t,e){var i=k(t),n=S(i);return i.eventDefinitions&&i.eventDefinitions.length>1?i.parallelMultiple?Y("bpmn:ParallelMultipleEventDefinition")(e,t,n):Y("bpmn:MultipleEventDefinition")(e,t,n):E(i,"bpmn:MessageEventDefinition")?Y("bpmn:MessageEventDefinition")(e,t,n):E(i,"bpmn:TimerEventDefinition")?Y("bpmn:TimerEventDefinition")(e,t,n):E(i,"bpmn:ConditionalEventDefinition")?Y("bpmn:ConditionalEventDefinition")(e,t):E(i,"bpmn:SignalEventDefinition")?Y("bpmn:SignalEventDefinition")(e,t,n):E(i,"bpmn:EscalationEventDefinition")?Y("bpmn:EscalationEventDefinition")(e,t,n):E(i,"bpmn:LinkEventDefinition")?Y("bpmn:LinkEventDefinition")(e,t,n):E(i,"bpmn:ErrorEventDefinition")?Y("bpmn:ErrorEventDefinition")(e,t,n):E(i,"bpmn:CancelEventDefinition")?Y("bpmn:CancelEventDefinition")(e,t,n):E(i,"bpmn:CompensateEventDefinition")?Y("bpmn:CompensateEventDefinition")(e,t,n):E(i,"bpmn:TerminateEventDefinition")?Y("bpmn:TerminateEventDefinition")(e,t,n):null}function z(t,i,n){n=e({size:{width:100}},n);var r=f.createText(i||"",n);return A(r).add("djs-label"),W(t,r),r}function X(t,e,i){return z(t,k(e).name,{box:e,align:i,padding:5,style:{fill:g(e,R,M)}})}function J(t,e,i){var n=z(t,e,{box:{height:30,width:i.height},align:"center-middle",style:{fill:g(i,R,M)}}),r=-1*i.height;P(n,0,-r,270)}function Z(t){for(var e=t.waypoints,i="m "+e[0].x+","+e[0].y,n=1;n<e.length;n++)i+="L"+e[n].x+","+e[n].y+" ";return i}var Q=this.handlers={"bpmn:Event":function(t,e,i){return"fillOpacity"in i||(i.fillOpacity=.95),B(t,e.width,e.height,i)},"bpmn:StartEvent":function(t,e){var i={fill:p(e,_),stroke:u(e,M)};k(e).isInterrupting||(i={strokeDasharray:"6",strokeLinecap:"round",fill:p(e,_),stroke:u(e,M)});var n=Y("bpmn:Event")(t,e,i);return $(e,t),n},"bpmn:MessageEventDefinition":function(t,e,i){return K(t,d.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:e.width,containerHeight:e.height,position:{mx:.235,my:.315}}),{strokeWidth:1,fill:i?u(e,M):p(e,_),stroke:i?p(e,_):u(e,M)})},"bpmn:TimerEventDefinition":function(t,e){var i=B(t,e.width,e.height,.2*e.height,{strokeWidth:2,fill:p(e,_),stroke:u(e,M)});K(t,d.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:e.width,containerHeight:e.height,position:{mx:.5,my:.5}}),{strokeWidth:2,strokeLinecap:"square",stroke:u(e,M)});for(var n=0;n<12;n++){var r=d.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:e.width,containerHeight:e.height,position:{mx:.5,my:.5}}),a=e.width/2;K(t,r,{strokeWidth:1,strokeLinecap:"square",transform:"rotate("+30*n+","+e.height/2+","+a+")",stroke:u(e,M)})}return i},"bpmn:EscalationEventDefinition":function(t,e,i){return K(t,d.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:.5,my:.2}}),{strokeWidth:1,fill:i?u(e,M):"none",stroke:u(e,M)})},"bpmn:ConditionalEventDefinition":function(t,e){return K(t,d.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:.5,my:.222}}),{strokeWidth:1,stroke:u(e,M)})},"bpmn:LinkEventDefinition":function(t,e,i){return K(t,d.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:.57,my:.263}}),{strokeWidth:1,fill:i?u(e,M):"none",stroke:u(e,M)})},"bpmn:ErrorEventDefinition":function(t,e,i){return K(t,d.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:e.width,containerHeight:e.height,position:{mx:.2,my:.722}}),{strokeWidth:1,fill:i?u(e,M):"none",stroke:u(e,M)})},"bpmn:CancelEventDefinition":function(t,e,i){var n=K(t,d.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:.638,my:-.055}}),{strokeWidth:1,fill:i?u(e,M):"none",stroke:u(e,M)});return T(n,45),n},"bpmn:CompensateEventDefinition":function(t,e,i){return K(t,d.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:.22,my:.5}}),{strokeWidth:1,fill:i?u(e,M):"none",stroke:u(e,M)})},"bpmn:SignalEventDefinition":function(t,e,i){return K(t,d.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:e.width,containerHeight:e.height,position:{mx:.5,my:.2}}),{strokeWidth:1,fill:i?u(e,M):"none",stroke:u(e,M)})},"bpmn:MultipleEventDefinition":function(t,e,i){return K(t,d.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:e.width,containerHeight:e.height,position:{mx:.222,my:.36}}),{strokeWidth:1,fill:i?u(e,M):"none"})},"bpmn:ParallelMultipleEventDefinition":function(t,e){return K(t,d.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:e.width,containerHeight:e.height,position:{mx:.458,my:.194}}),{strokeWidth:1,fill:u(e,M),stroke:u(e,M)})},"bpmn:EndEvent":function(t,e){var i=Y("bpmn:Event")(t,e,{strokeWidth:4,fill:p(e,_),stroke:u(e,M)});return $(e,t),i},"bpmn:TerminateEventDefinition":function(t,e){return B(t,e.width,e.height,8,{strokeWidth:4,fill:u(e,M),stroke:u(e,M)})},"bpmn:IntermediateEvent":function(t,e){var i=Y("bpmn:Event")(t,e,{strokeWidth:1,fill:p(e,_),stroke:u(e,M)});return B(t,e.width,e.height,3,{strokeWidth:1,fill:p(e,"none"),stroke:u(e,M)}),$(e,t),i},"bpmn:IntermediateCatchEvent":q("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":q("bpmn:IntermediateEvent"),"bpmn:Activity":function(t,e,i){return"fillOpacity"in(i=i||{})||(i.fillOpacity=.95),j(t,e.width,e.height,10,i)},"bpmn:Task":function(t,e){var i={fill:p(e,_),stroke:u(e,M)},n=Y("bpmn:Activity")(t,e,i);return X(t,e,"center-middle"),tt(t,e),n},"bpmn:ServiceTask":function(t,e){return Y("bpmn:Task")(t,e)},"bpmn:UserTask":function(t,e){return Y("bpmn:Task")(t,e)},"bpmn:ManualTask":function(t,e){var i=Y("bpmn:Task")(t,e);return K(t,d.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}}),{strokeWidth:.5,fill:p(e,_),stroke:u(e,M)}),i},"bpmn:SendTask":function(t,e){var i=Y("bpmn:Task")(t,e);return K(t,d.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}}),{strokeWidth:1,fill:u(e,M),stroke:p(e,_)}),i},"bpmn:ReceiveTask":function(t,e){var i,n=k(e),r=Y("bpmn:Task")(t,e);return n.instantiate?(B(t,28,28,4.4,{strokeWidth:1}),i=d.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):i=d.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),K(t,i,{strokeWidth:1,fill:p(e,_),stroke:u(e,M)}),r},"bpmn:ScriptTask":function(t,e){return Y("bpmn:Task")(t,e)},"bpmn:BusinessRuleTask":function(t,e){var i=Y("bpmn:Task")(t,e),n=K(t,d.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}));x(n,{strokeWidth:1,fill:p(e,"#aaaaaa"),stroke:u(e,M)});var r=K(t,d.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}));return x(r,{strokeWidth:1,stroke:u(e,M)}),i},"bpmn:SubProcess":function(t,i,n){n=e({fill:p(i,_),stroke:u(i,M)},n);var r=Y("bpmn:Activity")(t,i,n),l=a(i);return o(i)&&x(r,{strokeDasharray:"1,2"}),X(t,i,l?"center-top":"center-middle"),l?tt(t,i):tt(t,i,["SubProcessMarker"]),r},"bpmn:AdHocSubProcess":function(t,e){return Y("bpmn:SubProcess")(t,e)},"bpmn:Transaction":function(t,e){var i=Y("bpmn:SubProcess")(t,e),n=s.style(["no-fill","no-events"],{stroke:u(e,M)});return j(t,e.width,e.height,8,3,n),i},"bpmn:CallActivity":function(t,e){return Y("bpmn:SubProcess")(t,e,{strokeWidth:5})},"bpmn:Participant":function(t,e){var i={fillOpacity:.95,fill:p(e,_),stroke:u(e,M)},n=Y("bpmn:Lane")(t,e,i);a(e)?(U(t,[{x:30,y:0},{x:30,y:e.height}],{stroke:u(e,M)}),J(t,k(e).name,e)):z(t,k(e).name,{box:e,align:"center-middle",style:{fill:g(e,R,M)}});return!!k(e).participantMultiplicity&&Y("ParticipantMultiplicityMarker")(t,e),n},"bpmn:Lane":function(t,i,n){var r=j(t,i.width,i.height,0,e({fill:p(i,_),fillOpacity:.35,stroke:u(i,M)},n)),a=k(i);"bpmn:Lane"===a.$type&&J(t,a.name,i);return r},"bpmn:InclusiveGateway":function(t,e){var i=Y("bpmn:Gateway")(t,e);return B(t,e.width,e.height,.24*e.height,{strokeWidth:2.5,fill:p(e,_),stroke:u(e,M)}),i},"bpmn:ExclusiveGateway":function(t,e){var i=Y("bpmn:Gateway")(t,e),n=d.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:e.width,containerHeight:e.height,position:{mx:.32,my:.3}});return b(e).isMarkerVisible&&K(t,n,{strokeWidth:1,fill:u(e,M),stroke:u(e,M)}),i},"bpmn:ComplexGateway":function(t,e){var i=Y("bpmn:Gateway")(t,e);return K(t,d.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:e.width,containerHeight:e.height,position:{mx:.46,my:.26}}),{strokeWidth:1,fill:u(e,M),stroke:u(e,M)}),i},"bpmn:ParallelGateway":function(t,e){var i=Y("bpmn:Gateway")(t,e);return K(t,d.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:e.width,containerHeight:e.height,position:{mx:.46,my:.2}}),{strokeWidth:1,fill:u(e,M),stroke:u(e,M)}),i},"bpmn:EventBasedGateway":function(t,e){var i=k(e),n=Y("bpmn:Gateway")(t,e);B(t,e.width,e.height,.2*e.height,{strokeWidth:1,fill:"none",stroke:u(e,M)});var r,a,o=i.eventGatewayType,l=!!i.instantiate;if("Parallel"===o){var c=d.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:e.width,containerHeight:e.height,position:{mx:.474,my:.296}}),h=K(t,c);x(h,{strokeWidth:1,fill:"none"})}else if("Exclusive"===o){if(!l){var s=B(t,e.width,e.height,.26*e.height);x(s,{strokeWidth:1,fill:"none",stroke:u(e,M)})}r=d.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:e.width,containerHeight:e.height,position:{mx:.36,my:.44}}),a={strokeWidth:2,fill:p(e,"none"),stroke:u(e,M)},K(t,r,a)}return n},"bpmn:Gateway":function(t,e){var i={fill:p(e,_),fillOpacity:.95,stroke:u(e,M)};return function(t,e,i,n){var r=e/2,a=i/2,o=[{x:r,y:0},{x:e,y:a},{x:r,y:i},{x:0,y:a}].map((function(t){return t.x+","+t.y})).join(" ");n=H(n,{stroke:"black",strokeWidth:2,fill:"white"});var l=w("polygon");return x(l,{points:o}),x(l,n),W(t,l),l}(t,e.width,e.height,i)},"bpmn:SequenceFlow":function(t,e){var i,n=Z(e),r=p(e,_),a=u(e,M),o=K(t,n,{strokeLinejoin:"round",markerEnd:G("sequenceflow-end",r,a),stroke:u(e,M)}),l=k(e);return e.source&&(i=e.source.businessObject,l.conditionExpression&&i.$instanceOf("bpmn:Activity")&&x(o,{markerStart:G("conditional-flow-marker",r,a)}),i.default&&(i.$instanceOf("bpmn:Gateway")||i.$instanceOf("bpmn:Activity"))&&i.default===l&&x(o,{markerStart:G("conditional-default-flow-marker",r,a)})),o},"bpmn:Association":function(t,i,n){var r=k(i),a=p(i,_),o=u(i,M);return n=e({strokeDasharray:"0.5, 5",strokeLinecap:"round",strokeLinejoin:"round",stroke:u(i,M)},n||{}),"One"!==r.associationDirection&&"Both"!==r.associationDirection||(n.markerEnd=G("association-end",a,o)),"Both"===r.associationDirection&&(n.markerStart=G("association-start",a,o)),U(t,i.waypoints,n)},"bpmn:DataInputAssociation":function(t,e){var i=p(e,_),n=u(e,M);return Y("bpmn:Association")(t,e,{markerEnd:G("association-end",i,n)})},"bpmn:DataOutputAssociation":function(t,e){var i=p(e,_),n=u(e,M);return Y("bpmn:Association")(t,e,{markerEnd:G("association-end",i,n)})},"bpmn:MessageFlow":function(t,e){var i=k(e),n=b(e),r=p(e,_),a=u(e,M),o=K(t,Z(e),{markerEnd:G("messageflow-end",r,a),markerStart:G("messageflow-start",r,a),strokeDasharray:"10, 12",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5px",stroke:u(e,M)});if(i.messageRef){var l=o.getPointAtLength(o.getTotalLength()/2),c=d.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:l.x,y:l.y}}),h={strokeWidth:1};"initiating"===n.messageVisibleKind?(h.fill="white",h.stroke="black"):(h.fill="#888",h.stroke="white");var s=K(t,c,h),m=z(t,i.messageRef.name,{align:"center-top",fitBox:!0,style:{fill:u(e,R,M)}}),f=s.getBBox(),g=m.getBBox(),y=l.x-g.width/2,S=l.y+f.height/2+10;P(m,y,S,0)}return o},"bpmn:DataObject":function(t,e){var i=K(t,d.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:.474,my:.296}}),{fill:p(e,_),fillOpacity:.95,stroke:u(e,M)}),n=k(e);return y(n)&&function(t,e){var i=(e.height-18)/e.height,n=d.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:.33,my:i}});K(t,n,{strokeWidth:2})}(t,e),i},"bpmn:DataObjectReference":q("bpmn:DataObject"),"bpmn:DataInput":function(t,e){var i=d.getRawPath("DATA_ARROW"),n=Y("bpmn:DataObject")(t,e);return K(t,i,{strokeWidth:1}),n},"bpmn:DataOutput":function(t,e){var i=d.getRawPath("DATA_ARROW"),n=Y("bpmn:DataObject")(t,e);return K(t,i,{strokeWidth:1,fill:"black"}),n},"bpmn:DataStoreReference":function(t,e){return K(t,d.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:0,my:.133}}),{strokeWidth:2,fill:p(e,_),fillOpacity:.95,stroke:u(e,M)})},"bpmn:BoundaryEvent":function(t,i){var n=k(i).cancelActivity,r={strokeWidth:1,fill:p(i,_),stroke:u(i,M)};n||(r.strokeDasharray="6",r.strokeLinecap="round");var a=e({},r,{fillOpacity:1}),o=e({},r,{fill:"none"}),l=Y("bpmn:Event")(t,i,a);return B(t,i.width,i.height,3,o),$(i,t),l},"bpmn:Group":function(t,e){return j(t,e.width,e.height,10,{stroke:u(e,M),strokeWidth:1,strokeDasharray:"8,3,1,3",fill:"none",pointerEvents:"none"})},label:function(t,i){return function(t,i){var n={width:90,height:30,x:i.width/2+i.x,y:i.height/2+i.y};return z(t,l(i),{box:n,fitBox:!0,style:e({},f.getExternalStyle(),{fill:g(i,R,M)})})}(t,i)},"bpmn:TextAnnotation":function(t,e){var i=j(t,e.width,e.height,0,0,{fill:"none",stroke:"none"});return K(t,d.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:0,my:0}}),{stroke:u(e,M)}),z(t,k(e).text||"",{box:e,align:"left-top",padding:5,style:{fill:g(e,R,M)}}),i},ParticipantMultiplicityMarker:function(t,e){V("participant-multiplicity",t,d.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:e.width/2/e.width,my:(e.height-15)/e.height}}),{strokeWidth:2,fill:p(e,_),stroke:u(e,M)})},SubProcessMarker:function(t,e){var i=j(t,14,14,0,{strokeWidth:1,fill:p(e,_),stroke:u(e,M)});D(i,e.width/2-7.5,e.height-20),V("sub-process",t,d.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:e.width,containerHeight:e.height,position:{mx:(e.width/2-7.5)/e.width,my:(e.height-20)/e.height}}),{fill:p(e,_),stroke:u(e,M)})},ParallelMarker:function(t,e,i){V("parallel",t,d.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:(e.width/2+i.parallel)/e.width,my:(e.height-20)/e.height}}),{fill:p(e,_),stroke:u(e,M)})},SequentialMarker:function(t,e,i){V("sequential",t,d.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:(e.width/2+i.seq)/e.width,my:(e.height-19)/e.height}}),{fill:p(e,_),stroke:u(e,M)})},CompensationMarker:function(t,e,i){V("compensation",t,d.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:(e.width/2+i.compensation)/e.width,my:(e.height-13)/e.height}}),{strokeWidth:1,fill:p(e,_),stroke:u(e,M)})},LoopMarker:function(t,e,i){V("loop",t,d.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:(e.width/2+i.loop)/e.width,my:(e.height-7)/e.height}}),{strokeWidth:1,fill:p(e,_),stroke:u(e,M),strokeLinecap:"round",strokeMiterlimit:.5})},AdhocMarker:function(t,e,i){V("adhoc",t,d.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:(e.width/2+i.adhoc)/e.width,my:(e.height-15)/e.height}}),{strokeWidth:1,fill:u(e,M),stroke:u(e,M)})}};function tt(t,e,n){var r,a=k(e),o=n&&-1!==n.indexOf("SubProcessMarker");r=o?{seq:-21,parallel:-22,compensation:-42,loop:-18,adhoc:10}:{seq:-3,parallel:-6,compensation:-27,loop:0,adhoc:10},i(n,(function(i){Y(i)(t,e,r)})),a.isForCompensation&&Y("CompensationMarker")(t,e,r),"bpmn:AdHocSubProcess"===a.$type&&Y("AdhocMarker")(t,e,r);var l=a.loopCharacteristics,c=l&&l.isSequential;l&&(void 0===c&&Y("LoopMarker")(t,e,r),!1===c&&Y("ParallelMarker")(t,e,r),!0===c&&Y("SequentialMarker")(t,e,r))}this._drawPath=K}t(_,r),_.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],_.prototype.canRender=function(t){return c(t,"bpmn:BaseElement")},_.prototype.drawShape=function(t,e){var i=e.type;return(0,this.handlers[i])(t,e)},_.prototype.drawConnection=function(t,e){var i=e.type;return(0,this.handlers[i])(t,e)},_.prototype.getShapePath=function(t){return c(t,"bpmn:Event")?s(t):c(t,"bpmn:Activity")?d(t,10):c(t,"bpmn:Gateway")?m(t):f(t)};export{_ as default};