@nocobase/client 0.9.1-alpha.2 → 0.9.2-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1456) hide show
  1. package/.umirc.ts +2 -2
  2. package/es/acl/ACLProvider.js +35 -125
  3. package/es/acl/ACLShortcut.js +11 -18
  4. package/es/acl/Configuration/ConfigureCenter.js +57 -101
  5. package/es/acl/Configuration/MenuConfigure.js +92 -147
  6. package/es/acl/Configuration/MenuItemsProvider.js +0 -7
  7. package/es/acl/Configuration/PermisionProvider.js +54 -84
  8. package/es/acl/Configuration/RoleConfigure.js +22 -43
  9. package/es/acl/Configuration/RoleTable.js +5 -9
  10. package/es/acl/Configuration/RolesResourcesActions.js +10 -54
  11. package/es/acl/Configuration/ScopeSelect.js +5 -15
  12. package/es/acl/Configuration/StrategyActions.js +10 -31
  13. package/es/acl/Configuration/schemas/roles.js +4 -4
  14. package/es/acl/Configuration/schemas/scopes.js +4 -8
  15. package/es/acl/Configuration/schemas/useRoleResourceValues.js +5 -8
  16. package/es/acl/Configuration/schemas/useSaveRoleResourceAction.js +23 -30
  17. package/es/acl/style.less +1 -1
  18. package/es/antd-config-provider/index.js +30 -41
  19. package/es/antd-config-provider/loadConstrueLocale.js +4 -9
  20. package/es/api-client/APIClient.js +10 -42
  21. package/es/api-client/APIClientProvider.js +1 -1
  22. package/es/api-client/hooks/assign.js +0 -18
  23. package/es/api-client/hooks/useRequest.js +35 -59
  24. package/es/appInfo/CurrentAppInfoProvider.js +16 -3
  25. package/es/application/Application.js +87 -121
  26. package/es/application/compose.js +12 -23
  27. package/es/async-data-provider/index.js +7 -12
  28. package/es/block-provider/BlockProvider.d.ts +1 -0
  29. package/es/block-provider/BlockProvider.js +56 -96
  30. package/es/block-provider/BlockSchemaComponentProvider.js +10 -5
  31. package/es/block-provider/CalendarBlockProvider.d.ts +1 -0
  32. package/es/block-provider/CalendarBlockProvider.js +16 -19
  33. package/es/block-provider/DetailsBlockProvider.js +11 -16
  34. package/es/block-provider/FilterFormBlockProvider.d.ts +1 -0
  35. package/es/block-provider/FilterFormBlockProvider.js +16 -0
  36. package/es/block-provider/FormBlockProvider.d.ts +3 -0
  37. package/es/block-provider/FormBlockProvider.js +71 -29
  38. package/es/block-provider/FormFieldProvider.js +17 -21
  39. package/es/block-provider/GanttBlockProvider.d.ts +11 -0
  40. package/es/block-provider/GanttBlockProvider.js +150 -0
  41. package/es/block-provider/KanbanBlockProvider.js +54 -110
  42. package/es/block-provider/SharedFilterProvider.js +10 -25
  43. package/es/block-provider/TableBlockProvider.d.ts +3 -0
  44. package/es/block-provider/TableBlockProvider.js +164 -96
  45. package/es/block-provider/TableFieldProvider.js +107 -160
  46. package/es/block-provider/TableSelectorProvider.d.ts +18 -1
  47. package/es/block-provider/TableSelectorProvider.js +106 -105
  48. package/es/block-provider/hooks/index.d.ts +37 -0
  49. package/es/block-provider/hooks/index.js +1093 -972
  50. package/es/block-provider/index.d.ts +4 -0
  51. package/es/block-provider/index.js +5 -1
  52. package/es/board/Board.js +110 -153
  53. package/es/board/Card.js +7 -9
  54. package/es/board/CardAdder.js +6 -17
  55. package/es/board/CardForm.js +1 -5
  56. package/es/board/Column.js +27 -39
  57. package/es/board/ColumnAdder.js +5 -16
  58. package/es/board/ColumnForm.js +1 -5
  59. package/es/board/DefaultCard.js +3 -5
  60. package/es/board/DefaultColumnHeader.js +17 -34
  61. package/es/board/Kanban.js +5 -16
  62. package/es/board/helpers.js +7 -24
  63. package/es/board/services.js +4 -12
  64. package/es/board/utils.js +5 -24
  65. package/es/board/withDroppable.js +5 -11
  66. package/es/china-region/index.js +5 -21
  67. package/es/collection-manager/CollectionField.js +16 -42
  68. package/es/collection-manager/CollectionFieldProvider.js +5 -10
  69. package/es/collection-manager/CollectionHistoryProvider.js +24 -33
  70. package/es/collection-manager/CollectionManagerProvider.js +86 -121
  71. package/es/collection-manager/CollectionManagerSchemaComponentProvider.js +4 -4
  72. package/es/collection-manager/CollectionManagerShortcut.js +19 -23
  73. package/es/collection-manager/CollectionProvider.js +4 -8
  74. package/es/collection-manager/Configuration/AddCategoryAction.js +36 -56
  75. package/es/collection-manager/Configuration/AddCollectionAction.js +106 -129
  76. package/es/collection-manager/Configuration/AddFieldAction.js +87 -108
  77. package/es/collection-manager/Configuration/AddSubFieldAction.js +36 -56
  78. package/es/collection-manager/Configuration/CollectionFieldsTable.js +10 -16
  79. package/es/collection-manager/Configuration/CollectionFieldsTableArray.js +37 -86
  80. package/es/collection-manager/Configuration/ConfigurationTable.js +158 -113
  81. package/es/collection-manager/Configuration/ConfigurationTabs.js +94 -146
  82. package/es/collection-manager/Configuration/EditCategoryAction.js +44 -68
  83. package/es/collection-manager/Configuration/EditCollectionAction.js +59 -94
  84. package/es/collection-manager/Configuration/EditFieldAction.js +102 -133
  85. package/es/collection-manager/Configuration/EditSubFieldAction.js +54 -85
  86. package/es/collection-manager/Configuration/OverridingCollectionField.js +88 -134
  87. package/es/collection-manager/Configuration/SyncFieldsAction.d.ts +2 -0
  88. package/es/collection-manager/Configuration/SyncFieldsAction.js +236 -0
  89. package/es/collection-manager/Configuration/ViewInheritedField.js +51 -81
  90. package/es/collection-manager/Configuration/components/CollectionFieldInterface.js +1 -3
  91. package/es/collection-manager/Configuration/components/CollectionTemplate.js +1 -3
  92. package/es/collection-manager/Configuration/components/FieldSummary.js +2 -8
  93. package/es/collection-manager/Configuration/components/TemplateSummay.d.ts +2 -0
  94. package/es/collection-manager/Configuration/components/TemplateSummay.js +26 -0
  95. package/es/collection-manager/Configuration/components/index.js +5 -18
  96. package/es/collection-manager/Configuration/index.d.ts +1 -0
  97. package/es/collection-manager/Configuration/index.js +1 -0
  98. package/es/collection-manager/Configuration/interfaces.js +4 -7
  99. package/es/collection-manager/Configuration/schemas/collectionFields.js +17 -3
  100. package/es/collection-manager/Configuration/schemas/collections.js +22 -30
  101. package/es/collection-manager/Configuration/templates.js +6 -6
  102. package/es/collection-manager/ResourceActionProvider.js +18 -38
  103. package/es/collection-manager/action-hooks.d.ts +2 -0
  104. package/es/collection-manager/action-hooks.js +422 -432
  105. package/es/collection-manager/hooks/useCollection.d.ts +4 -0
  106. package/es/collection-manager/hooks/useCollection.js +12 -9
  107. package/es/collection-manager/hooks/useCollectionDataSource.d.ts +1 -1
  108. package/es/collection-manager/hooks/useCollectionDataSource.js +5 -6
  109. package/es/collection-manager/hooks/useCollectionField.js +4 -6
  110. package/es/collection-manager/hooks/useCollectionManager.d.ts +23 -3
  111. package/es/collection-manager/hooks/useCollectionManager.js +125 -90
  112. package/es/collection-manager/hooks/useOptions.js +5 -8
  113. package/es/collection-manager/index.d.ts +1 -1
  114. package/es/collection-manager/index.js +1 -1
  115. package/es/collection-manager/interfaces/attachment.js +5 -9
  116. package/es/collection-manager/interfaces/checkbox.js +5 -4
  117. package/es/collection-manager/interfaces/checkboxGroup.js +5 -4
  118. package/es/collection-manager/interfaces/chinaRegion.js +5 -8
  119. package/es/collection-manager/interfaces/createdAt.js +5 -4
  120. package/es/collection-manager/interfaces/createdBy.js +5 -4
  121. package/es/collection-manager/interfaces/datetime.js +5 -4
  122. package/es/collection-manager/interfaces/email.js +5 -4
  123. package/es/collection-manager/interfaces/icon.js +6 -5
  124. package/es/collection-manager/interfaces/id.js +1 -0
  125. package/es/collection-manager/interfaces/index.d.ts +1 -0
  126. package/es/collection-manager/interfaces/index.js +2 -1
  127. package/es/collection-manager/interfaces/input.js +5 -5
  128. package/es/collection-manager/interfaces/integer.js +6 -5
  129. package/es/collection-manager/interfaces/json.js +8 -6
  130. package/es/collection-manager/interfaces/linkTo.js +25 -12
  131. package/es/collection-manager/interfaces/m2m.js +21 -14
  132. package/es/collection-manager/interfaces/m2o.js +21 -10
  133. package/es/collection-manager/interfaces/markdown.js +5 -5
  134. package/es/collection-manager/interfaces/multipleSelect.js +5 -4
  135. package/es/collection-manager/interfaces/number.js +6 -5
  136. package/es/collection-manager/interfaces/o2m.js +12 -12
  137. package/es/collection-manager/interfaces/o2o.js +42 -30
  138. package/es/collection-manager/interfaces/password.js +6 -5
  139. package/es/collection-manager/interfaces/percent.js +11 -15
  140. package/es/collection-manager/interfaces/phone.js +8 -6
  141. package/es/collection-manager/interfaces/properties/index.js +7 -6
  142. package/es/collection-manager/interfaces/properties/operators.d.ts +11 -19
  143. package/es/collection-manager/interfaces/properties/operators.js +6 -21
  144. package/es/collection-manager/interfaces/radioGroup.js +5 -4
  145. package/es/collection-manager/interfaces/richText.js +5 -5
  146. package/es/collection-manager/interfaces/select.js +5 -4
  147. package/es/collection-manager/interfaces/subTable.js +15 -12
  148. package/es/collection-manager/interfaces/textarea.js +5 -5
  149. package/es/collection-manager/interfaces/time.js +5 -4
  150. package/es/collection-manager/interfaces/updatedAt.js +5 -4
  151. package/es/collection-manager/interfaces/updatedBy.js +5 -4
  152. package/es/collection-manager/interfaces/url.d.ts +2 -0
  153. package/es/collection-manager/interfaces/url.js +30 -0
  154. package/es/collection-manager/sub-table.js +79 -126
  155. package/es/collection-manager/templates/calendar.js +11 -10
  156. package/es/collection-manager/templates/components/PreviewFields.d.ts +2 -0
  157. package/es/collection-manager/templates/components/PreviewFields.js +256 -0
  158. package/es/collection-manager/templates/components/PreviewTable.d.ts +1 -0
  159. package/es/collection-manager/templates/components/PreviewTable.js +133 -0
  160. package/es/collection-manager/templates/expression.d.ts +2 -0
  161. package/es/collection-manager/templates/expression.js +52 -0
  162. package/es/collection-manager/templates/index.d.ts +3 -0
  163. package/es/collection-manager/templates/index.js +4 -1
  164. package/es/collection-manager/templates/properties/index.d.ts +1 -1
  165. package/es/collection-manager/templates/properties/index.js +5 -11
  166. package/es/collection-manager/templates/tree.d.ts +2 -0
  167. package/es/collection-manager/templates/tree.js +70 -0
  168. package/es/collection-manager/templates/types.d.ts +6 -0
  169. package/es/collection-manager/templates/view.d.ts +2 -0
  170. package/es/collection-manager/templates/view.js +135 -0
  171. package/es/collection-manager/types.d.ts +2 -0
  172. package/es/document-title/index.js +7 -17
  173. package/es/filter-provider/FilterProvider.d.ts +45 -0
  174. package/es/filter-provider/FilterProvider.js +143 -0
  175. package/es/filter-provider/index.d.ts +2 -0
  176. package/es/filter-provider/index.js +2 -0
  177. package/es/filter-provider/utils.d.ts +27 -0
  178. package/es/filter-provider/utils.js +170 -0
  179. package/es/formula/Expression.js +48 -112
  180. package/es/formula/Result.js +14 -33
  181. package/es/i18n/i18n.js +2 -3
  182. package/es/icon/Icon.js +7 -18
  183. package/es/index.d.ts +1 -1
  184. package/es/index.js +1 -1
  185. package/es/locale/en_US.d.ts +67 -4
  186. package/es/locale/en_US.js +68 -5
  187. package/es/locale/ja_JP.d.ts +54 -2
  188. package/es/locale/ja_JP.js +55 -4
  189. package/es/locale/pt_BR.d.ts +650 -0
  190. package/es/locale/pt_BR.js +649 -0
  191. package/es/locale/ru_RU.d.ts +29 -2
  192. package/es/locale/ru_RU.js +30 -3
  193. package/es/locale/tr_TR.d.ts +30 -2
  194. package/es/locale/tr_TR.js +31 -3
  195. package/es/locale/zh_CN.d.ts +84 -6
  196. package/es/locale/zh_CN.js +85 -7
  197. package/es/plugin-manager/PinnedPluginListProvider.d.ts +5 -0
  198. package/es/plugin-manager/PinnedPluginListProvider.js +50 -0
  199. package/es/plugin-manager/PluginManager.js +23 -52
  200. package/es/plugin-manager/PluginManagerProvider.js +1 -1
  201. package/es/plugin-manager/context.d.ts +3 -0
  202. package/es/plugin-manager/context.js +4 -1
  203. package/es/plugin-manager/index.d.ts +1 -0
  204. package/es/plugin-manager/index.js +1 -0
  205. package/es/pm/PluginManagerLink.js +24 -49
  206. package/es/pm/index.js +250 -209
  207. package/es/powered-by/index.js +1 -4
  208. package/es/record-provider/index.js +8 -14
  209. package/es/route-switch/RouteSwitch.js +5 -11
  210. package/es/route-switch/RouteSwitchProvider.js +10 -12
  211. package/es/route-switch/antd/admin-layout/index.js +45 -82
  212. package/es/route-switch/antd/auth-layout/index.js +1 -5
  213. package/es/route-switch/hooks.js +2 -6
  214. package/es/schema-component/antd/AntdSchemaComponentProvider.js +4 -4
  215. package/es/schema-component/antd/action/Action.Container.js +5 -8
  216. package/es/schema-component/antd/action/Action.Designer.js +54 -132
  217. package/es/schema-component/antd/action/Action.Drawer.js +11 -20
  218. package/es/schema-component/antd/action/Action.Link.js +4 -4
  219. package/es/schema-component/antd/action/Action.Modal.d.ts +2 -1
  220. package/es/schema-component/antd/action/Action.Modal.js +11 -19
  221. package/es/schema-component/antd/action/Action.Page.js +5 -15
  222. package/es/schema-component/antd/action/Action.js +44 -65
  223. package/es/schema-component/antd/action/ActionBar.js +11 -24
  224. package/es/schema-component/antd/action/hooks.d.ts +1 -0
  225. package/es/schema-component/antd/action/hooks.js +41 -50
  226. package/es/schema-component/antd/action/types.d.ts +1 -1
  227. package/es/schema-component/antd/action/utils.d.ts +1 -1
  228. package/es/schema-component/antd/action/utils.js +26 -19
  229. package/es/schema-component/antd/association-filter/ActionBarAssociationFilterAction.js +19 -13
  230. package/es/schema-component/antd/association-filter/AssociationFilter.BlockDesigner.d.ts +1 -0
  231. package/es/schema-component/antd/association-filter/AssociationFilter.BlockDesigner.js +34 -0
  232. package/es/schema-component/antd/association-filter/AssociationFilter.FilterBlockInitializer.d.ts +1 -0
  233. package/es/schema-component/antd/association-filter/AssociationFilter.FilterBlockInitializer.js +87 -0
  234. package/es/schema-component/antd/association-filter/AssociationFilter.Initializer.js +13 -17
  235. package/es/schema-component/antd/association-filter/AssociationFilter.Item.Designer.js +91 -29
  236. package/es/schema-component/antd/association-filter/AssociationFilter.Item.js +51 -110
  237. package/es/schema-component/antd/association-filter/AssociationFilter.d.ts +3 -0
  238. package/es/schema-component/antd/association-filter/AssociationFilter.js +9 -11
  239. package/es/schema-component/antd/association-filter/AssociationFilterDesignerDelete.js +2 -7
  240. package/es/schema-component/antd/association-filter/AssociationFilterDesignerDisplayField.js +4 -8
  241. package/es/schema-component/antd/association-filter/AssociationFilterProvider.d.ts +1 -0
  242. package/es/schema-component/antd/association-filter/AssociationFilterProvider.js +2 -0
  243. package/es/schema-component/antd/association-filter/utilts.d.ts +2 -0
  244. package/es/schema-component/antd/association-filter/utilts.js +3 -0
  245. package/es/schema-component/antd/association-select/AssociationSelect.d.ts +1 -0
  246. package/es/schema-component/antd/association-select/AssociationSelect.js +495 -88
  247. package/es/schema-component/antd/association-select/ReadPretty.js +4 -4
  248. package/es/schema-component/antd/association-select/useServiceOptions.js +8 -15
  249. package/es/schema-component/antd/block-item/BlockItem.js +0 -2
  250. package/es/schema-component/antd/block-item/TestDesigner.js +1 -2
  251. package/es/schema-component/antd/calendar/Calendar.Designer.js +23 -29
  252. package/es/schema-component/antd/calendar/Calendar.js +30 -63
  253. package/es/schema-component/antd/calendar/DeleteEvent.js +53 -81
  254. package/es/schema-component/antd/calendar/Nav.js +2 -4
  255. package/es/schema-component/antd/calendar/Title.js +5 -8
  256. package/es/schema-component/antd/calendar/Today.js +3 -6
  257. package/es/schema-component/antd/calendar/ViewSelect.js +5 -7
  258. package/es/schema-component/antd/calendar/components/Header.js +7 -10
  259. package/es/schema-component/antd/calendar/style.less +1 -1
  260. package/es/schema-component/antd/card-item/CardItem.js +5 -9
  261. package/es/schema-component/antd/cascader/Cascader.js +19 -36
  262. package/es/schema-component/antd/cascader/ReadPretty.js +3 -13
  263. package/es/schema-component/antd/checkbox/Checkbox.js +5 -8
  264. package/es/schema-component/antd/collection-select/CollectionSelect.d.ts +8 -0
  265. package/es/schema-component/antd/collection-select/CollectionSelect.js +61 -0
  266. package/es/schema-component/antd/collection-select/index.d.ts +1 -0
  267. package/es/schema-component/antd/collection-select/index.js +1 -0
  268. package/es/schema-component/antd/color-select/ColorSelect.js +4 -6
  269. package/es/schema-component/antd/cron/Cron.d.ts +6 -3
  270. package/es/schema-component/antd/cron/Cron.js +20 -19
  271. package/es/schema-component/antd/cron/CronSet.d.ts +7 -0
  272. package/es/schema-component/antd/cron/CronSet.js +106 -0
  273. package/es/schema-component/antd/cron/index.d.ts +1 -0
  274. package/es/schema-component/antd/cron/index.js +2 -1
  275. package/es/schema-component/antd/cron/locale/index.d.ts +0 -1
  276. package/es/schema-component/antd/cron/locale/index.js +1 -3
  277. package/es/schema-component/antd/cron/locale/zh-CN.js +8 -4
  278. package/es/schema-component/antd/date-picker/DatePicker.d.ts +8 -4
  279. package/es/schema-component/antd/date-picker/DatePicker.js +42 -3
  280. package/es/schema-component/antd/date-picker/ReadPretty.js +0 -9
  281. package/es/schema-component/antd/date-picker/util.d.ts +25 -2
  282. package/es/schema-component/antd/date-picker/util.js +129 -32
  283. package/es/schema-component/antd/details/Details.d.ts +7 -0
  284. package/es/schema-component/antd/details/Details.js +2 -0
  285. package/es/schema-component/antd/details/index.d.ts +1 -0
  286. package/es/schema-component/antd/details/index.js +1 -0
  287. package/es/schema-component/antd/filter/DynamicComponent.js +13 -61
  288. package/es/schema-component/antd/filter/Filter.Action.Designer.js +10 -27
  289. package/es/schema-component/antd/filter/Filter.js +14 -13
  290. package/es/schema-component/antd/filter/FilterAction.js +35 -65
  291. package/es/schema-component/antd/filter/FilterGroup.js +8 -16
  292. package/es/schema-component/antd/filter/FilterItem.js +10 -15
  293. package/es/schema-component/antd/filter/FilterItems.js +0 -1
  294. package/es/schema-component/antd/filter/SaveDefaultValue.js +4 -13
  295. package/es/schema-component/antd/filter/useFilterActionProps.js +69 -60
  296. package/es/schema-component/antd/filter/useOperators.d.ts +5 -0
  297. package/es/schema-component/antd/filter/useOperators.js +25 -0
  298. package/es/schema-component/antd/filter/useValues.js +17 -39
  299. package/es/schema-component/antd/form/Form.Designer.js +2 -3
  300. package/es/schema-component/antd/form/Form.js +35 -56
  301. package/es/schema-component/antd/form-item/FormItem.FilterFormDesigner.d.ts +1 -0
  302. package/es/schema-component/antd/form-item/FormItem.FilterFormDesigner.js +26 -0
  303. package/es/schema-component/antd/form-item/FormItem.js +89 -77
  304. package/es/schema-component/antd/form-item/SchemaSettingOptions.d.ts +23 -0
  305. package/es/schema-component/antd/form-item/SchemaSettingOptions.js +615 -0
  306. package/es/schema-component/antd/form-v2/Form.Designer.js +30 -45
  307. package/es/schema-component/antd/form-v2/Form.FilterDesigner.d.ts +5 -0
  308. package/es/schema-component/antd/form-v2/Form.FilterDesigner.js +40 -0
  309. package/es/schema-component/antd/form-v2/Form.d.ts +2 -0
  310. package/es/schema-component/antd/form-v2/Form.js +31 -50
  311. package/es/schema-component/antd/form-v2/FormField.js +1 -5
  312. package/es/schema-component/antd/form-v2/Templates.d.ts +4 -0
  313. package/es/schema-component/antd/form-v2/Templates.js +168 -0
  314. package/es/schema-component/antd/form-v2/index.d.ts +1 -1
  315. package/es/schema-component/antd/form-v2/index.js +4 -2
  316. package/es/schema-component/antd/form-v2/utils.d.ts +0 -1
  317. package/es/schema-component/antd/form-v2/utils.js +22 -95
  318. package/es/schema-component/antd/g2plot/G2Plot.js +8 -23
  319. package/es/schema-component/antd/g2plot/G2PlotDesigner.js +40 -51
  320. package/es/schema-component/antd/g2plot/requestChartData.js +19 -25
  321. package/es/schema-component/antd/gantt/Gantt.Designer.d.ts +1 -0
  322. package/es/schema-component/antd/gantt/Gantt.Designer.js +214 -0
  323. package/es/schema-component/antd/gantt/components/calendar/calendar.d.ts +14 -0
  324. package/es/schema-component/antd/gantt/components/calendar/calendar.js +324 -0
  325. package/es/schema-component/antd/gantt/components/calendar/style.d.ts +4 -0
  326. package/es/schema-component/antd/gantt/components/calendar/style.js +7 -0
  327. package/es/schema-component/antd/gantt/components/calendar/top-part-of-calendar.d.ts +11 -0
  328. package/es/schema-component/antd/gantt/components/calendar/top-part-of-calendar.js +26 -0
  329. package/es/schema-component/antd/gantt/components/gantt/Event.d.ts +2 -0
  330. package/es/schema-component/antd/gantt/components/gantt/Event.js +5 -0
  331. package/es/schema-component/antd/gantt/components/gantt/gantt.d.ts +5 -0
  332. package/es/schema-component/antd/gantt/components/gantt/gantt.js +638 -0
  333. package/es/schema-component/antd/gantt/components/gantt/style.d.ts +3 -0
  334. package/es/schema-component/antd/gantt/components/gantt/style.js +6 -0
  335. package/es/schema-component/antd/gantt/components/gantt/task-gantt-content.d.ts +25 -0
  336. package/es/schema-component/antd/gantt/components/gantt/task-gantt-content.js +366 -0
  337. package/es/schema-component/antd/gantt/components/gantt/task-gantt.d.ts +14 -0
  338. package/es/schema-component/antd/gantt/components/gantt/task-gantt.js +67 -0
  339. package/es/schema-component/antd/gantt/components/grid/grid-body.d.ts +13 -0
  340. package/es/schema-component/antd/gantt/components/grid/grid-body.js +112 -0
  341. package/es/schema-component/antd/gantt/components/grid/grid.d.ts +4 -0
  342. package/es/schema-component/antd/gantt/components/grid/grid.js +13 -0
  343. package/es/schema-component/antd/gantt/components/grid/style.d.ts +4 -0
  344. package/es/schema-component/antd/gantt/components/grid/style.js +7 -0
  345. package/es/schema-component/antd/gantt/components/other/arrow.d.ts +12 -0
  346. package/es/schema-component/antd/gantt/components/other/arrow.js +57 -0
  347. package/es/schema-component/antd/gantt/components/other/horizontal-scroll.d.ts +8 -0
  348. package/es/schema-component/antd/gantt/components/other/horizontal-scroll.js +30 -0
  349. package/es/schema-component/antd/gantt/components/other/style.d.ts +7 -0
  350. package/es/schema-component/antd/gantt/components/other/style.js +10 -0
  351. package/es/schema-component/antd/gantt/components/other/tooltip.d.ts +29 -0
  352. package/es/schema-component/antd/gantt/components/other/tooltip.js +103 -0
  353. package/es/schema-component/antd/gantt/components/other/vertical-scroll.d.ts +9 -0
  354. package/es/schema-component/antd/gantt/components/other/vertical-scroll.js +32 -0
  355. package/es/schema-component/antd/gantt/components/task-item/bar/bar-date-handle.d.ts +11 -0
  356. package/es/schema-component/antd/gantt/components/task-item/bar/bar-date-handle.js +19 -0
  357. package/es/schema-component/antd/gantt/components/task-item/bar/bar-display.d.ts +21 -0
  358. package/es/schema-component/antd/gantt/components/task-item/bar/bar-display.js +48 -0
  359. package/es/schema-component/antd/gantt/components/task-item/bar/bar-progress-handle.d.ts +7 -0
  360. package/es/schema-component/antd/gantt/components/task-item/bar/bar-progress-handle.js +10 -0
  361. package/es/schema-component/antd/gantt/components/task-item/bar/bar-small.d.ts +3 -0
  362. package/es/schema-component/antd/gantt/components/task-item/bar/bar-small.js +38 -0
  363. package/es/schema-component/antd/gantt/components/task-item/bar/bar.d.ts +3 -0
  364. package/es/schema-component/antd/gantt/components/task-item/bar/bar.js +60 -0
  365. package/es/schema-component/antd/gantt/components/task-item/bar/style.d.ts +2 -0
  366. package/es/schema-component/antd/gantt/components/task-item/bar/style.js +5 -0
  367. package/es/schema-component/antd/gantt/components/task-item/milestone/milestone.d.ts +3 -0
  368. package/es/schema-component/antd/gantt/components/task-item/milestone/milestone.js +30 -0
  369. package/es/schema-component/antd/gantt/components/task-item/milestone/style.d.ts +2 -0
  370. package/es/schema-component/antd/gantt/components/task-item/milestone/style.js +5 -0
  371. package/es/schema-component/antd/gantt/components/task-item/project/project.d.ts +3 -0
  372. package/es/schema-component/antd/gantt/components/task-item/project/project.js +31 -0
  373. package/es/schema-component/antd/gantt/components/task-item/project/style.d.ts +3 -0
  374. package/es/schema-component/antd/gantt/components/task-item/project/style.js +6 -0
  375. package/es/schema-component/antd/gantt/components/task-item/style.d.ts +3 -0
  376. package/es/schema-component/antd/gantt/components/task-item/style.js +6 -0
  377. package/es/schema-component/antd/gantt/components/task-item/task-item.d.ts +15 -0
  378. package/es/schema-component/antd/gantt/components/task-item/task-item.js +105 -0
  379. package/es/schema-component/antd/gantt/context.d.ts +3 -0
  380. package/es/schema-component/antd/gantt/context.js +4 -0
  381. package/es/schema-component/antd/gantt/helpers/bar-helper.d.ts +14 -0
  382. package/es/schema-component/antd/gantt/helpers/bar-helper.js +329 -0
  383. package/es/schema-component/antd/gantt/helpers/date-helper.d.ts +18 -0
  384. package/es/schema-component/antd/gantt/helpers/date-helper.js +182 -0
  385. package/es/schema-component/antd/gantt/helpers/other-helper.d.ts +9 -0
  386. package/es/schema-component/antd/gantt/helpers/other-helper.js +65 -0
  387. package/es/schema-component/antd/gantt/index.d.ts +2 -0
  388. package/es/schema-component/antd/gantt/index.js +11 -0
  389. package/es/schema-component/antd/gantt/types/bar-task.d.ts +22 -0
  390. package/es/schema-component/antd/gantt/types/bar-task.js +1 -0
  391. package/es/schema-component/antd/gantt/types/date-setup.d.ts +5 -0
  392. package/es/schema-component/antd/gantt/types/date-setup.js +1 -0
  393. package/es/schema-component/antd/gantt/types/gantt-task-actions.d.ts +8 -0
  394. package/es/schema-component/antd/gantt/types/gantt-task-actions.js +1 -0
  395. package/es/schema-component/antd/gantt/types/public-types.d.ts +136 -0
  396. package/es/schema-component/antd/gantt/types/public-types.js +12 -0
  397. package/es/schema-component/antd/grid/Grid.js +62 -116
  398. package/es/schema-component/antd/icon-picker/IconPicker.js +12 -29
  399. package/es/schema-component/antd/index.d.ts +6 -2
  400. package/es/schema-component/antd/index.js +6 -2
  401. package/es/schema-component/antd/index.less +28 -0
  402. package/es/schema-component/antd/input/EllipsisWithTooltip.js +12 -22
  403. package/es/schema-component/antd/input/Input.d.ts +3 -3
  404. package/es/schema-component/antd/input/Input.js +17 -16
  405. package/es/schema-component/antd/input/Json.d.ts +7 -5
  406. package/es/schema-component/antd/input/Json.js +9 -14
  407. package/es/schema-component/antd/input/ReadPretty.d.ts +2 -2
  408. package/es/schema-component/antd/input/ReadPretty.js +21 -21
  409. package/es/schema-component/antd/input-number/InputNumber.js +5 -11
  410. package/es/schema-component/antd/input-number/ReadPretty.js +3 -5
  411. package/es/schema-component/antd/kanban/Kanban.Card.Designer.TitleSwitch.d.ts +1 -0
  412. package/es/schema-component/antd/kanban/Kanban.Card.Designer.TitleSwitch.js +26 -0
  413. package/es/schema-component/antd/kanban/Kanban.Card.Designer.js +22 -22
  414. package/es/schema-component/antd/kanban/Kanban.Card.js +25 -38
  415. package/es/schema-component/antd/kanban/Kanban.Designer.js +19 -20
  416. package/es/schema-component/antd/kanban/Kanban.js +32 -59
  417. package/es/schema-component/antd/kanban/index.js +2 -0
  418. package/es/schema-component/antd/kanban/index.less +8 -5
  419. package/es/schema-component/antd/markdown/Markdown.Void.Designer.js +1 -3
  420. package/es/schema-component/antd/markdown/Markdown.Void.js +43 -58
  421. package/es/schema-component/antd/markdown/Markdown.js +14 -8
  422. package/es/schema-component/antd/markdown/highlight-theme/default.less +98 -0
  423. package/es/schema-component/antd/markdown/highlight-theme/table.less +36 -0
  424. package/es/schema-component/antd/markdown/markdown-it-plugins/mermaidPlugin.d.ts +5 -0
  425. package/es/schema-component/antd/markdown/markdown-it-plugins/mermaidPlugin.js +63 -0
  426. package/es/schema-component/antd/markdown/md.d.ts +5 -0
  427. package/es/schema-component/antd/markdown/md.js +14 -0
  428. package/es/schema-component/antd/markdown/util.d.ts +5 -1
  429. package/es/schema-component/antd/markdown/util.js +60 -8
  430. package/es/schema-component/antd/menu/Menu.Designer.js +27 -62
  431. package/es/schema-component/antd/menu/Menu.js +62 -114
  432. package/es/schema-component/antd/menu/MenuItemInitializers/index.js +170 -196
  433. package/es/schema-component/antd/menu/util.js +2 -21
  434. package/es/schema-component/antd/page/FixedBlock.d.ts +8 -7
  435. package/es/schema-component/antd/page/FixedBlock.js +100 -131
  436. package/es/schema-component/antd/page/Page.js +86 -113
  437. package/es/schema-component/antd/page/PageTabDesigner.js +11 -26
  438. package/es/schema-component/antd/pagination/index.js +6 -11
  439. package/es/schema-component/antd/password/Password.js +7 -12
  440. package/es/schema-component/antd/password/PasswordStrength.js +0 -32
  441. package/es/schema-component/antd/percent/Percent.js +5 -5
  442. package/es/schema-component/antd/preview/Preview.d.ts +15 -0
  443. package/es/schema-component/antd/preview/Preview.js +234 -0
  444. package/es/schema-component/antd/preview/index.d.ts +1 -0
  445. package/es/schema-component/antd/preview/index.js +1 -0
  446. package/es/schema-component/antd/radio/Radio.js +1 -4
  447. package/es/schema-component/antd/record-picker/InputRecordPicker.d.ts +2 -0
  448. package/es/schema-component/antd/record-picker/InputRecordPicker.js +166 -91
  449. package/es/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +30 -46
  450. package/es/schema-component/antd/record-picker/useFieldNames.js +4 -5
  451. package/es/schema-component/antd/record-picker/util.d.ts +1 -1
  452. package/es/schema-component/antd/record-picker/util.js +14 -9
  453. package/es/schema-component/antd/remote-select/ReadPretty.js +22 -30
  454. package/es/schema-component/antd/remote-select/RemoteSelect.d.ts +2 -0
  455. package/es/schema-component/antd/remote-select/RemoteSelect.js +48 -70
  456. package/es/schema-component/antd/remote-select/shared.js +0 -1
  457. package/es/schema-component/antd/rich-text/RichText.js +6 -6
  458. package/es/schema-component/antd/select/ReadPretty.js +4 -9
  459. package/es/schema-component/antd/select/Select.js +15 -37
  460. package/es/schema-component/antd/select/shared.js +5 -25
  461. package/es/schema-component/antd/space/index.js +4 -7
  462. package/es/schema-component/antd/table/Table.Array.js +48 -97
  463. package/es/schema-component/antd/table/Table.Column.ActionBar.js +0 -2
  464. package/es/schema-component/antd/table/Table.Column.Decorator.js +5 -14
  465. package/es/schema-component/antd/table/Table.Column.Designer.js +37 -57
  466. package/es/schema-component/antd/table/Table.Designer.js +2 -3
  467. package/es/schema-component/antd/table/Table.RowActionDesigner.js +1 -3
  468. package/es/schema-component/antd/table/Table.RowSelection.js +6 -18
  469. package/es/schema-component/antd/table/Table.Void.Designer.js +8 -17
  470. package/es/schema-component/antd/table/Table.Void.js +17 -43
  471. package/es/schema-component/antd/table-v2/FilterDynamicComponent.d.ts +2 -0
  472. package/es/schema-component/antd/table-v2/FilterDynamicComponent.js +150 -0
  473. package/es/schema-component/antd/table-v2/Table.ActionColumnDesigner.js +1 -3
  474. package/es/schema-component/antd/table-v2/Table.Column.ActionBar.js +0 -2
  475. package/es/schema-component/antd/table-v2/Table.Column.Decorator.js +6 -17
  476. package/es/schema-component/antd/table-v2/Table.Column.Designer.js +28 -34
  477. package/es/schema-component/antd/table-v2/Table.Designer.js +2 -3
  478. package/es/schema-component/antd/table-v2/Table.js +145 -156
  479. package/es/schema-component/antd/table-v2/TableBlockDesigner.js +62 -46
  480. package/es/schema-component/antd/table-v2/TableField.js +5 -11
  481. package/es/schema-component/antd/table-v2/TableSelectorDesigner.js +42 -27
  482. package/es/schema-component/antd/table-v2/hooks/useUserVariable.d.ts +10 -0
  483. package/es/schema-component/antd/table-v2/hooks/useUserVariable.js +56 -0
  484. package/es/schema-component/antd/table-v2/utils.d.ts +2 -0
  485. package/es/schema-component/antd/table-v2/utils.js +38 -2
  486. package/es/schema-component/antd/tabs/Tabs.Designer.js +7 -9
  487. package/es/schema-component/antd/tabs/Tabs.js +1 -5
  488. package/es/schema-component/antd/time-picker/ReadPretty.js +2 -4
  489. package/es/schema-component/antd/time-picker/TimePicker.js +4 -6
  490. package/es/schema-component/antd/tree-select/ReadPretty.js +1 -8
  491. package/es/schema-component/antd/tree-select/TreeSelect.js +4 -4
  492. package/es/schema-component/antd/upload/ReadPretty.d.ts +1 -1
  493. package/es/schema-component/antd/upload/ReadPretty.js +18 -26
  494. package/es/schema-component/antd/upload/Upload.js +73 -58
  495. package/es/schema-component/antd/upload/shared.js +14 -53
  496. package/es/schema-component/antd/upload/type.d.ts +11 -0
  497. package/es/schema-component/antd/variable/Input.js +57 -67
  498. package/es/schema-component/antd/variable/JSONInput.js +19 -31
  499. package/es/schema-component/antd/variable/TextArea.d.ts +3 -0
  500. package/es/schema-component/antd/variable/TextArea.js +256 -161
  501. package/es/schema-component/antd/variable/Variable.js +2 -2
  502. package/es/schema-component/antd/variable/VariableSelect.d.ts +2 -0
  503. package/es/schema-component/antd/variable/VariableSelect.js +65 -0
  504. package/es/schema-component/antd/variable/XButton.d.ts +9 -0
  505. package/es/schema-component/antd/variable/XButton.js +17 -0
  506. package/es/schema-component/common/dnd-context/index.js +13 -39
  507. package/es/schema-component/common/sortable-item/SortableItem.js +21 -37
  508. package/es/schema-component/common/utils/logic.js +74 -93
  509. package/es/schema-component/common/utils/uitls.js +47 -43
  510. package/es/schema-component/core/DesignableSwitch.js +12 -14
  511. package/es/schema-component/core/FormProvider.js +5 -12
  512. package/es/schema-component/core/RemoteSchemaComponent.js +21 -30
  513. package/es/schema-component/core/SchemaComponent.js +12 -26
  514. package/es/schema-component/core/SchemaComponentOptions.js +4 -7
  515. package/es/schema-component/core/SchemaComponentProvider.js +19 -35
  516. package/es/schema-component/hooks/index.d.ts +2 -0
  517. package/es/schema-component/hooks/index.js +3 -1
  518. package/es/schema-component/hooks/useAttach.js +0 -1
  519. package/es/schema-component/hooks/useCompile.js +4 -5
  520. package/es/schema-component/hooks/useComponent.js +1 -4
  521. package/es/schema-component/hooks/useDesignable.js +205 -385
  522. package/es/schema-component/hooks/useDesigner.js +1 -4
  523. package/es/schema-component/hooks/useFieldComponentOptions.js +18 -13
  524. package/es/schema-component/hooks/useFieldProps.js +4 -5
  525. package/es/schema-component/hooks/useFieldTitle.js +2 -7
  526. package/es/schema-component/hooks/useProps.js +1 -5
  527. package/es/schema-component/hooks/useTableSize.d.ts +5 -0
  528. package/es/schema-component/hooks/useTableSize.js +42 -0
  529. package/es/schema-initializer/SchemaInitializer.js +47 -82
  530. package/es/schema-initializer/SchemaInitializerProvider.js +10 -16
  531. package/es/schema-initializer/SelectCollection.js +4 -9
  532. package/es/schema-initializer/buttons/BlockInitializers.js +22 -2
  533. package/es/schema-initializer/buttons/BulkEditFormItemInitializers.js +2 -3
  534. package/es/schema-initializer/buttons/CalendarActionInitializers.d.ts +4 -0
  535. package/es/schema-initializer/buttons/CalendarActionInitializers.js +5 -0
  536. package/es/schema-initializer/buttons/CalendarFormActionInitializers.d.ts +6 -0
  537. package/es/schema-initializer/buttons/CalendarFormActionInitializers.js +21 -0
  538. package/es/schema-initializer/buttons/CreateFormBlockInitializers.js +2 -3
  539. package/es/schema-initializer/buttons/CreateFormBulkEditBlockInitializers.js +2 -3
  540. package/es/schema-initializer/buttons/CustomFormItemInitializers.js +4 -7
  541. package/es/schema-initializer/buttons/FilterFormActionInitializers.d.ts +16 -0
  542. package/es/schema-initializer/buttons/FilterFormActionInitializers.js +24 -0
  543. package/es/schema-initializer/buttons/FormItemInitializers.d.ts +1 -0
  544. package/es/schema-initializer/buttons/FormItemInitializers.js +62 -8
  545. package/es/schema-initializer/buttons/GanttActionInitializers.d.ts +133 -0
  546. package/es/schema-initializer/buttons/GanttActionInitializers.js +9 -0
  547. package/es/schema-initializer/buttons/KanbanActionInitializers.d.ts +2 -0
  548. package/es/schema-initializer/buttons/KanbanActionInitializers.js +5 -0
  549. package/es/schema-initializer/buttons/ReadPrettyFormActionInitializers.d.ts +6 -0
  550. package/es/schema-initializer/buttons/ReadPrettyFormActionInitializers.js +17 -0
  551. package/es/schema-initializer/buttons/ReadPrettyFormItemInitializers.js +2 -6
  552. package/es/schema-initializer/buttons/RecordBlockInitializers.js +31 -47
  553. package/es/schema-initializer/buttons/RecordFormBlockInitializers.js +1 -2
  554. package/es/schema-initializer/buttons/SubTableActionInitializers.js +4 -4
  555. package/es/schema-initializer/buttons/TabPaneInitializers.js +53 -66
  556. package/es/schema-initializer/buttons/TableActionColumnInitializers.js +38 -18
  557. package/es/schema-initializer/buttons/TableActionInitializers.d.ts +17 -0
  558. package/es/schema-initializer/buttons/TableActionInitializers.js +51 -16
  559. package/es/schema-initializer/buttons/TableColumnInitializers.js +9 -15
  560. package/es/schema-initializer/buttons/TableSelectorInitializers.js +2 -3
  561. package/es/schema-initializer/buttons/index.d.ts +2 -0
  562. package/es/schema-initializer/buttons/index.js +4 -2
  563. package/es/schema-initializer/components/BulkEditField.js +31 -56
  564. package/es/schema-initializer/components/CreateRecordAction.js +74 -69
  565. package/es/schema-initializer/components/assigned-field/AssignedField.js +33 -77
  566. package/es/schema-initializer/index.d.ts +1 -1
  567. package/es/schema-initializer/index.js +1 -1
  568. package/es/schema-initializer/items/ActionInitializer.js +4 -4
  569. package/es/schema-initializer/items/BlockInitializer.js +4 -5
  570. package/es/schema-initializer/items/BulkDestroyActionInitializer.js +4 -6
  571. package/es/schema-initializer/items/BulkEditSubmitActionInitializer.js +4 -4
  572. package/es/schema-initializer/items/CalendarBlockInitializer.js +61 -71
  573. package/es/schema-initializer/items/CollectionFieldInitializer.js +6 -6
  574. package/es/schema-initializer/items/CreateActionInitializer.js +5 -4
  575. package/es/schema-initializer/items/CreateChildInitializer.d.ts +1 -0
  576. package/es/schema-initializer/items/CreateChildInitializer.js +62 -0
  577. package/es/schema-initializer/items/CreateFilterActionInitializer.d.ts +1 -0
  578. package/es/schema-initializer/items/CreateFilterActionInitializer.js +23 -0
  579. package/es/schema-initializer/items/CreateFormBlockInitializer.js +51 -70
  580. package/es/schema-initializer/items/CreateFormBulkEditBlockInitializer.js +47 -66
  581. package/es/schema-initializer/items/CreateResetActionInitializer.d.ts +1 -0
  582. package/es/schema-initializer/items/CreateResetActionInitializer.js +21 -0
  583. package/es/schema-initializer/items/CreateSubmitActionInitializer.js +6 -6
  584. package/es/schema-initializer/items/CustomizeActionInitializer.js +4 -6
  585. package/es/schema-initializer/items/CustomizeBulkEditActionInitializer.js +4 -4
  586. package/es/schema-initializer/items/DataBlockInitializer.js +44 -61
  587. package/es/schema-initializer/items/DeleteEventActionInitializer.js +4 -4
  588. package/es/schema-initializer/items/DestroyActionInitializer.js +4 -4
  589. package/es/schema-initializer/items/DetailsBlockInitializer.js +25 -32
  590. package/es/schema-initializer/items/ExpandActionInitializer.d.ts +2 -0
  591. package/es/schema-initializer/items/ExpandActionInitializer.js +58 -0
  592. package/es/schema-initializer/items/FilterActionInitializer.js +4 -4
  593. package/es/schema-initializer/items/FilterBlockInitializer.d.ts +1 -0
  594. package/es/schema-initializer/items/FilterBlockInitializer.js +77 -0
  595. package/es/schema-initializer/items/FilterCollapseBlockInitializer.d.ts +1 -0
  596. package/es/schema-initializer/items/FilterCollapseBlockInitializer.js +44 -0
  597. package/es/schema-initializer/items/FilterFormBlockInitializer.d.ts +1 -0
  598. package/es/schema-initializer/items/FilterFormBlockInitializer.js +28 -0
  599. package/es/schema-initializer/items/FormBlockInitializer.js +4 -6
  600. package/es/schema-initializer/items/G2PlotInitializer.js +6 -10
  601. package/es/schema-initializer/items/GanttBlockInitializer.d.ts +1 -0
  602. package/es/schema-initializer/items/GanttBlockInitializer.js +166 -0
  603. package/es/schema-initializer/items/InitializerWithSwitch.js +8 -12
  604. package/es/schema-initializer/items/KanbanBlockInitializer.js +85 -100
  605. package/es/schema-initializer/items/MarkdownBlockInitializer.js +5 -7
  606. package/es/schema-initializer/items/PrintActionInitializer.js +4 -4
  607. package/es/schema-initializer/items/RecordAssociationBlockInitializer.js +37 -53
  608. package/es/schema-initializer/items/RecordAssociationCalendarBlockInitializer.js +93 -115
  609. package/es/schema-initializer/items/RecordAssociationDetailsBlockInitializer.js +37 -53
  610. package/es/schema-initializer/items/RecordAssociationFormBlockInitializer.js +52 -71
  611. package/es/schema-initializer/items/RecordFormBlockInitializer.js +49 -68
  612. package/es/schema-initializer/items/RecordReadPrettyAssociationFormBlockInitializer.js +51 -72
  613. package/es/schema-initializer/items/RecordReadPrettyFormBlockInitializer.js +52 -73
  614. package/es/schema-initializer/items/RefreshActionInitializer.js +4 -4
  615. package/es/schema-initializer/items/SubmitActionInitializer.js +7 -6
  616. package/es/schema-initializer/items/TableActionColumnInitializer.js +4 -4
  617. package/es/schema-initializer/items/TableBlockInitializer.js +24 -32
  618. package/es/schema-initializer/items/TableCollectionFieldInitializer.js +4 -4
  619. package/es/schema-initializer/items/TableSelectorInitializer.js +24 -35
  620. package/es/schema-initializer/items/UpdateActionInitializer.js +4 -4
  621. package/es/schema-initializer/items/UpdateSubmitActionInitializer.js +4 -4
  622. package/es/schema-initializer/items/ViewActionInitializer.js +4 -4
  623. package/es/schema-initializer/items/index.d.ts +7 -0
  624. package/es/schema-initializer/items/index.js +9 -2
  625. package/es/schema-initializer/utils.d.ts +174 -1
  626. package/es/schema-initializer/utils.js +665 -336
  627. package/es/schema-items/OpenModeSchemaItems.d.ts +7 -0
  628. package/es/schema-items/OpenModeSchemaItems.js +78 -0
  629. package/es/schema-items/index.d.ts +1 -0
  630. package/es/schema-items/index.js +1 -0
  631. package/es/schema-settings/DataTemplates/FormDataTemplates.d.ts +2 -0
  632. package/es/schema-settings/DataTemplates/FormDataTemplates.js +174 -0
  633. package/es/schema-settings/DataTemplates/TreeLabel.d.ts +1 -0
  634. package/es/schema-settings/DataTemplates/TreeLabel.js +19 -0
  635. package/es/schema-settings/DataTemplates/components/AsDefaultTemplate.d.ts +2 -0
  636. package/es/schema-settings/DataTemplates/components/AsDefaultTemplate.js +47 -0
  637. package/es/schema-settings/DataTemplates/components/DataTemplateTitle.d.ts +11 -0
  638. package/es/schema-settings/DataTemplates/components/DataTemplateTitle.js +261 -0
  639. package/es/schema-settings/DataTemplates/hooks/useCollectionState.d.ts +13 -0
  640. package/es/schema-settings/DataTemplates/hooks/useCollectionState.js +146 -0
  641. package/es/schema-settings/DataTemplates/index.d.ts +1 -0
  642. package/es/schema-settings/DataTemplates/index.js +1 -0
  643. package/es/schema-settings/EnableChildCollections/index.js +28 -38
  644. package/es/schema-settings/GeneralSchemaDesigner.js +11 -20
  645. package/es/schema-settings/LinkageRules/DynamicComponent.js +9 -61
  646. package/es/schema-settings/LinkageRules/FilterDynamicComponent.js +3 -3
  647. package/es/schema-settings/LinkageRules/LinkageRuleAction.js +34 -49
  648. package/es/schema-settings/LinkageRules/LinkageRuleActionGroup.js +9 -13
  649. package/es/schema-settings/LinkageRules/ValueDynamicComponent.js +37 -29
  650. package/es/schema-settings/LinkageRules/Variables.js +11 -34
  651. package/es/schema-settings/LinkageRules/action-hooks.js +5 -20
  652. package/es/schema-settings/LinkageRules/components/EnableLinkage.d.ts +2 -0
  653. package/es/schema-settings/LinkageRules/components/EnableLinkage.js +40 -0
  654. package/es/schema-settings/LinkageRules/components/LinkageHeader.d.ts +11 -0
  655. package/es/schema-settings/LinkageRules/components/LinkageHeader.js +252 -0
  656. package/es/schema-settings/LinkageRules/context.d.ts +1 -1
  657. package/es/schema-settings/LinkageRules/context.js +1 -1
  658. package/es/schema-settings/LinkageRules/index.js +20 -18
  659. package/es/schema-settings/LinkageRules/type.js +0 -1
  660. package/es/schema-settings/LinkageRules/useValues.js +10 -21
  661. package/es/schema-settings/SchemaSettings.d.ts +3 -0
  662. package/es/schema-settings/SchemaSettings.js +733 -586
  663. package/es/schema-templates/BlockTemplate.js +3 -11
  664. package/es/schema-templates/BlockTemplateDetails.js +35 -52
  665. package/es/schema-templates/BlockTemplatePage.js +2 -3
  666. package/es/schema-templates/SchemaTemplateManagerProvider.js +100 -145
  667. package/es/schema-templates/SchemaTemplateShortcut.js +1 -2
  668. package/es/schema-templates/schemas/uiSchemaTemplates.js +41 -63
  669. package/es/settings-form/SettingsForm.js +87 -125
  670. package/es/system-settings/SystemSettingsProvider.js +14 -2
  671. package/es/system-settings/SystemSettingsShortcut.js +80 -98
  672. package/es/user/ChangePassword.js +43 -65
  673. package/es/user/CurrentUser.js +29 -44
  674. package/es/user/CurrentUserProvider.js +1 -6
  675. package/es/user/EditProfile.js +44 -69
  676. package/es/user/LanguageSettings.js +38 -53
  677. package/es/user/SigninPage.js +38 -56
  678. package/es/user/SigninPageExtension.js +3 -11
  679. package/es/user/SignupPage.js +29 -42
  680. package/es/user/SwitchRole.js +30 -38
  681. package/es/user/ThemeSettings.d.ts +1 -0
  682. package/es/user/ThemeSettings.js +70 -0
  683. package/es/user/VerificationCode.js +51 -76
  684. package/lib/acl/ACLProvider.js +34 -162
  685. package/lib/acl/ACLShortcut.js +11 -38
  686. package/lib/acl/Configuration/ConfigureCenter.js +56 -112
  687. package/lib/acl/Configuration/MenuConfigure.js +91 -159
  688. package/lib/acl/Configuration/MenuItemsProvider.js +0 -21
  689. package/lib/acl/Configuration/PermisionProvider.js +53 -96
  690. package/lib/acl/Configuration/RoleConfigure.js +21 -59
  691. package/lib/acl/Configuration/RoleTable.js +5 -23
  692. package/lib/acl/Configuration/RolesResourcesActions.js +10 -67
  693. package/lib/acl/Configuration/ScopeSelect.js +5 -26
  694. package/lib/acl/Configuration/StrategyActions.js +10 -38
  695. package/lib/acl/Configuration/index.js +0 -6
  696. package/lib/acl/Configuration/schemas/roleCollections.js +0 -3
  697. package/lib/acl/Configuration/schemas/roles.js +4 -13
  698. package/lib/acl/Configuration/schemas/scopes.js +4 -13
  699. package/lib/acl/Configuration/schemas/useRoleResourceValues.js +5 -12
  700. package/lib/acl/Configuration/schemas/useSaveRoleResourceAction.js +23 -34
  701. package/lib/acl/index.js +0 -5
  702. package/lib/acl/style.less +1 -1
  703. package/lib/antd-config-provider/index.js +29 -57
  704. package/lib/antd-config-provider/loadConstrueLocale.js +4 -12
  705. package/lib/api-client/APIClient.js +10 -47
  706. package/lib/api-client/APIClientProvider.js +1 -6
  707. package/lib/api-client/context.js +0 -3
  708. package/lib/api-client/hooks/assign.js +0 -23
  709. package/lib/api-client/hooks/index.js +0 -6
  710. package/lib/api-client/hooks/useAPIClient.js +0 -3
  711. package/lib/api-client/hooks/useRequest.js +35 -68
  712. package/lib/api-client/hooks/useResource.js +0 -3
  713. package/lib/api-client/index.js +0 -8
  714. package/lib/appInfo/CurrentAppInfoProvider.js +16 -14
  715. package/lib/appInfo/index.js +0 -2
  716. package/lib/application/Application.js +82 -147
  717. package/lib/application/compose.js +12 -26
  718. package/lib/application/index.js +0 -4
  719. package/lib/async-data-provider/index.js +6 -22
  720. package/lib/block-provider/BlockProvider.d.ts +1 -0
  721. package/lib/block-provider/BlockProvider.js +56 -136
  722. package/lib/block-provider/BlockSchemaComponentProvider.js +10 -24
  723. package/lib/block-provider/CalendarBlockProvider.d.ts +1 -0
  724. package/lib/block-provider/CalendarBlockProvider.js +16 -32
  725. package/lib/block-provider/DetailsBlockProvider.js +11 -32
  726. package/lib/block-provider/FilterFormBlockProvider.d.ts +1 -0
  727. package/lib/block-provider/FilterFormBlockProvider.js +24 -0
  728. package/lib/block-provider/FormBlockProvider.d.ts +3 -0
  729. package/lib/block-provider/FormBlockProvider.js +73 -49
  730. package/lib/block-provider/FormFieldProvider.js +17 -39
  731. package/lib/block-provider/GanttBlockProvider.d.ts +11 -0
  732. package/lib/block-provider/GanttBlockProvider.js +162 -0
  733. package/lib/block-provider/KanbanBlockProvider.js +52 -127
  734. package/lib/block-provider/SharedFilterProvider.js +10 -36
  735. package/lib/block-provider/TableBlockProvider.d.ts +3 -0
  736. package/lib/block-provider/TableBlockProvider.js +162 -114
  737. package/lib/block-provider/TableFieldProvider.js +107 -177
  738. package/lib/block-provider/TableSelectorProvider.d.ts +18 -1
  739. package/lib/block-provider/TableSelectorProvider.js +107 -123
  740. package/lib/block-provider/hooks/index.d.ts +37 -0
  741. package/lib/block-provider/hooks/index.js +1097 -1015
  742. package/lib/block-provider/index.d.ts +4 -0
  743. package/lib/block-provider/index.js +33 -18
  744. package/lib/board/Board.js +110 -169
  745. package/lib/board/Card.js +7 -12
  746. package/lib/board/CardAdder.js +6 -23
  747. package/lib/board/CardForm.js +1 -10
  748. package/lib/board/Column.js +27 -52
  749. package/lib/board/ColumnAdder.js +5 -22
  750. package/lib/board/ColumnForm.js +1 -10
  751. package/lib/board/DefaultCard.js +3 -7
  752. package/lib/board/DefaultColumnHeader.js +17 -38
  753. package/lib/board/Kanban.js +5 -26
  754. package/lib/board/helpers.js +7 -24
  755. package/lib/board/index.js +0 -2
  756. package/lib/board/services.js +4 -12
  757. package/lib/board/utils.js +5 -24
  758. package/lib/board/withDroppable.js +5 -14
  759. package/lib/china-region/index.js +5 -27
  760. package/lib/collection-manager/CollectionField.js +14 -51
  761. package/lib/collection-manager/CollectionFieldProvider.js +5 -17
  762. package/lib/collection-manager/CollectionHistoryProvider.js +23 -47
  763. package/lib/collection-manager/CollectionManagerProvider.js +86 -140
  764. package/lib/collection-manager/CollectionManagerSchemaComponentProvider.js +4 -16
  765. package/lib/collection-manager/CollectionManagerShortcut.js +17 -42
  766. package/lib/collection-manager/CollectionProvider.js +4 -14
  767. package/lib/collection-manager/Configuration/AddCategoryAction.js +35 -73
  768. package/lib/collection-manager/Configuration/AddCollectionAction.js +105 -151
  769. package/lib/collection-manager/Configuration/AddFieldAction.js +86 -132
  770. package/lib/collection-manager/Configuration/AddSubFieldAction.js +36 -74
  771. package/lib/collection-manager/Configuration/CollectionFieldsTable.js +10 -26
  772. package/lib/collection-manager/Configuration/CollectionFieldsTableArray.js +35 -98
  773. package/lib/collection-manager/Configuration/ConfigurationTable.js +159 -135
  774. package/lib/collection-manager/Configuration/ConfigurationTabs.js +94 -163
  775. package/lib/collection-manager/Configuration/EditCategoryAction.js +43 -85
  776. package/lib/collection-manager/Configuration/EditCollectionAction.js +59 -120
  777. package/lib/collection-manager/Configuration/EditFieldAction.js +101 -154
  778. package/lib/collection-manager/Configuration/EditSubFieldAction.js +54 -103
  779. package/lib/collection-manager/Configuration/OverridingCollectionField.js +88 -155
  780. package/lib/collection-manager/Configuration/SyncFieldsAction.d.ts +2 -0
  781. package/lib/collection-manager/Configuration/SyncFieldsAction.js +245 -0
  782. package/lib/collection-manager/Configuration/ViewInheritedField.js +50 -99
  783. package/lib/collection-manager/Configuration/components/CollectionCategory.js +0 -6
  784. package/lib/collection-manager/Configuration/components/CollectionFieldInterface.js +1 -10
  785. package/lib/collection-manager/Configuration/components/CollectionTemplate.js +1 -10
  786. package/lib/collection-manager/Configuration/components/FieldSummary.js +2 -17
  787. package/lib/collection-manager/Configuration/components/TemplateSummay.d.ts +2 -0
  788. package/lib/collection-manager/Configuration/components/TemplateSummay.js +34 -0
  789. package/lib/collection-manager/Configuration/components/index.js +5 -26
  790. package/lib/collection-manager/Configuration/index.d.ts +1 -0
  791. package/lib/collection-manager/Configuration/index.js +11 -29
  792. package/lib/collection-manager/Configuration/interfaces.js +4 -20
  793. package/lib/collection-manager/Configuration/schemas/collectionFields.js +17 -5
  794. package/lib/collection-manager/Configuration/schemas/collections.js +22 -39
  795. package/lib/collection-manager/Configuration/templates.js +6 -16
  796. package/lib/collection-manager/ResourceActionProvider.js +18 -55
  797. package/lib/collection-manager/action-hooks.d.ts +2 -0
  798. package/lib/collection-manager/action-hooks.js +425 -485
  799. package/lib/collection-manager/context.js +0 -2
  800. package/lib/collection-manager/hooks/index.js +0 -8
  801. package/lib/collection-manager/hooks/useCollection.d.ts +4 -0
  802. package/lib/collection-manager/hooks/useCollection.js +12 -16
  803. package/lib/collection-manager/hooks/useCollectionDataSource.d.ts +1 -1
  804. package/lib/collection-manager/hooks/useCollectionDataSource.js +5 -10
  805. package/lib/collection-manager/hooks/useCollectionField.js +4 -14
  806. package/lib/collection-manager/hooks/useCollectionManager.d.ts +23 -3
  807. package/lib/collection-manager/hooks/useCollectionManager.js +127 -97
  808. package/lib/collection-manager/hooks/useOptions.js +5 -13
  809. package/lib/collection-manager/index.d.ts +1 -1
  810. package/lib/collection-manager/index.js +7 -36
  811. package/lib/collection-manager/interfaces/attachment.js +5 -12
  812. package/lib/collection-manager/interfaces/checkbox.js +5 -6
  813. package/lib/collection-manager/interfaces/checkboxGroup.js +5 -6
  814. package/lib/collection-manager/interfaces/chinaRegion.js +5 -11
  815. package/lib/collection-manager/interfaces/components/index.js +0 -15
  816. package/lib/collection-manager/interfaces/createdAt.js +5 -6
  817. package/lib/collection-manager/interfaces/createdBy.js +5 -7
  818. package/lib/collection-manager/interfaces/datetime.js +5 -6
  819. package/lib/collection-manager/interfaces/email.js +5 -6
  820. package/lib/collection-manager/interfaces/icon.js +6 -7
  821. package/lib/collection-manager/interfaces/id.js +1 -2
  822. package/lib/collection-manager/interfaces/index.d.ts +1 -0
  823. package/lib/collection-manager/interfaces/index.js +11 -64
  824. package/lib/collection-manager/interfaces/input.js +5 -8
  825. package/lib/collection-manager/interfaces/integer.js +6 -9
  826. package/lib/collection-manager/interfaces/json.js +8 -9
  827. package/lib/collection-manager/interfaces/linkTo.js +25 -16
  828. package/lib/collection-manager/interfaces/m2m.js +21 -18
  829. package/lib/collection-manager/interfaces/m2o.js +21 -13
  830. package/lib/collection-manager/interfaces/markdown.js +5 -8
  831. package/lib/collection-manager/interfaces/multipleSelect.js +5 -6
  832. package/lib/collection-manager/interfaces/number.js +6 -8
  833. package/lib/collection-manager/interfaces/o2m.js +12 -15
  834. package/lib/collection-manager/interfaces/o2o.js +42 -32
  835. package/lib/collection-manager/interfaces/password.js +6 -8
  836. package/lib/collection-manager/interfaces/percent.js +11 -19
  837. package/lib/collection-manager/interfaces/phone.js +8 -8
  838. package/lib/collection-manager/interfaces/properties/index.js +7 -14
  839. package/lib/collection-manager/interfaces/properties/operators.d.ts +11 -19
  840. package/lib/collection-manager/interfaces/properties/operators.js +6 -21
  841. package/lib/collection-manager/interfaces/radioGroup.js +5 -6
  842. package/lib/collection-manager/interfaces/richText.js +5 -8
  843. package/lib/collection-manager/interfaces/select.js +5 -6
  844. package/lib/collection-manager/interfaces/subTable.js +15 -15
  845. package/lib/collection-manager/interfaces/textarea.js +5 -8
  846. package/lib/collection-manager/interfaces/time.js +5 -6
  847. package/lib/collection-manager/interfaces/updatedAt.js +5 -6
  848. package/lib/collection-manager/interfaces/updatedBy.js +5 -7
  849. package/lib/collection-manager/interfaces/url.d.ts +2 -0
  850. package/lib/collection-manager/interfaces/url.js +37 -0
  851. package/lib/collection-manager/sub-table.js +79 -136
  852. package/lib/collection-manager/templates/calendar.js +11 -12
  853. package/lib/collection-manager/templates/components/PreviewFields.d.ts +2 -0
  854. package/lib/collection-manager/templates/components/PreviewFields.js +265 -0
  855. package/lib/collection-manager/templates/components/PreviewTable.d.ts +1 -0
  856. package/lib/collection-manager/templates/components/PreviewTable.js +142 -0
  857. package/lib/collection-manager/templates/expression.d.ts +2 -0
  858. package/lib/collection-manager/templates/expression.js +59 -0
  859. package/lib/collection-manager/templates/general.js +0 -2
  860. package/lib/collection-manager/templates/index.d.ts +3 -0
  861. package/lib/collection-manager/templates/index.js +33 -4
  862. package/lib/collection-manager/templates/properties/index.d.ts +1 -1
  863. package/lib/collection-manager/templates/properties/index.js +5 -17
  864. package/lib/collection-manager/templates/tree.d.ts +2 -0
  865. package/lib/collection-manager/templates/tree.js +77 -0
  866. package/lib/collection-manager/templates/types.d.ts +6 -0
  867. package/lib/collection-manager/templates/view.d.ts +2 -0
  868. package/lib/collection-manager/templates/view.js +142 -0
  869. package/lib/collection-manager/types.d.ts +2 -0
  870. package/lib/document-title/index.js +7 -32
  871. package/lib/filter-provider/FilterProvider.d.ts +45 -0
  872. package/lib/filter-provider/FilterProvider.js +154 -0
  873. package/lib/filter-provider/index.d.ts +2 -0
  874. package/lib/filter-provider/index.js +27 -0
  875. package/lib/filter-provider/utils.d.ts +27 -0
  876. package/lib/filter-provider/utils.js +184 -0
  877. package/lib/formula/Expression.js +47 -124
  878. package/lib/formula/Result.js +13 -45
  879. package/lib/formula/index.js +0 -5
  880. package/lib/i18n/i18n.js +2 -8
  881. package/lib/i18n/index.js +0 -2
  882. package/lib/icon/Icon.js +6 -31
  883. package/lib/icon/index.js +0 -2
  884. package/lib/index.d.ts +1 -1
  885. package/lib/index.js +11 -55
  886. package/lib/locale/en_US.d.ts +67 -4
  887. package/lib/locale/en_US.js +68 -5
  888. package/lib/locale/index.js +0 -3
  889. package/lib/locale/ja_JP.d.ts +54 -2
  890. package/lib/locale/ja_JP.js +55 -4
  891. package/lib/locale/pt_BR.d.ts +650 -0
  892. package/lib/locale/pt_BR.js +656 -0
  893. package/lib/locale/ru_RU.d.ts +29 -2
  894. package/lib/locale/ru_RU.js +30 -3
  895. package/lib/locale/tr_TR.d.ts +30 -2
  896. package/lib/locale/tr_TR.js +31 -3
  897. package/lib/locale/zh_CN.d.ts +84 -6
  898. package/lib/locale/zh_CN.js +85 -7
  899. package/lib/plugin-manager/PinnedPluginListProvider.d.ts +5 -0
  900. package/lib/plugin-manager/PinnedPluginListProvider.js +60 -0
  901. package/lib/plugin-manager/PluginManager.js +22 -73
  902. package/lib/plugin-manager/PluginManagerProvider.js +1 -6
  903. package/lib/plugin-manager/context.d.ts +3 -0
  904. package/lib/plugin-manager/context.js +6 -4
  905. package/lib/plugin-manager/index.d.ts +1 -0
  906. package/lib/plugin-manager/index.js +11 -6
  907. package/lib/pm/PluginManagerLink.js +22 -63
  908. package/lib/pm/index.js +246 -235
  909. package/lib/powered-by/index.js +1 -10
  910. package/lib/record-provider/index.js +8 -29
  911. package/lib/route-switch/RouteSwitch.js +5 -17
  912. package/lib/route-switch/RouteSwitchProvider.js +10 -19
  913. package/lib/route-switch/antd/admin-layout/index.js +43 -94
  914. package/lib/route-switch/antd/auth-layout/index.js +1 -11
  915. package/lib/route-switch/antd/index.js +0 -6
  916. package/lib/route-switch/antd/route-schema-component/index.js +0 -5
  917. package/lib/route-switch/context.js +0 -2
  918. package/lib/route-switch/hooks.js +2 -13
  919. package/lib/route-switch/index.js +0 -12
  920. package/lib/schema-component/antd/AntdSchemaComponentProvider.js +4 -17
  921. package/lib/schema-component/antd/action/Action.Container.js +5 -16
  922. package/lib/schema-component/antd/action/Action.Designer.js +52 -146
  923. package/lib/schema-component/antd/action/Action.Drawer.js +11 -30
  924. package/lib/schema-component/antd/action/Action.Link.js +4 -9
  925. package/lib/schema-component/antd/action/Action.Modal.d.ts +2 -1
  926. package/lib/schema-component/antd/action/Action.Modal.js +11 -28
  927. package/lib/schema-component/antd/action/Action.Page.js +5 -23
  928. package/lib/schema-component/antd/action/Action.js +42 -90
  929. package/lib/schema-component/antd/action/ActionBar.js +11 -33
  930. package/lib/schema-component/antd/action/context.js +0 -2
  931. package/lib/schema-component/antd/action/hooks.d.ts +1 -0
  932. package/lib/schema-component/antd/action/hooks.js +43 -62
  933. package/lib/schema-component/antd/action/index.js +0 -8
  934. package/lib/schema-component/antd/action/types.d.ts +1 -1
  935. package/lib/schema-component/antd/action/utils.d.ts +1 -1
  936. package/lib/schema-component/antd/action/utils.js +26 -25
  937. package/lib/schema-component/antd/association-filter/ActionBarAssociationFilterAction.js +19 -25
  938. package/lib/schema-component/antd/association-filter/AssociationFilter.BlockDesigner.d.ts +1 -0
  939. package/lib/schema-component/antd/association-filter/AssociationFilter.BlockDesigner.js +42 -0
  940. package/lib/schema-component/antd/association-filter/AssociationFilter.FilterBlockInitializer.d.ts +1 -0
  941. package/lib/schema-component/antd/association-filter/AssociationFilter.FilterBlockInitializer.js +95 -0
  942. package/lib/schema-component/antd/association-filter/AssociationFilter.Initializer.js +13 -25
  943. package/lib/schema-component/antd/association-filter/AssociationFilter.Item.Designer.js +89 -37
  944. package/lib/schema-component/antd/association-filter/AssociationFilter.Item.js +48 -127
  945. package/lib/schema-component/antd/association-filter/AssociationFilter.d.ts +3 -0
  946. package/lib/schema-component/antd/association-filter/AssociationFilter.js +13 -29
  947. package/lib/schema-component/antd/association-filter/AssociationFilterDesignerDelete.js +2 -18
  948. package/lib/schema-component/antd/association-filter/AssociationFilterDesignerDisplayField.js +4 -15
  949. package/lib/schema-component/antd/association-filter/AssociationFilterProvider.d.ts +1 -0
  950. package/lib/schema-component/antd/association-filter/AssociationFilterProvider.js +12 -0
  951. package/lib/schema-component/antd/association-filter/utilts.d.ts +2 -0
  952. package/lib/schema-component/antd/association-filter/utilts.js +10 -0
  953. package/lib/schema-component/antd/association-select/AssociationSelect.d.ts +1 -0
  954. package/lib/schema-component/antd/association-select/AssociationSelect.js +492 -103
  955. package/lib/schema-component/antd/association-select/ReadPretty.js +4 -11
  956. package/lib/schema-component/antd/association-select/index.js +0 -2
  957. package/lib/schema-component/antd/association-select/useServiceOptions.js +8 -21
  958. package/lib/schema-component/antd/block-item/BlockItem.js +0 -10
  959. package/lib/schema-component/antd/block-item/TestDesigner.js +1 -8
  960. package/lib/schema-component/antd/block-item/index.js +0 -4
  961. package/lib/schema-component/antd/calendar/Calendar.Designer.js +22 -40
  962. package/lib/schema-component/antd/calendar/Calendar.js +29 -88
  963. package/lib/schema-component/antd/calendar/DeleteEvent.js +52 -97
  964. package/lib/schema-component/antd/calendar/Event.js +0 -4
  965. package/lib/schema-component/antd/calendar/Nav.js +2 -15
  966. package/lib/schema-component/antd/calendar/Title.js +5 -17
  967. package/lib/schema-component/antd/calendar/Today.js +3 -17
  968. package/lib/schema-component/antd/calendar/ViewSelect.js +5 -16
  969. package/lib/schema-component/antd/calendar/components/Header.js +7 -15
  970. package/lib/schema-component/antd/calendar/context.js +0 -4
  971. package/lib/schema-component/antd/calendar/index.js +0 -12
  972. package/lib/schema-component/antd/calendar/style.less +1 -1
  973. package/lib/schema-component/antd/calendar/utils.js +0 -13
  974. package/lib/schema-component/antd/card-item/CardItem.js +5 -17
  975. package/lib/schema-component/antd/card-item/index.js +0 -2
  976. package/lib/schema-component/antd/cascader/Cascader.js +19 -46
  977. package/lib/schema-component/antd/cascader/ReadPretty.js +3 -20
  978. package/lib/schema-component/antd/cascader/index.js +0 -2
  979. package/lib/schema-component/antd/checkbox/Checkbox.js +5 -16
  980. package/lib/schema-component/antd/checkbox/index.js +0 -2
  981. package/lib/schema-component/antd/collection-select/CollectionSelect.d.ts +8 -0
  982. package/lib/schema-component/antd/collection-select/CollectionSelect.js +69 -0
  983. package/lib/schema-component/antd/collection-select/index.d.ts +1 -0
  984. package/lib/schema-component/antd/collection-select/index.js +16 -0
  985. package/lib/schema-component/antd/color-select/ColorSelect.js +4 -13
  986. package/lib/schema-component/antd/color-select/index.js +0 -2
  987. package/lib/schema-component/antd/cron/Cron.d.ts +6 -3
  988. package/lib/schema-component/antd/cron/Cron.js +22 -26
  989. package/lib/schema-component/antd/cron/CronSet.d.ts +7 -0
  990. package/lib/schema-component/antd/cron/CronSet.js +116 -0
  991. package/lib/schema-component/antd/cron/index.d.ts +1 -0
  992. package/lib/schema-component/antd/cron/index.js +11 -2
  993. package/lib/schema-component/antd/cron/locale/index.d.ts +0 -1
  994. package/lib/schema-component/antd/cron/locale/index.js +1 -7
  995. package/lib/schema-component/antd/cron/locale/zh-CN.js +8 -4
  996. package/lib/schema-component/antd/date-picker/DatePicker.d.ts +8 -4
  997. package/lib/schema-component/antd/date-picker/DatePicker.js +45 -8
  998. package/lib/schema-component/antd/date-picker/ReadPretty.js +0 -18
  999. package/lib/schema-component/antd/date-picker/index.js +0 -2
  1000. package/lib/schema-component/antd/date-picker/util.d.ts +25 -2
  1001. package/lib/schema-component/antd/date-picker/util.js +133 -40
  1002. package/lib/schema-component/antd/details/Details.d.ts +7 -0
  1003. package/lib/schema-component/antd/details/Details.js +9 -0
  1004. package/lib/schema-component/antd/details/index.d.ts +1 -0
  1005. package/lib/schema-component/antd/details/index.js +16 -0
  1006. package/lib/schema-component/antd/filter/DynamicComponent.js +11 -76
  1007. package/lib/schema-component/antd/filter/Filter.Action.Designer.js +10 -39
  1008. package/lib/schema-component/antd/filter/Filter.js +14 -23
  1009. package/lib/schema-component/antd/filter/FilterAction.js +34 -79
  1010. package/lib/schema-component/antd/filter/FilterGroup.js +7 -27
  1011. package/lib/schema-component/antd/filter/FilterItem.js +10 -29
  1012. package/lib/schema-component/antd/filter/FilterItems.js +0 -8
  1013. package/lib/schema-component/antd/filter/SaveDefaultValue.js +4 -22
  1014. package/lib/schema-component/antd/filter/context.js +0 -2
  1015. package/lib/schema-component/antd/filter/index.js +0 -4
  1016. package/lib/schema-component/antd/filter/useFilterActionProps.js +69 -76
  1017. package/lib/schema-component/antd/filter/useOperators.d.ts +5 -0
  1018. package/lib/schema-component/antd/filter/useOperators.js +32 -0
  1019. package/lib/schema-component/antd/filter/useValues.js +15 -47
  1020. package/lib/schema-component/antd/form/Form.Designer.js +2 -9
  1021. package/lib/schema-component/antd/form/Form.js +34 -69
  1022. package/lib/schema-component/antd/form/index.js +0 -2
  1023. package/lib/schema-component/antd/form-item/FormItem.FilterFormDesigner.d.ts +1 -0
  1024. package/lib/schema-component/antd/form-item/FormItem.FilterFormDesigner.js +34 -0
  1025. package/lib/schema-component/antd/form-item/FormItem.js +88 -95
  1026. package/lib/schema-component/antd/form-item/SchemaSettingOptions.d.ts +23 -0
  1027. package/lib/schema-component/antd/form-item/SchemaSettingOptions.js +634 -0
  1028. package/lib/schema-component/antd/form-item/index.js +0 -2
  1029. package/lib/schema-component/antd/form-v2/Form.Designer.js +30 -64
  1030. package/lib/schema-component/antd/form-v2/Form.FilterDesigner.d.ts +5 -0
  1031. package/lib/schema-component/antd/form-v2/Form.FilterDesigner.js +48 -0
  1032. package/lib/schema-component/antd/form-v2/Form.d.ts +2 -0
  1033. package/lib/schema-component/antd/form-v2/Form.js +28 -61
  1034. package/lib/schema-component/antd/form-v2/FormField.js +1 -14
  1035. package/lib/schema-component/antd/form-v2/Templates.d.ts +4 -0
  1036. package/lib/schema-component/antd/form-v2/Templates.js +178 -0
  1037. package/lib/schema-component/antd/form-v2/index.d.ts +1 -1
  1038. package/lib/schema-component/antd/form-v2/index.js +2 -4
  1039. package/lib/schema-component/antd/form-v2/utils.d.ts +0 -1
  1040. package/lib/schema-component/antd/form-v2/utils.js +22 -107
  1041. package/lib/schema-component/antd/g2plot/G2Plot.js +8 -37
  1042. package/lib/schema-component/antd/g2plot/G2PlotDesigner.js +40 -61
  1043. package/lib/schema-component/antd/g2plot/index.js +0 -2
  1044. package/lib/schema-component/antd/g2plot/requestChartData.js +19 -27
  1045. package/lib/schema-component/antd/gantt/Gantt.Designer.d.ts +1 -0
  1046. package/lib/schema-component/antd/gantt/Gantt.Designer.js +222 -0
  1047. package/lib/schema-component/antd/gantt/components/calendar/calendar.d.ts +14 -0
  1048. package/lib/schema-component/antd/gantt/components/calendar/calendar.js +332 -0
  1049. package/lib/schema-component/antd/gantt/components/calendar/style.d.ts +4 -0
  1050. package/lib/schema-component/antd/gantt/components/calendar/style.js +17 -0
  1051. package/lib/schema-component/antd/gantt/components/calendar/top-part-of-calendar.d.ts +11 -0
  1052. package/lib/schema-component/antd/gantt/components/calendar/top-part-of-calendar.js +34 -0
  1053. package/lib/schema-component/antd/gantt/components/gantt/Event.d.ts +2 -0
  1054. package/lib/schema-component/antd/gantt/components/gantt/Event.js +13 -0
  1055. package/lib/schema-component/antd/gantt/components/gantt/gantt.d.ts +5 -0
  1056. package/lib/schema-component/antd/gantt/components/gantt/gantt.js +648 -0
  1057. package/lib/schema-component/antd/gantt/components/gantt/style.d.ts +3 -0
  1058. package/lib/schema-component/antd/gantt/components/gantt/style.js +15 -0
  1059. package/lib/schema-component/antd/gantt/components/gantt/task-gantt-content.d.ts +25 -0
  1060. package/lib/schema-component/antd/gantt/components/gantt/task-gantt-content.js +375 -0
  1061. package/lib/schema-component/antd/gantt/components/gantt/task-gantt.d.ts +14 -0
  1062. package/lib/schema-component/antd/gantt/components/gantt/task-gantt.js +76 -0
  1063. package/lib/schema-component/antd/gantt/components/grid/grid-body.d.ts +13 -0
  1064. package/lib/schema-component/antd/gantt/components/grid/grid-body.js +120 -0
  1065. package/lib/schema-component/antd/gantt/components/grid/grid.d.ts +4 -0
  1066. package/lib/schema-component/antd/gantt/components/grid/grid.js +21 -0
  1067. package/lib/schema-component/antd/gantt/components/grid/style.d.ts +4 -0
  1068. package/lib/schema-component/antd/gantt/components/grid/style.js +17 -0
  1069. package/lib/schema-component/antd/gantt/components/other/arrow.d.ts +12 -0
  1070. package/lib/schema-component/antd/gantt/components/other/arrow.js +65 -0
  1071. package/lib/schema-component/antd/gantt/components/other/horizontal-scroll.d.ts +8 -0
  1072. package/lib/schema-component/antd/gantt/components/other/horizontal-scroll.js +40 -0
  1073. package/lib/schema-component/antd/gantt/components/other/style.d.ts +7 -0
  1074. package/lib/schema-component/antd/gantt/components/other/style.js +23 -0
  1075. package/lib/schema-component/antd/gantt/components/other/tooltip.d.ts +29 -0
  1076. package/lib/schema-component/antd/gantt/components/other/tooltip.js +114 -0
  1077. package/lib/schema-component/antd/gantt/components/other/vertical-scroll.d.ts +9 -0
  1078. package/lib/schema-component/antd/gantt/components/other/vertical-scroll.js +42 -0
  1079. package/lib/schema-component/antd/gantt/components/task-item/bar/bar-date-handle.d.ts +11 -0
  1080. package/lib/schema-component/antd/gantt/components/task-item/bar/bar-date-handle.js +27 -0
  1081. package/lib/schema-component/antd/gantt/components/task-item/bar/bar-display.d.ts +21 -0
  1082. package/lib/schema-component/antd/gantt/components/task-item/bar/bar-display.js +56 -0
  1083. package/lib/schema-component/antd/gantt/components/task-item/bar/bar-progress-handle.d.ts +7 -0
  1084. package/lib/schema-component/antd/gantt/components/task-item/bar/bar-progress-handle.js +18 -0
  1085. package/lib/schema-component/antd/gantt/components/task-item/bar/bar-small.d.ts +3 -0
  1086. package/lib/schema-component/antd/gantt/components/task-item/bar/bar-small.js +46 -0
  1087. package/lib/schema-component/antd/gantt/components/task-item/bar/bar.d.ts +3 -0
  1088. package/lib/schema-component/antd/gantt/components/task-item/bar/bar.js +68 -0
  1089. package/lib/schema-component/antd/gantt/components/task-item/bar/style.d.ts +2 -0
  1090. package/lib/schema-component/antd/gantt/components/task-item/bar/style.js +13 -0
  1091. package/lib/schema-component/antd/gantt/components/task-item/milestone/milestone.d.ts +3 -0
  1092. package/lib/schema-component/antd/gantt/components/task-item/milestone/milestone.js +38 -0
  1093. package/lib/schema-component/antd/gantt/components/task-item/milestone/style.d.ts +2 -0
  1094. package/lib/schema-component/antd/gantt/components/task-item/milestone/style.js +13 -0
  1095. package/lib/schema-component/antd/gantt/components/task-item/project/project.d.ts +3 -0
  1096. package/lib/schema-component/antd/gantt/components/task-item/project/project.js +39 -0
  1097. package/lib/schema-component/antd/gantt/components/task-item/project/style.d.ts +3 -0
  1098. package/lib/schema-component/antd/gantt/components/task-item/project/style.js +15 -0
  1099. package/lib/schema-component/antd/gantt/components/task-item/style.d.ts +3 -0
  1100. package/lib/schema-component/antd/gantt/components/task-item/style.js +15 -0
  1101. package/lib/schema-component/antd/gantt/components/task-item/task-item.d.ts +15 -0
  1102. package/lib/schema-component/antd/gantt/components/task-item/task-item.js +114 -0
  1103. package/lib/schema-component/antd/gantt/context.d.ts +3 -0
  1104. package/lib/schema-component/antd/gantt/context.js +12 -0
  1105. package/lib/schema-component/antd/gantt/helpers/bar-helper.d.ts +14 -0
  1106. package/lib/schema-component/antd/gantt/helpers/bar-helper.js +340 -0
  1107. package/lib/schema-component/antd/gantt/helpers/date-helper.d.ts +18 -0
  1108. package/lib/schema-component/antd/gantt/helpers/date-helper.js +197 -0
  1109. package/lib/schema-component/antd/gantt/helpers/other-helper.d.ts +9 -0
  1110. package/lib/schema-component/antd/gantt/helpers/other-helper.js +78 -0
  1111. package/lib/schema-component/antd/gantt/index.d.ts +2 -0
  1112. package/lib/schema-component/antd/gantt/index.js +21 -0
  1113. package/lib/schema-component/antd/gantt/types/bar-task.d.ts +22 -0
  1114. package/lib/schema-component/antd/gantt/types/bar-task.js +5 -0
  1115. package/lib/schema-component/antd/gantt/types/date-setup.d.ts +5 -0
  1116. package/lib/schema-component/antd/gantt/types/date-setup.js +5 -0
  1117. package/lib/schema-component/antd/gantt/types/gantt-task-actions.d.ts +8 -0
  1118. package/lib/schema-component/antd/gantt/types/gantt-task-actions.js +5 -0
  1119. package/lib/schema-component/antd/gantt/types/public-types.d.ts +136 -0
  1120. package/lib/schema-component/antd/gantt/types/public-types.js +19 -0
  1121. package/lib/schema-component/antd/grid/Block.js +0 -5
  1122. package/lib/schema-component/antd/grid/Grid.js +61 -132
  1123. package/lib/schema-component/antd/grid/index.js +0 -4
  1124. package/lib/schema-component/antd/icon-picker/IconPicker.js +11 -40
  1125. package/lib/schema-component/antd/icon-picker/index.js +0 -2
  1126. package/lib/schema-component/antd/index.d.ts +6 -2
  1127. package/lib/schema-component/antd/index.js +66 -101
  1128. package/lib/schema-component/antd/index.less +28 -0
  1129. package/lib/schema-component/antd/input/EllipsisWithTooltip.js +11 -28
  1130. package/lib/schema-component/antd/input/Input.d.ts +3 -3
  1131. package/lib/schema-component/antd/input/Input.js +17 -24
  1132. package/lib/schema-component/antd/input/Json.d.ts +7 -5
  1133. package/lib/schema-component/antd/input/Json.js +9 -20
  1134. package/lib/schema-component/antd/input/ReadPretty.d.ts +2 -2
  1135. package/lib/schema-component/antd/input/ReadPretty.js +21 -39
  1136. package/lib/schema-component/antd/input/index.js +0 -8
  1137. package/lib/schema-component/antd/input/shared.js +0 -1
  1138. package/lib/schema-component/antd/input-number/InputNumber.js +5 -17
  1139. package/lib/schema-component/antd/input-number/ReadPretty.js +3 -11
  1140. package/lib/schema-component/antd/input-number/index.js +0 -2
  1141. package/lib/schema-component/antd/kanban/Kanban.Card.Designer.TitleSwitch.d.ts +1 -0
  1142. package/lib/schema-component/antd/kanban/Kanban.Card.Designer.TitleSwitch.js +34 -0
  1143. package/lib/schema-component/antd/kanban/Kanban.Card.Designer.js +22 -36
  1144. package/lib/schema-component/antd/kanban/Kanban.Card.js +25 -51
  1145. package/lib/schema-component/antd/kanban/Kanban.CardViewer.js +0 -2
  1146. package/lib/schema-component/antd/kanban/Kanban.Designer.js +18 -32
  1147. package/lib/schema-component/antd/kanban/Kanban.js +31 -77
  1148. package/lib/schema-component/antd/kanban/context.js +0 -2
  1149. package/lib/schema-component/antd/kanban/index.js +2 -7
  1150. package/lib/schema-component/antd/kanban/index.less +8 -5
  1151. package/lib/schema-component/antd/markdown/Markdown.Void.Designer.js +1 -10
  1152. package/lib/schema-component/antd/markdown/Markdown.Void.js +40 -68
  1153. package/lib/schema-component/antd/markdown/Markdown.js +12 -18
  1154. package/lib/schema-component/antd/markdown/highlight-theme/default.less +98 -0
  1155. package/lib/schema-component/antd/markdown/highlight-theme/table.less +36 -0
  1156. package/lib/schema-component/antd/markdown/index.js +0 -2
  1157. package/lib/schema-component/antd/markdown/markdown-it-plugins/mermaidPlugin.d.ts +5 -0
  1158. package/lib/schema-component/antd/markdown/markdown-it-plugins/mermaidPlugin.js +69 -0
  1159. package/lib/schema-component/antd/markdown/md.d.ts +5 -0
  1160. package/lib/schema-component/antd/markdown/md.js +22 -0
  1161. package/lib/schema-component/antd/markdown/util.d.ts +5 -1
  1162. package/lib/schema-component/antd/markdown/util.js +66 -12
  1163. package/lib/schema-component/antd/menu/Menu.Designer.js +27 -72
  1164. package/lib/schema-component/antd/menu/Menu.js +61 -129
  1165. package/lib/schema-component/antd/menu/MenuItemInitializers/index.js +170 -209
  1166. package/lib/schema-component/antd/menu/index.js +0 -6
  1167. package/lib/schema-component/antd/menu/util.js +2 -24
  1168. package/lib/schema-component/antd/page/FixedBlock.d.ts +8 -7
  1169. package/lib/schema-component/antd/page/FixedBlock.js +100 -149
  1170. package/lib/schema-component/antd/page/Page.js +83 -135
  1171. package/lib/schema-component/antd/page/PageTabDesigner.js +11 -38
  1172. package/lib/schema-component/antd/page/index.js +0 -4
  1173. package/lib/schema-component/antd/pagination/index.js +6 -17
  1174. package/lib/schema-component/antd/password/Password.js +7 -18
  1175. package/lib/schema-component/antd/password/PasswordStrength.js +0 -38
  1176. package/lib/schema-component/antd/password/index.js +0 -2
  1177. package/lib/schema-component/antd/percent/Percent.js +5 -16
  1178. package/lib/schema-component/antd/percent/index.js +0 -2
  1179. package/lib/schema-component/antd/preview/Preview.d.ts +15 -0
  1180. package/lib/schema-component/antd/preview/Preview.js +246 -0
  1181. package/lib/schema-component/antd/preview/index.d.ts +1 -0
  1182. package/lib/schema-component/antd/preview/index.js +16 -0
  1183. package/lib/schema-component/antd/radio/Radio.js +1 -10
  1184. package/lib/schema-component/antd/radio/index.js +0 -2
  1185. package/lib/schema-component/antd/record-picker/InputRecordPicker.d.ts +2 -0
  1186. package/lib/schema-component/antd/record-picker/InputRecordPicker.js +166 -106
  1187. package/lib/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +29 -61
  1188. package/lib/schema-component/antd/record-picker/RecordPicker.js +0 -4
  1189. package/lib/schema-component/antd/record-picker/index.js +0 -10
  1190. package/lib/schema-component/antd/record-picker/useFieldNames.js +4 -8
  1191. package/lib/schema-component/antd/record-picker/util.d.ts +1 -1
  1192. package/lib/schema-component/antd/record-picker/util.js +15 -18
  1193. package/lib/schema-component/antd/remote-select/ReadPretty.js +22 -39
  1194. package/lib/schema-component/antd/remote-select/RemoteSelect.d.ts +2 -0
  1195. package/lib/schema-component/antd/remote-select/RemoteSelect.js +47 -80
  1196. package/lib/schema-component/antd/remote-select/index.js +0 -2
  1197. package/lib/schema-component/antd/remote-select/shared.js +0 -4
  1198. package/lib/schema-component/antd/rich-text/RichText.js +6 -13
  1199. package/lib/schema-component/antd/rich-text/index.js +0 -2
  1200. package/lib/schema-component/antd/select/ReadPretty.js +4 -18
  1201. package/lib/schema-component/antd/select/Select.js +15 -45
  1202. package/lib/schema-component/antd/select/index.js +0 -4
  1203. package/lib/schema-component/antd/select/shared.js +5 -29
  1204. package/lib/schema-component/antd/space/index.js +4 -13
  1205. package/lib/schema-component/antd/table/Table.Array.Designer.js +0 -5
  1206. package/lib/schema-component/antd/table/Table.Array.js +48 -111
  1207. package/lib/schema-component/antd/table/Table.Column.ActionBar.js +0 -8
  1208. package/lib/schema-component/antd/table/Table.Column.Decorator.js +5 -25
  1209. package/lib/schema-component/antd/table/Table.Column.Designer.js +37 -65
  1210. package/lib/schema-component/antd/table/Table.Column.js +0 -5
  1211. package/lib/schema-component/antd/table/Table.Designer.js +2 -9
  1212. package/lib/schema-component/antd/table/Table.RowActionDesigner.js +1 -12
  1213. package/lib/schema-component/antd/table/Table.RowSelection.js +6 -23
  1214. package/lib/schema-component/antd/table/Table.Void.Designer.js +8 -29
  1215. package/lib/schema-component/antd/table/Table.Void.js +17 -54
  1216. package/lib/schema-component/antd/table/index.js +0 -13
  1217. package/lib/schema-component/antd/table-v2/FilterDynamicComponent.d.ts +2 -0
  1218. package/lib/schema-component/antd/table-v2/FilterDynamicComponent.js +157 -0
  1219. package/lib/schema-component/antd/table-v2/Table.ActionColumnDesigner.js +1 -12
  1220. package/lib/schema-component/antd/table-v2/Table.Column.ActionBar.js +0 -8
  1221. package/lib/schema-component/antd/table-v2/Table.Column.Decorator.js +6 -29
  1222. package/lib/schema-component/antd/table-v2/Table.Column.Designer.js +28 -42
  1223. package/lib/schema-component/antd/table-v2/Table.Column.js +0 -5
  1224. package/lib/schema-component/antd/table-v2/Table.Designer.js +2 -9
  1225. package/lib/schema-component/antd/table-v2/Table.js +139 -169
  1226. package/lib/schema-component/antd/table-v2/TableBlockDesigner.js +60 -59
  1227. package/lib/schema-component/antd/table-v2/TableField.js +5 -22
  1228. package/lib/schema-component/antd/table-v2/TableSelector.js +0 -2
  1229. package/lib/schema-component/antd/table-v2/TableSelectorDesigner.js +42 -41
  1230. package/lib/schema-component/antd/table-v2/hooks/useUserVariable.d.ts +10 -0
  1231. package/lib/schema-component/antd/table-v2/hooks/useUserVariable.js +63 -0
  1232. package/lib/schema-component/antd/table-v2/index.js +0 -13
  1233. package/lib/schema-component/antd/table-v2/utils.d.ts +2 -0
  1234. package/lib/schema-component/antd/table-v2/utils.js +40 -6
  1235. package/lib/schema-component/antd/tabs/Tabs.Designer.js +7 -17
  1236. package/lib/schema-component/antd/tabs/Tabs.js +1 -17
  1237. package/lib/schema-component/antd/tabs/index.js +0 -2
  1238. package/lib/schema-component/antd/time-picker/ReadPretty.js +2 -12
  1239. package/lib/schema-component/antd/time-picker/TimePicker.js +4 -10
  1240. package/lib/schema-component/antd/time-picker/index.js +0 -2
  1241. package/lib/schema-component/antd/tree-select/ReadPretty.js +1 -16
  1242. package/lib/schema-component/antd/tree-select/TreeSelect.js +4 -11
  1243. package/lib/schema-component/antd/tree-select/index.js +0 -2
  1244. package/lib/schema-component/antd/upload/ReadPretty.d.ts +1 -1
  1245. package/lib/schema-component/antd/upload/ReadPretty.js +18 -40
  1246. package/lib/schema-component/antd/upload/Upload.js +75 -80
  1247. package/lib/schema-component/antd/upload/index.js +0 -2
  1248. package/lib/schema-component/antd/upload/shared.js +14 -92
  1249. package/lib/schema-component/antd/upload/type.d.ts +11 -0
  1250. package/lib/schema-component/antd/variable/Input.js +68 -89
  1251. package/lib/schema-component/antd/variable/JSONInput.js +15 -37
  1252. package/lib/schema-component/antd/variable/TextArea.d.ts +3 -0
  1253. package/lib/schema-component/antd/variable/TextArea.js +254 -169
  1254. package/lib/schema-component/antd/variable/Variable.js +1 -7
  1255. package/lib/schema-component/antd/variable/VariableSelect.d.ts +2 -0
  1256. package/lib/schema-component/antd/variable/VariableSelect.js +74 -0
  1257. package/lib/schema-component/antd/variable/XButton.d.ts +9 -0
  1258. package/lib/schema-component/antd/variable/XButton.js +26 -0
  1259. package/lib/schema-component/antd/variable/index.js +0 -2
  1260. package/lib/schema-component/common/dnd-context/index.js +12 -48
  1261. package/lib/schema-component/common/index.js +0 -4
  1262. package/lib/schema-component/common/sortable-item/SortableItem.js +20 -50
  1263. package/lib/schema-component/common/sortable-item/index.js +0 -2
  1264. package/lib/schema-component/common/utils/logic.js +74 -93
  1265. package/lib/schema-component/common/utils/uitls.js +46 -48
  1266. package/lib/schema-component/context.js +0 -2
  1267. package/lib/schema-component/core/DesignableSwitch.js +12 -23
  1268. package/lib/schema-component/core/FormProvider.js +4 -21
  1269. package/lib/schema-component/core/RemoteSchemaComponent.js +21 -42
  1270. package/lib/schema-component/core/SchemaComponent.js +12 -34
  1271. package/lib/schema-component/core/SchemaComponentOptions.js +4 -15
  1272. package/lib/schema-component/core/SchemaComponentProvider.js +18 -50
  1273. package/lib/schema-component/core/index.js +0 -12
  1274. package/lib/schema-component/hooks/index.d.ts +2 -0
  1275. package/lib/schema-component/hooks/index.js +22 -18
  1276. package/lib/schema-component/hooks/useAttach.js +0 -4
  1277. package/lib/schema-component/hooks/useCompile.js +4 -9
  1278. package/lib/schema-component/hooks/useComponent.js +1 -9
  1279. package/lib/schema-component/hooks/useDesignable.js +203 -404
  1280. package/lib/schema-component/hooks/useDesigner.js +1 -7
  1281. package/lib/schema-component/hooks/useFieldComponentOptions.js +18 -19
  1282. package/lib/schema-component/hooks/useFieldProps.js +4 -9
  1283. package/lib/schema-component/hooks/useFieldTitle.js +2 -13
  1284. package/lib/schema-component/hooks/useProps.js +1 -8
  1285. package/lib/schema-component/hooks/useSchemaComponentContext.js +0 -3
  1286. package/lib/schema-component/hooks/useTableSize.d.ts +5 -0
  1287. package/lib/schema-component/hooks/useTableSize.js +49 -0
  1288. package/lib/schema-component/index.js +0 -14
  1289. package/lib/schema-initializer/SchemaInitializer.js +46 -96
  1290. package/lib/schema-initializer/SchemaInitializerProvider.js +11 -36
  1291. package/lib/schema-initializer/SelectCollection.js +4 -16
  1292. package/lib/schema-initializer/buttons/BlockInitializers.js +20 -2
  1293. package/lib/schema-initializer/buttons/BulkEditFormItemInitializers.js +2 -11
  1294. package/lib/schema-initializer/buttons/CalendarActionInitializers.d.ts +4 -0
  1295. package/lib/schema-initializer/buttons/CalendarActionInitializers.js +5 -0
  1296. package/lib/schema-initializer/buttons/CalendarFormActionInitializers.d.ts +6 -0
  1297. package/lib/schema-initializer/buttons/CalendarFormActionInitializers.js +21 -0
  1298. package/lib/schema-initializer/buttons/CreateFormBlockInitializers.js +2 -10
  1299. package/lib/schema-initializer/buttons/CreateFormBulkEditBlockInitializers.js +2 -10
  1300. package/lib/schema-initializer/buttons/CustomFormItemInitializers.js +2 -13
  1301. package/lib/schema-initializer/buttons/FilterFormActionInitializers.d.ts +16 -0
  1302. package/lib/schema-initializer/buttons/FilterFormActionInitializers.js +31 -0
  1303. package/lib/schema-initializer/buttons/FormItemInitializers.d.ts +1 -0
  1304. package/lib/schema-initializer/buttons/FormItemInitializers.js +63 -16
  1305. package/lib/schema-initializer/buttons/GanttActionInitializers.d.ts +133 -0
  1306. package/lib/schema-initializer/buttons/GanttActionInitializers.js +16 -0
  1307. package/lib/schema-initializer/buttons/KanbanActionInitializers.d.ts +2 -0
  1308. package/lib/schema-initializer/buttons/KanbanActionInitializers.js +5 -0
  1309. package/lib/schema-initializer/buttons/ReadPrettyFormActionInitializers.d.ts +6 -0
  1310. package/lib/schema-initializer/buttons/ReadPrettyFormActionInitializers.js +17 -0
  1311. package/lib/schema-initializer/buttons/ReadPrettyFormItemInitializers.js +2 -14
  1312. package/lib/schema-initializer/buttons/RecordBlockInitializers.js +31 -54
  1313. package/lib/schema-initializer/buttons/RecordFormBlockInitializers.js +1 -9
  1314. package/lib/schema-initializer/buttons/SubTableActionInitializers.js +4 -4
  1315. package/lib/schema-initializer/buttons/TabPaneInitializers.js +55 -77
  1316. package/lib/schema-initializer/buttons/TableActionColumnInitializers.js +41 -33
  1317. package/lib/schema-initializer/buttons/TableActionInitializers.d.ts +17 -0
  1318. package/lib/schema-initializer/buttons/TableActionInitializers.js +51 -17
  1319. package/lib/schema-initializer/buttons/TableColumnInitializers.js +7 -21
  1320. package/lib/schema-initializer/buttons/TableSelectorInitializers.js +2 -10
  1321. package/lib/schema-initializer/buttons/chart-config/index.js +0 -10
  1322. package/lib/schema-initializer/buttons/index.d.ts +2 -0
  1323. package/lib/schema-initializer/buttons/index.js +22 -44
  1324. package/lib/schema-initializer/components/BulkEditField.js +31 -69
  1325. package/lib/schema-initializer/components/CreateRecordAction.js +85 -95
  1326. package/lib/schema-initializer/components/assigned-field/AssignedField.js +33 -91
  1327. package/lib/schema-initializer/components/assigned-field/index.js +0 -2
  1328. package/lib/schema-initializer/components/index.js +0 -6
  1329. package/lib/schema-initializer/index.d.ts +1 -1
  1330. package/lib/schema-initializer/index.js +7 -11
  1331. package/lib/schema-initializer/items/ActionInitializer.js +4 -9
  1332. package/lib/schema-initializer/items/BlockInitializer.js +2 -9
  1333. package/lib/schema-initializer/items/BulkDestroyActionInitializer.js +4 -12
  1334. package/lib/schema-initializer/items/BulkEditSubmitActionInitializer.js +4 -9
  1335. package/lib/schema-initializer/items/CalendarBlockInitializer.js +61 -86
  1336. package/lib/schema-initializer/items/CollectionFieldInitializer.js +4 -9
  1337. package/lib/schema-initializer/items/CreateActionInitializer.js +5 -9
  1338. package/lib/schema-initializer/items/CreateChildInitializer.d.ts +1 -0
  1339. package/lib/schema-initializer/items/CreateChildInitializer.js +70 -0
  1340. package/lib/schema-initializer/items/CreateFilterActionInitializer.d.ts +1 -0
  1341. package/lib/schema-initializer/items/CreateFilterActionInitializer.js +31 -0
  1342. package/lib/schema-initializer/items/CreateFormBlockInitializer.js +45 -74
  1343. package/lib/schema-initializer/items/CreateFormBulkEditBlockInitializer.js +47 -76
  1344. package/lib/schema-initializer/items/CreateResetActionInitializer.d.ts +1 -0
  1345. package/lib/schema-initializer/items/CreateResetActionInitializer.js +29 -0
  1346. package/lib/schema-initializer/items/CreateSubmitActionInitializer.js +4 -9
  1347. package/lib/schema-initializer/items/CustomizeActionInitializer.js +4 -12
  1348. package/lib/schema-initializer/items/CustomizeBulkEditActionInitializer.js +4 -9
  1349. package/lib/schema-initializer/items/DataBlockInitializer.js +43 -71
  1350. package/lib/schema-initializer/items/DeleteEventActionInitializer.js +4 -9
  1351. package/lib/schema-initializer/items/DestroyActionInitializer.js +4 -9
  1352. package/lib/schema-initializer/items/DetailsBlockInitializer.js +21 -36
  1353. package/lib/schema-initializer/items/ExpandActionInitializer.d.ts +2 -0
  1354. package/lib/schema-initializer/items/ExpandActionInitializer.js +67 -0
  1355. package/lib/schema-initializer/items/FilterActionInitializer.js +4 -9
  1356. package/lib/schema-initializer/items/FilterBlockInitializer.d.ts +1 -0
  1357. package/lib/schema-initializer/items/FilterBlockInitializer.js +86 -0
  1358. package/lib/schema-initializer/items/FilterCollapseBlockInitializer.d.ts +1 -0
  1359. package/lib/schema-initializer/items/FilterCollapseBlockInitializer.js +52 -0
  1360. package/lib/schema-initializer/items/FilterFormBlockInitializer.d.ts +1 -0
  1361. package/lib/schema-initializer/items/FilterFormBlockInitializer.js +36 -0
  1362. package/lib/schema-initializer/items/FormBlockInitializer.js +4 -13
  1363. package/lib/schema-initializer/items/G2PlotInitializer.js +6 -15
  1364. package/lib/schema-initializer/items/GanttBlockInitializer.d.ts +1 -0
  1365. package/lib/schema-initializer/items/GanttBlockInitializer.js +175 -0
  1366. package/lib/schema-initializer/items/InitializerWithSwitch.js +8 -19
  1367. package/lib/schema-initializer/items/KanbanBlockInitializer.js +85 -116
  1368. package/lib/schema-initializer/items/MarkdownBlockInitializer.js +5 -14
  1369. package/lib/schema-initializer/items/PrintActionInitializer.js +4 -9
  1370. package/lib/schema-initializer/items/RecordAssociationBlockInitializer.js +37 -62
  1371. package/lib/schema-initializer/items/RecordAssociationCalendarBlockInitializer.js +92 -130
  1372. package/lib/schema-initializer/items/RecordAssociationDetailsBlockInitializer.js +37 -62
  1373. package/lib/schema-initializer/items/RecordAssociationFormBlockInitializer.js +52 -79
  1374. package/lib/schema-initializer/items/RecordFormBlockInitializer.js +49 -78
  1375. package/lib/schema-initializer/items/RecordReadPrettyAssociationFormBlockInitializer.js +51 -81
  1376. package/lib/schema-initializer/items/RecordReadPrettyFormBlockInitializer.js +52 -83
  1377. package/lib/schema-initializer/items/RefreshActionInitializer.js +4 -9
  1378. package/lib/schema-initializer/items/SubmitActionInitializer.js +7 -11
  1379. package/lib/schema-initializer/items/TableActionColumnInitializer.js +4 -9
  1380. package/lib/schema-initializer/items/TableBlockInitializer.js +20 -36
  1381. package/lib/schema-initializer/items/TableCollectionFieldInitializer.js +4 -9
  1382. package/lib/schema-initializer/items/TableSelectorInitializer.js +24 -44
  1383. package/lib/schema-initializer/items/UpdateActionInitializer.js +4 -9
  1384. package/lib/schema-initializer/items/UpdateSubmitActionInitializer.js +4 -9
  1385. package/lib/schema-initializer/items/ViewActionInitializer.js +4 -9
  1386. package/lib/schema-initializer/items/index.d.ts +7 -0
  1387. package/lib/schema-initializer/items/index.js +77 -86
  1388. package/lib/schema-initializer/utils.d.ts +174 -1
  1389. package/lib/schema-initializer/utils.js +672 -397
  1390. package/lib/schema-items/OpenModeSchemaItems.d.ts +7 -0
  1391. package/lib/schema-items/OpenModeSchemaItems.js +86 -0
  1392. package/lib/schema-items/index.d.ts +1 -0
  1393. package/lib/schema-items/index.js +16 -0
  1394. package/lib/schema-settings/DataTemplates/FormDataTemplates.d.ts +2 -0
  1395. package/lib/schema-settings/DataTemplates/FormDataTemplates.js +182 -0
  1396. package/lib/schema-settings/DataTemplates/TreeLabel.d.ts +1 -0
  1397. package/lib/schema-settings/DataTemplates/TreeLabel.js +27 -0
  1398. package/lib/schema-settings/DataTemplates/components/AsDefaultTemplate.d.ts +2 -0
  1399. package/lib/schema-settings/DataTemplates/components/AsDefaultTemplate.js +55 -0
  1400. package/lib/schema-settings/DataTemplates/components/DataTemplateTitle.d.ts +11 -0
  1401. package/lib/schema-settings/DataTemplates/components/DataTemplateTitle.js +271 -0
  1402. package/lib/schema-settings/DataTemplates/hooks/useCollectionState.d.ts +13 -0
  1403. package/lib/schema-settings/DataTemplates/hooks/useCollectionState.js +155 -0
  1404. package/lib/schema-settings/DataTemplates/index.d.ts +1 -0
  1405. package/lib/schema-settings/DataTemplates/index.js +16 -0
  1406. package/lib/schema-settings/EnableChildCollections/index.js +28 -45
  1407. package/lib/schema-settings/GeneralSchemaDesigner.js +11 -34
  1408. package/lib/schema-settings/LinkageRules/DynamicComponent.js +7 -76
  1409. package/lib/schema-settings/LinkageRules/FilterDynamicComponent.js +3 -8
  1410. package/lib/schema-settings/LinkageRules/LinkageRuleAction.js +33 -65
  1411. package/lib/schema-settings/LinkageRules/LinkageRuleActionGroup.js +9 -23
  1412. package/lib/schema-settings/LinkageRules/ValueDynamicComponent.js +36 -40
  1413. package/lib/schema-settings/LinkageRules/Variables.js +11 -37
  1414. package/lib/schema-settings/LinkageRules/action-hooks.js +5 -25
  1415. package/lib/schema-settings/LinkageRules/components/EnableLinkage.d.ts +2 -0
  1416. package/lib/schema-settings/LinkageRules/components/EnableLinkage.js +48 -0
  1417. package/lib/schema-settings/LinkageRules/components/LinkageHeader.d.ts +11 -0
  1418. package/lib/schema-settings/LinkageRules/components/LinkageHeader.js +262 -0
  1419. package/lib/schema-settings/LinkageRules/context.d.ts +1 -1
  1420. package/lib/schema-settings/LinkageRules/context.js +3 -5
  1421. package/lib/schema-settings/LinkageRules/index.js +20 -27
  1422. package/lib/schema-settings/LinkageRules/type.js +0 -1
  1423. package/lib/schema-settings/LinkageRules/useValues.js +8 -23
  1424. package/lib/schema-settings/SchemaSettings.d.ts +3 -0
  1425. package/lib/schema-settings/SchemaSettings.js +731 -611
  1426. package/lib/schema-settings/index.js +0 -4
  1427. package/lib/schema-templates/BlockTemplate.js +3 -22
  1428. package/lib/schema-templates/BlockTemplateDetails.js +34 -61
  1429. package/lib/schema-templates/BlockTemplatePage.js +2 -15
  1430. package/lib/schema-templates/SchemaTemplateManagerProvider.js +99 -164
  1431. package/lib/schema-templates/SchemaTemplateShortcut.js +1 -10
  1432. package/lib/schema-templates/index.js +0 -8
  1433. package/lib/schema-templates/schemas/uiSchemaTemplates.js +41 -66
  1434. package/lib/settings-form/SettingsForm.js +86 -138
  1435. package/lib/settings-form/index.js +0 -2
  1436. package/lib/system-settings/SystemSettingsProvider.js +14 -13
  1437. package/lib/system-settings/SystemSettingsShortcut.js +78 -121
  1438. package/lib/system-settings/index.js +0 -4
  1439. package/lib/user/ChangePassword.js +42 -78
  1440. package/lib/user/CurrentUser.js +28 -59
  1441. package/lib/user/CurrentUserProvider.js +1 -18
  1442. package/lib/user/EditProfile.js +43 -81
  1443. package/lib/user/LanguageSettings.js +37 -64
  1444. package/lib/user/SigninPage.js +37 -76
  1445. package/lib/user/SigninPageExtension.js +3 -20
  1446. package/lib/user/SignupPage.js +29 -57
  1447. package/lib/user/SwitchRole.js +30 -47
  1448. package/lib/user/ThemeSettings.d.ts +1 -0
  1449. package/lib/user/ThemeSettings.js +78 -0
  1450. package/lib/user/VerificationCode.js +50 -87
  1451. package/lib/user/index.js +0 -10
  1452. package/package.json +13 -9
  1453. package/es/collection-manager/templates/treeCollection.d.ts +0 -1
  1454. package/es/collection-manager/templates/treeCollection.js +0 -0
  1455. package/lib/collection-manager/templates/treeCollection.d.ts +0 -1
  1456. package/lib/collection-manager/templates/treeCollection.js +0 -1
