@nocobase/client 0.9.2-alpha.4 → 0.9.4-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 (441) hide show
  1. package/es/acl/ACLProvider.js +2 -2
  2. package/es/acl/Configuration/RoleConfigure.js +15 -8
  3. package/es/api-client/APIClient.d.ts +2 -0
  4. package/es/api-client/APIClient.js +11 -0
  5. package/es/block-provider/BlockProvider.js +58 -17
  6. package/es/block-provider/DetailsBlockProvider.js +13 -1
  7. package/es/block-provider/FormBlockProvider.js +30 -13
  8. package/es/block-provider/hooks/index.d.ts +10 -0
  9. package/es/block-provider/hooks/index.js +521 -283
  10. package/es/collection-manager/CollectionField.js +3 -3
  11. package/es/collection-manager/CollectionFieldProvider.js +2 -1
  12. package/es/collection-manager/Configuration/AddFieldAction.js +3 -3
  13. package/es/collection-manager/Configuration/CollectionFields.d.ts +1 -1
  14. package/es/collection-manager/Configuration/CollectionFields.js +2 -5
  15. package/es/collection-manager/Configuration/ConfigurationTabs.js +7 -6
  16. package/es/collection-manager/Configuration/EditFieldAction.js +0 -1
  17. package/es/collection-manager/Configuration/OverridingCollectionField.js +0 -1
  18. package/es/collection-manager/action-hooks.d.ts +1 -1
  19. package/es/collection-manager/action-hooks.js +18 -7
  20. package/es/collection-manager/hooks/useCollection.d.ts +1 -1
  21. package/es/collection-manager/hooks/useCollectionDataSource.js +4 -4
  22. package/es/collection-manager/interfaces/createdBy.js +1 -1
  23. package/es/collection-manager/interfaces/linkTo.js +3 -39
  24. package/es/collection-manager/interfaces/m2m.js +4 -38
  25. package/es/collection-manager/interfaces/m2o.js +4 -38
  26. package/es/collection-manager/interfaces/o2m.js +4 -68
  27. package/es/collection-manager/interfaces/o2o.js +25 -119
  28. package/es/collection-manager/interfaces/updatedBy.js +1 -1
  29. package/es/collection-manager/templates/expression.js +1 -1
  30. package/es/collection-manager/templates/tree.js +2 -2
  31. package/es/filter-provider/FilterProvider.js +3 -1
  32. package/es/filter-provider/utils.js +1 -1
  33. package/es/index.d.ts +1 -0
  34. package/es/index.js +1 -0
  35. package/es/locale/en_US.d.ts +19 -1
  36. package/es/locale/en_US.js +22 -4
  37. package/es/locale/es_ES.d.ts +692 -0
  38. package/es/locale/es_ES.js +691 -0
  39. package/es/locale/ja_JP.d.ts +8 -1
  40. package/es/locale/ja_JP.js +9 -2
  41. package/es/locale/pt_BR.d.ts +5 -1
  42. package/es/locale/pt_BR.js +6 -2
  43. package/es/locale/ru_RU.d.ts +5 -1
  44. package/es/locale/ru_RU.js +6 -2
  45. package/es/locale/tr_TR.d.ts +5 -1
  46. package/es/locale/tr_TR.js +6 -2
  47. package/es/locale/zh_CN.d.ts +27 -1
  48. package/es/locale/zh_CN.js +28 -2
  49. package/es/record-provider/index.d.ts +4 -0
  50. package/es/record-provider/index.js +3 -0
  51. package/es/schema-component/antd/action/Action.Designer.js +10 -8
  52. package/es/schema-component/antd/action/Action.Drawer.js +4 -1
  53. package/es/schema-component/antd/action/ActionBar.js +25 -18
  54. package/es/schema-component/antd/association-field/AssociationFieldProvider.d.ts +2 -0
  55. package/es/schema-component/antd/association-field/AssociationFieldProvider.js +30 -0
  56. package/es/schema-component/antd/association-field/AssociationSelect.d.ts +14 -0
  57. package/es/schema-component/antd/association-field/AssociationSelect.js +63 -0
  58. package/es/schema-component/antd/association-field/Editable.d.ts +2 -0
  59. package/es/schema-component/antd/association-field/Editable.js +112 -0
  60. package/es/schema-component/antd/association-field/FileManager.d.ts +4 -0
  61. package/es/schema-component/antd/association-field/FileManager.js +243 -0
  62. package/es/schema-component/antd/association-field/InternalNester.d.ts +1 -0
  63. package/es/schema-component/antd/association-field/InternalNester.js +29 -0
  64. package/es/schema-component/antd/association-field/InternalPicker.d.ts +2 -0
  65. package/es/schema-component/antd/association-field/InternalPicker.js +236 -0
  66. package/es/schema-component/antd/association-field/InternalSubTable.d.ts +1 -0
  67. package/es/schema-component/antd/association-field/InternalSubTable.js +28 -0
  68. package/es/schema-component/antd/association-field/InternalViewer.d.ts +2 -0
  69. package/es/schema-component/antd/association-field/InternalViewer.js +112 -0
  70. package/es/schema-component/antd/association-field/Nester.d.ts +1 -0
  71. package/es/schema-component/antd/association-field/Nester.js +71 -0
  72. package/es/schema-component/antd/association-field/ReadPretty.d.ts +2 -0
  73. package/es/schema-component/antd/association-field/ReadPretty.js +22 -0
  74. package/es/schema-component/antd/association-field/SubTable.d.ts +1 -0
  75. package/es/schema-component/antd/association-field/SubTable.js +25 -0
  76. package/es/schema-component/antd/association-field/components/CreateRecordAction.d.ts +2 -0
  77. package/es/schema-component/antd/association-field/components/CreateRecordAction.js +61 -0
  78. package/es/schema-component/antd/association-field/context.d.ts +8 -0
  79. package/es/schema-component/antd/association-field/context.js +2 -0
  80. package/es/schema-component/antd/association-field/hooks.d.ts +9 -0
  81. package/es/schema-component/antd/association-field/hooks.js +96 -0
  82. package/es/schema-component/antd/association-field/index.d.ts +1 -0
  83. package/es/schema-component/antd/association-field/index.js +14 -0
  84. package/es/schema-component/antd/association-field/schema.d.ts +142 -0
  85. package/es/schema-component/antd/association-field/schema.js +141 -0
  86. package/es/schema-component/antd/association-field/util.d.ts +8 -0
  87. package/es/schema-component/antd/association-field/util.js +84 -0
  88. package/es/schema-component/antd/association-filter/AssociationFilter.Item.js +3 -3
  89. package/es/schema-component/antd/association-select/AssociationSelect.js +49 -231
  90. package/es/schema-component/antd/association-select/useServiceOptions.js +2 -2
  91. package/es/schema-component/antd/collection-select/CollectionSelect.js +5 -0
  92. package/es/schema-component/antd/expand-action/Expand.Action.Design.d.ts +1 -0
  93. package/es/schema-component/antd/expand-action/Expand.Action.Design.js +112 -0
  94. package/es/schema-component/antd/expand-action/Expand.Action.d.ts +1 -0
  95. package/es/schema-component/antd/expand-action/Expand.Action.js +40 -0
  96. package/es/schema-component/antd/expand-action/index.d.ts +1 -0
  97. package/es/schema-component/antd/expand-action/index.js +5 -0
  98. package/es/schema-component/antd/filter/Filter.Action.Designer.js +10 -12
  99. package/es/schema-component/antd/filter/FilterItem.js +1 -1
  100. package/es/schema-component/antd/filter/useOperators.d.ts +1 -1
  101. package/es/schema-component/antd/form/Form.js +4 -4
  102. package/es/schema-component/antd/form-item/FormItem.d.ts +2 -1
  103. package/es/schema-component/antd/form-item/FormItem.js +263 -168
  104. package/es/schema-component/antd/form-item/SchemaSettingOptions.js +39 -61
  105. package/es/schema-component/antd/form-v2/Form.Designer.js +1 -0
  106. package/es/schema-component/antd/form-v2/Templates.d.ts +20 -0
  107. package/es/schema-component/antd/form-v2/Templates.js +40 -12
  108. package/es/schema-component/antd/form-v2/utils.js +3 -1
  109. package/es/schema-component/antd/gantt/components/other/tooltip.js +1 -1
  110. package/es/schema-component/antd/grid/Grid.js +34 -24
  111. package/es/schema-component/antd/grid-card/GridCard.Decorator.d.ts +5 -0
  112. package/es/schema-component/antd/grid-card/GridCard.Decorator.js +65 -0
  113. package/es/schema-component/antd/grid-card/GridCard.Designer.d.ts +1 -0
  114. package/es/schema-component/antd/grid-card/GridCard.Designer.js +243 -0
  115. package/es/schema-component/antd/grid-card/GridCard.Item.d.ts +1 -0
  116. package/es/schema-component/antd/grid-card/GridCard.Item.js +18 -0
  117. package/es/schema-component/antd/grid-card/GridCard.d.ts +8 -0
  118. package/es/schema-component/antd/grid-card/GridCard.js +103 -0
  119. package/es/schema-component/antd/grid-card/hooks.d.ts +4 -0
  120. package/es/schema-component/antd/grid-card/hooks.js +9 -0
  121. package/es/schema-component/antd/grid-card/index.d.ts +1 -0
  122. package/es/schema-component/antd/grid-card/index.js +1 -0
  123. package/es/schema-component/antd/grid-card/options.d.ts +20 -0
  124. package/es/schema-component/antd/grid-card/options.js +20 -0
  125. package/es/schema-component/antd/index.d.ts +5 -1
  126. package/es/schema-component/antd/index.js +5 -1
  127. package/es/schema-component/antd/list/List.Decorator.d.ts +5 -0
  128. package/es/schema-component/antd/list/List.Decorator.js +59 -0
  129. package/es/schema-component/antd/list/List.Designer.d.ts +1 -0
  130. package/es/schema-component/antd/list/List.Designer.js +205 -0
  131. package/es/schema-component/antd/list/List.Item.d.ts +1 -0
  132. package/es/schema-component/antd/list/List.Item.js +15 -0
  133. package/es/schema-component/antd/list/List.d.ts +8 -0
  134. package/es/schema-component/antd/list/List.js +83 -0
  135. package/es/schema-component/antd/list/hooks.d.ts +4 -0
  136. package/es/schema-component/antd/list/hooks.js +9 -0
  137. package/es/schema-component/antd/list/index.d.ts +1 -0
  138. package/es/schema-component/antd/list/index.js +1 -0
  139. package/es/schema-component/antd/menu/Menu.js +6 -3
  140. package/es/schema-component/antd/record-picker/InputRecordPicker.d.ts +1 -0
  141. package/es/schema-component/antd/record-picker/InputRecordPicker.js +32 -12
  142. package/es/schema-component/antd/remote-select/RemoteSelect.js +23 -23
  143. package/es/schema-component/antd/select/Select.js +2 -0
  144. package/es/schema-component/antd/table/Table.Void.Designer.js +1 -0
  145. package/es/schema-component/antd/table-v2/Table.Column.Designer.js +18 -9
  146. package/es/schema-component/antd/table-v2/Table.Index.d.ts +1 -0
  147. package/es/schema-component/antd/table-v2/Table.Index.js +6 -0
  148. package/es/schema-component/antd/table-v2/Table.js +9 -5
  149. package/es/schema-component/antd/table-v2/TableBlockDesigner.js +2 -1
  150. package/es/schema-component/antd/table-v2/TableSelectorDesigner.js +1 -0
  151. package/es/schema-component/antd/table-v2/hooks/useUserVariable.d.ts +22 -0
  152. package/es/schema-component/antd/table-v2/hooks/useUserVariable.js +65 -0
  153. package/es/schema-component/antd/table-v2/index.js +3 -1
  154. package/es/schema-component/antd/table-v2/utils.js +1 -1
  155. package/es/schema-component/antd/variable/Input.js +11 -8
  156. package/es/schema-component/antd/variable/TextArea.js +2 -5
  157. package/es/schema-component/common/dnd-context/index.js +3 -2
  158. package/es/schema-component/common/sortable-item/SortableItem.js +4 -1
  159. package/es/schema-component/common/utils/uitls.js +1 -1
  160. package/es/schema-component/core/SchemaComponentProvider.js +2 -2
  161. package/es/schema-component/hooks/index.d.ts +1 -0
  162. package/es/schema-component/hooks/index.js +2 -1
  163. package/es/schema-component/hooks/useFieldModeOptions.d.ts +4 -0
  164. package/es/schema-component/hooks/useFieldModeOptions.js +105 -0
  165. package/es/schema-initializer/SchemaInitializerProvider.d.ts +1 -0
  166. package/es/schema-initializer/SchemaInitializerProvider.js +23 -10
  167. package/es/schema-initializer/buttons/BlockInitializers.js +10 -0
  168. package/es/schema-initializer/buttons/CustomFormItemInitializers.js +4 -2
  169. package/es/schema-initializer/buttons/FormActionInitializers.d.ts +0 -116
  170. package/es/schema-initializer/buttons/FormActionInitializers.js +106 -100
  171. package/es/schema-initializer/buttons/GanttActionInitializers.d.ts +0 -19
  172. package/es/schema-initializer/buttons/GridCardActionInitializers.d.ts +195 -0
  173. package/es/schema-initializer/buttons/GridCardActionInitializers.js +278 -0
  174. package/es/schema-initializer/buttons/ListActionInitializers.d.ts +195 -0
  175. package/es/schema-initializer/buttons/ListActionInitializers.js +278 -0
  176. package/es/schema-initializer/buttons/TableActionColumnInitializers.js +1 -1
  177. package/es/schema-initializer/buttons/TableActionInitializers.d.ts +0 -20
  178. package/es/schema-initializer/buttons/TableActionInitializers.js +29 -35
  179. package/es/schema-initializer/buttons/TableColumnInitializers.js +4 -1
  180. package/es/schema-initializer/buttons/index.d.ts +3 -0
  181. package/es/schema-initializer/buttons/index.js +3 -0
  182. package/es/schema-initializer/components/BulkEditField.js +7 -5
  183. package/es/schema-initializer/components/CreateRecordAction.d.ts +2 -1
  184. package/es/schema-initializer/components/CreateRecordAction.js +55 -33
  185. package/es/schema-initializer/components/DeletedField.d.ts +1 -0
  186. package/es/schema-initializer/components/DeletedField.js +11 -0
  187. package/es/schema-initializer/components/assigned-field/AssignedField.js +35 -23
  188. package/es/schema-initializer/items/ExpandActionInitializer.d.ts +0 -1
  189. package/es/schema-initializer/items/ExpandActionInitializer.js +9 -34
  190. package/es/schema-initializer/items/GridCardBlockInitializer.d.ts +1 -0
  191. package/es/schema-initializer/items/GridCardBlockInitializer.js +47 -0
  192. package/es/schema-initializer/items/ListBlockInitializer.d.ts +1 -0
  193. package/es/schema-initializer/items/ListBlockInitializer.js +47 -0
  194. package/es/schema-initializer/items/SelectActionInitializer.d.ts +1 -0
  195. package/es/schema-initializer/items/SelectActionInitializer.js +65 -0
  196. package/es/schema-initializer/items/index.d.ts +3 -0
  197. package/es/schema-initializer/items/index.js +3 -0
  198. package/es/schema-initializer/utils.d.ts +112 -0
  199. package/es/schema-initializer/utils.js +224 -38
  200. package/es/schema-items/GeneralSchemaItems.d.ts +4 -0
  201. package/es/schema-items/GeneralSchemaItems.js +148 -0
  202. package/es/schema-items/index.d.ts +1 -0
  203. package/es/schema-items/index.js +2 -1
  204. package/es/schema-settings/DataTemplates/FormDataTemplates.d.ts +1 -0
  205. package/es/schema-settings/DataTemplates/FormDataTemplates.js +117 -42
  206. package/es/schema-settings/DataTemplates/components/Designer.d.ts +7 -0
  207. package/es/schema-settings/DataTemplates/components/Designer.js +179 -0
  208. package/es/schema-settings/DataTemplates/hooks/useCollectionState.d.ts +6 -1
  209. package/es/schema-settings/DataTemplates/hooks/useCollectionState.js +204 -96
  210. package/es/schema-settings/GeneralSchemaDesigner.js +19 -15
  211. package/es/schema-settings/LinkageRules/FilterDynamicComponent.js +1 -1
  212. package/es/schema-settings/LinkageRules/Variables.d.ts +1 -1
  213. package/es/schema-settings/LinkageRules/Variables.js +7 -4
  214. package/es/schema-settings/SchemaSettings.d.ts +1 -1
  215. package/es/schema-settings/SchemaSettings.js +53 -29
  216. package/es/schema-settings/VariableInput/hooks/useUserVariable.js +1 -1
  217. package/es/schema-settings/hooks/useIsShowMultipleSwitch.d.ts +4 -0
  218. package/es/schema-settings/hooks/useIsShowMultipleSwitch.js +18 -0
  219. package/es/schema-templates/BlockTemplateDetails.js +1 -1
  220. package/es/user/CurrentUser.js +118 -10
  221. package/lib/acl/ACLProvider.js +2 -2
  222. package/lib/acl/Configuration/RoleConfigure.js +15 -8
  223. package/lib/api-client/APIClient.d.ts +2 -0
  224. package/lib/api-client/APIClient.js +11 -0
  225. package/lib/block-provider/BlockProvider.js +57 -16
  226. package/lib/block-provider/DetailsBlockProvider.js +13 -1
  227. package/lib/block-provider/FormBlockProvider.js +31 -15
  228. package/lib/block-provider/hooks/index.d.ts +10 -0
  229. package/lib/block-provider/hooks/index.js +531 -290
  230. package/lib/collection-manager/CollectionField.js +3 -3
  231. package/lib/collection-manager/CollectionFieldProvider.js +2 -1
  232. package/lib/collection-manager/Configuration/AddFieldAction.js +2 -2
  233. package/lib/collection-manager/Configuration/CollectionFields.d.ts +1 -1
  234. package/lib/collection-manager/Configuration/CollectionFields.js +2 -5
  235. package/lib/collection-manager/Configuration/ConfigurationTabs.js +7 -6
  236. package/lib/collection-manager/Configuration/EditFieldAction.js +0 -1
  237. package/lib/collection-manager/Configuration/OverridingCollectionField.js +0 -1
  238. package/lib/collection-manager/action-hooks.d.ts +1 -1
  239. package/lib/collection-manager/action-hooks.js +18 -7
  240. package/lib/collection-manager/hooks/useCollection.d.ts +1 -1
  241. package/lib/collection-manager/hooks/useCollectionDataSource.js +4 -4
  242. package/lib/collection-manager/interfaces/createdBy.js +1 -1
  243. package/lib/collection-manager/interfaces/linkTo.js +2 -38
  244. package/lib/collection-manager/interfaces/m2m.js +3 -37
  245. package/lib/collection-manager/interfaces/m2o.js +3 -37
  246. package/lib/collection-manager/interfaces/o2m.js +6 -70
  247. package/lib/collection-manager/interfaces/o2o.js +30 -124
  248. package/lib/collection-manager/interfaces/updatedBy.js +1 -1
  249. package/lib/collection-manager/templates/expression.js +1 -1
  250. package/lib/collection-manager/templates/tree.js +2 -2
  251. package/lib/filter-provider/FilterProvider.js +3 -1
  252. package/lib/filter-provider/utils.js +1 -1
  253. package/lib/index.d.ts +1 -0
  254. package/lib/index.js +11 -0
  255. package/lib/locale/en_US.d.ts +19 -1
  256. package/lib/locale/en_US.js +22 -4
  257. package/lib/locale/es_ES.d.ts +692 -0
  258. package/lib/locale/es_ES.js +698 -0
  259. package/lib/locale/ja_JP.d.ts +8 -1
  260. package/lib/locale/ja_JP.js +9 -2
  261. package/lib/locale/pt_BR.d.ts +5 -1
  262. package/lib/locale/pt_BR.js +6 -2
  263. package/lib/locale/ru_RU.d.ts +5 -1
  264. package/lib/locale/ru_RU.js +6 -2
  265. package/lib/locale/tr_TR.d.ts +5 -1
  266. package/lib/locale/tr_TR.js +6 -2
  267. package/lib/locale/zh_CN.d.ts +27 -1
  268. package/lib/locale/zh_CN.js +28 -2
  269. package/lib/record-provider/index.d.ts +4 -0
  270. package/lib/record-provider/index.js +5 -1
  271. package/lib/schema-component/antd/action/Action.Designer.js +10 -8
  272. package/lib/schema-component/antd/action/Action.Drawer.js +4 -1
  273. package/lib/schema-component/antd/action/ActionBar.js +23 -16
  274. package/lib/schema-component/antd/association-field/AssociationFieldProvider.d.ts +2 -0
  275. package/lib/schema-component/antd/association-field/AssociationFieldProvider.js +40 -0
  276. package/lib/schema-component/antd/association-field/AssociationSelect.d.ts +14 -0
  277. package/lib/schema-component/antd/association-field/AssociationSelect.js +72 -0
  278. package/lib/schema-component/antd/association-field/Editable.d.ts +2 -0
  279. package/lib/schema-component/antd/association-field/Editable.js +121 -0
  280. package/lib/schema-component/antd/association-field/FileManager.d.ts +4 -0
  281. package/lib/schema-component/antd/association-field/FileManager.js +253 -0
  282. package/lib/schema-component/antd/association-field/InternalNester.d.ts +1 -0
  283. package/lib/schema-component/antd/association-field/InternalNester.js +39 -0
  284. package/lib/schema-component/antd/association-field/InternalPicker.d.ts +2 -0
  285. package/lib/schema-component/antd/association-field/InternalPicker.js +246 -0
  286. package/lib/schema-component/antd/association-field/InternalSubTable.d.ts +1 -0
  287. package/lib/schema-component/antd/association-field/InternalSubTable.js +39 -0
  288. package/lib/schema-component/antd/association-field/InternalViewer.d.ts +2 -0
  289. package/lib/schema-component/antd/association-field/InternalViewer.js +123 -0
  290. package/lib/schema-component/antd/association-field/Nester.d.ts +1 -0
  291. package/lib/schema-component/antd/association-field/Nester.js +80 -0
  292. package/lib/schema-component/antd/association-field/ReadPretty.d.ts +2 -0
  293. package/lib/schema-component/antd/association-field/ReadPretty.js +30 -0
  294. package/lib/schema-component/antd/association-field/SubTable.d.ts +1 -0
  295. package/lib/schema-component/antd/association-field/SubTable.js +33 -0
  296. package/lib/schema-component/antd/association-field/components/CreateRecordAction.d.ts +2 -0
  297. package/lib/schema-component/antd/association-field/components/CreateRecordAction.js +71 -0
  298. package/lib/schema-component/antd/association-field/context.d.ts +8 -0
  299. package/lib/schema-component/antd/association-field/context.js +9 -0
  300. package/lib/schema-component/antd/association-field/hooks.d.ts +9 -0
  301. package/lib/schema-component/antd/association-field/hooks.js +107 -0
  302. package/lib/schema-component/antd/association-field/index.d.ts +1 -0
  303. package/lib/schema-component/antd/association-field/index.js +21 -0
  304. package/lib/schema-component/antd/association-field/schema.d.ts +142 -0
  305. package/lib/schema-component/antd/association-field/schema.js +148 -0
  306. package/lib/schema-component/antd/association-field/util.d.ts +8 -0
  307. package/lib/schema-component/antd/association-field/util.js +98 -0
  308. package/lib/schema-component/antd/association-filter/AssociationFilter.Item.js +3 -3
  309. package/lib/schema-component/antd/association-select/AssociationSelect.js +49 -231
  310. package/lib/schema-component/antd/association-select/useServiceOptions.js +2 -2
  311. package/lib/schema-component/antd/collection-select/CollectionSelect.js +5 -0
  312. package/lib/schema-component/antd/expand-action/Expand.Action.Design.d.ts +1 -0
  313. package/lib/schema-component/antd/expand-action/Expand.Action.Design.js +120 -0
  314. package/lib/schema-component/antd/expand-action/Expand.Action.d.ts +1 -0
  315. package/lib/schema-component/antd/expand-action/Expand.Action.js +48 -0
  316. package/lib/schema-component/antd/expand-action/index.d.ts +1 -0
  317. package/lib/schema-component/antd/expand-action/index.js +12 -0
  318. package/lib/schema-component/antd/filter/Filter.Action.Designer.js +10 -12
  319. package/lib/schema-component/antd/filter/FilterItem.js +1 -1
  320. package/lib/schema-component/antd/filter/useOperators.d.ts +1 -1
  321. package/lib/schema-component/antd/form/Form.js +4 -4
  322. package/lib/schema-component/antd/form-item/FormItem.d.ts +2 -1
  323. package/lib/schema-component/antd/form-item/FormItem.js +258 -162
  324. package/lib/schema-component/antd/form-item/SchemaSettingOptions.js +37 -59
  325. package/lib/schema-component/antd/form-v2/Form.Designer.js +1 -0
  326. package/lib/schema-component/antd/form-v2/Templates.d.ts +20 -0
  327. package/lib/schema-component/antd/form-v2/Templates.js +39 -11
  328. package/lib/schema-component/antd/form-v2/utils.js +3 -1
  329. package/lib/schema-component/antd/gantt/components/other/tooltip.js +1 -1
  330. package/lib/schema-component/antd/grid/Grid.js +33 -23
  331. package/lib/schema-component/antd/grid-card/GridCard.Decorator.d.ts +5 -0
  332. package/lib/schema-component/antd/grid-card/GridCard.Decorator.js +77 -0
  333. package/lib/schema-component/antd/grid-card/GridCard.Designer.d.ts +1 -0
  334. package/lib/schema-component/antd/grid-card/GridCard.Designer.js +253 -0
  335. package/lib/schema-component/antd/grid-card/GridCard.Item.d.ts +1 -0
  336. package/lib/schema-component/antd/grid-card/GridCard.Item.js +26 -0
  337. package/lib/schema-component/antd/grid-card/GridCard.d.ts +8 -0
  338. package/lib/schema-component/antd/grid-card/GridCard.js +112 -0
  339. package/lib/schema-component/antd/grid-card/hooks.d.ts +4 -0
  340. package/lib/schema-component/antd/grid-card/hooks.js +16 -0
  341. package/lib/schema-component/antd/grid-card/index.d.ts +1 -0
  342. package/lib/schema-component/antd/grid-card/index.js +16 -0
  343. package/lib/schema-component/antd/grid-card/options.d.ts +20 -0
  344. package/lib/schema-component/antd/grid-card/options.js +31 -0
  345. package/lib/schema-component/antd/index.d.ts +5 -1
  346. package/lib/schema-component/antd/index.js +55 -11
  347. package/lib/schema-component/antd/list/List.Decorator.d.ts +5 -0
  348. package/lib/schema-component/antd/list/List.Decorator.js +71 -0
  349. package/lib/schema-component/antd/list/List.Designer.d.ts +1 -0
  350. package/lib/schema-component/antd/list/List.Designer.js +213 -0
  351. package/lib/schema-component/antd/list/List.Item.d.ts +1 -0
  352. package/lib/schema-component/antd/list/List.Item.js +23 -0
  353. package/lib/schema-component/antd/list/List.d.ts +8 -0
  354. package/lib/schema-component/antd/list/List.js +92 -0
  355. package/lib/schema-component/antd/list/hooks.d.ts +4 -0
  356. package/lib/schema-component/antd/list/hooks.js +16 -0
  357. package/lib/schema-component/antd/list/index.d.ts +1 -0
  358. package/lib/schema-component/antd/list/index.js +16 -0
  359. package/lib/schema-component/antd/menu/Menu.js +6 -3
  360. package/lib/schema-component/antd/record-picker/InputRecordPicker.d.ts +1 -0
  361. package/lib/schema-component/antd/record-picker/InputRecordPicker.js +34 -13
  362. package/lib/schema-component/antd/remote-select/RemoteSelect.js +22 -22
  363. package/lib/schema-component/antd/select/Select.js +2 -0
  364. package/lib/schema-component/antd/table/Table.Void.Designer.js +1 -0
  365. package/lib/schema-component/antd/table-v2/Table.Column.Designer.js +18 -9
  366. package/lib/schema-component/antd/table-v2/Table.Index.d.ts +1 -0
  367. package/lib/schema-component/antd/table-v2/Table.Index.js +14 -0
  368. package/lib/schema-component/antd/table-v2/Table.js +9 -5
  369. package/lib/schema-component/antd/table-v2/TableBlockDesigner.js +2 -1
  370. package/lib/schema-component/antd/table-v2/TableSelectorDesigner.js +1 -0
  371. package/lib/schema-component/antd/table-v2/hooks/useUserVariable.d.ts +22 -0
  372. package/lib/schema-component/antd/table-v2/hooks/useUserVariable.js +73 -0
  373. package/lib/schema-component/antd/table-v2/index.js +3 -1
  374. package/lib/schema-component/antd/table-v2/utils.js +1 -1
  375. package/lib/schema-component/antd/variable/Input.js +11 -8
  376. package/lib/schema-component/antd/variable/TextArea.js +2 -5
  377. package/lib/schema-component/common/dnd-context/index.js +3 -2
  378. package/lib/schema-component/common/sortable-item/SortableItem.js +4 -1
  379. package/lib/schema-component/common/utils/uitls.js +1 -1
  380. package/lib/schema-component/core/SchemaComponentProvider.js +2 -2
  381. package/lib/schema-component/hooks/index.d.ts +1 -0
  382. package/lib/schema-component/hooks/index.js +11 -0
  383. package/lib/schema-component/hooks/useFieldModeOptions.d.ts +4 -0
  384. package/lib/schema-component/hooks/useFieldModeOptions.js +112 -0
  385. package/lib/schema-initializer/SchemaInitializerProvider.d.ts +1 -0
  386. package/lib/schema-initializer/SchemaInitializerProvider.js +22 -9
  387. package/lib/schema-initializer/buttons/BlockInitializers.js +10 -0
  388. package/lib/schema-initializer/buttons/CustomFormItemInitializers.js +4 -2
  389. package/lib/schema-initializer/buttons/FormActionInitializers.d.ts +0 -116
  390. package/lib/schema-initializer/buttons/FormActionInitializers.js +106 -100
  391. package/lib/schema-initializer/buttons/GanttActionInitializers.d.ts +0 -19
  392. package/lib/schema-initializer/buttons/GridCardActionInitializers.d.ts +195 -0
  393. package/lib/schema-initializer/buttons/GridCardActionInitializers.js +285 -0
  394. package/lib/schema-initializer/buttons/ListActionInitializers.d.ts +195 -0
  395. package/lib/schema-initializer/buttons/ListActionInitializers.js +285 -0
  396. package/lib/schema-initializer/buttons/TableActionColumnInitializers.js +1 -1
  397. package/lib/schema-initializer/buttons/TableActionInitializers.d.ts +0 -20
  398. package/lib/schema-initializer/buttons/TableActionInitializers.js +29 -35
  399. package/lib/schema-initializer/buttons/TableColumnInitializers.js +4 -1
  400. package/lib/schema-initializer/buttons/index.d.ts +3 -0
  401. package/lib/schema-initializer/buttons/index.js +22 -0
  402. package/lib/schema-initializer/components/BulkEditField.js +7 -5
  403. package/lib/schema-initializer/components/CreateRecordAction.d.ts +2 -1
  404. package/lib/schema-initializer/components/CreateRecordAction.js +58 -35
  405. package/lib/schema-initializer/components/DeletedField.d.ts +1 -0
  406. package/lib/schema-initializer/components/DeletedField.js +19 -0
  407. package/lib/schema-initializer/components/assigned-field/AssignedField.js +34 -22
  408. package/lib/schema-initializer/items/ExpandActionInitializer.d.ts +0 -1
  409. package/lib/schema-initializer/items/ExpandActionInitializer.js +11 -37
  410. package/lib/schema-initializer/items/GridCardBlockInitializer.d.ts +1 -0
  411. package/lib/schema-initializer/items/GridCardBlockInitializer.js +55 -0
  412. package/lib/schema-initializer/items/ListBlockInitializer.d.ts +1 -0
  413. package/lib/schema-initializer/items/ListBlockInitializer.js +55 -0
  414. package/lib/schema-initializer/items/SelectActionInitializer.d.ts +1 -0
  415. package/lib/schema-initializer/items/SelectActionInitializer.js +73 -0
  416. package/lib/schema-initializer/items/index.d.ts +3 -0
  417. package/lib/schema-initializer/items/index.js +33 -0
  418. package/lib/schema-initializer/utils.d.ts +112 -0
  419. package/lib/schema-initializer/utils.js +227 -39
  420. package/lib/schema-items/GeneralSchemaItems.d.ts +4 -0
  421. package/lib/schema-items/GeneralSchemaItems.js +156 -0
  422. package/lib/schema-items/index.d.ts +1 -0
  423. package/lib/schema-items/index.js +11 -0
  424. package/lib/schema-settings/DataTemplates/FormDataTemplates.d.ts +1 -0
  425. package/lib/schema-settings/DataTemplates/FormDataTemplates.js +119 -41
  426. package/lib/schema-settings/DataTemplates/components/Designer.d.ts +7 -0
  427. package/lib/schema-settings/DataTemplates/components/Designer.js +188 -0
  428. package/lib/schema-settings/DataTemplates/hooks/useCollectionState.d.ts +6 -1
  429. package/lib/schema-settings/DataTemplates/hooks/useCollectionState.js +204 -95
  430. package/lib/schema-settings/GeneralSchemaDesigner.js +21 -15
  431. package/lib/schema-settings/LinkageRules/FilterDynamicComponent.js +1 -1
  432. package/lib/schema-settings/LinkageRules/Variables.d.ts +1 -1
  433. package/lib/schema-settings/LinkageRules/Variables.js +7 -4
  434. package/lib/schema-settings/SchemaSettings.d.ts +1 -1
  435. package/lib/schema-settings/SchemaSettings.js +53 -29
  436. package/lib/schema-settings/VariableInput/hooks/useUserVariable.js +1 -1
  437. package/lib/schema-settings/hooks/useIsShowMultipleSwitch.d.ts +4 -0
  438. package/lib/schema-settings/hooks/useIsShowMultipleSwitch.js +24 -0
  439. package/lib/user/CurrentUser.js +116 -8
  440. package/package.json +5 -6
  441. package/tsconfig.json +8 -0
