weaver-e10-builder 1.2.3 → 1.5.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 (351) hide show
  1. package/assets/org-employee-template.xlsx +0 -0
  2. package/dist/commands/actionflow.d.ts.map +1 -1
  3. package/dist/commands/actionflow.js +12 -25
  4. package/dist/commands/actionflow.js.map +1 -1
  5. package/dist/commands/designer-css.d.ts +15 -0
  6. package/dist/commands/designer-css.d.ts.map +1 -0
  7. package/dist/commands/designer-css.js +205 -0
  8. package/dist/commands/designer-css.js.map +1 -0
  9. package/dist/commands/form-button.d.ts.map +1 -1
  10. package/dist/commands/form-button.js +28 -5
  11. package/dist/commands/form-button.js.map +1 -1
  12. package/dist/commands/form-field-lang.d.ts.map +1 -1
  13. package/dist/commands/form-field-lang.js +4 -39
  14. package/dist/commands/form-field-lang.js.map +1 -1
  15. package/dist/commands/form-field-linkage.d.ts.map +1 -1
  16. package/dist/commands/form-field-linkage.js +27 -6
  17. package/dist/commands/form-field-linkage.js.map +1 -1
  18. package/dist/commands/form-formula-linkage.d.ts +3 -0
  19. package/dist/commands/form-formula-linkage.d.ts.map +1 -0
  20. package/dist/commands/form-formula-linkage.js +434 -0
  21. package/dist/commands/form-formula-linkage.js.map +1 -0
  22. package/dist/commands/form-formula.d.ts.map +1 -1
  23. package/dist/commands/form-formula.js +22 -3
  24. package/dist/commands/form-formula.js.map +1 -1
  25. package/dist/commands/form-layout-init.d.ts.map +1 -1
  26. package/dist/commands/form-layout-init.js +15 -10
  27. package/dist/commands/form-layout-init.js.map +1 -1
  28. package/dist/commands/form-layout.js +24 -21
  29. package/dist/commands/form-layout.js.map +1 -1
  30. package/dist/commands/form-list-click.d.ts.map +1 -1
  31. package/dist/commands/form-list-click.js +2 -1
  32. package/dist/commands/form-list-click.js.map +1 -1
  33. package/dist/commands/form-native.d.ts.map +1 -1
  34. package/dist/commands/form-native.js +192 -3
  35. package/dist/commands/form-native.js.map +1 -1
  36. package/dist/commands/form-validate.d.ts.map +1 -1
  37. package/dist/commands/form-validate.js +11 -3
  38. package/dist/commands/form-validate.js.map +1 -1
  39. package/dist/commands/form.d.ts.map +1 -1
  40. package/dist/commands/form.js +323 -192
  41. package/dist/commands/form.js.map +1 -1
  42. package/dist/commands/matrix.d.ts.map +1 -1
  43. package/dist/commands/matrix.js +175 -36
  44. package/dist/commands/matrix.js.map +1 -1
  45. package/dist/commands/menu.d.ts.map +1 -1
  46. package/dist/commands/menu.js +170 -23
  47. package/dist/commands/menu.js.map +1 -1
  48. package/dist/commands/org.d.ts +10 -0
  49. package/dist/commands/org.d.ts.map +1 -0
  50. package/dist/commands/org.js +278 -0
  51. package/dist/commands/org.js.map +1 -0
  52. package/dist/commands/role.d.ts.map +1 -1
  53. package/dist/commands/role.js +106 -62
  54. package/dist/commands/role.js.map +1 -1
  55. package/dist/commands/wf-form.d.ts +1 -0
  56. package/dist/commands/wf-form.d.ts.map +1 -1
  57. package/dist/commands/wf-form.js +545 -39
  58. package/dist/commands/wf-form.js.map +1 -1
  59. package/dist/commands/workflow-auth-resp.d.ts.map +1 -1
  60. package/dist/commands/workflow-auth-resp.js +53 -5
  61. package/dist/commands/workflow-auth-resp.js.map +1 -1
  62. package/dist/commands/workflow-create-auth-resp.d.ts.map +1 -1
  63. package/dist/commands/workflow-create-auth-resp.js +5 -1
  64. package/dist/commands/workflow-create-auth-resp.js.map +1 -1
  65. package/dist/commands/workflow-node-assign-flow.d.ts.map +1 -1
  66. package/dist/commands/workflow-node-assign-flow.js +1 -2
  67. package/dist/commands/workflow-node-assign-flow.js.map +1 -1
  68. package/dist/commands/workflow-node.d.ts.map +1 -1
  69. package/dist/commands/workflow-node.js +147 -2
  70. package/dist/commands/workflow-node.js.map +1 -1
  71. package/dist/commands/workflow-odoc.d.ts.map +1 -1
  72. package/dist/commands/workflow-odoc.js +56 -56
  73. package/dist/commands/workflow-odoc.js.map +1 -1
  74. package/dist/commands/workflow-setting.d.ts.map +1 -1
  75. package/dist/commands/workflow-setting.js +77 -1
  76. package/dist/commands/workflow-setting.js.map +1 -1
  77. package/dist/commands/workflow.d.ts.map +1 -1
  78. package/dist/commands/workflow.js +114 -89
  79. package/dist/commands/workflow.js.map +1 -1
  80. package/dist/core/client.d.ts +14 -0
  81. package/dist/core/client.d.ts.map +1 -1
  82. package/dist/core/client.js +28 -12
  83. package/dist/core/client.js.map +1 -1
  84. package/dist/index.js +6 -0
  85. package/dist/index.js.map +1 -1
  86. package/dist/services/action-detail.d.ts.map +1 -1
  87. package/dist/services/action-detail.js +5 -4
  88. package/dist/services/action-detail.js.map +1 -1
  89. package/dist/services/actionflow/command_output.d.ts +7 -0
  90. package/dist/services/actionflow/command_output.d.ts.map +1 -1
  91. package/dist/services/actionflow/command_output.js +46 -0
  92. package/dist/services/actionflow/command_output.js.map +1 -1
  93. package/dist/services/actionflow/components/action_eb_add.d.ts.map +1 -1
  94. package/dist/services/actionflow/components/action_eb_add.js +14 -4
  95. package/dist/services/actionflow/components/action_eb_add.js.map +1 -1
  96. package/dist/services/actionflow/components/action_eb_add_compiler.d.ts.map +1 -1
  97. package/dist/services/actionflow/components/action_eb_add_compiler.js +29 -0
  98. package/dist/services/actionflow/components/action_eb_add_compiler.js.map +1 -1
  99. package/dist/services/actionflow/components/action_eb_update.d.ts.map +1 -1
  100. package/dist/services/actionflow/components/action_eb_update.js +23 -8
  101. package/dist/services/actionflow/components/action_eb_update.js.map +1 -1
  102. package/dist/services/actionflow/components/action_eb_update_compiler.d.ts.map +1 -1
  103. package/dist/services/actionflow/components/action_eb_update_compiler.js +261 -13
  104. package/dist/services/actionflow/components/action_eb_update_compiler.js.map +1 -1
  105. package/dist/services/actionflow/components/approve_create.d.ts.map +1 -1
  106. package/dist/services/actionflow/components/approve_create.js +6 -3
  107. package/dist/services/actionflow/components/approve_create.js.map +1 -1
  108. package/dist/services/actionflow/components/custom_set_form.d.ts +10 -0
  109. package/dist/services/actionflow/components/custom_set_form.d.ts.map +1 -0
  110. package/dist/services/actionflow/components/custom_set_form.js +99 -0
  111. package/dist/services/actionflow/components/custom_set_form.js.map +1 -0
  112. package/dist/services/actionflow/components/custom_trigger.d.ts +2 -2
  113. package/dist/services/actionflow/components/custom_trigger.d.ts.map +1 -1
  114. package/dist/services/actionflow/components/custom_trigger.js +11 -11
  115. package/dist/services/actionflow/components/custom_trigger.js.map +1 -1
  116. package/dist/services/actionflow/components/dml_execute.d.ts.map +1 -1
  117. package/dist/services/actionflow/components/dml_execute.js +7 -3
  118. package/dist/services/actionflow/components/dml_execute.js.map +1 -1
  119. package/dist/services/actionflow/components/document_actions.d.ts.map +1 -1
  120. package/dist/services/actionflow/components/document_actions.js +7 -3
  121. package/dist/services/actionflow/components/document_actions.js.map +1 -1
  122. package/dist/services/actionflow/components/enquiry_form.js +1 -1
  123. package/dist/services/actionflow/components/enquiry_form.js.map +1 -1
  124. package/dist/services/actionflow/components/hrm_actions.d.ts.map +1 -1
  125. package/dist/services/actionflow/components/hrm_actions.js +7 -3
  126. package/dist/services/actionflow/components/hrm_actions.js.map +1 -1
  127. package/dist/services/actionflow/components/multiple_execution.d.ts.map +1 -1
  128. package/dist/services/actionflow/components/multiple_execution.js +14 -5
  129. package/dist/services/actionflow/components/multiple_execution.js.map +1 -1
  130. package/dist/services/actionflow/components/output.d.ts.map +1 -1
  131. package/dist/services/actionflow/components/output.js +6 -1
  132. package/dist/services/actionflow/components/output.js.map +1 -1
  133. package/dist/services/actionflow/components/send_message.js +2 -2
  134. package/dist/services/actionflow/components/send_message.js.map +1 -1
  135. package/dist/services/actionflow/components/workflow_actions.d.ts.map +1 -1
  136. package/dist/services/actionflow/components/workflow_actions.js +7 -3
  137. package/dist/services/actionflow/components/workflow_actions.js.map +1 -1
  138. package/dist/services/actionflow/context_preflight.d.ts.map +1 -1
  139. package/dist/services/actionflow/context_preflight.js +25 -8
  140. package/dist/services/actionflow/context_preflight.js.map +1 -1
  141. package/dist/services/actionflow/context_provider.d.ts.map +1 -1
  142. package/dist/services/actionflow/context_provider.js +24 -4
  143. package/dist/services/actionflow/context_provider.js.map +1 -1
  144. package/dist/services/actionflow/custom_trigger_context.d.ts +10 -0
  145. package/dist/services/actionflow/custom_trigger_context.d.ts.map +1 -0
  146. package/dist/services/actionflow/custom_trigger_context.js +46 -0
  147. package/dist/services/actionflow/custom_trigger_context.js.map +1 -0
  148. package/dist/services/actionflow/dynamic_resources.d.ts.map +1 -1
  149. package/dist/services/actionflow/dynamic_resources.js +1 -1
  150. package/dist/services/actionflow/dynamic_resources.js.map +1 -1
  151. package/dist/services/actionflow/ebuilder_source.d.ts +19 -0
  152. package/dist/services/actionflow/ebuilder_source.d.ts.map +1 -0
  153. package/dist/services/actionflow/ebuilder_source.js +78 -0
  154. package/dist/services/actionflow/ebuilder_source.js.map +1 -0
  155. package/dist/services/actionflow/filter_rules.js +2 -2
  156. package/dist/services/actionflow/filter_rules.js.map +1 -1
  157. package/dist/services/actionflow/form_source.d.ts +51 -10
  158. package/dist/services/actionflow/form_source.d.ts.map +1 -1
  159. package/dist/services/actionflow/form_source.js +173 -29
  160. package/dist/services/actionflow/form_source.js.map +1 -1
  161. package/dist/services/actionflow/formula_service.d.ts +13 -2
  162. package/dist/services/actionflow/formula_service.d.ts.map +1 -1
  163. package/dist/services/actionflow/formula_service.js +104 -42
  164. package/dist/services/actionflow/formula_service.js.map +1 -1
  165. package/dist/services/actionflow/id_generator.d.ts +2 -0
  166. package/dist/services/actionflow/id_generator.d.ts.map +1 -1
  167. package/dist/services/actionflow/id_generator.js +13 -0
  168. package/dist/services/actionflow/id_generator.js.map +1 -1
  169. package/dist/services/actionflow/preflight_service.d.ts +6 -0
  170. package/dist/services/actionflow/preflight_service.d.ts.map +1 -1
  171. package/dist/services/actionflow/preflight_service.js +217 -4
  172. package/dist/services/actionflow/preflight_service.js.map +1 -1
  173. package/dist/services/actionflow/workflow_compiler.d.ts.map +1 -1
  174. package/dist/services/actionflow/workflow_compiler.js +172 -50
  175. package/dist/services/actionflow/workflow_compiler.js.map +1 -1
  176. package/dist/services/auth-resp-condition.d.ts +35 -0
  177. package/dist/services/auth-resp-condition.d.ts.map +1 -0
  178. package/dist/services/auth-resp-condition.js +111 -0
  179. package/dist/services/auth-resp-condition.js.map +1 -0
  180. package/dist/services/condition-rules.d.ts.map +1 -1
  181. package/dist/services/condition-rules.js +4 -1
  182. package/dist/services/condition-rules.js.map +1 -1
  183. package/dist/services/designer-css.d.ts +89 -0
  184. package/dist/services/designer-css.d.ts.map +1 -0
  185. package/dist/services/designer-css.js +163 -0
  186. package/dist/services/designer-css.js.map +1 -0
  187. package/dist/services/dom-structure.d.ts +42 -0
  188. package/dist/services/dom-structure.d.ts.map +1 -0
  189. package/dist/services/dom-structure.js +251 -0
  190. package/dist/services/dom-structure.js.map +1 -0
  191. package/dist/services/esb-interface/document-parser.d.ts.map +1 -1
  192. package/dist/services/esb-interface/document-parser.js +62 -5
  193. package/dist/services/esb-interface/document-parser.js.map +1 -1
  194. package/dist/services/form-association.d.ts +19 -0
  195. package/dist/services/form-association.d.ts.map +1 -1
  196. package/dist/services/form-association.js +64 -0
  197. package/dist/services/form-association.js.map +1 -1
  198. package/dist/services/form-button-action.d.ts +7 -0
  199. package/dist/services/form-button-action.d.ts.map +1 -1
  200. package/dist/services/form-button-action.js +11 -1
  201. package/dist/services/form-button-action.js.map +1 -1
  202. package/dist/services/form-create.d.ts +4 -0
  203. package/dist/services/form-create.d.ts.map +1 -1
  204. package/dist/services/form-create.js +18 -12
  205. package/dist/services/form-create.js.map +1 -1
  206. package/dist/services/form-field-patch.d.ts +25 -1
  207. package/dist/services/form-field-patch.d.ts.map +1 -1
  208. package/dist/services/form-field-patch.js +52 -9
  209. package/dist/services/form-field-patch.js.map +1 -1
  210. package/dist/services/form-formula-linkage.d.ts +349 -0
  211. package/dist/services/form-formula-linkage.d.ts.map +1 -0
  212. package/dist/services/form-formula-linkage.js +546 -0
  213. package/dist/services/form-formula-linkage.js.map +1 -0
  214. package/dist/services/form-i18n-label.d.ts +48 -0
  215. package/dist/services/form-i18n-label.d.ts.map +1 -0
  216. package/dist/services/form-i18n-label.js +91 -0
  217. package/dist/services/form-i18n-label.js.map +1 -0
  218. package/dist/services/form-layout-insert.d.ts +84 -0
  219. package/dist/services/form-layout-insert.d.ts.map +1 -0
  220. package/dist/services/form-layout-insert.js +244 -0
  221. package/dist/services/form-layout-insert.js.map +1 -0
  222. package/dist/services/form-linkage-condition.d.ts +159 -0
  223. package/dist/services/form-linkage-condition.d.ts.map +1 -0
  224. package/dist/services/form-linkage-condition.js +307 -0
  225. package/dist/services/form-linkage-condition.js.map +1 -0
  226. package/dist/services/form-style-template.d.ts +6 -2
  227. package/dist/services/form-style-template.d.ts.map +1 -1
  228. package/dist/services/form-style-template.js +8 -4
  229. package/dist/services/form-style-template.js.map +1 -1
  230. package/dist/services/formula-detail.d.ts +98 -6
  231. package/dist/services/formula-detail.d.ts.map +1 -1
  232. package/dist/services/formula-detail.js +208 -26
  233. package/dist/services/formula-detail.js.map +1 -1
  234. package/dist/services/matrix-rows.d.ts +43 -0
  235. package/dist/services/matrix-rows.d.ts.map +1 -0
  236. package/dist/services/matrix-rows.js +104 -0
  237. package/dist/services/matrix-rows.js.map +1 -0
  238. package/dist/services/menu-catalog.d.ts +84 -0
  239. package/dist/services/menu-catalog.d.ts.map +1 -0
  240. package/dist/services/menu-catalog.js +183 -0
  241. package/dist/services/menu-catalog.js.map +1 -0
  242. package/dist/services/org-department.d.ts +114 -0
  243. package/dist/services/org-department.d.ts.map +1 -0
  244. package/dist/services/org-department.js +209 -0
  245. package/dist/services/org-department.js.map +1 -0
  246. package/dist/services/org-employee.d.ts +87 -0
  247. package/dist/services/org-employee.d.ts.map +1 -0
  248. package/dist/services/org-employee.js +219 -0
  249. package/dist/services/org-employee.js.map +1 -0
  250. package/dist/services/role-member.d.ts +99 -0
  251. package/dist/services/role-member.d.ts.map +1 -0
  252. package/dist/services/role-member.js +206 -0
  253. package/dist/services/role-member.js.map +1 -0
  254. package/dist/services/workflow-add-step.d.ts +45 -0
  255. package/dist/services/workflow-add-step.d.ts.map +1 -0
  256. package/dist/services/workflow-add-step.js +122 -0
  257. package/dist/services/workflow-add-step.js.map +1 -0
  258. package/dist/services/workflow-assign-flow.d.ts +1 -6
  259. package/dist/services/workflow-assign-flow.d.ts.map +1 -1
  260. package/dist/services/workflow-assign-flow.js +3 -8
  261. package/dist/services/workflow-assign-flow.js.map +1 -1
  262. package/dist/services/workflow-drawback.d.ts +19 -0
  263. package/dist/services/workflow-drawback.d.ts.map +1 -0
  264. package/dist/services/workflow-drawback.js +59 -0
  265. package/dist/services/workflow-drawback.js.map +1 -0
  266. package/dist/services/workflow-info.d.ts +83 -0
  267. package/dist/services/workflow-info.d.ts.map +1 -0
  268. package/dist/services/workflow-info.js +97 -0
  269. package/dist/services/workflow-info.js.map +1 -0
  270. package/dist/services/workflow-links.d.ts +51 -0
  271. package/dist/services/workflow-links.d.ts.map +1 -0
  272. package/dist/services/workflow-links.js +162 -0
  273. package/dist/services/workflow-links.js.map +1 -0
  274. package/dist/services/workflow-node-layout.d.ts +45 -4
  275. package/dist/services/workflow-node-layout.d.ts.map +1 -1
  276. package/dist/services/workflow-node-layout.js +142 -41
  277. package/dist/services/workflow-node-layout.js.map +1 -1
  278. package/dist/services/workflow-odoc-setting.d.ts +43 -0
  279. package/dist/services/workflow-odoc-setting.d.ts.map +1 -0
  280. package/dist/services/workflow-odoc-setting.js +109 -0
  281. package/dist/services/workflow-odoc-setting.js.map +1 -0
  282. package/dist/services/workflow-tab-config.d.ts +54 -0
  283. package/dist/services/workflow-tab-config.d.ts.map +1 -0
  284. package/dist/services/workflow-tab-config.js +137 -0
  285. package/dist/services/workflow-tab-config.js.map +1 -0
  286. package/dist/types.d.ts +5 -1
  287. package/dist/types.d.ts.map +1 -1
  288. package/dist/utils/column-name.d.ts +24 -0
  289. package/dist/utils/column-name.d.ts.map +1 -1
  290. package/dist/utils/column-name.js +16 -0
  291. package/dist/utils/column-name.js.map +1 -1
  292. package/ecodecmd/package.json +1 -2
  293. package/ecodecmd/src/loaddep.js +19 -9
  294. package/package.json +48 -48
  295. package/skill-docs/SKILL.md +15 -11
  296. package/skill-docs/_catalog.md +85 -79
  297. package/skill-docs/actionflows/SKILL.md +173 -168
  298. package/skill-docs/actionflows/references/components/ebuilder/ActionEbAdd.md +38 -1
  299. package/skill-docs/actionflows/references/components/ebuilder/ActionEbUpdate.md +42 -0
  300. package/skill-docs/actionflows/references/components/ebuilder/EventButton.md +1 -1
  301. package/skill-docs/actionflows/references/components/logic/Output.md +2 -0
  302. package/skill-docs/actionflows/references/components/trigger/CustomTrigger.md +48 -11
  303. package/skill-docs/actionflows/references/components/workflow/ApproveCreate.md +1 -1
  304. package/skill-docs/assets/dom-structure/Bar.json +341 -0
  305. package/skill-docs/assets/dom-structure/BarStack.json +341 -0
  306. package/skill-docs/assets/dom-structure/Bubble.json +323 -0
  307. package/skill-docs/assets/dom-structure/Calendar.json +515 -0
  308. package/skill-docs/assets/dom-structure/Circular.json +337 -0
  309. package/skill-docs/assets/dom-structure/CollapsePanel.json +289 -0
  310. package/skill-docs/assets/dom-structure/Comment.json +617 -0
  311. package/skill-docs/assets/dom-structure/CountDown.json +755 -0
  312. package/skill-docs/assets/dom-structure/DigitalPanel.json +191 -0
  313. package/skill-docs/assets/dom-structure/EbButton.json +387 -0
  314. package/skill-docs/assets/dom-structure/FastCreate.json +242 -0
  315. package/skill-docs/assets/dom-structure/Gauge.json +282 -0
  316. package/skill-docs/assets/dom-structure/HBar.json +336 -0
  317. package/skill-docs/assets/dom-structure/HBarStack.json +337 -0
  318. package/skill-docs/assets/dom-structure/Line.json +341 -0
  319. package/skill-docs/assets/dom-structure/NList.json +712 -0
  320. package/skill-docs/assets/dom-structure/NavBar.json +274 -0
  321. package/skill-docs/assets/dom-structure/NavPanel.json +390 -0
  322. package/skill-docs/assets/dom-structure/NewTab.json +606 -0
  323. package/skill-docs/assets/dom-structure/Nightingale.json +336 -0
  324. package/skill-docs/assets/dom-structure/PageHeader.json +205 -0
  325. package/skill-docs/assets/dom-structure/Picture.json +209 -0
  326. package/skill-docs/assets/dom-structure/Pie.json +338 -0
  327. package/skill-docs/assets/dom-structure/ProgressChart.json +299 -0
  328. package/skill-docs/assets/dom-structure/SearchGlobal.json +628 -0
  329. package/skill-docs/assets/dom-structure/Slide.json +489 -0
  330. package/skill-docs/assets/dom-structure/Treemap.json +324 -0
  331. package/skill-docs/references/common/guide-plan-template.md +10 -4
  332. package/skill-docs/references/common/ref-cli-commands.md +67 -34
  333. package/skill-docs/references/ebuilder-designer/guide-designer-components.md +12 -1
  334. package/skill-docs/references/ebuilder-designer/guide-designer-css.md +127 -0
  335. package/skill-docs/references/ebuilder-designer/guide-designer.md +6 -5
  336. package/skill-docs/references/esb-interface/guide-import.md +4 -1
  337. package/skill-docs/references/form/guide-create-form.md +14 -1
  338. package/skill-docs/references/form/guide-field-linkage.md +2 -0
  339. package/skill-docs/references/form/guide-form-formula-functions.md +36 -0
  340. package/skill-docs/references/form/guide-form-layout-incremental.md +75 -0
  341. package/skill-docs/references/form/guide-form-layout-planning.md +1 -1
  342. package/skill-docs/references/form/guide-form-linkage.md +89 -5
  343. package/skill-docs/references/form/guide-formula-linkage.md +250 -0
  344. package/skill-docs/references/form/ref-form-fields.md +6 -0
  345. package/skill-docs/references/hrm/guide-matrix.md +79 -16
  346. package/skill-docs/references/hrm/guide-org-employee.md +56 -0
  347. package/skill-docs/references/menu/system-menus.md +12 -0
  348. package/skill-docs/references/workflow/guide-workflow-auth-resp.md +48 -22
  349. package/skill-docs/references/workflow/guide-workflow-odoc-setting.md +248 -0
  350. package/skill-docs/references/workflow/guide-workflow-odoc.md +25 -33
  351. package/skill-docs/references/workflow/guide-workflow.md +18 -3
