@nocobase/plugin-workflow 0.7.1-alpha.5 → 0.7.2-alpha.1
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.d.ts +4 -0
- package/client.js +30 -0
- package/lib/client/ExecutionResourceProvider.d.ts +4 -0
- package/lib/client/ExecutionResourceProvider.js +64 -0
- package/lib/client/WorkflowCanvas.d.ts +15 -0
- package/lib/client/WorkflowCanvas.js +393 -0
- package/lib/client/WorkflowLink.d.ts +1 -0
- package/lib/client/WorkflowLink.js +66 -0
- package/lib/client/WorkflowPage.d.ts +1 -0
- package/lib/client/WorkflowPage.js +92 -0
- package/lib/client/WorkflowProvider.d.ts +1 -0
- package/lib/client/WorkflowProvider.js +78 -0
- package/lib/client/WorkflowShortcut.d.ts +1 -0
- package/lib/client/WorkflowShortcut.js +123 -0
- package/lib/client/calculators.d.ts +101 -0
- package/lib/client/calculators.js +739 -0
- package/lib/client/components/Duration.d.ts +5 -0
- package/lib/client/components/Duration.js +96 -0
- package/lib/client/index.d.ts +3 -0
- package/lib/client/index.js +38 -0
- package/lib/client/nodes/calculation.d.ts +25 -0
- package/lib/client/nodes/calculation.js +85 -0
- package/lib/client/nodes/condition.d.ts +46 -0
- package/lib/client/nodes/condition.js +346 -0
- package/lib/client/nodes/create.d.ts +46 -0
- package/lib/client/nodes/create.js +133 -0
- package/lib/client/nodes/delay.d.ts +36 -0
- package/lib/client/nodes/delay.js +49 -0
- package/lib/client/nodes/destroy.d.ts +55 -0
- package/lib/client/nodes/destroy.js +46 -0
- package/lib/client/nodes/index.d.ts +33 -0
- package/lib/client/nodes/index.js +390 -0
- package/lib/client/nodes/parallel.d.ts +24 -0
- package/lib/client/nodes/parallel.js +216 -0
- package/lib/client/nodes/query.d.ts +70 -0
- package/lib/client/nodes/query.js +143 -0
- package/lib/client/nodes/update.d.ts +60 -0
- package/lib/client/nodes/update.js +48 -0
- package/lib/client/schemas/collection.d.ts +42 -0
- package/lib/client/schemas/collection.js +98 -0
- package/lib/client/schemas/executions.d.ts +209 -0
- package/lib/client/schemas/executions.js +164 -0
- package/lib/client/schemas/workflows.d.ts +2 -0
- package/lib/client/schemas/workflows.js +328 -0
- package/lib/client/style.d.ts +12 -0
- package/lib/client/style.js +216 -0
- package/lib/client/triggers/collection.d.ts +92 -0
- package/lib/client/triggers/collection.js +253 -0
- package/lib/client/triggers/index.d.ts +26 -0
- package/lib/client/triggers/index.js +238 -0
- package/lib/client/triggers/schedule/DateFieldsSelect.d.ts +2 -0
- package/lib/client/triggers/schedule/DateFieldsSelect.js +92 -0
- package/lib/client/triggers/schedule/EndsByField.d.ts +5 -0
- package/lib/client/triggers/schedule/EndsByField.js +102 -0
- package/lib/client/triggers/schedule/OnField.d.ts +5 -0
- package/lib/client/triggers/schedule/OnField.js +128 -0
- package/lib/client/triggers/schedule/RepeatField.d.ts +5 -0
- package/lib/client/triggers/schedule/RepeatField.js +191 -0
- package/lib/client/triggers/schedule/ScheduleConfig.d.ts +1 -0
- package/lib/client/triggers/schedule/ScheduleConfig.js +286 -0
- package/lib/client/triggers/schedule/index.d.ts +25 -0
- package/lib/client/triggers/schedule/index.js +124 -0
- package/lib/client/triggers/schedule/locale/Cron.zh-CN.d.ts +34 -0
- package/lib/client/triggers/schedule/locale/Cron.zh-CN.js +44 -0
- package/lib/index.d.ts +1 -6
- package/lib/index.js +2 -73
- package/lib/{Plugin.d.ts → server/Plugin.d.ts} +0 -0
- package/lib/{Plugin.js → server/Plugin.js} +0 -0
- package/lib/{Processor.d.ts → server/Processor.d.ts} +4 -3
- package/lib/{Processor.js → server/Processor.js} +40 -24
- package/lib/{actions → server/actions}/index.d.ts +0 -0
- package/lib/{actions → server/actions}/index.js +0 -0
- package/lib/{actions → server/actions}/nodes.d.ts +0 -0
- package/lib/{actions → server/actions}/nodes.js +1 -0
- package/lib/{actions → server/actions}/workflows.d.ts +0 -0
- package/lib/{actions → server/actions}/workflows.js +0 -0
- package/lib/{calculators → server/calculators}/index.d.ts +0 -0
- package/lib/{calculators → server/calculators}/index.js +0 -0
- package/lib/{collections → server/collections}/executions.d.ts +0 -0
- package/lib/{collections → server/collections}/executions.js +0 -0
- package/lib/{collections → server/collections}/flow_nodes.d.ts +0 -0
- package/lib/{collections → server/collections}/flow_nodes.js +0 -0
- package/lib/{collections → server/collections}/jobs.d.ts +0 -0
- package/lib/{collections → server/collections}/jobs.js +0 -0
- package/lib/{collections → server/collections}/workflows.d.ts +0 -0
- package/lib/{collections → server/collections}/workflows.js +0 -0
- package/lib/{constants.d.ts → server/constants.d.ts} +0 -0
- package/lib/{constants.js → server/constants.js} +0 -0
- package/lib/server/index.d.ts +6 -0
- package/lib/server/index.js +86 -0
- package/lib/{instructions → server/instructions}/calculation.d.ts +0 -0
- package/lib/{instructions → server/instructions}/calculation.js +0 -0
- package/lib/{instructions → server/instructions}/condition.d.ts +0 -0
- package/lib/{instructions → server/instructions}/condition.js +0 -0
- package/lib/{instructions → server/instructions}/create.d.ts +0 -0
- package/lib/{instructions → server/instructions}/create.js +0 -0
- package/lib/{instructions → server/instructions}/delay.d.ts +0 -0
- package/lib/{instructions → server/instructions}/delay.js +12 -5
- package/lib/{instructions → server/instructions}/destroy.d.ts +0 -0
- package/lib/{instructions → server/instructions}/destroy.js +0 -0
- package/lib/{instructions → server/instructions}/index.d.ts +0 -0
- package/lib/{instructions → server/instructions}/index.js +0 -0
- package/lib/{instructions → server/instructions}/parallel.d.ts +0 -0
- package/lib/{instructions → server/instructions}/parallel.js +62 -20
- package/lib/{instructions → server/instructions}/prompt.d.ts +0 -0
- package/lib/{instructions → server/instructions}/prompt.js +0 -0
- package/lib/{instructions → server/instructions}/query.d.ts +0 -0
- package/lib/{instructions → server/instructions}/query.js +0 -0
- package/lib/{instructions → server/instructions}/update.d.ts +0 -0
- package/lib/{instructions → server/instructions}/update.js +0 -0
- package/lib/{models → server/models}/Execution.d.ts +0 -0
- package/lib/{models → server/models}/Execution.js +0 -0
- package/lib/{models → server/models}/FlowNode.d.ts +0 -0
- package/lib/{models → server/models}/FlowNode.js +0 -0
- package/lib/{models → server/models}/Job.d.ts +0 -0
- package/lib/{models → server/models}/Job.js +0 -0
- package/lib/{models → server/models}/Workflow.d.ts +0 -0
- package/lib/{models → server/models}/Workflow.js +0 -0
- package/lib/{triggers → server/triggers}/collection.d.ts +0 -0
- package/lib/{triggers → server/triggers}/collection.js +0 -0
- package/lib/{triggers → server/triggers}/index.d.ts +0 -0
- package/lib/{triggers → server/triggers}/index.js +0 -0
- package/lib/{triggers → server/triggers}/schedule.d.ts +0 -0
- package/lib/{triggers → server/triggers}/schedule.js +2 -2
- package/package.json +10 -8
- package/server.d.ts +4 -0
- package/server.js +30 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
function _react() {
|
|
9
|
+
const data = _interopRequireDefault(require("react"));
|
|
10
|
+
|
|
11
|
+
_react = function _react() {
|
|
12
|
+
return data;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function _antd() {
|
|
19
|
+
const data = require("antd");
|
|
20
|
+
|
|
21
|
+
_antd = function _antd() {
|
|
22
|
+
return data;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
return data;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function _reactI18next() {
|
|
29
|
+
const data = require("react-i18next");
|
|
30
|
+
|
|
31
|
+
_reactI18next = function _reactI18next() {
|
|
32
|
+
return data;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return data;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function _client() {
|
|
39
|
+
const data = require("@nocobase/client");
|
|
40
|
+
|
|
41
|
+
_client = function _client() {
|
|
42
|
+
return data;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
return data;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
var _WorkflowCanvas = require("../WorkflowCanvas");
|
|
49
|
+
|
|
50
|
+
var _calculators = require("../calculators");
|
|
51
|
+
|
|
52
|
+
var _collection = require("../schemas/collection");
|
|
53
|
+
|
|
54
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
55
|
+
|
|
56
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
57
|
+
|
|
58
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
59
|
+
|
|
60
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
61
|
+
|
|
62
|
+
var _default = {
|
|
63
|
+
title: '{{t("Query record")}}',
|
|
64
|
+
type: 'query',
|
|
65
|
+
group: 'collection',
|
|
66
|
+
fieldset: {
|
|
67
|
+
'config.collection': _collection.collection,
|
|
68
|
+
'config.multiple': {
|
|
69
|
+
type: 'boolean',
|
|
70
|
+
title: '{{t("Multiple records")}}',
|
|
71
|
+
name: 'config.multiple',
|
|
72
|
+
'x-decorator': 'FormItem',
|
|
73
|
+
'x-component': 'Checkbox',
|
|
74
|
+
'x-component-props': {
|
|
75
|
+
disabled: true
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
'config.params': {
|
|
79
|
+
type: 'object',
|
|
80
|
+
name: 'config.params',
|
|
81
|
+
title: '',
|
|
82
|
+
'x-decorator': 'FormItem',
|
|
83
|
+
properties: {
|
|
84
|
+
filter: _collection.filter
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
view: {},
|
|
89
|
+
scope: {
|
|
90
|
+
useCollectionDataSource: _client().useCollectionDataSource
|
|
91
|
+
},
|
|
92
|
+
components: {
|
|
93
|
+
VariableComponent: _calculators.VariableComponent
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
getter({
|
|
97
|
+
type,
|
|
98
|
+
options,
|
|
99
|
+
onChange: _onChange
|
|
100
|
+
}) {
|
|
101
|
+
var _collections$find;
|
|
102
|
+
|
|
103
|
+
const _useTranslation = (0, _reactI18next().useTranslation)(),
|
|
104
|
+
t = _useTranslation.t;
|
|
105
|
+
|
|
106
|
+
const compile = (0, _client().useCompile)();
|
|
107
|
+
|
|
108
|
+
const _useCollectionManager = (0, _client().useCollectionManager)(),
|
|
109
|
+
_useCollectionManager2 = _useCollectionManager.collections,
|
|
110
|
+
collections = _useCollectionManager2 === void 0 ? [] : _useCollectionManager2;
|
|
111
|
+
|
|
112
|
+
const _useFlowContext = (0, _WorkflowCanvas.useFlowContext)(),
|
|
113
|
+
nodes = _useFlowContext.nodes;
|
|
114
|
+
|
|
115
|
+
const _nodes$find = nodes.find(n => n.id == options.nodeId),
|
|
116
|
+
config = _nodes$find.config;
|
|
117
|
+
|
|
118
|
+
const collection = (_collections$find = collections.find(item => item.name === config.collection)) !== null && _collections$find !== void 0 ? _collections$find : {
|
|
119
|
+
fields: []
|
|
120
|
+
};
|
|
121
|
+
return _react().default.createElement(_antd().Select, {
|
|
122
|
+
value: options.path,
|
|
123
|
+
placeholder: t('Fields'),
|
|
124
|
+
onChange: path => {
|
|
125
|
+
_onChange({
|
|
126
|
+
type,
|
|
127
|
+
options: _objectSpread(_objectSpread({}, options), {}, {
|
|
128
|
+
path
|
|
129
|
+
})
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}, collection.fields.filter(field => {
|
|
133
|
+
var _field$uiSchema;
|
|
134
|
+
|
|
135
|
+
return _calculators.BaseTypeSet.has((_field$uiSchema = field.uiSchema) === null || _field$uiSchema === void 0 ? void 0 : _field$uiSchema.type);
|
|
136
|
+
}).map(field => _react().default.createElement(_antd().Select.Option, {
|
|
137
|
+
key: field.name,
|
|
138
|
+
value: field.name
|
|
139
|
+
}, compile(field.uiSchema.title))));
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
};
|
|
143
|
+
exports.default = _default;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { useCollectionDataSource } from '@nocobase/client';
|
|
2
|
+
import { VariableComponent } from '../calculators';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
type: string;
|
|
6
|
+
group: string;
|
|
7
|
+
fieldset: {
|
|
8
|
+
'config.collection': {
|
|
9
|
+
type: string;
|
|
10
|
+
title: string;
|
|
11
|
+
name: string;
|
|
12
|
+
required: boolean;
|
|
13
|
+
'x-reactions': string[];
|
|
14
|
+
'x-decorator': string;
|
|
15
|
+
'x-component': string;
|
|
16
|
+
'x-component-props': {
|
|
17
|
+
placeholder: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
'config.params.filter': {
|
|
21
|
+
title: string;
|
|
22
|
+
type: string;
|
|
23
|
+
name: string;
|
|
24
|
+
'x-decorator': string;
|
|
25
|
+
'x-decorator-props': {
|
|
26
|
+
labelAlign: string;
|
|
27
|
+
className: string;
|
|
28
|
+
};
|
|
29
|
+
'x-component': string;
|
|
30
|
+
'x-component-props': {
|
|
31
|
+
useProps(): {
|
|
32
|
+
options: any[];
|
|
33
|
+
className: string;
|
|
34
|
+
};
|
|
35
|
+
dynamicComponent: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
'config.params.values': {
|
|
39
|
+
type: string;
|
|
40
|
+
title: string;
|
|
41
|
+
name: string;
|
|
42
|
+
'x-decorator': string;
|
|
43
|
+
'x-decorator-props': {
|
|
44
|
+
labelAlign: string;
|
|
45
|
+
className: string;
|
|
46
|
+
};
|
|
47
|
+
'x-component': string;
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
view: {};
|
|
52
|
+
scope: {
|
|
53
|
+
useCollectionDataSource: typeof useCollectionDataSource;
|
|
54
|
+
};
|
|
55
|
+
components: {
|
|
56
|
+
VariableComponent: typeof VariableComponent;
|
|
57
|
+
CollectionFieldset: import("react").MemoExoticComponent<import("react").FunctionComponent<Pick<any, string | number | symbol>>>;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export default _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
function _client() {
|
|
9
|
+
const data = require("@nocobase/client");
|
|
10
|
+
|
|
11
|
+
_client = function _client() {
|
|
12
|
+
return data;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
var _calculators = require("../calculators");
|
|
19
|
+
|
|
20
|
+
var _collection = require("../schemas/collection");
|
|
21
|
+
|
|
22
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23
|
+
|
|
24
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25
|
+
|
|
26
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
|
+
|
|
28
|
+
var _default = {
|
|
29
|
+
title: '{{t("Update record")}}',
|
|
30
|
+
type: 'update',
|
|
31
|
+
group: 'collection',
|
|
32
|
+
fieldset: {
|
|
33
|
+
'config.collection': _collection.collection,
|
|
34
|
+
'config.params.filter': _objectSpread(_objectSpread({}, _collection.filter), {}, {
|
|
35
|
+
title: '{{t("Only update records matching conditions")}}'
|
|
36
|
+
}),
|
|
37
|
+
'config.params.values': _collection.values
|
|
38
|
+
},
|
|
39
|
+
view: {},
|
|
40
|
+
scope: {
|
|
41
|
+
useCollectionDataSource: _client().useCollectionDataSource
|
|
42
|
+
},
|
|
43
|
+
components: {
|
|
44
|
+
VariableComponent: _calculators.VariableComponent,
|
|
45
|
+
CollectionFieldset: _calculators.CollectionFieldset
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
exports.default = _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare const collection: {
|
|
2
|
+
type: string;
|
|
3
|
+
title: string;
|
|
4
|
+
name: string;
|
|
5
|
+
required: boolean;
|
|
6
|
+
'x-reactions': string[];
|
|
7
|
+
'x-decorator': string;
|
|
8
|
+
'x-component': string;
|
|
9
|
+
'x-component-props': {
|
|
10
|
+
placeholder: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare const values: {
|
|
14
|
+
type: string;
|
|
15
|
+
title: string;
|
|
16
|
+
name: string;
|
|
17
|
+
'x-decorator': string;
|
|
18
|
+
'x-decorator-props': {
|
|
19
|
+
labelAlign: string;
|
|
20
|
+
className: string;
|
|
21
|
+
};
|
|
22
|
+
'x-component': string;
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
export declare const filter: {
|
|
26
|
+
type: string;
|
|
27
|
+
title: string;
|
|
28
|
+
name: string;
|
|
29
|
+
'x-decorator': string;
|
|
30
|
+
'x-decorator-props': {
|
|
31
|
+
labelAlign: string;
|
|
32
|
+
className: string;
|
|
33
|
+
};
|
|
34
|
+
'x-component': string;
|
|
35
|
+
'x-component-props': {
|
|
36
|
+
useProps(): {
|
|
37
|
+
options: any[];
|
|
38
|
+
className: string;
|
|
39
|
+
};
|
|
40
|
+
dynamicComponent: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.values = exports.filter = exports.collection = void 0;
|
|
7
|
+
|
|
8
|
+
function _css() {
|
|
9
|
+
const data = require("@emotion/css");
|
|
10
|
+
|
|
11
|
+
_css = function _css() {
|
|
12
|
+
return data;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function _react() {
|
|
19
|
+
const data = require("@formily/react");
|
|
20
|
+
|
|
21
|
+
_react = function _react() {
|
|
22
|
+
return data;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
return data;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function _client() {
|
|
29
|
+
const data = require("@nocobase/client");
|
|
30
|
+
|
|
31
|
+
_client = function _client() {
|
|
32
|
+
return data;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return data;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const collection = {
|
|
39
|
+
type: 'string',
|
|
40
|
+
title: '{{t("Collection")}}',
|
|
41
|
+
name: 'config.collection',
|
|
42
|
+
required: true,
|
|
43
|
+
'x-reactions': ['{{useCollectionDataSource()}}'],
|
|
44
|
+
'x-decorator': 'FormItem',
|
|
45
|
+
'x-component': 'Select',
|
|
46
|
+
'x-component-props': {
|
|
47
|
+
placeholder: '{{t("Select collection")}}'
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
exports.collection = collection;
|
|
51
|
+
const values = {
|
|
52
|
+
type: 'object',
|
|
53
|
+
title: '{{t("Fields values")}}',
|
|
54
|
+
name: 'config.params.values',
|
|
55
|
+
'x-decorator': 'FormItem',
|
|
56
|
+
'x-decorator-props': {
|
|
57
|
+
labelAlign: 'left',
|
|
58
|
+
className: (0, _css().css)`
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
`
|
|
61
|
+
},
|
|
62
|
+
'x-component': 'CollectionFieldset',
|
|
63
|
+
description: '{{t("Fields that are not assigned a value will be set to the default value, and those that do not have a default value are set to null.")}}'
|
|
64
|
+
};
|
|
65
|
+
exports.values = values;
|
|
66
|
+
const filter = {
|
|
67
|
+
type: 'object',
|
|
68
|
+
title: '{{t("Filter")}}',
|
|
69
|
+
name: 'config.params.filter',
|
|
70
|
+
'x-decorator': 'FormItem',
|
|
71
|
+
'x-decorator-props': {
|
|
72
|
+
labelAlign: 'left',
|
|
73
|
+
className: (0, _css().css)`
|
|
74
|
+
flex-direction: column;
|
|
75
|
+
`
|
|
76
|
+
},
|
|
77
|
+
'x-component': 'Filter',
|
|
78
|
+
'x-component-props': {
|
|
79
|
+
useProps() {
|
|
80
|
+
var _values$config;
|
|
81
|
+
|
|
82
|
+
const _useForm = (0, _react().useForm)(),
|
|
83
|
+
values = _useForm.values;
|
|
84
|
+
|
|
85
|
+
const options = (0, _client().useCollectionFilterOptions)((_values$config = values.config) === null || _values$config === void 0 ? void 0 : _values$config.collection);
|
|
86
|
+
return {
|
|
87
|
+
options,
|
|
88
|
+
className: (0, _css().css)`
|
|
89
|
+
position: relative;
|
|
90
|
+
width: 100%;
|
|
91
|
+
`
|
|
92
|
+
};
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
dynamicComponent: 'VariableComponent'
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
exports.filter = filter;
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
export declare const executionSchema: {
|
|
2
|
+
provider: {
|
|
3
|
+
type: string;
|
|
4
|
+
'x-decorator': string;
|
|
5
|
+
'x-decorator-props': {
|
|
6
|
+
collection: {
|
|
7
|
+
name: string;
|
|
8
|
+
fields: {
|
|
9
|
+
interface: string;
|
|
10
|
+
type: string;
|
|
11
|
+
name: string;
|
|
12
|
+
uiSchema: import("@formily/react").Stringify<{
|
|
13
|
+
[key: symbol]: any;
|
|
14
|
+
[key: `x-${string}`]: any;
|
|
15
|
+
[key: `x-${number}`]: any;
|
|
16
|
+
version?: string;
|
|
17
|
+
name?: import("@formily/react").SchemaKey;
|
|
18
|
+
title?: any;
|
|
19
|
+
description?: any;
|
|
20
|
+
default?: any;
|
|
21
|
+
readOnly?: boolean;
|
|
22
|
+
writeOnly?: boolean;
|
|
23
|
+
type?: import("@formily/react").SchemaTypes;
|
|
24
|
+
enum?: import("@formily/react").SchemaEnum<any>;
|
|
25
|
+
const?: any;
|
|
26
|
+
multipleOf?: number;
|
|
27
|
+
maximum?: number;
|
|
28
|
+
exclusiveMaximum?: number;
|
|
29
|
+
minimum?: number;
|
|
30
|
+
exclusiveMinimum?: number;
|
|
31
|
+
maxLength?: number;
|
|
32
|
+
minLength?: number;
|
|
33
|
+
pattern?: string | RegExp;
|
|
34
|
+
maxItems?: number;
|
|
35
|
+
minItems?: number;
|
|
36
|
+
uniqueItems?: boolean;
|
|
37
|
+
maxProperties?: number;
|
|
38
|
+
minProperties?: number;
|
|
39
|
+
required?: string | boolean | string[];
|
|
40
|
+
format?: string;
|
|
41
|
+
$ref?: string;
|
|
42
|
+
$namespace?: string;
|
|
43
|
+
definitions?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
44
|
+
properties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
45
|
+
items?: import("@formily/react").SchemaItems<any, any, any, any, any, any, any, any>;
|
|
46
|
+
additionalItems?: import("@formily/react").Stringify<any>;
|
|
47
|
+
patternProperties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
48
|
+
additionalProperties?: import("@formily/react").Stringify<any>;
|
|
49
|
+
"x-value"?: any;
|
|
50
|
+
"x-index"?: number;
|
|
51
|
+
"x-pattern"?: any;
|
|
52
|
+
"x-display"?: any;
|
|
53
|
+
"x-validator"?: any;
|
|
54
|
+
"x-decorator"?: any;
|
|
55
|
+
"x-decorator-props"?: any;
|
|
56
|
+
"x-component"?: any;
|
|
57
|
+
"x-component-props"?: any;
|
|
58
|
+
"x-reactions"?: import("@formily/react").SchemaReactions<any>;
|
|
59
|
+
"x-content"?: any;
|
|
60
|
+
"x-data"?: any;
|
|
61
|
+
"x-visible"?: boolean;
|
|
62
|
+
"x-hidden"?: boolean;
|
|
63
|
+
"x-disabled"?: boolean;
|
|
64
|
+
"x-editable"?: boolean;
|
|
65
|
+
"x-read-only"?: boolean;
|
|
66
|
+
"x-read-pretty"?: boolean;
|
|
67
|
+
}>;
|
|
68
|
+
}[];
|
|
69
|
+
};
|
|
70
|
+
resourceName: string;
|
|
71
|
+
request: {
|
|
72
|
+
resource: string;
|
|
73
|
+
action: string;
|
|
74
|
+
params: {
|
|
75
|
+
pageSize: number;
|
|
76
|
+
sort: string[];
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
'x-component': string;
|
|
81
|
+
'x-component-props': {
|
|
82
|
+
collection: {
|
|
83
|
+
name: string;
|
|
84
|
+
fields: {
|
|
85
|
+
interface: string;
|
|
86
|
+
type: string;
|
|
87
|
+
name: string;
|
|
88
|
+
uiSchema: import("@formily/react").Stringify<{
|
|
89
|
+
[key: symbol]: any;
|
|
90
|
+
[key: `x-${string}`]: any;
|
|
91
|
+
[key: `x-${number}`]: any;
|
|
92
|
+
version?: string;
|
|
93
|
+
name?: import("@formily/react").SchemaKey;
|
|
94
|
+
title?: any;
|
|
95
|
+
description?: any;
|
|
96
|
+
default?: any;
|
|
97
|
+
readOnly?: boolean;
|
|
98
|
+
writeOnly?: boolean;
|
|
99
|
+
type?: import("@formily/react").SchemaTypes;
|
|
100
|
+
enum?: import("@formily/react").SchemaEnum<any>;
|
|
101
|
+
const?: any;
|
|
102
|
+
multipleOf?: number;
|
|
103
|
+
maximum?: number;
|
|
104
|
+
exclusiveMaximum?: number;
|
|
105
|
+
minimum?: number;
|
|
106
|
+
exclusiveMinimum?: number;
|
|
107
|
+
maxLength?: number;
|
|
108
|
+
minLength?: number;
|
|
109
|
+
pattern?: string | RegExp;
|
|
110
|
+
maxItems?: number;
|
|
111
|
+
minItems?: number;
|
|
112
|
+
uniqueItems?: boolean;
|
|
113
|
+
maxProperties?: number;
|
|
114
|
+
minProperties?: number;
|
|
115
|
+
required?: string | boolean | string[];
|
|
116
|
+
format?: string;
|
|
117
|
+
$ref?: string;
|
|
118
|
+
$namespace?: string;
|
|
119
|
+
definitions?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
120
|
+
properties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
121
|
+
items?: import("@formily/react").SchemaItems<any, any, any, any, any, any, any, any>;
|
|
122
|
+
additionalItems?: import("@formily/react").Stringify<any>;
|
|
123
|
+
patternProperties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
124
|
+
additionalProperties?: import("@formily/react").Stringify<any>;
|
|
125
|
+
"x-value"?: any;
|
|
126
|
+
"x-index"?: number;
|
|
127
|
+
"x-pattern"?: any;
|
|
128
|
+
"x-display"?: any;
|
|
129
|
+
"x-validator"?: any;
|
|
130
|
+
"x-decorator"?: any;
|
|
131
|
+
"x-decorator-props"?: any;
|
|
132
|
+
"x-component"?: any;
|
|
133
|
+
"x-component-props"?: any;
|
|
134
|
+
"x-reactions"?: import("@formily/react").SchemaReactions<any>;
|
|
135
|
+
"x-content"?: any;
|
|
136
|
+
"x-data"?: any;
|
|
137
|
+
"x-visible"?: boolean;
|
|
138
|
+
"x-hidden"?: boolean;
|
|
139
|
+
"x-disabled"?: boolean;
|
|
140
|
+
"x-editable"?: boolean;
|
|
141
|
+
"x-read-only"?: boolean;
|
|
142
|
+
"x-read-pretty"?: boolean;
|
|
143
|
+
}>;
|
|
144
|
+
}[];
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
properties: {
|
|
148
|
+
actions: {
|
|
149
|
+
type: string;
|
|
150
|
+
'x-component': string;
|
|
151
|
+
'x-component-props': {
|
|
152
|
+
style: {
|
|
153
|
+
marginBottom: number;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
properties: {};
|
|
157
|
+
};
|
|
158
|
+
table: {
|
|
159
|
+
type: string;
|
|
160
|
+
'x-component': string;
|
|
161
|
+
'x-component-props': {
|
|
162
|
+
rowKey: string;
|
|
163
|
+
useDataSource: string;
|
|
164
|
+
};
|
|
165
|
+
properties: {
|
|
166
|
+
createdAt: {
|
|
167
|
+
type: string;
|
|
168
|
+
'x-decorator': string;
|
|
169
|
+
'x-component': string;
|
|
170
|
+
properties: {
|
|
171
|
+
createdAt: {
|
|
172
|
+
type: string;
|
|
173
|
+
'x-component': string;
|
|
174
|
+
'x-component-props': {
|
|
175
|
+
showTime: boolean;
|
|
176
|
+
};
|
|
177
|
+
'x-read-pretty': boolean;
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
workflowId: {
|
|
182
|
+
type: string;
|
|
183
|
+
'x-decorator': string;
|
|
184
|
+
'x-component': string;
|
|
185
|
+
properties: {
|
|
186
|
+
workflowId: {
|
|
187
|
+
type: string;
|
|
188
|
+
'x-component': string;
|
|
189
|
+
'x-read-pretty': boolean;
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
status: {
|
|
194
|
+
type: string;
|
|
195
|
+
'x-decorator': string;
|
|
196
|
+
'x-component': string;
|
|
197
|
+
properties: {
|
|
198
|
+
status: {
|
|
199
|
+
type: string;
|
|
200
|
+
'x-component': string;
|
|
201
|
+
'x-read-pretty': boolean;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
};
|