@tachybase/client 0.23.22 → 0.23.35

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 (187) hide show
  1. package/es/application/schema-initializer/components/SchemaInitializerChildren.mjs +1 -1
  2. package/es/built-in/admin-layout/InternalAdminLayout.mjs +4 -2
  3. package/es/built-in/admin-layout/MenuEditor.mjs +2 -2
  4. package/es/built-in/admin-layout/style.d.ts +1 -1
  5. package/es/built-in/admin-layout/style.mjs +4 -4
  6. package/es/built-in/assistant/Assistant.provider.d.ts +0 -6
  7. package/es/built-in/assistant/Assistant.provider.mjs +15 -112
  8. package/es/built-in/assistant/index.d.ts +0 -1
  9. package/es/built-in/assistant/index.mjs +0 -7
  10. package/es/built-in/attachment-preview/previewers/file-pdf.mjs +4 -2
  11. package/es/built-in/context-menu/ContextMenu.provider.d.ts +1 -0
  12. package/es/built-in/context-menu/ContextMenu.provider.mjs +29 -1
  13. package/es/built-in/context-menu/index.mjs +1 -0
  14. package/es/built-in/index.mjs +44 -5
  15. package/es/built-in/page-style/TabHeader.d.ts +1 -1
  16. package/es/built-in/page-style/TabHeader.mjs +26 -33
  17. package/es/built-in/page-style/TabHeader.style.d.ts +4 -0
  18. package/es/built-in/page-style/TabHeader.style.mjs +35 -0
  19. package/es/built-in/pinned-list/PinnedPluginListProvider.d.ts +3 -1
  20. package/es/built-in/pinned-list/PinnedPluginListProvider.mjs +5 -4
  21. package/es/built-in/scroll-assistant/useJoystick.mjs +3 -1
  22. package/es/built-in/setting-layout/SettingLayout.mjs +10 -1
  23. package/es/built-in/{assistant/calculator → setting-layout}/style.d.ts +1 -1
  24. package/es/built-in/setting-layout/style.mjs +25 -0
  25. package/es/collection-manager/action-hooks.d.ts +1 -4
  26. package/es/collection-manager/action-hooks.mjs +39 -11
  27. package/es/icon/preloaded.mjs +4 -4
  28. package/es/modules/actions/associate/AssociateActionInitializer.d.ts +1 -0
  29. package/es/modules/actions/associate/AssociateActionInitializer.mjs +71 -0
  30. package/es/modules/actions/associate/AssociateActionProvider.d.ts +7 -0
  31. package/es/modules/actions/associate/AssociateActionProvider.mjs +82 -0
  32. package/es/modules/actions/associate/AssociateActionSettings.d.ts +2 -0
  33. package/es/modules/actions/associate/AssociateActionSettings.mjs +57 -0
  34. package/es/modules/blocks/data-blocks/details-multi/detailsWithPaginationSettings.mjs +2 -1
  35. package/es/modules/blocks/data-blocks/form/RecordFormBlockInitializer.mjs +21 -14
  36. package/es/modules/blocks/data-blocks/form/createEditFormBlockUISchema.d.ts +1 -2
  37. package/es/modules/blocks/data-blocks/grid-card/gridCardBlockSettings.mjs +2 -1
  38. package/es/modules/blocks/data-blocks/list/listBlockSettings.mjs +2 -1
  39. package/es/modules/blocks/data-blocks/table/TableActionInitializers.mjs +15 -0
  40. package/es/modules/blocks/data-blocks/table/tableBlockSettings.mjs +2 -1
  41. package/es/modules/blocks/data-blocks/table/tableColumnSettings.mjs +2 -2
  42. package/es/modules/blocks/data-blocks/table-selector/tableSelectorBlockSettings.mjs +2 -1
  43. package/es/modules/fields/component/Cascader/cascaderComponentFieldSettings.mjs +2 -1
  44. package/es/modules/fields/component/Radio/radioComponentFieldSettings.mjs +4 -0
  45. package/es/modules/fields/component/Select/selectComponentFieldSettings.mjs +16 -2
  46. package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.mjs +2 -1
  47. package/es/modules/menu/GroupItem.mjs +5 -1
  48. package/es/modules/menu/LinkMenuItem.mjs +7 -3
  49. package/es/modules/menu/PageMenuItem.mjs +5 -1
  50. package/es/modules/menu/UploadMenuItem.d.ts +1 -0
  51. package/es/modules/menu/UploadMenuItem.mjs +81 -0
  52. package/es/modules/menu/menuItemInitializer.d.ts +0 -4
  53. package/es/modules/menu/menuItemInitializer.mjs +3 -23
  54. package/es/schema-component/antd/action/Action.Designer.mjs +4 -1
  55. package/es/schema-component/antd/association-select/AssociationSelect.mjs +4 -2
  56. package/es/schema-component/antd/checkbox/Checkbox.mjs +11 -6
  57. package/es/schema-component/antd/date-picker/DatePicker.mjs +4 -0
  58. package/es/schema-component/antd/form-item/FormItem.Settings.d.ts +2 -0
  59. package/es/schema-component/antd/form-item/FormItem.Settings.mjs +14 -1
  60. package/es/schema-component/antd/form-v2/Form.Settings.mjs +2 -1
  61. package/es/schema-component/antd/grid-card/GridCard.Designer.mjs +2 -1
  62. package/es/schema-component/antd/list/List.Designer.mjs +2 -1
  63. package/es/schema-component/antd/menu/AdminMenu.d.ts +1 -0
  64. package/es/schema-component/antd/menu/AdminMenu.mjs +71 -0
  65. package/es/schema-component/antd/menu/AdminMenu.style.d.ts +4 -0
  66. package/es/schema-component/antd/menu/AdminMenu.style.mjs +36 -0
  67. package/es/schema-component/antd/menu/Menu.Designer.d.ts +1 -1
  68. package/es/schema-component/antd/menu/Menu.Designer.mjs +59 -40
  69. package/es/schema-component/antd/menu/Menu.mjs +108 -141
  70. package/es/schema-component/antd/menu/Menu.styles.d.ts +1 -2
  71. package/es/schema-component/antd/menu/Menu.styles.mjs +8 -20
  72. package/es/schema-component/antd/menu/MenuSearch.d.ts +5 -0
  73. package/es/schema-component/antd/menu/MenuSearch.mjs +32 -0
  74. package/es/schema-component/antd/menu/tools.d.ts +9 -0
  75. package/es/schema-component/antd/menu/tools.mjs +36 -0
  76. package/es/schema-component/antd/scroll-area/ScrollArea.mjs +0 -17
  77. package/es/schema-component/antd/select/Select.d.ts +3 -13
  78. package/es/schema-component/antd/select/Select.mjs +33 -2
  79. package/es/schema-component/antd/table/Table.Void.Designer.mjs +2 -1
  80. package/es/schema-component/antd/table-v2/TableBlockDesigner.mjs +2 -1
  81. package/es/schema-component/antd/table-v2/TableSelectorDesigner.mjs +2 -1
  82. package/es/schema-component/common/dnd-context/index.d.ts +1 -2
  83. package/es/schema-component/common/sortable-item/DragHandleMenu.d.ts +1 -0
  84. package/es/schema-component/common/sortable-item/DragHandleMenu.mjs +78 -0
  85. package/es/schema-component/common/sortable-item/DragHandleMenu.style.d.ts +3 -0
  86. package/es/schema-component/common/sortable-item/DragHandleMenu.style.mjs +25 -0
  87. package/es/schema-initializer/SchemaInitializerPlugin.mjs +5 -2
  88. package/es/schema-initializer/utils.mjs +9 -7
  89. package/es/schema-settings/GeneralSchemaDesigner.d.ts +2 -1
  90. package/es/schema-settings/GeneralSchemaDesigner.mjs +9 -1
  91. package/es/schema-settings/SchemaSettings.d.ts +3 -1
  92. package/es/schema-settings/SchemaSettings.mjs +16 -4
  93. package/es/schema-settings/SchemaSettingsPlugin.mjs +2 -0
  94. package/es/schema-settings/SchemaSettingsSortingRule.mjs +2 -1
  95. package/es/schema-settings/styles.mjs +2 -2
  96. package/lib/application/schema-initializer/components/SchemaInitializerChildren.js +1 -1
  97. package/lib/built-in/admin-layout/InternalAdminLayout.js +4 -2
  98. package/lib/built-in/admin-layout/MenuEditor.js +2 -2
  99. package/lib/built-in/admin-layout/style.js +4 -4
  100. package/lib/built-in/assistant/Assistant.provider.js +16 -115
  101. package/lib/built-in/assistant/index.js +3 -16
  102. package/lib/built-in/attachment-preview/previewers/file-pdf.js +4 -2
  103. package/lib/built-in/context-menu/ContextMenu.provider.js +29 -0
  104. package/lib/built-in/context-menu/index.js +1 -0
  105. package/lib/built-in/index.js +44 -5
  106. package/lib/built-in/page-style/TabHeader.js +26 -33
  107. package/lib/built-in/page-style/TabHeader.style.js +69 -0
  108. package/lib/built-in/pinned-list/PinnedPluginListProvider.js +5 -4
  109. package/lib/built-in/scroll-assistant/useJoystick.js +17 -1
  110. package/lib/built-in/setting-layout/SettingLayout.js +10 -1
  111. package/lib/built-in/{assistant/calculator/CalculatorKey.js → setting-layout/style.js} +25 -11
  112. package/lib/collection-manager/action-hooks.js +39 -11
  113. package/lib/icon/preloaded.js +4 -4
  114. package/lib/locale/en_US.js +8 -0
  115. package/lib/locale/zh-CN.js +8 -0
  116. package/lib/modules/actions/associate/AssociateActionInitializer.js +105 -0
  117. package/lib/modules/actions/associate/AssociateActionProvider.js +116 -0
  118. package/lib/modules/actions/associate/AssociateActionSettings.js +91 -0
  119. package/lib/modules/blocks/data-blocks/details-multi/detailsWithPaginationSettings.js +2 -1
  120. package/lib/modules/blocks/data-blocks/form/RecordFormBlockInitializer.js +21 -14
  121. package/lib/modules/blocks/data-blocks/grid-card/gridCardBlockSettings.js +2 -1
  122. package/lib/modules/blocks/data-blocks/list/listBlockSettings.js +2 -1
  123. package/lib/modules/blocks/data-blocks/table/TableActionInitializers.js +15 -0
  124. package/lib/modules/blocks/data-blocks/table/tableBlockSettings.js +2 -1
  125. package/lib/modules/blocks/data-blocks/table/tableColumnSettings.js +2 -2
  126. package/lib/modules/blocks/data-blocks/table-selector/tableSelectorBlockSettings.js +2 -1
  127. package/lib/modules/fields/component/Cascader/cascaderComponentFieldSettings.js +2 -1
  128. package/lib/modules/fields/component/Radio/radioComponentFieldSettings.js +4 -0
  129. package/lib/modules/fields/component/Select/selectComponentFieldSettings.js +16 -2
  130. package/lib/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.js +2 -1
  131. package/lib/modules/menu/GroupItem.js +5 -1
  132. package/lib/modules/menu/LinkMenuItem.js +7 -3
  133. package/lib/modules/menu/PageMenuItem.js +5 -1
  134. package/lib/modules/menu/UploadMenuItem.js +115 -0
  135. package/lib/modules/menu/menuItemInitializer.js +2 -23
  136. package/lib/schema-component/antd/action/Action.Designer.js +4 -1
  137. package/lib/schema-component/antd/association-select/AssociationSelect.js +4 -2
  138. package/lib/schema-component/antd/checkbox/Checkbox.js +11 -6
  139. package/lib/schema-component/antd/date-picker/DatePicker.js +4 -0
  140. package/lib/schema-component/antd/form-item/FormItem.Settings.js +16 -1
  141. package/lib/schema-component/antd/form-v2/Form.Settings.js +2 -1
  142. package/lib/schema-component/antd/grid-card/GridCard.Designer.js +2 -1
  143. package/lib/schema-component/antd/list/List.Designer.js +2 -1
  144. package/lib/schema-component/antd/menu/AdminMenu.js +105 -0
  145. package/lib/schema-component/antd/menu/AdminMenu.style.js +70 -0
  146. package/lib/schema-component/antd/menu/Menu.Designer.js +59 -40
  147. package/lib/schema-component/antd/menu/Menu.js +108 -141
  148. package/lib/schema-component/antd/menu/Menu.styles.js +8 -20
  149. package/lib/schema-component/antd/menu/MenuSearch.js +80 -0
  150. package/lib/schema-component/antd/menu/tools.js +72 -0
  151. package/lib/schema-component/antd/scroll-area/ScrollArea.js +0 -17
  152. package/lib/schema-component/antd/select/Select.js +33 -2
  153. package/lib/schema-component/antd/table/Table.Void.Designer.js +2 -1
  154. package/lib/schema-component/antd/table-v2/TableBlockDesigner.js +2 -1
  155. package/lib/schema-component/antd/table-v2/TableSelectorDesigner.js +2 -1
  156. package/lib/schema-component/common/sortable-item/DragHandleMenu.js +112 -0
  157. package/lib/schema-component/common/sortable-item/DragHandleMenu.style.js +59 -0
  158. package/lib/schema-initializer/SchemaInitializerPlugin.js +5 -2
  159. package/lib/schema-initializer/utils.js +9 -7
  160. package/lib/schema-settings/GeneralSchemaDesigner.js +9 -1
  161. package/lib/schema-settings/SchemaSettings.js +16 -4
  162. package/lib/schema-settings/SchemaSettingsPlugin.js +2 -0
  163. package/lib/schema-settings/SchemaSettingsSortingRule.js +2 -1
  164. package/lib/schema-settings/styles.js +2 -2
  165. package/package.json +8 -7
  166. package/es/built-in/assistant/calculator/AutoScalingText.d.ts +0 -3
  167. package/es/built-in/assistant/calculator/AutoScalingText.mjs +0 -33
  168. package/es/built-in/assistant/calculator/Calculator.d.ts +0 -2
  169. package/es/built-in/assistant/calculator/Calculator.mjs +0 -235
  170. package/es/built-in/assistant/calculator/CalculatorDisplay.d.ts +0 -4
  171. package/es/built-in/assistant/calculator/CalculatorDisplay.mjs +0 -21
  172. package/es/built-in/assistant/calculator/CalculatorKey.d.ts +0 -5
  173. package/es/built-in/assistant/calculator/CalculatorKey.mjs +0 -11
  174. package/es/built-in/assistant/calculator/CalculatorProvider.d.ts +0 -10
  175. package/es/built-in/assistant/calculator/CalculatorProvider.mjs +0 -29
  176. package/es/built-in/assistant/calculator/Draggable.d.ts +0 -8
  177. package/es/built-in/assistant/calculator/Draggable.mjs +0 -54
  178. package/es/built-in/assistant/calculator/style.mjs +0 -25
  179. package/es/built-in/assistant/search-and-jump/index.d.ts +0 -16
  180. package/es/built-in/assistant/search-and-jump/index.mjs +0 -59
  181. package/lib/built-in/assistant/calculator/AutoScalingText.js +0 -67
  182. package/lib/built-in/assistant/calculator/Calculator.js +0 -283
  183. package/lib/built-in/assistant/calculator/CalculatorDisplay.js +0 -55
  184. package/lib/built-in/assistant/calculator/CalculatorProvider.js +0 -65
  185. package/lib/built-in/assistant/calculator/Draggable.js +0 -102
  186. package/lib/built-in/assistant/calculator/style.js +0 -59
  187. package/lib/built-in/assistant/search-and-jump/index.js +0 -96