@@ -28,8 +28,10 @@ export * from './FilterFormBlockInitializer';
28
28
  export * from './FormBlockInitializer';
29
29
  export * from './G2PlotInitializer';
30
30
  export * from './GanttBlockInitializer';
31
+ export * from './GridCardBlockInitializer';
31
32
  export * from './InitializerWithSwitch';
32
33
  export * from './KanbanBlockInitializer';
34
+ export * from './ListBlockInitializer';
33
35
  export * from './MarkdownBlockInitializer';
34
36
  export * from './PrintActionInitializer';
35
37
  export * from './RecordAssociationBlockInitializer';
@@ -40,6 +42,7 @@ export * from './RecordFormBlockInitializer';
40
42
  export * from './RecordReadPrettyAssociationFormBlockInitializer';
41
43
  export * from './RecordReadPrettyFormBlockInitializer';
42
44
  export * from './RefreshActionInitializer';
45
+ export * from './SelectActionInitializer';
43
46
  export * from './SubmitActionInitializer';
44
47
  export * from './TableActionColumnInitializer';
45
48
  export * from './TableBlockInitializer';
@@ -333,6 +333,17 @@ Object.keys(_GanttBlockInitializer).forEach(function (key) {
333
333
  }
334
334
  });
335
335
  });
336
+ var _GridCardBlockInitializer = require("./GridCardBlockInitializer");
337
+ Object.keys(_GridCardBlockInitializer).forEach(function (key) {
338
+ if (key === "default" || key === "__esModule") return;
339
+ if (key in exports && exports[key] === _GridCardBlockInitializer[key]) return;
340
+ Object.defineProperty(exports, key, {
341
+ enumerable: true,
342
+ get: function get() {
343
+ return _GridCardBlockInitializer[key];
344
+ }
345
+ });
346
+ });
336
347
  var _InitializerWithSwitch = require("./InitializerWithSwitch");