@@ -2,7 +2,8 @@
2
2
  * 动态赋值的字段引用、公式树与资源对象构造。
3
3
  * 对齐 Python 版 core/formula_service.py(黄金参照)。
4
4
  */
5
- import { genSfId } from './id_generator.js';
5
+ import { genSfId, normalizeNumericFrontId } from './id_generator.js';
6
+ import { resolveCustomTriggerDtoId } from './custom_trigger_context.js';
6
7
  import { resolveSystemParameter } from './system_params.js';
7
8
  import { findFunction } from './functions_catalog.js';
8
9
  import { getWorkflowContextFields, getWorkflowContextFieldsByKey, getWorkflowDetailNames, getTargetFormFields, findInMetadata, workflowFieldId, } from './runtime_metadata.js';
@@ -26,6 +27,29 @@ const VALUE_TYPE_ALIASES = {
26
27
  date: 'Date', Date: 'Date', time: 'Time', Time: 'Time',
27
28
  datetime: 'DateTime', DateTime: 'DateTime',
28
29
  };
30
+ /** 触发器上下文根节点。自定义触发的参数由 SelectParams 提供,不是普通表单数据。 */
31
+ export function contextRootForComponent(componentType) {
32
+ return String(componentType || '') === 'CustomTrigger'
33
+ ? 'SelectParams'
34
+ : String(componentType || '') === 'ApproveTrigger'
35
+ ? 'ApprovalData'
36
+ : 'FormData';
37
+ }
38
+ export function contextTableNameForRoot(root) {
39
+ return root === 'ApprovalData' ? '流程数据' : root === 'SelectParams' ? '选择参数' : '表单数据';
40
+ }
41
+ /**
42
+ * 自定义触发的来源 key 只保存业务路径,不能把公式根节点混进 paramKey。
43
+ * 主表与明细表必须共用同一个主表路径,例如:
44
+ * `mainTable.name`、`mainTable.detail[].field`;公式 value 再由编译器补上
45
+ * `SelectParams.` 前缀。
46
+ */
47
+ export function normalizeContextParamKey(paramKey, componentType) {
48
+ const key = String(paramKey ?? '');
49
+ if (String(componentType || '') !== 'CustomTrigger')
50
+ return key;
51
+ return key.replace(/^(?:FormData|ApprovalData|SelectParams)\./, '');
52
+ }
29
53
  // ── 字段解析 ────────────────────────────────────────────────
