@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
@@ -0,0 +1,65 @@
1
+ import * as __WEBPACK_EXTERNAL_MODULE__application_schema_settings_SchemaSettings_mjs__ from "../../../../application/schema-settings/SchemaSettings.mjs";
2
+ import * as __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__ from "../../../../schema-component/antd/form-item/FormItem.Settings.mjs";
3
+ import * as __WEBPACK_EXTERNAL_MODULE__schema_component_antd_table_v2_Table_Column_Decorator_mjs__ from "../../../../schema-component/antd/table-v2/Table.Column.Decorator.mjs";
4
+ import * as __WEBPACK_EXTERNAL_MODULE__schema_settings_hooks_useIsShowMultipleSwitch_mjs__ from "../../../../schema-settings/hooks/useIsShowMultipleSwitch.mjs";
5
+ import * as __WEBPACK_EXTERNAL_MODULE__Select_selectComponentFieldSettings_mjs__ from "../Select/selectComponentFieldSettings.mjs";
6
+ const CustomTitleComponentFieldSettings = new __WEBPACK_EXTERNAL_MODULE__application_schema_settings_SchemaSettings_mjs__.SchemaSettings({
7
+ name: 'fieldSettings:component:CustomTitle',
8
+ items: [
9
+ {
10
+ ...__WEBPACK_EXTERNAL_MODULE__Select_selectComponentFieldSettings_mjs__.fieldComponent,
11
+ useVisible: __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__.useIsMuiltipleAble
12
+ },
13
+ {
14
+ ...__WEBPACK_EXTERNAL_MODULE__Select_selectComponentFieldSettings_mjs__.CustomTitle,
15
+ useVisible: __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__.useIsMuiltipleAble
16
+ },
17
+ {
18
+ ...__WEBPACK_EXTERNAL_MODULE__Select_selectComponentFieldSettings_mjs__.setTheDataScope,
19
+ useVisible () {
20
+ const isSelectFieldMode = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__.useIsSelectFieldMode)();
21
+ const isFieldReadPretty = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__.useIsFieldReadPretty)();
22
+ return isSelectFieldMode && !isFieldReadPretty;
23
+ }
24
+ },
25
+ {
26
+ ...__WEBPACK_EXTERNAL_MODULE__Select_selectComponentFieldSettings_mjs__.setDefaultSortingRules,
27
+ useComponentProps () {
28
+ const { fieldSchema } = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_table_v2_Table_Column_Decorator_mjs__.useColumnSchema)();
29
+ return {
30
+ fieldSchema
31
+ };
32
+ },
33
+ useVisible () {
34
+ const isSelectFieldMode = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__.useIsSelectFieldMode)();
35
+ const isFieldReadPretty = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__.useIsFieldReadPretty)();
36
+ return isSelectFieldMode && !isFieldReadPretty;
37
+ }
38
+ },
39
+ {
40
+ ...__WEBPACK_EXTERNAL_MODULE__Select_selectComponentFieldSettings_mjs__.quickCreate,
41
+ useVisible () {
42
+ const isAssociationField = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__.useIsAssociationField)();
43
+ const readPretty = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__.useIsFieldReadPretty)();
44
+ const { fieldSchema } = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_table_v2_Table_Column_Decorator_mjs__.useColumnSchema)();
45
+ return isAssociationField && !fieldSchema && !readPretty;
46
+ }
47
+ },
48
+ {
49
+ ...__WEBPACK_EXTERNAL_MODULE__Select_selectComponentFieldSettings_mjs__.allowMultiple,
50
+ useVisible () {
51
+ const isAssociationField = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__.useIsAssociationField)();
52
+ const IsShowMultipleSwitch = (0, __WEBPACK_EXTERNAL_MODULE__schema_settings_hooks_useIsShowMultipleSwitch_mjs__.useIsShowMultipleSwitch)();
53
+ return isAssociationField && IsShowMultipleSwitch();
54
+ }
55
+ },
56
+ {
57
+ ...__WEBPACK_EXTERNAL_MODULE__Select_selectComponentFieldSettings_mjs__.enableLink,
58
+ useVisible () {
59
+ const readPretty = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__.useIsFieldReadPretty)();
60
+ return (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__.useIsAssociationField)() && readPretty;
61
+ }
62
+ }
63
+ ]
64
+ });
65
+ export { CustomTitleComponentFieldSettings };
@@ -1,3 +1,33 @@
1
+ import { ISchema } from '@tachybase/schema';
1
2
  import { SchemaSettings } from '../../../../application/schema-settings/SchemaSettings';
