@nocobase/plugin-workflow 2.2.0-alpha.1 → 2.2.0-alpha.3
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.
- package/client-v2.d.ts +2 -0
- package/client-v2.js +1 -0
- package/dist/client/119.e7dbd037d52d1286.js +10 -0
- package/dist/client/142.d84a976875799df4.js +10 -0
- package/dist/client/159.3d5abee06b818db3.js +10 -0
- package/dist/client/276.69fb2aea13bc7c37.js +10 -0
- package/dist/client/346.66d060d37843d3d1.js +10 -0
- package/dist/client/382.80ebd002a9971b65.js +10 -0
- package/dist/client/394.d7eacf666590a6ae.js +10 -0
- package/dist/client/438.c4de8f085e490158.js +10 -0
- package/dist/client/509.2f72dd97808f12d1.js +10 -0
- package/dist/client/54.c452a382e9b3953d.js +10 -0
- package/dist/client/618.a97bc812678ab2a7.js +10 -0
- package/dist/client/635.3f165e9ed7e940b2.js +10 -0
- package/dist/client/67.4117e04bd42f9d42.js +10 -0
- package/dist/client/719.5801e3f1cf81b97b.js +10 -0
- package/dist/client/739.955f18b3dc31ae3a.js +10 -0
- package/dist/client/759.13aab01e6912ed8d.js +10 -0
- package/dist/client/772.1ebaef11a0ac8688.js +10 -0
- package/dist/client/782.332fd345a98b82c2.js +10 -0
- package/dist/client/828.77de843c49fb307a.js +10 -0
- package/dist/client/87.d2c2b5b1cae08bfc.js +10 -0
- package/dist/client/938.77649c32dae1c225.js +10 -0
- package/dist/client/964.cb1ecff7a46687b7.js +10 -0
- package/dist/client/972.4da2796f3f2df874.js +10 -0
- package/dist/client/AddNodeContext.d.ts +1 -9
- package/dist/client/Branch.d.ts +1 -1
- package/dist/client/BranchContext.d.ts +2 -10
- package/dist/client/FlowContext.d.ts +10 -5
- package/dist/client/NodeClipboardContext.d.ts +12 -2
- package/dist/client/NodeDragContext.d.ts +14 -2
- package/dist/client/RemoveNodeContext.d.ts +16 -2
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/nodeVariableUtils.d.ts +7 -6
- package/dist/client/nodes/calculation.d.ts +3 -75
- package/dist/client/nodes/condition.d.ts +7 -111
- package/dist/client/nodes/create.d.ts +3 -124
- package/dist/client/nodes/destroy.d.ts +2 -57
- package/dist/client/nodes/end.d.ts +2 -23
- package/dist/client/nodes/index.d.ts +2 -91
- package/dist/client/nodes/multi-conditions.d.ts +10 -48
- package/dist/client/nodes/output.d.ts +2 -44
- package/dist/client/nodes/query.d.ts +3 -255
- package/dist/client/nodes/update.d.ts +2 -117
- package/dist/client/style.d.ts +7 -26
- package/dist/client/triggers/collection.d.ts +3 -154
- package/dist/client/triggers/index.d.ts +2 -36
- package/dist/client/triggers/schedule/index.d.ts +8 -65
- package/dist/client/utils.d.ts +4 -5
- package/dist/client/variable.d.ts +4 -44
- package/dist/client-v2/119.81195bcd0d451279.js +10 -0
- package/dist/client-v2/142.3d386748090ff6d3.js +10 -0
- package/dist/client-v2/159.cb221540c286cd32.js +10 -0
- package/dist/client-v2/224.44a5e1227bee33fb.js +10 -0
- package/dist/client-v2/276.43297f402f31970e.js +10 -0
- package/dist/client-v2/326.bdc99ad8e7590970.js +10 -0
- package/dist/client-v2/346.8c038b3c99d4fdc9.js +10 -0
- package/dist/client-v2/382.05f5482bb512b179.js +10 -0
- package/dist/client-v2/387.ab3eac2eb447f36f.js +10 -0
- package/dist/client-v2/394.515ed058e7f72797.js +10 -0
- package/dist/client-v2/438.b7df0416b66f8f64.js +10 -0
- package/dist/client-v2/513.ab2bdd96ad9ece4d.js +10 -0
- package/dist/client-v2/54.287764bc467d65da.js +10 -0
- package/dist/client-v2/635.37de4abe241b30e8.js +10 -0
- package/dist/client-v2/719.05cf070ef89a78f4.js +10 -0
- package/dist/client-v2/739.906e94bbe6d52a3d.js +10 -0
- package/dist/client-v2/759.7b162ad3adf450f1.js +10 -0
- package/dist/client-v2/772.8e5148d8c1518449.js +10 -0
- package/dist/client-v2/938.717e47af39485b29.js +10 -0
- package/dist/client-v2/ExecutionCanvas.d.ts +15 -0
- package/dist/client-v2/canvas/AddNodeContext.d.ts +35 -0
- package/dist/client-v2/canvas/AddNodeContext.shared.d.ts +33 -0
- package/dist/client-v2/canvas/AddNodeSlot.d.ts +20 -0
- package/dist/client-v2/canvas/Branch.d.ts +32 -0
- package/dist/client-v2/canvas/BranchContext.d.ts +20 -0
- package/dist/client-v2/canvas/BranchRenderContext.d.ts +14 -0
- package/dist/client-v2/canvas/CanvasContent.d.ts +20 -0
- package/dist/client-v2/canvas/DownstreamBranchIndex.d.ts +20 -0
- package/dist/client-v2/canvas/Instruction.d.ts +139 -0
- package/dist/{client/triggers/schedule/EndsByField.d.ts → client-v2/canvas/JobButton.d.ts} +3 -3
- package/dist/client-v2/canvas/Node.d.ts +36 -0
- package/dist/client-v2/canvas/NodeClipboardContext.d.ts +64 -0
- package/dist/client-v2/canvas/NodeConfigDrawer.d.ts +27 -0
- package/dist/client-v2/canvas/NodeDragContext.d.ts +83 -0
- package/dist/client-v2/canvas/RemoveNodeContext.d.ts +45 -0
- package/dist/client-v2/canvas/WorkflowTypedVariableInput.d.ts +16 -0
- package/dist/client-v2/canvas/WorkflowVariableInput.d.ts +39 -0
- package/dist/client-v2/canvas/WorkflowVariableJsonTextArea.d.ts +15 -0
- package/dist/client-v2/canvas/WorkflowVariableSelect.d.ts +29 -0
- package/dist/client-v2/canvas/WorkflowVariableTag.d.ts +22 -0
- package/dist/client-v2/canvas/WorkflowVariableTextArea.d.ts +18 -0
- package/dist/client-v2/canvas/adaptVariableOptionToMetaTree.d.ts +48 -0
- package/dist/client-v2/canvas/addNodeController.d.ts +70 -0
- package/dist/client-v2/canvas/collectionFieldOptions.d.ts +57 -0
- package/dist/client-v2/canvas/contexts.d.ts +84 -0
- package/dist/client-v2/canvas/dropImpact.d.ts +28 -0
- package/dist/client-v2/canvas/instructionAvailability.d.ts +26 -0
- package/dist/client-v2/canvas/nodeRenderDispatch.d.ts +79 -0
- package/dist/client-v2/canvas/nodeTree.d.ts +21 -0
- package/dist/client-v2/canvas/nodeVariableUtils.d.ts +14 -0
- package/dist/client-v2/canvas/removeNodeUtils.d.ts +31 -0
- package/dist/client-v2/canvas/style.d.ts +35 -0
- package/dist/client-v2/canvas/textAreaInsertion.d.ts +14 -0
- package/dist/client-v2/canvas/useWorkflowInstruction.d.ts +23 -0
- package/dist/client-v2/canvas/useWorkflowVariableOptions.d.ts +40 -0
- package/dist/client-v2/canvas/workflowVariableConverters.d.ts +13 -0
- package/dist/client-v2/components/Calculation.d.ts +18 -0
- package/dist/client-v2/components/ExecutionStatusIcon.d.ts +18 -0
- package/dist/{client/triggers/schedule/RepeatField.d.ts → client-v2/components/ExecutionStatusTag.d.ts} +3 -4
- package/dist/client-v2/components/ExecutionViewHeader.d.ts +29 -0
- package/dist/client-v2/components/ExecutionsDropdown.d.ts +25 -0
- package/dist/client-v2/components/FilterDynamicComponent.d.ts +22 -0
- package/dist/client-v2/components/HideVariableContext.d.ts +11 -0
- package/dist/client-v2/components/JobResultModal.d.ts +11 -0
- package/dist/client-v2/components/RadioWithTooltip.d.ts +23 -0
- package/dist/client-v2/components/SyncModeSelect.d.ts +16 -0
- package/dist/{client/triggers/schedule/OnField.d.ts → client-v2/components/SyncModeTag.d.ts} +3 -3
- package/dist/client-v2/components/TestRunButton.d.ts +36 -0
- package/dist/client-v2/components/TimeoutInput.d.ts +15 -0
- package/dist/client-v2/components/WorkflowCanvasHeader.d.ts +17 -0
- package/dist/client-v2/components/WorkflowDetailsModal.d.ts +25 -0
- package/dist/client-v2/components/WorkflowEnabledSwitch.d.ts +16 -0
- package/dist/client-v2/components/WorkflowMenu.d.ts +17 -0
- package/dist/client-v2/components/WorkflowRevisionsDropdown.d.ts +15 -0
- package/dist/client-v2/components/WorkflowVariableWrapper.d.ts +25 -0
- package/dist/client-v2/components/collection/AppendsSelect.d.ts +15 -0
- package/dist/client-v2/components/collection/AssignedFieldsEditor.d.ts +16 -0
- package/dist/client-v2/components/collection/CollectionCascader.d.ts +15 -0
- package/dist/client-v2/components/collection/FieldsSelect.d.ts +16 -0
- package/dist/client-v2/components/collection/PaginationFields.d.ts +14 -0
- package/dist/client-v2/components/collection/SortFieldsInput.d.ts +19 -0
- package/dist/client-v2/components/collection/TriggerCollectionRecordSelect.d.ts +15 -0
- package/dist/client-v2/components/collection/index.d.ts +16 -0
- package/dist/client-v2/components/collection/utils.d.ts +42 -0
- package/dist/client-v2/components/formatResultForDisplay.d.ts +17 -0
- package/dist/client-v2/components/jobStatus.d.ts +27 -0
- package/dist/client-v2/components/renderEngineReference.d.ts +10 -0
- package/dist/client-v2/components/workflowCanvas.d.ts +41 -0
- package/dist/client-v2/constants.d.ts +14 -0
- package/dist/client-v2/hooks/useWorkflowRuntimePaths.d.ts +37 -0
- package/dist/client-v2/index.d.ts +47 -0
- package/dist/client-v2/index.js +10 -0
- package/dist/client-v2/locale.d.ts +41 -0
- package/dist/{client → client-v2}/models/NodeDetailsGridModel.d.ts +1 -1
- package/dist/{client → client-v2}/models/NodeDetailsModel.d.ts +1 -1
- package/dist/{client → client-v2}/models/NodeValueModel.d.ts +1 -1
- package/dist/{client → client-v2}/models/TaskCardCommonItemModel.d.ts +1 -1
- package/dist/{client → client-v2}/models/index.d.ts +1 -0
- package/dist/client-v2/models/triggerWorkflows.d.ts +43 -0
- package/dist/client-v2/nodes/calculation.d.ts +38 -0
- package/dist/client-v2/nodes/collectionNode.d.ts +29 -0
- package/dist/client-v2/nodes/components/calculation.d.ts +11 -0
- package/dist/client-v2/nodes/components/collection.d.ts +15 -0
- package/dist/client-v2/nodes/components/condition.d.ts +25 -0
- package/dist/client-v2/nodes/components/conditionShared.d.ts +20 -0
- package/dist/client-v2/nodes/components/create.d.ts +12 -0
- package/dist/client-v2/nodes/components/destroy.d.ts +12 -0
- package/dist/{client/triggers/schedule/ScheduleConfig.d.ts → client-v2/nodes/components/end.d.ts} +1 -1
- package/dist/client-v2/nodes/components/filter.d.ts +16 -0
- package/dist/client-v2/nodes/components/multi-conditions.d.ts +13 -0
- package/dist/client-v2/nodes/components/multiConditionsShared.d.ts +20 -0
- package/dist/client-v2/nodes/components/output.d.ts +10 -0
- package/dist/client-v2/nodes/components/query.d.ts +12 -0
- package/dist/client-v2/nodes/components/update.d.ts +12 -0
- package/dist/client-v2/nodes/condition.d.ts +46 -0
- package/dist/client-v2/nodes/create.d.ts +30 -0
- package/dist/client-v2/nodes/destroy.d.ts +24 -0
- package/dist/client-v2/nodes/end.d.ts +21 -0
- package/dist/client-v2/nodes/multi-conditions.d.ts +34 -0
- package/dist/client-v2/nodes/output.d.ts +29 -0
- package/dist/client-v2/nodes/query.d.ts +32 -0
- package/dist/client-v2/nodes/update.d.ts +25 -0
- package/dist/client-v2/pages/ExecutionHistoryDrawer.d.ts +13 -0
- package/dist/client-v2/pages/ExecutionViewPage.d.ts +10 -0
- package/dist/client-v2/pages/WorkflowCanvasPage.d.ts +10 -0
- package/dist/client-v2/pages/WorkflowCategoryTabs.d.ts +25 -0
- package/dist/client-v2/pages/WorkflowFormDrawer.d.ts +39 -0
- package/dist/client-v2/pages/WorkflowPane.d.ts +10 -0
- package/dist/client-v2/plugin.d.ts +67 -0
- package/dist/client-v2/triggers/ExecuteWorkflowButton.d.ts +35 -0
- package/dist/client-v2/triggers/TriggerConfig.d.ts +22 -0
- package/dist/client-v2/triggers/TriggerExecutionButton.d.ts +13 -0
- package/dist/client-v2/triggers/collection/CollectionConfig.d.ts +14 -0
- package/dist/client-v2/triggers/collection/TriggerCollectionConfig.d.ts +11 -0
- package/dist/client-v2/triggers/collection/constants.d.ts +28 -0
- package/dist/client-v2/triggers/collection/index.d.ts +40 -0
- package/dist/client-v2/triggers/index.d.ts +61 -0
- package/dist/client-v2/triggers/schedule/EndsByField.d.ts +17 -0
- package/dist/client-v2/triggers/schedule/OnField.d.ts +20 -0
- package/dist/client-v2/triggers/schedule/RepeatField.d.ts +23 -0
- package/dist/client-v2/triggers/schedule/ScheduleConfig.d.ts +17 -0
- package/dist/client-v2/triggers/schedule/ScheduleModes.d.ts +41 -0
- package/dist/{client → client-v2}/triggers/schedule/TriggerScheduleConfig.d.ts +1 -0
- package/dist/{client → client-v2}/triggers/schedule/constants.d.ts +8 -5
- package/dist/client-v2/triggers/schedule/index.d.ts +40 -0
- package/dist/client-v2/triggers/schedule/locale/Cron.zh-CN.d.ts +11 -0
- package/dist/common/executionStatus.d.ts +44 -0
- package/dist/common/executionStatus.js +133 -0
- package/dist/externalVersion.js +16 -12
- package/dist/locale/de-DE.json +14 -1
- package/dist/locale/en-US.json +22 -2
- package/dist/locale/es-ES.json +14 -1
- package/dist/locale/fr-FR.json +14 -1
- package/dist/locale/hu-HU.json +14 -1
- package/dist/locale/id-ID.json +14 -1
- package/dist/locale/it-IT.json +14 -1
- package/dist/locale/ja-JP.json +14 -1
- package/dist/locale/ko-KR.json +14 -1
- package/dist/locale/nl-NL.json +14 -1
- package/dist/locale/pt-BR.json +14 -1
- package/dist/locale/ru-RU.json +14 -1
- package/dist/locale/tr-TR.json +14 -1
- package/dist/locale/uk-UA.json +14 -1
- package/dist/locale/vi-VN.json +14 -1
- package/dist/locale/zh-CN.json +21 -2
- package/dist/locale/zh-TW.json +14 -1
- package/dist/node_modules/cron-parser/package.json +1 -1
- package/dist/node_modules/joi/package.json +1 -1
- package/dist/node_modules/lru-cache/package.json +1 -1
- package/dist/node_modules/nodejs-snowflake/package.json +1 -1
- package/dist/server/Dispatcher.d.ts +1 -0
- package/dist/server/Dispatcher.js +46 -28
- package/dist/server/ExecutionTimeoutManager.js +2 -2
- package/dist/server/Processor.d.ts +16 -0
- package/dist/server/Processor.js +112 -0
- package/dist/server/actions/nodes.js +36 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/instructions/CreateInstruction.js +6 -2
- package/dist/server/instructions/DestroyInstruction.js +2 -1
- package/dist/server/instructions/QueryInstruction.js +2 -1
- package/dist/server/instructions/UpdateInstruction.js +2 -1
- package/dist/server/triggers/CollectionTrigger.d.ts +5 -0
- package/dist/server/triggers/CollectionTrigger.js +26 -1
- package/dist/server/utils.js +27 -27
- package/package.json +3 -2
- package/dist/client/618.19af7f84261c815d.js +0 -10
- package/dist/client/67.452743ce8ec30617.js +0 -10
- package/dist/client/964.ffbf5b47ed12bbdc.js +0 -10
- package/dist/client/triggers/schedule/ScheduleModes.d.ts +0 -170
- package/dist/client/triggers/schedule/locale/Cron.zh-CN.d.ts +0 -42
|
@@ -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
|
+
export declare function FilterDynamicComponent({ collection, value, onChange, rightAsVariable, }: {
|
|
11
|
+
collection?: string;
|
|
12
|
+
value?: Record<string, unknown> | null;
|
|
13
|
+
onChange?: (value: Record<string, unknown> | null) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Controls whether the filter row's right-hand value editor allows workflow variables.
|
|
16
|
+
* - `true`: render the RHS as a variable-aware input (constant or workflow variable)
|
|
17
|
+
* - `false`: render the RHS as a pure typed static input with no variable picker
|
|
18
|
+
*/
|
|
19
|
+
rightAsVariable?: boolean;
|
|
20
|
+
}): React.JSX.Element;
|
|
21
|
+
export declare const ConditionField: typeof FilterDynamicComponent;
|
|
22
|
+
export default FilterDynamicComponent;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
export declare const HideVariableContext: React.Context<boolean>;
|
|
11
|
+
export declare function useHideVariable(): boolean;
|
|
@@ -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 JobResultModal(): React.JSX.Element;
|
|
11
|
+
export default JobResultModal;
|
|
@@ -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
|
+
export interface RadioWithTooltipOption {
|
|
11
|
+
value: any;
|
|
12
|
+
label: string;
|
|
13
|
+
tooltip?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface RadioWithTooltipProps {
|
|
16
|
+
options?: RadioWithTooltipOption[];
|
|
17
|
+
direction?: 'horizontal' | 'vertical';
|
|
18
|
+
value?: any;
|
|
19
|
+
onChange?: (value: any) => void;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare function RadioWithTooltip(props: RadioWithTooltipProps): React.JSX.Element;
|
|
23
|
+
export default RadioWithTooltip;
|
|
@@ -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;
|
package/dist/{client/triggers/schedule/OnField.d.ts → client-v2/components/SyncModeTag.d.ts}
RENAMED
|
@@ -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
|
|
11
|
-
value
|
|
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
|
+
};
|