@nocobase/client 1.3.39-beta → 1.4.0-alpha

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 (99) hide show
  1. package/.dumirc.ts +3 -0
  2. package/es/acl/ACLProvider.d.ts +1 -0
  3. package/es/application/schema-initializer/hooks/useSchemaInitializerRender.d.ts +1 -1
  4. package/es/application/utils/remotePlugins.d.ts +1 -1
  5. package/es/block-provider/TableFieldProvider.d.ts +1 -1
  6. package/es/block-provider/TableSelectorProvider.d.ts +1 -1
  7. package/es/block-provider/hooks/useBlockHeightProps.d.ts +1 -0
  8. package/es/collection-manager/interfaces/createdAt.d.ts +11 -3
  9. package/es/collection-manager/interfaces/dateOnly.d.ts +92 -0
  10. package/es/collection-manager/interfaces/datetime.d.ts +26 -2
  11. package/es/collection-manager/interfaces/datetimeNoTz.d.ts +111 -0
  12. package/es/collection-manager/interfaces/index.d.ts +2 -0
  13. package/es/collection-manager/interfaces/o2m.d.ts +0 -2
  14. package/es/collection-manager/interfaces/properties/operators.d.ts +10 -2
  15. package/es/collection-manager/interfaces/unixTimestamp.d.ts +36 -2
  16. package/es/collection-manager/interfaces/updatedAt.d.ts +11 -3
  17. package/es/collection-manager/interfaces/utils/index.d.ts +10 -0
  18. package/es/collection-manager/templates/sql.d.ts +3 -0
  19. package/es/collection-manager/templates/view.d.ts +3 -0
  20. package/es/data-source/collection-field-interface/CollectionFieldInterface.d.ts +5 -0
  21. package/es/data-source/collection-record/CollectionRecord.d.ts +1 -1
  22. package/es/i18n/SwitchLanguage.d.ts +10 -0
  23. package/es/index.d.ts +3 -0
  24. package/es/index.mjs +23415 -21589
  25. package/es/locale/index.d.ts +10 -2
  26. package/es/modules/blocks/data-blocks/table/hooks/useTableBlockProps.d.ts +1 -1
  27. package/es/modules/blocks/other-blocks/divider/DividerFormItemInitializer.d.ts +10 -0
  28. package/es/modules/blocks/other-blocks/divider/dividerSettings.d.ts +12 -0
  29. package/es/modules/fields/component/DatePicker/datePickerComponentFieldSettings.d.ts +1 -0
  30. package/es/modules/fields/component/Input/inputComponentSettings.d.ts +12 -0
  31. package/es/modules/fields/component/Input.JSON/inputJSONSettings.d.ts +10 -0
  32. package/es/modules/fields/component/Input.TextArea/inputTextAreaSettings.d.ts +10 -0
  33. package/es/modules/fields/component/Input.URL/inputURLSettings.d.ts +10 -0
  34. package/es/modules/fields/component/Markdown/markdownSettings.d.ts +10 -0
  35. package/es/modules/fields/component/MarkdownVditor/markdownVditorSettings.d.ts +10 -0
  36. package/es/modules/fields/component/RichText/richTextSettings.d.ts +10 -0
  37. package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.d.ts +12 -0
  38. package/es/modules/popup/OpenModeProvider.d.ts +6 -0
  39. package/es/pm/types.d.ts +1 -0
  40. package/es/schema-component/antd/association-field/FileManager.d.ts +2 -1
  41. package/es/schema-component/antd/association-field/InternalPicker.d.ts +0 -1
  42. package/es/schema-component/antd/association-filter/AssociationFilter.d.ts +1 -1
  43. package/es/schema-component/antd/block-item/index.d.ts +1 -0
  44. package/es/schema-component/antd/date-picker/DatePicker.d.ts +1 -0
  45. package/es/schema-component/antd/date-picker/util.d.ts +1 -0
  46. package/es/schema-component/antd/divider/Divider.d.ts +11 -0
  47. package/es/schema-component/antd/divider/index.d.ts +9 -0
  48. package/es/{schema-settings/DateFormat/ExpiresRadio.d.ts → schema-component/antd/expiresRadio/index.d.ts} +2 -2
  49. package/es/schema-component/antd/form-item/hooks/useSpecialCase.d.ts +7 -0
  50. package/es/schema-component/antd/index.d.ts +2 -0
  51. package/es/schema-component/antd/input/ReadPretty.d.ts +2 -0
  52. package/es/schema-component/antd/markdown/Markdown.Void.d.ts +1 -1
  53. package/es/schema-component/antd/markdown/util.d.ts +2 -1
  54. package/es/schema-component/antd/page/index.d.ts +1 -1
  55. package/es/schema-component/antd/page/pagePopupUtils.d.ts +1 -1
  56. package/es/schema-component/antd/page/usePopupContextInActionOrAssociationField.d.ts +1 -1
  57. package/es/schema-component/antd/remote-select/ReadPretty.d.ts +1 -1
  58. package/es/schema-component/antd/remote-select/RemoteSelect.d.ts +3 -1
  59. package/es/schema-component/antd/table-v2/Table.Column.Decorator.d.ts +1 -0
  60. package/es/schema-component/antd/table-v2/components/ColumnFieldProvider.d.ts +2 -3
  61. package/es/schema-component/antd/unix-timestamp/UnixTimestamp.d.ts +1 -2
  62. package/es/schema-component/antd/upload/index.d.ts +2 -0
  63. package/es/schema-component/antd/upload/shared.d.ts +37 -37
  64. package/es/schema-component/antd/upload/style.d.ts +1 -0
  65. package/es/schema-component/antd/variable/Input.d.ts +2 -0
  66. package/es/schema-component/antd/variable/Variable.d.ts +1 -1
  67. package/es/schema-settings/LinkageRules/type.d.ts +2 -1
  68. package/es/schema-settings/SchemaSettings.d.ts +4 -0
  69. package/es/schema-settings/SchemaSettingsDefaultValue.d.ts +1 -0
  70. package/es/schema-settings/VariableInput/VariableInput.d.ts +1 -0
  71. package/es/schema-settings/VariableInput/hooks/index.d.ts +1 -0
  72. package/es/schema-settings/VariableInput/hooks/useDateVariable.d.ts +33 -0
  73. package/es/schema-settings/VariableInput/hooks/useFormVariable.d.ts +11 -0
  74. package/es/schema-settings/VariableInput/hooks/useIterationVariable.d.ts +12 -0
  75. package/es/schema-settings/VariableInput/hooks/useParentIterationVariable.d.ts +9 -2
  76. package/es/schema-settings/VariableInput/hooks/useParentPopupVariable.d.ts +16 -3
  77. package/es/schema-settings/VariableInput/hooks/useParentRecordVariable.d.ts +10 -0
  78. package/es/schema-settings/VariableInput/hooks/usePopupVariable.d.ts +16 -3
  79. package/es/schema-settings/VariableInput/hooks/useRecordVariable.d.ts +14 -0
  80. package/es/variables/VariablesProvider.d.ts +5 -3
  81. package/es/variables/hooks/useVariables.d.ts +1 -1
  82. package/es/variables/index.d.ts +1 -0
  83. package/es/variables/types.d.ts +1 -0
  84. package/lib/index.js +330 -306
  85. package/lib/locale/{en_US.js → en-US.js} +7 -2
  86. package/lib/locale/{es_ES.js → es-ES.js} +2 -1
  87. package/lib/locale/{fr_FR.js → fr-FR.js} +2 -1
  88. package/lib/locale/index.js +6 -3
  89. package/lib/locale/{ja_JP.js → ja-JP.js} +1 -3
  90. package/lib/locale/{ko_KR.js → ko-KR.js} +2 -1
  91. package/lib/locale/{pt_BR.js → pt-BR.js} +2 -1
  92. package/lib/locale/{ru_RU.js → ru-RU.js} +2 -1
  93. package/lib/locale/{tr_TR.js → tr-TR.js} +2 -1
  94. package/lib/locale/{uk_UA.js → uk-UA.js} +2 -1
  95. package/lib/locale/zh-CN.js +45 -4
  96. package/lib/locale/zh-TW.js +3 -1
  97. package/package.json +8 -6
  98. /package/lib/locale/cron/{zh_CN.js → zh-CN.js} +0 -0
  99. /package/lib/locale/cron/{zh_TW.js → zh-TW.js} +0 -0
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  /**
2
10
  * This file is part of the NocoBase (R) project.
3
11
  * Copyright (c) 2020-2024 NocoBase Co., Ltd.
@@ -77,7 +85,7 @@ export declare const dayjsLocale: {
77
85
  'zh-HK': string;
78
86
  'zh-TW': string;
79
87
  };
80
- declare const _default: {
88
+ export declare const languageCodes: {
81
89
  'ar-EG': {
82
90
  label: string;
83
91
  };
@@ -277,4 +285,4 @@ declare const _default: {
277
285
  label: string;
278
286
  };
279
287
  };
280
- export default _default;
288
+ export default languageCodes;
@@ -14,7 +14,7 @@ export declare const useTableBlockProps: () => {
14
14
  dragSort: any;
15
15
  rowKey: any;
16
16
  pagination: any;
17
- onRowSelectionChange: (selectedRowKeys: any) => void;
17
+ onRowSelectionChange: (selectedRowKeys: any, selectedRowData: any) => void;
18
18
  onRowDragEnd: ({ from, to }: any) => Promise<void>;
19
19
  onChange: ({ current, pageSize }: any, filters: any, sorter: any) => void;
20
20
  onClickRow: (record: any, setSelectedRow: any, selectedRow: any) => void;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const DividerFormItemInitializer: () => React.JSX.Element;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { SchemaSettings } from '../../../../application/schema-settings/SchemaSettings';
10
+ import React from 'react';
11
+ export declare function GroupTitleEditor(props: any): React.JSX.Element;
12
+ export declare const dividerSettings: SchemaSettings<{}>;
@@ -8,3 +8,4 @@
8
8
  */