@@ -1,33 +1,40 @@
1
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
5
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
6
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
7
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
1
8
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
2
-
3
9
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
4
-
5
10
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
6
-
7
11
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
8
-
9
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
10
-
12
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
13
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
14
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
11
15
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
12
-
13
- import { useField, useFieldSchema, useForm } from '@formily/react';
14
- import { message, Modal } from 'antd';
16
+ import { SchemaExpressionScopeContext, useField, useFieldSchema, useForm } from '@formily/react';
17
+ import { Modal, message } from 'antd';
15
18
  import parse from 'json-templates';
16
19
  import { cloneDeep } from 'lodash';
17
20
  import get from 'lodash/get';
18
21
  import omit from 'lodash/omit';
22
+ import { useContext } from 'react';
19
23
  import { useTranslation } from 'react-i18next';
20
24
  import { useHistory } from 'react-router-dom';
21
25
  import { useReactToPrint } from 'react-to-print';
22
- import { useFormBlockContext, useTableBlockContext } from '../..';
23
- import { useAPIClient } from '../../api-client';
26
+ import { AssociationFilter, useFormBlockContext, useTableBlockContext } from '../..';
27
+ import { useAPIClient, useRequest } from '../../api-client';
24
28
  import { useCollection } from '../../collection-manager';