3
+ export declare const enableLink: {
4
+ name: string;
5
+ type: string;
6
+ useVisible(): boolean;
7
+ useComponentProps(): {
8
+ title: string;
9
+ checked: boolean;
10
+ onChange(flag: any): void;
11
+ };
12
+ };
13
+ export declare const titleField: any;
2
14
  export declare const allowMultiple: any;
15
+ export declare const quickCreate: any;
16
+ export declare const setDefaultSortingRules: {
17
+ name: string;
18
+ Component: (props: any) => import("react/jsx-runtime").JSX.Element;
19
+ };
20
+ export declare const setTheDataScope: any;
21
+ export declare const fieldComponent: any;
22
+ export declare const CustomTitle: {
23
+ name: string;
24
+ type: string;
25
+ useComponentProps(): {
26
+ title: string;
27
+ schema: ISchema;
28
+ onSubmit: ({ formula }: {
29
+ formula: any;
30
+ }) => void;
31
+ };
32
+ };
3
33
  export declare const selectComponentFieldSettings: SchemaSettings<{}>;
@@ -325,6 +325,67 @@ const fieldComponent = {
325
325
  };
326
326
  }
327
327
  };
328
+ const CustomTitle = {
329
+ name: 'customTitle',
330
+ type: 'modal',
331
+ useComponentProps () {
332
+ var _fieldSchema_xcomponentprops_fieldNames, _fieldSchema_xcomponentprops;
333
+ const schema = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useFieldSchema)();
334
+ const { fieldSchema: tableColumnSchema } = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_table_v2_Table_Column_Decorator_mjs__.useColumnSchema)();
335
+ const fieldSchema = tableColumnSchema || schema;
336
+ const { t } = (0, __WEBPACK_EXTERNAL_MODULE_react_i18next__.useTranslation)();
337
+ const { dn } = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_index_mjs__.useDesignable)();
338
+ const options = (0, __WEBPACK_EXTERNAL_MODULE__schema_settings_index_mjs__.useFormulaTitleOptions)();
339
+ const def = null === (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) || void 0 === _fieldSchema_xcomponentprops ? void 0 : null === (_fieldSchema_xcomponentprops_fieldNames = _fieldSchema_xcomponentprops.fieldNames) || void 0 === _fieldSchema_xcomponentprops_fieldNames ? void 0 : _fieldSchema_xcomponentprops_fieldNames.formula;
340
+ const field = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useField)();
341
+ return {
342
+ title: t('Custom option label'),
343
+ schema: {
344
+ type: 'object',
345
+ title: t('Custom option label'),
346
+ properties: {
347
+ formula: {
348
+ required: true,
349
+ 'x-decorator': 'FormItem',
350
+ 'x-component': 'Variable.TextArea',
351
+ 'x-component-props': {
352
+ scope: options
353
+ },
354
+ default: def
355
+ }
356
+ }
357
+ },
358
+ onSubmit: (param)=>{
359
+ let { formula } = param;
360
+ if (formula) {
361
+ var _fieldSchema_xcomponentprops, _field_componentProps;
362
+ const componentProps = {
363
+ ...fieldSchema['x-component-props'],
364
+ fieldNames: {
365
+ ...null === (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) || void 0 === _fieldSchema_xcomponentprops ? void 0 : _fieldSchema_xcomponentprops['fieldNames'],
366
+ formula
367
+ }
368
+ };
369
+ field.componentProps = {
370
+ ...field.componentProps,
371
+ fieldNames: {
372
+ ...null === (_field_componentProps = field.componentProps) || void 0 === _field_componentProps ? void 0 : _field_componentProps.fieldNames,
373
+ formula
374
+ }
375
+ };
376
+ fieldSchema['x-component-props'] = componentProps;
377
+ dn.emit('patch', {
378
+ schema: {
379
+ 'x-uid': fieldSchema['x-uid'],
380
+ 'x-component-props': componentProps
381
+ }
382
+ });
383
+ }
384
+ dn.refresh();
385
+ }
386
+ };
387
+ }
388
+ };
328
389
  const selectComponentFieldSettings = new __WEBPACK_EXTERNAL_MODULE__application_schema_settings_SchemaSettings_mjs__.SchemaSettings({
329
390
  name: 'fieldSettings:component:Select',
330
391
  items: [
@@ -381,12 +442,7 @@ const selectComponentFieldSettings = new __WEBPACK_EXTERNAL_MODULE__application_
381
442
  const readPretty = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__.useIsFieldReadPretty)();
382
443
  return (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__.useIsAssociationField)() && readPretty;
383
444
  }
384
- },
385
- {
386
- name: 'formulatitleField',
387
- Component: __WEBPACK_EXTERNAL_MODULE__schema_settings_index_mjs__.EditFormulaTitleField,
388
- useVisible: __WEBPACK_EXTERNAL_MODULE__schema_settings_index_mjs__.useFormulaTitleVisible
389
445
  }