9
9
  import { SchemaSettings } from '../../../../application/schema-settings/SchemaSettings';
10
10
  export declare const datePickerComponentFieldSettings: SchemaSettings<{}>;
11
+ export declare const rangePickerPickerComponentFieldSettings: SchemaSettings<{}>;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { SchemaSettings } from '../../../../application/schema-settings/SchemaSettings';
10
+ import { SchemaSettingsItemType } from '../../../../application/schema-settings/types';
11
+ export declare const ellipsisSettingsItem: SchemaSettingsItemType;
12
+ export declare const inputComponentSettings: SchemaSettings<{}>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { SchemaSettings } from '../../../../application/schema-settings/SchemaSettings';
10
+ export declare const inputJSONSettings: SchemaSettings<{}>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { SchemaSettings } from '../../../../application/schema-settings/SchemaSettings';
10
+ export declare const inputTextAreaSettings: SchemaSettings<{}>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { SchemaSettings } from '../../../../application/schema-settings/SchemaSettings';
10
+ export declare const inputURLSettings: SchemaSettings<{}>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { SchemaSettings } from '../../../../application/schema-settings/SchemaSettings';
10
+ export declare const markdownSettings: SchemaSettings<{}>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { SchemaSettings } from '../../../../application/schema-settings/SchemaSettings';
10
+ export declare const markdownVditorSettings: SchemaSettings<{}>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { SchemaSettings } from '../../../../application/schema-settings/SchemaSettings';
10
+ export declare const richTextSettings: SchemaSettings<{}>;
@@ -103,4 +103,16 @@ export declare const linkageRules: {
103
103
  afterSubmit: () => void;
104
104
  };
