aibox-custom-component-packages 0.0.7 → 0.0.9

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 (323) hide show
  1. package/es/AddOrEditSupplierDialog.mjs +6 -786
  2. package/es/ApplicationTypeTag.mjs +2 -58
  3. package/es/AuthSection.mjs +3 -199
  4. package/es/AutoShowTooltip.mjs +2 -90
  5. package/es/AvailableRangePreview.mjs +2 -7
  6. package/es/AvailableRangeSetting.mjs +5 -272
  7. package/es/CodeView.mjs +6 -7
  8. package/es/CommonTagsList.mjs +3 -209
  9. package/es/CreateMcpForm.mjs +10 -384
  10. package/es/CustomSidebar.mjs +2 -712
  11. package/es/CustomTitle.mjs +6 -7
  12. package/es/CustomToggle.mjs +2 -170
  13. package/es/DialogContainer.mjs +2 -136
  14. package/es/DocSyncSelect.mjs +2 -0
  15. package/es/FileDisplay.mjs +4 -6
  16. package/es/FilePreview.mjs +3 -179
  17. package/es/FileUploader.mjs +2 -268
  18. package/es/Logo.mjs +2 -0
  19. package/es/McpFormDialog.mjs +11 -8
  20. package/es/McpParamsSet.mjs +8 -630
  21. package/es/MdEditor.mjs +2 -201
  22. package/es/PageContainer.mjs +4 -362
  23. package/es/ParameterTable.mjs +6 -2288
  24. package/es/PublishRecord.mjs +2 -179
  25. package/es/RadioGroup.mjs +2 -119
  26. package/es/SourcePublish.mjs +7 -1154
  27. package/es/Table.mjs +6 -10
  28. package/es/assets/AddOrEditSupplierDialog.css +1 -1
  29. package/es/assets/AiboxTable.css +1 -1
  30. package/es/assets/ApplicationTypeTag.css +1 -1
  31. package/es/assets/AuthSection.css +1 -1
  32. package/es/assets/AutoShowTooltip.css +1 -1
  33. package/es/assets/AvailableRangePreview.css +1 -0
  34. package/es/assets/CodeView.css +1 -0
  35. package/es/assets/CommonTagsList.css +1 -1
  36. package/es/assets/CreateMcpForm.css +1 -1
  37. package/es/assets/CustomSidebar.css +1 -1
  38. package/es/assets/CustomToggle.css +1 -1
  39. package/es/assets/DialogContainer.css +1 -1
  40. package/es/assets/DocSyncSelect.css +1 -0
  41. package/es/assets/FileDisplay.css +1 -0
  42. package/es/assets/FilePreview.css +1 -1
  43. package/es/assets/FileUploader.css +1 -1
  44. package/es/assets/Logo.css +1 -0
  45. package/es/assets/{index2.css → McpFormDialog.css} +1 -1
  46. package/es/assets/McpParamsSet.css +1 -1
  47. package/es/assets/MdEditor.css +1 -1
  48. package/es/assets/PageContainer.css +1 -1
  49. package/es/assets/ParameterTable.css +1 -1
  50. package/es/assets/PublishRecord.css +1 -1
  51. package/es/assets/RadioGroup.css +1 -1
  52. package/es/assets/SourcePublish.css +1 -1
  53. package/es/assets/layout.css +1 -1
  54. package/es/assets/legacy.css +1 -0
  55. package/es/assets/usePreview.css +10 -1
  56. package/es/chunks/AddOrEditSupplierDialog.BKR0RsiJ.js +721 -0
  57. package/es/chunks/AddOrEditSupplierDialog.CjNRipPe.js +721 -0
  58. package/es/chunks/AiboxTable.CrWMAX84.js +635 -0
  59. package/es/chunks/ApplicationTypeTag.Cbdi0D65.js +47 -0
  60. package/es/chunks/AuthSection.DWD_FxtJ.js +201 -0
  61. package/es/chunks/AutoShowTooltip.C_DI9t2Z.js +82 -0
  62. package/es/chunks/AvailableRangePreview.Bz9QkkAM.js +194 -0
  63. package/es/chunks/AvailableRangeSetting.Bq_K1zar.js +229 -0
  64. package/es/chunks/CodeView.CWuSIL_F.js +148 -0
  65. package/es/chunks/CommonTagsList.DSPdgjc3.js +156 -0
  66. package/es/chunks/CreateMcpForm.BBVVd2RN.js +308 -0
  67. package/es/chunks/CreateMcpForm.C8YfDSEM.js +308 -0
  68. package/es/chunks/CustomSidebar.BSGAhmVY.js +585 -0
  69. package/es/chunks/CustomToggle.BxxsaD-W.js +181 -0
  70. package/es/chunks/DialogContainer.DL7aTMDS.js +129 -0
  71. package/es/chunks/DocSyncSelect.Kk88o9gO.js +2290 -0
  72. package/es/chunks/FileDisplay.B5laA4uX.js +1649 -0
  73. package/es/chunks/FileDisplay.BCTNdpl9.js +1649 -0
  74. package/es/chunks/FileDisplay.CBNYrdsK.js +1560 -0
  75. package/es/chunks/FileDisplay.CJ7KCID6.js +1650 -0
  76. package/es/chunks/FilePreview.B9u8ODHp.js +123 -0
  77. package/es/chunks/FilePreview.De4zHsfc.js +123 -0
  78. package/es/chunks/FileUploader.DD-lopf-.js +216 -0
  79. package/es/chunks/Logo.0myMjGux.js +62 -0
  80. package/es/chunks/McpFormDialog.4HDExbTn.js +297 -0
  81. package/es/chunks/McpFormDialog.DNzqqhaX.js +297 -0
  82. package/es/chunks/McpParamsSet.Tlo_lPn-.js +501 -0
  83. package/es/chunks/MdEditor.DtL0Se7T.js +163 -0
  84. package/es/chunks/PageContainer.DXddaRs1.js +462 -0
  85. package/es/chunks/ParameterTable.BCdnj1gW.js +2010 -0
  86. package/es/chunks/PublishRecord.DEzC7hmP.js +133 -0
  87. package/es/chunks/RadioGroup.Czc1JtkN.js +107 -0
  88. package/es/chunks/SourcePublish.Dx-ltk9U.js +956 -0
  89. package/es/chunks/_plugin-vue_export-helper.Ct3qlEzt.js +8 -0
  90. package/es/chunks/chunk.EU29TkMc.js +20 -0
  91. package/es/chunks/config.MfNKPMiA.js +35 -0
  92. package/es/chunks/config.l1J_qxeB.js +270 -0
  93. package/es/chunks/enums.DDPWAqdV.js +13 -0
  94. package/es/chunks/field-types.zf28gvKR.js +7 -0
  95. package/es/chunks/files.DvOT1nf3.js +14 -0
  96. package/es/chunks/i18n.CxsxtRq_.js +418 -0
  97. package/es/chunks/layout.C9wKDpv-.js +19 -0
  98. package/es/chunks/publish.Z0XAASut.js +50 -0
  99. package/es/chunks/request.CfOHcfgX.js +5 -0
  100. package/es/chunks/usePreview.CMMjOD_o.js +148 -0
  101. package/es/chunks/usePreview.agdxmOk8.js +126 -0
  102. package/es/chunks/withinstall.dLh4K-0g.js +7 -0
  103. package/es/index.mjs +258 -328
  104. package/index.css +1 -1
  105. package/lib/AddOrEditSupplierDialog.js +1 -1
  106. package/lib/ApplicationTypeTag.js +1 -1
  107. package/lib/AuthSection.js +1 -1
  108. package/lib/AutoShowTooltip.js +1 -1
  109. package/lib/AvailableRangePreview.js +1 -1
  110. package/lib/AvailableRangeSetting.js +1 -1
  111. package/lib/CodeView.js +1 -1
  112. package/lib/CommonTagsList.js +1 -1
  113. package/lib/CreateMcpForm.js +1 -1
  114. package/lib/CustomSidebar.js +1 -1
  115. package/lib/CustomTitle.js +1 -1
  116. package/lib/CustomToggle.js +1 -1
  117. package/lib/DialogContainer.js +1 -1
  118. package/lib/DocSyncSelect.js +1 -0
  119. package/lib/FileDisplay.js +1 -1
  120. package/lib/FilePreview.js +1 -1
  121. package/lib/FileUploader.js +1 -1
  122. package/lib/Logo.js +1 -0
  123. package/lib/McpFormDialog.js +1 -1
  124. package/lib/McpParamsSet.js +1 -1
  125. package/lib/MdEditor.js +1 -1
  126. package/lib/PageContainer.js +1 -1
  127. package/lib/ParameterTable.js +1 -1
  128. package/lib/PublishRecord.js +1 -5
  129. package/lib/RadioGroup.js +1 -1
  130. package/lib/SourcePublish.js +1 -1
  131. package/lib/Table.js +1 -1
  132. package/lib/assets/AddOrEditSupplierDialog.css +1 -1
  133. package/lib/assets/AiboxTable.css +1 -1
  134. package/lib/assets/ApplicationTypeTag.css +1 -1
  135. package/lib/assets/AuthSection.css +1 -1
  136. package/lib/assets/AutoShowTooltip.css +1 -1
  137. package/lib/assets/AvailableRangePreview.css +1 -0
  138. package/lib/assets/CodeView.css +1 -0
  139. package/lib/assets/CommonTagsList.css +1 -1
  140. package/lib/assets/CreateMcpForm.css +1 -1
  141. package/lib/assets/CustomSidebar.css +1 -1
  142. package/lib/assets/CustomToggle.css +1 -1
  143. package/lib/assets/DialogContainer.css +1 -1
  144. package/lib/assets/DocSyncSelect.css +1 -0
  145. package/lib/assets/FileDisplay.css +1 -0
  146. package/lib/assets/FilePreview.css +1 -1
  147. package/lib/assets/FileUploader.css +1 -1
  148. package/lib/assets/Logo.css +1 -0
  149. package/lib/assets/{index2.css → McpFormDialog.css} +1 -1
  150. package/lib/assets/McpParamsSet.css +1 -1
  151. package/lib/assets/MdEditor.css +1 -1
  152. package/lib/assets/PageContainer.css +1 -1
  153. package/lib/assets/ParameterTable.css +1 -1
  154. package/lib/assets/PublishRecord.css +1 -1
  155. package/lib/assets/RadioGroup.css +1 -1
  156. package/lib/assets/SourcePublish.css +1 -1
  157. package/lib/assets/layout.css +1 -1
  158. package/lib/assets/legacy.css +1 -0
  159. package/lib/assets/usePreview.css +10 -1
  160. package/lib/chunks/AddOrEditSupplierDialog.D0DSQZiS.js +1 -0
  161. package/lib/chunks/AddOrEditSupplierDialog.XtPxc5yr.js +1 -0
  162. package/lib/chunks/AiboxTable.DFyqwoGc.js +1 -0
  163. package/lib/chunks/ApplicationTypeTag.CZReMt-9.js +1 -0
  164. package/lib/chunks/AuthSection.CP9c-YTW.js +1 -0
  165. package/lib/chunks/AutoShowTooltip.D3QQ36Bm.js +1 -0
  166. package/lib/chunks/AvailableRangePreview.DvREyHNH.js +1 -0
  167. package/lib/chunks/AvailableRangeSetting.DDHTOLJA.js +1 -0
  168. package/lib/chunks/CodeView.DeBxLqyC.js +1 -0
  169. package/lib/chunks/CommonTagsList.DbNcVId5.js +1 -0
  170. package/lib/chunks/CreateMcpForm.Cm9eHXWg.js +1 -0
  171. package/lib/chunks/CreateMcpForm.DNijYbgd.js +1 -0
  172. package/lib/chunks/CustomSidebar.Dojb1xoS.js +1 -0
  173. package/lib/chunks/CustomToggle.Dz7MRyOY.js +1 -0
  174. package/lib/chunks/DialogContainer.C0Hsohgn.js +1 -0
  175. package/lib/chunks/DocSyncSelect.1gaXRzps.js +2 -0
  176. package/lib/chunks/FileDisplay.B4gn0Jhp.js +59 -0
  177. package/lib/chunks/FileDisplay.B7JWIcFg.js +59 -0
  178. package/lib/chunks/FileDisplay.BSNmvK44.js +59 -0
  179. package/lib/chunks/FileDisplay.DjtHza32.js +59 -0
  180. package/lib/chunks/FilePreview.DX9e8_nx.js +1 -0
  181. package/lib/chunks/FilePreview.b1Gine59.js +1 -0
  182. package/lib/chunks/FileUploader.6IW_QL-h.js +1 -0
  183. package/lib/chunks/Logo.Jr7hhaH0.js +1 -0
  184. package/lib/chunks/McpFormDialog.CL2bInts.js +6 -0
  185. package/lib/chunks/McpFormDialog.DbhQIwYW.js +6 -0
  186. package/lib/chunks/McpParamsSet.BYrxVvDL.js +1 -0
  187. package/lib/chunks/MdEditor.rVQbuxCg.js +1 -0
  188. package/lib/chunks/PageContainer.elwvD8VL.js +1 -0
  189. package/lib/chunks/ParameterTable.CeufAEXh.js +1 -0
  190. package/lib/chunks/PublishRecord.B7xYlRKJ.js +5 -0
  191. package/lib/chunks/RadioGroup.cl57IvY3.js +1 -0
  192. package/lib/chunks/SourcePublish.K4tntn9l.js +1 -0
  193. package/lib/chunks/_plugin-vue_export-helper.Bgn9wawX.js +1 -0
  194. package/lib/chunks/chunk.BbA6Ugdl.js +1 -0
  195. package/lib/chunks/config.CDNV0bUm.js +1 -0
  196. package/lib/chunks/config.CZl1kYtI.js +1 -0
  197. package/lib/chunks/enums.DbdzzIzx.js +1 -0
  198. package/lib/chunks/field-types.C6f_z2S_.js +1 -0
  199. package/lib/chunks/files.BEXWmB32.js +1 -0
  200. package/lib/chunks/i18n.BGe5gOau.js +1 -0
  201. package/lib/chunks/layout.CK394aWE.js +1 -0
  202. package/lib/chunks/publish.DsepP8ll.js +1 -0
  203. package/lib/chunks/request.BuoFTs7h.js +1 -0
  204. package/lib/chunks/usePreview.7CCbmgQM.js +1 -0
  205. package/lib/chunks/usePreview.Dmhz8azZ.js +1 -0
  206. package/lib/chunks/withinstall.65aRnaVc.js +1 -0
  207. package/lib/index.js +2 -1
  208. package/package.json +6 -6
  209. package/es/AiboxTabs.mjs +0 -71
  210. package/es/ExampleComponent.mjs +0 -35
  211. package/es/assets/AiboxTabs.css +0 -1
  212. package/es/assets/BackBar.css +0 -1
  213. package/es/assets/ExampleComponent.css +0 -1
  214. package/es/assets/index.css +0 -1
  215. package/es/assets/index3.css +0 -1
  216. package/es/assets/index4.css +0 -1
  217. package/es/assets/index5.css +0 -1
  218. package/es/assets/index6.css +0 -1
  219. package/es/chunks/AiboxTable.DUGBBVXh.js +0 -645
  220. package/es/chunks/BackBar.B5Er8ZdJ.js +0 -645
  221. package/es/chunks/BackBar.Bc2NIuzk.js +0 -645
  222. package/es/chunks/BackBar.Cv1wxUcM.js +0 -645
  223. package/es/chunks/BackBar.DJV4JaUM.js +0 -645
  224. package/es/chunks/_plugin-vue_export-helper.CHgC5LLL.js +0 -9
  225. package/es/chunks/config.8htFF04x.js +0 -325
  226. package/es/chunks/config.BPp4hMBq.js +0 -325
  227. package/es/chunks/config.BU21Gda2.js +0 -49
  228. package/es/chunks/config.BzCGum_W.js +0 -49
  229. package/es/chunks/config.CFWGjEdA.js +0 -49
  230. package/es/chunks/config.CfWAdyUH.js +0 -325
  231. package/es/chunks/config.DPkdwjwD.js +0 -49
  232. package/es/chunks/config.DTMcCH58.js +0 -325
  233. package/es/chunks/config.Dklrsn-B.js +0 -49
  234. package/es/chunks/config.DqhQdkz7.js +0 -325
  235. package/es/chunks/config.RrNwuFkQ.js +0 -325
  236. package/es/chunks/config.gNZ_rT87.js +0 -325
  237. package/es/chunks/enums.CfSBDD6u.js +0 -83
  238. package/es/chunks/enums.DuBbLcd-.js +0 -83
  239. package/es/chunks/enums.Dvec-maC.js +0 -62
  240. package/es/chunks/field-types.CPnMOjle.js +0 -13
  241. package/es/chunks/files.cduUqjHX.js +0 -16
  242. package/es/chunks/i18n.DDMVloiU.js +0 -443
  243. package/es/chunks/i18n.DmqkiK-h.js +0 -444
  244. package/es/chunks/i18n.Vhq-tZPw.js +0 -94
  245. package/es/chunks/i18n.k9Q_HVMs.js +0 -443
  246. package/es/chunks/i18n.ro9yz7rE.js +0 -94
  247. package/es/chunks/index.BSA3IKSF.js +0 -111
  248. package/es/chunks/index.BT1khSY9.js +0 -111
  249. package/es/chunks/index.CDvh263l.js +0 -257
  250. package/es/chunks/index.CLyfh6p1.js +0 -257
  251. package/es/chunks/index.CSjjAi3w.js +0 -396
  252. package/es/chunks/index.CdEBk4F_.js +0 -134
  253. package/es/chunks/index.CgbxJCEU.js +0 -265
  254. package/es/chunks/index.CuDwuRO7.js +0 -265
  255. package/es/chunks/index.DB0ayMv8.js +0 -257
  256. package/es/chunks/index.DWR4lc30.js +0 -203
  257. package/es/chunks/index.GuEzdh6b.js +0 -257
  258. package/es/chunks/index.aMb6IVQD.js +0 -257
  259. package/es/chunks/index.bCzIhWFw.js +0 -7
  260. package/es/chunks/index.ml5i7aB5.js +0 -257
  261. package/es/chunks/index.s-YxIOfq.js +0 -301
  262. package/es/chunks/index.uOZzvHrF.js +0 -135
  263. package/es/chunks/layout.BREUWPEJ.js +0 -26
  264. package/es/chunks/publish.BCb7nCo9.js +0 -50
  265. package/es/chunks/publish.D6friivo.js +0 -50
  266. package/es/chunks/publish.DlD0o09n.js +0 -50
  267. package/es/chunks/publish.Dqzn7qEl.js +0 -50
  268. package/es/chunks/request.24c3shPx.js +0 -5
  269. package/es/chunks/usePreview.B5lboHeg.js +0 -153
  270. package/es/chunks/usePreview.C36fNlVd.js +0 -153
  271. package/es/i18n.mjs +0 -17
  272. package/lib/AiboxTabs.js +0 -1
  273. package/lib/ExampleComponent.js +0 -1
  274. package/lib/assets/AiboxTabs.css +0 -1
  275. package/lib/assets/BackBar.css +0 -1
  276. package/lib/assets/ExampleComponent.css +0 -1
  277. package/lib/assets/index.css +0 -1
  278. package/lib/assets/index3.css +0 -1
  279. package/lib/assets/index4.css +0 -1
  280. package/lib/assets/index5.css +0 -1
  281. package/lib/assets/index6.css +0 -1
  282. package/lib/chunks/AiboxTable.BnoHJ7xL.js +0 -1
  283. package/lib/chunks/BackBar.C8Xrc6qW.js +0 -1
  284. package/lib/chunks/BackBar.CZsNxoX1.js +0 -1
  285. package/lib/chunks/BackBar.s5_vN6jt.js +0 -1
  286. package/lib/chunks/_plugin-vue_export-helper.BHFhmbuH.js +0 -1
  287. package/lib/chunks/config.1oaIKLGn.js +0 -1
  288. package/lib/chunks/config.B0XKkp1w.js +0 -1
  289. package/lib/chunks/config.BCAuBVxV.js +0 -1
  290. package/lib/chunks/config.BF7MO0O5.js +0 -1
  291. package/lib/chunks/config.Bs7sh3aP.js +0 -1
  292. package/lib/chunks/config.C1w4hgfw.js +0 -1
  293. package/lib/chunks/config.ClERt2RF.js +0 -1
  294. package/lib/chunks/enums.Dmq4PdUc.js +0 -1
  295. package/lib/chunks/enums.DnuzPZCR.js +0 -1
  296. package/lib/chunks/field-types.Ch_2yDfg.js +0 -1
  297. package/lib/chunks/files.B3-8UC0v.js +0 -1
  298. package/lib/chunks/i18n.CL5L6nx6.js +0 -1
  299. package/lib/chunks/i18n.DgOp_D7R.js +0 -1
  300. package/lib/chunks/i18n.aAXi5igh.js +0 -1
  301. package/lib/chunks/index.BNqTEn3K.js +0 -1
  302. package/lib/chunks/index.BZcSlgOO.js +0 -1
  303. package/lib/chunks/index.Bc71XWQn.js +0 -1
  304. package/lib/chunks/index.Bk-RwmaH.js +0 -1
  305. package/lib/chunks/index.BsN4urmi.js +0 -1
  306. package/lib/chunks/index.CH7XdMru.js +0 -1
  307. package/lib/chunks/index.CaidDlAx.js +0 -1
  308. package/lib/chunks/index.CkihWzK6.js +0 -1
  309. package/lib/chunks/index.D7wBInWr.js +0 -1
  310. package/lib/chunks/index.DGWHQFdx.js +0 -6
  311. package/lib/chunks/index.DME62Yfo.js +0 -1
  312. package/lib/chunks/index.DWohILMv.js +0 -1
  313. package/lib/chunks/index.LK2ulXTE.js +0 -1
  314. package/lib/chunks/index.qDAoOzk9.js +0 -1
  315. package/lib/chunks/index.s8vGOJKG.js +0 -1
  316. package/lib/chunks/layout.sgE9JoNq.js +0 -1
  317. package/lib/chunks/publish.3TrK3fZf.js +0 -1
  318. package/lib/chunks/publish.Bw1acrSu.js +0 -1
  319. package/lib/chunks/publish.CA1uSVnm.js +0 -1
  320. package/lib/chunks/request.D8T4MgGX.js +0 -1
  321. package/lib/chunks/usePreview.2PZJSy5w.js +0 -1
  322. package/lib/chunks/usePreview.E5SeS2uw.js +0 -1
  323. package/lib/i18n.js +0 -1
