@tachybase/client 0.23.40 → 0.23.47

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 (114) hide show
  1. package/es/application/WebSocketClient.mjs +1 -1
  2. package/es/application/schema-settings/SchemaSettingsDefaults.mjs +10 -15
  3. package/es/block-provider/hooks/index.mjs +26 -7
  4. package/es/built-in/acl/Configuration/RolesResourcesActions.d.ts +1 -1
  5. package/es/built-in/acl/Configuration/StrategyActions.d.ts +1 -1
  6. package/es/collection-manager/interfaces/properties/index.mjs +1 -1
  7. package/es/data-source/collection-field/CollectionField.d.ts +1 -1
  8. package/es/data-source/data-source/DataSource.d.ts +3 -0
  9. package/es/modules/actions/disassociate/__e2e__/templatesOfPage.mjs +1 -1
  10. package/es/modules/actions/view-edit-popup/PopupActionInitializer.mjs +1 -1
  11. package/es/modules/actions/view-edit-popup/UpdateActionInitializer.mjs +1 -1
  12. package/es/modules/blocks/data-blocks/details-multi/__tests__/createDetailsBlockWithPagingUISchema.test.mjs +1 -1
  13. package/es/modules/blocks/data-blocks/details-single/__tests__/createDetailsBlockWithoutPagingUISchema.test.mjs +1 -1
  14. package/es/modules/blocks/data-blocks/form/__e2e__/form-create/schemaSettings.test.mjs +1 -1
  15. package/es/modules/blocks/data-blocks/form/__e2e__/form-create/templatesOfBug.mjs +12 -12
  16. package/es/modules/blocks/data-blocks/form/__tests__/createCreateFormBlockUISchema.test.mjs +1 -1
  17. package/es/modules/blocks/data-blocks/form/__tests__/createEditFormBlockUISchema.test.mjs +1 -1
  18. package/es/modules/blocks/data-blocks/table/__e2e__/templatesOfBug.mjs +2 -2
  19. package/es/modules/blocks/data-blocks/table/__tests__/createTableBLockSchema.test.mjs +1 -1
  20. package/es/modules/blocks/data-blocks/table-selector/__e2e__/templatesOfBug.mjs +2 -2
  21. package/es/modules/blocks/data-blocks/table-selector/__tests__/createTableSelectorSchema.test.mjs +1 -1
  22. package/es/modules/blocks/filter-blocks/collapse/__tests__/createCollapseBlockSchema.test.mjs +1 -1
  23. package/es/modules/blocks/filter-blocks/form/__tests__/createFilterFormBlockSchema.test.mjs +1 -1
  24. package/es/modules/dialog/__e2e__/templatesOfBug.mjs +9 -9
  25. package/es/modules/fields/component/CustomTitle/customTitleComponentFieldSettings.d.ts +2 -0
  26. package/es/modules/fields/component/CustomTitle/customTitleComponentFieldSettings.mjs +65 -0
  27. package/es/modules/fields/component/Select/selectComponentFieldSettings.d.ts +30 -0
  28. package/es/modules/fields/component/Select/selectComponentFieldSettings.mjs +62 -6
  29. package/es/schema-component/antd/action/Action.Designer.mjs +5 -7
  30. package/es/schema-component/antd/association-cascader/AssociationCascader.d.ts +1 -1
  31. package/es/schema-component/antd/association-cascader/AssociationCascader.mjs +1 -1
  32. package/es/schema-component/antd/association-field/AssociationSelect.d.ts +1 -1
  33. package/es/schema-component/antd/association-field/Editable.mjs +1 -1
  34. package/es/schema-component/antd/association-field/FileManager.d.ts +1 -1
  35. package/es/schema-component/antd/association-field/InternalCascader.mjs +2 -2
  36. package/es/schema-component/antd/association-field/InternalViewer.mjs +59 -4
  37. package/es/schema-component/antd/association-field/ReadPretty.mjs +2 -1
  38. package/es/schema-component/antd/association-field/SubTabs/InternalCollapse.mjs +2 -2
  39. package/es/schema-component/antd/association-field/schema.mjs +1 -1
  40. package/es/schema-component/antd/auto-complete/AutoComplete.d.ts +1 -1
  41. package/es/schema-component/antd/auto-complete/AutoComplete.mjs +1 -1
  42. package/es/schema-component/antd/cascader/Cascader.d.ts +1 -1
  43. package/es/schema-component/antd/checkbox/Checkbox.d.ts +1 -1
  44. package/es/schema-component/antd/collection-select/CollectionSelect.d.ts +5 -5
  45. package/es/schema-component/antd/color-picker/ColorPicker.d.ts +1 -1
  46. package/es/schema-component/antd/color-select/ColorSelect.d.ts +1 -1
  47. package/es/schema-component/antd/cron/CronSet.d.ts +1 -1
  48. package/es/schema-component/antd/custom-cascader/CustomCascader.d.ts +1 -1
  49. package/es/schema-component/antd/filter/FilterGroup.d.ts +1 -1
  50. package/es/schema-component/antd/form-item/FormItem.Settings.mjs +83 -2
  51. package/es/schema-component/antd/icon-picker/IconPicker.d.ts +1 -1
  52. package/es/schema-component/antd/menu/Menu.styles.mjs +4 -2
  53. package/es/schema-component/antd/nanoIDInput/NanoIDInput.d.ts +1 -1
  54. package/es/schema-component/antd/password/Password.d.ts +1 -1
  55. package/es/schema-component/antd/percent/Percent.d.ts +1 -1
  56. package/es/schema-component/antd/preview/Preview.d.ts +1 -1
  57. package/es/schema-component/antd/remote-select/RemoteSelect.d.ts +4 -4
  58. package/es/schema-component/antd/remote-select/RemoteSelect.mjs +7 -5
  59. package/es/schema-component/antd/rich-text/RichText.d.ts +1 -1
  60. package/es/schema-component/antd/select/FormulaSelect.mjs +3 -3
  61. package/es/schema-component/antd/select/Select.mjs +3 -1
  62. package/es/schema-component/antd/unixTimestamp/UnixTimestamp.d.ts +1 -1
  63. package/es/schema-component/antd/variable/TextArea.mjs +3 -1
  64. package/es/schema-component/antd/variable/Variable.d.ts +5 -5
  65. package/es/schema-component/hooks/useFieldModeOptions.mjs +8 -0
  66. package/es/schema-initializer/SchemaInitializerPlugin.mjs +1 -0
  67. package/es/schema-initializer/buttons/TabPaneInitializers.d.ts +1 -0
  68. package/es/schema-initializer/buttons/TabPaneInitializers.mjs +9 -1
  69. package/es/schema-settings/DateFormat/ExpiresRadio.d.ts +1 -1
  70. package/es/schema-settings/EditFormulaTitleField.mjs +7 -2
  71. package/es/schema-settings/SchemaSettingsPlugin.mjs +2 -0
  72. package/lib/application/WebSocketClient.js +1 -1
  73. package/lib/application/schema-settings/SchemaSettingsDefaults.js +10 -15
  74. package/lib/block-provider/hooks/index.js +26 -7
  75. package/lib/collection-manager/interfaces/properties/index.js +1 -1
  76. package/lib/modules/actions/disassociate/__e2e__/templatesOfPage.js +1 -1
  77. package/lib/modules/actions/view-edit-popup/PopupActionInitializer.js +1 -1
  78. package/lib/modules/actions/view-edit-popup/UpdateActionInitializer.js +1 -1
  79. package/lib/modules/blocks/data-blocks/details-multi/__tests__/createDetailsBlockWithPagingUISchema.test.js +1 -1
  80. package/lib/modules/blocks/data-blocks/details-single/__tests__/createDetailsBlockWithoutPagingUISchema.test.js +1 -1
  81. package/lib/modules/blocks/data-blocks/form/__e2e__/form-create/schemaSettings.test.js +1 -1
  82. package/lib/modules/blocks/data-blocks/form/__e2e__/form-create/templatesOfBug.js +12 -12
  83. package/lib/modules/blocks/data-blocks/form/__tests__/createCreateFormBlockUISchema.test.js +1 -1
  84. package/lib/modules/blocks/data-blocks/form/__tests__/createEditFormBlockUISchema.test.js +1 -1
  85. package/lib/modules/blocks/data-blocks/table/__e2e__/templatesOfBug.js +2 -2
  86. package/lib/modules/blocks/data-blocks/table/__tests__/createTableBLockSchema.test.js +1 -1
  87. package/lib/modules/blocks/data-blocks/table-selector/__e2e__/templatesOfBug.js +2 -2
  88. package/lib/modules/blocks/data-blocks/table-selector/__tests__/createTableSelectorSchema.test.js +1 -1
  89. package/lib/modules/blocks/filter-blocks/collapse/__tests__/createCollapseBlockSchema.test.js +1 -1
  90. package/lib/modules/blocks/filter-blocks/form/__tests__/createFilterFormBlockSchema.test.js +1 -1
  91. package/lib/modules/dialog/__e2e__/templatesOfBug.js +9 -9
  92. package/lib/modules/fields/component/CustomTitle/customTitleComponentFieldSettings.js +99 -0
  93. package/lib/modules/fields/component/Select/selectComponentFieldSettings.js +69 -6
  94. package/lib/schema-component/antd/action/Action.Designer.js +5 -7
  95. package/lib/schema-component/antd/association-cascader/AssociationCascader.js +1 -1
  96. package/lib/schema-component/antd/association-field/Editable.js +1 -1
  97. package/lib/schema-component/antd/association-field/InternalCascader.js +2 -2
  98. package/lib/schema-component/antd/association-field/InternalViewer.js +59 -4
  99. package/lib/schema-component/antd/association-field/ReadPretty.js +2 -1
  100. package/lib/schema-component/antd/association-field/SubTabs/InternalCollapse.js +2 -2
  101. package/lib/schema-component/antd/association-field/schema.js +1 -1
  102. package/lib/schema-component/antd/auto-complete/AutoComplete.js +1 -1
  103. package/lib/schema-component/antd/form-item/FormItem.Settings.js +83 -2
  104. package/lib/schema-component/antd/menu/Menu.styles.js +4 -2
  105. package/lib/schema-component/antd/remote-select/RemoteSelect.js +7 -5
  106. package/lib/schema-component/antd/select/FormulaSelect.js +3 -3
  107. package/lib/schema-component/antd/select/Select.js +3 -1
  108. package/lib/schema-component/antd/variable/TextArea.js +3 -1
  109. package/lib/schema-component/hooks/useFieldModeOptions.js +8 -0
  110. package/lib/schema-initializer/SchemaInitializerPlugin.js +1 -0
  111. package/lib/schema-initializer/buttons/TabPaneInitializers.js +9 -0
  112. package/lib/schema-settings/EditFormulaTitleField.js +7 -2
  113. package/lib/schema-settings/SchemaSettingsPlugin.js +2 -0
  114. package/package.json +8 -8
