amis-editor 5.2.0-beta.2 → 5.2.1-beta.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (895) hide show
  1. package/esm/component/BaseControl.d.ts +5 -810
  2. package/esm/component/BaseControl.js +33 -43
  3. package/esm/component/InputComponentName.js +1 -1
  4. package/esm/component/TableViewEditor.js +547 -454
  5. package/esm/icons/btn/btn-group.svg.js +1 -3
  6. package/esm/icons/btn/btn-select.svg.js +1 -3
  7. package/esm/icons/btn/btn-toolbar.svg.js +1 -3
  8. package/esm/icons/btn/button.svg.js +1 -3
  9. package/esm/icons/btn/dropdown-btn.svg.js +1 -3
  10. package/esm/icons/container/anchor-nav.svg.js +1 -3
  11. package/esm/icons/container/collapse.svg.js +1 -3
  12. package/esm/icons/container/container.svg.js +1 -3
  13. package/esm/icons/container/flex-container.svg.js +1 -3
  14. package/esm/icons/container/form-group.svg.js +1 -3
  15. package/esm/icons/container/grid.svg.js +1 -3
  16. package/esm/icons/container/iframe.svg.js +1 -3
  17. package/esm/icons/container/panel.svg.js +1 -3
  18. package/esm/icons/container/table-view.svg.js +1 -3
  19. package/esm/icons/container/tabs.svg.js +1 -3
  20. package/esm/icons/container/tooltip-wrapper.svg.js +1 -3
  21. package/esm/icons/container/web-component.svg.js +1 -3
  22. package/esm/icons/feat/audio.svg.js +1 -3
  23. package/esm/icons/feat/custom.svg.js +1 -3
  24. package/esm/icons/feat/each.svg.js +1 -3
  25. package/esm/icons/feat/form.svg.js +1 -3
  26. package/esm/icons/feat/nav.svg.js +1 -3
  27. package/esm/icons/feat/qrcode.svg.js +1 -3
  28. package/esm/icons/feat/service.svg.js +1 -3
  29. package/esm/icons/feat/table.svg.js +1 -3
  30. package/esm/icons/feat/tasks.svg.js +1 -3
  31. package/esm/icons/feat/video.svg.js +1 -3
  32. package/esm/icons/feat/wizard.svg.js +1 -3
  33. package/esm/icons/form/chained-select.svg.js +1 -3
  34. package/esm/icons/form/checkbox.svg.js +1 -3
  35. package/esm/icons/form/checkboxes.svg.js +1 -3
  36. package/esm/icons/form/combo.svg.js +1 -3
  37. package/esm/icons/form/condition-builder.svg.js +1 -3
  38. package/esm/icons/form/diff-editor.svg.js +1 -3
  39. package/esm/icons/form/editor.svg.js +1 -3
  40. package/esm/icons/form/formula.svg.js +1 -3
  41. package/esm/icons/form/hidden.svg.js +1 -3
  42. package/esm/icons/form/input-city.svg.js +1 -3
  43. package/esm/icons/form/input-color.svg.js +1 -3
  44. package/esm/icons/form/input-date-range.svg.js +1 -3
  45. package/esm/icons/form/input-date.svg.js +1 -3
  46. package/esm/icons/form/input-datetime.svg.js +1 -3
  47. package/esm/icons/form/input-email.svg.js +1 -3
  48. package/esm/icons/form/input-excel.svg.js +1 -3
  49. package/esm/icons/form/input-file.svg.js +1 -3
  50. package/esm/icons/form/input-group.svg.js +1 -3
  51. package/esm/icons/form/input-image.svg.js +1 -3
  52. package/esm/icons/form/input-kv.svg.js +1 -3
  53. package/esm/icons/form/input-month-range.svg.js +1 -3
  54. package/esm/icons/form/input-number.svg.js +1 -3
  55. package/esm/icons/form/input-password.svg.js +1 -3
  56. package/esm/icons/form/input-quarter-range.svg.js +1 -3
  57. package/esm/icons/form/input-range.svg.js +1 -3
  58. package/esm/icons/form/input-rating.svg.js +1 -3
  59. package/esm/icons/form/input-repeat.svg.js +1 -3
  60. package/esm/icons/form/input-rich-text.svg.js +1 -3
  61. package/esm/icons/form/input-tag.svg.js +1 -3
  62. package/esm/icons/form/input-text.svg.js +1 -3
  63. package/esm/icons/form/input-time-range.svg.js +1 -3
  64. package/esm/icons/form/input-time.svg.js +1 -3
  65. package/esm/icons/form/input-tree.svg.js +1 -3
  66. package/esm/icons/form/input-url.svg.js +1 -3
  67. package/esm/icons/form/input-year.svg.js +1 -3
  68. package/esm/icons/form/inputArray.svg.js +1 -3
  69. package/esm/icons/form/list-select.svg.js +1 -3
  70. package/esm/icons/form/location-picker.svg.js +1 -3
  71. package/esm/icons/form/matrix-checkboxes.svg.js +1 -3
  72. package/esm/icons/form/month.svg.js +1 -3
  73. package/esm/icons/form/nested-select.svg.js +1 -3
  74. package/esm/icons/form/picker.svg.js +1 -3
  75. package/esm/icons/form/quarter.svg.js +1 -3
  76. package/esm/icons/form/radios.svg.js +1 -3
  77. package/esm/icons/form/select.svg.js +1 -3
  78. package/esm/icons/form/static.svg.js +1 -3
  79. package/esm/icons/form/sub-form.svg.js +1 -3
  80. package/esm/icons/form/switch.svg.js +1 -3
  81. package/esm/icons/form/tabs-transfer.svg.js +1 -3
  82. package/esm/icons/form/textarea.svg.js +1 -3
  83. package/esm/icons/form/transfer.svg.js +1 -3
  84. package/esm/icons/form/tree-select.svg.js +1 -3
  85. package/esm/icons/form/uuid.svg.js +1 -3
  86. package/esm/icons/index.js +28 -1
  87. package/esm/icons/layout/layout-1with2.svg.js +32 -0
  88. package/esm/icons/layout/layout-2cols.svg.js +32 -0
  89. package/esm/icons/layout/layout-2row.svg.js +32 -0
  90. package/esm/icons/layout/layout-2with1.svg.js +33 -0
  91. package/esm/icons/layout/layout-3cols.svg.js +32 -0
  92. package/esm/icons/layout/layout-3row.svg.js +33 -0
  93. package/esm/icons/layout/layout-absolute.svg.js +27 -0
  94. package/esm/icons/layout/layout-fixed.svg.js +27 -0
  95. package/esm/icons/layout/layout-full.svg.js +49 -0
  96. package/esm/icons/layout/layout1-2.svg.js +33 -0
  97. package/esm/icons/layout/layout2-1.svg.js +33 -0
  98. package/esm/icons/layout/layout3-1.svg.js +33 -0
  99. package/esm/icons/layout/layout3-2.svg.js +33 -0
  100. package/esm/icons/other/divider.svg.js +1 -3
  101. package/esm/icons/other/property-sheet.svg.js +1 -3
  102. package/esm/icons/other/tooltip.svg.js +1 -3
  103. package/esm/icons/show/URL.svg.js +1 -3
  104. package/esm/icons/show/avatar.svg.js +1 -3
  105. package/esm/icons/show/breadcrumb.svg.js +1 -3
  106. package/esm/icons/show/card.svg.js +1 -3
  107. package/esm/icons/show/cards.svg.js +1 -3
  108. package/esm/icons/show/carousel.svg.js +1 -3
  109. package/esm/icons/show/chart.svg.js +1 -3
  110. package/esm/icons/show/code.svg.js +1 -3
  111. package/esm/icons/show/date.svg.js +1 -3
  112. package/esm/icons/show/datetime.svg.js +1 -3
  113. package/esm/icons/show/image.svg.js +1 -3
  114. package/esm/icons/show/images.svg.js +1 -3
  115. package/esm/icons/show/json-view.svg.js +1 -3
  116. package/esm/icons/show/list.svg.js +1 -3
  117. package/esm/icons/show/log.svg.js +1 -3
  118. package/esm/icons/show/mapping.svg.js +1 -3
  119. package/esm/icons/show/markdown.svg.js +1 -3
  120. package/esm/icons/show/plain.svg.js +1 -3
  121. package/esm/icons/show/progress.svg.js +1 -3
  122. package/esm/icons/show/sparkline.svg.js +1 -3
  123. package/esm/icons/show/status.svg.js +1 -3
  124. package/esm/icons/show/steps.svg.js +1 -3
  125. package/esm/icons/show/time.svg.js +1 -3
  126. package/esm/index.d.ts +11 -2
  127. package/esm/index.js +13 -3
  128. package/esm/locale/en-US.js +315 -102
  129. package/esm/locale/zh-CN.js +218 -3
  130. package/esm/plugin/Alert.d.ts +1 -1
  131. package/esm/plugin/Alert.js +157 -89
  132. package/esm/plugin/AnchorNav.js +337 -263
  133. package/esm/plugin/Audio.d.ts +1 -1
  134. package/esm/plugin/Audio.js +165 -112
  135. package/esm/plugin/Avatar.d.ts +1 -1
  136. package/esm/plugin/Avatar.js +301 -238
  137. package/esm/plugin/Breadcrumb.js +138 -75
  138. package/esm/plugin/Button.d.ts +1 -1
  139. package/esm/plugin/Button.js +310 -228
  140. package/esm/plugin/ButtonGroup.d.ts +1 -1
  141. package/esm/plugin/ButtonGroup.js +174 -106
  142. package/esm/plugin/CRUD.d.ts +1 -1
  143. package/esm/plugin/CRUD.js +1426 -1351
  144. package/esm/plugin/CRUD2.d.ts +2 -3
  145. package/esm/plugin/CRUD2.js +1146 -1075
  146. package/esm/plugin/Card.d.ts +1 -1
  147. package/esm/plugin/Card.js +284 -208
  148. package/esm/plugin/Card2.d.ts +2 -1
  149. package/esm/plugin/Card2.js +139 -74
  150. package/esm/plugin/Cards.js +302 -234
  151. package/esm/plugin/Carousel.d.ts +2 -2
  152. package/esm/plugin/Carousel.js +344 -281
  153. package/esm/plugin/Chart.d.ts +2 -1
  154. package/esm/plugin/Chart.js +326 -158
  155. package/esm/plugin/CodeView.js +104 -44
  156. package/esm/plugin/Collapse.d.ts +1 -1
  157. package/esm/plugin/Collapse.js +168 -101
  158. package/esm/plugin/CollapseGroup.d.ts +1 -1
  159. package/esm/plugin/CollapseGroup.js +249 -187
  160. package/esm/plugin/ColumnToggler.d.ts +1 -1
  161. package/esm/plugin/ColumnToggler.js +140 -87
  162. package/esm/plugin/Container.d.ts +11 -9
  163. package/esm/plugin/Container.js +190 -68
  164. package/esm/plugin/Custom.js +144 -82
  165. package/esm/plugin/CustomRegion.js +173 -110
  166. package/esm/plugin/Date.d.ts +1 -1
  167. package/esm/plugin/Date.js +112 -59
  168. package/esm/plugin/Datetime.d.ts +0 -1
  169. package/esm/plugin/Datetime.js +81 -53
  170. package/esm/plugin/Dialog.d.ts +2 -2
  171. package/esm/plugin/Dialog.js +230 -179
  172. package/esm/plugin/Divider.js +82 -32
  173. package/esm/plugin/Drawer.d.ts +11 -2
  174. package/esm/plugin/Drawer.js +260 -194
  175. package/esm/plugin/DropDownButton.js +261 -182
  176. package/esm/plugin/Each.js +180 -115
  177. package/esm/plugin/Flex.d.ts +2 -27
  178. package/esm/plugin/Flex.js +25 -159
  179. package/esm/plugin/Form/ButtonGroupSelect.d.ts +2 -1
  180. package/esm/plugin/Form/ButtonGroupSelect.js +205 -126
  181. package/esm/plugin/Form/ButtonToolbar.d.ts +1 -1
  182. package/esm/plugin/Form/ButtonToolbar.js +168 -94
  183. package/esm/plugin/Form/ChainedSelect.d.ts +1 -1
  184. package/esm/plugin/Form/ChainedSelect.js +209 -130
  185. package/esm/plugin/Form/Checkbox.d.ts +1 -1
  186. package/esm/plugin/Form/Checkbox.js +208 -131
  187. package/esm/plugin/Form/Checkboxes.d.ts +1 -1
  188. package/esm/plugin/Form/Checkboxes.js +236 -153
  189. package/esm/plugin/Form/CodeEditor.d.ts +0 -1
  190. package/esm/plugin/Form/CodeEditor.js +245 -146
  191. package/esm/plugin/Form/Combo.js +532 -423
  192. package/esm/plugin/Form/ConditionBuilder.d.ts +1 -1
  193. package/esm/plugin/Form/ConditionBuilder.js +287 -221
  194. package/esm/plugin/Form/Control.d.ts +1 -1
  195. package/esm/plugin/Form/Control.js +130 -63
  196. package/esm/plugin/Form/DiffEditor.d.ts +0 -1
  197. package/esm/plugin/Form/DiffEditor.js +253 -151
  198. package/esm/plugin/Form/FieldSet.d.ts +1 -1
  199. package/esm/plugin/Form/FieldSet.js +174 -112
  200. package/esm/plugin/Form/Form.d.ts +1 -1
  201. package/esm/plugin/Form/Form.js +750 -705
  202. package/esm/plugin/Form/Formula.d.ts +1 -9
  203. package/esm/plugin/Form/Formula.js +126 -62
  204. package/esm/plugin/Form/Group.js +250 -183
  205. package/esm/plugin/Form/Hidden.js +106 -42
  206. package/esm/plugin/Form/InputArray.js +233 -157
  207. package/esm/plugin/Form/InputCity.d.ts +1 -1
  208. package/esm/plugin/Form/InputCity.js +181 -104
  209. package/esm/plugin/Form/InputColor.d.ts +1 -1
  210. package/esm/plugin/Form/InputColor.js +296 -224
  211. package/esm/plugin/Form/InputDate.d.ts +1 -1
  212. package/esm/plugin/Form/InputDate.js +299 -189
  213. package/esm/plugin/Form/InputDateRange.d.ts +1 -1
  214. package/esm/plugin/Form/InputDateRange.js +386 -265
  215. package/esm/plugin/Form/InputDateTime.js +93 -33
  216. package/esm/plugin/Form/InputDateTimeRange.js +99 -34
  217. package/esm/plugin/Form/InputEmail.js +80 -30
  218. package/esm/plugin/Form/InputExcel.d.ts +1 -1
  219. package/esm/plugin/Form/InputExcel.js +164 -91
  220. package/esm/plugin/Form/InputFile.d.ts +4 -1
  221. package/esm/plugin/Form/InputFile.js +352 -271
  222. package/esm/plugin/Form/InputGroup.js +132 -73
  223. package/esm/plugin/Form/InputImage.d.ts +4 -1
  224. package/esm/plugin/Form/InputImage.js +385 -303
  225. package/esm/plugin/Form/InputKV.d.ts +1 -1
  226. package/esm/plugin/Form/InputKV.js +168 -94
  227. package/esm/plugin/Form/InputMonth.js +91 -31
  228. package/esm/plugin/Form/InputMonthRange.js +99 -34
  229. package/esm/plugin/Form/InputNumber.d.ts +2 -1
  230. package/esm/plugin/Form/InputNumber.js +288 -201
  231. package/esm/plugin/Form/InputPassword.js +80 -30
  232. package/esm/plugin/Form/InputQuarter.js +91 -31
  233. package/esm/plugin/Form/InputQuarterRange.js +99 -34
  234. package/esm/plugin/Form/InputRange.d.ts +1 -1
  235. package/esm/plugin/Form/InputRange.js +316 -237
  236. package/esm/plugin/Form/InputRating.d.ts +1 -1
  237. package/esm/plugin/Form/InputRating.js +361 -293
  238. package/esm/plugin/Form/InputRepeat.js +105 -45
  239. package/esm/plugin/Form/InputRichText.d.ts +2 -1
  240. package/esm/plugin/Form/InputRichText.js +211 -152
  241. package/esm/plugin/Form/InputSubForm.js +225 -157
  242. package/esm/plugin/Form/InputTable.d.ts +1 -1
  243. package/esm/plugin/Form/InputTable.js +385 -320
  244. package/esm/plugin/Form/InputTag.d.ts +1 -1
  245. package/esm/plugin/Form/InputTag.js +208 -119
  246. package/esm/plugin/Form/InputText.d.ts +1 -1
  247. package/esm/plugin/Form/InputText.js +348 -263
  248. package/esm/plugin/Form/InputTime.js +93 -33
  249. package/esm/plugin/Form/InputTimeRange.js +99 -34
  250. package/esm/plugin/Form/InputTree.d.ts +1 -1
  251. package/esm/plugin/Form/InputTree.js +460 -367
  252. package/esm/plugin/Form/InputURL.js +86 -31
  253. package/esm/plugin/Form/InputYear.js +91 -31
  254. package/esm/plugin/Form/InputYearRange.js +99 -34
  255. package/esm/plugin/Form/Item.d.ts +1 -1
  256. package/esm/plugin/Form/Item.js +214 -190
  257. package/esm/plugin/Form/ListSelect.d.ts +1 -1
  258. package/esm/plugin/Form/ListSelect.js +174 -96
  259. package/esm/plugin/Form/LocationPicker.d.ts +1 -1
  260. package/esm/plugin/Form/LocationPicker.js +115 -57
  261. package/esm/plugin/Form/MatrixCheckboxes.d.ts +1 -1
  262. package/esm/plugin/Form/MatrixCheckboxes.js +247 -170
  263. package/esm/plugin/Form/NestedSelect.d.ts +1 -1
  264. package/esm/plugin/Form/NestedSelect.js +329 -246
  265. package/esm/plugin/Form/Picker.js +260 -178
  266. package/esm/plugin/Form/Radios.d.ts +1 -1
  267. package/esm/plugin/Form/Radios.js +228 -136
  268. package/esm/plugin/Form/Select.d.ts +1 -1
  269. package/esm/plugin/Form/Select.js +333 -228
  270. package/esm/plugin/Form/Static.d.ts +1 -1
  271. package/esm/plugin/Form/Static.js +358 -280
  272. package/esm/plugin/Form/Switch.d.ts +2 -1
  273. package/esm/plugin/Form/Switch.js +257 -172
  274. package/esm/plugin/Form/TabsTransfer.d.ts +1 -1
  275. package/esm/plugin/Form/TabsTransfer.js +316 -238
  276. package/esm/plugin/Form/Textarea.d.ts +0 -1
  277. package/esm/plugin/Form/Textarea.js +219 -130
  278. package/esm/plugin/Form/Transfer.d.ts +1 -1
  279. package/esm/plugin/Form/Transfer.js +349 -259
  280. package/esm/plugin/Form/TreeSelect.d.ts +2 -1
  281. package/esm/plugin/Form/TreeSelect.js +451 -363
  282. package/esm/plugin/Form/UUID.js +106 -42
  283. package/esm/plugin/Grid.d.ts +1 -1
  284. package/esm/plugin/Grid.js +629 -556
  285. package/esm/plugin/HBox.d.ts +1 -1
  286. package/esm/plugin/HBox.js +578 -508
  287. package/esm/plugin/IFrame.d.ts +2 -10
  288. package/esm/plugin/IFrame.js +127 -64
  289. package/esm/plugin/Image.d.ts +2 -2
  290. package/esm/plugin/Image.js +277 -218
  291. package/esm/plugin/Images.d.ts +3 -3
  292. package/esm/plugin/Images.js +214 -160
  293. package/esm/plugin/Json.d.ts +1 -1
  294. package/esm/plugin/Json.js +111 -53
  295. package/esm/plugin/Layout/FlexPluginBase.d.ts +40 -0
  296. package/esm/plugin/Layout/FlexPluginBase.js +327 -0
  297. package/esm/plugin/Layout/Layout1_2_v4.d.ts +10 -0
  298. package/esm/plugin/Layout/Layout1_2_v4.js +144 -0
  299. package/esm/plugin/Layout/Layout_fixed.d.ts +10 -0
  300. package/esm/plugin/Layout/Layout_fixed.js +76 -0
  301. package/esm/plugin/Layout/Layout_fixed_bottom.d.ts +10 -0
  302. package/esm/plugin/Layout/Layout_fixed_bottom.js +83 -0
  303. package/esm/plugin/Layout/Layout_fixed_top.d.ts +10 -0
  304. package/esm/plugin/Layout/Layout_fixed_top.js +82 -0
  305. package/esm/plugin/Layout/Layout_scroll_x.d.ts +10 -0
  306. package/esm/plugin/Layout/Layout_scroll_x.js +166 -0
  307. package/esm/plugin/Layout/Layout_scroll_y.d.ts +10 -0
  308. package/esm/plugin/Layout/Layout_scroll_y.js +154 -0
  309. package/esm/plugin/Link.js +132 -86
  310. package/esm/plugin/List.js +279 -208
  311. package/esm/plugin/ListItem.js +217 -176
  312. package/esm/plugin/Log.d.ts +1 -1
  313. package/esm/plugin/Log.js +102 -44
  314. package/esm/plugin/Mapping.d.ts +1 -1
  315. package/esm/plugin/Mapping.js +168 -115
  316. package/esm/plugin/Markdown.d.ts +1 -1
  317. package/esm/plugin/Markdown.js +98 -40
  318. package/esm/plugin/Nav.js +202 -139
  319. package/esm/plugin/Operation.d.ts +1 -1
  320. package/esm/plugin/Operation.js +116 -59
  321. package/esm/plugin/Others/Action.js +329 -317
  322. package/esm/plugin/Others/TableCell.d.ts +1 -1
  323. package/esm/plugin/Others/TableCell.js +341 -329
  324. package/esm/plugin/Page.d.ts +2 -3
  325. package/esm/plugin/Page.js +374 -283
  326. package/esm/plugin/Pagination.d.ts +2 -1
  327. package/esm/plugin/Pagination.js +299 -219
  328. package/esm/plugin/Panel.d.ts +1 -1
  329. package/esm/plugin/Panel.js +256 -190
  330. package/esm/plugin/Plain.d.ts +1 -1
  331. package/esm/plugin/Plain.js +126 -64
  332. package/esm/plugin/Progress.d.ts +3 -1
  333. package/esm/plugin/Progress.js +280 -202
  334. package/esm/plugin/Property.js +163 -103
  335. package/esm/plugin/QRCode.js +130 -70
  336. package/esm/plugin/Reset.js +61 -22
  337. package/esm/plugin/Service.d.ts +1 -1
  338. package/esm/plugin/Service.js +254 -167
  339. package/esm/plugin/Sparkline.js +91 -32
  340. package/esm/plugin/Status.d.ts +1 -1
  341. package/esm/plugin/Status.js +116 -58
  342. package/esm/plugin/Steps.js +153 -93
  343. package/esm/plugin/Submit.js +56 -22
  344. package/esm/plugin/Table.d.ts +1 -1
  345. package/esm/plugin/Table.js +595 -522
  346. package/esm/plugin/{Table-v2.d.ts → Table2.d.ts} +2 -2
  347. package/esm/plugin/Table2.js +887 -0
  348. package/{lib/plugin/TableCell-v2.d.ts → esm/plugin/TableCell2.d.ts} +1 -1
  349. package/esm/plugin/TableCell2.js +485 -0
  350. package/esm/plugin/TableView.js +648 -599
  351. package/esm/plugin/Tabs.d.ts +1 -1
  352. package/esm/plugin/Tabs.js +470 -360
  353. package/esm/plugin/Tasks.js +246 -186
  354. package/esm/plugin/Time.d.ts +0 -1
  355. package/esm/plugin/Time.js +81 -53
  356. package/esm/plugin/Timeline.d.ts +1 -1
  357. package/esm/plugin/Timeline.js +165 -92
  358. package/esm/plugin/TooltipWrapper.d.ts +1 -1
  359. package/esm/plugin/TooltipWrapper.js +265 -195
  360. package/esm/plugin/Tpl.d.ts +1 -1
  361. package/esm/plugin/Tpl.js +127 -62
  362. package/esm/plugin/Video.d.ts +2 -2
  363. package/esm/plugin/Video.js +173 -103
  364. package/esm/plugin/WebComponent.d.ts +1 -1
  365. package/esm/plugin/WebComponent.js +128 -62
  366. package/esm/plugin/Wizard.js +751 -659
  367. package/esm/plugin/Wrapper.d.ts +2 -1
  368. package/esm/plugin/Wrapper.js +198 -91
  369. package/esm/renderer/APIControl.d.ts +278 -5068
  370. package/esm/renderer/APIControl.js +662 -687
  371. package/esm/renderer/ActionApiControl.d.ts +8 -6384
  372. package/esm/renderer/BadgeControl.d.ts +2 -2
  373. package/esm/renderer/BadgeControl.js +263 -250
  374. package/esm/renderer/DataBindingControl.js +196 -211
  375. package/esm/renderer/DataMappingControl.js +39 -29
  376. package/esm/renderer/DataPickerControl.js +50 -35
  377. package/esm/renderer/DateShortCutControl.d.ts +26 -25
  378. package/esm/renderer/DateShortCutControl.js +420 -286
  379. package/esm/renderer/ExpressionFormulaControl.d.ts +45 -0
  380. package/esm/renderer/ExpressionFormulaControl.js +245 -0
  381. package/esm/renderer/FeatureControl.d.ts +1 -1
  382. package/esm/renderer/FeatureControl.js +228 -212
  383. package/esm/renderer/FormulaControl.d.ts +33 -16
  384. package/esm/renderer/FormulaControl.js +431 -355
  385. package/esm/renderer/GoConfigControl.js +30 -34
  386. package/esm/renderer/OptionControl.d.ts +2 -2
  387. package/esm/renderer/OptionControl.js +750 -688
  388. package/esm/renderer/RangePartsControl.d.ts +2 -2
  389. package/esm/renderer/RangePartsControl.js +320 -326
  390. package/esm/renderer/StatusControl.d.ts +1 -1
  391. package/esm/renderer/StatusControl.js +145 -136
  392. package/esm/renderer/SwitchMoreControl.d.ts +47 -31
  393. package/esm/renderer/SwitchMoreControl.js +366 -318
  394. package/esm/renderer/TimelineItemControl.d.ts +3 -83
  395. package/esm/renderer/TimelineItemControl.js +531 -464
  396. package/esm/renderer/TransferTableControl.d.ts +2 -4
  397. package/esm/renderer/TransferTableControl.js +394 -369
  398. package/esm/renderer/TreeOptionControl.d.ts +1 -1
  399. package/esm/renderer/TreeOptionControl.js +588 -563
  400. package/esm/renderer/ValidationControl.d.ts +1 -1
  401. package/esm/renderer/ValidationControl.js +277 -269
  402. package/esm/renderer/ValidationItem.d.ts +1 -1
  403. package/esm/renderer/ValidationItem.js +145 -134
  404. package/esm/renderer/event-control/action-config-dialog.js +214 -207
  405. package/esm/renderer/event-control/action-config-panel.js +37 -44
  406. package/esm/renderer/event-control/actions.js +466 -145
  407. package/esm/renderer/event-control/comp-action-select.js +37 -27
  408. package/esm/renderer/event-control/helper.d.ts +19 -19
  409. package/esm/renderer/event-control/helper.js +231 -221
  410. package/esm/renderer/event-control/index.d.ts +1 -1
  411. package/esm/renderer/event-control/index.js +641 -631
  412. package/esm/renderer/event-control/types.d.ts +1 -0
  413. package/esm/renderer/style-control/Background.js +64 -116
  414. package/esm/renderer/style-control/Border.js +27 -38
  415. package/esm/renderer/style-control/BoxModel.d.ts +1 -1
  416. package/esm/renderer/style-control/BoxModel.js +11 -4
  417. package/esm/renderer/style-control/BoxShadow.js +17 -19
  418. package/esm/renderer/style-control/Display.js +13 -17
  419. package/esm/renderer/style-control/Font.js +14 -17
  420. package/esm/renderer/style-control/InsetBoxModel.d.ts +17 -0
  421. package/esm/renderer/style-control/InsetBoxModel.js +69 -0
  422. package/esm/renderer/style-control/font-family.js +2 -3
  423. package/esm/renderer/style-control/transformation.js +1 -1
  424. package/esm/renderer/style-control/types.d.ts +4 -4
  425. package/esm/renderer/textarea-formula/FormulaPicker.d.ts +12 -0
  426. package/esm/renderer/textarea-formula/FormulaPicker.js +37 -0
  427. package/esm/renderer/textarea-formula/TextareaFormulaControl.d.ts +67 -0
  428. package/esm/renderer/textarea-formula/TextareaFormulaControl.js +334 -0
  429. package/esm/renderer/textarea-formula/plugin.d.ts +32 -0
  430. package/esm/renderer/textarea-formula/plugin.js +273 -0
  431. package/esm/renderer/textarea-formula/utils.d.ts +12 -0
  432. package/esm/renderer/textarea-formula/utils.js +76 -0
  433. package/esm/tpl/api.js +26 -37
  434. package/esm/tpl/common.js +192 -114
  435. package/esm/tpl/horizontal.js +4 -6
  436. package/esm/tpl/index.d.ts +1 -0
  437. package/esm/tpl/layout.d.ts +1 -0
  438. package/esm/tpl/layout.js +708 -0
  439. package/esm/tpl/options.js +5 -22
  440. package/esm/tpl/style.js +18 -18
  441. package/esm/tpl/validations.js +9 -24
  442. package/esm/util.d.ts +47 -0
  443. package/esm/util.js +22 -0
  444. package/esm/validator.d.ts +1 -2
  445. package/esm/validator.js +11 -24
  446. package/lib/component/BaseControl.d.ts +5 -810
  447. package/lib/component/BaseControl.js +32 -42
  448. package/lib/component/InputComponentName.js +1 -1
  449. package/lib/component/TableViewEditor.js +547 -454
  450. package/lib/icons/btn/btn-group.svg.js +1 -3
  451. package/lib/icons/btn/btn-select.svg.js +1 -3
  452. package/lib/icons/btn/btn-toolbar.svg.js +1 -3
  453. package/lib/icons/btn/button.svg.js +1 -3
  454. package/lib/icons/btn/dropdown-btn.svg.js +1 -3
  455. package/lib/icons/container/anchor-nav.svg.js +1 -3
  456. package/lib/icons/container/collapse.svg.js +1 -3
  457. package/lib/icons/container/container.svg.js +1 -3
  458. package/lib/icons/container/flex-container.svg.js +1 -3
  459. package/lib/icons/container/form-group.svg.js +1 -3
  460. package/lib/icons/container/grid.svg.js +1 -3
  461. package/lib/icons/container/iframe.svg.js +1 -3
  462. package/lib/icons/container/panel.svg.js +1 -3
  463. package/lib/icons/container/table-view.svg.js +1 -3
  464. package/lib/icons/container/tabs.svg.js +1 -3
  465. package/lib/icons/container/tooltip-wrapper.svg.js +1 -3
  466. package/lib/icons/container/web-component.svg.js +1 -3
  467. package/lib/icons/feat/audio.svg.js +1 -3
  468. package/lib/icons/feat/custom.svg.js +1 -3
  469. package/lib/icons/feat/each.svg.js +1 -3
  470. package/lib/icons/feat/form.svg.js +1 -3
  471. package/lib/icons/feat/nav.svg.js +1 -3
  472. package/lib/icons/feat/qrcode.svg.js +1 -3
  473. package/lib/icons/feat/service.svg.js +1 -3
  474. package/lib/icons/feat/table.svg.js +1 -3
  475. package/lib/icons/feat/tasks.svg.js +1 -3
  476. package/lib/icons/feat/video.svg.js +1 -3
  477. package/lib/icons/feat/wizard.svg.js +1 -3
  478. package/lib/icons/form/chained-select.svg.js +1 -3
  479. package/lib/icons/form/checkbox.svg.js +1 -3
  480. package/lib/icons/form/checkboxes.svg.js +1 -3
  481. package/lib/icons/form/combo.svg.js +1 -3
  482. package/lib/icons/form/condition-builder.svg.js +1 -3
  483. package/lib/icons/form/diff-editor.svg.js +1 -3
  484. package/lib/icons/form/editor.svg.js +1 -3
  485. package/lib/icons/form/formula.svg.js +1 -3
  486. package/lib/icons/form/hidden.svg.js +1 -3
  487. package/lib/icons/form/input-city.svg.js +1 -3
  488. package/lib/icons/form/input-color.svg.js +1 -3
  489. package/lib/icons/form/input-date-range.svg.js +1 -3
  490. package/lib/icons/form/input-date.svg.js +1 -3
  491. package/lib/icons/form/input-datetime.svg.js +1 -3
  492. package/lib/icons/form/input-email.svg.js +1 -3
  493. package/lib/icons/form/input-excel.svg.js +1 -3
  494. package/lib/icons/form/input-file.svg.js +1 -3
  495. package/lib/icons/form/input-group.svg.js +1 -3
  496. package/lib/icons/form/input-image.svg.js +1 -3
  497. package/lib/icons/form/input-kv.svg.js +1 -3
  498. package/lib/icons/form/input-month-range.svg.js +1 -3
  499. package/lib/icons/form/input-number.svg.js +1 -3
  500. package/lib/icons/form/input-password.svg.js +1 -3
  501. package/lib/icons/form/input-quarter-range.svg.js +1 -3
  502. package/lib/icons/form/input-range.svg.js +1 -3
  503. package/lib/icons/form/input-rating.svg.js +1 -3
  504. package/lib/icons/form/input-repeat.svg.js +1 -3
  505. package/lib/icons/form/input-rich-text.svg.js +1 -3
  506. package/lib/icons/form/input-tag.svg.js +1 -3
  507. package/lib/icons/form/input-text.svg.js +1 -3
  508. package/lib/icons/form/input-time-range.svg.js +1 -3
  509. package/lib/icons/form/input-time.svg.js +1 -3
  510. package/lib/icons/form/input-tree.svg.js +1 -3
  511. package/lib/icons/form/input-url.svg.js +1 -3
  512. package/lib/icons/form/input-year.svg.js +1 -3
  513. package/lib/icons/form/inputArray.svg.js +1 -3
  514. package/lib/icons/form/list-select.svg.js +1 -3
  515. package/lib/icons/form/location-picker.svg.js +1 -3
  516. package/lib/icons/form/matrix-checkboxes.svg.js +1 -3
  517. package/lib/icons/form/month.svg.js +1 -3
  518. package/lib/icons/form/nested-select.svg.js +1 -3
  519. package/lib/icons/form/picker.svg.js +1 -3
  520. package/lib/icons/form/quarter.svg.js +1 -3
  521. package/lib/icons/form/radios.svg.js +1 -3
  522. package/lib/icons/form/select.svg.js +1 -3
  523. package/lib/icons/form/static.svg.js +1 -3
  524. package/lib/icons/form/sub-form.svg.js +1 -3
  525. package/lib/icons/form/switch.svg.js +1 -3
  526. package/lib/icons/form/tabs-transfer.svg.js +1 -3
  527. package/lib/icons/form/textarea.svg.js +1 -3
  528. package/lib/icons/form/transfer.svg.js +1 -3
  529. package/lib/icons/form/tree-select.svg.js +1 -3
  530. package/lib/icons/form/uuid.svg.js +1 -3
  531. package/lib/icons/index.js +28 -1
  532. package/lib/icons/layout/layout-1with2.svg.js +56 -0
  533. package/lib/icons/layout/layout-2cols.svg.js +56 -0
  534. package/lib/icons/layout/layout-2row.svg.js +56 -0
  535. package/lib/icons/layout/layout-2with1.svg.js +57 -0
  536. package/lib/icons/layout/layout-3cols.svg.js +56 -0
  537. package/lib/icons/layout/layout-3row.svg.js +57 -0
  538. package/lib/icons/layout/layout-absolute.svg.js +51 -0
  539. package/lib/icons/layout/layout-fixed.svg.js +51 -0
  540. package/lib/icons/layout/layout-full.svg.js +73 -0
  541. package/lib/icons/layout/layout1-2.svg.js +57 -0
  542. package/lib/icons/layout/layout2-1.svg.js +57 -0
  543. package/lib/icons/layout/layout3-1.svg.js +57 -0
  544. package/lib/icons/layout/layout3-2.svg.js +57 -0
  545. package/lib/icons/other/divider.svg.js +1 -3
  546. package/lib/icons/other/property-sheet.svg.js +1 -3
  547. package/lib/icons/other/tooltip.svg.js +1 -3
  548. package/lib/icons/show/URL.svg.js +1 -3
  549. package/lib/icons/show/avatar.svg.js +1 -3
  550. package/lib/icons/show/breadcrumb.svg.js +1 -3
  551. package/lib/icons/show/card.svg.js +1 -3
  552. package/lib/icons/show/cards.svg.js +1 -3
  553. package/lib/icons/show/carousel.svg.js +1 -3
  554. package/lib/icons/show/chart.svg.js +1 -3
  555. package/lib/icons/show/code.svg.js +1 -3
  556. package/lib/icons/show/date.svg.js +1 -3
  557. package/lib/icons/show/datetime.svg.js +1 -3
  558. package/lib/icons/show/image.svg.js +1 -3
  559. package/lib/icons/show/images.svg.js +1 -3
  560. package/lib/icons/show/json-view.svg.js +1 -3
  561. package/lib/icons/show/list.svg.js +1 -3
  562. package/lib/icons/show/log.svg.js +1 -3
  563. package/lib/icons/show/mapping.svg.js +1 -3
  564. package/lib/icons/show/markdown.svg.js +1 -3
  565. package/lib/icons/show/plain.svg.js +1 -3
  566. package/lib/icons/show/progress.svg.js +1 -3
  567. package/lib/icons/show/sparkline.svg.js +1 -3
  568. package/lib/icons/show/status.svg.js +1 -3
  569. package/lib/icons/show/steps.svg.js +1 -3
  570. package/lib/icons/show/time.svg.js +1 -3
  571. package/lib/index.d.ts +11 -2
  572. package/lib/index.js +13 -3
  573. package/lib/locale/en-US.js +315 -102
  574. package/lib/locale/zh-CN.js +218 -3
  575. package/lib/plugin/Alert.d.ts +1 -1
  576. package/lib/plugin/Alert.js +157 -89
  577. package/lib/plugin/AnchorNav.js +337 -263
  578. package/lib/plugin/Audio.d.ts +1 -1
  579. package/lib/plugin/Audio.js +165 -112
  580. package/lib/plugin/Avatar.d.ts +1 -1
  581. package/lib/plugin/Avatar.js +301 -238
  582. package/lib/plugin/Breadcrumb.js +138 -75
  583. package/lib/plugin/Button.d.ts +1 -1
  584. package/lib/plugin/Button.js +310 -228
  585. package/lib/plugin/ButtonGroup.d.ts +1 -1
  586. package/lib/plugin/ButtonGroup.js +174 -106
  587. package/lib/plugin/CRUD.d.ts +1 -1
  588. package/lib/plugin/CRUD.js +1426 -1351
  589. package/lib/plugin/CRUD2.d.ts +2 -3
  590. package/lib/plugin/CRUD2.js +1152 -1081
  591. package/lib/plugin/Card.d.ts +1 -1
  592. package/lib/plugin/Card.js +284 -208
  593. package/lib/plugin/Card2.d.ts +2 -1
  594. package/lib/plugin/Card2.js +139 -74
  595. package/lib/plugin/Cards.js +302 -234
  596. package/lib/plugin/Carousel.d.ts +2 -2
  597. package/lib/plugin/Carousel.js +344 -281
  598. package/lib/plugin/Chart.d.ts +2 -1
  599. package/lib/plugin/Chart.js +326 -158
  600. package/lib/plugin/CodeView.js +104 -44
  601. package/lib/plugin/Collapse.d.ts +1 -1
  602. package/lib/plugin/Collapse.js +168 -101
  603. package/lib/plugin/CollapseGroup.d.ts +1 -1
  604. package/lib/plugin/CollapseGroup.js +249 -187
  605. package/lib/plugin/ColumnToggler.d.ts +1 -1
  606. package/lib/plugin/ColumnToggler.js +140 -87
  607. package/lib/plugin/Container.d.ts +11 -9
  608. package/lib/plugin/Container.js +190 -68
  609. package/lib/plugin/Custom.js +144 -82
  610. package/lib/plugin/CustomRegion.js +173 -110
  611. package/lib/plugin/Date.d.ts +1 -1
  612. package/lib/plugin/Date.js +112 -59
  613. package/lib/plugin/Datetime.d.ts +0 -1
  614. package/lib/plugin/Datetime.js +81 -53
  615. package/lib/plugin/Dialog.d.ts +2 -2
  616. package/lib/plugin/Dialog.js +230 -179
  617. package/lib/plugin/Divider.js +82 -32
  618. package/lib/plugin/Drawer.d.ts +11 -2
  619. package/lib/plugin/Drawer.js +260 -194
  620. package/lib/plugin/DropDownButton.js +261 -182
  621. package/lib/plugin/Each.js +180 -115
  622. package/lib/plugin/Flex.d.ts +2 -27
  623. package/lib/plugin/Flex.js +23 -157
  624. package/lib/plugin/Form/ButtonGroupSelect.d.ts +2 -1
  625. package/lib/plugin/Form/ButtonGroupSelect.js +205 -126
  626. package/lib/plugin/Form/ButtonToolbar.d.ts +1 -1
  627. package/lib/plugin/Form/ButtonToolbar.js +168 -94
  628. package/lib/plugin/Form/ChainedSelect.d.ts +1 -1
  629. package/lib/plugin/Form/ChainedSelect.js +209 -130
  630. package/lib/plugin/Form/Checkbox.d.ts +1 -1
  631. package/lib/plugin/Form/Checkbox.js +208 -131
  632. package/lib/plugin/Form/Checkboxes.d.ts +1 -1
  633. package/lib/plugin/Form/Checkboxes.js +236 -153
  634. package/lib/plugin/Form/CodeEditor.d.ts +0 -1
  635. package/lib/plugin/Form/CodeEditor.js +245 -146
  636. package/lib/plugin/Form/Combo.js +532 -423
  637. package/lib/plugin/Form/ConditionBuilder.d.ts +1 -1
  638. package/lib/plugin/Form/ConditionBuilder.js +288 -222
  639. package/lib/plugin/Form/Control.d.ts +1 -1
  640. package/lib/plugin/Form/Control.js +130 -63
  641. package/lib/plugin/Form/DiffEditor.d.ts +0 -1
  642. package/lib/plugin/Form/DiffEditor.js +252 -150
  643. package/lib/plugin/Form/FieldSet.d.ts +1 -1
  644. package/lib/plugin/Form/FieldSet.js +174 -112
  645. package/lib/plugin/Form/Form.d.ts +1 -1
  646. package/lib/plugin/Form/Form.js +750 -705
  647. package/lib/plugin/Form/Formula.d.ts +1 -9
  648. package/lib/plugin/Form/Formula.js +126 -62
  649. package/lib/plugin/Form/Group.js +250 -183
  650. package/lib/plugin/Form/Hidden.js +106 -42
  651. package/lib/plugin/Form/InputArray.js +233 -157
  652. package/lib/plugin/Form/InputCity.d.ts +1 -1
  653. package/lib/plugin/Form/InputCity.js +181 -104
  654. package/lib/plugin/Form/InputColor.d.ts +1 -1
  655. package/lib/plugin/Form/InputColor.js +296 -224
  656. package/lib/plugin/Form/InputDate.d.ts +1 -1
  657. package/lib/plugin/Form/InputDate.js +299 -189
  658. package/lib/plugin/Form/InputDateRange.d.ts +1 -1
  659. package/lib/plugin/Form/InputDateRange.js +385 -264
  660. package/lib/plugin/Form/InputDateTime.js +93 -33
  661. package/lib/plugin/Form/InputDateTimeRange.js +99 -34
  662. package/lib/plugin/Form/InputEmail.js +80 -30
  663. package/lib/plugin/Form/InputExcel.d.ts +1 -1
  664. package/lib/plugin/Form/InputExcel.js +164 -91
  665. package/lib/plugin/Form/InputFile.d.ts +4 -1
  666. package/lib/plugin/Form/InputFile.js +352 -271
  667. package/lib/plugin/Form/InputGroup.js +132 -73
  668. package/lib/plugin/Form/InputImage.d.ts +4 -1
  669. package/lib/plugin/Form/InputImage.js +385 -303
  670. package/lib/plugin/Form/InputKV.d.ts +1 -1
  671. package/lib/plugin/Form/InputKV.js +168 -94
  672. package/lib/plugin/Form/InputMonth.js +91 -31
  673. package/lib/plugin/Form/InputMonthRange.js +99 -34
  674. package/lib/plugin/Form/InputNumber.d.ts +2 -1
  675. package/lib/plugin/Form/InputNumber.js +287 -200
  676. package/lib/plugin/Form/InputPassword.js +80 -30
  677. package/lib/plugin/Form/InputQuarter.js +91 -31
  678. package/lib/plugin/Form/InputQuarterRange.js +99 -34
  679. package/lib/plugin/Form/InputRange.d.ts +1 -1
  680. package/lib/plugin/Form/InputRange.js +315 -236
  681. package/lib/plugin/Form/InputRating.d.ts +1 -1
  682. package/lib/plugin/Form/InputRating.js +361 -293
  683. package/lib/plugin/Form/InputRepeat.js +105 -45
  684. package/lib/plugin/Form/InputRichText.d.ts +2 -1
  685. package/lib/plugin/Form/InputRichText.js +211 -152
  686. package/lib/plugin/Form/InputSubForm.js +225 -157
  687. package/lib/plugin/Form/InputTable.d.ts +1 -1
  688. package/lib/plugin/Form/InputTable.js +385 -320
  689. package/lib/plugin/Form/InputTag.d.ts +1 -1
  690. package/lib/plugin/Form/InputTag.js +208 -119
  691. package/lib/plugin/Form/InputText.d.ts +1 -1
  692. package/lib/plugin/Form/InputText.js +348 -263
  693. package/lib/plugin/Form/InputTime.js +93 -33
  694. package/lib/plugin/Form/InputTimeRange.js +99 -34
  695. package/lib/plugin/Form/InputTree.d.ts +1 -1
  696. package/lib/plugin/Form/InputTree.js +460 -367
  697. package/lib/plugin/Form/InputURL.js +86 -31
  698. package/lib/plugin/Form/InputYear.js +91 -31
  699. package/lib/plugin/Form/InputYearRange.js +99 -34
  700. package/lib/plugin/Form/Item.d.ts +1 -1
  701. package/lib/plugin/Form/Item.js +213 -189
  702. package/lib/plugin/Form/ListSelect.d.ts +1 -1
  703. package/lib/plugin/Form/ListSelect.js +174 -96
  704. package/lib/plugin/Form/LocationPicker.d.ts +1 -1
  705. package/lib/plugin/Form/LocationPicker.js +115 -57
  706. package/lib/plugin/Form/MatrixCheckboxes.d.ts +1 -1
  707. package/lib/plugin/Form/MatrixCheckboxes.js +247 -170
  708. package/lib/plugin/Form/NestedSelect.d.ts +1 -1
  709. package/lib/plugin/Form/NestedSelect.js +329 -246
  710. package/lib/plugin/Form/Picker.js +260 -178
  711. package/lib/plugin/Form/Radios.d.ts +1 -1
  712. package/lib/plugin/Form/Radios.js +228 -136
  713. package/lib/plugin/Form/Select.d.ts +1 -1
  714. package/lib/plugin/Form/Select.js +333 -228
  715. package/lib/plugin/Form/Static.d.ts +1 -1
  716. package/lib/plugin/Form/Static.js +358 -280
  717. package/lib/plugin/Form/Switch.d.ts +2 -1
  718. package/lib/plugin/Form/Switch.js +257 -172
  719. package/lib/plugin/Form/TabsTransfer.d.ts +1 -1
  720. package/lib/plugin/Form/TabsTransfer.js +316 -238
  721. package/lib/plugin/Form/Textarea.d.ts +0 -1
  722. package/lib/plugin/Form/Textarea.js +219 -130
  723. package/lib/plugin/Form/Transfer.d.ts +1 -1
  724. package/lib/plugin/Form/Transfer.js +349 -259
  725. package/lib/plugin/Form/TreeSelect.d.ts +2 -1
  726. package/lib/plugin/Form/TreeSelect.js +451 -363
  727. package/lib/plugin/Form/UUID.js +106 -42
  728. package/lib/plugin/Grid.d.ts +1 -1
  729. package/lib/plugin/Grid.js +629 -556
  730. package/lib/plugin/HBox.d.ts +1 -1
  731. package/lib/plugin/HBox.js +578 -508
  732. package/lib/plugin/IFrame.d.ts +2 -10
  733. package/lib/plugin/IFrame.js +127 -64
  734. package/lib/plugin/Image.d.ts +2 -2
  735. package/lib/plugin/Image.js +277 -218
  736. package/lib/plugin/Images.d.ts +3 -3
  737. package/lib/plugin/Images.js +214 -160
  738. package/lib/plugin/Json.d.ts +1 -1
  739. package/lib/plugin/Json.js +111 -53
  740. package/lib/plugin/Layout/FlexPluginBase.d.ts +40 -0
  741. package/lib/plugin/Layout/FlexPluginBase.js +332 -0
  742. package/lib/plugin/Layout/Layout1_2_v4.d.ts +10 -0
  743. package/lib/plugin/Layout/Layout1_2_v4.js +148 -0
  744. package/lib/plugin/Layout/Layout_fixed.d.ts +10 -0
  745. package/lib/plugin/Layout/Layout_fixed.js +80 -0
  746. package/lib/plugin/Layout/Layout_fixed_bottom.d.ts +10 -0
  747. package/lib/plugin/Layout/Layout_fixed_bottom.js +87 -0
  748. package/lib/plugin/Layout/Layout_fixed_top.d.ts +10 -0
  749. package/lib/plugin/Layout/Layout_fixed_top.js +86 -0
  750. package/lib/plugin/Layout/Layout_scroll_x.d.ts +10 -0
  751. package/lib/plugin/Layout/Layout_scroll_x.js +170 -0
  752. package/lib/plugin/Layout/Layout_scroll_y.d.ts +10 -0
  753. package/lib/plugin/Layout/Layout_scroll_y.js +158 -0
  754. package/lib/plugin/Link.js +131 -85
  755. package/lib/plugin/List.js +279 -208
  756. package/lib/plugin/ListItem.js +217 -176
  757. package/lib/plugin/Log.d.ts +1 -1
  758. package/lib/plugin/Log.js +102 -44
  759. package/lib/plugin/Mapping.d.ts +1 -1
  760. package/lib/plugin/Mapping.js +168 -115
  761. package/lib/plugin/Markdown.d.ts +1 -1
  762. package/lib/plugin/Markdown.js +98 -40
  763. package/lib/plugin/Nav.js +202 -139
  764. package/lib/plugin/Operation.d.ts +1 -1
  765. package/lib/plugin/Operation.js +116 -59
  766. package/lib/plugin/Others/Action.js +329 -317
  767. package/lib/plugin/Others/TableCell.d.ts +1 -1
  768. package/lib/plugin/Others/TableCell.js +341 -329
  769. package/lib/plugin/Page.d.ts +2 -3
  770. package/lib/plugin/Page.js +374 -283
  771. package/lib/plugin/Pagination.d.ts +2 -1
  772. package/lib/plugin/Pagination.js +299 -219
  773. package/lib/plugin/Panel.d.ts +1 -1
  774. package/lib/plugin/Panel.js +256 -190
  775. package/lib/plugin/Plain.d.ts +1 -1
  776. package/lib/plugin/Plain.js +126 -64
  777. package/lib/plugin/Progress.d.ts +3 -1
  778. package/lib/plugin/Progress.js +280 -202
  779. package/lib/plugin/Property.js +163 -103
  780. package/lib/plugin/QRCode.js +130 -70
  781. package/lib/plugin/Reset.js +61 -22
  782. package/lib/plugin/Service.d.ts +1 -1
  783. package/lib/plugin/Service.js +254 -167
  784. package/lib/plugin/Sparkline.js +91 -32
  785. package/lib/plugin/Status.d.ts +1 -1
  786. package/lib/plugin/Status.js +116 -58
  787. package/lib/plugin/Steps.js +153 -93
  788. package/lib/plugin/Submit.js +56 -22
  789. package/lib/plugin/Table.d.ts +1 -1
  790. package/lib/plugin/Table.js +595 -522
  791. package/lib/plugin/{Table-v2.d.ts → Table2.d.ts} +2 -2
  792. package/lib/plugin/Table2.js +891 -0
  793. package/{esm/plugin/TableCell-v2.d.ts → lib/plugin/TableCell2.d.ts} +1 -1
  794. package/lib/plugin/TableCell2.js +493 -0
  795. package/lib/plugin/TableView.js +648 -599
  796. package/lib/plugin/Tabs.d.ts +1 -1
  797. package/lib/plugin/Tabs.js +470 -360
  798. package/lib/plugin/Tasks.js +246 -186
  799. package/lib/plugin/Time.d.ts +0 -1
  800. package/lib/plugin/Time.js +81 -53
  801. package/lib/plugin/Timeline.d.ts +1 -1
  802. package/lib/plugin/Timeline.js +165 -92
  803. package/lib/plugin/TooltipWrapper.d.ts +1 -1
  804. package/lib/plugin/TooltipWrapper.js +265 -195
  805. package/lib/plugin/Tpl.d.ts +1 -1
  806. package/lib/plugin/Tpl.js +126 -61
  807. package/lib/plugin/Video.d.ts +2 -2
  808. package/lib/plugin/Video.js +173 -103
  809. package/lib/plugin/WebComponent.d.ts +1 -1
  810. package/lib/plugin/WebComponent.js +128 -62
  811. package/lib/plugin/Wizard.js +751 -659
  812. package/lib/plugin/Wrapper.d.ts +2 -1
  813. package/lib/plugin/Wrapper.js +198 -91
  814. package/lib/renderer/APIControl.d.ts +278 -5068
  815. package/lib/renderer/APIControl.js +663 -688
  816. package/lib/renderer/ActionApiControl.d.ts +8 -6384
  817. package/lib/renderer/BadgeControl.d.ts +6 -6
  818. package/lib/renderer/BadgeControl.js +263 -250
  819. package/lib/renderer/DataBindingControl.js +197 -212
  820. package/lib/renderer/DataMappingControl.js +39 -29
  821. package/lib/renderer/DataPickerControl.js +50 -35
  822. package/lib/renderer/DateShortCutControl.d.ts +26 -25
  823. package/lib/renderer/DateShortCutControl.js +418 -284
  824. package/lib/renderer/ExpressionFormulaControl.d.ts +45 -0
  825. package/lib/renderer/ExpressionFormulaControl.js +254 -0
  826. package/lib/renderer/FeatureControl.d.ts +1 -1
  827. package/lib/renderer/FeatureControl.js +229 -213
  828. package/lib/renderer/FormulaControl.d.ts +33 -16
  829. package/lib/renderer/FormulaControl.js +429 -356
  830. package/lib/renderer/GoConfigControl.js +30 -34
  831. package/lib/renderer/OptionControl.d.ts +2 -2
  832. package/lib/renderer/OptionControl.js +750 -688
  833. package/lib/renderer/RangePartsControl.d.ts +2 -2
  834. package/lib/renderer/RangePartsControl.js +320 -326
  835. package/lib/renderer/StatusControl.d.ts +1 -1
  836. package/lib/renderer/StatusControl.js +145 -136
  837. package/lib/renderer/SwitchMoreControl.d.ts +67 -51
  838. package/lib/renderer/SwitchMoreControl.js +367 -319
  839. package/lib/renderer/TimelineItemControl.d.ts +3 -83
  840. package/lib/renderer/TimelineItemControl.js +531 -464
  841. package/lib/renderer/TransferTableControl.d.ts +2 -4
  842. package/lib/renderer/TransferTableControl.js +394 -369
  843. package/lib/renderer/TreeOptionControl.d.ts +1 -1
  844. package/lib/renderer/TreeOptionControl.js +588 -563
  845. package/lib/renderer/ValidationControl.d.ts +1 -1
  846. package/lib/renderer/ValidationControl.js +277 -269
  847. package/lib/renderer/ValidationItem.d.ts +1 -1
  848. package/lib/renderer/ValidationItem.js +145 -134
  849. package/lib/renderer/event-control/action-config-dialog.js +214 -207
  850. package/lib/renderer/event-control/action-config-panel.js +37 -44
  851. package/lib/renderer/event-control/actions.js +465 -144
  852. package/lib/renderer/event-control/comp-action-select.js +37 -27
  853. package/lib/renderer/event-control/helper.d.ts +19 -19
  854. package/lib/renderer/event-control/helper.js +232 -220
  855. package/lib/renderer/event-control/index.d.ts +1 -1
  856. package/lib/renderer/event-control/index.js +641 -630
  857. package/lib/renderer/event-control/types.d.ts +1 -0
  858. package/lib/renderer/style-control/Background.js +64 -116
  859. package/lib/renderer/style-control/Border.js +27 -38
  860. package/lib/renderer/style-control/BoxModel.d.ts +1 -1
  861. package/lib/renderer/style-control/BoxModel.js +11 -4
  862. package/lib/renderer/style-control/BoxShadow.js +17 -19
  863. package/lib/renderer/style-control/Display.js +13 -17
  864. package/lib/renderer/style-control/Font.js +14 -17
  865. package/lib/renderer/style-control/InsetBoxModel.d.ts +17 -0
  866. package/lib/renderer/style-control/InsetBoxModel.js +77 -0
  867. package/lib/renderer/style-control/font-family.js +2 -3
  868. package/lib/renderer/style-control/transformation.js +1 -1
  869. package/lib/renderer/style-control/types.d.ts +4 -4
  870. package/lib/renderer/textarea-formula/FormulaPicker.d.ts +12 -0
  871. package/lib/renderer/textarea-formula/FormulaPicker.js +47 -0
  872. package/lib/renderer/textarea-formula/TextareaFormulaControl.d.ts +67 -0
  873. package/lib/renderer/textarea-formula/TextareaFormulaControl.js +345 -0
  874. package/lib/renderer/textarea-formula/plugin.d.ts +32 -0
  875. package/lib/renderer/textarea-formula/plugin.js +278 -0
  876. package/lib/renderer/textarea-formula/utils.d.ts +12 -0
  877. package/lib/renderer/textarea-formula/utils.js +81 -0
  878. package/lib/tpl/api.js +30 -41
  879. package/lib/tpl/common.js +192 -113
  880. package/lib/tpl/horizontal.js +6 -8
  881. package/lib/tpl/index.d.ts +1 -0
  882. package/lib/tpl/layout.d.ts +1 -0
  883. package/lib/tpl/layout.js +715 -0
  884. package/lib/tpl/options.js +5 -22
  885. package/lib/tpl/style.js +18 -18
  886. package/lib/tpl/validations.js +9 -24
  887. package/lib/util.d.ts +47 -0
  888. package/lib/util.js +30 -0
  889. package/lib/validator.d.ts +1 -2
  890. package/lib/validator.js +11 -24
  891. package/package.json +10 -28
  892. package/esm/plugin/Table-v2.js +0 -819
  893. package/esm/plugin/TableCell-v2.js +0 -499
  894. package/lib/plugin/Table-v2.js +0 -823
  895. package/lib/plugin/TableCell-v2.js +0 -507
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-editor v5.2.0-beta.2
2
+ * amis-editor v5.2.1-beta.15
3
3
  * Copyright 2018-2022 @fex