29
+ import { useFilterBlock } from '../../filter-provider/FilterProvider';
30
+ import { transformToFilter } from '../../filter-provider/utils';
25
31
  import { useRecord } from '../../record-provider';
26
- import { useActionContext, useCompile } from '../../schema-component';
32
+ import { removeNullCondition, useActionContext, useCompile } from '../../schema-component';
27
33
  import { BulkEditFormItemValueType } from '../../schema-initializer/components';
28
34
  import { useCurrentUserContext } from '../../user';
29
35
  import { useBlockRequestContext, useFilterByTk } from '../BlockProvider';
30
36
  import { useDetailsBlockContext } from '../DetailsBlockProvider';
37
+ import { mergeFilter } from '../SharedFilterProvider';
31
38
  import { TableFieldResource } from '../TableFieldProvider';
32
39
  export var usePickActionProps = function usePickActionProps() {
33
40
  var form = useForm();
@@ -37,64 +44,49 @@ export var usePickActionProps = function usePickActionProps() {
37
44
  }
38
45
  };
39
46
  };
40
-
41
47
  function renderTemplate(str, data) {
42
48
  var re = /\{\{\s*((\w+\.?)+)\s*\}\}/g;
43
49
  return str.replace(re, function (_, key) {
44
50
  return get(data, key) || '';
45
51
  });
46
52
  }
