@nocobase/plugin-workflow 0.10.1-alpha.1 → 0.11.1-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 +2 -3
- package/client.js +1 -30
- package/lib/client/AddButton.js +13 -11
- package/lib/client/Branch.js +10 -8
- package/lib/client/CanvasContent.js +12 -10
- package/lib/client/ExecutionCanvas.js +37 -33
- package/lib/client/ExecutionPage.js +4 -9
- package/lib/client/WorkflowCanvas.js +18 -15
- package/lib/client/WorkflowPage.js +4 -9
- package/lib/client/WorkflowProvider.js +1 -40
- package/lib/client/components/CollectionBlockInitializer.js +3 -3
- package/lib/client/components/CollectionFieldset.d.ts +1 -1
- package/lib/client/components/CollectionFieldset.js +15 -16
- package/lib/client/components/Duration.js +5 -5
- package/lib/client/components/DynamicExpression.d.ts +3 -3
- package/lib/client/components/FieldsSelect.d.ts +1 -1
- package/lib/client/components/FieldsSelect.js +10 -7
- package/lib/client/components/NodeDescription.js +45 -31
- package/lib/client/components/RadioWithTooltip.js +13 -20
- package/lib/client/components/ValueBlock.js +14 -21
- package/lib/client/components/renderEngineReference.js +1 -8
- package/lib/client/index.d.ts +12 -4
- package/lib/client/index.js +78 -15
- package/lib/client/locale/zh-CN.d.ts +5 -1
- package/lib/client/locale/zh-CN.js +6 -2
- package/lib/client/nodes/aggregate.d.ts +8 -3
- package/lib/client/nodes/aggregate.js +5 -4
- package/lib/client/nodes/calculation.d.ts +6 -4
- package/lib/client/nodes/calculation.js +22 -28
- package/lib/client/nodes/condition.d.ts +2 -10
- package/lib/client/nodes/condition.js +19 -37
- package/lib/client/nodes/create.d.ts +5 -6
- package/lib/client/nodes/create.js +1 -3
- package/lib/client/nodes/destroy.d.ts +1 -1
- package/lib/client/nodes/index.d.ts +2 -3
- package/lib/client/nodes/index.js +95 -102
- package/lib/client/nodes/loop.d.ts +1 -1
- package/lib/client/nodes/loop.js +46 -54
- package/lib/client/nodes/manual/FormBlockInitializer.js +6 -5
- package/lib/client/nodes/manual/ModeConfig.js +23 -30
- package/lib/client/nodes/manual/SchemaConfig.d.ts +4 -5
- package/lib/client/nodes/manual/SchemaConfig.js +180 -25
- package/lib/client/nodes/manual/WorkflowTodo.js +95 -110
- package/lib/client/nodes/manual/WorkflowTodoBlockInitializer.d.ts +2 -5
- package/lib/client/nodes/manual/WorkflowTodoBlockInitializer.js +6 -5
- package/lib/client/nodes/manual/forms/create.js +8 -1
- package/lib/client/nodes/manual/forms/custom.js +22 -22
- package/lib/client/nodes/manual/forms/update.js +8 -1
- package/lib/client/nodes/manual/index.d.ts +6 -1
- package/lib/client/nodes/manual/index.js +5 -4
- package/lib/client/nodes/parallel.js +23 -20
- package/lib/client/nodes/query.d.ts +3 -5
- package/lib/client/nodes/query.js +1 -3
- package/lib/client/nodes/request.d.ts +2 -2
- package/lib/client/nodes/request.js +7 -7
- package/lib/client/nodes/sql.d.ts +26 -0
- package/lib/client/{triggers/schedule/DateFieldsSelect.js → nodes/sql.js} +37 -46
- package/lib/client/nodes/update.d.ts +2 -2
- package/lib/client/nodes/update.js +1 -1
- package/lib/client/schemas/collection.d.ts +3 -4
- package/lib/client/schemas/collection.js +11 -17
- package/lib/client/style.d.ts +18 -13
- package/lib/client/style.js +315 -292
- package/lib/client/triggers/collection.d.ts +13 -13
- package/lib/client/triggers/collection.js +5 -1
- package/lib/client/triggers/index.d.ts +3 -4
- package/lib/client/triggers/index.js +51 -53
- package/lib/client/triggers/schedule/EndsByField.js +11 -11
- package/lib/client/triggers/schedule/OnField.js +45 -33
- package/lib/client/triggers/schedule/RepeatField.js +4 -4
- package/lib/client/triggers/schedule/ScheduleConfig.js +24 -31
- package/lib/client/triggers/schedule/index.d.ts +1 -1
- package/lib/client/triggers/schedule/index.js +32 -20
- package/lib/client/variable.d.ts +31 -13
- package/lib/client/variable.js +44 -29
- package/lib/server/Plugin.d.ts +3 -6
- package/lib/server/Plugin.js +15 -12
- package/lib/server/Processor.d.ts +3 -5
- package/lib/server/Processor.js +2 -2
- package/lib/server/actions/nodes.js +7 -7
- package/lib/server/fields/expression-field.d.ts +1 -2
- package/lib/server/fields/expression-field.js +1 -8
- package/lib/server/functions/index.d.ts +2 -3
- package/lib/server/index.d.ts +1 -0
- package/lib/server/index.js +12 -0
- package/lib/server/instructions/aggregate.d.ts +1 -1
- package/lib/server/instructions/aggregate.js +5 -5
- package/lib/server/instructions/condition.d.ts +2 -1
- package/lib/server/instructions/create.d.ts +2 -2
- package/lib/server/instructions/create.js +13 -13
- package/lib/server/instructions/delay.d.ts +3 -3
- package/lib/server/instructions/delay.js +66 -64
- package/lib/server/instructions/destroy.d.ts +1 -1
- package/lib/server/instructions/index.d.ts +5 -5
- package/lib/server/instructions/index.js +1 -1
- package/lib/server/instructions/loop.d.ts +1 -2
- package/lib/server/instructions/manual/actions.js +19 -7
- package/lib/server/instructions/manual/forms/create.js +7 -1
- package/lib/server/instructions/manual/forms/index.d.ts +1 -1
- package/lib/server/instructions/manual/forms/update.js +7 -1
- package/lib/server/instructions/manual/index.d.ts +1 -1
- package/lib/server/instructions/parallel.d.ts +1 -2
- package/lib/server/instructions/query.d.ts +1 -1
- package/lib/server/instructions/query.js +8 -1
- package/lib/server/instructions/request.d.ts +3 -3
- package/lib/server/instructions/request.js +5 -2
- package/lib/server/instructions/sql.d.ts +12 -0
- package/lib/server/instructions/sql.js +34 -0
- package/lib/server/instructions/update.d.ts +1 -1
- package/lib/server/migrations/20230221071831-calculation-expression.js +1 -1
- package/lib/server/migrations/20230221121203-condition-calculation.js +1 -1
- package/lib/server/migrations/20230221162902-jsonb-to-json.js +7 -7
- package/lib/server/migrations/20230411034722-manual-multi-form.js +1 -8
- package/lib/server/migrations/20230710115902-manual-action-values.d.ts +4 -0
- package/lib/server/migrations/20230710115902-manual-action-values.js +97 -0
- package/lib/server/triggers/collection.d.ts +1 -1
- package/lib/server/triggers/collection.js +15 -13
- package/lib/server/triggers/index.d.ts +1 -1
- package/lib/server/triggers/schedule.d.ts +1 -1
- package/lib/server/triggers/schedule.js +18 -18
- package/lib/server/{models → types}/Execution.d.ts +2 -3
- package/lib/server/{models → types}/FlowNode.d.ts +1 -2
- package/lib/server/{models → types}/Job.d.ts +1 -2
- package/lib/server/{models → types}/Workflow.d.ts +1 -2
- package/lib/server/types/index.d.ts +4 -0
- package/lib/server/types/index.js +5 -0
- package/lib/server/utils.d.ts +2 -0
- package/lib/server/utils.js +21 -0
- package/package.json +39 -18
- package/server.d.ts +2 -3
- package/server.js +1 -30
- package/src/client/AddButton.tsx +111 -0
- package/src/client/Branch.tsx +37 -0
- package/src/client/CanvasContent.tsx +25 -0
- package/src/client/ExecutionCanvas.tsx +166 -0
- package/src/client/ExecutionLink.tsx +16 -0
- package/src/client/ExecutionPage.tsx +45 -0
- package/src/client/ExecutionResourceProvider.tsx +21 -0
- package/src/client/FlowContext.ts +7 -0
- package/src/client/WorkflowCanvas.tsx +221 -0
- package/src/client/WorkflowLink.tsx +16 -0
- package/src/client/WorkflowPage.tsx +52 -0
- package/src/client/WorkflowProvider.tsx +84 -0
- package/src/client/components/CollectionBlockInitializer.tsx +71 -0
- package/src/client/components/CollectionFieldset.tsx +160 -0
- package/src/client/components/Duration.tsx +45 -0
- package/src/client/components/DynamicExpression.tsx +53 -0
- package/src/client/components/FieldsSelect.tsx +32 -0
- package/src/client/components/FilterDynamicComponent.tsx +15 -0
- package/src/client/components/NodeDescription.tsx +51 -0
- package/src/client/components/NullRender.tsx +3 -0
- package/src/client/components/OpenDrawer.tsx +24 -0
- package/src/client/components/RadioWithTooltip.tsx +38 -0
- package/src/client/components/ValueBlock.tsx +67 -0
- package/src/client/components/renderEngineReference.tsx +30 -0
- package/src/client/constants.tsx +91 -0
- package/src/client/index.tsx +51 -0
- package/src/client/interfaces/expression.tsx +25 -0
- package/src/client/locale/en-US.ts +136 -0
- package/src/client/locale/es-ES.ts +129 -0
- package/src/client/locale/index.ts +18 -0
- package/src/client/locale/ja-JP.ts +90 -0
- package/src/client/locale/pt-BR.ts +136 -0
- package/src/client/locale/ru-RU.ts +90 -0
- package/src/client/locale/tr-TR.ts +90 -0
- package/src/client/locale/zh-CN.ts +248 -0
- package/src/client/nodes/aggregate.tsx +327 -0
- package/src/client/nodes/calculation.tsx +216 -0
- package/src/client/nodes/condition.tsx +463 -0
- package/src/client/nodes/create.tsx +85 -0
- package/src/client/nodes/delay.tsx +37 -0
- package/src/client/nodes/destroy.tsx +34 -0
- package/src/client/nodes/index.tsx +485 -0
- package/src/client/nodes/loop.tsx +144 -0
- package/src/client/nodes/manual/AssigneesSelect.tsx +33 -0
- package/src/client/nodes/manual/DetailsBlockProvider.tsx +80 -0
- package/src/client/nodes/manual/FormBlockInitializer.tsx +69 -0
- package/src/client/nodes/manual/FormBlockProvider.tsx +75 -0
- package/src/client/nodes/manual/ModeConfig.tsx +84 -0
- package/src/client/nodes/manual/SchemaConfig.tsx +509 -0
- package/src/client/nodes/manual/WorkflowTodo.tsx +607 -0
- package/src/client/nodes/manual/WorkflowTodoBlockInitializer.tsx +28 -0
- package/src/client/nodes/manual/forms/create.tsx +92 -0
- package/src/client/nodes/manual/forms/custom.tsx +392 -0
- package/src/client/nodes/manual/forms/update.tsx +134 -0
- package/src/client/nodes/manual/index.tsx +162 -0
- package/src/client/nodes/manual/utils.ts +28 -0
- package/src/client/nodes/parallel.tsx +138 -0
- package/src/client/nodes/query.tsx +88 -0
- package/src/client/nodes/request.tsx +185 -0
- package/src/client/nodes/sql.tsx +37 -0
- package/src/client/nodes/update.tsx +99 -0
- package/src/client/schemas/collection.ts +75 -0
- package/src/client/schemas/executions.tsx +169 -0
- package/src/client/schemas/workflows.ts +364 -0
- package/src/client/style.tsx +347 -0
- package/src/client/triggers/collection.tsx +190 -0
- package/src/client/triggers/index.tsx +311 -0
- package/src/client/triggers/schedule/EndsByField.tsx +40 -0
- package/src/client/triggers/schedule/OnField.tsx +64 -0
- package/src/client/triggers/schedule/RepeatField.tsx +116 -0
- package/src/client/triggers/schedule/ScheduleConfig.tsx +227 -0
- package/src/client/triggers/schedule/constants.ts +4 -0
- package/src/client/triggers/schedule/index.tsx +78 -0
- package/src/client/triggers/schedule/locale/Cron.zh-CN.ts +79 -0
- package/src/client/utils.ts +36 -0
- package/src/client/variable.tsx +318 -0
- package/src/index.ts +1 -0
- package/src/server/Plugin.ts +355 -0
- package/src/server/Processor.ts +354 -0
- package/src/server/__tests__/Plugin.test.ts +398 -0
- package/src/server/__tests__/Processor.test.ts +474 -0
- package/src/server/__tests__/actions/workflows.test.ts +419 -0
- package/src/server/__tests__/collections/categories.ts +27 -0
- package/src/server/__tests__/collections/comments.ts +24 -0
- package/src/server/__tests__/collections/posts.ts +42 -0
- package/src/server/__tests__/collections/replies.ts +9 -0
- package/src/server/__tests__/collections/tags.ts +15 -0
- package/src/server/__tests__/index.ts +89 -0
- package/src/server/__tests__/instructions/aggregate.test.ts +294 -0
- package/src/server/__tests__/instructions/calculation.test.ts +265 -0
- package/src/server/__tests__/instructions/condition.test.ts +335 -0
- package/src/server/__tests__/instructions/create.test.ts +129 -0
- package/src/server/__tests__/instructions/delay.test.ts +182 -0
- package/src/server/__tests__/instructions/destroy.test.ts +58 -0
- package/src/server/__tests__/instructions/loop.test.ts +331 -0
- package/src/server/__tests__/instructions/manual.test.ts +1173 -0
- package/src/server/__tests__/instructions/parallel.test.ts +445 -0
- package/src/server/__tests__/instructions/query.test.ts +359 -0
- package/src/server/__tests__/instructions/request.test.ts +247 -0
- package/src/server/__tests__/instructions/sql.test.ts +162 -0
- package/src/server/__tests__/instructions/update.test.ts +189 -0
- package/src/server/__tests__/triggers/collection.test.ts +333 -0
- package/src/server/__tests__/triggers/schedule.test.ts +369 -0
- package/src/server/actions/index.ts +25 -0
- package/src/server/actions/nodes.ts +214 -0
- package/src/server/actions/workflows.ts +178 -0
- package/src/server/collections/executions.ts +35 -0
- package/src/server/collections/flow_nodes.ts +54 -0
- package/src/server/collections/jobs.ts +31 -0
- package/src/server/collections/workflows.ts +88 -0
- package/src/server/constants.ts +26 -0
- package/src/server/fields/expression-field.ts +11 -0
- package/src/server/fields/index.ts +7 -0
- package/src/server/functions/index.ts +16 -0
- package/src/server/index.ts +6 -0
- package/src/server/instructions/aggregate.ts +42 -0
- package/src/server/instructions/calculation.ts +41 -0
- package/src/server/instructions/condition.ts +172 -0
- package/src/server/instructions/create.ts +39 -0
- package/src/server/instructions/delay.ts +105 -0
- package/src/server/instructions/destroy.ts +23 -0
- package/src/server/instructions/index.ts +64 -0
- package/src/server/instructions/loop.ts +99 -0
- package/src/server/instructions/manual/actions.ts +91 -0
- package/src/server/instructions/manual/collecions/jobs.ts +17 -0
- package/src/server/instructions/manual/collecions/users.ts +15 -0
- package/src/server/instructions/manual/collecions/users_jobs.ts +50 -0
- package/src/server/instructions/manual/forms/create.ts +23 -0
- package/src/server/instructions/manual/forms/index.ts +12 -0
- package/src/server/instructions/manual/forms/update.ts +23 -0
- package/src/server/instructions/manual/index.ts +184 -0
- package/src/server/instructions/parallel.ts +121 -0
- package/src/server/instructions/query.ts +42 -0
- package/src/server/instructions/request.ts +88 -0
- package/src/server/instructions/sql.ts +25 -0
- package/src/server/instructions/update.ts +24 -0
- package/src/server/migrations/20221129153547-calculation-variables.ts +64 -0
- package/src/server/migrations/20230221032941-change-request-body-type.ts +76 -0
- package/src/server/migrations/20230221071831-calculation-expression.ts +102 -0
- package/src/server/migrations/20230221121203-condition-calculation.ts +82 -0
- package/src/server/migrations/20230221162902-jsonb-to-json.ts +51 -0
- package/src/server/migrations/20230411034722-manual-multi-form.ts +282 -0
- package/src/server/migrations/20230612021134-manual-collection-block.ts +138 -0
- package/src/server/migrations/20230710115902-manual-action-values.ts +78 -0
- package/src/server/triggers/collection.ts +146 -0
- package/src/server/triggers/index.ts +22 -0
- package/src/server/triggers/schedule.ts +567 -0
- package/src/server/types/Execution.ts +26 -0
- package/src/server/types/FlowNode.ts +21 -0
- package/src/server/types/Job.ts +18 -0
- package/src/server/types/Workflow.ts +36 -0
- package/src/server/types/index.ts +4 -0
- package/src/server/utils.ts +17 -0
- package/lib/client/triggers/schedule/DateFieldsSelect.d.ts +0 -2
- /package/lib/server/{models → types}/Execution.js +0 -0
- /package/lib/server/{models → types}/FlowNode.js +0 -0
- /package/lib/server/{models → types}/Job.js +0 -0
- /package/lib/server/{models → types}/Workflow.js +0 -0
|
@@ -4,30 +4,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
function
|
|
8
|
-
const data =
|
|
9
|
-
|
|
7
|
+
function _icons() {
|
|
8
|
+
const data = require("@ant-design/icons");
|
|
9
|
+
_icons = function _icons() {
|
|
10
10
|
return data;
|
|
11
11
|
};
|
|
12
12
|
return data;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
const data = require("@
|
|
16
|
-
|
|
14
|
+
function _client() {
|
|
15
|
+
const data = require("@nocobase/client");
|
|
16
|
+
_client = function _client() {
|
|
17
17
|
return data;
|
|
18
18
|
};
|
|
19
19
|
return data;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
const data = require("
|
|
23
|
-
|
|
21
|
+
function _antd() {
|
|
22
|
+
const data = require("antd");
|
|
23
|
+
_antd = function _antd() {
|
|
24
24
|
return data;
|
|
25
25
|
};
|
|
26
26
|
return data;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
const data = require("
|
|
30
|
-
|
|
28
|
+
function _react() {
|
|
29
|
+
const data = _interopRequireWildcard(require("react"));
|
|
30
|
+
_react = function _react() {
|
|
31
31
|
return data;
|
|
32
32
|
};
|
|
33
33
|
return data;
|
|
@@ -35,9 +35,10 @@ function _antd() {
|
|
|
35
35
|
var _2 = require(".");
|
|
36
36
|
var _Branch = require("../Branch");
|
|
37
37
|
var _FlowContext = require("../FlowContext");
|
|
38
|
-
var _style = require("../style");
|
|
39
|
-
var _locale = require("../locale");
|
|
40
38
|
var _RadioWithTooltip = require("../components/RadioWithTooltip");
|
|
39
|
+
var _locale = require("../locale");
|
|
40
|
+
var _style = _interopRequireDefault(require("../style"));
|
|
41
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
41
42
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
42
43
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
43
44
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -79,6 +80,8 @@ var _default = {
|
|
|
79
80
|
component: function Component({
|
|
80
81
|
data
|
|
81
82
|
}) {
|
|
83
|
+
const _useStyles = (0, _style.default)(),
|
|
84
|
+
styles = _useStyles.styles;
|
|
82
85
|
const id = data.id,
|
|
83
86
|
mode = data.config.mode;
|
|
84
87
|
const _useFlowContext = (0, _FlowContext.useFlowContext)(),
|
|
@@ -99,9 +102,9 @@ var _default = {
|
|
|
99
102
|
return _react().default.createElement(_2.NodeDefaultView, {
|
|
100
103
|
data: data
|
|
101
104
|
}, _react().default.createElement("div", {
|
|
102
|
-
className: (0,
|
|
105
|
+
className: (0, _client().cx)(styles.nodeSubtreeClass)
|
|
103
106
|
}, _react().default.createElement("div", {
|
|
104
|
-
className: (0,
|
|
107
|
+
className: (0, _client().cx)(styles.branchBlockClass)
|
|
105
108
|
}, branches.map(branch => _react().default.createElement(_Branch.Branch, {
|
|
106
109
|
key: branch.id,
|
|
107
110
|
from: data,
|
|
@@ -112,7 +115,7 @@ var _default = {
|
|
|
112
115
|
from: data,
|
|
113
116
|
branchIndex: (lastBranchHead ? lastBranchHead.branchIndex : 0) + i + 1,
|
|
114
117
|
controller: branches.length + i > 1 ? _react().default.createElement("div", {
|
|
115
|
-
className: (0,
|
|
118
|
+
className: (0, _client().css)`
|
|
116
119
|
padding-top: 2em;
|
|
117
120
|
|
|
118
121
|
> button {
|
|
@@ -128,18 +131,18 @@ var _default = {
|
|
|
128
131
|
disabled: workflow.executed
|
|
129
132
|
})) : null
|
|
130
133
|
}))), _react().default.createElement("div", {
|
|
131
|
-
className: (0,
|
|
134
|
+
className: (0, _client().css)`
|
|
132
135
|
position: relative;
|
|
133
136
|
height: 2em;
|
|
134
137
|
`
|
|
135
138
|
}, _react().default.createElement(_antd().Tooltip, {
|
|
136
139
|
title: (0, _locale.lang)('Add branch'),
|
|
137
|
-
className: (0,
|
|
140
|
+
className: (0, _client().css)`
|
|
138
141
|
visibility: ${workflow.executed ? 'hidden' : 'visible'};
|
|
139
142
|
`
|
|
140
143
|
}, _react().default.createElement(_antd().Button, {
|
|
141
144
|
icon: _react().default.createElement(_icons().PlusOutlined, null),
|
|
142
|
-
className: (0,
|
|
145
|
+
className: (0, _client().css)`
|
|
143
146
|
position: absolute;
|
|
144
147
|
top: calc(50% - 1px);
|
|
145
148
|
transform: translateX(-50%) rotate(45deg);
|
|
@@ -14,7 +14,7 @@ declare const _default: {
|
|
|
14
14
|
'x-decorator': string;
|
|
15
15
|
'x-component': string;
|
|
16
16
|
'x-component-props': {
|
|
17
|
-
|
|
17
|
+
popupMatchSelectWidth: boolean;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
multiple: {
|
|
@@ -47,9 +47,8 @@ declare const _default: {
|
|
|
47
47
|
'x-decorator': string;
|
|
48
48
|
'x-component': string;
|
|
49
49
|
'x-component-props': {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
filter(field: any): boolean;
|
|
50
|
+
useCollection(): any;
|
|
51
|
+
className: string;
|
|
53
52
|
};
|
|
54
53
|
'x-reactions': {
|
|
55
54
|
dependencies: string[];
|
|
@@ -75,7 +74,6 @@ declare const _default: {
|
|
|
75
74
|
};
|
|
76
75
|
components: {
|
|
77
76
|
FilterDynamicComponent: typeof FilterDynamicComponent;
|
|
78
|
-
FieldsSelect: import("react").MemoExoticComponent<import("@formily/reactive-react").ReactFC<Pick<any, string | number | symbol>>>;
|
|
79
77
|
};
|
|
80
78
|
useVariables({ id, title, config }: {
|
|
81
79
|
id: any;
|
|
@@ -16,7 +16,6 @@ var _locale = require("../locale");
|
|
|
16
16
|
var _CollectionBlockInitializer = require("../components/CollectionBlockInitializer");
|
|
17
17
|
var _FilterDynamicComponent = require("../components/FilterDynamicComponent");
|
|
18
18
|
var _variable = require("../variable");
|
|
19
|
-
var _FieldsSelect = require("../components/FieldsSelect");
|
|
20
19
|
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; }
|
|
21
20
|
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; }
|
|
22
21
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -61,8 +60,7 @@ var _default = {
|
|
|
61
60
|
useCollectionDataSource: _client().useCollectionDataSource
|
|
62
61
|
},
|
|
63
62
|
components: {
|
|
64
|
-
FilterDynamicComponent: _FilterDynamicComponent.FilterDynamicComponent
|
|
65
|
-
FieldsSelect: _FieldsSelect.FieldsSelect
|
|
63
|
+
FilterDynamicComponent: _FilterDynamicComponent.FilterDynamicComponent
|
|
66
64
|
},
|
|
67
65
|
useVariables({
|
|
68
66
|
id,
|
|
@@ -168,8 +168,8 @@ declare const _default: {
|
|
|
168
168
|
useWorkflowVariableOptions: typeof useWorkflowVariableOptions;
|
|
169
169
|
};
|
|
170
170
|
components: {
|
|
171
|
-
ArrayItems:
|
|
172
|
-
Item
|
|
171
|
+
ArrayItems: import("@formily/reactive-react").ReactFC<React.HTMLAttributes<HTMLDivElement>> & import("@formily/antd-v5").ArrayBaseMixins & {
|
|
172
|
+
Item: import("@formily/reactive-react").ReactFC<React.HTMLAttributes<HTMLDivElement> & {
|
|
173
173
|
type?: "divide" | "card";
|
|
174
174
|
}>;
|
|
175
175
|
};
|
|
@@ -4,16 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
function
|
|
8
|
-
const data =
|
|
9
|
-
|
|
7
|
+
function _antdV() {
|
|
8
|
+
const data = require("@formily/antd-v5");
|
|
9
|
+
_antdV = function _antdV() {
|
|
10
10
|
return data;
|
|
11
11
|
};
|
|
12
12
|
return data;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
const data = require("
|
|
16
|
-
|
|
14
|
+
function _react() {
|
|
15
|
+
const data = _interopRequireDefault(require("react"));
|
|
16
|
+
_react = function _react() {
|
|
17
17
|
return data;
|
|
18
18
|
};
|
|
19
19
|
return data;
|
|
@@ -213,7 +213,7 @@ var _default = {
|
|
|
213
213
|
useWorkflowVariableOptions: _variable.useWorkflowVariableOptions
|
|
214
214
|
},
|
|
215
215
|
components: {
|
|
216
|
-
ArrayItems:
|
|
216
|
+
ArrayItems: _antdV().ArrayItems,
|
|
217
217
|
RequestBody(props) {
|
|
218
218
|
const scope = (0, _variable.useWorkflowVariableOptions)();
|
|
219
219
|
return _react().default.createElement(_client().Variable.JSON, _objectSpread({
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
type: string;
|
|
5
|
+
group: string;
|
|
6
|
+
description: string;
|
|
7
|
+
fieldset: {
|
|
8
|
+
sql: {
|
|
9
|
+
type: string;
|
|
10
|
+
required: boolean;
|
|
11
|
+
title: string;
|
|
12
|
+
description: string;
|
|
13
|
+
'x-decorator': string;
|
|
14
|
+
'x-component': string;
|
|
15
|
+
'x-component-props': {
|
|
16
|
+
rows: number;
|
|
17
|
+
className: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
scope: {};
|
|
22
|
+
components: {
|
|
23
|
+
SQLInput(props: any): React.JSX.Element;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export default _default;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
function _react() {
|
|
8
|
-
const data = require("
|
|
8
|
+
const data = _interopRequireDefault(require("react"));
|
|
9
9
|
_react = function _react() {
|
|
10
10
|
return data;
|
|
11
11
|
};
|
|
@@ -18,53 +18,44 @@ function _client() {
|
|
|
18
18
|
};
|
|
19
19
|
return data;
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
_antd = function _antd() {
|
|
24
|
-
return data;
|
|
25
|
-
};
|
|
26
|
-
return data;
|
|
27
|
-
}
|
|
28
|
-
function _react2() {
|
|
29
|
-
const data = _interopRequireDefault(require("react"));
|
|
30
|
-
_react2 = function _react2() {
|
|
31
|
-
return data;
|
|
32
|
-
};
|
|
33
|
-
return data;
|
|
34
|
-
}
|
|
35
|
-
function _reactI18next() {
|
|
36
|
-
const data = require("react-i18next");
|
|
37
|
-
_reactI18next = function _reactI18next() {
|
|
38
|
-
return data;
|
|
39
|
-
};
|
|
40
|
-
return data;
|
|
41
|
-
}
|
|
21
|
+
var _locale = require("../locale");
|
|
22
|
+
var _variable = require("../variable");
|
|
42
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
43
24
|
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; }
|
|
44
25
|
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; }
|
|
45
26
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
46
27
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
47
28
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
|
|
29
|
+
var _default = {
|
|
30
|
+
title: `{{t("SQL action", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
31
|
+
type: 'sql',
|
|
32
|
+
group: 'extended',
|
|
33
|
+
description: `{{t("Execute a SQL statement in database.", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
34
|
+
fieldset: {
|
|
35
|
+
sql: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
required: true,
|
|
38
|
+
title: 'SQL',
|
|
39
|
+
description: `{{t("Usage of SQL query result is not supported yet.", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
40
|
+
'x-decorator': 'FormItem',
|
|
41
|
+
'x-component': 'SQLInput',
|
|
42
|
+
'x-component-props': {
|
|
43
|
+
rows: 20,
|
|
44
|
+
className: (0, _client().css)`
|
|
45
|
+
font-size: 80%;
|
|
46
|
+
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
|
47
|
+
`
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
scope: {},
|
|
52
|
+
components: {
|
|
53
|
+
SQLInput(props) {
|
|
54
|
+
const scope = (0, _variable.useWorkflowVariableOptions)();
|
|
55
|
+
return _react().default.createElement(_client().Variable.RawTextArea, _objectSpread({
|
|
56
|
+
scope: scope
|
|
57
|
+
}, props));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
exports.default = _default;
|
|
@@ -19,7 +19,7 @@ declare const _default: {
|
|
|
19
19
|
'x-decorator': string;
|
|
20
20
|
'x-component': string;
|
|
21
21
|
'x-component-props': {
|
|
22
|
-
|
|
22
|
+
popupMatchSelectWidth: boolean;
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
25
|
params: {
|
|
@@ -76,7 +76,7 @@ declare const _default: {
|
|
|
76
76
|
};
|
|
77
77
|
components: {
|
|
78
78
|
FilterDynamicComponent: typeof FilterDynamicComponent;
|
|
79
|
-
CollectionFieldset: React.MemoExoticComponent<import("@formily/react").ReactFC<
|
|
79
|
+
CollectionFieldset: React.MemoExoticComponent<import("@formily/react").ReactFC<Omit<any, "ref">>>;
|
|
80
80
|
IndividualHooksRadioWithTooltip: typeof IndividualHooksRadioWithTooltip;
|
|
81
81
|
};
|
|
82
82
|
};
|
|
@@ -100,7 +100,7 @@ var _default = {
|
|
|
100
100
|
filter: _objectSpread(_objectSpread({}, _collection.filter), {}, {
|
|
101
101
|
title: `{{t("Only update records matching conditions", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
102
102
|
['x-validator'](value) {
|
|
103
|
-
return (0, _utils.isValidFilter)(value) ? '' :
|
|
103
|
+
return (0, _utils.isValidFilter)(value) ? '' : (0, _locale.lang)('Please add at least one condition');
|
|
104
104
|
}
|
|
105
105
|
}),
|
|
106
106
|
values: _objectSpread(_objectSpread({}, _collection.values), {}, {
|
|
@@ -6,7 +6,7 @@ export declare const collection: {
|
|
|
6
6
|
'x-decorator': string;
|
|
7
7
|
'x-component': string;
|
|
8
8
|
'x-component-props': {
|
|
9
|
-
|
|
9
|
+
popupMatchSelectWidth: boolean;
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
12
|
export declare const values: {
|
|
@@ -40,9 +40,8 @@ export declare const appends: {
|
|
|
40
40
|
'x-decorator': string;
|
|
41
41
|
'x-component': string;
|
|
42
42
|
'x-component-props': {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
filter(field: any): boolean;
|
|
43
|
+
useCollection(): any;
|
|
44
|
+
className: string;
|
|
46
45
|
};
|
|
47
46
|
'x-reactions': {
|
|
48
47
|
dependencies: string[];
|
|
@@ -4,13 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.values = exports.filter = exports.collection = exports.appends = void 0;
|
|
7
|
-
function _css() {
|
|
8
|
-
const data = require("@emotion/css");
|
|
9
|
-
_css = function _css() {
|
|
10
|
-
return data;
|
|
11
|
-
};
|
|
12
|
-
return data;
|
|
13
|
-
}
|
|
14
7
|
function _react() {
|
|
15
8
|
const data = require("@formily/react");
|
|
16
9
|
_react = function _react() {
|
|
@@ -34,7 +27,7 @@ const collection = {
|
|
|
34
27
|
'x-decorator': 'FormItem',
|
|
35
28
|
'x-component': 'CollectionSelect',
|
|
36
29
|
'x-component-props': {
|
|
37
|
-
|
|
30
|
+
popupMatchSelectWidth: false
|
|
38
31
|
}
|
|
39
32
|
};
|
|
40
33
|
exports.collection = collection;
|
|
@@ -44,7 +37,7 @@ const values = {
|
|
|
44
37
|
'x-decorator': 'FormItem',
|
|
45
38
|
'x-decorator-props': {
|
|
46
39
|
labelAlign: 'left',
|
|
47
|
-
className: (0,
|
|
40
|
+
className: (0, _client().css)`
|
|
48
41
|
flex-direction: column;
|
|
49
42
|
`
|
|
50
43
|
},
|
|
@@ -64,7 +57,7 @@ const filter = {
|
|
|
64
57
|
const options = (0, _client().useCollectionFilterOptions)(values === null || values === void 0 ? void 0 : values.collection);
|
|
65
58
|
return {
|
|
66
59
|
options,
|
|
67
|
-
className: (0,
|
|
60
|
+
className: (0, _client().css)`
|
|
68
61
|
position: relative;
|
|
69
62
|
width: 100%;
|
|
70
63
|
`
|
|
@@ -77,15 +70,16 @@ exports.filter = filter;
|
|
|
77
70
|
const appends = {
|
|
78
71
|
type: 'array',
|
|
79
72
|
title: `{{t("Preload associations", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
80
|
-
description: `{{t("Please select the associated fields that need to be accessed in subsequent nodes", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
73
|
+
description: `{{t("Please select the associated fields that need to be accessed in subsequent nodes. With more than two levels of to-many associations may cause performance issue, please use with caution.", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
81
74
|
'x-decorator': 'FormItem',
|
|
82
|
-
'x-component': '
|
|
75
|
+
'x-component': 'AppendsTreeSelect',
|
|
83
76
|
'x-component-props': {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
return
|
|
88
|
-
}
|
|
77
|
+
useCollection() {
|
|
78
|
+
const _useForm2 = (0, _react().useForm)(),
|
|
79
|
+
values = _useForm2.values;
|
|
80
|
+
return values === null || values === void 0 ? void 0 : values.collection;
|
|
81
|
+
},
|
|
82
|
+
className: 'full-width'
|
|
89
83
|
},
|
|
90
84
|
'x-reactions': [{
|
|
91
85
|
dependencies: ['collection'],
|
package/lib/client/style.d.ts
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
|
|
2
|
+
workflowPageClass: import("antd-style").SerializedStyles;
|
|
3
|
+
workflowVersionDropdownClass: import("antd-style").SerializedStyles;
|
|
4
|
+
branchBlockClass: import("antd-style").SerializedStyles;
|
|
5
|
+
branchClass: import("antd-style").SerializedStyles;
|
|
6
|
+
nodeBlockClass: import("antd-style").SerializedStyles;
|
|
7
|
+
nodeClass: import("antd-style").SerializedStyles;
|
|
8
|
+
nodeCardClass: import("antd-style").SerializedStyles;
|
|
9
|
+
nodeJobButtonClass: import("antd-style").SerializedStyles;
|
|
10
|
+
nodeHeaderClass: import("antd-style").SerializedStyles;
|
|
11
|
+
nodeMetaClass: import("antd-style").SerializedStyles;
|
|
12
|
+
nodeTitleClass: import("antd-style").SerializedStyles;
|
|
13
|
+
nodeSubtreeClass: import("antd-style").SerializedStyles;
|
|
14
|
+
addButtonClass: import("antd-style").SerializedStyles;
|
|
15
|
+
conditionClass: import("antd-style").SerializedStyles;
|
|
16
|
+
loopLineClass: import("antd-style").SerializedStyles;
|
|
17
|
+
}>;
|
|
18
|
+
export default useStyles;
|