@nocobase/plugin-workflow 0.9.0-alpha.2 → 0.9.1-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/README.md +9 -0
- package/README.zh-CN.md +9 -0
- package/lib/client/AddButton.d.ts +1 -1
- package/lib/client/AddButton.js +43 -27
- package/lib/client/Branch.d.ts +1 -1
- package/lib/client/ExecutionCanvas.js +5 -10
- package/lib/client/WorkflowCanvas.js +12 -42
- package/lib/client/WorkflowProvider.js +10 -1
- package/lib/client/components/CollectionBlockInitializer.d.ts +7 -0
- package/lib/client/components/CollectionBlockInitializer.js +81 -0
- package/lib/client/components/CollectionFieldInitializers.d.ts +2 -0
- package/lib/client/components/CollectionFieldInitializers.js +89 -0
- package/lib/client/components/CollectionFieldset.js +25 -33
- package/lib/client/components/FilterDynamicComponent.d.ts +6 -0
- package/lib/client/components/FilterDynamicComponent.js +43 -0
- package/lib/client/components/NullRender.d.ts +1 -0
- package/lib/client/components/NullRender.js +10 -0
- package/lib/client/components/RadioWithTooltip.d.ts +7 -0
- package/lib/client/components/RadioWithTooltip.js +94 -0
- package/lib/client/constants.d.ts +10 -8
- package/lib/client/constants.js +52 -14
- package/lib/client/index.d.ts +0 -1
- package/lib/client/index.js +1 -10
- package/lib/client/locale/en-US.d.ts +18 -18
- package/lib/client/locale/en-US.js +19 -19
- package/lib/client/locale/zh-CN.d.ts +47 -20
- package/lib/client/locale/zh-CN.js +48 -21
- package/lib/client/nodes/calculation.d.ts +39 -7
- package/lib/client/nodes/calculation.js +165 -19
- package/lib/client/nodes/condition.d.ts +67 -4
- package/lib/client/nodes/condition.js +283 -31
- package/lib/client/nodes/create.d.ts +10 -10
- package/lib/client/nodes/create.js +28 -42
- package/lib/client/nodes/delay.d.ts +4 -4
- package/lib/client/nodes/delay.js +10 -8
- package/lib/client/nodes/destroy.d.ts +4 -7
- package/lib/client/nodes/destroy.js +4 -5
- package/lib/client/nodes/index.d.ts +10 -2
- package/lib/client/nodes/index.js +217 -110
- package/lib/client/nodes/manual/AssigneesSelect.d.ts +6 -0
- package/lib/client/nodes/manual/AssigneesSelect.js +65 -0
- package/lib/client/nodes/manual/ModeConfig.d.ts +5 -0
- package/lib/client/nodes/manual/ModeConfig.js +160 -0
- package/lib/client/nodes/manual/SchemaConfig.d.ts +6 -0
- package/lib/client/nodes/manual/SchemaConfig.js +715 -0
- package/lib/client/nodes/manual/WorkflowTodo.d.ts +8 -0
- package/lib/client/nodes/manual/WorkflowTodo.js +691 -0
- package/lib/client/nodes/manual/WorkflowTodoBlockInitializer.d.ts +5 -0
- package/lib/client/nodes/manual/WorkflowTodoBlockInitializer.js +75 -0
- package/lib/client/nodes/manual/index.d.ts +62 -0
- package/lib/client/nodes/manual/index.js +137 -0
- package/lib/client/nodes/parallel.d.ts +12 -7
- package/lib/client/nodes/parallel.js +32 -39
- package/lib/client/nodes/query.d.ts +11 -19
- package/lib/client/nodes/query.js +40 -47
- package/lib/client/nodes/request.d.ts +77 -42
- package/lib/client/nodes/request.js +123 -69
- package/lib/client/nodes/update.d.ts +33 -29
- package/lib/client/nodes/update.js +14 -7
- package/lib/client/schemas/collection.d.ts +0 -3
- package/lib/client/schemas/collection.js +2 -7
- package/lib/client/schemas/executions.js +1 -1
- package/lib/client/schemas/workflows.js +1 -1
- package/lib/client/style.js +51 -9
- package/lib/client/triggers/collection.d.ts +44 -15
- package/lib/client/triggers/collection.js +104 -82
- package/lib/client/triggers/index.d.ts +6 -3
- package/lib/client/triggers/index.js +167 -74
- package/lib/client/triggers/schedule/DateFieldsSelect.js +1 -3
- package/lib/client/triggers/schedule/ScheduleConfig.js +15 -17
- package/lib/client/triggers/schedule/index.d.ts +7 -6
- package/lib/client/triggers/schedule/index.js +39 -81
- package/lib/client/utils.d.ts +1 -0
- package/lib/client/utils.js +38 -0
- package/lib/client/variable.d.ts +21 -0
- package/lib/client/variable.js +147 -0
- package/lib/server/Plugin.d.ts +3 -3
- package/lib/server/Plugin.js +12 -21
- package/lib/server/Processor.d.ts +9 -2
- package/lib/server/Processor.js +33 -33
- package/lib/server/actions/index.js +2 -4
- package/lib/server/actions/workflows.d.ts +1 -0
- package/lib/server/actions/workflows.js +80 -23
- package/lib/server/collections/executions.js +5 -7
- package/lib/server/collections/flow_nodes.js +6 -18
- package/lib/server/collections/jobs.js +3 -1
- package/lib/server/collections/workflows.js +8 -4
- package/lib/server/constants.d.ts +9 -3
- package/lib/server/constants.js +11 -5
- package/lib/server/functions/index.d.ts +4 -0
- package/lib/server/functions/index.js +38 -0
- package/lib/server/index.d.ts +0 -1
- package/lib/server/index.js +0 -14
- package/lib/server/instructions/calculation.d.ts +2 -7
- package/lib/server/instructions/calculation.js +32 -37
- package/lib/server/instructions/condition.d.ts +4 -4
- package/lib/server/instructions/condition.js +126 -54
- package/lib/server/instructions/index.js +1 -1
- package/lib/server/instructions/manual/actions.js +101 -0
- package/lib/server/{extensions/assignees/collections → instructions/manual/collecions}/jobs.d.ts +2 -0
- package/lib/server/{extensions/assignees/collections → instructions/manual/collecions}/jobs.js +2 -1
- package/lib/server/{extensions/assignees/collections → instructions/manual/collecions}/users_jobs.js +10 -10
- package/lib/server/instructions/manual/index.d.ts +25 -0
- package/lib/server/instructions/manual/index.js +200 -0
- package/lib/server/instructions/parallel.js +11 -7
- package/lib/server/instructions/request.d.ts +5 -4
- package/lib/server/instructions/request.js +60 -79
- package/lib/server/migrations/20230221032941-change-request-body-type.d.ts +5 -0
- package/lib/server/migrations/20230221032941-change-request-body-type.js +113 -0
- package/lib/server/migrations/20230221071831-calculation-expression.d.ts +4 -0
- package/lib/server/migrations/20230221071831-calculation-expression.js +143 -0
- package/lib/server/migrations/20230221121203-condition-calculation.d.ts +4 -0
- package/lib/server/migrations/20230221121203-condition-calculation.js +126 -0
- package/lib/server/migrations/20230221162902-jsonb-to-json.d.ts +4 -0
- package/lib/server/migrations/20230221162902-jsonb-to-json.js +81 -0
- package/lib/server/triggers/schedule.js +11 -3
- package/package.json +10 -10
- package/lib/client/calculators.d.ts +0 -89
- package/lib/client/calculators.js +0 -668
- package/lib/client/components/CollectionFieldSelect.d.ts +0 -2
- package/lib/client/components/CollectionFieldSelect.js +0 -106
- package/lib/client/components/EjsTextArea.d.ts +0 -2
- package/lib/client/components/EjsTextArea.js +0 -232
- package/lib/server/actions/jobs.d.ts +0 -2
- package/lib/server/actions/jobs.js +0 -39
- package/lib/server/calculators/index.d.ts +0 -40
- package/lib/server/calculators/index.js +0 -187
- package/lib/server/extensions/assignees/actions.js +0 -75
- package/lib/server/extensions/assignees/index.d.ts +0 -2
- package/lib/server/extensions/assignees/index.js +0 -273
- package/lib/server/extensions/index.d.ts +0 -3
- package/lib/server/extensions/index.js +0 -13
- package/lib/server/instructions/prompt.d.ts +0 -19
- package/lib/server/instructions/prompt.js +0 -131
- /package/lib/server/{extensions/assignees → instructions/manual}/actions.d.ts +0 -0
- /package/lib/server/{extensions/assignees/collections → instructions/manual/collecions}/users.d.ts +0 -0
- /package/lib/server/{extensions/assignees/collections → instructions/manual/collecions}/users.js +0 -0
- /package/lib/server/{extensions/assignees/collections → instructions/manual/collecions}/users_jobs.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-workflow",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1-alpha.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"main": "./lib/index.js",
|
|
7
7
|
"types": "./lib/index.d.ts",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@nocobase/actions": "0.9.
|
|
10
|
-
"@nocobase/client": "0.9.
|
|
11
|
-
"@nocobase/database": "0.9.
|
|
12
|
-
"@nocobase/
|
|
13
|
-
"@nocobase/
|
|
9
|
+
"@nocobase/actions": "0.9.1-alpha.2",
|
|
10
|
+
"@nocobase/client": "0.9.1-alpha.2",
|
|
11
|
+
"@nocobase/database": "0.9.1-alpha.2",
|
|
12
|
+
"@nocobase/evaluators": "0.9.1-alpha.2",
|
|
13
|
+
"@nocobase/resourcer": "0.9.1-alpha.2",
|
|
14
|
+
"@nocobase/server": "0.9.1-alpha.2",
|
|
15
|
+
"@nocobase/utils": "0.9.1-alpha.2",
|
|
14
16
|
"antd": "4.22.8",
|
|
15
17
|
"axios": "^0.27.2",
|
|
16
18
|
"classnames": "^2.3.1",
|
|
17
19
|
"cron-parser": "4.4.0",
|
|
18
|
-
"ejs": "^3.1.8",
|
|
19
20
|
"json-templates": "^4.2.0",
|
|
20
21
|
"moment": "^2.29.2",
|
|
21
|
-
"react-copy-to-clipboard": "^5.1.0",
|
|
22
22
|
"react-js-cron": "^1.4.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@nocobase/test": "0.9.
|
|
25
|
+
"@nocobase/test": "0.9.1-alpha.2",
|
|
26
26
|
"@types/ejs": "^3.1.1"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "d588a68eca4feed4642a4cb317301011266fe5c9"
|
|
29
29
|
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Registry } from "@nocobase/utils/client";
|
|
3
|
-
interface Calculator {
|
|
4
|
-
name: string;
|
|
5
|
-
type: 'boolean' | 'number' | 'string' | 'date' | 'unknown' | 'null' | 'array';
|
|
6
|
-
group: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const calculators: Registry<Calculator>;
|
|
9
|
-
export declare function parseValue(value: any, Types: any): {
|
|
10
|
-
type: string;
|
|
11
|
-
value?: any;
|
|
12
|
-
options?: any;
|
|
13
|
-
};
|
|
14
|
-
export declare const BaseTypeSet: Set<string>;
|
|
15
|
-
export declare const VariableTypes: {
|
|
16
|
-
constant: {
|
|
17
|
-
title: string;
|
|
18
|
-
value: string;
|
|
19
|
-
options: {
|
|
20
|
-
value: string;
|
|
21
|
-
label: string;
|
|
22
|
-
}[];
|
|
23
|
-
component(props: any): any;
|
|
24
|
-
appendTypeValue({ options }: {
|
|
25
|
-
options?: {
|
|
26
|
-
type: string;
|
|
27
|
-
};
|
|
28
|
-
}): string[];
|
|
29
|
-
onTypeChange([type, optionsType]: [any, any], onChange: any): void;
|
|
30
|
-
parse(path: any): {
|
|
31
|
-
path: any;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
$jobsMapByNodeId: {
|
|
35
|
-
title: string;
|
|
36
|
-
value: string;
|
|
37
|
-
options(): any[];
|
|
38
|
-
component(props: any): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
39
|
-
appendTypeValue({ options }: {
|
|
40
|
-
type: string;
|
|
41
|
-
options: any;
|
|
42
|
-
}): number[];
|
|
43
|
-
onTypeChange([type, nodeId]: [any, any], onChange: any): void;
|
|
44
|
-
parse([nodeId, ...path]: [any, ...any[]]): {
|
|
45
|
-
nodeId: any;
|
|
46
|
-
path: string;
|
|
47
|
-
};
|
|
48
|
-
stringify(next: any): string;
|
|
49
|
-
};
|
|
50
|
-
$context: {
|
|
51
|
-
title: string;
|
|
52
|
-
value: string;
|
|
53
|
-
options(): {
|
|
54
|
-
label: string;
|
|
55
|
-
value: any;
|
|
56
|
-
key: string;
|
|
57
|
-
}[];
|
|
58
|
-
component(props: any): React.ReactNode;
|
|
59
|
-
appendTypeValue({ options }: {
|
|
60
|
-
options: any;
|
|
61
|
-
}): any[];
|
|
62
|
-
onTypeChange([type, optionType]: [any, any], onChange: any): void;
|
|
63
|
-
parse([type, ...path]: [any, ...any[]]): {
|
|
64
|
-
path?: string;
|
|
65
|
-
type: any;
|
|
66
|
-
};
|
|
67
|
-
stringify(next: any): string;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
export declare const VariableTypesContext: React.Context<{}>;
|
|
71
|
-
export declare function useVariableTypes(): {};
|
|
72
|
-
interface OperandProps {
|
|
73
|
-
value: any;
|
|
74
|
-
onChange(v: any): void;
|
|
75
|
-
children?: React.ReactNode;
|
|
76
|
-
}
|
|
77
|
-
export declare function useOperandContext(): any;
|
|
78
|
-
export declare function Operand({ value, onChange, children }: OperandProps): JSX.Element;
|
|
79
|
-
export declare function Calculation({ calculator, operands, onChange }: {
|
|
80
|
-
calculator: any;
|
|
81
|
-
operands?: any[];
|
|
82
|
-
onChange: any;
|
|
83
|
-
}): JSX.Element;
|
|
84
|
-
export declare function VariableComponent({ value, onChange, renderSchemaComponent }: {
|
|
85
|
-
value: any;
|
|
86
|
-
onChange: any;
|
|
87
|
-
renderSchemaComponent: any;
|
|
88
|
-
}): JSX.Element;
|
|
89
|
-
export {};
|