@gct-paas/core-web 0.1.6-dev.5 → 0.1.6-dev.7

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 (218) hide show
  1. package/dist/ColorPicker-DFKXqgaG.js +1 -0
  2. package/dist/_plugin-vue_export-helper-CGzGcWFX.js +1 -0
  3. package/dist/{de_DE-BnwOalCV.js → de_DE-B3f8kAv-.js} +1 -1
  4. package/dist/diagram-config-item-C5Ha2XJq.js +1 -0
  5. package/dist/diagram-config-item-reverse-ChoxnW-Z.js +1 -0
  6. package/dist/diagram-config-item-virtual-Cbmggfwt.js +1 -0
  7. package/dist/{en_US-6Hw6WWah.js → en_US-BSG3Kz6v.js} +1 -1
  8. package/dist/{es_ES-tAqXFGrR.js → es_ES-BGP8IOmQ.js} +1 -1
  9. package/dist/{fr_FR-BkDgVS_P.js → fr_FR-Y-6CzjUq.js} +1 -1
  10. package/dist/hooks-yX21uJ6d.js +1 -0
  11. package/dist/index.min.css +1 -1
  12. package/dist/{ja_JP-AsmV92nC.js → ja_JP-CDlH1v8M.js} +1 -1
  13. package/dist/loader.esm.min.js +1 -1
  14. package/dist/{monaco-editor-CgESUPw_.js → monaco-editor-CQJ9TMzD.js} +1 -1
  15. package/dist/{pt_PT-CCVWOJzE.js → pt_PT-N-iIoE2_.js} +1 -1
  16. package/dist/relationship-diagram-config-DstwwXCO.js +1 -0
  17. package/dist/{ru_RU-w4sUgbzL.js → ru_RU--ESLRHrj.js} +1 -1
  18. package/dist/template-CXn8oAg5.js +1 -0
  19. package/dist/{tr_TR-CGZch3eB.js → tr_TR-BOIykdZO.js} +1 -1
  20. package/dist/{vi_VN-DONxIDR7.js → vi_VN-CmVoM2Rw.js} +1 -1
  21. package/dist/{zh_CN-BxdD8hqG.js → zh_CN-DhsO5Qwx.js} +1 -1
  22. package/dist/{zh_TW-D5Y8j-oG.js → zh_TW-DWdp2kVo.js} +1 -1
  23. package/es/components/UserPick/src/user-pick.vue_vue_type_script_setup_true_lang.mjs +2 -2
  24. package/es/components/base-button/base-button.vue.mjs +1 -1
  25. package/es/components/field-cascader/src/hooks.d.ts +1 -0
  26. package/es/components/index.d.ts +1 -0
  27. package/es/components/index.mjs +2 -0
  28. package/es/components/label-design/modal/template.vue_vue_type_script_setup_true_lang.mjs +2 -2
  29. package/es/components/label-design/panels/modals/diff-modal.vue_vue_type_script_setup_true_lang.mjs +2 -2
  30. package/es/components/label-design/panels/panel.vue_vue_type_script_setup_true_lang.mjs +1 -1
  31. package/es/components/label-design/panels/widget/controls/ImageData.vue.mjs +2 -2
  32. package/es/components/label-design/panels/widget/controls/ImageData.vue_vue_type_script_setup_true_name_image-data_lang.mjs +2 -2
  33. package/es/components/label-design/panels/widget/controls/ImageData.vue_vue_type_style_index_0_scoped_9232a443_lang.css +3 -0
  34. package/es/components/label-design/stage/stage.vue.d.ts +9 -0
  35. package/es/components/label-design/stage/stage.vue.mjs +2 -2
  36. package/es/components/label-design/stage/stage.vue_vue_type_script_setup_true_lang.mjs +2 -1
  37. package/es/components/label-design/stage/{stage.vue_vue_type_style_index_0_scoped_53b1f897_lang.css → stage.vue_vue_type_style_index_0_scoped_9275e9fb_lang.css} +8 -8
  38. package/es/components/layout/view-container/view-container.d.ts +1 -11
  39. package/es/components/layout/view-container/view-container.mjs +10 -14
  40. package/es/components/paas-bpmn-log/components/approval-node.vue.mjs +2 -2
  41. package/es/components/paas-bpmn-log/components/approval-node.vue_vue_type_script_setup_true_lang.mjs +1 -2
  42. package/es/components/paas-bpmn-log/components/{approval-node.vue_vue_type_style_index_0_scoped_a88d7ef9_lang.css → approval-node.vue_vue_type_style_index_0_scoped_a8065b24_lang.css} +9 -9
  43. package/es/components/paas-bpmn-log/paas-bpmn-log.vue.mjs +2 -2
  44. package/es/components/paas-bpmn-log/paas-bpmn-log.vue_vue_type_script_setup_true_lang.mjs +1 -2
  45. package/es/components/paas-bpmn-log/{paas-bpmn-log.vue_vue_type_style_index_0_scoped_c85122b0_lang.css → paas-bpmn-log.vue_vue_type_style_index_0_scoped_eb574523_lang.css} +9 -9
  46. package/es/components/select-user-modal/deptUser.vue.d.ts +9 -0
  47. package/es/components/select-user-modal/deptUser.vue.mjs +7 -0
  48. package/es/components/select-user-modal/deptUser.vue_vue_type_script_setup_true_name_deptUser_lang.mjs +296 -0
  49. package/es/components/select-user-modal/deptUser.vue_vue_type_style_index_0_scoped_02dff7bf_lang.css +40 -0
  50. package/es/components/select-user-modal/index.d.ts +2 -0
  51. package/es/components/select-user-modal/index.mjs +1 -0
  52. package/es/components/select-user-modal/range-role.vue.d.ts +9 -0
  53. package/es/components/select-user-modal/range-role.vue.mjs +7 -0
  54. package/es/components/select-user-modal/range-role.vue_vue_type_script_setup_true_name_role_lang.mjs +137 -0
  55. package/es/components/select-user-modal/range-role.vue_vue_type_style_index_0_scoped_1241bcdf_lang.css +34 -0
  56. package/es/components/select-user-modal/select-user-modal.vue.d.ts +12 -0
  57. package/es/components/select-user-modal/select-user-modal.vue.mjs +7 -0
  58. package/es/components/select-user-modal/select-user-modal.vue_vue_type_script_setup_true_name_select-user-modal_lang.mjs +123 -0
  59. package/es/components/select-user-modal/select-user-modal.vue_vue_type_style_index_0_scoped_2c0f184c_lang.css +14 -0
  60. package/es/components/select-user-modal/userGroup.vue.d.ts +9 -0
  61. package/es/components/select-user-modal/userGroup.vue.mjs +7 -0
  62. package/es/components/select-user-modal/userGroup.vue_vue_type_script_setup_true_name_userGroup_lang.mjs +149 -0
  63. package/es/components/select-user-modal/userGroup.vue_vue_type_style_index_0_scoped_47d1cbaa_lang.css +19 -0
  64. package/es/create-app-vue.d.ts +2 -2
  65. package/es/create-app-vue.mjs +7 -5
  66. package/es/index.d.ts +4 -2
  67. package/es/index.mjs +30 -25
  68. package/es/modules/color-picker/src/color-editor.vue.mjs +1 -1
  69. package/es/modules/data-rules-container/index.d.ts +3 -0
  70. package/es/modules/data-rules-container/index.mjs +2 -0
  71. package/es/modules/data-rules-container/src/components/header-action.vue.d.ts +10 -0
  72. package/es/modules/data-rules-container/src/components/header-action.vue.mjs +7 -0
  73. package/es/modules/data-rules-container/src/components/header-action.vue_vue_type_script_setup_true_name_header-action_lang.mjs +36 -0
  74. package/es/modules/data-rules-container/src/components/header-action.vue_vue_type_style_index_0_scoped_4e281013_lang.css +32 -0
  75. package/es/modules/data-rules-container/src/components/ndo-select-cmp.vue.d.ts +8 -0
  76. package/es/modules/data-rules-container/src/components/ndo-select-cmp.vue.mjs +5 -0
  77. package/es/modules/data-rules-container/src/components/ndo-select-cmp.vue_vue_type_script_setup_true_lang.mjs +266 -0
  78. package/es/modules/data-rules-container/src/components/perm-action-node.vue.d.ts +22 -0
  79. package/es/modules/data-rules-container/src/components/perm-action-node.vue.mjs +7 -0
  80. package/es/modules/data-rules-container/src/components/perm-action-node.vue_vue_type_script_setup_true_name_perm-action-node_lang.mjs +384 -0
  81. package/es/modules/data-rules-container/src/components/perm-action-node.vue_vue_type_style_index_0_scoped_417c660f_lang.css +73 -0
  82. package/es/modules/data-rules-container/src/components/perm-root-node.vue.d.ts +3 -0
  83. package/es/modules/data-rules-container/src/components/perm-root-node.vue.mjs +7 -0
  84. package/es/modules/data-rules-container/src/components/perm-root-node.vue_vue_type_script_setup_true_name_perm-root-node_lang.mjs +61 -0
  85. package/es/modules/data-rules-container/src/components/perm-root-node.vue_vue_type_style_index_0_scoped_ca5c9d20_lang.css +74 -0
  86. package/es/modules/data-rules-container/src/components/rdo-select-cmp.vue.d.ts +11 -0
  87. package/es/modules/data-rules-container/src/components/rdo-select-cmp.vue.mjs +5 -0
  88. package/es/modules/data-rules-container/src/components/rdo-select-cmp.vue_vue_type_script_setup_true_lang.mjs +93 -0
  89. package/es/modules/data-rules-container/src/components/request-select-cmp.vue.d.ts +9 -0
  90. package/es/modules/data-rules-container/src/components/request-select-cmp.vue.mjs +5 -0
  91. package/es/modules/data-rules-container/src/components/request-select-cmp.vue_vue_type_script_setup_true_name_request-select-cmp_lang.mjs +117 -0
  92. package/es/modules/data-rules-container/src/components/request-tree-select-cmp.vue.d.ts +3 -0
  93. package/es/modules/data-rules-container/src/components/request-tree-select-cmp.vue.mjs +6 -0
  94. package/es/modules/data-rules-container/src/components/request-tree-select-cmp.vue_vue_type_script_name_gct-select_setup_true_lang.mjs +100 -0
  95. package/es/modules/data-rules-container/src/components/request-tree-select-cmp.vue_vue_type_style_index_0_lang.css +21 -0
  96. package/es/modules/data-rules-container/src/components/select-modal-cmp.vue.d.ts +32 -0
  97. package/es/modules/data-rules-container/src/components/select-modal-cmp.vue.mjs +5 -0
  98. package/es/modules/data-rules-container/src/components/select-modal-cmp.vue_vue_type_script_setup_true_name_select-modal-cmp_lang.mjs +268 -0
  99. package/es/modules/data-rules-container/src/components/select-more.vue.d.ts +8 -0
  100. package/es/modules/data-rules-container/src/components/select-more.vue.mjs +5 -0
  101. package/es/modules/data-rules-container/src/components/select-more.vue_vue_type_script_setup_true_lang.mjs +26 -0
  102. package/es/modules/data-rules-container/src/components/select-userdep-cmp.vue.d.ts +12 -0
  103. package/es/modules/data-rules-container/src/components/select-userdep-cmp.vue.mjs +5 -0
  104. package/es/modules/data-rules-container/src/components/select-userdep-cmp.vue_vue_type_script_setup_true_name_select-userdep-cmp_lang.mjs +103 -0
  105. package/es/modules/data-rules-container/src/components/tree-action-node.vue.d.ts +25 -0
  106. package/es/modules/data-rules-container/src/components/tree-action-node.vue.mjs +7 -0
  107. package/es/modules/data-rules-container/src/components/tree-action-node.vue_vue_type_script_setup_true_name_tree-action-node_lang.mjs +544 -0
  108. package/es/modules/data-rules-container/src/components/tree-action-node.vue_vue_type_style_index_0_scoped_46368089_lang.css +67 -0
  109. package/es/modules/data-rules-container/src/components/tree-root-node.vue.d.ts +3 -0
  110. package/es/modules/data-rules-container/src/components/tree-root-node.vue.mjs +7 -0
  111. package/es/modules/data-rules-container/src/components/tree-root-node.vue_vue_type_script_setup_true_name_tree-root-node_lang.mjs +105 -0
  112. package/es/modules/data-rules-container/src/components/tree-root-node.vue_vue_type_style_index_0_scoped_37e323fb_lang.css +29 -0
  113. package/es/modules/data-rules-container/src/components/tree-select-cmp.vue.d.ts +3 -0
  114. package/es/modules/data-rules-container/src/components/tree-select-cmp.vue.mjs +5 -0
  115. package/es/modules/data-rules-container/src/components/tree-select-cmp.vue_vue_type_script_name_gct-select_setup_true_lang.mjs +89 -0
  116. package/es/modules/data-rules-container/src/constant/config.d.ts +146 -0
  117. package/es/modules/data-rules-container/src/constant/config.mjs +548 -0
  118. package/es/modules/data-rules-container/src/constant/interface.d.ts +85 -0
  119. package/es/modules/data-rules-container/src/constant/interface.mjs +36 -0
  120. package/es/modules/data-rules-container/src/data-rules-container.vue.d.ts +45 -0
  121. package/es/modules/data-rules-container/src/data-rules-container.vue.mjs +6 -0
  122. package/es/modules/data-rules-container/src/data-rules-container.vue_vue_type_script_setup_true_name_data-rules-container_lang.mjs +234 -0
  123. package/es/modules/data-rules-container/src/data-rules-container.vue_vue_type_style_index_0_lang.css +149 -0
  124. package/es/modules/data-rules-container/src/field-role-container.vue.d.ts +14 -0
  125. package/es/modules/data-rules-container/src/field-role-container.vue.mjs +5 -0
  126. package/es/modules/data-rules-container/src/field-role-container.vue_vue_type_script_setup_true_name_field-role-container_lang.mjs +73 -0
  127. package/es/modules/data-rules-container/src/hooks/useDataRulesTree.d.ts +30 -0
  128. package/es/modules/data-rules-container/src/hooks/useDataRulesTree.mjs +317 -0
  129. package/es/modules/data-rules-container/src/hooks/useEmitter.d.ts +10 -0
  130. package/es/modules/data-rules-container/src/hooks/useRdoHooks.d.ts +37 -0
  131. package/es/modules/data-rules-container/src/hooks/useRdoHooks.mjs +144 -0
  132. package/es/modules/data-rules-container/src/hooks/useRole.d.ts +8 -0
  133. package/es/modules/data-rules-container/src/typing.d.ts +40 -0
  134. package/es/modules/gct-form/controller/form-item-basic/form-item-basic.controller.mjs +2 -0
  135. package/es/modules/gct-form/controller/gct-form/gct-form.controller.mjs +1 -0
  136. package/es/modules/gct-table/controller/gct-table/gct-table.controller.mjs +1 -0
  137. package/es/modules/gct-table/controller/table-item/table-item.controller.mjs +2 -0
  138. package/es/modules/gct-table/controller/table-row/table-row.controller.mjs +3 -0
  139. package/es/modules/global-modal/src/components/ModalWrapper.vue_vue_type_script_lang.mjs +1 -4
  140. package/es/modules/print-tmpl/print-tmpl-modal.vue_vue_type_script_setup_true_name_print-tmpl-modal_lang.mjs +2 -2
  141. package/es/modules/relationship-diagram-config/cache.controller.d.ts +70 -0
  142. package/es/modules/relationship-diagram-config/cache.controller.mjs +128 -0
  143. package/es/modules/relationship-diagram-config/components/diagram-config-item/diagram-config-item.css +123 -0
  144. package/es/modules/relationship-diagram-config/components/diagram-config-item/diagram-config-item.d.ts +381 -0
  145. package/es/modules/relationship-diagram-config/components/diagram-config-item/diagram-config-item.mjs +98 -0
  146. package/es/modules/relationship-diagram-config/components/diagram-config-item-container/diagram-config-item-container.css +71 -0
  147. package/es/modules/relationship-diagram-config/components/diagram-config-item-container/diagram-config-item-container.d.ts +28 -0
  148. package/es/modules/relationship-diagram-config/components/diagram-config-item-container/diagram-config-item-container.mjs +53 -0
  149. package/es/modules/relationship-diagram-config/components/diagram-config-item-info/diagram-config-item-info.d.ts +27 -0
  150. package/es/modules/relationship-diagram-config/components/diagram-config-item-info/diagram-config-item-info.mjs +2 -0
  151. package/es/modules/relationship-diagram-config/components/diagram-config-item-reverse/diagram-config-item-reverse.css +107 -0
  152. package/es/modules/relationship-diagram-config/components/diagram-config-item-reverse/diagram-config-item-reverse.d.ts +34 -0
  153. package/es/modules/relationship-diagram-config/components/diagram-config-item-reverse/diagram-config-item-reverse.mjs +198 -0
  154. package/es/modules/relationship-diagram-config/components/diagram-config-item-virtual/diagram-config-item-virtual.css +68 -0
  155. package/es/modules/relationship-diagram-config/components/diagram-config-item-virtual/diagram-config-item-virtual.d.ts +31 -0
  156. package/es/modules/relationship-diagram-config/components/diagram-config-item-virtual/diagram-config-item-virtual.mjs +53 -0
  157. package/es/modules/relationship-diagram-config/components/index.d.ts +5 -0
  158. package/es/modules/relationship-diagram-config/components/index.mjs +5 -0
  159. package/es/modules/relationship-diagram-config/constant/index.d.ts +72 -0
  160. package/es/modules/relationship-diagram-config/constant/index.mjs +70 -0
  161. package/es/modules/relationship-diagram-config/hooks/index.d.ts +10 -0
  162. package/es/modules/relationship-diagram-config/hooks/index.mjs +19 -0
  163. package/es/modules/relationship-diagram-config/index.d.ts +6 -0
  164. package/es/modules/relationship-diagram-config/index.mjs +28 -0
  165. package/es/modules/relationship-diagram-config/interface/i-link-provider/i-link-provider.d.ts +57 -0
  166. package/es/modules/relationship-diagram-config/interface/i-node-provider/i-node-provider.d.ts +18 -0
  167. package/es/modules/relationship-diagram-config/interface/i-relationship-diagram-link/i-relationship-diagram-link.d.ts +80 -0
  168. package/es/modules/relationship-diagram-config/interface/i-relationship-diagram-node/i-relationship-diagram-node.d.ts +82 -0
  169. package/es/modules/relationship-diagram-config/interface/i-relationship-diagram-options/i-relationship-diagram-options.d.ts +51 -0
  170. package/es/modules/relationship-diagram-config/interface/i-rule-config/i-rule-config.d.ts +135 -0
  171. package/es/modules/relationship-diagram-config/interface/index.d.ts +6 -0
  172. package/es/modules/relationship-diagram-config/link.controller.d.ts +75 -0
  173. package/es/modules/relationship-diagram-config/link.controller.mjs +121 -0
  174. package/es/modules/relationship-diagram-config/node.controller.d.ts +102 -0
  175. package/es/modules/relationship-diagram-config/node.controller.mjs +189 -0
  176. package/es/modules/relationship-diagram-config/plumb-plugin/arrow-endpoint.d.ts +23 -0
  177. package/es/modules/relationship-diagram-config/plumb-plugin/arrow-endpoint.mjs +33 -0
  178. package/es/modules/relationship-diagram-config/plumb-plugin/blank-endpoint-renderer.d.ts +1 -0
  179. package/es/modules/relationship-diagram-config/plumb-plugin/blank-endpoint-renderer.mjs +27 -0
  180. package/es/modules/relationship-diagram-config/plumb-plugin/index.d.ts +3 -0
  181. package/es/modules/relationship-diagram-config/plumb-plugin/index.mjs +2 -0
  182. package/es/modules/relationship-diagram-config/providers/default-link-provider/default-link-provider.css +132 -0
  183. package/es/modules/relationship-diagram-config/providers/default-link-provider/default-link-provider.d.ts +21 -0
  184. package/es/modules/relationship-diagram-config/providers/default-link-provider/default-link-provider.mjs +184 -0
  185. package/es/modules/relationship-diagram-config/providers/default-node-provider/default-node-provider.d.ts +14 -0
  186. package/es/modules/relationship-diagram-config/providers/default-node-provider/default-node-provider.mjs +17 -0
  187. package/es/modules/relationship-diagram-config/providers/index.d.ts +5 -0
  188. package/es/modules/relationship-diagram-config/providers/index.mjs +5 -0
  189. package/es/modules/relationship-diagram-config/providers/reverse-node-provider/reverse-node-provider.d.ts +14 -0
  190. package/es/modules/relationship-diagram-config/providers/reverse-node-provider/reverse-node-provider.mjs +17 -0
  191. package/es/modules/relationship-diagram-config/providers/virtual-link-provider/virtual-link-provider.d.ts +16 -0
  192. package/es/modules/relationship-diagram-config/providers/virtual-link-provider/virtual-link-provider.mjs +26 -0
  193. package/es/modules/relationship-diagram-config/providers/virtual-node-provider/virtual-node-provider.d.ts +14 -0
  194. package/es/modules/relationship-diagram-config/providers/virtual-node-provider/virtual-node-provider.mjs +17 -0
  195. package/es/modules/relationship-diagram-config/relationship-diagram-config.controller.d.ts +119 -0
  196. package/es/modules/relationship-diagram-config/relationship-diagram-config.controller.mjs +199 -0
  197. package/es/modules/relationship-diagram-config/relationship-diagram-config.css +113 -0
  198. package/es/modules/relationship-diagram-config/relationship-diagram-config.d.ts +102 -0
  199. package/es/modules/relationship-diagram-config/relationship-diagram-config.mjs +104 -0
  200. package/es/modules/relationship-diagram-config/relationship-diagram-config.state.d.ts +44 -0
  201. package/es/modules/relationship-diagram-config/relationship-diagram-config.state.mjs +46 -0
  202. package/es/modules/relationship-diagram-config/utils/index.d.ts +1 -0
  203. package/es/modules/relationship-diagram-config/utils/register/register.d.ts +71 -0
  204. package/es/modules/relationship-diagram-config/utils/register/register.mjs +81 -0
  205. package/es/utils/recursive.mjs +1 -0
  206. package/package.json +10 -9
  207. package/dist/_plugin-vue_export-helper-59SbqtUR.js +0 -1
  208. package/dist/components-Dw_doMp_.js +0 -1
  209. package/dist/template-tzWsbHZE.js +0 -1
  210. package/es/components/label-design/panels/widget/controls/ImageData.vue_vue_type_style_index_0_scoped_3c4a9733_lang.css +0 -3
  211. package/es/components/paas-bpmn-log/hooks/useObserver.mjs +0 -46
  212. /package/dist/{JsBarcode-DlXSdlvD.js → JsBarcode-DY53cVJ6.js} +0 -0
  213. /package/dist/{cropper-tw7tUDDe.js → cropper-DK_hFgpO.js} +0 -0
  214. /package/dist/{icon-next-picker-B_S_yInJ.js → icon-next-picker-DYiHqnNR.js} +0 -0
  215. /package/dist/{objectSpread2-DxfE1S3_.js → objectSpread2-DARadIQB.js} +0 -0
  216. /package/dist/{overlayscrollbars-vue-DtKFrHnA.js → overlayscrollbars-vue-Df-3wShc.js} +0 -0
  217. /package/dist/{rich-editor-K2Pv0Uja.js → rich-editor-DVOriJH0.js} +0 -0
  218. /package/dist/{useMonacoEditor-BO2ALW-7.js → useMonacoEditor-DqSQTg7b.js} +0 -0
