@tachybase/client 1.3.20 → 1.3.22

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 (326) hide show
  1. package/es/api-client/APIClient.d.ts +1 -1
  2. package/es/api-client/APIClient.mjs +1 -1
  3. package/es/api-client/hooks/assign.mjs +1 -1
  4. package/es/api-client/hooks/useResource.d.ts +1 -1
  5. package/es/application/Application.d.ts +1 -2
  6. package/es/application/Application.mjs +2 -11
  7. package/es/application/WebSocketClient.mjs +1 -1
  8. package/es/application/components/index.d.ts +0 -2
  9. package/es/application/components/index.mjs +0 -2
  10. package/es/application/schema-initializer/context/index.d.ts +1 -1
  11. package/es/application/utils/globalDeps.d.ts +1 -1
  12. package/es/application/utils/globalDeps.mjs +4 -12
  13. package/es/application/utils/remotePlugins.d.ts +1 -1
  14. package/es/block-provider/FormFieldProvider.mjs +1 -1
  15. package/es/block-provider/hooks/index.mjs +2 -2
  16. package/es/block-provider/hooks/useParsedFilter.mjs +1 -1
  17. package/es/built-in/acl/Configuration/RolesResourcesActions.mjs +1 -1
  18. package/es/built-in/context-menu/ContextMenuItemsProps.mjs +1 -1
  19. package/es/built-in/index.d.ts +2 -1
  20. package/es/built-in/index.mjs +4 -3
  21. package/es/built-in/page-style/useTabSettings.mjs +3 -3
  22. package/es/built-in/pm/PluginManager.mjs +1 -1
  23. package/es/built-in/quick-access/ModalActionSchemaInitializerItem.mjs +1 -1
  24. package/es/collection-manager/Configuration/AddCollectionAction.mjs +1 -1
  25. package/es/collection-manager/Configuration/AddFieldAction.mjs +1 -1
  26. package/es/collection-manager/Configuration/AddSubFieldAction.mjs +1 -1
  27. package/es/collection-manager/Configuration/EditCollectionAction.mjs +1 -1
  28. package/es/collection-manager/Configuration/EditFieldAction.mjs +1 -1
  29. package/es/collection-manager/Configuration/EditSubFieldAction.mjs +1 -1
  30. package/es/collection-manager/Configuration/ImportXlsx/xlsxImportAction.mjs +1 -1
  31. package/es/collection-manager/Configuration/OverridingCollectionField.mjs +1 -1
  32. package/es/collection-manager/Configuration/SyncFieldsAction.mjs +1 -1
  33. package/es/collection-manager/Configuration/SyncSQLFieldsAction.mjs +1 -1
  34. package/es/collection-manager/Configuration/ViewInheritedField.mjs +1 -1
  35. package/es/collection-manager/collectionPlugin.mjs +36 -0
  36. package/es/collection-manager/hooks/useCollection_deprecated.d.ts +1 -1
  37. package/es/collection-manager/interfaces/json.mjs +1 -1
  38. package/es/collection-manager/interfaces/radioGroup.d.ts +11 -11
  39. package/es/collection-manager/interfaces/url.d.ts +4 -0
  40. package/es/collection-manager/interfaces/url.mjs +10 -1
  41. package/es/collection-manager/templates/expression.mjs +1 -1
  42. package/es/collection-manager/templates/properties/index.d.ts +1 -1
  43. package/es/collection-manager/templates/sql.d.ts +3 -3
  44. package/es/collection-manager/templates/view.d.ts +3 -3
  45. package/es/data-source/collection-field-interface/CollectionFieldInterface.mjs +1 -15
  46. package/es/data-source/data-block/DataBlockResourceProvider.d.ts +1 -1
  47. package/es/filter-provider/utils.mjs +1 -1
  48. package/es/modules/actions/link/customizeLinkActionSettings.mjs +1 -1
  49. package/es/modules/blocks/data-blocks/details-multi/detailsWithPaginationSettings.mjs +1 -1
  50. package/es/modules/blocks/data-blocks/form/FormBlockInitializer.d.ts +11 -11
  51. package/es/modules/blocks/data-blocks/form/fieldSettingsFormItem.mjs +2 -5
  52. package/es/modules/blocks/data-blocks/grid-card/gridCardBlockSettings.mjs +1 -1
  53. package/es/modules/blocks/data-blocks/list/listBlockSettings.mjs +1 -1
  54. package/es/modules/blocks/data-blocks/table/hooks/useTableBlockProps.mjs +14 -2
  55. package/es/modules/blocks/data-blocks/table/tableBlockSettings.mjs +1 -1
  56. package/es/modules/blocks/data-blocks/table/tableColumnSettings.mjs +1 -3
  57. package/es/modules/blocks/data-blocks/table-selector/tableSelectorBlockSettings.mjs +1 -1
  58. package/es/modules/blocks/filter-blocks/collapse/filterCollapseItemFieldSettings.mjs +0 -4
  59. package/es/modules/blocks/filter-blocks/form/filterFormItemFieldSettings.mjs +1 -5
  60. package/es/modules/blocks/filter-blocks/tree/filterTreeItemFieldSettings.mjs +1 -1
  61. package/es/modules/fields/component/Cascader/cascaderComponentFieldSettings.mjs +1 -1
  62. package/es/modules/fields/component/CustomTitle/customTitleComponentFieldSettings.mjs +95 -5
  63. package/es/modules/fields/component/InputPreview/inputPreviewComponentFieldSettings.d.ts +2 -0
  64. package/es/modules/fields/component/InputPreview/inputPreviewComponentFieldSettings.mjs +99 -0
  65. package/es/modules/fields/component/MultipleSelect/multipleSelectComponentFieldSettings.d.ts +2 -0
  66. package/es/modules/fields/component/MultipleSelect/multipleSelectComponentFieldSettings.mjs +64 -0
  67. package/es/modules/fields/component/Radio/radioComponentFieldSettings.mjs +15 -2
  68. package/es/modules/fields/component/Select/selectComponentFieldSettings.mjs +26 -7
  69. package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.d.ts +1 -1
  70. package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.mjs +1 -1
  71. package/es/modules/menu/GroupItem.mjs +1 -1
  72. package/es/modules/menu/LinkMenuItem.mjs +1 -1
  73. package/es/modules/menu/PageMenuItem.mjs +1 -1
  74. package/es/modules/menu/UploadMenuItem.mjs +1 -1
  75. package/es/schema-component/antd/action/Action.Designer.mjs +1 -1
  76. package/es/schema-component/antd/action/Action.mjs +1 -1
  77. package/es/schema-component/antd/association-field/InternalCascadeSelect.mjs +1 -1
  78. package/es/schema-component/antd/association-field/InternalCascader.mjs +1 -2
  79. package/es/schema-component/antd/association-field/InternalNester.mjs +1 -1
  80. package/es/schema-component/antd/association-field/InternalSubTable.mjs +1 -1
  81. package/es/schema-component/antd/association-field/InternalViewer.mjs +4 -58
  82. package/es/schema-component/antd/association-field/SubTabs/InternalCollapse.mjs +1 -1
  83. package/es/schema-component/antd/association-field/SubTabs/hook.mjs +1 -1
  84. package/es/schema-component/antd/association-field/hooks.d.ts +4 -0
  85. package/es/schema-component/antd/association-field/hooks.mjs +53 -2
  86. package/es/schema-component/antd/association-field/util.mjs +1 -1
  87. package/es/schema-component/antd/association-select/AssociationSelect.mjs +2 -2
  88. package/es/schema-component/antd/auto-complete/AutoComplete.mjs +1 -1
  89. package/es/schema-component/antd/color-picker/ColorPicker.mjs +1 -1
  90. package/es/schema-component/antd/color-picker/util.d.ts +1 -1
  91. package/es/schema-component/antd/color-picker/util.mjs +1 -1
  92. package/es/schema-component/antd/cron/Cron.mjs +1 -1
  93. package/es/schema-component/antd/date-picker/ReadPretty.mjs +1 -1
  94. package/es/schema-component/antd/date-picker/util.d.ts +1 -1
  95. package/es/schema-component/antd/date-picker/util.mjs +1 -1
  96. package/es/schema-component/antd/filter/FilterAction.mjs +1 -1
  97. package/es/schema-component/antd/form/Form.mjs +1 -1
  98. package/es/schema-component/antd/form-item/FormItem.Settings.mjs +1 -1
  99. package/es/schema-component/antd/form-item/FormItem.mjs +1 -1
  100. package/es/schema-component/antd/form-item/SchemaSettingOptions.mjs +1 -1
  101. package/es/schema-component/antd/form-item/hooks/useLazyLoadDisplayAssociationFieldsOfForm.mjs +1 -1
  102. package/es/schema-component/antd/form-item/hooks/useParseDefaultValue.mjs +1 -1
  103. package/es/schema-component/antd/form-v2/Form.Settings.mjs +1 -1
  104. package/es/schema-component/antd/form-v2/Form.mjs +1 -2
  105. package/es/schema-component/antd/form-v2/Templates.mjs +1 -1
  106. package/es/schema-component/antd/form-v2/utils.mjs +1 -2
  107. package/es/schema-component/antd/grid-card/GridCard.Decorator.mjs +1 -1
  108. package/es/schema-component/antd/grid-card/GridCard.Designer.mjs +1 -1
  109. package/es/schema-component/antd/icon-picker/IconPicker.mjs +1 -1
  110. package/es/schema-component/antd/index.d.ts +0 -1
  111. package/es/schema-component/antd/index.mjs +1 -2
  112. package/es/schema-component/antd/input/Input.mjs +2 -1
  113. package/es/schema-component/antd/input/ReadPretty.d.ts +1 -0
  114. package/es/schema-component/antd/input/ReadPretty.mjs +30 -2
  115. package/es/schema-component/antd/input-number/ReadPretty.mjs +1 -1
  116. package/es/schema-component/antd/list/List.Decorator.mjs +1 -1
  117. package/es/schema-component/antd/list/List.Designer.mjs +1 -1
  118. package/es/schema-component/antd/menu/Menu.Designer.mjs +1 -1
  119. package/es/schema-component/antd/menu/Menu.mjs +1 -1
  120. package/es/schema-component/antd/page/Page.Settings.mjs +0 -33
  121. package/es/schema-component/antd/page/Page.mjs +47 -96
  122. package/es/schema-component/antd/page/hooks/index.d.ts +1 -1
  123. package/es/schema-component/antd/page/hooks/index.mjs +1 -1
  124. package/es/schema-component/antd/page/index.d.ts +1 -0
  125. package/es/schema-component/antd/page/index.mjs +1 -0
  126. package/es/schema-component/antd/page/pageExtendComponentProvider.d.ts +3 -0
  127. package/es/schema-component/antd/page/pageExtendComponentProvider.mjs +9 -0
  128. package/es/schema-component/antd/page/style.d.ts +0 -5
  129. package/es/schema-component/antd/page/style.mjs +1 -45
  130. package/es/schema-component/antd/preview/Preview.mjs +1 -1
  131. package/es/schema-component/antd/quick-edit/QuickEdit.mjs +1 -1
  132. package/es/schema-component/antd/record-picker/util.mjs +1 -1
  133. package/es/schema-component/antd/select/FormulaSelect.mjs +17 -5
  134. package/es/schema-component/antd/select/ReadPretty.mjs +16 -3
  135. package/es/schema-component/antd/select/Select.mjs +7 -2
  136. package/es/schema-component/antd/select/utils.mjs +2 -2
  137. package/es/schema-component/antd/space/index.mjs +1 -1
  138. package/es/schema-component/antd/table/Table.Void.Designer.mjs +1 -1
  139. package/es/schema-component/antd/table-v2/Table.mjs +1 -1
  140. package/es/schema-component/antd/table-v2/TableBlockDesigner.mjs +1 -1
  141. package/es/schema-component/antd/table-v2/TableSelectorDesigner.mjs +1 -1
  142. package/es/schema-component/antd/time-picker/ReadPretty.mjs +1 -1
  143. package/es/schema-component/antd/time-picker/TimePicker.mjs +1 -1
  144. package/es/schema-component/antd/tree-select/ReadPretty.mjs +1 -1
  145. package/es/schema-component/antd/upload/ReadPretty.mjs +1 -2
  146. package/es/schema-component/antd/upload/Upload.mjs +1 -1
  147. package/es/schema-component/antd/variable/CodeMirror.mjs +1 -1
  148. package/es/schema-component/antd/variable/Input.mjs +1 -1
  149. package/es/schema-component/antd/variable/TextArea.mjs +1 -1
  150. package/es/schema-component/common/infinite-scroll/infinite-scroll.mjs +1 -1
  151. package/es/schema-component/hooks/useFieldModeOptions.mjs +13 -10
  152. package/es/schema-initializer/items/CustomFilterFormItemInitializer.mjs +2 -2
  153. package/es/schema-settings/DataTemplates/components/AsDefaultTemplate.mjs +1 -1
  154. package/es/schema-settings/DataTemplates/components/DataTemplateTitle.mjs +1 -1
  155. package/es/schema-settings/DataTemplates/components/Designer.mjs +1 -1
  156. package/es/schema-settings/DataTemplates/utils.mjs +1 -1
  157. package/es/schema-settings/EditFormulaTitleField.mjs +19 -1
  158. package/es/schema-settings/LinkageRules/LinkageRuleAction.mjs +1 -1
  159. package/es/schema-settings/LinkageRules/components/EnableLinkage.mjs +1 -1
  160. package/es/schema-settings/LinkageRules/components/LinkageHeader.mjs +1 -1
  161. package/es/schema-settings/SchemaSettings.mjs +2 -3
  162. package/es/schema-settings/SchemaSettingsDefaultValue.mjs +1 -1
  163. package/es/schema-settings/SchemaSettingsPlugin.mjs +4 -0
  164. package/es/schema-settings/SchemaSettingsSortingRule.mjs +1 -1
  165. package/es/schema-settings/VariableInput/hooks/useContextAssociationFields.mjs +1 -1
  166. package/es/schema-settings/filter-form/FormFilterScope.mjs +1 -1
  167. package/es/schema-settings/hooks/useParseDataScopeFilter.mjs +1 -1
  168. package/es/user/ChangePassword.mjs +2 -2
  169. package/es/user/CurrentUser.mjs +1 -1
  170. package/es/user/CurrentUserSettingsMenuProvider.mjs +1 -1
  171. package/es/variables/VariablesProvider.mjs +2 -2
  172. package/es/variables/hooks/useBuiltinVariables.mjs +1 -1
  173. package/lib/api-client/APIClient.js +2 -2
  174. package/lib/api-client/hooks/assign.js +1 -1
  175. package/lib/application/Application.js +6 -15
  176. package/lib/application/WebSocketClient.js +2 -2
  177. package/lib/application/components/index.js +0 -18
  178. package/lib/application/utils/globalDeps.js +3 -11
  179. package/lib/block-provider/FormFieldProvider.js +1 -1
  180. package/lib/block-provider/hooks/index.js +14 -14
  181. package/lib/block-provider/hooks/useParsedFilter.js +1 -1
  182. package/lib/built-in/acl/Configuration/RolesResourcesActions.js +4 -4
  183. package/lib/built-in/context-menu/ContextMenuItemsProps.js +1 -1
  184. package/lib/built-in/index.js +42 -16
  185. package/lib/built-in/page-style/useTabSettings.js +3 -3
  186. package/lib/built-in/pm/PluginManager.js +1 -1
  187. package/lib/built-in/quick-access/ModalActionSchemaInitializerItem.js +1 -1
  188. package/lib/collection-manager/Configuration/AddCollectionAction.js +2 -2
  189. package/lib/collection-manager/Configuration/AddFieldAction.js +2 -2
  190. package/lib/collection-manager/Configuration/AddSubFieldAction.js +2 -2
  191. package/lib/collection-manager/Configuration/EditCollectionAction.js +2 -2
  192. package/lib/collection-manager/Configuration/EditFieldAction.js +2 -2
  193. package/lib/collection-manager/Configuration/EditSubFieldAction.js +2 -2
  194. package/lib/collection-manager/Configuration/ImportXlsx/xlsxImportAction.js +2 -2
  195. package/lib/collection-manager/Configuration/OverridingCollectionField.js +2 -2
  196. package/lib/collection-manager/Configuration/SyncFieldsAction.js +2 -2
  197. package/lib/collection-manager/Configuration/SyncSQLFieldsAction.js +2 -2
  198. package/lib/collection-manager/Configuration/ViewInheritedField.js +2 -2
  199. package/lib/collection-manager/collectionPlugin.js +36 -0
  200. package/lib/collection-manager/interfaces/json.js +3 -3
  201. package/lib/collection-manager/interfaces/url.js +10 -1
  202. package/lib/collection-manager/templates/expression.js +1 -1
  203. package/lib/data-source/collection-field-interface/CollectionFieldInterface.js +1 -15
  204. package/lib/filter-provider/utils.js +1 -1
  205. package/lib/locale/zh-CN.js +1 -0
  206. package/lib/modules/actions/link/customizeLinkActionSettings.js +2 -2
  207. package/lib/modules/blocks/data-blocks/details-multi/detailsWithPaginationSettings.js +2 -2
  208. package/lib/modules/blocks/data-blocks/form/fieldSettingsFormItem.js +3 -6
  209. package/lib/modules/blocks/data-blocks/grid-card/gridCardBlockSettings.js +2 -2
  210. package/lib/modules/blocks/data-blocks/list/listBlockSettings.js +2 -2
  211. package/lib/modules/blocks/data-blocks/table/hooks/useTableBlockProps.js +14 -2
  212. package/lib/modules/blocks/data-blocks/table/tableBlockSettings.js +2 -2
  213. package/lib/modules/blocks/data-blocks/table/tableColumnSettings.js +1 -3
  214. package/lib/modules/blocks/data-blocks/table-selector/tableSelectorBlockSettings.js +2 -2
  215. package/lib/modules/blocks/filter-blocks/collapse/filterCollapseItemFieldSettings.js +0 -4
  216. package/lib/modules/blocks/filter-blocks/form/filterFormItemFieldSettings.js +3 -7
  217. package/lib/modules/blocks/filter-blocks/tree/filterTreeItemFieldSettings.js +3 -3
  218. package/lib/modules/fields/component/Cascader/cascaderComponentFieldSettings.js +2 -2
  219. package/lib/modules/fields/component/CustomTitle/customTitleComponentFieldSettings.js +93 -3
  220. package/lib/modules/fields/component/InputPreview/inputPreviewComponentFieldSettings.js +133 -0
  221. package/lib/modules/fields/component/MultipleSelect/multipleSelectComponentFieldSettings.js +98 -0
  222. package/lib/modules/fields/component/Radio/radioComponentFieldSettings.js +16 -3
  223. package/lib/modules/fields/component/Select/selectComponentFieldSettings.js +23 -4
  224. package/lib/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.js +3 -3
  225. package/lib/modules/menu/GroupItem.js +2 -2
  226. package/lib/modules/menu/LinkMenuItem.js +2 -2
  227. package/lib/modules/menu/PageMenuItem.js +2 -2
  228. package/lib/modules/menu/UploadMenuItem.js +2 -2
  229. package/lib/schema-component/antd/action/Action.Designer.js +3 -3
  230. package/lib/schema-component/antd/action/Action.js +1 -1
  231. package/lib/schema-component/antd/association-field/InternalCascadeSelect.js +4 -4
  232. package/lib/schema-component/antd/association-field/InternalCascader.js +4 -5
  233. package/lib/schema-component/antd/association-field/InternalNester.js +2 -2
  234. package/lib/schema-component/antd/association-field/InternalSubTable.js +2 -2
  235. package/lib/schema-component/antd/association-field/InternalViewer.js +1 -55
  236. package/lib/schema-component/antd/association-field/SubTabs/InternalCollapse.js +1 -1
  237. package/lib/schema-component/antd/association-field/SubTabs/hook.js +1 -1
  238. package/lib/schema-component/antd/association-field/hooks.js +55 -1
  239. package/lib/schema-component/antd/association-field/util.js +1 -1
  240. package/lib/schema-component/antd/association-select/AssociationSelect.js +12 -12
  241. package/lib/schema-component/antd/auto-complete/AutoComplete.js +1 -1
  242. package/lib/schema-component/antd/color-picker/ColorPicker.js +2 -2
  243. package/lib/schema-component/antd/color-picker/util.js +1 -1
  244. package/lib/schema-component/antd/cron/Cron.js +1 -1
  245. package/lib/schema-component/antd/date-picker/ReadPretty.js +1 -1
  246. package/lib/schema-component/antd/date-picker/util.js +1 -1
  247. package/lib/schema-component/antd/filter/FilterAction.js +1 -1
  248. package/lib/schema-component/antd/form/Form.js +3 -3
  249. package/lib/schema-component/antd/form-item/FormItem.Settings.js +3 -3
  250. package/lib/schema-component/antd/form-item/FormItem.js +2 -2
  251. package/lib/schema-component/antd/form-item/SchemaSettingOptions.js +5 -5
  252. package/lib/schema-component/antd/form-item/hooks/useLazyLoadDisplayAssociationFieldsOfForm.js +1 -1
  253. package/lib/schema-component/antd/form-item/hooks/useParseDefaultValue.js +1 -1
  254. package/lib/schema-component/antd/form-v2/Form.Settings.js +2 -2
  255. package/lib/schema-component/antd/form-v2/Form.js +3 -4
  256. package/lib/schema-component/antd/form-v2/Templates.js +1 -1
  257. package/lib/schema-component/antd/form-v2/utils.js +2 -3
  258. package/lib/schema-component/antd/grid-card/GridCard.Decorator.js +2 -2
  259. package/lib/schema-component/antd/grid-card/GridCard.Designer.js +2 -2
  260. package/lib/schema-component/antd/icon-picker/IconPicker.js +2 -2
  261. package/lib/schema-component/antd/index.js +120 -187
  262. package/lib/schema-component/antd/input/Input.js +2 -1
  263. package/lib/schema-component/antd/input/ReadPretty.js +34 -6
  264. package/lib/schema-component/antd/input-number/ReadPretty.js +1 -1
  265. package/lib/schema-component/antd/list/List.Decorator.js +2 -2
  266. package/lib/schema-component/antd/list/List.Designer.js +2 -2
  267. package/lib/schema-component/antd/menu/Menu.Designer.js +2 -2
  268. package/lib/schema-component/antd/menu/Menu.js +1 -1
  269. package/lib/schema-component/antd/page/Page.Settings.js +0 -33
  270. package/lib/schema-component/antd/page/Page.js +43 -92
  271. package/lib/schema-component/antd/page/hooks/index.js +5 -5
  272. package/lib/schema-component/antd/page/index.js +9 -0
  273. package/lib/{application/components/ShareSchemaComponent.js → schema-component/antd/page/pageExtendComponentProvider.js} +15 -10
  274. package/lib/schema-component/antd/page/style.js +2 -49
  275. package/lib/schema-component/antd/preview/Preview.js +2 -2
  276. package/lib/schema-component/antd/quick-edit/QuickEdit.js +3 -3
  277. package/lib/schema-component/antd/record-picker/util.js +1 -1
  278. package/lib/schema-component/antd/select/FormulaSelect.js +17 -5
  279. package/lib/schema-component/antd/select/ReadPretty.js +15 -2
  280. package/lib/schema-component/antd/select/Select.js +7 -2
  281. package/lib/schema-component/antd/select/utils.js +2 -2
  282. package/lib/schema-component/antd/space/index.js +2 -2
  283. package/lib/schema-component/antd/table/Table.Void.Designer.js +2 -2
  284. package/lib/schema-component/antd/table-v2/Table.js +1 -1
  285. package/lib/schema-component/antd/table-v2/TableBlockDesigner.js +2 -2
  286. package/lib/schema-component/antd/table-v2/TableSelectorDesigner.js +2 -2
  287. package/lib/schema-component/antd/time-picker/ReadPretty.js +2 -2
  288. package/lib/schema-component/antd/time-picker/TimePicker.js +3 -3
  289. package/lib/schema-component/antd/tree-select/ReadPretty.js +2 -2
  290. package/lib/schema-component/antd/upload/ReadPretty.js +2 -3
  291. package/lib/schema-component/antd/upload/Upload.js +2 -2
  292. package/lib/schema-component/antd/variable/CodeMirror.js +2 -2
  293. package/lib/schema-component/antd/variable/Input.js +1 -1
  294. package/lib/schema-component/antd/variable/TextArea.js +1 -1
  295. package/lib/schema-component/common/infinite-scroll/infinite-scroll.js +1 -1
  296. package/lib/schema-component/hooks/useFieldModeOptions.js +13 -10
  297. package/lib/schema-initializer/items/CustomFilterFormItemInitializer.js +4 -4
  298. package/lib/schema-settings/DataTemplates/components/AsDefaultTemplate.js +3 -3
  299. package/lib/schema-settings/DataTemplates/components/DataTemplateTitle.js +10 -10
  300. package/lib/schema-settings/DataTemplates/components/Designer.js +1 -1
  301. package/lib/schema-settings/DataTemplates/utils.js +4 -4
  302. package/lib/schema-settings/EditFormulaTitleField.js +19 -1
  303. package/lib/schema-settings/LinkageRules/LinkageRuleAction.js +2 -2
  304. package/lib/schema-settings/LinkageRules/components/EnableLinkage.js +3 -3
  305. package/lib/schema-settings/LinkageRules/components/LinkageHeader.js +10 -10
  306. package/lib/schema-settings/SchemaSettings.js +17 -18
  307. package/lib/schema-settings/SchemaSettingsDefaultValue.js +3 -3
  308. package/lib/schema-settings/SchemaSettingsPlugin.js +4 -0
  309. package/lib/schema-settings/SchemaSettingsSortingRule.js +2 -2
  310. package/lib/schema-settings/VariableInput/hooks/useContextAssociationFields.js +1 -1
  311. package/lib/schema-settings/filter-form/FormFilterScope.js +2 -2
  312. package/lib/schema-settings/hooks/useParseDataScopeFilter.js +1 -1
  313. package/lib/user/ChangePassword.js +2 -2
  314. package/lib/user/CurrentUser.js +1 -1
  315. package/lib/user/CurrentUserSettingsMenuProvider.js +1 -1
  316. package/lib/variables/VariablesProvider.js +2 -2
  317. package/lib/variables/hooks/useBuiltinVariables.js +1 -1
  318. package/package.json +9 -23
  319. package/es/application/components/SharePage.d.ts +0 -4
  320. package/es/application/components/SharePage.mjs +0 -113
  321. package/es/application/components/ShareSchemaComponent.d.ts +0 -1
  322. package/es/application/components/ShareSchemaComponent.mjs +0 -10
  323. package/es/schema-component/antd/page/hooks/useShareActions.d.ts +0 -7
  324. package/es/schema-component/antd/page/hooks/useShareActions.mjs +0 -242
  325. package/lib/application/components/SharePage.js +0 -156
  326. package/lib/schema-component/antd/page/hooks/useShareActions.js +0 -286