47
-
48
53
  function isURL(string) {
49
54
  var url;
50
-
51
55
  try {
52
56
  url = new URL(string);
53
57
  } catch (e) {
54
58
  return false;
55
59
  }
56
-
57
60
  return url.protocol === 'http:' || url.protocol === 'https:';
58
61
  }
59
-
60
62
  var filterValue = function filterValue(value) {
61
63
  if (_typeof(value) !== 'object') {
62
64
  return value;
63
65
  }
64
-
65
66
  if (!value) {
66
67
  return value;
67
68
  }
68
-
69
69
  if (Array.isArray(value)) {
70
70
  return value.map(function (v) {
71
71
  return filterValue(v);
72
72
  });
73
73
  }
74
-
75
74
  var obj = {};
76
-
77
75
  for (var key in value) {
78
76
  if (Object.prototype.hasOwnProperty.call(value, key)) {
79
77
  var val = value[key];
80
-
81
78
  if (Array.isArray(val) || val && _typeof(val) === 'object') {
82
79
  continue;
83
80
  }
84
-
85
81
  obj[key] = val;
86
82
  }
87
83
  }
88
-
89
84
  return obj;
90
85
  };
91
-
92
86
  function getFormValues(filterByTk, field, form, fieldNames, getField, resource) {
93
87
  if (filterByTk) {
94
88
  var _field$data;
95
-
96
89
  var actionFields = field === null || field === void 0 ? void 0 : (_field$data = field.data) === null || _field$data === void 0 ? void 0 : _field$data.activeFields;
97
-
98
90
  if (actionFields) {
99
91
  var keys = Object.keys(form.values).filter(function (key) {
100
92
  var f = getField(key);
@@ -103,88 +95,75 @@ function getFormValues(filterByTk, field, form, fieldNames, getField, resource)
103
95
  return omit(_objectSpread({}, form.values), keys);
104
96
  }
105
97
  }
106
-
98
+ console.log('form.values', form.values);
107
99
  return form.values;
108
100
  var values = {};
109
-
110
- for (var key in form.values) {
101
+ var _loop = function _loop() {
111
102
  if (fieldNames.includes(key)) {
112
103
  var collectionField = getField(key);
113
-
114
104
  if (filterByTk) {
115
105
  if (field.added && !field.added.has(key)) {
116
- continue;
106
+ return "continue";
117
107
  }
118
-
119
108
  if (['subTable', 'o2m', 'o2o', 'oho', 'obo', 'm2o'].includes(collectionField.interface)) {
120
109
  values[key] = form.values[key];
121
- continue;
110
+ return "continue";
122
111
  }
123
112
  }
124
-
125
113
  var items = form.values[key];
126
-
127
114
  if (['linkTo', 'm2o', 'm2m'].includes(collectionField.interface)) {
128
- (function () {
129
- var targetKey = collectionField.targetKey || 'id';
130
-
131
- if (resource instanceof TableFieldResource) {
132
- if (Array.isArray(items)) {
133
- values[key] = filterValue(items);
134
- } else if (items && _typeof(items) === 'object') {
135
- values[key] = filterValue(items);
136
- } else {
137
- values[key] = items;
138
- }
115
+ var targetKey = collectionField.targetKey || 'id';
116
+ if (resource instanceof TableFieldResource) {
117
+ if (Array.isArray(items)) {
118
+ values[key] = filterValue(items);
119
+ } else if (items && _typeof(items) === 'object') {
120
+ values[key] = filterValue(items);
139
121
  } else {
140
- if (Array.isArray(items)) {
141
- values[key] = items.map(function (item) {
142
- return item[targetKey];
143
- });
144
- } else if (items && _typeof(items) === 'object') {
145
- values[key] = items[targetKey];
146
- } else {
147
- values[key] = items;
148
- }
122
+ values[key] = items;
123
+ }
124
+ } else {
125
+ if (Array.isArray(items)) {
126
+ values[key] = items.map(function (item) {
127
+ return item[targetKey];
128
+ });
129
+ } else if (items && _typeof(items) === 'object') {
130
+ values[key] = items[targetKey];
131
+ } else {
132
+ values[key] = items;
149
133
  }
150
- })();
134
+ }
151
135
  } else {
152
136
  values[key] = form.values[key];
153
137
  }
154
138
  } else {
155
139
  values[key] = form.values[key];
156
140
  }
141
+ };
142
+ for (var key in form.values) {
143
+ var _ret = _loop();
144
+ if (_ret === "continue") continue;
157
145
  }
158
-
159
146
  return values;
160
147
  }
161
-
162
148
  export var useCreateActionProps = function useCreateActionProps() {
163
149
  var _currentUserContext$d;
164
-
165
150
  var form = useForm();
166
-
167
151
  var _useBlockRequestConte = useBlockRequestContext(),
168
- field = _useBlockRequestConte.field,
169
- resource = _useBlockRequestConte.resource,
170
- __parent = _useBlockRequestConte.__parent;
171
-
152
+ field = _useBlockRequestConte.field,
153
+ resource = _useBlockRequestConte.resource,
154
+ __parent = _useBlockRequestConte.__parent;
172
155
  var _useActionContext = useActionContext(),
173
- visible = _useActionContext.visible,
174
- setVisible = _useActionContext.setVisible;
175
-
156
+ setVisible = _useActionContext.setVisible,
157
+ fieldSchema = _useActionContext.fieldSchema;
176
158
  var history = useHistory();
177
-
178
159
  var _useTranslation = useTranslation(),
179
- t = _useTranslation.t;
180
-
160
+ t = _useTranslation.t;
181
161
  var actionSchema = useFieldSchema();
182
162
  var actionField = useField();
183
-
184
163
  var _useCollection = useCollection(),
185
- fields = _useCollection.fields,
186
- getField = _useCollection.getField;
187
-
164
+ fields = _useCollection.fields,
165
+ getField = _useCollection.getField,
166
+ getTreeParentField = _useCollection.getTreeParentField;
188
167
  var compile = useCompile();
189
168
  var filterByTk = useFilterByTk();
190
169
  var currentRecord = useRecord();
@@ -192,122 +171,272 @@ export var useCreateActionProps = function useCreateActionProps() {
192
171
  var currentUser = currentUserContext === null || currentUserContext === void 0 ? void 0 : (_currentUserContext$d = currentUserContext.data) === null || _currentUserContext$d === void 0 ? void 0 : _currentUserContext$d.data;
193
172
  return {
194
173
  onClick: function onClick() {
195
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
196
- var _actionSchema$xActio;
197
-
198
- var fieldNames, _ref, _ref$assignedValues, originalAssignedValues, onSuccess, overwriteValues, skipValidator, assignedValues, values, _parent$service, _parent$service$refre;
199
-
200
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
201
- while (1) {
202
- switch (_context2.prev = _context2.next) {
203
- case 0:
204
- fieldNames = fields.map(function (field) {
205
- return field.name;
206
- });
207
- _ref = (_actionSchema$xActio = actionSchema === null || actionSchema === void 0 ? void 0 : actionSchema['x-action-settings']) !== null && _actionSchema$xActio !== void 0 ? _actionSchema$xActio : {}, _ref$assignedValues = _ref.assignedValues, originalAssignedValues = _ref$assignedValues === void 0 ? {} : _ref$assignedValues, onSuccess = _ref.onSuccess, overwriteValues = _ref.overwriteValues, skipValidator = _ref.skipValidator;
208
- assignedValues = parse(originalAssignedValues)({
209
- currentTime: new Date(),
210
- currentRecord: currentRecord,
211
- currentUser: currentUser
212
- });
213
-
214
- if (skipValidator) {
215
- _context2.next = 6;
216
- break;
217
- }
218
-
219
- _context2.next = 6;
220
- return form.submit();
221
-
222
- case 6:
223
- values = getFormValues(filterByTk, field, form, fieldNames, getField, resource);
224
- actionField.data = field.data || {};
225
- actionField.data.loading = true;
226
- _context2.prev = 9;
227
- _context2.next = 12;
228
- return resource.create({
229
- values: _objectSpread(_objectSpread(_objectSpread({}, values), overwriteValues), assignedValues)
230
- });
231
-
232
- case 12:
233
- actionField.data.loading = false;
234
- __parent === null || __parent === void 0 ? void 0 : (_parent$service = __parent.service) === null || _parent$service === void 0 ? void 0 : (_parent$service$refre = _parent$service.refresh) === null || _parent$service$refre === void 0 ? void 0 : _parent$service$refre.call(_parent$service);
235
- setVisible === null || setVisible === void 0 ? void 0 : setVisible(false);
236
-
237
- if (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage) {
238
- _context2.next = 17;
239
- break;
240
- }
241
-
242
- return _context2.abrupt("return");
243
-
244
- case 17:
245
- if (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.manualClose) {
246
- Modal.success({
247
- title: compile(onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage),
248
- onOk: function () {
249
- var _onOk = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
250
- return regeneratorRuntime.wrap(function _callee$(_context) {
251
- while (1) {
252
- switch (_context.prev = _context.next) {
253
- case 0:
254
- _context.next = 2;
255
- return form.reset();
256
-
257
- case 2:
258
- if ((onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.redirecting) && (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.redirectTo)) {
259
- if (isURL(onSuccess.redirectTo)) {
260
- window.location.href = onSuccess.redirectTo;
261
- } else {
262
- history.push(onSuccess.redirectTo);
263
- }
264
- }
265
-
266
- case 3:
267
- case "end":
268
- return _context.stop();
269
- }
270
- }
271
- }, _callee);
272
- }));
273
-
274
- function onOk() {
275
- return _onOk.apply(this, arguments);
276
- }
277
-
278
- return onOk;
279
- }()
280
- });
281
- } else {
282
- message.success(compile(onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage));
283
- }
284
-
285
- _context2.next = 23;
174
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
175
+ var _actionSchema$xActio, _fieldSchema$xCompon;
176
+ var fieldNames, _ref, _ref$assignedValues, originalAssignedValues, onSuccess, overwriteValues, skipValidator, addChild, assignedValues, values, _treeParentField$name, _treeParentField$fore, treeParentField, _parent$service, _parent$service$refre;
177
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
178
+ while (1) switch (_context2.prev = _context2.next) {
179
+ case 0:
180
+ fieldNames = fields.map(function (field) {
181
+ return field.name;
182
+ });
183
+ _ref = (_actionSchema$xActio = actionSchema === null || actionSchema === void 0 ? void 0 : actionSchema['x-action-settings']) !== null && _actionSchema$xActio !== void 0 ? _actionSchema$xActio : {}, _ref$assignedValues = _ref.assignedValues, originalAssignedValues = _ref$assignedValues === void 0 ? {} : _ref$assignedValues, onSuccess = _ref.onSuccess, overwriteValues = _ref.overwriteValues, skipValidator = _ref.skipValidator;
184
+ addChild = fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xCompon = fieldSchema['x-component-props']) === null || _fieldSchema$xCompon === void 0 ? void 0 : _fieldSchema$xCompon.addChild;
185
+ assignedValues = parse(originalAssignedValues)({
186
+ currentTime: new Date(),
187
+ currentRecord: currentRecord,
188
+ currentUser: currentUser
189
+ });
190
+ if (skipValidator) {
191
+ _context2.next = 7;
192
+ break;
193
+ }
194
+ _context2.next = 7;
195
+ return form.submit();
196
+ case 7:
197
+ values = getFormValues(filterByTk, field, form, fieldNames, getField, resource);
198
+ if (addChild) {
199
+ treeParentField = getTreeParentField();
200
+ values[(_treeParentField$name = treeParentField === null || treeParentField === void 0 ? void 0 : treeParentField.name) !== null && _treeParentField$name !== void 0 ? _treeParentField$name : 'parent'] = currentRecord;
201
+ values[(_treeParentField$fore = treeParentField === null || treeParentField === void 0 ? void 0 : treeParentField.foreignKey) !== null && _treeParentField$fore !== void 0 ? _treeParentField$fore : 'parentId'] = currentRecord.id;
202
+ }
203
+ actionField.data = field.data || {};
204
+ actionField.data.loading = true;
205
+ _context2.prev = 11;
206
+ _context2.next = 14;
207
+ return resource.create({
208
+ values: _objectSpread(_objectSpread(_objectSpread({}, values), overwriteValues), assignedValues)
209
+ });
210
+ case 14:
211
+ actionField.data.loading = false;
212
+ __parent === null || __parent === void 0 ? void 0 : (_parent$service = __parent.service) === null || _parent$service === void 0 ? void 0 : (_parent$service$refre = _parent$service.refresh) === null || _parent$service$refre === void 0 ? void 0 : _parent$service$refre.call(_parent$service);
213
+ setVisible === null || setVisible === void 0 ? void 0 : setVisible(false);
214
+ if (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage) {
215
+ _context2.next = 19;
286
216
  break;
287
-
288
- case 20:
289
- _context2.prev = 20;
290
- _context2.t0 = _context2["catch"](9);
291
- actionField.data.loading = false;
292
-
293
- case 23:
294
- case "end":
295
- return _context2.stop();
296
- }
217
+ }
218
+ return _context2.abrupt("return");
219
+ case 19:
220
+ if (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.manualClose) {
221
+ Modal.success({
222
+ title: compile(onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage),
223
+ onOk: function () {
224
+ var _onOk = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
225
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
226
+ while (1) switch (_context.prev = _context.next) {
227
+ case 0:
228
+ _context.next = 2;
229
+ return form.reset();
230
+ case 2:
231
+ if ((onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.redirecting) && (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.redirectTo)) {
232
+ if (isURL(onSuccess.redirectTo)) {
233
+ window.location.href = onSuccess.redirectTo;
234
+ } else {
235
+ history.push(onSuccess.redirectTo);
236
+ }
237
+ }
238
+ case 3:
239
+ case "end":
240
+ return _context.stop();
241
+ }
242
+ }, _callee);
243
+ }));
244
+ function onOk() {
245
+ return _onOk.apply(this, arguments);
246
+ }
247
+ return onOk;
248
+ }()
249
+ });
250
+ } else {
251
+ message.success(compile(onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage));
252
+ }
253
+ _context2.next = 25;
254
+ break;
255
+ case 22:
256
+ _context2.prev = 22;
257
+ _context2.t0 = _context2["catch"](11);
258
+ actionField.data.loading = false;
259
+ case 25:
260
+ case "end":
261
+ return _context2.stop();
262
+ }
263
+ }, _callee2, null, [[11, 22]]);
264
+ }))();
265
+ }
266
+ };
267
+ };
268
+ export var findFilterTargets = function findFilterTargets(fieldSchema) {
269
+ while (fieldSchema) {
270
+ if (fieldSchema['x-filter-targets']) {
271
+ return {
272
+ targets: fieldSchema['x-filter-targets'],
273
+ uid: fieldSchema['x-uid']
274
+ };
275
+ }
276
+ fieldSchema = fieldSchema.parent;
277
+ }
278
+ return {};
279
+ };
280
+ export var updateFilterTargets = function updateFilterTargets(fieldSchema, targets) {
281
+ while (fieldSchema) {
282
+ if (fieldSchema['x-filter-targets']) {
283
+ fieldSchema['x-filter-targets'] = targets;
284
+ return;
285
+ }
286
+ fieldSchema = fieldSchema.parent;
287
+ }
288
+ };
289
+ export var useFilterBlockActionProps = function useFilterBlockActionProps() {
290
+ var form = useForm();
291
+ var actionField = useField();
292
+ var fieldSchema = useFieldSchema();
293
+ var _useFilterBlock = useFilterBlock(),
294
+ getDataBlocks = _useFilterBlock.getDataBlocks;
295
+ actionField.data = actionField.data || {};
296
+ return {
297
+ onClick: function onClick() {
298
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
299
+ var _findFilterTargets, _findFilterTargets$ta, targets, uid;
300
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
301
+ while (1) switch (_context4.prev = _context4.next) {
302
+ case 0:
303
+ _findFilterTargets = findFilterTargets(fieldSchema), _findFilterTargets$ta = _findFilterTargets.targets, targets = _findFilterTargets$ta === void 0 ? [] : _findFilterTargets$ta, uid = _findFilterTargets.uid;
304
+ actionField.data.loading = true;
305
+ _context4.prev = 2;
306
+ _context4.next = 5;
307
+ return Promise.all(getDataBlocks().map( /*#__PURE__*/function () {
308
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(block) {
309
+ var _block$service$params, _block$service$params2, _block$service$params3;
310
+ var target, param, storedFilter, mergedFilter;
311
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
312
+ while (1) switch (_context3.prev = _context3.next) {
313
+ case 0:
314
+ target = targets.find(function (target) {
315
+ return target.uid === block.uid;
316
+ });
317
+ if (target) {
318
+ _context3.next = 3;
319
+ break;
320
+ }
321
+ return _context3.abrupt("return");
322
+ case 3:
323
+ param = ((_block$service$params = block.service.params) === null || _block$service$params === void 0 ? void 0 : _block$service$params[0]) || {}; // 保留原有的 filter
324
+ storedFilter = ((_block$service$params2 = block.service.params) === null || _block$service$params2 === void 0 ? void 0 : (_block$service$params3 = _block$service$params2[1]) === null || _block$service$params3 === void 0 ? void 0 : _block$service$params3.filters) || {};
325
+ storedFilter[uid] = removeNullCondition(transformToFilter(form.values, fieldSchema));
326
+ mergedFilter = mergeFilter([].concat(_toConsumableArray(Object.values(storedFilter).map(function (filter) {
327
+ return removeNullCondition(filter);
328
+ })), [block.defaultFilter]));
329
+ return _context3.abrupt("return", block.doFilter(_objectSpread(_objectSpread({}, param), {}, {
330
+ page: 1,
331
+ filter: mergedFilter
332
+ }), {
333
+ filters: storedFilter
334
+ }));
335
+ case 8:
336
+ case "end":
337
+ return _context3.stop();
338
+ }
339
+ }, _callee3);
340
+ }));
341
+ return function (_x) {
342
+ return _ref2.apply(this, arguments);
343
+ };
344
+ }()));
345
+ case 5:
346
+ actionField.data.loading = false;
347
+ _context4.next = 11;
348
+ break;
349
+ case 8:
350
+ _context4.prev = 8;
351
+ _context4.t0 = _context4["catch"](2);
352
+ actionField.data.loading = false;
353
+ case 11:
354
+ case "end":
355
+ return _context4.stop();
297
356
  }