390
446
  ]
391
447
  });
392
- export { allowMultiple, selectComponentFieldSettings };
448
+ export { CustomTitle, allowMultiple, enableLink, fieldComponent, quickCreate, selectComponentFieldSettings, setDefaultSortingRules, setTheDataScope, titleField };
@@ -254,7 +254,7 @@ function WorkflowSelectComponent(param) {
254
254
  const [workflowCollection, setWorkflowCollection] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)((0, __WEBPACK_EXTERNAL_MODULE__collection_manager_index_mjs__.joinCollectionName)(dataSourceKey, baseCollection.name));
255
255
  const compile = (0, __WEBPACK_EXTERNAL_MODULE__index_mjs__.useCompile)();
256
256
  const workflowPlugin = (0, __WEBPACK_EXTERNAL_MODULE__application_hooks_index_mjs__.usePlugin)('workflow');
257
- const workflowTypes = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>workflowPlugin.getTriggersOptions().filter((item)=>'function' == typeof item.options.isActionTriggerable || true === item.options.isActionTriggerable).map((item)=>item.value), [
257
+ (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>workflowPlugin.getTriggersOptions().filter((item)=>'function' == typeof item.options.isActionTriggerable || true === item.options.isActionTriggerable).map((item)=>item.value), [
258
258
  workflowPlugin
259
259
  ]);
260
260
  (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useFormEffects)(()=>{
@@ -307,13 +307,11 @@ function WorkflowSelectComponent(param) {
307
307
  action: 'list',
308
308
  params: {
309
309
  filter: {
310
- type: workflowTypes,
311
- enabled: true,
310
+ type: void 0 === props.filterType ? void 0 : props.filterType,
311
+ enabled: void 0 === props.filterEnabled || props.filterEnabled,
312
312
  'config.collection': noCollection ? void 0 : workflowCollection,
313
- sync: props.parentSync ? props.parentSync : void 0,
314
- key: props.parentKey ? {
315
- $ne: props.parentKey
316
- } : void 0
313
+ sync: void 0 === props.filterSync ? void 0 : props.filterSync,
314
+ key: void 0 === props.filterKey ? void 0 : props.filterKey
317
315
  }
318
316
  }
319
317
  },
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export declare const AssociationCascader: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
2
+ export declare const AssociationCascader: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
3
3
  export declare const SingleValueCascader: {
4
4
  (props: any): import("react/jsx-runtime").JSX.Element;
5
5
  displayName: string;
@@ -17,7 +17,7 @@ const AssociationCascader = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.co
17
17
  fields: [
18
18
  titleField
19
19
  ],
20
- pageSize: 99999,
20
+ paginate: false,
21
21
  filter: (null == props ? void 0 : null === (_props_params = props.params) || void 0 === _props_params ? void 0 : _props_params.filter) ? {
22
22
  ...null == props ? void 0 : null === (_props_params1 = props.params) || void 0 === _props_params1 ? void 0 : _props_params1.filter
23
23
  } : {}
@@ -11,5 +11,5 @@ interface AssociationSelectInterface {
11
11
  FilterDesigner: React.FC;
12
12
  }
13
13
  export declare const AssociationSelect: AssociationSelectInterface;
14
- export declare const AssociationSelectReadPretty: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
14
+ export declare const AssociationSelectReadPretty: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
15
15
  export {};
@@ -70,7 +70,7 @@ const EditableAssociationField = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema
70
70
  'PopoverNester' === currentMode && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__InternalPopoverNester_mjs__.InternaPopoverNester, {
71
71
  ...props
72
72
  }),
73
- 'Select' === currentMode && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(AssociationSelect, {
73
+ ('Select' === currentMode || 'CustomTitle' === currentMode) && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(AssociationSelect, {
74
74
  ...props
75
75
  }),
76
76
  'SubTable' === currentMode && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__InternalSubTable_mjs__.InternalSubTable, {
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  declare const InternalFileManager: (props: any) => import("react/jsx-runtime").JSX.Element;
3
- declare const FileManageReadPretty: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
3
+ declare const FileManageReadPretty: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
4
4
  export { FileManageReadPretty, InternalFileManager };
@@ -76,7 +76,7 @@ const Cascade = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.connect)((prop
76
76
  onDropdownVisibleChange(true);
77
77
  setSelectedOptions(defaultData);
78
78
  } else resource.list({
79
- pageSize: 9999,
79
+ paginate: false,
80
80
  filter: propsValue.id ? {
81
81
  id: {
82
82
  $eq: propsValue.id
@@ -102,7 +102,7 @@ const Cascade = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.connect)((prop
102
102
  const handleGetOptions = async ()=>{
103
103
  var _response_data;
104
104
  const response = await resource.list({
105
- pageSize: 9999,
105
+ paginate: false,
106
106
  filter: (0, __WEBPACK_EXTERNAL_MODULE__filter_provider_utils_mjs__.mergeFilter)([
107
107
  fieldFilter,
108
108
  filter
@@ -29,7 +29,7 @@ const ReadPrettyInternalViewer = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema
29
29
  const { getCollection } = (0, __WEBPACK_EXTERNAL_MODULE__collection_manager_index_mjs__.useCollectionManager_deprecated)();
30
30
  const { enableLink } = fieldSchema['x-component-props'] || {};
31
31
  const field = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useField)();
32
- const fieldNames = (0, __WEBPACK_EXTERNAL_MODULE__hooks_mjs__.useFieldNames)(props);
32
+ const defFieldNames = (0, __WEBPACK_EXTERNAL_MODULE__hooks_mjs__.useFieldNames)(props);
33
33
  const [visible, setVisible] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(false);
34
34
  const insertViewer = (0, __WEBPACK_EXTERNAL_MODULE__hooks_mjs__.useInsertSchema)('Viewer');
35
35
  const { options: collectionField } = (0, __WEBPACK_EXTERNAL_MODULE__hooks_mjs__.useAssociationFieldContext)();
@@ -41,7 +41,8 @@ const ReadPrettyInternalViewer = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema
41
41
  const isTreeCollection = (null == targetCollection ? void 0 : targetCollection.template) === 'tree';
42
42
  const ellipsisWithTooltipRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)();
43
43
  const getLabelUiSchema = (0, __WEBPACK_EXTERNAL_MODULE__util_mjs__.useLabelUiSchemaV2)();
44
- const renderRecords = ()=>(0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.toArr)(props.value).map((record, index, arr)=>{
44
+ const { formulaRecord, fieldNames } = customTitle(recordCtx, fieldSchema, defFieldNames);
45
+ const renderRecords = ()=>(0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.toArr)(formulaRecord[fieldSchema['name']] || props.value).map((record, index, arr)=>{
45
46
  var _getCollection_options, _getCollection, _targetCollection_fieldsMap_, _targetCollection_fieldsMap, _getCollection_options1, _getCollection1, _targetCollection_fieldsMap_1, _targetCollection_fieldsMap1;
46
47
  const value = null == record ? void 0 : record[(null == fieldNames ? void 0 : fieldNames.label) || 'label'];
47
48
  const label = isTreeCollection ? (0, __WEBPACK_EXTERNAL_MODULE__InternalCascadeSelect_mjs__.transformNestedData)(record).map((o)=>null == o ? void 0 : o[(null == fieldNames ? void 0 : fieldNames.label) || 'label']).join(' / ') : isObject(value) ? (null === (_getCollection = getCollection(null == targetCollection ? void 0 : null === (_targetCollection_fieldsMap = targetCollection.fieldsMap) || void 0 === _targetCollection_fieldsMap ? void 0 : null === (_targetCollection_fieldsMap_ = _targetCollection_fieldsMap[(null == fieldNames ? void 0 : fieldNames.label) || 'label']) || void 0 === _targetCollection_fieldsMap_ ? void 0 : _targetCollection_fieldsMap_.target)) || void 0 === _getCollection ? void 0 : null === (_getCollection_options = _getCollection.options) || void 0 === _getCollection_options ? void 0 : _getCollection_options.titleField) ? value[null === (_getCollection1 = getCollection(null == targetCollection ? void 0 : null === (_targetCollection_fieldsMap1 = targetCollection.fieldsMap) || void 0 === _targetCollection_fieldsMap1 ? void 0 : null === (_targetCollection_fieldsMap_1 = _targetCollection_fieldsMap1[(null == fieldNames ? void 0 : fieldNames.label) || 'label']) || void 0 === _targetCollection_fieldsMap_1 ? void 0 : _targetCollection_fieldsMap_1.target)) || void 0 === _getCollection1 ? void 0 : null === (_getCollection_options1 = _getCollection1.options) || void 0 === _getCollection_options1 ? void 0 : _getCollection_options1.titleField] : JSON.stringify(value) : value;
@@ -96,11 +97,11 @@ const ReadPrettyInternalViewer = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema
96
97
  const collectionFieldNames = null == fieldSchema ? void 0 : null === (_fieldSchema_xcollectionfield = fieldSchema['x-collection-field']) || void 0 === _fieldSchema_xcollectionfield ? void 0 : _fieldSchema_xcollectionfield.split('.');
97
98
  return collectionFieldNames && collectionFieldNames.length > 2 ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__record_provider_index_mjs__.RecordProvider, {
98
99
  record: record,
99
- parent: recordCtx[collectionFieldNames[1]],
100
+ parent: formulaRecord[collectionFieldNames[1]],
100
101
  children: renderWithoutTableFieldResourceProvider()
101
102
  }) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__record_provider_index_mjs__.RecordProvider, {
102
103
  record: record,
103
- parent: recordCtx,
104
+ parent: formulaRecord,
104
105
  children: renderWithoutTableFieldResourceProvider()
105
106
  });
106
107
  };
@@ -133,4 +134,58 @@ const ReadPrettyInternalViewer = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema
133
134
  }, {
134
135
  displayName: 'ReadPrettyInternalViewer'
135
136
  });
137
+ const customTitle = (record, schema, fieldNames)=>{
138
+ var _schema_xcomponentprops, _schema_xcomponentprops_fieldNames, _schema_xcomponentprops1;
139
+ if ((null === (_schema_xcomponentprops = schema['x-component-props']) || void 0 === _schema_xcomponentprops ? void 0 : _schema_xcomponentprops.mode) === 'CustomTitle' && (null === (_schema_xcomponentprops1 = schema['x-component-props']) || void 0 === _schema_xcomponentprops1 ? void 0 : null === (_schema_xcomponentprops_fieldNames = _schema_xcomponentprops1.fieldNames) || void 0 === _schema_xcomponentprops_fieldNames ? void 0 : _schema_xcomponentprops_fieldNames.formula)) {
140
+ var _schema_xcomponentprops_fieldNames1, _schema_xcomponentprops2;
141
+ const regex = /{{(.*?)}}/g;
142
+ const valueOject = {};
143
+ let outputStr = '';
144
+ let match;
145
+ const formula = null === (_schema_xcomponentprops2 = schema['x-component-props']) || void 0 === _schema_xcomponentprops2 ? void 0 : null === (_schema_xcomponentprops_fieldNames1 = _schema_xcomponentprops2.fieldNames) || void 0 === _schema_xcomponentprops_fieldNames1 ? void 0 : _schema_xcomponentprops_fieldNames1.formula;
146
+ while(match = regex.exec(formula))if (match[1].includes('.')) {
147
+ const fieldList = [
148
+ schema.name
149
+ ];
150
+ fieldList.push(...match[1].split('.'));
151
+ const result = {
152
+ currRecord: record,
153
+ value: ''
154
+ };
155
+ fieldList.forEach((value, index)=>{
156
+ var _result_currRecord;
157
+ if (fieldList.length - 1 !== index) {
158
+ var _result_currRecord1;
159
+ result.currRecord = null === (_result_currRecord1 = result.currRecord) || void 0 === _result_currRecord1 ? void 0 : _result_currRecord1[value];
160
+ return;
161
+ }
162
+ result.value = null === (_result_currRecord = result.currRecord) || void 0 === _result_currRecord ? void 0 : _result_currRecord[value];
163
+ });
164
+ var _result_value;
165
+ valueOject[match[1]] = null !== (_result_value = result.value) && void 0 !== _result_value ? _result_value : '';
166
+ } else {
167
+ var _record_schema_name;
168
+ valueOject[match[1]] = (null === (_record_schema_name = record[schema['name']]) || void 0 === _record_schema_name ? void 0 : _record_schema_name[match[1]]) || '';
169
+ }
170
+ outputStr = replacePlaceholders(formula, valueOject);
171
+ record[schema['name']] = {
172
+ ...record[schema['name']],
173
+ customLabel: outputStr
174
+ };
175
+ return {
176
+ formulaRecord: record,
177
+ fieldNames: {
178
+ ...fieldNames,
179
+ label: 'customLabel'
180
+ }
181
+ };
182
+ }
183
+ return {
184
+ formulaRecord: record,
185
+ fieldNames
186
+ };
187
+ };
188
+ const replacePlaceholders = (inputStr, values)=>inputStr.replace(/{{(.*?)}}/g, function(match, placeholder) {
189
+ return Object.prototype.hasOwnProperty.call(values, placeholder) ? values[placeholder] : match;
190
+ });
136
191
  export { ReadPrettyInternalViewer, isObject };
@@ -16,7 +16,8 @@ const ReadPrettyAssociationField = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_sche
16
16
  'Select',
17
17
  'Picker',
18
18
  'CascadeSelect',
19
- 'Cascader'
19
+ 'Cascader',
20
+ 'CustomTitle'
20
21
  ].includes(currentMode) && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__InternalViewer_mjs__.ReadPrettyInternalViewer, {
21
22
  ...props
22
23
  }),
@@ -80,7 +80,7 @@ const InternalTabs = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.observer)
80
80
  if ((null == tabparams ? void 0 : tabparams.filter) && !fieldServiceFilter) return;
81
81
  if ((quickAddField || 'none' !== quickAddField || !isQuickAdd) && fieldSchema.properties) {
82
82
  const params = {
83
- pageSize: 99999,
83
+ paginate: false,
84
84
  filter: JSON.stringify(fieldServiceFilter)
85
85
  };
86
86
  if (quickAddParentField && (null == quickAddParentField ? void 0 : quickAddParentField.value) !== 'none') {
@@ -92,7 +92,7 @@ const InternalTabs = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.observer)
92
92
  const parentItem = await api.request({
93
93
  url: collection.name + ':list',
94
94
  params: {
95
- pageSize: 99999
95
+ paginate: false
96
96
  }
97
97
  });
98
98
  itemParams['parentTitleField'] = collection.titleField;
@@ -97,7 +97,7 @@ const schema_rslib_entry_ = {
97
97
  type: 'void',
98
98
  'x-component': 'Tabs',
99
99
  'x-component-props': {},
100
- 'x-initializer': 'TabPaneInitializers',
100
+ 'x-initializer': 'popup:addTab',
101
101
  properties: {
102
102
  tab1: {
103
103
  type: 'void',
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const AutoComplete: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
2
+ export declare const AutoComplete: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
@@ -21,7 +21,7 @@ const AutoComplete = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.connect)(
21
21
  const { data: { data: rawOptions } } = await api.request({
22
22
  url: fieldSchema['collectionName'] + ':list',
23
23
  params: {
24
- pageSize: 99999,
24
+ paginate: false,
25
25
  filter: fieldFilter ? {
26
26
  ...fieldFilter.filter
27
27
  } : {}
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- export declare const Cascader: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
2
+ export declare const Cascader: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
3
3
  export default Cascader;
@@ -11,6 +11,6 @@ export declare const Checkbox: {
11
11
  (props: any): import("react/jsx-runtime").JSX.Element;
12
12
  ReadPretty: (props: any) => import("react/jsx-runtime").JSX.Element;
13
13
  __ANT_CHECKBOX: boolean;
14
- Group: React.ForwardRefExoticComponent<Omit<Partial<CheckboxGroupProps<unknown> & React.RefAttributes<HTMLDivElement>>, "ref"> & React.RefAttributes<unknown>>;
14
+ Group: React.ForwardRefExoticComponent<Omit<CheckboxGroupProps<unknown> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
15
15
  };
16
16
  export default Checkbox;
@@ -4,14 +4,14 @@ export type CollectionSelectProps = SelectProps<any, any> & {
4
4
  filter?: (item: any, index: number, array: any[]) => boolean;
5
5
  isTableOid?: boolean;
6
6
  };
7
- export declare const CollectionSelect: React.ForwardRefExoticComponent<Partial<SelectProps<any, any> & {
7
+ export declare const CollectionSelect: React.ForwardRefExoticComponent<SelectProps<any, any> & {
8
8
  filter?: (item: any, index: number, array: any[]) => boolean;
9
9
  isTableOid?: boolean;
10
- }> & React.RefAttributes<unknown>>;
10
+ } & React.RefAttributes<never>>;
11
11
  export type DataSourceSelectProps = SelectProps<any, any> & {
12
12
  filter?: (item: any, index: number, array: any[]) => boolean;
13
13
  };
14
- export declare const DataSourceSelect: React.ForwardRefExoticComponent<Partial<SelectProps<any, any> & {
14
+ export declare const DataSourceSelect: React.ForwardRefExoticComponent<SelectProps<any, any> & {
15
15
  filter?: (item: any, index: number, array: any[]) => boolean;
16
- }> & React.RefAttributes<unknown>>;
17
- export declare const DataSourceCollectionCascader: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
16
+ } & React.RefAttributes<never>>;
17
+ export declare const DataSourceCollectionCascader: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- export declare const ColorPicker: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
2
+ export declare const ColorPicker: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
3
3
  export default ColorPicker;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- export declare const ColorSelect: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
2
+ export declare const ColorSelect: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
3
3
  export default ColorSelect;
@@ -3,5 +3,5 @@ import { SelectProps } from 'antd';
3
3
  interface CronSetProps extends SelectProps {
4
4
  onChange: (v: string) => void;
5
5
  }
6
- export declare const CronSet: React.ForwardRefExoticComponent<Partial<CronSetProps> & React.RefAttributes<unknown>>;
6
+ export declare const CronSet: React.ForwardRefExoticComponent<CronSetProps & React.RefAttributes<never>>;
7
7
  export {};
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- export declare const CustomCascader: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
2
+ export declare const CustomCascader: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
3
3
  export default CustomCascader;
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const FilterGroup: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
2
+ export declare const FilterGroup: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
@@ -11,6 +11,7 @@ import * as __WEBPACK_EXTERNAL_MODULE__data_source_index_mjs__ from "../../../da
11
11
  import * as __WEBPACK_EXTERNAL_MODULE__record_provider_index_mjs__ from "../../../record-provider/index.mjs";
12
12
  import * as __WEBPACK_EXTERNAL_MODULE__table_v2_Table_Column_Decorator_mjs__ from "../table-v2/Table.Column.Decorator.mjs";
13
13
  import * as __WEBPACK_EXTERNAL_MODULE__schema_items_GeneralSettings_mjs__ from "../../../schema-items/GeneralSettings.mjs";
14
+ import * as __WEBPACK_EXTERNAL_MODULE__schema_settings_index_mjs__ from "../../../schema-settings/index.mjs";
14
15
  import * as __WEBPACK_EXTERNAL_MODULE__schema_settings_hooks_useIsAllowToSetDefaultValue_mjs__ from "../../../schema-settings/hooks/useIsAllowToSetDefaultValue.mjs";
15
16
  import * as __WEBPACK_EXTERNAL_MODULE__schema_settings_hooks_useIsShowMultipleSwitch_mjs__ from "../../../schema-settings/hooks/useIsShowMultipleSwitch.mjs";
16
17
  import * as __WEBPACK_EXTERNAL_MODULE__schema_settings_isPatternDisabled_mjs__ from "../../../schema-settings/isPatternDisabled.mjs";
@@ -568,6 +569,86 @@ const formItemSettings = new __WEBPACK_EXTERNAL_MODULE__application_schema_setti
568
569
  },
569
570
  useVisible: useShowFieldMode
570
571
  },
572
+ {
573
+ name: 'customTitle',
574
+ type: 'modal',
575
+ useComponentProps () {
576
+ var _fieldSchema_xcomponentprops_fieldNames, _fieldSchema_xcomponentprops;
577
+ const schema = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useFieldSchema)();
578
+ const { fieldSchema: tableColumnSchema } = (0, __WEBPACK_EXTERNAL_MODULE__table_v2_Table_Column_Decorator_mjs__.useColumnSchema)();
579
+ const fieldSchema = tableColumnSchema || schema;
580
+ const { t } = (0, __WEBPACK_EXTERNAL_MODULE_react_i18next__.useTranslation)();
581
+ const { dn } = (0, __WEBPACK_EXTERNAL_MODULE__hooks_index_mjs__.useDesignable)();
582
+ const options = (0, __WEBPACK_EXTERNAL_MODULE__schema_settings_index_mjs__.useFormulaTitleOptions)();
583
+ const def = null === (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) || void 0 === _fieldSchema_xcomponentprops ? void 0 : null === (_fieldSchema_xcomponentprops_fieldNames = _fieldSchema_xcomponentprops.fieldNames) || void 0 === _fieldSchema_xcomponentprops_fieldNames ? void 0 : _fieldSchema_xcomponentprops_fieldNames.formula;
584
+ const field = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useField)();
585
+ return {
586
+ title: t('Custom option label'),
587
+ schema: {
588
+ type: 'object',
589
+ title: t('Custom option label'),
590
+ properties: {
591
+ formula: {
592
+ required: true,
593
+ 'x-decorator': 'FormItem',
594
+ 'x-component': 'Variable.TextArea',
595
+ 'x-component-props': {
596
+ scope: options
597
+ },
598
+ default: def || ''
599
+ }
600
+ }
601
+ },
602
+ onSubmit: (param)=>{
603
+ let { formula } = param;
604
+ if (formula) {
605
+ var _fieldSchema_xcomponentprops, _field_componentProps;
606
+ const componentProps = {
607
+ ...fieldSchema['x-component-props'],
608
+ fieldNames: {
609
+ ...null === (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) || void 0 === _fieldSchema_xcomponentprops ? void 0 : _fieldSchema_xcomponentprops['fieldNames'],
610
+ formula
611
+ },
612
+ appends: [
613
+ fieldSchema['name']
614
+ ]
615
+ };
616
+ const regex = /{{(.*?)}}/g;
617
+ let match;
618
+ while(match = regex.exec(formula))if (match[1].includes('.')) {
619
+ const matchList = match[1].split('.');
620
+ let appendsValue = fieldSchema['name'];
621
+ matchList.forEach((item, index)=>{
622
+ if (index === matchList.length - 1) return;
623
+ appendsValue += '.' + item;
624
+ componentProps.appends.push(appendsValue);
625
+ });
626
+ }
627
+ field.componentProps = {
628
+ ...field.componentProps,
629
+ fieldNames: {
630
+ ...null === (_field_componentProps = field.componentProps) || void 0 === _field_componentProps ? void 0 : _field_componentProps.fieldNames,
631
+ formula
632
+ }
633
+ };
634
+ fieldSchema['x-component-props'] = componentProps;
635
+ dn.emit('patch', {
636
+ schema: {
637
+ 'x-uid': fieldSchema['x-uid'],
638
+ 'x-component-props': componentProps
639
+ }
640
+ });
641
+ }
642
+ dn.refresh();
643
+ }
644
+ };
645
+ },
646
+ useVisible: ()=>{
647
+ const fieldSchema = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useFieldSchema)();
648
+ const formula = 'CustomTitle' === fieldSchema['x-component-props'].mode;
649
+ return useShowFieldMode() && formula;
650
+ }
651
+ },
571
652
  {
572
653
  name: 'popupSize',
573
654
  type: 'select',
@@ -934,7 +1015,7 @@ const formItemSettings = new __WEBPACK_EXTERNAL_MODULE__application_schema_setti
934
1015
  const options = useTitleFieldOptions();
935
1016
  const isAssociationField = useIsAssociationField();
936
1017
  const fieldMode = useFieldMode();
937
- return options.length > 0 && isAssociationField && 'SubTable' !== fieldMode;
1018
+ return options.length > 0 && isAssociationField && 'SubTable' !== fieldMode && 'CustomTitle' !== fieldMode;
938
1019
  },
939
1020
  useComponentProps () {
940
1021
  var _field_componentProps_fieldNames, _field_componentProps;
@@ -1179,7 +1260,7 @@ function useFieldMode() {
1179
1260
  function useIsSelectFieldMode() {
1180
1261
  const fieldMode = useFieldMode();
1181
1262
  const isAssociationField = useIsAssociationField();
1182
- const isSelectFieldMode = isAssociationField && 'Select' === fieldMode;
1263
+ const isSelectFieldMode = isAssociationField && ('Select' === fieldMode || 'CustomTitle' === fieldMode);
1183
1264
  return isSelectFieldMode;
1184
1265
  }
1185
1266
  function useValidateSchema() {
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- export declare const IconPicker: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
2
+ export declare const IconPicker: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
3
3
  export default IconPicker;