amis 2.1.1-beta.2 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (514) hide show
  1. package/esm/Schema.d.ts +3 -3
  2. package/esm/_virtual/MiniDecimal.js +8 -0
  3. package/esm/_virtual/classCallCheck.js +8 -0
  4. package/esm/_virtual/createClass.js +8 -0
  5. package/esm/_virtual/interopRequireDefault.js +8 -0
  6. package/esm/_virtual/numberUtil.js +8 -0
  7. package/esm/_virtual/supportUtil.js +8 -0
  8. package/esm/compat.js +1 -15
  9. package/esm/index.d.ts +1 -1
  10. package/esm/index.js +2 -2
  11. package/esm/node_modules/@babel/runtime/helpers/classCallCheck.js +25 -0
  12. package/esm/node_modules/@babel/runtime/helpers/createClass.js +38 -0
  13. package/esm/node_modules/@babel/runtime/helpers/interopRequireDefault.js +16 -0
  14. package/esm/node_modules/rc-input-number/lib/utils/MiniDecimal.js +345 -0
  15. package/esm/node_modules/rc-input-number/lib/utils/numberUtil.js +146 -0
  16. package/esm/node_modules/rc-input-number/lib/utils/supportUtil.js +25 -0
  17. package/esm/preset.js +9 -4
  18. package/esm/renderers/Action.d.ts +47 -1
  19. package/esm/renderers/Action.js +10 -5
  20. package/esm/renderers/Alert.js +1 -1
  21. package/esm/renderers/AnchorNav.js +1 -1
  22. package/esm/renderers/App.js +1 -1
  23. package/esm/renderers/Audio.js +1 -1
  24. package/esm/renderers/Avatar.js +1 -1
  25. package/esm/renderers/BarCode.js +1 -1
  26. package/esm/renderers/Breadcrumb.js +1 -1
  27. package/esm/renderers/ButtonGroup.js +1 -1
  28. package/esm/renderers/CRUD.d.ts +5 -2
  29. package/esm/renderers/CRUD.js +32 -14
  30. package/esm/renderers/CRUD2.d.ts +8 -5
  31. package/esm/renderers/CRUD2.js +14 -11
  32. package/esm/renderers/Calendar.d.ts +10 -0
  33. package/esm/renderers/Calendar.js +1 -1
  34. package/esm/renderers/Card.d.ts +4 -1
  35. package/esm/renderers/Card.js +11 -10
  36. package/esm/renderers/Card2.js +1 -1
  37. package/esm/renderers/Cards.d.ts +8 -2
  38. package/esm/renderers/Cards.js +7 -6
  39. package/esm/renderers/Carousel.js +1 -1
  40. package/esm/renderers/Chart.js +1 -1
  41. package/esm/renderers/Code.js +1 -1
  42. package/esm/renderers/Collapse.d.ts +1 -0
  43. package/esm/renderers/Collapse.js +12 -1
  44. package/esm/renderers/CollapseGroup.js +1 -1
  45. package/esm/renderers/Color.js +1 -1
  46. package/esm/renderers/Container.js +1 -1
  47. package/esm/renderers/Copyable.js +1 -1
  48. package/esm/renderers/Custom.js +1 -1
  49. package/esm/renderers/Date.js +1 -1
  50. package/esm/renderers/Dialog.d.ts +1202 -9
  51. package/esm/renderers/Dialog.js +43 -7
  52. package/esm/renderers/Divider.js +1 -1
  53. package/esm/renderers/Drawer.d.ts +2 -1
  54. package/esm/renderers/Drawer.js +42 -12
  55. package/esm/renderers/DropDownButton.js +1 -1
  56. package/esm/renderers/Each.js +1 -1
  57. package/esm/renderers/Flex.js +1 -1
  58. package/esm/renderers/Form/ButtonGroupSelect.js +1 -1
  59. package/esm/renderers/Form/ButtonToolbar.js +1 -1
  60. package/esm/renderers/Form/ChainedSelect.js +1 -1
  61. package/esm/renderers/Form/ChartRadios.js +1 -1
  62. package/esm/renderers/Form/Checkbox.js +1 -1
  63. package/esm/renderers/Form/Checkboxes.d.ts +2 -1
  64. package/esm/renderers/Form/Checkboxes.js +33 -7
  65. package/esm/renderers/Form/Combo.d.ts +4 -0
  66. package/esm/renderers/Form/Combo.js +10 -4
  67. package/esm/renderers/Form/ConditionBuilder.js +1 -1
  68. package/esm/renderers/Form/Control.js +1 -1
  69. package/esm/renderers/Form/DiffEditor.d.ts +70 -24
  70. package/esm/renderers/Form/DiffEditor.js +1 -1
  71. package/esm/renderers/Form/Editor.d.ts +46 -24
  72. package/esm/renderers/Form/Editor.js +5 -3
  73. package/esm/renderers/Form/FieldSet.d.ts +1 -0
  74. package/esm/renderers/Form/FieldSet.js +9 -3
  75. package/esm/renderers/Form/Formula.js +1 -1
  76. package/esm/renderers/Form/Group.js +1 -1
  77. package/esm/renderers/Form/Hidden.js +1 -1
  78. package/esm/renderers/Form/IconPicker.js +1 -1
  79. package/esm/renderers/Form/IconPickerIcons.js +1 -1
  80. package/esm/renderers/Form/InputArray.js +1 -1
  81. package/esm/renderers/Form/InputCity.d.ts +535 -5
  82. package/esm/renderers/Form/InputCity.js +1 -1
  83. package/esm/renderers/Form/InputColor.d.ts +454 -2
  84. package/esm/renderers/Form/InputColor.js +1 -1
  85. package/esm/renderers/Form/InputDate.js +2 -1
  86. package/esm/renderers/Form/InputDateRange.d.ts +8 -0
  87. package/esm/renderers/Form/InputDateRange.js +3 -2
  88. package/esm/renderers/Form/InputExcel.d.ts +14 -0
  89. package/esm/renderers/Form/InputExcel.js +60 -3
  90. package/esm/renderers/Form/InputFile.d.ts +1 -1
  91. package/esm/renderers/Form/InputFile.js +56 -30
  92. package/esm/renderers/Form/InputFormula.d.ts +7 -0
  93. package/esm/renderers/Form/InputFormula.js +3 -3
  94. package/esm/renderers/Form/InputGroup.js +1 -1
  95. package/esm/renderers/Form/InputImage.d.ts +13 -3
  96. package/esm/renderers/Form/InputImage.js +46 -23
  97. package/esm/renderers/Form/InputMonthRange.d.ts +2 -0
  98. package/esm/renderers/Form/InputMonthRange.js +3 -2
  99. package/esm/renderers/Form/InputNumber.d.ts +9 -2
  100. package/esm/renderers/Form/InputNumber.js +28 -5
  101. package/esm/renderers/Form/InputQuarterRange.d.ts +2 -0
  102. package/esm/renderers/Form/InputQuarterRange.js +3 -2
  103. package/esm/renderers/Form/InputRange.d.ts +3 -3
  104. package/esm/renderers/Form/InputRange.js +7 -7
  105. package/esm/renderers/Form/InputRating.js +1 -1
  106. package/esm/renderers/Form/InputRepeat.js +1 -1
  107. package/esm/renderers/Form/InputRichText.js +64 -47
  108. package/esm/renderers/Form/InputSubForm.js +1 -1
  109. package/esm/renderers/Form/InputTable.js +12 -5
  110. package/esm/renderers/Form/InputTag.js +1 -1
  111. package/esm/renderers/Form/InputText.d.ts +5 -1
  112. package/esm/renderers/Form/InputText.js +18 -12
  113. package/esm/renderers/Form/InputTree.d.ts +1 -0
  114. package/esm/renderers/Form/InputTree.js +13 -1
  115. package/esm/renderers/Form/InputYearRange.d.ts +2 -0
  116. package/esm/renderers/Form/InputYearRange.js +3 -2
  117. package/esm/renderers/Form/JSONSchema.js +1 -1
  118. package/esm/renderers/Form/JSONSchemaEditor.js +1 -1
  119. package/esm/renderers/Form/ListSelect.js +1 -1
  120. package/esm/renderers/Form/LocationPicker.js +1 -1
  121. package/esm/renderers/Form/MatrixCheckboxes.js +1 -1
  122. package/esm/renderers/Form/NestedSelect.js +1 -1
  123. package/esm/renderers/Form/Picker.d.ts +1 -0
  124. package/esm/renderers/Form/Picker.js +30 -3
  125. package/esm/renderers/Form/Radios.js +1 -1
  126. package/esm/renderers/Form/Select.d.ts +1 -1
  127. package/esm/renderers/Form/Select.js +10 -8
  128. package/esm/renderers/Form/Static.d.ts +4 -1
  129. package/esm/renderers/Form/Static.js +4 -3
  130. package/esm/renderers/Form/Switch.js +1 -1
  131. package/esm/renderers/Form/TabsTransfer.d.ts +2 -1
  132. package/esm/renderers/Form/TabsTransfer.js +1 -1
  133. package/esm/renderers/Form/TabsTransferPicker.d.ts +2 -1
  134. package/esm/renderers/Form/TabsTransferPicker.js +1 -1
  135. package/esm/renderers/Form/Textarea.js +1 -1
  136. package/esm/renderers/Form/Transfer.d.ts +6 -2
  137. package/esm/renderers/Form/Transfer.js +16 -8
  138. package/esm/renderers/Form/TransferPicker.d.ts +1 -0
  139. package/esm/renderers/Form/TransferPicker.js +2 -2
  140. package/esm/renderers/Form/TreeSelect.js +9 -6
  141. package/esm/renderers/Form/UUID.js +1 -1
  142. package/esm/renderers/Form/UserSelect.js +1 -1
  143. package/esm/renderers/Grid.js +1 -1
  144. package/esm/renderers/Grid2D.js +1 -1
  145. package/esm/renderers/GridNav.js +1 -1
  146. package/esm/renderers/HBox.js +1 -1
  147. package/esm/renderers/IFrame.d.ts +1 -1
  148. package/esm/renderers/IFrame.js +8 -3
  149. package/esm/renderers/Icon.d.ts +2 -2
  150. package/esm/renderers/Icon.js +5 -3
  151. package/esm/renderers/Image.d.ts +283 -2
  152. package/esm/renderers/Image.js +5 -3
  153. package/esm/renderers/Images.d.ts +10 -1
  154. package/esm/renderers/Images.js +3 -3
  155. package/esm/renderers/Json.js +2 -2
  156. package/esm/renderers/Link.js +1 -1
  157. package/esm/renderers/List.d.ts +12 -3
  158. package/esm/renderers/List.js +7 -6
  159. package/esm/renderers/Log.d.ts +0 -5
  160. package/esm/renderers/Log.js +5 -13
  161. package/esm/renderers/Mapping.d.ts +249 -1
  162. package/esm/renderers/Mapping.js +1 -1
  163. package/esm/renderers/Markdown.js +1 -1
  164. package/esm/renderers/Nav.d.ts +38 -1
  165. package/esm/renderers/Nav.js +3 -3
  166. package/esm/renderers/Operation.js +1 -1
  167. package/esm/renderers/Page.js +9 -9
  168. package/esm/renderers/Pagination.js +1 -1
  169. package/esm/renderers/PaginationWrapper.js +1 -1
  170. package/esm/renderers/Panel.js +1 -1
  171. package/esm/renderers/Plain.js +1 -1
  172. package/esm/renderers/PopOver.js +13 -2
  173. package/esm/renderers/Portlet.js +1 -1
  174. package/esm/renderers/Progress.d.ts +15 -1
  175. package/esm/renderers/Progress.js +20 -4
  176. package/esm/renderers/Property.js +1 -1
  177. package/esm/renderers/QRCode.js +1 -1
  178. package/esm/renderers/QuickEdit.d.ts +11 -0
  179. package/esm/renderers/QuickEdit.js +3 -3
  180. package/esm/renderers/Remark.d.ts +34 -2
  181. package/esm/renderers/Remark.js +5 -13
  182. package/esm/renderers/SearchBox.js +1 -1
  183. package/esm/renderers/Service.d.ts +30 -6
  184. package/esm/renderers/Service.js +161 -36
  185. package/esm/renderers/SparkLine.js +1 -1
  186. package/esm/renderers/Spinner.js +1 -1
  187. package/esm/renderers/Status.js +8 -4
  188. package/esm/renderers/Steps.js +1 -1
  189. package/esm/renderers/Table/ColumnToggler.d.ts +3 -3
  190. package/esm/renderers/Table/ColumnToggler.js +1 -1
  191. package/esm/renderers/Table/HeadCellFilterDropdown.d.ts +3 -0
  192. package/esm/renderers/Table/HeadCellFilterDropdown.js +17 -3
  193. package/esm/renderers/Table/HeadCellSearchDropdown.js +1 -1
  194. package/esm/renderers/Table/ItemActionsWrapper.d.ts +1 -0
  195. package/esm/renderers/Table/ItemActionsWrapper.js +1 -1
  196. package/esm/renderers/Table/TableBody.js +1 -1
  197. package/esm/renderers/Table/TableCell.js +5 -2
  198. package/esm/renderers/Table/TableContent.js +5 -3
  199. package/esm/renderers/Table/TableRow.d.ts +4 -1
  200. package/esm/renderers/Table/TableRow.js +3 -3
  201. package/esm/renderers/Table/exportExcel.js +48 -32
  202. package/esm/renderers/Table/index.d.ts +27 -8
  203. package/esm/renderers/Table/index.js +106 -103
  204. package/esm/renderers/Table-v2/ColumnToggler.js +1 -1
  205. package/esm/renderers/Table-v2/HeadCellSearchDropdown.js +1 -1
  206. package/esm/renderers/Table-v2/TableCell.js +1 -1
  207. package/esm/renderers/Table-v2/index.js +1 -1
  208. package/{lib/renderers/Table-v2 → esm/renderers/Table2}/ColumnToggler.d.ts +3 -0
  209. package/esm/renderers/Table2/ColumnToggler.js +89 -0
  210. package/{lib/renderers/Table-v2 → esm/renderers/Table2}/HeadCellSearchDropdown.d.ts +10 -6
  211. package/esm/renderers/Table2/HeadCellSearchDropdown.js +204 -0
  212. package/{lib/renderers/Table-v2 → esm/renderers/Table2}/TableCell.d.ts +0 -0
  213. package/esm/renderers/Table2/TableCell.js +30 -0
  214. package/{lib/renderers/Table-v2 → esm/renderers/Table2}/index.d.ts +88 -33
  215. package/esm/renderers/Table2/index.js +889 -0
  216. package/esm/renderers/TableView.js +1 -1
  217. package/esm/renderers/Tabs.d.ts +8 -0
  218. package/esm/renderers/Tabs.js +3 -3
  219. package/esm/renderers/Tag.js +1 -1
  220. package/esm/renderers/Tasks.js +1 -1
  221. package/esm/renderers/Timeline.js +1 -1
  222. package/esm/renderers/TooltipWrapper.js +1 -1
  223. package/esm/renderers/Tpl.d.ts +0 -3
  224. package/esm/renderers/Tpl.js +7 -24
  225. package/esm/renderers/VBox.js +1 -1
  226. package/esm/renderers/Video.js +1 -1
  227. package/esm/renderers/WebComponent.js +1 -1
  228. package/esm/renderers/Wizard.js +6 -6
  229. package/esm/renderers/Wrapper.js +1 -1
  230. package/esm/schemaExtend.js +1 -1
  231. package/esm/types.d.ts +1 -0
  232. package/lib/Schema.d.ts +3 -3
  233. package/lib/_virtual/MiniDecimal.js +12 -0
  234. package/lib/_virtual/classCallCheck.js +12 -0
  235. package/lib/_virtual/createClass.js +12 -0
  236. package/lib/_virtual/interopRequireDefault.js +12 -0
  237. package/lib/_virtual/numberUtil.js +12 -0
  238. package/lib/_virtual/supportUtil.js +12 -0
  239. package/lib/compat.js +1 -15
  240. package/lib/helper.css +0 -39
  241. package/lib/index.d.ts +1 -1
  242. package/lib/index.js +2 -2
  243. package/lib/node_modules/@babel/runtime/helpers/classCallCheck.js +29 -0
  244. package/lib/node_modules/@babel/runtime/helpers/createClass.js +42 -0
  245. package/lib/node_modules/@babel/runtime/helpers/interopRequireDefault.js +18 -0
  246. package/lib/node_modules/rc-input-number/lib/utils/MiniDecimal.js +349 -0
  247. package/lib/node_modules/rc-input-number/lib/utils/numberUtil.js +150 -0
  248. package/lib/node_modules/rc-input-number/lib/utils/supportUtil.js +29 -0
  249. package/lib/preset.js +7 -2
  250. package/lib/renderers/Action.d.ts +47 -1
  251. package/lib/renderers/Action.js +10 -5
  252. package/lib/renderers/Alert.js +1 -1
  253. package/lib/renderers/AnchorNav.js +1 -1
  254. package/lib/renderers/App.js +1 -1
  255. package/lib/renderers/Audio.js +1 -1
  256. package/lib/renderers/Avatar.js +1 -1
  257. package/lib/renderers/BarCode.js +1 -1
  258. package/lib/renderers/Breadcrumb.js +1 -1
  259. package/lib/renderers/ButtonGroup.js +1 -1
  260. package/lib/renderers/CRUD.d.ts +5 -2
  261. package/lib/renderers/CRUD.js +31 -13
  262. package/lib/renderers/CRUD2.d.ts +8 -5
  263. package/lib/renderers/CRUD2.js +13 -10
  264. package/lib/renderers/Calendar.d.ts +10 -0
  265. package/lib/renderers/Calendar.js +1 -1
  266. package/lib/renderers/Card.d.ts +4 -1
  267. package/lib/renderers/Card.js +11 -11
  268. package/lib/renderers/Card2.js +1 -1
  269. package/lib/renderers/Cards.d.ts +8 -2
  270. package/lib/renderers/Cards.js +7 -6
  271. package/lib/renderers/Carousel.js +1 -1
  272. package/lib/renderers/Chart.js +1 -1
  273. package/lib/renderers/Code.js +1 -1
  274. package/lib/renderers/Collapse.d.ts +1 -0
  275. package/lib/renderers/Collapse.js +12 -1
  276. package/lib/renderers/CollapseGroup.js +1 -1
  277. package/lib/renderers/Color.js +1 -1
  278. package/lib/renderers/Container.js +1 -1
  279. package/lib/renderers/Copyable.js +1 -1
  280. package/lib/renderers/Custom.js +1 -1
  281. package/lib/renderers/Date.js +1 -1
  282. package/lib/renderers/Dialog.d.ts +1202 -9
  283. package/lib/renderers/Dialog.js +42 -6
  284. package/lib/renderers/Divider.js +1 -1
  285. package/lib/renderers/Drawer.d.ts +2 -1
  286. package/lib/renderers/Drawer.js +41 -11
  287. package/lib/renderers/DropDownButton.js +1 -1
  288. package/lib/renderers/Each.js +1 -1
  289. package/lib/renderers/Flex.js +1 -1
  290. package/lib/renderers/Form/ButtonGroupSelect.js +1 -1
  291. package/lib/renderers/Form/ButtonToolbar.js +1 -1
  292. package/lib/renderers/Form/ChainedSelect.js +1 -1
  293. package/lib/renderers/Form/ChartRadios.js +1 -1
  294. package/lib/renderers/Form/Checkbox.js +1 -1
  295. package/lib/renderers/Form/Checkboxes.d.ts +2 -1
  296. package/lib/renderers/Form/Checkboxes.js +32 -6
  297. package/lib/renderers/Form/Combo.d.ts +4 -0
  298. package/lib/renderers/Form/Combo.js +10 -4
  299. package/lib/renderers/Form/ConditionBuilder.js +1 -1
  300. package/lib/renderers/Form/Control.js +1 -1
  301. package/lib/renderers/Form/DiffEditor.d.ts +79 -33
  302. package/lib/renderers/Form/DiffEditor.js +1 -1
  303. package/lib/renderers/Form/Editor.d.ts +49 -27
  304. package/lib/renderers/Form/Editor.js +5 -3
  305. package/lib/renderers/Form/FieldSet.d.ts +1 -0
  306. package/lib/renderers/Form/FieldSet.js +9 -3
  307. package/lib/renderers/Form/Formula.js +1 -1
  308. package/lib/renderers/Form/Group.js +1 -1
  309. package/lib/renderers/Form/Hidden.js +1 -1
  310. package/lib/renderers/Form/IconPicker.js +1 -1
  311. package/lib/renderers/Form/IconPickerIcons.js +1 -1
  312. package/lib/renderers/Form/InputArray.js +1 -1
  313. package/lib/renderers/Form/InputCity.d.ts +535 -5
  314. package/lib/renderers/Form/InputCity.js +1 -1
  315. package/lib/renderers/Form/InputColor.d.ts +454 -2
  316. package/lib/renderers/Form/InputColor.js +1 -1
  317. package/lib/renderers/Form/InputDate.js +2 -1
  318. package/lib/renderers/Form/InputDateRange.d.ts +8 -0
  319. package/lib/renderers/Form/InputDateRange.js +3 -2
  320. package/lib/renderers/Form/InputExcel.d.ts +14 -0
  321. package/lib/renderers/Form/InputExcel.js +59 -2
  322. package/lib/renderers/Form/InputFile.d.ts +1 -1
  323. package/lib/renderers/Form/InputFile.js +55 -29
  324. package/lib/renderers/Form/InputFormula.d.ts +7 -0
  325. package/lib/renderers/Form/InputFormula.js +3 -3
  326. package/lib/renderers/Form/InputGroup.d.ts +1 -1
  327. package/lib/renderers/Form/InputGroup.js +1 -1
  328. package/lib/renderers/Form/InputImage.d.ts +13 -3
  329. package/lib/renderers/Form/InputImage.js +44 -21
  330. package/lib/renderers/Form/InputMonthRange.d.ts +2 -0
  331. package/lib/renderers/Form/InputMonthRange.js +3 -2
  332. package/lib/renderers/Form/InputNumber.d.ts +9 -2
  333. package/lib/renderers/Form/InputNumber.js +28 -5
  334. package/lib/renderers/Form/InputQuarterRange.d.ts +2 -0
  335. package/lib/renderers/Form/InputQuarterRange.js +3 -2
  336. package/lib/renderers/Form/InputRange.d.ts +3 -3
  337. package/lib/renderers/Form/InputRange.js +7 -7
  338. package/lib/renderers/Form/InputRating.js +1 -1
  339. package/lib/renderers/Form/InputRepeat.js +1 -1
  340. package/lib/renderers/Form/InputRichText.js +63 -46
  341. package/lib/renderers/Form/InputSubForm.js +1 -1
  342. package/lib/renderers/Form/InputTable.js +12 -5
  343. package/lib/renderers/Form/InputTag.js +1 -1
  344. package/lib/renderers/Form/InputText.d.ts +5 -1
  345. package/lib/renderers/Form/InputText.js +18 -12
  346. package/lib/renderers/Form/InputTree.d.ts +1 -0
  347. package/lib/renderers/Form/InputTree.js +13 -1
  348. package/lib/renderers/Form/InputYearRange.d.ts +2 -0
  349. package/lib/renderers/Form/InputYearRange.js +3 -2
  350. package/lib/renderers/Form/JSONSchema.js +1 -1
  351. package/lib/renderers/Form/JSONSchemaEditor.js +1 -1
  352. package/lib/renderers/Form/ListSelect.js +1 -1
  353. package/lib/renderers/Form/LocationPicker.js +1 -1
  354. package/lib/renderers/Form/MatrixCheckboxes.js +1 -1
  355. package/lib/renderers/Form/NestedSelect.js +1 -1
  356. package/lib/renderers/Form/Picker.d.ts +1 -0
  357. package/lib/renderers/Form/Picker.js +29 -2
  358. package/lib/renderers/Form/Radios.js +1 -1
  359. package/lib/renderers/Form/Select.d.ts +1 -1
  360. package/lib/renderers/Form/Select.js +10 -8
  361. package/lib/renderers/Form/Static.d.ts +4 -1
  362. package/lib/renderers/Form/Static.js +4 -3
  363. package/lib/renderers/Form/Switch.js +1 -1
  364. package/lib/renderers/Form/TabsTransfer.d.ts +2 -1
  365. package/lib/renderers/Form/TabsTransfer.js +1 -1
  366. package/lib/renderers/Form/TabsTransferPicker.d.ts +2 -1
  367. package/lib/renderers/Form/TabsTransferPicker.js +1 -1
  368. package/lib/renderers/Form/Textarea.js +1 -1
  369. package/lib/renderers/Form/Transfer.d.ts +6 -2
  370. package/lib/renderers/Form/Transfer.js +16 -8
  371. package/lib/renderers/Form/TransferPicker.d.ts +1 -0
  372. package/lib/renderers/Form/TransferPicker.js +2 -2
  373. package/lib/renderers/Form/TreeSelect.js +9 -6
  374. package/lib/renderers/Form/UUID.js +1 -1
  375. package/lib/renderers/Form/UserSelect.js +1 -1
  376. package/lib/renderers/Grid.js +1 -1
  377. package/lib/renderers/Grid2D.js +1 -1
  378. package/lib/renderers/GridNav.js +1 -1
  379. package/lib/renderers/HBox.js +1 -1
  380. package/lib/renderers/IFrame.d.ts +1 -1
  381. package/lib/renderers/IFrame.js +8 -3
  382. package/lib/renderers/Icon.d.ts +2 -2
  383. package/lib/renderers/Icon.js +4 -2
  384. package/lib/renderers/Image.d.ts +283 -2
  385. package/lib/renderers/Image.js +5 -3
  386. package/lib/renderers/Images.d.ts +10 -1
  387. package/lib/renderers/Images.js +3 -3
  388. package/lib/renderers/Json.js +2 -2
  389. package/lib/renderers/Link.js +1 -1
  390. package/lib/renderers/List.d.ts +12 -3
  391. package/lib/renderers/List.js +7 -6
  392. package/lib/renderers/Log.d.ts +0 -5
  393. package/lib/renderers/Log.js +5 -14
  394. package/lib/renderers/Mapping.d.ts +249 -1
  395. package/lib/renderers/Mapping.js +1 -1
  396. package/lib/renderers/Markdown.js +1 -1
  397. package/lib/renderers/Nav.d.ts +38 -1
  398. package/lib/renderers/Nav.js +3 -3
  399. package/lib/renderers/Operation.js +1 -1
  400. package/lib/renderers/Page.js +8 -8
  401. package/lib/renderers/Pagination.js +1 -1
  402. package/lib/renderers/PaginationWrapper.js +1 -1
  403. package/lib/renderers/Panel.js +1 -1
  404. package/lib/renderers/Plain.js +1 -1
  405. package/lib/renderers/PopOver.js +13 -2
  406. package/lib/renderers/Portlet.js +1 -1
  407. package/lib/renderers/Progress.d.ts +15 -1
  408. package/lib/renderers/Progress.js +19 -3
  409. package/lib/renderers/Property.js +1 -1
  410. package/lib/renderers/QRCode.js +1 -1
  411. package/lib/renderers/QuickEdit.d.ts +11 -0
  412. package/lib/renderers/QuickEdit.js +3 -3
  413. package/lib/renderers/Remark.d.ts +35 -3
  414. package/lib/renderers/Remark.js +4 -12
  415. package/lib/renderers/SearchBox.js +1 -1
  416. package/lib/renderers/Service.d.ts +30 -6
  417. package/lib/renderers/Service.js +162 -34
  418. package/lib/renderers/SparkLine.js +1 -1
  419. package/lib/renderers/Spinner.js +1 -1
  420. package/lib/renderers/Status.js +9 -4
  421. package/lib/renderers/Steps.js +1 -1
  422. package/lib/renderers/Table/ColumnToggler.d.ts +3 -3
  423. package/lib/renderers/Table/ColumnToggler.js +1 -1
  424. package/lib/renderers/Table/HeadCellFilterDropdown.d.ts +3 -0
  425. package/lib/renderers/Table/HeadCellFilterDropdown.js +16 -2
  426. package/lib/renderers/Table/HeadCellSearchDropdown.js +1 -1
  427. package/lib/renderers/Table/ItemActionsWrapper.d.ts +1 -0
  428. package/lib/renderers/Table/ItemActionsWrapper.js +1 -1
  429. package/lib/renderers/Table/TableBody.js +1 -1
  430. package/lib/renderers/Table/TableCell.js +5 -2
  431. package/lib/renderers/Table/TableContent.js +5 -3
  432. package/lib/renderers/Table/TableRow.d.ts +4 -1
  433. package/lib/renderers/Table/TableRow.js +3 -3
  434. package/lib/renderers/Table/exportExcel.js +48 -32
  435. package/lib/renderers/Table/index.d.ts +27 -8
  436. package/lib/renderers/Table/index.js +105 -102
  437. package/lib/renderers/Table2/ColumnToggler.d.ts +22 -0
  438. package/lib/renderers/{Table-v2 → Table2}/ColumnToggler.js +6 -5
  439. package/lib/renderers/Table2/HeadCellSearchDropdown.d.ts +33 -0
  440. package/lib/renderers/{Table-v2 → Table2}/HeadCellSearchDropdown.js +3 -5
  441. package/lib/renderers/Table2/TableCell.d.ts +6 -0
  442. package/lib/renderers/{Table-v2 → Table2}/TableCell.js +1 -1
  443. package/lib/renderers/Table2/index.d.ts +340 -0
  444. package/lib/renderers/{Table-v2 → Table2}/index.js +168 -112
  445. package/lib/renderers/TableView.js +1 -1
  446. package/lib/renderers/Tabs.d.ts +8 -0
  447. package/lib/renderers/Tabs.js +3 -3
  448. package/lib/renderers/Tag.js +1 -1
  449. package/lib/renderers/Tasks.js +1 -1
  450. package/lib/renderers/Timeline.js +1 -1
  451. package/lib/renderers/TooltipWrapper.js +1 -1
  452. package/lib/renderers/Tpl.d.ts +0 -3
  453. package/lib/renderers/Tpl.js +6 -23
  454. package/lib/renderers/VBox.js +1 -1
  455. package/lib/renderers/Video.js +1 -1
  456. package/lib/renderers/WebComponent.js +1 -1
  457. package/lib/renderers/Wizard.js +5 -5
  458. package/lib/renderers/Wrapper.js +1 -1
  459. package/lib/schemaExtend.js +1 -1
  460. package/lib/themes/ang-ie11.css +5176 -1789
  461. package/lib/themes/ang.css +9368 -5984
  462. package/lib/themes/antd-ie11.css +5177 -1796
  463. package/lib/themes/antd.css +9483 -6105
  464. package/lib/themes/cxd-ie11.css +5176 -1791
  465. package/lib/themes/cxd.css +9383 -6000
  466. package/lib/themes/dark-ie11.css +5177 -1789
  467. package/lib/themes/dark.css +9458 -6073
  468. package/lib/themes/default-ie11.css +5176 -1791
  469. package/lib/themes/default.css +9383 -6000
  470. package/lib/types.d.ts +1 -0
  471. package/package.json +27 -21
  472. package/revision.json +7 -0
  473. package/schema.json +13796 -1385
  474. package/sdk/ang-ie11.css +16837 -5527
  475. package/sdk/ang.css +16602 -5292
  476. package/sdk/antd-ie11.css +16779 -5476
  477. package/sdk/antd.css +16711 -5408
  478. package/sdk/barcode.js +50 -50
  479. package/sdk/charts.js +16 -33
  480. package/sdk/codemirror.js +14 -14
  481. package/sdk/color-picker.js +65 -65
  482. package/sdk/cropperjs.js +2 -2
  483. package/sdk/cxd-ie11.css +16783 -5475
  484. package/sdk/cxd.css +17108 -5799
  485. package/sdk/dark-ie11.css +16839 -5527
  486. package/sdk/dark.css +16693 -5381
  487. package/sdk/exceljs.js +1 -1
  488. package/sdk/helper.css +0 -39
  489. package/sdk/locale/de-DE.js +38 -5
  490. package/sdk/markdown.js +68 -68
  491. package/sdk/papaparse.js +1 -1
  492. package/sdk/rest.js +17 -19
  493. package/sdk/rich-text.js +62 -62
  494. package/sdk/sdk-ie11.css +16783 -5475
  495. package/sdk/sdk.css +17108 -5799
  496. package/sdk/sdk.js +1545 -1437
  497. package/sdk/thirds/@fortawesome/fontawesome-free/webfonts/fa-brands-400.ttf +0 -0
  498. package/sdk/thirds/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2 +0 -0
  499. package/sdk/thirds/@fortawesome/fontawesome-free/webfonts/fa-regular-400.ttf +0 -0
  500. package/sdk/thirds/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2 +0 -0
  501. package/sdk/thirds/@fortawesome/fontawesome-free/webfonts/fa-solid-900.ttf +0 -0
  502. package/sdk/thirds/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2 +0 -0
  503. package/sdk/thirds/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.ttf +0 -0
  504. package/sdk/thirds/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.woff2 +0 -0
  505. package/sdk/thirds/hls.js/hls.js +1 -1
  506. package/sdk/thirds/{entities → markdown-it/node_modules/entities}/lib/maps/entities.json +0 -0
  507. package/sdk/thirds/mpegts.js/mpegts.js +1 -1
  508. package/sdk/tinymce.js +52 -52
  509. package/sdk/thirds/amis-ui/node_modules/codemirror/lib/codemirror.css +0 -344
  510. package/sdk/thirds/cropperjs/cropper.css +0 -304
  511. package/sdk/thirds/froala-editor/css/froala_editor.pkgd.min.css +0 -7
  512. package/sdk/thirds/froala-editor/css/froala_style.min.css +0 -7
  513. package/sdk/thirds/tinymce/skins/ui/oxide/skin.css +0 -3074
  514. package/sdk/thirds/video-react/video-react.css +0 -1049