@@ -1,4 +1,5 @@
1
1
  import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
2
+ import * as __WEBPACK_EXTERNAL_MODULE_lodash__ from "lodash";
2
3
  const useJoystick = (ref, callbacks)=>{
3
4
  (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
4
5
  if (!ref.current) return;
@@ -17,6 +18,7 @@ const useJoystick = (ref, callbacks)=>{
17
18
  let moveY = 0;
18
19
  let displayX = 0;
19
20
  let displayY = 0;
21
+ const debouncedOnMousewheel = __WEBPACK_EXTERNAL_MODULE_lodash__["default"].debounce(onMousewheel, 16);
20
22
  ele.addEventListener('mousedown', down);
21
23
  ele.addEventListener('mousemove', move);
22
24
  ele.addEventListener('mouseup', up);
@@ -24,7 +26,7 @@ const useJoystick = (ref, callbacks)=>{
24
26
  ele.addEventListener('touchmove', move);
25
27
  ele.addEventListener('touchend', up);
26
28
  ele.addEventListener('contextmenu', onContextmenu);
27
- ele.addEventListener('mousewheel', onMousewheel);
29
+ ele.addEventListener('mousewheel', debouncedOnMousewheel);
28
30
  const stickEle = createStickCanvas();
29
31
  const baseEle = createBaseCanvas();
30
32
  ele.appendChild(baseEle);
@@ -1,13 +1,14 @@
1
1
  import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
2
- import "react";
3
2
  import * as __WEBPACK_EXTERNAL_MODULE__ant_design_icons__ from "@ant-design/icons";
4
3
  import * as __WEBPACK_EXTERNAL_MODULE__ant_design_pro_components__ from "@ant-design/pro-components";
5
4
  import * as __WEBPACK_EXTERNAL_MODULE_antd__ from "antd";
6
5
  import * as __WEBPACK_EXTERNAL_MODULE_react_router__ from "react-router";
6
+ import * as __WEBPACK_EXTERNAL_MODULE__index_mjs__ from "../../index.mjs";
7
7
  import * as __WEBPACK_EXTERNAL_MODULE__user_index_mjs__ from "../../user/index.mjs";
8
8
  import * as __WEBPACK_EXTERNAL_MODULE__admin_layout_index_mjs__ from "../admin-layout/index.mjs";
9
9
  import * as __WEBPACK_EXTERNAL_MODULE__admin_layout_AdminProvider_mjs__ from "../admin-layout/AdminProvider.mjs";
10
10
  import * as __WEBPACK_EXTERNAL_MODULE__system_settings_index_mjs__ from "../system-settings/index.mjs";
11
+ import * as __WEBPACK_EXTERNAL_MODULE__style_mjs__ from "./style.mjs";
11
12
  const SettingLayout = (param)=>{
12
13
  let { selectedKeys, onClick, route, children, fullscreen } = param;
13
14
  var _result_data_data, _result_data, _result_data_data_logo, _result_data_data1, _result_data1, _data_data, _data_data1, _data_data2;
@@ -20,18 +21,26 @@ const SettingLayout = (param)=>{
20
21
  fixedHeader: true,
21
22
  siderMenuType: 'sub'
22
23
  };
24
+ const app = (0, __WEBPACK_EXTERNAL_MODULE__index_mjs__.useApp)();
23
25
  const location = (0, __WEBPACK_EXTERNAL_MODULE_react_router__.useLocation)();
24
26
  const navigate = (0, __WEBPACK_EXTERNAL_MODULE_react_router__.useNavigate)();
25
27
  const { data } = (0, __WEBPACK_EXTERNAL_MODULE__user_index_mjs__.useCurrentUserContext)();
26
28
  const result = (0, __WEBPACK_EXTERNAL_MODULE__system_settings_index_mjs__.useSystemSettings)();
29
+ const { styles } = (0, __WEBPACK_EXTERNAL_MODULE__style_mjs__.useStyles)();
30
+ const redirectToUserHome = ()=>{
31
+ if (app.adminUrl.startsWith('/')) navigate(app.adminUrl);
32
+ else window.location.href = app.adminUrl;
33
+ };
27
34
  return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__admin_layout_AdminProvider_mjs__.AdminProvider, {
28
35
  children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__ant_design_pro_components__.ProConfigProvider, {
29
36
  hashed: false,
30
37
  children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__ant_design_pro_components__.ProLayout, {
38
+ className: styles.settingLayout,
31
39
  title: null == result ? void 0 : null === (_result_data = result.data) || void 0 === _result_data ? void 0 : null === (_result_data_data = _result_data.data) || void 0 === _result_data_data ? void 0 : _result_data_data.title,
32
40
  logo: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("img", {
33
41
  src: null == result ? void 0 : null === (_result_data1 = result.data) || void 0 === _result_data1 ? void 0 : null === (_result_data_data1 = _result_data1.data) || void 0 === _result_data_data1 ? void 0 : null === (_result_data_data_logo = _result_data_data1.logo) || void 0 === _result_data_data_logo ? void 0 : _result_data_data_logo.url
34
42
  }),
43
+ onMenuHeaderClick: redirectToUserHome,
35
44
  bgLayoutImgList: [
36
45
  {
37
46
  src: 'https://img.alicdn.com/imgextra/i2/O1CN01O4etvp1DvpFLKfuWq_!!6000000000279-2-tps-609-606.png',
@@ -1,3 +1,3 @@
1
1
  export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
- container: import("antd-style").SerializedStyles;
2
+ settingLayout: import("antd-style").SerializedStyles;
3
3
  }>;
@@ -0,0 +1,25 @@
1
+ import * as __WEBPACK_EXTERNAL_MODULE_antd_style__ from "antd-style";
2
+ function _tagged_template_literal(strings, raw) {
3
+ if (!raw) raw = strings.slice(0);
4
+ return Object.freeze(Object.defineProperties(strings, {
5
+ raw: {
6
+ value: Object.freeze(raw)
7
+ }
8
+ }));
9
+ }
10
+ function _templateObject() {
11
+ const data = _tagged_template_literal([
12
+ "\n /* Depends on antd's ProLayout component structure */\n .ant-pro-global-header-logo {\n cursor: pointer;\n }\n "
13
+ ]);
14
+ _templateObject = function() {
15
+ return data;
16
+ };
17
+ return data;
18
+ }
19
+ const useStyles = (0, __WEBPACK_EXTERNAL_MODULE_antd_style__.createStyles)((param)=>{
20
+ let { css, token } = param;
21
+ return {
22
+ settingLayout: css(_templateObject())
23
+ };
24
+ });
25
+ export { useStyles };
@@ -17,10 +17,7 @@ export declare const useKanbanEvents: () => {
17
17
  toPosition: any;
18
18
  }): Promise<void>;
19
19
  };
20
- export declare const useSortFields: (collectionName: string) => {
21
- value: any;
22
- label: any;
23
- }[];
20
+ export declare const useSortFields: (collectionName: any, depth?: number, parentFieldName?: string, parentLabel?: string) => any[];
24
21
  export declare const useChildrenCollections: (collectionName: string) => {
25
22
  value: any;
26
23
  label: any;
@@ -74,21 +74,49 @@ const useKanbanEvents = ()=>{
74
74
  }
75
75
  };
76
76
  };
77
- const useSortFields = (collectionName)=>{
77
+ const toOneField = (field)=>[
78
+ 'belongsTo',
79
+ 'hasOne'
80
+ ].includes(field.type);
81
+ const useSortFields = function(collectionName) {
82
+ let depth = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1, parentFieldName = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : '', parentLabel = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : '';
83
+ const { t } = (0, __WEBPACK_EXTERNAL_MODULE_react_i18next__.useTranslation)();
78
84
  const { getCollectionFields, getInterface } = (0, __WEBPACK_EXTERNAL_MODULE__index_mjs__.useCollectionManager_deprecated)();
79
85
  const fields = getCollectionFields(collectionName);
80
- return fields.filter((field)=>{
81
- if (!field.interface) return false;
82
- const fieldInterface = getInterface(field.interface);
83
- if (null == fieldInterface ? void 0 : fieldInterface.sortable) return true;
84
- return false;
85
- }).map((field)=>{
86
+ if (!Array.isArray(fields) || 0 === fields.length) return [];
87
+ fields.sort((a, b)=>{
88
+ const toOnFieldA = toOneField(a);
89
+ const toOnFieldB = toOneField(b);
90
+ if (toOnFieldA && !toOnFieldB) return 1;
91
+ if (!toOnFieldA && toOnFieldB) return -1;
92
+ return a.sort - b.sort;
93
+ });
94
+ return fields.map((field)=>{
86
95
  var _field_uiSchema;
87
- return {
88
- value: field.name,
89
- label: (null == field ? void 0 : null === (_field_uiSchema = field.uiSchema) || void 0 === _field_uiSchema ? void 0 : _field_uiSchema.title) || field.name
96
+ if (!field.interface) return null;
97
+ const fieldInterface = getInterface(field.interface);
98
+ if (!(null == fieldInterface ? void 0 : fieldInterface.sortable) && !toOneField(field)) return null;
99
+ if (!(null == fieldInterface ? void 0 : fieldInterface.sortable) && depth >= 2) return null;
100
+ if (field.target === collectionName) return null;
101
+ const value = parentFieldName ? "".concat(parentFieldName, ".").concat(field.name) : field.name;
102
+ const currentLabel = (null == field ? void 0 : null === (_field_uiSchema = field.uiSchema) || void 0 === _field_uiSchema ? void 0 : _field_uiSchema.title) || field.name;
103
+ let fullLabel = '';
104
+ if (parentLabel) {
105
+ if (parentLabel.includes('{{') || currentLabel.includes('{{')) {
106
+ const formatLabel = (label)=>label.includes('{{t(') ? "t(".concat(label.slice(4, -3), ")") : label.includes('{{') ? "t(".concat(label.slice(2, -2), ")") : '"'.concat(label, '"');
107
+ let formattedParentLabel = formatLabel(parentLabel);
108
+ const formattedCurrentLabel = formatLabel(currentLabel);
109
+ fullLabel = "{{t(".concat(formattedParentLabel, ' + "/" + ').concat(formattedCurrentLabel, ")}}");
110
+ } else fullLabel = "".concat(parentLabel, " / ").concat(currentLabel);
111
+ } else fullLabel = currentLabel;
112
+ const option = {
113
+ label: currentLabel,
114
+ fullLabel,
115
+ value
90
116
  };
91
- });
117
+ if (field.target) option.children = useSortFields(field.target, depth + 1, value, fullLabel);
118
+ return option;
119
+ }).filter(Boolean);
92
120
  };
93
121
  const useChildrenCollections = (collectionName)=>{
94
122
  const { getChildrenCollections } = (0, __WEBPACK_EXTERNAL_MODULE__index_mjs__.useCollectionManager_deprecated)();
@@ -36,7 +36,7 @@ const Approval = ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runti
36
36
  ]
37
37
  });
38
38
  const ApprovalNew = ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("svg", {
39
- "fill-rule": "evenodd",
39
+ fillRule: "evenodd",
40
40
  viewBox: "0 0 34 34",
41
41
  focusable: "false",
42
42
  fill: "currentColor",
@@ -51,7 +51,7 @@ const ApprovalNew = ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_ru
51
51
  id: "Ellipse 42",
52
52
  d: "M16.8963 7C14.6872 7 12.8963 8.79086 12.8963 11C12.8963 12.2907 13.5076 13.4385 14.4564 14.1699C14.7966 14.4322 15.018 14.8415 14.9526 15.266L14.6723 17.0856C14.5972 17.5734 14.1774 17.9334 13.6839 17.9334H10.999C10.4467 17.9334 9.99902 18.3811 9.99902 18.9334V22.012",
53
53
  stroke: "white",
54
- "stroke-width": "1.5"
54
+ strokeWidth: "1.5"
55
55
  }),
56
56
  /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("path", {
57
57
  id: "Ellipse 43",
@@ -62,8 +62,8 @@ const ApprovalNew = ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_ru
62
62
  id: "Vector 5",
63
63
  d: "M10.0479 25.0195H23.7546",
64
64
  stroke: "white",
65
- "stroke-width": "1.5",
66
- "stroke-linecap": "round"
65
+ strokeWidth: "1.5",
66
+ strokeLinecap: "round"
67
67
  })
68
68
  ]
69
69
  })
@@ -0,0 +1 @@
1
+ export declare const AssociateActionInitializer: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,71 @@
1
+ import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
2
+ import "react";
3
+ import * as __WEBPACK_EXTERNAL_MODULE__application_index_mjs__ from "../../../application/index.mjs";
4
+ import * as __WEBPACK_EXTERNAL_MODULE__schema_initializer_items_ActionInitializer_mjs__ from "../../../schema-initializer/items/ActionInitializer.mjs";
5
+ const AssociateActionInitializer = ()=>{
6
+ const schema = {
7
+ type: 'void',
8
+ 'x-action': 'associate',
9
+ 'x-acl-action': 'associate',
10
+ title: "{{t('Associate')}}",
11
+ 'x-toolbar': 'ActionSchemaToolbar',
12
+ 'x-settings': 'actionSettings:associate',
13
+ 'x-component': 'Action',
14
+ 'x-component-props': {
15
+ actionType: 'associations',
16
+ openMode: 'drawer',
17
+ type: 'primary',
18
+ icon: 'PlusOutlined'
19
+ },
20
+ properties: {
21
+ drawer: {
22
+ type: 'void',
23
+ title: '{{ t("Select record") }}',
24
+ 'x-component': 'Action.Container',
25
+ 'x-component-props': {
26
+ className: 'nb-record-picker-selector'
27
+ },
28
+ 'x-decorator': 'AssociateActionProvider',
29
+ properties: {
30
+ grid: {
31
+ type: 'void',
32
+ 'x-component': 'Grid',
33
+ 'x-initializer': 'popup:tableSelector:addBlock',
34
+ properties: {}
35
+ },
36
+ footer: {
37
+ 'x-component': 'Action.Container.Footer',
38
+ 'x-component-props': {},
39
+ properties: {
40
+ actions: {
41
+ type: 'void',
42
+ 'x-component': 'ActionBar',
43
+ 'x-component-props': {},
44
+ properties: {
45
+ submit: {
46
+ title: '{{ t("Submit") }}',
47
+ 'x-action': 'submit',
48
+ 'x-component': 'Action',
49
+ 'x-use-component-props': 'usePickActionProps',
50
+ 'x-toolbar': 'ActionSchemaToolbar',
51
+ 'x-settings': 'actionSettings:submit',
52
+ 'x-component-props': {
53
+ type: 'primary',
54
+ htmlType: 'submit'
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
64
+ };
65
+ const itemConfig = (0, __WEBPACK_EXTERNAL_MODULE__application_index_mjs__.useSchemaInitializerItem)();
66
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__schema_initializer_items_ActionInitializer_mjs__.ActionInitializer, {
67
+ item: itemConfig,
68
+ schema: schema
69
+ });
70
+ };
71
+ export { AssociateActionInitializer };
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface AssociateActionProviderProps {
3
+ children: React.ReactNode;
4
+ onChange?: (selectedRows: any[]) => void;
5
+ }
6
+ export declare const AssociateActionProvider: (props: AssociateActionProviderProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,82 @@
1
+ import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
2
+ import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
3
+ import * as __WEBPACK_EXTERNAL_MODULE__index_mjs__ from "../../../index.mjs";
4
+ import * as __WEBPACK_EXTERNAL_MODULE__block_provider_TableSelectorProvider_mjs__ from "../../../block-provider/TableSelectorProvider.mjs";
5
+ import * as __WEBPACK_EXTERNAL_MODULE__schema_component_antd_record_picker_index_mjs__ from "../../../schema-component/antd/record-picker/index.mjs";
6
+ const useTableSelectorProps = ()=>{
7
+ const { setSelectedRows } = (0, __WEBPACK_EXTERNAL_MODULE_react__.useContext)(__WEBPACK_EXTERNAL_MODULE__schema_component_antd_record_picker_index_mjs__.RecordPickerContext);
8
+ const { onRowSelectionChange, rowKey = 'id', ...others } = (0, __WEBPACK_EXTERNAL_MODULE__block_provider_TableSelectorProvider_mjs__.useTableSelectorProps)();
9
+ return {
10
+ ...others,
11
+ rowKey,
12
+ rowSelection: {
13
+ type: 'checkbox'
14
+ },
15
+ onRowSelectionChange (selectedRowKeys, selectedRows) {
16
+ null == setSelectedRows || setSelectedRows(selectedRowKeys);
17
+ null == onRowSelectionChange || onRowSelectionChange(selectedRowKeys, selectedRows);
18
+ }
19
+ };
20
+ };
21
+ const AssociateActionProvider = (props)=>{
22
+ const [selectedRows, setSelectedRows] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)([]);
23
+ const collection = (0, __WEBPACK_EXTERNAL_MODULE__index_mjs__.useCollection)();
24
+ const { resource, service, block, __parent } = (0, __WEBPACK_EXTERNAL_MODULE__index_mjs__.useBlockRequestContext)();
25
+ const pickerProps = {
26
+ size: 'small',
27
+ onChange: null == props ? void 0 : props.onChange,
28
+ selectedRows,
29
+ setSelectedRows
30
+ };
31
+ const usePickActionProps = ()=>{
32
+ const { selectedRows } = (0, __WEBPACK_EXTERNAL_MODULE_react__.useContext)(__WEBPACK_EXTERNAL_MODULE__schema_component_antd_record_picker_index_mjs__.RecordPickerContext);
33
+ const { setVisible, setFormValueChanged } = (0, __WEBPACK_EXTERNAL_MODULE__index_mjs__.useActionContext)();
34
+ return {
35
+ async onClick (e, callBack) {
36
+ await resource.add({
37
+ values: selectedRows
38
+ });
39
+ null == callBack || callBack();
40
+ null == setVisible || setVisible(false);
41
+ if (block && 'TableField' !== block) {
42
+ var __parent_service_refresh, __parent_service;
43
+ null == __parent || null === (__parent_service = __parent.service) || void 0 === __parent_service || null === (__parent_service_refresh = __parent_service.refresh) || void 0 === __parent_service_refresh || __parent_service_refresh.call(__parent_service);
44
+ null == setFormValueChanged || setFormValueChanged(false);
45
+ }
46
+ }
47
+ };
48
+ };
49
+ const getFilter = ()=>{
50
+ var _service_data;
51
+ const targetKey = (null == collection ? void 0 : collection.filterTargetKey) || 'id';
52
+ if (null === (_service_data = service.data) || void 0 === _service_data ? void 0 : _service_data.data) {
53
+ var _service_data1;
54
+ const list = null === (_service_data1 = service.data) || void 0 === _service_data1 ? void 0 : _service_data1.data.map((option)=>option[targetKey]).filter(Boolean);
55
+ const filter = list.length ? {
56
+ $and: [
57
+ {
58
+ ["".concat(targetKey, ".$ne")]: list
59
+ }
60
+ ]
61
+ } : {};
62
+ return filter;
63
+ }
64
+ return {};
65
+ };
66
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__schema_component_antd_record_picker_index_mjs__.RecordPickerProvider, {
67
+ ...pickerProps,
68
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__index_mjs__.SchemaComponentOptions, {
69
+ scope: {
70
+ useTableSelectorProps,
71
+ usePickActionProps
72
+ },
73
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__block_provider_TableSelectorProvider_mjs__.TableSelectorParamsProvider, {
74
+ params: {
75
+ filter: getFilter()
76
+ },
77
+ children: props.children
78
+ })
79
+ })
80
+ });
81
+ };
82
+ export { AssociateActionProvider };
@@ -0,0 +1,2 @@
1
+ import { SchemaSettings } from '../../../application/schema-settings/SchemaSettings';
2
+ export declare const associateActionSettings: SchemaSettings<{}>;
@@ -0,0 +1,57 @@
1
+ import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
2
+ import * as __WEBPACK_EXTERNAL_MODULE__application_index_mjs__ from "../../../application/index.mjs";
3
+ import * as __WEBPACK_EXTERNAL_MODULE__application_schema_settings_SchemaSettings_mjs__ from "../../../application/schema-settings/SchemaSettings.mjs";
4
+ import * as __WEBPACK_EXTERNAL_MODULE__collection_manager_index_mjs__ from "../../../collection-manager/index.mjs";
5
+ import * as __WEBPACK_EXTERNAL_MODULE__schema_component_antd_action_Action_Designer_mjs__ from "../../../schema-component/antd/action/Action.Designer.mjs";
6
+ import * as __WEBPACK_EXTERNAL_MODULE__schema_items_index_mjs__ from "../../../schema-items/index.mjs";
7
+ import * as __WEBPACK_EXTERNAL_MODULE__schema_settings_SchemaSettings_mjs__ from "../../../schema-settings/SchemaSettings.mjs";
8
+ const associateActionSettings = new __WEBPACK_EXTERNAL_MODULE__application_schema_settings_SchemaSettings_mjs__.SchemaSettings({
9
+ name: 'actionSettings:associate',
10
+ items: [
11
+ {
12
+ name: 'editButton',
13
+ Component: __WEBPACK_EXTERNAL_MODULE__schema_component_antd_action_Action_Designer_mjs__.ButtonEditor,
14
+ useComponentProps () {
15
+ const { buttonEditorProps } = (0, __WEBPACK_EXTERNAL_MODULE__application_index_mjs__.useSchemaToolbar)();
16
+ return buttonEditorProps;
17
+ }
18
+ },
19
+ {
20
+ name: 'openMode',
21
+ Component: __WEBPACK_EXTERNAL_MODULE__schema_items_index_mjs__.SchemaSettingOpenModeSchemaItems,
22
+ componentProps: {
23
+ openMode: true,
24
+ openSize: true
25
+ }
26
+ },
27
+ {
28
+ name: 'enableChildCollections',
29
+ Component: __WEBPACK_EXTERNAL_MODULE__schema_settings_SchemaSettings_mjs__.SchemaSettingsEnableChildCollections,
30
+ useComponentProps () {
31
+ const { name } = (0, __WEBPACK_EXTERNAL_MODULE__collection_manager_index_mjs__.useCollection_deprecated)();
32
+ return {
33
+ collectionName: name
34
+ };
35
+ },
36
+ useVisible () {
37
+ const { name } = (0, __WEBPACK_EXTERNAL_MODULE__collection_manager_index_mjs__.useCollection_deprecated)();
38
+ const { getChildrenCollections } = (0, __WEBPACK_EXTERNAL_MODULE__collection_manager_index_mjs__.useCollectionManager_deprecated)();
39
+ const isChildCollectionAction = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>getChildrenCollections(name).length > 0, [
40
+ getChildrenCollections,
41
+ name
42
+ ]);
43
+ return isChildCollectionAction;
44
+ }
45
+ },
46
+ {
47
+ name: 'delete',
48
+ sort: 100,
49
+ Component: __WEBPACK_EXTERNAL_MODULE__schema_component_antd_action_Action_Designer_mjs__.RemoveButton,
50
+ useComponentProps () {
51
+ const { removeButtonProps } = (0, __WEBPACK_EXTERNAL_MODULE__application_index_mjs__.useSchemaToolbar)();
52
+ return removeButtonProps;
53
+ }
54
+ }
55
+ ]
56
+ });
57
+ export { associateActionSettings };
@@ -109,7 +109,8 @@ const commonItems = [
109
109
  'x-component-props': {
110
110
  style: {
111
111
  width: 260
112
- }
112
+ },
113
+ optionLabelProp: 'fullLabel'
113
114
  }
114
115
  },
115
116
  direction: {
@@ -1,5 +1,6 @@
1
1
  import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
2
2
  import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
3
+ import * as __WEBPACK_EXTERNAL_MODULE__tachybase_schema__ from "@tachybase/schema";
3
4
  import * as __WEBPACK_EXTERNAL_MODULE__ant_design_icons__ from "@ant-design/icons";
4
5
  import * as __WEBPACK_EXTERNAL_MODULE__application_index_mjs__ from "../../../../application/index.mjs";
5
6
  import * as __WEBPACK_EXTERNAL_MODULE__collection_manager_index_mjs__ from "../../../../collection-manager/index.mjs";
@@ -34,23 +35,27 @@ const RecordFormBlockInitializer = ()=>{
34
35
  };
35
36
  function useCreateEditFormBlock() {
36
37
  const { insert } = (0, __WEBPACK_EXTERNAL_MODULE__application_index_mjs__.useSchemaInitializer)();
38
+ const cm = (0, __WEBPACK_EXTERNAL_MODULE__data_source_index_mjs__.useCollectionManager)();
39
+ const fieldSchema = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useFieldSchema)();
40
+ const actionType = null == fieldSchema ? void 0 : fieldSchema['actionType'];
37
41
  const association = (0, __WEBPACK_EXTERNAL_MODULE__data_source_index_mjs__.useAssociationName)();
38
42
  const createEditFormBlock = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((param)=>{
39
43
  let { item } = param;
40
- const collectionName = item.collectionName || item.name;
41
- if (!association && item.associationField) {
44
+ const field = item.associationField;
45
+ const collectionName = (null == field ? void 0 : field.target) ? cm.getCollection(field.target).name : item.collectionName || item.name;
46
+ if (item.associationField) {
42
47
  const field = item.associationField;
43
48
  insert((0, __WEBPACK_EXTERNAL_MODULE__createEditFormBlockUISchema_mjs__.createEditFormBlockUISchema)({
44
49
  dataSource: item.dataSource,
45
50
  association: "".concat(field.collectionName, ".").concat(field.name)
46
51
  }));
47
- } else insert((0, __WEBPACK_EXTERNAL_MODULE__createEditFormBlockUISchema_mjs__.createEditFormBlockUISchema)(association ? {
52
+ } else insert((0, __WEBPACK_EXTERNAL_MODULE__createEditFormBlockUISchema_mjs__.createEditFormBlockUISchema)(association && !actionType ? {
48
53
  association,
49
54
  dataSource: item.dataSource,
50
55
  isCurrent: true
51
56
  } : {
52
- collectionName,
53
- dataSource: item.dataSource
57
+ dataSource: item.dataSource,
58
+ collectionName
54
59
  }));
55
60
  }, [
56
61
  association,
@@ -60,16 +65,18 @@ function useCreateEditFormBlock() {
60
65
  let { item } = param;
61
66
  if ('FormItem' !== item.template.componentName) return templateSchema;
62
67
  {
63
- const blockSchema = (0, __WEBPACK_EXTERNAL_MODULE__createEditFormBlockUISchema_mjs__.createEditFormBlockUISchema)(association ? {
64
- association,
65
- dataSource: item.dataSource,
66
- templateSchema: templateSchema,
67
- isCurrent: true
68
- } : {
69
- collectionName: item.collectionName || item.name,
68
+ const options = {
70
69
  dataSource: item.dataSource,
71
- templateSchema: templateSchema
72
- });
70
+ templateSchema
71
+ };
72
+ if (item.associationField) {
73
+ const field = item.associationField;
74
+ options.association = "".concat(field.collectionName, ".").concat(field.name);
75
+ } else if (association) {
76
+ options.association = association;
77
+ options.isCurrent = true;
78
+ } else options.collectionName = item.collectionName || item.name;
79
+ const blockSchema = (0, __WEBPACK_EXTERNAL_MODULE__createEditFormBlockUISchema_mjs__.createEditFormBlockUISchema)(options);
73
80
  if ('reference' === item.mode) blockSchema['x-template-key'] = item.template.key;
74
81
  return blockSchema;
75
82
  }
@@ -1,5 +1,5 @@
1
1
  import { ISchema } from '@tachybase/schema';
2
- interface EditFormBlockOptions {
2
+ export interface EditFormBlockOptions {
3
3
  dataSource: string;
4
4
  /** 如果传了 association 就不需要再传 collectionName 了 */
5
5
  collectionName?: string;
@@ -11,4 +11,3 @@ interface EditFormBlockOptions {
11
11
  isCurrent?: boolean;
12
12
  }
13
13
  export declare function createEditFormBlockUISchema(options: EditFormBlockOptions): ISchema;
14
- export {};
@@ -157,7 +157,8 @@ const gridCardBlockSettings = new __WEBPACK_EXTERNAL_MODULE__application_schema_
157
157
  'x-component-props': {
158
158
  style: {
159
159
  width: 260
160
- }
160
+ },
161
+ optionLabelProp: 'fullLabel'
161
162
  }
162
163
  },
163
164
  direction: {
@@ -101,7 +101,8 @@ const listBlockSettings = new __WEBPACK_EXTERNAL_MODULE__application_schema_sett
101
101
  'x-component-props': {
102
102
  style: {
103
103
  width: 260
104
- }
104
+ },
105
+ optionLabelProp: 'fullLabel'
105
106
  }
106
107
  },
107
108
  direction: {
@@ -44,6 +44,21 @@ const tableActionInitializers = new __WEBPACK_EXTERNAL_MODULE__application_schem
44
44
  ].includes(collection.template) || (null == collection ? void 0 : collection.writableView);
45
45
  }
46
46
  },
47
+ {
48
+ type: 'item',
49
+ title: "{{t('Associate')}}",
50
+ name: 'associate',
51
+ Component: 'AssociateActionInitializer',
52
+ useVisible () {
53
+ const collection = (0, __WEBPACK_EXTERNAL_MODULE__data_source_index_mjs__.useCollection)();
54
+ const props = (0, __WEBPACK_EXTERNAL_MODULE__data_source_index_mjs__.useDataBlockProps)();
55
+ return props.association && (![
56
+ 'view',
57
+ 'file',
58
+ 'sql'
59
+ ].includes(collection.template) || (null == collection ? void 0 : collection.writableView));
60
+ }
61
+ },
47
62
  {
48
63
  type: 'item',
49
64
  title: "{{t('Delete')}}",
@@ -228,7 +228,8 @@ const tableBlockSettings = new __WEBPACK_EXTERNAL_MODULE__application_schema_set
228
228
  'x-component-props': {
229
229
  style: {
230
230
  width: 260
231
- }
231
+ },
232
+ optionLabelProp: 'fullLabel'
232
233
  }
233
234
  },
234
235
  direction: {
@@ -112,12 +112,12 @@ const tableColumnSettings = new __WEBPACK_EXTERNAL_MODULE__application_schema_se
112
112
  name: 'sortable',
113
113
  type: 'switch',
114
114
  useVisible () {
115
- const collection = (0, __WEBPACK_EXTERNAL_MODULE__data_source_collection_CollectionProvider_mjs__.useCollection)();
115
+ (0, __WEBPACK_EXTERNAL_MODULE__data_source_collection_CollectionProvider_mjs__.useCollection)();
116
116
  const { collectionField } = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_table_v2_Table_Column_Decorator_mjs__.useColumnSchema)();
117
117
  const { getInterface } = (0, __WEBPACK_EXTERNAL_MODULE__collection_manager_index_mjs__.useCollectionManager_deprecated)();
118
118
  const interfaceCfg = getInterface(null == collectionField ? void 0 : collectionField.interface);
119
119
  const { currentMode } = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_association_field_hooks_mjs__.useAssociationFieldContext)();
120
- return (null == interfaceCfg ? void 0 : interfaceCfg.sortable) === true && !currentMode && (null == collection ? void 0 : collection.name) === (null == collectionField ? void 0 : collectionField.collectionName);
120
+ return (null == interfaceCfg ? void 0 : interfaceCfg.sortable) === true && !currentMode;
121
121
  },
122
122
  useComponentProps () {
123
123
  const field = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useField)();
@@ -162,7 +162,8 @@ const tableSelectorBlockSettings = new __WEBPACK_EXTERNAL_MODULE__application_sc
162
162
  'x-component-props': {
163
163
  style: {
164
164
  width: 260
165
- }
165
+ },
166
+ optionLabelProp: 'fullLabel'
166
167
  }
167
168
  },
168
169
  direction: {
@@ -72,7 +72,8 @@ const SchemaSettingsSortingRule = function(props) {
72
72
  'x-component-props': {
73
73
  style: {
74
74
  width: 260
75
- }
75
+ },
76
+ optionLabelProp: 'fullLabel'
76
77
  }
77
78
  },
78
79
  direction: {
@@ -24,6 +24,10 @@ const radioComponentFieldSettings = new __WEBPACK_EXTERNAL_MODULE__application_s
24
24
  {
25
25
  label: t('Radio group'),
26
26
  value: 'Radio group'
27
+ },
28
+ {
29
+ label: t('Select'),
30
+ value: 'Select'
27
31
  }
28
32
  ];
29
33
  const { dn } = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_index_mjs__.useDesignable)();