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