337
348
  Object.keys(_InitializerWithSwitch).forEach(function (key) {
338
349
  if (key === "default" || key === "__esModule") return;
@@ -355,6 +366,17 @@ Object.keys(_KanbanBlockInitializer).forEach(function (key) {
355
366
  }
356
367
  });
357
368
  });
369
+ var _ListBlockInitializer = require("./ListBlockInitializer");
370
+ Object.keys(_ListBlockInitializer).forEach(function (key) {
371
+ if (key === "default" || key === "__esModule") return;
372
+ if (key in exports && exports[key] === _ListBlockInitializer[key]) return;
373
+ Object.defineProperty(exports, key, {
374
+ enumerable: true,
375
+ get: function get() {
376
+ return _ListBlockInitializer[key];
377
+ }
378
+ });
379
+ });
358
380
  var _MarkdownBlockInitializer = require("./MarkdownBlockInitializer");
359
381
  Object.keys(_MarkdownBlockInitializer).forEach(function (key) {
360
382
  if (key === "default" || key === "__esModule") return;
@@ -465,6 +487,17 @@ Object.keys(_RefreshActionInitializer).forEach(function (key) {
465
487
  }
466
488
  });
467
489
  });
490
+ var _SelectActionInitializer = require("./SelectActionInitializer");
491
+ Object.keys(_SelectActionInitializer).forEach(function (key) {
492
+ if (key === "default" || key === "__esModule") return;
493
+ if (key in exports && exports[key] === _SelectActionInitializer[key]) return;
494
+ Object.defineProperty(exports, key, {
495
+ enumerable: true,
496
+ get: function get() {
497
+ return _SelectActionInitializer[key];
498
+ }
499
+ });
500
+ });
468
501
  var _SubmitActionInitializer = require("./SubmitActionInitializer");