@@ -27,7 +27,9 @@ function _templateObject1() {
27
27
  }
28
28
  function _templateObject2() {
29
29
  const data = _tagged_template_literal([
30
- "\n height: 100%;\n overflow-y: auto;\n overflow-x: hidden;\n\n .ant-menu-submenu.ant-menu-submenu-inline .ant-menu-submenu-title {\n position: relative;\n ::before {\n content: '';\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n width: 3px;\n height: 50%;\n background-color: var(--colorPrimaryText);\n\n /* 使用 clip-path 裁剪为梯形 */\n clip-path: polygon(0 0, 100% 15%, 100% 85%, 0 100%);\n }\n }\n\n .ant-menu-item,\n .ant-menu-submenu-title {\n padding-inline-end: 10px;\n }\n\n .ant-menu-submenu-title {\n .ant-menu-title-content {\n > div {\n > .general-schema-designer {\n right: 6px !important;\n }\n > span.anticon {\n margin-right: 10px;\n }\n }\n }\n }\n "
30
+ "\n height: 100%;\n overflow-y: auto;\n overflow-x: hidden;\n\n .ant-menu-submenu.ant-menu-submenu-inline .ant-menu-submenu-title {\n position: relative;\n ::before {\n content: '';\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n width: 3px;\n height: 50%;\n background-color: ",
31
+ ";\n\n /* 使用 clip-path 裁剪为梯形 */\n clip-path: polygon(0 0, 100% 15%, 100% 85%, 0 100%);\n }\n }\n\n .ant-menu-submenu.ant-menu-submenu-inline.ant-menu-submenu-open > .ant-menu-submenu-title {\n ::before {\n background-color: ",
32
+ ";\n }\n }\n\n .ant-menu-item,\n .ant-menu-submenu-title {\n padding-inline-end: 10px;\n }\n\n .ant-menu-submenu-title {\n .ant-menu-title-content {\n > div {\n > .general-schema-designer {\n right: 6px !important;\n }\n > span.anticon {\n margin-right: 10px;\n }\n }\n }\n }\n "
31
33
  ]);
32
34
  _templateObject2 = function() {
33
35
  return data;
@@ -57,7 +59,7 @@ const useStyles = (0, __WEBPACK_EXTERNAL_MODULE_antd_style__.createStyles)((para
57
59
  return {
58
60
  subMenuDesignerCss: css(_templateObject()),
59
61
  designerCss: css(_templateObject1()),
60
- sideMenuClass: css(_templateObject2()),
62
+ sideMenuClass: css(_templateObject2(), token.colorBorder, token.colorPrimaryText),
61
63
  menuItemClass: css(_templateObject3()),
62
64
  headerMenuClass: css(_templateObject4())
63
65
  };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export declare const NanoIDInput: React.ForwardRefExoticComponent<Omit<Partial<import("antd").InputProps & React.RefAttributes<import("antd").InputRef>>, "ref"> & React.RefAttributes<unknown>> & {
2
+ export declare const NanoIDInput: React.ForwardRefExoticComponent<Omit<import("antd").InputProps & React.RefAttributes<import("antd").InputRef>, "ref"> & React.RefAttributes<import("antd").InputRef>> & {
3
3
  ReadPretty: (props: import("antd").InputProps & {
4
4
  ellipsis?: any;
5
5
  }) => import("react/jsx-runtime").JSX.Element;
@@ -3,5 +3,5 @@ import { PasswordProps } from 'antd/es/input';
3
3
  export interface IPasswordProps extends PasswordProps {
4
4
  checkStrength: boolean;
5
5
  }
6
- export declare const Password: React.ForwardRefExoticComponent<Partial<IPasswordProps> & React.RefAttributes<unknown>>;
6
+ export declare const Password: React.ForwardRefExoticComponent<IPasswordProps & React.RefAttributes<never>>;
7
7
  export default Password;
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const Percent: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
2
+ export declare const Percent: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
@@ -8,6 +8,6 @@ type Props = UploadProps & {
8
8
  onRemove?: (file: any) => void;
9
9
  onSelect?: () => void;
10
10
  };
11
- export declare const Preview: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
11
+ export declare const Preview: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
12
12
  export declare const FileSelector: (props: Props) => React.JSX.Element;
13
13
  export default Preview;
@@ -5,7 +5,7 @@ import { ReadPretty } from './ReadPretty';
5
5
  export type RemoteSelectProps<P = any> = SelectProps<P, any> & {
6
6
  objectValue?: boolean;
7
7
  onChange?: (v: any) => void;
8
- target: string;
8
+ target?: string;
9
9
  wait?: number;
10
10
  manual?: boolean;
11
11
  mapOptions?: (data: any) => RemoteSelectProps['fieldNames'];
@@ -14,10 +14,10 @@ export type RemoteSelectProps<P = any> = SelectProps<P, any> & {
14
14
  CustomDropdownRender?: (v: any) => any;
15
15
  optionFilter?: (option: any) => boolean;
16
16
  };
17
- declare const InternalRemoteSelect: React.ForwardRefExoticComponent<Partial<SelectProps<any, any> & {
17
+ declare const InternalRemoteSelect: React.ForwardRefExoticComponent<SelectProps<any, any> & {
18
18
  objectValue?: boolean;
19
19
  onChange?: (v: any) => void;
20
- target: string;
20
+ target?: string;
21
21
  wait?: number;
22
22
  manual?: boolean;
23
23
  mapOptions?: (data: any) => RemoteSelectProps["fieldNames"];
@@ -25,7 +25,7 @@ declare const InternalRemoteSelect: React.ForwardRefExoticComponent<Partial<Sele
25
25
  service: ResourceActionOptions<any>;
26
26
  CustomDropdownRender?: (v: any) => any;
27
27
  optionFilter?: (option: any) => boolean;
28
- }> & React.RefAttributes<unknown>>;
28
+ } & React.RefAttributes<never>>;
29
29
  export declare const RemoteSelect: typeof InternalRemoteSelect & {
30
30
  ReadPretty: typeof ReadPretty;
31
31
  };
@@ -91,15 +91,17 @@ const InternalRemoteSelect = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.c
91
91
  null == targetField ? void 0 : targetField.uiSchema,
92
92
  fieldNames
93
93
  ]);
94
+ const params = {
95
+ ...null == service ? void 0 : service.params,
96
+ filter: null == service ? void 0 : null === (_service_params = service.params) || void 0 === _service_params ? void 0 : _service_params.filter
97
+ };
98
+ if (fieldNames['formula']) params['paginate'] = false;
99
+ else params['pageSize'] = 200;
94
100
  const { data, run, loading } = (0, __WEBPACK_EXTERNAL_MODULE__api_client_index_mjs__.useRequest)({
95
101
  action: 'list',
96
102
  ...service,
97
103
  headers,
98
- params: {
99
- pageSize: fieldNames['formula'] ? 9999 : 200,
100
- ...null == service ? void 0 : service.params,
101
- filter: null == service ? void 0 : null === (_service_params = service.params) || void 0 === _service_params ? void 0 : _service_params.filter
102
- }
104
+ params
103
105
  }, {
104
106
  manual,
105
107
  debounceWait: wait
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const RichText: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
2
+ export declare const RichText: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
@@ -107,7 +107,7 @@ const useLabelOptions = (others)=>{
107
107
  resource: (null == collectionField ? void 0 : collectionField.target) || fieldSchema['collectionName'],
108
108
  action: 'list',
109
109
  params: {
110
- pageSize: 99999
110
+ paginate: false
111
111
  }
112
112
  };
113
113
  const regex = /{{(.*?)}}/g;
@@ -142,7 +142,7 @@ const useLabelOptions = (others)=>{
142
142
  const opvalue = opValue[match[1].split('.')[0]];
143
143
  const value = opvalue ? opValue[match[1].split('.')[0]][match[1].split('.')[1]] : '';
144
144
  valueOject[match[1]] = null != value ? value : '';
145
- } else valueOject[match[1]] = op[match[1]] || '';
145
+ } else valueOject[match[1]] = opValue[match[1]] || '';
146
146
  outputStr = replacePlaceholders(formula, valueOject);
147
147
  }
148
148
  });
@@ -169,7 +169,7 @@ const FormulaSelect = (props)=>{
169
169
  api.request({
170
170
  url: others.collection + ':list',
171
171
  params: {
172
- pageSize: 99999,
172
+ paginate: false,
173
173
  filter: filterField ? {
174
174
  ...filterField.filter
175
175
  } : {}
@@ -83,7 +83,9 @@ const InternalSelect = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.connect
83
83
  'multiple',
84
84
  'tags'
85
85
  ].includes(mode)) mode = void 0;
86
- if ('formula' in others.fieldNames || 'collection' in props) return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__FormulaSelect_mjs__["default"], {
86
+ if ([
87
+ 'CustomTitle'
88
+ ].includes(props.mode) && ('formula' in others.fieldNames || 'collection' in props)) return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__FormulaSelect_mjs__["default"], {
87
89
  ...props
88
90
  });
89
91
  if (objectValue) return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(ObjectSelect, {
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const UnixTimestamp: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
2
+ export declare const UnixTimestamp: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
@@ -140,7 +140,9 @@ function getCurrentRange(element) {
140
140
  return result;
141
141
  }
142
142
  function TextArea(props) {
143
- const { value = '', scope, onChange, multiline = true, changeOnSelect } = props;
143
+ const { value: propsValue, scope, onChange, multiline = true, changeOnSelect } = props;
144
+ const fieldSchema = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useFieldSchema)();
145
+ const value = propsValue || fieldSchema.default || '';
144
146
  const { styles } = (0, __WEBPACK_EXTERNAL_MODULE__style_mjs__.useStyles)({
145
147
  multiline
146
148
  });
@@ -6,10 +6,10 @@ export declare function VariableScopeProvider({ scope, children }: {
6
6
  export declare function useVariableScope(): any[];
7
7
  export declare function Variable(): any;
8
8
  export declare namespace Variable {
9
- var Input: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
10
- var TextArea: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
11
- var RawTextArea: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
12
- var JSON: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
13
- var CodeMirror: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
9
+ var Input: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
10
+ var TextArea: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
11
+ var RawTextArea: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
12
+ var JSON: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
13
+ var CodeMirror: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
14
14
  }
15
15
  export default Variable;
@@ -206,6 +206,10 @@ const useFieldModeOptions = (props)=>{
206
206
  label: t('Tag'),
207
207
  value: 'Tag'
208
208
  },
209
+ {
210
+ label: t('Custom Title'),
211
+ value: 'CustomTitle'
212
+ },
209
213
  !isTableField && {
210
214
  label: t('Sub-details'),
211
215
  value: 'Nester'
@@ -234,6 +238,10 @@ const useFieldModeOptions = (props)=>{
234
238
  {
235
239
  label: t('Cascader'),
236
240
  value: 'Cascader'
241
+ },
242
+ {
243
+ label: t('Custom Title'),
244
+ value: 'CustomTitle'
237
245
  }
238
246
  ];
239
247
  default:
@@ -124,6 +124,7 @@ class SchemaInitializerPlugin extends __WEBPACK_EXTERNAL_MODULE__application_Plu
124
124
  this.app.schemaInitializerManager.add(__WEBPACK_EXTERNAL_MODULE__buttons_index_mjs__.tabPaneInitializersForRecordBlock);
125
125
  this.app.schemaInitializerManager.add(__WEBPACK_EXTERNAL_MODULE__buttons_index_mjs__.tabPaneInitializersForBulkEditFormBlock);
126
126
  this.app.schemaInitializerManager.add(__WEBPACK_EXTERNAL_MODULE__modules_menu_menuItemInitializer_mjs__.menuItemInitializer);
127
+ this.app.schemaInitializerManager.add(__WEBPACK_EXTERNAL_MODULE__buttons_index_mjs__.tabPaneInitializers);
127
128
  }
128
129
  }
129
130
  export { SchemaInitializerPlugin };
@@ -6,6 +6,7 @@ export declare const TabPaneInitializersForBulkEditFormBlock: (props: any) => im
6
6
  * @deprecated
7
7
  */
8
8
  export declare const tabPaneInitializers_deprecated: SchemaInitializer<any, {}>;
9
+ export declare const tabPaneInitializers: SchemaInitializer<any, {}>;
9
10
  /**
10
11
  * @deprecated
11
12
  */
@@ -144,11 +144,19 @@ const TabPaneInitializersForBulkEditFormBlock = (props)=>/*#__PURE__*/ (0, __WEB
144
144
  ...props,
145
145
  isBulkEdit: true
146
146
  });
147
+ const commonOptions = {
148
+ Component: TabPaneInitializers,
149
+ popover: false
150
+ };
147
151
  const tabPaneInitializers_deprecated = new __WEBPACK_EXTERNAL_MODULE__application_schema_initializer_SchemaInitializer_mjs__.SchemaInitializer({
148
152
  name: 'TabPaneInitializers',
149
153
  Component: TabPaneInitializers,
150
154
  popover: false
151
155
  });
156
+ const tabPaneInitializers = new __WEBPACK_EXTERNAL_MODULE__application_schema_initializer_SchemaInitializer_mjs__.SchemaInitializer({
157
+ name: 'popup:addTab',
158
+ ...commonOptions
159
+ });
152
160
  const tabPaneInitializersForRecordBlock = new __WEBPACK_EXTERNAL_MODULE__application_schema_initializer_SchemaInitializer_mjs__.SchemaInitializer({
153
161
  name: 'TabPaneInitializersForCreateFormBlock',
154
162
  Component: TabPaneInitializersForCreateFormBlock,
@@ -159,4 +167,4 @@ const tabPaneInitializersForBulkEditFormBlock = new __WEBPACK_EXTERNAL_MODULE__a
159
167
  Component: TabPaneInitializersForBulkEditFormBlock,
160
168
  popover: false
161
169
  });
162
- export { TabPaneInitializers, TabPaneInitializersForBulkEditFormBlock, TabPaneInitializersForCreateFormBlock, tabPaneInitializersForBulkEditFormBlock, tabPaneInitializersForRecordBlock, tabPaneInitializers_deprecated };
170
+ export { TabPaneInitializers, TabPaneInitializersForBulkEditFormBlock, TabPaneInitializersForCreateFormBlock, tabPaneInitializers, tabPaneInitializersForBulkEditFormBlock, tabPaneInitializersForRecordBlock, tabPaneInitializers_deprecated };
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  export declare const DateFormatCom: (props?: any) => import("react/jsx-runtime").JSX.Element;
3
- declare const ExpiresRadio: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
3
+ declare const ExpiresRadio: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
4
4
  export { ExpiresRadio };
@@ -9,7 +9,9 @@ function useFormulaTitleOptions() {
9
9
  const compile = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_index_mjs__.useCompile)();
10
10
  const { getCollectionJoinField, getCollectionFields } = (0, __WEBPACK_EXTERNAL_MODULE__collection_manager_index_mjs__.useCollectionManager_deprecated)();
11
11
  const { getField } = (0, __WEBPACK_EXTERNAL_MODULE__collection_manager_index_mjs__.useCollection_deprecated)();
12
- const fieldSchema = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useFieldSchema)();
12
+ const { fieldSchema: tableColumnSchema } = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_index_mjs__.useColumnSchema)();
13
+ const schema = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useFieldSchema)();
14
+ const fieldSchema = tableColumnSchema || schema;
13
15
  const collectionManage = (0, __WEBPACK_EXTERNAL_MODULE__collection_manager_index_mjs__.useCollectionManager_deprecated)();
14
16
  const collectionManageField = collectionManage.collections.filter((value)=>value.name === fieldSchema['x-decorator-props'])[0];
15
17
  const collectionField = getField(fieldSchema['name']) || getCollectionJoinField(fieldSchema['x-collection-field']);
@@ -18,7 +20,10 @@ function useFormulaTitleOptions() {
18
20
  else if (collectionManageField) fields = collectionManageField['fields'];
19
21
  const options = [];
20
22
  null == fields || fields.forEach((field)=>{
21
- if ('m2m' !== field.interface) {
23
+ if (![
24
+ 'm2m',
25
+ 'o2m'
26
+ ].includes(field.interface)) {
22
27
  if (field.uiSchema) {
23
28
  var _getCollectionFields;
24
29
  var _getCollectionFields_filter_map;
@@ -36,6 +36,7 @@ import * as __WEBPACK_EXTERNAL_MODULE__modules_blocks_other_blocks_markdown_mark
36
36
  import * as __WEBPACK_EXTERNAL_MODULE__modules_fields_component_Cascader_cascaderComponentFieldSettings_mjs__ from "../modules/fields/component/Cascader/cascaderComponentFieldSettings.mjs";
37
37
  import * as __WEBPACK_EXTERNAL_MODULE__modules_fields_component_CascadeSelect_cascadeSelectComponentFieldSettings_mjs__ from "../modules/fields/component/CascadeSelect/cascadeSelectComponentFieldSettings.mjs";
38
38
  import * as __WEBPACK_EXTERNAL_MODULE__modules_fields_component_Checkbox_checkboxComponentFieldSettings_mjs__ from "../modules/fields/component/Checkbox/checkboxComponentFieldSettings.mjs";
39
+ import * as __WEBPACK_EXTERNAL_MODULE__modules_fields_component_CustomTitle_customTitleComponentFieldSettings_mjs__ from "../modules/fields/component/CustomTitle/customTitleComponentFieldSettings.mjs";
39
40
  import * as __WEBPACK_EXTERNAL_MODULE__modules_fields_component_DatePicker_datePickerComponentFieldSettings_mjs__ from "../modules/fields/component/DatePicker/datePickerComponentFieldSettings.mjs";
40
41
  import * as __WEBPACK_EXTERNAL_MODULE__modules_fields_component_DrawerSubTable_drawerSubTableComponentFieldSettings_mjs__ from "../modules/fields/component/DrawerSubTable/drawerSubTableComponentFieldSettings.mjs";
41
42
  import * as __WEBPACK_EXTERNAL_MODULE__modules_fields_component_FileManager_fileManagerComponentFieldSettings_mjs__ from "../modules/fields/component/FileManager/fileManagerComponentFieldSettings.mjs";
@@ -100,6 +101,7 @@ class SchemaSettingsPlugin extends __WEBPACK_EXTERNAL_MODULE__application_Plugin
100
101
  this.schemaSettingsManager.add(__WEBPACK_EXTERNAL_MODULE__modules_fields_component_InputNumber_inputNumberComponentFieldSettings_mjs__.inputNumberComponentFieldSettings);
101
102
  this.schemaSettingsManager.add(__WEBPACK_EXTERNAL_MODULE__modules_fields_component_Checkbox_checkboxComponentFieldSettings_mjs__.checkboxComponentFieldSettings);
102
103
  this.schemaSettingsManager.add(__WEBPACK_EXTERNAL_MODULE__modules_fields_component_Radio_radioComponentFieldSettings_mjs__.radioComponentFieldSettings);
104
+ this.schemaSettingsManager.add(__WEBPACK_EXTERNAL_MODULE__modules_fields_component_CustomTitle_customTitleComponentFieldSettings_mjs__.CustomTitleComponentFieldSettings);
103
105
  this.schemaSettingsManager.add(__WEBPACK_EXTERNAL_MODULE__modules_fields_component_FileManager_fileManagerComponentFieldSettings_mjs__.fileManagerComponentFieldSettings);
104
106
  this.schemaSettingsManager.add(__WEBPACK_EXTERNAL_MODULE__modules_fields_component_Tag_tagComponentFieldSettings_mjs__.tagComponentFieldSettings);
105
107
  this.schemaSettingsManager.add(__WEBPACK_EXTERNAL_MODULE__modules_fields_component_CascadeSelect_cascadeSelectComponentFieldSettings_mjs__.cascadeSelectComponentFieldSettings);
@@ -48,7 +48,7 @@ class WebSocketClient {
48
48
  const apiBaseURL = null == options ? void 0 : null === (_options_apiClient = options.apiClient) || void 0 === _options_apiClient ? void 0 : _options_apiClient['baseURL'];
49
49
  if (!apiBaseURL) return;
50
50
  const subApp = (0, sdk_namespaceObject.getSubAppName)(this.app.getPublicPath());
51
- const queryString = subApp ? "?__appName=".concat(subApp) : '';
51
+ const queryString = subApp ? "?__appName=".concat(subApp) : "?__hostname=".concat(window.location.hostname);
52
52
  const wsPath = this.options.basename || '/ws';
53
53
  if (this.options.url) {
54
54
  const url = new URL(this.options.url);
@@ -162,20 +162,17 @@ const defaultSettingItems = [
162
162
  refresh,
163
163
  fieldSchema
164
164
  ]);
165
- const { data } = (0, index_js_namespaceObject.useRequest)(async ()=>{
166
- const { data } = await api.request({
167
- url: "/uiSchemas:getJsonSchema/".concat(fieldSchema['x-uid'], "?includeAsyncNode=true")
168
- });
169
- return data;
170
- });
171
165
  return {
172
166
  width: '800px',
173
- disabled: !data,
174
- schema: ()=>{
175
- if (!data) return {
176
- title: t('Edit loading.')
177
- };
167
+ asyncGetInitialValues: async ()=>{
168
+ const { data } = await api.request({
169
+ url: "/uiSchemas:getJsonSchema/".concat(fieldSchema['x-uid'], "?includeAsyncNode=true")
170
+ });
178
171
  return {
172
+ schema: JSON.stringify((null == data ? void 0 : data.data) || {}, null, 2)
173
+ };
174
+ },
175
+ schema: ()=>({
179
176
  type: 'object',
180
177
  title: t('Edit'),
181
178
  properties: {
@@ -183,7 +180,6 @@ const defaultSettingItems = [
183
180
  type: 'string',
184
181
  title: '{{ t("Schema") }}',
185
182
  required: true,
186
- default: JSON.stringify((null == data ? void 0 : data.data) || {}, null, 2),
187
183
  'x-decorator': 'FormItem',
188
184
  'x-component': 'CodeMirror',
189
185
  'x-component-props': {
@@ -192,9 +188,8 @@ const defaultSettingItems = [
192
188
  }
193
189
  }
194
190
  }
195
- };
196
- },
197
- title: data ? t('Edit') : t('Loading'),
191
+ }),
192
+ title: t('Edit'),
198
193
  onSubmit: async (param)=>{
199
194
  let { schema } = param;
200
195
  dn.emit('patch', {
@@ -734,6 +734,7 @@ const useFilterBlockActionProps = ()=>{
734
734
  async onClick () {
735
735
  const { targets = [], uid } = findFilterTargets(fieldSchema);
736
736
  actionField.data.loading = true;
737
+ let prevMergedFilter = {};
737
738
  try {
738
739
  await Promise.all(getDataBlocks().map(async (block)=>{
739
740
  var _block_service_params, _block_service_params_, _block_service_params1, _Object_keys;
@@ -764,8 +765,10 @@ const useFilterBlockActionProps = ()=>{
764
765
  const mergedFilter = (0, _filter_provider_utils__WEBPACK_IMPORTED_MODULE_15__.mergeFilter)([
765
766
  ...Object.values(storedFilter).map((filter)=>(0, _schema_component__WEBPACK_IMPORTED_MODULE_17__.removeNullCondition)(filter)),
766
767
  block.defaultFilter,
767
- filter.customFilter
768
+ filter.customFilter,
769
+ prevMergedFilter
768
770
  ]);
771
+ prevMergedFilter = mergedFilter;
769
772
  if ('manual' === block.dataLoadingMode && lodash__WEBPACK_IMPORTED_MODULE_4___default().isEmpty(mergedFilter)) return block.clearData();
770
773
  return block.doFilter({
771
774
  ...param,
@@ -1438,7 +1441,7 @@ const useAssociationNames = (dataSource)=>{
1438
1441
  const fieldSchema = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useFieldSchema)();
1439
1442
  const _getAssociationAppends = (schema, str)=>{
1440
1443
  schema.reduceProperties((pre, s)=>{
1441
- var _s_xcomponentprops, _s_xcomponentprops1, _getCollection;
1444
+ var _s_xcomponentprops, _s_xcomponentprops_fieldNames, _s_xcomponentprops1, _s_xcomponentprops2, _getCollection;
1442
1445
  const prefix = pre || str;
1443
1446
  const collectionField = s['x-collection-field'] && getCollectionJoinField(s['x-collection-field'], dataSource);
1444
1447
  const isAssociationSubfield = s.name.includes('.');
@@ -1449,11 +1452,27 @@ const useAssociationNames = (dataSource)=>{
1449
1452
  'belongsToMany'
1450
1453
  ].includes(collectionField.type);
1451
1454
  if (null === (_s_xcomponentprops = s['x-component-props']) || void 0 === _s_xcomponentprops ? void 0 : _s_xcomponentprops['appends']) {
1452
- var _s_xcomponentprops2;
1453
- lodash__WEBPACK_IMPORTED_MODULE_4___default().forEach(null === (_s_xcomponentprops2 = s['x-component-props']) || void 0 === _s_xcomponentprops2 ? void 0 : _s_xcomponentprops2['appends'], (append)=>{
1455
+ var _s_xcomponentprops3;
1456
+ lodash__WEBPACK_IMPORTED_MODULE_4___default().forEach(null === (_s_xcomponentprops3 = s['x-component-props']) || void 0 === _s_xcomponentprops3 ? void 0 : _s_xcomponentprops3['appends'], (append)=>{
1454
1457
  appends.add(append);
1455
1458
  });
1456
1459
  }
1460
+ if (null === (_s_xcomponentprops1 = s['x-component-props']) || void 0 === _s_xcomponentprops1 ? void 0 : null === (_s_xcomponentprops_fieldNames = _s_xcomponentprops1.fieldNames) || void 0 === _s_xcomponentprops_fieldNames ? void 0 : _s_xcomponentprops_fieldNames.formula) {
1461
+ var _s_xcomponentprops_fieldNames1, _s_xcomponentprops4;
1462
+ appends.add(s['name']);
1463
+ const regex = /{{(.*?)}}/g;
1464
+ const formula = null === (_s_xcomponentprops4 = s['x-component-props']) || void 0 === _s_xcomponentprops4 ? void 0 : null === (_s_xcomponentprops_fieldNames1 = _s_xcomponentprops4.fieldNames) || void 0 === _s_xcomponentprops_fieldNames1 ? void 0 : _s_xcomponentprops_fieldNames1.formula;
1465
+ let match;
1466
+ while(match = regex.exec(formula))if (match[1].includes('.')) {
1467
+ const matchList = match[1].split('.');
1468
+ let appendsValue = s['name'];
1469
+ matchList.forEach((item, index)=>{
1470
+ if (index === matchList.length - 1) return;
1471
+ appendsValue += '.' + item;
1472
+ appends.add(appendsValue);
1473
+ });
1474
+ }
1475
+ }
1457
1476
  if (s['x-linkage-rules']) {
1458
1477
  const collectAppends = (obj)=>{
1459
1478
  const type = Object.keys(obj)[0] || '$and';
@@ -1470,7 +1489,7 @@ const useAssociationNames = (dataSource)=>{
1470
1489
  collectAppends(condition);
1471
1490
  });
1472
1491
  }
1473
- if (null === (_s_xcomponentprops1 = s['x-component-props']) || void 0 === _s_xcomponentprops1 ? void 0 : _s_xcomponentprops1['x-next-title']) {
1492
+ if (null === (_s_xcomponentprops2 = s['x-component-props']) || void 0 === _s_xcomponentprops2 ? void 0 : _s_xcomponentprops2['x-next-title']) {
1474
1493
  const pre = prefix && '' !== prefix ? prefix + '.' + s.name : s.name;
1475
1494
  const title = s['x-component-props']['x-next-title'];
1476
1495
  const path = pre + '.' + title.label;
@@ -1478,7 +1497,7 @@ const useAssociationNames = (dataSource)=>{
1478
1497
  }
1479
1498
  const isTreeCollection = isAssociationField && (null === (_getCollection = getCollection(collectionField.target, dataSource)) || void 0 === _getCollection ? void 0 : _getCollection.template) === 'tree';
1480
1499
  if (collectionField && (isAssociationField || isAssociationSubfield) && 'TableField' !== s['x-component']) {
1481
- var _s_xcomponentprops3;
1500
+ var _s_xcomponentprops5;
1482
1501
  const fieldPath = !isAssociationField && isAssociationSubfield ? getAssociationPath(s.name) : s.name;
1483
1502
  const path = '' !== prefix && prefix ? prefix + '.' + fieldPath : fieldPath;
1484
1503
  if (isTreeCollection) {
@@ -1489,7 +1508,7 @@ const useAssociationNames = (dataSource)=>{
1489
1508
  'Nester',
1490
1509
  'SubTable',
1491
1510
  'PopoverNester'
1492
- ].includes(null === (_s_xcomponentprops3 = s['x-component-props']) || void 0 === _s_xcomponentprops3 ? void 0 : _s_xcomponentprops3.mode)) {
1511
+ ].includes(null === (_s_xcomponentprops5 = s['x-component-props']) || void 0 === _s_xcomponentprops5 ? void 0 : _s_xcomponentprops5.mode)) {
1493
1512
  updateAssociationValues.add(path);
1494
1513
  const bufPrefix = prefix && '' !== prefix ? prefix + '.' + s.name : s.name;
1495
1514
  _getAssociationAppends(s, bufPrefix);
@@ -501,7 +501,7 @@ const recordPickerViewer = {
501
501
  type: 'void',
502
502
  'x-component': 'Tabs',
503
503
  'x-component-props': {},
504
- 'x-initializer': 'TabPaneInitializers',
504
+ 'x-initializer': 'popup:addTab',
505
505
  properties: {
506
506
  tab1: {
507
507
  type: 'void',
@@ -187,7 +187,7 @@ const disassociatePage = {
187
187
  type: 'void',
188
188
  'x-component': 'Tabs',
189
189
  'x-component-props': {},
190
- 'x-initializer': 'TabPaneInitializers',
190
+ 'x-initializer': 'popup:addTab',
191
191
  properties: {
192
192
  tab1: {
193
193
  _isJSONSchemaObject: true,
@@ -56,7 +56,7 @@ const PopupActionInitializer = (props)=>{
56
56
  type: 'void',
57
57
  'x-component': 'Tabs',
58
58
  'x-component-props': {},
59
- 'x-initializer': 'TabPaneInitializers',
59
+ 'x-initializer': 'popup:addTab',
60
60
  properties: {
61
61
  tab1: {
62
62
  type: 'void',
@@ -56,7 +56,7 @@ const UpdateActionInitializer = (props)=>{
56
56
  type: 'void',
57
57
  'x-component': 'Tabs',
58
58
  'x-component-props': {},
59
- 'x-initializer': 'TabPaneInitializers',
59
+ 'x-initializer': 'popup:addTab',
60
60
  properties: {
61
61
  tab1: {
62
62
  type: 'void',
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  var __webpack_exports__ = {};
3
3
  const external_createDetailsWithPaginationUISchema_js_namespaceObject = require("../createDetailsWithPaginationUISchema.js");
4
- vi.mock('@formily/shared', ()=>({
4
+ vi.mock('@tachybase/schema', ()=>({
5
5
  uid: vi.fn().mockReturnValue('mocked-uid')
6
6
  }));
7
7
  describe('createDetailsBlockWithPaginationUISchema', ()=>{
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  var __webpack_exports__ = {};
3
3
  const external_createDetailsUISchema_js_namespaceObject = require("../createDetailsUISchema.js");
4
- vi.mock('@formily/shared', ()=>({
4
+ vi.mock('@tachybase/schema', ()=>({
5
5
  uid: ()=>'fixed-uid'
6
6
  }));
7
7
  describe('createDetailsBlockWithoutPagingUISchema', ()=>{
@@ -1060,7 +1060,7 @@ e2e_namespaceObject.test.describe('creation form block schema settings', ()=>{
1060
1060
  type: 'void',
1061
1061
  'x-component': 'Tabs',
1062
1062
  'x-component-props': {},
1063
- 'x-initializer': 'TabPaneInitializers',
1063
+ 'x-initializer': 'popup:addTab',
1064
1064
  properties: {
1065
1065
  tab1: {
1066
1066
  _isJSONSchemaObject: true,