105
105
  };
106
+ export declare const recordPerPage: {
107
+ name: string;
108
+ type: string;
109
+ useComponentProps(): {
110
+ title: string;
111
+ value: any;
112
+ options: {
113
+ value: number;
114
+ }[];
115
+ onChange: (pageSize: any) => void;
116
+ };
117
+ };
106
118
  export declare const subTablePopoverComponentFieldSettings: SchemaSettings<{}>;
@@ -24,6 +24,11 @@ interface OpenModeProviderProps {
24
24
  * 隐藏 open mode 的配置选项
25
25
  */
26
26
  hideOpenMode?: boolean;
27
+ /**
28
+ * @default false
29
+ * 是否为Mobile路由下
30
+ */
31
+ isMobile?: boolean;
27
32
  }
28
33
  /**
29
34
  * 为按钮的 Open mode 选项提供上下文
@@ -35,5 +40,6 @@ export declare const useOpenModeContext: () => {
35
40
  defaultOpenMode: OpenModeProviderProps['defaultOpenMode'];
36
41
  hideOpenMode: boolean;
37
42
  getComponentByOpenMode: (openMode: OpenMode) => any;
43
+ isMobile: boolean;
38
44
  };
39
45
  export {};
package/es/pm/types.d.ts CHANGED
@@ -15,6 +15,7 @@ export interface IPluginData {
15
15
  packageName: string;
16
16
  version: string;
17
17
  enabled: boolean;
18
+ removable?: boolean;
18
19
  installed: boolean;
19
20
  builtIn: boolean;
20
21
  registry?: string;
@@ -7,6 +7,7 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import React from 'react';
10
+ declare function FileSelector(props: any): React.JSX.Element;
10
11
  declare const InternalFileManager: (props: any) => React.JSX.Element;
11
12
  declare const FileManageReadPretty: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
12
- export { FileManageReadPretty, InternalFileManager };
13
+ export { FileManageReadPretty, InternalFileManager, FileSelector };
@@ -11,7 +11,6 @@ export declare const useTableSelectorProps: () => {
11
11
  rowKey: any;
12
12
  rowSelection: {
13
13
  type: string;
14
- selectedRowKeys: any;
15
14
  };
16
15
  onRowSelectionChange(selectedRowKeys: any, selectedRows: any): void;
17
16
  loading: any;
@@ -7,8 +7,8 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import React from 'react';
10
- import { AssociationFilterItemDesigner } from './AssociationFilter.Item.Designer';
11
10
  import { Plugin } from '../../../application/Plugin';
11
+ import { AssociationFilterItemDesigner } from './AssociationFilter.Item.Designer';
12
12
  export declare const AssociationFilter: {
13
13
  (props: any): React.JSX.Element;
14
14
  Provider: React.FunctionComponent<any>;
@@ -8,3 +8,4 @@
8
8
  */