298
- }, _callee2, null, [[9, 20]]);
357
+ }, _callee4, null, [[2, 8]]);
358
+ }))();
359
+ }
360
+ };
361
+ };
362
+ export var useResetBlockActionProps = function useResetBlockActionProps() {
363
+ var form = useForm();
364
+ var actionField = useField();
365
+ var fieldSchema = useFieldSchema();
366
+ var _useFilterBlock2 = useFilterBlock(),
367
+ getDataBlocks = _useFilterBlock2.getDataBlocks;
368
+ actionField.data = actionField.data || {};
369
+ return {
370
+ onClick: function onClick() {
371
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
372
+ var _findFilterTargets2, targets, uid;
373
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
374
+ while (1) switch (_context6.prev = _context6.next) {
375
+ case 0:
376
+ _findFilterTargets2 = findFilterTargets(fieldSchema), targets = _findFilterTargets2.targets, uid = _findFilterTargets2.uid;
377
+ form.reset();
378
+ actionField.data.loading = true;
379
+ _context6.prev = 3;
380
+ _context6.next = 6;
381
+ return Promise.all(getDataBlocks().map( /*#__PURE__*/function () {
382
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(block) {
383
+ var _block$service$params4, _block$service$params5, _block$service$params6;
384
+ var target, param, storedFilter, mergedFilter;
385
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
386
+ while (1) switch (_context5.prev = _context5.next) {
387
+ case 0:
388
+ target = targets.find(function (target) {
389
+ return target.uid === block.uid;
390
+ });
391
+ if (target) {
392
+ _context5.next = 3;
393
+ break;
394
+ }
395
+ return _context5.abrupt("return");
396
+ case 3:
397
+ param = ((_block$service$params4 = block.service.params) === null || _block$service$params4 === void 0 ? void 0 : _block$service$params4[0]) || {}; // 保留原有的 filter
398
+ storedFilter = ((_block$service$params5 = block.service.params) === null || _block$service$params5 === void 0 ? void 0 : (_block$service$params6 = _block$service$params5[1]) === null || _block$service$params6 === void 0 ? void 0 : _block$service$params6.filters) || {};
399
+ delete storedFilter[uid];
400
+ mergedFilter = mergeFilter([].concat(_toConsumableArray(Object.values(storedFilter)), [block.defaultFilter]));
401
+ return _context5.abrupt("return", block.doFilter(_objectSpread(_objectSpread({}, param), {}, {
402
+ page: 1,
403
+ filter: mergedFilter
404
+ }), {
405
+ filters: storedFilter
406
+ }));
407
+ case 8:
408
+ case "end":
409
+ return _context5.stop();
410
+ }
411
+ }, _callee5);
412
+ }));
413
+ return function (_x2) {
414
+ return _ref3.apply(this, arguments);
415
+ };
416
+ }()));
417
+ case 6:
418
+ actionField.data.loading = false;
419
+ _context6.next = 12;
420
+ break;
421
+ case 9:
422
+ _context6.prev = 9;
423
+ _context6.t0 = _context6["catch"](3);
424
+ actionField.data.loading = false;
425
+ case 12:
426
+ case "end":
427
+ return _context6.stop();
428
+ }
429
+ }, _callee6, null, [[3, 9]]);
299
430
  }))();
