amis-core 6.14.0-beta.8 → 7.0.0-next.0

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 (397) hide show
  1. package/esm/Root.d.ts +3 -2
  2. package/esm/Root.js +3 -2
  3. package/esm/RootRenderer.d.ts +18 -0
  4. package/esm/RootRenderer.js +8 -5
  5. package/esm/SchemaRenderer.js +7 -3
  6. package/esm/Scoped.js +1 -1
  7. package/esm/StatusScoped.js +1 -1
  8. package/esm/StyleManager.js +1 -1
  9. package/esm/TaggerWrapper.d.ts +14 -0
  10. package/esm/TaggerWrapper.js +57 -0
  11. package/esm/WithRootStore.d.ts +70 -358
  12. package/esm/WithRootStore.js +1 -1
  13. package/esm/WithStore.js +2 -3
  14. package/esm/actions/Action.d.ts +3 -17
  15. package/esm/actions/Action.js +2 -2
  16. package/esm/actions/AjaxAction.d.ts +1 -1
  17. package/esm/actions/AjaxAction.js +11 -11
  18. package/esm/actions/BreakAction.js +1 -1
  19. package/esm/actions/BroadcastAction.js +2 -2
  20. package/esm/actions/CmptAction.d.ts +1 -1
  21. package/esm/actions/CmptAction.js +41 -41
  22. package/esm/actions/ContinueAction.js +1 -1
  23. package/esm/actions/CopyAction.js +2 -2
  24. package/esm/actions/CustomAction.d.ts +2 -1
  25. package/esm/actions/CustomAction.js +3 -3
  26. package/esm/actions/DialogAction.d.ts +6 -6
  27. package/esm/actions/DialogAction.js +13 -13
  28. package/esm/actions/DrawerAction.d.ts +3 -3
  29. package/esm/actions/DrawerAction.js +11 -11
  30. package/esm/actions/EmailAction.js +2 -2
  31. package/esm/actions/EventAction.js +7 -7
  32. package/esm/actions/LinkAction.js +2 -2
  33. package/esm/actions/LoopAction.js +12 -12
  34. package/esm/actions/PageAction.js +2 -2
  35. package/esm/actions/ParallelAction.js +1 -1
  36. package/esm/actions/PrintAction.js +2 -2
  37. package/esm/actions/StatusAction.js +2 -2
  38. package/esm/actions/SwitchAction.js +1 -1
  39. package/esm/actions/ToastAction.js +2 -2
  40. package/esm/actions/WaitAction.js +2 -2
  41. package/esm/actions/index.d.ts +66 -0
  42. package/esm/components/Animations.d.ts +2 -2
  43. package/esm/components/Animations.js +2 -2
  44. package/esm/components/CustomStyle.js +1 -1
  45. package/esm/components/ErrorBoundary.js +1 -1
  46. package/esm/components/LazyComponent.d.ts +0 -1
  47. package/esm/components/LazyComponent.js +2 -3
  48. package/esm/components/Overlay.js +6 -13
  49. package/esm/components/PopOver.d.ts +0 -1
  50. package/esm/components/PopOver.js +6 -6
  51. package/esm/env.d.ts +24 -22
  52. package/esm/env.js +1 -1
  53. package/esm/envOverwrite.js +1 -1
  54. package/esm/factory.d.ts +3 -1
  55. package/esm/factory.js +10 -7
  56. package/esm/globalVar.js +1 -1
  57. package/esm/globalVarClientHandler.js +1 -1
  58. package/esm/globalVarDefaultValueHandler.js +1 -1
  59. package/esm/hooks/useEnvContext.js +1 -1
  60. package/esm/hooks/useRenderOptionsContext.js +1 -1
  61. package/esm/index.d.ts +6 -6
  62. package/esm/index.js +15 -9
  63. package/esm/locale.d.ts +22 -22
  64. package/esm/locale.js +6 -6
  65. package/esm/polyfills.js +1 -1
  66. package/esm/renderers/Form.d.ts +42 -18
  67. package/esm/renderers/Form.js +35 -29
  68. package/esm/renderers/Item.d.ts +52 -206
  69. package/esm/renderers/Item.js +20 -16
  70. package/esm/renderers/Options.d.ts +18 -17
  71. package/esm/renderers/Options.js +48 -49
  72. package/esm/renderers/Placeholder.js +1 -1
  73. package/esm/renderers/builtin.js +1 -1
  74. package/esm/renderers/register.js +1 -1
  75. package/esm/renderers/wrapControl.d.ts +36 -180
  76. package/esm/renderers/wrapControl.js +49 -50
  77. package/esm/schema.d.ts +1317 -0
  78. package/esm/store/app.d.ts +17 -17
  79. package/esm/store/app.js +1 -1
  80. package/esm/store/combo.d.ts +1504 -10289
  81. package/esm/store/combo.js +1 -1
  82. package/esm/store/crud.d.ts +22 -22
  83. package/esm/store/crud.js +9 -5
  84. package/esm/store/form.d.ts +571 -4232
  85. package/esm/store/form.js +1 -1
  86. package/esm/store/formItem.d.ts +48 -48
  87. package/esm/store/formItem.js +9 -4
  88. package/esm/store/iRenderer.d.ts +7 -7
  89. package/esm/store/iRenderer.js +6 -6
  90. package/esm/store/index.d.ts +15 -15
  91. package/esm/store/index.js +1 -1
  92. package/esm/store/list.d.ts +10 -10
  93. package/esm/store/list.js +1 -1
  94. package/esm/store/manager.d.ts +18 -18
  95. package/esm/store/manager.js +1 -1
  96. package/esm/store/modal.d.ts +16 -16
  97. package/esm/store/modal.js +1 -1
  98. package/esm/store/node.d.ts +1 -1
  99. package/esm/store/node.js +1 -1
  100. package/esm/store/pagination.d.ts +9 -9
  101. package/esm/store/pagination.js +1 -1
  102. package/esm/store/root.d.ts +20 -19
  103. package/esm/store/root.js +9 -3
  104. package/esm/store/service.d.ts +9 -9
  105. package/esm/store/service.js +1 -1
  106. package/esm/store/status.js +1 -1
  107. package/esm/store/table.d.ts +16 -11238
  108. package/esm/store/table.js +8 -8
  109. package/esm/store/table2.d.ts +20 -20
  110. package/esm/store/table2.js +4 -4
  111. package/esm/theme.d.ts +2 -2
  112. package/esm/theme.js +5 -5
  113. package/esm/types.d.ts +21 -352
  114. package/esm/utils/Animation.js +1 -1
  115. package/esm/utils/ColorScale.js +1 -1
  116. package/esm/utils/DataSchema.js +1 -1
  117. package/esm/utils/DataScope.js +1 -1
  118. package/esm/utils/RootClose.js +3 -3
  119. package/esm/utils/SimpleMap.js +1 -1
  120. package/esm/utils/animations.d.ts +2 -27
  121. package/esm/utils/animations.js +1 -1
  122. package/esm/utils/api.d.ts +1 -1
  123. package/esm/utils/api.js +2 -2
  124. package/esm/utils/arraySlice.js +1 -1
  125. package/esm/utils/attachmentAdpator.js +1 -1
  126. package/esm/utils/autobind.js +1 -1
  127. package/esm/utils/browser.js +1 -1
  128. package/esm/utils/columnsSplit.js +1 -1
  129. package/esm/utils/concatData.js +1 -1
  130. package/esm/utils/dataMapping.js +1 -1
  131. package/esm/utils/date.js +1 -1
  132. package/esm/utils/debug.js +6 -5
  133. package/esm/utils/decodeEntity.js +1 -1
  134. package/esm/utils/dom.js +4 -5
  135. package/esm/utils/errors.js +1 -1
  136. package/esm/utils/escapeHtml.js +3 -4
  137. package/esm/utils/filter-schema.js +1 -1
  138. package/esm/utils/filter.js +1 -1
  139. package/esm/utils/findDomCompat.d.ts +16 -0
  140. package/esm/utils/findDomCompat.js +253 -0
  141. package/esm/utils/formatDuration.js +1 -1
  142. package/esm/utils/formula.js +2 -2
  143. package/esm/utils/getPageId.js +1 -1
  144. package/esm/utils/getVariable.js +1 -1
  145. package/esm/utils/grammar.js +1 -1
  146. package/esm/utils/handleAction.d.ts +0 -1
  147. package/esm/utils/handleAction.js +1 -1
  148. package/esm/utils/helper.d.ts +5 -4
  149. package/esm/utils/helper.js +2 -2
  150. package/esm/utils/highlight.js +1 -1
  151. package/esm/utils/icon.js +1 -1
  152. package/esm/utils/image.d.ts +0 -1
  153. package/esm/utils/image.js +1 -1
  154. package/esm/utils/index.d.ts +1 -0
  155. package/esm/utils/index.js +2 -2
  156. package/esm/utils/isPureVariable.js +1 -1
  157. package/esm/utils/json-schema-2-amis-schema.js +1 -1
  158. package/esm/utils/keyToPath.js +1 -1
  159. package/esm/utils/labelToString.js +1 -1
  160. package/esm/utils/loopTooMuch.js +1 -1
  161. package/esm/utils/makeSorter.js +1 -1
  162. package/esm/utils/math.js +1 -1
  163. package/esm/utils/memoryParse.js +1 -1
  164. package/esm/utils/normalizeLink.js +1 -1
  165. package/esm/utils/normalizeOptions.js +1 -1
  166. package/esm/utils/object.js +1 -1
  167. package/esm/utils/offset.js +1 -1
  168. package/esm/utils/offsetParent.js +1 -1
  169. package/esm/utils/optionValueCompare.js +1 -1
  170. package/esm/utils/position.js +1 -1
  171. package/esm/utils/prettyBytes.js +1 -1
  172. package/esm/utils/printElement.js +1 -1
  173. package/esm/utils/renderer-event.d.ts +4 -5
  174. package/esm/utils/renderer-event.js +10 -10
  175. package/esm/utils/replaceText.js +1 -1
  176. package/esm/utils/resize-sensor.js +1 -1
  177. package/esm/utils/resolveCondition.d.ts +1 -1
  178. package/esm/utils/resolveCondition.js +8 -8
  179. package/esm/utils/resolveVariable.js +1 -1
  180. package/esm/utils/resolveVariableAndFilter.js +1 -1
  181. package/esm/utils/resolveVariableAndFilterForAsync.js +12 -8
  182. package/esm/utils/scrollPosition.js +1 -1
  183. package/esm/utils/string2regExp.js +1 -1
  184. package/esm/utils/stripNumber.js +1 -1
  185. package/esm/utils/style-helper.js +1 -1
  186. package/esm/utils/style.js +1 -1
  187. package/esm/utils/toNumber.js +1 -1
  188. package/esm/utils/tokenize.js +1 -1
  189. package/esm/utils/tpl-builtin.d.ts +1 -1
  190. package/esm/utils/tpl-builtin.js +9 -5
  191. package/esm/utils/tpl-lodash.js +1 -1
  192. package/esm/utils/tpl.d.ts +1 -1
  193. package/esm/utils/tpl.js +6 -2
  194. package/esm/utils/uncontrollable.d.ts +0 -1
  195. package/esm/utils/uncontrollable.js +1 -1
  196. package/esm/utils/validateId.js +1 -1
  197. package/esm/utils/validations.js +5 -1
  198. package/esm/utils/visitedCache.js +1 -1
  199. package/lib/Root.d.ts +3 -2
  200. package/lib/Root.js +3 -1
  201. package/lib/RootRenderer.d.ts +18 -0
  202. package/lib/RootRenderer.js +8 -5
  203. package/lib/SchemaRenderer.js +6 -2
  204. package/lib/Scoped.js +1 -1
  205. package/lib/StatusScoped.js +1 -1
  206. package/lib/StyleManager.js +1 -1
  207. package/lib/TaggerWrapper.d.ts +14 -0
  208. package/lib/TaggerWrapper.js +66 -0
  209. package/lib/WithRootStore.d.ts +70 -358
  210. package/lib/WithRootStore.js +1 -1
  211. package/lib/WithStore.js +2 -3
  212. package/lib/actions/Action.d.ts +3 -17
  213. package/lib/actions/Action.js +1 -1
  214. package/lib/actions/AjaxAction.d.ts +1 -1
  215. package/lib/actions/AjaxAction.js +11 -11
  216. package/lib/actions/BreakAction.js +1 -1
  217. package/lib/actions/BroadcastAction.js +2 -2
  218. package/lib/actions/CmptAction.d.ts +1 -1
  219. package/lib/actions/CmptAction.js +41 -41
  220. package/lib/actions/ContinueAction.js +1 -1
  221. package/lib/actions/CopyAction.js +2 -2
  222. package/lib/actions/CustomAction.d.ts +2 -1
  223. package/lib/actions/CustomAction.js +2 -2
  224. package/lib/actions/DialogAction.d.ts +6 -6
  225. package/lib/actions/DialogAction.js +12 -12
  226. package/lib/actions/DrawerAction.d.ts +3 -3
  227. package/lib/actions/DrawerAction.js +10 -10
  228. package/lib/actions/EmailAction.js +2 -2
  229. package/lib/actions/EventAction.js +6 -6
  230. package/lib/actions/LinkAction.js +2 -2
  231. package/lib/actions/LoopAction.js +12 -12
  232. package/lib/actions/PageAction.js +2 -2
  233. package/lib/actions/ParallelAction.js +1 -1
  234. package/lib/actions/PrintAction.js +2 -2
  235. package/lib/actions/StatusAction.js +2 -2
  236. package/lib/actions/SwitchAction.js +1 -1
  237. package/lib/actions/ToastAction.js +2 -2
  238. package/lib/actions/WaitAction.js +2 -2
  239. package/lib/actions/index.d.ts +66 -0
  240. package/lib/components/Animations.d.ts +2 -2
  241. package/lib/components/Animations.js +1 -1
  242. package/lib/components/CustomStyle.js +1 -1
  243. package/lib/components/ErrorBoundary.js +1 -1
  244. package/lib/components/LazyComponent.d.ts +0 -1
  245. package/lib/components/LazyComponent.js +2 -3
  246. package/lib/components/Overlay.js +6 -14
  247. package/lib/components/PopOver.d.ts +0 -1
  248. package/lib/components/PopOver.js +5 -5
  249. package/lib/env.d.ts +24 -22
  250. package/lib/env.js +1 -1
  251. package/lib/envOverwrite.js +1 -1
  252. package/lib/factory.d.ts +3 -1
  253. package/lib/factory.js +10 -7
  254. package/lib/globalVar.js +1 -1
  255. package/lib/globalVarClientHandler.js +1 -1
  256. package/lib/globalVarDefaultValueHandler.js +1 -1
  257. package/lib/hooks/useEnvContext.js +1 -1
  258. package/lib/hooks/useRenderOptionsContext.js +1 -1
  259. package/lib/index.d.ts +6 -6
  260. package/lib/index.js +16 -7
  261. package/lib/locale.d.ts +22 -22
  262. package/lib/locale.js +6 -6
  263. package/lib/polyfills.js +1 -1
  264. package/lib/renderers/Form.d.ts +42 -18
  265. package/lib/renderers/Form.js +35 -29
  266. package/lib/renderers/Item.d.ts +52 -206
  267. package/lib/renderers/Item.js +19 -15
  268. package/lib/renderers/Options.d.ts +18 -17
  269. package/lib/renderers/Options.js +48 -49
  270. package/lib/renderers/Placeholder.js +1 -1
  271. package/lib/renderers/builtin.js +1 -1
  272. package/lib/renderers/register.js +1 -1
  273. package/lib/renderers/wrapControl.d.ts +36 -180
  274. package/lib/renderers/wrapControl.js +49 -50
  275. package/lib/schema.d.ts +1317 -0
  276. package/lib/store/app.d.ts +17 -17
  277. package/lib/store/app.js +1 -1
  278. package/lib/store/combo.d.ts +1504 -10289
  279. package/lib/store/combo.js +1 -1
  280. package/lib/store/crud.d.ts +22 -22
  281. package/lib/store/crud.js +8 -4
  282. package/lib/store/form.d.ts +571 -4232
  283. package/lib/store/form.js +1 -1
  284. package/lib/store/formItem.d.ts +48 -48
  285. package/lib/store/formItem.js +9 -4
  286. package/lib/store/iRenderer.d.ts +7 -7
  287. package/lib/store/iRenderer.js +6 -6
  288. package/lib/store/index.d.ts +15 -15
  289. package/lib/store/index.js +1 -1
  290. package/lib/store/list.d.ts +10 -10
  291. package/lib/store/list.js +1 -1
  292. package/lib/store/manager.d.ts +18 -18
  293. package/lib/store/manager.js +1 -1
  294. package/lib/store/modal.d.ts +16 -16
  295. package/lib/store/modal.js +1 -1
  296. package/lib/store/node.d.ts +1 -1
  297. package/lib/store/node.js +1 -1
  298. package/lib/store/pagination.d.ts +9 -9
  299. package/lib/store/pagination.js +1 -1
  300. package/lib/store/root.d.ts +20 -19
  301. package/lib/store/root.js +9 -3
  302. package/lib/store/service.d.ts +9 -9
  303. package/lib/store/service.js +1 -1
  304. package/lib/store/status.js +1 -1
  305. package/lib/store/table.d.ts +16 -11238
  306. package/lib/store/table.js +8 -8
  307. package/lib/store/table2.d.ts +20 -20
  308. package/lib/store/table2.js +4 -4
  309. package/lib/theme.d.ts +2 -2
  310. package/lib/theme.js +5 -5
  311. package/lib/types.d.ts +21 -352
  312. package/lib/utils/Animation.js +1 -1
  313. package/lib/utils/ColorScale.js +1 -1
  314. package/lib/utils/DataSchema.js +1 -1
  315. package/lib/utils/DataScope.js +1 -1
  316. package/lib/utils/RootClose.js +3 -3
  317. package/lib/utils/SimpleMap.js +1 -1
  318. package/lib/utils/animations.d.ts +2 -27
  319. package/lib/utils/animations.js +1 -1
  320. package/lib/utils/api.d.ts +1 -1
  321. package/lib/utils/api.js +2 -2
  322. package/lib/utils/arraySlice.js +1 -1
  323. package/lib/utils/attachmentAdpator.js +1 -1
  324. package/lib/utils/autobind.js +1 -1
  325. package/lib/utils/browser.js +1 -1
  326. package/lib/utils/columnsSplit.js +1 -1
  327. package/lib/utils/concatData.js +1 -1
  328. package/lib/utils/dataMapping.js +1 -1
  329. package/lib/utils/date.js +1 -1
  330. package/lib/utils/debug.js +7 -6
  331. package/lib/utils/decodeEntity.js +1 -1
  332. package/lib/utils/dom.js +4 -9
  333. package/lib/utils/errors.js +1 -1
  334. package/lib/utils/escapeHtml.js +3 -4
  335. package/lib/utils/filter-schema.js +1 -1
  336. package/lib/utils/filter.js +1 -1
  337. package/lib/utils/findDomCompat.d.ts +16 -0
  338. package/lib/utils/findDomCompat.js +262 -0
  339. package/lib/utils/formatDuration.js +1 -1
  340. package/lib/utils/formula.js +2 -2
  341. package/lib/utils/getPageId.js +1 -1
  342. package/lib/utils/getVariable.js +1 -1
  343. package/lib/utils/grammar.js +1 -1
  344. package/lib/utils/handleAction.d.ts +0 -1
  345. package/lib/utils/handleAction.js +1 -1
  346. package/lib/utils/helper.d.ts +5 -4
  347. package/lib/utils/helper.js +2 -2
  348. package/lib/utils/highlight.js +1 -1
  349. package/lib/utils/icon.js +1 -1
  350. package/lib/utils/image.d.ts +0 -1
  351. package/lib/utils/image.js +1 -1
  352. package/lib/utils/index.d.ts +1 -0
  353. package/lib/utils/index.js +1 -1
  354. package/lib/utils/isPureVariable.js +1 -1
  355. package/lib/utils/json-schema-2-amis-schema.js +1 -1
  356. package/lib/utils/keyToPath.js +1 -1
  357. package/lib/utils/labelToString.js +1 -1
  358. package/lib/utils/loopTooMuch.js +1 -1
  359. package/lib/utils/makeSorter.js +1 -1
  360. package/lib/utils/math.js +1 -1
  361. package/lib/utils/memoryParse.js +1 -1
  362. package/lib/utils/normalizeLink.js +1 -1
  363. package/lib/utils/normalizeOptions.js +1 -1
  364. package/lib/utils/object.js +1 -1
  365. package/lib/utils/offset.js +1 -1
  366. package/lib/utils/offsetParent.js +1 -1
  367. package/lib/utils/optionValueCompare.js +1 -1
  368. package/lib/utils/position.js +1 -1
  369. package/lib/utils/prettyBytes.js +1 -1
  370. package/lib/utils/printElement.js +1 -1
  371. package/lib/utils/renderer-event.d.ts +4 -5
  372. package/lib/utils/renderer-event.js +10 -10
  373. package/lib/utils/replaceText.js +1 -1
  374. package/lib/utils/resize-sensor.js +1 -1
  375. package/lib/utils/resolveCondition.d.ts +1 -1
  376. package/lib/utils/resolveCondition.js +8 -8
  377. package/lib/utils/resolveVariable.js +1 -1
  378. package/lib/utils/resolveVariableAndFilter.js +1 -1
  379. package/lib/utils/resolveVariableAndFilterForAsync.js +11 -7
  380. package/lib/utils/scrollPosition.js +1 -1
  381. package/lib/utils/string2regExp.js +1 -1
  382. package/lib/utils/stripNumber.js +1 -1
  383. package/lib/utils/style-helper.js +1 -1
  384. package/lib/utils/style.js +1 -1
  385. package/lib/utils/toNumber.js +1 -1
  386. package/lib/utils/tokenize.js +1 -1
  387. package/lib/utils/tpl-builtin.d.ts +1 -1
  388. package/lib/utils/tpl-builtin.js +8 -4
  389. package/lib/utils/tpl-lodash.js +1 -1
  390. package/lib/utils/tpl.d.ts +1 -1
  391. package/lib/utils/tpl.js +6 -2
  392. package/lib/utils/uncontrollable.d.ts +0 -1
  393. package/lib/utils/uncontrollable.js +1 -1
  394. package/lib/utils/validateId.js +1 -1
  395. package/lib/utils/validations.js +5 -1
  396. package/lib/utils/visitedCache.js +1 -1
  397. package/package.json +3 -3
