@nocobase/plugin-workflow 0.14.0-alpha.8 → 0.15.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.
@@ -1,6 +1,7 @@
1
1
  import { SchemaInitializerItemOptions } from '@nocobase/client';
2
2
  import React from 'react';
3
3
  import { RadioWithTooltip } from '../components/RadioWithTooltip';
4
+ import { WorkflowVariableInput, WorkflowVariableTextArea } from '../variable';
4
5
  declare const _default: {
5
6
  title: string;
6
7
  type: string;
@@ -36,6 +37,9 @@ declare const _default: {
36
37
  title: string;
37
38
  'x-decorator': string;
38
39
  'x-component': string;
40
+ 'x-component-props': {
41
+ changeOnSelect: boolean;
42
+ };
39
43
  "x-validator"(value: any, rules: any, { form }: {
40
44
  form: any;
41
45
  }): string;
@@ -65,6 +69,15 @@ declare const _default: {
65
69
  'x-component': string;
66
70
  'x-component-props': {
67
71
  changeOnSelect: boolean;
72
+ variableOptions: {
73
+ types: {
74
+ type: string;
75
+ options: {
76
+ collection: string;
77
+ entity: boolean;
78
+ };
79
+ }[];
80
+ };
68
81
  };
69
82
  'x-reactions': {
70
83
  dependencies: string[];
@@ -81,8 +94,8 @@ declare const _default: {
81
94
  renderEngineReference: (key: string) => React.JSX.Element;
82
95
  };
83
96
  components: {
84
- CalculationExpression(props: any): React.JSX.Element;
85
- ScopeSelect(props: any): React.JSX.Element;
97
+ WorkflowVariableInput: typeof WorkflowVariableInput;
98
+ WorkflowVariableTextArea: typeof WorkflowVariableTextArea;
86
99
  RadioWithTooltip: typeof RadioWithTooltip;
87
100
  DynamicConfig: ({ value, onChange }: {
88
101
  value: any;
@@ -1,6 +1,6 @@
1
+ import React from 'react';
1
2
  import { ISchema } from '@formily/react';
2
3
  import { SchemaInitializerItemOptions } from '@nocobase/client';
3
- import React from 'react';
4
4
  import { VariableOption, VariableOptions } from '../variable';
5
5
  export interface Instruction {
6
6
  title: string;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { VariableOption, useWorkflowVariableOptions } from '../variable';
2
+ import { VariableOption, WorkflowVariableInput } from '../variable';
3
3
  declare const _default: {
4
4
  title: string;
5
5
  type: string;
@@ -13,7 +13,6 @@ declare const _default: {
13
13
  'x-decorator': string;
14
14
  'x-component': string;
15
15
  'x-component-props': {
16
- scope: string;
17
16
  changeOnSelect: boolean;
18
17
  useTypedConstant: string[];
19
18
  className: string;
@@ -25,10 +24,10 @@ declare const _default: {
25
24
  component: ({ data }: {
26
25
  data: any;
27
26
  }) => React.JSX.Element;
28
- scope: {
29
- useWorkflowVariableOptions: typeof useWorkflowVariableOptions;
27
+ scope: {};
28
+ components: {
29
+ WorkflowVariableInput: typeof WorkflowVariableInput;
30
30
  };
31
- components: {};
32
31
  useScopeVariables(node: any, options: any): VariableOption[];
33
32
  };
34
33
  export default _default;
@@ -1,5 +1,5 @@
1
- import { ISchema } from '@formily/react';
2
1
  import React from 'react';
2
+ import { ISchema } from '@formily/react';
3
3
  import { SchemaInitializerItemOptions } from '@nocobase/client';
4
4
  import { JOB_STATUS } from '../../constants';
5
5
  type ValueOf<T> = T[keyof T];
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { SchemaInitializerItemOptions, useCollectionDataSource } from '@nocobase/client';
3
3
  import { FilterDynamicComponent } from '../components/FilterDynamicComponent';
4
- import { useWorkflowVariableOptions } from '../variable';
4
+ import { WorkflowVariableInput } from '../variable';
5
5
  declare const _default: {
6
6
  title: string;
7
7
  type: string;
@@ -126,7 +126,6 @@ declare const _default: {
126
126
  'x-decorator': string;
127
127
  'x-component': string;
128
128
  'x-component-props': {
129
- scope: string;
130
129
  useTypedConstant: string[];
131
130
  };
132
131
  default: number;
@@ -194,7 +193,6 @@ declare const _default: {
194
193
  view: {};
195
194
  scope: {
196
195
  useCollectionDataSource: typeof useCollectionDataSource;
197
- useWorkflowVariableOptions: typeof useWorkflowVariableOptions;
198
196
  useSortableFields(): {
199
197
  value: any;
200
198
  label: any;
@@ -208,6 +206,7 @@ declare const _default: {
208
206
  };
209
207
  FilterDynamicComponent: typeof FilterDynamicComponent;
210
208
  SchemaComponentContext: import("react").Context<import("@nocobase/client").ISchemaComponentContext>;
209
+ WorkflowVariableInput: typeof WorkflowVariableInput;
211
210
  };
212
211
  useVariables({ key: name, title, config }: {
213
212
  key: any;
@@ -1,5 +1,4 @@
1
- import React from 'react';
2
- import { useWorkflowVariableOptions } from '../variable';
1
+ import { WorkflowVariableInput, WorkflowVariableJSON } from '../variable';
3
2
  declare const _default: {
4
3
  title: string;
5
4
  type: string;
@@ -60,7 +59,6 @@ declare const _default: {
60
59
  'x-decorator': string;
61
60
  'x-component': string;
62
61
  'x-component-props': {
63
- scope: string;
64
62
  useTypedConstant: boolean;
65
63
  };
66
64
  };
@@ -106,7 +104,6 @@ declare const _default: {
106
104
  'x-decorator': string;
107
105
  'x-component': string;
108
106
  'x-component-props': {
109
- scope: string;
110
107
  useTypedConstant: boolean;
111
108
  };
112
109
  };
@@ -163,16 +160,24 @@ declare const _default: {
163
160
  };
164
161
  };
165
162
  view: {};
166
- scope: {
167
- useWorkflowVariableOptions: typeof useWorkflowVariableOptions;
168
- };
163
+ scope: {};
169
164
  components: {
170
- ArrayItems: import("@formily/reactive-react").ReactFC<React.HTMLAttributes<HTMLDivElement>> & import("@formily/antd-v5").ArrayBaseMixins & {
171
- Item: import("@formily/reactive-react").ReactFC<React.HTMLAttributes<HTMLDivElement> & {
165
+ ArrayItems: import("@formily/reactive-react").ReactFC<import("react").HTMLAttributes<HTMLDivElement>> & import("@formily/antd-v5").ArrayBaseMixins & {
166
+ Item: import("@formily/reactive-react").ReactFC<import("react").HTMLAttributes<HTMLDivElement> & {
172
167
  type?: "divide" | "card";
173
168
  }>;
174
169
  };
175
- RequestBody(props: any): React.JSX.Element;
170
+ WorkflowVariableInput: typeof WorkflowVariableInput;
171
+ WorkflowVariableJSON: typeof WorkflowVariableJSON;
172
+ };
173
+ useVariables({ key, title }: {
174
+ key: any;
175
+ title: any;
176
+ }, { types, fieldNames }: {
177
+ types: any;
178
+ fieldNames?: import("@nocobase/client").FieldNames;
179
+ }): {
180
+ [x: string]: any;
176
181
  };
177
182
  };
178
183
  export default _default;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { WorkflowVariableRawTextArea } from '../variable';
2
2
  declare const _default: {
3
3
  title: string;
4
4
  type: string;
@@ -20,7 +20,16 @@ declare const _default: {
20
20
  };
21
21
  scope: {};
22
22
  components: {
23
- SQLInput(props: any): React.JSX.Element;
23
+ WorkflowVariableRawTextArea: typeof WorkflowVariableRawTextArea;
24
+ };
25
+ useVariables({ key, title }: {
26
+ key: any;
27
+ title: any;
28
+ }, { types, fieldNames }: {
29
+ types: any;
30
+ fieldNames?: import("@nocobase/client").FieldNames;
31
+ }): {
32
+ [x: string]: any;
24
33
  };
25
34
  };
26
35
  export default _default;
@@ -116,7 +116,6 @@ export declare const pagination: {
116
116
  'x-decorator': string;
117
117
  'x-component': string;
118
118
  'x-component-props': {
119
- scope: string;
120
119
  useTypedConstant: string[];
121
120
  };
122
121
  default: number;
@@ -44,7 +44,7 @@ declare const _default: {
44
44
  useVariables(config: any, options: any): import("../variable").VariableOption[];
45
45
  useInitializers(config: any): SchemaInitializerItemOptions | null;
46
46
  initializers: {};
47
- actionTriggerable: boolean;
47
+ useActionTriggerable: boolean;
48
48
  };
49
49
  export default _default;
50
50
  export declare function useTriggerWorkflowsActionProps(): {
@@ -19,7 +19,7 @@ export interface Trigger {
19
19
  };
20
20
  useInitializers?(config: any): SchemaInitializerItemOptions | null;
21
21
  initializers?: any;
22
- actionTriggerable?: boolean;
22
+ useActionTriggerable?: boolean | (() => boolean);
23
23
  }
24
24
  export declare const triggers: any;
25
25
  export declare const TriggerConfig: () => React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export type VariableOption = {
2
3
  key?: string;
3
4
  value?: string;
@@ -22,6 +23,7 @@ export type OptionsOfUseVariableOptions = {
22
23
  };
23
24
  appends?: string[] | null;
24
25
  depth?: number;
26
+ current?: any;
25
27
  };
26
28
  export declare const defaultFieldNames: {
27
29
  readonly label: "label";
@@ -58,10 +60,24 @@ export declare const BaseTypeSets: {
58
60
  date: Set<string>;
59
61
  };
60
62
  export declare function useWorkflowVariableOptions(options?: OptionsOfUseVariableOptions): {
61
- label: any;
62
- value: any;
63
+ [x: number]: any;
63
64
  key: any;
64
- children: any;
65
65
  disabled: boolean;
66
66
  }[];
67
67
  export declare function getCollectionFieldOptions(options: any): VariableOption[];
68
+ export declare function WorkflowVariableInput({ variableOptions, ...props }: {
69
+ [x: string]: any;
70
+ variableOptions: any;
71
+ }): JSX.Element;
72
+ export declare function WorkflowVariableTextArea({ variableOptions, ...props }: {
73
+ [x: string]: any;
74
+ variableOptions: any;
75
+ }): JSX.Element;
76
+ export declare function WorkflowVariableRawTextArea({ variableOptions, ...props }: {
77
+ [x: string]: any;
78
+ variableOptions: any;
79
+ }): JSX.Element;
80
+ export declare function WorkflowVariableJSON({ variableOptions, ...props }: {
81
+ [x: string]: any;
82
+ variableOptions: any;
83
+ }): JSX.Element;
@@ -1,23 +1,23 @@
1
1
  module.exports = {
2
2
  "@ant-design/icons": "5.1.4",
3
- "@nocobase/client": "0.14.0-alpha.8",
3
+ "@nocobase/client": "0.15.0-alpha.2",
4
4
  "antd": "5.8.6",
5
5
  "react": "18.2.0",
6
- "@nocobase/utils": "0.14.0-alpha.8",
6
+ "@nocobase/utils": "0.15.0-alpha.2",
7
7
  "react-router-dom": "6.14.1",
8
8
  "react-i18next": "11.18.6",
9
9
  "winston": "3.9.0",
10
- "@nocobase/database": "0.14.0-alpha.8",
11
- "@nocobase/server": "0.14.0-alpha.8",
12
- "@nocobase/logger": "0.14.0-alpha.8",
13
- "@nocobase/evaluators": "0.14.0-alpha.8",
10
+ "@nocobase/database": "0.15.0-alpha.2",
11
+ "@nocobase/server": "0.15.0-alpha.2",
12
+ "@nocobase/logger": "0.15.0-alpha.2",
13
+ "@nocobase/evaluators": "0.15.0-alpha.2",
14
14
  "@formily/react": "2.2.27",
15
15
  "@formily/core": "2.2.27",
16
16
  "@formily/antd-v5": "1.1.7",
17
17
  "lodash": "4.17.21",
18
- "@nocobase/actions": "0.14.0-alpha.8",
18
+ "@nocobase/actions": "0.15.0-alpha.2",
19
19
  "axios": "0.26.1",
20
20
  "sequelize": "6.32.1",
21
21
  "dayjs": "1.11.9",
22
- "@nocobase/resourcer": "0.14.0-alpha.8"
22
+ "@nocobase/resourcer": "0.15.0-alpha.2"
23
23
  };
@@ -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":"2023-11-01T02:16:46.199Z"}
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":"2023-11-13T10:38:31.619Z"}
@@ -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":"2023-11-01T02:16:45.638Z"}
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":"2023-11-13T10:38:31.314Z"}
@@ -428,7 +428,7 @@ class ScheduleTrigger extends import__.Trigger {
428
428
  workflows.forEach(async (workflow) => {
429
429
  const should = await this.shouldCache(workflow, now);
430
430
  if (should) {
431
- this.plugin.app.logger.info("caching scheduled workflow will run in next minute:", workflow.id);
431
+ this.plugin.getLogger(workflow.id).info("caching scheduled workflow will run in next minute");
432
432
  }
433
433
  this.setCache(workflow, !should);
434
434
  });
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "工作流",
5
5
  "description": "A powerful workflow plugin designed to support business process management and automation.",
6
6
  "description.zh-CN": "工作流插件,为业务流程管理和自动化提供支持。",
7
- "version": "0.14.0-alpha.8",
7
+ "version": "0.15.0-alpha.2",
8
8
  "license": "AGPL-3.0",
9
9
  "main": "./dist/server/index.js",
10
10
  "devDependencies": {
@@ -41,5 +41,5 @@
41
41
  "@nocobase/test": "0.x",
42
42
  "@nocobase/utils": "0.x"
43
43
  },
44
- "gitHead": "59c82fef6e34707802b5841f5ec4d9b3b6b68abb"
44
+ "gitHead": "2504887cf82935200bf546b28adf2872cab3e452"
45
45
  }