@nocobase/plugin-workflow 2.2.0-alpha.1 → 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.
- 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/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 +43 -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,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,39 @@
|
|
|
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
|
+
config?: Record<string, any>;
|
|
23
|
+
options?: Record<string, any>;
|
|
24
|
+
categories?: Array<{
|
|
25
|
+
id: string | number;
|
|
26
|
+
}>;
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
};
|
|
29
|
+
export type WorkflowFormDrawerProps = {
|
|
30
|
+
mode: 'create' | 'edit';
|
|
31
|
+
/** Pre-selected trigger type for create mode (optional). */
|
|
32
|
+
type?: string;
|
|
33
|
+
plugin: PluginWorkflowClientV2;
|
|
34
|
+
record?: WorkflowRecord;
|
|
35
|
+
categoryOptions: WorkflowCategoryOption[];
|
|
36
|
+
onSubmitted: () => void;
|
|
37
|
+
};
|
|
38
|
+
export declare function WorkflowFormDrawer(props: WorkflowFormDrawerProps): React.JSX.Element;
|
|
39
|
+
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,67 @@
|
|
|
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 { Instruction } from './canvas/Instruction';
|
|
11
|
+
import type { Trigger } from './triggers';
|
|
12
|
+
import './models/triggerWorkflows';
|
|
13
|
+
export type InstructionGroup = {
|
|
14
|
+
key: string;
|
|
15
|
+
label: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* A workflow **system variable** (the `$system` scope). Registered by the
|
|
19
|
+
* workflow plugin itself — fixed, framework-independent values (current time,
|
|
20
|
+
* instance id, snowflake id), not contributed by any other plugin. Mirrors v1's
|
|
21
|
+
* `registerSystemVariable` (`client/index.tsx`).
|
|
22
|
+
*/
|
|
23
|
+
export type SystemVariableOption = {
|
|
24
|
+
/** Registry key + the path segment under `$system` (e.g. `now`). */
|
|
25
|
+
key: string;
|
|
26
|
+
/** Display label. Accepts a plain string or a `{{t("…")}}` template. */
|
|
27
|
+
label: string;
|
|
28
|
+
/** Optional tooltip shown next to the label. */
|
|
29
|
+
tooltip?: string;
|
|
30
|
+
};
|
|
31
|
+
export declare class PluginWorkflowClientV2 extends Plugin {
|
|
32
|
+
triggers: any;
|
|
33
|
+
instructions: any;
|
|
34
|
+
instructionGroups: any;
|
|
35
|
+
systemVariables: any;
|
|
36
|
+
/**
|
|
37
|
+
* Register a `$system` scope variable. Mirrors v1's `registerSystemVariable`
|
|
38
|
+
* but writes to *this* (v2) runtime's registry. The workflow plugin registers
|
|
39
|
+
* the builtin ones (time / instance id / snowflake id) on load.
|
|
40
|
+
*/
|
|
41
|
+
registerSystemVariable(option: SystemVariableOption): void;
|
|
42
|
+
isWorkflowSync(workflow: any): any;
|
|
43
|
+
/**
|
|
44
|
+
* Register a node type's v2 instruction. Mirrors v1's `registerInstruction`
|
|
45
|
+
* signature (accepts a class or an instance) but writes to *this* (v2)
|
|
46
|
+
* runtime's registry — see ADR-0003 / doc §9.1 (runtime separation). A type
|
|
47
|
+
* registered here appears in the v2 add-node menu and renders on the v2 canvas.
|
|
48
|
+
*/
|
|
49
|
+
registerInstruction(type: string, instruction: Instruction | {
|
|
50
|
+
new (): Instruction;
|
|
51
|
+
}): void;
|
|
52
|
+
getInstruction(type?: string): any;
|
|
53
|
+
registerInstructionGroup(key: string, group: InstructionGroup): void;
|
|
54
|
+
registerTrigger(type: string, trigger: Trigger | {
|
|
55
|
+
new (): Trigger;
|
|
56
|
+
}): void;
|
|
57
|
+
getTriggerOptions(type?: string): any;
|
|
58
|
+
load(): Promise<void>;
|
|
59
|
+
private registerBuiltinSystemVariables;
|
|
60
|
+
private registerBuiltinInstructions;
|
|
61
|
+
private registerModelLoaders;
|
|
62
|
+
private registerBuiltinTriggers;
|
|
63
|
+
private registerSettingsPage;
|
|
64
|
+
private registerCanvasRoute;
|
|
65
|
+
private registerExecutionRoute;
|
|
66
|
+
}
|
|
67
|
+
export default PluginWorkflowClientV2;
|
|
@@ -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,61 @@
|
|
|
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 { ISchema, JSXComponent } from '@formily/react';
|
|
17
|
+
import type { SubModelItem } from '@nocobase/flow-engine';
|
|
18
|
+
import type { UseVariableOptions, VariableOption } from '../canvas/collectionFieldOptions';
|
|
19
|
+
export type LoaderOf<P = {}> = () => Promise<{
|
|
20
|
+
default: ComponentType<P>;
|
|
21
|
+
}>;
|
|
22
|
+
export type TriggerTempAssociationSource = {
|
|
23
|
+
collection: string;
|
|
24
|
+
nodeId: string | number;
|
|
25
|
+
nodeKey: string;
|
|
26
|
+
nodeType: 'workflow';
|
|
27
|
+
};
|
|
28
|
+
export declare abstract class Trigger {
|
|
29
|
+
title: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
sync?: boolean;
|
|
32
|
+
presetFieldset?: Record<string, ISchema>;
|
|
33
|
+
fieldset?: Record<string, ISchema>;
|
|
34
|
+
triggerFieldset?: Record<string, ISchema>;
|
|
35
|
+
view?: ISchema;
|
|
36
|
+
scope?: Record<string, unknown>;
|
|
37
|
+
components?: Record<string, JSXComponent>;
|
|
38
|
+
initializers?: unknown;
|
|
39
|
+
isActionTriggerable_deprecated?: boolean | ((config: object, context?: object) => boolean);
|
|
40
|
+
PresetFieldsetLoader?: LoaderOf;
|
|
41
|
+
FieldsetLoader?: LoaderOf;
|
|
42
|
+
TriggerFieldsetLoader?: LoaderOf;
|
|
43
|
+
createDefaultConfig?(): Record<string, unknown>;
|
|
44
|
+
validate(config: Record<string, unknown>): boolean;
|
|
45
|
+
useVariables?(config: Record<string, unknown>, options?: UseVariableOptions): VariableOption[] | null;
|
|
46
|
+
/** Legacy schema initializer counterpart. Kept structural to avoid importing `@nocobase/client` into client-v2. */
|
|
47
|
+
useInitializers?(config: Record<string, unknown>): unknown | null;
|
|
48
|
+
/** v2-native block-creation menu item (the `useInitializers` counterpart). */
|
|
49
|
+
getCreateModelMenuItem?(args: {
|
|
50
|
+
config: Record<string, unknown>;
|
|
51
|
+
workflow?: unknown;
|
|
52
|
+
nodeType?: string;
|
|
53
|
+
}): SubModelItem | SubModelItem[] | null;
|
|
54
|
+
useTempAssociationSource?(config: Record<string, unknown>, workflow?: {
|
|
55
|
+
id?: string | number;
|
|
56
|
+
}): TriggerTempAssociationSource | null;
|
|
57
|
+
}
|
|
58
|
+
export type LegacyTriggerFieldsetRenderMode = 'legacy-fieldset' | 'modern-loader' | 'none';
|
|
59
|
+
export declare function resolveLegacyTriggerPresetRenderMode(trigger?: Pick<Trigger, 'presetFieldset' | 'PresetFieldsetLoader'> | null): LegacyTriggerFieldsetRenderMode;
|
|
60
|
+
export declare function resolveLegacyTriggerConfigRenderMode(trigger?: Pick<Trigger, 'fieldset' | 'FieldsetLoader'> | null): LegacyTriggerFieldsetRenderMode;
|
|
61
|
+
export declare function resolveLegacyTriggerExecuteRenderMode(trigger?: Pick<Trigger, 'triggerFieldset' | 'TriggerFieldsetLoader'> | null): LegacyTriggerFieldsetRenderMode;
|
|
@@ -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;
|
|
@@ -0,0 +1,20 @@
|
|
|
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 ScheduleOnFieldValue = {
|
|
11
|
+
field?: string;
|
|
12
|
+
offset?: number;
|
|
13
|
+
unit?: 1000 | 60000 | 3600000 | 86400000;
|
|
14
|
+
};
|
|
15
|
+
export declare function OnField({ collection, value: propsValue, onChange, }: {
|
|
16
|
+
collection?: string;
|
|
17
|
+
value?: ScheduleOnFieldValue;
|
|
18
|
+
onChange?: (value: ScheduleOnFieldValue) => void;
|
|
19
|
+
}): React.JSX.Element;
|
|
20
|
+
export default OnField;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { type Locale } from 'react-js-cron';
|
|
11
|
+
import 'react-js-cron/dist/styles.css';
|
|
12
|
+
declare global {
|
|
13
|
+
interface Window {
|
|
14
|
+
cronLocale?: Locale;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
type RepeatValue = number | string | null;
|
|
18
|
+
export declare function RepeatField({ value, onChange, disabled, }: {
|
|
19
|
+
value?: RepeatValue;
|
|
20
|
+
onChange?: (value: RepeatValue) => void;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
}): React.JSX.Element;
|
|
23
|
+
export default RepeatField;
|
|
@@ -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
|
+
export declare function TriggerModeField({ disabled }: {
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}): React.JSX.Element;
|
|
13
|
+
export declare function ScheduleConfig({ modeDisabled }: {
|
|
14
|
+
modeDisabled?: boolean;
|
|
15
|
+
}): React.JSX.Element;
|
|
16
|
+
export declare function SchedulePresetConfig(): React.JSX.Element;
|
|
17
|
+
export default ScheduleConfig;
|
|
@@ -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 ScheduleConfigValue = {
|
|
10
|
+
mode?: number;
|
|
11
|
+
collection?: string;
|
|
12
|
+
startsOn?: unknown;
|
|
13
|
+
repeat?: unknown;
|
|
14
|
+
endsOn?: unknown;
|
|
15
|
+
limit?: number;
|
|
16
|
+
appends?: string[];
|
|
17
|
+
};
|
|
18
|
+
type ScheduleFieldMeta = {
|
|
19
|
+
title: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
min?: number;
|
|
23
|
+
required?: boolean;
|
|
24
|
+
};
|
|
25
|
+
type ScheduleExecuteFieldMeta = {
|
|
26
|
+
title: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
placeholder?: string;
|
|
29
|
+
required?: boolean;
|
|
30
|
+
};
|
|
31
|
+
export declare const ScheduleModeFields: Record<number, Record<string, ScheduleFieldMeta>>;
|
|
32
|
+
export declare const ScheduleModeExecuteFields: Record<number, Record<string, ScheduleExecuteFieldMeta>>;
|
|
33
|
+
export declare const ScheduleModes: {
|
|
34
|
+
0: {
|
|
35
|
+
validate(config: ScheduleConfigValue): boolean;
|
|
36
|
+
};
|
|
37
|
+
1: {
|
|
38
|
+
validate(config: ScheduleConfigValue): boolean;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export {};
|
|
@@ -7,10 +7,13 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
export declare const SCHEDULE_MODE: {
|
|
10
|
-
STATIC:
|
|
11
|
-
DATE_FIELD:
|
|
10
|
+
readonly STATIC: 0;
|
|
11
|
+
readonly DATE_FIELD: 1;
|
|
12
12
|
};
|
|
13
|
-
export declare const scheduleModeOptions: {
|
|
14
|
-
value:
|
|
13
|
+
export declare const scheduleModeOptions: ({
|
|
14
|
+
value: 0;
|
|
15
15
|
label: string;
|
|
16
|
-
}
|
|
16
|
+
} | {
|
|
17
|
+
value: 1;
|
|
18
|
+
label: string;
|
|
19
|
+
})[];
|
|
@@ -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
|
+
import { type ScheduleConfigValue } from './ScheduleModes';
|
|
13
|
+
declare function useVariables(config: ScheduleConfigValue, opts?: UseVariableOptions): VariableOption[];
|
|
14
|
+
export default class ScheduleTrigger extends Trigger {
|
|
15
|
+
sync: boolean;
|
|
16
|
+
title: string;
|
|
17
|
+
description: string;
|
|
18
|
+
PresetFieldsetLoader: LoaderOf;
|
|
19
|
+
FieldsetLoader: LoaderOf<{
|
|
20
|
+
modeDisabled?: boolean;
|
|
21
|
+
}>;
|
|
22
|
+
TriggerFieldsetLoader: LoaderOf;
|
|
23
|
+
createDefaultConfig(): {
|
|
24
|
+
mode: 0;
|
|
25
|
+
};
|
|
26
|
+
validate(config: ScheduleConfigValue): boolean;
|
|
27
|
+
useVariables: typeof useVariables;
|
|
28
|
+
getCreateModelMenuItem({ config }: {
|
|
29
|
+
config: ScheduleConfigValue;
|
|
30
|
+
}): SubModelItem | null;
|
|
31
|
+
useTempAssociationSource(config: ScheduleConfigValue, workflow?: {
|
|
32
|
+
id?: string | number;
|
|
33
|
+
}): {
|
|
34
|
+
collection: string;
|
|
35
|
+
nodeId: string | number;
|
|
36
|
+
nodeKey: string;
|
|
37
|
+
nodeType: "workflow";
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
@@ -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 type { Locale } from 'react-js-cron';
|
|
10
|
+
declare const zhCN: Locale;
|
|
11
|
+
export default zhCN;
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
* Framework-neutral execution-status metadata shared between the legacy
|
|
11
|
+
* `src/client/` (v1) and the new `src/client-v2/` lanes. The `label` /
|
|
12
|
+
* `description` strings are i18n templates compiled via `useT()` in v2 and
|
|
13
|
+
* `Schema.compile`/`useCompile` in v1. Colors are antd `Tag` preset color
|
|
14
|
+
* names (not raw hex), so they stay token-driven.
|
|
15
|
+
*
|
|
16
|
+
* The legacy `src/client/constants.tsx` keeps its own richer copy (with React
|
|
17
|
+
* icon nodes) because it is consumed by ~100 v1 files; this module only carries
|
|
18
|
+
* the plain data the v2 lane needs and never imports `@nocobase/client`.
|
|
19
|
+
*/
|
|
20
|
+
export declare const EXECUTION_STATUS: {
|
|
21
|
+
readonly QUEUEING: any;
|
|
22
|
+
readonly STARTED: 0;
|
|
23
|
+
readonly RESOLVED: 1;
|
|
24
|
+
readonly FAILED: -1;
|
|
25
|
+
readonly ERROR: -2;
|
|
26
|
+
readonly ABORTED: -3;
|
|
27
|
+
readonly CANCELED: -4;
|
|
28
|
+
readonly REJECTED: -5;
|
|
29
|
+
readonly RETRY_NEEDED: -6;
|
|
30
|
+
};
|
|
31
|
+
export type ExecutionStatusOption = {
|
|
32
|
+
value: number | null;
|
|
33
|
+
label: string;
|
|
34
|
+
color: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
};
|
|
37
|
+
export declare const EXECUTION_STATUS_OPTIONS: ExecutionStatusOption[];
|
|
38
|
+
export declare const EXECUTION_STATUS_OPTIONS_MAP: Record<string, ExecutionStatusOption>;
|
|
39
|
+
export type ExecutionReasonOption = {
|
|
40
|
+
value: string;
|
|
41
|
+
label: string;
|
|
42
|
+
};
|
|
43
|
+
export declare const EXECUTION_REASON_OPTIONS: ExecutionReasonOption[];
|
|
44
|
+
export declare const EXECUTION_REASON_OPTIONS_MAP: Record<string, ExecutionReasonOption>;
|