@gct-paas/core-web 0.1.6-dev.4 → 0.1.6-dev.6

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 (144) hide show
  1. package/dist/ColorPicker-DGQQb8I7.js +1 -0
  2. package/dist/{_plugin-vue_export-helper-59SbqtUR.js → _plugin-vue_export-helper-C9hXqKoS.js} +1 -1
  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-BTqXEIZI.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-1ZQd8Z1w.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/label-design/modal/template.vue_vue_type_script_setup_true_lang.mjs +2 -2
  27. package/es/components/label-design/panels/modals/diff-modal.vue_vue_type_script_setup_true_lang.mjs +2 -2
  28. package/es/components/label-design/panels/panel.vue_vue_type_script_setup_true_lang.mjs +1 -1
  29. package/es/components/label-design/panels/widget/controls/labelTemplate.vue.mjs +2 -2
  30. package/es/components/label-design/panels/widget/controls/labelTemplate.vue_vue_type_script_setup_true_lang.mjs +1 -16
  31. package/es/components/label-design/panels/widget/controls/labelTemplate.vue_vue_type_style_index_0_scoped_c628d318_lang.css +10 -0
  32. package/es/components/label-design/stage/stage.vue.d.ts +9 -0
  33. package/es/components/label-design/stage/stage.vue.mjs +2 -2
  34. package/es/components/label-design/stage/stage.vue_vue_type_script_setup_true_lang.mjs +2 -1
  35. 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
  36. package/es/components/layout/view-container/view-container.d.ts +1 -11
  37. package/es/components/layout/view-container/view-container.mjs +10 -14
  38. package/es/create-app-vue.mjs +4 -2
  39. package/es/index.d.ts +4 -1
  40. package/es/index.mjs +31 -25
  41. package/es/modules/category/category-modal.vue.d.ts +11 -0
  42. package/es/modules/category/category-modal.vue.mjs +7 -0
  43. package/es/modules/category/category-modal.vue_vue_type_script_setup_true_name_category-modal_lang.mjs +53 -0
  44. package/es/modules/category/category-modal.vue_vue_type_style_index_0_scoped_b560615c_lang.css +67 -0
  45. package/es/modules/category/category-sider.vue.d.ts +337 -0
  46. package/es/modules/category/category-sider.vue.mjs +7 -0
  47. package/es/modules/category/category-sider.vue_vue_type_script_setup_true_name_category-sider_lang.mjs +239 -0
  48. package/es/modules/category/category-sider.vue_vue_type_style_index_0_scoped_5af8c1ba_lang.css +211 -0
  49. package/es/modules/category/hooks/useCategory.d.ts +20 -0
  50. package/es/modules/category/hooks/useCategory.mjs +139 -0
  51. package/es/modules/category/index.d.ts +2 -0
  52. package/es/modules/category/index.mjs +2 -0
  53. package/es/modules/category/type.d.ts +8 -0
  54. package/es/modules/color-picker/src/color-editor.vue.mjs +1 -1
  55. package/es/modules/gct-form/controller/form-item-basic/form-item-basic.controller.mjs +2 -0
  56. package/es/modules/gct-form/controller/gct-form/gct-form.controller.mjs +1 -0
  57. package/es/modules/gct-table/controller/gct-table/gct-table.controller.mjs +1 -0
  58. package/es/modules/gct-table/controller/table-item/table-item.controller.mjs +2 -0
  59. package/es/modules/gct-table/controller/table-row/table-row.controller.mjs +3 -0
  60. package/es/modules/global-modal/src/components/ModalWrapper.vue_vue_type_script_lang.mjs +1 -4
  61. package/es/modules/print-tmpl/icon-print-folder.svg.mjs +4 -0
  62. package/es/modules/print-tmpl/icon-print-printer.svg.mjs +4 -0
  63. package/es/modules/print-tmpl/index.d.ts +2 -0
  64. package/es/modules/print-tmpl/index.mjs +1 -0
  65. package/es/modules/print-tmpl/print-tmpl-modal.vue.d.ts +31 -0
  66. package/es/modules/print-tmpl/print-tmpl-modal.vue.mjs +7 -0
  67. package/es/modules/print-tmpl/print-tmpl-modal.vue_vue_type_script_setup_true_name_print-tmpl-modal_lang.mjs +593 -0
  68. package/es/modules/print-tmpl/print-tmpl-modal.vue_vue_type_style_index_0_scoped_c60841b8_lang.css +143 -0
  69. package/es/modules/relationship-diagram-config/cache.controller.d.ts +70 -0
  70. package/es/modules/relationship-diagram-config/cache.controller.mjs +128 -0
  71. package/es/modules/relationship-diagram-config/components/diagram-config-item/diagram-config-item.css +123 -0
  72. package/es/modules/relationship-diagram-config/components/diagram-config-item/diagram-config-item.d.ts +381 -0
  73. package/es/modules/relationship-diagram-config/components/diagram-config-item/diagram-config-item.mjs +98 -0
  74. package/es/modules/relationship-diagram-config/components/diagram-config-item-container/diagram-config-item-container.css +71 -0
  75. package/es/modules/relationship-diagram-config/components/diagram-config-item-container/diagram-config-item-container.d.ts +28 -0
  76. package/es/modules/relationship-diagram-config/components/diagram-config-item-container/diagram-config-item-container.mjs +53 -0
  77. package/es/modules/relationship-diagram-config/components/diagram-config-item-info/diagram-config-item-info.d.ts +27 -0
  78. package/es/modules/relationship-diagram-config/components/diagram-config-item-info/diagram-config-item-info.mjs +2 -0
  79. package/es/modules/relationship-diagram-config/components/diagram-config-item-reverse/diagram-config-item-reverse.css +107 -0
  80. package/es/modules/relationship-diagram-config/components/diagram-config-item-reverse/diagram-config-item-reverse.d.ts +34 -0
  81. package/es/modules/relationship-diagram-config/components/diagram-config-item-reverse/diagram-config-item-reverse.mjs +198 -0
  82. package/es/modules/relationship-diagram-config/components/diagram-config-item-virtual/diagram-config-item-virtual.css +68 -0
  83. package/es/modules/relationship-diagram-config/components/diagram-config-item-virtual/diagram-config-item-virtual.d.ts +31 -0
  84. package/es/modules/relationship-diagram-config/components/diagram-config-item-virtual/diagram-config-item-virtual.mjs +53 -0
  85. package/es/modules/relationship-diagram-config/components/index.d.ts +5 -0
  86. package/es/modules/relationship-diagram-config/components/index.mjs +5 -0
  87. package/es/modules/relationship-diagram-config/constant/index.d.ts +72 -0
  88. package/es/modules/relationship-diagram-config/constant/index.mjs +70 -0
  89. package/es/modules/relationship-diagram-config/hooks/index.d.ts +10 -0
  90. package/es/modules/relationship-diagram-config/hooks/index.mjs +19 -0
  91. package/es/modules/relationship-diagram-config/index.d.ts +6 -0
  92. package/es/modules/relationship-diagram-config/index.mjs +28 -0
  93. package/es/modules/relationship-diagram-config/interface/i-link-provider/i-link-provider.d.ts +57 -0
  94. package/es/modules/relationship-diagram-config/interface/i-node-provider/i-node-provider.d.ts +18 -0
  95. package/es/modules/relationship-diagram-config/interface/i-relationship-diagram-link/i-relationship-diagram-link.d.ts +80 -0
  96. package/es/modules/relationship-diagram-config/interface/i-relationship-diagram-node/i-relationship-diagram-node.d.ts +82 -0
  97. package/es/modules/relationship-diagram-config/interface/i-relationship-diagram-options/i-relationship-diagram-options.d.ts +51 -0
  98. package/es/modules/relationship-diagram-config/interface/i-rule-config/i-rule-config.d.ts +135 -0
  99. package/es/modules/relationship-diagram-config/interface/index.d.ts +6 -0
  100. package/es/modules/relationship-diagram-config/link.controller.d.ts +75 -0
  101. package/es/modules/relationship-diagram-config/link.controller.mjs +121 -0
  102. package/es/modules/relationship-diagram-config/node.controller.d.ts +102 -0
  103. package/es/modules/relationship-diagram-config/node.controller.mjs +189 -0
  104. package/es/modules/relationship-diagram-config/plumb-plugin/arrow-endpoint.d.ts +23 -0
  105. package/es/modules/relationship-diagram-config/plumb-plugin/arrow-endpoint.mjs +33 -0
  106. package/es/modules/relationship-diagram-config/plumb-plugin/blank-endpoint-renderer.d.ts +1 -0
  107. package/es/modules/relationship-diagram-config/plumb-plugin/blank-endpoint-renderer.mjs +27 -0
  108. package/es/modules/relationship-diagram-config/plumb-plugin/index.d.ts +3 -0
  109. package/es/modules/relationship-diagram-config/plumb-plugin/index.mjs +2 -0
  110. package/es/modules/relationship-diagram-config/providers/default-link-provider/default-link-provider.css +132 -0
  111. package/es/modules/relationship-diagram-config/providers/default-link-provider/default-link-provider.d.ts +21 -0
  112. package/es/modules/relationship-diagram-config/providers/default-link-provider/default-link-provider.mjs +184 -0
  113. package/es/modules/relationship-diagram-config/providers/default-node-provider/default-node-provider.d.ts +14 -0
  114. package/es/modules/relationship-diagram-config/providers/default-node-provider/default-node-provider.mjs +17 -0
  115. package/es/modules/relationship-diagram-config/providers/index.d.ts +5 -0
  116. package/es/modules/relationship-diagram-config/providers/index.mjs +5 -0
  117. package/es/modules/relationship-diagram-config/providers/reverse-node-provider/reverse-node-provider.d.ts +14 -0
  118. package/es/modules/relationship-diagram-config/providers/reverse-node-provider/reverse-node-provider.mjs +17 -0
  119. package/es/modules/relationship-diagram-config/providers/virtual-link-provider/virtual-link-provider.d.ts +16 -0
  120. package/es/modules/relationship-diagram-config/providers/virtual-link-provider/virtual-link-provider.mjs +26 -0
  121. package/es/modules/relationship-diagram-config/providers/virtual-node-provider/virtual-node-provider.d.ts +14 -0
  122. package/es/modules/relationship-diagram-config/providers/virtual-node-provider/virtual-node-provider.mjs +17 -0
  123. package/es/modules/relationship-diagram-config/relationship-diagram-config.controller.d.ts +119 -0
  124. package/es/modules/relationship-diagram-config/relationship-diagram-config.controller.mjs +199 -0
  125. package/es/modules/relationship-diagram-config/relationship-diagram-config.css +113 -0
  126. package/es/modules/relationship-diagram-config/relationship-diagram-config.d.ts +102 -0
  127. package/es/modules/relationship-diagram-config/relationship-diagram-config.mjs +104 -0
  128. package/es/modules/relationship-diagram-config/relationship-diagram-config.state.d.ts +44 -0
  129. package/es/modules/relationship-diagram-config/relationship-diagram-config.state.mjs +46 -0
  130. package/es/modules/relationship-diagram-config/utils/index.d.ts +1 -0
  131. package/es/modules/relationship-diagram-config/utils/register/register.d.ts +71 -0
  132. package/es/modules/relationship-diagram-config/utils/register/register.mjs +81 -0
  133. package/es/utils/recursive.mjs +1 -0
  134. package/package.json +10 -9
  135. package/dist/components-4-8OfvJi.js +0 -1
  136. package/dist/template-Cf-wq8-9.js +0 -1
  137. package/es/components/label-design/panels/widget/controls/labelTemplate.vue_vue_type_style_index_0_scoped_992e00bb_lang.css +0 -10
  138. /package/dist/{JsBarcode-DlXSdlvD.js → JsBarcode-DY53cVJ6.js} +0 -0
  139. /package/dist/{cropper-tw7tUDDe.js → cropper-DK_hFgpO.js} +0 -0
  140. /package/dist/{icon-next-picker-B_S_yInJ.js → icon-next-picker-DYiHqnNR.js} +0 -0
  141. /package/dist/{objectSpread2-DxfE1S3_.js → objectSpread2-DARadIQB.js} +0 -0
  142. /package/dist/{overlayscrollbars-vue-DtKFrHnA.js → overlayscrollbars-vue-Df-3wShc.js} +0 -0
  143. /package/dist/{rich-editor-K2Pv0Uja.js → rich-editor-DVOriJH0.js} +0 -0
  144. /package/dist/{useMonacoEditor-BO2ALW-7.js → useMonacoEditor-DqSQTg7b.js} +0 -0
