@nocobase/plugin-workflow 0.17.0-alpha.2 → 0.17.0-alpha.4
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/dist/client/WorkflowPane.d.ts +2 -0
- package/dist/client/components/index.d.ts +5 -0
- package/dist/client/hooks/useTriggerWorkflowActionProps.d.ts +3 -0
- package/dist/client/index.d.ts +14 -6
- package/dist/client/index.js +136 -186
- package/dist/client/nodes/calculation.d.ts +8 -62
- package/dist/client/nodes/condition.d.ts +9 -9
- package/dist/client/nodes/create.d.ts +3 -5
- package/dist/client/nodes/destroy.d.ts +3 -4
- package/dist/client/nodes/index.d.ts +2 -6
- package/dist/client/nodes/query.d.ts +3 -5
- package/dist/client/nodes/update.d.ts +4 -4
- package/dist/client/triggers/collection.d.ts +3 -4
- package/dist/client/triggers/index.d.ts +2 -11
- package/dist/client/triggers/schedule/index.d.ts +3 -4
- package/dist/client/utils.d.ts +1 -0
- package/dist/externalVersion.js +11 -13
- package/dist/locale/{en-US.js → en-US.json} +41 -94
- package/dist/locale/es-ES.json +98 -0
- package/dist/locale/fr-FR.json +98 -0
- package/dist/locale/ja-JP.json +82 -0
- package/dist/locale/pt-BR.json +98 -0
- package/dist/locale/ru-RU.json +82 -0
- package/dist/locale/tr-TR.json +82 -0
- package/dist/locale/zh-CN.json +176 -0
- package/dist/node_modules/cron-parser/package.json +1 -1
- package/dist/node_modules/lru-cache/package.json +1 -1
- package/dist/server/Plugin.d.ts +12 -2
- package/dist/server/Plugin.js +31 -7
- package/dist/server/Processor.d.ts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +2 -0
- package/dist/server/instructions/CalculationInstruction.d.ts +15 -0
- package/dist/server/instructions/{calculation.js → CalculationInstruction.js} +13 -6
- package/dist/server/instructions/ConditionInstruction.d.ts +19 -0
- package/dist/server/instructions/{condition.js → ConditionInstruction.js} +11 -7
- package/dist/server/instructions/CreateInstruction.d.ts +10 -0
- package/dist/server/instructions/{create.js → CreateInstruction.js} +13 -6
- package/dist/server/instructions/DestroyInstruction.d.ts +10 -0
- package/dist/server/instructions/{destroy.js → DestroyInstruction.js} +13 -6
- package/dist/server/instructions/{update.d.ts → QueryInstruction.d.ts} +5 -4
- package/dist/server/instructions/{query.js → QueryInstruction.js} +13 -6
- package/dist/server/instructions/{aggregate.d.ts → UpdateInstruction.d.ts} +5 -4
- package/dist/server/instructions/{update.js → UpdateInstruction.js} +13 -6
- package/dist/server/instructions/index.d.ts +10 -14
- package/dist/server/instructions/index.js +9 -39
- package/dist/server/migrations/20231122143143-split-to-plugins.d.ts +4 -0
- package/dist/server/migrations/20231122143143-split-to-plugins.js +87 -0
- package/dist/server/triggers/{collection.d.ts → CollectionTrigger.d.ts} +1 -1
- package/dist/server/triggers/{collection.js → CollectionTrigger.js} +15 -5
- package/dist/server/triggers/{schedule.d.ts → ScheduleTrigger.d.ts} +2 -1
- package/dist/server/triggers/{schedule.js → ScheduleTrigger.js} +5 -5
- package/dist/server/triggers/index.d.ts +2 -6
- package/dist/server/triggers/index.js +1 -21
- package/package.json +3 -2
- package/dist/client/WorkflowProvider.d.ts +0 -5
- package/dist/client/components/Duration.d.ts +0 -5
- package/dist/client/components/DynamicExpression.d.ts +0 -6
- package/dist/client/components/NullRender.d.ts +0 -1
- package/dist/client/interfaces/expression.d.ts +0 -3
- package/dist/client/nodes/aggregate.d.ts +0 -196
- package/dist/client/nodes/delay.d.ts +0 -35
- package/dist/client/nodes/loop.d.ts +0 -33
- package/dist/client/nodes/manual/AssigneesSelect.d.ts +0 -6
- package/dist/client/nodes/manual/DetailsBlockProvider.d.ts +0 -2
- package/dist/client/nodes/manual/FormBlockInitializer.d.ts +0 -2
- package/dist/client/nodes/manual/FormBlockProvider.d.ts +0 -2
- package/dist/client/nodes/manual/ModeConfig.d.ts +0 -5
- package/dist/client/nodes/manual/SchemaConfig.d.ts +0 -49
- package/dist/client/nodes/manual/WorkflowTodo.d.ts +0 -5
- package/dist/client/nodes/manual/WorkflowTodoBlockInitializer.d.ts +0 -2
- package/dist/client/nodes/manual/forms/create.d.ts +0 -3
- package/dist/client/nodes/manual/forms/custom.d.ts +0 -5
- package/dist/client/nodes/manual/forms/update.d.ts +0 -3
- package/dist/client/nodes/manual/index.d.ts +0 -86
- package/dist/client/nodes/manual/utils.d.ts +0 -2
- package/dist/client/nodes/parallel.d.ts +0 -32
- package/dist/client/nodes/request.d.ts +0 -183
- package/dist/client/nodes/sql.d.ts +0 -35
- package/dist/client/triggers/form.d.ts +0 -52
- package/dist/locale/en-US.d.ts +0 -130
- package/dist/locale/es-ES.d.ts +0 -130
- package/dist/locale/es-ES.js +0 -151
- package/dist/locale/fr-FR.d.ts +0 -130
- package/dist/locale/fr-FR.js +0 -151
- package/dist/locale/ja-JP.d.ts +0 -88
- package/dist/locale/ja-JP.js +0 -109
- package/dist/locale/pt-BR.d.ts +0 -130
- package/dist/locale/pt-BR.js +0 -151
- package/dist/locale/ru-RU.d.ts +0 -88
- package/dist/locale/ru-RU.js +0 -109
- package/dist/locale/tr-TR.d.ts +0 -88
- package/dist/locale/tr-TR.js +0 -109
- package/dist/locale/zh-CN.d.ts +0 -249
- package/dist/locale/zh-CN.js +0 -270
- package/dist/server/fields/expression-field.d.ts +0 -7
- package/dist/server/fields/expression-field.js +0 -32
- package/dist/server/fields/index.d.ts +0 -1
- package/dist/server/fields/index.js +0 -28
- package/dist/server/instructions/aggregate.js +0 -54
- package/dist/server/instructions/calculation.d.ts +0 -3
- package/dist/server/instructions/condition.d.ts +0 -6
- package/dist/server/instructions/create.d.ts +0 -8
- package/dist/server/instructions/delay.d.ts +0 -15
- package/dist/server/instructions/delay.js +0 -104
- package/dist/server/instructions/destroy.d.ts +0 -8
- package/dist/server/instructions/loop.d.ts +0 -15
- package/dist/server/instructions/loop.js +0 -94
- package/dist/server/instructions/manual/actions.d.ts +0 -2
- package/dist/server/instructions/manual/actions.js +0 -94
- package/dist/server/instructions/manual/collecions/jobs.d.ts +0 -19
- package/dist/server/instructions/manual/collecions/jobs.js +0 -39
- package/dist/server/instructions/manual/collecions/users.d.ts +0 -15
- package/dist/server/instructions/manual/collecions/users.js +0 -37
- package/dist/server/instructions/manual/collecions/users_jobs.d.ts +0 -3
- package/dist/server/instructions/manual/collecions/users_jobs.js +0 -70
- package/dist/server/instructions/manual/forms/create.d.ts +0 -5
- package/dist/server/instructions/manual/forms/create.js +0 -41
- package/dist/server/instructions/manual/forms/index.d.ts +0 -6
- package/dist/server/instructions/manual/forms/index.js +0 -38
- package/dist/server/instructions/manual/forms/update.d.ts +0 -6
- package/dist/server/instructions/manual/forms/update.js +0 -41
- package/dist/server/instructions/manual/index.d.ts +0 -29
- package/dist/server/instructions/manual/index.js +0 -179
- package/dist/server/instructions/parallel.d.ts +0 -12
- package/dist/server/instructions/parallel.js +0 -124
- package/dist/server/instructions/query.d.ts +0 -9
- package/dist/server/instructions/request.d.ts +0 -18
- package/dist/server/instructions/request.js +0 -92
- package/dist/server/instructions/sql.d.ts +0 -12
- package/dist/server/instructions/sql.js +0 -43
- package/dist/server/triggers/form.d.ts +0 -11
- package/dist/server/triggers/form.js +0 -116
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
7
|
var __export = (target, all) => {
|
|
6
8
|
for (var name in all)
|
|
@@ -14,13 +16,21 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
14
16
|
}
|
|
15
17
|
return to;
|
|
16
18
|
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
17
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var
|
|
19
|
-
__export(
|
|
28
|
+
var CollectionTrigger_exports = {};
|
|
29
|
+
__export(CollectionTrigger_exports, {
|
|
20
30
|
default: () => CollectionTrigger
|
|
21
31
|
});
|
|
22
|
-
module.exports = __toCommonJS(
|
|
23
|
-
var import__ = require("
|
|
32
|
+
module.exports = __toCommonJS(CollectionTrigger_exports);
|
|
33
|
+
var import__ = __toESM(require("."));
|
|
24
34
|
var import_utils = require("../utils");
|
|
25
35
|
const MODE_BITMAP = {
|
|
26
36
|
CREATE: 1,
|
|
@@ -84,7 +94,7 @@ async function handler(workflow, data, options) {
|
|
|
84
94
|
}
|
|
85
95
|
);
|
|
86
96
|
}
|
|
87
|
-
class CollectionTrigger extends import__.
|
|
97
|
+
class CollectionTrigger extends import__.default {
|
|
88
98
|
events = /* @__PURE__ */ new Map();
|
|
89
99
|
on(workflow) {
|
|
90
100
|
const { db } = this.plugin.app;
|
|
@@ -25,15 +25,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
25
|
mod
|
|
26
26
|
));
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
-
var
|
|
29
|
-
__export(
|
|
28
|
+
var ScheduleTrigger_exports = {};
|
|
29
|
+
__export(ScheduleTrigger_exports, {
|
|
30
30
|
SCHEDULE_MODE: () => SCHEDULE_MODE,
|
|
31
31
|
default: () => ScheduleTrigger
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(ScheduleTrigger_exports);
|
|
34
34
|
var import_database = require("@nocobase/database");
|
|
35
35
|
var import_cron_parser = __toESM(require("cron-parser"));
|
|
36
|
-
var import__ = require("
|
|
36
|
+
var import__ = __toESM(require("."));
|
|
37
37
|
const SCHEDULE_MODE = {
|
|
38
38
|
CONSTANT: 0,
|
|
39
39
|
COLLECTION_FIELD: 1
|
|
@@ -332,7 +332,7 @@ function matchNext(workflow, now, range = this.cacheCycle) {
|
|
|
332
332
|
}
|
|
333
333
|
return false;
|
|
334
334
|
}
|
|
335
|
-
class ScheduleTrigger extends import__.
|
|
335
|
+
class ScheduleTrigger extends import__.default {
|
|
336
336
|
static CacheRules = [
|
|
337
337
|
({ config, allExecuted }) => (config.limit ? allExecuted < config.limit : true) && config.startsOn,
|
|
338
338
|
matchNext,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Transactionable } from '@nocobase/database';
|
|
2
|
-
import Plugin from '
|
|
2
|
+
import type Plugin from '../Plugin';
|
|
3
3
|
import type { WorkflowModel } from '../types';
|
|
4
4
|
export declare abstract class Trigger {
|
|
5
5
|
readonly plugin: Plugin;
|
|
@@ -8,8 +8,4 @@ export declare abstract class Trigger {
|
|
|
8
8
|
abstract off(workflow: WorkflowModel): void;
|
|
9
9
|
duplicateConfig?(workflow: WorkflowModel, options: Transactionable): object | Promise<object>;
|
|
10
10
|
}
|
|
11
|
-
export default
|
|
12
|
-
[key: string]: {
|
|
13
|
-
new (p: Plugin): T;
|
|
14
|
-
};
|
|
15
|
-
}): void;
|
|
11
|
+
export default Trigger;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
5
|
var __export = (target, all) => {
|
|
8
6
|
for (var name in all)
|
|
@@ -16,14 +14,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
14
|
}
|
|
17
15
|
return to;
|
|
18
16
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
18
|
var triggers_exports = {};
|
|
29
19
|
__export(triggers_exports, {
|
|
@@ -31,22 +21,12 @@ __export(triggers_exports, {
|
|
|
31
21
|
default: () => triggers_default
|
|
32
22
|
});
|
|
33
23
|
module.exports = __toCommonJS(triggers_exports);
|
|
34
|
-
var import_path = __toESM(require("path"));
|
|
35
|
-
var import_utils = require("@nocobase/utils");
|
|
36
24
|
class Trigger {
|
|
37
25
|
constructor(plugin) {
|
|
38
26
|
this.plugin = plugin;
|
|
39
27
|
}
|
|
40
28
|
}
|
|
41
|
-
|
|
42
|
-
const { triggers } = plugin;
|
|
43
|
-
triggers.register("collection", new ((0, import_utils.requireModule)(import_path.default.join(__dirname, "collection")))(plugin));
|
|
44
|
-
triggers.register("form", new ((0, import_utils.requireModule)(import_path.default.join(__dirname, "form")))(plugin));
|
|
45
|
-
triggers.register("schedule", new ((0, import_utils.requireModule)(import_path.default.join(__dirname, "schedule")))(plugin));
|
|
46
|
-
for (const [name, TClass] of Object.entries(more)) {
|
|
47
|
-
triggers.register(name, new TClass(plugin));
|
|
48
|
-
}
|
|
49
|
-
}
|
|
29
|
+
var triggers_default = Trigger;
|
|
50
30
|
// Annotate the CommonJS export names for ESM import in node:
|
|
51
31
|
0 && (module.exports = {
|
|
52
32
|
Trigger
|
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.17.0-alpha.
|
|
7
|
+
"version": "0.17.0-alpha.4",
|
|
8
8
|
"license": "AGPL-3.0",
|
|
9
9
|
"main": "./dist/server/index.js",
|
|
10
10
|
"devDependencies": {
|
|
@@ -36,10 +36,11 @@
|
|
|
36
36
|
"@nocobase/plugin-collection-manager": "0.x",
|
|
37
37
|
"@nocobase/plugin-error-handler": "0.x",
|
|
38
38
|
"@nocobase/plugin-users": "0.x",
|
|
39
|
+
"@nocobase/plugin-workflow-test": ">=0.17.0-alpha.3",
|
|
39
40
|
"@nocobase/resourcer": "0.x",
|
|
40
41
|
"@nocobase/server": "0.x",
|
|
41
42
|
"@nocobase/test": "0.x",
|
|
42
43
|
"@nocobase/utils": "0.x"
|
|
43
44
|
},
|
|
44
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "663b03a3799a70ba1a2bc6a0d686e679331a50ad"
|
|
45
46
|
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare const WorkflowContext: React.Context<{}>;
|
|
3
|
-
export declare function useWorkflowContext(): {};
|
|
4
|
-
export declare function WorkflowPane(): React.JSX.Element;
|
|
5
|
-
export declare const WorkflowProvider: (props: any) => React.JSX.Element;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare const DynamicExpression: React.ForwardRefExoticComponent<Omit<Partial<Omit<{
|
|
3
|
-
children?: React.ReactNode;
|
|
4
|
-
}, string | number | symbol> & Omit<any, "ref"> & {
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
}>, "ref"> & React.RefAttributes<unknown>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function NullRender(): any;
|
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SchemaInitializerItemType, useCollectionDataSource } from '@nocobase/client';
|
|
3
|
-
import { FilterDynamicComponent } from '../components/FilterDynamicComponent';
|
|
4
|
-
declare function AssociatedConfig({ value, onChange, ...props }: {
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
value: any;
|
|
7
|
-
onChange: any;
|
|
8
|
-
}): JSX.Element;
|
|
9
|
-
declare const _default: {
|
|
10
|
-
title: string;
|
|
11
|
-
type: string;
|
|
12
|
-
group: string;
|
|
13
|
-
description: string;
|
|
14
|
-
fieldset: {
|
|
15
|
-
aggregator: {
|
|
16
|
-
type: string;
|
|
17
|
-
title: string;
|
|
18
|
-
'x-decorator': string;
|
|
19
|
-
'x-component': string;
|
|
20
|
-
enum: {
|
|
21
|
-
label: string;
|
|
22
|
-
value: string;
|
|
23
|
-
}[];
|
|
24
|
-
required: boolean;
|
|
25
|
-
default: string;
|
|
26
|
-
};
|
|
27
|
-
associated: {
|
|
28
|
-
type: string;
|
|
29
|
-
title: string;
|
|
30
|
-
'x-decorator': string;
|
|
31
|
-
'x-component': string;
|
|
32
|
-
enum: {
|
|
33
|
-
label: string;
|
|
34
|
-
value: boolean;
|
|
35
|
-
}[];
|
|
36
|
-
required: boolean;
|
|
37
|
-
default: boolean;
|
|
38
|
-
'x-reactions': {
|
|
39
|
-
target: string;
|
|
40
|
-
effects: string[];
|
|
41
|
-
fulfill: {
|
|
42
|
-
state: {
|
|
43
|
-
value: any;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
}[];
|
|
47
|
-
};
|
|
48
|
-
collectionField: {
|
|
49
|
-
type: string;
|
|
50
|
-
'x-decorator': string;
|
|
51
|
-
'x-decorator-props': {
|
|
52
|
-
value: {
|
|
53
|
-
designable: boolean;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
'x-component': string;
|
|
57
|
-
properties: {
|
|
58
|
-
row: {
|
|
59
|
-
type: string;
|
|
60
|
-
'x-component': string;
|
|
61
|
-
properties: {
|
|
62
|
-
target: {
|
|
63
|
-
type: string;
|
|
64
|
-
'x-component': string;
|
|
65
|
-
properties: {
|
|
66
|
-
collection: {
|
|
67
|
-
title: string;
|
|
68
|
-
'x-component-props': {
|
|
69
|
-
className: any;
|
|
70
|
-
};
|
|
71
|
-
'x-reactions': any[];
|
|
72
|
-
type: string;
|
|
73
|
-
required: boolean;
|
|
74
|
-
'x-decorator': string;
|
|
75
|
-
'x-component': string;
|
|
76
|
-
};
|
|
77
|
-
association: {
|
|
78
|
-
type: string;
|
|
79
|
-
title: string;
|
|
80
|
-
'x-decorator': string;
|
|
81
|
-
'x-component': string;
|
|
82
|
-
'x-component-props': {
|
|
83
|
-
changeOnSelect: boolean;
|
|
84
|
-
};
|
|
85
|
-
'x-reactions': {
|
|
86
|
-
dependencies: string[];
|
|
87
|
-
fulfill: {
|
|
88
|
-
state: {
|
|
89
|
-
visible: string;
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
}[];
|
|
93
|
-
required: boolean;
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
field: {
|
|
98
|
-
type: string;
|
|
99
|
-
'x-component': string;
|
|
100
|
-
properties: {
|
|
101
|
-
'params.field': {
|
|
102
|
-
type: string;
|
|
103
|
-
title: string;
|
|
104
|
-
'x-decorator': string;
|
|
105
|
-
'x-component': string;
|
|
106
|
-
'x-component-props': {
|
|
107
|
-
filter(field: any): boolean;
|
|
108
|
-
};
|
|
109
|
-
required: boolean;
|
|
110
|
-
'x-reactions': {
|
|
111
|
-
dependencies: string[];
|
|
112
|
-
fulfill: {
|
|
113
|
-
state: {
|
|
114
|
-
visible: string;
|
|
115
|
-
};
|
|
116
|
-
};
|
|
117
|
-
}[];
|
|
118
|
-
};
|
|
119
|
-
};
|
|
120
|
-
};
|
|
121
|
-
};
|
|
122
|
-
};
|
|
123
|
-
};
|
|
124
|
-
};
|
|
125
|
-
params: {
|
|
126
|
-
type: string;
|
|
127
|
-
properties: {
|
|
128
|
-
distinct: {
|
|
129
|
-
type: string;
|
|
130
|
-
title: string;
|
|
131
|
-
'x-decorator': string;
|
|
132
|
-
'x-component': string;
|
|
133
|
-
'x-reactions': {
|
|
134
|
-
dependencies: string[];
|
|
135
|
-
fulfill: {
|
|
136
|
-
state: {
|
|
137
|
-
visible: string;
|
|
138
|
-
};
|
|
139
|
-
};
|
|
140
|
-
}[];
|
|
141
|
-
};
|
|
142
|
-
filter: {
|
|
143
|
-
'x-reactions': {
|
|
144
|
-
dependencies: string[];
|
|
145
|
-
fulfill: {
|
|
146
|
-
state: {
|
|
147
|
-
visible: string;
|
|
148
|
-
};
|
|
149
|
-
};
|
|
150
|
-
}[];
|
|
151
|
-
type: string;
|
|
152
|
-
title: string;
|
|
153
|
-
'x-decorator': string;
|
|
154
|
-
'x-component': string;
|
|
155
|
-
'x-component-props': {
|
|
156
|
-
useProps(): {
|
|
157
|
-
options: any[];
|
|
158
|
-
className: string;
|
|
159
|
-
};
|
|
160
|
-
dynamicComponent: string;
|
|
161
|
-
};
|
|
162
|
-
};
|
|
163
|
-
};
|
|
164
|
-
};
|
|
165
|
-
};
|
|
166
|
-
view: {};
|
|
167
|
-
scope: {
|
|
168
|
-
useCollectionDataSource: typeof useCollectionDataSource;
|
|
169
|
-
};
|
|
170
|
-
components: {
|
|
171
|
-
SchemaComponentContext: React.Context<import("@nocobase/client").ISchemaComponentContext>;
|
|
172
|
-
FilterDynamicComponent: typeof FilterDynamicComponent;
|
|
173
|
-
FieldsSelect: React.MemoExoticComponent<import("@formily/react").ReactFC<Omit<any, "ref">>>;
|
|
174
|
-
ValueBlock: (() => JSX.Element) & {
|
|
175
|
-
Initializer: () => JSX.Element;
|
|
176
|
-
Result: (props: any) => JSX.Element;
|
|
177
|
-
};
|
|
178
|
-
AssociatedConfig: typeof AssociatedConfig;
|
|
179
|
-
};
|
|
180
|
-
useVariables({ key, title }: {
|
|
181
|
-
key: any;
|
|
182
|
-
title: any;
|
|
183
|
-
}, { types, fieldNames }: {
|
|
184
|
-
types: any;
|
|
185
|
-
fieldNames?: {
|
|
186
|
-
readonly label: "label";
|
|
187
|
-
readonly value: "value";
|
|
188
|
-
readonly children: "children";
|
|
189
|
-
};
|
|
190
|
-
}): {
|
|
191
|
-
value: any;
|
|
192
|
-
label: any;
|
|
193
|
-
};
|
|
194
|
-
useInitializers(node: any): SchemaInitializerItemType | null;
|
|
195
|
-
};
|
|
196
|
-
export default _default;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import Duration from '../components/Duration';
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
type: string;
|
|
5
|
-
group: string;
|
|
6
|
-
description: string;
|
|
7
|
-
fieldset: {
|
|
8
|
-
duration: {
|
|
9
|
-
type: string;
|
|
10
|
-
title: string;
|
|
11
|
-
'x-decorator': string;
|
|
12
|
-
'x-component': string;
|
|
13
|
-
default: number;
|
|
14
|
-
required: boolean;
|
|
15
|
-
};
|
|
16
|
-
endStatus: {
|
|
17
|
-
type: string;
|
|
18
|
-
title: string;
|
|
19
|
-
'x-decorator': string;
|
|
20
|
-
'x-component': string;
|
|
21
|
-
enum: {
|
|
22
|
-
label: string;
|
|
23
|
-
value: number;
|
|
24
|
-
}[];
|
|
25
|
-
required: boolean;
|
|
26
|
-
default: number;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
view: {};
|
|
30
|
-
scope: {};
|
|
31
|
-
components: {
|
|
32
|
-
Duration: typeof Duration;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
export default _default;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { VariableOption, WorkflowVariableInput } from '../variable';
|
|
3
|
-
declare const _default: {
|
|
4
|
-
title: string;
|
|
5
|
-
type: string;
|
|
6
|
-
group: string;
|
|
7
|
-
description: string;
|
|
8
|
-
fieldset: {
|
|
9
|
-
target: {
|
|
10
|
-
type: string;
|
|
11
|
-
title: string;
|
|
12
|
-
description: string;
|
|
13
|
-
'x-decorator': string;
|
|
14
|
-
'x-component': string;
|
|
15
|
-
'x-component-props': {
|
|
16
|
-
changeOnSelect: boolean;
|
|
17
|
-
useTypedConstant: string[];
|
|
18
|
-
className: string;
|
|
19
|
-
};
|
|
20
|
-
required: boolean;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
view: {};
|
|
24
|
-
component: ({ data }: {
|
|
25
|
-
data: any;
|
|
26
|
-
}) => React.JSX.Element;
|
|
27
|
-
scope: {};
|
|
28
|
-
components: {
|
|
29
|
-
WorkflowVariableInput: typeof WorkflowVariableInput;
|
|
30
|
-
};
|
|
31
|
-
useScopeVariables(node: any, options: any): VariableOption[];
|
|
32
|
-
};
|
|
33
|
-
export default _default;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ISchema } from '@formily/react';
|
|
3
|
-
import { SchemaInitializer, SchemaInitializerItemType } from '@nocobase/client';
|
|
4
|
-
import { JOB_STATUS } from '../../constants';
|
|
5
|
-
type ValueOf<T> = T[keyof T];
|
|
6
|
-
export type FormType = {
|
|
7
|
-
type: 'create' | 'update' | 'custom';
|
|
8
|
-
title: string;
|
|
9
|
-
actions: ValueOf<typeof JOB_STATUS>[];
|
|
10
|
-
collection: string | {
|
|
11
|
-
name: string;
|
|
12
|
-
fields: any[];
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export type ManualFormType = {
|
|
17
|
-
title: string;
|
|
18
|
-
config: {
|
|
19
|
-
useInitializer: ({ collections }?: {
|
|
20
|
-
collections: any[];
|
|
21
|
-
}) => SchemaInitializerItemType;
|
|
22
|
-
initializers?: {
|
|
23
|
-
[key: string]: React.FC;
|
|
24
|
-
};
|
|
25
|
-
components?: {
|
|
26
|
-
[key: string]: React.FC;
|
|
27
|
-
};
|
|
28
|
-
parseFormOptions(root: ISchema): {
|
|
29
|
-
[key: string]: FormType;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
block: {
|
|
33
|
-
scope?: {
|
|
34
|
-
[key: string]: () => any;
|
|
35
|
-
};
|
|
36
|
-
components?: {
|
|
37
|
-
[key: string]: React.FC;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
export declare const manualFormTypes: any;
|
|
42
|
-
export declare const addBlockButton: SchemaInitializer<import("antd").ButtonProps, {}>;
|
|
43
|
-
export declare const addActionButton: SchemaInitializer<import("antd").ButtonProps, {}>;
|
|
44
|
-
export declare function SchemaConfig({ value, onChange }: {
|
|
45
|
-
value: any;
|
|
46
|
-
onChange: any;
|
|
47
|
-
}): React.JSX.Element;
|
|
48
|
-
export declare function SchemaConfigButton(props: any): React.JSX.Element;
|
|
49
|
-
export {};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { SchemaInitializerItemType } from '@nocobase/client';
|
|
2
|
-
import { AssigneesSelect } from './AssigneesSelect';
|
|
3
|
-
import { ModeConfig } from './ModeConfig';
|
|
4
|
-
import { SchemaConfig, SchemaConfigButton } from './SchemaConfig';
|
|
5
|
-
declare const _default: {
|
|
6
|
-
title: string;
|
|
7
|
-
type: string;
|
|
8
|
-
group: string;
|
|
9
|
-
description: string;
|
|
10
|
-
fieldset: {
|
|
11
|
-
assignees: {
|
|
12
|
-
type: string;
|
|
13
|
-
title: string;
|
|
14
|
-
'x-decorator': string;
|
|
15
|
-
'x-component': string;
|
|
16
|
-
'x-component-props': {};
|
|
17
|
-
required: boolean;
|
|
18
|
-
default: any[];
|
|
19
|
-
};
|
|
20
|
-
mode: {
|
|
21
|
-
type: string;
|
|
22
|
-
title: string;
|
|
23
|
-
'x-decorator': string;
|
|
24
|
-
'x-component': string;
|
|
25
|
-
default: number;
|
|
26
|
-
'x-reactions': {
|
|
27
|
-
dependencies: string[];
|
|
28
|
-
fulfill: {
|
|
29
|
-
state: {
|
|
30
|
-
visible: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
schema: {
|
|
36
|
-
type: string;
|
|
37
|
-
title: string;
|
|
38
|
-
'x-decorator': string;
|
|
39
|
-
'x-component': string;
|
|
40
|
-
properties: {
|
|
41
|
-
schema: {
|
|
42
|
-
type: string;
|
|
43
|
-
'x-component': string;
|
|
44
|
-
default: any;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
forms: {
|
|
49
|
-
type: string;
|
|
50
|
-
default: {};
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
view: {};
|
|
54
|
-
scope: {};
|
|
55
|
-
components: {
|
|
56
|
-
SchemaConfigButton: typeof SchemaConfigButton;
|
|
57
|
-
SchemaConfig: typeof SchemaConfig;
|
|
58
|
-
ModeConfig: typeof ModeConfig;
|
|
59
|
-
AssigneesSelect: typeof AssigneesSelect;
|
|
60
|
-
};
|
|
61
|
-
useVariables({ key, title, config }: {
|
|
62
|
-
key: any;
|
|
63
|
-
title: any;
|
|
64
|
-
config: any;
|
|
65
|
-
}, { types, fieldNames }: {
|
|
66
|
-
types: any;
|
|
67
|
-
fieldNames?: {
|
|
68
|
-
readonly label: "label";
|
|
69
|
-
readonly value: "value";
|
|
70
|
-
readonly children: "children";
|
|
71
|
-
};
|
|
72
|
-
}): {
|
|
73
|
-
value: any;
|
|
74
|
-
label: any;
|
|
75
|
-
children: {
|
|
76
|
-
key: string;
|
|
77
|
-
value: string;
|
|
78
|
-
label: any;
|
|
79
|
-
title: any;
|
|
80
|
-
children: import("../../variable").VariableOption[];
|
|
81
|
-
}[];
|
|
82
|
-
};
|
|
83
|
-
useInitializers(node: any): SchemaInitializerItemType | null;
|
|
84
|
-
initializers: {};
|
|
85
|
-
};
|
|
86
|
-
export default _default;
|