@@ -9,9 +9,6 @@ export declare class ViewCollectionTemplate extends CollectionTemplate {
9
9
  };
10
10
  divider: boolean;
11
11
  configurableProperties: {
12
- name: any;
13
- title: any;
14
- description: any;
15
12
  autoGenId: any;
16
13
  createdBy: any;
17
14
  updatedBy: any;
@@ -19,6 +16,9 @@ export declare class ViewCollectionTemplate extends CollectionTemplate {
19
16
  updatedAt: any;
20
17
  sortable: any;
21
18
  inherits: any;
19
+ title: any;
20
+ name: any;
21
+ description: any;
22
22
  category: any;
23
23
  presetFields: any;
24
24
  databaseView: {
@@ -10,21 +10,7 @@ function _define_property(obj, key, value) {
10
10
  }
11
11
  class CollectionFieldInterface {
12
12
  addComponentOption(componentOption) {
13
- if (!this.componentOptions) {
14
- var _this_default_uiSchema, _this_default, _this_default_uiSchema1, _this_default1;
15
- this.componentOptions = [];
16
- const xComponent = null == (_this_default = this.default) ? void 0 : null == (_this_default_uiSchema = _this_default.uiSchema) ? void 0 : _this_default_uiSchema['x-component'];
17
- const componentProps = null == (_this_default1 = this.default) ? void 0 : null == (_this_default_uiSchema1 = _this_default1.uiSchema) ? void 0 : _this_default_uiSchema1['x-component-props'];
18
- if (xComponent) this.componentOptions = [
19
- {
20
- label: xComponent.split('.').pop(),
21
- value: xComponent,
22
- useProps () {
23
- return componentProps || {};
24
- }
25
- }
26
- ];
27
- }
13
+ if (!this.componentOptions) this.componentOptions = [];
28
14
  this.componentOptions.push(componentOption);
29
15
  }
30
16
  constructor(collectionFieldInterfaceManager){
@@ -1,5 +1,5 @@
1
1
  import React, { ReactNode } from 'react';
2
- import { IResource } from '@tachybase/sdk';
2
+ import { IResource } from '@tego/client';
3
3
  export declare const DataBlockResourceContext: React.Context<IResource>;
4
4
  export declare const DataBlockResourceProvider: ({ children }: {
5
5
  children?: ReactNode;
@@ -1,6 +1,6 @@
1
1
  import { useCallback, useEffect, useState } from "react";
2
2
  import { useFieldSchema } from "@tachybase/schema";
3
- import { dayjs, flatten, getValuesByPath } from "@tachybase/utils/client";
3
+ import { dayjs, flatten, getValuesByPath } from "@tego/client";
4
4
  import lodash from "lodash";
5
5
  import { findFilterTargets } from "../block-provider/hooks/index.mjs";
6
6
  import { useCollectionManager_deprecated, useCollection_deprecated } from "../collection-manager/index.mjs";
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import "react";
3
- import { ArrayItems } from "@tachybase/components";
4
3
  import { useField, useFieldSchema } from "@tachybase/schema";
4
+ import { ArrayItems } from "@tego/client";
5
5
  import lodash from "lodash";
6
6
  import { useTranslation } from "react-i18next";
7
7
  import { useCollectionRecord, useDesignable } from "../../../index.mjs";
@@ -1,5 +1,5 @@
1
- import { ArrayItems } from "@tachybase/components";
2
1
  import { useField, useFieldSchema } from "@tachybase/schema";
2
+ import { ArrayItems } from "@tego/client";
3
3
  import { useTranslation } from "react-i18next";
4
4
  import { SchemaSettings } from "../../../../application/schema-settings/SchemaSettings.mjs";
5
5
  import { useFormBlockContext } from "../../../../block-provider/index.mjs";
@@ -32,19 +32,19 @@ export declare const useCreateFormBlock: () => {
32
32
  }) => void;
33
33
  templateWrap: (templateSchema: any, { item }: {
34
34
  item: any;
35
- }) => import("packages/schema/lib").Stringify<{
35
+ }) => import("@tachybase/schema").Stringify<{
36
36
  [key: symbol]: any;
37
37
  [key: `x-${string}`]: any;
38
38
  [key: `x-${number}`]: any;
39
39
  version?: string;
40
- name?: import("packages/schema/lib").SchemaKey;
40
+ name?: import("@tachybase/schema").SchemaKey;
41
41
  title?: any;
42
42
  description?: any;
43
43
  default?: any;
44
44
  readOnly?: boolean;
45
45
  writeOnly?: boolean;
46
- type?: import("packages/schema/lib").SchemaTypes;
47
- enum?: import("packages/schema/lib").SchemaEnum<any>;
46
+ type?: import("@tachybase/schema").SchemaTypes;
47
+ enum?: import("@tachybase/schema").SchemaEnum<any>;
48
48
  const?: any;
49
49
  multipleOf?: number;
50
50
  maximum?: number;
@@ -63,12 +63,12 @@ export declare const useCreateFormBlock: () => {
63
63
  format?: string;
64
64
  $ref?: string;
65
65
  $namespace?: string;
66
- definitions?: import("packages/schema/lib").SchemaProperties<any, any, any, any, any, any, any, any>;
67
- properties?: import("packages/schema/lib").SchemaProperties<any, any, any, any, any, any, any, any>;
68
- items?: import("packages/schema/lib").SchemaItems<any, any, any, any, any, any, any, any>;
69
- additionalItems?: import("packages/schema/lib").Stringify</*elided*/ any>;
70
- patternProperties?: import("packages/schema/lib").SchemaProperties<any, any, any, any, any, any, any, any>;
71
- additionalProperties?: import("packages/schema/lib").Stringify</*elided*/ any>;
66
+ definitions?: import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
67
+ properties?: import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
68
+ items?: import("@tachybase/schema").SchemaItems<any, any, any, any, any, any, any, any>;
69
+ additionalItems?: import("@tachybase/schema").Stringify</*elided*/ any>;
70
+ patternProperties?: import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
71
+ additionalProperties?: import("@tachybase/schema").Stringify</*elided*/ any>;
72
72
  "x-value"?: any;
73
73
  "x-index"?: number;
74
74
  "x-pattern"?: any;
@@ -78,7 +78,7 @@ export declare const useCreateFormBlock: () => {
78
78
  "x-decorator-props"?: any;
79
79
  "x-component"?: any;
80
80
  "x-component-props"?: any;
81
- "x-reactions"?: import("packages/schema/lib").SchemaReactions<any>;
81
+ "x-reactions"?: import("@tachybase/schema").SchemaReactions<any>;
82
82
  "x-content"?: any;
83
83
  "x-data"?: any;
84
84
  "x-visible"?: boolean;
@@ -1,5 +1,5 @@
1
- import { ArrayCollapse, FormLayout } from "@tachybase/components";
2
1
  import { useField, useFieldSchema } from "@tachybase/schema";
2
+ import { ArrayCollapse, FormLayout } from "@tego/client";
3
3
  import lodash from "lodash";
4
4
  import { useTranslation } from "react-i18next";
5
5
  import { useApp, useSchemaToolbar } from "../../../../application/index.mjs";
@@ -7,7 +7,7 @@ import { SchemaSettings } from "../../../../application/schema-settings/SchemaSe
7
7
  import { useFormBlockContext } from "../../../../block-provider/index.mjs";
8
8
  import { useCollectionManager_deprecated, useCollection_deprecated } from "../../../../collection-manager/index.mjs";
9
9
  import { useFieldComponentName } from "../../../../common/useFieldComponentName.mjs";
10
- import { fieldComponentSettingsItem, useContextConfigSetting } from "../../../../data-source/index.mjs";
10
+ import { useContextConfigSetting } from "../../../../data-source/index.mjs";
11
11
  import { useDesignable, useValidateSchema } from "../../../../schema-component/index.mjs";
12
12
  import { useIsFormReadPretty } from "../../../../schema-component/antd/form-item/FormItem.Settings.mjs";
13
13
  import { getTempFieldState } from "../../../../schema-component/antd/form-v2/utils.mjs";
@@ -472,9 +472,6 @@ const fieldSettingsFormItem = new SchemaSettings({
472
472
  const validateSchema = useValidateSchema();
473
473
  return form && !isFormReadPretty && validateSchema;
474
474
  }
475
- },
476
- {
477
- ...fieldComponentSettingsItem
478
475
  }
479
476
  ];
480
477
  }
@@ -1,6 +1,6 @@
1
1
  import { useMemo } from "react";
2
- import { ArrayItems } from "@tachybase/components";
3
2
  import { useField, useFieldSchema } from "@tachybase/schema";
3
+ import { ArrayItems } from "@tego/client";
4
4
  import lodash from "lodash";
5
5
  import { useTranslation } from "react-i18next";
6
6
  import { SchemaSettings } from "../../../../application/schema-settings/SchemaSettings.mjs";
@@ -1,5 +1,5 @@
1
- import { ArrayItems } from "@tachybase/components";
2
1
  import { useField, useFieldSchema } from "@tachybase/schema";
2
+ import { ArrayItems } from "@tego/client";
3
3
  import lodash from "lodash";
4
4
  import { useTranslation } from "react-i18next";
5
5
  import { SchemaSettings } from "../../../../application/schema-settings/SchemaSettings.mjs";
@@ -118,14 +118,26 @@ const useTableBlockProps = ()=>{
118
118
  let [key, value] = param;
119
119
  if (key.includes(ctx.rowKey) && selectedRow.includes(value)) delete items[key];
120
120
  });
121
- const mergedFilter = mergeFilter([
121
+ const mergeList = [
122
122
  ...Object.values(storedFilter).map((filter)=>removeNullCondition(filter)),
123
123
  flat.unflatten(items),
124
124
  block.defaultFilter,
125
125
  prevMergedFilter
126
- ]);
126
+ ];
127
+ const mergedFilter = mergeFilter(mergeList);
127
128
  const currFilter = filterByCleanedFields(mergedFilter);
128
129
  prevMergedFilter = currFilter;
130
+ dataBlocks.forEach((item)=>{
131
+ const targetsUidList = targets.map((targetItem)=>targetItem.uid);
132
+ if (targetsUidList.includes(item.uid) && !item.associatedFields.find((assItem)=>assItem.name === target.field || target.field.includes(assItem.name))) {
133
+ const prevFlatItems = flat(prevMergedFilter);
134
+ Object.entries(prevFlatItems).forEach((param)=>{
135
+ let [key, prevItem] = param;
136
+ if (key.split('.').includes(target.field)) delete prevFlatItems[key];
137
+ });
138
+ prevMergedFilter = flat.unflatten(prevFlatItems);
139
+ }
140
+ });
129
141
  return block.doFilter({
130
142
  ...param,
131
143
  page: 1,
@@ -1,6 +1,6 @@
1
1
  import { useCallback } from "react";
2
- import { ArrayItems } from "@tachybase/components";
3
2
  import { useField, useFieldSchema } from "@tachybase/schema";
3
+ import { ArrayItems } from "@tego/client";
4
4
  import { useTranslation } from "react-i18next";
5
5
  import { useAPIClient } from "../../../../api-client/index.mjs";
6
6
  import { SchemaSettings } from "../../../../application/schema-settings/SchemaSettings.mjs";
@@ -4,7 +4,6 @@ import { useApp } from "../../../../application/index.mjs";
4
4
  import { SchemaSettings } from "../../../../application/schema-settings/SchemaSettings.mjs";
5
5
  import { useCollectionManager_deprecated } from "../../../../collection-manager/index.mjs";
6
6
  import { useCollection } from "../../../../data-source/collection/CollectionProvider.mjs";
7
- import { fieldComponentSettingsItem } from "../../../../data-source/commonsSettingsItem/fieldComponent.mjs";
8
7
  import { useDesignable } from "../../../../schema-component/index.mjs";
9
8
  import { useAssociationFieldContext } from "../../../../schema-component/antd/association-field/hooks.mjs";
10
9
  import { useColumnSchema } from "../../../../schema-component/antd/table-v2/Table.Column.Decorator.mjs";
@@ -330,8 +329,7 @@ const tableColumnSettings = new SchemaSettings({
330
329
  }
331
330
  };
332
331
  }
333
- },
334
- fieldComponentSettingsItem
332
+ }
335
333
  ]
336
334
  },
337
335
  {
@@ -1,6 +1,6 @@
1
1
  import { useCallback } from "react";
2
- import { ArrayItems } from "@tachybase/components";
3
2
  import { useField, useFieldSchema } from "@tachybase/schema";
3
+ import { ArrayItems } from "@tego/client";
4
4
  import { cloneDeep } from "lodash";
5
5
  import { useTranslation } from "react-i18next";
6
6
  import { SchemaSettings } from "../../../../application/schema-settings/SchemaSettings.mjs";
@@ -4,7 +4,6 @@ import { useTranslation } from "react-i18next";
4
4
  import { SchemaSettings } from "../../../../application/schema-settings/SchemaSettings.mjs";
5
5
  import { useFormBlockContext } from "../../../../block-provider/index.mjs";
6
6
  import { useCollectionManager_deprecated, useCollection_deprecated } from "../../../../collection-manager/index.mjs";
7
- import { fieldComponentSettingsItem } from "../../../../data-source/index.mjs";
8
7
  import { useCompile, useDesignable } from "../../../../schema-component/index.mjs";
9
8
  import { SchemaSettingsDefaultSortingRules } from "../../../../schema-settings/index.mjs";
10
9
  import { SchemaSettingsDataScope } from "../../../../schema-settings/SchemaSettingsDataScope.mjs";
@@ -184,9 +183,6 @@ const filterCollapseItemFieldSettings = new SchemaSettings({
184
183
  onChange: onTitleFieldChange
185
184
  };
186
185
  }
187
- },
188
- {
189
- ...fieldComponentSettingsItem
190
186
  }
191
187
  ];
192
188
  }