469
502
  Object.keys(_SubmitActionInitializer).forEach(function (key) {
470
503
  if (key === "default" || key === "__esModule") return;
@@ -219,6 +219,118 @@ export declare const createDetailsBlockSchema: (options: any) => import("@formil
219
219
  "x-read-only"?: boolean;
220
220
  "x-read-pretty"?: boolean;
221
221
  }>;
222
+ export declare const createListBlockSchema: (options: any) => import("@formily/react").Stringify<{
223
+ [key: symbol]: any;
224
+ [key: `x-${string}`]: any;
225
+ [key: `x-${number}`]: any;
226
+ version?: string;
227
+ name?: import("@formily/react").SchemaKey;
228
+ title?: any;
229
+ description?: any;
230
+ default?: any;
231
+ readOnly?: boolean;
232
+ writeOnly?: boolean;
233
+ type?: import("@formily/react").SchemaTypes;
234
+ enum?: import("@formily/react").SchemaEnum<any>;
235
+ const?: any;
236
+ multipleOf?: number;
237
+ maximum?: number;
238
+ exclusiveMaximum?: number;
239
+ minimum?: number;
240
+ exclusiveMinimum?: number;
241
+ maxLength?: number;
242
+ minLength?: number;
243
+ pattern?: string | RegExp;
244
+ maxItems?: number;
245
+ minItems?: number;
246
+ uniqueItems?: boolean;
247
+ maxProperties?: number;
248
+ minProperties?: number;
249
+ required?: string | boolean | string[];
250
+ format?: string;
251
+ $ref?: string;
252
+ $namespace?: string;
253
+ definitions?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
254
+ properties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
255
+ items?: import("@formily/react").SchemaItems<any, any, any, any, any, any, any, any>;
256
+ additionalItems?: import("@formily/react").Stringify<any>;
257
+ patternProperties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
258
+ additionalProperties?: import("@formily/react").Stringify<any>;
259
+ "x-value"?: any;
260
+ "x-index"?: number;
261
+ "x-pattern"?: any;
262
+ "x-display"?: any;
263
+ "x-validator"?: any;
264
+ "x-decorator"?: any;
265
+ "x-decorator-props"?: any;
266
+ "x-component"?: any;
267
+ "x-component-props"?: any;
268
+ "x-reactions"?: import("@formily/react").SchemaReactions<any>;
269
+ "x-content"?: any;
270
+ "x-data"?: any;
271
+ "x-visible"?: boolean;
272
+ "x-hidden"?: boolean;
273
+ "x-disabled"?: boolean;
274
+ "x-editable"?: boolean;
275
+ "x-read-only"?: boolean;
276
+ "x-read-pretty"?: boolean;
277
+ }>;
278
+ export declare const createGridCardBlockSchema: (options: any) => import("@formily/react").Stringify<{
279
+ [key: symbol]: any;
280
+ [key: `x-${string}`]: any;
281
+ [key: `x-${number}`]: any;
282
+ version?: string;
283
+ name?: import("@formily/react").SchemaKey;
284
+ title?: any;
285
+ description?: any;
286
+ default?: any;
287
+ readOnly?: boolean;
288
+ writeOnly?: boolean;
289
+ type?: import("@formily/react").SchemaTypes;
290
+ enum?: import("@formily/react").SchemaEnum<any>;
291
+ const?: any;
292
+ multipleOf?: number;
293
+ maximum?: number;
294
+ exclusiveMaximum?: number;
295
+ minimum?: number;
296
+ exclusiveMinimum?: number;
297
+ maxLength?: number;
298
+ minLength?: number;
299
+ pattern?: string | RegExp;
300
+ maxItems?: number;
301
+ minItems?: number;
302
+ uniqueItems?: boolean;
303
+ maxProperties?: number;
304
+ minProperties?: number;
305
+ required?: string | boolean | string[];
306
+ format?: string;
307
+ $ref?: string;
308
+ $namespace?: string;
309
+ definitions?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
310
+ properties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
311
+ items?: import("@formily/react").SchemaItems<any, any, any, any, any, any, any, any>;
312
+ additionalItems?: import("@formily/react").Stringify<any>;
313
+ patternProperties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
314
+ additionalProperties?: import("@formily/react").Stringify<any>;
315
+ "x-value"?: any;
316
+ "x-index"?: number;
317
+ "x-pattern"?: any;
318
+ "x-display"?: any;
319
+ "x-validator"?: any;
320
+ "x-decorator"?: any;
321
+ "x-decorator-props"?: any;
322
+ "x-component"?: any;
323
+ "x-component-props"?: any;
324
+ "x-reactions"?: import("@formily/react").SchemaReactions<any>;
325
+ "x-content"?: any;
326
+ "x-data"?: any;
327
+ "x-visible"?: boolean;
328
+ "x-hidden"?: boolean;
329
+ "x-disabled"?: boolean;
330
+ "x-editable"?: boolean;
331
+ "x-read-only"?: boolean;
332
+ "x-read-pretty"?: boolean;
333
+ }>;
222
334
  export declare const createFormBlockSchema: (options: any) => import("@formily/react").Stringify<{
223
335
  [key: symbol]: any;
224
336
  [key: `x-${string}`]: any;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useTableColumnInitializerFields = exports.useRemoveGridFormItem = exports.useRecordCollectionDataSourceItems = exports.useInheritsTableColumnInitializerFields = exports.useInheritsFormItemInitializerFields = exports.useFormItemInitializerFields = exports.useFilterInheritsFormItemInitializerFields = exports.useFilterFormItemInitializerFields = exports.useFilterAssociatedFormItemInitializerFields = exports.useCustomFormItemInitializerFields = exports.useCustomBulkEditFormItemInitializerFields = exports.useCurrentSchema = exports.useCollectionDataSourceItems = exports.useAssociatedTableColumnInitializerFields = exports.useAssociatedFormItemInitializerFields = exports.removeTableColumn = exports.removeGridFormItem = exports.itemsMerge = exports.gridRowColWrap = exports.findTableColumn = exports.createTableSelectorSchema = exports.createTableBlockSchema = exports.createReadPrettyFormBlockSchema = exports.createKanbanBlockSchema = exports.createGanttBlockSchema = exports.createFormBlockSchema = exports.createFilterFormBlockSchema = exports.createDetailsBlockSchema = exports.createCollapseBlockSchema = exports.createCalendarBlockSchema = void 0;
6
+ exports.useTableColumnInitializerFields = exports.useRemoveGridFormItem = exports.useRecordCollectionDataSourceItems = exports.useInheritsTableColumnInitializerFields = exports.useInheritsFormItemInitializerFields = exports.useFormItemInitializerFields = exports.useFilterInheritsFormItemInitializerFields = exports.useFilterFormItemInitializerFields = exports.useFilterAssociatedFormItemInitializerFields = exports.useCustomFormItemInitializerFields = exports.useCustomBulkEditFormItemInitializerFields = exports.useCurrentSchema = exports.useCollectionDataSourceItems = exports.useAssociatedTableColumnInitializerFields = exports.useAssociatedFormItemInitializerFields = exports.removeTableColumn = exports.removeGridFormItem = exports.itemsMerge = exports.gridRowColWrap = exports.findTableColumn = exports.createTableSelectorSchema = exports.createTableBlockSchema = exports.createReadPrettyFormBlockSchema = exports.createListBlockSchema = exports.createKanbanBlockSchema = exports.createGridCardBlockSchema = exports.createGanttBlockSchema = exports.createFormBlockSchema = exports.createFilterFormBlockSchema = exports.createDetailsBlockSchema = exports.createCollapseBlockSchema = exports.createCalendarBlockSchema = void 0;
7
7
  var _react = require("@formily/react");
8
8
  var _shared = require("@formily/shared");
9
9
  var _react2 = _interopRequireWildcard(require("react"));
@@ -15,14 +15,16 @@ var _schemaComponent = require("../schema-component");
15
15
  var _schemaTemplates = require("../schema-templates");
16
16
  var _SelectCollection = require("./SelectCollection");
17
17
  var _excluded = ["formItemInitializers", "actionInitializers", "collection", "association", "resource", "template"],
18
- _excluded2 = ["formItemInitializers", "actionInitializers", "collection", "resource", "association", "action", "template"],
19
- _excluded3 = ["formItemInitializers", "actionInitializers", "collection", "resource", "association", "action", "template"],
20
- _excluded4 = ["formItemInitializers", "actionInitializers", "collection", "association", "resource", "template"],
21
- _excluded5 = ["collection", "resource", "rowKey", "tableActionInitializers", "tableColumnInitializers", "tableActionColumnInitializers", "tableBlockProvider", "disableTemplate", "TableBlockDesigner", "blockType", "pageSize"],
22
- _excluded6 = ["collection", "resource", "rowKey"],
23
- _excluded7 = ["collection", "resource", "fieldNames"],
24
- _excluded8 = ["collection", "resource", "fieldNames"],
25
- _excluded9 = ["collection", "resource", "groupField"];
18
+ _excluded2 = ["formItemInitializers", "actionInitializers", "itemActionInitializers", "collection", "association", "resource", "template"],
19
+ _excluded3 = ["formItemInitializers", "actionInitializers", "itemActionInitializers", "collection", "association", "resource", "template"],
20
+ _excluded4 = ["formItemInitializers", "actionInitializers", "collection", "resource", "association", "action", "template"],
21
+ _excluded5 = ["formItemInitializers", "actionInitializers", "collection", "resource", "association", "action", "template"],
22
+ _excluded6 = ["formItemInitializers", "actionInitializers", "collection", "association", "resource", "template"],
23
+ _excluded7 = ["collection", "resource", "rowKey", "tableActionInitializers", "tableColumnInitializers", "tableActionColumnInitializers", "tableBlockProvider", "disableTemplate", "TableBlockDesigner", "blockType", "pageSize"],
24
+ _excluded8 = ["collection", "resource", "rowKey"],
25
+ _excluded9 = ["collection", "resource", "fieldNames"],
26
+ _excluded10 = ["collection", "resource", "fieldNames"],
27
+ _excluded11 = ["collection", "resource", "groupField"];
26
28
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
27
29
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
28
30
  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); }
@@ -280,12 +282,15 @@ var useFormItemInitializerFields = function useFormItemInitializerFields(options
280
282
  var _field$uiSchema3, _field$uiSchema4;
281
283
  var interfaceConfig = getInterface(field.interface);
282
284
  var targetCollection = getCollection(field.target);
283
- var component = field.interface === 'o2m' && (targetCollection === null || targetCollection === void 0 ? void 0 : targetCollection.template) !== 'file' && !snapshot ? 'TableField' : 'CollectionField';
285
+ // const component =
286
+ // field.interface === 'o2m' && targetCollection?.template !== 'file' && !snapshot
287
+ // ? 'TableField'
288
+ // : 'CollectionField';
284
289
  var schema = {
285
290
  type: 'string',
286
291
  name: field.name,
287
292
  'x-designer': 'FormItem.Designer',
288
- 'x-component': component,
293
+ 'x-component': 'CollectionField',
289
294
  'x-decorator': 'FormItem',
290
295
  'x-collection-field': "".concat(name, ".").concat(field.name),
291
296
  'x-component-props': {},
@@ -345,13 +350,16 @@ var useFilterFormItemInitializerFields = function useFilterFormItemInitializerFi
345
350
  var _field$uiSchema6;
346
351
  var interfaceConfig = getInterface(field.interface);
347
352
  var targetCollection = getCollection(field.target);
348
- var component = field.interface === 'o2m' && (targetCollection === null || targetCollection === void 0 ? void 0 : targetCollection.template) !== 'file' && !snapshot ? 'TableField' : 'CollectionField';
353
+ // const component =
354
+ // field.interface === 'o2m' && targetCollection?.template !== 'file' && !snapshot
355
+ // ? 'TableField'
356
+ // : 'CollectionField';
349
357
  var schema = {
350
358
  type: 'string',
351
359
  name: field.name,
352
360
  required: false,
353
361
  'x-designer': 'FormItem.FilterFormDesigner',
354
- 'x-component': component,
362
+ 'x-component': 'CollectionField',
355
363
  'x-decorator': 'FormItem',
356
364
  'x-collection-field': "".concat(name, ".").concat(field.name),
357
365
  'x-component-props': {}
@@ -531,7 +539,9 @@ var useInheritsFormItemInitializerFields = function useInheritsFormItemInitializ
531
539
  _ref5$readPretty = _ref5.readPretty,
532
540
  readPretty = _ref5$readPretty === void 0 ? form.readPretty : _ref5$readPretty,
533
541
  _ref5$block = _ref5.block,
534
- block = _ref5$block === void 0 ? 'Form' : _ref5$block;
542
+ block = _ref5$block === void 0 ? 'Form' : _ref5$block,
543
+ _ref5$component = _ref5.component,
544
+ component = _ref5$component === void 0 ? 'CollectionField' : _ref5$component;
535
545
  var targetCollection = getCollection(v);
536
546
  return _defineProperty({}, targetCollection === null || targetCollection === void 0 ? void 0 : targetCollection.title, fields === null || fields === void 0 ? void 0 : (_fields$filter4 = fields.filter(function (field) {
537
547
  return (field === null || field === void 0 ? void 0 : field.interface) && !(field === null || field === void 0 ? void 0 : field.isForeignKey);
@@ -539,7 +549,10 @@ var useInheritsFormItemInitializerFields = function useInheritsFormItemInitializ
539
549
  var _field$uiSchema10, _field$uiSchema11, _field$uiSchema12;
540
550
  var interfaceConfig = getInterface(field.interface);
541
551
  var targetCollection = getCollection(field.target);
542
- var component = field.interface === 'o2m' && (targetCollection === null || targetCollection === void 0 ? void 0 : targetCollection.template) !== 'file' && !snapshot ? 'TableField' : 'CollectionField';
552
+ // const component =
553
+ // field.interface === 'o2m' && targetCollection?.template !== 'file' && !snapshot
554
+ // ? 'TableField'
555
+ // : 'CollectionField';
543
556
  var schema = {
544
557
  type: 'string',
545
558
  name: field.name,
@@ -600,14 +613,17 @@ var useFilterInheritsFormItemInitializerFields = function useFilterInheritsFormI
600
613
  var _field$uiSchema13, _field$uiSchema14, _field$uiSchema15;
601
614
  var interfaceConfig = getInterface(field.interface);
602
615
  var targetCollection = getCollection(field.target);
603
- var component = field.interface === 'o2m' && (targetCollection === null || targetCollection === void 0 ? void 0 : targetCollection.template) !== 'file' && !snapshot ? 'TableField' : 'CollectionField';
616
+ // const component =
617
+ // field.interface === 'o2m' && targetCollection?.template !== 'file' && !snapshot
618
+ // ? 'TableField'
619
+ // : 'CollectionField';
604
620
  var schema = {
605
621
  type: 'string',
606
622
  name: field.name,
607
623
  title: (field === null || field === void 0 ? void 0 : (_field$uiSchema13 = field.uiSchema) === null || _field$uiSchema13 === void 0 ? void 0 : _field$uiSchema13.title) || field.name,
608
624
  required: false,
609
625
  'x-designer': 'FormItem.FilterFormDesigner',
610
- 'x-component': component,
626
+ 'x-component': 'CollectionField',
611
627
  'x-decorator': 'FormItem',
612
628
  'x-collection-field': "".concat(name, ".").concat(field.name),
613
629
  'x-component-props': {},
@@ -1015,17 +1031,189 @@ var createDetailsBlockSchema = function createDetailsBlockSchema(options) {
1015
1031
  return schema;
1016
1032
  };
1017
1033
  exports.createDetailsBlockSchema = createDetailsBlockSchema;
1018
- var createFormBlockSchema = function createFormBlockSchema(options) {
1034
+ var createListBlockSchema = function createListBlockSchema(options) {
1019
1035
  var _options$formItemInit2 = options.formItemInitializers,
1020
- formItemInitializers = _options$formItemInit2 === void 0 ? 'FormItemInitializers' : _options$formItemInit2,
1036
+ formItemInitializers = _options$formItemInit2 === void 0 ? 'ReadPrettyFormItemInitializers' : _options$formItemInit2,
1021
1037
  _options$actionInitia2 = options.actionInitializers,
1022
- actionInitializers = _options$actionInitia2 === void 0 ? 'FormActionInitializers' : _options$actionInitia2,
1038
+ actionInitializers = _options$actionInitia2 === void 0 ? 'ListActionInitializers' : _options$actionInitia2,
1039
+ _options$itemActionIn = options.itemActionInitializers,
1040
+ itemActionInitializers = _options$itemActionIn === void 0 ? 'ListItemActionInitializers' : _options$itemActionIn,
1041
+ collection = options.collection,
1042
+ association = options.association,
1043
+ resource = options.resource,
1044
+ template = options.template,
1045
+ others = _objectWithoutProperties(options, _excluded2);
1046
+ var resourceName = resource || association || collection;
1047
+ var schema = {
1048
+ type: 'void',
1049
+ 'x-acl-action': "".concat(resourceName, ":view"),
1050
+ 'x-decorator': 'List.Decorator',
1051
+ 'x-decorator-props': _objectSpread({
1052
+ resource: resourceName,
1053
+ collection: collection,
1054
+ association: association,
1055
+ readPretty: true,
1056
+ action: 'list',
1057
+ params: {
1058
+ pageSize: 10
1059
+ },
1060
+ runWhenParamsChanged: true
1061
+ }, others),
1062
+ 'x-component': 'CardItem',
1063
+ 'x-designer': 'List.Designer',
1064
+ properties: {
1065
+ actionBar: {
1066
+ type: 'void',
1067
+ 'x-initializer': actionInitializers,
1068
+ 'x-component': 'ActionBar',
1069
+ 'x-component-props': {
1070
+ style: {
1071
+ marginBottom: 'var(--nb-spacing)'
1072
+ }
1073
+ },
1074
+ properties: {}
1075
+ },
1076
+ list: {
1077
+ type: 'array',
1078
+ 'x-component': 'List',
1079
+ 'x-component-props': {
1080
+ props: '{{ useListBlockProps }}'
1081
+ },
1082
+ properties: {
1083
+ item: {
1084
+ type: 'object',
1085
+ 'x-component': 'List.Item',
1086
+ 'x-read-pretty': true,
1087
+ 'x-component-props': {
1088
+ useProps: '{{ useListItemProps }}'
1089
+ },
1090
+ properties: {
1091
+ grid: template || {
1092
+ type: 'void',
1093
+ 'x-component': 'Grid',
1094
+ 'x-initializer': formItemInitializers,
1095
+ 'x-initializer-props': {
1096
+ useProps: '{{ useListItemInitializerProps }}'
1097
+ },
1098
+ properties: {}
1099
+ },
1100
+ actionBar: {
1101
+ type: 'void',
1102
+ 'x-align': 'left',
1103
+ 'x-initializer': itemActionInitializers,
1104
+ 'x-component': 'ActionBar',
1105
+ 'x-component-props': {
1106
+ useProps: '{{ useListActionBarProps }}',
1107
+ layout: 'one-column'
1108
+ },
1109
+ properties: {}
1110
+ }
1111
+ }
1112
+ }
1113
+ }
1114
+ }
1115
+ }
1116
+ };
1117
+ return schema;
1118
+ };
1119
+ exports.createListBlockSchema = createListBlockSchema;
1120
+ var createGridCardBlockSchema = function createGridCardBlockSchema(options) {
1121
+ var _options$formItemInit3 = options.formItemInitializers,
1122
+ formItemInitializers = _options$formItemInit3 === void 0 ? 'ReadPrettyFormItemInitializers' : _options$formItemInit3,
1123
+ _options$actionInitia3 = options.actionInitializers,
1124
+ actionInitializers = _options$actionInitia3 === void 0 ? 'GridCardActionInitializers' : _options$actionInitia3,
1125
+ _options$itemActionIn2 = options.itemActionInitializers,
1126
+ itemActionInitializers = _options$itemActionIn2 === void 0 ? 'GridCardItemActionInitializers' : _options$itemActionIn2,
1127
+ collection = options.collection,
1128
+ association = options.association,
1129
+ resource = options.resource,
1130
+ template = options.template,
1131
+ others = _objectWithoutProperties(options, _excluded3);
1132
+ var resourceName = resource || association || collection;
1133
+ var schema = {
1134
+ type: 'void',
1135
+ 'x-acl-action': "".concat(resourceName, ":view"),
1136
+ 'x-decorator': 'GridCard.Decorator',
1137
+ 'x-decorator-props': _objectSpread({
1138
+ resource: resourceName,
1139
+ collection: collection,
1140
+ association: association,
1141
+ readPretty: true,
1142
+ action: 'list',
1143
+ params: {
1144
+ pageSize: 12
1145
+ },
1146
+ runWhenParamsChanged: true
1147
+ }, others),
1148
+ 'x-component': 'BlockItem',
1149
+ 'x-designer': 'GridCard.Designer',
1150
+ properties: {
1151
+ actionBar: {
1152
+ type: 'void',
1153
+ 'x-initializer': actionInitializers,
1154
+ 'x-component': 'ActionBar',
1155
+ 'x-component-props': {
1156
+ style: {
1157
+ marginBottom: 'var(--nb-spacing)'
1158
+ }
1159
+ },
1160
+ properties: {}
1161
+ },
1162
+ list: {
1163
+ type: 'array',
1164
+ 'x-component': 'GridCard',
1165
+ 'x-component-props': {
1166
+ props: '{{ useGridCardBlockProps }}'
1167
+ },
1168
+ properties: {
1169
+ item: {
1170
+ type: 'object',
1171
+ 'x-component': 'GridCard.Item',
1172
+ 'x-read-pretty': true,
1173
+ 'x-component-props': {
1174
+ useProps: '{{ useGridCardItemProps }}'
1175
+ },
1176
+ properties: {
1177
+ grid: template || {
1178
+ type: 'void',
1179
+ 'x-component': 'Grid',
1180
+ 'x-initializer': formItemInitializers,
1181
+ 'x-initializer-props': {
1182
+ useProps: '{{ useGridCardItemInitializerProps }}'
1183
+ },
1184
+ properties: {}
1185
+ },
1186
+ actionBar: {
1187
+ type: 'void',
1188
+ 'x-align': 'left',
1189
+ 'x-initializer': itemActionInitializers,
1190
+ 'x-component': 'ActionBar',
1191
+ 'x-component-props': {
1192
+ useProps: '{{ useGridCardActionBarProps }}',
1193
+ layout: 'one-column'
1194
+ },
1195
+ properties: {}
1196
+ }
1197
+ }
1198
+ }
1199
+ }
1200
+ }
1201
+ }
1202
+ };
1203
+ return schema;
1204
+ };
1205
+ exports.createGridCardBlockSchema = createGridCardBlockSchema;
1206
+ var createFormBlockSchema = function createFormBlockSchema(options) {
1207
+ var _options$formItemInit4 = options.formItemInitializers,
1208
+ formItemInitializers = _options$formItemInit4 === void 0 ? 'FormItemInitializers' : _options$formItemInit4,
1209
+ _options$actionInitia4 = options.actionInitializers,
1210
+ actionInitializers = _options$actionInitia4 === void 0 ? 'FormActionInitializers' : _options$actionInitia4,
1023
1211
  collection = options.collection,
1024
1212
  resource = options.resource,
1025
1213
  association = options.association,
1026
1214
  action = options.action,
1027
1215
  template = options.template,
1028
- others = _objectWithoutProperties(options, _excluded2);
1216
+ others = _objectWithoutProperties(options, _excluded4);
1029
1217
  var resourceName = resource || association || collection;
1030
1218
  var schema = {
1031
1219
  type: 'void',
@@ -1077,16 +1265,16 @@ var createFormBlockSchema = function createFormBlockSchema(options) {
1077
1265
  };
1078
1266
  exports.createFormBlockSchema = createFormBlockSchema;
1079
1267
  var createFilterFormBlockSchema = function createFilterFormBlockSchema(options) {
1080
- var _options$formItemInit3 = options.formItemInitializers,
1081
- formItemInitializers = _options$formItemInit3 === void 0 ? 'FilterFormItemInitializers' : _options$formItemInit3,
1082
- _options$actionInitia3 = options.actionInitializers,
1083
- actionInitializers = _options$actionInitia3 === void 0 ? 'FilterFormActionInitializers' : _options$actionInitia3,
1268
+ var _options$formItemInit5 = options.formItemInitializers,
1269
+ formItemInitializers = _options$formItemInit5 === void 0 ? 'FilterFormItemInitializers' : _options$formItemInit5,
1270
+ _options$actionInitia5 = options.actionInitializers,
1271
+ actionInitializers = _options$actionInitia5 === void 0 ? 'FilterFormActionInitializers' : _options$actionInitia5,
1084
1272
  collection = options.collection,
1085
1273
  resource = options.resource,
1086
1274
  association = options.association,
1087
1275
  action = options.action,
1088
1276
  template = options.template,
1089
- others = _objectWithoutProperties(options, _excluded3);
1277
+ others = _objectWithoutProperties(options, _excluded5);
1090
1278
  var resourceName = resource || association || collection;
1091
1279
  var schema = {
1092
1280
  type: 'void',
@@ -1135,15 +1323,15 @@ var createFilterFormBlockSchema = function createFilterFormBlockSchema(options)
1135
1323
  };
1136
1324
  exports.createFilterFormBlockSchema = createFilterFormBlockSchema;
1137
1325
  var createReadPrettyFormBlockSchema = function createReadPrettyFormBlockSchema(options) {
1138
- var _options$formItemInit4 = options.formItemInitializers,
1139
- formItemInitializers = _options$formItemInit4 === void 0 ? 'ReadPrettyFormItemInitializers' : _options$formItemInit4,
1140
- _options$actionInitia4 = options.actionInitializers,
1141
- actionInitializers = _options$actionInitia4 === void 0 ? 'ReadPrettyFormActionInitializers' : _options$actionInitia4,
1326
+ var _options$formItemInit6 = options.formItemInitializers,
1327
+ formItemInitializers = _options$formItemInit6 === void 0 ? 'ReadPrettyFormItemInitializers' : _options$formItemInit6,
1328
+ _options$actionInitia6 = options.actionInitializers,
1329
+ actionInitializers = _options$actionInitia6 === void 0 ? 'ReadPrettyFormActionInitializers' : _options$actionInitia6,
1142
1330
  collection = options.collection,
1143
1331
  association = options.association,
1144
1332
  resource = options.resource,
1145
1333
  template = options.template,
1146
- others = _objectWithoutProperties(options, _excluded4);
1334
+ others = _objectWithoutProperties(options, _excluded6);
1147
1335
  var resourceName = resource || association || collection;
1148
1336
  var schema = {
1149
1337
  type: 'void',
@@ -1204,7 +1392,7 @@ var createTableBlockSchema = function createTableBlockSchema(options) {
1204
1392
  blockType = options.blockType,
1205
1393
  _options$pageSize = options.pageSize,
1206
1394
  pageSize = _options$pageSize === void 0 ? 20 : _options$pageSize,
1207
- others = _objectWithoutProperties(options, _excluded5);
1395
+ others = _objectWithoutProperties(options, _excluded7);
1208
1396
  var schema = {
1209
1397
  type: 'void',
1210
1398
  'x-decorator': tableBlockProvider !== null && tableBlockProvider !== void 0 ? tableBlockProvider : 'TableBlockProvider',
@@ -1232,7 +1420,7 @@ var createTableBlockSchema = function createTableBlockSchema(options) {
1232
1420
  'x-component': 'ActionBar',
1233
1421
  'x-component-props': {
1234
1422
  style: {
1235
- marginBottom: 16
1423
+ marginBottom: 'var(--nb-spacing)'
1236
1424
  }
1237
1425
  },
1238
1426
  properties: {}
@@ -1307,7 +1495,7 @@ var createTableSelectorSchema = function createTableSelectorSchema(options) {
1307
1495
  var collection = options.collection,
1308
1496
  resource = options.resource,
1309
1497
  rowKey = options.rowKey,
1310
- others = _objectWithoutProperties(options, _excluded6);
1498
+ others = _objectWithoutProperties(options, _excluded8);
1311
1499
  var schema = {
1312
1500
  type: 'void',
1313
1501
  'x-acl-action': "".concat(resource || collection, ":list"),
@@ -1330,7 +1518,7 @@ var createTableSelectorSchema = function createTableSelectorSchema(options) {
1330
1518
  'x-component': 'ActionBar',
1331
1519
  'x-component-props': {
1332
1520
  style: {
1333
- marginBottom: 16
1521
+ marginBottom: 'var(--nb-spacing)'
1334
1522
  }
1335
1523
  },
1336
1524
  properties: {}
@@ -1357,7 +1545,7 @@ var createCalendarBlockSchema = function createCalendarBlockSchema(options) {
1357
1545
  var collection = options.collection,
1358
1546
  resource = options.resource,
1359
1547
  fieldNames = options.fieldNames,
1360
- others = _objectWithoutProperties(options, _excluded7);
1548
+ others = _objectWithoutProperties(options, _excluded9);
1361
1549
  var schema = {
1362
1550
  type: 'void',
1363
1551
  'x-acl-action': "".concat(resource || collection, ":list"),
@@ -1449,7 +1637,7 @@ var createGanttBlockSchema = function createGanttBlockSchema(options) {
1449
1637
  var collection = options.collection,
1450
1638
  resource = options.resource,
1451
1639
  fieldNames = options.fieldNames,
1452
- others = _objectWithoutProperties(options, _excluded8);
1640
+ others = _objectWithoutProperties(options, _excluded10);
1453
1641
  var schema = {
1454
1642
  type: 'void',
1455
1643
  'x-acl-action': "".concat(resource || collection, ":list"),
@@ -1577,7 +1765,7 @@ var createKanbanBlockSchema = function createKanbanBlockSchema(options) {
1577
1765
  var collection = options.collection,
1578
1766
  resource = options.resource,
1579
1767
  groupField = options.groupField,
1580
- others = _objectWithoutProperties(options, _excluded9);
1768
+ others = _objectWithoutProperties(options, _excluded11);
1581
1769
  var schema = {
1582
1770
  type: 'void',
1583
1771
  'x-acl-action': "".concat(resource || collection, ":list"),
@@ -1600,7 +1788,7 @@ var createKanbanBlockSchema = function createKanbanBlockSchema(options) {
1600
1788
  'x-component': 'ActionBar',
1601
1789
  'x-component-props': {
1602
1790
  style: {
1603
- marginBottom: 16
1791
+ marginBottom: 'var(--nb-spacing)'
1604
1792
  }
1605
1793
  },
1606
1794
  properties: {}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const GeneralSchemaItems: React.FC<{
3
+ required?: boolean;
4
+ }>;