@nocobase/plugin-workflow 2.2.0-beta.9 → 3.0.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 (267) hide show
  1. package/client-v2.d.ts +2 -0
  2. package/client-v2.js +1 -0
  3. package/dist/client/119.e7dbd037d52d1286.js +10 -0
  4. package/dist/client/142.fb4936d78fc80007.js +10 -0
  5. package/dist/client/159.cc9a0f2d92cab2c1.js +10 -0
  6. package/dist/client/276.69fb2aea13bc7c37.js +10 -0
  7. package/dist/client/346.66d060d37843d3d1.js +10 -0
  8. package/dist/client/382.d37fba14a6b91b0b.js +10 -0
  9. package/dist/client/394.a37310b78419ad7a.js +10 -0
  10. package/dist/client/438.8bd46a04ca080a4e.js +10 -0
  11. package/dist/client/509.3a4ac27f10833c75.js +10 -0
  12. package/dist/client/54.d81b710f7b4c1cd5.js +10 -0
  13. package/dist/client/618.1aa6c21d0f2840cb.js +10 -0
  14. package/dist/client/635.ff6085589e23d39b.js +10 -0
  15. package/dist/client/67.5eb8767a709f27d9.js +10 -0
  16. package/dist/client/719.f011fde3ad54571e.js +10 -0
  17. package/dist/client/728.711fd4f1ed7d4e6a.js +10 -0
  18. package/dist/client/739.49407722fca8d236.js +10 -0
  19. package/dist/client/759.13aab01e6912ed8d.js +10 -0
  20. package/dist/client/772.1ebaef11a0ac8688.js +10 -0
  21. package/dist/client/782.47792ce10fc0d5fb.js +10 -0
  22. package/dist/client/828.d03ecfc4ac66e0f8.js +10 -0
  23. package/dist/client/87.b62b1123d4d560fb.js +10 -0
  24. package/dist/client/938.26493fc09ba1ccbc.js +10 -0
  25. package/dist/client/964.5ab736effd480a42.js +10 -0
  26. package/dist/client/972.dd7f074d5f12e171.js +10 -0
  27. package/dist/client/AddNodeContext.d.ts +1 -9
  28. package/dist/client/BranchContext.d.ts +2 -10
  29. package/dist/client/FlowContext.d.ts +10 -5
  30. package/dist/client/NodeClipboardContext.d.ts +12 -2
  31. package/dist/client/NodeDragContext.d.ts +14 -2
  32. package/dist/client/RemoveNodeContext.d.ts +16 -2
  33. package/dist/client/WorkflowTasks.d.ts +26 -3
  34. package/dist/client/index.d.ts +2 -2
  35. package/dist/client/index.js +1 -1
  36. package/dist/client/nodeVariableUtils.d.ts +7 -6
  37. package/dist/client/nodes/calculation.d.ts +3 -75
  38. package/dist/client/nodes/condition.d.ts +7 -111
  39. package/dist/client/nodes/create.d.ts +3 -124
  40. package/dist/client/nodes/destroy.d.ts +2 -57
  41. package/dist/client/nodes/end.d.ts +2 -23
  42. package/dist/client/nodes/index.d.ts +2 -91
  43. package/dist/client/nodes/multi-conditions.d.ts +10 -48
  44. package/dist/client/nodes/output.d.ts +2 -44
  45. package/dist/client/nodes/query.d.ts +3 -255
  46. package/dist/client/nodes/update.d.ts +2 -117
  47. package/dist/client/style.d.ts +7 -27
  48. package/dist/client/triggers/collection.d.ts +3 -181
  49. package/dist/client/triggers/index.d.ts +2 -36
  50. package/dist/client/triggers/schedule/index.d.ts +8 -65
  51. package/dist/client/utils.d.ts +4 -5
  52. package/dist/client/variable.d.ts +7 -53
  53. package/dist/client-v2/119.81195bcd0d451279.js +10 -0
  54. package/dist/client-v2/142.a8c8df2a9abb43c5.js +10 -0
  55. package/dist/client-v2/159.cb221540c286cd32.js +10 -0
  56. package/dist/client-v2/276.7f746d899e221e2f.js +10 -0
  57. package/dist/client-v2/326.bdc99ad8e7590970.js +10 -0
  58. package/dist/client-v2/346.8c038b3c99d4fdc9.js +10 -0
  59. package/dist/client-v2/382.05f5482bb512b179.js +10 -0
  60. package/dist/client-v2/387.e002f8eb34aa77e3.js +10 -0
  61. package/dist/client-v2/394.515ed058e7f72797.js +10 -0
  62. package/dist/client-v2/438.1459f1a7cd19ea4f.js +10 -0
  63. package/dist/client-v2/513.18e257b3025d7692.js +10 -0
  64. package/dist/client-v2/54.d3daf06e53092726.js +10 -0
  65. package/dist/client-v2/635.14a6f21cf4f16345.js +10 -0
  66. package/dist/client-v2/677.7007f4a6a4640165.js +10 -0
  67. package/dist/client-v2/719.05cf070ef89a78f4.js +10 -0
  68. package/dist/client-v2/728.4e8322ff8fce87b9.js +10 -0
  69. package/dist/client-v2/739.5b60845103064f8d.js +10 -0
  70. package/dist/client-v2/759.7b162ad3adf450f1.js +10 -0
  71. package/dist/client-v2/772.8e5148d8c1518449.js +10 -0
  72. package/dist/client-v2/938.717e47af39485b29.js +10 -0
  73. package/dist/client-v2/ExecutionCanvas.d.ts +15 -0
  74. package/dist/client-v2/canvas/AddNodeContext.d.ts +35 -0
  75. package/dist/client-v2/canvas/AddNodeContext.shared.d.ts +33 -0
  76. package/dist/client-v2/canvas/AddNodeSlot.d.ts +20 -0
  77. package/dist/client-v2/canvas/Branch.d.ts +32 -0
  78. package/dist/client-v2/canvas/BranchContext.d.ts +29 -0
  79. package/dist/client-v2/canvas/BranchRenderContext.d.ts +14 -0
  80. package/dist/client-v2/canvas/CanvasContent.d.ts +20 -0
  81. package/dist/client-v2/canvas/DownstreamBranchIndex.d.ts +20 -0
  82. package/dist/client-v2/canvas/Instruction.d.ts +139 -0
  83. package/dist/{client/triggers/schedule/EndsByField.d.ts → client-v2/canvas/JobButton.d.ts} +3 -3
  84. package/dist/client-v2/canvas/Node.d.ts +38 -0
  85. package/dist/client-v2/canvas/NodeClipboardContext.d.ts +64 -0
  86. package/dist/client-v2/canvas/NodeConfigDrawer.d.ts +27 -0
  87. package/dist/client-v2/canvas/NodeDragContext.d.ts +83 -0
  88. package/dist/client-v2/canvas/RemoveNodeContext.d.ts +45 -0
  89. package/dist/client-v2/canvas/WorkflowTypedVariableInput.d.ts +16 -0
  90. package/dist/client-v2/canvas/WorkflowVariableInput.d.ts +47 -0
  91. package/dist/client-v2/canvas/WorkflowVariableJsonTextArea.d.ts +15 -0
  92. package/dist/client-v2/canvas/WorkflowVariableTag.d.ts +22 -0
  93. package/dist/client-v2/canvas/WorkflowVariableTextArea.d.ts +23 -0
  94. package/dist/client-v2/canvas/adaptVariableOptionToMetaTree.d.ts +48 -0
  95. package/dist/client-v2/canvas/addNodeController.d.ts +70 -0
  96. package/dist/client-v2/canvas/collectionFieldOptions.d.ts +57 -0
  97. package/dist/client-v2/canvas/contexts.d.ts +86 -0
  98. package/dist/client-v2/canvas/dropImpact.d.ts +28 -0
  99. package/dist/client-v2/canvas/instructionAvailability.d.ts +26 -0
  100. package/dist/client-v2/canvas/nodeRenderDispatch.d.ts +79 -0
  101. package/dist/client-v2/canvas/nodeTree.d.ts +21 -0
  102. package/dist/client-v2/canvas/nodeVariableUtils.d.ts +14 -0
  103. package/dist/client-v2/canvas/removeNodeUtils.d.ts +31 -0
  104. package/dist/client-v2/canvas/style.d.ts +35 -0
  105. package/dist/client-v2/canvas/textAreaInsertion.d.ts +14 -0
  106. package/dist/client-v2/canvas/useWorkflowInstruction.d.ts +23 -0
  107. package/dist/client-v2/canvas/useWorkflowVariableOptions.d.ts +40 -0
  108. package/dist/client-v2/canvas/workflowVariableConverters.d.ts +13 -0
  109. package/dist/client-v2/components/Calculation.d.ts +18 -0
  110. package/dist/client-v2/components/ExecutionStatusIcon.d.ts +18 -0
  111. package/dist/{client/triggers/schedule/RepeatField.d.ts → client-v2/components/ExecutionStatusTag.d.ts} +3 -4
  112. package/dist/client-v2/components/ExecutionViewHeader.d.ts +29 -0
  113. package/dist/client-v2/components/ExecutionsDropdown.d.ts +25 -0
  114. package/dist/client-v2/components/FilterDynamicComponent.d.ts +28 -0
  115. package/dist/client-v2/components/HideVariableContext.d.ts +11 -0
  116. package/dist/client-v2/components/JobResultModal.d.ts +11 -0
  117. package/dist/client-v2/components/RadioWithTooltip.d.ts +23 -0
  118. package/dist/client-v2/components/SyncModeSelect.d.ts +16 -0
  119. package/dist/{client/triggers/schedule/OnField.d.ts → client-v2/components/SyncModeTag.d.ts} +3 -3
  120. package/dist/client-v2/components/TestRunButton.d.ts +36 -0
  121. package/dist/client-v2/components/TimeoutInput.d.ts +15 -0
  122. package/dist/client-v2/components/WorkflowCanvasHeader.d.ts +17 -0
  123. package/dist/client-v2/components/WorkflowDetailsModal.d.ts +25 -0
  124. package/dist/client-v2/components/WorkflowEnabledSwitch.d.ts +16 -0
  125. package/dist/client-v2/components/WorkflowMenu.d.ts +17 -0
  126. package/dist/client-v2/components/WorkflowRevisionsDropdown.d.ts +15 -0
  127. package/dist/client-v2/components/WorkflowVariableWrapper.d.ts +25 -0
  128. package/dist/client-v2/components/collection/AppendsSelect.d.ts +15 -0
  129. package/dist/client-v2/components/collection/AssignedFieldsEditor.d.ts +24 -0
  130. package/dist/client-v2/components/collection/CollectionCascader.d.ts +15 -0
  131. package/dist/client-v2/components/collection/FieldsSelect.d.ts +16 -0
  132. package/dist/client-v2/components/collection/PaginationFields.d.ts +14 -0
  133. package/dist/client-v2/components/collection/SortFieldsInput.d.ts +19 -0
  134. package/dist/client-v2/components/collection/TriggerCollectionRecordSelect.d.ts +15 -0
  135. package/dist/client-v2/components/collection/index.d.ts +16 -0
  136. package/dist/client-v2/components/collection/utils.d.ts +42 -0
  137. package/dist/client-v2/components/formatResultForDisplay.d.ts +17 -0
  138. package/dist/client-v2/components/jobStatus.d.ts +27 -0
  139. package/dist/client-v2/components/renderEngineReference.d.ts +10 -0
  140. package/dist/client-v2/components/workflowCanvas.d.ts +41 -0
  141. package/dist/client-v2/constants.d.ts +19 -0
  142. package/dist/client-v2/hooks/useWorkflowRuntimePaths.d.ts +16 -0
  143. package/dist/client-v2/index.d.ts +48 -0
  144. package/dist/client-v2/index.js +10 -0
  145. package/dist/client-v2/legacySettingsRedirect.d.ts +15 -0
  146. package/dist/client-v2/locale.d.ts +41 -0
  147. package/dist/{client → client-v2}/models/NodeDetailsGridModel.d.ts +1 -1
  148. package/dist/{client → client-v2}/models/NodeDetailsModel.d.ts +1 -1
  149. package/dist/{client → client-v2}/models/NodeValueModel.d.ts +1 -1
  150. package/dist/{client → client-v2}/models/TaskCardCommonItemModel.d.ts +1 -1
  151. package/dist/client-v2/models/WorkflowTasksTopbarActionModel.d.ts +18 -0
  152. package/dist/{client → client-v2}/models/index.d.ts +2 -0
  153. package/dist/client-v2/models/triggerWorkflows.d.ts +43 -0
  154. package/dist/client-v2/nodes/calculation.d.ts +38 -0
  155. package/dist/client-v2/nodes/collectionNode.d.ts +29 -0
  156. package/dist/client-v2/nodes/components/calculation.d.ts +11 -0
  157. package/dist/client-v2/nodes/components/collection.d.ts +15 -0
  158. package/dist/client-v2/nodes/components/condition.d.ts +25 -0
  159. package/dist/client-v2/nodes/components/conditionShared.d.ts +20 -0
  160. package/dist/client-v2/nodes/components/create.d.ts +12 -0
  161. package/dist/client-v2/nodes/components/destroy.d.ts +12 -0
  162. package/dist/{client/triggers/schedule/ScheduleConfig.d.ts → client-v2/nodes/components/end.d.ts} +1 -1
  163. package/dist/client-v2/nodes/components/filter.d.ts +17 -0
  164. package/dist/client-v2/nodes/components/multi-conditions.d.ts +13 -0
  165. package/dist/client-v2/nodes/components/multiConditionsShared.d.ts +20 -0
  166. package/dist/client-v2/nodes/components/output.d.ts +10 -0
  167. package/dist/client-v2/nodes/components/query.d.ts +12 -0
  168. package/dist/client-v2/nodes/components/update.d.ts +12 -0
  169. package/dist/client-v2/nodes/condition.d.ts +46 -0
  170. package/dist/client-v2/nodes/create.d.ts +30 -0
  171. package/dist/client-v2/nodes/destroy.d.ts +24 -0
  172. package/dist/client-v2/nodes/end.d.ts +21 -0
  173. package/dist/client-v2/nodes/multi-conditions.d.ts +34 -0
  174. package/dist/client-v2/nodes/output.d.ts +29 -0
  175. package/dist/client-v2/nodes/query.d.ts +32 -0
  176. package/dist/client-v2/nodes/update.d.ts +25 -0
  177. package/dist/client-v2/pages/ExecutionHistoryDrawer.d.ts +13 -0
  178. package/dist/client-v2/pages/ExecutionViewPage.d.ts +10 -0
  179. package/dist/client-v2/pages/WorkflowCanvasPage.d.ts +10 -0
  180. package/dist/client-v2/pages/WorkflowCategoryTabs.d.ts +25 -0
  181. package/dist/client-v2/pages/WorkflowFormDrawer.d.ts +40 -0
  182. package/dist/client-v2/pages/WorkflowPane.d.ts +10 -0
  183. package/dist/client-v2/pages/WorkflowTasksPage.d.ts +10 -0
  184. package/dist/client-v2/plugin.d.ts +119 -0
  185. package/dist/client-v2/taskCenter.d.ts +105 -0
  186. package/dist/client-v2/triggers/ExecuteWorkflowButton.d.ts +35 -0
  187. package/dist/client-v2/triggers/TriggerConfig.d.ts +22 -0
  188. package/dist/client-v2/triggers/TriggerExecutionButton.d.ts +13 -0
  189. package/dist/client-v2/triggers/collection/CollectionConfig.d.ts +14 -0
  190. package/dist/client-v2/triggers/collection/TriggerCollectionConfig.d.ts +11 -0
  191. package/dist/client-v2/triggers/collection/constants.d.ts +28 -0
  192. package/dist/client-v2/triggers/collection/index.d.ts +40 -0
  193. package/dist/client-v2/triggers/index.d.ts +63 -0
  194. package/dist/client-v2/triggers/schedule/EndsByField.d.ts +17 -0
  195. package/dist/client-v2/triggers/schedule/OnField.d.ts +20 -0
  196. package/dist/client-v2/triggers/schedule/RepeatField.d.ts +23 -0
  197. package/dist/client-v2/triggers/schedule/ScheduleConfig.d.ts +17 -0
  198. package/dist/client-v2/triggers/schedule/ScheduleModes.d.ts +41 -0
  199. package/dist/{client → client-v2}/triggers/schedule/TriggerScheduleConfig.d.ts +1 -0
  200. package/dist/{client → client-v2}/triggers/schedule/constants.d.ts +8 -5
  201. package/dist/client-v2/triggers/schedule/index.d.ts +40 -0
  202. package/dist/client-v2/triggers/schedule/locale/Cron.zh-CN.d.ts +11 -0
  203. package/dist/client-v2/utils/contextSingleton.d.ts +9 -0
  204. package/dist/common/collections/userWorkflowTaskStats.d.ts +54 -0
  205. package/dist/common/collections/userWorkflowTaskStats.js +87 -0
  206. package/dist/common/collections/workflows.d.ts +16 -0
  207. package/dist/common/collections/workflows.js +5 -0
  208. package/dist/common/defaultWorkflowFilter.d.ts +21 -0
  209. package/dist/common/defaultWorkflowFilter.js +38 -0
  210. package/dist/common/executionStatus.d.ts +44 -0
  211. package/dist/common/executionStatus.js +133 -0
  212. package/dist/externalVersion.js +16 -13
  213. package/dist/locale/de-DE.json +15 -1
  214. package/dist/locale/en-US.json +30 -1
  215. package/dist/locale/es-ES.json +15 -1
  216. package/dist/locale/fr-FR.json +15 -1
  217. package/dist/locale/hu-HU.json +15 -1
  218. package/dist/locale/id-ID.json +15 -1
  219. package/dist/locale/it-IT.json +15 -1
  220. package/dist/locale/ja-JP.json +15 -1
  221. package/dist/locale/ko-KR.json +15 -1
  222. package/dist/locale/nl-NL.json +15 -1
  223. package/dist/locale/pt-BR.json +15 -1
  224. package/dist/locale/ru-RU.json +15 -1
  225. package/dist/locale/tr-TR.json +15 -1
  226. package/dist/locale/uk-UA.json +15 -1
  227. package/dist/locale/vi-VN.json +15 -1
  228. package/dist/locale/zh-CN.json +29 -1
  229. package/dist/locale/zh-TW.json +21 -1
  230. package/dist/node_modules/cron-parser/package.json +1 -1
  231. package/dist/node_modules/joi/package.json +1 -1
  232. package/dist/node_modules/lru-cache/package.json +1 -1
  233. package/dist/node_modules/nodejs-snowflake/package.json +1 -1
  234. package/dist/server/Dispatcher.d.ts +27 -15
  235. package/dist/server/Dispatcher.js +199 -161
  236. package/dist/server/ExecutionTimeoutManager.js +2 -1
  237. package/dist/server/Plugin.d.ts +58 -12
  238. package/dist/server/Plugin.js +355 -15
  239. package/dist/server/Processor.d.ts +1 -7
  240. package/dist/server/Processor.js +11 -7
  241. package/dist/server/actions/executions.js +3 -6
  242. package/dist/server/actions/index.js +3 -1
  243. package/dist/server/actions/jobs.js +1 -2
  244. package/dist/server/actions/userWorkflowTaskStats.d.ts +10 -0
  245. package/dist/server/actions/userWorkflowTaskStats.js +112 -0
  246. package/dist/server/actions/workflows.d.ts +1 -0
  247. package/dist/server/actions/workflows.js +34 -2
  248. package/dist/server/collections/userWorkflowTaskStats.d.ts +11 -0
  249. package/dist/server/collections/userWorkflowTaskStats.js +43 -0
  250. package/dist/server/index.d.ts +1 -0
  251. package/dist/server/triggers/CollectionTrigger.d.ts +1 -1
  252. package/dist/server/triggers/CollectionTrigger.js +3 -0
  253. package/dist/server/triggers/ScheduleTrigger/StaticScheduleTrigger.d.ts +1 -1
  254. package/dist/server/triggers/index.d.ts +1 -1
  255. package/dist/server/types/Execution.d.ts +2 -0
  256. package/dist/server/types/Job.d.ts +5 -0
  257. package/dist/server/types/Workflow.d.ts +1 -0
  258. package/dist/server/utils.d.ts +2 -1
  259. package/dist/server/utils.js +19 -1
  260. package/dist/swagger/index.d.ts +69 -1
  261. package/dist/swagger/index.js +65 -3
  262. package/package.json +4 -2
  263. package/dist/client/618.c91be3f6e4d73501.js +0 -10
  264. package/dist/client/67.61e70b8b777f8638.js +0 -10
  265. package/dist/client/964.5e11e1820fece37b.js +0 -10
  266. package/dist/client/triggers/schedule/ScheduleModes.d.ts +0 -170
  267. package/dist/client/triggers/schedule/locale/Cron.zh-CN.d.ts +0 -42
@@ -0,0 +1,32 @@
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 { Instruction } from '../canvas/Instruction';
11
+ import { type CollectionResultNodeLike, useCollectionNodeVariables } from './collectionNode';
12
+ export default class extends Instruction {
13
+ type: string;
14
+ title: string;
15
+ group: string;
16
+ description: string;
17
+ icon: React.JSX.Element;
18
+ FieldsetLoader: () => Promise<{
19
+ default: typeof import("./components/query").QueryFieldset;
20
+ }>;
21
+ PresetFieldsetLoader: () => Promise<{
22
+ default: typeof import("./components/query").QueryPresetFieldset;
23
+ }>;
24
+ createDefaultConfig(): {
25
+ multiple: boolean;
26
+ };
27
+ useVariables: typeof useCollectionNodeVariables;
28
+ getCreateModelMenuItem({ node }: {
29
+ node: CollectionResultNodeLike;
30
+ }): import("@nocobase/flow-engine").SubModelItem;
31
+ useTempAssociationSource(node: CollectionResultNodeLike): import("../canvas/Instruction").TempAssociationSource;
32
+ }
@@ -0,0 +1,25 @@
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 { Instruction } from '../canvas/Instruction';
11
+ export default class extends Instruction {
12
+ type: string;
13
+ title: string;
14
+ group: string;
15
+ description: string;
16
+ icon: React.JSX.Element;
17
+ FieldsetLoader: () => Promise<{
18
+ default: typeof import("./components/update").UpdateFieldset;
19
+ }>;
20
+ PresetFieldsetLoader: () => Promise<{
21
+ default: typeof import("./components/update").UpdatePresetFieldset;
22
+ }>;
23
+ createDefaultConfig(): {};
24
+ useTempAssociationSource(): any;
25
+ }
@@ -0,0 +1,13 @@
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 function ExecutionHistoryDrawer({ workflowKey }: {
11
+ workflowKey: string | number;
12
+ }): React.JSX.Element;
13
+ export default ExecutionHistoryDrawer;
@@ -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 default function ExecutionViewPage(): React.JSX.Element;
@@ -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 default function WorkflowCanvasPage(): React.JSX.Element;
@@ -0,0 +1,25 @@
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 ALL_CATEGORY_KEY = "all";
11
+ export type WorkflowCategory = {
12
+ id: string | number;
13
+ title?: string;
14
+ color?: string;
15
+ sort?: number;
16
+ };
17
+ export type WorkflowCategoryTabsProps = {
18
+ activeKey: string;
19
+ onChange: (key: string) => void;
20
+ categories: WorkflowCategory[];
21
+ refreshCategories: () => void;
22
+ className?: string;
23
+ };
24
+ export declare function WorkflowCategoryTabs(props: WorkflowCategoryTabsProps): React.JSX.Element;
25
+ export default WorkflowCategoryTabs;
@@ -0,0 +1,40 @@
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 type PluginWorkflowClientV2 from '../plugin';
11
+ export type WorkflowCategoryOption = {
12
+ value: string | number;
13
+ label: string;
14
+ };
15
+ export type WorkflowRecord = {
16
+ id: number | string;
17
+ title?: string;
18
+ type?: string;
19
+ sync?: boolean;
20
+ description?: string;
21
+ enabled?: boolean;
22
+ invalid?: boolean;
23
+ config?: Record<string, any>;
24
+ options?: Record<string, any>;
25
+ categories?: Array<{
26
+ id: string | number;
27
+ }>;
28
+ [key: string]: any;
29
+ };
30
+ export type WorkflowFormDrawerProps = {
31
+ mode: 'create' | 'edit';
32
+ /** Pre-selected trigger type for create mode (optional). */
33
+ type?: string;
34
+ plugin: PluginWorkflowClientV2;
35
+ record?: WorkflowRecord;
36
+ categoryOptions: WorkflowCategoryOption[];
37
+ onSubmitted: () => void;
38
+ };
39
+ export declare function WorkflowFormDrawer(props: WorkflowFormDrawerProps): React.JSX.Element;
40
+ export default WorkflowFormDrawer;
@@ -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 default function WorkflowPane(): React.JSX.Element;
@@ -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 default function WorkflowTasksPage(): React.JSX.Element;
@@ -0,0 +1,119 @@
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 { Plugin } from '@nocobase/client-v2';
10
+ import { type ReactNode } from 'react';
11
+ import type { TaskTypeOptions } from './taskCenter';
12
+ import type { Instruction } from './canvas/Instruction';
13
+ import type { Trigger } from './triggers';
14
+ import './models/triggerWorkflows';
15
+ export type InstructionGroup = {
16
+ key: string;
17
+ label: string;
18
+ };
19
+ /**
20
+ * UI location where workflow notices are requested.
21
+ *
22
+ * This is a rendering context hint for non-blocking UI notices; it is not a validation surface and providers should
23
+ * not use it to block workflow execution or saving.
24
+ */
25
+ export type WorkflowNoticeSurface = 'workflow-list-row' | 'trigger-node-card';
26
+ export type WorkflowNotice = {
27
+ /** Extra explanatory content. List rows render this as tooltip content; compact card surfaces may ignore it. */
28
+ description?: ReactNode;
29
+ /** Stable identity for React rendering and provider-level deduplication. */
30
+ key: string;
31
+ /** Short user-facing notice title. */
32
+ message: ReactNode;
33
+ /** Visual severity. Providers should keep notices informational and side-effect free. */
34
+ type?: 'error' | 'info' | 'success' | 'warning';
35
+ };
36
+ export type WorkflowNoticeProviderContext = {
37
+ nodes?: Array<Record<string, unknown>>;
38
+ /** The UI surface requesting notices so providers can return copy and density suitable for that location. */
39
+ surface: WorkflowNoticeSurface;
40
+ workflow?: Record<string, unknown> | null;
41
+ };
42
+ export type WorkflowNoticeResult = WorkflowNotice | WorkflowNotice[] | null | undefined;
43
+ export type WorkflowListNoticeProviderContext = {
44
+ api?: unknown;
45
+ surface: 'workflow-list-row';
46
+ workflows: Array<Record<string, unknown>>;
47
+ };
48
+ export type WorkflowListNoticeMap = Record<string, WorkflowNotice | WorkflowNotice[] | null | undefined>;
49
+ export type WorkflowNoticeProviderFunction = (context: WorkflowNoticeProviderContext) => WorkflowNoticeResult;
50
+ export type WorkflowNoticeProviderObject = {
51
+ getNotices?: (context: WorkflowNoticeProviderContext) => WorkflowNoticeResult;
52
+ loadWorkflowListNotices?: (context: WorkflowListNoticeProviderContext) => Promise<WorkflowListNoticeMap>;
53
+ shouldLoadWorkflowListNotices?: (context: WorkflowListNoticeProviderContext) => boolean;
54
+ };
55
+ export type WorkflowNoticeProvider = WorkflowNoticeProviderFunction | WorkflowNoticeProviderObject;
56
+ /**
57
+ * A workflow **system variable** (the `$system` scope). Registered by the
58
+ * workflow plugin itself — fixed, framework-independent values (current time,
59
+ * instance id, snowflake id), not contributed by any other plugin. Mirrors v1's
60
+ * `registerSystemVariable` (`client/index.tsx`).
61
+ */
62
+ export type SystemVariableOption = {
63
+ /** Registry key + the path segment under `$system` (e.g. `now`). */
64
+ key: string;
65
+ /** Display label. Accepts a plain string or a `{{t("…")}}` template. */
66
+ label: string;
67
+ /** Optional tooltip shown next to the label. */
68
+ tooltip?: string;
69
+ };
70
+ export declare class PluginWorkflowClientV2 extends Plugin {
71
+ triggers: any;
72
+ instructions: any;
73
+ instructionGroups: any;
74
+ systemVariables: any;
75
+ workflowNoticeProviders: any;
76
+ taskTypes: any;
77
+ /**
78
+ * Register a `$system` scope variable. Mirrors v1's `registerSystemVariable`
79
+ * but writes to *this* (v2) runtime's registry. The workflow plugin registers
80
+ * the builtin ones (time / instance id / snowflake id) on load.
81
+ */
82
+ registerSystemVariable(option: SystemVariableOption): void;
83
+ registerTaskType(key: string, option: Omit<TaskTypeOptions, 'key'> | TaskTypeOptions): void;
84
+ isWorkflowSync(workflow: any): any;
85
+ /**
86
+ * Register a node type's v2 instruction. Mirrors v1's `registerInstruction`
87
+ * signature (accepts a class or an instance) but writes to *this* (v2)
88
+ * runtime's registry — see ADR-0003 / doc §9.1 (runtime separation). A type
89
+ * registered here appears in the v2 add-node menu and renders on the v2 canvas.
90
+ */
91
+ registerInstruction(type: string, instruction: Instruction | {
92
+ new (): Instruction;
93
+ }): void;
94
+ getInstruction(type?: string): any;
95
+ registerInstructionGroup(key: string, group: InstructionGroup): void;
96
+ registerTrigger(type: string, trigger: Trigger | {
97
+ new (): Trigger;
98
+ }): void;
99
+ getTriggerOptions(type?: string): any;
100
+ /**
101
+ * Register a workflow notice provider. Providers should be pure readers of the supplied context; they are queried by
102
+ * UI surfaces such as workflow list rows and trigger node cards.
103
+ */
104
+ registerWorkflowNoticeProvider(key: string, provider: WorkflowNoticeProvider): void;
105
+ /** Collect notices from registered providers for the current UI surface. */
106
+ getWorkflowNotices(context: WorkflowNoticeProviderContext): any[];
107
+ loadWorkflowListNotices(context: WorkflowListNoticeProviderContext): Promise<Record<string, WorkflowNotice[]>>;
108
+ load(): Promise<void>;
109
+ private registerBuiltinSystemVariables;
110
+ private registerBuiltinInstructions;
111
+ private registerModelLoaders;
112
+ private registerBuiltinTriggers;
113
+ private registerSettingsPage;
114
+ private registerCanvasRoute;
115
+ private registerExecutionRoute;
116
+ private registerTaskCenterRoutes;
117
+ }
118
+ export default PluginWorkflowClientV2;
119
+ export type { TaskTypeOptions } from './taskCenter';
@@ -0,0 +1,105 @@
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 type { ComponentType, ReactNode } from 'react';
10
+ export declare const TASK_STATUS: {
11
+ readonly ALL: "all";
12
+ readonly PENDING: "pending";
13
+ readonly COMPLETED: "completed";
14
+ };
15
+ export declare const TASK_STATUS_VALUES: readonly ["pending", "completed", "all"];
16
+ export type WorkflowTaskStatus = (typeof TASK_STATUS_VALUES)[number];
17
+ export declare const WORKFLOW_TASKS_PAGE_SIZE = 20;
18
+ export type WorkflowTaskRecord = Record<string, unknown>;
19
+ export type WorkflowTaskRequestParams = Record<string, unknown>;
20
+ export type WorkflowTaskStats = Record<string, number | undefined> & {
21
+ pending?: number;
22
+ completed?: number;
23
+ all?: number;
24
+ };
25
+ export type WorkflowTaskCounts = Record<string, WorkflowTaskStats>;
26
+ export interface WorkflowTaskActionsProps {
27
+ onlyIcon?: boolean;
28
+ reload?: () => Promise<void>;
29
+ }
30
+ export interface WorkflowTaskDetailModalProps {
31
+ children?: ReactNode;
32
+ mobile: boolean;
33
+ onClose: () => void;
34
+ record: WorkflowTaskRecord | null;
35
+ title: ReactNode;
36
+ type: TaskTypeOptions;
37
+ }
38
+ export interface WorkflowTaskRecordContextValue {
39
+ record: WorkflowTaskRecord;
40
+ openRecord?: (record: WorkflowTaskRecord) => void;
41
+ refresh?: () => Promise<void>;
42
+ }
43
+ export declare const WorkflowTaskRecordContext: import("react").Context<WorkflowTaskRecordContextValue>;
44
+ export declare function useWorkflowTaskRecord(): WorkflowTaskRecordContextValue;
45
+ export interface WorkflowTaskResource {
46
+ [action: string]: ((params?: WorkflowTaskRequestParams) => Promise<unknown>) | undefined;
47
+ }
48
+ export interface WorkflowTaskApiClient {
49
+ resource: (name: string) => WorkflowTaskResource;
50
+ }
51
+ export interface WorkflowTaskRegistry {
52
+ get: (key: string) => TaskTypeOptions | undefined;
53
+ getKeys: () => Iterable<string>;
54
+ getEntities?: () => Iterable<[string, TaskTypeOptions]>;
55
+ }
56
+ export interface WorkflowTaskPlugin {
57
+ taskTypes: WorkflowTaskRegistry;
58
+ }
59
+ export interface WorkflowTaskFlowContext {
60
+ api: WorkflowTaskApiClient;
61
+ app?: {
62
+ eventBus?: EventTarget;
63
+ pm?: {
64
+ get: (name: string) => WorkflowTaskPlugin | undefined;
65
+ };
66
+ };
67
+ router?: {
68
+ navigate: (path: string, options?: {
69
+ replace?: boolean;
70
+ }) => void;
71
+ };
72
+ t?: (key: string, options?: Record<string, unknown>) => string;
73
+ }
74
+ export interface TaskTypeOptions {
75
+ key: string;
76
+ title: string;
77
+ collection: string;
78
+ action?: string;
79
+ useActionParams?: (status: WorkflowTaskStatus) => WorkflowTaskRequestParams | undefined;
80
+ Actions?: ComponentType<WorkflowTaskActionsProps>;
81
+ DetailModal?: ComponentType<WorkflowTaskDetailModalProps>;
82
+ Item: ComponentType;
83
+ Detail: ComponentType;
84
+ getPopupRecord?: (apiClient: WorkflowTaskApiClient, context: {
85
+ params: WorkflowTaskRequestParams;
86
+ }) => Promise<unknown>;
87
+ alwaysShow?: boolean;
88
+ }
89
+ export interface WorkflowTaskListPayload {
90
+ data: WorkflowTaskRecord[];
91
+ meta: Record<string, unknown>;
92
+ }
93
+ export declare function normalizeWorkflowTaskStatus(status?: string): WorkflowTaskStatus;
94
+ export declare function normalizeWorkflowTaskRecordsResponse(response: unknown): WorkflowTaskListPayload;
95
+ export declare function normalizeWorkflowTaskRecordResponse(response: unknown): WorkflowTaskRecord | null;
96
+ export declare function normalizeWorkflowTaskCountsResponse(response: unknown): WorkflowTaskCounts;
97
+ export declare function getWorkflowTaskRegistry(ctx?: WorkflowTaskFlowContext): WorkflowTaskRegistry | undefined;
98
+ export declare function getWorkflowTaskTypeKeys(taskTypes?: WorkflowTaskRegistry): string[];
99
+ export declare function getWorkflowTaskRecordKey(record: WorkflowTaskRecord): unknown;
100
+ export declare function getAvailableWorkflowTaskTypeKeys(taskTypes: WorkflowTaskRegistry | undefined, counts: WorkflowTaskCounts): string[];
101
+ export declare function useWorkflowTaskCounts(ctx: WorkflowTaskFlowContext | undefined, taskTypes: WorkflowTaskRegistry | undefined): {
102
+ counts: WorkflowTaskCounts;
103
+ total: number;
104
+ reload: () => Promise<void>;
105
+ };
@@ -0,0 +1,35 @@
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 type { LoaderOf, Trigger } from '.';
11
+ type WorkflowLike = {
12
+ id?: string | number;
13
+ type?: string;
14
+ config?: Record<string, unknown>;
15
+ versionStats?: {
16
+ executed?: number;
17
+ };
18
+ };
19
+ export declare function ExecuteWorkflowButton({ record, refresh }: {
20
+ record: WorkflowLike;
21
+ refresh?: () => void;
22
+ }): React.JSX.Element;
23
+ export default ExecuteWorkflowButton;
24
+ export declare function openExecuteWorkflowDialog(opts: {
25
+ ctx: {
26
+ viewer: {
27
+ dialog: (options: Record<string, unknown>) => void;
28
+ };
29
+ };
30
+ workflow: WorkflowLike;
31
+ trigger: Trigger;
32
+ TriggerFieldsetLoader: LoaderOf;
33
+ valid: boolean;
34
+ refresh?: () => void;
35
+ }): void;
@@ -0,0 +1,22 @@
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 type { Trigger } from '.';
11
+ export declare function openTriggerConfigDrawer(opts: {
12
+ ctx: {
13
+ viewer: {
14
+ drawer: (options: Record<string, unknown>) => void;
15
+ };
16
+ };
17
+ trigger?: Trigger;
18
+ workflow: Record<string, any>;
19
+ refresh?: () => void;
20
+ }): void;
21
+ export declare function TriggerConfig(): React.JSX.Element;
22
+ export default TriggerConfig;
@@ -0,0 +1,13 @@
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 function TriggerExecutionButton({ triggerTitle }: {
11
+ triggerTitle: string;
12
+ }): React.JSX.Element;
13
+ export default TriggerExecutionButton;
@@ -0,0 +1,14 @@
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 function SyncTransactionNotice(): React.JSX.Element;
11
+ export declare function TriggerModeField(): React.JSX.Element;
12
+ export declare function CollectionTriggerConfig(): React.JSX.Element;
13
+ export declare function CollectionPresetConfig(): React.JSX.Element;
14
+ export default CollectionTriggerConfig;
@@ -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 function TriggerCollectionConfig(): React.JSX.Element;
11
+ export default TriggerCollectionConfig;
@@ -0,0 +1,28 @@
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 COLLECTION_TRIGGER_MODE: {
10
+ readonly CREATED: 1;
11
+ readonly UPDATED: 2;
12
+ readonly SAVED: 3;
13
+ readonly DELETED: 4;
14
+ };
15
+ export declare const collectionModeOptions: ({
16
+ label: string;
17
+ value: 1;
18
+ } | {
19
+ label: string;
20
+ value: 2;
21
+ } | {
22
+ label: string;
23
+ value: 3;
24
+ } | {
25
+ label: string;
26
+ value: 4;
27
+ })[];
28
+ export declare function hasCollectionTriggerMode(mode: unknown, target: number): boolean;
@@ -0,0 +1,40 @@
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 { type SubModelItem } from '@nocobase/flow-engine';
10
+ import { type UseVariableOptions, type VariableOption } from '../../canvas/collectionFieldOptions';
11
+ import { Trigger, type LoaderOf } from '..';
12
+ export default class CollectionTrigger extends Trigger {
13
+ title: string;
14
+ description: string;
15
+ PresetFieldsetLoader: LoaderOf;
16
+ FieldsetLoader: LoaderOf;
17
+ TriggerFieldsetLoader: LoaderOf;
18
+ validate(config: Record<string, unknown>): boolean;
19
+ useVariables: typeof useVariables;
20
+ getCreateModelMenuItem({ config }: {
21
+ config: {
22
+ collection?: string;
23
+ };
24
+ }): SubModelItem | null;
25
+ useTempAssociationSource(config: {
26
+ collection?: string;
27
+ }, workflow?: {
28
+ id?: string | number;
29
+ }): {
30
+ collection: string;
31
+ nodeId: string | number;
32
+ nodeKey: string;
33
+ nodeType: "workflow";
34
+ };
35
+ }
36
+ declare function useVariables(config: {
37
+ collection?: string;
38
+ appends?: string[];
39
+ }, options?: UseVariableOptions): VariableOption[];
40
+ export {};
@@ -0,0 +1,63 @@
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
+ /**
10
+ * The workflow trigger extension contract, relocated to client-v2 so one definition can progressively serve both
11
+ * canvases. It mirrors `canvas/Instruction.ts`: legacy Formily artifacts stay as pass-through data, while modern
12
+ * surfaces are lazy loaders. A v1 trigger can `extends` its v2 counterpart and drop legacy artifacts one surface at a
13
+ * time, making v1 fall through to the inherited loaders.
14
+ */
15
+ import type { ComponentType } from 'react';
16
+ import type { SubModelItem } from '@nocobase/flow-engine';
17
+ import type { UseVariableOptions, VariableOption } from '../canvas/collectionFieldOptions';
18
+ export type LoaderOf<P = {}> = () => Promise<{
19
+ default: ComponentType<P>;
20
+ }>;
21
+ type ISchema = import('@formily/react').ISchema;
22
+ type JSXComponent = import('@formily/react').JSXComponent;
23
+ export type TriggerTempAssociationSource = {
24
+ collection: string;
25
+ nodeId: string | number;
26
+ nodeKey: string;
27
+ nodeType: 'workflow';
28
+ };
29
+ export declare abstract class Trigger {
30
+ title: string;
31
+ description?: string;
32
+ sync?: boolean;
33
+ presetFieldset?: Record<string, ISchema>;
34
+ fieldset?: Record<string, ISchema>;
35
+ triggerFieldset?: Record<string, ISchema>;
36
+ view?: ISchema;
37
+ scope?: Record<string, unknown>;
38
+ components?: Record<string, JSXComponent>;
39
+ initializers?: unknown;
40
+ isActionTriggerable_deprecated?: boolean | ((config: object, context?: object) => boolean);
41
+ PresetFieldsetLoader?: LoaderOf;
42
+ FieldsetLoader?: LoaderOf;
43
+ TriggerFieldsetLoader?: LoaderOf;
44
+ createDefaultConfig?(): Record<string, unknown>;
45
+ validate(config: Record<string, unknown>): boolean;
46
+ useVariables?(config: Record<string, unknown>, options?: UseVariableOptions): VariableOption[] | null;
47
+ /** Legacy schema initializer counterpart. Kept structural to avoid importing `@nocobase/client` into client-v2. */
48
+ useInitializers?(config: Record<string, unknown>): unknown | null;
49
+ /** v2-native block-creation menu item (the `useInitializers` counterpart). */
50
+ getCreateModelMenuItem?(args: {
51
+ config: Record<string, unknown>;
52
+ workflow?: unknown;
53
+ nodeType?: string;
54
+ }): SubModelItem | SubModelItem[] | null;
55
+ useTempAssociationSource?(config: Record<string, unknown>, workflow?: {
56
+ id?: string | number;
57
+ }): TriggerTempAssociationSource | null;
58
+ }
59
+ export type LegacyTriggerFieldsetRenderMode = 'legacy-fieldset' | 'modern-loader' | 'none';
60
+ export declare function resolveLegacyTriggerPresetRenderMode(trigger?: Pick<Trigger, 'presetFieldset' | 'PresetFieldsetLoader'> | null): LegacyTriggerFieldsetRenderMode;
61
+ export declare function resolveLegacyTriggerConfigRenderMode(trigger?: Pick<Trigger, 'fieldset' | 'FieldsetLoader'> | null): LegacyTriggerFieldsetRenderMode;
62
+ export declare function resolveLegacyTriggerExecuteRenderMode(trigger?: Pick<Trigger, 'triggerFieldset' | 'TriggerFieldsetLoader'> | null): LegacyTriggerFieldsetRenderMode;
63
+ export {};
@@ -0,0 +1,17 @@
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 { type ScheduleOnFieldValue } from './OnField';
11
+ type EndsByValue = string | Date | ScheduleOnFieldValue | null;
12
+ export declare function EndsByField({ collection, value, onChange, }: {
13
+ collection?: string;
14
+ value?: EndsByValue;
15
+ onChange?: (value: EndsByValue) => void;
16
+ }): React.JSX.Element;
17
+ export default EndsByField;