300
431
  }
301
432
  };
302
433
  };
303
434
  export var useCustomizeUpdateActionProps = function useCustomizeUpdateActionProps() {
304
435
  var _currentUserContext$d2;
305
-
306
436
  var _useBlockRequestConte2 = useBlockRequestContext(),
307
- resource = _useBlockRequestConte2.resource,
308
- __parent = _useBlockRequestConte2.__parent,
309
- service = _useBlockRequestConte2.service;
310
-
437
+ resource = _useBlockRequestConte2.resource,
438
+ __parent = _useBlockRequestConte2.__parent,
439
+ service = _useBlockRequestConte2.service;
311
440
  var filterByTk = useFilterByTk();
312
441
  var actionSchema = useFieldSchema();
313
442
  var currentRecord = useRecord();
@@ -318,833 +447,674 @@ export var useCustomizeUpdateActionProps = function useCustomizeUpdateActionProp
318
447
  var form = useForm();
319
448
  return {
320
449
  onClick: function onClick() {
321
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
450
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
322
451
  var _actionSchema$xActio2, _service$refresh;
323
-
324
- var _ref2, _ref2$assignedValues, originalAssignedValues, onSuccess, skipValidator, assignedValues, _parent$service2, _parent$service2$refr;
325
-
326
- return regeneratorRuntime.wrap(function _callee4$(_context4) {
327
- while (1) {
328
- switch (_context4.prev = _context4.next) {
329
- case 0:
330
- _ref2 = (_actionSchema$xActio2 = actionSchema === null || actionSchema === void 0 ? void 0 : actionSchema['x-action-settings']) !== null && _actionSchema$xActio2 !== void 0 ? _actionSchema$xActio2 : {}, _ref2$assignedValues = _ref2.assignedValues, originalAssignedValues = _ref2$assignedValues === void 0 ? {} : _ref2$assignedValues, onSuccess = _ref2.onSuccess, skipValidator = _ref2.skipValidator;
331
- assignedValues = parse(originalAssignedValues)({
332
- currentTime: new Date(),
333
- currentRecord: currentRecord,
334
- currentUser: currentUser
335
- });
336
-
337
- if (!(skipValidator === false)) {
338
- _context4.next = 5;
339
- break;
340
- }
341
-
342
- _context4.next = 5;
343
- return form.submit();
344
-
345
- case 5:
346
- _context4.next = 7;
347
- return resource.update({
348
- filterByTk: filterByTk,
349
- values: _objectSpread({}, assignedValues)
350
- });
351
-
352
- case 7:
353
- service === null || service === void 0 ? void 0 : (_service$refresh = service.refresh) === null || _service$refresh === void 0 ? void 0 : _service$refresh.call(service);
354
-
355
- if (!(resource instanceof TableFieldResource)) {
356
- __parent === null || __parent === void 0 ? void 0 : (_parent$service2 = __parent.service) === null || _parent$service2 === void 0 ? void 0 : (_parent$service2$refr = _parent$service2.refresh) === null || _parent$service2$refr === void 0 ? void 0 : _parent$service2$refr.call(_parent$service2);
357
- }
358
-
359
- if (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage) {
360
- _context4.next = 11;
361
- break;
362
- }
363
-
364
- return _context4.abrupt("return");
365
-
366
- case 11:
367
- if (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.manualClose) {
368
- Modal.success({
369
- title: compile(onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage),
370
- onOk: function () {
371
- var _onOk2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
372
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
373
- while (1) {
374
- switch (_context3.prev = _context3.next) {
375
- case 0:
376
- if ((onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.redirecting) && (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.redirectTo)) {
377
- if (isURL(onSuccess.redirectTo)) {
378
- window.location.href = onSuccess.redirectTo;
379
- } else {
380
- history.push(onSuccess.redirectTo);
381
- }
382
- }
383
-
384
- case 1:
385
- case "end":
386
- return _context3.stop();
452
+ var _ref4, _ref4$assignedValues, originalAssignedValues, onSuccess, skipValidator, assignedValues, _parent$service2, _parent$service2$refr;
453
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
454
+ while (1) switch (_context8.prev = _context8.next) {
455
+ case 0:
456
+ _ref4 = (_actionSchema$xActio2 = actionSchema === null || actionSchema === void 0 ? void 0 : actionSchema['x-action-settings']) !== null && _actionSchema$xActio2 !== void 0 ? _actionSchema$xActio2 : {}, _ref4$assignedValues = _ref4.assignedValues, originalAssignedValues = _ref4$assignedValues === void 0 ? {} : _ref4$assignedValues, onSuccess = _ref4.onSuccess, skipValidator = _ref4.skipValidator;
457
+ assignedValues = parse(originalAssignedValues)({
458
+ currentTime: new Date(),
459
+ currentRecord: currentRecord,
460
+ currentUser: currentUser
461
+ });
462
+ if (!(skipValidator === false)) {
463
+ _context8.next = 5;
464
+ break;
465
+ }
466
+ _context8.next = 5;
467
+ return form.submit();
468
+ case 5:
469
+ _context8.next = 7;
470
+ return resource.update({
471
+ filterByTk: filterByTk,
472
+ values: _objectSpread({}, assignedValues)
473
+ });
474
+ case 7:
475
+ service === null || service === void 0 ? void 0 : (_service$refresh = service.refresh) === null || _service$refresh === void 0 ? void 0 : _service$refresh.call(service);
476
+ if (!(resource instanceof TableFieldResource)) {
477
+ __parent === null || __parent === void 0 ? void 0 : (_parent$service2 = __parent.service) === null || _parent$service2 === void 0 ? void 0 : (_parent$service2$refr = _parent$service2.refresh) === null || _parent$service2$refr === void 0 ? void 0 : _parent$service2$refr.call(_parent$service2);
478
+ }
479
+ if (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage) {
480
+ _context8.next = 11;
481
+ break;
482
+ }
483
+ return _context8.abrupt("return");
484
+ case 11:
485
+ if (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.manualClose) {
486
+ Modal.success({
487
+ title: compile(onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage),
488
+ onOk: function () {
489
+ var _onOk2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
490
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
491
+ while (1) switch (_context7.prev = _context7.next) {
492
+ case 0:
493
+ if ((onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.redirecting) && (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.redirectTo)) {
494
+ if (isURL(onSuccess.redirectTo)) {
495
+ window.location.href = onSuccess.redirectTo;
496
+ } else {
497
+ history.push(onSuccess.redirectTo);
498
+ }
387
499
  }
388
- }
389
- }, _callee3);
390
- }));
391
-
392
- function onOk() {
393
- return _onOk2.apply(this, arguments);
394
- }
395
-
396
- return onOk;
397
- }()
398
- });
399
- } else {
400
- message.success(compile(onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage));
401
- }
402
-
403
- case 12:
404
- case "end":
405
- return _context4.stop();
406
- }
500
+ case 1:
501
+ case "end":
502
+ return _context7.stop();
503
+ }
504
+ }, _callee7);
505
+ }));
506
+ function onOk() {
507
+ return _onOk2.apply(this, arguments);
508
+ }
509
+ return onOk;
510
+ }()
511
+ });
512
+ } else {
513
+ message.success(compile(onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage));
514
+ }
515
+ case 12:
516
+ case "end":
517
+ return _context8.stop();
407
518
  }
408
- }, _callee4);
519
+ }, _callee8);
409
520
  }))();
410
521
  }
411
522
  };
412
523
  };
413
524
  export var useCustomizeBulkUpdateActionProps = function useCustomizeBulkUpdateActionProps() {
414
- var _tableBlockContext$fi, _tableBlockContext$fi2, _currentUserContext$d3;
415
-
525
+ var _ref5, _tableBlockContext$fi, _tableBlockContext$fi2, _tableBlockContext$fi3, _currentUserContext$d3;
416
526
  var _useBlockRequestConte3 = useBlockRequestContext(),
417
- field = _useBlockRequestConte3.field,
418
- resource = _useBlockRequestConte3.resource,
419
- __parent = _useBlockRequestConte3.__parent,
420
- service = _useBlockRequestConte3.service;
421
-
527
+ field = _useBlockRequestConte3.field,
528
+ resource = _useBlockRequestConte3.resource,
529
+ __parent = _useBlockRequestConte3.__parent,
530
+ service = _useBlockRequestConte3.service;
531
+ var expressionScope = useContext(SchemaExpressionScopeContext);
422
532
  var actionSchema = useFieldSchema();
423
- var currentRecord = useRecord();
424
533
  var tableBlockContext = useTableBlockContext();
425
534
  var rowKey = tableBlockContext.rowKey;
426
-
427
- var _ref3 = (_tableBlockContext$fi = (_tableBlockContext$fi2 = tableBlockContext.field) === null || _tableBlockContext$fi2 === void 0 ? void 0 : _tableBlockContext$fi2.data) !== null && _tableBlockContext$fi !== void 0 ? _tableBlockContext$fi : {},
428
- selectedRowKeys = _ref3.selectedRowKeys;
429
-
535
+ var selectedRecordKeys = (_ref5 = (_tableBlockContext$fi = (_tableBlockContext$fi2 = tableBlockContext.field) === null || _tableBlockContext$fi2 === void 0 ? void 0 : (_tableBlockContext$fi3 = _tableBlockContext$fi2.data) === null || _tableBlockContext$fi3 === void 0 ? void 0 : _tableBlockContext$fi3.selectedRowKeys) !== null && _tableBlockContext$fi !== void 0 ? _tableBlockContext$fi : expressionScope === null || expressionScope === void 0 ? void 0 : expressionScope.selectedRecordKeys) !== null && _ref5 !== void 0 ? _ref5 : {};
430
536
  var currentUserContext = useCurrentUserContext();
431
537
  var currentUser = currentUserContext === null || currentUserContext === void 0 ? void 0 : (_currentUserContext$d3 = currentUserContext.data) === null || _currentUserContext$d3 === void 0 ? void 0 : _currentUserContext$d3.data;
432
538
  var history = useHistory();
433
539
  var compile = useCompile();
434
-
435
540
  var _useTranslation2 = useTranslation(),
436
- t = _useTranslation2.t;
437
-
541
+ t = _useTranslation2.t;
438
542
  var actionField = useField();
439
543
  return {
440
544
  onClick: function onClick() {
441
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
545
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
442
546
  var _actionSchema$xActio3;
443
-
444
- var _ref4, _ref4$assignedValues, originalAssignedValues, onSuccess, updateMode, assignedValues;
445
-
446
- return regeneratorRuntime.wrap(function _callee8$(_context8) {
447
- while (1) {
448
- switch (_context8.prev = _context8.next) {
449
- case 0:
450
- _ref4 = (_actionSchema$xActio3 = actionSchema === null || actionSchema === void 0 ? void 0 : actionSchema['x-action-settings']) !== null && _actionSchema$xActio3 !== void 0 ? _actionSchema$xActio3 : {}, _ref4$assignedValues = _ref4.assignedValues, originalAssignedValues = _ref4$assignedValues === void 0 ? {} : _ref4$assignedValues, onSuccess = _ref4.onSuccess, updateMode = _ref4.updateMode;
451
- actionField.data = field.data || {};
452
- actionField.data.loading = true;
453
- assignedValues = parse(originalAssignedValues)({
454
- currentTime: new Date(),
455
- currentUser: currentUser
456
- });
457
- Modal.confirm({
458
- title: t('Bulk update'),
459
- content: updateMode === 'selected' ? t('Update selected data?') : t('Update all data?'),
460
- onOk: function onOk() {
461
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
462
- var _service$params$, _service$params, _service$refresh2;
463
-
464
- var _ref5, filter, updateData, _parent$service3, _parent$service3$refr;
465
-
466
- return regeneratorRuntime.wrap(function _callee6$(_context6) {
467
- while (1) {
468
- switch (_context6.prev = _context6.next) {
469
- case 0:
470
- _ref5 = (_service$params$ = (_service$params = service.params) === null || _service$params === void 0 ? void 0 : _service$params[0]) !== null && _service$params$ !== void 0 ? _service$params$ : {}, filter = _ref5.filter;
471
- updateData = {
472
- values: _objectSpread({}, assignedValues),
473
- filter: filter,
474
- forceUpdate: false
475
- };
476
-
477
- if (!(updateMode === 'selected')) {
478
- _context6.next = 8;
479
- break;
480
- }
481
-
482
- if (selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length) {
483
- _context6.next = 7;
484
- break;
485
- }
486
-
487
- message.error(t('Please select the records to be updated'));
488
- actionField.data.loading = false;
489
- return _context6.abrupt("return");
490
-
491
- case 7:
492
- updateData.filter = {
493
- $and: [_defineProperty({}, rowKey || 'id', {
494
- $in: selectedRowKeys
495
- })]
496
- };
497
-
498
- case 8:
499
- if (!updateData.filter) {
500
- updateData.forceUpdate = true;
501
- }
502
-
503
- _context6.prev = 9;
504
- _context6.next = 12;
505
- return resource.update(updateData);
506
-
507
- case 12:
508
- _context6.next = 16;
509
- break;
510
-
511
- case 14:
512
- _context6.prev = 14;
513
- _context6.t0 = _context6["catch"](9);
514
-
515
- case 16:
516
- _context6.prev = 16;
517
- actionField.data.loading = false;
518
- return _context6.finish(16);
519
-
520
- case 19:
521
- service === null || service === void 0 ? void 0 : (_service$refresh2 = service.refresh) === null || _service$refresh2 === void 0 ? void 0 : _service$refresh2.call(service);
522
-
523
- if (!(resource instanceof TableFieldResource)) {
524
- __parent === null || __parent === void 0 ? void 0 : (_parent$service3 = __parent.service) === null || _parent$service3 === void 0 ? void 0 : (_parent$service3$refr = _parent$service3.refresh) === null || _parent$service3$refr === void 0 ? void 0 : _parent$service3$refr.call(_parent$service3);
525
- }
526
-
527
- if (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage) {
528
- _context6.next = 23;
529
- break;
530
- }
531
-
532
- return _context6.abrupt("return");
533
-
534
- case 23:
535
- if (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.manualClose) {
536
- Modal.success({
537
- title: compile(onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage),
538
- onOk: function () {
539
- var _onOk3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
540
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
541
- while (1) {
542
- switch (_context5.prev = _context5.next) {
543
- case 0:
544
- if ((onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.redirecting) && (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.redirectTo)) {
545
- if (isURL(onSuccess.redirectTo)) {
546
- window.location.href = onSuccess.redirectTo;
547
- } else {
548
- history.push(onSuccess.redirectTo);
549
- }
550
- }
551
-
552
- case 1:
553
- case "end":
554
- return _context5.stop();
547
+ var _ref6, _ref6$assignedValues, originalAssignedValues, onSuccess, updateMode, assignedValues;
548
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
549
+ while (1) switch (_context12.prev = _context12.next) {
550
+ case 0:
551
+ _ref6 = (_actionSchema$xActio3 = actionSchema === null || actionSchema === void 0 ? void 0 : actionSchema['x-action-settings']) !== null && _actionSchema$xActio3 !== void 0 ? _actionSchema$xActio3 : {}, _ref6$assignedValues = _ref6.assignedValues, originalAssignedValues = _ref6$assignedValues === void 0 ? {} : _ref6$assignedValues, onSuccess = _ref6.onSuccess, updateMode = _ref6.updateMode;
552
+ actionField.data = field.data || {};
553
+ actionField.data.loading = true;
554
+ assignedValues = parse(originalAssignedValues)({
555
+ currentTime: new Date(),
556
+ currentUser: currentUser
557
+ });
558
+ Modal.confirm({
559
+ title: t('Bulk update'),
560
+ content: updateMode === 'selected' ? t('Update selected data?') : t('Update all data?'),
561
+ onOk: function onOk() {
562
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
563
+ var _service$params$, _service$params, _service$refresh2;
564
+ var _ref7, filter, updateData, _parent$service3, _parent$service3$refr;
565
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
566
+ while (1) switch (_context10.prev = _context10.next) {
567
+ case 0:
568
+ _ref7 = (_service$params$ = (_service$params = service.params) === null || _service$params === void 0 ? void 0 : _service$params[0]) !== null && _service$params$ !== void 0 ? _service$params$ : {}, filter = _ref7.filter;
569
+ updateData = {
570
+ values: _objectSpread({}, assignedValues),
571
+ filter: filter,
572
+ forceUpdate: false
573
+ };
574
+ if (!(updateMode === 'selected')) {
575
+ _context10.next = 8;
576
+ break;
577
+ }
578
+ if (selectedRecordKeys === null || selectedRecordKeys === void 0 ? void 0 : selectedRecordKeys.length) {
579
+ _context10.next = 7;
580
+ break;
581
+ }
582
+ message.error(t('Please select the records to be updated'));
583
+ actionField.data.loading = false;
584
+ return _context10.abrupt("return");
585
+ case 7:
586
+ updateData.filter = {
587
+ $and: [_defineProperty({}, rowKey || 'id', {
588
+ $in: selectedRecordKeys
589
+ })]
590
+ };
591
+ case 8:
592
+ if (!updateData.filter) {
593
+ updateData.forceUpdate = true;
594
+ }
595
+ _context10.prev = 9;
596
+ _context10.next = 12;
597
+ return resource.update(updateData);
598
+ case 12:
599
+ _context10.next = 16;
600
+ break;
601
+ case 14:
602
+ _context10.prev = 14;
603
+ _context10.t0 = _context10["catch"](9);
604
+ case 16:
605
+ _context10.prev = 16;
606
+ actionField.data.loading = false;
607
+ return _context10.finish(16);
608
+ case 19:
609
+ service === null || service === void 0 ? void 0 : (_service$refresh2 = service.refresh) === null || _service$refresh2 === void 0 ? void 0 : _service$refresh2.call(service);
610
+ if (!(resource instanceof TableFieldResource)) {
611
+ __parent === null || __parent === void 0 ? void 0 : (_parent$service3 = __parent.service) === null || _parent$service3 === void 0 ? void 0 : (_parent$service3$refr = _parent$service3.refresh) === null || _parent$service3$refr === void 0 ? void 0 : _parent$service3$refr.call(_parent$service3);
612
+ }
613
+ if (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage) {
614
+ _context10.next = 23;
615
+ break;
616
+ }
617
+ return _context10.abrupt("return");
618
+ case 23:
619
+ if (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.manualClose) {
620
+ Modal.success({
621
+ title: compile(onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage),
622
+ onOk: function () {
623
+ var _onOk3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
624
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
625
+ while (1) switch (_context9.prev = _context9.next) {
626
+ case 0:
627
+ if ((onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.redirecting) && (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.redirectTo)) {
628
+ if (isURL(onSuccess.redirectTo)) {
629
+ window.location.href = onSuccess.redirectTo;
630
+ } else {
631
+ history.push(onSuccess.redirectTo);
555
632
  }
556
633
  }
557
- }, _callee5);
558
- }));
559
-
560
- function onOk() {
561
- return _onOk3.apply(this, arguments);
634
+ case 1:
635
+ case "end":
636
+ return _context9.stop();
562
637
  }
563
-
564
- return onOk;
565
- }()
566
- });
567
- } else {
568
- message.success(compile(onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage));
569
- }
570
-
571
- case 24:
572
- case "end":
573
- return _context6.stop();
574
- }
575
- }
576
- }, _callee6, null, [[9, 14, 16, 19]]);
577
- }))();
578
- },
579
- onCancel: function onCancel() {
580
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {
581
- return regeneratorRuntime.wrap(function _callee7$(_context7) {
582
- while (1) {
583
- switch (_context7.prev = _context7.next) {
584
- case 0:
585
- actionField.data.loading = false;
586
-
587
- case 1:
588
- case "end":
589
- return _context7.stop();
638
+ }, _callee9);
639
+ }));
640
+ function onOk() {
641
+ return _onOk3.apply(this, arguments);
642
+ }
643
+ return onOk;
644
+ }()
645
+ });
646
+ } else {
647
+ message.success(compile(onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage));
590
648
  }
591
- }
592
- }, _callee7);
593
- }))();
594
- }
595
- });
596
-
597
- case 5:
598
- case "end":
599
- return _context8.stop();
600
- }
649
+ case 24:
650
+ case "end":
651
+ return _context10.stop();
652
+ }
653
+ }, _callee10, null, [[9, 14, 16, 19]]);
654
+ }))();
655
+ },
656
+ onCancel: function onCancel() {
657
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
658
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
659
+ while (1) switch (_context11.prev = _context11.next) {
660
+ case 0:
661
+ actionField.data.loading = false;
662
+ case 1:
663
+ case "end":
664
+ return _context11.stop();
665
+ }
666
+ }, _callee11);
667
+ }))();
668
+ }
669
+ });
670
+ case 5:
671
+ case "end":
672
+ return _context12.stop();
601
673
  }
602
- }, _callee8);
674
+ }, _callee12);
603
675
  }))();
604
676
  }
605
677
  };
606
678
  };