@@ -1,11 +1,11 @@
1
1
  /**
2
- * amis v2.1.1-beta.2
2
+ * amis v2.3.0
3
3
  * Copyright 2018-2022 baidu
4
4
  */
5
5
 
6
6
  import { __extends, __assign, __awaiter, __generator } from 'tslib';
7
7
  import React from 'react';
8
- import { isApiOutdated, getVariable, isEffectiveApi, normalizeApi, normalizeOptions, createObject, Overlay, PopOver } from 'amis-core';
8
+ import { isApiOutdated, getVariable, isEffectiveApi, normalizeApi, normalizeOptions, isNumeric, createObject, Overlay, PopOver } from 'amis-core';
9
9
  import { Icon, Checkbox } from 'amis-ui';
10
10
  import { findDOMNode } from 'react-dom';
11
11
  import xor from 'lodash/xor';
@@ -98,6 +98,7 @@ var HeadCellFilterDropDown = /** @class */ (function (_super) {
98
98
  });
99
99
  };
100
100
  HeadCellFilterDropDown.prototype.alterOptions = function (options) {
101
+ var _this = this;
101
102
  var _a = this.props, data = _a.data, filterable = _a.filterable, name = _a.name;
102
103
  var filterValue = data && typeof data[name] !== 'undefined' ? data[name] : '';
103
104
  options = normalizeOptions(options);
@@ -105,10 +106,23 @@ var HeadCellFilterDropDown = /** @class */ (function (_super) {
105
106
  options = options.map(function (option) { return (__assign(__assign({}, option), { selected: filterValue.split(',').indexOf(option.value) > -1 })); });
106
107
  }
107
108
  else {
108
- options = options.map(function (option) { return (__assign(__assign({}, option), { selected: option.value == filterValue })); });
109
+ options = options.map(function (option) { return (__assign(__assign({}, option), { selected: _this.optionComparator(option, filterValue) })); });
109
110
  }
110
111
  return options;
111
112
  };
113
+ HeadCellFilterDropDown.prototype.optionComparator = function (option, selected) {
114
+ var filterable = this.props.filterable;
115
+ /**
116
+ * 无论是否严格模式,需要考虑CRUD开启syncLocation后,参数值会被转化为string的情况:
117
+ * 数字类需要特殊处理,如果两边都为数字类时才进行比较,否则不相等,排除 1 == true 这种情况
118
+ */
119
+ if (isNumeric(option.value)) {
120
+ return isNumeric(selected) ? option.value == selected : false;
121
+ }
122
+ return (filterable === null || filterable === void 0 ? void 0 : filterable.strictMode) === true
123
+ ? option.value === selected
124
+ : option.value == selected;
125
+ };
112
126
  HeadCellFilterDropDown.prototype.handleClickOutside = function () {
113
127
  this.close();
114
128
  };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis v2.1.1-beta.2
2
+ * amis v2.3.0
3
3
  * Copyright 2018-2022 baidu
4
4
  */
5
5
 
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ITableStore } from 'amis-core';
2
3
  import { ClassNamesFn } from 'amis-core';