@@ -1,2288 +1,6 @@
1
- import { w as Ke } from "./chunks/index.bCzIhWFw.js";
2
- import { ref as te, onMounted as Ze, resolveComponent as we, createBlock as H, openBlock as b, unref as e, withCtx as A, createVNode as v, createCommentVNode as $, createTextVNode as q, toDisplayString as F, createElementVNode as j, computed as h, provide as et, inject as tt, watch as pe, createElementBlock as W, Fragment as ae, renderList as Ie, mergeModels as ie, useModel as Ee, normalizeClass as ee, nextTick as ve, createSlots as lt } from "vue";
3
- import { ElIcon as Y, ElInput as Z, ElButton as oe, ElTooltip as Oe, ElSelect as ye, ElOption as re, ElDatePicker as at, ElTag as nt, ElMessage as rt, ElCheckbox as Ue } from "element-plus";
4
- import { IconUpload2 as he, Error as ge, IconScene as ot, IconAdd2 as it, IconZuoCopyCopy as Be, IconZuoCopy as Se, IconDelete2 as st, IconAdd as ut, IconTip as be } from "color-message-aibox-vue";
5
- import { useDialog as dt, DialogContainer as ct } from "./DialogContainer.mjs";
6
- import { AiboxTable as ke } from "./Table.mjs";
7
- import { u as ne, j as X } from "./chunks/i18n.DDMVloiU.js";
8
- import { _ as ue } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
9
- import { FileUploader as Ne, getWarnTips as Le, getAcceptType as Ce } from "./FileUploader.mjs";
10
- import { AutoShowTooltip as Re } from "./AutoShowTooltip.mjs";
11
- import './assets/ParameterTable.css';const pt = { class: "action-header" }, mt = { class: "dialog-footer" }, At = {
12
- __name: "OptionValue",
13
- emits: ["createOption"],
14
- setup(i, { expose: r, emit: a }) {
15
- const { t: l } = ne(), { dialogRef: w, showDialog: f, hideDialog: p } = dt(), _ = te(1), C = te([
16
- {
17
- label: "",
18
- value: ""
19
- }
20
- ]), O = te([
21
- {
22
- label: l("COMMON_OPTIONVALUE.LABEL_INDEX"),
23
- //序号
24
- slot: "serialNumber"
25
- },
26
- {
27
- label: l("COMMON_OPTIONVALUE.LABEL_API_VALUE"),
28
- // api接口原值
29
- slot: "value",
30
- minWidth: 150
31
- },
32
- {
33
- label: l("COMMON_OPTIONVALUE.LABEL_OPTION_DISPLAY_VALUE"),
34
- //选项对应显示值
35
- slot: "label",
36
- minWidth: 200,
37
- headerSlot: "nowValue"
38
- },
39
- {
40
- label: l("COMMON_OPTIONVALUE.LABEL_OPERATION"),
41
- slot: "action",
42
- fixed: "right",
43
- minWidth: 100,
44
- headerSlot: "actionHeader"
45
- }
46
- ]), m = te({}), P = () => {
47
- C.value.push({
48
- label: "",
49
- value: ""
50
- }), _.value = C.value.length;
51
- }, D = (c) => {
52
- console.log("option数据", c), m.value = c, c["extend-widget-item"] && c["extend-widget-item"] != "" ? C.value = JSON.parse(c["extend-widget-item"]) : C.value = [
53
- {
54
- label: "",
55
- value: ""
56
- }
57
- ], f();
58
- }, T = () => {
59
- p();
60
- }, M = (c) => {
61
- C.value.splice(c, 1);
62
- }, N = a, g = () => {
63
- const c = C.value.filter(
64
- (o) => o.label.trim() !== "" || o.value.trim() !== ""
65
- );
66
- for (let o of c)
67
- if (o.label.trim() === "" || o.value.trim() === "") {
68
- ElMessage.error(l("COMMON_OPTIONVALUE.LABEL_OPTION_VALUE_REQUIRED"));
69
- return;
70
- }
71
- if (c.length === 0) {
72
- ElMessage.error(l("COMMON_OPTIONVALUE.LABEL_OPTION_VALUE_REQUIRED_TIP"));
73
- return;
74
- }
75
- let d = {
76
- uiid: m.value.uiid,
77
- data: JSON.stringify(c)
78
- };
79
- N("createOption", d), p();
80
- };
81
- return r({ showOption: D, hideOption: T }), Ze(() => {
82
- }), (c, d) => {
83
- const o = we("IconQuery"), s = we("Error");
84
- return b(), H(e(ct), {
85
- title: e(l)("COMMON_OPTIONVALUE.LABEL_OPTION_VALUE_SETTING"),
86
- width: "820px",
87
- ref_key: "dialogRef",
88
- ref: w
89
- }, {
90
- footer: A(() => [
91
- j("div", mt, [
92
- v(e(oe), { onClick: e(p) }, {
93
- default: A(() => [
94
- q(F(e(l)("COMMON_BUTTON.CANCEL_TEXT")), 1)
95
- ]),
96
- _: 1
97
- }, 8, ["onClick"]),
98
- v(e(oe), {
99
- type: "primary",
100
- onClick: g
101
- }, {
102
- default: A(() => [
103
- q(F(e(l)("COMMON_BUTTON.CONFIRM_AFFIRM")), 1)
104
- ]),
105
- _: 1
106
- })
107
- ])
108
- ]),
109
- default: A(() => [
110
- v(e(ke), {
111
- columns: O.value,
112
- data: C.value,
113
- hasPage: !1,
114
- total: _.value
115
- }, {
116
- nowValue: A(() => [
117
- q(F(e(l)("COMMON_OPTIONVALUE.LABEL_OPTION_VALUE")) + " ", 1),
118
- v(e(Oe), {
119
- placement: "top",
120
- "max-width": 50
121
- }, {
122
- content: A(() => [
123
- q(F(e(l)("COMMON_OPTIONVALUE.LABEL_OPTION_VALUE_TIP")), 1),
124
- d[0] || (d[0] = j("br", null, null, -1)),
125
- q(" " + F(e(l)("COMMON_OPTIONVALUE.LABEL_OPTION_VALUE_EXAMPLE")), 1),
126
- d[1] || (d[1] = j("br", null, null, -1)),
127
- q(" " + F(e(l)("COMMON_OPTIONVALUE.LABEL_OPTION_EXAMPLE")), 1),
128
- d[2] || (d[2] = j("br", null, null, -1)),
129
- q(" " + F(e(l)("COMMON_OPTIONVALUE.LABEL_OPTION_EXAMPLE_2")), 1),
130
- d[3] || (d[3] = j("br", null, null, -1))
131
- ]),
132
- default: A(() => [
133
- v(e(Y), { style: { "margin-left": "5px", cursor: "pointer" } }, {
134
- default: A(() => [
135
- v(o)
136
- ]),
137
- _: 1
138
- })
139
- ]),
140
- _: 1
141
- })
142
- ]),
143
- actionHeader: A(() => [
144
- j("div", pt, [
145
- j("span", null, F(e(l)("COMMON_OPTIONVALUE.LABEL_OPERATION")), 1),
146
- v(e(oe), {
147
- type: "primary",
148
- size: "small",
149
- onClick: P,
150
- icon: "IconAdd"
151
- }, {
152
- default: A(() => [
153
- q(F(e(l)("COMMON_BUTTON.ADD_NEW_TEXT")), 1)
154
- ]),
155
- _: 1
156
- })
157
- ])
158
- ]),
159
- serialNumber: A((E) => [
160
- q(F(E.index + 1), 1)
161
- ]),
162
- label: A((E) => [
163
- v(e(Z), {
164
- modelValue: E.row.label,
165
- "onUpdate:modelValue": (L) => E.row.label = L,
166
- style: { width: "100%" },
167
- placeholder: e(l)("COMMON_DATA.PLACEHOLDER_INPUT")
168
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
169
- ]),
170
- value: A((E) => [
171
- v(e(Z), {
172
- modelValue: E.row.value,
173
- "onUpdate:modelValue": (L) => E.row.value = L,
174
- style: { width: "100%" },
175
- placeholder: e(l)("COMMON_DATA.PLACEHOLDER_INPUT")
176
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
177
- ]),
178
- action: A((E) => [
179
- C.value.length > 1 ? (b(), H(e(Y), {
180
- key: 0,
181
- style: { cursor: "pointer", color: "red" },
182
- onClick: (L) => M(E.index)
183
- }, {
184
- default: A(() => [
185
- v(s)
186
- ]),
187
- _: 1
188
- }, 8, ["onClick"])) : $("", !0)
189
- ]),
190
- _: 1
191
- }, 8, ["columns", "data", "total"])
192
- ]),
193
- _: 1
194
- }, 8, ["title"]);
195
- };
196
- }
197
- }, yt = /* @__PURE__ */ ue(At, [["__scopeId", "data-v-123f05aa"]]);
198
- function ft(i) {
199
- const r = h(() => i.isPluginMode), a = h(() => i.isDataType), l = h(() => i.justString), w = h(() => i.forceRequired), f = h(() => i.showMoreColumns), p = h(() => i.setType && i.setType.length === 1), _ = h(() => r.value && a.value), C = h(() => r.value && l.value), O = h(() => !r.value && a.value), m = h(() => !r.value && l.value), P = h(() => {
200
- const T = r.value, M = a.value, N = i.customFieldName;
201
- return N || (T && M ? {
202
- name: "name",
203
- type: "type",
204
- value: "debugValue"
205
- } : T ? {
206
- name: "name",
207
- type: "type",
208
- value: "debugValue"
209
- } : {
210
- name: "dataName",
211
- type: "dataType",
212
- value: "debugValue"
213
- });
214
- });
215
- return {
216
- // 基础模式
217
- isPluginMode: r,
218
- isDataType: a,
219
- isJustString: l,
220
- isForceRequired: w,
221
- showMoreColumns: f,
222
- isSingleType: p,
223
- // 组合模式
224
- isPluginDataTypeMode: _,
225
- isPluginJustStringMode: C,
226
- isNormalDataTypeMode: O,
227
- isNormalJustStringMode: m,
228
- // 字段名策略
229
- getFieldName: (T) => P.value[T] || T
230
- };
231
- }
232
- const He = /* @__PURE__ */ Symbol("ParameterTableContext");
233
- function Et(i) {
234
- const {
235
- props: r,
236
- tableData: a,
237
- emit: l,
238
- getSnowFlakeId: w,
239
- typeList: f,
240
- isSingleType: p,
241
- validationErrors: _,
242
- focusFields: C,
243
- tableRef: O
244
- } = i, { t: m } = ne(), P = ft(r), D = P.getFieldName, N = {
245
- // 基础配置
246
- props: r,
247
- tableData: a,
248
- emit: l,
249
- getSnowFlakeId: w,
250
- typeList: f,
251
- isSingleType: p,
252
- // 状态管理
253
- validationErrors: _,
254
- focusFields: C,
255
- tableRef: O,
256
- // 模式策略管理器(统一模式判断逻辑)
257
- modeStrategy: P,
258
- // 字段映射(从 modeStrategy 获取)
259
- getFieldName: D,
260
- getFieldValue: (g, c) => {
261
- const d = D(c);
262
- return g[d];
263
- },
264
- setFieldValue: (g, c, d) => {
265
- const o = D(c);
266
- g[o] = d;
267
- },
268
- // 模式判断(从 modeStrategy 导出,保持向后兼容)
269
- isPluginMode: P.isPluginMode,
270
- isDataType: P.isDataType,
271
- isJustString: P.isJustString,
272
- isForceRequired: P.isForceRequired,
273
- showMoreColumns: P.showMoreColumns,
274
- // 组合模式判断
275
- isPluginDataTypeMode: P.isPluginDataTypeMode,
276
- isPluginJustStringMode: P.isPluginJustStringMode,
277
- isNormalDataTypeMode: P.isNormalDataTypeMode,
278
- isNormalJustStringMode: P.isNormalJustStringMode,
279
- // 其他 props 相关的计算属性
280
- disabled: h(() => r.disabled),
281
- forceRequired: h(() => r.forceRequired),
282
- location: h(() => r.location),
283
- setType: h(() => r.setType),
284
- disabledFields: h(() => r.disabledFields),
285
- inputItemNamesArr: h(() => r.inputItemNamesArr),
286
- // 工具方法
287
- /**
288
- * 触发表格数据响应式更新
289
- */
290
- triggerTableUpdate: () => {
291
- a.value = [...a.value];
292
- },
293
- /**
294
- * 判断字段是否被禁用
295
- * @param {String} fieldName - 字段名
296
- * @returns {Boolean} 是否禁用
297
- */
298
- isFieldDisabled: (g) => {
299
- const c = r.disabledFields;
300
- return !c || !Array.isArray(c) ? !1 : c.includes(g);
301
- },
302
- /**
303
- * 判断是否可以新增行
304
- * @returns {Boolean} 是否可以新增
305
- */
306
- canAddRow: () => {
307
- if (r.disabled) return !1;
308
- const g = r.disabledFields;
309
- return !g || !Array.isArray(g) ? !0 : !g.includes("add");
310
- },
311
- /**
312
- * 判断是否可以删除行
313
- * @returns {Boolean} 是否可以删除
314
- */
315
- canDeleteRow: () => {
316
- if (r.disabled) return !1;
317
- const g = r.disabledFields;
318
- return !g || !Array.isArray(g) ? !0 : !g.includes("delete");
319
- }
320
- };
321
- return et(He, N), N;
322
- }
323
- function _e() {
324
- const i = tt(He);
325
- if (!i)
326
- throw new Error(
327
- t("COMMON_PARAMETERTABLE.ERROR_USE_PARAMETER_TABLE_CONTEXT") + t("COMMON_PARAMETERTABLE.ERROR_USE_PARAMETER_TEXT")
328
- );
329
- return i;
330
- }
331
- const _t = { class: "parameter-format-selector" }, vt = {
332
- __name: "ParameterFormatSelector",
333
- props: {
334
- modelValue: {
335
- type: String,
336
- default: ""
337
- },
338
- disabled: {
339
- type: Boolean,
340
- default: !1
341
- },
342
- // 传入完整的行数据,用于编辑选项值
343
- rowData: {
344
- type: Object,
345
- required: !0
346
- }
347
- },
348
- emits: ["update:modelValue", "change", "optionCreated"],
349
- setup(i, { emit: r }) {
350
- const { t: a } = ne(), l = i, w = r, { getFieldName: f } = _e(), p = [
351
- {
352
- label: a("COMMON_DATA.PLACEHOLDER_SINGLE_LINE_TEXT"),
353
- //单行文本框
354
- value: "input",
355
- supportTypes: ["string", "integer", "number", "boolean"]
356
- // 通用类型都支持
357
- },
358
- {
359
- label: a("COMMON_DATA.PLACEHOLDER_MULTI_LINE_TEXT"),
360
- //多行文本框
361
- value: "multi-input",
362
- supportTypes: ["string", "integer", "number", "boolean"]
363
- // 只有 string 支持多行文本
364
- },
365
- {
366
- label: a("COMMON_DATA.PLACEHOLDER_CHECKBOX"),
367
- //多选框
368
- value: "checkbox",
369
- supportTypes: ["string"]
370
- // 字符串和字符串数组
371
- },
372
- {
373
- label: a("COMMON_DATA.PLACEHOLDER_RADIO_BUTTON"),
374
- //单选框
375
- value: "radio-button",
376
- supportTypes: ["string", "integer", "number", "boolean"]
377
- // 只有 string 支持单选
378
- },
379
- {
380
- label: a("COMMON_DATA.PLACEHOLDER_TIME_DATETIME"),
381
- //时间日期选择器
382
- value: "datetime",
383
- supportTypes: ["string"]
384
- // 时间类型
385
- },
386
- {
387
- label: a("COMMON_DATA.PLACEHOLDER_IMAGE"),
388
- //图片
389
- value: "image",
390
- supportTypes: ["file"]
391
- // 图片类型
392
- },
393
- {
394
- label: a("COMMON_DATA.PLACEHOLDER_FILE"),
395
- //文件
396
- value: "file",
397
- supportTypes: ["file"]
398
- // 文件类型
399
- }
400
- ], _ = te(l.modelValue), C = te(null), O = h(() => {
401
- const M = l.rowData[f("type")];
402
- return M ? p.filter((N) => N.supportTypes.includes(M)) : p;
403
- }), m = h(() => _.value === "checkbox" || _.value === "radio-button");
404
- pe(
405
- () => l.modelValue,
406
- (M) => {
407
- _.value = M;
408
- }
409
- ), pe(
410
- () => l.rowData[f("type")],
411
- (M) => {
412
- if (M && _.value) {
413
- const N = p.find(
414
- (g) => g.value === _.value
415
- );
416
- N && !N.supportTypes.includes(M) && (_.value = "input", w("update:modelValue", "input"), w("change", "input", l.rowData));
417
- }
418
- }
419
- );
420
- const P = () => {
421
- w("update:modelValue", _.value), w("change", _.value, l.rowData);
422
- }, D = () => {
423
- C.value && C.value.showOption(l.rowData);
424
- }, T = (M) => {
425
- w("optionCreated", M);
426
- };
427
- return (M, N) => {
428
- const g = we("IconEdit2");
429
- return b(), W("div", _t, [
430
- v(e(ye), {
431
- modelValue: _.value,
432
- "onUpdate:modelValue": N[0] || (N[0] = (c) => _.value = c),
433
- disabled: i.disabled,
434
- placeholder: e(a)("COMMON_DATA.PLACEHOLDER_SELECT"),
435
- style: { width: "100%" },
436
- onChange: P
437
- }, {
438
- default: A(() => [
439
- (b(!0), W(ae, null, Ie(O.value, (c) => (b(), H(e(re), {
440
- key: c.value,
441
- label: c.label,
442
- value: c.value
443
- }, null, 8, ["label", "value"]))), 128))
444
- ]),
445
- _: 1
446
- }, 8, ["modelValue", "disabled", "placeholder"]),
447
- m.value ? (b(), H(e(Y), {
448
- key: 0,
449
- class: "edit-icon",
450
- onClick: D
451
- }, {
452
- default: A(() => [
453
- v(g)
454
- ]),
455
- _: 1
456
- })) : $("", !0),
457
- v(yt, {
458
- ref_key: "optionValueDialog",
459
- ref: C,
460
- onCreateOption: T
461
- }, null, 512)
462
- ]);
463
- };
464
- }
465
- }, Ot = /* @__PURE__ */ ue(vt, [["__scopeId", "data-v-7c6c8204"]]), fe = [
466
- {
467
- label: "String",
468
- value: "string",
469
- example: ""
470
- },
471
- {
472
- label: "Number",
473
- value: "number",
474
- example: 0
475
- },
476
- {
477
- label: "Integer",
478
- value: "integer",
479
- example: 0
480
- },
481
- {
482
- label: "Boolean",
483
- value: "boolean",
484
- example: !1
485
- },
486
- {
487
- label: "File",
488
- value: "file",
489
- example: ""
490
- },
491
- {
492
- label: "Object",
493
- value: "object",
494
- example: {}
495
- },
496
- {
497
- label: "Array<String>",
498
- value: "arrayString",
499
- example: []
500
- },
501
- {
502
- label: "Array<Number>",
503
- value: "arrayNumber",
504
- example: []
505
- },
506
- {
507
- label: "Array<Integer>",
508
- value: "arrayInteger",
509
- example: []
510
- },
511
- {
512
- label: "Array<Boolean>",
513
- value: "arrayBoolean",
514
- example: []
515
- },
516
- {
517
- label: "Array<File>",
518
- value: "arrayFile",
519
- example: []
520
- },
521
- {
522
- label: "Array<Object>",
523
- value: "arrayObject",
524
- example: []
525
- }
526
- ], De = (() => {
527
- const i = {};
528
- return fe.forEach((r) => {
529
- i[r.value] = r.label;
530
- }), i;
531
- })(), Mt = [
532
- "arrayString",
533
- "arrayFile",
534
- "arrayInteger",
535
- "arrayNumber",
536
- "arrayObject",
537
- "arrayBoolean",
538
- "arrayImage"
539
- ], hl = ["GET", "HEAD"], gl = [
540
- {
541
- value: "POST",
542
- label: "POST"
543
- },
544
- {
545
- value: "GET",
546
- label: "GET"
547
- },
548
- {
549
- value: "PUT",
550
- label: "PUT"
551
- },
552
- {
553
- value: "DELETE",
554
- label: "DELETE"
555
- },
556
- {
557
- value: "PATCH",
558
- label: "PATCH"
559
- },
560
- {
561
- value: "HEAD",
562
- label: "HEAD"
563
- }
564
- ], Pe = {
565
- 卡片: "Card",
566
- 按钮: "Button",
567
- 面板: "Panel",
568
- 自定义: "Custom"
569
- }, se = (i) => Mt.includes(i) || i === "array", ce = (i, r) => {
570
- const { nameField: a, typeField: l, valueField: w } = r;
571
- if (!i.children || i.children.length === 0)
572
- return;
573
- const f = i[l];
574
- if (se(f)) {
575
- const p = [];
576
- return i.children.forEach((_) => {
577
- if (_.children && _.children.length > 0)
578
- p.push(ce(_, r));
579
- else {
580
- const C = _[w];
581
- let O = C !== void 0 && C !== "" ? C : "";
582
- const m = _[l];
583
- m === "number" || m === "integer" ? O = O === "" ? 0 : Number(O) : m === "boolean" ? O = O === "" ? !1 : !!O : m === "object" && (O = ce(_, r) || {}), p.push(O);
584
- }
585
- }), p;
586
- }
587
- if (f === "object") {
588
- const p = {};
589
- return i.children.forEach((_) => {
590
- const C = _[a];
591
- if (!(!C || C === "[Array Item]"))
592
- if (_.children && _.children.length > 0)
593
- p[C] = ce(_, r);
594
- else {
595
- const O = _[w];
596
- let m = O !== void 0 && O !== "" ? O : "";
597
- const P = _[l];
598
- P === "number" || P === "integer" ? m = m === "" ? 0 : Number(m) : P === "boolean" ? m = m === "" ? !1 : !!m : P === "object" ? m = ce(_, r) || {} : se(P) && (m = ce(_, r) || []), p[C] = m;
599
- }
600
- }), p;
601
- }
602
- }, Tt = { class: "value-cell" }, ht = {
603
- key: 2,
604
- class: "filename-box"
605
- }, gt = {
606
- key: 4,
607
- class: "filename-box"
608
- }, bt = {
609
- key: 1,
610
- class: "filename-box"
611
- }, Nt = {
612
- key: 1,
613
- class: "error-message"
614
- }, Lt = {
615
- __name: "ValueCell",
616
- props: /* @__PURE__ */ ie({
617
- row: {
618
- type: Object,
619
- required: !0
620
- }
621
- }, {
622
- value: {
623
- type: [String, Number, Boolean, Object, Array],
624
- default: ""
625
- },
626
- valueModifiers: {},
627
- type: {
628
- type: String,
629
- default: "string"
630
- },
631
- typeModifiers: {}
632
- }),
633
- emits: ["update:value", "update:type"],
634
- setup(i) {
635
- const { t: r } = ne(), a = i, l = Ee(i, "value"), w = Ee(i, "type"), f = _e(), {
636
- isFieldDisabled: p,
637
- props: _,
638
- emit: C,
639
- getFieldName: O,
640
- validationErrors: m
641
- } = f, P = h(() => _.isPluginMode), D = h(() => _.disabled), T = h(() => {
642
- if (!P.value || !a.row.required) return null;
643
- const R = a.row.uiid, y = O("value");
644
- return m.value[R]?.[y];
645
- }), M = h(() => !!T.value), N = h(() => D.value || a.row.disabled || p("value")), g = h(() => a.row.extendWidgetType === "file" || w.value === "file"), c = h(() => a.row[O("type")] === "image" || a.row[O("type")] === "file"), d = h(() => {
646
- const R = a.row["extend-widget-item"];
647
- if (!R) return [];
648
- if (Array.isArray(R)) return R;
649
- try {
650
- return typeof R == "string" ? JSON.parse(R) : [];
651
- } catch {
652
- return [];
653
- }
654
- }), o = () => {
655
- if (P.value && a.row.required) {
656
- const R = a.row.uiid, y = O("value"), n = a.row[y];
657
- n == null || n === "" || Array.isArray(n) && n.length === 0 || typeof n == "string" && !n.trim() ? m.value[R] = {
658
- ...m.value[R],
659
- [y]: r("COMMON_DATA.REQUIRED_NULL")
660
- } : m.value[R]?.[y] && (delete m.value[R][y], Object.keys(m.value[R]).length === 0 && delete m.value[R]);
661
- }
662
- }, s = () => {
663
- o(), C("debugger-data-change");
664
- }, E = (R) => {
665
- l.value = R, s();
666
- }, L = () => {
667
- l.value = "", s();
668
- };
669
- return (R, y) => (b(), W("div", Tt, [
670
- !e(se)(w.value) && w.value !== "object" && w.value !== "arrayObject" ? (b(), W(ae, { key: 0 }, [
671
- P.value ? (b(), W(ae, { key: 0 }, [
672
- i.row.extendWidgetType === "datetime" ? (b(), H(e(at), {
673
- key: 0,
674
- modelValue: l.value,
675
- "onUpdate:modelValue": y[0] || (y[0] = (n) => l.value = n),
676
- type: "datetime",
677
- disabled: N.value,
678
- style: { width: "100%" },
679
- placeholder: e(r)("COMMON_DATA.PLACEHOLDER_DATETIME"),
680
- format: "YYYY-MM-DD HH:mm:ss",
681
- "value-format": "YYYY-MM-DD HH:mm:ss",
682
- class: ee({ "error-input": M.value }),
683
- onChange: s
684
- }, null, 8, ["modelValue", "disabled", "placeholder", "class"])) : i.row.extendWidgetType === "image" && !l.value ? (b(), H(e(Ne), {
685
- key: 1,
686
- uploadType: e(Pe).自定义,
687
- acceptType: e(Ce)("image"),
688
- multiple: !1,
689
- limitSize: 1,
690
- limitCount: 1,
691
- warnTips: e(Le)("image"),
692
- onOnSuccess: E
693
- }, {
694
- "upload-box": A(() => [
695
- v(e(oe), {
696
- icon: e(he),
697
- type: "primary"
698
- }, {
699
- default: A(() => [
700
- q(F(e(r)("COMMON_BUTTON.UPLOAD_IMAGE_TEXT")), 1)
701
- ]),
702
- _: 1
703
- }, 8, ["icon"])
704
- ]),
705
- _: 1
706
- }, 8, ["uploadType", "acceptType", "warnTips"])) : i.row.extendWidgetType === "image" && l.value ? (b(), W("div", ht, [
707
- j("div", null, [
708
- v(e(Re), { content: l.value }, {
709
- default: A(() => [
710
- q(F(l.value.effectiveUrl), 1)
711
- ]),
712
- _: 1
713
- }, 8, ["content"])
714
- ]),
715
- v(e(Y), {
716
- class: "filename-icon",
717
- onClick: L
718
- }, {
719
- default: A(() => [
720
- v(e(ge))
721
- ]),
722
- _: 1
723
- })
724
- ])) : g.value && !l.value ? (b(), H(e(Ne), {
725
- key: 3,
726
- uploadType: e(Pe).自定义,
727
- acceptType: e(Ce)("file"),
728
- multiple: !1,
729
- limitSize: 1,
730
- limitCount: 1,
731
- warnTips: e(Le)("file"),
732
- onOnSuccess: E
733
- }, {
734
- "upload-box": A(() => [
735
- v(e(oe), {
736
- icon: e(he),
737
- type: "primary"
738
- }, {
739
- default: A(() => [
740
- q(F(e(r)("COMMON_BUTTON.UPLOAD_FILE_TEXT")), 1)
741
- ]),
742
- _: 1
743
- }, 8, ["icon"])
744
- ]),
745
- _: 1
746
- }, 8, ["uploadType", "acceptType", "warnTips"])) : g.value && l.value ? (b(), W("div", gt, [
747
- j("div", null, [
748
- v(e(Re), { content: l.value }, {
749
- default: A(() => [
750
- q(F(l.value.effectiveUrl), 1)
751
- ]),
752
- _: 1
753
- }, 8, ["content"])
754
- ]),
755
- v(e(Y), {
756
- class: "filename-icon",
757
- onClick: L
758
- }, {
759
- default: A(() => [
760
- v(e(ge))
761
- ]),
762
- _: 1
763
- })
764
- ])) : i.row.extendWidgetType === "checkbox" || i.row.extendWidgetType === "radio-button" ? (b(), H(e(ye), {
765
- key: 5,
766
- modelValue: l.value,
767
- "onUpdate:modelValue": y[1] || (y[1] = (n) => l.value = n),
768
- multiple: i.row.extendWidgetType === "checkbox",
769
- style: { width: "100%" },
770
- disabled: N.value,
771
- placeholder: e(r)("COMMON_DATA.PLACEHOLDER_SELECT"),
772
- class: ee({ "error-select": M.value }),
773
- onChange: s
774
- }, {
775
- default: A(() => [
776
- (b(!0), W(ae, null, Ie(d.value, (n) => (b(), H(e(re), {
777
- key: n.value,
778
- label: n.label,
779
- value: n.value
780
- }, null, 8, ["label", "value"]))), 128))
781
- ]),
782
- _: 1
783
- }, 8, ["modelValue", "multiple", "disabled", "placeholder", "class"])) : i.row.extendWidgetType === "multi-input" ? (b(), H(e(Z), {
784
- key: 6,
785
- modelValue: l.value,
786
- "onUpdate:modelValue": y[2] || (y[2] = (n) => l.value = n),
787
- type: "textarea",
788
- rows: 3,
789
- onBlur: s,
790
- disabled: N.value,
791
- style: { width: "100%" },
792
- placeholder: e(r)("COMMON_DATA.PLACEHOLDER_INPUT"),
793
- class: ee({ "error-input": M.value })
794
- }, null, 8, ["modelValue", "disabled", "placeholder", "class"])) : i.row[e(O)("type")] === "boolean" ? (b(), H(e(ye), {
795
- key: 7,
796
- modelValue: l.value,
797
- "onUpdate:modelValue": y[3] || (y[3] = (n) => l.value = n),
798
- onChange: s,
799
- disabled: N.value,
800
- style: { width: "100%" },
801
- placeholder: e(r)("COMMON_DATA.PLACEHOLDER_SELECT")
802
- }, {
803
- default: A(() => [
804
- v(e(re), {
805
- value: !0,
806
- label: "true"
807
- }),
808
- v(e(re), {
809
- value: !1,
810
- label: "false"
811
- })
812
- ]),
813
- _: 1
814
- }, 8, ["modelValue", "disabled", "placeholder"])) : i.row[e(O)("type")] === "number" || i.row[e(O)("type")] === "integer" ? (b(), H(e(Z), {
815
- key: 8,
816
- modelValue: l.value,
817
- "onUpdate:modelValue": y[4] || (y[4] = (n) => l.value = n),
818
- modelModifiers: { number: !0 },
819
- type: "number",
820
- class: "number-input-no-spinner",
821
- onBlur: s,
822
- disabled: N.value,
823
- style: { width: "100%" },
824
- placeholder: e(r)("COMMON_DATA.PLACEHOLDER_NUMBER")
825
- }, null, 8, ["modelValue", "disabled", "placeholder"])) : (b(), H(e(Z), {
826
- key: 9,
827
- modelValue: l.value,
828
- "onUpdate:modelValue": y[5] || (y[5] = (n) => l.value = n),
829
- onBlur: s,
830
- disabled: N.value,
831
- style: { width: "100%" },
832
- placeholder: e(r)("COMMON_DATA.PLACEHOLDER_INPUT"),
833
- class: ee({ "error-input": M.value })
834
- }, null, 8, ["modelValue", "disabled", "placeholder", "class"]))
835
- ], 64)) : (b(), W(ae, { key: 1 }, [
836
- !l.value && c.value ? (b(), H(e(Ne), {
837
- key: 0,
838
- uploadType: e(Pe).自定义,
839
- acceptType: e(Ce)(i.row[e(O)("type")]),
840
- multiple: !1,
841
- limitSize: 1,
842
- limitCount: 1,
843
- warnTips: e(Le)(i.row[e(O)("type")]),
844
- onOnSuccess: E
845
- }, {
846
- "upload-box": A(() => [
847
- v(e(oe), {
848
- icon: e(he),
849
- type: "primary"
850
- }, {
851
- default: A(() => [
852
- q(F(e(r)("COMMON_BUTTON.UPLOADING_TEXT")), 1)
853
- ]),
854
- _: 1
855
- }, 8, ["icon"])
856
- ]),
857
- _: 1
858
- }, 8, ["uploadType", "acceptType", "warnTips"])) : l.value && c.value ? (b(), W("div", bt, [
859
- j("div", null, [
860
- v(e(Re), { content: l.value }, {
861
- default: A(() => [
862
- q(F(l.value.effectiveUrl), 1)
863
- ]),
864
- _: 1
865
- }, 8, ["content"])
866
- ]),
867
- v(e(Y), {
868
- class: "filename-icon",
869
- onClick: L
870
- }, {
871
- default: A(() => [
872
- v(e(ge))
873
- ]),
874
- _: 1
875
- })
876
- ])) : i.row[e(O)("type")] === "boolean" ? (b(), H(e(ye), {
877
- key: 2,
878
- modelValue: l.value,
879
- "onUpdate:modelValue": y[6] || (y[6] = (n) => l.value = n),
880
- onChange: s,
881
- disabled: N.value,
882
- style: { width: "100%" },
883
- placeholder: e(r)("COMMON_DATA.PLACEHOLDER_SELECT"),
884
- class: ee({ "error-select": M.value })
885
- }, {
886
- default: A(() => [
887
- v(e(re), {
888
- value: !0,
889
- label: "true"
890
- }),
891
- v(e(re), {
892
- value: !1,
893
- label: "false"
894
- })
895
- ]),
896
- _: 1
897
- }, 8, ["modelValue", "disabled", "placeholder", "class"])) : i.row[e(O)("type")] === "number" || i.row[e(O)("type")] === "integer" ? (b(), H(e(Z), {
898
- key: 3,
899
- modelValue: l.value,
900
- "onUpdate:modelValue": y[7] || (y[7] = (n) => l.value = n),
901
- modelModifiers: { number: !0 },
902
- type: "number",
903
- class: ee(["number-input-no-spinner", { "error-input": M.value }]),
904
- onBlur: s,
905
- disabled: N.value,
906
- style: { width: "100%" },
907
- placeholder: e(r)("COMMON_DATA.PLACEHOLDER_NUMBER")
908
- }, null, 8, ["modelValue", "class", "disabled", "placeholder"])) : (b(), H(e(Z), {
909
- key: 4,
910
- modelValue: l.value,
911
- "onUpdate:modelValue": y[8] || (y[8] = (n) => l.value = n),
912
- onBlur: s,
913
- disabled: N.value,
914
- style: { width: "100%" },
915
- placeholder: e(r)("COMMON_DATA.PLACEHOLDER_INPUT"),
916
- class: ee({ "error-input": M.value })
917
- }, null, 8, ["modelValue", "disabled", "placeholder", "class"]))
918
- ], 64))
919
- ], 64)) : $("", !0),
920
- T.value ? (b(), W("div", Nt, F(T.value), 1)) : $("", !0)
921
- ]));
922
- }
923
- }, Ct = /* @__PURE__ */ ue(Lt, [["__scopeId", "data-v-eb75b8d0"]]), Rt = { class: "name-input-container" }, Pt = {
924
- key: 0,
925
- class: "array-item-display"
926
- }, wt = {
927
- key: 2,
928
- class: "error-message"
929
- }, Dt = {
930
- __name: "NameCell",
931
- props: /* @__PURE__ */ ie({
932
- row: {
933
- type: Object,
934
- required: !0
935
- },
936
- arrayItemIndex: {
937
- type: Number,
938
- default: 1
939
- }
940
- }, {
941
- name: {
942
- type: String,
943
- default: ""
944
- },
945
- nameModifiers: {}
946
- }),
947
- emits: /* @__PURE__ */ ie(["focus", "blur"], ["update:name"]),
948
- setup(i, { emit: r }) {
949
- const a = i, l = Ee(i, "name"), w = _e(), {
950
- getFieldName: f,
951
- getFieldValue: p,
952
- isFieldDisabled: _,
953
- props: C,
954
- validationErrors: O,
955
- focusFields: m
956
- } = w, P = r, D = f("name"), T = h(() => p(a.row, "name") === "[Array Item]" && (!C.isDataType || C.isPluginMode)), M = h(() => C.disabled || a.row.disabled || _("name")), N = h(() => a.arrayItemIndex), g = h(() => O.value[a.row.uiid]?.[D]), c = h(() => m.value[a.row.uiid]?.[D]), d = h(() => g.value && !c.value), o = () => {
957
- m.value[a.row.uiid] || (m.value[a.row.uiid] = {}), m.value[a.row.uiid][D] = !0, P("focus", a.row.uiid, D);
958
- }, s = () => {
959
- m.value[a.row.uiid] && (m.value[a.row.uiid][D] = !1), P("blur", a.row, D);
960
- };
961
- return (E, L) => (b(), W("div", Rt, [
962
- T.value ? (b(), W("div", Pt, [
963
- v(e(nt), {
964
- type: "info",
965
- size: "small",
966
- class: "array-tag"
967
- }, {
968
- default: A(() => [
969
- v(e(Y), null, {
970
- default: A(() => [
971
- v(e(ot))
972
- ]),
973
- _: 1
974
- }),
975
- q(" " + F(E.t("COMMON_PLUGIN_TOOL.LABEL_PARAM_ARRAY_ITEM")) + " " + F(N.value), 1)
976
- ]),
977
- _: 1
978
- })
979
- ])) : (b(), H(e(Z), {
980
- key: 1,
981
- modelValue: l.value,
982
- "onUpdate:modelValue": L[0] || (L[0] = (R) => l.value = R),
983
- disabled: M.value,
984
- onFocus: o,
985
- onBlur: s,
986
- style: { width: "100%" },
987
- placeholder: E.t("COMMON_PLUGIN_TOOL.LABEL_PARAM_NAME_PLACEHOLDER"),
988
- class: ee({ "error-input": d.value })
989
- }, null, 8, ["modelValue", "disabled", "placeholder", "class"])),
990
- d.value ? (b(), W("div", wt, F(g.value), 1)) : $("", !0)
991
- ]));
992
- }
993
- }, It = /* @__PURE__ */ ue(Dt, [["__scopeId", "data-v-b7489171"]]), Vt = { class: "type-select-container" }, Ut = { key: 1 }, Bt = {
994
- key: 2,
995
- class: "error-message"
996
- }, St = {
997
- __name: "TypeCell",
998
- props: /* @__PURE__ */ ie({
999
- row: {
1000
- type: Object,
1001
- required: !0
1002
- }
1003
- }, {
1004
- type: {
1005
- type: String,
1006
- default: "string"
1007
- },
1008
- typeModifiers: {}
1009
- }),
1010
- emits: /* @__PURE__ */ ie(["change"], ["update:type"]),
1011
- setup(i, { emit: r }) {
1012
- const a = i, l = Ee(i, "type"), w = r, f = _e(), {
1013
- getFieldName: p,
1014
- getFieldValue: _,
1015
- isFieldDisabled: C,
1016
- props: O,
1017
- validationErrors: m,
1018
- focusFields: P,
1019
- typeList: D,
1020
- isSingleType: T
1021
- } = f, M = p("type");
1022
- p("name");
1023
- const N = h(() => !(O.justString || _(a.row, "name") === "[Array Item]" && !O.isDataType || T.value)), g = h(() => O.disabled || a.row.disabled || C("type") || a.row["extend-widget-type"] === "input" || a.row["extend-widget-type"] === "multi-input"), c = h(() => {
1024
- const L = _(a.row, "name"), R = a.row[M];
1025
- return L === "[Array Item]" ? De[R] || "String" : T.value && D.value.length > 0 ? D.value[0].label : O.isDataType && De[R] || "String";
1026
- }), d = h(() => m.value[a.row.uiid]?.[M]), o = h(() => P.value[a.row.uiid]?.[M]), s = h(() => d.value && !o.value), E = () => {
1027
- w("change", a.row);
1028
- };
1029
- return (L, R) => (b(), W("div", Vt, [
1030
- N.value ? (b(), H(e(ye), {
1031
- key: 0,
1032
- modelValue: l.value,
1033
- "onUpdate:modelValue": R[0] || (R[0] = (y) => l.value = y),
1034
- "data-uiid": i.row.uiid,
1035
- disabled: g.value,
1036
- placeholder: "Select",
1037
- style: { width: "100%" },
1038
- class: ee({ "error-select": s.value }),
1039
- onChange: E
1040
- }, {
1041
- default: A(() => [
1042
- (b(!0), W(ae, null, Ie(e(D), (y) => (b(), H(e(re), {
1043
- key: y.value,
1044
- label: y.label,
1045
- value: y.value
1046
- }, null, 8, ["label", "value"]))), 128))
1047
- ]),
1048
- _: 1
1049
- }, 8, ["modelValue", "data-uiid", "disabled", "class"])) : (b(), W("span", Ut, F(c.value), 1)),
1050
- s.value ? (b(), W("div", Bt, F(d.value), 1)) : $("", !0)
1051
- ]));
1052
- }
1053
- }, Ft = /* @__PURE__ */ ue(St, [["__scopeId", "data-v-210bfeea"]]), xt = {
1054
- key: 0,
1055
- class: "action-buttons"
1056
- }, kt = {
1057
- __name: "ActionCell",
1058
- props: {
1059
- row: {
1060
- type: Object,
1061
- required: !0
1062
- },
1063
- scope: {
1064
- type: Object,
1065
- required: !0
1066
- }
1067
- },
1068
- emits: ["add-child", "move-up", "move-down", "delete"],
1069
- setup(i, { emit: r }) {
1070
- const { t: a } = ne(), l = i, w = r, f = _e(), {
1071
- getFieldName: p,
1072
- getFieldValue: _,
1073
- canAddRow: C,
1074
- canDeleteRow: O,
1075
- props: m
1076
- } = f, P = h(() => m.disabled), D = h(() => l.row[p("type")]), T = h(() => _(l.row, "name")), M = h(() => m.isDataType ? D.value === "object" || D.value === "arrayObject" : se(D.value) || D.value === "object"), N = h(() => m.isDataType ? D.value === "object" || D.value === "arrayObject" ? a("COMMON_ACTIONCELL.LABEL_ADD_OBJECT_PROPERTY") : a("COMMON_ACTIONCELL.LABEL_ADD_CHILD") : se(D.value) ? D.value === "arrayObject" ? a("COMMON_ACTIONCELL.LABEL_ADD_OBJECT_TO_ARRAY") : a("COMMON_ACTIONCELL.LABEL_ADD_ARRAY_ITEM") : D.value === "object" ? a("COMMON_ACTIONCELL.LABEL_ADD_PROPERTY") : a("COMMON_ACTIONCELL.LABEL_ADD_CHILD")), g = h(() => M.value && C()), c = h(() => T.value === "[Array Item]" && !m.isDataType), d = h(() => m.isDataType && T.value !== "[Array Item]"), o = h(() => l.scope._canMoveUp || !1), s = h(() => l.scope._canMoveDown || !1), E = h(() => P.value || l.row.disabled ? !1 : l.scope._showDelete && O()), L = () => {
1077
- w("add-child", l.scope);
1078
- }, R = () => {
1079
- w("move-up", l.row, "up");
1080
- }, y = () => {
1081
- w("move-down", l.row, "down");
1082
- }, n = () => {
1083
- w("delete", l.scope);
1084
- };
1085
- return (I, V) => P.value ? $("", !0) : (b(), W("div", xt, [
1086
- g.value ? (b(), H(e(Y), {
1087
- key: 0,
1088
- class: "table-form__add",
1089
- onClick: L,
1090
- title: N.value
1091
- }, {
1092
- default: A(() => [
1093
- v(e(it))
1094
- ]),
1095
- _: 1
1096
- }, 8, ["title"])) : $("", !0),
1097
- c.value ? (b(), W(ae, { key: 1 }, [
1098
- o.value ? (b(), H(e(Y), {
1099
- key: 0,
1100
- class: "table-form__action array-action",
1101
- onClick: R,
1102
- title: e(a)("COMMON_ACTIONCELL.LABEL_MOVE_UP")
1103
- }, {
1104
- default: A(() => [
1105
- v(e(Be))
1106
- ]),
1107
- _: 1
1108
- }, 8, ["title"])) : $("", !0),
1109
- s.value ? (b(), H(e(Y), {
1110
- key: 1,
1111
- class: "table-form__action array-action",
1112
- onClick: y,
1113
- title: e(a)("COMMON_ACTIONCELL.LABEL_MOVE_DOWN")
1114
- }, {
1115
- default: A(() => [
1116
- v(e(Se))
1117
- ]),
1118
- _: 1
1119
- }, 8, ["title"])) : $("", !0)
1120
- ], 64)) : $("", !0),
1121
- d.value ? (b(), W(ae, { key: 2 }, [
1122
- o.value ? (b(), H(e(Y), {
1123
- key: 0,
1124
- class: "table-form__action array-action",
1125
- onClick: R,
1126
- title: e(a)("COMMON_ACTIONCELL.LABEL_MOVE_UP")
1127
- }, {
1128
- default: A(() => [
1129
- v(e(Be))
1130
- ]),
1131
- _: 1
1132
- }, 8, ["title"])) : $("", !0),
1133
- s.value ? (b(), H(e(Y), {
1134
- key: 1,
1135
- class: "table-form__action array-action",
1136
- onClick: y,
1137
- title: e(a)("COMMON_ACTIONCELL.LABEL_MOVE_DOWN")
1138
- }, {
1139
- default: A(() => [
1140
- v(e(Se))
1141
- ]),
1142
- _: 1
1143
- }, 8, ["title"])) : $("", !0)
1144
- ], 64)) : $("", !0),
1145
- E.value ? (b(), H(e(Y), {
1146
- key: 3,
1147
- class: "table-form__action",
1148
- onClick: n,
1149
- title: e(a)("COMMON_ACTIONCELL.LABEL_DELETE")
1150
- }, {
1151
- default: A(() => [
1152
- v(e(st))
1153
- ]),
1154
- _: 1
1155
- }, 8, ["title"])) : $("", !0)
1156
- ]));
1157
- }
1158
- }, Ht = /* @__PURE__ */ ue(kt, [["__scopeId", "data-v-54c10aa0"]]), jt = {
1159
- // 参数名称列
1160
- name: {
1161
- get label() {
1162
- return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_NAME");
1163
- },
1164
- slot: "name",
1165
- minWidth: 350,
1166
- headerSlot: "keyHeader",
1167
- required: !0
1168
- },
1169
- // 参数类型列
1170
- type: {
1171
- get label() {
1172
- return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_TYPE");
1173
- },
1174
- slot: "type",
1175
- minWidth: 150,
1176
- headerSlot: "typeHeader",
1177
- required: !0
1178
- },
1179
- // 参数类型列(较窄,用于普通模式)
1180
- typeNarrow: {
1181
- get label() {
1182
- return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_TYPE");
1183
- },
1184
- slot: "type",
1185
- minWidth: 100,
1186
- headerSlot: "typeHeader"
1187
- },
1188
- // 参数描述列(必填)
1189
- descriptionRequired: {
1190
- get label() {
1191
- return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_DESC");
1192
- },
1193
- slot: "description",
1194
- minWidth: 250,
1195
- headerSlot: "descHeader",
1196
- required: !0
1197
- },
1198
- // 参数描述列(非必填)
1199
- description: {
1200
- get label() {
1201
- return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_DESC");
1202
- },
1203
- slot: "description",
1204
- minWidth: 150,
1205
- headerSlot: "descHeader",
1206
- required: !1
1207
- },
1208
- // 参数描述列(普通模式,较窄)
1209
- descriptionNarrow: {
1210
- get label() {
1211
- return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_DESC");
1212
- },
1213
- slot: "description",
1214
- minWidth: 150
1215
- },
1216
- // 是否必填列
1217
- required: {
1218
- get label() {
1219
- return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_REQUIRED");
1220
- },
1221
- slot: "required",
1222
- minWidth: 100
1223
- },
1224
- // 参数显示名列
1225
- showName: {
1226
- get label() {
1227
- return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_SHOW_NAME");
1228
- },
1229
- slot: "showName",
1230
- minWidth: 200,
1231
- headerSlot: "showNameHeader"
1232
- },
1233
- // 默认值列
1234
- default: {
1235
- get label() {
1236
- return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_DEFAULT_VALUE");
1237
- },
1238
- slot: "default",
1239
- minWidth: 180
1240
- },
1241
- // 是否可见列
1242
- isShow: {
1243
- get label() {
1244
- return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_IS_SHOW");
1245
- },
1246
- slot: "isShow",
1247
- minWidth: 150,
1248
- headerSlot: "isShowHeader"
1249
- },
1250
- // 调试值列
1251
- test: {
1252
- get label() {
1253
- return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_TEST_VALUE");
1254
- },
1255
- slot: "test",
1256
- minWidth: 180
1257
- },
1258
- // Mock值列(用于普通模式)
1259
- mock: {
1260
- get label() {
1261
- return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_MOCK_VALUE");
1262
- },
1263
- slot: "test",
1264
- minWidth: 100
1265
- },
1266
- // Mock值列(较宽,用于 justString 模式)
1267
- mockWide: {
1268
- get label() {
1269
- return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_MOCK_VALUE");
1270
- },
1271
- slot: "test",
1272
- minWidth: 180
1273
- },
1274
- // 操作列
1275
- action: {
1276
- get label() {
1277
- return X("COMMON_PARAMETERTABLE.LABEL_OPERATION");
1278
- },
1279
- slot: "action",
1280
- fixed: "right",
1281
- width: 140,
1282
- headerSlot: "actionHeader"
1283
- }
1284
- }, Fe = {
1285
- // 插件模式 - 基础列
1286
- plugin: ["name", "type", "descriptionRequired", "required", "test", "action"],
1287
- // 插件模式 - 更多列
1288
- pluginMore: [
1289
- "name",
1290
- "type",
1291
- "descriptionRequired",
1292
- "required",
1293
- "showName",
1294
- "default",
1295
- "isShow",
1296
- "test",
1297
- "action"
1298
- ],
1299
- // 插件模式 + 数据类型模式
1300
- pluginDataType: ["name", "type", "description", "action"],
1301
- // 插件模式 + justString - 基础列
1302
- pluginJustString: [
1303
- "name",
1304
- "descriptionRequired",
1305
- "required",
1306
- "test",
1307
- "action"
1308
- ],
1309
- // 插件模式 + justString - 更多列
1310
- pluginJustStringMore: [
1311
- "name",
1312
- "descriptionRequired",
1313
- "required",
1314
- "showName",
1315
- "default",
1316
- "isShow",
1317
- "test",
1318
- "action"
1319
- ],
1320
- // 普通模式
1321
- normal: ["name", "typeNarrow", "mock", "action"],
1322
- // 普通模式 + 数据类型模式
1323
- normalDataType: ["name", "typeNarrow", "descriptionNarrow", "action"],
1324
- // 普通模式 + justString
1325
- normalJustString: ["name", "mockWide", "action"]
1326
- };
1327
- function xe(i) {
1328
- return i.map((r) => {
1329
- const a = jt[r];
1330
- if (!a)
1331
- return console.warn(`列配置 "${r}" 不存在`), null;
1332
- const l = Object.create(Object.getPrototypeOf(a));
1333
- return Object.defineProperties(
1334
- l,
1335
- Object.getOwnPropertyDescriptors(a)
1336
- ), l;
1337
- }).filter(Boolean);
1338
- }
1339
- function qt(i) {
1340
- return i.isPluginMode && i.isDataType ? "pluginDataType" : i.justString ? i.isPluginMode ? i.showMoreColumns ? "pluginJustStringMore" : "pluginJustString" : "normalJustString" : i.isPluginMode ? i.showMoreColumns ? "pluginMore" : "plugin" : i.isDataType ? "normalDataType" : "normal";
1341
- }
1342
- function Wt(i) {
1343
- return {
1344
- columns: h(() => {
1345
- const a = qt(i), l = Fe[a];
1346
- return l ? xe(l) : (console.warn(`列预设 "${a}" 不存在,使用默认配置`), xe(Fe.normal));
1347
- })
1348
- };
1349
- }
1350
- function $t(i, r = null) {
1351
- const { t: a } = ne(), {
1352
- getFieldName: l,
1353
- tableData: w,
1354
- validationErrors: f,
1355
- focusFields: p,
1356
- isDataType: _,
1357
- inputItemNamesArr: C
1358
- } = i, O = (d, o, s = null) => {
1359
- for (const E of d) {
1360
- if (E.uiid === o)
1361
- return s;
1362
- if (E.children) {
1363
- const L = O(E.children, o, E);
1364
- if (L) return L;
1365
- }
1366
- }
1367
- return null;
1368
- }, m = (d, o) => {
1369
- for (const s of d) {
1370
- if (s.uiid === o)
1371
- return d;
1372
- if (s.children && s.children.length > 0) {
1373
- const E = m(s.children, o);
1374
- if (E) return E;
1375
- }
1376
- }
1377
- return null;
1378
- }, P = (d, o, s = null, E = {}) => {
1379
- const { checkEmpty: L = !1 } = E, R = /^[a-zA-Z][a-zA-Z0-9_-]*$/, y = s || l("name");
1380
- if (L && !d)
1381
- return f.value[o] = {
1382
- ...f.value[o],
1383
- [y]: a("COMMON_PARAMETERTABLE.ERROR_PARAM_NAME_REQUIRED")
1384
- }, !1;
1385
- if (!d || !R.test(d))
1386
- return f.value[o] = {
1387
- ...f.value[o],
1388
- [y]: a("COMMON_PARAMETERTABLE.ERROR_PARAM_NAME_INVALID")
1389
- }, !1;
1390
- const n = m(w.value, o);
1391
- return n && n.find(
1392
- (x) => x[y] === d && x.uiid !== o && x[y] !== "[Array Item]"
1393
- ) ? (f.value[o] = {
1394
- [y]: a(
1395
- "COMMON_PARAMETERTABLE.ERROR_PARAM_NAME_DUPLICATE"
1396
- )
1397
- }, !1) : !O(w.value, o) && C.value && C.value.length > 0 && C.value.filter((k) => (k[y] || k.dataName || k.name) === d).find((k) => k.uiid !== o) ? (f.value[o] = {
1398
- [y]: a(
1399
- "COMMON_PARAMETERTABLE.ERROR_PARAM_NAME_DUPLICATE"
1400
- )
1401
- }, !1) : (f.value[o] && (delete f.value[o][y], Object.keys(f.value[o]).length === 0 && delete f.value[o]), !0);
1402
- }, D = (d, o, s = null, E = {}) => {
1403
- const { checkEmpty: L = !1, checkTypesMap: R = !1 } = E, y = s || l("type");
1404
- return L && !d ? (f.value[o] = {
1405
- ...f.value[o],
1406
- [y]: a("COMMON_PARAMETERTABLE.ERROR_PARAM_TYPE_REQUIRED")
1407
- // '参数类型不能为空'
1408
- }, !1) : d === "array" ? (f.value[o] = {
1409
- ...f.value[o],
1410
- [y]: a("COMMON_PARAMETERTABLE.ERROR_ARRAY_TYPE_REQUIRED")
1411
- //'请选择数组类型'
1412
- }, !1) : R && d && !De[d] ? (f.value[o] = {
1413
- ...f.value[o],
1414
- [y]: a("COMMON_PARAMETERTABLE.ERROR_PARAM_TYPE_INVALID")
1415
- // '参数类型无效'
1416
- }, !1) : (f.value[o] && (delete f.value[o][y], Object.keys(f.value[o]).length === 0 && delete f.value[o]), !0);
1417
- }, T = (d) => {
1418
- if (!Array.isArray(d))
1419
- return;
1420
- const o = l("type");
1421
- d.forEach((s) => {
1422
- const E = s[o];
1423
- E === "array" && D(E, s.uiid, o), s.children && Array.isArray(s.children) && s.children.length > 0 && T(s.children);
1424
- });
1425
- };
1426
- return {
1427
- // 方法
1428
- validateDataName: P,
1429
- validateDataType: D,
1430
- validateAllDataTypes: T,
1431
- validateAllRows: (d = !1) => {
1432
- let o = !1;
1433
- const s = l("name"), E = l("type"), L = l("value"), R = [];
1434
- r && r.value && r.value.forEach((n) => {
1435
- n.required && n.slot && R.push(n.slot);
1436
- });
1437
- const y = (n) => {
1438
- Array.isArray(n) && n.forEach((I) => {
1439
- const V = I.uiid, x = I[s], k = I[E], K = x === "[Array Item]";
1440
- if (K || R.forEach((J) => {
1441
- let Q = J;
1442
- J === "name" ? Q = s : J === "type" && (Q = E);
1443
- const z = I[Q];
1444
- if (!z || typeof z == "string" && !z.trim()) {
1445
- let de = a("COMMON_PARAMETERTABLE.ERROR_PARAM_REQUIRED");
1446
- Q === s ? de = a("COMMON_PARAMETERTABLE.ERROR_PARAM_NAME_REQUIRED") : Q === E ? de = a("COMMON_PARAMETERTABLE.ERROR_PARAM_TYPE_REQUIRED") : Q === "description" && (de = a("COMMON_PARAMETERTABLE.ERROR_PARAM_DESC_REQUIRED")), f.value[V] = {
1447
- ...f.value[V],
1448
- [Q]: de
1449
- }, o = !0;
1450
- }
1451
- }), K || P(x, V, s, {
1452
- checkEmpty: !0
1453
- }) || (o = !0), K || D(k, V, E, {
1454
- checkEmpty: !0,
1455
- checkTypesMap: _.value
1456
- }) || (o = !0), d && !K && I.required) {
1457
- const J = I[L];
1458
- (!J || typeof J == "string" && !J.trim()) && (f.value[V] = {
1459
- ...f.value[V],
1460
- [L]: a(
1461
- "COMMON_PARAMETERTABLE.ERROR_PARAM_TEST_VALUE_REQUIRED"
1462
- )
1463
- // '调试值不能为空'
1464
- }, o = !0);
1465
- }
1466
- if ((k === "object" || k === "arrayObject") && I.children && Array.isArray(I.children) && I.children.length > 0) {
1467
- const J = [];
1468
- I.children.forEach((Q) => {
1469
- const z = Q[s];
1470
- z && z !== "[Array Item]" && J.includes(z) ? (f.value[Q.uiid] = {
1471
- ...f.value[Q.uiid],
1472
- [s]: a(
1473
- "COMMON_PARAMETERTABLE.ERROR_PARAM_NAME_DUPLICATE"
1474
- )
1475
- // '参数名不能重复'
1476
- }, o = !0) : z && z !== "[Array Item]" && J.push(z);
1477
- }), y(I.children);
1478
- }
1479
- });
1480
- };
1481
- return y(w.value), !o;
1482
- },
1483
- handleFocus: (d, o) => {
1484
- p.value[d] || (p.value[d] = {}), p.value[d][o] = !0;
1485
- },
1486
- handleBlur: (d, o, s, E) => {
1487
- const L = d.uiid;
1488
- p.value[L] && (p.value[L][o] = !1);
1489
- const R = d[o];
1490
- P(R, L, o), s("data-name-validate"), E();
1491
- },
1492
- findParentNode: O,
1493
- getSiblings: m,
1494
- validateDescription: (d, o) => {
1495
- const s = d.uiid;
1496
- o && !d.description ? f.value[s] = {
1497
- ...f.value[s],
1498
- description: a("COMMON_PARAMETERTABLE.ERROR_PARAM_DESC_REQUIRED")
1499
- // '参数描述不能为空'
1500
- } : f.value[s]?.description && delete f.value[s].description;
1501
- }
1502
- };
1503
- }
1504
- function Gt(i, r, a, l, w, f) {
1505
- const {
1506
- tableData: p,
1507
- getFieldName: _,
1508
- emit: C,
1509
- validationErrors: O,
1510
- tableRef: m,
1511
- props: P,
1512
- isJustString: D,
1513
- disabled: T
1514
- } = i, M = te(1), N = () => {
1515
- p.value = [...p.value];
1516
- }, g = () => {
1517
- const n = r(), I = _("name"), V = _("type");
1518
- D.value && (n[V] = "string"), p.value = [...p.value, n], M.value = p.value.length, ve(() => {
1519
- y(), p.value.forEach((x) => {
1520
- const k = x[I];
1521
- k && (w(k, x.uiid, I), C("data-name-validate"));
1522
- }), f();
1523
- });
1524
- }, c = (n) => {
1525
- d(p.value, n.row.uiid), O.value[n.row.uiid] && delete O.value[n.row.uiid], N(), M.value = p.value.length, f(), C("data-name-validate");
1526
- }, d = (n, I) => {
1527
- for (let V = 0; V < n.length; V++) {
1528
- if (n[V].uiid === I)
1529
- return n.splice(V, 1), !0;
1530
- if (n[V].children && n[V].children.length > 0 && d(n[V].children, I))
1531
- return !0;
1532
- }
1533
- return !1;
1534
- }, o = (n) => {
1535
- const I = _("type"), x = (n.row.deep || 1) + 1, k = a(n.row[I], x);
1536
- n.row.children ? n.row.children.push(k) : n.row.children = [k], N(), ve(() => {
1537
- y();
1538
- });
1539
- }, s = (n) => {
1540
- const I = l(p.value, n.uiid);
1541
- return I && I.children ? I.children.findIndex((x) => x.uiid === n.uiid) > 0 : !1;
1542
- }, E = (n) => {
1543
- const I = l(p.value, n.uiid);
1544
- return I && I.children ? I.children.findIndex((x) => x.uiid === n.uiid) < I.children.length - 1 : !1;
1545
- }, L = (n, I) => {
1546
- const V = l(p.value, n.uiid);
1547
- if (!V || !V.children) return;
1548
- const x = V.children.findIndex((K) => K.uiid === n.uiid);
1549
- if (x === -1) return;
1550
- const k = I === "up" ? x - 1 : x + 1;
1551
- if (k >= 0 && k < V.children.length) {
1552
- const K = V.children.splice(x, 1)[0];
1553
- V.children.splice(k, 0, K), N();
1554
- }
1555
- }, R = (n) => !(T.value || n.disabled);
1556
- function y() {
1557
- ve(() => {
1558
- setTimeout(() => {
1559
- if (!m.value) return;
1560
- let n = null;
1561
- if (m.value.$el) {
1562
- const I = [
1563
- ".el-table__body-wrapper",
1564
- ".el-scrollbar__wrap",
1565
- ".aibox-table__body",
1566
- ".el-table__body",
1567
- ".table-body-wrapper",
1568
- ".el-scrollbar__view",
1569
- '[class*="body-wrapper"]',
1570
- '[class*="scrollbar"]',
1571
- '[class*="table__body"]'
1572
- ];
1573
- for (const V of I) {
1574
- const x = m.value.$el.querySelectorAll(V);
1575
- for (const k of x)
1576
- if (k.scrollHeight > k.clientHeight) {
1577
- n = k;
1578
- break;
1579
- }
1580
- if (n) break;
1581
- }
1582
- }
1583
- if (!n && m.value.$el) {
1584
- const I = (V) => {
1585
- if (V.scrollHeight > V.clientHeight && V.scrollHeight > 0)
1586
- return V;
1587
- for (const x of V.children || []) {
1588
- const k = I(x);
1589
- if (k) return k;
1590
- }
1591
- return null;
1592
- };
1593
- n = I(m.value.$el);
1594
- }
1595
- if (!n && m.value.$el && m.value.$el.scrollHeight > m.value.$el.clientHeight && (n = m.value.$el), n)
1596
- try {
1597
- n.scrollTo({
1598
- top: n.scrollHeight,
1599
- behavior: "smooth"
1600
- });
1601
- } catch {
1602
- n.scrollTop = n.scrollHeight;
1603
- }
1604
- }, 50);
1605
- }), C("scroll-to-bottom");
1606
- }
1607
- return {
1608
- // 状态
1609
- total: M,
1610
- // 方法
1611
- addNewRow: g,
1612
- deleteLists: c,
1613
- addLists: o,
1614
- moveArrayItem: L,
1615
- canMoveUp: s,
1616
- canMoveDown: E,
1617
- showDeleteButton: R,
1618
- triggerTableUpdate: N
1619
- };
1620
- }
1621
- function Yt(i) {
1622
- const {
1623
- getFieldName: r,
1624
- getSnowFlakeId: a,
1625
- props: l,
1626
- typeList: w,
1627
- isSingleType: f,
1628
- isPluginMode: p,
1629
- isDataType: _,
1630
- isJustString: C,
1631
- forceRequired: O,
1632
- location: m
1633
- } = i, P = (c = 1) => {
1634
- const d = f.value ? w.value[0].value : "string", o = r("name"), s = r("type"), E = r("value"), L = {
1635
- uiid: a(),
1636
- [o]: "",
1637
- [s]: d,
1638
- [E]: "",
1639
- description: ""
1640
- };
1641
- if (p.value) {
1642
- const R = {
1643
- required: !!O.value,
1644
- extendName: "",
1645
- extendWidgetType: "",
1646
- extendDisplay: !0,
1647
- defaultValue: ""
1648
- };
1649
- return _.value ? {
1650
- ...L,
1651
- ...R,
1652
- deep: c
1653
- } : {
1654
- ...L,
1655
- ...R
1656
- };
1657
- } else
1658
- return {
1659
- source: null,
1660
- dataValue: "",
1661
- ...L,
1662
- featAttr: {
1663
- location: m.value,
1664
- debugValue: "",
1665
- description: ""
1666
- }
1667
- };
1668
- }, D = (c, d = 1) => {
1669
- const o = r("name"), s = r("type"), E = {
1670
- debugValue: "",
1671
- description: "",
1672
- uiid: a(),
1673
- disabled: !1
1674
- }, L = p.value ? {
1675
- required: !!O.value,
1676
- extendName: "",
1677
- extendWidgetType: "",
1678
- extendDisplay: !0,
1679
- defaultValue: ""
1680
- } : {};
1681
- p.value && _.value && (L.deep = d);
1682
- const R = (y) => {
1683
- switch (y) {
1684
- case "arrayString":
1685
- return "string";
1686
- case "arrayInteger":
1687
- return "integer";
1688
- case "arrayNumber":
1689
- return "number";
1690
- case "arrayBoolean":
1691
- return "boolean";
1692
- case "arrayImage":
1693
- return "image";
1694
- case "arrayFile":
1695
- return "file";
1696
- case "arrayObject":
1697
- return "object";
1698
- default:
1699
- return l.justString, "string";
1700
- }
1701
- };
1702
- if (c === "object")
1703
- return {
1704
- ...E,
1705
- ...L,
1706
- [o]: "",
1707
- [s]: (C.value, "string")
1708
- };
1709
- if (c === "arrayObject")
1710
- return _.value ? {
1711
- ...E,
1712
- ...L,
1713
- [o]: "",
1714
- [s]: "string",
1715
- hasChildren: !1
1716
- } : {
1717
- ...E,
1718
- ...L,
1719
- [o]: "[Array Item]",
1720
- [s]: "object",
1721
- hasChildren: !1
1722
- // 新创建时没有 children,后续会根据实际情况更新
1723
- };
1724
- {
1725
- const y = R(c);
1726
- return {
1727
- ...E,
1728
- ...L,
1729
- [o]: "[Array Item]",
1730
- [s]: y,
1731
- hasChildren: !1
1732
- // 非 object 类型的数组子项,不显示展开收起符号
1733
- };
1734
- }
1735
- }, T = (c) => {
1736
- const d = r("name"), o = r("type"), s = r("value");
1737
- return ce(c, {
1738
- nameField: d,
1739
- typeField: o,
1740
- valueField: s
1741
- });
1742
- }, M = (c) => {
1743
- const d = r("type"), o = r("value");
1744
- c.forEach((s) => {
1745
- if (s.children && s.children.length > 0) {
1746
- M(s.children);
1747
- const E = s[d];
1748
- if (se(E) || E === "object") {
1749
- const L = T(s);
1750
- L !== void 0 && (s[o] = L);
1751
- }
1752
- }
1753
- });
1754
- };
1755
- return {
1756
- createEmptyInputParam: P,
1757
- createArrayItem: D,
1758
- convertChildrenToDebugValue: T,
1759
- updateParentDebugValues: M,
1760
- debuggerChangeValue: (c, d) => {
1761
- M(c.value), d("debugger-data-change");
1762
- },
1763
- changeType: (c, d, o, s, E) => {
1764
- const L = r("type"), R = r("value"), y = c[L];
1765
- d(y, c.uiid, L), c.children && Array.isArray(c.children) && c.children.length > 0 && o(c.children);
1766
- const n = fe.find((V) => V.value === y), I = n ? n.example : "";
1767
- c[R] = I, c.children && delete c.children, s(), E();
1768
- },
1769
- isArrayType: se
1770
- };
1771
- }
1772
- function Jt(i, r, a) {
1773
- const { t: l } = ne(), { getFieldName: w, tableData: f } = i, p = (T) => {
1774
- T.required && (T.extendDisplay = !0), r(), a();
1775
- }, _ = (T, M) => {
1776
- const N = w("type");
1777
- M["extend-widget-item"] && delete M["extend-widget-item"], (T === "checkbox" || T === "radio-button") && (M[N] = "string", M.children && delete M.children), r(), a();
1778
- }, C = (T, M, N, g) => {
1779
- for (const c of T) {
1780
- if (c.uiid === M)
1781
- return c[N] = g, !0;
1782
- if (c.children && c.children.length > 0 && C(c.children, M, N, g))
1783
- return !0;
1784
- }
1785
- return !1;
1786
- };
1787
- return {
1788
- handleRequiredChange: p,
1789
- handleFormatChange: _,
1790
- handleOptionCreated: (T) => {
1791
- C(
1792
- f.value,
1793
- T.uiid,
1794
- "extend-widget-item",
1795
- T.data
1796
- ), r(), a();
1797
- },
1798
- parseWidgetItems: (T) => {
1799
- if (!T) return [];
1800
- if (Array.isArray(T)) return T;
1801
- try {
1802
- return typeof T == "string" ? JSON.parse(T) : [];
1803
- } catch {
1804
- return [];
1805
- }
1806
- },
1807
- clearFiles: (T) => {
1808
- const M = w("value");
1809
- T[M] = "", r();
1810
- },
1811
- uploadSuccess: (T, M, N) => {
1812
- rt.success(l("COMMON_PARAMETERTABLE.LABEL_UPLOAD_SUCCESS")), M[N] = T, r();
1813
- }
1814
- };
1815
- }
1816
- const Xt = {
1817
- key: 0,
1818
- style: { color: "red", "margin-right": "2px" }
1819
- }, Qt = {
1820
- key: 0,
1821
- style: { color: "red", "margin-right": "2px" }
1822
- }, zt = {
1823
- key: 0,
1824
- style: { color: "red", "margin-right": "2px" }
1825
- }, Kt = { class: "table-header" }, Zt = { class: "header-text" }, el = { class: "tool-tip-column" }, tl = { class: "table-header" }, ll = { class: "header-text" }, al = { class: "tool-tip-column" }, nl = { class: "table-header" }, rl = { class: "header-text" }, ol = { class: "tool-tip-column" }, il = { class: "action-header" }, sl = {
1826
- key: 0,
1827
- class: "error-message"
1828
- }, ul = { class: "table-form__isshow" }, dl = { class: "table-form__isshow" }, cl = {
1829
- __name: "ParameterTable",
1830
- props: /* @__PURE__ */ ie({
1831
- justString: {
1832
- type: Boolean,
1833
- default: !1
1834
- },
1835
- loadingTable: {
1836
- type: Boolean,
1837
- default: !1
1838
- },
1839
- maxHeight: {
1840
- type: Number,
1841
- default: 300
1842
- },
1843
- location: {
1844
- type: String,
1845
- default: "params"
1846
- },
1847
- setType: {
1848
- type: Array,
1849
- default: () => []
1850
- },
1851
- // 区分是设置数据类型还是具体值
1852
- isDataType: {
1853
- type: Boolean,
1854
- default: !1
1855
- },
1856
- inputItemNamesArr: {
1857
- type: Array,
1858
- default: () => []
1859
- },
1860
- // 外部控制是否可编辑
1861
- disabled: {
1862
- type: Boolean,
1863
- default: !1
1864
- },
1865
- // 插件模式标识
1866
- isPluginMode: {
1867
- type: Boolean,
1868
- default: !1
1869
- },
1870
- // 是否显示更多列(插件模式专用)
1871
- showMoreColumns: {
1872
- type: Boolean,
1873
- default: !1
1874
- },
1875
- // 强制必填(默认为true且不可修改)
1876
- forceRequired: {
1877
- type: Boolean,
1878
- default: !1
1879
- },
1880
- // 禁用字段控制,格式:['字段名', 'add', 'delete']
1881
- // 例如:['name', 'type', 'add', 'delete'] 表示 name 和 type 字段不可编辑,且不能新增和删除
1882
- disabledFields: {
1883
- type: Array,
1884
- default: () => []
1885
- },
1886
- customFieldName: {
1887
- type: Object,
1888
- default: null
1889
- },
1890
- getSnowFlakeId: {
1891
- type: Function,
1892
- default: () => () => Date.now()
1893
- }
1894
- }, {
1895
- tableData: {
1896
- default: () => []
1897
- },
1898
- tableDataModifiers: {}
1899
- }),
1900
- emits: /* @__PURE__ */ ie([
1901
- "debugger-data-change",
1902
- "show-option",
1903
- "scroll-to-bottom",
1904
- "data-name-validate",
1905
- "name-or-type-change-value"
1906
- ], ["update:tableData"]),
1907
- setup(i, { expose: r, emit: a }) {
1908
- const l = i, w = Ee(i, "tableData"), f = a, { t: p } = ne(), _ = h(() => l.setType && l.setType.length ? fe.filter((U) => l.setType.includes(U.value)) : fe), C = h(() => l.setType && l.setType.length === 1), O = te(null), m = te({}), P = te({}), D = Et({
1909
- props: l,
1910
- tableData: w,
1911
- emit: f,
1912
- getSnowFlakeId: l.getSnowFlakeId,
1913
- typeList: _,
1914
- isSingleType: C,
1915
- validationErrors: m,
1916
- focusFields: P,
1917
- tableRef: O
1918
- }), { canAddRow: T, canDeleteRow: M, isFieldDisabled: N, getFieldName: g } = D, { columns: c } = Wt(l), { createEmptyInputParam: d, createArrayItem: o, isArrayType: s } = Yt(D), {
1919
- validateDataName: E,
1920
- validateDataType: L,
1921
- validateDescription: R,
1922
- validateAllDataTypes: y,
1923
- validateAllRows: n,
1924
- handleFocus: I,
1925
- findParentNode: V
1926
- } = $t(D, c), x = () => {
1927
- f("name-or-type-change-value");
1928
- }, {
1929
- total: k,
1930
- addNewRow: K,
1931
- deleteLists: J,
1932
- addLists: Q,
1933
- moveArrayItem: z,
1934
- canMoveUp: de,
1935
- canMoveDown: je,
1936
- showDeleteButton: qe,
1937
- triggerTableUpdate: Ve
1938
- } = Gt(
1939
- D,
1940
- d,
1941
- o,
1942
- V,
1943
- E,
1944
- x
1945
- ), {
1946
- handleRequiredChange: We,
1947
- handleFormatChange: $e,
1948
- handleOptionCreated: Ge
1949
- // parseWidgetItems, clearFiles, uploadSuccess 已移至 ValueCell 组件
1950
- } = Jt(D, Ve, x), Me = h(() => T() || M() ? c.value : c.value.filter((B) => B.slot !== "action")), Ye = (U) => U.uiid, Je = (U) => {
1951
- const B = V(w.value, U.uiid);
1952
- return B && B.children ? B.children.findIndex((S) => S.uiid === U.uiid) + 1 : 1;
1953
- }, me = (U) => Me.value && Me.value.find((u) => u.slot === U)?.required || !1, Xe = (U) => {
1954
- const B = g("name"), u = !!U[B];
1955
- R(U, u || me("description"));
1956
- }, Qe = (U, B) => {
1957
- const u = U.uiid;
1958
- P.value[u] && (P.value[u][B] = !1);
1959
- const S = U[B];
1960
- E(S, u, B), f("data-name-validate"), x();
1961
- }, ze = (U) => {
1962
- const B = g("type"), u = g("value"), S = U[B];
1963
- L(S, U.uiid, B), U.children && Array.isArray(U.children) && U.children.length > 0 && y(U.children);
1964
- const G = fe.find((le) => le.value === S), Ae = G ? G.example : "";
1965
- U[u] = Ae, U.children && delete U.children, U.hasChildren = !1, Ve(), x();
1966
- }, Te = (U) => {
1967
- Array.isArray(U) && U.forEach((B) => {
1968
- const u = g("name"), S = g("type"), G = B[S], Ae = B[u], le = B.children && B.children.length > 0;
1969
- Ae === "[Array Item]" ? (G === "object" || G === "arrayObject") && le ? (B.hasChildren = !0, Te(B.children)) : B.hasChildren = !1 : (s(G) || G === "object") && le ? (B.hasChildren = !0, Te(B.children)) : B.hasChildren = !1;
1970
- });
1971
- };
1972
- return pe(
1973
- () => w.value,
1974
- (U) => {
1975
- k.value = U.length, y(U), Te(U);
1976
- },
1977
- { immediate: !0, deep: !0 }
1978
- ), pe(
1979
- () => l.justString,
1980
- (U) => {
1981
- if (U) {
1982
- const B = g("type"), u = (S) => {
1983
- S.forEach((G) => {
1984
- G[B] = "string", G.children && u(G.children);
1985
- });
1986
- };
1987
- u(w.value);
1988
- }
1989
- },
1990
- { immediate: !0 }
1991
- ), pe(
1992
- () => l.setType,
1993
- (U) => {
1994
- if (U && U.length === 1) {
1995
- const B = _.value[0];
1996
- if (B) {
1997
- const u = g("name"), S = g("type"), G = (Ae) => {
1998
- Ae.forEach((le) => {
1999
- le[u] !== "[Array Item]" && (le[S] = B.value), le.children && G(le.children);
2000
- });
2001
- };
2002
- G(w.value);
2003
- }
2004
- }
2005
- },
2006
- { immediate: !0 }
2007
- ), pe(
2008
- () => l.inputItemNamesArr,
2009
- () => {
2010
- Object.keys(m.value).length > 0 && ve(() => {
2011
- n();
2012
- });
2013
- },
2014
- { deep: !0 }
2015
- ), r({
2016
- validationErrors: m,
2017
- validateAllRows: n
2018
- }), (U, B) => (b(), H(e(ke), {
2019
- ref_key: "tableRef",
2020
- ref: O,
2021
- columns: Me.value,
2022
- data: w.value,
2023
- onRowKey: Ye,
2024
- hasPage: !1,
2025
- total: e(k),
2026
- "on-row-key": (u) => u.uiid,
2027
- pages: {
2028
- page: 1,
2029
- size: 999
2030
- },
2031
- isLoading: i.loadingTable,
2032
- "max-height": i.maxHeight,
2033
- isSecondaryHeader: ""
2034
- }, lt({
2035
- keyHeader: A(() => [
2036
- me("name") ? (b(), W("span", Xt, "*")) : $("", !0),
2037
- q(F(e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_NAME")), 1)
2038
- ]),
2039
- typeHeader: A(() => [
2040
- me("type") ? (b(), W("span", Qt, "*")) : $("", !0),
2041
- q(F(e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_TYPE")), 1)
2042
- ]),
2043
- descHeader: A(() => [
2044
- me("description") ? (b(), W("span", zt, "*")) : $("", !0),
2045
- q(F(e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_DESC")), 1)
2046
- ]),
2047
- showNameHeader: A(() => [
2048
- j("div", Kt, [
2049
- j("div", Zt, F(e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_SHOW_NAME")), 1),
2050
- v(e(Oe), { placement: "top" }, {
2051
- content: A(() => [
2052
- q(F(e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_SHOW_NAME_TIP")), 1)
2053
- ]),
2054
- default: A(() => [
2055
- j("span", el, [
2056
- v(e(Y), {
2057
- class: "tool-tip-column__icon",
2058
- size: "14px",
2059
- color: "#999"
2060
- }, {
2061
- default: A(() => [
2062
- v(e(be))
2063
- ]),
2064
- _: 1
2065
- })
2066
- ])
2067
- ]),
2068
- _: 1
2069
- })
2070
- ])
2071
- ]),
2072
- formatHeader: A(() => [
2073
- j("div", tl, [
2074
- j("div", ll, F(e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_FORMAT")), 1),
2075
- v(e(Oe), { placement: "top" }, {
2076
- content: A(() => [
2077
- q(F(e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_FORMAT_TIP")), 1)
2078
- ]),
2079
- default: A(() => [
2080
- j("div", al, [
2081
- v(e(Y), {
2082
- class: "tool-tip-column__icon",
2083
- size: "14px",
2084
- color: "#999"
2085
- }, {
2086
- default: A(() => [
2087
- v(e(be))
2088
- ]),
2089
- _: 1
2090
- })
2091
- ])
2092
- ]),
2093
- _: 1
2094
- })
2095
- ])
2096
- ]),
2097
- isShowHeader: A(() => [
2098
- j("div", nl, [
2099
- j("div", rl, F(e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_VISIBLE")), 1),
2100
- v(e(Oe), {
2101
- placement: "top",
2102
- "popper-style": { width: "350px" }
2103
- }, {
2104
- content: A(() => [
2105
- q(F(e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_VISIBLE_TIP")), 1),
2106
- B[2] || (B[2] = j("br", null, null, -1)),
2107
- q("- " + F(e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_VISIBLE_INVISIBLE")), 1),
2108
- B[3] || (B[3] = j("br", null, null, -1)),
2109
- q("- " + F(e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_VISIBLE_INVISIBLE_DEFAULT")), 1)
2110
- ]),
2111
- default: A(() => [
2112
- j("div", ol, [
2113
- v(e(Y), {
2114
- class: "tool-tip-column__icon",
2115
- size: "14px",
2116
- color: "#999"
2117
- }, {
2118
- default: A(() => [
2119
- v(e(be))
2120
- ]),
2121
- _: 1
2122
- })
2123
- ])
2124
- ]),
2125
- _: 1
2126
- })
2127
- ])
2128
- ]),
2129
- actionHeader: A(() => [
2130
- j("div", il, [
2131
- j("span", null, F(e(p)("COMMON_BUTTON.OPERATION_TEXT")), 1),
2132
- e(T)() ? (b(), H(e(oe), {
2133
- key: 0,
2134
- type: "primary",
2135
- size: "small",
2136
- onClick: e(K),
2137
- icon: e(ut)
2138
- }, {
2139
- default: A(() => [
2140
- q(F(e(p)("COMMON_BUTTON.ADD_NEW_TEXT")), 1)
2141
- ]),
2142
- _: 1
2143
- }, 8, ["onClick", "icon"])) : $("", !0)
2144
- ])
2145
- ]),
2146
- name: A((u) => [
2147
- v(It, {
2148
- name: u.row[e(g)("name")],
2149
- "onUpdate:name": (S) => u.row[e(g)("name")] = S,
2150
- row: u.row,
2151
- "array-item-index": Je(u.row),
2152
- onFocus: e(I),
2153
- onBlur: Qe
2154
- }, null, 8, ["name", "onUpdate:name", "row", "array-item-index", "onFocus"])
2155
- ]),
2156
- type: A((u) => [
2157
- v(Ft, {
2158
- type: u.row[e(g)("type")],
2159
- "onUpdate:type": (S) => u.row[e(g)("type")] = S,
2160
- row: u.row,
2161
- onChange: ze
2162
- }, null, 8, ["type", "onUpdate:type", "row"])
2163
- ]),
2164
- description: A((u) => [
2165
- v(e(Z), {
2166
- modelValue: u.row.description,
2167
- "onUpdate:modelValue": (S) => u.row.description = S,
2168
- disabled: l.disabled || u.row.disabled || e(N)("description"),
2169
- style: { width: "100%" },
2170
- placeholder: e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_DESC_PLACEHOLDER"),
2171
- class: ee({
2172
- "error-input": m.value[u.row.uiid]?.description
2173
- }),
2174
- onChange: (S) => e(R)(u.row, me("description")),
2175
- onBlur: (S) => Xe(u.row)
2176
- }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "placeholder", "class", "onChange", "onBlur"]),
2177
- m.value[u.row.uiid]?.description ? (b(), W("div", sl, F(m.value[u.row.uiid]?.description), 1)) : $("", !0)
2178
- ]),
2179
- test: A((u) => [
2180
- v(Ct, {
2181
- value: u.row[e(g)("value")],
2182
- "onUpdate:value": (S) => u.row[e(g)("value")] = S,
2183
- type: u.row[e(g)("type")],
2184
- "onUpdate:type": (S) => u.row[e(g)("type")] = S,
2185
- row: u.row
2186
- }, null, 8, ["value", "onUpdate:value", "type", "onUpdate:type", "row"])
2187
- ]),
2188
- action: A((u) => [
2189
- v(Ht, {
2190
- row: u.row,
2191
- scope: {
2192
- ...u,
2193
- _canMoveUp: e(de)(u.row),
2194
- _canMoveDown: e(je)(u.row),
2195
- _showDelete: e(qe)(u.row)
2196
- },
2197
- onAddChild: e(Q),
2198
- onMoveUp: B[0] || (B[0] = (S, G) => e(z)(S, G)),
2199
- onMoveDown: B[1] || (B[1] = (S, G) => e(z)(S, G)),
2200
- onDelete: e(J)
2201
- }, null, 8, ["row", "scope", "onAddChild", "onDelete"])
2202
- ]),
2203
- _: 2
2204
- }, [
2205
- l.isPluginMode ? {
2206
- name: "required",
2207
- fn: A((u) => [
2208
- j("div", ul, [
2209
- v(e(Ue), {
2210
- modelValue: u.row.required,
2211
- "onUpdate:modelValue": (S) => u.row.required = S,
2212
- disabled: l.disabled || u.row.disabled || l.forceRequired || e(N)("required"),
2213
- label: "",
2214
- onChange: (S) => e(We)(u.row)
2215
- }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "onChange"])
2216
- ])
2217
- ]),
2218
- key: "0"
2219
- } : void 0,
2220
- l.isPluginMode ? {
2221
- name: "showName",
2222
- fn: A((u) => [
2223
- v(e(Z), {
2224
- modelValue: u.row.extendName,
2225
- "onUpdate:modelValue": (S) => u.row.extendName = S,
2226
- disabled: l.disabled || u.row.disabled || e(N)("extendName"),
2227
- style: { width: "100%" },
2228
- placeholder: e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_SHOW_NAME_PLACEHOLDER")
2229
- }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "placeholder"])
2230
- ]),
2231
- key: "1"
2232
- } : void 0,
2233
- l.isPluginMode ? {
2234
- name: "format",
2235
- fn: A((u) => [
2236
- v(Ot, {
2237
- modelValue: u.row.extendWidgetType,
2238
- "onUpdate:modelValue": (S) => u.row.extendWidgetType = S,
2239
- disabled: l.disabled || u.row.disabled || e(N)("extendWidgetType"),
2240
- "row-data": u.row,
2241
- onChange: e($e),
2242
- onOptionCreated: e(Ge)
2243
- }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "row-data", "onChange", "onOptionCreated"])
2244
- ]),
2245
- key: "2"
2246
- } : void 0,
2247
- l.isPluginMode ? {
2248
- name: "default",
2249
- fn: A((u) => [
2250
- v(e(Z), {
2251
- modelValue: u.row.defaultValue,
2252
- "onUpdate:modelValue": (S) => u.row.defaultValue = S,
2253
- disabled: l.disabled || u.row.disabled || e(N)("defaultValue"),
2254
- style: { width: "100%" },
2255
- placeholder: e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_DEFAULT_VALUE_PLACEHOLDER")
2256
- }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "placeholder"])
2257
- ]),
2258
- key: "3"
2259
- } : void 0,
2260
- l.isPluginMode ? {
2261
- name: "isShow",
2262
- fn: A((u) => [
2263
- j("div", dl, [
2264
- v(e(Ue), {
2265
- modelValue: u.row.extendDisplay,
2266
- "onUpdate:modelValue": (S) => u.row.extendDisplay = S,
2267
- disabled: l.disabled || u.row.disabled || u.row.required || e(N)("extendDisplay"),
2268
- checked: u.row.required,
2269
- label: ""
2270
- }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "checked"])
2271
- ])
2272
- ]),
2273
- key: "4"
2274
- } : void 0
2275
- ]), 1032, ["columns", "data", "total", "on-row-key", "isLoading", "max-height"]));
2276
- }
2277
- }, pl = /* @__PURE__ */ ue(cl, [["__scopeId", "data-v-fd4f7807"]]), bl = Ke(pl);
2278
- export {
2279
- Mt as ARRAYTYPES,
2280
- gl as METHODSOPTIONS,
2281
- hl as NOBODYMETHOD,
2282
- bl as ParameterTable,
2283
- De as TYPESMAP,
2284
- fe as TYPESOPTIONS,
2285
- ce as convertChildrenToDebugValue,
2286
- bl as default,
2287
- se as isArrayType
2288
- };
1
+ import "./chunks/DialogContainer.DL7aTMDS.js";
2
+ import "./chunks/FileUploader.DD-lopf-.js";
3
+ import "./chunks/AutoShowTooltip.C_DI9t2Z.js";
4
+ import "./chunks/AiboxTable.CrWMAX84.js";
5
+ import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./chunks/ParameterTable.BCdnj1gW.js";
6
+ export { n as ARRAYTYPES, e as METHODSOPTIONS, i as NOBODYMETHOD, s as ParameterTable, s as default, o as TYPESMAP, t as TYPESOPTIONS, r as convertChildrenToDebugValue, a as isArrayType };