30
54
  export function resolveSourceFieldType(paramKey, meta) {
31
55
  if (!paramKey)
@@ -182,6 +206,8 @@ export function formulaContext(sourceComponentId, fieldKey, opts = {}) {
182
206
  const fieldName = String(opts.name || fieldKey);
183
207
  const componentType = opts.componentType || 'ApproveTrigger';
184
208
  const fieldType = opts.fieldType || 'string';
209
+ const contextRoot = contextRootForComponent(componentType);
210
+ const tableName = contextTableNameForRoot(contextRoot);
185
211
  return {
186
212
  formulaType: ftNorm(fieldType),
187
213
  name: fieldName,
@@ -189,8 +215,8 @@ export function formulaContext(sourceComponentId, fieldKey, opts = {}) {
189
215
  id: fid,
190
216
  source: sourceId,
191
217
  type: '3',
192
- value: `FormData.${fieldKey}`,
193
- frontId: String(fieldKey),
218
+ value: `${contextRoot}.${fieldKey}`,
219
+ frontId: normalizeNumericFrontId(opts.frontId ?? fieldKey, 'FormulaBean.frontId'),
194
220
  paramKey: String(fieldKey),
195
221
  paramType: fieldType,
196
222
  childs: [],
@@ -203,12 +229,12 @@ export function formulaContext(sourceComponentId, fieldKey, opts = {}) {
203
229
  multName: '',
204
230
  multTypeObj: {
205
231
  allName: fieldName, currentName: fieldName,
206
- currentParamKey: `FormData.${fieldKey}`, allParamKey: `FormData.${fieldKey}`,
232
+ currentParamKey: `${contextRoot}.${fieldKey}`, allParamKey: `${contextRoot}.${fieldKey}`,
207
233
  },
208
234
  comId: sourceId,
209
235
  isMultCom: Boolean(opts.isMult),
210
- tableName: '表单数据',
211
- fieldInfo: { paramKey: String(fieldKey), tablePrimaryKey: 'FormData' },
236
+ tableName,
237
+ fieldInfo: { paramKey: String(fieldKey), tablePrimaryKey: contextRoot },
212
238
  comType: componentType,
213
239
  parentComId: String(opts.parentComId || '0'),
214
240
  switchType: 'assign',
@@ -247,7 +273,7 @@ export function formulaCurrentLoopContext(sourceComponentId, fieldKey, opts = {}
247
273
  // 前端在点击“循环(当次循环)”时额外生成 assignId,用它区分每个
248
274
  // 当次循环引用;缺少时编辑器只显示类型,不能回显所属组件和参数路径。
249
275
  assignId: genSfId(), id: fid, source: sourceId, type: '3', value: valuePath,
250
- frontId: String(opts.frontId || loopRootFrontId || rawField.id || rawField.paramId || fieldKey),
276
+ frontId: normalizeNumericFrontId(opts.frontId || loopRootFrontId || rawField.id || rawField.paramId || fieldKey, '循环 FormulaBean.frontId'),
251
277
  paramId: String(rawField.paramId || opts.frontId || rawField.id || fieldKey),
252
278
  paramName: String(rawField.paramName || fieldName),
253
279
  showName: String(rawField.showName || fieldName),
@@ -430,7 +456,10 @@ export function buildPersonFormula(personRef, meta, appId = '', forSendMessage =
430
456
  }
431
457
  if (directPerson) {
432
458
  if (ptype === 'context')
433
- return formulaContext('', pid);
459
+ return formulaContext('', pid, {
460
+ name: String(personRef.name || personRef.label || pid),
461
+ frontId: personRef.frontId || personRef.fieldId || personRef._resolvedContext?.fieldId,
462
+ });
434
463
  const pname = String(personRef.name || personRef.label || '');
435
464
  if (pid && pname && pid !== '{userid}' && pid !== 'currentUser') {
436
465
  const personObj = buildPersonObject(pid, pname);
@@ -458,7 +487,10 @@ export function buildPersonFormula(personRef, meta, appId = '', forSendMessage =
458
487
  if (!pname)
459
488
  pname = String(meta._upstream_form_name || '');
460
489
  const full = pname ? `${pname}.${disp}` : `表单数据.${disp}`;
461
- child = assignFlatContextDirect(pk, disp, src, appId, ft, full, meta);
490
+ const personSourceMeta = personRef._resolvedContext?.componentType === 'CustomTrigger'
491
+ ? { ...(meta || {}), _context_component_type: 'CustomTrigger' }
492
+ : meta;
493
+ child = assignFlatContextDirect(pk, disp, src, appId, ft, full, personSourceMeta, personRef._resolvedContext?.fieldId);
462
494
  }
463
495
  else {
464
496
  child = formulaSystemVar('{userid}');
@@ -650,6 +682,8 @@ export function buildAssignBean(raw, fieldId, fieldType, meta, appId, defaultSou
650
682
  if (['', 'event', 'event_1', 'trigger'].includes(String(sourceId)))
651
683
  sourceId = defaultSourceId;
652
684
  const label = src && typeof src === 'object' ? (src.label ?? src.name ?? key) : key;
685
+ const sourceComponent = String(src?._resolvedContext?.componentType || src?.componentType || meta?._context_component_type || meta?._upstream_component_type || 'ApproveTrigger');
686
+ key = normalizeContextParamKey(key, sourceComponent);
653
687
  const isCurrentLoop = src && typeof src === 'object' && (String(src.scope ?? src.contextScope ?? '') === 'current_loop' ||
654
688
  String(src.componentType ?? '') === 'MultipleExecution');
655
689
  if (isCurrentLoop) {
@@ -709,9 +743,11 @@ export function buildAssignBean(raw, fieldId, fieldType, meta, appId, defaultSou
709
743
  if (/^[^\.\[]+\[\]\.[^\.\[]+$/.test(resolvedKey)) {
710
744
  return formulaIndexedQueryResultArgument(resolvedKey, String(label), String(sourceId), appId, String(sourceFieldType || fieldType || 'string'), detailLabel || '表单数据');
711
745
  }
712
- return formulaIndexedWorkflowDetailArgument(resolvedKey, String(label), String(sourceId), appId, String(sourceFieldType || fieldType || 'string'), detailLabel, meta);
746
+ return formulaIndexedWorkflowDetailArgument(resolvedKey, String(label), String(sourceId), appId, String(sourceFieldType || fieldType || 'string'), detailLabel, sourceComponent === 'CustomTrigger'
747
+ ? { ...(meta || {}), _context_component_type: sourceComponent, _upstream_component_type: sourceComponent }
748
+ : meta, src?._resolvedContext?.fieldId);
713
749
  }
714
- const child = assignFlatEsbChild(resolvedKey, String(label), String(sourceId), appId, String(sourceFieldType || fieldType || 'string'), undefined, detailLabel, workflowName);
750
+ const child = assignFlatEsbChild(resolvedKey, String(label), String(sourceId), appId, String(sourceFieldType || fieldType || 'string'), undefined, detailLabel, workflowName, sourceComponent);
715
751
  attachEsbAssign(child, meta, String(sourceId));
716
752
  return child;
717
753
  }
@@ -726,7 +762,7 @@ export function buildAssignBean(raw, fieldId, fieldType, meta, appId, defaultSou
726
762
  const parentName = sourceName
727
763
  ? (sourceName.endsWith(`.${String(label)}`) ? sourceName : `${sourceName}.${String(label)}`)
728
764
  : `表单数据.${String(label)}`;
729
- const contextBean = assignFlatContextDirect(resolvedKey, String(label), String(sourceId), appId, sourceFieldType, parentName, sourceMeta);
765
+ const contextBean = assignFlatContextDirect(resolvedKey, String(label), String(sourceId), appId, sourceFieldType, parentName, sourceMeta, resolved.fieldId);
730
766
  attachEsbAssign(contextBean, meta, String(sourceId));
731
767
  return contextBean;
732
768
  }
@@ -761,7 +797,7 @@ export function buildAssignBean(raw, fieldId, fieldType, meta, appId, defaultSou
761
797
  const label = String(resolved.label ?? rawField.showName ?? rawField.paramName ?? ref?.label ?? queryFieldId);
762
798
  const parentName = String(resolved.parentName ?? ref?.parentName ?? `${ref?.tableName ?? '表单数据'}[].${label}`);
763
799
  const position = genSfId();
764
- const contextFieldInstanceId = String(resolved.fieldId ?? ref?.frontId ?? genSfId());
800
+ const contextFieldInstanceId = normalizeNumericFrontId(resolved.fieldId ?? ref?.frontId ?? genSfId(), '查询结果 FormulaBean.frontId');
765
801
  const child = formulaFixed(String(index), 'string');
766
802
  child.name = String(index);
767
803
  child.position = position;
@@ -928,11 +964,16 @@ function assignFlatFixed(valueStr, appId, fieldType = 'string') {
928
964
  applicationId: appId || '', config: { originValue: valueStr, switchType: 'fixvalue' },
929
965
  };
930
966
  }
931
- export function assignFlatContext(paramKey, fieldLabel, sourceId, appId, fieldType = 'string', parentName = '', tempFormulaId = '', tableId = '', componentKey = 'Text', paramKeyFull = '', valueFull = '') {
967
+ export function assignFlatContext(paramKey, fieldLabel, sourceId, appId, fieldType = 'string', parentName = '', tempFormulaId = '', tableId = '', componentKey = 'Text', paramKeyFull = '', valueFull = '', meta = null) {
932
968
  const fid = genSfId();
933
969
  const src = String(sourceId) || '0';
970
+ const componentType = String(meta?._context_component_type || meta?._upstream_component_type || '');
971
+ const contextRoot = contextRootForComponent(componentType);
972
+ const tableName = contextTableNameForRoot(contextRoot);
934
973
  const pname = String(parentName || fieldLabel);
935
- const val = valueFull || (tableId ? `FormData.${tableId}.${paramKey}` : `FormData.${paramKey}`);
974
+ const val = valueFull
975
+ ? String(valueFull).replace(/^(?:FormData|ApprovalData|SelectParams)\./, `${contextRoot}.`)
976
+ : (tableId ? `${contextRoot}.${tableId}.${paramKey}` : `${contextRoot}.${paramKey}`);
936
977
  const pkey = paramKeyFull || (tableId ? `${tableId}.${paramKey}` : String(paramKey));
937
978
  return {
938
979
  id: fid, name: String(fieldLabel), value: val, type: '3', fieldType, formulaType: fieldType,
@@ -942,8 +983,8 @@ export function assignFlatContext(paramKey, fieldLabel, sourceId, appId, fieldTy
942
983
  switchType: 'assign', comId: src, paramKey: pkey, paramType: fieldType,
943
984
  parentName: pname, newParentName: pname, multName: '', multKey: '',
944
985
  multTypeObj: { currentName: pname, allName: pname, currentParamKey: val, allParamKey: val },
945
- isMultCom: false, comType: 'ApproveTrigger', tableName: '表单数据',
946
- fieldInfo: { tablePrimaryKey: 'FormData', paramKey: pkey },
986
+ isMultCom: false, comType: componentType || 'ApproveTrigger', tableName,
987
+ fieldInfo: { tablePrimaryKey: contextRoot, paramKey: pkey },
947
988
  tempFormulaId: tempFormulaId || '', formulaVersion: 'V1',
948
989
  }),
949
990
  parentName: pname, tempFormulaId: tempFormulaId || '',
@@ -973,7 +1014,7 @@ function assignFlatHttpContext(paramKey, fieldLabel, sourceId, appId, fieldType
973
1014
  // 前端上下文项的 frontId 是响应参数行真实 id,不是 paramKey 尾段。
974
1015
  // 只有实时接口详情没有该行 id 时才退回尾段,避免把跨 HTTP 动态赋值
975
1016
  // 保存成“看似有值但平台无法定位”的公式。
976
- frontId: String(fieldMeta?.id || fieldMeta?.frontId || tail),
1017
+ frontId: normalizeNumericFrontId(fieldMeta?.id || fieldMeta?.frontId || tail, 'HTTP 响应 FormulaBean.frontId'),
977
1018
  paramKey: key,
978
1019
  parentName: pname,
979
1020
  childs: [],
@@ -996,7 +1037,7 @@ function assignFlatHttpContext(paramKey, fieldLabel, sourceId, appId, fieldType
996
1037
  parentId: '0',
997
1038
  };
998
1039
  }
999
- export function assignFlatContextDirect(paramKey, fieldLabel, sourceId, appId, fieldType = 'string', parentName = '', meta = null) {
1040
+ export function assignFlatContextDirect(paramKey, fieldLabel, sourceId, appId, fieldType = 'string', parentName = '', meta = null, resolvedFrontId = '') {
1000
1041
  const fid = genSfId();
1001
1042
  const src = String(sourceId) || '0';
1002
1043
  const pkey = String(paramKey);
@@ -1039,9 +1080,15 @@ export function assignFlatContextDirect(paramKey, fieldLabel, sourceId, appId, f
1039
1080
  }
1040
1081
  // frontId 必须 = 字段 id(paramKey 尾段),设计器用它在字段浏览器里定位字段;
1041
1082
  // 清空会导致设计器「动态赋值」找不到字段标红(真机验证 2026-08-19,场景12)。
1042
- if (!frontId)
1043
- frontId = pkeyTail;
1044
- const prefix = isApproval ? 'ApprovalData' : 'FormData';
1083
+ const customFrontId = resolvedSourceComponent === 'CustomTrigger'
1084
+ ? resolveCustomTriggerDtoId(paramKey, meta?._custom_trigger_data, '')
1085
+ : '';
1086
+ const frontIdCandidate = resolvedSourceComponent === 'CustomTrigger'
1087
+ ? (customFrontId || resolvedFrontId)
1088
+ : (resolvedFrontId || frontId || pkeyTail);
1089
+ frontId = normalizeNumericFrontId(frontIdCandidate, '上下文 FormulaBean.frontId');
1090
+ const prefix = isApproval ? 'ApprovalData' : contextRootForComponent(resolvedSourceComponent);
1091
+ const tableName = contextTableNameForRoot(prefix);
1045
1092
  const sourceComponent = resolvedSourceComponent;
1046
1093
  const result = {
1047
1094
  formulaType: fieldType, name: String(fieldLabel), businessId: appId || '', id: fid,
@@ -1050,7 +1097,7 @@ export function assignFlatContextDirect(paramKey, fieldLabel, sourceId, appId, f
1050
1097
  config: {
1051
1098
  paramKey: pkey, isMultCom: false, comType: sourceComponent, switchType: 'assign', formulaVersion: 'V1',
1052
1099
  fieldInfo: { paramKey: pkey, tablePrimaryKey: prefix },
1053
- tableName: isApproval ? '流程数据' : '表单数据',
1100
+ tableName,
1054
1101
  paramType: fieldType, parentName: pname, multName: '', multKey: '',
1055
1102
  multTypeObj: {
1056
1103
  allName: pname, currentName: pname,
@@ -1064,13 +1111,15 @@ export function assignFlatContextDirect(paramKey, fieldLabel, sourceId, appId, f
1064
1111
  result.frontId = frontId;
1065
1112
  return result;
1066
1113
  }
1067
- function assignFlatEsbChild(paramKey, fieldLabel, sourceId, appId, fieldType = 'string', detailParamKey = '', detailLabel = '', workflowName = '') {
1114
+ function assignFlatEsbChild(paramKey, fieldLabel, sourceId, appId, fieldType = 'string', detailParamKey = '', detailLabel = '', workflowName = '', componentType = 'ApproveTrigger') {
1068
1115
  const fid = genSfId();
1069
1116
  const src = String(sourceId) || '0';
1117
+ const contextRoot = contextRootForComponent(componentType);
1118
+ const tableName = contextTableNameForRoot(contextRoot);
1070
1119
  const tailPart = paramKey.includes('.') ? paramKey.slice(paramKey.lastIndexOf('.') + 1) : paramKey;
1071
1120
  const subId = tailPart.replace(/\[\]$/, '');
1072
1121
  const detailPk = detailParamKey || (paramKey.includes('[]') ? paramKey.slice(0, paramKey.indexOf('[]')) + '[]' : '');
1073
- const detailVal = `FormData.${detailPk}`;
1122
+ const detailVal = `${contextRoot}.${detailPk}`;
1074
1123
  const parentName = workflowName ? `${workflowName}.${fieldLabel}[]` : `${fieldLabel}[]`;
1075
1124
  const subName = workflowName ? `${workflowName}.${fieldLabel}` : String(fieldLabel);
1076
1125
  const allName = workflowName && detailLabel ? `${workflowName}.${detailLabel}[]` : parentName;
@@ -1081,12 +1130,12 @@ function assignFlatEsbChild(paramKey, fieldLabel, sourceId, appId, fieldType = '
1081
1130
  paramKey: String(paramKey), basisType: 'formSetting', switchType: 'sub', level: 1,
1082
1131
  id: subId, source: src, formulaVersion: 'V1', value: detailVal,
1083
1132
  config: {
1084
- paramKey: detailPk, isMultCom: false, comType: 'ApproveTrigger', switchType: 'assign', parentComId: 0,
1085
- fieldInfo: { paramKey: detailPk, tablePrimaryKey: 'FormData' },
1086
- tableName: '表单数据', paramType: fieldType, parentName, multName: '', multKey: '',
1133
+ paramKey: detailPk, isMultCom: false, comType: componentType, switchType: 'assign', parentComId: 0,
1134
+ fieldInfo: { paramKey: detailPk, tablePrimaryKey: contextRoot },
1135
+ tableName, paramType: fieldType, parentName, multName: '', multKey: '',
1087
1136
  multTypeObj: {
1088
1137
  allName, currentName: subName,
1089
- currentParamKey: paramKey.startsWith('FormData.') ? String(paramKey) : `FormData.${paramKey}`,
1138
+ currentParamKey: paramKey.startsWith(`${contextRoot}.`) ? String(paramKey) : `${contextRoot}.${paramKey}`,
1090
1139
  allParamKey: detailVal,
1091
1140
  },
1092
1141
  comId: src, newParentName: parentName,
@@ -1103,7 +1152,7 @@ function assignFlatEsbChild(paramKey, fieldLabel, sourceId, appId, fieldType = '
1103
1152
  * 选中“明细[0].字段”后保存的真实结构是 type=3:value 的 [] 被一个 type=1
1104
1153
  * 索引子节点 position 替换。缺少这个索引节点时,设计器只会把字段名渲染成红字。
1105
1154
  */
1106
- function formulaIndexedWorkflowDetailArgument(paramKey, fieldLabel, sourceId, appId, fieldType = 'string', detailLabel = '', meta = {}) {
1155
+ function formulaIndexedWorkflowDetailArgument(paramKey, fieldLabel, sourceId, appId, fieldType = 'string', detailLabel = '', meta = {}, resolvedFrontId = '') {
1107
1156
  const fid = genSfId();
1108
1157
  const match = String(paramKey).match(/^([^\.]+)\.([^\.\[]+)\[\]\.([^\.\[]+)$/);
1109
1158
  if (!match)
@@ -1116,9 +1165,11 @@ function formulaIndexedWorkflowDetailArgument(paramKey, fieldLabel, sourceId, ap
1116
1165
  index.name = '0';
1117
1166
  index.position = genSfId();
1118
1167
  index.parentId = fid;
1119
- const sourceComponent = String(meta?._upstream_component_type || 'ApproveTrigger');
1120
- const contextValue = `FormData.${workflowId}.${detailId}[${index.position}].${detailFieldId}`;
1121
- const allParamKey = `FormData.${paramKey}`;
1168
+ const sourceComponent = String(meta?._context_component_type || meta?._upstream_component_type || 'ApproveTrigger');
1169
+ const contextRoot = contextRootForComponent(sourceComponent);
1170
+ const tableName = contextTableNameForRoot(contextRoot);
1171
+ const contextValue = `${contextRoot}.${workflowId}.${detailId}[${index.position}].${detailFieldId}`;
1172
+ const allParamKey = `${contextRoot}.${paramKey}`;
1122
1173
  return {
1123
1174
  formulaType: fieldType,
1124
1175
  name: String(fieldLabel),
@@ -1128,7 +1179,7 @@ function formulaIndexedWorkflowDetailArgument(paramKey, fieldLabel, sourceId, ap
1128
1179
  type: '3',
1129
1180
  applicationId: appId || '',
1130
1181
  value: contextValue,
1131
- frontId: detailFieldId,
1182
+ frontId: normalizeNumericFrontId(sourceComponent === 'CustomTrigger' ? resolvedFrontId : (resolvedFrontId || detailFieldId), '流程明细 FormulaBean.frontId'),
1132
1183
  paramKey: String(paramKey),
1133
1184
  parentName,
1134
1185
  childs: [index],
@@ -1140,8 +1191,8 @@ function formulaIndexedWorkflowDetailArgument(paramKey, fieldLabel, sourceId, ap
1140
1191
  parentComId: 0,
1141
1192
  parentName,
1142
1193
  formulaVersion: 'V1',
1143
- fieldInfo: { paramKey: String(paramKey), tablePrimaryKey: 'FormData' },
1144
- tableName: '表单数据',
1194
+ fieldInfo: { paramKey: String(paramKey), tablePrimaryKey: contextRoot },
1195
+ tableName,
1145
1196
  paramType: fieldType,
1146
1197
  multName: '',
1147
1198
  multKey: '',
@@ -1179,7 +1230,7 @@ function formulaIndexedQueryResultArgument(paramKey, fieldLabel, sourceId, appId
1179
1230
  type: '3',
1180
1231
  applicationId: appId || '',
1181
1232
  value,
1182
- frontId: fieldId,
1233
+ frontId: normalizeNumericFrontId(fieldId, '查询结果明细 FormulaBean.frontId'),
1183
1234
  paramKey: String(paramKey),
1184
1235
  parentName,
1185
1236
  childs: [index],
@@ -1265,6 +1316,8 @@ export function buildSettingEntry(fieldId, assignment, fieldType = 'Text', meta
1265
1316
  let src = ref && typeof ref === 'object' ? (ref.source ?? ref.comId ?? '') : '';
1266
1317
  if (['', 'event', 'event_1', 'trigger'].includes(String(src)))
1267
1318
  src = defaultSourceId;
1319
+ const sourceComponent = String(ref?._resolvedContext?.componentType || ref?.componentType || meta?._context_component_type || meta?._upstream_component_type || 'ApproveTrigger');
1320
+ key = normalizeContextParamKey(key, sourceComponent);
1268
1321
  // 循环体内的上下文不是普通表单数据。设计器会把它保存为
1269
1322
  // CycleParams.<paramKey>,并要求 comType/isMultCom 指向 MultipleExecution;
1270
1323
  // 如果继续走下面的 direct/nested 分支,回读时会错误变成 FormData.<paramKey>。
@@ -1294,7 +1347,7 @@ export function buildSettingEntry(fieldId, assignment, fieldType = 'Text', meta
1294
1347
  if (realDtl)
1295
1348
  detailLabel = realDtl;
1296
1349
  const workflowName = String(meta._upstream_workflow_name || '');
1297
- flat = assignFlatEsbChild(pkeyFull, subLabel, String(src), appId, ft, undefined, detailLabel, workflowName);
1350
+ flat = assignFlatEsbChild(pkeyFull, subLabel, String(src), appId, ft, undefined, detailLabel, workflowName, sourceComponent);
1298
1351
  switchT = 'sub';
1299
1352
  attachEsbAssign(flat, meta, String(src));
1300
1353
  return {
@@ -1308,7 +1361,10 @@ export function buildSettingEntry(fieldId, assignment, fieldType = 'Text', meta
1308
1361
  else if (assignmentMode === 'direct' && operate === 'OPERATE_EQUAL') {
1309
1362
  const workflowId = String(meta._workflow_id || '');
1310
1363
  const paramKeyFull = resolveParamKey(workflowId, String(key));
1311
- flat = assignFlatContextDirect(paramKeyFull, String(label || key), String(src), appId, 'string', String(meta._upstream_workflow_name || ''), meta);
1364
+ const directMeta = sourceComponent === 'CustomTrigger'
1365
+ ? { ...(meta || {}), _context_component_type: sourceComponent }
1366
+ : meta;
1367
+ flat = assignFlatContextDirect(paramKeyFull, String(label || key), String(src), appId, 'string', String(meta._upstream_workflow_name || ''), directMeta, ref?._resolvedContext?.fieldId);
1312
1368
  switchT = 'assign';
1313
1369
  }
1314
1370
  else if (assignmentMode === 'nested' && operate === 'OPERATE_EQUAL') {
@@ -1354,11 +1410,14 @@ export function buildSettingEntry(fieldId, assignment, fieldType = 'Text', meta
1354
1410
  directParent = `${formName}.${label || pkey}`;
1355
1411
  else
1356
1412
  directParent = `表单数据.${label || key}`;
1357
- flat = assignFlatContextDirect(pkey, String(label || key), String(src), appId, ft, directParent, meta);
1413
+ const directMeta = sourceComponent === 'CustomTrigger'
1414
+ ? { ...(meta || {}), _context_component_type: sourceComponent }
1415
+ : meta;
1416
+ flat = assignFlatContextDirect(pkey, String(label || key), String(src), appId, ft, directParent, directMeta, ref?._resolvedContext?.fieldId);
1358
1417
  switchT = 'assign';
1359
1418
  }
1360
1419
  else {
1361
- const child = assignFlatContext(String(key), String(label || key), String(src), appId, ft, parentName, '', tableId, 'Text', pkey, pval);
1420
+ const child = assignFlatContext(String(key), String(label || key), String(src), appId, ft, parentName, '', tableId, 'Text', pkey, pval, meta);
1362
1421
  const container = formulaContainerString([child], '', appId);
1363
1422
  const childId = String(child.id || '');
1364
1423
  if (childId && typeof child.config === 'string') {
@@ -1384,7 +1443,10 @@ export function buildSettingEntry(fieldId, assignment, fieldType = 'Text', meta
1384
1443
  if (!srcName)
1385
1444
  srcName = String(meta._upstream_form_name || '');
1386
1445
  const directParent = srcName ? `${srcName}.${label || key}` : `表单数据.${label || key}`;
1387
- flat = assignFlatContextDirect(pkey, String(label || key), String(src), appId, ft, directParent, meta);
1446
+ const directMeta = sourceComponent === 'CustomTrigger'
1447
+ ? { ...(meta || {}), _context_component_type: sourceComponent }
1448
+ : meta;
1449
+ flat = assignFlatContextDirect(pkey, String(label || key), String(src), appId, ft, directParent, directMeta, ref?._resolvedContext?.fieldId);
1388
1450
  switchT = 'assign';
1389
1451
  }
1390
1452
  }