@@ -0,0 +1,135 @@
1
+ import { IRelationshipDiagramNode } from '../i-relationship-diagram-node/i-relationship-diagram-node';
2
+ /**
3
+ * 设计 json
4
+ *
5
+ * @author zhanghanrui
6
+ * @date 2024-06-29 17:06:51
7
+ * @export
8
+ * @interface IDesignJson
9
+ */
10
+ export interface IDesignJson {
11
+ /**
12
+ * 前置信息
13
+ *
14
+ * @author zhanghanrui
15
+ * @date 2024-06-29 17:06:58
16
+ * @type {IData}
17
+ */
18
+ before?: IData;
19
+ /**
20
+ * 节点信息
21
+ *
22
+ * @author zhanghanrui
23
+ * @date 2024-06-29 17:06:10
24
+ * @type {IRelationshipDiagramNode[]}
25
+ */
26
+ nodes: IRelationshipDiagramNode[];
27
+ /**
28
+ * 后置信息
29
+ *
30
+ * @author zhanghanrui
31
+ * @date 2024-06-29 17:06:08
32
+ * @type {IData}
33
+ */
34
+ after?: IData;
35
+ }
36
+ export interface INodeData {
37
+ /**
38
+ * 模型标识
39
+ *
40
+ * @author zhanghanrui
41
+ * @date 2024-06-29 17:06:38
42
+ * @type {string}
43
+ */
44
+ modelKey: string;
45
+ /**
46
+ * 模型类型
47
+ *
48
+ * @author zhanghanrui
49
+ * @date 2024-06-29 17:06:06
50
+ * @type {string}
51
+ */
52
+ modelCategory: string;
53
+ /**
54
+ * 属性标识
55
+ *
56
+ * @author zhanghanrui
57
+ * @date 2024-06-29 17:06:42
58
+ * @type {string}
59
+ */
60
+ fieldKey: string;
61
+ /**
62
+ * 节点方向
63
+ *
64
+ * @author zhanghanrui
65
+ * @date 2024-06-29 17:06:47
66
+ * @type {('forward' | 'backward' | '')}
67
+ */
68
+ direction: 'forward' | 'backward' | '';
69
+ }
70
+ /**
71
+ * 数据联动 ruleConfig 配置清单
72
+ *
73
+ * @author zhanghanrui
74
+ * @date 2024-06-29 17:06:29
75
+ * @export
76
+ * @interface IRuleConfig
77
+ */
78
+ export interface IRuleConfig {
79
+ /**
80
+ * 设计 json 配置
81
+ *
82
+ * @author zhanghanrui
83
+ * @date 2024-06-29 17:06:31
84
+ * @type {IDesignJson}
85
+ */
86
+ designJson: IDesignJson;
87
+ /**
88
+ * 是否强依赖
89
+ *
90
+ * @author zhanghanrui
91
+ * @date 2024-09-02 15:09:15
92
+ * @type {boolean}
93
+ */
94
+ strongDependence: boolean;
95
+ /**
96
+ * 主查字段名称
97
+ *
98
+ * @author zhanghanrui
99
+ * @date 2024-06-29 19:06:48
100
+ * @type {string}
101
+ */
102
+ modelKey: string;
103
+ /**
104
+ * 属性标识(不是所有场景都有)
105
+ *
106
+ * @author zhanghanrui
107
+ * @date 2024-07-05 11:07:25
108
+ * @type {string}
109
+ */
110
+ fieldId?: string;
111
+ /**
112
+ * 属性标识(不是所有场景都有)
113
+ *
114
+ * @author zhanghanrui
115
+ * @date 2024-06-29 17:06:47
116
+ * @type {string}
117
+ */
118
+ fieldKey?: string;
119
+ /**
120
+ * 属性名称
121
+ *
122
+ * @author zhanghanrui
123
+ * @date 2024-06-29 19:06:24
124
+ * @type {string}
125
+ */
126
+ fieldLabel?: string;
127
+ /**
128
+ * 给后台使用的 nodes 清单
129
+ *
130
+ * @author zhanghanrui
131
+ * @date 2024-06-29 17:06:41
132
+ * @type {INodeData[]}
133
+ */
134
+ nodes: INodeData[];
135
+ }
@@ -0,0 +1,6 @@
1
+ export type { ILinkProvider } from './i-link-provider/i-link-provider';
2
+ export type { INodeProvider } from './i-node-provider/i-node-provider';
3
+ export type { IRelationshipDiagramLink } from './i-relationship-diagram-link/i-relationship-diagram-link';
4
+ export type { IRelationshipDiagramNode } from './i-relationship-diagram-node/i-relationship-diagram-node';
5
+ export type { IRelationshipDiagramOptions } from './i-relationship-diagram-options/i-relationship-diagram-options';
6
+ export type { IRuleConfig } from './i-rule-config/i-rule-config';
@@ -0,0 +1,75 @@
1
+ import { IRelationshipDiagramLink } from './interface';
2
+ import { RelationshipDiagramConfigController } from './relationship-diagram-config.controller';
3
+ /**
4
+ * 连线控制器
5
+ *
6
+ * @author zhanghanrui
7
+ * @date 2024-06-25 14:06:19
8
+ * @export
9
+ * @class LinkController
10
+ */
11
+ export declare class LinkController {
12
+ protected readonly c: RelationshipDiagramConfigController;
13
+ constructor(c: RelationshipDiagramConfigController);
14
+ /**
15
+ * 创建连线
16
+ *
17
+ * @author zhanghanrui
18
+ * @date 2024-06-26 16:06:24
19
+ * @param {IData} data
20
+ * @return {*} {IRelationshipDiagramLink}
21
+ */
22
+ create(data: IData): IRelationshipDiagramLink;
23
+ /**
24
+ * 更新连线数据
25
+ *
26
+ * @author zhanghanrui
27
+ * @date 2024-06-25 14:06:51
28
+ * @param {IRelationshipDiagramLink} link
29
+ */
30
+ update(link: IRelationshipDiagramLink): void;
31
+ /**
32
+ * 获取连线数据
33
+ *
34
+ * @author zhanghanrui
35
+ * @date 2024-06-25 14:06:43
36
+ * @param {string} id
37
+ * @return {*} {(IRelationshipDiagramLink | null)}
38
+ */
39
+ get(id: string): IRelationshipDiagramLink | null;
40
+ /**
41
+ * 根据起始节点查找连线
42
+ *
43
+ * @author zhanghanrui
44
+ * @date 2024-06-25 14:06:19
45
+ * @param {string} source
46
+ * @return {*} {(IRelationshipDiagramLink | null)}
47
+ */
48
+ getBySource(source: string): IRelationshipDiagramLink | null;
49
+ /**
50
+ * 根据结束节点查找连线
51
+ *
52
+ * @author zhanghanrui
53
+ * @date 2024-06-25 14:06:50
54
+ * @param {string} target
55
+ * @return {*} {(IRelationshipDiagramLink | null)}
56
+ */
57
+ getByTarget(target: string): IRelationshipDiagramLink | null;
58
+ /**
59
+ * 删除连线数据,删除当前指定连线后所有数据
60
+ *
61
+ * @author zhanghanrui
62
+ * @date 2024-06-25 14:06:48
63
+ * @param {string} id
64
+ */
65
+ delete(id: string): void;
66
+ /**
67
+ * 清除已经绘制的连线
68
+ *
69
+ * @author zhanghanrui
70
+ * @date 2024-06-27 13:06:08
71
+ * @protected
72
+ * @param {IRelationshipDiagramLink[]} links
73
+ */
74
+ protected clearLinks(links: IRelationshipDiagramLink[]): void;
75
+ }
@@ -0,0 +1,121 @@
1
+ import { LinkType } from "./constant/index.mjs";
2
+ import "./relationship-diagram-config.controller.mjs";
3
+ import { uuid } from "@jsplumb/browser-ui";
4
+ //#region src/modules/relationship-diagram-config/link.controller.ts
5
+ /**
6
+ * 连线控制器
7
+ *
8
+ * @author zhanghanrui
9
+ * @date 2024-06-25 14:06:19
10
+ * @export
11
+ * @class LinkController
12
+ */
13
+ var LinkController = class {
14
+ c;
15
+ constructor(c) {
16
+ this.c = c;
17
+ }
18
+ /**
19
+ * 创建连线
20
+ *
21
+ * @author zhanghanrui
22
+ * @date 2024-06-26 16:06:24
23
+ * @param {IData} data
24
+ * @return {*} {IRelationshipDiagramLink}
25
+ */
26
+ create(data) {
27
+ const i = this.c.state.links.length;
28
+ const link = {
29
+ id: uuid(),
30
+ i,
31
+ type: LinkType.DEFAULT,
32
+ reverse: false,
33
+ return: (i + 1) % this.c.config.lineCount === 0,
34
+ startLine: Math.floor(i / 3) + 1,
35
+ dashed: false,
36
+ ...data
37
+ };
38
+ this.c.state.links.push(link);
39
+ setTimeout(() => {
40
+ this.c.connect(link);
41
+ }, 0);
42
+ return link;
43
+ }
44
+ /**
45
+ * 更新连线数据
46
+ *
47
+ * @author zhanghanrui
48
+ * @date 2024-06-25 14:06:51
49
+ * @param {IRelationshipDiagramLink} link
50
+ */
51
+ update(link) {
52
+ const data = this.get(link.id);
53
+ if (data) {
54
+ this.clearLinks([link]);
55
+ Object.assign(data, link);
56
+ this.c.connect(link);
57
+ }
58
+ }
59
+ /**
60
+ * 获取连线数据
61
+ *
62
+ * @author zhanghanrui
63
+ * @date 2024-06-25 14:06:43
64
+ * @param {string} id
65
+ * @return {*} {(IRelationshipDiagramLink | null)}
66
+ */
67
+ get(id) {
68
+ return this.c.state.links.find((link) => link.id === id) ?? null;
69
+ }
70
+ /**
71
+ * 根据起始节点查找连线
72
+ *
73
+ * @author zhanghanrui
74
+ * @date 2024-06-25 14:06:19
75
+ * @param {string} source
76
+ * @return {*} {(IRelationshipDiagramLink | null)}
77
+ */
78
+ getBySource(source) {
79
+ return this.c.state.links.find((link) => link.source === source) ?? null;
80
+ }
81
+ /**
82
+ * 根据结束节点查找连线
83
+ *
84
+ * @author zhanghanrui
85
+ * @date 2024-06-25 14:06:50
86
+ * @param {string} target
87
+ * @return {*} {(IRelationshipDiagramLink | null)}
88
+ */
89
+ getByTarget(target) {
90
+ return this.c.state.links.find((link) => link.target === target) ?? null;
91
+ }
92
+ /**
93
+ * 删除连线数据,删除当前指定连线后所有数据
94
+ *
95
+ * @author zhanghanrui
96
+ * @date 2024-06-25 14:06:48
97
+ * @param {string} id
98
+ */
99
+ delete(id) {
100
+ const i = this.c.state.links.findIndex((link) => link.id === id);
101
+ if (i !== -1) {
102
+ const links = this.c.state.links.splice(i, this.c.state.links.length);
103
+ this.clearLinks(links);
104
+ }
105
+ }
106
+ /**
107
+ * 清除已经绘制的连线
108
+ *
109
+ * @author zhanghanrui
110
+ * @date 2024-06-27 13:06:08
111
+ * @protected
112
+ * @param {IRelationshipDiagramLink[]} links
113
+ */
114
+ clearLinks(links) {
115
+ this.c.plumb.getConnections().forEach((item) => {
116
+ if (links.find((_) => item.data.id === _.id)) this.c.plumb.deleteConnection(item);
117
+ });
118
+ }
119
+ };
120
+ //#endregion
121
+ export { LinkController };
@@ -0,0 +1,102 @@
1
+ import { IRelationshipDiagramNode } from './interface';
2
+ import { RelationshipDiagramConfigController } from './relationship-diagram-config.controller';
3
+ import { CacheController } from './cache.controller';
4
+ /**
5
+ * 节点控制器
6
+ *
7
+ * @author zhanghanrui
8
+ * @date 2024-06-25 14:06:28
9
+ * @export
10
+ * @class NodeController
11
+ */
12
+ export declare class NodeController {
13
+ /**
14
+ * 节点切换缓存
15
+ *
16
+ * @author zhanghanrui
17
+ * @date 2024-06-30 12:06:00
18
+ * @type {CacheController}
19
+ */
20
+ readonly cache: CacheController;
21
+ protected readonly c: RelationshipDiagramConfigController;
22
+ constructor(c: RelationshipDiagramConfigController);
23
+ /**
24
+ * 创建节点
25
+ *
26
+ * @author zhanghanrui
27
+ * @date 2024-06-28 15:06:36
28
+ * @param {IData} data
29
+ * @param {IData} [link={}] 创建节点时会同步创建连线
30
+ * @return {*} {(IRelationshipDiagramNode | null)}
31
+ */
32
+ create(data: IData, link?: IData): IRelationshipDiagramNode | null;
33
+ /**
34
+ * 更新节点信息
35
+ *
36
+ * @author zhanghanrui
37
+ * @date 2024-06-29 15:06:40
38
+ * @param {IRelationshipDiagramNode} node
39
+ * @return {*} {void}
40
+ */
41
+ update(node: IRelationshipDiagramNode): void;
42
+ /**
43
+ * 获取节点数据
44
+ *
45
+ * @author zhanghanrui
46
+ * @date 2024-06-28 13:06:48
47
+ * @param {string} id
48
+ * @param {number} [offset=0]
49
+ * @param {boolean} [isClone=true]
50
+ * @return {*} {(IRelationshipDiagramNode | null)}
51
+ */
52
+ get(id: string, offset?: number, isClone?: boolean): IRelationshipDiagramNode | null;
53
+ /**
54
+ * 设置值,重新赋值一下,避免无法触发界面重绘
55
+ *
56
+ * @author zhanghanrui
57
+ * @date 2024-06-27 19:06:31
58
+ * @param {IRelationshipDiagramNode} node
59
+ */
60
+ set(node: IRelationshipDiagramNode): void;
61
+ /**
62
+ * 删除节点数据,会删除节点以及之后所有的节点数据
63
+ *
64
+ * @author zhanghanrui
65
+ * @date 2024-06-28 13:06:06
66
+ * @param {string} id
67
+ * @param {boolean} [deleteLine=true] 默认同时删除连线
68
+ */
69
+ delete(id: string, deleteLine?: boolean): void;
70
+ /**
71
+ * 节点绘制完毕
72
+ *
73
+ * @author zhanghanrui
74
+ * @date 2024-06-25 14:06:08
75
+ * @param {string} _id
76
+ */
77
+ mounted(_id: string): void;
78
+ /**
79
+ * 节点销毁
80
+ *
81
+ * @author zhanghanrui
82
+ * @date 2024-06-25 14:06:16
83
+ * @param {string} _id
84
+ */
85
+ unmounted(_id: string): void;
86
+ /**
87
+ * 设置节点
88
+ *
89
+ * @author zhanghanrui
90
+ * @date 2024-06-29 16:06:58
91
+ * @param {IRelationshipDiagramNode[]} nodes
92
+ */
93
+ setNodes(nodes: IRelationshipDiagramNode[], isSetFirst?: boolean): void;
94
+ /**
95
+ * 当前所有节点引用
96
+ *
97
+ * @author zhanghanrui
98
+ * @date 2024-06-30 12:06:41
99
+ * @return {*} {IRelationshipDiagramNode[]}
100
+ */
101
+ getNodes(): IRelationshipDiagramNode[];
102
+ }
@@ -0,0 +1,189 @@
1
+ import { LinkType, NodeType } from "./constant/index.mjs";
2
+ import { CacheController } from "./cache.controller.mjs";
3
+ import "./relationship-diagram-config.controller.mjs";
4
+ import { clone, uuid } from "@jsplumb/browser-ui";
5
+ //#region src/modules/relationship-diagram-config/node.controller.ts
6
+ /**
7
+ * 节点控制器
8
+ *
9
+ * @author zhanghanrui
10
+ * @date 2024-06-25 14:06:28
11
+ * @export
12
+ * @class NodeController
13
+ */
14
+ var NodeController = class {
15
+ /**
16
+ * 节点切换缓存
17
+ *
18
+ * @author zhanghanrui
19
+ * @date 2024-06-30 12:06:00
20
+ * @type {CacheController}
21
+ */
22
+ cache;
23
+ c;
24
+ constructor(c) {
25
+ this.c = c;
26
+ this.cache = new CacheController(c);
27
+ }
28
+ /**
29
+ * 创建节点
30
+ *
31
+ * @author zhanghanrui
32
+ * @date 2024-06-28 15:06:36
33
+ * @param {IData} data
34
+ * @param {IData} [link={}] 创建节点时会同步创建连线
35
+ * @return {*} {(IRelationshipDiagramNode | null)}
36
+ */
37
+ create(data, link = {}) {
38
+ if (this.c.config.max != null && this.c.config.max <= this.c.state.nodes.length) {
39
+ console.warn("节点数量已达到最大值");
40
+ return null;
41
+ }
42
+ if (this.c.config.reverseMax != null) {
43
+ if (this.c.state.nodes.filter((node) => node.type === NodeType.REVERSE).length >= this.c.config.reverseMax) {
44
+ console.warn("反向节点数量已达到最大值");
45
+ return null;
46
+ }
47
+ }
48
+ const node = {
49
+ id: uuid(),
50
+ type: NodeType.DEFAULT,
51
+ noSelectField: false,
52
+ reverse: false,
53
+ ...data
54
+ };
55
+ const beforeNode = this.c.state.nodes[this.c.state.nodes.length - 1];
56
+ this.c.state.nodes.push(node);
57
+ setTimeout(() => {
58
+ this.c.link.create({
59
+ source: link.reverse ? node.id : beforeNode.id,
60
+ target: link.reverse ? beforeNode.id : node.id,
61
+ ...link
62
+ });
63
+ }, 0);
64
+ return node;
65
+ }
66
+ /**
67
+ * 更新节点信息
68
+ *
69
+ * @author zhanghanrui
70
+ * @date 2024-06-29 15:06:40
71
+ * @param {IRelationshipDiagramNode} node
72
+ * @return {*} {void}
73
+ */
74
+ update(node) {
75
+ const data = this.get(node.id, 0, false);
76
+ if (data) this.set(Object.assign(data, node));
77
+ }
78
+ /**
79
+ * 获取节点数据
80
+ *
81
+ * @author zhanghanrui
82
+ * @date 2024-06-28 13:06:48
83
+ * @param {string} id
84
+ * @param {number} [offset=0]
85
+ * @param {boolean} [isClone=true]
86
+ * @return {*} {(IRelationshipDiagramNode | null)}
87
+ */
88
+ get(id, offset = 0, isClone = true) {
89
+ const i = this.c.state.nodes.findIndex((node) => node.id === id);
90
+ if (i !== -1 && this.c.state.nodes.length > i + offset) {
91
+ if (isClone) return clone(this.c.state.nodes[i + offset]);
92
+ return this.c.state.nodes[i + offset];
93
+ }
94
+ return null;
95
+ }
96
+ /**
97
+ * 设置值,重新赋值一下,避免无法触发界面重绘
98
+ *
99
+ * @author zhanghanrui
100
+ * @date 2024-06-27 19:06:31
101
+ * @param {IRelationshipDiagramNode} node
102
+ */
103
+ set(node) {
104
+ const i = this.c.state.nodes.findIndex((_) => _.id === node.id);
105
+ if (i !== -1) {
106
+ this.c.state.nodes[i] = node;
107
+ this.c.state.nodes = this.c.state.nodes;
108
+ }
109
+ }
110
+ /**
111
+ * 删除节点数据,会删除节点以及之后所有的节点数据
112
+ *
113
+ * @author zhanghanrui
114
+ * @date 2024-06-28 13:06:06
115
+ * @param {string} id
116
+ * @param {boolean} [deleteLine=true] 默认同时删除连线
117
+ */
118
+ delete(id, deleteLine = true) {
119
+ const i = this.c.state.nodes.findIndex((node) => node.id === id);
120
+ if (i !== -1) {
121
+ this.c.state.nodes.splice(i, this.c.state.nodes.length);
122
+ if (deleteLine) {
123
+ const deleteLink = this.c.link.getBySource(id);
124
+ if (deleteLink) this.c.link.delete(deleteLink.id);
125
+ const deleteReverseLink = this.c.link.getByTarget(id);
126
+ if (deleteReverseLink) this.c.link.delete(deleteReverseLink.id);
127
+ }
128
+ }
129
+ }
130
+ /**
131
+ * 节点绘制完毕
132
+ *
133
+ * @author zhanghanrui
134
+ * @date 2024-06-25 14:06:08
135
+ * @param {string} _id
136
+ */
137
+ mounted(_id) {
138
+ this.c.state.nodeCount += 1;
139
+ }
140
+ /**
141
+ * 节点销毁
142
+ *
143
+ * @author zhanghanrui
144
+ * @date 2024-06-25 14:06:16
145
+ * @param {string} _id
146
+ */
147
+ unmounted(_id) {
148
+ this.c.state.nodeCount -= 1;
149
+ }
150
+ /**
151
+ * 设置节点
152
+ *
153
+ * @author zhanghanrui
154
+ * @date 2024-06-29 16:06:58
155
+ * @param {IRelationshipDiagramNode[]} nodes
156
+ */
157
+ setNodes(nodes, isSetFirst = true) {
158
+ if (nodes.length > 0) {
159
+ if (isSetFirst) this.c.state.nodes.push(...nodes);
160
+ let before = nodes.shift();
161
+ if (!isSetFirst) this.c.state.nodes.push(...nodes);
162
+ nodes.forEach((_) => {
163
+ if (_.reverse) this.c.link.create({
164
+ source: _.id,
165
+ target: before.id,
166
+ reverse: true,
167
+ type: _.value ? LinkType.DEFAULT : LinkType.VIRTUAL
168
+ });
169
+ else this.c.link.create({
170
+ source: before.id,
171
+ target: _.id
172
+ });
173
+ before = _;
174
+ });
175
+ }
176
+ }
177
+ /**
178
+ * 当前所有节点引用
179
+ *
180
+ * @author zhanghanrui
181
+ * @date 2024-06-30 12:06:41
182
+ * @return {*} {IRelationshipDiagramNode[]}
183
+ */
184
+ getNodes() {
185
+ return this.c.state.nodes;
186
+ }
187
+ };
188
+ //#endregion
189
+ export { NodeController };
@@ -0,0 +1,23 @@
1
+ import { Endpoint, EndpointHandler, EndpointRepresentation, EndpointRepresentationParams } from '@jsplumb/browser-ui';
2
+ /**
3
+ * @public
4
+ */
5
+ export interface ArrowEndpointParams extends EndpointRepresentationParams {
6
+ /**
7
+ * 箭头指向
8
+ *
9
+ * @default 'right'
10
+ * @author zhanghanrui
11
+ * @date 2024-04-14 14:04:09
12
+ * @type {('left' | 'right')}
13
+ */
14
+ direction: 'left' | 'right';
15
+ }
16
+ export type ComputedArrowEndpoint = [number, number, number, number];
17
+ export declare class ArrowEndpoint extends EndpointRepresentation<ComputedArrowEndpoint> {
18
+ params?: ArrowEndpointParams;
19
+ constructor(endpoint: Endpoint, params?: ArrowEndpointParams);
20
+ static type: string;
21
+ type: string;
22
+ }
23
+ export declare const ArrowEndpointHandler: EndpointHandler<ArrowEndpoint, ComputedArrowEndpoint>;
@@ -0,0 +1,33 @@
1
+ import { EndpointRepresentation } from "@jsplumb/browser-ui";
2
+ //#region src/modules/relationship-diagram-config/plumb-plugin/arrow-endpoint.ts
3
+ var ArrowEndpoint = class ArrowEndpoint extends EndpointRepresentation {
4
+ params;
5
+ constructor(endpoint, params) {
6
+ super(endpoint, params);
7
+ this.params = params;
8
+ }
9
+ static type = "Arrow";
10
+ type = ArrowEndpoint.type;
11
+ };
12
+ var ArrowEndpointHandler = {
13
+ type: ArrowEndpoint.type,
14
+ cls: ArrowEndpoint,
15
+ compute: (ep, anchorPoint, _orientation, _endpointStyle) => {
16
+ const { direction } = ep.params || {};
17
+ ep.x = anchorPoint.curX - (direction === "left" ? 0 : 4);
18
+ ep.y = anchorPoint.curY - 2.6;
19
+ ep.w = 6;
20
+ ep.h = 6;
21
+ return [
22
+ anchorPoint.curX,
23
+ anchorPoint.curY,
24
+ 0,
25
+ 0
26
+ ];
27
+ },
28
+ getParams: (_ep) => {
29
+ return {};
30
+ }
31
+ };
32
+ //#endregion
33
+ export { ArrowEndpoint, ArrowEndpointHandler };
@@ -0,0 +1 @@
1
+ export declare const register: () => void;