@nocobase/client 2.0.0-alpha.9 → 2.1.0-alpha.1

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 (194) hide show
  1. package/.dumirc.ts +4 -0
  2. package/es/application/Application.d.ts +2 -1
  3. package/es/block-configs/BlockConfigsProvider.d.ts +1 -1
  4. package/es/block-provider/hooks/index.d.ts +2 -1
  5. package/es/block-provider/index.d.ts +4 -3
  6. package/es/collection-manager/Configuration/SetPrimaryKeyAction.d.ts +10 -0
  7. package/es/collection-manager/Configuration/components/CollectionCategory.d.ts +1 -1
  8. package/es/collection-manager/Configuration/components/CollectionFieldInterfaceTag.d.ts +1 -1
  9. package/es/collection-manager/Configuration/components/CollectionTemplateTag.d.ts +1 -1
  10. package/es/collection-manager/Configuration/components/Summary.d.ts +1 -1
  11. package/es/collection-manager/Configuration/interfaces.d.ts +1 -0
  12. package/es/collection-manager/action-hooks.d.ts +1 -1
  13. package/es/collection-manager/interfaces/color.d.ts +0 -1
  14. package/es/collection-manager/interfaces/index.d.ts +1 -0
  15. package/es/collection-manager/interfaces/input.d.ts +1 -0
  16. package/es/collection-manager/interfaces/integer.d.ts +1 -0
  17. package/es/collection-manager/interfaces/nanoid.d.ts +1 -0
  18. package/es/collection-manager/interfaces/number.d.ts +44 -0
  19. package/es/collection-manager/interfaces/snowflake-id.d.ts +117 -0
  20. package/es/collection-manager/interfaces/uuid.d.ts +1 -0
  21. package/es/collection-manager/templates/properties/index.d.ts +1 -0
  22. package/es/data-source/collection-field-interface/CollectionFieldInterface.d.ts +1 -0
  23. package/es/data-source/data-source/DataSourceManager.d.ts +1 -0
  24. package/es/flow/FlowModelRepository.d.ts +4 -0
  25. package/es/flow/FlowPage.d.ts +2 -1
  26. package/es/flow/actions/columnFixed.d.ts +1 -2
  27. package/es/flow/actions/displayFieldComponent.d.ts +1 -1
  28. package/es/flow/actions/index.d.ts +5 -1
  29. package/es/flow/actions/linkageRules.d.ts +4 -0
  30. package/es/flow/actions/navigateToURL.d.ts +9 -0
  31. package/es/flow/actions/openView.d.ts +2 -13
  32. package/es/flow/actions/setTargetDataScope.d.ts +10 -0
  33. package/es/flow/actions/showMessage.d.ts +9 -0
  34. package/es/flow/actions/showNotification.d.ts +9 -0
  35. package/es/flow/actions/titleField.d.ts +0 -1
  36. package/es/flow/common/Liquid.d.ts +33 -0
  37. package/es/flow/common/Markdown/Display.d.ts +9 -0
  38. package/es/flow/common/Markdown/Edit.d.ts +23 -0
  39. package/es/flow/common/Markdown/Markdown.d.ts +24 -0
  40. package/es/flow/common/Markdown/style.d.ts +10 -0
  41. package/es/flow/common/Markdown/useCDN.d.ts +9 -0
  42. package/es/flow/components/BlockItemCard.d.ts +2 -0
  43. package/es/flow/components/FieldAssignValueInput.d.ts +1 -0
  44. package/es/flow/components/code-editor/extension/CodeEditorExtension.d.ts +14 -0
  45. package/es/flow/components/code-editor/extension/index.d.ts +9 -0
  46. package/es/flow/components/code-editor/index.d.ts +5 -4
  47. package/es/flow/components/code-editor/jsxCompletion.d.ts +10 -0
  48. package/es/flow/components/code-editor/linter.d.ts +2 -0
  49. package/es/flow/components/code-editor/panels/RightExtra.d.ts +3 -1
  50. package/es/flow/components/code-editor/types.d.ts +16 -0
  51. package/es/flow/components/filter/FilterContainer.d.ts +4 -4
  52. package/es/flow/components/filter/FilterGroup.d.ts +2 -1
  53. package/es/flow/components/filter/LinkageFilterItem.d.ts +1 -0
  54. package/es/flow/components/filter/VariableFilterItem.d.ts +4 -1
  55. package/es/flow/components/index.d.ts +1 -1
  56. package/es/flow/components/placeholders/BlockPlaceholder.d.ts +1 -0
  57. package/es/flow/flows/editMarkdownFlow.d.ts +10 -0
  58. package/es/flow/getViewDiffAndUpdateHidden.d.ts +1 -0
  59. package/es/flow/index.d.ts +5 -0
  60. package/es/flow/internal/utils/associationValueCoercion.d.ts +15 -0
  61. package/es/flow/internal/utils/enumOptionsUtils.d.ts +7 -7
  62. package/es/flow/internal/utils/operatorSchemaHelper.d.ts +15 -0
  63. package/es/flow/internal/utils/rebuildFieldSubModel.d.ts +33 -0
  64. package/es/flow/models/actions/AddChildActionModel.d.ts +15 -0
  65. package/es/flow/models/actions/AddNewActionModel.d.ts +1 -0
  66. package/es/flow/models/actions/EditActionModel.d.ts +1 -0
  67. package/es/flow/models/actions/ExpandCollapseActionModel.d.ts +19 -0
  68. package/es/flow/models/actions/FilterActionModel.d.ts +5 -59
  69. package/es/flow/models/actions/JSActionModel.d.ts +13 -0
  70. package/es/flow/models/actions/LinkActionModel.d.ts +18 -0
  71. package/es/flow/models/actions/UpdateRecordActionModel.d.ts +6 -0
  72. package/es/flow/models/actions/index.d.ts +4 -0
  73. package/es/flow/models/base/ActionModel.d.ts +15 -5
  74. package/es/flow/models/base/BlockModel.d.ts +4 -1
  75. package/es/flow/models/base/CollectionBlockModel.d.ts +12 -25
  76. package/es/flow/models/base/FieldModel.d.ts +6 -0
  77. package/es/flow/models/base/GridModel.d.ts +27 -4
  78. package/es/flow/models/base/PageModel/ChildPageModel.d.ts +1 -0
  79. package/es/flow/models/base/PageModel/PageModel.d.ts +3 -0
  80. package/es/flow/models/base/PageModel/PageTabModel.d.ts +2 -0
  81. package/es/flow/models/base/PageModel/RootPageModel.d.ts +2 -0
  82. package/es/flow/models/blocks/details/DetailsBlockModel.d.ts +1 -0
  83. package/es/flow/models/blocks/details/DetailsCustomItemModel.d.ts +2 -2
  84. package/es/flow/models/blocks/details/DetailsGridModel.d.ts +1 -0
  85. package/es/flow/models/blocks/details/DetailsItemModel.d.ts +2 -2
  86. package/es/flow/models/blocks/details/DetailsJSFieldItemModel.d.ts +2 -2
  87. package/es/flow/models/blocks/filter-form/FilterFormBlockModel.d.ts +4 -0
  88. package/es/flow/models/blocks/filter-form/FilterFormGridModel.d.ts +1 -0
  89. package/es/flow/models/blocks/filter-form/FilterFormItemModel.d.ts +5 -4
  90. package/es/flow/models/blocks/filter-form/FilterFormSubmitActionModel.d.ts +1 -1
  91. package/es/flow/models/blocks/filter-form/fields/FilterFormCustomFieldModel.d.ts +2 -1
  92. package/es/flow/models/blocks/filter-manager/flow-actions/customizeFilterRender.d.ts +10 -0
  93. package/es/flow/models/blocks/filter-manager/flow-actions/index.d.ts +2 -0
  94. package/es/flow/models/blocks/filter-manager/flow-actions/operatorComponentProps.d.ts +10 -0
  95. package/es/flow/models/blocks/form/CreateFormModel.d.ts +1 -0
  96. package/es/flow/models/blocks/form/EditFormModel.d.ts +1 -0
  97. package/es/flow/models/blocks/form/FormBlockModel.d.ts +11 -1
  98. package/es/flow/models/blocks/form/FormGridModel.d.ts +1 -0
  99. package/es/flow/models/blocks/form/FormItemModel.d.ts +1 -1
  100. package/es/flow/models/blocks/form/FormJSFieldItemModel.d.ts +1 -1
  101. package/es/flow/models/blocks/form/submitHandler.d.ts +9 -0
  102. package/es/flow/models/blocks/js-block/JSBlock.d.ts +1 -0
  103. package/es/flow/models/blocks/table/JSColumnModel.d.ts +0 -1
  104. package/es/flow/models/blocks/table/TableActionsColumnModel.d.ts +0 -1
  105. package/es/flow/models/blocks/table/TableBlockModel.d.ts +14 -1
  106. package/es/flow/models/blocks/table/TableColumnModel.d.ts +9 -2
  107. package/es/flow/models/blocks/table/TableJSFieldItemModel.d.ts +2 -2
  108. package/es/flow/models/blocks/table/utils.d.ts +8 -0
  109. package/es/flow/models/blocks/utils/transformChildrenToJS.d.ts +42 -0
  110. package/es/flow/models/fields/AssociationFieldModel/AssociationFieldModel.d.ts +1 -0
  111. package/es/flow/models/fields/AssociationFieldModel/CascadeSelectFieldModel.d.ts +29 -0
  112. package/es/flow/models/fields/AssociationFieldModel/RecordPickerFieldModel.d.ts +2 -0
  113. package/es/flow/models/fields/AssociationFieldModel/RecordSelectFieldModel.d.ts +8 -2
  114. package/es/flow/models/fields/AssociationFieldModel/SubFormFieldModel.d.ts +7 -0
  115. package/es/flow/models/fields/AssociationFieldModel/SubTableFieldModel/SubTableColumnModel.d.ts +3 -3
  116. package/es/flow/models/fields/AssociationFieldModel/SubTableFieldModel/index.d.ts +2 -0
  117. package/es/flow/models/fields/AssociationFieldModel/index.d.ts +1 -0
  118. package/es/flow/models/fields/AssociationFieldModel/recordSelectShared.d.ts +49 -0
  119. package/es/flow/models/fields/ClickableFieldModel.d.ts +3 -2
  120. package/es/flow/models/fields/DisplayAssociationField/DisplaySubItemFieldModel.d.ts +1 -0
  121. package/es/flow/models/fields/DisplayAssociationField/DisplaySubListFieldModel.d.ts +1 -0
  122. package/es/flow/models/fields/DisplayAssociationField/DisplaySubTableFieldModel.d.ts +3 -1
  123. package/es/flow/models/fields/DisplayEnumFieldModel.d.ts +1 -0
  124. package/es/flow/models/fields/DisplayJSONFieldModel.d.ts +3 -3
  125. package/es/flow/models/fields/DisplayNumberFieldModel.d.ts +4 -2
  126. package/es/flow/models/fields/DisplayTextFieldModel.d.ts +1 -1
  127. package/es/flow/models/fields/JSItemModel.d.ts +0 -1
  128. package/es/flow/models/fields/JsonFieldModel.d.ts +1 -0
  129. package/es/flow/models/fields/MarkdownItemModel.d.ts +1 -0
  130. package/es/flow/models/fields/TimeFieldModel.d.ts +0 -1
  131. package/es/flow/models/fields/mobile-components/MobileDatePicker.d.ts +10 -0
  132. package/es/flow/models/fields/mobile-components/MobileLazySelect.d.ts +11 -0
  133. package/es/flow/{components/JsonInput.d.ts → models/fields/mobile-components/MobileSelect.d.ts} +1 -1
  134. package/es/flow/models/fields/mobile-components/MobileTimePicker.d.ts +10 -0
  135. package/es/flow/resolveViewParamsToViewList.d.ts +4 -2
  136. package/es/flow/{components/decorator → utils}/index.d.ts +1 -1
  137. package/es/global-theme/type.d.ts +1 -0
  138. package/es/hooks/useFullscreenOverlay.d.ts +20 -0
  139. package/es/index.d.ts +1 -0
  140. package/es/index.mjs +28903 -22307
  141. package/es/modules/menu/FlowPageMenuItem.d.ts +1 -3
  142. package/es/modules/menu/index.d.ts +9 -0
  143. package/es/nocobase-buildin-plugin/plugins/LocalePlugin.d.ts +0 -1
  144. package/es/schema-component/antd/association-select/ReadPretty.d.ts +1 -1
  145. package/es/schema-component/antd/filter/FilterItem.d.ts +1 -1
  146. package/es/schema-component/antd/input/EllipsisWithTooltip.d.ts +1 -0
  147. package/es/schema-component/antd/linkageFilter/LinkageFilterItem.d.ts +1 -1
  148. package/es/schema-component/antd/remote-select/RemoteSelect.d.ts +1 -3
  149. package/es/schema-component/antd/table/Table.Column.ActionBar.d.ts +1 -1
  150. package/es/schema-component/antd/table/Table.Void.d.ts +1 -0
  151. package/es/schema-component/antd/table-v2/Table.Column.ActionBar.d.ts +1 -1
  152. package/es/schema-component/antd/upload/shared.d.ts +1 -1
  153. package/es/schema-settings/LinkageRules/LinkageRuleAction.d.ts +2 -2
  154. package/es/schema-settings/LinkageRules/components/BlockLinkageRuleAction.d.ts +1 -1
  155. package/es/schema-settings/LinkageRules/components/FieldStyleLinkageRuleAction.d.ts +1 -1
  156. package/lib/index-C3fHjsMw-CDWZlvuM.js +2237 -0
  157. package/lib/index.js +453 -239
  158. package/lib/locale/cron/zh-CN.json +33 -0
  159. package/lib/locale/cron/zh-TW.json +33 -0
  160. package/lib/locale/de-DE.json +1545 -0
  161. package/lib/locale/en-US.json +1553 -0
  162. package/lib/locale/es-ES.json +1573 -0
  163. package/lib/locale/fr-FR.json +1549 -0
  164. package/lib/locale/hu-HU.json +1545 -0
  165. package/lib/locale/id-ID.json +1546 -0
  166. package/lib/locale/{it-IT.js → it-IT.json} +1496 -1054
  167. package/lib/locale/ja-JP.json +1564 -0
  168. package/lib/locale/ko-KR.json +1558 -0
  169. package/lib/locale/{nl-NL.js → nl-NL.json} +1493 -1018
  170. package/lib/locale/pt-BR.json +1617 -0
  171. package/lib/locale/ru-RU.json +1551 -0
  172. package/lib/locale/tr-TR.json +1553 -0
  173. package/lib/locale/uk-UA.json +1570 -0
  174. package/lib/locale/vi-VN.json +1545 -0
  175. package/lib/locale/zh-CN.json +1571 -0
  176. package/lib/locale/zh-TW.json +1549 -0
  177. package/package.json +10 -7
  178. package/es/flow/components/decorator/injectable.d.ts +0 -19
  179. package/lib/index-C3fHjsMw-BTweCpKS.js +0 -2023
  180. package/lib/locale/cron/zh-CN.js +0 -33
  181. package/lib/locale/cron/zh-TW.js +0 -33
  182. package/lib/locale/de-DE.js +0 -904
  183. package/lib/locale/en-US.js +0 -1001
  184. package/lib/locale/es-ES.js +0 -824
  185. package/lib/locale/fr-FR.js +0 -844
  186. package/lib/locale/ja-JP.js +0 -1062
  187. package/lib/locale/ko-KR.js +0 -935
  188. package/lib/locale/pt-BR.js +0 -804
  189. package/lib/locale/ru-RU.js +0 -633
  190. package/lib/locale/tr-TR.js +0 -631
  191. package/lib/locale/uk-UA.js +0 -847
  192. package/lib/locale/zh-CN.js +0 -1436
  193. package/lib/locale/zh-TW.js +0 -938
  194. /package/es/flow/{internal/utils → utils}/blockUtils.d.ts +0 -0