4
4
  */
5
5
 
@@ -26,1451 +26,1526 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
26
26
  var viewTypeToEditType = function (type) {
27
27
  return type === 'tpl' ? 'input-text' : type === 'status' || type === 'mapping' ? 'select' : "input-".concat(type);
28
28
  };
29
-
30
- var CRUDPlugin =
31
- /** @class */
32
- function (_super) {
29
+ var CRUDPlugin = /** @class */function (_super) {
33
30
  tslib.__extends(CRUDPlugin, _super);
34
-
35
31
  function CRUDPlugin() {
36
- var _this = _super !== null && _super.apply(this, arguments) || this; // 关联渲染器名字
37
-
38
-
39
- _this.rendererName = 'crud';
40
- _this.$schema = '/schemas/CRUDSchema.json';
41
- _this.order = -1000; // 组件名称
42
-
43
- _this.name = i18nRuntime.i18n("d7213304d1a8a02a73a2f4010839e061");
44
- _this.isBaseComponent = true;
45
- _this.description = i18nRuntime.i18n("7a9f1ec32752de8b69ef21138970f64d");
46
- _this.docLink = '/amis/zh-CN/components/crud';
47
- _this.tags = [i18nRuntime.i18n("997c7a5d34f6fc628893f509d0df32e0")];
48
- _this.icon = 'fa fa-table';
49
- _this.pluginIcon = 'table-plugin';
50
- _this.scaffold = {
51
- type: 'crud',
52
- syncLocation: false,
53
- api: '',
54
- columns: [{
55
- name: 'id',
56
- label: 'ID',
57
- type: 'text'
58
- }, {
59
- name: 'engine',
60
- label: i18nRuntime.i18n("48c68eb5a42e2b3e679c53b00f6e203f"),
61
- type: 'text'
62
- }],
63
- bulkActions: [],
64
- itemActions: []
65
- };
66
- _this.actions = [{
67
- actionType: 'reload',
68
- actionLabel: i18nRuntime.i18n("64ca9bab920a2983bcf270320d850d00"),
69
- description: i18nRuntime.i18n("9ef5597ac0b4da662bcd967da37eceb4")
70
- }];
71
- _this.btnSchemas = {
72
- create: {
73
- label: i18nRuntime.i18n("66ab5e9f24c8f46012a25c89919fb191"),
74
- type: 'button',
75
- actionType: 'dialog',
76
- level: 'primary',
77
- dialog: {
78
- title: i18nRuntime.i18n("66ab5e9f24c8f46012a25c89919fb191"),
79
- body: {
80
- type: 'form',
81
- api: 'xxx/create',
82
- body: []
32
+ var _this = _super !== null && _super.apply(this, arguments) || this;
33
+ // 关联渲染器名字
34
+ Object.defineProperty(_this, "rendererName", {
35
+ enumerable: true,
36
+ configurable: true,
37
+ writable: true,
38
+ value: 'crud'
39
+ });
40
+ Object.defineProperty(_this, "$schema", {
41
+ enumerable: true,
42
+ configurable: true,
43
+ writable: true,
44
+ value: '/schemas/CRUDSchema.json'
45
+ });
46
+ Object.defineProperty(_this, "order", {
47
+ enumerable: true,
48
+ configurable: true,
49
+ writable: true,
50
+ value: -1000
51
+ });
52
+ // 组件名称
53
+ Object.defineProperty(_this, "name", {
54
+ enumerable: true,
55
+ configurable: true,
56
+ writable: true,
57
+ value: i18nRuntime.i18n("d7213304d1a8a02a73a2f4010839e061")
58
+ });
59
+ Object.defineProperty(_this, "isBaseComponent", {
60
+ enumerable: true,
61
+ configurable: true,
62
+ writable: true,
63
+ value: true
64
+ });
65
+ Object.defineProperty(_this, "description", {
66
+ enumerable: true,
67
+ configurable: true,
68
+ writable: true,
69
+ value: i18nRuntime.i18n("7a9f1ec32752de8b69ef21138970f64d")
70
+ });
71
+ Object.defineProperty(_this, "docLink", {
72
+ enumerable: true,
73
+ configurable: true,
74
+ writable: true,
75
+ value: '/amis/zh-CN/components/crud'
76
+ });
77
+ Object.defineProperty(_this, "tags", {
78
+ enumerable: true,
79
+ configurable: true,
80
+ writable: true,
81
+ value: [i18nRuntime.i18n("997c7a5d34f6fc628893f509d0df32e0")]
82
+ });
83
+ Object.defineProperty(_this, "icon", {
84
+ enumerable: true,
85
+ configurable: true,
86
+ writable: true,
87
+ value: 'fa fa-table'
88
+ });
89
+ Object.defineProperty(_this, "pluginIcon", {
90
+ enumerable: true,
91
+ configurable: true,
92
+ writable: true,
93
+ value: 'table-plugin'
94
+ });
95
+ Object.defineProperty(_this, "scaffold", {
96
+ enumerable: true,
97
+ configurable: true,
98
+ writable: true,
99
+ value: {
100
+ type: 'crud',
101
+ syncLocation: false,
102
+ api: '',
103
+ columns: [{
104
+ name: 'id',
105
+ label: 'ID',
106
+ type: 'text'
107
+ }, {
108
+ name: 'engine',
109
+ label: i18nRuntime.i18n("48c68eb5a42e2b3e679c53b00f6e203f"),
110
+ type: 'text'
111
+ }],
112
+ bulkActions: [],
113
+ itemActions: []
114
+ }
115
+ });
116
+ Object.defineProperty(_this, "actions", {
117
+ enumerable: true,
118
+ configurable: true,
119
+ writable: true,
120
+ value: [{
121
+ actionType: 'reload',
122
+ actionLabel: i18nRuntime.i18n("64ca9bab920a2983bcf270320d850d00"),
123
+ description: i18nRuntime.i18n("9ef5597ac0b4da662bcd967da37eceb4")
124
+ }]
125
+ });
126
+ Object.defineProperty(_this, "btnSchemas", {
127
+ enumerable: true,
128
+ configurable: true,
129
+ writable: true,
130
+ value: {
131
+ create: {
132
+ label: i18nRuntime.i18n("66ab5e9f24c8f46012a25c89919fb191"),
133
+ type: 'button',
134
+ actionType: 'dialog',
135
+ level: 'primary',
136
+ dialog: {
137
+ title: i18nRuntime.i18n("66ab5e9f24c8f46012a25c89919fb191"),
138
+ body: {
139
+ type: 'form',
140
+ api: 'xxx/create',
141
+ body: []
142
+ }
83
143
  }
84
- }
85
- },
86
- update: {
87
- label: i18nRuntime.i18n("95b351c86267f3aedf89520959bce689"),
88
- type: 'button',
89
- actionType: 'dialog',
90
- level: 'link',
91
- dialog: {
92
- title: i18nRuntime.i18n("95b351c86267f3aedf89520959bce689"),
93
- body: {
94
- type: 'form',
95
- api: 'xxx/update',
96
- body: []
144
+ },
145
+ update: {
146
+ label: i18nRuntime.i18n("95b351c86267f3aedf89520959bce689"),
147
+ type: 'button',
148
+ actionType: 'dialog',
149
+ level: 'link',
150
+ dialog: {
151
+ title: i18nRuntime.i18n("95b351c86267f3aedf89520959bce689"),
152
+ body: {
153
+ type: 'form',
154
+ api: 'xxx/update',
155
+ body: []
156
+ }
97
157
  }
98
- }
99
- },
100
- view: {
101
- label: i18nRuntime.i18n("607e7a4f377fa66b0b28ce318aab841f"),
102
- type: 'button',
103
- actionType: 'dialog',
104
- level: 'link',
105
- dialog: {
106
- title: i18nRuntime.i18n("5b48dbb8dc710cffe6313bb56a7f6d47"),
107
- body: {
108
- type: 'form',
109
- api: 'xxx/update',
110
- body: []
158
+ },
159
+ view: {
160
+ label: i18nRuntime.i18n("607e7a4f377fa66b0b28ce318aab841f"),
161
+ type: 'button',
162
+ actionType: 'dialog',
163
+ level: 'link',
164
+ dialog: {
165
+ title: i18nRuntime.i18n("5b48dbb8dc710cffe6313bb56a7f6d47"),
166
+ body: {
167
+ type: 'form',
168
+ api: 'xxx/update',
169
+ body: []
170
+ }
111
171
  }
112
- }
113
- },
114
- delete: {
115
- type: 'button',
116
- label: i18nRuntime.i18n("2f4aaddde33c9b93c36fd2503f3d122b"),
117
- actionType: 'ajax',
118
- level: 'link',
119
- className: 'text-danger',
120
- confirmText: i18nRuntime.i18n("6c546666aab964c39cd8bfdf4fbd46b8"),
121
- api: 'delete:/xxx/delete'
122
- },
123
- bulkDelete: {
124
- type: 'button',
125
- level: 'danger',
126
- label: i18nRuntime.i18n("7fb62b30119c3797a843a48368463314"),
127
- actionType: 'ajax',
128
- confirmText: i18nRuntime.i18n("6c546666aab964c39cd8bfdf4fbd46b8"),
129
- api: '/xxx/batch-delete'
130
- },
131
- bulkUpdate: {
132
- type: 'button',
133
- label: i18nRuntime.i18n("e73cefac9d030927da1618c7b15c98c9"),
134
- actionType: 'dialog',
135
- dialog: {
136
- title: i18nRuntime.i18n("e73cefac9d030927da1618c7b15c98c9"),
137
- size: 'md',
138
- body: {
139
- type: 'form',
140
- api: '/xxx/bacth-edit',
141
- body: [{
142
- label: i18nRuntime.i18n("19c6b7463e1bf73bb4b12ba07abd5444"),
143
- text: i18nRuntime.i18n("19c6b7463e1bf73bb4b12ba07abd5444"),
144
- type: 'input-text'
145
- }]
172
+ },
173
+ delete: {
174
+ type: 'button',
175
+ label: i18nRuntime.i18n("2f4aaddde33c9b93c36fd2503f3d122b"),
176
+ actionType: 'ajax',
177
+ level: 'link',
178
+ className: 'text-danger',
179
+ confirmText: i18nRuntime.i18n("6c546666aab964c39cd8bfdf4fbd46b8"),
180
+ api: 'delete:/xxx/delete'
181
+ },
182
+ bulkDelete: {
183
+ type: 'button',
184
+ level: 'danger',
185
+ label: i18nRuntime.i18n("7fb62b30119c3797a843a48368463314"),
186
+ actionType: 'ajax',
187
+ confirmText: i18nRuntime.i18n("6c546666aab964c39cd8bfdf4fbd46b8"),
188
+ api: '/xxx/batch-delete'
189
+ },
190
+ bulkUpdate: {
191
+ type: 'button',
192
+ label: i18nRuntime.i18n("e73cefac9d030927da1618c7b15c98c9"),
193
+ actionType: 'dialog',
194
+ dialog: {
195
+ title: i18nRuntime.i18n("e73cefac9d030927da1618c7b15c98c9"),
196
+ size: 'md',
197
+ body: {
198
+ type: 'form',
199
+ api: '/xxx/bacth-edit',
200
+ body: [{
201
+ label: i18nRuntime.i18n("19c6b7463e1bf73bb4b12ba07abd5444"),
202
+ text: i18nRuntime.i18n("19c6b7463e1bf73bb4b12ba07abd5444"),
203
+ type: 'input-text'
204
+ }]
205
+ }
146
206
  }
207
+ },
208
+ // itemDelete: {
209
+ // type: 'button',
210
+ // level: 'danger',
211
+ // label: '删除',
212
+ // api: '/xxx/delete-one',
213
+ // actionType: 'ajax',
214
+ // confirmText: '确定要删除?'
215
+ // },
216
+ filter: {
217
+ title: i18nRuntime.i18n("cf12e55021998a8328201800ec356773"),
218
+ body: [{
219
+ type: 'input-text',
220
+ name: 'keywords',
221
+ label: i18nRuntime.i18n("cfb5f18c43753ad5329348d626bd3739")
222
+ }]
147
223
  }
148
- },
149
- // itemDelete: {
150
- // type: 'button',
151
- // level: 'danger',
152
- // label: '删除',
153
- // api: '/xxx/delete-one',
154
- // actionType: 'ajax',
155
- // confirmText: '确定要删除?'
156
- // },
157
- filter: {
158
- title: i18nRuntime.i18n("cf12e55021998a8328201800ec356773"),
159
- body: [{
160
- type: 'input-text',
161
- name: 'keywords',
162
- label: i18nRuntime.i18n("cfb5f18c43753ad5329348d626bd3739")
163
- }]
164
224
  }
165
- };
166
- _this.scaffoldForm = {
167
- title: i18nRuntime.i18n("4a1e3c50547e61503a2d1c356005eb08"),
168
- body: [amisEditorCore.getSchemaTpl('apiControl', {
169
- label: i18nRuntime.i18n("85624c8e8b0fc98954eecbe508e8b59d"),
170
- sampleBuilder: function (schema) {
171
- return JSON.stringify({
172
- status: 0,
173
- msg: '',
174
- data: [{
175
- id: 1,
176
- name: 'Jack'
177
- }, {
178
- id: 2,
179
- name: 'Rose'
180
- }]
181
- }, null, 2);
182
- }
183
- }), {
184
- type: 'button',
185
- label: i18nRuntime.i18n("3dd674542204724eb5417efc7354ec73"),
186
- className: 'm-t-xs m-b-xs',
187
- onClick: function (e, props) {
188
- return tslib.__awaiter(_this, void 0, void 0, function () {
189
- var data, schemaFilter, api, result, autoFillKeyValues, items;
190
-
191
- var _a, _b;
192
-
193
- return tslib.__generator(this, function (_c) {
194
- switch (_c.label) {
195
- case 0:
196
- data = props.data;
197
- schemaFilter = mobxStateTree.getEnv(window.editorStore).schemaFilter;
198
- api = data.api; // 主要是给爱速搭中替换 url
199
-
200
- if (schemaFilter) {
201
- api = schemaFilter({
202
- api: data.api
203
- }).api;
204
- }
205
-
206
- return [4
207
- /*yield*/
208
- , props.env.fetcher(api, data)];
209
-
210
- case 1:
211
- result = _c.sent();
212
- autoFillKeyValues = [];
213
- items = ((_a = result.data) === null || _a === void 0 ? void 0 : _a.rows) || ((_b = result.data) === null || _b === void 0 ? void 0 : _b.items);
214
-
215
- if (items === null || items === void 0 ? void 0 : items.length) {
216
- Object.keys(items[0]).forEach(function (key) {
217
- items[0][key];
218
- autoFillKeyValues.push({
219
- label: key,
220
- type: 'text',
221
- name: key
225
+ });
226
+ Object.defineProperty(_this, "scaffoldForm", {
227
+ enumerable: true,
228
+ configurable: true,
229
+ writable: true,
230
+ value: {
231
+ title: i18nRuntime.i18n("4a1e3c50547e61503a2d1c356005eb08"),
232
+ body: [amisEditorCore.getSchemaTpl('apiControl', {
233
+ label: i18nRuntime.i18n("85624c8e8b0fc98954eecbe508e8b59d"),
234
+ sampleBuilder: function (schema) {
235
+ return JSON.stringify({
236
+ status: 0,
237
+ msg: '',
238
+ data: [{
239
+ id: 1,
240
+ name: 'Jack'
241
+ }, {
242
+ id: 2,
243
+ name: 'Rose'
244
+ }]
245
+ }, null, 2);
246
+ }
247
+ }), {
248
+ type: 'button',
249
+ label: i18nRuntime.i18n("3dd674542204724eb5417efc7354ec73"),
250
+ className: 'm-t-xs m-b-xs',
251
+ onClick: function (e, props) {
252
+ return tslib.__awaiter(_this, void 0, void 0, function () {
253
+ var data, schemaFilter, api, result, autoFillKeyValues, items;
254
+ var _a, _b;
255
+ return tslib.__generator(this, function (_c) {
256
+ switch (_c.label) {
257
+ case 0:
258
+ data = props.data;
259
+ schemaFilter = mobxStateTree.getEnv(window.editorStore).schemaFilter;
260
+ api = data.api;
261
+ // 主要是给爱速搭中替换 url
262
+ if (schemaFilter) {
263
+ api = schemaFilter({
264
+ api: data.api
265
+ }).api;
266
+ }
267
+ return [4 /*yield*/, props.env.fetcher(api, data)];
268
+ case 1:
269
+ result = _c.sent();
270
+ autoFillKeyValues = [];
271
+ items = ((_a = result.data) === null || _a === void 0 ? void 0 : _a.rows) || ((_b = result.data) === null || _b === void 0 ? void 0 : _b.items);
272
+ if (items === null || items === void 0 ? void 0 : items.length) {
273
+ Object.keys(items[0]).forEach(function (key) {
274
+ items[0][key];
275
+ autoFillKeyValues.push({
276
+ label: key,
277
+ type: 'text',
278
+ name: key
279
+ });
222
280
  });
223
- });
224
- props.formStore.setValues({
225
- columns: autoFillKeyValues
226
- }); // 查询条件的字段列表
227
-
228
- props.formStore.setValues({
229
- filterSettingSource: autoFillKeyValues.map(function (column) {
230
- return column.name;
231
- })
232
- });
233
- } else {
234
- amis.toast.warning("API\u8FD4\u56DE\u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u8BF7\u70B9\u51FB\u63A5\u53E3\u5730\u5740\u53F3\u4FA7\u793A\u4F8B\u7684\u95EE\u53F7\u67E5\u770B\u793A\u4F8B");
235
- }
236
-
237
- return [2
238
- /*return*/
239
- ];
240
- }
281
+ props.formStore.setValues({
282
+ columns: autoFillKeyValues
283
+ });
284
+ // 查询条件的字段列表
285
+ props.formStore.setValues({
286
+ filterSettingSource: autoFillKeyValues.map(function (column) {
287
+ return column.name;
288
+ })
289
+ });
290
+ } else {
291
+ amis.toast.warning(i18nRuntime.i18n("3266535dc49863d976b9960adad29fef"));
292
+ }
293
+ return [2 /*return*/];
294
+ }
295
+ });
241
296
  });
242
- });
243
- }
244
- }, {
245
- name: 'features',
246
- label: i18nRuntime.i18n("07b59fd09f6007bac246d9a73b793a49"),
247
- type: 'checkboxes',
248
- joinValues: false,
249
- extractValue: true,
250
- itemClassName: 'max-w-lg',
251
- options: [{
252
- label: i18nRuntime.i18n("66ab5e9f24c8f46012a25c89919fb191"),
253
- value: 'create'
254
- }, {
255
- label: i18nRuntime.i18n("bee912d79eefb7335988c4997aa9138d"),
256
- value: 'filter'
257
- }, {
258
- label: i18nRuntime.i18n("7fb62b30119c3797a843a48368463314"),
259
- value: 'bulkDelete'
260
- }, {
261
- label: i18nRuntime.i18n("0f61da949d2b45534967e197cc2eee29"),
262
- value: 'bulkUpdate'
263
- }, {
264
- label: i18nRuntime.i18n("aa85b3cd6aa4cdfd45bfe5a96678ad2f"),
265
- value: 'update'
266
- }, {
267
- label: i18nRuntime.i18n("653eb2792d3126a60caa6982f89a906b"),
268
- value: 'view'
297
+ }
269
298
  }, {
270
- label: i18nRuntime.i18n("8a4d6dfbcd8072555b5951091f171000"),
271
- value: 'delete'
272
- }]
273
- }, {
274
- type: 'group',
275
- body: [{
276
- columnRatio: 10,
299
+ name: 'features',
300
+ label: i18nRuntime.i18n("07b59fd09f6007bac246d9a73b793a49"),
277
301
  type: 'checkboxes',
278
- label: i18nRuntime.i18n("f4b368051b455e386a314688c7c75c1f"),
279
- name: 'filterEnabledList',
280
302
  joinValues: false,
281
- source: '${filterSettingSource}'
282
- }, {
283
- columnRatio: 2,
284
- type: 'input-number',
285
- label: i18nRuntime.i18n("23c7ea8ee9519459598b2de65fe2a2eb"),
286
- value: 3,
287
- name: 'filterColumnCount'
288
- }],
289
- visibleOn: 'data.features && data.features.includes("filter")'
290
- }, {
291
- name: 'columns',
292
- type: 'input-table',
293
- label: false,
294
- addable: true,
295
- removable: true,
296
- needConfirm: false,
297
- columns: [{
298
- type: 'input-text',
299
- name: 'label',
300
- label: i18nRuntime.i18n("32c65d8d7431e76029678ec7bb73a5ab")
301
- }, {
302
- type: 'input-text',
303
- name: 'name',
304
- label: i18nRuntime.i18n("41a344642681efaaa418c228ba7fb45c")
305
- }, {
306
- type: 'select',
307
- name: 'type',
308
- label: i18nRuntime.i18n("226b0912184333c81babf2f1894ec0c1"),
309
- value: 'text',
303
+ extractValue: true,
304
+ itemClassName: 'max-w-lg',
310
305
  options: [{
311
- value: 'text',
312
- label: i18nRuntime.i18n("ffb01e5bcf4c00447f5150d3cba81371")
306
+ label: i18nRuntime.i18n("66ab5e9f24c8f46012a25c89919fb191"),
307
+ value: 'create'
313
308
  }, {
314
- value: 'tpl',
315
- label: i18nRuntime.i18n("59cf15fe6b8d659c9bd2f86143534a06")
309
+ label: i18nRuntime.i18n("bee912d79eefb7335988c4997aa9138d"),
310
+ value: 'filter'
316
311
  }, {
317
- value: 'image',
318
- label: i18nRuntime.i18n("20def7942674282277c3714ed7ea6ce0")
312
+ label: i18nRuntime.i18n("7fb62b30119c3797a843a48368463314"),
313
+ value: 'bulkDelete'
319
314
  }, {
320
- value: 'date',
321
- label: i18nRuntime.i18n("4ff1e74e43a3586339251494117185ad")
315
+ label: i18nRuntime.i18n("0f61da949d2b45534967e197cc2eee29"),
316
+ value: 'bulkUpdate'
322
317
  }, {
323
- value: 'progress',
324
- label: i18nRuntime.i18n("c7bff79d059a0b7ff9b02441959d8be2")
318
+ label: i18nRuntime.i18n("aa85b3cd6aa4cdfd45bfe5a96678ad2f"),
319
+ value: 'update'
325
320
  }, {
326
- value: 'status',
327
- label: i18nRuntime.i18n("3fea7ca76cdece641436d7ab0d02ab1b")
321
+ label: i18nRuntime.i18n("653eb2792d3126a60caa6982f89a906b"),
322
+ value: 'view'
328
323
  }, {
329
- value: 'mapping',
330
- label: i18nRuntime.i18n("9da188491dd34c4382a5b9f006194e41")
324
+ label: i18nRuntime.i18n("8a4d6dfbcd8072555b5951091f171000"),
325
+ value: 'delete'
326
+ }]
327
+ }, {
328
+ type: 'group',
329
+ body: [{
330
+ columnRatio: 10,
331
+ type: 'checkboxes',
332
+ label: i18nRuntime.i18n("f4b368051b455e386a314688c7c75c1f"),
333
+ name: 'filterEnabledList',
334
+ joinValues: false,
335
+ source: '${filterSettingSource}'
336
+ }, {
337
+ columnRatio: 2,
338
+ type: 'input-number',
339
+ label: i18nRuntime.i18n("23c7ea8ee9519459598b2de65fe2a2eb"),
340
+ value: 3,
341
+ name: 'filterColumnCount'
342
+ }],
343
+ visibleOn: 'data.features && data.features.includes("filter")'
344
+ }, {
345
+ name: 'columns',
346
+ type: 'input-table',
347
+ label: false,
348
+ addable: true,
349
+ removable: true,
350
+ needConfirm: false,
351
+ columns: [{
352
+ type: 'input-text',
353
+ name: 'label',
354
+ label: i18nRuntime.i18n("32c65d8d7431e76029678ec7bb73a5ab")
355
+ }, {
356
+ type: 'input-text',
357
+ name: 'name',
358
+ label: i18nRuntime.i18n("41a344642681efaaa418c228ba7fb45c")
331
359
  }, {
332
- value: 'operation',
333
- label: i18nRuntime.i18n("8abc564260a1564521e0c3a1d5419b4a")
360
+ type: 'select',
361
+ name: 'type',
362
+ label: i18nRuntime.i18n("226b0912184333c81babf2f1894ec0c1"),
363
+ value: 'text',
364
+ options: [{
365
+ value: 'text',
366
+ label: i18nRuntime.i18n("ffb01e5bcf4c00447f5150d3cba81371")
367
+ }, {
368
+ value: 'tpl',
369
+ label: i18nRuntime.i18n("59cf15fe6b8d659c9bd2f86143534a06")
370
+ }, {
371
+ value: 'image',
372
+ label: i18nRuntime.i18n("20def7942674282277c3714ed7ea6ce0")
373
+ }, {
374
+ value: 'date',
375
+ label: i18nRuntime.i18n("4ff1e74e43a3586339251494117185ad")
376
+ }, {
377
+ value: 'progress',
378
+ label: i18nRuntime.i18n("c7bff79d059a0b7ff9b02441959d8be2")
379
+ }, {
380
+ value: 'status',
381
+ label: i18nRuntime.i18n("3fea7ca76cdece641436d7ab0d02ab1b")
382
+ }, {
383
+ value: 'mapping',
384
+ label: i18nRuntime.i18n("9da188491dd34c4382a5b9f006194e41")
385
+ }, {
386
+ value: 'operation',
387
+ label: i18nRuntime.i18n("8abc564260a1564521e0c3a1d5419b4a")
388
+ }]
334
389
  }]
335
- }]
336
- }],
337
- pipeOut: function (value) {
338
- var valueSchema = cloneDeep__default["default"](value); // 查看/删除 操作,可选择是否使用接口返回值预填充
339
-
340
- var features = valueSchema.features;
341
- var oper = {
342
- type: 'operation',
343
- label: i18nRuntime.i18n("2b6bc0f293f5ca01b006206c2535ccbc"),
344
- buttons: []
345
- };
346
- var itemBtns = ['update', 'view', 'delete'];
347
- var hasFeatures = get__default["default"](features, 'length');
348
- valueSchema.bulkActions = [];
349
- /** 统一api格式 */
350
-
351
- valueSchema.api = typeof valueSchema.api === 'string' ? amisCore.normalizeApi(valueSchema.api) : valueSchema.api;
352
- hasFeatures && features.forEach(function (item) {
353
- var _a, _b, _c, _d;
354
-
355
- if (itemBtns.includes(item)) {
356
- var schema = void 0;
357
-
358
- if (item === 'update') {
359
- schema = cloneDeep__default["default"](_this.btnSchemas.update);
360
- schema.dialog.body.body = value.columns.filter(function (_a) {
361
- var type = _a.type;
362
- return type !== 'progress' && type !== 'operation';
363
- }).map(function (_a) {
364
- var type = _a.type,
390
+ }],
391
+ pipeOut: function (value) {
392
+ var valueSchema = cloneDeep__default["default"](value);
393
+ // 查看/删除 操作,可选择是否使用接口返回值预填充
394
+ var features = valueSchema.features;
395
+ var oper = {
396
+ type: 'operation',
397
+ label: i18nRuntime.i18n("2b6bc0f293f5ca01b006206c2535ccbc"),
398
+ buttons: []
399
+ };
400
+ var itemBtns = ['update', 'view', 'delete'];
401
+ var hasFeatures = get__default["default"](features, 'length');
402
+ valueSchema.bulkActions = [];
403
+ /** 统一api格式 */
404
+ valueSchema.api = typeof valueSchema.api === 'string' ? amisCore.normalizeApi(valueSchema.api) : valueSchema.api;
405
+ hasFeatures && features.forEach(function (item) {
406
+ var _a, _b, _c, _d;
407
+ if (itemBtns.includes(item)) {
408
+ var schema = void 0;
409
+ if (item === 'update') {
410
+ schema = cloneDeep__default["default"](_this.btnSchemas.update);
411
+ schema.dialog.body.body = value.columns.filter(function (_a) {
412
+ var type = _a.type;
413
+ return type !== 'progress' && type !== 'operation';
414
+ }).map(function (_a) {
415
+ var type = _a.type,
365
416
  rest = tslib.__rest(_a, ["type"]);
366
-
367
- return tslib.__assign(tslib.__assign({}, rest), {
368
- type: viewTypeToEditType(type)
417
+ return tslib.__assign(tslib.__assign({}, rest), {
418
+ type: viewTypeToEditType(type)
419
+ });
369
420
  });
370
- });
371
- } else if (item === 'view') {
372
- schema = cloneDeep__default["default"](_this.btnSchemas.view);
373
- schema.dialog.body.body = value.columns.map(function (_a) {
374
- _a.type;
421
+ } else if (item === 'view') {
422
+ schema = cloneDeep__default["default"](_this.btnSchemas.view);
423
+ schema.dialog.body.body = value.columns.map(function (_a) {
424
+ _a.type;
375
425
  var rest = tslib.__rest(_a, ["type"]);
376
-
377
- return tslib.__assign(tslib.__assign({}, rest), {
378
- type: 'static'
426
+ return tslib.__assign(tslib.__assign({}, rest), {
427
+ type: 'static'
428
+ });
379
429
  });
380
- });
381
- } else if (item === 'delete') {
382
- schema = cloneDeep__default["default"](_this.btnSchemas.delete);
383
- schema.api = ((_b = (_a = valueSchema.api) === null || _a === void 0 ? void 0 : _a.method) === null || _b === void 0 ? void 0 : _b.match(/^(post|delete)$/i)) ? valueSchema.api : tslib.__assign(tslib.__assign({}, valueSchema.api), {
384
- method: 'post'
385
- });
386
- } // 添加操作按钮
387
-
388
-
389
- _this.addItem(oper.buttons, schema);
390
- } else {
391
- // 批量操作
392
- if (item === 'bulkUpdate') {
393
- _this.addItem(valueSchema.bulkActions, cloneDeep__default["default"](_this.btnSchemas.bulkUpdate));
394
- }
395
-
396
- if (item === 'bulkDelete') {
397
- _this.addItem(valueSchema.bulkActions, cloneDeep__default["default"](_this.btnSchemas.bulkDelete));
398
- } // 创建
399
-
400
-
401
- if (item === 'create') {
402
- var createSchemaBase = _this.btnSchemas.create;
403
- createSchemaBase.dialog.body = {
404
- type: 'form',
405
- api: ((_d = (_c = valueSchema.api) === null || _c === void 0 ? void 0 : _c.method) === null || _d === void 0 ? void 0 : _d.match(/^(post|put)$/i)) ? valueSchema.api : tslib.__assign(tslib.__assign({}, valueSchema.api), {
430
+ } else if (item === 'delete') {
431
+ schema = cloneDeep__default["default"](_this.btnSchemas.delete);
432
+ schema.api = ((_b = (_a = valueSchema.api) === null || _a === void 0 ? void 0 : _a.method) === null || _b === void 0 ? void 0 : _b.match(/^(post|delete)$/i)) ? valueSchema.api : tslib.__assign(tslib.__assign({}, valueSchema.api), {
406
433
  method: 'post'
407
- }),
408
- body: valueSchema.columns.map(function (column) {
409
- var type = column.type;
410
- return {
411
- type: viewTypeToEditType(type),
412
- name: column.name,
413
- label: column.label
414
- };
415
- })
416
- };
417
- valueSchema.headerToolbar = [createSchemaBase, 'bulkActions'];
418
- }
419
-
420
- var keysFilter = Object.keys(valueSchema.filter || {});
421
-
422
- if (item === 'filter' && !keysFilter.length) {
423
- if (valueSchema.filterEnabledList) {
424
- valueSchema.filter = {
425
- title: i18nRuntime.i18n("cf12e55021998a8328201800ec356773")
426
- };
427
- valueSchema.filter.columnCount = value.filterColumnCount;
428
- valueSchema.filter.mode = 'horizontal';
429
- valueSchema.filter.body = valueSchema.filterEnabledList.map(function (item) {
430
- return {
431
- type: 'input-text',
432
- label: item.label,
433
- name: item.value
434
- };
435
434
  });
436
435
  }
437
- }
438
- }
439
- });
440
- var hasOperate = valueSchema.columns.find(function (item) {
441
- return item.type === 'operation';
442
- });
443
- hasFeatures && !hasOperate && valueSchema.columns.push(oper);
444
- return valueSchema;
445
- },
446
- canRebuild: true
447
- };
448
- _this.multifactor = true;
449
- _this.previewSchema = {
450
- syncLocation: false,
451
- type: 'crud',
452
- className: 'text-left',
453
- bodyClassName: 'm-b-none',
454
- affixHeader: false,
455
- data: {
456
- items: [{
457
- a: 1,
458
- b: 2
459
- }, {
460
- a: 3,
461
- b: 4
462
- }, {
463
- a: 5,
464
- b: 6
465
- }]
466
- },
467
- source: '${items}',
468
- columns: [{
469
- label: 'A',
470
- name: 'a'
471
- }, {
472
- label: 'B',
473
- name: 'b'
474
- }, {
475
- type: 'operation',
476
- label: i18nRuntime.i18n("2b6bc0f293f5ca01b006206c2535ccbc"),
477
- buttons: [{
478
- icon: 'fa fa-eye',
479
- type: 'button'
480
- }, {
481
- icon: 'fa fa-edit',
482
- type: 'button'
483
- }]
484
- }]
485
- };
486
- _this.panelTitle = i18nRuntime.i18n("d7213304d1a8a02a73a2f4010839e061");
487
-
488
- _this.panelBodyCreator = function (context) {
489
- _this.manager.store;
490
- var id = context.id;
491
- return amisEditorCore.getSchemaTpl('tabs', [{
492
- title: i18nRuntime.i18n("22b777e6fcb613b8ba83ced9594cd07e"),
493
- body: [amisEditorCore.getSchemaTpl('switch', {
494
- name: 'filter',
495
- label: i18nRuntime.i18n("07a88fae7dd11f87891af91fb54a74bb"),
496
- visibleOn: 'data.api && data.api.url',
497
- pipeIn: function (value) {
498
- return !!value;
499
- },
500
- pipeOut: function (value, originValue) {
501
- if (value) {
502
- return _this.oldFilter || amisEditorCore.JSONPipeIn({
503
- title: i18nRuntime.i18n("cf12e55021998a8328201800ec356773"),
504
- body: [{
505
- type: 'input-text',
506
- name: 'keywords',
507
- label: i18nRuntime.i18n("cfb5f18c43753ad5329348d626bd3739")
508
- }]
509
- });
436
+ // 添加操作按钮
437
+ _this.addItem(oper.buttons, schema);
510
438
  } else {
511
- _this.oldFilter = originValue;
439
+ // 批量操作
440
+ if (item === 'bulkUpdate') {
441
+ _this.addItem(valueSchema.bulkActions, cloneDeep__default["default"](_this.btnSchemas.bulkUpdate));
442
+ }
443
+ if (item === 'bulkDelete') {
444
+ _this.addItem(valueSchema.bulkActions, cloneDeep__default["default"](_this.btnSchemas.bulkDelete));
445
+ }
446
+ // 创建
447
+ if (item === 'create') {
448
+ var createSchemaBase = _this.btnSchemas.create;
449
+ createSchemaBase.dialog.body = {
450
+ type: 'form',
451
+ api: ((_d = (_c = valueSchema.api) === null || _c === void 0 ? void 0 : _c.method) === null || _d === void 0 ? void 0 : _d.match(/^(post|put)$/i)) ? valueSchema.api : tslib.__assign(tslib.__assign({}, valueSchema.api), {
452
+ method: 'post'
453
+ }),
454
+ body: valueSchema.columns.map(function (column) {
455
+ var type = column.type;
456
+ return {
457
+ type: viewTypeToEditType(type),
458
+ name: column.name,
459
+ label: column.label
460
+ };
461
+ })
462
+ };
463
+ valueSchema.headerToolbar = [createSchemaBase, 'bulkActions'];
464
+ }
465
+ var keysFilter = Object.keys(valueSchema.filter || {});
466
+ if (item === 'filter' && !keysFilter.length) {
467
+ if (valueSchema.filterEnabledList) {
468
+ valueSchema.filter = {
469
+ title: i18nRuntime.i18n("cf12e55021998a8328201800ec356773")
470
+ };
471
+ valueSchema.filter.columnCount = value.filterColumnCount;
472
+ valueSchema.filter.mode = 'horizontal';
473
+ valueSchema.filter.body = valueSchema.filterEnabledList.map(function (item) {
474
+ return {
475
+ type: 'input-text',
476
+ label: item.label,
477
+ name: item.value
478
+ };
479
+ });
480
+ }
481
+ }
512
482
  }
513
-
514
- return null;
515
- }
516
- }), {
517
- type: 'divider',
518
- visibleOn: 'data.api && data.api.url'
519
- }, {
520
- label: i18nRuntime.i18n("7f7c624a843b0d539a4ea59a696702f9"),
521
- name: 'bulkActions',
522
- type: 'combo',
523
- hiddenOn: 'data.pickerMode && data.multiple',
524
- inputClassName: 'ae-BulkActions-control',
525
- multiple: true,
526
- draggable: true,
527
- draggableTip: '',
528
- scaffold: {
529
- label: i18nRuntime.i18n("fa966345577ba81af19408f203db968f"),
530
- type: 'button'
531
- },
532
- labelRemark: {
533
- className: 'm-l-xs',
534
- trigger: 'click',
535
- rootClose: true,
536
- content: i18nRuntime.i18n("46e6edaeb9968e7f7ab549d4f2f82d6d"),
537
- placement: 'left'
538
- },
483
+ });
484
+ var hasOperate = valueSchema.columns.find(function (item) {
485
+ return item.type === 'operation';
486
+ });
487
+ hasFeatures && !hasOperate && valueSchema.columns.push(oper);
488
+ return valueSchema;
489
+ },
490
+ canRebuild: true
491
+ }
492
+ });
493
+ Object.defineProperty(_this, "multifactor", {
494
+ enumerable: true,
495
+ configurable: true,
496
+ writable: true,
497
+ value: true
498
+ });
499
+ Object.defineProperty(_this, "previewSchema", {
500
+ enumerable: true,
501
+ configurable: true,
502
+ writable: true,
503
+ value: {
504
+ syncLocation: false,
505
+ type: 'crud',
506
+ className: 'text-left',
507
+ bodyClassName: 'm-b-none',
508
+ affixHeader: false,
509
+ data: {
539
510
  items: [{
540
- type: 'tpl',
541
- tpl: '<span class="label label-success">${label}</span>',
542
- columnClassName: 'p-t-xs'
511
+ a: 1,
512
+ b: 2
543
513
  }, {
544
- columnClassName: 'p-t-xs col-edit',
545
- children: function (_a) {
546
- var index = _a.index;
547
- return React__default["default"].createElement("button", {
548
- onClick: _this.handleBulkActionEdit.bind(_this, id, index),
549
- "data-tooltip": "\u4FEE\u6539",
550
- "data-position": "bottom",
551
- className: "text-muted"
552
- }, React__default["default"].createElement("i", {
553
- className: "fa fa-pencil"
554
- }));
555
- }
514
+ a: 3,
515
+ b: 4
516
+ }, {
517
+ a: 5,
518
+ b: 6
556
519
  }]
557
- }, // getSchemaTpl('switch', {
558
- // name: 'defaultChecked',
559
- // label: '默认是否全部勾选',
560
- // visibleOn: 'data.bulkActions && data.bulkActions.length',
561
- // pipeIn: defaultValue(false)
562
- // }),
563
- {
564
- type: 'divider'
520
+ },
521
+ source: '${items}',
522
+ columns: [{
523
+ label: 'A',
524
+ name: 'a'
565
525
  }, {
566
- label: i18nRuntime.i18n("f13a0697d58d975d14eb3f3c72c2cbf2"),
567
- name: 'itemActions',
568
- type: 'combo',
569
- labelRemark: {
570
- className: 'm-l-xs',
571
- trigger: 'click',
572
- rootClose: true,
573
- content: i18nRuntime.i18n("3674ea51498e7118732e5e1c53d4bc80"),
574
- placement: 'left'
575
- },
576
- hiddenOn: 'this.mode && this.mode !== "table" || this.pickerMode',
577
- inputClassName: 'ae-BulkActions-control',
578
- multiple: true,
579
- draggable: true,
580
- scaffold: {
581
- label: i18nRuntime.i18n("fa966345577ba81af19408f203db968f"),
526
+ label: 'B',
527
+ name: 'b'
528
+ }, {
529
+ type: 'operation',
530
+ label: i18nRuntime.i18n("2b6bc0f293f5ca01b006206c2535ccbc"),
531
+ buttons: [{
532
+ icon: 'fa fa-eye',
582
533
  type: 'button'
583
- },
584
- items: [{
585
- type: 'tpl',
586
- tpl: '<span class="label label-success">${label}</span>',
587
- columnClassName: 'p-t-xs'
588
- }, {
589
- type: 'checkbox',
590
- className: 'text-xs',
591
- option: i18nRuntime.i18n("4916771d080ddf6d0551de4d6d2f42a4"),
592
- name: 'hiddenOnHover'
593
534
  }, {
594
- columnClassName: 'p-t-xs col-edit',
595
- children: function (_a) {
596
- var index = _a.index;
597
- return React__default["default"].createElement("button", {
598
- onClick: _this.handleItemActionEdit.bind(_this, id, index),
599
- "data-tooltip": "\u4FEE\u6539",
600
- "data-position": "bottom",
601
- className: "text-muted"
602
- }, React__default["default"].createElement("i", {
603
- className: "fa fa-pencil"
604
- }));
605
- }
535
+ icon: 'fa fa-edit',
536
+ type: 'button'
606
537
  }]
607
- }, {
608
- type: 'divider',
609
- hiddenOn: 'this.mode && this.mode !== "table" || this.pickerMode'
610
- }, amisEditorCore.getSchemaTpl('switch', {
611
- name: 'syncLocation',
612
- label: i18nRuntime.i18n("569343b4fe5e48131b78611c11eadbeb"),
613
- pipeIn: amisEditorCore.defaultValue(true),
614
- labelRemark: {
615
- className: 'm-l-xs',
616
- trigger: 'click',
617
- rootClose: true,
618
- content: i18nRuntime.i18n("6dbee29a8c54eef9d042ef3280999ad9"),
619
- placement: 'left'
620
- }
621
- }), {
622
- label: i18nRuntime.i18n("2171d1b07d045e796cba4a05bcf7d13f"),
623
- type: 'input-kv',
624
- name: 'defaultParams',
625
- labelRemark: {
626
- className: 'm-l-xs',
627
- trigger: 'click',
628
- rootClose: true,
629
- content: i18nRuntime.i18n("01e7eb2256821085a14708d6ddf36814"),
630
- placement: 'left'
631
- }
632
- }, {
633
- type: 'divider'
634
- }, amisEditorCore.getSchemaTpl('switch', {
635
- name: 'keepItemSelectionOnPageChange',
636
- label: i18nRuntime.i18n("58ed0a7a5a91996dbb4c7d6dc7679364"),
637
- visbileOn: 'this.bulkActions && this.bulkActions.length || this.itemActions && this.itemActions.length',
638
- labelRemark: {
639
- className: 'm-l-xs',
640
- trigger: 'click',
641
- rootClose: true,
642
- content: i18nRuntime.i18n("36ac0011faae6f88ee0ec3e642328327"),
643
- placement: 'left'
644
- }
645
- }), {
646
- name: 'labelTpl',
647
- type: 'input-text',
648
- label: i18nRuntime.i18n("2a0b47ba76e886070c3bd6abeae3d1c0"),
649
- visibleOn: 'this.keepItemSelectionOnPageChange',
650
- labelRemark: {
651
- className: 'm-l-xs',
652
- trigger: 'click',
653
- rootClose: true,
654
- content: i18nRuntime.i18n("6ab3e5b6c5d5d2cf621e911226495433"),
655
- placement: 'left'
656
- }
657
- }, {
658
- name: 'primaryField',
659
- label: i18nRuntime.i18n("987b04af242bb2dafaf32d890ab952ff"),
660
- type: 'input-text',
661
- pipeIn: amisEditorCore.defaultValue('id'),
662
- description: i18nRuntime.i18n("a270e70be12fb13a24ca3e4ac70fa838")
663
538
  }]
664
- }, {
665
- title: i18nRuntime.i18n("54ea89b497ec3bb319c68844dfa3687f"),
666
- body: [amisEditorCore.getSchemaTpl('apiControl', {
667
- label: i18nRuntime.i18n("db7ee36de8063c2d5a6c123eac65641a"),
668
- sampleBuilder: function () {
669
- var _a, _b;
670
-
671
- var data = {
672
- items: [],
673
- total: 0
674
- };
675
- var columns = (_b = (_a = context === null || context === void 0 ? void 0 : context.schema) === null || _a === void 0 ? void 0 : _a.columns) !== null && _b !== void 0 ? _b : [];
676
- var row = {};
677
- columns.forEach(function (column) {
678
- if (column.name) {
679
- amisCore.setVariable(row, column.name, 'sample');
539
+ }
540
+ });
541
+ Object.defineProperty(_this, "oldFilter", {
542
+ enumerable: true,
543
+ configurable: true,
544
+ writable: true,
545
+ value: void 0
546
+ });
547
+ Object.defineProperty(_this, "panelTitle", {
548
+ enumerable: true,
549
+ configurable: true,
550
+ writable: true,
551
+ value: i18nRuntime.i18n("d7213304d1a8a02a73a2f4010839e061")
552
+ });
553
+ Object.defineProperty(_this, "panelBodyCreator", {
554
+ enumerable: true,
555
+ configurable: true,
556
+ writable: true,
557
+ value: function (context) {
558
+ _this.manager.store;
559
+ var id = context.id;
560
+ return amisEditorCore.getSchemaTpl('tabs', [{
561
+ title: i18nRuntime.i18n("22b777e6fcb613b8ba83ced9594cd07e"),
562
+ body: [amisEditorCore.getSchemaTpl('switch', {
563
+ name: 'filter',
564
+ label: i18nRuntime.i18n("07a88fae7dd11f87891af91fb54a74bb"),
565
+ visibleOn: 'data.api && data.api.url',
566
+ pipeIn: function (value) {
567
+ return !!value;
568
+ },
569
+ pipeOut: function (value, originValue) {
570
+ if (value) {
571
+ return _this.oldFilter || amisEditorCore.JSONPipeIn({
572
+ title: i18nRuntime.i18n("cf12e55021998a8328201800ec356773"),
573
+ body: [{
574
+ type: 'input-text',
575
+ name: 'keywords',
576
+ label: i18nRuntime.i18n("cfb5f18c43753ad5329348d626bd3739")
577
+ }]
578
+ });
579
+ } else {
580
+ _this.oldFilter = originValue;
680
581
  }
681
- });
682
- data.items.push(row);
683
- return JSON.stringify({
684
- status: 0,
685
- msg: '',
686
- data: data
687
- }, null, 2);
688
- }
689
- }), {
690
- name: 'initFetch',
691
- type: 'radios',
692
- label: i18nRuntime.i18n("0951dad1723aa1191ce1a2e96db76051"),
693
- pipeIn: function (value) {
694
- return typeof value == 'boolean' && value || typeof value !== 'boolean' && '';
695
- },
696
- inline: true,
697
- onChange: function () {},
698
- options: [{
699
- label: i18nRuntime.i18n("0a60ac8f02ccd2cf723f927284877851"),
700
- value: true
701
- }, {
702
- label: i18nRuntime.i18n("c9744f45e76d885ae1c74d4f4a934b2e"),
703
- value: false
704
- }, {
705
- label: i18nRuntime.i18n("a9400c408441f1f7f6d6954deb05ae9a"),
706
- value: ''
707
- }]
708
- }, {
709
- name: 'initFetch',
710
- autoComplete: false,
711
- visibleOn: 'typeof this.initFetch !== "boolean"',
712
- type: 'input-text',
713
- placeholder: i18nRuntime.i18n("55b22f5d136e73b26cef65aedd8ba86e"),
714
- className: 'm-t-n-sm'
715
- }, amisEditorCore.getSchemaTpl('switch', {
716
- name: 'loadDataOnce',
717
- label: i18nRuntime.i18n("bedc70d448b656d828bd3ed7926b3e4d"),
718
- labelRemark: {
719
- className: 'm-l-xs',
720
- trigger: 'click',
721
- rootClose: true,
722
- content: i18nRuntime.i18n("559fa334442f0f75b0343bbf38b7ff05"),
723
- placement: 'left'
724
- }
725
- }), amisEditorCore.getSchemaTpl('switch', {
726
- label: i18nRuntime.i18n("1af68c43e1780249f11b9de1eeaeb281"),
727
- name: 'interval',
728
- visibleOn: 'data.api',
729
- pipeIn: function (value) {
730
- return !!value;
731
- },
732
- pipeOut: function (value) {
733
- return value ? 3000 : undefined;
734
- }
735
- }), {
736
- name: 'interval',
737
- type: 'input-number',
738
- visibleOn: 'typeof data.interval === "number"',
739
- step: 500,
740
- className: 'm-t-n-sm',
741
- description: i18nRuntime.i18n("9800f1ce2f78a23b81c8d944ebf9cce9")
742
- }, amisEditorCore.getSchemaTpl('switch', {
743
- name: 'silentPolling',
744
- label: i18nRuntime.i18n("19c5410b23fba4bbfd1a58bbd5268c9b"),
745
- visibleOn: '!!data.interval',
746
- description: i18nRuntime.i18n("04f840b0772f4b5d59954a29a76f4e7b")
747
- }), {
748
- name: 'stopAutoRefreshWhen',
749
- label: i18nRuntime.i18n("6037dae99e9446deaed45f7e408f47ab"),
750
- type: 'input-text',
751
- visibleOn: '!!data.interval',
752
- description: i18nRuntime.i18n("32e3a79e80dcf7f7304e8092dd7acc6f")
753
- }, amisEditorCore.getSchemaTpl('switch', {
754
- name: 'stopAutoRefreshWhenModalIsOpen',
755
- label: i18nRuntime.i18n("154ef40e477c031f6c1ec15caefb570a"),
756
- visibleOn: '!!data.interval',
757
- description: i18nRuntime.i18n("50f7c85bf60a9f43522789644566c62b")
758
- }), {
759
- type: 'divider'
760
- }, amisEditorCore.getSchemaTpl('switch', {
761
- name: 'draggable',
762
- label: i18nRuntime.i18n("d8905a70e93a33c7a86240f467c653d4")
763
- }), amisEditorCore.getSchemaTpl('apiControl', {
764
- label: i18nRuntime.i18n("040a78b24eaff47d4fa7e266473635b4"),
765
- name: 'saveOrderApi',
766
- visibleOn: 'data.draggable'
767
- }), {
768
- type: 'divider'
769
- }, amisEditorCore.getSchemaTpl('apiControl', {
770
- label: i18nRuntime.i18n("ee850a0e326b217bdeb61d936c521177"),
771
- name: 'quickSaveApi',
772
- description: i18nRuntime.i18n("8343f619879fa79bc8ef1a35b2fc3e78")
773
- }), {
774
- type: 'divider'
775
- }, amisEditorCore.getSchemaTpl('apiControl', {
776
- label: i18nRuntime.i18n("d891e79d4a8718a7dbd47ac68aaaa5cb"),
777
- name: 'quickSaveItemApi',
778
- description: i18nRuntime.i18n("38db6e045e214ffcd03ede695002271c")
779
- }), {
780
- type: 'divider'
781
- }, {
782
- label: i18nRuntime.i18n("522110866c19dace2ce38336617405c2"),
783
- type: 'combo',
784
- name: 'messages',
785
- multiLine: true,
786
- description: i18nRuntime.i18n("3b69c2e540c05e9ca530ed30cf224472"),
787
- items: [{
788
- label: i18nRuntime.i18n("fb24383a41f23196349548b5d0cb98ce"),
789
- type: 'input-text',
790
- name: 'fetchSuccess'
791
- }, {
792
- label: i18nRuntime.i18n("62e3e15c8fb9038f2780329bc26e8bab"),
582
+ return null;
583
+ }
584
+ }), {
585
+ type: 'divider',
586
+ visibleOn: 'data.api && data.api.url'
587
+ }, amisEditorCore.getSchemaTpl('combo-container', {
588
+ label: i18nRuntime.i18n("7f7c624a843b0d539a4ea59a696702f9"),
589
+ name: 'bulkActions',
590
+ type: 'combo',
591
+ hiddenOn: 'data.pickerMode && data.multiple',
592
+ inputClassName: 'ae-BulkActions-control',
593
+ multiple: true,
594
+ draggable: true,
595
+ draggableTip: '',
596
+ scaffold: {
597
+ label: i18nRuntime.i18n("fa966345577ba81af19408f203db968f"),
598
+ type: 'button'
599
+ },
600
+ labelRemark: {
601
+ className: 'm-l-xs',
602
+ trigger: 'click',
603
+ rootClose: true,
604
+ content: i18nRuntime.i18n("46e6edaeb9968e7f7ab549d4f2f82d6d"),
605
+ placement: 'left'
606
+ },
607
+ items: [{
608
+ type: 'tpl',
609
+ tpl: '<span class="label label-success">${label}</span>',
610
+ columnClassName: 'p-t-xs'
611
+ }, {
612
+ columnClassName: 'p-t-xs col-edit',
613
+ children: function (_a) {
614
+ var index = _a.index;
615
+ return React__default["default"].createElement("button", {
616
+ onClick: _this.handleBulkActionEdit.bind(_this, id, index),
617
+ "data-tooltip": "\u4FEE\u6539",
618
+ "data-position": "bottom",
619
+ className: "text-muted"
620
+ }, React__default["default"].createElement("i", {
621
+ className: "fa fa-pencil"
622
+ }));
623
+ }
624
+ }]
625
+ }),
626
+ // getSchemaTpl('switch', {
627
+ // name: 'defaultChecked',
628
+ // label: '默认是否全部勾选',
629
+ // visibleOn: 'data.bulkActions && data.bulkActions.length',
630
+ // pipeIn: defaultValue(false)
631
+ // }),
632
+ {
633
+ type: 'divider'
634
+ }, amisEditorCore.getSchemaTpl('combo-container', {
635
+ label: i18nRuntime.i18n("f13a0697d58d975d14eb3f3c72c2cbf2"),
636
+ name: 'itemActions',
637
+ type: 'combo',
638
+ labelRemark: {
639
+ className: 'm-l-xs',
640
+ trigger: 'click',
641
+ rootClose: true,
642
+ content: i18nRuntime.i18n("3674ea51498e7118732e5e1c53d4bc80"),
643
+ placement: 'left'
644
+ },
645
+ hiddenOn: 'this.mode && this.mode !== "table" || this.pickerMode',
646
+ inputClassName: 'ae-BulkActions-control',
647
+ multiple: true,
648
+ draggable: true,
649
+ scaffold: {
650
+ label: i18nRuntime.i18n("fa966345577ba81af19408f203db968f"),
651
+ type: 'button'
652
+ },
653
+ items: [{
654
+ type: 'tpl',
655
+ tpl: '<span class="label label-success">${label}</span>',
656
+ columnClassName: 'p-t-xs'
657
+ }, {
658
+ type: 'checkbox',
659
+ className: 'text-xs',
660
+ option: i18nRuntime.i18n("4916771d080ddf6d0551de4d6d2f42a4"),
661
+ name: 'hiddenOnHover'
662
+ }, {
663
+ columnClassName: 'p-t-xs col-edit',
664
+ children: function (_a) {
665
+ var index = _a.index;
666
+ return React__default["default"].createElement("button", {
667
+ onClick: _this.handleItemActionEdit.bind(_this, id, index),
668
+ "data-tooltip": "\u4FEE\u6539",
669
+ "data-position": "bottom",
670
+ className: "text-muted"
671
+ }, React__default["default"].createElement("i", {
672
+ className: "fa fa-pencil"
673
+ }));
674
+ }
675
+ }]
676
+ }), {
677
+ type: 'divider',
678
+ hiddenOn: 'this.mode && this.mode !== "table" || this.pickerMode'
679
+ }, amisEditorCore.getSchemaTpl('switch', {
680
+ name: 'syncLocation',
681
+ label: i18nRuntime.i18n("569343b4fe5e48131b78611c11eadbeb"),
682
+ pipeIn: amisEditorCore.defaultValue(true),
683
+ labelRemark: {
684
+ className: 'm-l-xs',
685
+ trigger: 'click',
686
+ rootClose: true,
687
+ content: i18nRuntime.i18n("6dbee29a8c54eef9d042ef3280999ad9"),
688
+ placement: 'left'
689
+ }
690
+ }), amisEditorCore.getSchemaTpl('combo-container', {
691
+ label: i18nRuntime.i18n("2171d1b07d045e796cba4a05bcf7d13f"),
692
+ type: 'input-kv',
693
+ name: 'defaultParams',
694
+ labelRemark: {
695
+ className: 'm-l-xs',
696
+ trigger: 'click',
697
+ rootClose: true,
698
+ content: i18nRuntime.i18n("01e7eb2256821085a14708d6ddf36814"),
699
+ placement: 'left'
700
+ }
701
+ }), {
702
+ type: 'divider'
703
+ }, amisEditorCore.getSchemaTpl('switch', {
704
+ name: 'keepItemSelectionOnPageChange',
705
+ label: i18nRuntime.i18n("58ed0a7a5a91996dbb4c7d6dc7679364"),
706
+ visbileOn: 'this.bulkActions && this.bulkActions.length || this.itemActions && this.itemActions.length',
707
+ labelRemark: {
708
+ className: 'm-l-xs',
709
+ trigger: 'click',
710
+ rootClose: true,
711
+ content: i18nRuntime.i18n("36ac0011faae6f88ee0ec3e642328327"),
712
+ placement: 'left'
713
+ }
714
+ }), {
715
+ name: 'labelTpl',
793
716
  type: 'input-text',
794
- name: 'fetchFailed'
717
+ label: i18nRuntime.i18n("2a0b47ba76e886070c3bd6abeae3d1c0"),
718
+ visibleOn: 'this.keepItemSelectionOnPageChange',
719
+ labelRemark: {
720
+ className: 'm-l-xs',
721
+ trigger: 'click',
722
+ rootClose: true,
723
+ content: i18nRuntime.i18n("6ab3e5b6c5d5d2cf621e911226495433"),
724
+ placement: 'left'
725
+ }
795
726
  }, {
796
- label: i18nRuntime.i18n("c62a1b7f314be10aead10475e7543f6a"),
727
+ name: 'primaryField',
728
+ label: i18nRuntime.i18n("987b04af242bb2dafaf32d890ab952ff"),
797
729
  type: 'input-text',
798
- name: 'saveOrderSuccess'
730
+ pipeIn: amisEditorCore.defaultValue('id'),
731
+ description: i18nRuntime.i18n("a270e70be12fb13a24ca3e4ac70fa838")
732
+ }]
733
+ }, {
734
+ title: i18nRuntime.i18n("54ea89b497ec3bb319c68844dfa3687f"),
735
+ body: [amisEditorCore.getSchemaTpl('apiControl', {
736
+ label: i18nRuntime.i18n("db7ee36de8063c2d5a6c123eac65641a"),
737
+ sampleBuilder: function () {
738
+ var _a, _b;
739
+ var data = {
740
+ items: [],
741
+ total: 0
742
+ };
743
+ var columns = (_b = (_a = context === null || context === void 0 ? void 0 : context.schema) === null || _a === void 0 ? void 0 : _a.columns) !== null && _b !== void 0 ? _b : [];
744
+ var row = {};
745
+ columns.forEach(function (column) {
746
+ if (column.name) {
747
+ amisCore.setVariable(row, column.name, 'sample');
748
+ }
749
+ });
750
+ data.items.push(row);
751
+ return JSON.stringify({
752
+ status: 0,
753
+ msg: '',
754
+ data: data
755
+ }, null, 2);
756
+ }
757
+ }), {
758
+ name: 'initFetch',
759
+ type: 'radios',
760
+ label: i18nRuntime.i18n("0951dad1723aa1191ce1a2e96db76051"),
761
+ pipeIn: function (value) {
762
+ return typeof value == 'boolean' && value || typeof value !== 'boolean' && '';
763
+ },
764
+ inline: true,
765
+ onChange: function () {},
766
+ options: [{
767
+ label: i18nRuntime.i18n("0a60ac8f02ccd2cf723f927284877851"),
768
+ value: true
769
+ }, {
770
+ label: i18nRuntime.i18n("c9744f45e76d885ae1c74d4f4a934b2e"),
771
+ value: false
772
+ }, {
773
+ label: i18nRuntime.i18n("a9400c408441f1f7f6d6954deb05ae9a"),
774
+ value: ''
775
+ }]
799
776
  }, {
800
- label: i18nRuntime.i18n("c8035507b7a576d43e9f227c91c7a7b5"),
777
+ name: 'initFetch',
778
+ autoComplete: false,
779
+ visibleOn: 'typeof this.initFetch !== "boolean"',
801
780
  type: 'input-text',
802
- name: 'saveOrderFailed'
803
- }, {
804
- label: i18nRuntime.i18n("7cb0932b806559be232d2a69453224e7"),
781
+ placeholder: i18nRuntime.i18n("55b22f5d136e73b26cef65aedd8ba86e"),
782
+ className: 'm-t-n-sm'
783
+ }, amisEditorCore.getSchemaTpl('switch', {
784
+ name: 'loadDataOnce',
785
+ label: i18nRuntime.i18n("bedc70d448b656d828bd3ed7926b3e4d"),
786
+ labelRemark: {
787
+ className: 'm-l-xs',
788
+ trigger: 'click',
789
+ rootClose: true,
790
+ content: i18nRuntime.i18n("559fa334442f0f75b0343bbf38b7ff05"),
791
+ placement: 'left'
792
+ }
793
+ }), amisEditorCore.getSchemaTpl('switch', {
794
+ label: i18nRuntime.i18n("1af68c43e1780249f11b9de1eeaeb281"),
795
+ name: 'interval',
796
+ visibleOn: 'data.api',
797
+ pipeIn: function (value) {
798
+ return !!value;
799
+ },
800
+ pipeOut: function (value) {
801
+ return value ? 3000 : undefined;
802
+ }
803
+ }), {
804
+ name: 'interval',
805
+ type: 'input-number',
806
+ visibleOn: 'typeof data.interval === "number"',
807
+ step: 500,
808
+ className: 'm-t-n-sm',
809
+ description: i18nRuntime.i18n("9800f1ce2f78a23b81c8d944ebf9cce9")
810
+ }, amisEditorCore.getSchemaTpl('switch', {
811
+ name: 'silentPolling',
812
+ label: i18nRuntime.i18n("19c5410b23fba4bbfd1a58bbd5268c9b"),
813
+ visibleOn: '!!data.interval',
814
+ description: i18nRuntime.i18n("04f840b0772f4b5d59954a29a76f4e7b")
815
+ }), {
816
+ name: 'stopAutoRefreshWhen',
817
+ label: i18nRuntime.i18n("6037dae99e9446deaed45f7e408f47ab"),
805
818
  type: 'input-text',
806
- name: 'quickSaveSuccess'
819
+ visibleOn: '!!data.interval',
820
+ description: i18nRuntime.i18n("32e3a79e80dcf7f7304e8092dd7acc6f")
821
+ }, amisEditorCore.getSchemaTpl('switch', {
822
+ name: 'stopAutoRefreshWhenModalIsOpen',
823
+ label: i18nRuntime.i18n("154ef40e477c031f6c1ec15caefb570a"),
824
+ visibleOn: '!!data.interval',
825
+ description: i18nRuntime.i18n("50f7c85bf60a9f43522789644566c62b")
826
+ }), {
827
+ type: 'divider'
828
+ }, amisEditorCore.getSchemaTpl('switch', {
829
+ name: 'draggable',
830
+ label: i18nRuntime.i18n("d8905a70e93a33c7a86240f467c653d4")
831
+ }), amisEditorCore.getSchemaTpl('apiControl', {
832
+ label: i18nRuntime.i18n("040a78b24eaff47d4fa7e266473635b4"),
833
+ name: 'saveOrderApi',
834
+ visibleOn: 'data.draggable'
835
+ }), {
836
+ type: 'divider'
837
+ }, amisEditorCore.getSchemaTpl('apiControl', {
838
+ label: i18nRuntime.i18n("ee850a0e326b217bdeb61d936c521177"),
839
+ name: 'quickSaveApi',
840
+ description: i18nRuntime.i18n("8343f619879fa79bc8ef1a35b2fc3e78")
841
+ }), {
842
+ type: 'divider'
843
+ }, amisEditorCore.getSchemaTpl('apiControl', {
844
+ label: i18nRuntime.i18n("d891e79d4a8718a7dbd47ac68aaaa5cb"),
845
+ name: 'quickSaveItemApi',
846
+ description: i18nRuntime.i18n("38db6e045e214ffcd03ede695002271c")
847
+ }), {
848
+ type: 'divider'
807
849
  }, {
808
- label: i18nRuntime.i18n("fd79a193a487b8c9d5a302d0d88c1c2c"),
809
- type: 'input-text',
810
- name: 'quickSaveFailed'
850
+ label: i18nRuntime.i18n("522110866c19dace2ce38336617405c2"),
851
+ type: 'combo',
852
+ name: 'messages',
853
+ multiLine: true,
854
+ description: i18nRuntime.i18n("3b69c2e540c05e9ca530ed30cf224472"),
855
+ items: [{
856
+ label: i18nRuntime.i18n("fb24383a41f23196349548b5d0cb98ce"),
857
+ type: 'input-text',
858
+ name: 'fetchSuccess'
859
+ }, {
860
+ label: i18nRuntime.i18n("62e3e15c8fb9038f2780329bc26e8bab"),
861
+ type: 'input-text',
862
+ name: 'fetchFailed'
863
+ }, {
864
+ label: i18nRuntime.i18n("c62a1b7f314be10aead10475e7543f6a"),
865
+ type: 'input-text',
866
+ name: 'saveOrderSuccess'
867
+ }, {
868
+ label: i18nRuntime.i18n("c8035507b7a576d43e9f227c91c7a7b5"),
869
+ type: 'input-text',
870
+ name: 'saveOrderFailed'
871
+ }, {
872
+ label: i18nRuntime.i18n("7cb0932b806559be232d2a69453224e7"),
873
+ type: 'input-text',
874
+ name: 'quickSaveSuccess'
875
+ }, {
876
+ label: i18nRuntime.i18n("fd79a193a487b8c9d5a302d0d88c1c2c"),
877
+ type: 'input-text',
878
+ name: 'quickSaveFailed'
879
+ }]
811
880
  }]
812
- }]
813
- }, {
814
- title: i18nRuntime.i18n("afcde2611bdd13c1e65b4fb6a2f13425"),
815
- body: [{
816
- label: i18nRuntime.i18n("ff57a3bf69a1065707e77c18c51f7bbb"),
817
- name: 'mode',
818
- type: 'button-group-select',
819
- size: 'xs',
820
- pipeIn: function (value, values) {
821
- var _a;
822
-
823
- return (_a = value === 'grid' ? 'cards' : value) !== null && _a !== void 0 ? _a : 'table';
824
- },
825
- onChange: function (value, oldValue, model, form) {
826
- var _a, _b, _c, _d, _e;
827
-
828
- var headerHasColumnsToggle = (_b = (_a = form === null || form === void 0 ? void 0 : form.data) === null || _a === void 0 ? void 0 : _a.headerToolbar) === null || _b === void 0 ? void 0 : _b.some(function (item) {
829
- return item.type === 'columns-toggler';
830
- });
831
- var headerToolbar = cloneDeep__default["default"]((_c = form === null || form === void 0 ? void 0 : form.data) === null || _c === void 0 ? void 0 : _c.headerToolbar);
832
- var columnsToggler;
833
-
834
- if (value !== 'table' && oldValue === 'table') {
835
- // 存储table模式是否有 columns-toggler
836
- columnsToggler = (headerToolbar === null || headerToolbar === void 0 ? void 0 : headerToolbar.find(function (item) {
881
+ }, {
882
+ title: i18nRuntime.i18n("afcde2611bdd13c1e65b4fb6a2f13425"),
883
+ body: [{
884
+ label: i18nRuntime.i18n("ff57a3bf69a1065707e77c18c51f7bbb"),
885
+ name: 'mode',
886
+ type: 'button-group-select',
887
+ size: 'xs',
888
+ pipeIn: function (value, values) {
889
+ var _a;
890
+ return (_a = value === 'grid' ? 'cards' : value) !== null && _a !== void 0 ? _a : 'table';
891
+ },
892
+ onChange: function (value, oldValue, model, form) {
893
+ var _a, _b, _c, _d, _e;
894
+ var headerHasColumnsToggle = (_b = (_a = form === null || form === void 0 ? void 0 : form.data) === null || _a === void 0 ? void 0 : _a.headerToolbar) === null || _b === void 0 ? void 0 : _b.some(function (item) {
837
895
  return item.type === 'columns-toggler';
838
- })) || {
839
- type: 'columns-toggler',
840
- align: 'right'
841
- };
842
- form.setValues({
843
- __headerHasColumnsToggler: headerHasColumnsToggle
844
896
  });
845
- }
846
-
847
- headerToolbar = value === 'table' ? headerToolbar : headerToolbar === null || headerToolbar === void 0 ? void 0 : headerToolbar.filter(function (item) {
848
- return item.type !== 'columns-toggler';
849
- });
850
-
851
- if (value === 'table') {
852
- if (((_d = form === null || form === void 0 ? void 0 : form.data) === null || _d === void 0 ? void 0 : _d.__headerHasColumnsToggler) && !headerHasColumnsToggle) {
853
- headerToolbar === null || headerToolbar === void 0 ? void 0 : headerToolbar.push(((_e = form === null || form === void 0 ? void 0 : form.data) === null || _e === void 0 ? void 0 : _e.__cacheColumnsToggler) || {
897
+ var headerToolbar = cloneDeep__default["default"]((_c = form === null || form === void 0 ? void 0 : form.data) === null || _c === void 0 ? void 0 : _c.headerToolbar);
898
+ var columnsToggler;
899
+ if (value !== 'table' && oldValue === 'table') {
900
+ // 存储table模式是否有 columns-toggler
901
+ columnsToggler = (headerToolbar === null || headerToolbar === void 0 ? void 0 : headerToolbar.find(function (item) {
902
+ return item.type === 'columns-toggler';
903
+ })) || {
854
904
  type: 'columns-toggler',
855
905
  align: 'right'
906
+ };
907
+ form.setValues({
908
+ __headerHasColumnsToggler: headerHasColumnsToggle
856
909
  });
857
910
  }
858
-
859
- form.setValues({
860
- headerToolbar: headerToolbar,
861
- columns: form.data.__columns || [{
862
- label: 'ID',
863
- name: 'id'
864
- }, {
865
- label: i18nRuntime.i18n("20aadc3f9b7edb564dc58898898e0dc8"),
866
- name: 'name'
867
- }],
868
- __headerHasColumnsToggler: headerHasColumnsToggle,
869
- __card: form.data.card || form.data.__card,
870
- __listItem: form.data.listItem || form.data.__listItem
911
+ headerToolbar = value === 'table' ? headerToolbar : headerToolbar === null || headerToolbar === void 0 ? void 0 : headerToolbar.filter(function (item) {
912
+ return item.type !== 'columns-toggler';
871
913
  });
872
- form.deleteValueByName('card');
873
- form.deleteValueByName('listItem');
874
- } else if (value === 'cards') {
875
- oldValue === 'table' && form.setValues({
876
- __cacheColumnsToggler: columnsToggler
877
- });
878
- form.setValues({
879
- headerToolbar: headerToolbar,
880
- card: form.data.__card || {
881
- type: 'card',
882
- header: {
883
- title: i18nRuntime.i18n("32c65d8d7431e76029678ec7bb73a5ab"),
884
- subTitle: i18nRuntime.i18n("72cf373be86a38b29f6d2f15900b0da1")
885
- },
886
- body: [{
887
- name: 'a',
888
- label: 'A'
914
+ if (value === 'table') {
915
+ if (((_d = form === null || form === void 0 ? void 0 : form.data) === null || _d === void 0 ? void 0 : _d.__headerHasColumnsToggler) && !headerHasColumnsToggle) {
916
+ headerToolbar === null || headerToolbar === void 0 ? void 0 : headerToolbar.push(((_e = form === null || form === void 0 ? void 0 : form.data) === null || _e === void 0 ? void 0 : _e.__cacheColumnsToggler) || {
917
+ type: 'columns-toggler',
918
+ align: 'right'
919
+ });
920
+ }
921
+ form.setValues({
922
+ headerToolbar: headerToolbar,
923
+ columns: form.data.__columns || [{
924
+ label: 'ID',
925
+ name: 'id'
889
926
  }, {
890
- name: 'b',
891
- label: 'B'
892
- }],
893
- actions: [{
894
- label: i18nRuntime.i18n("f26225bde6a250894a04db4c53ea03d0"),
895
- type: 'button'
896
- }]
897
- },
898
- __columns: form.data.columns || form.data.__columns,
899
- __listItem: form.data.listItem || form.data.__listItem
900
- });
901
- form.deleteValueByName('columns');
902
- form.deleteValueByName('listItem');
903
- } else {
904
- oldValue === 'table' && form.setValues({
905
- __cacheColumnsToggler: columnsToggler
906
- });
907
- form.setValues({
908
- headerToolbar: headerToolbar,
909
- listItem: form.data.__listItem || {
910
- body: [{
911
- type: 'tpl',
912
- tpl: i18nRuntime.i18n("3bb4d608c6bee2b7b6d788417cde04e3")
927
+ label: i18nRuntime.i18n("20aadc3f9b7edb564dc58898898e0dc8"),
928
+ name: 'name'
913
929
  }],
914
- actions: [{
915
- icon: 'fa fa-eye',
916
- type: 'button'
917
- }]
918
- },
919
- __columns: form.data.columns || form.data.__columns,
920
- __card: form.data.card || form.data.__card
921
- });
922
- form.deleteValueByName('columns');
923
- form.deleteValueByName('card');
924
- }
925
- },
926
- options: [{
927
- value: 'table',
928
- label: i18nRuntime.i18n("b339aa87104709397ba68e7ebbc6e5ba")
929
- }, {
930
- value: 'cards',
931
- label: i18nRuntime.i18n("d87f215d9ac688b1d3399bf575a0ef6f")
932
- }, {
933
- value: 'list',
934
- label: i18nRuntime.i18n("3712972d84adf48acbd6ad24b4d75ad0")
935
- }]
936
- }, {
937
- name: 'headerToolbar',
938
- type: 'combo',
939
- draggable: true,
940
- draggableTip: '',
941
- descrition: i18nRuntime.i18n("e4fd8d64804a4f3d743eff384a6eb20a"),
942
- label: i18nRuntime.i18n("14555503d6e09ecd66661d04c882e79b"),
943
- pipeIn: function (value) {
944
- if (!Array.isArray(value)) {
945
- value = value ? [value] : ['bulkActions'];
946
- }
947
-
948
- return value.map(function (item) {
949
- var type = item.type;
950
-
951
- if (typeof item === 'string' && ~['bulkActions', 'bulk-actions', 'pagination', 'statistics', 'switch-per-page', 'filter-toggler', 'load-more', 'export-csv', 'export-excel'].indexOf(item)) {
952
- type = item === 'bulkActions' ? 'bulk-actions' : item;
953
- item = {
954
- type: type
955
- };
956
- } else if (typeof item === 'string') {
957
- type = 'tpl';
958
- item = typeof item === 'string' ? {
959
- type: 'tpl',
960
- tpl: item
961
- } : item;
930
+ __headerHasColumnsToggler: headerHasColumnsToggle,
931
+ __card: form.data.card || form.data.__card,
932
+ __listItem: form.data.listItem || form.data.__listItem
933
+ });
934
+ form.deleteValueByName('card');
935
+ form.deleteValueByName('listItem');
936
+ } else if (value === 'cards') {
937
+ oldValue === 'table' && form.setValues({
938
+ __cacheColumnsToggler: columnsToggler
939
+ });
940
+ form.setValues({
941
+ headerToolbar: headerToolbar,
942
+ card: form.data.__card || {
943
+ type: 'card',
944
+ header: {
945
+ title: i18nRuntime.i18n("32c65d8d7431e76029678ec7bb73a5ab"),
946
+ subTitle: i18nRuntime.i18n("72cf373be86a38b29f6d2f15900b0da1")
947
+ },
948
+ body: [{
949
+ name: 'a',
950
+ label: 'A'
951
+ }, {
952
+ name: 'b',
953
+ label: 'B'
954
+ }],
955
+ actions: [{
956
+ label: i18nRuntime.i18n("f26225bde6a250894a04db4c53ea03d0"),
957
+ type: 'button'
958
+ }]
959
+ },
960
+ __columns: form.data.columns || form.data.__columns,
961
+ __listItem: form.data.listItem || form.data.__listItem
962
+ });
963
+ form.deleteValueByName('columns');
964
+ form.deleteValueByName('listItem');
965
+ } else {
966
+ oldValue === 'table' && form.setValues({
967
+ __cacheColumnsToggler: columnsToggler
968
+ });
969
+ form.setValues({
970
+ headerToolbar: headerToolbar,
971
+ listItem: form.data.__listItem || {
972
+ body: [{
973
+ type: 'tpl',
974
+ tpl: i18nRuntime.i18n("3bb4d608c6bee2b7b6d788417cde04e3")
975
+ }],
976
+ actions: [{
977
+ icon: 'fa fa-eye',
978
+ type: 'button'
979
+ }]
980
+ },
981
+ __columns: form.data.columns || form.data.__columns,
982
+ __card: form.data.card || form.data.__card
983
+ });
984
+ form.deleteValueByName('columns');
985
+ form.deleteValueByName('card');
962
986
  }
963
-
964
- return tslib.__assign({
965
- type: type
966
- }, item);
967
- });
968
- },
969
- pipeOut: function (value) {
970
- if (Array.isArray(value)) {
971
- return value.map(function (item) {
972
- if (item.type === 'button') {
973
- return amisEditorCore.JSONPipeIn(tslib.__assign({
974
- label: i18nRuntime.i18n("fa966345577ba81af19408f203db968f"),
975
- type: 'button'
976
- }, item));
977
- } else if (item.type === 'tpl') {
978
- return amisEditorCore.JSONPipeIn(tslib.__assign({
979
- type: 'tpl',
980
- tpl: i18nRuntime.i18n("2d711b09bd0db0ad240cc83b30dd8014")
981
- }, item));
982
- }
983
-
984
- return item;
985
- });
986
- }
987
-
988
- return [];
989
- },
990
- scaffold: {
991
- type: 'tpl',
992
- tpl: i18nRuntime.i18n("2d711b09bd0db0ad240cc83b30dd8014")
993
- },
994
- multiple: true,
995
- items: [{
996
- type: 'select',
997
- name: 'type',
998
- columnClassName: 'w-ssm',
987
+ },
999
988
  options: [{
1000
- value: 'bulk-actions',
1001
- label: i18nRuntime.i18n("8abc564260a1564521e0c3a1d5419b4a")
1002
- }, {
1003
- value: 'pagination',
1004
- label: i18nRuntime.i18n("3862626c138ce5945e0e273a1bdfbad0")
1005
- }, {
1006
- value: 'statistics',
1007
- label: i18nRuntime.i18n("439a19857be1fb8d3e6017258e32c486")
1008
- }, {
1009
- value: 'switch-per-page',
1010
- label: i18nRuntime.i18n("bc908986a4e4eec3dca3530afd1d4306")
989
+ value: 'table',
990
+ label: i18nRuntime.i18n("b339aa87104709397ba68e7ebbc6e5ba")
1011
991
  }, {
1012
- value: 'load-more',
1013
- label: i18nRuntime.i18n("77281549955309c49f5eef77838a85e5")
992
+ value: 'cards',
993
+ label: i18nRuntime.i18n("d87f215d9ac688b1d3399bf575a0ef6f")
1014
994
  }, {
1015
- value: 'export-csv',
1016
- label: i18nRuntime.i18n("1add12ff3338a990b60154b75019c348")
1017
- }, {
1018
- value: 'export-excel',
1019
- label: i18nRuntime.i18n("7d57852b946d9d4d64fb2a48ca2b4a44")
1020
- }, {
1021
- value: 'columns-toggler',
1022
- label: i18nRuntime.i18n("16c6099bc0efaa669d8de698c105e333"),
1023
- visibleOn: '!this.mode || this.mode === "table"'
1024
- }, {
1025
- value: 'filter-toggler',
1026
- label: i18nRuntime.i18n("073694928db5b0b5423ebe095ec62d39")
1027
- }, {
1028
- value: 'drag-toggler',
1029
- label: i18nRuntime.i18n("5b9c3e6ce478196f802722cb09d61f0b")
1030
- }, {
1031
- value: 'check-all',
1032
- label: i18nRuntime.i18n("66eeacd93a7c1bda93906fe908ad11a0"),
1033
- hiddenOn: '!this.mode || this.mode === "table"'
1034
- }, {
1035
- value: 'tpl',
1036
- label: i18nRuntime.i18n("97d07614380da93d257f9fbf81aa56fb")
1037
- }, {
1038
- value: 'button',
1039
- label: i18nRuntime.i18n("fa966345577ba81af19408f203db968f")
995
+ value: 'list',
996
+ label: i18nRuntime.i18n("3712972d84adf48acbd6ad24b4d75ad0")
1040
997
  }]
1041
- }, {
1042
- name: 'align',
1043
- placeholder: i18nRuntime.i18n("d5bc35360607472de4525358af126de4"),
1044
- type: 'select',
1045
- size: 'xs',
1046
- options: [{
1047
- label: i18nRuntime.i18n("413f48cc71f71083ce532a86e3efdc21"),
1048
- value: 'left'
998
+ }, amisEditorCore.getSchemaTpl('combo-container', {
999
+ name: 'headerToolbar',
1000
+ type: 'combo',
1001
+ draggable: true,
1002
+ draggableTip: '',
1003
+ descrition: i18nRuntime.i18n("e4fd8d64804a4f3d743eff384a6eb20a"),
1004
+ label: i18nRuntime.i18n("14555503d6e09ecd66661d04c882e79b"),
1005
+ pipeIn: function (value) {
1006
+ if (!Array.isArray(value)) {
1007
+ value = value ? [value] : ['bulkActions'];
1008
+ }
1009
+ return value.map(function (item) {
1010
+ var type = item.type;
1011
+ if (typeof item === 'string' && ~['bulkActions', 'bulk-actions', 'pagination', 'statistics', 'switch-per-page', 'filter-toggler', 'load-more', 'export-csv', 'export-excel'].indexOf(item)) {
1012
+ type = item === 'bulkActions' ? 'bulk-actions' : item;
1013
+ item = {
1014
+ type: type
1015
+ };
1016
+ } else if (typeof item === 'string') {
1017
+ type = 'tpl';
1018
+ item = typeof item === 'string' ? {
1019
+ type: 'tpl',
1020
+ tpl: item
1021
+ } : item;
1022
+ }
1023
+ return tslib.__assign({
1024
+ type: type
1025
+ }, item);
1026
+ });
1027
+ },
1028
+ pipeOut: function (value) {
1029
+ if (Array.isArray(value)) {
1030
+ return value.map(function (item) {
1031
+ if (item.type === 'button') {
1032
+ return amisEditorCore.JSONPipeIn(tslib.__assign({
1033
+ label: i18nRuntime.i18n("fa966345577ba81af19408f203db968f"),
1034
+ type: 'button'
1035
+ }, item));
1036
+ } else if (item.type === 'tpl') {
1037
+ return amisEditorCore.JSONPipeIn(tslib.__assign({
1038
+ type: 'tpl',
1039
+ tpl: i18nRuntime.i18n("2d711b09bd0db0ad240cc83b30dd8014")
1040
+ }, item));
1041
+ }
1042
+ return item;
1043
+ });
1044
+ }
1045
+ return [];
1046
+ },
1047
+ scaffold: {
1048
+ type: 'tpl',
1049
+ tpl: i18nRuntime.i18n("2d711b09bd0db0ad240cc83b30dd8014")
1050
+ },
1051
+ multiple: true,
1052
+ items: [{
1053
+ type: 'select',
1054
+ name: 'type',
1055
+ columnClassName: 'w-ssm',
1056
+ options: [{
1057
+ value: 'bulk-actions',
1058
+ label: i18nRuntime.i18n("8abc564260a1564521e0c3a1d5419b4a")
1059
+ }, {
1060
+ value: 'pagination',
1061
+ label: i18nRuntime.i18n("3862626c138ce5945e0e273a1bdfbad0")
1062
+ }, {
1063
+ value: 'statistics',
1064
+ label: i18nRuntime.i18n("439a19857be1fb8d3e6017258e32c486")
1065
+ }, {
1066
+ value: 'switch-per-page',
1067
+ label: i18nRuntime.i18n("bc908986a4e4eec3dca3530afd1d4306")
1068
+ }, {
1069
+ value: 'load-more',
1070
+ label: i18nRuntime.i18n("77281549955309c49f5eef77838a85e5")
1071
+ }, {
1072
+ value: 'export-csv',
1073
+ label: i18nRuntime.i18n("1add12ff3338a990b60154b75019c348")
1074
+ }, {
1075
+ value: 'export-excel',
1076
+ label: i18nRuntime.i18n("7d57852b946d9d4d64fb2a48ca2b4a44")
1077
+ }, {
1078
+ value: 'columns-toggler',
1079
+ label: i18nRuntime.i18n("16c6099bc0efaa669d8de698c105e333"),
1080
+ visibleOn: '!this.mode || this.mode === "table"'
1081
+ }, {
1082
+ value: 'filter-toggler',
1083
+ label: i18nRuntime.i18n("073694928db5b0b5423ebe095ec62d39")
1084
+ }, {
1085
+ value: 'drag-toggler',
1086
+ label: i18nRuntime.i18n("5b9c3e6ce478196f802722cb09d61f0b")
1087
+ }, {
1088
+ value: 'check-all',
1089
+ label: i18nRuntime.i18n("66eeacd93a7c1bda93906fe908ad11a0"),
1090
+ hiddenOn: '!this.mode || this.mode === "table"'
1091
+ }, {
1092
+ value: 'tpl',
1093
+ label: i18nRuntime.i18n("97d07614380da93d257f9fbf81aa56fb")
1094
+ }, {
1095
+ value: 'button',
1096
+ label: i18nRuntime.i18n("fa966345577ba81af19408f203db968f")
1097
+ }]
1049
1098
  }, {
1050
- label: i18nRuntime.i18n("fd8e9572cc6bf87653c4d8f8b8dd0db9"),
1051
- value: 'right'
1052
- }]
1053
- } // {
1054
- // type: 'remark',
1055
- // content: '详情请在预览区域选中后进行编辑。',
1056
- // trigger: ['click'],
1057
- // rootClose: true,
1058
- // placement: 'left',
1059
- // visibleOn:
1060
- // '!~["bulkActions", "drag-toggler", "check-all", "bulk-actions", "pagination", "statistics", "switch-per-page", "filter-toggler", "load-more"].indexOf(this.type)',
1061
- // columnClassName: 'no-grow w-3x p-t-xs',
1062
- // className: 'm-l-none'
1063
- // }
1064
- ]
1065
- }, {
1066
- name: 'footerToolbar',
1067
- type: 'combo',
1068
- draggable: true,
1069
- draggableTip: '',
1070
- descrition: i18nRuntime.i18n("e4fd8d64804a4f3d743eff384a6eb20a"),
1071
- label: i18nRuntime.i18n("1325969c143a639294c1c6ab370b35a3"),
1072
- pipeIn: function (value) {
1073
- if (!Array.isArray(value)) {
1074
- value = value ? [value] : ['statistics', 'pagination'];
1099
+ name: 'align',
1100
+ placeholder: i18nRuntime.i18n("d5bc35360607472de4525358af126de4"),
1101
+ type: 'select',
1102
+ size: 'xs',
1103
+ options: [{
1104
+ label: i18nRuntime.i18n("413f48cc71f71083ce532a86e3efdc21"),
1105
+ value: 'left'
1106
+ }, {
1107
+ label: i18nRuntime.i18n("fd8e9572cc6bf87653c4d8f8b8dd0db9"),
1108
+ value: 'right'
1109
+ }]
1075
1110
  }
1076
-
1077
- return value.map(function (item) {
1078
- var type = item.type;
1079
-
1080
- if (typeof item === 'string' && ~['bulkActions', 'bulk-actions', 'pagination', 'statistics', 'switch-per-page', 'filter-toggler', 'load-more', 'export-csv', 'export-excel'].indexOf(item)) {
1081
- type = item === 'bulkActions' ? 'bulk-actions' : item;
1082
- item = {
1083
- type: type
1084
- };
1085
- } else if (typeof item === 'string') {
1086
- type = 'tpl';
1087
- item = typeof item === 'string' ? {
1088
- type: 'tpl',
1089
- tpl: item
1090
- } : item;
1111
+ // {
1112
+ // type: 'remark',
1113
+ // content: '详情请在预览区域选中后进行编辑。',
1114
+ // trigger: ['click'],
1115
+ // rootClose: true,
1116
+ // placement: 'left',
1117
+ // visibleOn:
1118
+ // '!~["bulkActions", "drag-toggler", "check-all", "bulk-actions", "pagination", "statistics", "switch-per-page", "filter-toggler", "load-more"].indexOf(this.type)',
1119
+ // columnClassName: 'no-grow w-3x p-t-xs',
1120
+ // className: 'm-l-none'
1121
+ // }
1122
+ ]
1123
+ }), amisEditorCore.getSchemaTpl('combo-container', {
1124
+ name: 'footerToolbar',
1125
+ type: 'combo',
1126
+ draggable: true,
1127
+ draggableTip: '',
1128
+ descrition: i18nRuntime.i18n("e4fd8d64804a4f3d743eff384a6eb20a"),
1129
+ label: i18nRuntime.i18n("1325969c143a639294c1c6ab370b35a3"),
1130
+ pipeIn: function (value) {
1131
+ if (!Array.isArray(value)) {
1132
+ value = value ? [value] : ['statistics', 'pagination'];
1091
1133
  }
1092
-
1093
- return tslib.__assign({
1094
- type: type
1095
- }, item);
1096
- });
1097
- },
1098
- pipeOut: function (value) {
1099
- if (Array.isArray(value)) {
1100
1134
  return value.map(function (item) {
1101
- if (item.type === 'button') {
1102
- return amisEditorCore.JSONPipeIn(tslib.__assign({
1103
- label: i18nRuntime.i18n("fa966345577ba81af19408f203db968f"),
1104
- type: 'button'
1105
- }, item));
1106
- } else if (item.type === 'tpl') {
1107
- return amisEditorCore.JSONPipeIn(tslib.__assign({
1135
+ var type = item.type;
1136
+ if (typeof item === 'string' && ~['bulkActions', 'bulk-actions', 'pagination', 'statistics', 'switch-per-page', 'filter-toggler', 'load-more', 'export-csv', 'export-excel'].indexOf(item)) {
1137
+ type = item === 'bulkActions' ? 'bulk-actions' : item;
1138
+ item = {
1139
+ type: type
1140
+ };
1141
+ } else if (typeof item === 'string') {
1142
+ type = 'tpl';
1143
+ item = typeof item === 'string' ? {
1108
1144
  type: 'tpl',
1109
- tpl: i18nRuntime.i18n("2d711b09bd0db0ad240cc83b30dd8014")
1110
- }, item));
1145
+ tpl: item
1146
+ } : item;
1111
1147
  }
1112
-
1113
- return item;
1148
+ return tslib.__assign({
1149
+ type: type
1150
+ }, item);
1114
1151
  });
1115
- }
1116
-
1117
- return [];
1118
- },
1119
- scaffold: {
1120
- type: 'tpl',
1121
- tpl: i18nRuntime.i18n("2d711b09bd0db0ad240cc83b30dd8014")
1122
- },
1123
- multiple: true,
1124
- items: [{
1125
- type: 'select',
1126
- name: 'type',
1127
- columnClassName: 'w-ssm',
1128
- options: [{
1129
- value: 'bulk-actions',
1130
- label: i18nRuntime.i18n("8abc564260a1564521e0c3a1d5419b4a")
1131
- }, {
1132
- value: 'pagination',
1133
- label: i18nRuntime.i18n("3862626c138ce5945e0e273a1bdfbad0")
1134
- }, {
1135
- value: 'statistics',
1136
- label: i18nRuntime.i18n("439a19857be1fb8d3e6017258e32c486")
1137
- }, {
1138
- value: 'switch-per-page',
1139
- label: i18nRuntime.i18n("bc908986a4e4eec3dca3530afd1d4306")
1140
- }, {
1141
- value: 'load-more',
1142
- label: i18nRuntime.i18n("77281549955309c49f5eef77838a85e5")
1143
- }, {
1144
- value: 'export-csv',
1145
- label: i18nRuntime.i18n("1add12ff3338a990b60154b75019c348")
1146
- }, {
1147
- value: 'export-excel',
1148
- label: i18nRuntime.i18n("7d57852b946d9d4d64fb2a48ca2b4a44")
1149
- }, {
1150
- value: 'columns-toggler',
1151
- label: i18nRuntime.i18n("16c6099bc0efaa669d8de698c105e333"),
1152
- hiddenOn: '["grid", "cards", "list"].indexOf(this.mode)'
1153
- }, {
1154
- value: 'filter-toggler',
1155
- label: i18nRuntime.i18n("073694928db5b0b5423ebe095ec62d39")
1156
- }, {
1157
- value: 'drag-toggler',
1158
- label: i18nRuntime.i18n("5b9c3e6ce478196f802722cb09d61f0b")
1159
- }, {
1160
- value: 'check-all',
1161
- label: i18nRuntime.i18n("66eeacd93a7c1bda93906fe908ad11a0"),
1162
- hiddenOn: '!this.mode || this.mode === "table"'
1163
- }, {
1164
- value: 'tpl',
1165
- label: i18nRuntime.i18n("97d07614380da93d257f9fbf81aa56fb")
1152
+ },
1153
+ pipeOut: function (value) {
1154
+ if (Array.isArray(value)) {
1155
+ return value.map(function (item) {
1156
+ if (item.type === 'button') {
1157
+ return amisEditorCore.JSONPipeIn(tslib.__assign({
1158
+ label: i18nRuntime.i18n("fa966345577ba81af19408f203db968f"),
1159
+ type: 'button'
1160
+ }, item));
1161
+ } else if (item.type === 'tpl') {
1162
+ return amisEditorCore.JSONPipeIn(tslib.__assign({
1163
+ type: 'tpl',
1164
+ tpl: i18nRuntime.i18n("2d711b09bd0db0ad240cc83b30dd8014")
1165
+ }, item));
1166
+ }
1167
+ return item;
1168
+ });
1169
+ }
1170
+ return [];
1171
+ },
1172
+ scaffold: {
1173
+ type: 'tpl',
1174
+ tpl: i18nRuntime.i18n("2d711b09bd0db0ad240cc83b30dd8014")
1175
+ },
1176
+ multiple: true,
1177
+ items: [{
1178
+ type: 'select',
1179
+ name: 'type',
1180
+ columnClassName: 'w-ssm',
1181
+ options: [{
1182
+ value: 'bulk-actions',
1183
+ label: i18nRuntime.i18n("8abc564260a1564521e0c3a1d5419b4a")
1184
+ }, {
1185
+ value: 'pagination',
1186
+ label: i18nRuntime.i18n("3862626c138ce5945e0e273a1bdfbad0")
1187
+ }, {
1188
+ value: 'statistics',
1189
+ label: i18nRuntime.i18n("439a19857be1fb8d3e6017258e32c486")
1190
+ }, {
1191
+ value: 'switch-per-page',
1192
+ label: i18nRuntime.i18n("bc908986a4e4eec3dca3530afd1d4306")
1193
+ }, {
1194
+ value: 'load-more',
1195
+ label: i18nRuntime.i18n("77281549955309c49f5eef77838a85e5")
1196
+ }, {
1197
+ value: 'export-csv',
1198
+ label: i18nRuntime.i18n("1add12ff3338a990b60154b75019c348")
1199
+ }, {
1200
+ value: 'export-excel',
1201
+ label: i18nRuntime.i18n("7d57852b946d9d4d64fb2a48ca2b4a44")
1202
+ }, {
1203
+ value: 'columns-toggler',
1204
+ label: i18nRuntime.i18n("16c6099bc0efaa669d8de698c105e333"),
1205
+ hiddenOn: '["grid", "cards", "list"].indexOf(this.mode)'
1206
+ }, {
1207
+ value: 'filter-toggler',
1208
+ label: i18nRuntime.i18n("073694928db5b0b5423ebe095ec62d39")
1209
+ }, {
1210
+ value: 'drag-toggler',
1211
+ label: i18nRuntime.i18n("5b9c3e6ce478196f802722cb09d61f0b")
1212
+ }, {
1213
+ value: 'check-all',
1214
+ label: i18nRuntime.i18n("66eeacd93a7c1bda93906fe908ad11a0"),
1215
+ hiddenOn: '!this.mode || this.mode === "table"'
1216
+ }, {
1217
+ value: 'tpl',
1218
+ label: i18nRuntime.i18n("97d07614380da93d257f9fbf81aa56fb")
1219
+ }, {
1220
+ value: 'button',
1221
+ label: i18nRuntime.i18n("fa966345577ba81af19408f203db968f")
1222
+ }]
1166
1223
  }, {
1167
- value: 'button',
1168
- label: i18nRuntime.i18n("fa966345577ba81af19408f203db968f")
1169
- }]
1170
- }, {
1171
- name: 'align',
1172
- placeholder: i18nRuntime.i18n("d5bc35360607472de4525358af126de4"),
1173
- size: 'xs',
1174
- type: 'select',
1175
- options: [{
1176
- label: i18nRuntime.i18n("413f48cc71f71083ce532a86e3efdc21"),
1177
- value: 'left'
1224
+ name: 'align',
1225
+ placeholder: i18nRuntime.i18n("d5bc35360607472de4525358af126de4"),
1226
+ size: 'xs',
1227
+ type: 'select',
1228
+ options: [{
1229
+ label: i18nRuntime.i18n("413f48cc71f71083ce532a86e3efdc21"),
1230
+ value: 'left'
1231
+ }, {
1232
+ label: i18nRuntime.i18n("fd8e9572cc6bf87653c4d8f8b8dd0db9"),
1233
+ value: 'right'
1234
+ }]
1178
1235
  }, {
1179
- label: i18nRuntime.i18n("fd8e9572cc6bf87653c4d8f8b8dd0db9"),
1180
- value: 'right'
1236
+ type: 'remark',
1237
+ content: i18nRuntime.i18n("440a3a2d7f1b123718be75e2baee8391"),
1238
+ trigger: ['click'],
1239
+ rootClose: true,
1240
+ placement: 'left',
1241
+ visibleOn: '!~["bulkActions", "drag-toggler", "check-all", "bulk-actions", "pagination", "statistics", "switch-per-page", "filter-toggler", "load-more", "export-csv", "export-excel"].indexOf(this.type)',
1242
+ columnClassName: 'no-grow w-3x p-t-xs',
1243
+ className: 'm-l-none'
1181
1244
  }]
1182
- }, {
1183
- type: 'remark',
1184
- content: i18nRuntime.i18n("440a3a2d7f1b123718be75e2baee8391"),
1185
- trigger: ['click'],
1186
- rootClose: true,
1187
- placement: 'left',
1188
- visibleOn: '!~["bulkActions", "drag-toggler", "check-all", "bulk-actions", "pagination", "statistics", "switch-per-page", "filter-toggler", "load-more", "export-csv", "export-excel"].indexOf(this.type)',
1189
- columnClassName: 'no-grow w-3x p-t-xs',
1190
- className: 'm-l-none'
1191
- }]
1192
- }, amisEditorCore.getSchemaTpl('switch', {
1193
- name: 'filterTogglable',
1194
- label: i18nRuntime.i18n("34da7e4a0ecdb63967427f43adf2de3e"),
1195
- visibleOn: 'data.filter'
1196
- }), amisEditorCore.getSchemaTpl('switch', {
1197
- name: 'filterDefaultVisible',
1198
- label: i18nRuntime.i18n("25c0db3ddce9bfffd497d0c824cf3c72"),
1199
- visibleOn: 'data.filter && data.filterTogglable',
1200
- pipeIn: amisEditorCore.defaultValue(true)
1201
- }), amisEditorCore.getSchemaTpl('switch', {
1202
- name: 'hideQuickSaveBtn',
1203
- label: i18nRuntime.i18n("259d11c300a365b6767228c12d29ce53")
1204
- }), amisEditorCore.getSchemaTpl('switch', {
1205
- name: 'alwaysShowPagination',
1206
- label: i18nRuntime.i18n("fa9417bacb7714e82663655345ca213d")
1207
- }), amisEditorCore.getSchemaTpl('switch', {
1208
- name: 'hideCheckToggler',
1209
- label: i18nRuntime.i18n("e3d2a85f20608a5bde7d539969d03167"),
1210
- visibleOn: 'data.checkOnItemClick'
1211
- }), amisEditorCore.getSchemaTpl('className'), amisEditorCore.getSchemaTpl('className', {
1212
- name: 'bodyClassName',
1213
- label: i18nRuntime.i18n("af1af0a7fad9e8bdcd21694d0e036e12")
1214
- })]
1215
- }, {
1216
- title: i18nRuntime.i18n("0d98c74797e49d00bcc4c17c9d557a2b"),
1217
- body: [amisEditorCore.getSchemaTpl('ref'), {
1218
- name: 'source',
1219
- label: i18nRuntime.i18n("c11322c9cc43ce3c004cf03f5ac0acd0"),
1220
- type: 'input-text',
1221
- description: i18nRuntime.i18n("62569fcb0fc8314daea97989bba3877c")
1222
- }, {
1223
- name: 'perPage',
1224
- label: i18nRuntime.i18n("606bc931d2b3ebba2569cb1494719e2c"),
1225
- type: 'input-number'
1226
- }, amisEditorCore.getSchemaTpl('switch', {
1227
- name: 'keepItemSelectionOnPageChange',
1228
- label: i18nRuntime.i18n("004d01f56242e07cbdc97256bb11c75b")
1229
- }), {
1230
- name: 'maxKeepItemSelectionLength',
1231
- label: i18nRuntime.i18n("3d330edb46341a26ccc9aaa7f7938a8e"),
1232
- type: 'input-number',
1233
- mode: 'inline',
1234
- className: 'block'
1235
- }, {
1236
- name: 'pageField',
1237
- label: i18nRuntime.i18n("95e68bea2d8c8e41ffa619d4364a0d6f"),
1238
- type: 'input-text',
1239
- pipeIn: amisEditorCore.defaultValue('page')
1245
+ }), amisEditorCore.getSchemaTpl('switch', {
1246
+ name: 'filterTogglable',
1247
+ label: i18nRuntime.i18n("34da7e4a0ecdb63967427f43adf2de3e"),
1248
+ visibleOn: 'data.filter'
1249
+ }), amisEditorCore.getSchemaTpl('switch', {
1250
+ name: 'filterDefaultVisible',
1251
+ label: i18nRuntime.i18n("25c0db3ddce9bfffd497d0c824cf3c72"),
1252
+ visibleOn: 'data.filter && data.filterTogglable',
1253
+ pipeIn: amisEditorCore.defaultValue(true)
1254
+ }), amisEditorCore.getSchemaTpl('switch', {
1255
+ name: 'hideQuickSaveBtn',
1256
+ label: i18nRuntime.i18n("259d11c300a365b6767228c12d29ce53")
1257
+ }), amisEditorCore.getSchemaTpl('switch', {
1258
+ name: 'alwaysShowPagination',
1259
+ label: i18nRuntime.i18n("fa9417bacb7714e82663655345ca213d")
1260
+ }), amisEditorCore.getSchemaTpl('switch', {
1261
+ name: 'hideCheckToggler',
1262
+ label: i18nRuntime.i18n("e3d2a85f20608a5bde7d539969d03167"),
1263
+ visibleOn: 'data.checkOnItemClick'
1264
+ }), amisEditorCore.getSchemaTpl('className'), amisEditorCore.getSchemaTpl('className', {
1265
+ name: 'bodyClassName',
1266
+ label: i18nRuntime.i18n("af1af0a7fad9e8bdcd21694d0e036e12")
1267
+ })]
1240
1268
  }, {
1241
- name: 'perPageField',
1242
- label: i18nRuntime.i18n("537f8b09437bdb7fac429dc4e8666763"),
1243
- type: 'input-text',
1244
- pipeIn: amisEditorCore.defaultValue('perPage')
1245
- }, {
1246
- name: 'orderField',
1247
- label: i18nRuntime.i18n("30c7bd5acd4564057bd89e0846f01728"),
1248
- type: 'input-text',
1249
- labelRemark: {
1250
- className: 'm-l-xs',
1251
- trigger: 'click',
1252
- rootClose: true,
1253
- content: i18nRuntime.i18n("dd8d217677e4c5df28b7f46aa99b22a8"),
1254
- placement: 'left'
1255
- }
1256
- }, {
1257
- name: 'perPageAvailable',
1258
- label: i18nRuntime.i18n("e04e8f570e2fb43a533b224f3c48523d"),
1259
- type: 'input-array',
1260
- hiddenOn: 'data.loadDataOnce',
1261
- items: {
1269
+ title: i18nRuntime.i18n("0d98c74797e49d00bcc4c17c9d557a2b"),
1270
+ body: [amisEditorCore.getSchemaTpl('ref'), {
1271
+ name: 'source',
1272
+ label: i18nRuntime.i18n("c11322c9cc43ce3c004cf03f5ac0acd0"),
1273
+ type: 'input-text',
1274
+ description: i18nRuntime.i18n("62569fcb0fc8314daea97989bba3877c")
1275
+ }, {
1276
+ name: 'perPage',
1277
+ label: i18nRuntime.i18n("606bc931d2b3ebba2569cb1494719e2c"),
1278
+ type: 'input-number'
1279
+ }, amisEditorCore.getSchemaTpl('switch', {
1280
+ name: 'keepItemSelectionOnPageChange',
1281
+ label: i18nRuntime.i18n("004d01f56242e07cbdc97256bb11c75b")
1282
+ }), {
1283
+ name: 'maxKeepItemSelectionLength',
1284
+ label: i18nRuntime.i18n("3d330edb46341a26ccc9aaa7f7938a8e"),
1262
1285
  type: 'input-number',
1263
- required: true
1264
- },
1265
- value: [10]
1266
- }, amisEditorCore.getSchemaTpl('name'), {
1267
- name: 'itemCheckableOn',
1268
- type: 'input-text',
1269
- label: i18nRuntime.i18n("0fc1de8f71a7470213fc68f981abdbc2"),
1270
- description: i18nRuntime.i18n("7d5fefd589000879088063dceb4b2552"),
1271
- visibleOn: 'data.bulkActions && data.bulkActions.length || data.pickerMode'
1272
- }, amisEditorCore.getSchemaTpl('switch', {
1273
- name: 'checkOnItemClick',
1274
- label: i18nRuntime.i18n("614ec7801e03f7ee009e4448e6ed4001"),
1275
- visibleOn: 'data.bulkActions && data.bulkActions.length || data.pickerMode'
1276
- }), amisEditorCore.getSchemaTpl('switch', {
1277
- name: 'autoJumpToTopOnPagerChange',
1278
- label: i18nRuntime.i18n("530ab79908eabe5b329ffe17695079e2"),
1279
- description: i18nRuntime.i18n("9092afb1ccb692308ef06d8001da2208")
1280
- }), amisEditorCore.getSchemaTpl('switch', {
1281
- name: 'syncResponse2Query',
1282
- label: i18nRuntime.i18n("c8cf39b24bb52d0562472c33b86824fe"),
1283
- description: i18nRuntime.i18n("d3c172700af4f3f3afb028d6bb4a90a4")
1284
- })]
1285
- }]);
1286
- };
1287
-
1288
- _this.wrapperProps = {
1289
- affixHeader: false
1290
- };
1286
+ mode: 'inline',
1287
+ className: 'block'
1288
+ }, {
1289
+ name: 'pageField',
1290
+ label: i18nRuntime.i18n("95e68bea2d8c8e41ffa619d4364a0d6f"),
1291
+ type: 'input-text',
1292
+ pipeIn: amisEditorCore.defaultValue('page')
1293
+ }, {
1294
+ name: 'perPageField',
1295
+ label: i18nRuntime.i18n("537f8b09437bdb7fac429dc4e8666763"),
1296
+ type: 'input-text',
1297
+ pipeIn: amisEditorCore.defaultValue('perPage')
1298
+ }, {
1299
+ name: 'orderField',
1300
+ label: i18nRuntime.i18n("30c7bd5acd4564057bd89e0846f01728"),
1301
+ type: 'input-text',
1302
+ labelRemark: {
1303
+ className: 'm-l-xs',
1304
+ trigger: 'click',
1305
+ rootClose: true,
1306
+ content: i18nRuntime.i18n("dd8d217677e4c5df28b7f46aa99b22a8"),
1307
+ placement: 'left'
1308
+ }
1309
+ }, {
1310
+ name: 'perPageAvailable',
1311
+ label: i18nRuntime.i18n("e04e8f570e2fb43a533b224f3c48523d"),
1312
+ type: 'input-array',
1313
+ hiddenOn: 'data.loadDataOnce',
1314
+ items: {
1315
+ type: 'input-number',
1316
+ required: true
1317
+ },
1318
+ value: [10]
1319
+ }, amisEditorCore.getSchemaTpl('name'), {
1320
+ name: 'itemCheckableOn',
1321
+ type: 'input-text',
1322
+ label: i18nRuntime.i18n("0fc1de8f71a7470213fc68f981abdbc2"),
1323
+ description: i18nRuntime.i18n("7d5fefd589000879088063dceb4b2552"),
1324
+ visibleOn: 'data.bulkActions && data.bulkActions.length || data.pickerMode'
1325
+ }, amisEditorCore.getSchemaTpl('switch', {
1326
+ name: 'checkOnItemClick',
1327
+ label: i18nRuntime.i18n("614ec7801e03f7ee009e4448e6ed4001"),
1328
+ visibleOn: 'data.bulkActions && data.bulkActions.length || data.pickerMode'
1329
+ }), amisEditorCore.getSchemaTpl('switch', {
1330
+ name: 'autoJumpToTopOnPagerChange',
1331
+ label: i18nRuntime.i18n("530ab79908eabe5b329ffe17695079e2"),
1332
+ description: i18nRuntime.i18n("9092afb1ccb692308ef06d8001da2208")
1333
+ }), amisEditorCore.getSchemaTpl('switch', {
1334
+ name: 'syncResponse2Query',
1335
+ label: i18nRuntime.i18n("c8cf39b24bb52d0562472c33b86824fe"),
1336
+ description: i18nRuntime.i18n("d3c172700af4f3f3afb028d6bb4a90a4")
1337
+ })]
1338
+ }]);
1339
+ }
1340
+ });
1341
+ Object.defineProperty(_this, "wrapperProps", {
1342
+ enumerable: true,
1343
+ configurable: true,
1344
+ writable: true,
1345
+ value: {
1346
+ affixHeader: false
1347
+ }
1348
+ });
1291
1349
  return _this;
1292
1350
  }
1293
-
1294
- CRUDPlugin.prototype.addItem = function (source, target) {
1295
- var canAdd = source.find(function (item) {
1296
- return item.label === target.label;
1297
- });
1298
-
1299
- if (!canAdd) {
1300
- source.push(target);
1351
+ Object.defineProperty(CRUDPlugin.prototype, "addItem", {
1352
+ enumerable: false,
1353
+ configurable: true,
1354
+ writable: true,
1355
+ value: function (source, target) {
1356
+ var canAdd = source.find(function (item) {
1357
+ return item.label === target.label;
1358
+ });
1359
+ if (!canAdd) {
1360
+ source.push(target);
1361
+ }
1301
1362
  }
1302
- };
1303
-
1304
- CRUDPlugin.prototype.handleBulkActionEdit = function (id, index) {
1305
- var store = this.manager.store;
1306
- var schema = store.getSchema(id);
1307
- var action = schema === null || schema === void 0 ? void 0 : schema.bulkActions[index];
1308
-
1309
- if (action && action.$$id) {
1310
- store.setActiveId(action.$$id);
1363
+ });
1364
+ Object.defineProperty(CRUDPlugin.prototype, "handleBulkActionEdit", {
1365
+ enumerable: false,
1366
+ configurable: true,
1367
+ writable: true,
1368
+ value: function (id, index) {
1369
+ var store = this.manager.store;
1370
+ var schema = store.getSchema(id);
1371
+ var action = schema === null || schema === void 0 ? void 0 : schema.bulkActions[index];
1372
+ if (action && action.$$id) {
1373
+ store.setActiveId(action.$$id);
1374
+ }
1311
1375
  }
1312
- };
1313
-
1314
- CRUDPlugin.prototype.handleItemActionEdit = function (id, index) {
1315
- var store = this.manager.store;
1316
- var schema = store.getSchema(id);
1317
- var action = schema === null || schema === void 0 ? void 0 : schema.itemActions[index];
1318
-
1319
- if (action && action.$$id) {
1320
- store.setActiveId(action.$$id);
1376
+ });
1377
+ Object.defineProperty(CRUDPlugin.prototype, "handleItemActionEdit", {
1378
+ enumerable: false,
1379
+ configurable: true,
1380
+ writable: true,
1381
+ value: function (id, index) {
1382
+ var store = this.manager.store;
1383
+ var schema = store.getSchema(id);
1384
+ var action = schema === null || schema === void 0 ? void 0 : schema.itemActions[index];
1385
+ if (action && action.$$id) {
1386
+ store.setActiveId(action.$$id);
1387
+ }
1321
1388
  }
1322
- };
1389
+ });
1323
1390
  /**
1324
1391
  * 默认什么组件都加入的子组件里面,子类里面可以复写这个改变行为。
1325
1392
  * @param context
1326
1393
  * @param renderers
1327
1394
  */
1328
-
1329
-
1330
- CRUDPlugin.prototype.buildSubRenderers = function (context, renderers) {
1331
- var plugin = this;
1332
-
1333
- if (plugin.name && plugin.description) {
1334
- return {
1335
- name: plugin.name,
1336
- icon: plugin.icon,
1337
- pluginIcon: plugin.pluginIcon,
1338
- description: plugin.description,
1339
- previewSchema: plugin.previewSchema,
1340
- tags: plugin.tags,
1341
- docLink: plugin.docLink,
1342
- type: plugin.type,
1343
- scaffold: plugin.scaffold,
1344
- disabledRendererPlugin: plugin.disabledRendererPlugin,
1345
- isBaseComponent: plugin.isBaseComponent,
1346
- scaffoldForm: this.scaffoldForm,
1347
- rendererName: plugin.rendererName
1348
- };
1349
- }
1350
- };
1351
-
1352
- CRUDPlugin.prototype.getRendererInfo = function (context) {
1353
- var info = _super.prototype.getRendererInfo.call(this, context);
1354
-
1355
- if (info) {
1356
- info.scaffoldForm = this.scaffoldForm;
1395
+ Object.defineProperty(CRUDPlugin.prototype, "buildSubRenderers", {
1396
+ enumerable: false,
1397
+ configurable: true,
1398
+ writable: true,
1399
+ value: function (context, renderers) {
1400
+ var plugin = this;
1401
+ if (plugin.name && plugin.description) {
1402
+ return {
1403
+ name: plugin.name,
1404
+ icon: plugin.icon,
1405
+ pluginIcon: plugin.pluginIcon,
1406
+ description: plugin.description,
1407
+ previewSchema: plugin.previewSchema,
1408
+ tags: plugin.tags,
1409
+ docLink: plugin.docLink,
1410
+ type: plugin.type,
1411
+ scaffold: plugin.scaffold,
1412
+ disabledRendererPlugin: plugin.disabledRendererPlugin,
1413
+ isBaseComponent: plugin.isBaseComponent,
1414
+ scaffoldForm: this.scaffoldForm,
1415
+ rendererName: plugin.rendererName
1416
+ };
1417
+ }
1357
1418
  }
1358
-
1359
- return info;
1360
- };
1361
-
1362
- CRUDPlugin.prototype.renderEditableComponents = function (props) {
1363
- var render = props.render;
1364
- var bulkActions = props.bulkActions;
1365
- var itemActions = props.itemActions;
1366
- var doms = [];
1367
-
1368
- if (Array.isArray(bulkActions) && bulkActions.length) {
1369
- doms.push(React__default["default"].createElement("div", {
1370
- key: "bulkActions",
1371
- className: "ae-EditableRender"
1372
- }, React__default["default"].createElement("div", {
1373
- className: "ae-EditableRender-title"
1374
- }, "\u6279\u91CF\u64CD\u4F5C"), React__default["default"].createElement("div", {
1375
- className: "ae-EditableRender-body"
1376
- }, bulkActions.map(function (action) {
1377
- return render('bulk-action', tslib.__assign({
1378
- type: 'button',
1379
- size: 'sm'
1380
- }, action), {
1381
- key: action.$$id
1382
- });
1383
- }))));
1419
+ });
1420
+ Object.defineProperty(CRUDPlugin.prototype, "getRendererInfo", {
1421
+ enumerable: false,
1422
+ configurable: true,
1423
+ writable: true,
1424
+ value: function (context) {
1425
+ var info = _super.prototype.getRendererInfo.call(this, context);
1426
+ if (info) {
1427
+ info.scaffoldForm = this.scaffoldForm;
1428
+ }
1429
+ return info;
1384
1430
  }
1385
-
1386
- if (Array.isArray(itemActions) && itemActions.length) {
1387
- doms.push(React__default["default"].createElement("div", {
1388
- key: "itemActions",
1389
- className: "ae-EditableRender"
1431
+ });
1432
+ Object.defineProperty(CRUDPlugin.prototype, "renderEditableComponents", {
1433
+ enumerable: false,
1434
+ configurable: true,
1435
+ writable: true,
1436
+ value: function (props) {
1437
+ var render = props.render;
1438
+ var bulkActions = props.bulkActions;
1439
+ var itemActions = props.itemActions;
1440
+ var doms = [];
1441
+ if (Array.isArray(bulkActions) && bulkActions.length) {
1442
+ doms.push(React__default["default"].createElement("div", {
1443
+ key: "bulkActions",
1444
+ className: "ae-EditableRender"
1445
+ }, React__default["default"].createElement("div", {
1446
+ className: "ae-EditableRender-title"
1447
+ }, "\u6279\u91CF\u64CD\u4F5C"), React__default["default"].createElement("div", {
1448
+ className: "ae-EditableRender-body"
1449
+ }, bulkActions.map(function (action) {
1450
+ return render('bulk-action', tslib.__assign({
1451
+ type: 'button',
1452
+ size: 'sm'
1453
+ }, action), {
1454
+ key: action.$$id
1455
+ });
1456
+ }))));
1457
+ }
1458
+ if (Array.isArray(itemActions) && itemActions.length) {
1459
+ doms.push(React__default["default"].createElement("div", {
1460
+ key: "itemActions",
1461
+ className: "ae-EditableRender"
1462
+ }, React__default["default"].createElement("div", {
1463
+ className: "ae-EditableRender-title"
1464
+ }, "\u5355\u6761\u64CD\u4F5C"), React__default["default"].createElement("div", {
1465
+ className: "ae-EditableRender-body"
1466
+ }, itemActions.map(function (action) {
1467
+ return render('bulk-action', tslib.__assign({
1468
+ type: 'button',
1469
+ size: 'sm'
1470
+ }, action), {
1471
+ key: action.$$id
1472
+ });
1473
+ }))));
1474
+ }
1475
+ if (!doms.length) {
1476
+ return null;
1477
+ }
1478
+ return React__default["default"].createElement("div", {
1479
+ className: "ae-EditableRenderers"
1390
1480
  }, React__default["default"].createElement("div", {
1391
- className: "ae-EditableRender-title"
1392
- }, "\u5355\u6761\u64CD\u4F5C"), React__default["default"].createElement("div", {
1393
- className: "ae-EditableRender-body"
1394
- }, itemActions.map(function (action) {
1395
- return render('bulk-action', tslib.__assign({
1396
- type: 'button',
1397
- size: 'sm'
1398
- }, action), {
1399
- key: action.$$id
1400
- });
1401
- }))));
1481
+ className: "ae-EditableRenderers-tip"
1482
+ }, "\u300C\u589E\u5220\u6539\u67E5\u300D\u7F16\u8F91\u8F85\u52A9\u533A"), doms);
1402
1483
  }
1403
-
1404
- if (!doms.length) {
1405
- return null;
1484
+ });
1485
+ Object.defineProperty(CRUDPlugin.prototype, "renderRenderer", {
1486
+ enumerable: false,
1487
+ configurable: true,
1488
+ writable: true,
1489
+ value: function (props) {
1490
+ var $$editor = props.$$editor;
1491
+ var renderer = $$editor.renderer;
1492
+ return React__default["default"].createElement("div", {
1493
+ className: "ae-CRUDEditor"
1494
+ }, this.renderEditableComponents(props), React__default["default"].createElement(renderer.component, tslib.__assign({}, props)));
1406
1495
  }
1407
-
1408
- return React__default["default"].createElement("div", {
1409
- className: "ae-EditableRenderers"
1410
- }, React__default["default"].createElement("div", {
1411
- className: "ae-EditableRenderers-tip"
1412
- }, "\u300C\u589E\u5220\u6539\u67E5\u300D\u7F16\u8F91\u8F85\u52A9\u533A"), doms);
1413
- };
1414
-
1415
- CRUDPlugin.prototype.renderRenderer = function (props) {
1416
- var $$editor = props.$$editor;
1417
- var renderer = $$editor.renderer;
1418
- return React__default["default"].createElement("div", {
1419
- className: "ae-CRUDEditor"
1420
- }, this.renderEditableComponents(props), React__default["default"].createElement(renderer.component, tslib.__assign({}, props)));
1421
- };
1422
-
1423
- CRUDPlugin.prototype.filterProps = function (props) {
1424
- if (props.pickerMode) {
1425
- props.options = props.data.options;
1496
+ });
1497
+ Object.defineProperty(CRUDPlugin.prototype, "filterProps", {
1498
+ enumerable: false,
1499
+ configurable: true,
1500
+ writable: true,
1501
+ value: function (props) {
1502
+ if (props.pickerMode) {
1503
+ props.options = props.data.options;
1504
+ }
1505
+ return props;
1426
1506
  }
1427
-
1428
- return props;
1429
- };
1430
-
1431
- CRUDPlugin.prototype.afterUpdate = function (event) {
1432
- var _this = this;
1433
-
1434
- var _a;
1435
-
1436
- var context = event.context; // mode 内容形式变化,需要重新构建面板。
1437
-
1438
- if (context.info.plugin === this && ((_a = context.diff) === null || _a === void 0 ? void 0 : _a.some(function (change) {
1507
+ });
1508
+ Object.defineProperty(CRUDPlugin.prototype, "afterUpdate", {
1509
+ enumerable: false,
1510
+ configurable: true,
1511
+ writable: true,
1512
+ value: function (event) {
1513
+ var _this = this;
1439
1514
  var _a;
1440
-
1441
- return ((_a = change.path) === null || _a === void 0 ? void 0 : _a.join('.')) === 'mode';
1442
- }))) {
1443
- setTimeout(function () {
1444
- _this.manager.buildPanels();
1445
-
1446
- _this.manager.buildToolbars();
1447
- }, 20);
1515
+ var context = event.context;
1516
+ // mode 内容形式变化,需要重新构建面板。
1517
+ if (context.info.plugin === this && ((_a = context.diff) === null || _a === void 0 ? void 0 : _a.some(function (change) {
1518
+ var _a;
1519
+ return ((_a = change.path) === null || _a === void 0 ? void 0 : _a.join('.')) === 'mode';
1520
+ }))) {
1521
+ setTimeout(function () {
1522
+ _this.manager.buildPanels();
1523
+ _this.manager.buildToolbars();
1524
+ }, 20);
1525
+ }
1448
1526
  }
1449
- };
1450
-
1451
- CRUDPlugin.prototype.buildDataSchemas = function (node, region) {
1452
- var _a, _b;
1527
+ });
1528
+ Object.defineProperty(CRUDPlugin.prototype, "buildDataSchemas", {
1529
+ enumerable: false,
1530
+ configurable: true,
1531
+ writable: true,
1532
+ value: function (node, region) {
1533
+ var _a, _b;
1534
+ return tslib.__awaiter(this, void 0, void 0, function () {
1535
+ var child;
1536
+ return tslib.__generator(this, function (_c) {
1537
+ child = node.children.find(function (item) {
1538
+ return !!~['table', 'table2', 'cards', 'list'].indexOf(item.type);
1539
+ });
1540
+ if (!((_b = (_a = child === null || child === void 0 ? void 0 : child.info) === null || _a === void 0 ? void 0 : _a.plugin) === null || _b === void 0 ? void 0 : _b.buildDataSchemas)) {
1541
+ return [2 /*return*/];
1542
+ }
1453
1543
 
1454
- return tslib.__awaiter(this, void 0, void 0, function () {
1455
- var child;
1456
- return tslib.__generator(this, function (_c) {
1457
- child = node.children.find(function (item) {
1458
- return !!~['table', 'table2', 'cards', 'list'].indexOf(item.type);
1544
+ return [2 /*return*/, child.info.plugin.buildDataSchemas(child)];
1459
1545
  });
1460
-
1461
- if (!((_b = (_a = child === null || child === void 0 ? void 0 : child.info) === null || _a === void 0 ? void 0 : _a.plugin) === null || _b === void 0 ? void 0 : _b.buildDataSchemas)) {
1462
- return [2
1463
- /*return*/
1464
- ];
1465
- }
1466
-
1467
- return [2
1468
- /*return*/
1469
- , child.info.plugin.buildDataSchemas(child)];
1470
1546
  });
1471
- });
1472
- };
1473
-
1547
+ }
1548
+ });
1474
1549
  return CRUDPlugin;
1475
1550
  }(amisEditorCore.BasePlugin);
1476
1551
  amisEditorCore.registerEditorPlugin(CRUDPlugin);