@jzg223/design-runtime 0.0.0-stage → 0.0.1

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 (229) hide show
  1. package/CHANGELOG.md +176 -0
  2. package/README.md +275 -2
  3. package/dist/_virtual/_plugin-vue_export-helper.js +10 -0
  4. package/dist/api.js +149 -0
  5. package/dist/comb/design-comb.vue.js +7 -0
  6. package/dist/comb/design-comb2.vue.js +591 -0
  7. package/dist/compat.js +74 -0
  8. package/dist/components/ApiSwitch.vue.js +7 -0
  9. package/dist/components/ApiSwitch2.vue.js +98 -0
  10. package/dist/components/design-debug/dev-mode-toggle.vue.js +7 -0
  11. package/dist/components/design-debug/dev-mode-toggle2.vue.js +41 -0
  12. package/dist/components/design-debug/dev-mode.js +45 -0
  13. package/dist/components/design-debug/dev-state-button.vue.js +7 -0
  14. package/dist/components/design-debug/dev-state-button2.vue.js +447 -0
  15. package/dist/components/design-debug/expr-eval.js +81 -0
  16. package/dist/components/design-shared/host-api.js +47 -0
  17. package/dist/components/design-shared/popup-host.js +11 -0
  18. package/dist/components/design-table/design-table-inner.vue.js +7 -0
  19. package/dist/components/design-table/design-table-inner2.vue.js +39 -0
  20. package/dist/components/design-table/design-table.vue.js +7 -0
  21. package/dist/components/design-table/design-table2.vue.js +937 -0
  22. package/dist/components/design-table/row-actions/delete-action.vue.js +4 -0
  23. package/dist/components/design-table/row-actions/delete-action2.vue.js +42 -0
  24. package/dist/components/design-table/row-actions/edit-action.vue.js +4 -0
  25. package/dist/components/design-table/row-actions/edit-action2.vue.js +145 -0
  26. package/dist/components/design-table/row-actions/index.js +36 -0
  27. package/dist/components/design-table/row-actions/modal-comb-action.vue.js +4 -0
  28. package/dist/components/design-table/row-actions/modal-comb-action2.vue.js +66 -0
  29. package/dist/components/design-table/row-actions/modal-custom-action.vue.js +7 -0
  30. package/dist/components/design-table/row-actions/modal-custom-action2.vue.js +105 -0
  31. package/dist/components/design-table/row-actions/modal-form-action.vue.js +4 -0
  32. package/dist/components/design-table/row-actions/modal-form-action2.vue.js +82 -0
  33. package/dist/components/design-table/row-actions/modal-table-action.vue.js +4 -0
  34. package/dist/components/design-table/row-actions/modal-table-action2.vue.js +67 -0
  35. package/dist/components/design-table/row-actions/modal-tree-action.vue.js +4 -0
  36. package/dist/components/design-table/row-actions/modal-tree-action2.vue.js +70 -0
  37. package/dist/components/design-table/row-actions/navigate-comb-action.vue.js +4 -0
  38. package/dist/components/design-table/row-actions/navigate-comb-action2.vue.js +47 -0
  39. package/dist/components/design-table/row-actions/navigate-form-action.vue.js +4 -0
  40. package/dist/components/design-table/row-actions/navigate-form-action2.vue.js +47 -0
  41. package/dist/components/design-table/row-actions/navigate-table-action.vue.js +4 -0
  42. package/dist/components/design-table/row-actions/navigate-table-action2.vue.js +47 -0
  43. package/dist/components/design-table/row-actions/navigate-tree-action.vue.js +4 -0
  44. package/dist/components/design-table/row-actions/navigate-tree-action2.vue.js +47 -0
  45. package/dist/components/design-table/row-actions/other-action.vue.js +4 -0
  46. package/dist/components/design-table/row-actions/other-action2.vue.js +44 -0
  47. package/dist/components/design-tools/add-tool.vue.js +4 -0
  48. package/dist/components/design-tools/add-tool2.vue.js +136 -0
  49. package/dist/components/design-tools/command-executor.js +135 -0
  50. package/dist/components/design-tools/export-tool.vue.js +4 -0
  51. package/dist/components/design-tools/export-tool2.vue.js +46 -0
  52. package/dist/components/design-tools/import-tool.vue.js +4 -0
  53. package/dist/components/design-tools/import-tool2.vue.js +101 -0
  54. package/dist/components/design-tools/index.js +36 -0
  55. package/dist/components/design-tools/modal-comb-tool.vue.js +4 -0
  56. package/dist/components/design-tools/modal-comb-tool2.vue.js +56 -0
  57. package/dist/components/design-tools/modal-form-tool.vue.js +4 -0
  58. package/dist/components/design-tools/modal-form-tool2.vue.js +66 -0
  59. package/dist/components/design-tools/modal-hcm-tool.vue.js +7 -0
  60. package/dist/components/design-tools/modal-hcm-tool2.vue.js +85 -0
  61. package/dist/components/design-tools/modal-table-tool.vue.js +4 -0
  62. package/dist/components/design-tools/modal-table-tool2.vue.js +54 -0
  63. package/dist/components/design-tools/modal-tree-tool.vue.js +4 -0
  64. package/dist/components/design-tools/modal-tree-tool2.vue.js +57 -0
  65. package/dist/components/design-tools/navigate-comb-tool.vue.js +4 -0
  66. package/dist/components/design-tools/navigate-comb-tool2.vue.js +34 -0
  67. package/dist/components/design-tools/navigate-form-tool.vue.js +4 -0
  68. package/dist/components/design-tools/navigate-form-tool2.vue.js +34 -0
  69. package/dist/components/design-tools/navigate-table-tool.vue.js +4 -0
  70. package/dist/components/design-tools/navigate-table-tool2.vue.js +33 -0
  71. package/dist/components/design-tools/other-tool.vue.js +4 -0
  72. package/dist/components/design-tools/other-tool2.vue.js +34 -0
  73. package/dist/components/flow-status-cell/flow-status-cell.vue.js +7 -0
  74. package/dist/components/flow-status-cell/flow-status-cell2.vue.js +124 -0
  75. package/dist/flow.js +22 -0
  76. package/dist/form/cell-condition.js +122 -0
  77. package/dist/form/derived-express.js +34 -0
  78. package/dist/form/design-form-inner.vue.js +7 -0
  79. package/dist/form/design-form-inner2.vue.js +449 -0
  80. package/dist/form/design-form.vue.js +7 -0
  81. package/dist/form/design-form2.vue.js +681 -0
  82. package/dist/form/fields/checkbox-field.vue.js +88 -0
  83. package/dist/form/fields/checkbox-field2.vue.js +4 -0
  84. package/dist/form/fields/custom-field.vue.js +36 -0
  85. package/dist/form/fields/custom-field2.vue.js +4 -0
  86. package/dist/form/fields/date-field.vue.js +64 -0
  87. package/dist/form/fields/date-field2.vue.js +4 -0
  88. package/dist/form/fields/embedded-list-field.vue.js +7 -0
  89. package/dist/form/fields/embedded-list-field2.vue.js +437 -0
  90. package/dist/form/fields/file-field.vue.js +88 -0
  91. package/dist/form/fields/file-field2.vue.js +4 -0
  92. package/dist/form/fields/image-field.vue.js +90 -0
  93. package/dist/form/fields/image-field2.vue.js +4 -0
  94. package/dist/form/fields/index.js +106 -0
  95. package/dist/form/fields/month-field.vue.js +51 -0
  96. package/dist/form/fields/month-field2.vue.js +4 -0
  97. package/dist/form/fields/org-select-field.vue.js +7 -0
  98. package/dist/form/fields/org-select-field2.vue.js +187 -0
  99. package/dist/form/fields/orgs-select-field.vue.js +182 -0
  100. package/dist/form/fields/orgs-select-field2.vue.js +4 -0
  101. package/dist/form/fields/radio-field.vue.js +91 -0
  102. package/dist/form/fields/radio-field2.vue.js +4 -0
  103. package/dist/form/fields/select-field.vue.js +7 -0
  104. package/dist/form/fields/select-field2.vue.js +317 -0
  105. package/dist/form/fields/splitline-field.vue.js +7 -0
  106. package/dist/form/fields/splitline-field2.vue.js +50 -0
  107. package/dist/form/fields/switch-field.vue.js +32 -0
  108. package/dist/form/fields/switch-field2.vue.js +4 -0
  109. package/dist/form/fields/text-field.vue.js +78 -0
  110. package/dist/form/fields/text-field2.vue.js +4 -0
  111. package/dist/form/fields/time-field.vue.js +50 -0
  112. package/dist/form/fields/time-field2.vue.js +4 -0
  113. package/dist/form/fields/tree-field.vue.js +157 -0
  114. package/dist/form/fields/tree-field2.vue.js +4 -0
  115. package/dist/form/number-precision.js +18 -0
  116. package/dist/form/transformer.js +162 -0
  117. package/dist/host.js +76 -0
  118. package/dist/http.js +19 -0
  119. package/dist/index.js +166 -0
  120. package/dist/mapping.js +44 -0
  121. package/dist/org/dept-api.js +30 -0
  122. package/dist/org/dept-tree-source.js +53 -0
  123. package/dist/org/dept-tree.js +122 -0
  124. package/dist/registry.js +77 -0
  125. package/dist/search/design-search.vue.js +7 -0
  126. package/dist/search/design-search2.vue.js +232 -0
  127. package/dist/search/transformer.js +115 -0
  128. package/dist/style.css +1220 -0
  129. package/dist/table/data.js +18 -0
  130. package/dist/table/load-gate.js +19 -0
  131. package/dist/table/query-body.js +59 -0
  132. package/dist/table/query-dedupe.js +54 -0
  133. package/dist/table/query-search.js +9 -0
  134. package/dist/table/row-action-mapping.js +34 -0
  135. package/dist/table/transformer.js +328 -0
  136. package/dist/tree/design-tree.vue.js +7 -0
  137. package/dist/tree/design-tree2.vue.js +783 -0
  138. package/dist/types/api.d.ts +83 -0
  139. package/dist/types/comb/design-comb.vue.d.ts +38 -0
  140. package/dist/types/compat.d.ts +46 -0
  141. package/dist/types/components/ApiSwitch.vue.d.ts +31 -0
  142. package/dist/types/components/design-debug/dev-mode-toggle.vue.d.ts +2 -0
  143. package/dist/types/components/design-debug/dev-mode.d.ts +8 -0
  144. package/dist/types/components/design-debug/dev-state-button.vue.d.ts +55 -0
  145. package/dist/types/components/design-debug/expr-eval.d.ts +55 -0
  146. package/dist/types/components/design-shared/host-api.d.ts +60 -0
  147. package/dist/types/components/design-shared/popup-host.d.ts +13 -0
  148. package/dist/types/components/design-table/design-table-inner.vue.d.ts +19 -0
  149. package/dist/types/components/design-table/design-table.vue.d.ts +70 -0
  150. package/dist/types/components/design-table/row-actions/delete-action.vue.d.ts +12 -0
  151. package/dist/types/components/design-table/row-actions/edit-action.vue.d.ts +14 -0
  152. package/dist/types/components/design-table/row-actions/index.d.ts +25 -0
  153. package/dist/types/components/design-table/row-actions/modal-comb-action.vue.d.ts +10 -0
  154. package/dist/types/components/design-table/row-actions/modal-custom-action.vue.d.ts +15 -0
  155. package/dist/types/components/design-table/row-actions/modal-form-action.vue.d.ts +10 -0
  156. package/dist/types/components/design-table/row-actions/modal-table-action.vue.d.ts +10 -0
  157. package/dist/types/components/design-table/row-actions/modal-tree-action.vue.d.ts +10 -0
  158. package/dist/types/components/design-table/row-actions/navigate-comb-action.vue.d.ts +10 -0
  159. package/dist/types/components/design-table/row-actions/navigate-form-action.vue.d.ts +10 -0
  160. package/dist/types/components/design-table/row-actions/navigate-table-action.vue.d.ts +10 -0
  161. package/dist/types/components/design-table/row-actions/navigate-tree-action.vue.d.ts +10 -0
  162. package/dist/types/components/design-table/row-actions/other-action.vue.d.ts +14 -0
  163. package/dist/types/components/design-tools/add-tool.vue.d.ts +23 -0
  164. package/dist/types/components/design-tools/command-executor.d.ts +80 -0
  165. package/dist/types/components/design-tools/export-tool.vue.d.ts +9 -0
  166. package/dist/types/components/design-tools/import-tool.vue.d.ts +14 -0
  167. package/dist/types/components/design-tools/index.d.ts +23 -0
  168. package/dist/types/components/design-tools/modal-comb-tool.vue.d.ts +12 -0
  169. package/dist/types/components/design-tools/modal-form-tool.vue.d.ts +12 -0
  170. package/dist/types/components/design-tools/modal-hcm-tool.vue.d.ts +23 -0
  171. package/dist/types/components/design-tools/modal-table-tool.vue.d.ts +12 -0
  172. package/dist/types/components/design-tools/modal-tree-tool.vue.d.ts +12 -0
  173. package/dist/types/components/design-tools/navigate-comb-tool.vue.d.ts +12 -0
  174. package/dist/types/components/design-tools/navigate-form-tool.vue.d.ts +11 -0
  175. package/dist/types/components/design-tools/navigate-table-tool.vue.d.ts +12 -0
  176. package/dist/types/components/design-tools/other-tool.vue.d.ts +16 -0
  177. package/dist/types/components/flow-status-cell/flow-status-cell.vue.d.ts +14 -0
  178. package/dist/types/components/index.d.ts +33 -0
  179. package/dist/types/flow.d.ts +50 -0
  180. package/dist/types/form/cell-condition.d.ts +35 -0
  181. package/dist/types/form/derived-express.d.ts +28 -0
  182. package/dist/types/form/design-form-inner.vue.d.ts +55 -0
  183. package/dist/types/form/design-form.vue.d.ts +96 -0
  184. package/dist/types/form/fields/checkbox-field.vue.d.ts +14 -0
  185. package/dist/types/form/fields/custom-field.vue.d.ts +22 -0
  186. package/dist/types/form/fields/date-field.vue.d.ts +12 -0
  187. package/dist/types/form/fields/embedded-list-field.vue.d.ts +26 -0
  188. package/dist/types/form/fields/file-field.vue.d.ts +12 -0
  189. package/dist/types/form/fields/image-field.vue.d.ts +12 -0
  190. package/dist/types/form/fields/index.d.ts +34 -0
  191. package/dist/types/form/fields/month-field.vue.d.ts +12 -0
  192. package/dist/types/form/fields/org-select-field.vue.d.ts +14 -0
  193. package/dist/types/form/fields/orgs-select-field.vue.d.ts +12 -0
  194. package/dist/types/form/fields/radio-field.vue.d.ts +14 -0
  195. package/dist/types/form/fields/select-field.vue.d.ts +14 -0
  196. package/dist/types/form/fields/splitline-field.vue.d.ts +7 -0
  197. package/dist/types/form/fields/switch-field.vue.d.ts +12 -0
  198. package/dist/types/form/fields/text-field.vue.d.ts +12 -0
  199. package/dist/types/form/fields/time-field.vue.d.ts +12 -0
  200. package/dist/types/form/fields/tree-field.vue.d.ts +12 -0
  201. package/dist/types/form/number-precision.d.ts +15 -0
  202. package/dist/types/form/transformer.d.ts +27 -0
  203. package/dist/types/host.d.ts +182 -0
  204. package/dist/types/http.d.ts +59 -0
  205. package/dist/types/index.d.ts +41 -0
  206. package/dist/types/mapping.d.ts +39 -0
  207. package/dist/types/org/dept-api.d.ts +12 -0
  208. package/dist/types/org/dept-tree-source.d.ts +15 -0
  209. package/dist/types/org/dept-tree.d.ts +62 -0
  210. package/dist/types/registry.d.ts +79 -0
  211. package/dist/types/search/design-search.vue.d.ts +46 -0
  212. package/dist/types/search/transformer.d.ts +36 -0
  213. package/dist/types/table/data.d.ts +30 -0
  214. package/dist/types/table/index.d.ts +20 -0
  215. package/dist/types/table/load-gate.d.ts +24 -0
  216. package/dist/types/table/query-body.d.ts +46 -0
  217. package/dist/types/table/query-dedupe.d.ts +42 -0
  218. package/dist/types/table/query-search.d.ts +21 -0
  219. package/dist/types/table/row-action-mapping.d.ts +36 -0
  220. package/dist/types/table/transformer.d.ts +59 -0
  221. package/dist/types/tree/design-tree.vue.d.ts +33 -0
  222. package/dist/types/types.d.ts +525 -0
  223. package/dist/types/utils/default-value.d.ts +16 -0
  224. package/dist/types/utils/download.d.ts +9 -0
  225. package/dist/types/utils/popup-width.d.ts +21 -0
  226. package/dist/utils/default-value.js +38 -0
  227. package/dist/utils/download.js +19 -0
  228. package/dist/utils/popup-width.js +19 -0
  229. package/package.json +73 -4
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./delete-action2.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,42 @@
1
+ import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode, createTextVNode, toDisplayString } from "vue";
2
+ import { Popconfirm, Button } from "antdv-next";
3
+ const _sfc_main = /* @__PURE__ */ defineComponent({
4
+ ...{ name: "DesignTableDeleteAction" },
5
+ __name: "delete-action",
6
+ props: {
7
+ action: {},
8
+ gridApi: {},
9
+ row: {}
10
+ },
11
+ emits: ["deleted"],
12
+ setup(__props, { emit: __emit }) {
13
+ const props = __props;
14
+ const emit = __emit;
15
+ function handleDelete() {
16
+ emit("deleted", props.row);
17
+ }
18
+ return (_ctx, _cache) => {
19
+ return openBlock(), createBlock(unref(Popconfirm), {
20
+ title: "确定删除?",
21
+ onConfirm: handleDelete
22
+ }, {
23
+ default: withCtx(() => [
24
+ createVNode(unref(Button), {
25
+ size: "small",
26
+ danger: "",
27
+ type: "link"
28
+ }, {
29
+ default: withCtx(() => [
30
+ createTextVNode(toDisplayString(__props.action.title), 1)
31
+ ]),
32
+ _: 1
33
+ })
34
+ ]),
35
+ _: 1
36
+ });
37
+ };
38
+ }
39
+ });
40
+ export {
41
+ _sfc_main as default
42
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./edit-action2.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,145 @@
1
+ import { defineComponent, computed, ref, openBlock, createElementBlock, Fragment, createVNode, unref, withCtx, createTextVNode, toDisplayString, createBlock, resolveDynamicComponent, createCommentVNode } from "vue";
2
+ import { Button, Drawer } from "antdv-next";
3
+ import { fetchFormConfig } from "../../../api.js";
4
+ import DesignForm from "../../../form/design-form.vue.js";
5
+ import { usePopupHost } from "../../design-shared/popup-host.js";
6
+ import { getHostPopup } from "../../../host.js";
7
+ import { DEFAULT_POPUP_WIDTH, resolvePopupWidth } from "../../../utils/popup-width.js";
8
+ const _sfc_main = /* @__PURE__ */ defineComponent({
9
+ ...{ name: "DesignTableEditAction" },
10
+ __name: "edit-action",
11
+ props: {
12
+ action: {},
13
+ row: {},
14
+ category: {},
15
+ pfield: {},
16
+ gridApi: {}
17
+ },
18
+ emits: ["saved"],
19
+ setup(__props, { emit: __emit }) {
20
+ const props = __props;
21
+ const emit = __emit;
22
+ const popupHost = usePopupHost();
23
+ const useAntd = computed(() => popupHost === "antd" || !useVbenDrawer);
24
+ const formRef = ref(null);
25
+ const useVbenDrawer = getHostPopup("drawer");
26
+ const [EditDrawer, editDrawerApi] = useVbenDrawer ? useVbenDrawer({ onClosed: handleClosed }) : [null, null];
27
+ let widthStyleEl = null;
28
+ function setDrawerWidth(width) {
29
+ if (widthStyleEl) {
30
+ widthStyleEl.textContent = `.design-edit-drawer{width:${width}px!important}`;
31
+ } else {
32
+ widthStyleEl = document.createElement("style");
33
+ widthStyleEl.textContent = `.design-edit-drawer{width:${width}px!important}`;
34
+ document.head.appendChild(widthStyleEl);
35
+ }
36
+ }
37
+ const antdOpen = ref(false);
38
+ const antdTitle = ref("");
39
+ const antdWidth = ref(DEFAULT_POPUP_WIDTH);
40
+ const formCategory = computed(() => {
41
+ return props.action.targetFormCategory || props.category || "";
42
+ });
43
+ const sourceId = computed(() => {
44
+ var _a;
45
+ return (_a = props.row) == null ? void 0 : _a[props.pfield || "id"];
46
+ });
47
+ const opening = ref(false);
48
+ const fetchedConfig = ref(null);
49
+ async function open() {
50
+ if (!props.action.targetFormName || !sourceId.value) return;
51
+ opening.value = true;
52
+ try {
53
+ const cfg = await fetchFormConfig(formCategory.value, props.action.targetFormName);
54
+ fetchedConfig.value = cfg;
55
+ const width = resolvePopupWidth(cfg.width, props.action.formWidth);
56
+ const title = cfg.title ? `${props.action.title} - ${cfg.title}` : props.action.title;
57
+ if (useAntd.value) {
58
+ antdWidth.value = width;
59
+ antdTitle.value = title;
60
+ antdOpen.value = true;
61
+ return;
62
+ }
63
+ setDrawerWidth(width);
64
+ editDrawerApi.setState({ class: "design-edit-drawer", title, footer: false });
65
+ editDrawerApi.open();
66
+ } catch (err) {
67
+ console.error("加载表单配置失败:", (err == null ? void 0 : err.message) ?? err);
68
+ } finally {
69
+ opening.value = false;
70
+ }
71
+ }
72
+ function handleSaved() {
73
+ var _a, _b;
74
+ if (useAntd.value) {
75
+ antdOpen.value = false;
76
+ } else {
77
+ editDrawerApi.setState({ confirmLoading: false });
78
+ editDrawerApi.close();
79
+ }
80
+ (_b = (_a = props.gridApi) == null ? void 0 : _a.query) == null ? void 0 : _b.call(_a);
81
+ emit("saved");
82
+ }
83
+ function handleClosed() {
84
+ editDrawerApi.setState({ class: "", confirmLoading: false });
85
+ if (widthStyleEl) {
86
+ widthStyleEl.remove();
87
+ widthStyleEl = null;
88
+ }
89
+ }
90
+ return (_ctx, _cache) => {
91
+ return openBlock(), createElementBlock(Fragment, null, [
92
+ createVNode(unref(Button), {
93
+ size: "small",
94
+ type: "link",
95
+ loading: opening.value,
96
+ onClick: open
97
+ }, {
98
+ default: withCtx(() => [
99
+ createTextVNode(toDisplayString(__props.action.title), 1)
100
+ ]),
101
+ _: 1
102
+ }, 8, ["loading"]),
103
+ !useAntd.value && unref(EditDrawer) ? (openBlock(), createBlock(resolveDynamicComponent(unref(EditDrawer)), { key: 0 }, {
104
+ default: withCtx(() => [
105
+ __props.action.targetFormName && sourceId.value && fetchedConfig.value ? (openBlock(), createBlock(DesignForm, {
106
+ ref_key: "formRef",
107
+ ref: formRef,
108
+ key: `edit-${sourceId.value}-${__props.action.targetFormName}`,
109
+ config: fetchedConfig.value,
110
+ category: formCategory.value,
111
+ name: __props.action.targetFormName,
112
+ "source-id": sourceId.value,
113
+ mode: "standalone",
114
+ onSaved: handleSaved
115
+ }, null, 8, ["config", "category", "name", "source-id"])) : createCommentVNode("", true)
116
+ ]),
117
+ _: 1
118
+ })) : (openBlock(), createBlock(unref(Drawer), {
119
+ key: 1,
120
+ open: antdOpen.value,
121
+ title: antdTitle.value,
122
+ width: antdWidth.value,
123
+ closable: true,
124
+ onClose: _cache[0] || (_cache[0] = ($event) => antdOpen.value = false)
125
+ }, {
126
+ default: withCtx(() => [
127
+ __props.action.targetFormName && sourceId.value && fetchedConfig.value ? (openBlock(), createBlock(DesignForm, {
128
+ key: `antd-edit-${sourceId.value}-${__props.action.targetFormName}`,
129
+ config: fetchedConfig.value,
130
+ category: formCategory.value,
131
+ name: __props.action.targetFormName,
132
+ "source-id": sourceId.value,
133
+ mode: "standalone",
134
+ onSaved: handleSaved
135
+ }, null, 8, ["config", "category", "name", "source-id"])) : createCommentVNode("", true)
136
+ ]),
137
+ _: 1
138
+ }, 8, ["open", "title", "width"]))
139
+ ], 64);
140
+ };
141
+ }
142
+ });
143
+ export {
144
+ _sfc_main as default
145
+ };
@@ -0,0 +1,36 @@
1
+ import { defineAsyncComponent } from "vue";
2
+ const rowActionComponentMap = {
3
+ delete: defineAsyncComponent(() => import("./delete-action.vue.js")),
4
+ edit: defineAsyncComponent(() => import("./edit-action.vue.js")),
5
+ "modal-combo": defineAsyncComponent(() => import("./modal-comb-action.vue.js")),
6
+ "modal-custom": defineAsyncComponent(() => import("./modal-custom-action.vue.js")),
7
+ "modal-form": defineAsyncComponent(() => import("./modal-form-action.vue.js")),
8
+ "modal-table": defineAsyncComponent(() => import("./modal-table-action.vue.js")),
9
+ "modal-tree": defineAsyncComponent(() => import("./modal-tree-action.vue.js")),
10
+ "navigate-combo": defineAsyncComponent(() => import("./navigate-comb-action.vue.js")),
11
+ "navigate-form": defineAsyncComponent(() => import("./navigate-form-action.vue.js")),
12
+ "navigate-table": defineAsyncComponent(() => import("./navigate-table-action.vue.js")),
13
+ "navigate-tree": defineAsyncComponent(() => import("./navigate-tree-action.vue.js")),
14
+ other: defineAsyncComponent(() => import("./other-action.vue.js"))
15
+ };
16
+ const pendingRowActionTypes = [];
17
+ const warnedTypes = /* @__PURE__ */ new Set();
18
+ function resolveRowActionComponent(type) {
19
+ const key = String(type ?? "").trim();
20
+ const comp = rowActionComponentMap[key];
21
+ if (comp) return comp;
22
+ if (!warnedTypes.has(key)) {
23
+ warnedTypes.add(key);
24
+ console.warn(
25
+ `[design-runtime] 行操作类型「${key || "(空)"}」不可用:未知的行操作类型`
26
+ );
27
+ }
28
+ return void 0;
29
+ }
30
+ const rowActionTypes = Object.keys(rowActionComponentMap).sort();
31
+ export {
32
+ pendingRowActionTypes,
33
+ resolveRowActionComponent,
34
+ rowActionComponentMap,
35
+ rowActionTypes
36
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./modal-comb-action2.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,66 @@
1
+ import { defineComponent, provide, ref, computed, openBlock, createElementBlock, Fragment, createVNode, unref, withCtx, createTextVNode, toDisplayString, createElementVNode } from "vue";
2
+ import { Button, Modal } from "antdv-next";
3
+ import DesignComb from "../../../comb/design-comb.vue.js";
4
+ import { DESIGN_POPUP_HOST_KEY } from "../../design-shared/popup-host.js";
5
+ import { buildNavigateQuery } from "../../../table/row-action-mapping.js";
6
+ const _hoisted_1 = { style: { "height": "70vh" } };
7
+ const _sfc_main = /* @__PURE__ */ defineComponent({
8
+ ...{ name: "DesignTableModalCombAction" },
9
+ __name: "modal-comb-action",
10
+ props: {
11
+ action: {},
12
+ category: {},
13
+ params: {},
14
+ pfield: {},
15
+ row: {}
16
+ },
17
+ setup(__props) {
18
+ const props = __props;
19
+ provide(DESIGN_POPUP_HOST_KEY, "antd");
20
+ const open = ref(false);
21
+ const query = computed(
22
+ () => buildNavigateQuery(props.action.mappings, props.params ?? {}, props.row, props.pfield)
23
+ );
24
+ const category = computed(() => props.action.targetComboCategory || props.category || "");
25
+ const name = computed(() => props.action.targetComboName);
26
+ function handleClick() {
27
+ if (!category.value || !name.value) return;
28
+ open.value = true;
29
+ }
30
+ return (_ctx, _cache) => {
31
+ return openBlock(), createElementBlock(Fragment, null, [
32
+ createVNode(unref(Button), {
33
+ size: "small",
34
+ type: "link",
35
+ onClick: handleClick
36
+ }, {
37
+ default: withCtx(() => [
38
+ createTextVNode(toDisplayString(__props.action.title), 1)
39
+ ]),
40
+ _: 1
41
+ }),
42
+ createVNode(unref(Modal), {
43
+ open: open.value,
44
+ title: __props.action.title,
45
+ width: 1200,
46
+ footer: null,
47
+ onCancel: _cache[0] || (_cache[0] = ($event) => open.value = false)
48
+ }, {
49
+ default: withCtx(() => [
50
+ createElementVNode("div", _hoisted_1, [
51
+ createVNode(DesignComb, {
52
+ category: category.value,
53
+ name: name.value,
54
+ "parent-params": query.value
55
+ }, null, 8, ["category", "name", "parent-params"])
56
+ ])
57
+ ]),
58
+ _: 1
59
+ }, 8, ["open", "title"])
60
+ ], 64);
61
+ };
62
+ }
63
+ });
64
+ export {
65
+ _sfc_main as default
66
+ };
@@ -0,0 +1,7 @@
1
+ import _sfc_main from "./modal-custom-action2.vue.js";
2
+ /* empty css */
3
+ import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const modalCustomAction = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-edb5039f"]]);
5
+ export {
6
+ modalCustomAction as default
7
+ };
@@ -0,0 +1,105 @@
1
+ import { defineComponent, ref, computed, openBlock, createElementBlock, Fragment, createVNode, unref, withCtx, createTextVNode, toDisplayString, createBlock, resolveDynamicComponent, createCommentVNode } from "vue";
2
+ import { Button } from "antdv-next";
3
+ import { resolveDesignComponent } from "../../../registry.js";
4
+ import { buildCustomParams } from "../../../table/row-action-mapping.js";
5
+ import { buildHostApi } from "../../design-shared/host-api.js";
6
+ const _hoisted_1 = {
7
+ key: 0,
8
+ class: "dr-modal-custom-host"
9
+ };
10
+ const _hoisted_2 = {
11
+ key: 1,
12
+ class: "dr-modal-custom-missing"
13
+ };
14
+ const _sfc_main = /* @__PURE__ */ defineComponent({
15
+ ...{ name: "DesignTableModalCustomAction" },
16
+ __name: "modal-custom-action",
17
+ props: {
18
+ action: {},
19
+ category: {},
20
+ gridApi: {},
21
+ params: {},
22
+ pfield: {},
23
+ row: {}
24
+ },
25
+ emits: ["saved"],
26
+ setup(__props, { emit: __emit }) {
27
+ const props = __props;
28
+ const emit = __emit;
29
+ let warnedMissing = false;
30
+ const open = ref(false);
31
+ const openSeq = ref(0);
32
+ const comname = computed(() => (props.action.comname ?? "").trim());
33
+ const cell = computed(() => ({
34
+ comname: comname.value,
35
+ name: comname.value,
36
+ title: props.action.title,
37
+ type: "modal-custom"
38
+ }));
39
+ const mappedParams = computed(
40
+ () => buildCustomParams(props.action.mappings, props.params ?? {}, props.row)
41
+ );
42
+ const hostApi = computed(
43
+ () => buildHostApi({
44
+ close: () => {
45
+ open.value = false;
46
+ },
47
+ reload: () => {
48
+ var _a, _b;
49
+ (_b = (_a = props.gridApi) == null ? void 0 : _a.query) == null ? void 0 : _b.call(_a);
50
+ emit("saved");
51
+ }
52
+ })
53
+ );
54
+ const comp = computed(() => {
55
+ if (!comname.value) {
56
+ if (!warnedMissing) {
57
+ warnedMissing = true;
58
+ console.warn(
59
+ "[design-runtime] 行操作「弹窗自定义组件」没配 comname(action.comname),已显示占位提示"
60
+ );
61
+ }
62
+ return null;
63
+ }
64
+ const resolved = resolveDesignComponent(comname.value);
65
+ if (!resolved && !warnedMissing) {
66
+ warnedMissing = true;
67
+ console.warn(
68
+ `[design-runtime] 行操作自定义组件「${comname.value}」未注册:请在宿主注册表里用 registerComponents() 登记同名 comname`
69
+ );
70
+ }
71
+ return resolved ?? null;
72
+ });
73
+ function handleClick() {
74
+ openSeq.value += 1;
75
+ open.value = true;
76
+ }
77
+ return (_ctx, _cache) => {
78
+ return openBlock(), createElementBlock(Fragment, null, [
79
+ createVNode(unref(Button), {
80
+ size: "small",
81
+ type: "link",
82
+ onClick: handleClick
83
+ }, {
84
+ default: withCtx(() => [
85
+ createTextVNode(toDisplayString(__props.action.title), 1)
86
+ ]),
87
+ _: 1
88
+ }),
89
+ open.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
90
+ comp.value ? (openBlock(), createBlock(resolveDynamicComponent(comp.value), {
91
+ key: openSeq.value,
92
+ api: hostApi.value,
93
+ cell: cell.value,
94
+ comname: comname.value,
95
+ host: "row-action",
96
+ params: mappedParams.value
97
+ }, null, 8, ["api", "cell", "comname", "params"])) : (openBlock(), createElementBlock("div", _hoisted_2, " 组件「" + toDisplayString(comname.value || "(未配置 comname)") + "」未在宿主注册,无法打开 ", 1))
98
+ ])) : createCommentVNode("", true)
99
+ ], 64);
100
+ };
101
+ }
102
+ });
103
+ export {
104
+ _sfc_main as default
105
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./modal-form-action2.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,82 @@
1
+ import { defineComponent, provide, ref, computed, openBlock, createElementBlock, Fragment, createVNode, unref, withCtx, createTextVNode, toDisplayString, createBlock } from "vue";
2
+ import { Button, Modal } from "antdv-next";
3
+ import DesignForm from "../../../form/design-form.vue.js";
4
+ import { DESIGN_POPUP_HOST_KEY } from "../../design-shared/popup-host.js";
5
+ import { buildNavigateQuery } from "../../../table/row-action-mapping.js";
6
+ const _sfc_main = /* @__PURE__ */ defineComponent({
7
+ ...{ name: "DesignTableModalFormAction" },
8
+ __name: "modal-form-action",
9
+ props: {
10
+ action: {},
11
+ category: {},
12
+ params: {},
13
+ pfield: {},
14
+ row: {}
15
+ },
16
+ setup(__props) {
17
+ const props = __props;
18
+ provide(DESIGN_POPUP_HOST_KEY, "antd");
19
+ const open = ref(false);
20
+ const openSeq = ref(0);
21
+ const query = computed(
22
+ () => buildNavigateQuery(
23
+ props.action.mappings,
24
+ props.params ?? {},
25
+ props.row,
26
+ props.pfield
27
+ )
28
+ );
29
+ const sourceId = computed(() => {
30
+ const id = query.value.id;
31
+ return id == null ? void 0 : String(id);
32
+ });
33
+ const extraParams = computed(() => {
34
+ const rest = { ...query.value };
35
+ delete rest.id;
36
+ return rest;
37
+ });
38
+ const category = computed(() => props.action.targetFormCategory || props.category || "");
39
+ const name = computed(() => props.action.targetFormName);
40
+ function handleClick() {
41
+ if (!category.value || !name.value) return;
42
+ openSeq.value += 1;
43
+ open.value = true;
44
+ }
45
+ return (_ctx, _cache) => {
46
+ return openBlock(), createElementBlock(Fragment, null, [
47
+ createVNode(unref(Button), {
48
+ size: "small",
49
+ type: "link",
50
+ onClick: handleClick
51
+ }, {
52
+ default: withCtx(() => [
53
+ createTextVNode(toDisplayString(__props.action.title), 1)
54
+ ]),
55
+ _: 1
56
+ }),
57
+ createVNode(unref(Modal), {
58
+ open: open.value,
59
+ title: __props.action.title,
60
+ width: 700,
61
+ footer: null,
62
+ onCancel: _cache[0] || (_cache[0] = ($event) => open.value = false)
63
+ }, {
64
+ default: withCtx(() => [
65
+ (openBlock(), createBlock(DesignForm, {
66
+ key: `${category.value}-${name.value}-${sourceId.value ?? "new"}-${openSeq.value}`,
67
+ category: category.value,
68
+ name: name.value,
69
+ "source-id": sourceId.value,
70
+ "parent-params": extraParams.value,
71
+ mode: "standalone"
72
+ }, null, 8, ["category", "name", "source-id", "parent-params"]))
73
+ ]),
74
+ _: 1
75
+ }, 8, ["open", "title"])
76
+ ], 64);
77
+ };
78
+ }
79
+ });
80
+ export {
81
+ _sfc_main as default
82
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./modal-table-action2.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,67 @@
1
+ import { defineComponent, provide, ref, computed, openBlock, createElementBlock, Fragment, createVNode, unref, withCtx, createTextVNode, toDisplayString, createElementVNode } from "vue";
2
+ import { Button, Modal } from "antdv-next";
3
+ import DesignTable from "../design-table.vue.js";
4
+ import { DESIGN_POPUP_HOST_KEY } from "../../design-shared/popup-host.js";
5
+ import { buildNavigateQuery } from "../../../table/row-action-mapping.js";
6
+ const _hoisted_1 = { style: { "height": "70vh" } };
7
+ const _sfc_main = /* @__PURE__ */ defineComponent({
8
+ ...{ name: "DesignTableModalTableAction" },
9
+ __name: "modal-table-action",
10
+ props: {
11
+ action: {},
12
+ category: {},
13
+ params: {},
14
+ pfield: {},
15
+ row: {}
16
+ },
17
+ setup(__props) {
18
+ const props = __props;
19
+ provide(DESIGN_POPUP_HOST_KEY, "antd");
20
+ const open = ref(false);
21
+ const query = computed(
22
+ () => buildNavigateQuery(props.action.mappings, props.params ?? {}, props.row, props.pfield)
23
+ );
24
+ const category = computed(() => props.action.targetTableCategory || props.category || "");
25
+ const name = computed(() => props.action.targetTableName);
26
+ function handleClick() {
27
+ if (!category.value || !name.value) return;
28
+ open.value = true;
29
+ }
30
+ return (_ctx, _cache) => {
31
+ return openBlock(), createElementBlock(Fragment, null, [
32
+ createVNode(unref(Button), {
33
+ size: "small",
34
+ type: "link",
35
+ onClick: handleClick
36
+ }, {
37
+ default: withCtx(() => [
38
+ createTextVNode(toDisplayString(__props.action.title), 1)
39
+ ]),
40
+ _: 1
41
+ }),
42
+ createVNode(unref(Modal), {
43
+ open: open.value,
44
+ title: __props.action.title,
45
+ width: 1200,
46
+ footer: null,
47
+ onCancel: _cache[0] || (_cache[0] = ($event) => open.value = false)
48
+ }, {
49
+ default: withCtx(() => [
50
+ createElementVNode("div", _hoisted_1, [
51
+ createVNode(DesignTable, {
52
+ category: category.value,
53
+ name: name.value,
54
+ "parent-params": query.value,
55
+ "no-page": true
56
+ }, null, 8, ["category", "name", "parent-params"])
57
+ ])
58
+ ]),
59
+ _: 1
60
+ }, 8, ["open", "title"])
61
+ ], 64);
62
+ };
63
+ }
64
+ });
65
+ export {
66
+ _sfc_main as default
67
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./modal-tree-action2.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,70 @@
1
+ import { defineComponent, provide, ref, computed, openBlock, createElementBlock, Fragment, createVNode, unref, withCtx, createTextVNode, toDisplayString, createCommentVNode } from "vue";
2
+ import { Button, Modal } from "antdv-next";
3
+ import DesignTree from "../../../tree/design-tree.vue.js";
4
+ import { DESIGN_POPUP_HOST_KEY } from "../../design-shared/popup-host.js";
5
+ import { buildNavigateQuery } from "../../../table/row-action-mapping.js";
6
+ const _hoisted_1 = {
7
+ key: 0,
8
+ style: { "height": "70vh" }
9
+ };
10
+ const _sfc_main = /* @__PURE__ */ defineComponent({
11
+ ...{ name: "DesignTableModalTreeAction" },
12
+ __name: "modal-tree-action",
13
+ props: {
14
+ action: {},
15
+ category: {},
16
+ params: {},
17
+ pfield: {},
18
+ row: {}
19
+ },
20
+ setup(__props) {
21
+ const props = __props;
22
+ provide(DESIGN_POPUP_HOST_KEY, "antd");
23
+ const open = ref(false);
24
+ const extraParams = computed(
25
+ () => buildNavigateQuery(props.action.mappings, props.params ?? {}, props.row, props.pfield)
26
+ );
27
+ const category = computed(() => props.action.targetTreeCategory || props.category || "");
28
+ const name = computed(() => props.action.targetTreeName);
29
+ function handleClick() {
30
+ if (!category.value || !name.value) return;
31
+ open.value = true;
32
+ }
33
+ return (_ctx, _cache) => {
34
+ return openBlock(), createElementBlock(Fragment, null, [
35
+ createVNode(unref(Button), {
36
+ size: "small",
37
+ type: "link",
38
+ onClick: handleClick
39
+ }, {
40
+ default: withCtx(() => [
41
+ createTextVNode(toDisplayString(__props.action.title), 1)
42
+ ]),
43
+ _: 1
44
+ }),
45
+ createVNode(unref(Modal), {
46
+ open: open.value,
47
+ title: __props.action.title,
48
+ width: 1200,
49
+ footer: null,
50
+ "body-style": { background: "#f5f7fa", padding: 0 },
51
+ onCancel: _cache[0] || (_cache[0] = ($event) => open.value = false)
52
+ }, {
53
+ default: withCtx(() => [
54
+ open.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
55
+ createVNode(DesignTree, {
56
+ category: category.value,
57
+ name: name.value,
58
+ "parent-params": extraParams.value
59
+ }, null, 8, ["category", "name", "parent-params"])
60
+ ])) : createCommentVNode("", true)
61
+ ]),
62
+ _: 1
63
+ }, 8, ["open", "title"])
64
+ ], 64);
65
+ };
66
+ }
67
+ });
68
+ export {
69
+ _sfc_main as default
70
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./navigate-comb-action2.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };