@nocobase/plugin-workflow 0.9.4-alpha.2 → 0.10.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client/AddButton.d.ts +2 -2
- package/lib/client/Branch.d.ts +2 -2
- package/lib/client/CanvasContent.d.ts +2 -2
- package/lib/client/ExecutionCanvas.d.ts +2 -2
- package/lib/client/ExecutionCanvas.js +1 -1
- package/lib/client/ExecutionLink.d.ts +2 -1
- package/lib/client/ExecutionPage.d.ts +2 -1
- package/lib/client/ExecutionPage.js +14 -15
- package/lib/client/ExecutionResourceProvider.d.ts +2 -1
- package/lib/client/WorkflowCanvas.d.ts +2 -2
- package/lib/client/WorkflowCanvas.js +31 -31
- package/lib/client/WorkflowLink.d.ts +2 -1
- package/lib/client/WorkflowPage.d.ts +2 -1
- package/lib/client/WorkflowPage.js +11 -10
- package/lib/client/WorkflowProvider.d.ts +1 -1
- package/lib/client/WorkflowProvider.js +15 -15
- package/lib/client/components/CollectionBlockInitializer.d.ts +2 -7
- package/lib/client/components/CollectionBlockInitializer.js +49 -17
- package/lib/client/components/CollectionFieldset.d.ts +2 -2
- package/lib/client/components/CollectionFieldset.js +18 -15
- package/lib/client/components/Duration.d.ts +2 -2
- package/lib/client/components/DynamicExpression.d.ts +3 -1
- package/lib/client/components/DynamicExpression.js +2 -0
- package/lib/client/components/FieldsSelect.d.ts +1 -1
- package/lib/client/components/FieldsSelect.js +2 -0
- package/lib/client/components/FilterDynamicComponent.d.ts +2 -2
- package/lib/client/components/NodeDescription.d.ts +2 -2
- package/lib/client/components/OpenDrawer.d.ts +2 -2
- package/lib/client/components/OpenDrawer.js +1 -1
- package/lib/client/components/RadioWithTooltip.d.ts +2 -2
- package/lib/client/components/renderEngineReference.d.ts +2 -1
- package/lib/client/constants.d.ts +2 -1
- package/lib/client/locale/zh-CN.d.ts +3 -0
- package/lib/client/locale/zh-CN.js +3 -0
- package/lib/client/nodes/aggregate.d.ts +1 -1
- package/lib/client/nodes/calculation.d.ts +4 -3
- package/lib/client/nodes/condition.d.ts +6 -4
- package/lib/client/nodes/condition.js +3 -1
- package/lib/client/nodes/create.d.ts +3 -6
- package/lib/client/nodes/create.js +1 -4
- package/lib/client/nodes/index.d.ts +5 -5
- package/lib/client/nodes/index.js +7 -4
- package/lib/client/nodes/loop.d.ts +4 -1
- package/lib/client/nodes/loop.js +3 -1
- package/lib/client/nodes/manual/AssigneesSelect.d.ts +2 -2
- package/lib/client/nodes/manual/DetailsBlockProvider.d.ts +2 -0
- package/lib/client/nodes/manual/DetailsBlockProvider.js +106 -0
- package/lib/client/nodes/manual/FormBlockInitializer.d.ts +2 -0
- package/lib/client/nodes/manual/FormBlockInitializer.js +106 -0
- package/lib/client/nodes/manual/FormBlockProvider.d.ts +2 -0
- package/lib/client/nodes/manual/FormBlockProvider.js +113 -0
- package/lib/client/nodes/manual/ModeConfig.d.ts +2 -2
- package/lib/client/nodes/manual/SchemaConfig.d.ts +43 -3
- package/lib/client/nodes/manual/SchemaConfig.js +42 -79
- package/lib/client/nodes/manual/WorkflowTodo.d.ts +5 -8
- package/lib/client/nodes/manual/WorkflowTodo.js +111 -76
- package/lib/client/nodes/manual/WorkflowTodoBlockInitializer.d.ts +2 -2
- package/lib/client/nodes/manual/forms/create.d.ts +3 -0
- package/lib/client/nodes/manual/forms/create.js +104 -0
- package/lib/client/nodes/manual/forms/custom.d.ts +3 -0
- package/lib/client/nodes/manual/forms/{customForm.js → custom.js} +63 -45
- package/lib/client/nodes/manual/forms/update.d.ts +3 -0
- package/lib/client/nodes/manual/forms/update.js +161 -0
- package/lib/client/nodes/manual/index.d.ts +2 -5
- package/lib/client/nodes/manual/index.js +17 -16
- package/lib/client/nodes/manual/utils.d.ts +2 -0
- package/lib/client/nodes/manual/utils.js +31 -0
- package/lib/client/nodes/parallel.d.ts +4 -1
- package/lib/client/nodes/parallel.js +3 -1
- package/lib/client/nodes/query.d.ts +2 -5
- package/lib/client/nodes/query.js +2 -5
- package/lib/client/nodes/request.d.ts +1 -1
- package/lib/client/nodes/request.js +1 -11
- package/lib/client/nodes/update.d.ts +1 -1
- package/lib/client/schemas/collection.js +1 -1
- package/lib/client/schemas/executions.d.ts +2 -0
- package/lib/client/triggers/collection.d.ts +2 -5
- package/lib/client/triggers/collection.js +5 -8
- package/lib/client/triggers/index.d.ts +1 -2
- package/lib/client/triggers/index.js +4 -3
- package/lib/client/triggers/schedule/DateFieldsSelect.js +14 -12
- package/lib/client/triggers/schedule/EndsByField.d.ts +2 -2
- package/lib/client/triggers/schedule/OnField.d.ts +2 -2
- package/lib/client/triggers/schedule/RepeatField.d.ts +2 -2
- package/lib/client/triggers/schedule/ScheduleConfig.d.ts +2 -1
- package/lib/client/triggers/schedule/index.d.ts +3 -6
- package/lib/client/triggers/schedule/index.js +1 -4
- package/lib/server/Processor.js +1 -2
- package/lib/server/instructions/manual/actions.js +42 -47
- package/lib/server/instructions/manual/forms/create.d.ts +5 -0
- package/lib/server/instructions/manual/forms/create.js +46 -0
- package/lib/server/instructions/manual/forms/index.d.ts +6 -0
- package/lib/server/instructions/manual/forms/index.js +15 -0
- package/lib/server/instructions/manual/forms/update.d.ts +6 -0
- package/lib/server/instructions/manual/forms/update.js +47 -0
- package/lib/server/instructions/manual/index.d.ts +3 -0
- package/lib/server/instructions/manual/index.js +16 -3
- package/lib/server/instructions/request.js +1 -1
- package/lib/server/migrations/20230612021134-manual-collection-block.d.ts +4 -0
- package/lib/server/migrations/20230612021134-manual-collection-block.js +155 -0
- package/package.json +16 -13
- package/lib/client/WorkflowShortcut.d.ts +0 -1
- package/lib/client/WorkflowShortcut.js +0 -48
- package/lib/client/components/CollectionFieldInitializers.d.ts +0 -2
- package/lib/client/components/CollectionFieldInitializers.js +0 -70
- package/lib/client/nodes/manual/forms/customForm.d.ts +0 -40
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
interface AddButtonProps {
|
|
3
3
|
upstream: any;
|
|
4
4
|
branchIndex?: number | null;
|
|
5
5
|
}
|
|
6
|
-
export declare function AddButton({ upstream, branchIndex }: AddButtonProps): JSX.Element;
|
|
6
|
+
export declare function AddButton({ upstream, branchIndex }: AddButtonProps): React.JSX.Element;
|
|
7
7
|
export {};
|
package/lib/client/Branch.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function ExecutionCanvas(): JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function ExecutionCanvas(): React.JSX.Element;
|
|
@@ -93,7 +93,7 @@ function JobModal() {
|
|
|
93
93
|
_ref$node = _ref.node,
|
|
94
94
|
node = _ref$node === void 0 ? {} : _ref$node;
|
|
95
95
|
const instruction = _nodes.instructions.get(node.type);
|
|
96
|
-
return _react().default.createElement(_client().
|
|
96
|
+
return _react().default.createElement(_client().ActionContextProvider, {
|
|
97
97
|
value: {
|
|
98
98
|
visible: Boolean(job),
|
|
99
99
|
setVisible: setViewJob
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const ExecutionLink: () => React.JSX.Element;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const ExecutionPage: () => React.JSX.Element;
|
|
@@ -4,40 +4,39 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ExecutionPage = void 0;
|
|
7
|
-
function
|
|
8
|
-
const data =
|
|
9
|
-
|
|
7
|
+
function _css() {
|
|
8
|
+
const data = require("@emotion/css");
|
|
9
|
+
_css = function _css() {
|
|
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("react
|
|
23
|
-
|
|
21
|
+
function _react() {
|
|
22
|
+
const data = _interopRequireDefault(require("react"));
|
|
23
|
+
_react = function _react() {
|
|
24
24
|
return data;
|
|
25
25
|
};
|
|
26
26
|
return data;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
const data = require("
|
|
30
|
-
|
|
28
|
+
function _reactRouterDom() {
|
|
29
|
+
const data = require("react-router-dom");
|
|
30
|
+
_reactRouterDom = function _reactRouterDom() {
|
|
31
31
|
return data;
|
|
32
32
|
};
|
|
33
33
|
return data;
|
|
34
34
|
}
|
|
35
|
-
var _style = require("./style");
|
|
36
35
|
var _ExecutionCanvas = require("./ExecutionCanvas");
|
|
36
|
+
var _style = require("./style");
|
|
37
37
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
38
38
|
const ExecutionPage = () => {
|
|
39
|
-
const
|
|
40
|
-
params = _useRouteMatch.params;
|
|
39
|
+
const params = (0, _reactRouterDom().useParams)();
|
|
41
40
|
return _react().default.createElement("div", {
|
|
42
41
|
className: (0, _css().cx)(_style.workflowPageClass)
|
|
43
42
|
}, _react().default.createElement(_client().SchemaComponent, {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function WorkflowCanvas(): JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function WorkflowCanvas(): React.JSX.Element;
|
|
@@ -4,44 +4,44 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.WorkflowCanvas = WorkflowCanvas;
|
|
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 _css() {
|
|
15
|
+
const data = require("@emotion/css");
|
|
16
|
+
_css = function _css() {
|
|
17
17
|
return data;
|
|
18
18
|
};
|
|
19
19
|
return data;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
const data = require("
|
|
23
|
-
|
|
21
|
+
function _client() {
|
|
22
|
+
const data = require("@nocobase/client");
|
|
23
|
+
_client = function _client() {
|
|
24
24
|
return data;
|
|
25
25
|
};
|
|
26
26
|
return data;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
const data = require("
|
|
30
|
-
|
|
28
|
+
function _antd() {
|
|
29
|
+
const data = require("antd");
|
|
30
|
+
_antd = function _antd() {
|
|
31
31
|
return data;
|
|
32
32
|
};
|
|
33
33
|
return data;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
const data = require("
|
|
37
|
-
|
|
35
|
+
function _classnames() {
|
|
36
|
+
const data = _interopRequireDefault(require("classnames"));
|
|
37
|
+
_classnames = function _classnames() {
|
|
38
38
|
return data;
|
|
39
39
|
};
|
|
40
40
|
return data;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
const data =
|
|
44
|
-
|
|
42
|
+
function _react() {
|
|
43
|
+
const data = _interopRequireWildcard(require("react"));
|
|
44
|
+
_react = function _react() {
|
|
45
45
|
return data;
|
|
46
46
|
};
|
|
47
47
|
return data;
|
|
@@ -53,25 +53,25 @@ function _reactI18next() {
|
|
|
53
53
|
};
|
|
54
54
|
return data;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
const data = require("
|
|
58
|
-
|
|
56
|
+
function _reactRouterDom() {
|
|
57
|
+
const data = require("react-router-dom");
|
|
58
|
+
_reactRouterDom = function _reactRouterDom() {
|
|
59
59
|
return data;
|
|
60
60
|
};
|
|
61
61
|
return data;
|
|
62
62
|
}
|
|
63
|
-
var
|
|
64
|
-
var _style = require("./style");
|
|
65
|
-
var _executions = require("./schemas/executions");
|
|
63
|
+
var _CanvasContent = require("./CanvasContent");
|
|
66
64
|
var _ExecutionLink = require("./ExecutionLink");
|
|
65
|
+
var _FlowContext = require("./FlowContext");
|
|
67
66
|
var _locale = require("./locale");
|
|
67
|
+
var _executions = require("./schemas/executions");
|
|
68
|
+
var _style = require("./style");
|
|
68
69
|
var _utils = require("./utils");
|
|
69
|
-
var _CanvasContent = require("./CanvasContent");
|
|
70
70
|
const _excluded = ["request", "filter"],
|
|
71
71
|
_excluded2 = ["nodes", "revisions"];
|
|
72
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
73
72
|
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); }
|
|
74
73
|
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; }
|
|
74
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
75
75
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
76
76
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
77
77
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -108,7 +108,7 @@ function ExecutionResourceProvider(_ref) {
|
|
|
108
108
|
}
|
|
109
109
|
function WorkflowCanvas() {
|
|
110
110
|
var _data$data2;
|
|
111
|
-
const
|
|
111
|
+
const navigate = (0, _reactRouterDom().useNavigate)();
|
|
112
112
|
const _useTranslation = (0, _reactI18next().useTranslation)(),
|
|
113
113
|
t = _useTranslation.t;
|
|
114
114
|
const _useResourceActionCon = (0, _client().useResourceActionContext)(),
|
|
@@ -144,7 +144,7 @@ function WorkflowCanvas() {
|
|
|
144
144
|
key
|
|
145
145
|
}) {
|
|
146
146
|
if (key != workflow.id) {
|
|
147
|
-
|
|
147
|
+
navigate(`/admin/settings/workflow/workflows/${key}`);
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
function onToggle(_x2) {
|
|
@@ -175,7 +175,7 @@ function WorkflowCanvas() {
|
|
|
175
175
|
}),
|
|
176
176
|
revision = _yield$resource$revis.data.data;
|
|
177
177
|
_antd().message.success(t('Operation succeeded'));
|
|
178
|
-
|
|
178
|
+
navigate(`/admin/settings/workflow/workflows/${revision.id}`);
|
|
179
179
|
});
|
|
180
180
|
return _onRevision.apply(this, arguments);
|
|
181
181
|
}
|
|
@@ -195,7 +195,7 @@ function WorkflowCanvas() {
|
|
|
195
195
|
filterByTk: workflow.id
|
|
196
196
|
});
|
|
197
197
|
_antd().message.success(t('Operation succeeded'));
|
|
198
|
-
|
|
198
|
+
navigate(workflow.current ? '/admin/settings/workflow/workflows' : `/admin/settings/workflow/workflows/${(_revisions$find = revisions.find(item => item.current)) === null || _revisions$find === void 0 ? void 0 : _revisions$find.id}`);
|
|
199
199
|
})();
|
|
200
200
|
}
|
|
201
201
|
});
|
|
@@ -280,7 +280,7 @@ function WorkflowCanvas() {
|
|
|
280
280
|
}, _react().default.createElement(_antd().Button, {
|
|
281
281
|
type: "text",
|
|
282
282
|
icon: _react().default.createElement(_icons().EllipsisOutlined, null)
|
|
283
|
-
})), _react().default.createElement(_client().
|
|
283
|
+
})), _react().default.createElement(_client().ActionContextProvider, {
|
|
284
284
|
value: {
|
|
285
285
|
visible,
|
|
286
286
|
setVisible
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const WorkflowLink: () => React.JSX.Element;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const WorkflowPage: () => React.JSX.Element;
|
|
@@ -11,6 +11,13 @@ function _css() {
|
|
|
11
11
|
};
|
|
12
12
|
return data;
|
|
13
13
|
}
|
|
14
|
+
function _client() {
|
|
15
|
+
const data = require("@nocobase/client");
|
|
16
|
+
_client = function _client() {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
14
21
|
function _react() {
|
|
15
22
|
const data = _interopRequireDefault(require("react"));
|
|
16
23
|
_react = function _react() {
|
|
@@ -25,19 +32,11 @@ function _reactRouterDom() {
|
|
|
25
32
|
};
|
|
26
33
|
return data;
|
|
27
34
|
}
|
|
28
|
-
function _client() {
|
|
29
|
-
const data = require("@nocobase/client");
|
|
30
|
-
_client = function _client() {
|
|
31
|
-
return data;
|
|
32
|
-
};
|
|
33
|
-
return data;
|
|
34
|
-
}
|
|
35
35
|
var _style = require("./style");
|
|
36
36
|
var _WorkflowCanvas = require("./WorkflowCanvas");
|
|
37
37
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
38
38
|
const WorkflowPage = () => {
|
|
39
|
-
const
|
|
40
|
-
params = _useRouteMatch.params;
|
|
39
|
+
const params = (0, _reactRouterDom().useParams)();
|
|
41
40
|
return _react().default.createElement("div", {
|
|
42
41
|
className: (0, _css().cx)(_style.workflowPageClass)
|
|
43
42
|
}, _react().default.createElement(_client().SchemaComponent, {
|
|
@@ -57,7 +56,9 @@ const WorkflowPage = () => {
|
|
|
57
56
|
resource: 'workflows',
|
|
58
57
|
action: 'get',
|
|
59
58
|
params: {
|
|
60
|
-
filter:
|
|
59
|
+
filter: {
|
|
60
|
+
id: params.id
|
|
61
|
+
},
|
|
61
62
|
appends: ['nodes', 'revisions.id', 'revisions.createdAt', 'revisions.current', 'revisions.executed', 'revisions.enabled']
|
|
62
63
|
}
|
|
63
64
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare const WorkflowContext: React.Context<{}>;
|
|
3
3
|
export declare function useWorkflowContext(): {};
|
|
4
|
-
export declare const WorkflowProvider: (props: any) => JSX.Element;
|
|
4
|
+
export declare const WorkflowProvider: (props: any) => React.JSX.Element;
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.WorkflowProvider = exports.WorkflowContext = void 0;
|
|
7
7
|
exports.useWorkflowContext = useWorkflowContext;
|
|
8
|
-
function
|
|
9
|
-
const data =
|
|
10
|
-
|
|
8
|
+
function _client() {
|
|
9
|
+
const data = require("@nocobase/client");
|
|
10
|
+
_client = function _client() {
|
|
11
11
|
return data;
|
|
12
12
|
};
|
|
13
13
|
return data;
|
|
@@ -19,27 +19,27 @@ function _antd() {
|
|
|
19
19
|
};
|
|
20
20
|
return data;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
const data = require("
|
|
24
|
-
|
|
22
|
+
function _react() {
|
|
23
|
+
const data = _interopRequireWildcard(require("react"));
|
|
24
|
+
_react = function _react() {
|
|
25
25
|
return data;
|
|
26
26
|
};
|
|
27
27
|
return data;
|
|
28
28
|
}
|
|
29
|
-
var
|
|
29
|
+
var _ExecutionLink = require("./ExecutionLink");
|
|
30
30
|
var _ExecutionPage = require("./ExecutionPage");
|
|
31
|
-
var _triggers = require("./triggers");
|
|
32
|
-
var _nodes = require("./nodes");
|
|
33
|
-
var _locale = require("./locale");
|
|
34
|
-
var _workflows = require("./schemas/workflows");
|
|
35
|
-
var _WorkflowLink = require("./WorkflowLink");
|
|
36
31
|
var _ExecutionResourceProvider = require("./ExecutionResourceProvider");
|
|
37
|
-
var
|
|
32
|
+
var _WorkflowLink = require("./WorkflowLink");
|
|
33
|
+
var _WorkflowPage = require("./WorkflowPage");
|
|
34
|
+
var _DynamicExpression = require("./components/DynamicExpression");
|
|
38
35
|
var _OpenDrawer = _interopRequireDefault(require("./components/OpenDrawer"));
|
|
36
|
+
var _expression = _interopRequireDefault(require("./interfaces/expression"));
|
|
37
|
+
var _locale = require("./locale");
|
|
38
|
+
var _nodes = require("./nodes");
|
|
39
39
|
var _WorkflowTodo = require("./nodes/manual/WorkflowTodo");
|
|
40
40
|
var _WorkflowTodoBlockInitializer = require("./nodes/manual/WorkflowTodoBlockInitializer");
|
|
41
|
-
var
|
|
42
|
-
var
|
|
41
|
+
var _workflows = require("./schemas/workflows");
|
|
42
|
+
var _triggers = require("./triggers");
|
|
43
43
|
const _excluded = ["routes", "components"];
|
|
44
44
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
45
45
|
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); }
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function CollectionBlockInitializer(
|
|
3
|
-
[x: string]: any;
|
|
4
|
-
insert: any;
|
|
5
|
-
collection: any;
|
|
6
|
-
dataSource: any;
|
|
7
|
-
}): JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function CollectionBlockInitializer(props: any): React.JSX.Element;
|
|
@@ -18,6 +18,7 @@ function _client() {
|
|
|
18
18
|
};
|
|
19
19
|
return data;
|
|
20
20
|
}
|
|
21
|
+
var _utils = require("../nodes/manual/utils");
|
|
21
22
|
const _excluded = ["insert", "collection", "dataSource"];
|
|
22
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
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; }
|
|
@@ -25,47 +26,78 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
25
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; }
|
|
26
27
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
27
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); }
|
|
29
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
30
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
28
31
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
29
32
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
30
|
-
function
|
|
33
|
+
function InnerCollectionBlockInitializer(_ref) {
|
|
31
34
|
let insert = _ref.insert,
|
|
32
35
|
collection = _ref.collection,
|
|
33
36
|
dataSource = _ref.dataSource,
|
|
34
37
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
38
|
+
const _useSchemaTemplateMan = (0, _client().useSchemaTemplateManager)(),
|
|
39
|
+
getTemplateSchemaByMode = _useSchemaTemplateMan.getTemplateSchemaByMode;
|
|
35
40
|
const _useCollectionManager = (0, _client().useCollectionManager)(),
|
|
36
41
|
getCollection = _useCollectionManager.getCollection;
|
|
42
|
+
const items = (0, _client().useRecordCollectionDataSourceItems)('FormItem');
|
|
37
43
|
const resovledCollection = getCollection(collection);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
44
|
+
function onConfirm(_x) {
|
|
45
|
+
return _onConfirm.apply(this, arguments);
|
|
46
|
+
}
|
|
47
|
+
function _onConfirm() {
|
|
48
|
+
_onConfirm = _asyncToGenerator(function* ({
|
|
49
|
+
item
|
|
50
|
+
}) {
|
|
51
|
+
const template = item.template ? yield getTemplateSchemaByMode(item) : null;
|
|
52
|
+
const result = {
|
|
41
53
|
type: 'void',
|
|
42
54
|
name: resovledCollection.name,
|
|
43
55
|
title: resovledCollection.title,
|
|
44
|
-
'x-decorator': '
|
|
56
|
+
'x-decorator': 'DetailsBlockProvider',
|
|
45
57
|
'x-decorator-props': {
|
|
46
|
-
collection
|
|
58
|
+
collection,
|
|
59
|
+
dataSource
|
|
47
60
|
},
|
|
48
61
|
'x-component': 'CardItem',
|
|
49
62
|
'x-component-props': {
|
|
50
|
-
|
|
63
|
+
title: props.title
|
|
51
64
|
},
|
|
52
65
|
'x-designer': 'SimpleDesigner',
|
|
53
|
-
'x-designer-props': {
|
|
54
|
-
type: 'record'
|
|
55
|
-
},
|
|
56
66
|
properties: {
|
|
57
67
|
grid: {
|
|
58
68
|
type: 'void',
|
|
59
|
-
'x-
|
|
60
|
-
'x-
|
|
61
|
-
|
|
69
|
+
'x-component': 'FormV2',
|
|
70
|
+
'x-component-props': {
|
|
71
|
+
useProps: '{{useDetailsBlockProps}}'
|
|
62
72
|
},
|
|
63
|
-
'x-
|
|
64
|
-
|
|
65
|
-
|
|
73
|
+
'x-read-pretty': true,
|
|
74
|
+
properties: {
|
|
75
|
+
grid: template || {
|
|
76
|
+
type: 'void',
|
|
77
|
+
'x-component': 'Grid',
|
|
78
|
+
'x-initializer': 'ReadPrettyFormItemInitializers',
|
|
79
|
+
properties: {}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
66
82
|
}
|
|
67
83
|
}
|
|
84
|
+
};
|
|
85
|
+
(0, _utils.traverseSchema)(result, node => {
|
|
86
|
+
if (node['x-uid']) {
|
|
87
|
+
delete node['x-uid'];
|
|
88
|
+
}
|
|
68
89
|
});
|
|
69
|
-
|
|
90
|
+
insert(result);
|
|
91
|
+
});
|
|
92
|
+
return _onConfirm.apply(this, arguments);
|
|
93
|
+
}
|
|
94
|
+
return _react().default.createElement(_client().SchemaInitializer.Item, _objectSpread(_objectSpread({}, props), {}, {
|
|
95
|
+
onClick: onConfirm,
|
|
96
|
+
items: items
|
|
70
97
|
}));
|
|
98
|
+
}
|
|
99
|
+
function CollectionBlockInitializer(props) {
|
|
100
|
+
return _react().default.createElement(_client().CollectionProvider, {
|
|
101
|
+
collection: props.collection
|
|
102
|
+
}, _react().default.createElement(InnerCollectionBlockInitializer, _objectSpread({}, props)));
|
|
71
103
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
declare const CollectionFieldSet: React.MemoExoticComponent<import("@formily/react").ReactFC<Pick<any, string | number | symbol>>>;
|
|
3
|
+
export default CollectionFieldSet;
|
|
@@ -85,7 +85,7 @@ function AssociationInput(props) {
|
|
|
85
85
|
}));
|
|
86
86
|
}
|
|
87
87
|
// NOTE: observer for watching useProps
|
|
88
|
-
|
|
88
|
+
const CollectionFieldSet = (0, _react2().observer)(({
|
|
89
89
|
value,
|
|
90
90
|
disabled,
|
|
91
91
|
onChange: _onChange
|
|
@@ -108,16 +108,16 @@ var _default = (0, _react2().observer)(({
|
|
|
108
108
|
const mergedDisabled = disabled || form.disabled;
|
|
109
109
|
return _react().default.createElement("fieldset", {
|
|
110
110
|
className: (0, _css().css)`
|
|
111
|
-
|
|
111
|
+
margin-top: 0.5em;
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
> .ant-formily-item {
|
|
114
|
+
flex-direction: column;
|
|
115
115
|
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
> .ant-formily-item-label {
|
|
117
|
+
line-height: 32px;
|
|
118
|
+
}
|
|
118
119
|
}
|
|
119
|
-
|
|
120
|
-
`
|
|
120
|
+
`
|
|
121
121
|
}, fields.length ? _react().default.createElement(_client().CollectionProvider, {
|
|
122
122
|
collection: getCollection(collectionName)
|
|
123
123
|
}, fields.filter(field => value && field.name in value).map(field => {
|
|
@@ -131,10 +131,10 @@ var _default = (0, _react2().observer)(({
|
|
|
131
131
|
label: compile((_field$uiSchema$title = (_field$uiSchema = field.uiSchema) === null || _field$uiSchema === void 0 ? void 0 : _field$uiSchema.title) !== null && _field$uiSchema$title !== void 0 ? _field$uiSchema$title : field.name),
|
|
132
132
|
labelAlign: "left",
|
|
133
133
|
className: (0, _css().css)`
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
134
|
+
.ant-form-item-control-input-content {
|
|
135
|
+
display: flex;
|
|
136
|
+
}
|
|
137
|
+
`
|
|
138
138
|
}, _react().default.createElement(_client().Variable.Input, {
|
|
139
139
|
scope: scope,
|
|
140
140
|
value: value[field.name],
|
|
@@ -180,12 +180,15 @@ var _default = (0, _react2().observer)(({
|
|
|
180
180
|
[key]: null
|
|
181
181
|
})),
|
|
182
182
|
className: (0, _css().css)`
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
183
|
+
max-height: 300px;
|
|
184
|
+
overflow-y: auto;
|
|
185
|
+
`
|
|
186
186
|
})
|
|
187
187
|
}, _react().default.createElement(_antd().Button, {
|
|
188
188
|
icon: _react().default.createElement(_icons().PlusOutlined, null)
|
|
189
189
|
}, t('Add field'))) : null) : _react().default.createElement("p", null, (0, _locale.lang)('Please select collection first')));
|
|
190
|
+
}, {
|
|
191
|
+
displayName: 'CollectionFieldSet'
|
|
190
192
|
});
|
|
193
|
+
var _default = CollectionFieldSet;
|
|
191
194
|
exports.default = _default;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const DynamicExpression: React.ForwardRefExoticComponent<Pick<Partial<
|
|
2
|
+
export declare const DynamicExpression: React.ForwardRefExoticComponent<Pick<Partial<Omit<{
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
}, string | number | symbol> & Pick<any, string | number | symbol> & {
|
|
3
5
|
children?: React.ReactNode;
|
|
4
6
|
}>, string | number | symbol> & React.RefAttributes<unknown>>;
|
|
@@ -84,6 +84,8 @@ const InternalExpression = (0, _react().observer)(props => {
|
|
|
84
84
|
return _react2().default.createElement(_client().Variable.TextArea, _objectSpread(_objectSpread({}, props), {}, {
|
|
85
85
|
scope: options
|
|
86
86
|
}));
|
|
87
|
+
}, {
|
|
88
|
+
displayName: 'InternalExpression'
|
|
87
89
|
});
|
|
88
90
|
function Result(props) {
|
|
89
91
|
const _useTranslation = (0, _reactI18next().useTranslation)(),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const FieldsSelect: React.MemoExoticComponent<
|
|
2
|
+
export declare const FieldsSelect: React.MemoExoticComponent<import("@formily/react").ReactFC<Pick<any, string | number | symbol>>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function NodeDescription(props: any): JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function NodeDescription(props: any): React.JSX.Element;
|