3
4
  export interface ItemActionsProps {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis v2.1.1-beta.2
2
+ * amis v2.3.0
3
3
  * Copyright 2018-2022 baidu
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis v2.1.1-beta.2
2
+ * amis v2.3.0
3
3
  * Copyright 2018-2022 baidu
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis v2.1.1-beta.2
2
+ * amis v2.3.0
3
3
  * Copyright 2018-2022 baidu
4
4
  */
5
5
 
@@ -21,13 +21,16 @@ var TableCell = /** @class */ (function (_super) {
21
21
  TableCell.prototype.render = function () {
22
22
  var _a = this.props, cx = _a.classnames, className = _a.className; _a.classNameExpr; var render = _a.render, _b = _a.style, style = _b === void 0 ? {} : _b, Component = _a.wrapperComponent, column = _a.column, value = _a.value, data = _a.data, children = _a.children, width = _a.width, align = _a.align, innerClassName = _a.innerClassName; _a.label; var tabIndex = _a.tabIndex, onKeyUp = _a.onKeyUp, rowSpan = _a.rowSpan; _a.body; _a.tpl; _a.remark; var prefix = _a.prefix, affix = _a.affix, isHead = _a.isHead; _a.colIndex; var row = _a.row, showBadge = _a.showBadge, itemBadge = _a.itemBadge, rest = __rest(_a, ["classnames", "className", "classNameExpr", "render", "style", "wrapperComponent", "column", "value", "data", "children", "width", "align", "innerClassName", "label", "tabIndex", "onKeyUp", "rowSpan", "body", "tpl", "remark", "prefix", "affix", "isHead", "colIndex", "row", "showBadge", "itemBadge"]);
23
23
  var schema = __assign(__assign({}, column), { className: innerClassName, type: (column && column.type) || 'plain' });
24
+ var canAccessSuperData = (schema === null || schema === void 0 ? void 0 : schema.canAccessSuperData) !== false;
24
25
  // 如果本来就是 type 为 button,不要删除,其他情况下都应该删除。
25
26
  if (schema.type !== 'button' && schema.type !== 'dropdown-button') {
26
27
  delete schema.label;
27
28
  }
28
29
  var body = children
29
30
  ? children
30
- : render('field', schema, __assign(__assign({}, omit(rest, Object.keys(schema))), { inputOnly: true, value: value, data: data }));
31
+ : render('field', schema, __assign(__assign({}, omit(rest, Object.keys(schema))), { inputOnly: true,
32
+ /** value没有返回值时设置默认值,避免错误获取到父级数据域的值 */
33
+ value: canAccessSuperData ? value : value !== null && value !== void 0 ? value : '', data: data }));
31
34
  if (width) {
32
35
  style = __assign(__assign({}, style), { width: (style && style.width) || width });
33
36
  if (!/%$/.test(String(style.width))) {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis v2.1.1-beta.2
2
+ * amis v2.3.0
3
3
  * Copyright 2018-2022 baidu
4
4
  */
5
5
 
@@ -44,10 +44,12 @@ var TableContent = /** @class */ (function (_super) {
44
44
  columnsGroup.length ? (React.createElement("tr", null, columnsGroup.map(function (item, index) {
45
45
  /**
46
46
  * 勾选列和展开列的表头单独成列
47
- * 如果分组列只有一个元素,也要执行表头合并
47
+ * 如果分组列只有一个元素且未分组时,也要执行表头合并
48
48
  */
49
49
  return !!~['__checkme', '__expandme'].indexOf(item.has[0].type) ||
50
- (item.has.length === 1 && !/^__/.test(item.has[0].type)) ? (renderHeadCell(item.has[0], {
50
+ (item.has.length === 1 &&
51
+ !/^__/.test(item.has[0].type) &&
52
+ !item.has[0].groupName) ? (renderHeadCell(item.has[0], {
51
53
  'data-index': item.has[0].index,
52
54
  'key': index,
53
55
  'colSpan': item.colSpan,
@@ -20,7 +20,10 @@ export declare class TableRow extends React.Component<TableRowProps> {
20
20
  constructor(props: TableRowProps);
21
21
  handleItemClick(e: React.MouseEvent<HTMLTableRowElement>): Promise<void>;
22
22
  handleAction(e: React.UIEvent<any>, action: Action, ctx: any): void;
23
- handleQuickChange(values: object, saveImmediately?: boolean, savePristine?: boolean, resetOnFailed?: boolean): void;
23
+ handleQuickChange(values: object, saveImmediately?: boolean, savePristine?: boolean, options?: {
24
+ resetOnFailed?: boolean;
25
+ reload?: string;
26
+ }): void;
24
27
  handleChange(value: any, name: string, submit?: boolean, changePristine?: boolean): void;
25
28
  render(): JSX.Element | null;
26
29
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis v2.1.1-beta.2
2
+ * amis v2.3.0
3
3
  * Copyright 2018-2022 baidu
4
4
  */
5
5
 
@@ -54,10 +54,10 @@ var TableRow = /** @class */ (function (_super) {
54
54
  var _a = this.props, onAction = _a.onAction, item = _a.item;
55
55
  onAction && onAction(e, action, ctx || item.data);
56
56
  };
57
- TableRow.prototype.handleQuickChange = function (values, saveImmediately, savePristine, resetOnFailed) {
57
+ TableRow.prototype.handleQuickChange = function (values, saveImmediately, savePristine, options) {
58
58
  var _a = this.props, onQuickChange = _a.onQuickChange, item = _a.item;
59
59
  onQuickChange &&
60
- onQuickChange(item, values, saveImmediately, savePristine, resetOnFailed);
60
+ onQuickChange(item, values, saveImmediately, savePristine, options);
61
61
  };
62
62
  TableRow.prototype.handleChange = function (value, name, submit, changePristine) {
63
63
  var _a;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis v2.1.1-beta.2
2
+ * amis v2.3.0
3
3
  * Copyright 2018-2022 baidu
4
4
  */
5
5
 
@@ -26,11 +26,11 @@ var getAbsoluteUrl = (function () {
26
26
  };
27
27
  })();
28
28
  function exportExcel(ExcelJS, props, toolbar) {
29
- var _a, _b;
29
+ var _a, _b, _c, _d;
30
30
  return __awaiter(this, void 0, void 0, function () {
31
- var store, env, __, data, columns, rows, tmpStore, filename, res, workbook, worksheet, exportColumnNames, _i, columns_1, column, filteredColumns, firstRowLabels, firstRow, remoteMappingCache, rowIndex, _c, rows_1, row, rowData, sheetRow, columIndex, _d, filteredColumns_1, column, name_1, value, type, imageData, imageDimensions, imageWidth, imageHeight, imageMaxSize, imageMatch, imageExt, imageId, linkURL, e_1, href, linkURL, body, text, absoluteURL, map, source, sourceValue, mapKey, res, viewValue, viewValue, _e, fromNow, _f, format, _g, valueFormat, ISODate, NormalDate, buffer, blob;
32
- return __generator(this, function (_h) {
33
- switch (_h.label) {
31
+ var store, env, __, data, columns, rows, tmpStore, filename, res, _i, _e, key, workbook, worksheet, exportColumnNames, _f, columns_1, column, filteredColumns, firstRowLabels, firstRow, remoteMappingCache, rowIndex, _g, rows_1, row, rowData, sheetRow, columIndex, _h, filteredColumns_1, column, name_1, value, type, imageData, imageDimensions, imageWidth, imageHeight, imageMaxSize, imageMatch, imageExt, imageId, linkURL, e_1, href, linkURL, body, text, absoluteURL, map, source, sourceValue, mapKey, res, viewValue, viewValue, _j, fromNow, _k, format, _l, valueFormat, ISODate, NormalDate, buffer, blob;
32
+ return __generator(this, function (_m) {
33
+ switch (_m.label) {
34
34
  case 0:
35
35
  store = props.store, env = props.env, props.classnames, __ = props.translate, data = props.data;
36
36
  columns = store.exportColumns || [];
@@ -39,16 +39,32 @@ function exportExcel(ExcelJS, props, toolbar) {
39
39
  if (!(typeof toolbar === 'object' && toolbar.api)) return [3 /*break*/, 2];
40
40
  return [4 /*yield*/, env.fetcher(toolbar.api, data)];
41
41
  case 1:
42
- res = _h.sent();
42
+ res = _m.sent();
43
43
  if (!res.data) {
44
44
  env.notify('warning', __('placeholder.noData'));
45
45
  return [2 /*return*/];
46
46
  }
47
+ /**
48
+ * 优先找items和rows,找不到就拿第一个值为数组的字段
49
+ * 和CRUD中的处理逻辑保持一致,避免能渲染和导出的不一致
50
+ */
47
51
  if (Array.isArray(res.data)) {
48
52
  rows = res.data;
49
53
  }
54
+ else if (Array.isArray((_a = res.data) === null || _a === void 0 ? void 0 : _a.rows)) {
55
+ rows = res.data.rows;
56
+ }
57
+ else if (Array.isArray((_b = res.data) === null || _b === void 0 ? void 0 : _b.items)) {
58
+ rows = res.data.items;
59
+ }
50
60
  else {
51
- rows = res.data.rows || res.data.items;
61
+ for (_i = 0, _e = Object.keys(res.data); _i < _e.length; _i++) {
62
+ key = _e[_i];
63
+ if (res.data.hasOwnProperty(key) && Array.isArray(res.data[key])) {
64
+ rows = res.data[key];
65
+ break;
66
+ }
67
+ }
52
68
  }
53
69
  // 因为很多方法是 store 里的,所以需要构建 store 来处理
54
70
  tmpStore = TableStore.create(getSnapshot(store));
@@ -57,7 +73,7 @@ function exportExcel(ExcelJS, props, toolbar) {
57
73
  return [3 /*break*/, 3];
58
74
  case 2:
59
75
  rows = store.rows;
60
- _h.label = 3;
76
+ _m.label = 3;
61
77
  case 3:
62
78
  if (typeof toolbar === 'object' && toolbar.filename) {
63
79
  filename = filter(toolbar.filename, data, '| raw');
@@ -79,8 +95,8 @@ function exportExcel(ExcelJS, props, toolbar) {
79
95
  if (toolbar.exportColumns && Array.isArray(toolbar.exportColumns)) {
80
96
  columns = toolbar.exportColumns;
81
97
  // 因为后面列 props 都是从 pristine 里获取,所以这里归一一下
82
- for (_i = 0, columns_1 = columns; _i < columns_1.length; _i++) {
83
- column = columns_1[_i];
98
+ for (_f = 0, columns_1 = columns; _f < columns_1.length; _f++) {
99
+ column = columns_1[_f];
84
100
  column.pristine = column;
85
101
  }
86
102
  }
@@ -110,20 +126,20 @@ function exportExcel(ExcelJS, props, toolbar) {
110
126
  };
111
127
  remoteMappingCache = {};
112
128
  rowIndex = 1;
113
- _c = 0, rows_1 = rows;
114
- _h.label = 4;
129
+ _g = 0, rows_1 = rows;
130
+ _m.label = 4;
115
131
  case 4:
116
- if (!(_c < rows_1.length)) return [3 /*break*/, 19];
117
- row = rows_1[_c];
132
+ if (!(_g < rows_1.length)) return [3 /*break*/, 19];
133
+ row = rows_1[_g];
118
134
  rowData = createObject(data, row.data);
119
135
  rowIndex += 1;
120
136
  sheetRow = worksheet.getRow(rowIndex);
121
137
  columIndex = 0;
122
- _d = 0, filteredColumns_1 = filteredColumns;
123
- _h.label = 5;
138
+ _h = 0, filteredColumns_1 = filteredColumns;
139
+ _m.label = 5;
124
140
  case 5:
125
- if (!(_d < filteredColumns_1.length)) return [3 /*break*/, 18];
126
- column = filteredColumns_1[_d];
141
+ if (!(_h < filteredColumns_1.length)) return [3 /*break*/, 18];
142
+ column = filteredColumns_1[_h];
127
143
  columIndex += 1;
128
144
  name_1 = column.name;
129
145
  value = getVariable(rowData, name_1);
@@ -142,15 +158,15 @@ function exportExcel(ExcelJS, props, toolbar) {
142
158
  }
143
159
  type = column.type || 'plain';
144
160
  if (!((type === 'image' || type === 'static-image') && value)) return [3 /*break*/, 11];
145
- _h.label = 6;
161
+ _m.label = 6;
146
162
  case 6:
147
- _h.trys.push([6, 9, , 10]);
163
+ _m.trys.push([6, 9, , 10]);
148
164
  return [4 /*yield*/, toDataURL(value)];
149
165
  case 7:
150
- imageData = _h.sent();
166
+ imageData = _m.sent();
151
167
  return [4 /*yield*/, getImageDimensions(imageData)];
152
168
  case 8:
153
- imageDimensions = _h.sent();
169
+ imageDimensions = _m.sent();
154
170
  imageWidth = imageDimensions.width;
155
171
  imageHeight = imageDimensions.height;
156
172
  imageMaxSize = 100;
@@ -194,7 +210,7 @@ function exportExcel(ExcelJS, props, toolbar) {
194
210
  });
195
211
  return [3 /*break*/, 10];
196
212
  case 9:
197
- e_1 = _h.sent();
213
+ e_1 = _m.sent();
198
214
  console.warn(e_1.stack);
199
215
  return [3 /*break*/, 10];
200
216
  case 10: return [3 /*break*/, 17];
@@ -229,15 +245,15 @@ function exportExcel(ExcelJS, props, toolbar) {
229
245
  return [3 /*break*/, 15];
230
246
  case 13: return [4 /*yield*/, env.fetcher(sourceValue, rowData)];
231
247
  case 14:
232
- res = _h.sent();
248
+ res = _m.sent();
233
249
  if (res.data) {
234
250
  remoteMappingCache[mapKey] = res.data;
235
251
  map = res.data;
236
252
  }
237
- _h.label = 15;
253
+ _m.label = 15;
238
254
  case 15:
239
- if (typeof value !== 'undefined' && map && ((_a = map[value]) !== null && _a !== void 0 ? _a : map['*'])) {
240
- viewValue = (_b = map[value]) !== null && _b !== void 0 ? _b : (value === true && map['1']
255
+ if (typeof value !== 'undefined' && map && ((_c = map[value]) !== null && _c !== void 0 ? _c : map['*'])) {
256
+ viewValue = (_d = map[value]) !== null && _d !== void 0 ? _d : (value === true && map['1']
241
257
  ? map['1']
242
258
  : value === false && map['0']
243
259
  ? map['0']
@@ -251,7 +267,7 @@ function exportExcel(ExcelJS, props, toolbar) {
251
267
  case 16:
252
268
  if (type === 'date' || type === 'static-date') {
253
269
  viewValue = void 0;
254
- _e = column.pristine, fromNow = _e.fromNow, _f = _e.format, format = _f === void 0 ? 'YYYY-MM-DD' : _f, _g = _e.valueFormat, valueFormat = _g === void 0 ? 'X' : _g;
270
+ _j = column.pristine, fromNow = _j.fromNow, _k = _j.format, format = _k === void 0 ? 'YYYY-MM-DD' : _k, _l = _j.valueFormat, valueFormat = _l === void 0 ? 'X' : _l;
255
271
  if (value) {
256
272
  ISODate = moment(value, moment.ISO_8601);
257
273
  NormalDate = moment(value, valueFormat);
@@ -276,16 +292,16 @@ function exportExcel(ExcelJS, props, toolbar) {
276
292
  sheetRow.getCell(columIndex).value = value;
277
293
  }
278
294
  }
279
- _h.label = 17;
295
+ _m.label = 17;
280
296
  case 17:
281
- _d++;
297
+ _h++;
282
298
  return [3 /*break*/, 5];
283
299
  case 18:
284
- _c++;
300
+ _g++;
285
301
  return [3 /*break*/, 4];
286
302
  case 19: return [4 /*yield*/, workbook.xlsx.writeBuffer()];
287
303
  case 20:
288
- buffer = _h.sent();
304
+ buffer = _m.sent();
289
305
  if (buffer) {
290
306
  blob = new Blob([buffer], {
291
307
  type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { IScopedContext } from 'amis-core';
2
+ import { IScopedContext, SchemaExpression } from 'amis-core';
3
3
  import { RendererProps } from 'amis-core';
4
4
  import { SchemaNode, ActionObject } from 'amis-core';
5
5
  import { BadgeObject } from 'amis-ui';
@@ -100,9 +100,16 @@ export declare type TableColumnObject = {
100
100
  * 是否唯一, 只有在 inputTable 里面才有用
101
101
  */
102
102
  unique?: boolean;
103
+ /**
104
+ * 表格列单元格是否可以获取父级数据域值,默认为true,该配置对当前列内单元格生效
105
+ */
106
+ canAccessSuperData?: boolean;
103
107
  };
104
108
  export declare type TableColumnWithType = SchemaObject & TableColumnObject;
105
109
  export declare type TableColumn = TableColumnWithType | TableColumnObject;
110
+ interface AutoFillHeightObject {
111
+ height: number;
112
+ }
106
113
  /**
107
114
  * Table 表格渲染器。
108
115
  * 文档:https://baidu.gitee.io/amis/docs/components/table
@@ -173,7 +180,7 @@ export interface TableSchema extends BaseSchema {
173
180
  /**
174
181
  * 合并单元格配置,配置数字表示从左到右的多少列自动合并单元格。
175
182
  */
176
- combineNum?: number;
183
+ combineNum?: number | SchemaExpression;
177
184
  /**
178
185
  * 合并单元格配置,配置从第几列开始合并。
179
186
  */
@@ -202,6 +209,14 @@ export interface TableSchema extends BaseSchema {
202
209
  * 开启查询区域,会根据列元素的searchable属性值,自动生成查询条件表单
203
210
  */
204
211
  autoGenerateFilter?: boolean;
212
+ /**
213
+ * 表格是否可以获取父级数据域值,默认为false
214
+ */
215
+ canAccessSuperData?: boolean;
216
+ /**
217
+ * 表格自动计算高度
218
+ */
219
+ autoFillHeight?: boolean | AutoFillHeightObject;
205
220
  }
206
221
  export interface TableProps extends RendererProps {
207
222
  title?: string;
@@ -227,7 +242,7 @@ export interface TableProps extends RendererProps {
227
242
  columnsTogglable?: boolean | 'auto';
228
243
  affixHeader?: boolean;
229
244
  affixColumns?: boolean;
230
- combineNum?: number | string;
245
+ combineNum?: number | SchemaExpression;
231
246
  combineFromIndex?: number;
232
247
  footable?: boolean | {
233
248
  expand?: 'first' | 'all' | 'none';
@@ -244,7 +259,10 @@ export interface TableProps extends RendererProps {
244
259
  itemActions?: Array<ActionObject>;
245
260
  onSelect: (selectedItems: Array<object>, unSelectedItems: Array<object>) => void;
246
261
  onPristineChange?: (data: object, rowIndexe: string) => void;
247
- onSave?: (items: Array<object> | object, diff: Array<object> | object, rowIndexes: Array<string> | string, unModifiedItems?: Array<object>, rowOrigins?: Array<object> | object, resetOnFailed?: boolean) => void;
262
+ onSave?: (items: Array<object> | object, diff: Array<object> | object, rowIndexes: Array<string> | string, unModifiedItems?: Array<object>, rowOrigins?: Array<object> | object, options?: {
263
+ resetOnFailed?: boolean;
264
+ reload?: string;
265
+ }) => void;
248
266
  onSaveOrder?: (moved: Array<object>, items: Array<object>) => void;
249
267
  onQuery: (values: object) => void;
250
268
  onImageEnlarge?: (data: any, target: any) => void;
@@ -258,6 +276,7 @@ export interface TableProps extends RendererProps {
258
276
  reUseRow?: boolean;
259
277
  itemBadge?: BadgeObject;
260
278
  loading?: boolean;
279
+ autoFillHeight?: boolean | AutoFillHeightObject;
261
280
  }
262
281
  export declare type ExportExcelToolbar = SchemaNode & {
263
282
  api?: SchemaApi;
@@ -310,16 +329,16 @@ export default class Table extends React.Component<TableProps, object> {
310
329
  handleAction(e: React.UIEvent<any> | undefined, action: ActionObject, ctx: object): void;
311
330
  handleCheck(item: IRow, value: boolean, shift?: boolean): Promise<void>;
312
331
  handleCheckAll(): Promise<void>;
313
- handleQuickChange(item: IRow, values: object, saveImmediately?: boolean | any, savePristine?: boolean, resetOnFailed?: boolean): void;
332
+ handleQuickChange(item: IRow, values: object, saveImmediately?: boolean | any, savePristine?: boolean, options?: {
333
+ resetOnFailed?: boolean;
334
+ reload?: string;
335
+ }): void;
314
336
  handleSave(): Promise<void>;
315
337
  handleSaveOrder(): Promise<void>;
316
338
  syncSelected(): void;
317
339
  reset(): void;
318
340
  bulkUpdate(value: any, items: Array<object>): void;
319
341
  getSelected(): any[];
320
- /**
321
- * 滚动重新定位Table-fixedTop
322
- */
323
342
  affixDetect(): void;
324
343
  updateTableInfo(): void;
325
344
  handleOutterScroll(): void;