package/.dumirc.ts CHANGED
@@ -214,6 +214,10 @@ export default defineConfig({
214
214
  title: 'hideInSettings - 在设置界面中隐藏',
215
215
  link: '/examples/flow-definition/hide-in-settings',
216
216
  },
217
+ {
218
+ title: '扩展设置菜单(Common actions)',
219
+ link: '/examples/flow-definition/settings-menu-extra-items',
220
+ },
217
221
  {
218
222
  title: 'uiMode - 步骤设置的 UI 模式',
219
223
  link: '/examples/flow-definition/ui-mode',
@@ -112,8 +112,9 @@ export declare class Application {
112
112
  maintaining: boolean;
113
113
  error: any;
114
114
  hasLoadError: boolean;
115
+ locales: any;
115
116
  private wsAuthorized;
116
- private variables;
117
+ private readonly variables;
117
118
  apps: {
118
119
  Component?: ComponentType;
119
120
  };
@@ -6,7 +6,7 @@
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, { ReactNode } from "react";
9
+ import React, { ReactNode } from 'react';
10
10
  export declare const BlockConfigsContext: React.Context<{
11
11
  getConfigs: () => any;
12
12
  setConfigs: (value: any, shouldNotify?: boolean) => void;
@@ -6,6 +6,7 @@
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 { Form } from '@formily/core';
9
10
  import { ChangeEvent } from 'react';
10
11
  import { NavigateFunction } from 'react-router-dom';
11
12
  import { CollectionOptions } from '../../collection-manager';
@@ -26,7 +27,7 @@ export declare function getFormValues({ filterByTk, field, form, fieldNames, get
26
27
  resource: any;
27
28
  actionFields: any[];
28
29
  }): any;
29
- export declare function useCollectValuesToSubmit(): () => Promise<any>;
30
+ export declare function useCollectValuesToSubmit(f?: Form): () => Promise<any>;
30
31
  export declare const useCreateActionProps: () => {
31
32
  onClick(): Promise<void>;
32
33
  };
@@ -8,12 +8,13 @@
8
8
  */
9
9
  export * from './BlockProvider';
10
10
  export * from './BlockSchemaComponentProvider';
11
+ export * from './DetailsBlockProvider';
11
12
  export * from './FilterFormBlockProvider';
12
13
  export * from './FormBlockProvider';
13
14
  export * from './FormFieldProvider';
15
+ export * from './hooks';
16
+ export { useLinkActionProps } from './hooks/index';
14
17
  export * from './TableBlockProvider';
15
18
  export * from './TableFieldProvider';
16
19
  export * from './TableSelectorProvider';
17
- export * from './DetailsBlockProvider';
18
- export * from './hooks';
19
- export { useLinkActionProps } from './hooks/index';
20
+ export * from './TemplateBlockProvider';
@@ -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 SetPrimaryKeyAction: (props: any) => React.JSX.Element;
@@ -7,4 +7,4 @@
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 CollectionCategory: React.MemoExoticComponent<import("@formily/react").ReactFC<Omit<any, "ref">>>;
10
+ export declare const CollectionCategory: React.MemoExoticComponent<import("@formily/reactive-react").ReactFC<Omit<any, "ref">>>;
@@ -7,4 +7,4 @@
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 CollectionFieldInterfaceTag: React.MemoExoticComponent<import("@formily/react").ReactFC<Omit<any, "ref">>>;
10
+ export declare const CollectionFieldInterfaceTag: React.MemoExoticComponent<import("@formily/reactive-react").ReactFC<Omit<any, "ref">>>;
@@ -7,4 +7,4 @@
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 CollectionTemplateTag: React.MemoExoticComponent<import("@formily/react").ReactFC<Omit<any, "ref">>>;
10
+ export declare const CollectionTemplateTag: React.MemoExoticComponent<import("@formily/reactive-react").ReactFC<Omit<any, "ref">>>;
@@ -7,7 +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 const Summary: React.MemoExoticComponent<import("@formily/react").ReactFC<{
10
+ declare const Summary: React.MemoExoticComponent<import("@formily/reactive-react").ReactFC<{
11
11
  schema: any;
12
12
  label: string;
13
13
  }>>;
@@ -22,3 +22,4 @@ export declare const useFieldInterfaceOptions: () => {
22
22
  label: string;
23
23
  order?: number;
24
24
  }[];
25
+ export declare const isPrimaryKeyCandidate: (field: CollectionFieldInterface) => any;
@@ -47,7 +47,7 @@ export declare const useFilterDataSource: (options: any) => import("../api-clien
47
47
  export declare const useFilterAction: () => {
48
48
  run(): Promise<void>;
49
49
  };
50
- export declare const useCreateAction: (actionCallback?: (values: any, collections: any[]) => void) => {
50
+ export declare const useCreateAction: (actionCallback?: (values: any) => void) => {
51
51
  run(): Promise<void>;
52
52
  };
53
53
  export declare const useCreateActionWithoutRefresh: (actionCallback?: (values: any) => void) => {
@@ -18,7 +18,6 @@ export declare class ColorFieldInterface extends CollectionFieldInterface {
18
18
  uiSchema: {
19
19
  type: string;
20
20
  'x-component': string;
21
- default: string;
22
21
  };
23
22
  };
24
23
  availableTypes: string[];
@@ -33,6 +33,7 @@ export * from './phone';
33
33
  export * from './radioGroup';
34
34
  export * from './richText';
35
35
  export * from './select';
36
+ export * from './snowflake-id';
36
37
  export * from './subTable';
37
38
  export * from './tableoid';
38
39
  export * from './textarea';
@@ -14,6 +14,7 @@ export declare class InputFieldInterface extends CollectionFieldInterface {
14
14
  group: string;
15
15
  order: number;
16
16
  title: string;
17
+ primaryKeyDescription: string;
17
18
  sortable: boolean;
18
19
  default: {
19
20
  interface: string;
@@ -13,6 +13,7 @@ export declare class IntegerFieldInterface extends CollectionFieldInterface {
13
13
  group: string;
14
14
  order: number;
15
15
  title: string;
16
+ primaryKeyDescription: string;
16
17
  sortable: boolean;
17
18
  default: {
18
19
  type: string;
@@ -13,6 +13,7 @@ export declare class NanoidFieldInterface extends CollectionFieldInterface {
13
13
  group: string;
14
14
  order: number;
15
15
  title: string;
16
+ primaryKeyDescription: string;
16
17
  hidden: boolean;
17
18
  sortable: boolean;
18
19
  default: {
@@ -57,6 +57,38 @@ export declare class NumberFieldInterface extends CollectionFieldInterface {
57
57
  label: string;
58
58
  }[];
59
59
  };
60
+ precision: {
61
+ type: string;
62
+ title: string;
63
+ 'x-component': string;
64
+ 'x-decorator': string;
65
+ 'x-disabled': string;
66
+ default: number;
67
+ 'x-reactions': {
68
+ dependencies: string[];
69
+ fulfill: {
70
+ state: {
71
+ visible: string;
72
+ };
73
+ };
74
+ };
75
+ };
76
+ scale: {
77
+ type: string;
78
+ title: string;
79
+ 'x-component': string;
80
+ 'x-decorator': string;
81
+ 'x-disabled': string;
82
+ default: number;
83
+ 'x-reactions': {
84
+ dependencies: string[];
85
+ fulfill: {
86
+ state: {
87
+ visible: string;
88
+ };
89
+ };
90
+ };
91
+ };
60
92
  'uiSchema.title': {
61
93
  type: string;
62
94
  title: string;
@@ -74,6 +106,18 @@ export declare class NumberFieldInterface extends CollectionFieldInterface {
74
106
  'x-validator': string;
75
107
  description: string;
76
108
  };
109
+ type: {
110
+ type: string;
111
+ title: string;
112
+ 'x-component': string;
113
+ 'x-decorator': string;
114
+ 'x-disabled': string;
115
+ default: string;
116
+ enum: {
117
+ label: string;
118
+ value: string;
119
+ }[];
120
+ };
77
121
  };
78
122
  filterable: {
79
123
  operators: ({
@@ -0,0 +1,117 @@
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 { CollectionFieldInterface } from '../../data-source/collection-field-interface/CollectionFieldInterface';
10
+ export declare class SnowflakeIdFieldInterface extends CollectionFieldInterface {
11
+ name: string;
12
+ type: string;
13
+ group: string;
14
+ order: number;
15
+ title: string;
16
+ primaryKeyDescription: string;
17
+ hidden: boolean;
18
+ sortable: boolean;
19
+ default: {
20
+ type: string;
21
+ uiSchema: {
22
+ type: string;
23
+ 'x-component': string;
24
+ 'x-component-props': {
25
+ stringMode: boolean;
26
+ separator: string;
27
+ step: string;
28
+ };
29
+ 'x-validator': string;
30
+ };
31
+ };
32
+ availableTypes: string[];
33
+ properties: {
34
+ layout: {
35
+ type: string;
36
+ title: string;
37
+ 'x-component': string;
38
+ 'x-decorator': string;
39
+ 'x-decorator-props': {
40
+ style: {
41
+ marginBottom: string;
42
+ };
43
+ };
44
+ properties: {
45
+ primaryKey: {
46
+ type: string;
47
+ 'x-content': string;
48
+ 'x-decorator': string;
49
+ 'x-component': string;
50
+ 'x-disabled': string;
51
+ 'x-reactions': {
52
+ dependencies: string[];
53
+ when: string;
54
+ fulfill: {
55
+ state: {
56
+ value: boolean;
57
+ };
58
+ };
59
+ }[];
60
+ };
61
+ unique: {
62
+ type: string;
63
+ 'x-content': string;
64
+ 'x-decorator': string;
65
+ 'x-component': string;
66
+ 'x-disabled': string;
67
+ 'x-reactions': {
68
+ dependencies: string[];
69
+ when: string;
70
+ fulfill: {
71
+ state: {
72
+ value: boolean;
73
+ };
74
+ };
75
+ }[];
76
+ };
77
+ };
78
+ };
79
+ 'uiSchema.title': {
80
+ type: string;
81
+ title: string;
82
+ required: boolean;
83
+ 'x-decorator': string;
84
+ 'x-component': string;
85
+ };
86
+ name: {
87
+ type: string;
88
+ title: string;
89
+ required: boolean;
90
+ 'x-disabled': string;
91
+ 'x-decorator': string;
92
+ 'x-component': string;
93
+ 'x-validator': string;
94
+ description: string;
95
+ };
96
+ };
97
+ filterable: {
98
+ operators: ({
99
+ label: string;
100
+ value: string;
101
+ selected: boolean;
102
+ noValue?: undefined;
103
+ } | {
104
+ label: string;
105
+ value: string;
106
+ selected?: undefined;
107
+ noValue?: undefined;
108
+ } | {
109
+ label: string;
110
+ value: string;
111
+ noValue: boolean;
112
+ selected?: undefined;
113
+ })[];
114
+ };
115
+ description: string;
116
+ titleUsable: boolean;
117
+ }
@@ -13,6 +13,7 @@ export declare class UUIDFieldInterface extends CollectionFieldInterface {
13
13
  group: string;
14
14
  order: number;
15
15
  title: string;
16
+ primaryKeyDescription: string;
16
17
  hidden: boolean;
17
18
  sortable: boolean;
18
19
  default: {
@@ -74,6 +74,7 @@ export declare const defaultConfigurableProperties: {
74
74
  };
75
75
  'x-component': import("react").MemoExoticComponent<import("@formily/reactive-react").ReactFC<Omit<any, "ref">>>;
76
76
  'x-component-props': {
77
+ template: string;
77
78
  disabled: string;
78
79
  presetFieldsDisabledIncludes: string;
79
80
  };
@@ -23,6 +23,7 @@ export declare abstract class CollectionFieldInterface {
23
23
  group: string;
24
24
  title?: string;
25
25
  description?: string;
26
+ primaryKeyDescription?: string;
26
27
  order?: number;
27
28
  default?: {
28
29
  type: string;
@@ -35,6 +35,7 @@ export declare class DataSourceManager {
35
35
  constructor(options: DataSourceManagerOptions, app: Application);
36
36
  addCollectionMixins(mixins?: (typeof Collection)[]): void;
37
37
  getDataSources(filterDataSource?: (dataSource: DataSource) => boolean): DataSource[];
38
+ setDataSources(dataSources: DataSourceOptions[]): void;
38
39
  getDataSource(key?: string): DataSource;
39
40
  removeDataSources(keys: string[]): void;
40
41
  addDataSource(DataSource: DataSourceFactory, options: DataSourceOptions): DataSource;
@@ -19,14 +19,18 @@ export declare class MockFlowModelRepository implements IFlowModelRepository<Flo
19
19
  destroy(uid: string): Promise<boolean>;
20
20
  clear(): Promise<boolean>;
21
21
  move(sourceId: string, targetId: string, position?: 'before' | 'after'): Promise<void>;
22
+ duplicate(uid: string): Promise<any>;
22
23
  }
23
24
  export declare class FlowModelRepository implements IFlowModelRepository<FlowModel> {
24
25
  private app;
25
26
  constructor(app: Application);
27
+ private inFlightFindOne;
28
+ private buildFindOneKey;
26
29
  findOne(query: any): Promise<any>;
27
30
  save(model: FlowModel, options?: {
28
31
  onlyStepParams?: boolean;
29
32
  }): Promise<any>;
30
33
  destroy(uid: string): Promise<boolean>;
31
34
  move(sourceId: string, targetId: string, position?: 'before' | 'after'): Promise<any>;
35
+ duplicate(uid: string): Promise<any>;
32
36
  }
@@ -13,7 +13,8 @@ type FlowPageProps = {
13
13
  pageModelClass?: string;
14
14
  parentId?: string;
15
15
  onModelLoaded?: (uid: string, model: FlowModel) => void;
16
+ defaultTabTitle?: string;
16
17
  };
17
- export declare const FlowPage: (props: FlowPageProps & Record<string, unknown>) => React.JSX.Element;
18
+ export declare const FlowPage: React.MemoExoticComponent<(props: FlowPageProps & Record<string, unknown>) => React.JSX.Element>;
18
19
  export declare const RemoteFlowModelRenderer: (props: any) => React.JSX.Element;
19
20
  export {};
@@ -6,5 +6,4 @@
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 { FlowModel } from '@nocobase/flow-engine';
10
- export declare const fixed: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, import("@nocobase/flow-engine").FlowContext>;
9
+ export declare const fixed: import("@nocobase/flow-engine").ActionDefinition<import("@nocobase/flow-engine").FlowModel<import("@nocobase/flow-engine").DefaultStructure>, import("@nocobase/flow-engine").FlowContext>;
@@ -10,7 +10,7 @@ export declare function buildAssociationOptions(ctx: any, itemModel: any, titleF
10
10
  label: any;
11
11
  value: any;
12
12
  }[] | {
13
- label: string;
13
+ label: any;
14
14
  options: {
15
15
  label: any;
16
16
  value: any;
@@ -10,8 +10,12 @@ export * from './confirm';
10
10
  export * from './dataScope';
11
11
  export * from './openView';
12
12
  export * from './runjs';
13
+ export * from './showMessage';
14
+ export * from './showNotification';
15
+ export * from './navigateToURL';
13
16
  export * from './customVariable';
14
17
  export * from './refreshTargetBlocks';
18
+ export * from './setTargetDataScope';
15
19
  export { titleField } from './titleField';
16
20
  export * from './dateTimeFormat';
17
21
  export * from './sortingRules';
@@ -24,6 +28,6 @@ export * from './aclCheck';
24
28
  export * from './pattern';
25
29
  export * from './validation';
26
30
  export * from './columnFixed';
27
- export { fieldLinkageRules, detailsFieldLinkageRules, linkageSetDetailsFieldProps, actionLinkageRules, blockLinkageRules, linkageSetBlockProps, linkageSetActionProps, linkageSetFieldProps, linkageAssignField, linkageRunjs, } from './linkageRules';
31
+ export { fieldLinkageRules, subFormFieldLinkageRules, detailsFieldLinkageRules, linkageSetDetailsFieldProps, actionLinkageRules, blockLinkageRules, linkageSetBlockProps, linkageSetActionProps, linkageSetFieldProps, subFormLinkageSetFieldProps, linkageAssignField, linkageRunjs, subFormLinkageAssignField, } from './linkageRules';
28
32
  export { displayFieldComponent } from './displayFieldComponent';
29
33
  export * from './overflowMode';
@@ -10,10 +10,14 @@ import { FlowContext, FlowModel } from '@nocobase/flow-engine';
10
10
  export declare const linkageSetBlockProps: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
11
11
  export declare const linkageSetActionProps: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
12
12
  export declare const linkageSetFieldProps: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
13
+ export declare const subFormLinkageSetFieldProps: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
13
14
  export declare const linkageSetDetailsFieldProps: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
14
15
  export declare const linkageAssignField: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
16
+ export declare const subFormLinkageAssignField: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
17
+ export declare const setFieldsDefaultValue: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
15
18
  export declare const linkageRunjs: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
16
19
  export declare const blockLinkageRules: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
17
20
  export declare const actionLinkageRules: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
18
21
  export declare const fieldLinkageRules: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
22
+ export declare const subFormFieldLinkageRules: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
19
23
  export declare const detailsFieldLinkageRules: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
@@ -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 declare const navigateToURL: import("@nocobase/flow-engine").ActionDefinition<import("@nocobase/flow-engine").FlowModel<import("@nocobase/flow-engine").DefaultStructure>, import("@nocobase/flow-engine").FlowContext>;
@@ -9,18 +9,7 @@
9
9
  import { FlowModel } from '@nocobase/flow-engine';
10
10
  /**
11
11
  * 弹窗打开动作(openView)配置
12
- * 主要逻辑说明:
13
- * - UID 规则:
14
- * - 默认使用当前模型 uid;必填。
15
- * - 当 uid 与当前模型不同:调用 ctx.openView(uid, …) 打开“其它弹窗”。
16
- * - 当 uid 与当前模型相同:在当前上下文打开“自身弹窗”。
17
- * - 数据源/集合:
18
- * - 顶层只读展示(使用级联),底层字段 dataSourceKey / collectionName 永远禁用。
19
- * - 默认取当前集合的数据源/集合;若从他弹窗回填则以回填为准。
20
- * - 关联名/来源主键:
21
- * - 当关联名无值时隐藏;有默认值时禁用。
22
- * - Source ID 在关联名不存在时隐藏;在关联场景默认使用 {{ ctx.resource.sourceId }}。
23
- * - Filter by TK:默认使用 {{ ctx.record.<filterTargetKey> }}。
24
- * - 变量选择:仅暴露 record/resource,避免误选 view/collection。
12
+ * - 当 params.uid !== ctx.model.uid:委托 ctx.openView 打开其它弹窗
13
+ * - filterByTk/sourceId 优先级:显式 inputArgs > params > actionDefaults
25
14
  */
26
15
  export declare const openView: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, import("@nocobase/flow-engine").FlowContext>;
@@ -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 { FlowModel } from '@nocobase/flow-engine';
10
+ export declare const setTargetDataScope: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, import("@nocobase/flow-engine").FlowContext>;
@@ -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 declare const showMessage: import("@nocobase/flow-engine").ActionDefinition<import("@nocobase/flow-engine").FlowModel<import("@nocobase/flow-engine").DefaultStructure>, import("@nocobase/flow-engine").FlowContext>;
@@ -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 declare const showNotification: import("@nocobase/flow-engine").ActionDefinition<import("@nocobase/flow-engine").FlowModel<import("@nocobase/flow-engine").DefaultStructure>, import("@nocobase/flow-engine").FlowContext>;
@@ -6,5 +6,4 @@
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 const SelectOptions: (props: any) => any;
10
9
  export declare const titleField: import("@nocobase/flow-engine").ActionDefinition<import("@nocobase/flow-engine").FlowModel<import("@nocobase/flow-engine").DefaultStructure>, import("@nocobase/flow-engine").FlowContext>;
@@ -0,0 +1,33 @@
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 { Liquid } from 'liquidjs';
10
+ export declare class LiquidEngine extends Liquid {
11
+ constructor(options: any);
12
+ /**
13
+ * 将路径数组转为 Liquid 模板上下文对象
14
+ * @param {string[]} paths - 如 ['ctx.user.name', 'ctx.order.total']
15
+ * @returns {object} 形如 { user: { name: '{{ctx.user.name}}' }, order: {...} }
16
+ */
17
+ transformLiquidContext(paths?: any[]): {};
18
+ /**
19
+ * 渲染模板
20
+ * @param {string} template - Liquid 模板字符串
21
+ * @param {object} context - 模板上下文变量
22
+ * @returns {Promise<string>} 渲染后的字符串
23
+ */
24
+ render(template: any, context?: {}): Promise<any>;
25
+ isFieldUsed(field: any, paths: any): any;
26
+ enrichArrayFieldsSelective(obj: any, vars: any): void;
27
+ /**
28
+ * 合并步骤:获取变量 -> 构建 context -> 解析 -> 渲染
29
+ * @param {string} template Liquid 模板字符串
30
+ * @param {context} ctx flowContext
31
+ */
32
+ renderWithFullContext(template: any, ctx: any): Promise<any>;
33
+ }
@@ -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 declare const Display: (props: any) => any;
@@ -0,0 +1,23 @@
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
+ import 'vditor/dist/index.css';
11
+ export interface MarkdownWithContextSelectorProps {
12
+ value?: string;
13
+ onChange?: (v: string) => void;
14
+ placeholder?: string;
15
+ rows?: number;
16
+ style?: React.CSSProperties;
17
+ quoteFlag?: boolean;
18
+ enableContextSelect?: boolean;
19
+ }
20
+ /**
21
+ * markdown 与变量选择器的组合,紧凑排版,边框无缝拼接。
22
+ */
23
+ export declare const MarkdownWithContextSelector: React.FC<MarkdownWithContextSelectorProps>;
@@ -0,0 +1,24 @@
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 class Markdown {
11
+ /**
12
+ * 渲染 Markdown
13
+ * @param {string} text - Markdown 文本
14
+ * @param {object} props - 其他属性
15
+ * @returns {JSX.Element}
16
+ */
17
+ render(text: any, props: any): React.JSX.Element;
18
+ /**
19
+ * 渲染可编辑的 Markdown 组件
20
+ * @param {object} props - 编辑器属性
21
+ * @returns {JSX.Element}
22
+ */
23
+ edit(props: any): React.JSX.Element;
24
+ }