@@ -1,12 +1,11 @@
1
- import { ArrayCollapse, FormLayout } from "@tachybase/components";
2
1
  import { useField, useFieldSchema } from "@tachybase/schema";
2
+ import { ArrayCollapse, FormLayout } from "@tego/client";
3
3
  import lodash from "lodash";
4
4
  import { useTranslation } from "react-i18next";
5
5
  import { useApp } from "../../../../application/index.mjs";
6
6
  import { SchemaSettings } from "../../../../application/schema-settings/SchemaSettings.mjs";
7
7
  import { useCollectionManager_deprecated, useCollection_deprecated } from "../../../../collection-manager/index.mjs";
8
8
  import { useFieldComponentName } from "../../../../common/useFieldComponentName.mjs";
9
- import { fieldComponentSettingsItem } from "../../../../data-source/index.mjs";
10
9
  import { EditOperator, useDesignable, useValidateSchema } from "../../../../schema-component/index.mjs";
11
10
  import { SchemaSettingsDefaultValue } from "../../../../schema-settings/index.mjs";
12
11
  const filterFormItemFieldSettings = new SchemaSettings({
@@ -311,9 +310,6 @@ const filterFormItemFieldSettings = new SchemaSettings({
311
310
  name: 'operator',
312
311
  Component: EditOperator
313
312
  },
314
- {
315
- ...fieldComponentSettingsItem
316
- },
317
313
  {
318
314
  name: 'editDefaultValue',
319
315
  Component: SchemaSettingsDefaultValue
@@ -1,5 +1,5 @@
1
- import { ArrayCollapse, FormLayout } from "@tachybase/components";
2
1
  import { useField, useFieldSchema } from "@tachybase/schema";
2
+ import { ArrayCollapse, FormLayout } from "@tego/client";
3
3
  import lodash from "lodash";
4
4
  import { useTranslation } from "react-i18next";
5
5
  import { useApp } from "../../../../application/index.mjs";
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import "react";
3
- import { ArrayItems } from "@tachybase/components";
4
3
  import { useField, useFieldSchema } from "@tachybase/schema";
4
+ import { ArrayItems } from "@tego/client";
5
5
  import lodash from "lodash";
6
6
  import { useTranslation } from "react-i18next";
7
7
  import { SchemaSettings } from "../../../../application/schema-settings/SchemaSettings.mjs";
@@ -1,18 +1,108 @@
1
+ import { useField, useFieldSchema } from "@tachybase/schema";
2
+ import { useTranslation } from "react-i18next";
1
3
  import { SchemaSettings } from "../../../../application/schema-settings/SchemaSettings.mjs";
2
- import { useIsAssociationField, useIsFieldReadPretty, useIsMuiltipleAble, useIsSelectFieldMode } from "../../../../schema-component/antd/form-item/FormItem.Settings.mjs";
4
+ import { useFieldComponentName } from "../../../../common/useFieldComponentName.mjs";
5
+ import { useCollectionField, useDataSourceManager } from "../../../../data-source/index.mjs";
6
+ import { useCompile, useDesignable, useFieldModeOptions, useIsAddNewForm } from "../../../../schema-component/index.mjs";
7
+ import { isSubMode } from "../../../../schema-component/antd/association-field/util.mjs";
8
+ import { useIsAssociationField, useIsFieldReadPretty, useIsSelectFieldMode } from "../../../../schema-component/antd/form-item/FormItem.Settings.mjs";
3
9
  import { useColumnSchema } from "../../../../schema-component/antd/table-v2/Table.Column.Decorator.mjs";
4
10
  import { useIsShowMultipleSwitch } from "../../../../schema-settings/hooks/useIsShowMultipleSwitch.mjs";
5
- import { CustomTitle, allowMultiple, enableLink, fieldComponent, quickCreate, setDefaultSortingRules, setTheDataScope } from "../Select/selectComponentFieldSettings.mjs";
11
+ import { CustomTitle, allowMultiple, enableLink, quickCreate, setDefaultSortingRules, setTheDataScope } from "../Select/selectComponentFieldSettings.mjs";
6
12
  const CustomTitleComponentFieldSettings = new SchemaSettings({
7
13
  name: 'fieldSettings:component:CustomTitle',
8
14
  items: [
9
15
  {
10
- ...fieldComponent,
11
- useVisible: useIsMuiltipleAble
16
+ name: 'fieldComponent',
17
+ type: 'select',
18
+ useComponentProps () {
19
+ var _collectionInterface_componentOptions_filter, _collectionInterface_componentOptions;
20
+ const { t } = useTranslation();
21
+ const field = useField();
22
+ const collectionFieldCurrent = useCollectionField();
23
+ const { fieldSchema: tableColumnSchema, collectionField } = useColumnSchema();
24
+ const schema = useFieldSchema();
25
+ const fieldSchema = tableColumnSchema || schema;
26
+ const fieldModeOptions = useFieldModeOptions({
27
+ fieldSchema: tableColumnSchema,
28
+ collectionField
29
+ });
30
+ const isAddNewForm = useIsAddNewForm();
31
+ const fieldMode = useFieldComponentName();
32
+ const { dn } = useDesignable();
33
+ const isSelect = [
34
+ 'select',
35
+ 'multipleSelect'
36
+ ].includes(null == collectionFieldCurrent ? void 0 : collectionFieldCurrent.interface);
37
+ const optionsMuiltipleSelect = [
38
+ {
39
+ label: t('Select'),
40
+ value: 'Select'
41
+ },
42
+ {
43
+ label: t('Radio group'),
44
+ value: 'Radio group'
45
+ },
46
+ {
47
+ label: t('Custom Title'),
48
+ value: 'CustomTitle'
49
+ }
50
+ ];
51
+ if ((null == collectionFieldCurrent ? void 0 : collectionFieldCurrent.interface) === 'multipleSelect') {
52
+ const index = optionsMuiltipleSelect.findIndex((item)=>{
53
+ if ('Select' === item.value) item.value = 'multiple';
54
+ return 'Radio group' === item.value;
55
+ });
56
+ optionsMuiltipleSelect.splice(index, 1);
57
+ }
58
+ const dm = useDataSourceManager();
59
+ const collectionInterface = dm.collectionFieldInterfaceManager.getFieldInterface(null == collectionField ? void 0 : collectionField.interface);
60
+ const compile = useCompile();
61
+ const componentOptions = isSelect ? optionsMuiltipleSelect : fieldModeOptions;
62
+ null == collectionInterface || null == (_collectionInterface_componentOptions = collectionInterface.componentOptions) || null == (_collectionInterface_componentOptions_filter = _collectionInterface_componentOptions.filter((item)=>!item.useVisible || item.useVisible())) || _collectionInterface_componentOptions_filter.forEach((item)=>{
63
+ if (!(null == componentOptions ? void 0 : componentOptions.find((modeItem)=>modeItem.value === item.value))) null == componentOptions || componentOptions.push({
64
+ label: compile(item.label),
65
+ value: item.value
66
+ });
67
+ });
68
+ return {
69
+ title: t('Field component'),
70
+ options: componentOptions,
71
+ value: fieldMode,
72
+ onChange (mode) {
73
+ const schema = {
74
+ ['x-uid']: fieldSchema['x-uid']
75
+ };
76
+ fieldSchema['x-component-props'] = fieldSchema['x-component-props'] || {};
77
+ fieldSchema['x-component-props']['mode'] = mode;
78
+ schema['x-component-props'] = fieldSchema['x-component-props'];
79
+ field.componentProps = field.componentProps || {};
80
+ field.componentProps.mode = mode;
81
+ if (isSubMode(fieldSchema) && isAddNewForm) {
82
+ var _field_setInitialValue, _field_setValue;
83
+ schema.default = null;
84
+ fieldSchema.default = null;
85
+ null == field || null == (_field_setInitialValue = field.setInitialValue) || _field_setInitialValue.call(field, null);
86
+ null == field || null == (_field_setValue = field.setValue) || _field_setValue.call(field, null);
87
+ }
88
+ dn.emit('patch', {
89
+ schema
90
+ });
91
+ dn.refresh();
92
+ }
93
+ };
94
+ },
95
+ useVisible () {
96
+ const fieldMode = useFieldComponentName();
97
+ return 'CustomTitle' === fieldMode;
98
+ }
12
99
  },
13
100
  {
14
101
  ...CustomTitle,
15
- useVisible: useIsMuiltipleAble
102
+ useVisible () {
103
+ const fieldMode = useFieldComponentName();
104
+ return 'CustomTitle' === fieldMode;
105
+ }
16
106
  },
17
107
  {
18
108
  ...setTheDataScope,
@@ -0,0 +1,2 @@
1
+ import { SchemaSettings } from '../../../../application/schema-settings/SchemaSettings';
2
+ export declare const inputPreviewComponentFieldSettings: SchemaSettings<{}>;
@@ -0,0 +1,99 @@
1
+ import { useField, useFieldSchema } from "@tachybase/schema";
2
+ import { useTranslation } from "react-i18next";
3
+ import { SchemaSettings } from "../../../../application/schema-settings/SchemaSettings.mjs";
4
+ import { useColumnSchema, useDesignable } from "../../../../schema-component/index.mjs";
5
+ const createSettingsItem = (config)=>({
6
+ name: config.name,
7
+ type: 'select',
8
+ useComponentProps () {
9
+ var _fieldSchema_xcomponentprops;
10
+ const { t } = useTranslation();
11
+ const field = useField();
12
+ const schema = useFieldSchema();
13
+ const { fieldSchema: tableColumnSchema } = useColumnSchema();
14
+ const fieldSchema = tableColumnSchema || schema;
15
+ const { dn } = useDesignable();
16
+ return {
17
+ title: t(config.title),
18
+ options: config.options(t),
19
+ value: (null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops[config.name]) || config.defaultValue,
20
+ onChange (value) {
21
+ const schema = {
22
+ ['x-uid']: fieldSchema['x-uid']
23
+ };
24
+ fieldSchema['x-component-props'] = fieldSchema['x-component-props'] || {};
25
+ fieldSchema['x-component-props'][config.name] = value;
26
+ schema['x-component-props'] = fieldSchema['x-component-props'];
27
+ field.componentProps = field.componentProps || {};
28
+ field.componentProps[config.name] = value;
29
+ dn.emit('patch', {
30
+ schema
31
+ });
32
+ }
33
+ };
34
+ }
35
+ });
36
+ const getSizeOptions = (t)=>[
37
+ {
38
+ value: 'small',
39
+ label: t('Small')
40
+ },
41
+ {
42
+ value: 'middle',
43
+ label: t('Middle')
44
+ },
45
+ {
46
+ value: 'large',
47
+ label: t('Large')
48
+ },
49
+ {
50
+ value: 'oversized',
51
+ label: t('Oversized')
52
+ },
53
+ {
54
+ value: 'auto',
55
+ label: t('Auto')
56
+ }
57
+ ];
58
+ const getObjectFitOptions = (t)=>[
59
+ {
60
+ value: 'cover',
61
+ label: t('Cover')
62
+ },
63
+ {
64
+ value: 'fill',
65
+ label: t('Fill')
66
+ },
67
+ {
68
+ value: 'contain',
69
+ label: t('Contain')
70
+ },
71
+ {
72
+ value: 'scale-down',
73
+ label: t('Scale Down')
74
+ },
75
+ {
76
+ value: 'none',
77
+ label: t('None')
78
+ }
79
+ ];
80
+ const size = createSettingsItem({
81
+ name: 'size',
82
+ title: 'Size',
83
+ options: getSizeOptions,
84
+ defaultValue: 'small'
85
+ });
86
+ const objectFit = createSettingsItem({
87
+ name: 'objectFit',
88
+ title: 'Object Fit',
89
+ options: getObjectFitOptions,
90
+ defaultValue: 'cover'
91
+ });
92
+ const inputPreviewComponentFieldSettings = new SchemaSettings({
93
+ name: 'fieldSettings:component:Input.Preview',
94
+ items: [
95
+ size,
96
+ objectFit
97
+ ]
98
+ });
99
+ export { inputPreviewComponentFieldSettings };
@@ -0,0 +1,2 @@
1
+ import { SchemaSettings } from '../../../../application/schema-settings/SchemaSettings';
2
+ export declare const multipleComponentFieldSettings: SchemaSettings<{}>;
@@ -0,0 +1,64 @@
1
+ import { useField, useFieldSchema } from "@tachybase/schema";
2
+ import { useTranslation } from "react-i18next";
3
+ import { SchemaSettings } from "../../../../application/schema-settings/SchemaSettings.mjs";
4
+ import { useCollectionManager_deprecated } from "../../../../collection-manager/index.mjs";
5
+ import { useDataSourceManager } from "../../../../data-source/index.mjs";
6
+ import { useCompile, useDesignable } from "../../../../schema-component/index.mjs";
7
+ import { useColumnSchema } from "../../../../schema-component/antd/table-v2/Table.Column.Decorator.mjs";
8
+ const multipleComponentFieldSettings = new SchemaSettings({
9
+ name: 'fieldSettings:component:multiple',
10
+ items: [
11
+ {
12
+ name: 'fieldComponent',
13
+ type: 'select',
14
+ useComponentProps () {
15
+ var _collectionInterface_componentOptions_filter, _collectionInterface_componentOptions, _fieldSchema_xcomponentprops;
16
+ const { t } = useTranslation();
17
+ const field = useField();
18
+ const { fieldSchema: tableColumnSchema } = useColumnSchema();
19
+ const { getCollectionJoinField } = useCollectionManager_deprecated();
20
+ const dm = useDataSourceManager();
21
+ const schema = useFieldSchema();
22
+ const fieldSchema = tableColumnSchema || schema;
23
+ const collectionField = getCollectionJoinField(fieldSchema['x-collection-field']);
24
+ const collectionInterface = dm.collectionFieldInterfaceManager.getFieldInterface(null == collectionField ? void 0 : collectionField.interface);
25
+ const compile = useCompile();
26
+ const fieldModeOptions = [
27
+ {
28
+ label: t('Select'),
29
+ value: 'multiple'
30
+ }
31
+ ];
32
+ null == collectionInterface || null == (_collectionInterface_componentOptions = collectionInterface.componentOptions) || null == (_collectionInterface_componentOptions_filter = _collectionInterface_componentOptions.filter((item)=>!item.useVisible || item.useVisible())) || _collectionInterface_componentOptions_filter.forEach((item)=>{
33
+ if (!(null == fieldModeOptions ? void 0 : fieldModeOptions.find((modeItem)=>modeItem.value === item.value))) null == fieldModeOptions || fieldModeOptions.push({
34
+ label: compile(item.label),
35
+ value: item.value
36
+ });
37
+ });
38
+ const { dn } = useDesignable();
39
+ return {
40
+ title: t('Field component'),
41
+ options: fieldModeOptions,
42
+ value: (null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops.mode) || 'multiple',
43
+ onChange (mode) {
44
+ const schema = {
45
+ ['x-uid']: fieldSchema['x-uid']
46
+ };
47
+ fieldSchema['x-component-props'] = fieldSchema['x-component-props'] || {};
48
+ fieldSchema['x-component-props']['mode'] = mode;
49
+ fieldSchema['x-component-props']['multiple'] = true;
50
+ schema['x-component-props'] = fieldSchema['x-component-props'];
51
+ field.componentProps = field.componentProps || {};
52
+ field.componentProps.mode = mode;
53
+ field.componentProps.multiple = true;
54
+ dn.emit('patch', {
55
+ schema
56
+ });
57
+ dn.refresh();
58
+ }
59
+ };
60
+ }
61
+ }
62
+ ]
63
+ });
64
+ export { multipleComponentFieldSettings };
@@ -1,7 +1,9 @@
1
1
  import { useField, useFieldSchema } from "@tachybase/schema";
2
2
  import { useTranslation } from "react-i18next";
3
3
  import { SchemaSettings } from "../../../../application/schema-settings/SchemaSettings.mjs";
4
- import { useDesignable } from "../../../../schema-component/index.mjs";
4
+ import { useCollectionManager_deprecated } from "../../../../collection-manager/index.mjs";
5
+ import { useDataSourceManager } from "../../../../data-source/index.mjs";
6
+ import { useCompile, useDesignable } from "../../../../schema-component/index.mjs";
5
7
  import { useColumnSchema } from "../../../../schema-component/antd/table-v2/Table.Column.Decorator.mjs";
6
8
  const radioComponentFieldSettings = new SchemaSettings({
7
9
  name: 'fieldSettings:component:Radio group',
@@ -10,7 +12,7 @@ const radioComponentFieldSettings = new SchemaSettings({
10
12
  name: 'fieldComponent',
11
13
  type: 'select',
12
14
  useComponentProps () {
13
- var _fieldSchema_xcomponentprops;
15
+ var _collectionInterface_componentOptions_filter, _collectionInterface_componentOptions, _fieldSchema_xcomponentprops;
14
16
  const { t } = useTranslation();
15
17
  const field = useField();
16
18
  const { fieldSchema: tableColumnSchema } = useColumnSchema();
@@ -26,7 +28,18 @@ const radioComponentFieldSettings = new SchemaSettings({
26
28
  value: 'Radio group'
27
29
  }
28
30
  ];
31
+ const dm = useDataSourceManager();
32
+ const { getCollectionJoinField } = useCollectionManager_deprecated();
33
+ const collectionField = getCollectionJoinField(fieldSchema['x-collection-field']);
34
+ const collectionInterface = dm.collectionFieldInterfaceManager.getFieldInterface(null == collectionField ? void 0 : collectionField.interface);
35
+ const compile = useCompile();
29
36
  const { dn } = useDesignable();
37
+ null == collectionInterface || null == (_collectionInterface_componentOptions = collectionInterface.componentOptions) || null == (_collectionInterface_componentOptions_filter = _collectionInterface_componentOptions.filter((item)=>!item.useVisible || item.useVisible())) || _collectionInterface_componentOptions_filter.forEach((item)=>{
38
+ if (!(null == fieldModeOptions ? void 0 : fieldModeOptions.find((modeItem)=>modeItem.value === item.value))) null == fieldModeOptions || fieldModeOptions.push({
39
+ label: compile(item.label),
40
+ value: item.value
41
+ });
42
+ });
30
43
  return {
31
44
  title: t('Field component'),
32
45
  options: fieldModeOptions,