@nocobase/client 0.7.1-alpha.7 → 0.7.2-alpha.3
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/es/acl/Configuration/schemas/scopes.js +1 -0
- package/es/application/Application.js +0 -4
- package/es/block-provider/BlockSchemaComponentProvider.js +3 -0
- package/es/block-provider/FormBlockProvider.js +2 -1
- package/es/block-provider/FormFieldProvider.d.ts +8 -0
- package/es/block-provider/FormFieldProvider.js +89 -0
- package/es/block-provider/KanbanBlockProvider.js +117 -3
- package/es/block-provider/TableFieldProvider.js +17 -2
- package/es/block-provider/TableSelectorProvider.js +38 -6
- package/es/block-provider/hooks/index.js +10 -3
- package/es/block-provider/index.d.ts +1 -0
- package/es/block-provider/index.js +2 -1
- package/es/collection-manager/CollectionField.js +5 -1
- package/es/collection-manager/CollectionFieldProvider.js +7 -2
- package/es/collection-manager/Configuration/AddFieldAction.js +1 -1
- package/es/collection-manager/Configuration/EditFieldAction.js +1 -1
- package/es/collection-manager/hooks/useCollectionManager.js +20 -5
- package/es/collection-manager/interfaces/index.d.ts +2 -1
- package/es/collection-manager/interfaces/index.js +3 -2
- package/es/collection-manager/interfaces/integer.d.ts +2 -0
- package/es/{workflow/nodes/update.js → collection-manager/interfaces/integer.js} +24 -20
- package/es/collection-manager/interfaces/linkTo.js +14 -6
- package/es/collection-manager/interfaces/m2m.js +12 -5
- package/es/collection-manager/interfaces/m2o.js +59 -8
- package/es/collection-manager/interfaces/o2m.js +72 -46
- package/es/collection-manager/interfaces/o2o.js +100 -39
- package/es/collection-manager/interfaces/properties/operators.d.ts +13 -0
- package/es/collection-manager/interfaces/properties/operators.js +7 -0
- package/es/index.d.ts +0 -1
- package/es/index.js +1 -2
- package/es/locale/en_US.d.ts +7 -0
- package/es/locale/en_US.js +9 -2
- package/es/locale/zh_CN.d.ts +10 -1
- package/es/locale/zh_CN.js +10 -1
- package/es/schema-component/antd/AntdSchemaComponentProvider.js +2 -0
- package/es/schema-component/antd/filter/DynamicComponent.js +50 -3
- package/es/schema-component/antd/filter/FilterItem.js +6 -0
- package/es/schema-component/antd/filter/useFilterActionProps.js +2 -0
- package/es/schema-component/antd/form-item/FormItem.js +79 -16
- package/es/schema-component/antd/form-v2/FormField.d.ts +1 -0
- package/es/schema-component/antd/form-v2/FormField.js +29 -0
- package/es/schema-component/antd/form-v2/index.d.ts +1 -0
- package/es/schema-component/antd/form-v2/index.js +2 -1
- package/es/schema-component/antd/g2plot/G2Plot.js +33 -3
- package/es/schema-component/antd/g2plot/requestChartData.d.ts +4 -0
- package/es/schema-component/antd/g2plot/requestChartData.js +33 -0
- package/es/schema-component/antd/kanban/Kanban.Card.Designer.js +10 -1
- package/es/schema-component/antd/record-picker/InputRecordPicker.js +34 -14
- package/es/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +34 -11
- package/es/schema-component/antd/record-picker/useFieldNames.js +2 -2
- package/es/schema-component/antd/select/shared.js +4 -2
- package/es/schema-component/antd/table-v2/Table.Column.Decorator.d.ts +1 -1
- package/es/schema-component/antd/table-v2/Table.Column.Decorator.js +7 -3
- package/es/schema-component/antd/table-v2/Table.Column.Designer.js +7 -2
- package/es/schema-component/antd/table-v2/Table.js +4 -2
- package/es/schema-component/antd/table-v2/TableField.js +7 -0
- package/es/schema-initializer/buttons/TableColumnInitializers.js +26 -12
- package/es/schema-initializer/components/assigned-field/AssignedField.js +34 -47
- package/es/schema-initializer/utils.d.ts +2 -0
- package/es/schema-initializer/utils.js +160 -30
- package/es/schema-settings/SchemaSettings.js +6 -3
- package/lib/acl/Configuration/schemas/scopes.js +1 -0
- package/lib/application/Application.js +0 -5
- package/lib/block-provider/BlockSchemaComponentProvider.js +4 -0
- package/lib/block-provider/FormBlockProvider.js +2 -1
- package/lib/block-provider/FormFieldProvider.d.ts +8 -0
- package/lib/block-provider/FormFieldProvider.js +120 -0
- package/lib/block-provider/KanbanBlockProvider.js +118 -1
- package/lib/block-provider/TableFieldProvider.js +19 -2
- package/lib/block-provider/TableSelectorProvider.js +39 -5
- package/lib/block-provider/hooks/index.js +11 -3
- package/lib/block-provider/index.d.ts +1 -0
- package/lib/block-provider/index.js +13 -0
- package/lib/collection-manager/CollectionField.js +5 -1
- package/lib/collection-manager/CollectionFieldProvider.js +9 -3
- package/lib/collection-manager/Configuration/AddFieldAction.js +1 -1
- package/lib/collection-manager/Configuration/EditFieldAction.js +1 -1
- package/lib/collection-manager/hooks/useCollectionManager.js +20 -5
- package/lib/collection-manager/interfaces/index.d.ts +2 -1
- package/lib/collection-manager/interfaces/index.js +26 -13
- package/lib/collection-manager/interfaces/integer.d.ts +2 -0
- package/lib/{workflow/nodes/update.js → collection-manager/interfaces/integer.js} +26 -24
- package/lib/collection-manager/interfaces/linkTo.js +14 -6
- package/lib/collection-manager/interfaces/m2m.js +12 -5
- package/lib/collection-manager/interfaces/m2o.js +61 -10
- package/lib/collection-manager/interfaces/o2m.js +72 -45
- package/lib/collection-manager/interfaces/o2o.js +103 -43
- package/lib/collection-manager/interfaces/properties/operators.d.ts +13 -0
- package/lib/collection-manager/interfaces/properties/operators.js +7 -0
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -13
- package/lib/locale/en_US.d.ts +7 -0
- package/lib/locale/en_US.js +9 -2
- package/lib/locale/zh_CN.d.ts +10 -1
- package/lib/locale/zh_CN.js +10 -1
- package/lib/schema-component/antd/AntdSchemaComponentProvider.js +3 -0
- package/lib/schema-component/antd/filter/DynamicComponent.js +52 -1
- package/lib/schema-component/antd/filter/FilterItem.js +7 -0
- package/lib/schema-component/antd/filter/useFilterActionProps.js +2 -0
- package/lib/schema-component/antd/form-item/FormItem.js +80 -17
- package/lib/schema-component/antd/form-v2/FormField.d.ts +1 -0
- package/lib/schema-component/antd/form-v2/FormField.js +48 -0
- package/lib/schema-component/antd/form-v2/index.d.ts +1 -0
- package/lib/schema-component/antd/form-v2/index.js +17 -0
- package/lib/schema-component/antd/g2plot/G2Plot.js +32 -2
- package/lib/schema-component/antd/g2plot/requestChartData.d.ts +4 -0
- package/lib/schema-component/antd/g2plot/requestChartData.js +42 -0
- package/lib/schema-component/antd/kanban/Kanban.Card.Designer.js +9 -0
- package/lib/schema-component/antd/record-picker/InputRecordPicker.js +33 -13
- package/lib/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +32 -9
- package/lib/schema-component/antd/record-picker/useFieldNames.js +2 -2
- package/lib/schema-component/antd/select/shared.js +4 -2
- package/lib/schema-component/antd/table-v2/Table.Column.Decorator.d.ts +1 -1
- package/lib/schema-component/antd/table-v2/Table.Column.Decorator.js +6 -2
- package/lib/schema-component/antd/table-v2/Table.Column.Designer.js +7 -2
- package/lib/schema-component/antd/table-v2/Table.js +4 -2
- package/lib/schema-component/antd/table-v2/TableField.js +8 -0
- package/lib/schema-initializer/buttons/TableColumnInitializers.js +25 -11
- package/lib/schema-initializer/components/assigned-field/AssignedField.js +29 -43
- package/lib/schema-initializer/utils.d.ts +2 -0
- package/lib/schema-initializer/utils.js +166 -30
- package/lib/schema-settings/SchemaSettings.js +5 -2
- package/package.json +4 -5
- package/es/workflow/ExecutionResourceProvider.d.ts +0 -4
- package/es/workflow/ExecutionResourceProvider.js +0 -35
- package/es/workflow/WorkflowCanvas.d.ts +0 -15
- package/es/workflow/WorkflowCanvas.js +0 -375
- package/es/workflow/WorkflowLink.d.ts +0 -1
- package/es/workflow/WorkflowLink.js +0 -21
- package/es/workflow/WorkflowPage.d.ts +0 -1
- package/es/workflow/WorkflowPage.js +0 -43
- package/es/workflow/WorkflowRouteProvider.d.ts +0 -1
- package/es/workflow/WorkflowRouteProvider.js +0 -30
- package/es/workflow/WorkflowShortcut.d.ts +0 -1
- package/es/workflow/WorkflowShortcut.js +0 -62
- package/es/workflow/calculators.d.ts +0 -101
- package/es/workflow/calculators.js +0 -647
- package/es/workflow/components/Duration.d.ts +0 -5
- package/es/workflow/components/Duration.js +0 -61
- package/es/workflow/index.d.ts +0 -5
- package/es/workflow/index.js +0 -5
- package/es/workflow/nodes/calculation.d.ts +0 -25
- package/es/workflow/nodes/calculation.js +0 -47
- package/es/workflow/nodes/condition.d.ts +0 -46
- package/es/workflow/nodes/condition.js +0 -255
- package/es/workflow/nodes/create.d.ts +0 -46
- package/es/workflow/nodes/create.js +0 -90
- package/es/workflow/nodes/delay.d.ts +0 -35
- package/es/workflow/nodes/delay.js +0 -37
- package/es/workflow/nodes/destroy.d.ts +0 -55
- package/es/workflow/nodes/destroy.js +0 -27
- package/es/workflow/nodes/index.d.ts +0 -33
- package/es/workflow/nodes/index.js +0 -312
- package/es/workflow/nodes/parallel.d.ts +0 -24
- package/es/workflow/nodes/parallel.js +0 -132
- package/es/workflow/nodes/query.d.ts +0 -70
- package/es/workflow/nodes/query.js +0 -98
- package/es/workflow/nodes/update.d.ts +0 -60
- package/es/workflow/schemas/collection.d.ts +0 -42
- package/es/workflow/schemas/collection.js +0 -57
- package/es/workflow/schemas/executions.d.ts +0 -209
- package/es/workflow/schemas/executions.js +0 -157
- package/es/workflow/schemas/workflows.d.ts +0 -2
- package/es/workflow/schemas/workflows.js +0 -334
- package/es/workflow/style.d.ts +0 -12
- package/es/workflow/style.js +0 -17
- package/es/workflow/triggers/collection.d.ts +0 -77
- package/es/workflow/triggers/collection.js +0 -144
- package/es/workflow/triggers/index.d.ts +0 -26
- package/es/workflow/triggers/index.js +0 -177
- package/es/workflow/triggers/schedule/DateFieldsSelect.d.ts +0 -2
- package/es/workflow/triggers/schedule/DateFieldsSelect.js +0 -39
- package/es/workflow/triggers/schedule/EndsByField.d.ts +0 -5
- package/es/workflow/triggers/schedule/EndsByField.js +0 -57
- package/es/workflow/triggers/schedule/OnField.d.ts +0 -5
- package/es/workflow/triggers/schedule/OnField.js +0 -87
- package/es/workflow/triggers/schedule/RepeatField.d.ts +0 -5
- package/es/workflow/triggers/schedule/RepeatField.js +0 -131
- package/es/workflow/triggers/schedule/ScheduleConfig.d.ts +0 -1
- package/es/workflow/triggers/schedule/ScheduleConfig.js +0 -225
- package/es/workflow/triggers/schedule/index.d.ts +0 -25
- package/es/workflow/triggers/schedule/index.js +0 -77
- package/es/workflow/triggers/schedule/locale/Cron.zh-CN.d.ts +0 -34
- package/es/workflow/triggers/schedule/locale/Cron.zh-CN.js +0 -37
- package/lib/workflow/ExecutionResourceProvider.d.ts +0 -4
- package/lib/workflow/ExecutionResourceProvider.js +0 -48
- package/lib/workflow/WorkflowCanvas.d.ts +0 -15
- package/lib/workflow/WorkflowCanvas.js +0 -408
- package/lib/workflow/WorkflowLink.d.ts +0 -1
- package/lib/workflow/WorkflowLink.js +0 -36
- package/lib/workflow/WorkflowPage.d.ts +0 -1
- package/lib/workflow/WorkflowPage.js +0 -60
- package/lib/workflow/WorkflowRouteProvider.d.ts +0 -1
- package/lib/workflow/WorkflowRouteProvider.js +0 -47
- package/lib/workflow/WorkflowShortcut.d.ts +0 -1
- package/lib/workflow/WorkflowShortcut.js +0 -87
- package/lib/workflow/calculators.d.ts +0 -101
- package/lib/workflow/calculators.js +0 -688
- package/lib/workflow/components/Duration.d.ts +0 -5
- package/lib/workflow/components/Duration.js +0 -74
- package/lib/workflow/index.d.ts +0 -5
- package/lib/workflow/index.js +0 -70
- package/lib/workflow/nodes/calculation.d.ts +0 -25
- package/lib/workflow/nodes/calculation.js +0 -61
- package/lib/workflow/nodes/condition.d.ts +0 -46
- package/lib/workflow/nodes/condition.js +0 -275
- package/lib/workflow/nodes/create.d.ts +0 -46
- package/lib/workflow/nodes/create.js +0 -107
- package/lib/workflow/nodes/delay.d.ts +0 -35
- package/lib/workflow/nodes/delay.js +0 -48
- package/lib/workflow/nodes/destroy.d.ts +0 -55
- package/lib/workflow/nodes/destroy.js +0 -38
- package/lib/workflow/nodes/index.d.ts +0 -33
- package/lib/workflow/nodes/index.js +0 -357
- package/lib/workflow/nodes/parallel.d.ts +0 -24
- package/lib/workflow/nodes/parallel.js +0 -155
- package/lib/workflow/nodes/query.d.ts +0 -70
- package/lib/workflow/nodes/query.js +0 -115
- package/lib/workflow/nodes/update.d.ts +0 -60
- package/lib/workflow/schemas/collection.d.ts +0 -42
- package/lib/workflow/schemas/collection.js +0 -70
- package/lib/workflow/schemas/executions.d.ts +0 -209
- package/lib/workflow/schemas/executions.js +0 -164
- package/lib/workflow/schemas/workflows.d.ts +0 -2
- package/lib/workflow/schemas/workflows.js +0 -344
- package/lib/workflow/style.d.ts +0 -12
- package/lib/workflow/style.js +0 -37
- package/lib/workflow/triggers/collection.d.ts +0 -77
- package/lib/workflow/triggers/collection.js +0 -164
- package/lib/workflow/triggers/index.d.ts +0 -26
- package/lib/workflow/triggers/index.js +0 -201
- package/lib/workflow/triggers/schedule/DateFieldsSelect.d.ts +0 -2
- package/lib/workflow/triggers/schedule/DateFieldsSelect.js +0 -54
- package/lib/workflow/triggers/schedule/EndsByField.d.ts +0 -5
- package/lib/workflow/triggers/schedule/EndsByField.js +0 -73
- package/lib/workflow/triggers/schedule/OnField.d.ts +0 -5
- package/lib/workflow/triggers/schedule/OnField.js +0 -105
- package/lib/workflow/triggers/schedule/RepeatField.d.ts +0 -5
- package/lib/workflow/triggers/schedule/RepeatField.js +0 -146
- package/lib/workflow/triggers/schedule/ScheduleConfig.d.ts +0 -1
- package/lib/workflow/triggers/schedule/ScheduleConfig.js +0 -250
- package/lib/workflow/triggers/schedule/index.d.ts +0 -25
- package/lib/workflow/triggers/schedule/index.js +0 -94
- package/lib/workflow/triggers/schedule/locale/Cron.zh-CN.d.ts +0 -34
- package/lib/workflow/triggers/schedule/locale/Cron.zh-CN.js +0 -44
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _antd = require("antd");
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var _reactI18next = require("react-i18next");
|
|
13
|
-
|
|
14
|
-
var _ = require("../..");
|
|
15
|
-
|
|
16
|
-
var _calculators = require("../calculators");
|
|
17
|
-
|
|
18
|
-
var _collection = require("../schemas/collection");
|
|
19
|
-
|
|
20
|
-
var _WorkflowCanvas = require("../WorkflowCanvas");
|
|
21
|
-
|
|
22
|
-
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
|
-
|
|
26
|
-
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; }
|
|
27
|
-
|
|
28
|
-
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; }
|
|
29
|
-
|
|
30
|
-
var _default = {
|
|
31
|
-
title: '{{t("Create record")}}',
|
|
32
|
-
type: 'create',
|
|
33
|
-
group: 'collection',
|
|
34
|
-
fieldset: {
|
|
35
|
-
'config.collection': _objectSpread(_objectSpread({}, _collection.collection), {}, {
|
|
36
|
-
name: 'config.collection'
|
|
37
|
-
}),
|
|
38
|
-
// multiple: {
|
|
39
|
-
// type: 'boolean',
|
|
40
|
-
// title: '多条数据',
|
|
41
|
-
// name: 'multiple',
|
|
42
|
-
// 'x-decorator': 'FormItem',
|
|
43
|
-
// 'x-component': 'Checkbox',
|
|
44
|
-
// 'x-component-props': {
|
|
45
|
-
// disabled: true
|
|
46
|
-
// }
|
|
47
|
-
// },
|
|
48
|
-
'config.params.values': _collection.values
|
|
49
|
-
},
|
|
50
|
-
view: {},
|
|
51
|
-
scope: {
|
|
52
|
-
useCollectionDataSource: _.useCollectionDataSource
|
|
53
|
-
},
|
|
54
|
-
components: {
|
|
55
|
-
CollectionFieldset: _calculators.CollectionFieldset
|
|
56
|
-
},
|
|
57
|
-
getter: function getter(_ref) {
|
|
58
|
-
var _collections$find;
|
|
59
|
-
|
|
60
|
-
var type = _ref.type,
|
|
61
|
-
options = _ref.options,
|
|
62
|
-
_onChange = _ref.onChange;
|
|
63
|
-
|
|
64
|
-
var _useTranslation = (0, _reactI18next.useTranslation)(),
|
|
65
|
-
t = _useTranslation.t;
|
|
66
|
-
|
|
67
|
-
var compile = (0, _.useCompile)();
|
|
68
|
-
|
|
69
|
-
var _useCollectionManager = (0, _.useCollectionManager)(),
|
|
70
|
-
_useCollectionManager2 = _useCollectionManager.collections,
|
|
71
|
-
collections = _useCollectionManager2 === void 0 ? [] : _useCollectionManager2;
|
|
72
|
-
|
|
73
|
-
var _useFlowContext = (0, _WorkflowCanvas.useFlowContext)(),
|
|
74
|
-
nodes = _useFlowContext.nodes;
|
|
75
|
-
|
|
76
|
-
var _nodes$find = nodes.find(function (n) {
|
|
77
|
-
return n.id == options.nodeId;
|
|
78
|
-
}),
|
|
79
|
-
config = _nodes$find.config;
|
|
80
|
-
|
|
81
|
-
var collection = (_collections$find = collections.find(function (item) {
|
|
82
|
-
return item.name === config.collection;
|
|
83
|
-
})) !== null && _collections$find !== void 0 ? _collections$find : {
|
|
84
|
-
fields: []
|
|
85
|
-
};
|
|
86
|
-
return /*#__PURE__*/_react.default.createElement(_antd.Select, {
|
|
87
|
-
value: options.path,
|
|
88
|
-
placeholder: t('Fields'),
|
|
89
|
-
onChange: function onChange(path) {
|
|
90
|
-
_onChange({
|
|
91
|
-
type: type,
|
|
92
|
-
options: _objectSpread(_objectSpread({}, options), {}, {
|
|
93
|
-
path: path
|
|
94
|
-
})
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
}, collection.fields.filter(function (field) {
|
|
98
|
-
return _calculators.BaseTypeSet.has(field.uiSchema.type);
|
|
99
|
-
}).map(function (field) {
|
|
100
|
-
return /*#__PURE__*/_react.default.createElement(_antd.Select.Option, {
|
|
101
|
-
key: field.name,
|
|
102
|
-
value: field.name
|
|
103
|
-
}, compile(field.uiSchema.title));
|
|
104
|
-
}));
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
exports.default = _default;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import Duration from "../components/Duration";
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
type: string;
|
|
5
|
-
group: string;
|
|
6
|
-
fieldset: {
|
|
7
|
-
'config.duration': {
|
|
8
|
-
type: string;
|
|
9
|
-
name: string;
|
|
10
|
-
title: string;
|
|
11
|
-
'x-decorator': string;
|
|
12
|
-
'x-component': string;
|
|
13
|
-
};
|
|
14
|
-
'config.endStatus': {
|
|
15
|
-
type: string;
|
|
16
|
-
name: string;
|
|
17
|
-
title: string;
|
|
18
|
-
'x-decorator': string;
|
|
19
|
-
'x-component': string;
|
|
20
|
-
'x-component-props': {
|
|
21
|
-
placeholder: string;
|
|
22
|
-
};
|
|
23
|
-
enum: {
|
|
24
|
-
label: string;
|
|
25
|
-
value: number;
|
|
26
|
-
}[];
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
view: {};
|
|
30
|
-
scope: {};
|
|
31
|
-
components: {
|
|
32
|
-
Duration: typeof Duration;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
export default _default;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _Duration = _interopRequireDefault(require("../components/Duration"));
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
|
-
var _default = {
|
|
13
|
-
title: '{{t("Delay")}}',
|
|
14
|
-
type: 'delay',
|
|
15
|
-
group: 'control',
|
|
16
|
-
fieldset: {
|
|
17
|
-
'config.duration': {
|
|
18
|
-
type: 'number',
|
|
19
|
-
name: 'config.duration',
|
|
20
|
-
title: '{{t("Duration")}}',
|
|
21
|
-
'x-decorator': 'FormItem',
|
|
22
|
-
'x-component': 'Duration'
|
|
23
|
-
},
|
|
24
|
-
'config.endStatus': {
|
|
25
|
-
type: 'number',
|
|
26
|
-
name: 'config.endStatus',
|
|
27
|
-
title: '{{t("End Status")}}',
|
|
28
|
-
'x-decorator': 'FormItem',
|
|
29
|
-
'x-component': 'Select',
|
|
30
|
-
'x-component-props': {
|
|
31
|
-
placeholder: '{{t("Select status")}}'
|
|
32
|
-
},
|
|
33
|
-
enum: [{
|
|
34
|
-
label: '{{t("Succeed and continue")}}',
|
|
35
|
-
value: 1
|
|
36
|
-
}, {
|
|
37
|
-
label: '{{t("Fail and exit")}}',
|
|
38
|
-
value: -1
|
|
39
|
-
}]
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
view: {},
|
|
43
|
-
scope: {},
|
|
44
|
-
components: {
|
|
45
|
-
Duration: _Duration.default
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
exports.default = _default;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { useCollectionDataSource } from '../..';
|
|
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': {
|
|
21
|
-
type: string;
|
|
22
|
-
name: string;
|
|
23
|
-
title: string;
|
|
24
|
-
'x-decorator': string;
|
|
25
|
-
properties: {
|
|
26
|
-
filter: {
|
|
27
|
-
type: string;
|
|
28
|
-
title: string;
|
|
29
|
-
name: string;
|
|
30
|
-
'x-decorator': string;
|
|
31
|
-
'x-decorator-props': {
|
|
32
|
-
labelAlign: string;
|
|
33
|
-
className: string;
|
|
34
|
-
};
|
|
35
|
-
'x-component': string;
|
|
36
|
-
'x-component-props': {
|
|
37
|
-
useProps(): {
|
|
38
|
-
options: any[];
|
|
39
|
-
className: string;
|
|
40
|
-
};
|
|
41
|
-
dynamicComponent: string;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
view: {};
|
|
48
|
-
scope: {
|
|
49
|
-
useCollectionDataSource: typeof useCollectionDataSource;
|
|
50
|
-
};
|
|
51
|
-
components: {
|
|
52
|
-
VariableComponent: typeof VariableComponent;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
export default _default;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _ = require("../..");
|
|
9
|
-
|
|
10
|
-
var _calculators = require("../calculators");
|
|
11
|
-
|
|
12
|
-
var _collection = require("../schemas/collection");
|
|
13
|
-
|
|
14
|
-
var _default = {
|
|
15
|
-
title: '{{t("Delete record")}}',
|
|
16
|
-
type: 'destroy',
|
|
17
|
-
group: 'collection',
|
|
18
|
-
fieldset: {
|
|
19
|
-
'config.collection': _collection.collection,
|
|
20
|
-
'config.params': {
|
|
21
|
-
type: 'object',
|
|
22
|
-
name: 'config.params',
|
|
23
|
-
title: '',
|
|
24
|
-
'x-decorator': 'FormItem',
|
|
25
|
-
properties: {
|
|
26
|
-
filter: _collection.filter
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
view: {},
|
|
31
|
-
scope: {
|
|
32
|
-
useCollectionDataSource: _.useCollectionDataSource
|
|
33
|
-
},
|
|
34
|
-
components: {
|
|
35
|
-
VariableComponent: _calculators.VariableComponent
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
exports.default = _default;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { ISchema } from '@formily/react';
|
|
2
|
-
import { Registry } from '@nocobase/utils/client';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
export interface Instruction {
|
|
5
|
-
title: string;
|
|
6
|
-
type: string;
|
|
7
|
-
group: string;
|
|
8
|
-
options?: {
|
|
9
|
-
label: string;
|
|
10
|
-
value: any;
|
|
11
|
-
key: string;
|
|
12
|
-
}[];
|
|
13
|
-
fieldset: {
|
|
14
|
-
[key: string]: ISchema;
|
|
15
|
-
};
|
|
16
|
-
view?: ISchema;
|
|
17
|
-
scope?: {
|
|
18
|
-
[key: string]: any;
|
|
19
|
-
};
|
|
20
|
-
components?: {
|
|
21
|
-
[key: string]: any;
|
|
22
|
-
};
|
|
23
|
-
render?(props: any): React.ReactElement;
|
|
24
|
-
endding?: boolean;
|
|
25
|
-
getter?(node: any): React.ReactElement;
|
|
26
|
-
}
|
|
27
|
-
export declare const instructions: Registry<Instruction>;
|
|
28
|
-
export declare function useNodeContext(): any;
|
|
29
|
-
export declare function Node({ data }: {
|
|
30
|
-
data: any;
|
|
31
|
-
}): JSX.Element;
|
|
32
|
-
export declare function RemoveButton(): JSX.Element;
|
|
33
|
-
export declare function NodeDefaultView(props: any): JSX.Element;
|
|
@@ -1,357 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.Node = Node;
|
|
9
|
-
exports.NodeDefaultView = NodeDefaultView;
|
|
10
|
-
exports.RemoveButton = RemoveButton;
|
|
11
|
-
exports.instructions = void 0;
|
|
12
|
-
exports.useNodeContext = useNodeContext;
|
|
13
|
-
|
|
14
|
-
var _icons = require("@ant-design/icons");
|
|
15
|
-
|
|
16
|
-
var _css = require("@emotion/css");
|
|
17
|
-
|
|
18
|
-
var _react = require("@formily/react");
|
|
19
|
-
|
|
20
|
-
var _client = require("@nocobase/utils/client");
|
|
21
|
-
|
|
22
|
-
var _antd = require("antd");
|
|
23
|
-
|
|
24
|
-
var _react2 = _interopRequireWildcard(require("react"));
|
|
25
|
-
|
|
26
|
-
var _reactI18next = require("react-i18next");
|
|
27
|
-
|
|
28
|
-
var _ = require("../..");
|
|
29
|
-
|
|
30
|
-
var _style = require("../style");
|
|
31
|
-
|
|
32
|
-
var _WorkflowCanvas = require("../WorkflowCanvas");
|
|
33
|
-
|
|
34
|
-
var _calculation = _interopRequireDefault(require("./calculation"));
|
|
35
|
-
|
|
36
|
-
var _condition = _interopRequireDefault(require("./condition"));
|
|
37
|
-
|
|
38
|
-
var _parallel = _interopRequireDefault(require("./parallel"));
|
|
39
|
-
|
|
40
|
-
var _delay = _interopRequireDefault(require("./delay"));
|
|
41
|
-
|
|
42
|
-
var _query = _interopRequireDefault(require("./query"));
|
|
43
|
-
|
|
44
|
-
var _create = _interopRequireDefault(require("./create"));
|
|
45
|
-
|
|
46
|
-
var _update = _interopRequireDefault(require("./update"));
|
|
47
|
-
|
|
48
|
-
var _destroy = _interopRequireDefault(require("./destroy"));
|
|
49
|
-
|
|
50
|
-
var _templateObject, _templateObject2;
|
|
51
|
-
|
|
52
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
53
|
-
|
|
54
|
-
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); }
|
|
55
|
-
|
|
56
|
-
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; }
|
|
57
|
-
|
|
58
|
-
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; }
|
|
59
|
-
|
|
60
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
61
|
-
|
|
62
|
-
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); } }
|
|
63
|
-
|
|
64
|
-
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); }); }; }
|
|
65
|
-
|
|
66
|
-
;
|
|
67
|
-
var instructions = new _client.Registry();
|
|
68
|
-
exports.instructions = instructions;
|
|
69
|
-
instructions.register('condition', _condition.default);
|
|
70
|
-
instructions.register('parallel', _parallel.default);
|
|
71
|
-
instructions.register('calculation', _calculation.default);
|
|
72
|
-
instructions.register('delay', _delay.default);
|
|
73
|
-
instructions.register('query', _query.default);
|
|
74
|
-
instructions.register('create', _create.default);
|
|
75
|
-
instructions.register('update', _update.default);
|
|
76
|
-
instructions.register('destroy', _destroy.default);
|
|
77
|
-
|
|
78
|
-
function useUpdateAction() {
|
|
79
|
-
var _useTranslation = (0, _reactI18next.useTranslation)(),
|
|
80
|
-
t = _useTranslation.t;
|
|
81
|
-
|
|
82
|
-
var form = (0, _react.useForm)();
|
|
83
|
-
var api = (0, _.useAPIClient)();
|
|
84
|
-
var ctx = (0, _.useActionContext)();
|
|
85
|
-
|
|
86
|
-
var _useResourceActionCon = (0, _.useResourceActionContext)(),
|
|
87
|
-
refresh = _useResourceActionCon.refresh;
|
|
88
|
-
|
|
89
|
-
var data = useNodeContext();
|
|
90
|
-
|
|
91
|
-
var _useFlowContext = (0, _WorkflowCanvas.useFlowContext)(),
|
|
92
|
-
workflow = _useFlowContext.workflow;
|
|
93
|
-
|
|
94
|
-
return {
|
|
95
|
-
run: function run() {
|
|
96
|
-
return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
97
|
-
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
98
|
-
while (1) {
|
|
99
|
-
switch (_context.prev = _context.next) {
|
|
100
|
-
case 0:
|
|
101
|
-
if (!workflow.executed) {
|
|
102
|
-
_context.next = 3;
|
|
103
|
-
break;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
_antd.message.error(t('Node in executed workflow cannot be modified'));
|
|
107
|
-
|
|
108
|
-
return _context.abrupt("return");
|
|
109
|
-
|
|
110
|
-
case 3:
|
|
111
|
-
_context.next = 5;
|
|
112
|
-
return form.submit();
|
|
113
|
-
|
|
114
|
-
case 5:
|
|
115
|
-
_context.next = 7;
|
|
116
|
-
return api.resource('flow_nodes', data.id).update({
|
|
117
|
-
filterByTk: data.id,
|
|
118
|
-
values: {
|
|
119
|
-
title: form.values.title,
|
|
120
|
-
config: form.values.config
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
case 7:
|
|
125
|
-
ctx.setVisible(false);
|
|
126
|
-
refresh();
|
|
127
|
-
|
|
128
|
-
case 9:
|
|
129
|
-
case "end":
|
|
130
|
-
return _context.stop();
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}, _callee);
|
|
134
|
-
}))();
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
;
|
|
140
|
-
|
|
141
|
-
var NodeContext = /*#__PURE__*/_react2.default.createContext(null);
|
|
142
|
-
|
|
143
|
-
function useNodeContext() {
|
|
144
|
-
return (0, _react2.useContext)(NodeContext);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
function Node(_ref) {
|
|
148
|
-
var data = _ref.data;
|
|
149
|
-
var instruction = instructions.get(data.type);
|
|
150
|
-
return /*#__PURE__*/_react2.default.createElement(NodeContext.Provider, {
|
|
151
|
-
value: data
|
|
152
|
-
}, /*#__PURE__*/_react2.default.createElement("div", {
|
|
153
|
-
className: (0, _css.cx)(_style.nodeBlockClass)
|
|
154
|
-
}, instruction.render ? instruction.render(data) : /*#__PURE__*/_react2.default.createElement(NodeDefaultView, {
|
|
155
|
-
data: data
|
|
156
|
-
}), !instruction.endding ? /*#__PURE__*/_react2.default.createElement(_WorkflowCanvas.AddButton, {
|
|
157
|
-
upstream: data
|
|
158
|
-
}) : /*#__PURE__*/_react2.default.createElement("div", {
|
|
159
|
-
className: (0, _css.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 1px;\n height: 6em;\n padding: 2em 0;\n background-color: #f0f2f5;\n\n .anticon{\n font-size: 1.5em;\n line-height: 100%;\n }\n "])))
|
|
160
|
-
}, /*#__PURE__*/_react2.default.createElement(_icons.CloseOutlined, null))));
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
function RemoveButton() {
|
|
164
|
-
var _useTranslation2 = (0, _reactI18next.useTranslation)(),
|
|
165
|
-
t = _useTranslation2.t;
|
|
166
|
-
|
|
167
|
-
var api = (0, _.useAPIClient)();
|
|
168
|
-
|
|
169
|
-
var _useFlowContext2 = (0, _WorkflowCanvas.useFlowContext)(),
|
|
170
|
-
workflow = _useFlowContext2.workflow;
|
|
171
|
-
|
|
172
|
-
var resource = api.resource('workflows.nodes', workflow.id);
|
|
173
|
-
var current = useNodeContext();
|
|
174
|
-
|
|
175
|
-
var _useFlowContext3 = (0, _WorkflowCanvas.useFlowContext)(),
|
|
176
|
-
nodes = _useFlowContext3.nodes,
|
|
177
|
-
onNodeRemoved = _useFlowContext3.onNodeRemoved;
|
|
178
|
-
|
|
179
|
-
function onRemove() {
|
|
180
|
-
return _onRemove.apply(this, arguments);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
function _onRemove() {
|
|
184
|
-
_onRemove = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
|
|
185
|
-
var onOk, _onOk, hasBranches, message;
|
|
186
|
-
|
|
187
|
-
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
188
|
-
while (1) {
|
|
189
|
-
switch (_context3.prev = _context3.next) {
|
|
190
|
-
case 0:
|
|
191
|
-
_onOk = function _onOk3() {
|
|
192
|
-
_onOk = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
193
|
-
var _yield$resource$destr, node;
|
|
194
|
-
|
|
195
|
-
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
196
|
-
while (1) {
|
|
197
|
-
switch (_context2.prev = _context2.next) {
|
|
198
|
-
case 0:
|
|
199
|
-
_context2.next = 2;
|
|
200
|
-
return resource.destroy({
|
|
201
|
-
filterByTk: current.id
|
|
202
|
-
});
|
|
203
|
-
|
|
204
|
-
case 2:
|
|
205
|
-
_yield$resource$destr = _context2.sent;
|
|
206
|
-
node = _yield$resource$destr.data.data;
|
|
207
|
-
onNodeRemoved(node);
|
|
208
|
-
|
|
209
|
-
case 5:
|
|
210
|
-
case "end":
|
|
211
|
-
return _context2.stop();
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}, _callee2);
|
|
215
|
-
}));
|
|
216
|
-
return _onOk.apply(this, arguments);
|
|
217
|
-
};
|
|
218
|
-
|
|
219
|
-
onOk = function _onOk2() {
|
|
220
|
-
return _onOk.apply(this, arguments);
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
hasBranches = !nodes.find(function (item) {
|
|
224
|
-
return item.upstream === current && item.branchIndex != null;
|
|
225
|
-
});
|
|
226
|
-
message = hasBranches ? t('Are you sure you want to delete it?') : t('This node contains branches, deleting will also be preformed to them, are you sure?');
|
|
227
|
-
|
|
228
|
-
_antd.Modal.confirm({
|
|
229
|
-
title: t('Delete'),
|
|
230
|
-
content: message,
|
|
231
|
-
onOk: onOk
|
|
232
|
-
});
|
|
233
|
-
|
|
234
|
-
case 5:
|
|
235
|
-
case "end":
|
|
236
|
-
return _context3.stop();
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
}, _callee3);
|
|
240
|
-
}));
|
|
241
|
-
return _onRemove.apply(this, arguments);
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
return workflow.executed ? null : /*#__PURE__*/_react2.default.createElement(_antd.Button, {
|
|
245
|
-
type: "text",
|
|
246
|
-
shape: "circle",
|
|
247
|
-
icon: /*#__PURE__*/_react2.default.createElement(_icons.DeleteOutlined, null),
|
|
248
|
-
onClick: onRemove,
|
|
249
|
-
className: "workflow-node-remove-button"
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
function NodeDefaultView(props) {
|
|
254
|
-
var compile = (0, _.useCompile)();
|
|
255
|
-
|
|
256
|
-
var _useFlowContext4 = (0, _WorkflowCanvas.useFlowContext)(),
|
|
257
|
-
workflow = _useFlowContext4.workflow;
|
|
258
|
-
|
|
259
|
-
var data = props.data,
|
|
260
|
-
children = props.children;
|
|
261
|
-
var instruction = instructions.get(data.type);
|
|
262
|
-
var detailText = workflow.executed ? '{{t("View")}}' : '{{t("Configure")}}';
|
|
263
|
-
return /*#__PURE__*/_react2.default.createElement("div", {
|
|
264
|
-
className: (0, _css.cx)(_style.nodeClass, "workflow-node-type-".concat(data.type))
|
|
265
|
-
}, /*#__PURE__*/_react2.default.createElement("div", {
|
|
266
|
-
className: (0, _css.cx)(_style.nodeCardClass)
|
|
267
|
-
}, /*#__PURE__*/_react2.default.createElement("div", {
|
|
268
|
-
className: (0, _css.cx)(_style.nodeHeaderClass)
|
|
269
|
-
}, /*#__PURE__*/_react2.default.createElement("div", {
|
|
270
|
-
className: (0, _css.cx)(_style.nodeMetaClass)
|
|
271
|
-
}, /*#__PURE__*/_react2.default.createElement(_antd.Tag, null, compile(instruction.title))), /*#__PURE__*/_react2.default.createElement("h4", {
|
|
272
|
-
className: (0, _css.cx)(_style.nodeTitleClass)
|
|
273
|
-
}, /*#__PURE__*/_react2.default.createElement("strong", null, data.title), /*#__PURE__*/_react2.default.createElement("span", {
|
|
274
|
-
className: "workflow-node-id"
|
|
275
|
-
}, "#", data.id)), /*#__PURE__*/_react2.default.createElement(RemoveButton, null)), /*#__PURE__*/_react2.default.createElement(_.SchemaComponent, {
|
|
276
|
-
scope: instruction.scope,
|
|
277
|
-
components: instruction.components,
|
|
278
|
-
schema: {
|
|
279
|
-
type: 'void',
|
|
280
|
-
properties: {
|
|
281
|
-
view: instruction.view,
|
|
282
|
-
config: {
|
|
283
|
-
type: 'void',
|
|
284
|
-
title: detailText,
|
|
285
|
-
'x-component': 'Action.Link',
|
|
286
|
-
'x-component-props': {
|
|
287
|
-
type: 'primary'
|
|
288
|
-
},
|
|
289
|
-
properties: _defineProperty({}, instruction.type, {
|
|
290
|
-
type: 'void',
|
|
291
|
-
title: instruction.title,
|
|
292
|
-
'x-component': 'Action.Drawer',
|
|
293
|
-
'x-decorator': 'Form',
|
|
294
|
-
'x-decorator-props': {
|
|
295
|
-
useValues: function useValues(options) {
|
|
296
|
-
var d = useNodeContext();
|
|
297
|
-
return (0, _.useRequest)(function () {
|
|
298
|
-
return Promise.resolve({
|
|
299
|
-
data: d
|
|
300
|
-
});
|
|
301
|
-
}, options);
|
|
302
|
-
}
|
|
303
|
-
},
|
|
304
|
-
properties: {
|
|
305
|
-
title: {
|
|
306
|
-
type: 'string',
|
|
307
|
-
name: 'title',
|
|
308
|
-
title: '{{t("Name")}}',
|
|
309
|
-
'x-decorator': 'FormItem',
|
|
310
|
-
'x-component': 'Input'
|
|
311
|
-
},
|
|
312
|
-
config: {
|
|
313
|
-
type: 'void',
|
|
314
|
-
name: 'config',
|
|
315
|
-
'x-component': 'fieldset',
|
|
316
|
-
'x-component-props': {
|
|
317
|
-
disabled: workflow.executed,
|
|
318
|
-
className: (0, _css.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ant-select,\n .ant-cascader-picker,\n .ant-picker,\n .ant-input-number,\n .ant-input-affix-wrapper{\n width: auto;\n }\n "])))
|
|
319
|
-
},
|
|
320
|
-
properties: instruction.fieldset
|
|
321
|
-
},
|
|
322
|
-
actions: {
|
|
323
|
-
type: 'void',
|
|
324
|
-
'x-component': 'Action.Drawer.Footer',
|
|
325
|
-
properties: workflow.executed ? {
|
|
326
|
-
close: {
|
|
327
|
-
title: '{{t("Close")}}',
|
|
328
|
-
'x-component': 'Action',
|
|
329
|
-
'x-component-props': {
|
|
330
|
-
useAction: '{{ cm.useCancelAction }}'
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
} : {
|
|
334
|
-
cancel: {
|
|
335
|
-
title: '{{t("Cancel")}}',
|
|
336
|
-
'x-component': 'Action',
|
|
337
|
-
'x-component-props': {
|
|
338
|
-
useAction: '{{ cm.useCancelAction }}'
|
|
339
|
-
}
|
|
340
|
-
},
|
|
341
|
-
submit: {
|
|
342
|
-
title: '{{t("Submit")}}',
|
|
343
|
-
'x-component': 'Action',
|
|
344
|
-
'x-component-props': {
|
|
345
|
-
type: 'primary',
|
|
346
|
-
useAction: useUpdateAction
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
})
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
})), children);
|
|
357
|
-
}
|