package/esm/WithStore.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v6.14.0-beta.8
2
+ * amis-core v7.0.0-next.0
3
3
  * Copyright 2018-2025 fex
4
4
  */
5
5
 
@@ -37,9 +37,8 @@ function HocStoreFactory(renderer) {
37
37
  var StoreFactory = /** @class */ (function (_super) {
38
38
  __extends(StoreFactory, _super);
39
39
  function StoreFactory(props, context) {
40
- var _this = this;
41
40
  var _a;
42
- _this = _super.call(this, props) || this;
41
+ var _this = _super.call(this, props) || this;
43
42
  var rootStore = context;
44
43
  _this.renderChild = _this.renderChild.bind(_this);
45
44
  _this.refFn = _this.refFn.bind(_this);
@@ -1,35 +1,21 @@
1
- /// <reference types="react" />
2
1
  import { RendererProps } from '../factory';
3
- import { ConditionGroupValue } from '../types';
4
2
  import { RendererEvent } from '../utils/renderer-event';
5
3
  import { IBreakAction } from './BreakAction';
6
4
  import { IContinueAction } from './ContinueAction';
7
5
  import { ILoopAction } from './LoopAction';
8
6
  import { IParallelAction } from './ParallelAction';
9
7
  import { ISwitchAction } from './SwitchAction';
8
+ import { AMISAction, AMISActionBase } from '../schema';
10
9
  export declare enum LoopStatus {
11
10
  NORMAL = 0,
12
11
  BREAK = 1,
13
12
  CONTINUE = 2
14
13
  }
15
- export interface ListenerAction {
16
- actionType: string;
17
- description?: string;
18
- componentId?: string;
19
- componentName?: string;
20
- ignoreError?: boolean;
21
- args?: Record<string, any>;
22
- data?: Record<string, any> | null;
23
- dataMergeMode?: 'merge' | 'override';
24
- outputVar?: string;
25
- preventDefault?: boolean;
26
- stopPropagation?: boolean;
27
- expression?: string | ConditionGroupValue;
28
- execOn?: string;
14
+ export interface ListenerAction extends AMISActionBase {
29
15
  [propName: string]: any;
30
16
  }
31
17
  export interface ILogicAction extends ListenerAction {
32
- children?: ListenerAction[];
18
+ children?: AMISAction[];
33
19
  }
34
20
  export type LogicAction = IParallelAction | ISwitchAction | ILoopAction | IContinueAction | IBreakAction;
35
21
  export interface ListenerContext extends React.Component<RendererProps> {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v6.14.0-beta.8
2
+ * amis-core v7.0.0-next.0
3
3
  * Copyright 2018-2025 fex
4
4
  */
5
5
 
@@ -22,8 +22,8 @@ import 'react';
22
22
  import 'lodash/chunk';
23
23
  import '../utils/DataSchema.js';
24
24
  import '../utils/DataScope.js';
25
- import 'react-dom';
26
25
  import '../utils/helper.js';
26
+ import 'react-dom';
27
27
  import '../utils/errors.js';
28
28
  import 'lodash/isPlainObject';
29
29
  import '../theme.js';
@@ -2,7 +2,7 @@ import { Api } from '../types';
2
2
  import { RendererEvent } from '../utils/renderer-event';
3
3
  import { RendererAction, ListenerAction, ListenerContext } from './Action';
4
4
  export interface IAjaxAction extends ListenerAction {
5
- action: 'ajax';
5
+ actionType: 'ajax' | 'download';
6
6
  api: Api;
7
7
  messages?: {
8
8
  success: string;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v6.14.0-beta.8
2
+ * amis-core v7.0.0-next.0
3
3
  * Copyright 2018-2025 fex
4
4
  */
5
5
 
@@ -24,14 +24,14 @@ var AjaxAction = /** @class */ (function () {
24
24
  this.fetcherType = fetcherType;
25
25
  }
26
26
  AjaxAction.prototype.run = function (action, renderer, event) {
27
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
28
27
  return __awaiter(this, void 0, void 0, function () {
29
28
  var env, silent, messages, api, sendOn, result, responseData, msg, e_1, result;
30
- var _p;
29
+ var _a;
30
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
31
31
  return __generator(this, function (_q) {
32
32
  switch (_q.label) {
33
33
  case 0:
34
- if (!((_a = event.context.env) === null || _a === void 0 ? void 0 : _a.fetcher)) {
34
+ if (!((_b = event.context.env) === null || _b === void 0 ? void 0 : _b.fetcher)) {
35
35
  throw new Error('env.fetcher is required!');
36
36
  }
37
37
  if (!action.api) {
@@ -43,11 +43,11 @@ var AjaxAction = /** @class */ (function () {
43
43
  }
44
44
  }
45
45
  env = event.context.env;
46
- silent = ((_b = action === null || action === void 0 ? void 0 : action.options) === null || _b === void 0 ? void 0 : _b.silent) || (action === null || action === void 0 ? void 0 : action.api).silent;
47
- messages = (_c = action === null || action === void 0 ? void 0 : action.api) === null || _c === void 0 ? void 0 : _c.messages;
46
+ silent = ((_c = action === null || action === void 0 ? void 0 : action.options) === null || _c === void 0 ? void 0 : _c.silent) || (action === null || action === void 0 ? void 0 : action.api).silent;
47
+ messages = (_d = action === null || action === void 0 ? void 0 : action.api) === null || _d === void 0 ? void 0 : _d.messages;
48
48
  api = normalizeApi(action.api);
49
49
  if (!api.sendOn) return [3 /*break*/, 2];
50
- return [4 /*yield*/, evalExpressionWithConditionBuilderAsync(api.sendOn, (_d = action.data) !== null && _d !== void 0 ? _d : {}, false)];
50
+ return [4 /*yield*/, evalExpressionWithConditionBuilderAsync(api.sendOn, (_e = action.data) !== null && _e !== void 0 ? _e : {}, false)];
51
51
  case 1:
52
52
  sendOn = _q.sent();
53
53
  if (!sendOn) {
@@ -62,20 +62,20 @@ var AjaxAction = /** @class */ (function () {
62
62
  _q.label = 3;
63
63
  case 3:
64
64
  _q.trys.push([3, 5, , 6]);
65
- return [4 /*yield*/, env.fetcher(api, (_e = action.data) !== null && _e !== void 0 ? _e : {}, (_f = action === null || action === void 0 ? void 0 : action.options) !== null && _f !== void 0 ? _f : {})];
65
+ return [4 /*yield*/, env.fetcher(api, (_f = action.data) !== null && _f !== void 0 ? _f : {}, (_g = action === null || action === void 0 ? void 0 : action.options) !== null && _g !== void 0 ? _g : {})];
66
66
  case 4:
67
67
  result = _q.sent();
68
68
  responseData = !isEmpty(result.data) || result.ok
69
69
  ? normalizeApiResponseData(result.data)
70
70
  : null;
71
71
  // 记录请求返回的数据
72
- event.setData(createObject(event.data, __assign(__assign(__assign({}, event.data), responseData), (_p = { responseData: responseData }, _p[action.outputVar || 'responseResult'] = __assign(__assign({}, responseData), { responseData: responseData, responseStatus: result.status, responseMsg: result.msg }), _p))));
72
+ event.setData(createObject(event.data, __assign(__assign(__assign({}, event.data), responseData), (_a = { responseData: responseData }, _a[action.outputVar || 'responseResult'] = __assign(__assign({}, responseData), { responseData: responseData, responseStatus: result.status, responseMsg: result.msg }), _a))));
73
73
  if (!silent) {
74
74
  if (!result.ok) {
75
- throw new ServerError((_j = (_g = messages === null || messages === void 0 ? void 0 : messages.failed) !== null && _g !== void 0 ? _g : (_h = action.messages) === null || _h === void 0 ? void 0 : _h.failed) !== null && _j !== void 0 ? _j : result.msg, result);
75
+ throw new ServerError((_k = (_h = messages === null || messages === void 0 ? void 0 : messages.failed) !== null && _h !== void 0 ? _h : (_j = action.messages) === null || _j === void 0 ? void 0 : _j.failed) !== null && _k !== void 0 ? _k : result.msg, result);
76
76
  }
77
77
  else {
78
- msg = (_o = (_m = (_k = messages === null || messages === void 0 ? void 0 : messages.success) !== null && _k !== void 0 ? _k : (_l = action.messages) === null || _l === void 0 ? void 0 : _l.success) !== null && _m !== void 0 ? _m : result.msg) !== null && _o !== void 0 ? _o : result.defaultMsg;
78
+ msg = (_p = (_o = (_l = messages === null || messages === void 0 ? void 0 : messages.success) !== null && _l !== void 0 ? _l : (_m = action.messages) === null || _m === void 0 ? void 0 : _m.success) !== null && _o !== void 0 ? _o : result.msg) !== null && _p !== void 0 ? _p : result.defaultMsg;
79
79
  msg &&
80
80
  env.notify('success', msg, result.msgTimeout !== undefined
81
81
  ? {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v6.14.0-beta.8
2
+ * amis-core v7.0.0-next.0
3
3
  * Copyright 2018-2025 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v6.14.0-beta.8
2
+ * amis-core v7.0.0-next.0
3
3
  * Copyright 2018-2025 fex
4
4
  */
5
5
 
@@ -20,9 +20,9 @@ var BroadcastAction = /** @class */ (function () {
20
20
  function BroadcastAction() {
21
21
  }
22
22
  BroadcastAction.prototype.run = function (action, renderer, event) {
23
- var _a, _b, _c;
24
23
  return __awaiter(this, void 0, void 0, function () {
25
24
  var eventName;
25
+ var _a, _b, _c;
26
26
  return __generator(this, function (_d) {
27
27
  switch (_d.label) {
28
28
  case 0:
@@ -1,7 +1,7 @@
1
1
  import { RendererEvent } from '../utils/renderer-event';
2
2
  import { RendererAction, ListenerAction, ListenerContext } from './Action';
3
3
  export interface ICmptAction extends ListenerAction {
4
- actionType: string;
4
+ actionType: 'setValue' | 'reload' | 'validateFormItem';
5
5
  args: {
6
6
  resetPage?: boolean;
7
7
  path?: string;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v6.14.0-beta.8
2
+ * amis-core v7.0.0-next.0
3
3
  * Copyright 2018-2025 fex
4
4
  */
5
5
 
@@ -20,22 +20,22 @@ var CmptAction = /** @class */ (function () {
20
20
  function CmptAction() {
21
21
  }
22
22
  CmptAction.prototype.run = function (action, renderer, event) {
23
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6;
24
23
  return __awaiter(this, void 0, void 0, function () {
25
- var key, dataMergeMode, path, topStore, beforeSetData, res, component, msg, result, valid, _7, e_1, result, e_2;
26
- var _8, _9, _10, _11, _12, _13;
24
+ var key, dataMergeMode, path, topStore, beforeSetData, res, component, msg, result, valid, _a, e_1, result, e_2;
25
+ var _b, _c, _d, _e, _f, _g;
26
+ var _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13;
27
27
  return __generator(this, function (_14) {
28
28
  switch (_14.label) {
29
29
  case 0:
30
30
  key = action.componentId || action.componentName;
31
31
  dataMergeMode = action.dataMergeMode || 'merge';
32
- path = (_a = action.args) === null || _a === void 0 ? void 0 : _a.path;
32
+ path = (_h = action.args) === null || _h === void 0 ? void 0 : _h.path;
33
33
  if (!(action.actionType === 'setValue' && path && typeof path === 'string')) return [3 /*break*/, 2];
34
34
  if (path.startsWith('global.')) {
35
35
  topStore = renderer.props.topStore;
36
36
  topStore === null || topStore === void 0 ? void 0 : topStore.updateGlobalVarValue(path.substring(7), action.args.value);
37
37
  }
38
- beforeSetData = (_c = (_b = event === null || event === void 0 ? void 0 : event.context) === null || _b === void 0 ? void 0 : _b.env) === null || _c === void 0 ? void 0 : _c.beforeSetData;
38
+ beforeSetData = (_k = (_j = event === null || event === void 0 ? void 0 : event.context) === null || _j === void 0 ? void 0 : _j.env) === null || _k === void 0 ? void 0 : _k.beforeSetData;
39
39
  if (!(beforeSetData && typeof beforeSetData === 'function')) return [3 /*break*/, 2];
40
40
  return [4 /*yield*/, beforeSetData(renderer, action, event)];
41
41
  case 1:
@@ -60,91 +60,91 @@ var CmptAction = /** @class */ (function () {
60
60
  }
61
61
  if (action.actionType === 'setValue') {
62
62
  if (component === null || component === void 0 ? void 0 : component.setData) {
63
- return [2 /*return*/, component === null || component === void 0 ? void 0 : component.setData((_d = action.args) === null || _d === void 0 ? void 0 : _d.value, dataMergeMode === 'override', (_e = action.args) === null || _e === void 0 ? void 0 : _e.index, (_f = action.args) === null || _f === void 0 ? void 0 : _f.condition)];
63
+ return [2 /*return*/, component === null || component === void 0 ? void 0 : component.setData((_l = action.args) === null || _l === void 0 ? void 0 : _l.value, dataMergeMode === 'override', (_m = action.args) === null || _m === void 0 ? void 0 : _m.index, (_o = action.args) === null || _o === void 0 ? void 0 : _o.condition)];
64
64
  }
65
65
  else {
66
- return [2 /*return*/, (_h = component === null || component === void 0 ? void 0 : (_g = component.props).onChange) === null || _h === void 0 ? void 0 : _h.call(_g, (_j = action.args) === null || _j === void 0 ? void 0 : _j.value)];
66
+ return [2 /*return*/, (_q = component === null || component === void 0 ? void 0 : (_p = component.props).onChange) === null || _q === void 0 ? void 0 : _q.call(_p, (_r = action.args) === null || _r === void 0 ? void 0 : _r.value)];
67
67
  }
68
68
  }
69
69
  if (!(action.actionType === 'reload')) return [3 /*break*/, 4];
70
- return [4 /*yield*/, ((_k = component === null || component === void 0 ? void 0 : component.reload) === null || _k === void 0 ? void 0 : _k.call(component, undefined, action.data, event.data, undefined, dataMergeMode === 'override', __assign(__assign({}, action.args), { resetPage: (_m = (_l = action.args) === null || _l === void 0 ? void 0 : _l.resetPage) !== null && _m !== void 0 ? _m : action.resetPage })))];
70
+ return [4 /*yield*/, ((_s = component === null || component === void 0 ? void 0 : component.reload) === null || _s === void 0 ? void 0 : _s.call(component, undefined, action.data, event.data, undefined, dataMergeMode === 'override', __assign(__assign({}, action.args), { resetPage: (_u = (_t = action.args) === null || _t === void 0 ? void 0 : _t.resetPage) !== null && _u !== void 0 ? _u : action.resetPage })))];
71
71
  case 3:
72
72
  result = _14.sent();
73
73
  if (result && action.outputVar) {
74
- event.setData(extendObject(event.data, (_8 = {},
75
- _8[action.outputVar] = result,
76
- _8)));
74
+ event.setData(extendObject(event.data, (_b = {},
75
+ _b[action.outputVar] = result,
76
+ _b)));
77
77
  }
78
78
  return [2 /*return*/, result];
79
79
  case 4:
80
80
  if (!(action.actionType === 'validateFormItem' &&
81
- ((_p = getRendererByName((_o = component === null || component === void 0 ? void 0 : component.props) === null || _o === void 0 ? void 0 : _o.type)) === null || _p === void 0 ? void 0 : _p.isFormItem))) return [3 /*break*/, 11];
81
+ ((_w = getRendererByName((_v = component === null || component === void 0 ? void 0 : component.props) === null || _v === void 0 ? void 0 : _v.type)) === null || _w === void 0 ? void 0 : _w.isFormItem))) return [3 /*break*/, 11];
82
82
  _14.label = 5;
83
83
  case 5:
84
84
  _14.trys.push([5, 9, , 10]);
85
- return [4 /*yield*/, ((_r = component === null || component === void 0 ? void 0 : (_q = component.props).onValidate) === null || _r === void 0 ? void 0 : _r.call(_q))];
85
+ return [4 /*yield*/, ((_y = component === null || component === void 0 ? void 0 : (_x = component.props).onValidate) === null || _y === void 0 ? void 0 : _y.call(_x))];
86
86
  case 6:
87
- _7 = (_14.sent());
88
- if (!_7) return [3 /*break*/, 8];
89
- return [4 /*yield*/, ((_s = component === null || component === void 0 ? void 0 : component.validate) === null || _s === void 0 ? void 0 : _s.call(component))];
87
+ _a = (_14.sent());
88
+ if (!_a) return [3 /*break*/, 8];
89
+ return [4 /*yield*/, ((_z = component === null || component === void 0 ? void 0 : component.validate) === null || _z === void 0 ? void 0 : _z.call(component))];
90
90
  case 7:
91
- _7 = !(_14.sent());
91
+ _a = !(_14.sent());
92
92
  _14.label = 8;
93
93
  case 8:
94
- valid = _7;
94
+ valid = _a;
95
95
  if (valid) {
96
- event.setData(createObject(event.data, (_9 = {},
97
- _9[action.outputVar || "".concat(action.actionType, "Result")] = {
96
+ event.setData(createObject(event.data, (_c = {},
97
+ _c[action.outputVar || "".concat(action.actionType, "Result")] = {
98
98
  error: '',
99
- value: (_u = (_t = component === null || component === void 0 ? void 0 : component.props) === null || _t === void 0 ? void 0 : _t.formItem) === null || _u === void 0 ? void 0 : _u.value
99
+ value: (_1 = (_0 = component === null || component === void 0 ? void 0 : component.props) === null || _0 === void 0 ? void 0 : _0.formItem) === null || _1 === void 0 ? void 0 : _1.value
100
100
  },
101
- _9)));
101
+ _c)));
102
102
  }
103
103
  else {
104
- event.setData(createObject(event.data, (_10 = {},
105
- _10[action.outputVar || "".concat(action.actionType, "Result")] = {
104
+ event.setData(createObject(event.data, (_d = {},
105
+ _d[action.outputVar || "".concat(action.actionType, "Result")] = {
106
106
  error: typeof valid === 'string'
107
107
  ? valid
108
- : (((_w = (_v = component === null || component === void 0 ? void 0 : component.props) === null || _v === void 0 ? void 0 : _v.formItem) === null || _w === void 0 ? void 0 : _w.errors) || []).join(','),
109
- value: (_y = (_x = component === null || component === void 0 ? void 0 : component.props) === null || _x === void 0 ? void 0 : _x.formItem) === null || _y === void 0 ? void 0 : _y.value
108
+ : (((_3 = (_2 = component === null || component === void 0 ? void 0 : component.props) === null || _2 === void 0 ? void 0 : _2.formItem) === null || _3 === void 0 ? void 0 : _3.errors) || []).join(','),
109
+ value: (_5 = (_4 = component === null || component === void 0 ? void 0 : component.props) === null || _4 === void 0 ? void 0 : _4.formItem) === null || _5 === void 0 ? void 0 : _5.value
110
110
  },
111
- _10)));
111
+ _d)));
112
112
  }
113
113
  return [3 /*break*/, 10];
114
114
  case 9:
115
115
  e_1 = _14.sent();
116
- event.setData(createObject(event.data, (_11 = {},
117
- _11[action.outputVar || "".concat(action.actionType, "Result")] = {
116
+ event.setData(createObject(event.data, (_e = {},
117
+ _e[action.outputVar || "".concat(action.actionType, "Result")] = {
118
118
  error: e_1.message || '未知错误',
119
- value: (_0 = (_z = component === null || component === void 0 ? void 0 : component.props) === null || _z === void 0 ? void 0 : _z.formItem) === null || _0 === void 0 ? void 0 : _0.value
119
+ value: (_7 = (_6 = component === null || component === void 0 ? void 0 : component.props) === null || _6 === void 0 ? void 0 : _6.formItem) === null || _7 === void 0 ? void 0 : _7.value
120
120
  },
121
- _11)));
121
+ _e)));
122
122
  return [3 /*break*/, 10];
123
123
  case 10: return [2 /*return*/];
124
124
  case 11:
125
125
  _14.trys.push([11, 13, , 14]);
126
- return [4 /*yield*/, ((_1 = component === null || component === void 0 ? void 0 : component.doAction) === null || _1 === void 0 ? void 0 : _1.call(component, action, event.data, true, action.args))];
126
+ return [4 /*yield*/, ((_8 = component === null || component === void 0 ? void 0 : component.doAction) === null || _8 === void 0 ? void 0 : _8.call(component, action, event.data, true, action.args))];
127
127
  case 12:
128
128
  result = _14.sent();
129
129
  if (['validate', 'submit'].includes(action.actionType)) {
130
- event.setData(createObject(event.data, (_12 = {},
131
- _12[action.outputVar || "".concat(action.actionType, "Result")] = {
130
+ event.setData(createObject(event.data, (_f = {},
131
+ _f[action.outputVar || "".concat(action.actionType, "Result")] = {
132
132
  error: '',
133
- payload: (_2 = result === null || result === void 0 ? void 0 : result.__payload) !== null && _2 !== void 0 ? _2 : (_4 = (_3 = component === null || component === void 0 ? void 0 : component.props) === null || _3 === void 0 ? void 0 : _3.store) === null || _4 === void 0 ? void 0 : _4.data,
133
+ payload: (_9 = result === null || result === void 0 ? void 0 : result.__payload) !== null && _9 !== void 0 ? _9 : (_11 = (_10 = component === null || component === void 0 ? void 0 : component.props) === null || _10 === void 0 ? void 0 : _10.store) === null || _11 === void 0 ? void 0 : _11.data,
134
134
  responseData: result === null || result === void 0 ? void 0 : result.__response
135
135
  },
136
- _12)));
136
+ _f)));
137
137
  }
138
138
  return [2 /*return*/, result];
139
139
  case 13:
140
140
  e_2 = _14.sent();
141
- event.setData(createObject(event.data, (_13 = {},
142
- _13[action.outputVar || "".concat(action.actionType, "Result")] = {
141
+ event.setData(createObject(event.data, (_g = {},
142
+ _g[action.outputVar || "".concat(action.actionType, "Result")] = {
143
143
  error: e_2.message,
144
144
  errors: e_2.name === 'ValidateError' ? e_2.detail : e_2,
145
- payload: (_6 = (_5 = component === null || component === void 0 ? void 0 : component.props) === null || _5 === void 0 ? void 0 : _5.store) === null || _6 === void 0 ? void 0 : _6.data
145
+ payload: (_13 = (_12 = component === null || component === void 0 ? void 0 : component.props) === null || _12 === void 0 ? void 0 : _12.store) === null || _13 === void 0 ? void 0 : _13.data
146
146
  },
147
- _13)));
147
+ _g)));
148
148
  return [3 /*break*/, 14];
149
149
  case 14: return [2 /*return*/];
150
150
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v6.14.0-beta.8
2
+ * amis-core v7.0.0-next.0
3
3
  * Copyright 2018-2025 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v6.14.0-beta.8
2
+ * amis-core v7.0.0-next.0
3
3
  * Copyright 2018-2025 fex
4
4
  */
5
5
 
@@ -17,8 +17,8 @@ var CopyAction = /** @class */ (function () {
17
17
  function CopyAction() {
18
18
  }
19
19
  CopyAction.prototype.run = function (action, renderer, event) {
20
- var _a, _b, _c, _d, _e;
21
20
  return __awaiter(this, void 0, void 0, function () {
21
+ var _a, _b, _c, _d, _e;
22
22
  return __generator(this, function (_f) {
23
23
  if (!((_a = event.context.env) === null || _a === void 0 ? void 0 : _a.copy)) {
24
24
  throw new Error('env.copy is required!');
@@ -1,7 +1,8 @@
1
1
  import { ActionObject } from '../types';
2
2
  import { RendererEvent } from '../utils/renderer-event';
3
3
  import { RendererAction, ListenerAction, ListenerContext } from './Action';
4
- type ScriptType = string | ((renderer: any, doAction: (action: ActionObject, data: Record<string, any>) => void, event: RendererEvent<any>, action: ListenerAction) => void);
4
+ import { AMISFunction } from '../schema';
5
+ type ScriptType = AMISFunction<(renderer: any, doAction: (action: ActionObject, data: Record<string, any>) => void, event: RendererEvent<any>, action: ListenerAction) => void>;
5
6
  export interface ICustomAction extends ListenerAction {
6
7
  actionType: 'custom';
7
8
  args: {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v6.14.0-beta.8
2
+ * amis-core v7.0.0-next.0
3
3
  * Copyright 2018-2025 fex
4
4
  */
5
5
 
@@ -19,8 +19,8 @@ import 'lodash/chunk';
19
19
  import '../utils/DataSchema.js';
20
20
  import '../utils/DataScope.js';
21
21
  import '../utils/debug.js';
22
- import 'react-dom';
23
22
  import '../utils/helper.js';
23
+ import 'react-dom';
24
24
  import '../utils/errors.js';
25
25
  import '../utils/tpl.js';
26
26
  import '../theme.js';
@@ -59,9 +59,9 @@ var CustomAction = /** @class */ (function () {
59
59
  function CustomAction() {
60
60
  }
61
61
  CustomAction.prototype.run = function (action, renderer, event) {
62
- var _a, _b;
63
62
  return __awaiter(this, void 0, void 0, function () {
64
63
  var scriptFunc, proxy;
64
+ var _a, _b;
65
65
  return __generator(this, function (_c) {
66
66
  switch (_c.label) {
67
67
  case 0:
@@ -1,9 +1,9 @@
1
- import { Schema, SchemaNode } from '../types';
1
+ import { AMISDialogSchemaBase, AMISLegacyReloadActionButton } from '../schema';
2
2
  import { RendererEvent } from '../utils/renderer-event';
3
3
  import { RendererAction, ListenerAction, ListenerContext } from './Action';
4
4
  export interface IAlertAction extends ListenerAction {
5
5
  actionType: 'alert';
6
- dialog?: Schema;
6
+ dialog?: AMISDialogSchemaBase;
7
7
  args: {
8
8
  msg: string;
9
9
  [propName: string]: any;
@@ -20,9 +20,9 @@ export interface IConfirmAction extends ListenerAction {
20
20
  export interface IDialogAction extends ListenerAction {
21
21
  actionType: 'dialog';
22
22
  args: {
23
- dialog: SchemaNode;
23
+ dialog: AMISDialogSchemaBase;
24
24
  };
25
- dialog?: SchemaNode;
25
+ dialog?: AMISDialogSchemaBase;
26
26
  /**
27
27
  * 是否等待确认结果
28
28
  */
@@ -34,11 +34,11 @@ export interface IDialogAction extends ListenerAction {
34
34
  }
35
35
  export interface IConfirmDialogAction extends ListenerAction {
36
36
  actionType: 'confirmDialog';
37
- dialog?: Schema;
37
+ dialog?: AMISDialogSchemaBase;
38
38
  args: {
39
39
  msg: string;
40
40
  title: string;
41
- body?: Schema;
41
+ body?: AMISLegacyReloadActionButton;
42
42
  closeOnEsc?: boolean;
43
43
  size?: '' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
44
44
  confirmText?: string;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v6.14.0-beta.8
2
+ * amis-core v7.0.0-next.0
3
3
  * Copyright 2018-2025 fex
4
4
  */
5
5
 
@@ -20,8 +20,8 @@ import 'lodash/chunk';
20
20
  import '../utils/DataSchema.js';
21
21
  import '../utils/DataScope.js';
22
22
  import '../utils/debug.js';
23
- import 'react-dom';
24
23
  import '../utils/helper.js';
24
+ import 'react-dom';
25
25
  import '../utils/errors.js';
26
26
  import { filter } from '../utils/tpl.js';
27
27
  import '../theme.js';
@@ -60,10 +60,10 @@ var DialogAction = /** @class */ (function () {
60
60
  function DialogAction() {
61
61
  }
62
62
  DialogAction.prototype.run = function (action, renderer, event) {
63
- var _a, _b;
64
63
  return __awaiter(this, void 0, void 0, function () {
65
- var ret, _c, confirmed, value;
66
- var _d;
64
+ var ret, _a, confirmed, value;
65
+ var _b;
66
+ var _c, _d;
67
67
  return __generator(this, function (_e) {
68
68
  switch (_e.label) {
69
69
  case 0:
@@ -78,7 +78,7 @@ var DialogAction = /** @class */ (function () {
78
78
  reload: 'none',
79
79
  data: action.rawData
80
80
  }, action.data)
81
- : (_b = (_a = renderer.props).onAction) === null || _b === void 0 ? void 0 : _b.call(_a, event, {
81
+ : (_d = (_c = renderer.props).onAction) === null || _d === void 0 ? void 0 : _d.call(_c, event, {
82
82
  actionType: 'dialog',
83
83
  dialog: action.dialog,
84
84
  reload: 'none',
@@ -88,13 +88,13 @@ var DialogAction = /** @class */ (function () {
88
88
  if (!action.waitForAction) return [3 /*break*/, 2];
89
89
  return [4 /*yield*/, ret];
90
90
  case 1:
91
- _c = _e.sent(), confirmed = _c.confirmed, value = _c.value;
92
- event.setData(extendObject(event.data, (_d = {},
93
- _d[action.outputVar || 'dialogResponse'] = {
91
+ _a = _e.sent(), confirmed = _a.confirmed, value = _a.value;
92
+ event.setData(extendObject(event.data, (_b = {},
93
+ _b[action.outputVar || 'dialogResponse'] = {
94
94
  confirmed: confirmed,
95
95
  value: value
96
96
  },
97
- _d)));
97
+ _b)));
98
98
  _e.label = 2;
99
99
  case 2: return [2 /*return*/];
100
100
  }
@@ -114,8 +114,8 @@ var CloseDialogAction = /** @class */ (function () {
114
114
  function CloseDialogAction() {
115
115
  }
116
116
  CloseDialogAction.prototype.run = function (action, renderer, event) {
117
- var _a, _b;
118
117
  return __awaiter(this, void 0, void 0, function () {
118
+ var _a, _b;
119
119
  return __generator(this, function (_c) {
120
120
  // todo 支持 waitForAction,等待弹窗关闭后再执行后续动作
121
121
  if (action.componentId) {
@@ -139,8 +139,8 @@ var AlertAction = /** @class */ (function () {
139
139
  function AlertAction() {
140
140
  }
141
141
  AlertAction.prototype.run = function (action, renderer, event) {
142
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
143
142
  return __awaiter(this, void 0, void 0, function () {
143
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
144
144
  return __generator(this, function (_l) {
145
145
  (_b = (_a = event.context.env).alert) === null || _b === void 0 ? void 0 : _b.call(_a, (_d = filter((_c = action.dialog) === null || _c === void 0 ? void 0 : _c.msg, event.data)) !== null && _d !== void 0 ? _d : (_e = action.args) === null || _e === void 0 ? void 0 : _e.msg, (_g = filter((_f = action.dialog) === null || _f === void 0 ? void 0 : _f.title, event.data)) !== null && _g !== void 0 ? _g : (_h = action.args) === null || _h === void 0 ? void 0 : _h.title, (_k = filter((_j = action.dialog) === null || _j === void 0 ? void 0 : _j.className, event.data)) !== null && _k !== void 0 ? _k : '');
146
146
  return [2 /*return*/];
@@ -156,9 +156,9 @@ var ConfirmAction = /** @class */ (function () {
156
156
  function ConfirmAction() {
157
157
  }
158
158
  ConfirmAction.prototype.run = function (action, renderer, event) {
159
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
160
159
  return __awaiter(this, void 0, void 0, function () {
161
160
  var modal, type, confirmed_1, confirmed;
161
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
162
162
  return __generator(this, function (_v) {
163
163
  switch (_v.label) {
164
164
  case 0:
@@ -1,12 +1,12 @@
1
- import { SchemaNode } from '../types';
1
+ import { AMISDrawerSchemaBase } from '../schema';
2
2
  import { RendererEvent } from '../utils/renderer-event';
3
3
  import { RendererAction, ListenerAction, ListenerContext } from './Action';
4
4
  export interface IDrawerAction extends ListenerAction {
5
5
  actionType: 'drawer';
6
6
  args: {
7
- drawer: SchemaNode;
7
+ drawer: AMISDrawerSchemaBase;
8
8
  };
9
- drawer?: SchemaNode;
9
+ drawer?: AMISDrawerSchemaBase;
10
10
  /**
11
11
  * 是否等待确认结果
12
12
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v6.14.0-beta.8
2
+ * amis-core v7.0.0-next.0
3
3
  * Copyright 2018-2025 fex
4
4
  */
5
5
 
@@ -20,8 +20,8 @@ import 'lodash/chunk';
20
20
  import '../utils/DataSchema.js';
21
21
  import '../utils/DataScope.js';
22
22
  import '../utils/debug.js';
23
- import 'react-dom';
24
23
  import '../utils/helper.js';
24
+ import 'react-dom';
25
25
  import '../utils/errors.js';
26
26
  import '../utils/tpl.js';
27
27
  import '../theme.js';
@@ -60,10 +60,10 @@ var DrawerAction = /** @class */ (function () {
60
60
  function DrawerAction() {
61
61
  }
62
62
  DrawerAction.prototype.run = function (action, renderer, event) {
63
- var _a, _b;
64
63
  return __awaiter(this, void 0, void 0, function () {
65
- var ret, _c, confirmed, value;
66
- var _d;
64
+ var ret, _a, confirmed, value;
65
+ var _b;
66
+ var _c, _d;
67
67
  return __generator(this, function (_e) {
68
68
  switch (_e.label) {
69
69
  case 0:
@@ -78,7 +78,7 @@ var DrawerAction = /** @class */ (function () {
78
78
  reload: 'none',
79
79
  data: action.rawData
80
80
  }, action.data)
81
- : (_b = (_a = renderer.props).onAction) === null || _b === void 0 ? void 0 : _b.call(_a, event, {
81
+ : (_d = (_c = renderer.props).onAction) === null || _d === void 0 ? void 0 : _d.call(_c, event, {
82
82
  actionType: 'drawer',
83
83
  drawer: action.drawer,
84
84
  reload: 'none',
@@ -88,13 +88,13 @@ var DrawerAction = /** @class */ (function () {
88
88
  if (!action.waitForAction) return [3 /*break*/, 2];
89
89
  return [4 /*yield*/, ret];
90
90
  case 1:
91
- _c = _e.sent(), confirmed = _c.confirmed, value = _c.value;
92
- event.setData(extendObject(event.data, (_d = {},
93
- _d[action.outputVar || 'drawerResponse'] = {
91
+ _a = _e.sent(), confirmed = _a.confirmed, value = _a.value;
92
+ event.setData(extendObject(event.data, (_b = {},
93
+ _b[action.outputVar || 'drawerResponse'] = {
94
94
  confirmed: confirmed,
95
95
  value: value
96
96
  },
97
- _d)));
97
+ _b)));
98
98
  _e.label = 2;
99
99
  case 2: return [2 /*return*/];
100
100
  }
@@ -114,8 +114,8 @@ var CloseDrawerAction = /** @class */ (function () {
114
114
  function CloseDrawerAction() {
115
115
  }
116
116
  CloseDrawerAction.prototype.run = function (action, renderer, event) {
117
- var _a, _b;
118
117
  return __awaiter(this, void 0, void 0, function () {
118
+ var _a, _b;
119
119
  return __generator(this, function (_c) {
120
120
  if (action.componentId) {
121
121
  // 关闭指定抽屉