607
679
  export var useCustomizeBulkEditActionProps = function useCustomizeBulkEditActionProps() {
608
- var _tableBlockContext$fi3, _tableBlockContext$fi4;
609
-
680
+ var _ref9, _tableBlockContext$fi4, _tableBlockContext$fi5, _tableBlockContext$fi6;
610
681
  var form = useForm();
611
-
612
682
  var _useTranslation3 = useTranslation(),
613
- t = _useTranslation3.t;
614
-
683
+ t = _useTranslation3.t;
615
684
  var _useBlockRequestConte4 = useBlockRequestContext(),
616
- field = _useBlockRequestConte4.field,
617
- resource = _useBlockRequestConte4.resource,
618
- __parent = _useBlockRequestConte4.__parent;
619
-
685
+ field = _useBlockRequestConte4.field,
686
+ resource = _useBlockRequestConte4.resource,
687
+ __parent = _useBlockRequestConte4.__parent;
688
+ var expressionScope = useContext(SchemaExpressionScopeContext);
620
689
  var actionContext = useActionContext();
621
690
  var history = useHistory();
622
691
  var compile = useCompile();
623
692
  var actionField = useField();
624
693
  var tableBlockContext = useTableBlockContext();
625
694
  var rowKey = tableBlockContext.rowKey;
626
-
627
- var _ref7 = (_tableBlockContext$fi3 = (_tableBlockContext$fi4 = tableBlockContext.field) === null || _tableBlockContext$fi4 === void 0 ? void 0 : _tableBlockContext$fi4.data) !== null && _tableBlockContext$fi3 !== void 0 ? _tableBlockContext$fi3 : {},
628
- selectedRowKeys = _ref7.selectedRowKeys;
629
-
695
+ var selectedRecordKeys = (_ref9 = (_tableBlockContext$fi4 = (_tableBlockContext$fi5 = tableBlockContext.field) === null || _tableBlockContext$fi5 === void 0 ? void 0 : (_tableBlockContext$fi6 = _tableBlockContext$fi5.data) === null || _tableBlockContext$fi6 === void 0 ? void 0 : _tableBlockContext$fi6.selectedRowKeys) !== null && _tableBlockContext$fi4 !== void 0 ? _tableBlockContext$fi4 : expressionScope === null || expressionScope === void 0 ? void 0 : expressionScope.selectedRecordKeys) !== null && _ref9 !== void 0 ? _ref9 : {};
630
696
  var setVisible = actionContext.setVisible,
631
- actionSchema = actionContext.fieldSchema;
697
+ actionSchema = actionContext.fieldSchema;
632
698
  return {
633
699
  onClick: function onClick() {
634
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
700
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
635
701
  var _actionSchema$xActio4, _parent$service$para, _parent$service$para2;
636
-
637
- var _ref8, onSuccess, skipValidator, updateMode, _ref9, filter, values, key, value, _parent$service4, _parent$service4$refr, updateData, _parent$__parent, _parent$__parent$serv, _parent$__parent$serv2;
638
-
639
- return regeneratorRuntime.wrap(function _callee10$(_context10) {
640
- while (1) {
641
- switch (_context10.prev = _context10.next) {
642
- case 0:
643
- _ref8 = (_actionSchema$xActio4 = actionSchema === null || actionSchema === void 0 ? void 0 : actionSchema['x-action-settings']) !== null && _actionSchema$xActio4 !== void 0 ? _actionSchema$xActio4 : {}, onSuccess = _ref8.onSuccess, skipValidator = _ref8.skipValidator, updateMode = _ref8.updateMode;
644
- _ref9 = (_parent$service$para = (_parent$service$para2 = __parent.service.params) === null || _parent$service$para2 === void 0 ? void 0 : _parent$service$para2[0]) !== null && _parent$service$para !== void 0 ? _parent$service$para : {}, filter = _ref9.filter;
645
-
646
- if (skipValidator) {
647
- _context10.next = 5;
648
- break;
649
- }
650
-
651
- _context10.next = 5;
652
- return form.submit();
653
-
654
- case 5:
655
- values = cloneDeep(form.values);
656
- actionField.data = field.data || {};
657
- actionField.data.loading = true;
658
-
659
- for (key in values) {
660
- if (Object.prototype.hasOwnProperty.call(values, key)) {
661
- value = values[key];
662
-
663
- if (BulkEditFormItemValueType.Clear in value) {
664
- values[key] = null;
665
- } else if (BulkEditFormItemValueType.ChangedTo in value) {
666
- values[key] = value[BulkEditFormItemValueType.ChangedTo];
667
- } else if (BulkEditFormItemValueType.RemainsTheSame in value) {
668
- delete values[key];
669
- }
702
+ var _ref10, onSuccess, skipValidator, updateMode, _ref11, filter, values, key, value, _parent$service4, _parent$service4$refr, updateData, _parent$__parent, _parent$__parent$serv, _parent$__parent$serv2;
703
+ return _regeneratorRuntime().wrap(function _callee14$(_context14) {
704
+ while (1) switch (_context14.prev = _context14.next) {
705
+ case 0:
706
+ _ref10 = (_actionSchema$xActio4 = actionSchema === null || actionSchema === void 0 ? void 0 : actionSchema['x-action-settings']) !== null && _actionSchema$xActio4 !== void 0 ? _actionSchema$xActio4 : {}, onSuccess = _ref10.onSuccess, skipValidator = _ref10.skipValidator, updateMode = _ref10.updateMode;
707
+ _ref11 = (_parent$service$para = (_parent$service$para2 = __parent.service.params) === null || _parent$service$para2 === void 0 ? void 0 : _parent$service$para2[0]) !== null && _parent$service$para !== void 0 ? _parent$service$para : {}, filter = _ref11.filter;
708
+ if (skipValidator) {
709
+ _context14.next = 5;
710
+ break;
711
+ }
712
+ _context14.next = 5;
713
+ return form.submit();
714
+ case 5:
715
+ values = cloneDeep(form.values);
716
+ actionField.data = field.data || {};
717
+ actionField.data.loading = true;
718
+ for (key in values) {
719
+ if (Object.prototype.hasOwnProperty.call(values, key)) {
720
+ value = values[key];
721
+ if (BulkEditFormItemValueType.Clear in value) {
722
+ values[key] = null;
723
+ } else if (BulkEditFormItemValueType.ChangedTo in value) {
724
+ values[key] = value[BulkEditFormItemValueType.ChangedTo];
725
+ } else if (BulkEditFormItemValueType.RemainsTheSame in value) {
726
+ delete values[key];
670
727
  }
671
728
  }
672
-
673
- _context10.prev = 9;
674
- updateData = {
675
- values: values,
676
- filter: filter,
677
- forceUpdate: false
678
- };
679
-
680
- if (!(updateMode === 'selected')) {
681
- _context10.next = 16;
682
- break;
683
- }
684
-
685
- if (selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length) {
686
- _context10.next = 15;
687
- break;
688
- }
689
-
690
- message.error(t('Please select the records to be updated'));
691
- return _context10.abrupt("return");
692
-
693
- case 15:
694
- updateData.filter = {
695
- $and: [_defineProperty({}, rowKey || 'id', {
696
- $in: selectedRowKeys
697
- })]
698
- };
699
-
700
- case 16:
701
- if (!updateData.filter) {
702
- updateData.forceUpdate = true;
703
- }
704
-
705
- _context10.next = 19;
706
- return resource.update(updateData);
707
-
708
- case 19:
709
- actionField.data.loading = false;
710
-
711
- if (!(resource instanceof TableFieldResource)) {
712
- __parent === null || __parent === void 0 ? void 0 : (_parent$__parent = __parent.__parent) === null || _parent$__parent === void 0 ? void 0 : (_parent$__parent$serv = _parent$__parent.service) === null || _parent$__parent$serv === void 0 ? void 0 : (_parent$__parent$serv2 = _parent$__parent$serv.refresh) === null || _parent$__parent$serv2 === void 0 ? void 0 : _parent$__parent$serv2.call(_parent$__parent$serv);
713
- }
714
-
715
- __parent === null || __parent === void 0 ? void 0 : (_parent$service4 = __parent.service) === null || _parent$service4 === void 0 ? void 0 : (_parent$service4$refr = _parent$service4.refresh) === null || _parent$service4$refr === void 0 ? void 0 : _parent$service4$refr.call(_parent$service4);
716
- setVisible === null || setVisible === void 0 ? void 0 : setVisible(false);
717
-
718
- if (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage) {
719
- _context10.next = 25;
720
- break;
721
- }
722
-
723
- return _context10.abrupt("return");
724
-
725
- case 25:
726
- if (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.manualClose) {
727
- Modal.success({
728
- title: compile(onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage),
729
- onOk: function () {
730
- var _onOk4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
731
- return regeneratorRuntime.wrap(function _callee9$(_context9) {
732
- while (1) {
733
- switch (_context9.prev = _context9.next) {
734
- case 0:
735
- _context9.next = 2;
736
- return form.reset();
737
-
738
- case 2:
739
- if ((onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.redirecting) && (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.redirectTo)) {
740
- if (isURL(onSuccess.redirectTo)) {
741
- window.location.href = onSuccess.redirectTo;
742
- } else {
743
- history.push(onSuccess.redirectTo);
744
- }
745
- }
746
-
747
- case 3:
748
- case "end":
749
- return _context9.stop();
729
+ }
730
+ _context14.prev = 9;
731
+ updateData = {
732
+ values: values,
733
+ filter: filter,
734
+ forceUpdate: false
735
+ };
736
+ if (!(updateMode === 'selected')) {
737
+ _context14.next = 16;
738
+ break;
739
+ }
740
+ if (selectedRecordKeys === null || selectedRecordKeys === void 0 ? void 0 : selectedRecordKeys.length) {
741
+ _context14.next = 15;
742
+ break;
743
+ }
744
+ message.error(t('Please select the records to be updated'));
745
+ return _context14.abrupt("return");
746
+ case 15:
747
+ updateData.filter = {
748
+ $and: [_defineProperty({}, rowKey || 'id', {
749
+ $in: selectedRecordKeys
750
+ })]
751
+ };
752
+ case 16:
753
+ if (!updateData.filter) {
754
+ updateData.forceUpdate = true;
755
+ }
756
+ _context14.next = 19;
757
+ return resource.update(updateData);
758
+ case 19:
759
+ actionField.data.loading = false;
760
+ if (!(resource instanceof TableFieldResource)) {
761
+ __parent === null || __parent === void 0 ? void 0 : (_parent$__parent = __parent.__parent) === null || _parent$__parent === void 0 ? void 0 : (_parent$__parent$serv = _parent$__parent.service) === null || _parent$__parent$serv === void 0 ? void 0 : (_parent$__parent$serv2 = _parent$__parent$serv.refresh) === null || _parent$__parent$serv2 === void 0 ? void 0 : _parent$__parent$serv2.call(_parent$__parent$serv);
762
+ }
763
+ __parent === null || __parent === void 0 ? void 0 : (_parent$service4 = __parent.service) === null || _parent$service4 === void 0 ? void 0 : (_parent$service4$refr = _parent$service4.refresh) === null || _parent$service4$refr === void 0 ? void 0 : _parent$service4$refr.call(_parent$service4);
764
+ setVisible === null || setVisible === void 0 ? void 0 : setVisible(false);
765
+ if (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage) {
766
+ _context14.next = 25;
767
+ break;
768
+ }
769
+ return _context14.abrupt("return");
770
+ case 25:
771
+ if (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.manualClose) {
772
+ Modal.success({
773
+ title: compile(onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage),
774
+ onOk: function () {
775
+ var _onOk4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
776
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
777
+ while (1) switch (_context13.prev = _context13.next) {
778
+ case 0:
779
+ _context13.next = 2;
780
+ return form.reset();
781
+ case 2:
782
+ if ((onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.redirecting) && (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.redirectTo)) {
783
+ if (isURL(onSuccess.redirectTo)) {
784
+ window.location.href = onSuccess.redirectTo;
785
+ } else {
786
+ history.push(onSuccess.redirectTo);
787
+ }
750
788
  }
751
- }
752
- }, _callee9);
753
- }));
754
-
755
- function onOk() {
756
- return _onOk4.apply(this, arguments);
757
- }
758
-
759
- return onOk;
760
- }()
761
- });
762
- } else {
763
- message.success(compile(onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage));
764
- }
765
-
766
- case 26:
767
- _context10.prev = 26;
768
- actionField.data.loading = false;
769
- return _context10.finish(26);
770
-
771
- case 29:
772
- case "end":
773
- return _context10.stop();
774
- }
789
+ case 3:
790
+ case "end":
791
+ return _context13.stop();
792
+ }
793
+ }, _callee13);
794
+ }));
795
+ function onOk() {
796
+ return _onOk4.apply(this, arguments);
797
+ }
798
+ return onOk;
799
+ }()
800
+ });
801
+ } else {
802
+ message.success(compile(onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage));
803
+ }
804
+ case 26:
805
+ _context14.prev = 26;
806
+ actionField.data.loading = false;
807
+ return _context14.finish(26);
808
+ case 29:
809
+ case "end":
810
+ return _context14.stop();
775
811
  }
776
- }, _callee10, null, [[9,, 26, 29]]);
812
+ }, _callee14, null, [[9,, 26, 29]]);
777
813
  }))();
778
814
  }
779
815
  };
780
816
  };
781
817
  export var useCustomizeRequestActionProps = function useCustomizeRequestActionProps() {
782
818
  var _currentUserContext$d4;
783
-
784
819
  var apiClient = useAPIClient();
785
820
  var history = useHistory();
786
821
  var filterByTk = useFilterByTk();
787
822
  var actionSchema = useFieldSchema();
788
823
  var compile = useCompile();
789
824
  var form = useForm();
790
-
791
825
  var _useCollection2 = useCollection(),
792
- fields = _useCollection2.fields,
793
- getField = _useCollection2.getField;
794
-
826
+ fields = _useCollection2.fields,
827
+ getField = _useCollection2.getField;
795
828
  var _useBlockRequestConte5 = useBlockRequestContext(),
796
- field = _useBlockRequestConte5.field,
797
- resource = _useBlockRequestConte5.resource,
798
- __parent = _useBlockRequestConte5.__parent,
799
- service = _useBlockRequestConte5.service;
800
-
829
+ field = _useBlockRequestConte5.field,
830
+ resource = _useBlockRequestConte5.resource,
831
+ __parent = _useBlockRequestConte5.__parent,
832
+ service = _useBlockRequestConte5.service;
801
833
  var currentRecord = useRecord();
802
834
  var currentUserContext = useCurrentUserContext();
803
835
  var currentUser = currentUserContext === null || currentUserContext === void 0 ? void 0 : (_currentUserContext$d4 = currentUserContext.data) === null || _currentUserContext$d4 === void 0 ? void 0 : _currentUserContext$d4.data;
804
836
  var actionField = useField();
805
-
806
837
  var _useActionContext2 = useActionContext(),
807
- visible = _useActionContext2.visible,
808
- setVisible = _useActionContext2.setVisible;
809
-
838
+ setVisible = _useActionContext2.setVisible;
810
839
  return {
811
840
  onClick: function onClick() {
812
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
841
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
813
842
  var _actionSchema$xActio5;
814
-
815
- var _ref11, skipValidator, onSuccess, requestSettings, xAction, headers, params, data, methods, fieldNames, values, requestBody, _service$refresh3, _parent$service5, _parent$service5$refr;
816
-
817
- return regeneratorRuntime.wrap(function _callee12$(_context12) {
818
- while (1) {
819
- switch (_context12.prev = _context12.next) {
820
- case 0:
821
- _ref11 = (_actionSchema$xActio5 = actionSchema === null || actionSchema === void 0 ? void 0 : actionSchema['x-action-settings']) !== null && _actionSchema$xActio5 !== void 0 ? _actionSchema$xActio5 : {}, skipValidator = _ref11.skipValidator, onSuccess = _ref11.onSuccess, requestSettings = _ref11.requestSettings;
822
- xAction = actionSchema === null || actionSchema === void 0 ? void 0 : actionSchema['x-action'];
823
-
824
- if (requestSettings['url']) {
825
- _context12.next = 4;
826
- break;
827
- }
828
-
829
- return _context12.abrupt("return");
830
-
831
- case 4:
832
- if (!(skipValidator !== true && xAction === 'customize:form:request')) {
833
- _context12.next = 7;
834
- break;
835
- }
836
-
837
- _context12.next = 7;
838
- return form.submit();
839
-
840
- case 7:
841
- headers = requestSettings['headers'] ? JSON.parse(requestSettings['headers']) : {};
842
- params = requestSettings['params'] ? JSON.parse(requestSettings['params']) : {};
843
- data = requestSettings['data'] ? JSON.parse(requestSettings['data']) : {};
844
- methods = ['POST', 'PUT', 'PATCH'];
845
-
846
- if (xAction === 'customize:form:request' && methods.includes(requestSettings['method'])) {
847
- fieldNames = fields.map(function (field) {
848
- return field.name;
849
- });
850
- values = getFormValues(filterByTk, field, form, fieldNames, getField, resource);
851
- Object.assign(data, values);
852
- }
853
-
854
- requestBody = {
855
- url: renderTemplate(requestSettings['url'], {
856
- currentRecord: currentRecord,
857
- currentUser: currentUser
858
- }),
859
- method: requestSettings['method'],
860
- headers: parse(headers)({
861
- currentRecord: currentRecord,
862
- currentUser: currentUser
863
- }),
864
- params: parse(params)({
865
- currentRecord: currentRecord,
866
- currentUser: currentUser
867
- }),
868
- data: parse(data)({
869
- currentRecord: currentRecord,
870
- currentUser: currentUser
871
- })
872
- };
873
- actionField.data = field.data || {};
874
- actionField.data.loading = true;
875
- _context12.prev = 15;
876
- _context12.next = 18;
877
- return apiClient.request(_objectSpread({}, requestBody));
878
-
879
- case 18:
880
- actionField.data.loading = false;
881
-
882
- if (!(resource instanceof TableFieldResource)) {
883
- __parent === null || __parent === void 0 ? void 0 : (_parent$service5 = __parent.service) === null || _parent$service5 === void 0 ? void 0 : (_parent$service5$refr = _parent$service5.refresh) === null || _parent$service5$refr === void 0 ? void 0 : _parent$service5$refr.call(_parent$service5);
884
- }
885
-
886
- service === null || service === void 0 ? void 0 : (_service$refresh3 = service.refresh) === null || _service$refresh3 === void 0 ? void 0 : _service$refresh3.call(service);
887
-
888
- if (xAction === 'customize:form:request') {
889
- setVisible === null || setVisible === void 0 ? void 0 : setVisible(false);
890
- }
891
-
892
- if (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage) {
893
- _context12.next = 24;
894
- break;
895
- }
896
-
897
- return _context12.abrupt("return");
898
-
899
- case 24:
900
- if (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.manualClose) {
901
- Modal.success({
902
- title: compile(onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage),
903
- onOk: function () {
904
- var _onOk5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
905
- return regeneratorRuntime.wrap(function _callee11$(_context11) {
906
- while (1) {
907
- switch (_context11.prev = _context11.next) {
908
- case 0:
909
- if ((onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.redirecting) && (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.redirectTo)) {
910
- if (isURL(onSuccess.redirectTo)) {
911
- window.location.href = onSuccess.redirectTo;
912
- } else {
913
- history.push(onSuccess.redirectTo);
914
- }
915
- }
916
-
917
- case 1:
918
- case "end":
919
- return _context11.stop();
843
+ var _ref13, skipValidator, onSuccess, requestSettings, xAction, headers, params, data, methods, fieldNames, values, requestBody, _service$refresh3, _parent$service5, _parent$service5$refr;
844
+ return _regeneratorRuntime().wrap(function _callee16$(_context16) {
845
+ while (1) switch (_context16.prev = _context16.next) {
846
+ case 0:
847
+ _ref13 = (_actionSchema$xActio5 = actionSchema === null || actionSchema === void 0 ? void 0 : actionSchema['x-action-settings']) !== null && _actionSchema$xActio5 !== void 0 ? _actionSchema$xActio5 : {}, skipValidator = _ref13.skipValidator, onSuccess = _ref13.onSuccess, requestSettings = _ref13.requestSettings;
848
+ xAction = actionSchema === null || actionSchema === void 0 ? void 0 : actionSchema['x-action'];
849
+ if (requestSettings['url']) {
850
+ _context16.next = 4;
851
+ break;
852
+ }
853
+ return _context16.abrupt("return");
854
+ case 4:
855
+ if (!(skipValidator !== true && xAction === 'customize:form:request')) {
856
+ _context16.next = 7;
857
+ break;
858
+ }
859
+ _context16.next = 7;
860
+ return form.submit();
861
+ case 7:
862
+ headers = requestSettings['headers'] ? JSON.parse(requestSettings['headers']) : {};
863
+ params = requestSettings['params'] ? JSON.parse(requestSettings['params']) : {};
864
+ data = requestSettings['data'] ? JSON.parse(requestSettings['data']) : {};
865
+ methods = ['POST', 'PUT', 'PATCH'];
866
+ if (xAction === 'customize:form:request' && methods.includes(requestSettings['method'])) {
867
+ fieldNames = fields.map(function (field) {
868
+ return field.name;
869
+ });
870
+ values = getFormValues(filterByTk, field, form, fieldNames, getField, resource);
871
+ Object.assign(data, values);
872
+ }
873
+ requestBody = {
874
+ url: renderTemplate(requestSettings['url'], {
875
+ currentRecord: currentRecord,
876
+ currentUser: currentUser
877
+ }),
878
+ method: requestSettings['method'],
879
+ headers: parse(headers)({
880
+ currentRecord: currentRecord,
881
+ currentUser: currentUser
882
+ }),
883
+ params: parse(params)({
884
+ currentRecord: currentRecord,
885
+ currentUser: currentUser
886
+ }),
887
+ data: parse(data)({
888
+ currentRecord: currentRecord,
889
+ currentUser: currentUser
890
+ })
891
+ };
892
+ actionField.data = field.data || {};
893
+ actionField.data.loading = true;
894
+ _context16.prev = 15;
895
+ _context16.next = 18;
896
+ return apiClient.request(_objectSpread({}, requestBody));
897
+ case 18:
898
+ actionField.data.loading = false;
899
+ if (!(resource instanceof TableFieldResource)) {
900
+ __parent === null || __parent === void 0 ? void 0 : (_parent$service5 = __parent.service) === null || _parent$service5 === void 0 ? void 0 : (_parent$service5$refr = _parent$service5.refresh) === null || _parent$service5$refr === void 0 ? void 0 : _parent$service5$refr.call(_parent$service5);
901
+ }
902
+ service === null || service === void 0 ? void 0 : (_service$refresh3 = service.refresh) === null || _service$refresh3 === void 0 ? void 0 : _service$refresh3.call(service);
903
+ if (xAction === 'customize:form:request') {
904
+ setVisible === null || setVisible === void 0 ? void 0 : setVisible(false);
905
+ }
906
+ if (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage) {
907
+ _context16.next = 24;
908
+ break;
909
+ }
910
+ return _context16.abrupt("return");
911
+ case 24:
912
+ if (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.manualClose) {
913
+ Modal.success({
914
+ title: compile(onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage),
915
+ onOk: function () {
916
+ var _onOk5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
917
+ return _regeneratorRuntime().wrap(function _callee15$(_context15) {
918
+ while (1) switch (_context15.prev = _context15.next) {
919
+ case 0:
920
+ if ((onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.redirecting) && (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.redirectTo)) {
921
+ if (isURL(onSuccess.redirectTo)) {
922
+ window.location.href = onSuccess.redirectTo;
923
+ } else {
924
+ history.push(onSuccess.redirectTo);
925
+ }
920
926
  }
921
- }
922
- }, _callee11);
923
- }));
924
-
925
- function onOk() {
926
- return _onOk5.apply(this, arguments);
927
- }
928
-
929
- return onOk;
930
- }()
931
- });
932
- } else {
933
- message.success(compile(onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage));
934
- }
935
-
936
- case 25:
937
- _context12.prev = 25;
938
- actionField.data.loading = false;
939
- return _context12.finish(25);
940
-
941
- case 28:
942
- case "end":
943
- return _context12.stop();
944
- }
927
+ case 1:
928
+ case "end":
929
+ return _context15.stop();
930
+ }
931
+ }, _callee15);
932
+ }));
933
+ function onOk() {
934
+ return _onOk5.apply(this, arguments);
935
+ }
936
+ return onOk;
937
+ }()
938
+ });
939
+ } else {
940
+ message.success(compile(onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage));
941
+ }
942
+ case 25:
943
+ _context16.prev = 25;
944
+ actionField.data.loading = false;
945
+ return _context16.finish(25);
946
+ case 28:
947
+ case "end":
948
+ return _context16.stop();
945
949
  }
946
- }, _callee12, null, [[15,, 25, 28]]);
950
+ }, _callee16, null, [[15,, 25, 28]]);
947
951
  }))();
948
952
  }
949
953
  };
950
954
  };
951
955
  export var useUpdateActionProps = function useUpdateActionProps() {
952
956
  var _currentUserContext$d5;
953
-
954
957
  var form = useForm();
955
958
  var filterByTk = useFilterByTk();
956
-
957
959
  var _useBlockRequestConte6 = useBlockRequestContext(),
958
- field = _useBlockRequestConte6.field,
959
- resource = _useBlockRequestConte6.resource,
960
- __parent = _useBlockRequestConte6.__parent;
961
-
960
+ field = _useBlockRequestConte6.field,
961
+ resource = _useBlockRequestConte6.resource,
962
+ __parent = _useBlockRequestConte6.__parent;
962
963
  var _useActionContext3 = useActionContext(),
963
- setVisible = _useActionContext3.setVisible;
964
-
964
+ setVisible = _useActionContext3.setVisible;
965
965
  var actionSchema = useFieldSchema();
966
966
  var history = useHistory();
967
-
968
967
  var _useCollection3 = useCollection(),
969
- fields = _useCollection3.fields,
970
- getField = _useCollection3.getField;
971
-
968
+ fields = _useCollection3.fields,
969
+ getField = _useCollection3.getField;
972
970
  var compile = useCompile();
973
971
  var actionField = useField();
974
-
975
972
  var _useFormBlockContext = useFormBlockContext(),
976
- updateAssociationValues = _useFormBlockContext.updateAssociationValues;
977
-
973
+ updateAssociationValues = _useFormBlockContext.updateAssociationValues;
978
974
  var currentRecord = useRecord();
979
975
  var currentUserContext = useCurrentUserContext();
980
976
  var currentUser = currentUserContext === null || currentUserContext === void 0 ? void 0 : (_currentUserContext$d5 = currentUserContext.data) === null || _currentUserContext$d5 === void 0 ? void 0 : _currentUserContext$d5.data;
981
977
  return {
982
978
  onClick: function onClick() {
983
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
979
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
984
980
  var _actionSchema$xActio6;
985
-
986
- var _ref12, _ref12$assignedValues, originalAssignedValues, onSuccess, overwriteValues, skipValidator, assignedValues, fieldNames, values, _parent$service6, _parent$service6$refr, _parent$__parent2, _parent$__parent2$ser, _parent$__parent2$ser2;
987
-
988
- return regeneratorRuntime.wrap(function _callee14$(_context14) {
989
- while (1) {
990
- switch (_context14.prev = _context14.next) {
991
- case 0:
992
- _ref12 = (_actionSchema$xActio6 = actionSchema === null || actionSchema === void 0 ? void 0 : actionSchema['x-action-settings']) !== null && _actionSchema$xActio6 !== void 0 ? _actionSchema$xActio6 : {}, _ref12$assignedValues = _ref12.assignedValues, originalAssignedValues = _ref12$assignedValues === void 0 ? {} : _ref12$assignedValues, onSuccess = _ref12.onSuccess, overwriteValues = _ref12.overwriteValues, skipValidator = _ref12.skipValidator;
993
- assignedValues = parse(originalAssignedValues)({
994
- currentTime: new Date(),
995
- currentRecord: currentRecord,
996
- currentUser: currentUser
997
- });
998
-
999
- if (skipValidator) {
1000
- _context14.next = 5;
1001
- break;
1002
- }
1003
-
1004
- _context14.next = 5;
1005
- return form.submit();
1006
-
1007
- case 5:
1008
- fieldNames = fields.map(function (field) {
1009
- return field.name;
1010
- });
1011
- values = getFormValues(filterByTk, field, form, fieldNames, getField, resource);
1012
- actionField.data = field.data || {};
1013
- actionField.data.loading = true;
1014
- _context14.prev = 9;
1015
- _context14.next = 12;
1016
- return resource.update({
1017
- filterByTk: filterByTk,
1018
- values: _objectSpread(_objectSpread(_objectSpread({}, values), overwriteValues), assignedValues),
1019
- updateAssociationValues: updateAssociationValues
1020
- });
1021
-
1022
- case 12:
1023
- actionField.data.loading = false;
1024
-
1025
- if (!(resource instanceof TableFieldResource)) {
1026
- __parent === null || __parent === void 0 ? void 0 : (_parent$__parent2 = __parent.__parent) === null || _parent$__parent2 === void 0 ? void 0 : (_parent$__parent2$ser = _parent$__parent2.service) === null || _parent$__parent2$ser === void 0 ? void 0 : (_parent$__parent2$ser2 = _parent$__parent2$ser.refresh) === null || _parent$__parent2$ser2 === void 0 ? void 0 : _parent$__parent2$ser2.call(_parent$__parent2$ser);
1027
- }
1028
-
1029
- __parent === null || __parent === void 0 ? void 0 : (_parent$service6 = __parent.service) === null || _parent$service6 === void 0 ? void 0 : (_parent$service6$refr = _parent$service6.refresh) === null || _parent$service6$refr === void 0 ? void 0 : _parent$service6$refr.call(_parent$service6);
1030
- setVisible === null || setVisible === void 0 ? void 0 : setVisible(false);
1031
-
1032
- if (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage) {
1033
- _context14.next = 18;
1034
- break;
1035
- }
1036
-
1037
- return _context14.abrupt("return");
1038
-
1039
- case 18:
1040
- if (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.manualClose) {
1041
- Modal.success({
1042
- title: compile(onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage),
1043
- onOk: function () {
1044
- var _onOk6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
1045
- return regeneratorRuntime.wrap(function _callee13$(_context13) {
1046
- while (1) {
1047
- switch (_context13.prev = _context13.next) {
1048
- case 0:
1049
- _context13.next = 2;
1050
- return form.reset();
1051
-
1052
- case 2:
1053
- if ((onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.redirecting) && (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.redirectTo)) {
1054
- if (isURL(onSuccess.redirectTo)) {
1055
- window.location.href = onSuccess.redirectTo;
1056
- } else {
1057
- history.push(onSuccess.redirectTo);
1058
- }
1059
- }
1060
-
1061
- case 3:
1062
- case "end":
1063
- return _context13.stop();
1064
- }
1065
- }
1066
- }, _callee13);
1067
- }));
1068
-
1069
- function onOk() {
1070
- return _onOk6.apply(this, arguments);
1071
- }
1072
-
1073
- return onOk;
1074
- }()
1075
- });
1076
- } else {
1077
- message.success(compile(onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage));
1078
- }
1079
-
1080
- _context14.next = 24;
981
+ var _ref14, _ref14$assignedValues, originalAssignedValues, onSuccess, overwriteValues, skipValidator, assignedValues, fieldNames, values, _parent$service6, _parent$service6$refr, _parent$__parent2, _parent$__parent2$ser, _parent$__parent2$ser2;
982
+ return _regeneratorRuntime().wrap(function _callee18$(_context18) {
983
+ while (1) switch (_context18.prev = _context18.next) {
984
+ case 0:
985
+ _ref14 = (_actionSchema$xActio6 = actionSchema === null || actionSchema === void 0 ? void 0 : actionSchema['x-action-settings']) !== null && _actionSchema$xActio6 !== void 0 ? _actionSchema$xActio6 : {}, _ref14$assignedValues = _ref14.assignedValues, originalAssignedValues = _ref14$assignedValues === void 0 ? {} : _ref14$assignedValues, onSuccess = _ref14.onSuccess, overwriteValues = _ref14.overwriteValues, skipValidator = _ref14.skipValidator;
986
+ assignedValues = parse(originalAssignedValues)({
987
+ currentTime: new Date(),
988
+ currentRecord: currentRecord,
989
+ currentUser: currentUser
990
+ });
991
+ if (skipValidator) {
992
+ _context18.next = 5;
993
+ break;
994
+ }
995
+ _context18.next = 5;
996
+ return form.submit();
997
+ case 5:
998
+ fieldNames = fields.map(function (field) {
999
+ return field.name;
1000
+ });
1001
+ values = getFormValues(filterByTk, field, form, fieldNames, getField, resource);
1002
+ actionField.data = field.data || {};
1003
+ actionField.data.loading = true;
1004
+ _context18.prev = 9;
1005
+ _context18.next = 12;
1006
+ return resource.update({
1007
+ filterByTk: filterByTk,
1008
+ values: _objectSpread(_objectSpread(_objectSpread({}, values), overwriteValues), assignedValues),
1009
+ updateAssociationValues: updateAssociationValues
1010
+ });
1011
+ case 12:
1012
+ actionField.data.loading = false;
1013
+ if (!(resource instanceof TableFieldResource)) {
1014
+ __parent === null || __parent === void 0 ? void 0 : (_parent$__parent2 = __parent.__parent) === null || _parent$__parent2 === void 0 ? void 0 : (_parent$__parent2$ser = _parent$__parent2.service) === null || _parent$__parent2$ser === void 0 ? void 0 : (_parent$__parent2$ser2 = _parent$__parent2$ser.refresh) === null || _parent$__parent2$ser2 === void 0 ? void 0 : _parent$__parent2$ser2.call(_parent$__parent2$ser);
1015
+ }
1016
+ __parent === null || __parent === void 0 ? void 0 : (_parent$service6 = __parent.service) === null || _parent$service6 === void 0 ? void 0 : (_parent$service6$refr = _parent$service6.refresh) === null || _parent$service6$refr === void 0 ? void 0 : _parent$service6$refr.call(_parent$service6);
1017
+ setVisible === null || setVisible === void 0 ? void 0 : setVisible(false);
1018
+ if (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage) {
1019
+ _context18.next = 18;
1081
1020
  break;
1082
-
1083
- case 21:
1084
- _context14.prev = 21;
1085
- _context14.t0 = _context14["catch"](9);
1086
- actionField.data.loading = false;
1087
-
1088
- case 24:
1089
- case "end":
1090
- return _context14.stop();
1091
- }
1021
+ }
1022
+ return _context18.abrupt("return");
1023
+ case 18:
1024
+ if (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.manualClose) {
1025
+ Modal.success({
1026
+ title: compile(onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage),
1027
+ onOk: function () {
1028
+ var _onOk6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
1029
+ return _regeneratorRuntime().wrap(function _callee17$(_context17) {
1030
+ while (1) switch (_context17.prev = _context17.next) {
1031
+ case 0:
1032
+ _context17.next = 2;
1033
+ return form.reset();
1034
+ case 2:
1035
+ if ((onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.redirecting) && (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.redirectTo)) {
1036
+ if (isURL(onSuccess.redirectTo)) {
1037
+ window.location.href = onSuccess.redirectTo;
1038
+ } else {
1039
+ history.push(onSuccess.redirectTo);
1040
+ }
1041
+ }
1042
+ case 3:
1043
+ case "end":
1044
+ return _context17.stop();
1045
+ }
1046
+ }, _callee17);
1047
+ }));
1048
+ function onOk() {
1049
+ return _onOk6.apply(this, arguments);
1050
+ }
1051
+ return onOk;
1052
+ }()
1053
+ });
1054
+ } else {
1055
+ message.success(compile(onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess.successMessage));
1056
+ }
1057
+ _context18.next = 24;
1058
+ break;
1059
+ case 21:
1060
+ _context18.prev = 21;
1061
+ _context18.t0 = _context18["catch"](9);
1062
+ actionField.data.loading = false;
1063
+ case 24:
1064
+ case "end":
1065
+ return _context18.stop();
1092
1066
  }
1093
- }, _callee14, null, [[9, 21]]);
1067
+ }, _callee18, null, [[9, 21]]);
1094
1068
  }))();