@@ -0,0 +1,143 @@
1
+ .gct-print-tmpl-modal[data-v-c60841b8] {
2
+ height: 100%;
3
+ overflow: hidden;
4
+ }
5
+ .gct-print-tmpl-modal[data-v-c60841b8] .ant-tabs-nav {
6
+ margin-bottom: 0 !important;
7
+ }
8
+ .gct-print-tmpl-modal[data-v-c60841b8]
9
+ .vxe-table--render-default .is--checked.vxe-cell--radio .vxe-radio--icon
10
+ {
11
+ color: var(--ant-primary-color);
12
+ }
13
+ .gct-print-tmpl-modal[data-v-c60841b8] .ant-form .ant-form-item-label {
14
+ padding: 0;
15
+ }
16
+ .gct-print-tmpl-modal[data-v-c60841b8] .ant-form .ant-form-item .ant-form-item-label > label::after {
17
+ display: block;
18
+ }
19
+ .gct-print-tmpl-modal .gct-print-tmpl-modal-wrap[data-v-c60841b8] {
20
+ display: flex;
21
+ height: 1px;
22
+ }
23
+ .gct-print-tmpl-modal .gct-print-tmpl-modal-left[data-v-c60841b8] {
24
+ width: 220px;
25
+ }
26
+ .gct-print-tmpl-modal .gct-print-tmpl-modal-left.btw-visible .gct-category-sider[data-v-c60841b8] {
27
+ border-top: none;
28
+ border-bottom: none;
29
+ border-left: none;
30
+ }
31
+ .gct-print-tmpl-modal .gct-print-tmpl-modal-left.btw-visible .gct-category-sider[data-v-c60841b8] .gct-category-sider__search-container {
32
+ padding-left: 8px !important;
33
+ }
34
+ .gct-print-tmpl-modal .gct-print-tmpl-modal-left[data-v-c60841b8] .gct-category-sider {
35
+ border-radius: 4px 0 0 4px;
36
+ }
37
+ .gct-print-tmpl-modal .gct-print-tmpl-modal-left[data-v-c60841b8] .gct-category-sider .gct-category-sider__search-container {
38
+ padding: 12px 16px !important;
39
+ border-top: none;
40
+ }
41
+ .gct-print-tmpl-modal .gct-print-tmpl-modal-left[data-v-c60841b8] .gct-category-sider .gct-category-sider__search-container .gct-category-sider__search-input {
42
+ padding-left: 10px;
43
+ border: 1px solid #d9d9d9 !important;
44
+ }
45
+ .gct-print-tmpl-modal .gct-print-tmpl-modal-left[data-v-c60841b8] .gct-category-sider .gct-category-sider__search-container .gct-category-sider__search-input:hover {
46
+ border-color: var(--ant-primary-5) !important;
47
+ }
48
+ .gct-print-tmpl-modal .gct-print-tmpl-modal-left[data-v-c60841b8] .gct-category-sider .gct-category-sider__search-container .ant-input-prefix {
49
+ margin-right: 8px;
50
+ color: #606266 !important;
51
+ }
52
+ .gct-print-tmpl-modal .gct-print-tmpl-modal-left[data-v-c60841b8] .gct-category-sider .gct-category-sider__search-container .ant-input-affix-wrapper {
53
+ color: #606266;
54
+ }
55
+ .gct-print-tmpl-modal .gct-print-tmpl-modal-left[data-v-c60841b8] .gct-category-sider .gct-category-sider__tree-container {
56
+ padding: 0;
57
+ }
58
+ .gct-print-tmpl-modal .gct-print-tmpl-modal-left[data-v-c60841b8] .gct-category-sider .gct-category-sider__tree .ant-tree-treenode {
59
+ margin-bottom: 0;
60
+ border-radius: 0;
61
+ }
62
+ .gct-print-tmpl-modal .gct-print-tmpl-modal-right[data-v-c60841b8] {
63
+ width: calc(100% - 220px);
64
+ border: 1px solid #eaedf1;
65
+ border-left-color: transparent;
66
+ border-radius: 0 4px 4px 0;
67
+ }
68
+ .gct-print-tmpl-modal .gct-print-tmpl-modal-right.btw-visible[data-v-c60841b8] {
69
+ width: 100%;
70
+ border: none;
71
+ padding-right: 8px;
72
+ }
73
+ .gct-print-tmpl-modal .gct-print-tmpl-modal-right[data-v-c60841b8] .ant-form {
74
+ padding-bottom: 12px;
75
+ }
76
+ .gct-print-tmpl-modal .gct-print-tmpl-modal-right[data-v-c60841b8] .ant-form .ant-form-item {
77
+ margin-bottom: 0;
78
+ padding: 0;
79
+ }
80
+ .gct-print-tmpl-modal .gct-print-tmpl-modal-right[data-v-c60841b8] .ant-form .ant-form-item .gct-print-tmpl-input {
81
+ border: 1px solid #d9d9d9 !important;
82
+ }
83
+ .gct-print-tmpl-modal .gct-print-tmpl-modal-right[data-v-c60841b8] .ant-form .ant-form-item .gct-print-tmpl-input:hover {
84
+ border-color: var(--ant-primary-5) !important;
85
+ }
86
+ .gct-print-tmpl-modal .gct-print-tmpl-modal-right[data-v-c60841b8] .ant-form .ant-form-item .ant-input-prefix {
87
+ margin-right: 8px;
88
+ color: #606266 !important;
89
+ }
90
+ .gct-print-tmpl-modal .gct-print-tmpl-modal-right[data-v-c60841b8] .ant-form .ant-form-item .ant-input-affix-wrapper {
91
+ color: #606266;
92
+ line-height: 22px;
93
+ }
94
+ .gct-print-tmpl-modal .gct-print-tmpl-modal-right[data-v-c60841b8] .ant-select .ant-select-selector {
95
+ border: 1px solid #d9d9d9 !important;
96
+ }
97
+ .gct-print-tmpl-modal .gct-print-tmpl-modal-right[data-v-c60841b8] .ant-select .ant-select-selector:hover {
98
+ border-color: var(--ant-primary-5) !important;
99
+ }
100
+ .gct-print-tmpl-modal .gct-print-tmpl-modal-right .print-tmpl-vxe-table-wrapper[data-v-c60841b8] {
101
+ display: flex;
102
+ flex-direction: column;
103
+ flex: 1;
104
+ overflow: hidden;
105
+ }
106
+ .gct-print-tmpl-modal .gct-print-tmpl-modal-right .print-tmpl-vxe-table-wrapper .print-tmpl-vxe-table-area[data-v-c60841b8] {
107
+ flex: 1;
108
+ overflow: hidden;
109
+ }
110
+ .vxetable[data-v-c60841b8] {
111
+ --vxe-table-row-hover-radio-checked-background-color: #e6eeff;
112
+ --vxe-table-row-radio-checked-background-color: #e6eeff;
113
+ --vxe-table-row-checkbox-checked-background-color: #e6eeff;
114
+ --vxe-table-row-hover-checkbox-checked-background-color: #e6eeff;
115
+ }
116
+ [data-v-c60841b8] .vxe-table--render-default.border--default .vxe-header--column {
117
+ padding: 11px 0;
118
+ }
119
+ [data-v-c60841b8] .vxe-table--render-default .vxe-body--column.col--ellipsis {
120
+ height: 44px;
121
+ }
122
+ [data-v-c60841b8] .vxe-table--render-default .vxe-cell {
123
+ padding-left: 16px !important;
124
+ padding-right: 16px !important;
125
+ }
126
+ .btw-label-tag[data-v-c60841b8] {
127
+ margin: 0 4px 0 5px;
128
+ padding: 2px 6px;
129
+ font-size: 12px;
130
+ border-radius: 4px;
131
+ border-width: 1px;
132
+ border-style: solid;
133
+ }
134
+ .btw-label-tag.common[data-v-c60841b8] {
135
+ color: #1990ff;
136
+ background: #e8f5ff;
137
+ border-color: #c0dbff;
138
+ }
139
+ .btw-label-tag.local[data-v-c60841b8] {
140
+ color: #5e6b7f;
141
+ background: #f5f7fa;
142
+ border-color: #e4e9f2;
143
+ }
@@ -0,0 +1,70 @@
1
+ import { IRelationshipDiagramNode } from './interface';
2
+ import { RelationshipDiagramConfigController } from './relationship-diagram-config.controller';
3
+ /**
4
+ * 所有的缓存操作,目前均会从
5
+ *
6
+ * @author zhanghanrui
7
+ * @date 2024-06-30 11:06:52
8
+ * @export
9
+ * @class CacheController
10
+ */
11
+ export declare class CacheController {
12
+ protected c: RelationshipDiagramConfigController;
13
+ /**
14
+ * 正向节点的缓存
15
+ *
16
+ * @author zhanghanrui
17
+ * @date 2024-06-30 11:06:15
18
+ * @protected
19
+ * @type {Map<string, IRelationshipDiagramNode[]>}
20
+ */
21
+ protected nodeCache: Map<string, IRelationshipDiagramNode[]>;
22
+ /**
23
+ * 反转节点的缓存
24
+ *
25
+ * @author zhanghanrui
26
+ * @date 2024-06-30 11:06:28
27
+ * @protected
28
+ * @type {Map<string, IRelationshipDiagramNode[]>}
29
+ */
30
+ protected reverseNodeCache: Map<string, IRelationshipDiagramNode[]>;
31
+ constructor(c: RelationshipDiagramConfigController);
32
+ /**
33
+ * 清空指定节点后的所有数据并进行备份
34
+ *
35
+ * @author zhanghanrui
36
+ * @date 2024-06-30 12:06:00
37
+ * @param {IRelationshipDiagramNode} node 正向节点,清空属性之前的数据
38
+ * @return {*} {boolean} 表示是否有后续节点被清空和缓存
39
+ */
40
+ clear(node: IRelationshipDiagramNode): boolean;
41
+ /**
42
+ * 根据指定节点恢复缓存的后续节点
43
+ *
44
+ * @author zhanghanrui
45
+ * @date 2024-06-30 12:06:24
46
+ * @param {IRelationshipDiagramNode} node 重新选择属性后的节点数据
47
+ * @return {*} {boolean} 有无数据恢复
48
+ */
49
+ reset(node: IRelationshipDiagramNode): boolean;
50
+ /**
51
+ * 清空指定节点后的所有数据并进行备份,备份包含节点和后续节点
52
+ *
53
+ * @author zhanghanrui
54
+ * @date 2024-06-30 12:06:25
55
+ * @param {IRelationshipDiagramNode} node 反向节点,修改前包含字段的节点
56
+ * @param {string} [prefix='']
57
+ * @return {*} {boolean} 表示是否有后续节点被清空和缓存
58
+ */
59
+ reverseClear(node: IRelationshipDiagramNode, prefix?: string): boolean;
60
+ /**
61
+ * 回填反向节点的缓存
62
+ *
63
+ * @author zhanghanrui
64
+ * @date 2024-06-30 12:06:20
65
+ * @param {IRelationshipDiagramNode} node 修改后带字段的反向节点
66
+ * @param {string} [prefix='']
67
+ * @return {*} {boolean} 是否后后续节点恢复
68
+ */
69
+ reverseReset(node: IRelationshipDiagramNode, prefix?: string): boolean;
70
+ }
@@ -0,0 +1,128 @@
1
+ import "./relationship-diagram-config.controller.mjs";
2
+ import { cloneDeep } from "lodash-es";
3
+ //#region src/modules/relationship-diagram-config/cache.controller.ts
4
+ /**
5
+ * 所有的缓存操作,目前均会从
6
+ *
7
+ * @author zhanghanrui
8
+ * @date 2024-06-30 11:06:52
9
+ * @export
10
+ * @class CacheController
11
+ */
12
+ var CacheController = class {
13
+ c;
14
+ /**
15
+ * 正向节点的缓存
16
+ *
17
+ * @author zhanghanrui
18
+ * @date 2024-06-30 11:06:15
19
+ * @protected
20
+ * @type {Map<string, IRelationshipDiagramNode[]>}
21
+ */
22
+ nodeCache = /* @__PURE__ */ new Map();
23
+ /**
24
+ * 反转节点的缓存
25
+ *
26
+ * @author zhanghanrui
27
+ * @date 2024-06-30 11:06:28
28
+ * @protected
29
+ * @type {Map<string, IRelationshipDiagramNode[]>}
30
+ */
31
+ reverseNodeCache = /* @__PURE__ */ new Map();
32
+ constructor(c) {
33
+ this.c = c;
34
+ }
35
+ /**
36
+ * 清空指定节点后的所有数据并进行备份
37
+ *
38
+ * @author zhanghanrui
39
+ * @date 2024-06-30 12:06:00
40
+ * @param {IRelationshipDiagramNode} node 正向节点,清空属性之前的数据
41
+ * @return {*} {boolean} 表示是否有后续节点被清空和缓存
42
+ */
43
+ clear(node) {
44
+ const nextNode = this.c.node.get(node.id, 1);
45
+ if (nextNode) {
46
+ const key = `${node.id}:${node.value}`;
47
+ const i = this.c.node.getNodes().findIndex((n) => n.id === node.id);
48
+ const nodes = this.c.state.nodes.slice(i + 1, this.c.state.nodes.length);
49
+ if (nodes.length > 0) {
50
+ this.nodeCache.set(key, cloneDeep(nodes));
51
+ this.c.node.delete(nextNode.id);
52
+ return true;
53
+ }
54
+ }
55
+ return false;
56
+ }
57
+ /**
58
+ * 根据指定节点恢复缓存的后续节点
59
+ *
60
+ * @author zhanghanrui
61
+ * @date 2024-06-30 12:06:24
62
+ * @param {IRelationshipDiagramNode} node 重新选择属性后的节点数据
63
+ * @return {*} {boolean} 有无数据恢复
64
+ */
65
+ reset(node) {
66
+ if (node.value) {
67
+ const key = `${node.id}:${node.value}`;
68
+ if (this.nodeCache.has(key)) {
69
+ const nodes = this.nodeCache.get(key);
70
+ if (nodes && nodes.length > 0) {
71
+ this.c.node.setNodes([node, ...nodes], false);
72
+ this.nodeCache.delete(key);
73
+ return true;
74
+ }
75
+ }
76
+ }
77
+ return false;
78
+ }
79
+ /**
80
+ * 清空指定节点后的所有数据并进行备份,备份包含节点和后续节点
81
+ *
82
+ * @author zhanghanrui
83
+ * @date 2024-06-30 12:06:25
84
+ * @param {IRelationshipDiagramNode} node 反向节点,修改前包含字段的节点
85
+ * @param {string} [prefix='']
86
+ * @return {*} {boolean} 表示是否有后续节点被清空和缓存
87
+ */
88
+ reverseClear(node, prefix = "") {
89
+ const key = `${prefix}${node.id}${node.modelKey ? `:${node.modelKey}` : ""}`;
90
+ const nextNode = this.c.node.get(node.id, 1);
91
+ if (nextNode) {
92
+ const i = this.c.node.getNodes().findIndex((n) => n.id === node.id);
93
+ const nodes = this.c.state.nodes.slice(i + 1, this.c.state.nodes.length);
94
+ if (nodes.length > 0) {
95
+ this.reverseNodeCache.set(key, [cloneDeep(node), ...cloneDeep(nodes)]);
96
+ this.c.node.delete(nextNode.id);
97
+ return true;
98
+ }
99
+ } else if (node.modelKey && node.value) this.reverseNodeCache.set(key, [cloneDeep(node)]);
100
+ return false;
101
+ }
102
+ /**
103
+ * 回填反向节点的缓存
104
+ *
105
+ * @author zhanghanrui
106
+ * @date 2024-06-30 12:06:20
107
+ * @param {IRelationshipDiagramNode} node 修改后带字段的反向节点
108
+ * @param {string} [prefix='']
109
+ * @return {*} {boolean} 是否后后续节点恢复
110
+ */
111
+ reverseReset(node, prefix = "") {
112
+ const key = `${prefix}${node.id}${node.modelKey ? `:${node.modelKey}` : ""}`;
113
+ if (this.reverseNodeCache.has(key)) {
114
+ const nodes = cloneDeep(this.reverseNodeCache.get(key));
115
+ if (nodes.length > 0) {
116
+ const first = nodes[0];
117
+ if (first.modelKey !== node.modelKey) return false;
118
+ this.c.node.update(first);
119
+ this.c.node.setNodes(nodes, false);
120
+ this.reverseNodeCache.delete(key);
121
+ return true;
122
+ }
123
+ }
124
+ return false;
125
+ }
126
+ };
127
+ //#endregion
128
+ export { CacheController };
@@ -0,0 +1,123 @@
1
+ @charset "UTF-8";
2
+ /* stylelint-disable scss/no-global-function-names */
3
+ /* bem('block', 'element', 'modifier') => 'ibiz-block__element--modifier' */
4
+ /**
5
+ * 定义 Block 块
6
+ * @param {String} $block - Block 块名称
7
+ * @example
8
+ * @include b('button') {
9
+ * padding: 10px;
10
+ * }
11
+ */
12
+ /**
13
+ * 定义 Element 元素
14
+ * @param {String|List} $element - Element 元素名称,支持单个或多个
15
+ * @example
16
+ * @include b('button') {
17
+ * @include e('text') {
18
+ * color: #000;
19
+ * }
20
+ * }
21
+ * // 或传入多个元素
22
+ * @include b('button') {
23
+ * @include e(('text', 'icon')) {
24
+ * margin: 5px;
25
+ * }
26
+ * }
27
+ */
28
+ /**
29
+ * 定义 Modifier 修饰符
30
+ * @param {String|List} $modifier - Modifier 修饰符名称,支持单个或多个
31
+ * @example
32
+ * @include b('button') {
33
+ * @include m('primary') {
34
+ * background: blue;
35
+ * }
36
+ * }
37
+ * // 或传入多个修饰符
38
+ * @include b('button') {
39
+ * @include m(('primary', 'large')) {
40
+ * background: blue;
41
+ * font-size: 16px;
42
+ * }
43
+ * }
44
+ */
45
+ /**
46
+ * 定义状态选择器
47
+ * @param {String} $state - 状态名称
48
+ * @example
49
+ * @include b('button') {
50
+ * @include when('disabled') {
51
+ * opacity: 0.5;
52
+ * }
53
+ * }
54
+ */
55
+ /**
56
+ * 深色主题样式
57
+ * @param {String} $block - Block 块名称
58
+ * @example
59
+ * @include dark('button') {
60
+ * background: #333;
61
+ * color: #fff;
62
+ * }
63
+ */
64
+ /* stylelint-disable scss/no-global-function-names */
65
+ .gct-diagram-config-item {
66
+ width: 100%;
67
+ height: 100%;
68
+ padding: 8px 12px;
69
+ border: 1px solid #E8EBF0;
70
+ border-radius: 4px;
71
+ box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.06);
72
+ }
73
+ .gct-diagram-config-item .ant-select {
74
+ width: 100%;
75
+ }
76
+ .gct-diagram-config-item__end {
77
+ position: relative;
78
+ width: 100%;
79
+ height: 100%;
80
+ font-size: 14px;
81
+ color: #F54547;
82
+ }
83
+ .gct-diagram-config-item__end--line {
84
+ position: absolute;
85
+ top: 50%;
86
+ right: 0;
87
+ left: 0;
88
+ border-top: 1px dashed #F54547;
89
+ }
90
+
91
+ .gct-diagram-config-item__end--label {
92
+ position: absolute;
93
+ top: calc(50% - 11px);
94
+ left: calc(50% - 18px);
95
+ z-index: 1;
96
+ width: 36px;
97
+ text-align: center;
98
+ background-color: #fff;
99
+ }
100
+
101
+ .gct-diagram-config-item-title {
102
+ height: 22px;
103
+ margin-bottom: 9px;
104
+ font-size: 14px;
105
+ color: #212528;
106
+ }
107
+
108
+ .gct-diagram-config-item-content {
109
+ height: 32px;
110
+ }
111
+
112
+ .gct-diagram-config-item-select .ant-select {
113
+ width: 152px;
114
+ }
115
+ .gct-diagram-config-item-select .ant-select .ant-select-selector {
116
+ background-color: #F7F8FA;
117
+ }
118
+ .gct-diagram-config-item-select .ant-select .ant-select-selector .ant-select-selection-placeholder {
119
+ color: #C3C3C3;
120
+ }
121
+ .gct-diagram-config-item-select.is-select .ant-select-selector {
122
+ border-color: #3168EC !important;
123
+ }