9
9
  export * from './BlockItem';
10
10
  export * from './TestDesigner';
11
+ export * from './BlockItemCard';
@@ -16,6 +16,7 @@ interface IDatePickerProps {
16
16
  type ComposedDatePicker = React.FC<AntdDatePickerProps> & {
17
17
  ReadPretty?: ReadPrettyComposed['DatePicker'];
18
18
  RangePicker?: ComposedRangePicker;
19
+ FilterWithPicker?: any;
19
20
  };
20
21
  type ComposedRangePicker = React.FC<RangePickerProps> & {
21
22
  ReadPretty?: ReadPrettyComposed['DateRangePicker'];
@@ -48,3 +48,4 @@ export declare const getDateRanges: (props?: {
48
48
  last90Days: (params?: any) => any;
49
49
  next90Days: (params?: any) => any;
50
50
  };
51
+ export declare function inferPickerType(dateString: string): 'year' | 'month' | 'quarter' | 'date';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const Divider: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
11
+ export default Divider;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export * from './Divider';
@@ -7,6 +7,6 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import React from 'react';
10
- export declare const DateFormatCom: (props?: any) => React.JSX.Element;
10
+ declare const DateFormatCom: (props?: any) => React.JSX.Element;
11
11
  declare const ExpiresRadio: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
12
- export { ExpiresRadio };
12
+ export { ExpiresRadio, DateFormatCom };
@@ -68,3 +68,10 @@ export declare function isFromDatabase(value: Record<string, any>): boolean;
68
68
  export declare const useSubTableSpecialCase: ({ field }: {
69
69
  field: any;
70
70
  }) => void;
71
+ /**
72
+ * Determines if one array is a subset of another array
73
+ * @param subset The potential subset
74
+ * @param superset The potential superset
75
+ * @returns Returns true if subset is a subset of superset, otherwise false
76
+ */
77
+ export declare function isSubset(subset: any[], superset: any[]): boolean;
@@ -61,4 +61,6 @@ export * from './variable';
61
61
  export * from './unix-timestamp';
62
62
  export * from './nanoid-input';
63
63
  export * from './error-fallback';
64
+ export * from './expiresRadio';
65
+ export * from './divider';
64
66
  import './index.less';
@@ -61,6 +61,7 @@ export interface URLReadPrettyProps {
61
61
  suffix?: React.ReactNode;
62
62
  addonAfter?: React.ReactNode;
63
63
  prefixCls?: string;
64
+ ellipsis?: boolean;
64
65
  }
65
66
  export interface JSONTextAreaReadPrettyProps {
66
67
  value?: any;
@@ -68,4 +69,5 @@ export interface JSONTextAreaReadPrettyProps {
68
69
  style?: React.CSSProperties;
69
70
  space?: number;
70
71
  prefixCls?: string;
72
+ ellipsis?: boolean;
71
73
  }
@@ -6,8 +6,8 @@
6
6
  * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
- import React from 'react';
10
9
  import { TextAreaProps } from 'antd/es/input';
10
+ import React from 'react';
11
11
  export interface MarkdownEditorProps extends Omit<TextAreaProps, 'onSubmit'> {
12
12
  scope: any[];
13
13
  defaultValue?: string;
@@ -6,7 +6,8 @@
6
6
  * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
- export declare function parseMarkdown(text: string): Promise<string>;
9
+ import _ from 'lodash';
10
+ export declare const parseMarkdown: ((text: string) => Promise<string>) & _.MemoizedFunction;
10
11
  export declare function useParseMarkdown(text: string): {
11
12
  html: any;
12
13
  loading: boolean;
@@ -12,6 +12,6 @@ export * from './FixedBlockDesignerItem';
12
12
  export * from './Page';
13
13
  export * from './Page.Settings';
14
14
  export { PagePopups } from './PagePopups';
15
- export { getStoredPopupContext, storePopupContext } from './pagePopupUtils';
15
+ export { getPopupPathFromParams, getStoredPopupContext, storePopupContext, withSearchParams } from './pagePopupUtils';
16
16
  export * from './PageTab.Settings';
17
17
  export { PopupSettingsProvider, usePopupSettings } from './PopupSettingsProvider';
@@ -102,7 +102,7 @@ export declare const usePopupUtils: (options?: {
102
102
  * @deprecated
103
103
  * TODO: remove this
104
104
  */
105
- setVisibleWithURL: (value: boolean) => void;
105
+ setVisibleWithURL: ((...args: any[]) => void) | ((value: boolean) => void);
106
106
  /**
107
107
  * @deprecated
108
108
  * TODO: remove this
@@ -8,7 +8,7 @@
8
8
  */
9
9
  import { ISchema } from '@formily/react';
10
10
  export interface PopupContext {
11
- dataSource: string;
11
+ dataSource?: string;
12
12
  collection?: string;
13
13
  association?: string;
14
14
  /**
@@ -14,4 +14,4 @@ export interface RemoteSelectReadPrettyProps extends SelectReadPrettyProps {
14
14
  fieldNames?: SelectProps['fieldNames'];
15
15
  service: ResourceActionOptions;
16
16
  }
17
- export declare const ReadPretty: React.MemoExoticComponent<import("@formily/react").ReactFC<Omit<any, "ref">>>;
17
+ export declare const ReadPretty: React.MemoExoticComponent<import("@formily/react").ReactFC<RemoteSelectReadPrettyProps>>;
@@ -31,8 +31,9 @@ export type RemoteSelectProps<P = any> = SelectProps<P, any> & {
31
31
  dataSource?: string;
32
32
  CustomDropdownRender?: (v: any) => any;
33
33
  optionFilter?: (option: any) => boolean;
34
+ toOptionsItem?: (data: any) => any;
34
35
  };
35
- export declare const RemoteSelect: React.ForwardRefExoticComponent<Partial<import("antd").SelectProps<any, any> & {
36
+ export declare const RemoteSelect: React.FunctionComponent<Partial<import("antd").SelectProps<any, any> & {
36
37
  objectValue?: boolean;
37
38
  onChange?: (v: any) => void;
38
39
  multiple: boolean;
@@ -59,6 +60,7 @@ export declare const RemoteSelect: React.ForwardRefExoticComponent<Partial<impor
59
60
  dataSource?: string;
60
61
  CustomDropdownRender?: (v: any) => any;
61
62
  optionFilter?: (option: any) => boolean;
63
+ toOptionsItem?: (data: any) => any;
62
64
  }> & React.RefAttributes<unknown>> & {
63
65
  ReadPretty: typeof ReadPretty;
64
66
  };
@@ -18,4 +18,5 @@ export declare const useColumnSchema: () => {
18
18
  collectionField: any;
19
19
  uiSchema: any;
20
20
  };
21
+ export declare const useTableFieldInstanceList: () => import("@formily/core").GeneralField[];
21
22
  export declare const TableColumnDecorator: (props: any) => React.JSX.Element;
@@ -6,9 +6,8 @@
6
6
  * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
- import React from 'react';
10
- export declare const ColumnFieldProvider: React.MemoExoticComponent<import("@formily/react").ReactFC<{
9
+ export declare const ColumnFieldProvider: (props: {
11
10
  schema: any;
12
11
  basePath: any;
13
12
  children: any;
14
- }>>;
13
+ }) => any;
@@ -8,8 +8,7 @@
8
8
  */
9
9
  import React from 'react';
10
10
  interface UnixTimestampProps {
11
- value?: number;
12
- accuracy?: 'millisecond' | 'second';
11
+ value?: any;
13
12
  onChange?: (value: number) => void;
14
13
  }
15
14
  export declare const UnixTimestamp: React.ForwardRefExoticComponent<Partial<UnixTimestampProps> & React.RefAttributes<unknown>>;
@@ -6,4 +6,6 @@
6
6
  * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
+ export { attachmentFileTypes } from './shared';
10
+ export { useUploadStyles } from './style';
9
11
  export * from './Upload';
@@ -7,22 +7,46 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import { UploadFile } from 'antd/es/upload/interface';
10
+ import React from 'react';
10
11
  import type { IUploadProps, UploadProps } from './type';
11
12
  export declare const FILE_SIZE_LIMIT_DEFAULT: number;
12
- export declare const isImage: (file: any) => any;
13
- export declare const isPdf: (file: any) => any;
14
- export declare const testOpts: (ext: RegExp, options: {
15
- exclude?: string[];
16
- include?: string[];
17
- }) => boolean;
18
- export declare const getImageByUrl: (url: string, options?: any) => string;
19
- export declare const getURL: (target: any) => any;
20
- export declare const getThumbURL: (target: any) => any;
13
+ export interface FileModel {
14
+ id: number;
15
+ filename: string;
16
+ path: string;
17
+ title: string;
18
+ url: string;
19
+ extname: string;
20
+ size: number;
21
+ mimetype: string;
22
+ }
23
+ export interface PreviewerProps {
24
+ index: number;
25
+ list: FileModel[];
26
+ onSwitchIndex(index: any): void;
27
+ }
28
+ export interface AttachmentFileType {
29
+ match(file: any): boolean;
30
+ getThumbnailURL?(file: any): string;
31
+ ThumbnailPreviewer?: React.ComponentType<{
32
+ file: FileModel;
33
+ }>;
34
+ Previewer?: React.ComponentType<PreviewerProps>;
35
+ }
36
+ export declare class AttachmentFileTypes {
37
+ types: AttachmentFileType[];
38
+ add(type: AttachmentFileType): void;
39
+ getTypeByFile(file: any): Omit<AttachmentFileType, 'match'>;
40
+ }
41
+ /**
42
+ * @experimental
43
+ */
44
+ export declare const attachmentFileTypes: AttachmentFileTypes;
45
+ export declare function matchMimetype(file: FileModel | UploadFile<any>, type: string): any;
46
+ export declare function getThumbnailPlaceholderURL(file: any, options?: any): any;
21
47
  export declare function getResponseMessage({ error, response }: UploadFile<any>): any;
22
48
  export declare function normalizeFile(file: UploadFile & Record<string, any>): {
23
49
  title: string;
24
- thumbUrl: string;
25
- imageUrl: string;
26
50
  response: any;
27
51
  uid: string;
28
52
  size?: number;
@@ -33,6 +57,7 @@ export declare function normalizeFile(file: UploadFile & Record<string, any>): {
33
57
  url?: string;
34
58
  status?: import("antd/es/upload/interface").UploadFileStatus;
35
59
  percent?: number;
60
+ thumbUrl?: string;
36
61
  crossOrigin?: "" | "anonymous" | "use-credentials";
37
62
  originFileObj?: import("antd/es/upload/interface").RcFile;
38
63
  error?: any;
@@ -43,30 +68,6 @@ export declare function normalizeFile(file: UploadFile & Record<string, any>): {
43
68
  "aria-label"?: string;
44
69
  "aria-labelledby"?: string;
45
70
  };
46
- export declare const normalizeFileList: (fileList: UploadFile[]) => {
47
- title: string;
48
- thumbUrl: string;
49
- imageUrl: string;
50
- response: any;
51
- uid: string;
52
- size?: number;
53
- name: string;
54
- fileName?: string;
55
- lastModified?: number;
56
- lastModifiedDate?: Date;
57
- url?: string;
58
- status?: import("antd/es/upload/interface").UploadFileStatus;
59
- percent?: number;
60
- crossOrigin?: "" | "anonymous" | "use-credentials";
61
- originFileObj?: import("antd/es/upload/interface").RcFile;
62
- error?: any;
63
- linkProps?: any;
64
- type?: string;
65
- xhr?: any;
66
- preview?: string;
67
- "aria-label"?: string;
68
- "aria-labelledby"?: string;
69
- }[];
70
71
  export declare function useUploadProps<T extends IUploadProps = UploadProps>(props: T): T & {
71
72
  customRequest({ action, data, file, filename, headers, onError, onProgress, onSuccess, withCredentials }: {
72
73
  action: any;
@@ -82,9 +83,8 @@ export declare function useUploadProps<T extends IUploadProps = UploadProps>(pro
82
83
  abort(): void;
83
84
  };
84
85
  };
85
- export declare function toValueItem(file: any): any;
86
+ export declare function toValueItem(data: any): any;
86
87
  export declare const toItem: (file: any) => any;
87
88
  export declare const toFileList: (fileList: any) => any[];
88
- export declare const toValue: (fileList: any) => any[];
89
89
  export declare function validate(file: any, rules: Record<string, any>): string;
90
90
  export declare function useBeforeUpload(rules: any): (file: any) => boolean;
@@ -7,3 +7,4 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  export declare const useStyles: (props?: any) => import("../__builtins__").UseComponentStyleResult;
10
+ export declare const useUploadStyles: (props?: any) => import("../__builtins__").UseComponentStyleResult;
@@ -20,12 +20,14 @@ export type VariableInputProps = {
20
20
  children?: any;
21
21
  button?: React.ReactElement;
22
22
  useTypedConstant?: UseTypeConstantType;
23
+ nullable?: boolean;
23
24
  changeOnSelect?: CascaderProps['changeOnSelect'];
24
25
  fieldNames?: CascaderProps['fieldNames'];
25
26
  disabled?: boolean;
26
27
  style?: React.CSSProperties;
27
28
  className?: string;
28
29
  parseOptions?: ParseOptions;
30
+ hideVariableButton?: boolean;
29
31
  };
30
32
  export declare function Input(props: VariableInputProps): React.JSX.Element;
31
33
  export {};
@@ -15,7 +15,7 @@ export declare function useVariableScope(): any[];
15
15
  export declare function Variable(): any;
16
16
  export declare namespace Variable {
17
17
  var Input: React.ForwardRefExoticComponent<Partial<import("./Input").VariableInputProps> & React.RefAttributes<unknown>>;
18
- var TextArea: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
18
+ var TextArea: React.FunctionComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
19
19
  var RawTextArea: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
20
20
  var JSON: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
21
21
  }
@@ -19,7 +19,8 @@ export declare enum ActionType {
19
19
  Value = "value",
20
20
  Active = "enabled",
21
21
  Color = "color",
22
- BackgroundColor = "backgroundColor"
22
+ BackgroundColor = "backgroundColor",
23
+ TextAlign = "textAlign"
23
24
  }
24
25
  export declare enum LinkageRuleCategory {
25
26
  default = "default",
@@ -10,6 +10,7 @@ import { GeneralField } from '@formily/core';
10
10
  import { ISchema, Schema } from '@formily/react';
11
11
  import { CascaderProps, MenuItemProps, ModalFuncProps } from 'antd';
12
12
  import React, { FC, ReactNode } from 'react';
13
+ import { SchemaSettingsItemType } from '../';
13
14
  import { CollectionFieldOptions_deprecated } from '../collection-manager/types';
14
15
  import { SelectWithTitleProps } from '../common/SelectWithTitle';
15
16
  import { Designable } from '../schema-component/hooks/useDesignable';
@@ -112,6 +113,8 @@ export interface SchemaSettingsModalItemProps {
112
113
  hide?: boolean;
113
114
  /** 上下文中不需要当前记录 */
114
115
  noRecord?: boolean;
116
+ /** 自定义 Modal 上下文 */
117
+ ModalContextProvider?: React.FC;
115
118
  }
116
119
  export declare const SchemaSettingsModalItem: FC<SchemaSettingsModalItemProps>;
117
120
  export declare const SchemaSettingsDefaultSortingRules: (props: any) => React.JSX.Element;
@@ -123,6 +126,7 @@ export declare const SchemaSettingsDataTemplates: (props: any) => React.JSX.Elem
123
126
  export declare function SchemaSettingsEnableChildCollections(props: any): React.JSX.Element;
124
127
  export declare const defaultInputStyle: string;
125
128
  export declare const findParentFieldSchema: (fieldSchema: Schema) => Schema<any, any, any, any, any, any, any, any, any>;
129
+ export declare const schemaSettingsLabelLayout: SchemaSettingsItemType;
126
130
  export declare const isSystemField: (collectionField: CollectionFieldOptions_deprecated, getInterface: any) => boolean;
127
131
  export declare function getFieldDefaultValue(fieldSchema: ISchema, collectionField: CollectionFieldOptions_deprecated): any;
128
132
  export {};
@@ -10,4 +10,5 @@ import { Schema } from '@formily/react';
10
10
  import React from 'react';
11
11
  export declare const SchemaSettingsDefaultValue: (props: {
12
12
  fieldSchema?: Schema;
13
+ hideVariableButton?: boolean;
13
14
  }) => React.JSX.Element;
@@ -56,6 +56,7 @@ type Props = {
56
56
  * 不需要禁用选项,一般会在表达式中使用
57
57
  */
58
58
  noDisabled?: boolean;
59
+ hideVariableButton?: boolean;
59
60
  };
60
61
  /**
61
62
  * 注意:该组件存在以下问题: