@nocobase/plugin-workflow 2.1.11 → 2.2.0-alpha.2

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 (233) 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.d84a976875799df4.js +10 -0
  5. package/dist/client/159.3d5abee06b818db3.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.80ebd002a9971b65.js +10 -0
  9. package/dist/client/394.d7eacf666590a6ae.js +10 -0
  10. package/dist/client/438.c4de8f085e490158.js +10 -0
  11. package/dist/client/509.2f72dd97808f12d1.js +10 -0
  12. package/dist/client/54.c452a382e9b3953d.js +10 -0
  13. package/dist/client/{618.c91be3f6e4d73501.js → 618.a97bc812678ab2a7.js} +1 -1
  14. package/dist/client/635.3f165e9ed7e940b2.js +10 -0
  15. package/dist/client/67.4117e04bd42f9d42.js +10 -0
  16. package/dist/client/719.5801e3f1cf81b97b.js +10 -0
  17. package/dist/client/739.955f18b3dc31ae3a.js +10 -0
  18. package/dist/client/759.13aab01e6912ed8d.js +10 -0
  19. package/dist/client/772.1ebaef11a0ac8688.js +10 -0
  20. package/dist/client/782.332fd345a98b82c2.js +10 -0
  21. package/dist/client/828.77de843c49fb307a.js +10 -0
  22. package/dist/client/87.d2c2b5b1cae08bfc.js +10 -0
  23. package/dist/client/938.77649c32dae1c225.js +10 -0
  24. package/dist/client/964.cb1ecff7a46687b7.js +10 -0
  25. package/dist/client/972.4da2796f3f2df874.js +10 -0
  26. package/dist/client/AddNodeContext.d.ts +1 -9
  27. package/dist/client/Branch.d.ts +1 -1
  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/index.d.ts +1 -1
  34. package/dist/client/index.js +1 -1
  35. package/dist/client/nodeVariableUtils.d.ts +7 -6
  36. package/dist/client/nodes/calculation.d.ts +3 -75
  37. package/dist/client/nodes/condition.d.ts +7 -111
  38. package/dist/client/nodes/create.d.ts +3 -124
  39. package/dist/client/nodes/destroy.d.ts +2 -57
  40. package/dist/client/nodes/end.d.ts +2 -23
  41. package/dist/client/nodes/index.d.ts +2 -91
  42. package/dist/client/nodes/multi-conditions.d.ts +10 -48
  43. package/dist/client/nodes/output.d.ts +2 -44
  44. package/dist/client/nodes/query.d.ts +3 -255
  45. package/dist/client/nodes/update.d.ts +2 -117
  46. package/dist/client/style.d.ts +7 -27
  47. package/dist/client/triggers/collection.d.ts +3 -154
  48. package/dist/client/triggers/index.d.ts +2 -36
  49. package/dist/client/triggers/schedule/index.d.ts +8 -65
  50. package/dist/client/utils.d.ts +4 -5
  51. package/dist/client/variable.d.ts +4 -44
  52. package/dist/client-v2/119.81195bcd0d451279.js +10 -0
  53. package/dist/client-v2/142.3d386748090ff6d3.js +10 -0
  54. package/dist/client-v2/159.cb221540c286cd32.js +10 -0
  55. package/dist/client-v2/224.44a5e1227bee33fb.js +10 -0
  56. package/dist/client-v2/276.43297f402f31970e.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.ab3eac2eb447f36f.js +10 -0
  61. package/dist/client-v2/394.515ed058e7f72797.js +10 -0
  62. package/dist/client-v2/438.b7df0416b66f8f64.js +10 -0
  63. package/dist/client-v2/513.ab2bdd96ad9ece4d.js +10 -0
  64. package/dist/client-v2/54.287764bc467d65da.js +10 -0
  65. package/dist/client-v2/635.37de4abe241b30e8.js +10 -0
  66. package/dist/client-v2/719.05cf070ef89a78f4.js +10 -0
  67. package/dist/client-v2/739.906e94bbe6d52a3d.js +10 -0
  68. package/dist/client-v2/759.7b162ad3adf450f1.js +10 -0
  69. package/dist/client-v2/772.8e5148d8c1518449.js +10 -0
  70. package/dist/client-v2/938.717e47af39485b29.js +10 -0
  71. package/dist/client-v2/ExecutionCanvas.d.ts +15 -0
  72. package/dist/client-v2/canvas/AddNodeContext.d.ts +35 -0
  73. package/dist/client-v2/canvas/AddNodeContext.shared.d.ts +33 -0
  74. package/dist/client-v2/canvas/AddNodeSlot.d.ts +20 -0
  75. package/dist/client-v2/canvas/Branch.d.ts +32 -0
  76. package/dist/client-v2/canvas/BranchContext.d.ts +20 -0
  77. package/dist/client-v2/canvas/BranchRenderContext.d.ts +14 -0
  78. package/dist/client-v2/canvas/CanvasContent.d.ts +20 -0
  79. package/dist/client-v2/canvas/DownstreamBranchIndex.d.ts +20 -0
  80. package/dist/client-v2/canvas/Instruction.d.ts +139 -0
  81. package/dist/{client/triggers/schedule/EndsByField.d.ts → client-v2/canvas/JobButton.d.ts} +3 -3
  82. package/dist/client-v2/canvas/Node.d.ts +36 -0
  83. package/dist/client-v2/canvas/NodeClipboardContext.d.ts +64 -0
  84. package/dist/client-v2/canvas/NodeConfigDrawer.d.ts +27 -0
  85. package/dist/client-v2/canvas/NodeDragContext.d.ts +83 -0
  86. package/dist/client-v2/canvas/RemoveNodeContext.d.ts +45 -0
  87. package/dist/client-v2/canvas/WorkflowTypedVariableInput.d.ts +16 -0
  88. package/dist/client-v2/canvas/WorkflowVariableInput.d.ts +39 -0
  89. package/dist/client-v2/canvas/WorkflowVariableJsonTextArea.d.ts +15 -0
  90. package/dist/client-v2/canvas/WorkflowVariableTextArea.d.ts +18 -0
  91. package/dist/client-v2/canvas/adaptVariableOptionToMetaTree.d.ts +48 -0
  92. package/dist/client-v2/canvas/addNodeController.d.ts +70 -0
  93. package/dist/client-v2/canvas/collectionFieldOptions.d.ts +57 -0
  94. package/dist/client-v2/canvas/contexts.d.ts +84 -0
  95. package/dist/client-v2/canvas/dropImpact.d.ts +28 -0
  96. package/dist/client-v2/canvas/instructionAvailability.d.ts +26 -0
  97. package/dist/client-v2/canvas/nodeRenderDispatch.d.ts +79 -0
  98. package/dist/client-v2/canvas/nodeTree.d.ts +21 -0
  99. package/dist/client-v2/canvas/nodeVariableUtils.d.ts +14 -0
  100. package/dist/client-v2/canvas/removeNodeUtils.d.ts +31 -0
  101. package/dist/client-v2/canvas/style.d.ts +35 -0
  102. package/dist/client-v2/canvas/textAreaInsertion.d.ts +14 -0
  103. package/dist/client-v2/canvas/useWorkflowInstruction.d.ts +23 -0
  104. package/dist/client-v2/canvas/useWorkflowVariableOptions.d.ts +40 -0
  105. package/dist/client-v2/canvas/workflowVariableConverters.d.ts +13 -0
  106. package/dist/client-v2/components/Calculation.d.ts +18 -0
  107. package/dist/client-v2/components/ExecutionStatusIcon.d.ts +18 -0
  108. package/dist/{client/triggers/schedule/RepeatField.d.ts → client-v2/components/ExecutionStatusTag.d.ts} +3 -4
  109. package/dist/client-v2/components/ExecutionViewHeader.d.ts +29 -0
  110. package/dist/client-v2/components/ExecutionsDropdown.d.ts +25 -0
  111. package/dist/client-v2/components/FilterDynamicComponent.d.ts +22 -0
  112. package/dist/client-v2/components/HideVariableContext.d.ts +11 -0
  113. package/dist/client-v2/components/JobResultModal.d.ts +11 -0
  114. package/dist/client-v2/components/RadioWithTooltip.d.ts +23 -0
  115. package/dist/client-v2/components/SyncModeSelect.d.ts +16 -0
  116. package/dist/{client/triggers/schedule/OnField.d.ts → client-v2/components/SyncModeTag.d.ts} +3 -3
  117. package/dist/client-v2/components/TestRunButton.d.ts +36 -0
  118. package/dist/client-v2/components/TimeoutInput.d.ts +15 -0
  119. package/dist/client-v2/components/WorkflowCanvasHeader.d.ts +17 -0
  120. package/dist/client-v2/components/WorkflowDetailsModal.d.ts +25 -0
  121. package/dist/client-v2/components/WorkflowEnabledSwitch.d.ts +16 -0
  122. package/dist/client-v2/components/WorkflowMenu.d.ts +17 -0
  123. package/dist/client-v2/components/WorkflowRevisionsDropdown.d.ts +15 -0
  124. package/dist/client-v2/components/WorkflowVariableWrapper.d.ts +25 -0
  125. package/dist/client-v2/components/collection/AppendsSelect.d.ts +15 -0
  126. package/dist/client-v2/components/collection/AssignedFieldsEditor.d.ts +16 -0
  127. package/dist/client-v2/components/collection/CollectionCascader.d.ts +15 -0
  128. package/dist/client-v2/components/collection/FieldsSelect.d.ts +16 -0
  129. package/dist/client-v2/components/collection/PaginationFields.d.ts +14 -0
  130. package/dist/client-v2/components/collection/SortFieldsInput.d.ts +19 -0
  131. package/dist/client-v2/components/collection/TriggerCollectionRecordSelect.d.ts +15 -0
  132. package/dist/client-v2/components/collection/index.d.ts +16 -0
  133. package/dist/client-v2/components/collection/utils.d.ts +42 -0
  134. package/dist/client-v2/components/formatResultForDisplay.d.ts +17 -0
  135. package/dist/client-v2/components/jobStatus.d.ts +27 -0
  136. package/dist/client-v2/components/renderEngineReference.d.ts +10 -0
  137. package/dist/client-v2/components/workflowCanvas.d.ts +41 -0
  138. package/dist/client-v2/constants.d.ts +14 -0
  139. package/dist/client-v2/hooks/useWorkflowRuntimePaths.d.ts +37 -0
  140. package/dist/client-v2/index.d.ts +43 -0
  141. package/dist/client-v2/index.js +10 -0
  142. package/dist/client-v2/locale.d.ts +41 -0
  143. package/dist/{client → client-v2}/models/NodeDetailsGridModel.d.ts +1 -1
  144. package/dist/{client → client-v2}/models/NodeDetailsModel.d.ts +1 -1
  145. package/dist/{client → client-v2}/models/NodeValueModel.d.ts +1 -1
  146. package/dist/{client → client-v2}/models/TaskCardCommonItemModel.d.ts +1 -1
  147. package/dist/{client → client-v2}/models/index.d.ts +1 -0
  148. package/dist/client-v2/models/triggerWorkflows.d.ts +43 -0
  149. package/dist/client-v2/nodes/calculation.d.ts +38 -0
  150. package/dist/client-v2/nodes/collectionNode.d.ts +29 -0
  151. package/dist/client-v2/nodes/components/calculation.d.ts +11 -0
  152. package/dist/client-v2/nodes/components/collection.d.ts +15 -0
  153. package/dist/client-v2/nodes/components/condition.d.ts +25 -0
  154. package/dist/client-v2/nodes/components/conditionShared.d.ts +20 -0
  155. package/dist/client-v2/nodes/components/create.d.ts +12 -0
  156. package/dist/client-v2/nodes/components/destroy.d.ts +12 -0
  157. package/dist/{client/triggers/schedule/ScheduleConfig.d.ts → client-v2/nodes/components/end.d.ts} +1 -1
  158. package/dist/client-v2/nodes/components/filter.d.ts +16 -0
  159. package/dist/client-v2/nodes/components/multi-conditions.d.ts +13 -0
  160. package/dist/client-v2/nodes/components/multiConditionsShared.d.ts +20 -0
  161. package/dist/client-v2/nodes/components/output.d.ts +10 -0
  162. package/dist/client-v2/nodes/components/query.d.ts +12 -0
  163. package/dist/client-v2/nodes/components/update.d.ts +12 -0
  164. package/dist/client-v2/nodes/condition.d.ts +46 -0
  165. package/dist/client-v2/nodes/create.d.ts +30 -0
  166. package/dist/client-v2/nodes/destroy.d.ts +24 -0
  167. package/dist/client-v2/nodes/end.d.ts +21 -0
  168. package/dist/client-v2/nodes/multi-conditions.d.ts +34 -0
  169. package/dist/client-v2/nodes/output.d.ts +29 -0
  170. package/dist/client-v2/nodes/query.d.ts +32 -0
  171. package/dist/client-v2/nodes/update.d.ts +25 -0
  172. package/dist/client-v2/pages/ExecutionHistoryDrawer.d.ts +13 -0
  173. package/dist/client-v2/pages/ExecutionViewPage.d.ts +10 -0
  174. package/dist/client-v2/pages/WorkflowCanvasPage.d.ts +10 -0
  175. package/dist/client-v2/pages/WorkflowCategoryTabs.d.ts +25 -0
  176. package/dist/client-v2/pages/WorkflowFormDrawer.d.ts +39 -0
  177. package/dist/client-v2/pages/WorkflowPane.d.ts +10 -0
  178. package/dist/client-v2/plugin.d.ts +67 -0
  179. package/dist/client-v2/triggers/ExecuteWorkflowButton.d.ts +35 -0
  180. package/dist/client-v2/triggers/TriggerConfig.d.ts +22 -0
  181. package/dist/client-v2/triggers/TriggerExecutionButton.d.ts +13 -0
  182. package/dist/client-v2/triggers/collection/CollectionConfig.d.ts +14 -0
  183. package/dist/client-v2/triggers/collection/TriggerCollectionConfig.d.ts +11 -0
  184. package/dist/client-v2/triggers/collection/constants.d.ts +28 -0
  185. package/dist/client-v2/triggers/collection/index.d.ts +40 -0
  186. package/dist/client-v2/triggers/index.d.ts +61 -0
  187. package/dist/client-v2/triggers/schedule/EndsByField.d.ts +17 -0
  188. package/dist/client-v2/triggers/schedule/OnField.d.ts +20 -0
  189. package/dist/client-v2/triggers/schedule/RepeatField.d.ts +23 -0
  190. package/dist/client-v2/triggers/schedule/ScheduleConfig.d.ts +17 -0
  191. package/dist/client-v2/triggers/schedule/ScheduleModes.d.ts +41 -0
  192. package/dist/{client → client-v2}/triggers/schedule/TriggerScheduleConfig.d.ts +1 -0
  193. package/dist/{client → client-v2}/triggers/schedule/constants.d.ts +8 -5
  194. package/dist/client-v2/triggers/schedule/index.d.ts +40 -0
  195. package/dist/client-v2/triggers/schedule/locale/Cron.zh-CN.d.ts +11 -0
  196. package/dist/common/executionStatus.d.ts +44 -0
  197. package/dist/common/executionStatus.js +133 -0
  198. package/dist/externalVersion.js +16 -12
  199. package/dist/locale/de-DE.json +14 -1
  200. package/dist/locale/en-US.json +21 -1
  201. package/dist/locale/es-ES.json +14 -1
  202. package/dist/locale/fr-FR.json +14 -1
  203. package/dist/locale/hu-HU.json +14 -1
  204. package/dist/locale/id-ID.json +14 -1
  205. package/dist/locale/it-IT.json +14 -1
  206. package/dist/locale/ja-JP.json +14 -1
  207. package/dist/locale/ko-KR.json +14 -1
  208. package/dist/locale/nl-NL.json +14 -1
  209. package/dist/locale/pt-BR.json +14 -1
  210. package/dist/locale/ru-RU.json +14 -1
  211. package/dist/locale/tr-TR.json +14 -1
  212. package/dist/locale/uk-UA.json +14 -1
  213. package/dist/locale/vi-VN.json +14 -1
  214. package/dist/locale/zh-CN.json +20 -1
  215. package/dist/locale/zh-TW.json +14 -1
  216. package/dist/node_modules/cron-parser/package.json +1 -1
  217. package/dist/node_modules/joi/package.json +1 -1
  218. package/dist/node_modules/lru-cache/package.json +1 -1
  219. package/dist/node_modules/nodejs-snowflake/package.json +1 -1
  220. package/dist/server/Processor.d.ts +16 -0
  221. package/dist/server/Processor.js +112 -0
  222. package/dist/server/index.d.ts +1 -1
  223. package/dist/server/instructions/CreateInstruction.js +6 -2
  224. package/dist/server/instructions/DestroyInstruction.js +2 -1
  225. package/dist/server/instructions/QueryInstruction.js +2 -1
  226. package/dist/server/instructions/UpdateInstruction.js +2 -1
  227. package/dist/server/triggers/CollectionTrigger.d.ts +5 -0
  228. package/dist/server/triggers/CollectionTrigger.js +26 -1
  229. package/package.json +3 -2
  230. package/dist/client/67.61e70b8b777f8638.js +0 -10
  231. package/dist/client/964.ffbf5b47ed12bbdc.js +0 -10
  232. package/dist/client/triggers/schedule/ScheduleModes.d.ts +0 -170
  233. package/dist/client/triggers/schedule/locale/Cron.zh-CN.d.ts +0 -42
