@nocobase/plugin-workflow 1.4.0-alpha.6 → 1.4.0-alpha.7
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 +26 -5
- package/dist/client/{AddButton.d.ts → AddNodeContext.d.ts} +2 -0
- package/dist/client/index.js +156 -152
- package/dist/client/nodes/condition.d.ts +24 -6
- package/dist/client/nodes/index.d.ts +19 -8
- package/dist/externalVersion.js +12 -12
- package/dist/locale/zh-CN.json +8 -1
- package/dist/node_modules/cron-parser/package.json +1 -1
- package/dist/node_modules/lru-cache/package.json +1 -1
- package/dist/server/actions/index.js +1 -1
- package/package.json +3 -3
- package/README.zh-CN.md +0 -9
|
@@ -81,13 +81,31 @@ export default class extends Instruction {
|
|
|
81
81
|
required: boolean;
|
|
82
82
|
};
|
|
83
83
|
};
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
presetFieldset: {
|
|
85
|
+
rejectOnFalse: {
|
|
86
|
+
type: string;
|
|
87
|
+
title: string;
|
|
88
|
+
'x-decorator': string;
|
|
89
|
+
'x-component': string;
|
|
90
|
+
enum: {
|
|
91
|
+
label: string;
|
|
92
|
+
value: boolean;
|
|
93
|
+
}[];
|
|
94
|
+
default: boolean;
|
|
89
95
|
};
|
|
90
|
-
}
|
|
96
|
+
};
|
|
97
|
+
branching: ({ rejectOnFalse }?: {
|
|
98
|
+
rejectOnFalse?: boolean;
|
|
99
|
+
}) => false | ({
|
|
100
|
+
label: string;
|
|
101
|
+
value: boolean;
|
|
102
|
+
} | {
|
|
103
|
+
label: string;
|
|
104
|
+
value: 1;
|
|
105
|
+
} | {
|
|
106
|
+
label: string;
|
|
107
|
+
value: 0;
|
|
108
|
+
})[];
|
|
91
109
|
scope: {
|
|
92
110
|
renderEngineReference: (key: string) => React.JSX.Element;
|
|
93
111
|
useWorkflowVariableOptions: typeof useWorkflowVariableOptions;
|
|
@@ -17,13 +17,18 @@ export type NodeAvailableContext = {
|
|
|
17
17
|
upstream: object;
|
|
18
18
|
branchIndex: number;
|
|
19
19
|
};
|
|
20
|
+
type Config = Record<string, any>;
|
|
21
|
+
type Options = {
|
|
22
|
+
label: string;
|
|
23
|
+
value: any;
|
|
24
|
+
}[];
|
|
20
25
|
export declare abstract class Instruction {
|
|
21
26
|
title: string;
|
|
22
27
|
type: string;
|
|
23
28
|
group: string;
|
|
24
29
|
description?: string;
|
|
25
30
|
/**
|
|
26
|
-
* @
|
|
31
|
+
* @deprecated migrate to `presetFieldset` instead
|
|
27
32
|
*/
|
|
28
33
|
options?: {
|
|
29
34
|
label: string;
|
|
@@ -31,21 +36,26 @@ export declare abstract class Instruction {
|
|
|
31
36
|
key: string;
|
|
32
37
|
}[];
|
|
33
38
|
fieldset: Record<string, ISchema>;
|
|
39
|
+
/**
|
|
40
|
+
* @experimental
|
|
41
|
+
*/
|
|
42
|
+
presetFieldset?: Record<string, ISchema>;
|
|
43
|
+
/**
|
|
44
|
+
* To presentation if the instruction is creating a branch
|
|
45
|
+
* @experimental
|
|
46
|
+
*/
|
|
47
|
+
branching?: boolean | Options | ((config: Config) => boolean | Options);
|
|
34
48
|
/**
|
|
35
49
|
* @experimental
|
|
36
50
|
*/
|
|
37
51
|
view?: ISchema;
|
|
38
|
-
scope?:
|
|
39
|
-
|
|
40
|
-
};
|
|
41
|
-
components?: {
|
|
42
|
-
[key: string]: any;
|
|
43
|
-
};
|
|
52
|
+
scope?: Record<string, any>;
|
|
53
|
+
components?: Record<string, any>;
|
|
44
54
|
Component?(props: any): JSX.Element;
|
|
45
55
|
/**
|
|
46
56
|
* @experimental
|
|
47
57
|
*/
|
|
48
|
-
createDefaultConfig?():
|
|
58
|
+
createDefaultConfig?(): Config;
|
|
49
59
|
useVariables?(node: any, options?: UseVariableOptions): VariableOption;
|
|
50
60
|
useScopeVariables?(node: any, options?: any): VariableOption[];
|
|
51
61
|
useInitializers?(node: any): SchemaInitializerItemType | null;
|
|
@@ -73,3 +83,4 @@ export declare function Node({ data }: {
|
|
|
73
83
|
export declare function RemoveButton(): React.JSX.Element;
|
|
74
84
|
export declare function JobButton(): React.JSX.Element;
|
|
75
85
|
export declare function NodeDefaultView(props: any): React.JSX.Element;
|
|
86
|
+
export {};
|
package/dist/externalVersion.js
CHANGED
|
@@ -9,26 +9,26 @@
|
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
11
|
"react": "18.2.0",
|
|
12
|
+
"@formily/core": "2.3.0",
|
|
13
|
+
"@formily/react": "2.3.0",
|
|
14
|
+
"@nocobase/client": "1.4.0-alpha.7",
|
|
15
|
+
"@nocobase/utils": "1.4.0-alpha.7",
|
|
12
16
|
"antd": "5.12.8",
|
|
13
17
|
"@ant-design/icons": "5.2.6",
|
|
14
|
-
"@nocobase/client": "1.4.0-alpha.6",
|
|
15
18
|
"react-router-dom": "6.21.0",
|
|
16
|
-
"@nocobase/utils": "1.4.0-alpha.6",
|
|
17
19
|
"react-i18next": "11.18.6",
|
|
18
|
-
"@formily/core": "2.3.0",
|
|
19
|
-
"@formily/react": "2.3.0",
|
|
20
20
|
"@formily/shared": "2.3.2",
|
|
21
21
|
"lodash": "4.17.21",
|
|
22
|
-
"@nocobase/database": "1.4.0-alpha.
|
|
23
|
-
"@nocobase/server": "1.4.0-alpha.
|
|
24
|
-
"@nocobase/logger": "1.4.0-alpha.
|
|
25
|
-
"@nocobase/evaluators": "1.4.0-alpha.
|
|
22
|
+
"@nocobase/database": "1.4.0-alpha.7",
|
|
23
|
+
"@nocobase/server": "1.4.0-alpha.7",
|
|
24
|
+
"@nocobase/logger": "1.4.0-alpha.7",
|
|
25
|
+
"@nocobase/evaluators": "1.4.0-alpha.7",
|
|
26
26
|
"@formily/antd-v5": "1.1.9",
|
|
27
27
|
"@formily/reactive": "2.3.0",
|
|
28
|
-
"@nocobase/actions": "1.4.0-alpha.
|
|
28
|
+
"@nocobase/actions": "1.4.0-alpha.7",
|
|
29
29
|
"dayjs": "1.11.10",
|
|
30
|
-
"@nocobase/data-source-manager": "1.4.0-alpha.
|
|
30
|
+
"@nocobase/data-source-manager": "1.4.0-alpha.7",
|
|
31
31
|
"sequelize": "6.35.2",
|
|
32
|
-
"@nocobase/plugin-workflow-test": "1.4.0-alpha.
|
|
33
|
-
"@nocobase/test": "1.4.0-alpha.
|
|
32
|
+
"@nocobase/plugin-workflow-test": "1.4.0-alpha.7",
|
|
33
|
+
"@nocobase/test": "1.4.0-alpha.7"
|
|
34
34
|
};
|
package/dist/locale/zh-CN.json
CHANGED
|
@@ -160,6 +160,8 @@
|
|
|
160
160
|
"Continue when \"Yes\"": "“是”则继续",
|
|
161
161
|
"Branch into \"Yes\" and \"No\"": "“是”和“否”分别继续",
|
|
162
162
|
"Condition expression": "条件表达式",
|
|
163
|
+
"Inside of \"Yes\" branch": "“是”分支内",
|
|
164
|
+
"Inside of \"No\" branch": "“否”分支内",
|
|
163
165
|
"Create record": "新增数据",
|
|
164
166
|
"Add new record to a collection. You can use variables from upstream nodes to assign values to fields.":
|
|
165
167
|
"向一个数据表中添加新的数据。可以使用上游节点里的变量为字段赋值。",
|
|
@@ -206,5 +208,10 @@
|
|
|
206
208
|
"Succeeded": "成功",
|
|
207
209
|
"Test run": "测试执行",
|
|
208
210
|
"Test run will do the actual data manipulating or API calling, please use with caution.": "测试执行会进行实际的数据操作或 API 调用,请谨慎使用。",
|
|
209
|
-
"No variable": "无变量"
|
|
211
|
+
"No variable": "无变量",
|
|
212
|
+
|
|
213
|
+
"Add node": "添加节点",
|
|
214
|
+
"Move all downstream nodes to": "将所有下游节点移至",
|
|
215
|
+
"After end of branches": "分支结束后",
|
|
216
|
+
"Inside of branch": "分支内"
|
|
210
217
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"cron-parser","version":"4.4.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","types":"index.d.ts","typesVersions":{"<4.1":{"*":["types/ts3/*"]}},"directories":{"test":"test"},"scripts":{"test:tsd":"tsd","test:unit":"TZ=UTC tap ./test/*.js","test:cover":"TZ=UTC tap --coverage-report=html ./test/*.js","lint":"eslint .","lint:fix":"eslint --fix .","test":"npm run lint && npm run test:unit && npm run test:tsd"},"repository":{"type":"git","url":"https://github.com/harrisiirak/cron-parser.git"},"keywords":["cron","crontab","parser"],"author":"Harri Siirak","contributors":["Nicholas Clawson","Daniel Prentis <daniel@salsitasoft.com>","Renault John Lecoultre","Richard Astbury <richard.astbury@gmail.com>","Meaglin Wasabi <Meaglin.wasabi@gmail.com>","Mike Kusold <hello@mikekusold.com>","Alex Kit <alex.kit@atmajs.com>","Santiago Gimeno <santiago.gimeno@gmail.com>","Daniel <darc.tec@gmail.com>","Christian Steininger <christian.steininger.cs@gmail.com>","Mykola Piskovyi <m.piskovyi@gmail.com>","Brian Vaughn <brian.david.vaughn@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Yasuhiroki <yasuhiroki.duck@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Brendan Warkentin <faazshift@gmail.com>","Charlie Fish <fishcharlie.code@gmail.com>","Ian Graves <ian+diskimage@iangrav.es>","Andy Thompson <me@andytson.com>","Regev Brody <regevbr@gmail.com>"],"license":"MIT","dependencies":{"luxon":"^1.28.0"},"devDependencies":{"eslint":"^8.2.0","sinon":"^10.0.0","tap":"^16.0.1","tsd":"^0.19.0"},"engines":{"node":">=0.8"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"_lastModified":"2024-11-
|
|
1
|
+
{"name":"cron-parser","version":"4.4.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","types":"index.d.ts","typesVersions":{"<4.1":{"*":["types/ts3/*"]}},"directories":{"test":"test"},"scripts":{"test:tsd":"tsd","test:unit":"TZ=UTC tap ./test/*.js","test:cover":"TZ=UTC tap --coverage-report=html ./test/*.js","lint":"eslint .","lint:fix":"eslint --fix .","test":"npm run lint && npm run test:unit && npm run test:tsd"},"repository":{"type":"git","url":"https://github.com/harrisiirak/cron-parser.git"},"keywords":["cron","crontab","parser"],"author":"Harri Siirak","contributors":["Nicholas Clawson","Daniel Prentis <daniel@salsitasoft.com>","Renault John Lecoultre","Richard Astbury <richard.astbury@gmail.com>","Meaglin Wasabi <Meaglin.wasabi@gmail.com>","Mike Kusold <hello@mikekusold.com>","Alex Kit <alex.kit@atmajs.com>","Santiago Gimeno <santiago.gimeno@gmail.com>","Daniel <darc.tec@gmail.com>","Christian Steininger <christian.steininger.cs@gmail.com>","Mykola Piskovyi <m.piskovyi@gmail.com>","Brian Vaughn <brian.david.vaughn@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Yasuhiroki <yasuhiroki.duck@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Brendan Warkentin <faazshift@gmail.com>","Charlie Fish <fishcharlie.code@gmail.com>","Ian Graves <ian+diskimage@iangrav.es>","Andy Thompson <me@andytson.com>","Regev Brody <regevbr@gmail.com>"],"license":"MIT","dependencies":{"luxon":"^1.28.0"},"devDependencies":{"eslint":"^8.2.0","sinon":"^10.0.0","tap":"^16.0.1","tsd":"^0.19.0"},"engines":{"node":">=0.8"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"_lastModified":"2024-11-11T02:37:24.812Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"lru-cache","description":"A cache object that deletes the least-recently-used items.","version":"8.0.5","author":"Isaac Z. Schlueter <i@izs.me>","keywords":["mru","lru","cache"],"sideEffects":false,"scripts":{"build":"npm run prepare","preprepare":"rm -rf dist","prepare":"tsc -p tsconfig.json && tsc -p tsconfig-esm.json","postprepare":"bash fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"c8 tap","snap":"c8 tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig tsconfig-esm.json ./src/*.ts","benchmark-results-typedoc":"bash scripts/benchmark-results-typedoc.sh","prebenchmark":"npm run prepare","benchmark":"make -C benchmark","preprofile":"npm run prepare","profile":"make -C benchmark profile"},"main":"./dist/cjs/index-cjs.js","module":"./dist/mjs/index.js","types":"./dist/mjs/index.d.ts","exports":{"./min":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.min.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.min.js"}},".":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index-cjs.js"}}},"repository":"git://github.com/isaacs/node-lru-cache.git","devDependencies":{"@size-limit/preset-small-lib":"^7.0.8","@types/node":"^17.0.31","@types/tap":"^15.0.6","benchmark":"^2.1.4","c8":"^7.11.2","clock-mock":"^1.0.6","esbuild":"^0.17.11","eslint-config-prettier":"^8.5.0","marked":"^4.2.12","mkdirp":"^2.1.5","prettier":"^2.6.2","size-limit":"^7.0.8","tap":"^16.3.4","ts-node":"^10.7.0","tslib":"^2.4.0","typedoc":"^0.23.24","typescript":"^4.6.4"},"license":"ISC","files":["dist"],"engines":{"node":">=16.14"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tap":{"coverage":false,"node-arg":["--expose-gc","--no-warnings","--loader","ts-node/esm"],"ts":false},"size-limit":[{"path":"./dist/mjs/index.js"}],"_lastModified":"2024-11-
|
|
1
|
+
{"name":"lru-cache","description":"A cache object that deletes the least-recently-used items.","version":"8.0.5","author":"Isaac Z. Schlueter <i@izs.me>","keywords":["mru","lru","cache"],"sideEffects":false,"scripts":{"build":"npm run prepare","preprepare":"rm -rf dist","prepare":"tsc -p tsconfig.json && tsc -p tsconfig-esm.json","postprepare":"bash fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"c8 tap","snap":"c8 tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig tsconfig-esm.json ./src/*.ts","benchmark-results-typedoc":"bash scripts/benchmark-results-typedoc.sh","prebenchmark":"npm run prepare","benchmark":"make -C benchmark","preprofile":"npm run prepare","profile":"make -C benchmark profile"},"main":"./dist/cjs/index-cjs.js","module":"./dist/mjs/index.js","types":"./dist/mjs/index.d.ts","exports":{"./min":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.min.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.min.js"}},".":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index-cjs.js"}}},"repository":"git://github.com/isaacs/node-lru-cache.git","devDependencies":{"@size-limit/preset-small-lib":"^7.0.8","@types/node":"^17.0.31","@types/tap":"^15.0.6","benchmark":"^2.1.4","c8":"^7.11.2","clock-mock":"^1.0.6","esbuild":"^0.17.11","eslint-config-prettier":"^8.5.0","marked":"^4.2.12","mkdirp":"^2.1.5","prettier":"^2.6.2","size-limit":"^7.0.8","tap":"^16.3.4","ts-node":"^10.7.0","tslib":"^2.4.0","typedoc":"^0.23.24","typescript":"^4.6.4"},"license":"ISC","files":["dist"],"engines":{"node":">=16.14"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tap":{"coverage":false,"node-arg":["--expose-gc","--no-warnings","--loader","ts-node/esm"],"ts":false},"size-limit":[{"path":"./dist/mjs/index.js"}],"_lastModified":"2024-11-11T02:37:24.517Z"}
|
package/package.json
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
"displayName.zh-CN": "工作流",
|
|
5
5
|
"description": "A powerful BPM tool that provides foundational support for business automation, with the capability to extend unlimited triggers and nodes.",
|
|
6
6
|
"description.zh-CN": "一个强大的 BPM 工具,为业务自动化提供基础支持,并且可任意扩展更多的触发器和节点。",
|
|
7
|
-
"version": "1.4.0-alpha.
|
|
7
|
+
"version": "1.4.0-alpha.7",
|
|
8
8
|
"license": "AGPL-3.0",
|
|
9
9
|
"main": "./dist/server/index.js",
|
|
10
10
|
"homepage": "https://docs.nocobase.com/handbook/workflow",
|
|
11
11
|
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/workflow",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@nocobase/plugin-workflow-test": "1.4.0-alpha.
|
|
13
|
+
"@nocobase/plugin-workflow-test": "1.4.0-alpha.7"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@ant-design/icons": "5.x",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@nocobase/test": "1.x",
|
|
45
45
|
"@nocobase/utils": "1.x"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "52bb98fe5fd95cc25baeaaef5aeae9cdd1a0e2fa",
|
|
48
48
|
"keywords": [
|
|
49
49
|
"Workflow"
|
|
50
50
|
]
|