1095
1069
  }
1096
1070
  };
1097
1071
  };
1098
1072
  export var useDestroyActionProps = function useDestroyActionProps() {
1099
1073
  var filterByTk = useFilterByTk();
1100
-
1101
1074
  var _useBlockRequestConte7 = useBlockRequestContext(),
1102
- resource = _useBlockRequestConte7.resource,
1103
- service = _useBlockRequestConte7.service,
1104
- block = _useBlockRequestConte7.block,
1105
- __parent = _useBlockRequestConte7.__parent;
1106
-
1075
+ resource = _useBlockRequestConte7.resource,
1076
+ service = _useBlockRequestConte7.service,
1077
+ block = _useBlockRequestConte7.block,
1078
+ __parent = _useBlockRequestConte7.__parent;
1107
1079
  var _useActionContext4 = useActionContext(),
1108
- setVisible = _useActionContext4.setVisible;
1109
-
1080
+ setVisible = _useActionContext4.setVisible;
1110
1081
  return {
1111
1082
  onClick: function onClick() {
1112
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15() {
1113
- var _service$refresh4;
1114
-
1115
- var _parent$service7, _parent$service7$refr;
1116
-
1117
- return regeneratorRuntime.wrap(function _callee15$(_context15) {
1118
- while (1) {
1119
- switch (_context15.prev = _context15.next) {
1120
- case 0:
1121
- _context15.next = 2;
1122
- return resource.destroy({
1123
- filterByTk: filterByTk
1124
- });
1125
-
1126
- case 2:
1083
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
1084
+ var _service$data;
1085
+ var _ref15, _ref15$count, count, _ref15$page, page, _ref15$pageSize, pageSize, _service$params2, _service$refresh4, _parent$service7, _parent$service7$refr;
1086
+ return _regeneratorRuntime().wrap(function _callee19$(_context19) {
1087
+ while (1) switch (_context19.prev = _context19.next) {
1088
+ case 0:
1089
+ _context19.next = 2;
1090
+ return resource.destroy({
1091
+ filterByTk: filterByTk
1092
+ });
1093
+ case 2:
1094
+ _ref15 = (service === null || service === void 0 ? void 0 : (_service$data = service.data) === null || _service$data === void 0 ? void 0 : _service$data.meta) || {}, _ref15$count = _ref15.count, count = _ref15$count === void 0 ? 0 : _ref15$count, _ref15$page = _ref15.page, page = _ref15$page === void 0 ? 0 : _ref15$page, _ref15$pageSize = _ref15.pageSize, pageSize = _ref15$pageSize === void 0 ? 0 : _ref15$pageSize;
1095
+ if (count % pageSize === 1) {
1096
+ service.run(_objectSpread(_objectSpread({}, service === null || service === void 0 ? void 0 : (_service$params2 = service.params) === null || _service$params2 === void 0 ? void 0 : _service$params2[0]), {}, {
1097
+ page: page - 1
1098
+ }));
1099
+ } else {
1127
1100
  service === null || service === void 0 ? void 0 : (_service$refresh4 = service.refresh) === null || _service$refresh4 === void 0 ? void 0 : _service$refresh4.call(service);
1128
-
1129
- if (block !== 'TableField') {
1130
- __parent === null || __parent === void 0 ? void 0 : (_parent$service7 = __parent.service) === null || _parent$service7 === void 0 ? void 0 : (_parent$service7$refr = _parent$service7.refresh) === null || _parent$service7$refr === void 0 ? void 0 : _parent$service7$refr.call(_parent$service7);
1131
- setVisible === null || setVisible === void 0 ? void 0 : setVisible(false);
1132
- }
1133
-
1134
- case 4:
1135
- case "end":
1136
- return _context15.stop();
1137
- }
1101
+ }
1102
+ if (block !== 'TableField') {
1103
+ __parent === null || __parent === void 0 ? void 0 : (_parent$service7 = __parent.service) === null || _parent$service7 === void 0 ? void 0 : (_parent$service7$refr = _parent$service7.refresh) === null || _parent$service7$refr === void 0 ? void 0 : _parent$service7$refr.call(_parent$service7);
1104
+ setVisible === null || setVisible === void 0 ? void 0 : setVisible(false);
1105
+ }
1106
+ case 5:
1107
+ case "end":
1108
+ return _context19.stop();
1138
1109
  }
1139
- }, _callee15);
1110
+ }, _callee19);
1140
1111
  }))();
1141
1112
  }
1142
1113
  };
1143
1114
  };
1144
1115
  export var useDetailPrintActionProps = function useDetailPrintActionProps() {
1145
1116
  var _useFormBlockContext2 = useFormBlockContext(),
1146
- formBlockRef = _useFormBlockContext2.formBlockRef;
1147
-
1117
+ formBlockRef = _useFormBlockContext2.formBlockRef;
1148
1118
  var printHandler = useReactToPrint({
1149
1119
  content: function content() {
1150
1120
  return formBlockRef.current;
@@ -1153,95 +1123,77 @@ export var useDetailPrintActionProps = function useDetailPrintActionProps() {
1153
1123
  });
1154
1124
  return {
1155
1125
  onClick: function onClick() {
1156
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16() {
1157
- return regeneratorRuntime.wrap(function _callee16$(_context16) {
1158
- while (1) {
1159
- switch (_context16.prev = _context16.next) {
1160
- case 0:
1161
- printHandler();
1162
-
1163
- case 1:
1164
- case "end":
1165
- return _context16.stop();
1166
- }
1126
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20() {
1127
+ return _regeneratorRuntime().wrap(function _callee20$(_context20) {
1128
+ while (1) switch (_context20.prev = _context20.next) {
1129
+ case 0:
1130
+ printHandler();
1131
+ case 1:
1132
+ case "end":
1133
+ return _context20.stop();
1167
1134
  }
1168
- }, _callee16);
1135
+ }, _callee20);
1169
1136
  }))();
1170
1137
  }
1171
1138
  };
1172
1139
  };
1173
1140
  export var useBulkDestroyActionProps = function useBulkDestroyActionProps() {
1174
1141
  var _useBlockRequestConte8 = useBlockRequestContext(),
1175
- field = _useBlockRequestConte8.field;
1176
-
1142
+ field = _useBlockRequestConte8.field;
1177
1143
  var _useBlockRequestConte9 = useBlockRequestContext(),
1178
- resource = _useBlockRequestConte9.resource,
1179
- service = _useBlockRequestConte9.service;
1180
-
1144
+ resource = _useBlockRequestConte9.resource,
1145
+ service = _useBlockRequestConte9.service;
1181
1146
  return {
1182
1147
  onClick: function onClick() {
1183
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17() {
1148
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21() {
1184
1149
  var _field$data2, _field$data2$selected, _field$data3, _service$refresh5;
1185
-
1186
- return regeneratorRuntime.wrap(function _callee17$(_context17) {
1187
- while (1) {
1188
- switch (_context17.prev = _context17.next) {
1189
- case 0:
1190
- if (field === null || field === void 0 ? void 0 : (_field$data2 = field.data) === null || _field$data2 === void 0 ? void 0 : (_field$data2$selected = _field$data2.selectedRowKeys) === null || _field$data2$selected === void 0 ? void 0 : _field$data2$selected.length) {
1191
- _context17.next = 2;
1192
- break;
1193
- }
1194
-
1195
- return _context17.abrupt("return");
1196
-
1197
- case 2:
1198
- _context17.next = 4;
1199
- return resource.destroy({
1200
- filterByTk: (_field$data3 = field.data) === null || _field$data3 === void 0 ? void 0 : _field$data3.selectedRowKeys
1201
- });
1202
-
1203
- case 4:
1204
- field.data.selectedRowKeys = [];
1205
- service === null || service === void 0 ? void 0 : (_service$refresh5 = service.refresh) === null || _service$refresh5 === void 0 ? void 0 : _service$refresh5.call(service);
1206
-
1207
- case 6:
1208
- case "end":
1209
- return _context17.stop();
1210
- }
1150
+ return _regeneratorRuntime().wrap(function _callee21$(_context21) {
1151
+ while (1) switch (_context21.prev = _context21.next) {
1152
+ case 0:
1153
+ if (field === null || field === void 0 ? void 0 : (_field$data2 = field.data) === null || _field$data2 === void 0 ? void 0 : (_field$data2$selected = _field$data2.selectedRowKeys) === null || _field$data2$selected === void 0 ? void 0 : _field$data2$selected.length) {
1154
+ _context21.next = 2;
1155
+ break;
1156
+ }
1157
+ return _context21.abrupt("return");
1158
+ case 2:
1159
+ _context21.next = 4;
1160
+ return resource.destroy({
1161
+ filterByTk: (_field$data3 = field.data) === null || _field$data3 === void 0 ? void 0 : _field$data3.selectedRowKeys
1162
+ });
1163
+ case 4:
1164
+ field.data.selectedRowKeys = [];
1165
+ service === null || service === void 0 ? void 0 : (_service$refresh5 = service.refresh) === null || _service$refresh5 === void 0 ? void 0 : _service$refresh5.call(service);
1166
+ case 6:
1167
+ case "end":
1168
+ return _context21.stop();
1211
1169
  }
1212
- }, _callee17);
1170
+ }, _callee21);
1213
1171
  }))();
1214
1172
  }
1215
1173
  };
1216
1174
  };
1217
1175
  export var useRefreshActionProps = function useRefreshActionProps() {
1218
1176
  var _useBlockRequestConte10 = useBlockRequestContext(),
1219
- service = _useBlockRequestConte10.service;
1220
-
1177
+ service = _useBlockRequestConte10.service;
1221
1178
  return {
1222
1179
  onClick: function onClick() {
1223
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee18() {
1180
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22() {
1224
1181
  var _service$refresh6;
1225
-
1226
- return regeneratorRuntime.wrap(function _callee18$(_context18) {
1227
- while (1) {
1228
- switch (_context18.prev = _context18.next) {
1229
- case 0:
1230
- service === null || service === void 0 ? void 0 : (_service$refresh6 = service.refresh) === null || _service$refresh6 === void 0 ? void 0 : _service$refresh6.call(service);
1231
-
1232
- case 1:
1233
- case "end":
1234
- return _context18.stop();
1235
- }
1182
+ return _regeneratorRuntime().wrap(function _callee22$(_context22) {
1183
+ while (1) switch (_context22.prev = _context22.next) {
1184
+ case 0:
1185
+ service === null || service === void 0 ? void 0 : (_service$refresh6 = service.refresh) === null || _service$refresh6 === void 0 ? void 0 : _service$refresh6.call(service);
1186
+ case 1:
1187
+ case "end":
1188
+ return _context22.stop();
1236
1189
  }
1237
- }, _callee18);
1190
+ }, _callee22);
1238
1191
  }))();
1239
1192
  }
1240
1193
  };
1241
1194
  };
1242
1195
  export var useDetailsPaginationProps = function useDetailsPaginationProps() {
1243
1196
  var _ctx$service, _ctx$service$data, _ctx$service$data$met, _ctx$service2, _ctx$service2$data, _ctx$service2$data$me;
1244
-
1245
1197
  var ctx = useDetailsBlockContext();
1246
1198
  var count = ((_ctx$service = ctx.service) === null || _ctx$service === void 0 ? void 0 : (_ctx$service$data = _ctx$service.data) === null || _ctx$service$data === void 0 ? void 0 : (_ctx$service$data$met = _ctx$service$data.meta) === null || _ctx$service$data$met === void 0 ? void 0 : _ctx$service$data$met.count) || 0;
1247
1199
  return {
@@ -1251,25 +1203,21 @@ export var useDetailsPaginationProps = function useDetailsPaginationProps() {
1251
1203
  total: count,
1252
1204
  pageSize: 1,
1253
1205
  onChange: function onChange(page) {
1254
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee19() {
1206
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23() {
1255
1207
  var _ctx$service3, _ctx$service3$params;
1256
-
1257
1208
  var params;
1258
- return regeneratorRuntime.wrap(function _callee19$(_context19) {
1259
- while (1) {
1260
- switch (_context19.prev = _context19.next) {
1261
- case 0:
1262
- params = (_ctx$service3 = ctx.service) === null || _ctx$service3 === void 0 ? void 0 : (_ctx$service3$params = _ctx$service3.params) === null || _ctx$service3$params === void 0 ? void 0 : _ctx$service3$params[0];
1263
- ctx.service.run(_objectSpread(_objectSpread({}, params), {}, {
1264
- page: page
1265
- }));
1266
-
1267
- case 2:
1268
- case "end":
1269
- return _context19.stop();
1270
- }
1209
+ return _regeneratorRuntime().wrap(function _callee23$(_context23) {
1210
+ while (1) switch (_context23.prev = _context23.next) {
1211
+ case 0:
1212
+ params = (_ctx$service3 = ctx.service) === null || _ctx$service3 === void 0 ? void 0 : (_ctx$service3$params = _ctx$service3.params) === null || _ctx$service3$params === void 0 ? void 0 : _ctx$service3$params[0];
1213
+ ctx.service.run(_objectSpread(_objectSpread({}, params), {}, {
1214
+ page: page
1215
+ }));
1216
+ case 2:
1217
+ case "end":
1218
+ return _context23.stop();
1271
1219
  }
1272
- }, _callee19);
1220
+ }, _callee23);
1273
1221
  }))();
1274
1222
  },
1275
1223
  style: {
@@ -1277,4 +1225,177 @@ export var useDetailsPaginationProps = function useDetailsPaginationProps() {
1277
1225
  textAlign: 'center'
1278
1226
  }
1279
1227
  };
1228
+ };
1229
+ export var useAssociationFilterProps = function useAssociationFilterProps() {
1230
+ var _fieldSchema$xCompon2, _fieldSchema$xCompon3, _field$componentProps, _field$componentProps2;
1231
+ var collectionField = AssociationFilter.useAssociationField();
1232
+ var _useBlockRequestConte11 = useBlockRequestContext(),
1233
+ service = _useBlockRequestConte11.service,
1234
+ blockProps = _useBlockRequestConte11.props;
1235
+ var fieldSchema = useFieldSchema();
1236
+ var valueKey = (collectionField === null || collectionField === void 0 ? void 0 : collectionField.targetKey) || 'id';
1237
+ var labelKey = ((_fieldSchema$xCompon2 = fieldSchema['x-component-props']) === null || _fieldSchema$xCompon2 === void 0 ? void 0 : (_fieldSchema$xCompon3 = _fieldSchema$xCompon2.fieldNames) === null || _fieldSchema$xCompon3 === void 0 ? void 0 : _fieldSchema$xCompon3.label) || valueKey;
1238
+ var field = useField();
1239
+ var collectionFieldName = collectionField.name;
1240
+ var _useRequest = useRequest({
1241
+ resource: collectionField.target,
1242
+ action: 'list',
1243
+ params: _objectSpread({
1244
+ fields: [labelKey, valueKey],
1245
+ pageSize: 200,
1246
+ page: 1
1247
+ }, (_field$componentProps = field.componentProps) === null || _field$componentProps === void 0 ? void 0 : _field$componentProps.params)
1248
+ }, {
1249
+ refreshDeps: [labelKey, valueKey, JSON.stringify(((_field$componentProps2 = field.componentProps) === null || _field$componentProps2 === void 0 ? void 0 : _field$componentProps2.params) || {})],
1250
+ debounceWait: 300
1251
+ }),
1252
+ data = _useRequest.data,
1253
+ params = _useRequest.params,
1254
+ run = _useRequest.run;
1255
+ var list = (data === null || data === void 0 ? void 0 : data.data) || [];
1256
+ var onSelected = function onSelected(value) {
1257
+ var _service$params3, _service$params3$, _service$params4, _blockProps$params;
1258
+ var filters = ((_service$params3 = service.params) === null || _service$params3 === void 0 ? void 0 : (_service$params3$ = _service$params3[1]) === null || _service$params3$ === void 0 ? void 0 : _service$params3$.filters) || {};
1259
+ if (value.length) {
1260
+ filters["af.".concat(collectionFieldName)] = _defineProperty({}, "".concat(collectionFieldName, ".").concat(valueKey, ".$in"), value);
1261
+ } else {
1262
+ delete filters["af.".concat(collectionFieldName)];
1263
+ }
1264
+ service.run(_objectSpread(_objectSpread({}, (_service$params4 = service.params) === null || _service$params4 === void 0 ? void 0 : _service$params4[0]), {}, {
1265
+ pageSize: 200,
1266
+ page: 1,
1267
+ filter: mergeFilter([].concat(_toConsumableArray(Object.values(filters)), [blockProps === null || blockProps === void 0 ? void 0 : (_blockProps$params = blockProps.params) === null || _blockProps$params === void 0 ? void 0 : _blockProps$params.filter]))
1268
+ }), {
1269
+ filters: filters
1270
+ });
1271
+ };
1272
+ var handleSearchInput = function handleSearchInput(e) {
1273
+ run(_objectSpread(_objectSpread({}, params === null || params === void 0 ? void 0 : params[0]), {}, {
1274
+ filter: _defineProperty({}, "".concat(labelKey, ".$includes"), e.target.value)
1275
+ }));
1276
+ };
1277
+ return {
1278
+ /** 渲染 Collapse 的列表数据 */
1279
+ list: list,
1280
+ onSelected: onSelected,
1281
+ handleSearchInput: handleSearchInput,
1282
+ params: params,
1283
+ run: run
1284
+ };
1285
+ };
1286
+ export var useOptionalFieldList = function useOptionalFieldList() {
1287
+ var _useCollection4 = useCollection(),
1288
+ _useCollection4$curre = _useCollection4.currentFields,
1289
+ currentFields = _useCollection4$curre === void 0 ? [] : _useCollection4$curre;
1290
+ return currentFields.filter(function (field) {
1291
+ return isOptionalField(field) && field.uiSchema.enum;
1292
+ });
1293
+ };
1294
+ var isOptionalField = function isOptionalField(field) {
1295
+ var optionalInterfaces = ['select', 'multipleSelect', 'checkbox', 'checkboxGroup', 'chinaRegion'];
1296
+ return optionalInterfaces.includes(field.interface);
1297
+ };
1298
+ export var useAssociationFilterBlockProps = function useAssociationFilterBlockProps() {
1299
+ var collectionField = AssociationFilter.useAssociationField();
1300
+ var fieldSchema = useFieldSchema();
1301
+ var optionalFieldList = useOptionalFieldList();
1302
+ var _useFilterBlock3 = useFilterBlock(),
1303
+ getDataBlocks = _useFilterBlock3.getDataBlocks;
1304
+ var collectionFieldName = collectionField.name;
1305
+ var list, onSelected, handleSearchInput, params, run, data, valueKey, labelKey, filterKey;
1306
+ if (isOptionalField(fieldSchema)) {
1307
+ var _field$uiSchema;
1308
+ var field = optionalFieldList.find(function (field) {
1309
+ return field.name === fieldSchema.name;
1310
+ });
1311
+ var operatorMap = {
1312
+ select: '$in',
1313
+ multipleSelect: '$anyOf',
1314
+ checkbox: '$in',
1315
+ checkboxGroup: '$anyOf'
1316
+ };
1317
+ var _list = (field === null || field === void 0 ? void 0 : (_field$uiSchema = field.uiSchema) === null || _field$uiSchema === void 0 ? void 0 : _field$uiSchema.enum) || [];
1318
+ valueKey = 'value';
1319
+ labelKey = 'label';
1320
+ list = _list;
1321
+ params = {};
1322
+ run = function run() {};
1323
+ filterKey = "".concat(field.name, ".").concat(operatorMap[field.interface]);
1324
+ handleSearchInput = function handleSearchInput(e) {
1325
+ // TODO: 列表没有刷新,在这个 hook 中使用 useState 会产生 re-render 次数过多的错误
1326
+ var value = e.target.value;
1327
+ if (!value) {
1328
+ list = _list;
1329
+ return;
1330
+ }
1331
+ list = _list.filter(function (item) {
1332
+ return item.label.includes(value);
1333
+ });
1334
+ };
1335
+ } else {
1336
+ var _fieldSchema$xCompon4, _fieldSchema$xCompon5, _data;
1337
+ valueKey = (collectionField === null || collectionField === void 0 ? void 0 : collectionField.targetKey) || 'id';
1338
+ labelKey = ((_fieldSchema$xCompon4 = fieldSchema['x-component-props']) === null || _fieldSchema$xCompon4 === void 0 ? void 0 : (_fieldSchema$xCompon5 = _fieldSchema$xCompon4.fieldNames) === null || _fieldSchema$xCompon5 === void 0 ? void 0 : _fieldSchema$xCompon5.label) || valueKey;
1339
+ var _useRequest2 = useRequest({
1340
+ resource: collectionField.target,
1341
+ action: 'list',
1342
+ params: {
1343
+ fields: [labelKey, valueKey],
1344
+ pageSize: 200,
1345
+ page: 1
1346
+ }
1347
+ }, {
1348
+ refreshDeps: [labelKey, valueKey],
1349
+ debounceWait: 300
1350
+ });
1351
+ data = _useRequest2.data;
1352
+ params = _useRequest2.params;
1353
+ run = _useRequest2.run;
1354
+ filterKey = "".concat(collectionFieldName, ".").concat(valueKey, ".$in");
1355
+ list = ((_data = data) === null || _data === void 0 ? void 0 : _data.data) || [];
1356
+ handleSearchInput = function handleSearchInput(e) {
1357
+ var _params;
1358
+ run(_objectSpread(_objectSpread({}, (_params = params) === null || _params === void 0 ? void 0 : _params[0]), {}, {
1359
+ filter: _defineProperty({}, "".concat(labelKey, ".$includes"), e.target.value)
1360
+ }));
1361
+ };
1362
+ }
1363
+ onSelected = function onSelected(value) {
1364
+ var _findFilterTargets3 = findFilterTargets(fieldSchema),
1365
+ targets = _findFilterTargets3.targets,
1366
+ uid = _findFilterTargets3.uid;
1367
+ getDataBlocks().forEach(function (block) {
1368
+ var _block$service$params7, _block$service$params8, _block$service$params9;
1369
+ var target = targets.find(function (target) {
1370
+ return target.uid === block.uid;
1371
+ });
1372
+ if (!target) return;
1373
+ var key = "".concat(uid).concat(fieldSchema.name);
1374
+ var param = ((_block$service$params7 = block.service.params) === null || _block$service$params7 === void 0 ? void 0 : _block$service$params7[0]) || {};
1375
+ // 保留原有的 filter
1376
+ var storedFilter = ((_block$service$params8 = block.service.params) === null || _block$service$params8 === void 0 ? void 0 : (_block$service$params9 = _block$service$params8[1]) === null || _block$service$params9 === void 0 ? void 0 : _block$service$params9.filters) || {};
1377
+ if (value.length) {
1378
+ storedFilter[key] = _defineProperty({}, filterKey, value);
1379
+ } else {
1380
+ delete storedFilter[key];
1381
+ }
1382
+ var mergedFilter = mergeFilter([].concat(_toConsumableArray(Object.values(storedFilter)), [block.defaultFilter]));
1383
+ return block.doFilter(_objectSpread(_objectSpread({}, param), {}, {
1384
+ page: 1,
1385
+ filter: mergedFilter
1386
+ }), {
1387
+ filters: storedFilter
1388
+ });
1389
+ });
1390
+ };
1391
+ return {
1392
+ /** 渲染 Collapse 的列表数据 */
1393
+ list: list,
1394
+ onSelected: onSelected,
1395
+ handleSearchInput: handleSearchInput,
1396
+ params: params,
1397
+ run: run,
1398
+ valueKey: valueKey,
1399
+ labelKey: labelKey
1400
+ };
1280
1401
  };