@@ -0,0 +1,16 @@
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 type SyncModeSelectProps = {
11
+ value?: boolean;
12
+ onChange?: (value: boolean) => void;
13
+ disabled?: boolean;
14
+ };
15
+ export declare function SyncModeSelect({ value, onChange, disabled }: SyncModeSelectProps): React.JSX.Element;
16
+ export default SyncModeSelect;
@@ -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
- export declare function OnField({ value: propsValue, onChange }: {
11
- value: any;
12
- onChange: any;
10
+ export declare function SyncModeTag({ value }: {
11
+ value?: boolean | null;
13
12
  }): React.JSX.Element;
13
+ export default SyncModeTag;
@@ -0,0 +1,36 @@
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
+ * "Test run" action — native-antd rewrite of v1's Formily `TestButton`
11
+ * (`client/nodes/index.tsx`). v1 is deeply Formily-coupled (createForm /
12
+ * SchemaComponent / Action.Modal / observer), so per ADR-0003 it is rebuilt
13
+ * here rather than ported.
14
+ *
15
+ * Click opens a centered `ctx.viewer.dialog` (X-to-close only, no footer) that:
16
+ * - warns that a test run hits real data / APIs;
17
+ * - lists every `{{ ... }}` variable reference in the node config (extracted
18
+ * with `parse(...).parameters`) as a row: left = the disabled variable pill,
19
+ * right = a pure-constant `TypedVariableInput` (no variable tree) to supply a
20
+ * literal test value — exactly v1's "replace variables" form;
21
+ * - on Run, substitutes the supplied values into the config via the
22
+ * `template(context)` returned by `parse`, POSTs `flow_nodes.test`, and shows
23
+ * the status (Resolved / Failed), the result JSON, and a collapsible log.
24
+ */
25
+ import React from 'react';
26
+ /**
27
+ * The footer "Test run" button shown in the node config drawer for testable
28
+ * nodes. `form` is the drawer's antd form — its live `config` value is snapshot
29
+ * into the dialog when opened.
30
+ */
31
+ export declare function TestRunButton({ data, form, workflow: workflowProp }: {
32
+ data: any;
33
+ form: any;
34
+ workflow?: any;
35
+ }): React.JSX.Element;
36
+ export default TestRunButton;
@@ -0,0 +1,15 @@
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 type TimeoutInputProps = {
11
+ value?: number;
12
+ onChange?: (value: number) => void;
13
+ };
14
+ export declare function TimeoutInput({ value: rawValue, onChange }: TimeoutInputProps): React.JSX.Element;
15
+ export default TimeoutInput;
@@ -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 { WorkflowCanvasRecord, WorkflowRevision } from './workflowCanvas';
11
+ export declare function WorkflowCanvasHeader({ record, revisions, resource, refresh, }: {
12
+ record: WorkflowCanvasRecord;
13
+ revisions: WorkflowRevision[];
14
+ resource: any;
15
+ refresh: () => void;
16
+ }): React.JSX.Element;
17
+ export default WorkflowCanvasHeader;
@@ -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 { type WorkflowCanvasRecord } from './workflowCanvas';
11
+ export declare function WorkflowDetailsModal({ record, open, onClose, resource, refresh, }: {
12
+ record: WorkflowCanvasRecord;
13
+ open: boolean;
14
+ onClose: () => void;
15
+ resource: {
16
+ update: (options: {
17
+ filterByTk: string | number;
18
+ values: {
19
+ description: string;
20
+ };
21
+ }) => Promise<unknown>;
22
+ };
23
+ refresh: () => void;
24
+ }): React.JSX.Element;
25
+ export default WorkflowDetailsModal;
@@ -0,0 +1,16 @@
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 { WorkflowCanvasRecord } from './workflowCanvas';
11
+ export declare function WorkflowEnabledSwitch({ record, resource, onChanged, }: {
12
+ record: WorkflowCanvasRecord;
13
+ resource: any;
14
+ onChanged: (enabled: boolean) => void;
15
+ }): React.JSX.Element;
16
+ export default WorkflowEnabledSwitch;
@@ -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 WorkflowCanvasRecord, type WorkflowRevision } from './workflowCanvas';
11
+ export declare function WorkflowMenu({ record, revisions, resource, refresh, }: {
12
+ record: WorkflowCanvasRecord;
13
+ revisions: WorkflowRevision[];
14
+ resource: any;
15
+ refresh: () => void;
16
+ }): React.JSX.Element;
17
+ export default WorkflowMenu;
@@ -0,0 +1,15 @@
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 { WorkflowCanvasRecord } from './workflowCanvas';
11
+ export declare function WorkflowRevisionsDropdown({ record, resource }: {
12
+ record: WorkflowCanvasRecord;
13
+ resource: any;
14
+ }): React.JSX.Element;
15
+ export default WorkflowRevisionsDropdown;
@@ -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 type { FlowContextSelectorProps } from '@nocobase/flow-engine';
11
+ import { type UseWorkflowVariableOptions } from '../canvas/useWorkflowVariableOptions';
12
+ type BaseWrapperRenderProps<TValue> = {
13
+ value?: TValue | undefined;
14
+ onChange?: (value: TValue | null) => void;
15
+ };
16
+ export type WorkflowVariableWrapperProps<TValue> = {
17
+ value?: TValue | string | null;
18
+ onChange?: (value: TValue | string | null) => void;
19
+ variableOptions?: UseWorkflowVariableOptions;
20
+ render: (props: BaseWrapperRenderProps<TValue>) => React.ReactNode;
21
+ clearValue?: TValue | null;
22
+ selectorProps?: Partial<FlowContextSelectorProps>;
23
+ };
24
+ export declare function WorkflowVariableWrapper<TValue>({ value, onChange, variableOptions, render, clearValue, selectorProps, }: WorkflowVariableWrapperProps<TValue>): React.JSX.Element;
25
+ export default WorkflowVariableWrapper;
@@ -0,0 +1,15 @@
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 AppendsSelect({ collection, value, onChange, }: {
11
+ collection?: string;
12
+ value?: string[];
13
+ onChange?: (value: string[]) => void;
14
+ }): React.JSX.Element;
15
+ export default AppendsSelect;
@@ -0,0 +1,16 @@
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
+ type AssignedValues = Record<string, unknown>;
11
+ export declare function AssignedFieldsEditor({ collection, value, onChange, }: {
12
+ collection?: string;
13
+ value?: AssignedValues;
14
+ onChange?: (value: AssignedValues) => void;
15
+ }): React.JSX.Element;
16
+ export default AssignedFieldsEditor;
@@ -0,0 +1,15 @@
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 CollectionCascader({ value, onChange, disabled, }: {
11
+ value?: string;
12
+ onChange?: (value?: string) => void;
13
+ disabled?: boolean;
14
+ }): React.JSX.Element;
15
+ export default CollectionCascader;
@@ -0,0 +1,16 @@
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 SelectProps } from 'antd';
10
+ import React from 'react';
11
+ import { type CollectionTriggerField } from './utils';
12
+ export declare function FieldsSelect({ collection, filter, ...others }: SelectProps & {
13
+ collection?: string;
14
+ filter?: (field: CollectionTriggerField) => boolean;
15
+ }): React.JSX.Element;
16
+ export default FieldsSelect;
@@ -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 PaginationFields({ pageName, pageSizeName, }: {
11
+ pageName?: string | number | (string | number)[];
12
+ pageSizeName?: string | number | (string | number)[];
13
+ }): React.JSX.Element;
14
+ export default PaginationFields;
@@ -0,0 +1,19 @@
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
+ type SortItem = {
11
+ field?: string;
12
+ direction?: 'asc' | 'desc';
13
+ };
14
+ export declare function SortFieldsInput({ collection, value, onChange, }: {
15
+ collection?: string;
16
+ value?: SortItem[];
17
+ onChange?: (value: SortItem[]) => void;
18
+ }): React.JSX.Element;
19
+ export default SortFieldsInput;
@@ -0,0 +1,15 @@
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
+ type RecordValue = Record<string, unknown>;
11
+ export declare function TriggerCollectionRecordSelect({ value, onChange, }: {
12
+ value?: RecordValue | string | number | null;
13
+ onChange?: (value?: RecordValue | string | number | null) => void;
14
+ }): React.JSX.Element;
15
+ export default TriggerCollectionRecordSelect;
@@ -0,0 +1,16 @@
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 './utils';
10
+ export * from './CollectionCascader';
11
+ export * from './FieldsSelect';
12
+ export * from './AppendsSelect';
13
+ export * from './SortFieldsInput';
14
+ export * from './PaginationFields';
15
+ export * from './TriggerCollectionRecordSelect';
16
+ export * from './AssignedFieldsEditor';
@@ -0,0 +1,42 @@
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 { Collection, DataSourceManager } from '@nocobase/flow-engine';
10
+ import type { FieldTreeCollectionManager } from '../../canvas/collectionFieldOptions';
11
+ export type CollectionTriggerField = {
12
+ name?: string;
13
+ type?: string;
14
+ target?: string;
15
+ hidden?: boolean;
16
+ interface?: string;
17
+ collectionName?: string;
18
+ foreignKey?: string;
19
+ targetKey?: string;
20
+ primaryKey?: boolean;
21
+ isForeignKey?: boolean;
22
+ uiSchema?: {
23
+ title?: string;
24
+ ['x-read-pretty']?: boolean;
25
+ };
26
+ };
27
+ export declare function joinCollectionName(dataSourceKey: string, collectionName: string): string;
28
+ export declare function parseCollectionName(value?: string): [string, string] | [];
29
+ export type CollectionOption = {
30
+ value: string;
31
+ label: string;
32
+ children?: CollectionOption[];
33
+ };
34
+ export declare function getCollectionOptions(dataSourceManager: DataSourceManager | undefined): CollectionOption[];
35
+ export declare function getCollectionFields(dataSourceManager: DataSourceManager | undefined, collectionValue?: string): CollectionTriggerField[];
36
+ export declare function getCollection(dataSourceManager: DataSourceManager | undefined, collectionValue?: string): Collection | undefined;
37
+ export declare function getCollectionManagerAdapter(dataSourceManager: DataSourceManager | undefined, dataSourceKey?: string): FieldTreeCollectionManager;
38
+ export declare function isAssociationField(field: CollectionTriggerField): boolean;
39
+ export declare function isDateField(field: CollectionTriggerField): boolean;
40
+ export declare function hasFieldName(field: CollectionTriggerField): field is CollectionTriggerField & {
41
+ name: string;
42
+ };
@@ -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
+ /**
10
+ * Match v1 `Input.JSON` display semantics for workflow result viewers.
11
+ *
12
+ * - `null`/`undefined` → empty string
13
+ * - string that itself is valid JSON text (`1234`, `true`, `{"a":1}`) → show raw string
14
+ * - other strings (`hello`) → show JSON-quoted string
15
+ * - non-strings → pretty JSON
16
+ */
17
+ export declare function formatResultForDisplay(value: unknown, space?: number): string;
@@ -0,0 +1,27 @@
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 JOB_STATUS: {
11
+ readonly PENDING: 0;
12
+ readonly RESOLVED: 1;
13
+ readonly FAILED: -1;
14
+ readonly ERROR: -2;
15
+ readonly ABORTED: -3;
16
+ readonly CANCELED: -4;
17
+ readonly REJECTED: -5;
18
+ readonly RETRY_NEEDED: -6;
19
+ };
20
+ export declare const JOB_STATUS_OPTIONS_MAP: Record<number, {
21
+ label: string;
22
+ color: string;
23
+ icon: React.ReactNode;
24
+ }>;
25
+ export declare function JobStatusTag({ value }: {
26
+ value: number | null;
27
+ }): 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 declare const renderEngineReference: (key: string, t: (text: string) => string) => React.JSX.Element;
@@ -0,0 +1,41 @@
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 type WorkflowRevision = {
10
+ id: number | string;
11
+ createdAt?: string;
12
+ current?: boolean;
13
+ enabled?: boolean;
14
+ versionStats?: {
15
+ executed?: number;
16
+ };
17
+ };
18
+ export type WorkflowCanvasRecord = {
19
+ id?: number | string;
20
+ key?: string;
21
+ title?: string;
22
+ type?: string;
23
+ sync?: boolean;
24
+ enabled?: boolean;
25
+ current?: boolean;
26
+ description?: string;
27
+ createdAt?: string;
28
+ updatedAt?: string;
29
+ createdBy?: any;
30
+ updatedBy?: any;
31
+ stats?: {
32
+ executed?: number;
33
+ };
34
+ versionStats?: {
35
+ executed?: number;
36
+ };
37
+ [key: string]: any;
38
+ };
39
+ export declare function normalizeRecordResponse(response: any): WorkflowCanvasRecord | null;
40
+ export declare function formatUser(user: any): any;
41
+ export declare function formatTime(value?: string): string;
@@ -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
+ export declare const WORKFLOW_CANVAS_ROUTE_NAME = "admin.workflow.workflows.id";
10
+ export declare const WORKFLOW_CANVAS_ROUTE_PATH = "/admin/workflow/workflows/:id";
11
+ export declare function getWorkflowCanvasPath(id: string | number): string;
12
+ export declare const WORKFLOW_EXECUTION_ROUTE_NAME = "admin.workflow.executions.id";
13
+ export declare const WORKFLOW_EXECUTION_ROUTE_PATH = "/admin/workflow/executions/:id";
14
+ export declare function getWorkflowExecutionPath(id: string | number): string;
@@ -0,0 +1,37 @@
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
+ declare global {
10
+ interface Window {
11
+ __nocobase_modern_client_prefix__?: string;
12
+ }
13
+ }
14
+ /**
15
+ * Workflow's v2 React pieces are intentionally reused by both runtimes during
16
+ * the progressive migration:
17
+ *
18
+ * - pure v2 runtime: mounted under the modern client prefix (`/v/admin/...` by
19
+ * default), with workflow canvas / execution routes at `/admin/workflow/...`
20
+ * - legacy v1 runtime: some actions still render through v1 pages and must jump
21
+ * back to the legacy settings routes at `/admin/settings/workflow/...`
22
+ *
23
+ * The runtime marker is the server-injected
24
+ * `window.__nocobase_modern_client_prefix__`. When it exists we are inside the
25
+ * modern client shell; when it does not, the same reused component code is
26
+ * running under the legacy shell and must navigate to the legacy workflow
27
+ * routes. Callers should use these helpers instead of directly importing
28
+ * `client-v2/constants.ts` when the code can execute in both shells.
29
+ */
30
+ export declare function isWorkflowV2Runtime(): boolean;
31
+ export declare function getWorkflowCanvasRuntimePath(id: string | number): string;
32
+ export declare function getWorkflowExecutionRuntimePath(id: string | number): string;
33
+ export declare function useWorkflowRuntimePaths(): {
34
+ isV2Runtime: boolean;
35
+ getWorkflowCanvasPath: (id: string | number) => string;
36
+ getWorkflowExecutionPath: (id: string | number) => string;
37
+ };
@@ -0,0 +1,43 @@
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 { default, PluginWorkflowClientV2 } from './plugin';
10
+ export * from './models';
11
+ export { Instruction, useAvailableUpstreams, useNodeContext } from './canvas/Instruction';
12
+ export type { LoaderOf, NodeAvailableContext, TempAssociationSource } from './canvas/Instruction';
13
+ export { Branch } from './canvas/Branch';
14
+ export { NodeDefaultView } from './canvas/Node';
15
+ export { useCurrentWorkflowContext, useFlowContext } from './canvas/contexts';
16
+ export type { CanvasNode } from './canvas/contexts';
17
+ export { default as useStyles } from './canvas/style';
18
+ export { WorkflowVariableInput } from './canvas/WorkflowVariableInput';
19
+ export type { WorkflowVariableInputProps } from './canvas/WorkflowVariableInput';
20
+ export { WorkflowVariableTextArea } from './canvas/WorkflowVariableTextArea';
21
+ export type { WorkflowVariableTextAreaProps } from './canvas/WorkflowVariableTextArea';
22
+ export { WorkflowVariableJsonTextArea } from './canvas/WorkflowVariableJsonTextArea';
23
+ export type { WorkflowVariableJsonTextAreaProps } from './canvas/WorkflowVariableJsonTextArea';
24
+ export { HideVariableContext, useHideVariable } from './components/HideVariableContext';
25
+ export { WorkflowVariableWrapper } from './components/WorkflowVariableWrapper';
26
+ export type { WorkflowVariableWrapperProps } from './components/WorkflowVariableWrapper';
27
+ export { WorkflowTypedVariableInput, WORKFLOW_TYPED_CONSTANT_TYPES } from './canvas/WorkflowTypedVariableInput';
28
+ export type { WorkflowTypedVariableInputProps } from './canvas/WorkflowTypedVariableInput';
29
+ export { useWorkflowVariableOptions } from './canvas/useWorkflowVariableOptions';
30
+ export type { UseWorkflowVariableOptions } from './canvas/useWorkflowVariableOptions';
31
+ export { CurrentWorkflowContext } from './canvas/contexts';
32
+ export { getCollectionFieldOptions } from './canvas/collectionFieldOptions';
33
+ export { BaseTypeSets, defaultFieldNames } from './canvas/collectionFieldOptions';
34
+ export type { UseVariableOptions, VariableOption } from './canvas/collectionFieldOptions';
35
+ export { CalculationConfig } from './components/Calculation';
36
+ export type { CalculationConfigProps } from './components/Calculation';
37
+ export { RadioWithTooltip } from './components/RadioWithTooltip';
38
+ export type { RadioWithTooltipOption, RadioWithTooltipProps } from './components/RadioWithTooltip';
39
+ export { renderEngineReference } from './components/renderEngineReference';
40
+ export { Trigger } from './triggers';
41
+ export type { LoaderOf as TriggerLoaderOf, TriggerTempAssociationSource } from './triggers';
42
+ export * from './components/collection';
43
+ export { FilterDynamicComponent, ConditionField } from './components/FilterDynamicComponent';