@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,61 +0,0 @@
|
|
|
1
|
-
var _templateObject;
|
|
2
|
-
|
|
3
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
4
|
-
|
|
5
|
-
import React from "react";
|
|
6
|
-
import { InputNumber, Select } from "antd";
|
|
7
|
-
import { useTranslation } from "react-i18next";
|
|
8
|
-
import { css } from "@emotion/css";
|
|
9
|
-
var UnitOptions = [{
|
|
10
|
-
value: 1000,
|
|
11
|
-
label: 'Seconds'
|
|
12
|
-
}, {
|
|
13
|
-
value: 60000,
|
|
14
|
-
label: 'Minutes'
|
|
15
|
-
}, {
|
|
16
|
-
value: 3600000,
|
|
17
|
-
label: 'Hours'
|
|
18
|
-
}, {
|
|
19
|
-
value: 86400000,
|
|
20
|
-
label: 'Days'
|
|
21
|
-
}, {
|
|
22
|
-
value: 604800000,
|
|
23
|
-
label: 'Weeks'
|
|
24
|
-
}];
|
|
25
|
-
|
|
26
|
-
function getNumberOption(v) {
|
|
27
|
-
return UnitOptions.slice().reverse().find(function (item) {
|
|
28
|
-
return !(v % item.value);
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export default function (_ref) {
|
|
33
|
-
var _ref$value = _ref.value,
|
|
34
|
-
value = _ref$value === void 0 ? 60000 : _ref$value,
|
|
35
|
-
_onChange = _ref.onChange;
|
|
36
|
-
|
|
37
|
-
var _useTranslation = useTranslation(),
|
|
38
|
-
t = _useTranslation.t;
|
|
39
|
-
|
|
40
|
-
var option = getNumberOption(value);
|
|
41
|
-
var quantity = Math.round(value / option.value);
|
|
42
|
-
return /*#__PURE__*/React.createElement("fieldset", {
|
|
43
|
-
className: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n gap: .5em;\n "])))
|
|
44
|
-
}, /*#__PURE__*/React.createElement(InputNumber, {
|
|
45
|
-
min: 1,
|
|
46
|
-
value: quantity,
|
|
47
|
-
onChange: function onChange(v) {
|
|
48
|
-
return _onChange(Math.round(v * option.value));
|
|
49
|
-
}
|
|
50
|
-
}), /*#__PURE__*/React.createElement(Select, {
|
|
51
|
-
value: option.value,
|
|
52
|
-
onChange: function onChange(unit) {
|
|
53
|
-
return _onChange(Math.round(quantity * unit));
|
|
54
|
-
}
|
|
55
|
-
}, UnitOptions.map(function (item) {
|
|
56
|
-
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
57
|
-
key: item.value,
|
|
58
|
-
value: item.value
|
|
59
|
-
}, t(item.label));
|
|
60
|
-
})));
|
|
61
|
-
}
|
package/es/workflow/index.d.ts
DELETED
package/es/workflow/index.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
type: string;
|
|
5
|
-
group: string;
|
|
6
|
-
fieldset: {
|
|
7
|
-
'config.calculation': {
|
|
8
|
-
type: string;
|
|
9
|
-
title: string;
|
|
10
|
-
name: string;
|
|
11
|
-
required: boolean;
|
|
12
|
-
'x-decorator': string;
|
|
13
|
-
'x-component': string;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
view: {};
|
|
17
|
-
components: {
|
|
18
|
-
CalculationConfig({ value, onChange }: {
|
|
19
|
-
value: any;
|
|
20
|
-
onChange: any;
|
|
21
|
-
}): JSX.Element;
|
|
22
|
-
};
|
|
23
|
-
getter(): JSX.Element;
|
|
24
|
-
};
|
|
25
|
-
export default _default;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
var _templateObject;
|
|
2
|
-
|
|
3
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
4
|
-
|
|
5
|
-
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; }
|
|
6
|
-
|
|
7
|
-
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; }
|
|
8
|
-
|
|
9
|
-
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; }
|
|
10
|
-
|
|
11
|
-
import { css } from '@emotion/css';
|
|
12
|
-
import React from 'react';
|
|
13
|
-
import { useTranslation } from 'react-i18next';
|
|
14
|
-
import { Calculation } from '../calculators';
|
|
15
|
-
export default {
|
|
16
|
-
title: '{{t("Calculation")}}',
|
|
17
|
-
type: 'calculation',
|
|
18
|
-
group: 'control',
|
|
19
|
-
fieldset: {
|
|
20
|
-
'config.calculation': {
|
|
21
|
-
type: 'object',
|
|
22
|
-
title: '{{t("Configure calculation")}}',
|
|
23
|
-
name: 'config.calculation',
|
|
24
|
-
required: true,
|
|
25
|
-
'x-decorator': 'FormItem',
|
|
26
|
-
'x-component': 'CalculationConfig'
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
view: {},
|
|
30
|
-
components: {
|
|
31
|
-
CalculationConfig: function CalculationConfig(_ref) {
|
|
32
|
-
var value = _ref.value,
|
|
33
|
-
onChange = _ref.onChange;
|
|
34
|
-
return /*#__PURE__*/React.createElement(Calculation, _objectSpread(_objectSpread({}, value), {}, {
|
|
35
|
-
onChange: onChange
|
|
36
|
-
}));
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
getter: function getter() {
|
|
40
|
-
var _useTranslation = useTranslation(),
|
|
41
|
-
t = _useTranslation.t;
|
|
42
|
-
|
|
43
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
44
|
-
className: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["flex-shrink: 0"])))
|
|
45
|
-
}, t('Calculation result'));
|
|
46
|
-
}
|
|
47
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
declare function CalculationConfig({ value, onChange }: {
|
|
3
|
-
value: any;
|
|
4
|
-
onChange: any;
|
|
5
|
-
}): JSX.Element;
|
|
6
|
-
declare const _default: {
|
|
7
|
-
title: string;
|
|
8
|
-
type: string;
|
|
9
|
-
group: string;
|
|
10
|
-
fieldset: {
|
|
11
|
-
'config.rejectOnFalse': {
|
|
12
|
-
type: string;
|
|
13
|
-
name: string;
|
|
14
|
-
title: string;
|
|
15
|
-
'x-decorator': string;
|
|
16
|
-
'x-component': string;
|
|
17
|
-
'x-component-props': {
|
|
18
|
-
disabled: boolean;
|
|
19
|
-
};
|
|
20
|
-
enum: {
|
|
21
|
-
value: boolean;
|
|
22
|
-
label: string;
|
|
23
|
-
}[];
|
|
24
|
-
};
|
|
25
|
-
'config.calculation': {
|
|
26
|
-
type: string;
|
|
27
|
-
name: string;
|
|
28
|
-
title: string;
|
|
29
|
-
'x-decorator': string;
|
|
30
|
-
'x-component': string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
view: {};
|
|
34
|
-
options: {
|
|
35
|
-
label: string;
|
|
36
|
-
key: string;
|
|
37
|
-
value: {
|
|
38
|
-
rejectOnFalse: boolean;
|
|
39
|
-
};
|
|
40
|
-
}[];
|
|
41
|
-
render(data: any): JSX.Element;
|
|
42
|
-
components: {
|
|
43
|
-
CalculationConfig: typeof CalculationConfig;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
export default _default;
|
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
2
|
-
|
|
3
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
4
|
-
|
|
5
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
-
|
|
7
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
-
|
|
9
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
10
|
-
|
|
11
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
|
-
|
|
13
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
14
|
-
|
|
15
|
-
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; }
|
|
16
|
-
|
|
17
|
-
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; }
|
|
18
|
-
|
|
19
|
-
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; }
|
|
20
|
-
|
|
21
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
22
|
-
|
|
23
|
-
import React from "react";
|
|
24
|
-
import { css, cx } from "@emotion/css";
|
|
25
|
-
import { Button, Select } from "antd";
|
|
26
|
-
import { CloseCircleOutlined } from '@ant-design/icons';
|
|
27
|
-
import { Trans, useTranslation } from "react-i18next";
|
|
28
|
-
import { NodeDefaultView } from ".";
|
|
29
|
-
import { Branch, useFlowContext } from "../WorkflowCanvas";
|
|
30
|
-
import { branchBlockClass, nodeSubtreeClass } from "../style";
|
|
31
|
-
import { Calculation } from "../calculators";
|
|
32
|
-
import { i18n } from "../../i18n"; // import { SchemaComponent } from "../../schema-component";
|
|
33
|
-
|
|
34
|
-
function CalculationItem(_ref) {
|
|
35
|
-
var value = _ref.value,
|
|
36
|
-
_onChange = _ref.onChange,
|
|
37
|
-
onRemove = _ref.onRemove;
|
|
38
|
-
|
|
39
|
-
if (!value) {
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
var calculator = value.calculator,
|
|
44
|
-
_value$operands = value.operands,
|
|
45
|
-
operands = _value$operands === void 0 ? [] : _value$operands;
|
|
46
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
47
|
-
className: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n position: relative;\n margin: .5em 0;\n "])))
|
|
48
|
-
}, value.group ? /*#__PURE__*/React.createElement(CalculationGroup, {
|
|
49
|
-
value: value.group,
|
|
50
|
-
onChange: function onChange(group) {
|
|
51
|
-
return _onChange(_objectSpread(_objectSpread({}, value), {}, {
|
|
52
|
-
group: group
|
|
53
|
-
}));
|
|
54
|
-
}
|
|
55
|
-
}) : /*#__PURE__*/React.createElement(Calculation, {
|
|
56
|
-
operands: operands,
|
|
57
|
-
calculator: calculator,
|
|
58
|
-
onChange: _onChange
|
|
59
|
-
}), /*#__PURE__*/React.createElement(Button, {
|
|
60
|
-
onClick: onRemove,
|
|
61
|
-
type: "link",
|
|
62
|
-
icon: /*#__PURE__*/React.createElement(CloseCircleOutlined, null)
|
|
63
|
-
}));
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function CalculationGroup(_ref2) {
|
|
67
|
-
var _this = this;
|
|
68
|
-
|
|
69
|
-
var value = _ref2.value,
|
|
70
|
-
_onChange2 = _ref2.onChange;
|
|
71
|
-
|
|
72
|
-
var _useTranslation = useTranslation(),
|
|
73
|
-
t = _useTranslation.t;
|
|
74
|
-
|
|
75
|
-
var _value$type = value.type,
|
|
76
|
-
type = _value$type === void 0 ? 'and' : _value$type,
|
|
77
|
-
_value$calculations = value.calculations,
|
|
78
|
-
calculations = _value$calculations === void 0 ? [] : _value$calculations;
|
|
79
|
-
|
|
80
|
-
function onAddSingle() {
|
|
81
|
-
_onChange2(_objectSpread(_objectSpread({}, value), {}, {
|
|
82
|
-
calculations: [].concat(_toConsumableArray(calculations), [{
|
|
83
|
-
not: false,
|
|
84
|
-
calculator: 'equal'
|
|
85
|
-
}])
|
|
86
|
-
}));
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
function onAddGroup() {
|
|
90
|
-
_onChange2(_objectSpread(_objectSpread({}, value), {}, {
|
|
91
|
-
calculations: [].concat(_toConsumableArray(calculations), [{
|
|
92
|
-
not: false,
|
|
93
|
-
group: {
|
|
94
|
-
type: 'and',
|
|
95
|
-
calculations: []
|
|
96
|
-
}
|
|
97
|
-
}])
|
|
98
|
-
}));
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
function _onRemove(i) {
|
|
102
|
-
calculations.splice(i, 1);
|
|
103
|
-
|
|
104
|
-
_onChange2(_objectSpread(_objectSpread({}, value), {}, {
|
|
105
|
-
calculations: _toConsumableArray(calculations)
|
|
106
|
-
}));
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
function onItemChange(i, v) {
|
|
110
|
-
calculations.splice(i, 1, v);
|
|
111
|
-
|
|
112
|
-
_onChange2(_objectSpread(_objectSpread({}, value), {}, {
|
|
113
|
-
calculations: _toConsumableArray(calculations)
|
|
114
|
-
}));
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
118
|
-
className: cx('node-type-condition-group', css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n width: 100%;\n\n .node-type-condition-group{\n padding: .5em 1em;\n border: 1px dashed #ddd;\n }\n\n + button{\n position: absolute;\n right: 0;\n }\n "]))))
|
|
119
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
120
|
-
className: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n gap: .5em;\n\n .ant-select{\n width: auto;\n min-width: 6em;\n }\n "])))
|
|
121
|
-
}, /*#__PURE__*/React.createElement(Trans, null, 'Meet ', /*#__PURE__*/React.createElement(Select, {
|
|
122
|
-
value: type,
|
|
123
|
-
onChange: function onChange(t) {
|
|
124
|
-
return _onChange2(_objectSpread(_objectSpread({}, value), {}, {
|
|
125
|
-
type: t
|
|
126
|
-
}));
|
|
127
|
-
}
|
|
128
|
-
}, /*#__PURE__*/React.createElement(Select.Option, {
|
|
129
|
-
value: "and"
|
|
130
|
-
}, "All"), /*#__PURE__*/React.createElement(Select.Option, {
|
|
131
|
-
value: "or"
|
|
132
|
-
}, "Any")), ' conditions in the group')), /*#__PURE__*/React.createElement("div", {
|
|
133
|
-
className: "calculation-items"
|
|
134
|
-
}, calculations.map(function (calculation, i) {
|
|
135
|
-
return /*#__PURE__*/React.createElement(CalculationItem, {
|
|
136
|
-
key: "".concat(calculation.calculator, "_").concat(i),
|
|
137
|
-
value: calculation,
|
|
138
|
-
onChange: onItemChange.bind(_this, i),
|
|
139
|
-
onRemove: function onRemove() {
|
|
140
|
-
return _onRemove(i);
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
144
|
-
className: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n button{\n padding: 0;\n\n &:not(:last-child){\n margin-right: 1em;\n }\n }\n "])))
|
|
145
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
146
|
-
type: "link",
|
|
147
|
-
onClick: onAddSingle
|
|
148
|
-
}, t('Add condition')), /*#__PURE__*/React.createElement(Button, {
|
|
149
|
-
type: "link",
|
|
150
|
-
onClick: onAddGroup
|
|
151
|
-
}, t('Add condition group'))));
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
function CalculationConfig(_ref3) {
|
|
155
|
-
var value = _ref3.value,
|
|
156
|
-
_onChange3 = _ref3.onChange;
|
|
157
|
-
var rule = value && Object.keys(value).length ? value : {
|
|
158
|
-
group: {
|
|
159
|
-
type: 'and',
|
|
160
|
-
calculations: []
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
return /*#__PURE__*/React.createElement(CalculationGroup, {
|
|
164
|
-
value: rule.group,
|
|
165
|
-
onChange: function onChange(group) {
|
|
166
|
-
return _onChange3(_objectSpread(_objectSpread({}, rule), {}, {
|
|
167
|
-
group: group
|
|
168
|
-
}));
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
export default {
|
|
174
|
-
title: '{{t("Condition")}}',
|
|
175
|
-
type: 'condition',
|
|
176
|
-
group: 'control',
|
|
177
|
-
fieldset: {
|
|
178
|
-
'config.rejectOnFalse': {
|
|
179
|
-
type: 'boolean',
|
|
180
|
-
name: 'config.rejectOnFalse',
|
|
181
|
-
title: '{{t("Mode")}}',
|
|
182
|
-
'x-decorator': 'FormItem',
|
|
183
|
-
'x-component': 'Radio.Group',
|
|
184
|
-
'x-component-props': {
|
|
185
|
-
disabled: true
|
|
186
|
-
},
|
|
187
|
-
enum: [{
|
|
188
|
-
value: true,
|
|
189
|
-
label: i18n.t('Continue when "Yes"')
|
|
190
|
-
}, {
|
|
191
|
-
value: false,
|
|
192
|
-
label: i18n.t('Branch into "Yes" and "No"')
|
|
193
|
-
}]
|
|
194
|
-
},
|
|
195
|
-
'config.calculation': {
|
|
196
|
-
type: 'string',
|
|
197
|
-
name: 'config.calculation',
|
|
198
|
-
title: '{{t("Conditions")}}',
|
|
199
|
-
'x-decorator': 'FormItem',
|
|
200
|
-
'x-component': 'CalculationConfig'
|
|
201
|
-
}
|
|
202
|
-
},
|
|
203
|
-
view: {},
|
|
204
|
-
options: [{
|
|
205
|
-
label: i18n.t('Continue when "Yes"'),
|
|
206
|
-
key: 'rejectOnFalse',
|
|
207
|
-
value: {
|
|
208
|
-
rejectOnFalse: true
|
|
209
|
-
}
|
|
210
|
-
}, {
|
|
211
|
-
label: i18n.t('Branch into "Yes" and "No"'),
|
|
212
|
-
key: 'branch',
|
|
213
|
-
value: {
|
|
214
|
-
rejectOnFalse: false
|
|
215
|
-
}
|
|
216
|
-
}],
|
|
217
|
-
render: function render(data) {
|
|
218
|
-
var id = data.id,
|
|
219
|
-
rejectOnFalse = data.config.rejectOnFalse;
|
|
220
|
-
|
|
221
|
-
var _useFlowContext = useFlowContext(),
|
|
222
|
-
nodes = _useFlowContext.nodes;
|
|
223
|
-
|
|
224
|
-
var trueEntry = nodes.find(function (item) {
|
|
225
|
-
return item.upstreamId === id && item.branchIndex === 1;
|
|
226
|
-
});
|
|
227
|
-
var falseEntry = nodes.find(function (item) {
|
|
228
|
-
return item.upstreamId === id && item.branchIndex === 0;
|
|
229
|
-
});
|
|
230
|
-
return /*#__PURE__*/React.createElement(NodeDefaultView, {
|
|
231
|
-
data: data
|
|
232
|
-
}, rejectOnFalse ? null : /*#__PURE__*/React.createElement("div", {
|
|
233
|
-
className: cx(nodeSubtreeClass)
|
|
234
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
235
|
-
className: cx(branchBlockClass, css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n > * > .workflow-branch-lines{\n > button{\n display: none;\n }\n }\n "]))))
|
|
236
|
-
}, /*#__PURE__*/React.createElement(Branch, {
|
|
237
|
-
from: data,
|
|
238
|
-
entry: falseEntry,
|
|
239
|
-
branchIndex: 0
|
|
240
|
-
}), /*#__PURE__*/React.createElement(Branch, {
|
|
241
|
-
from: data,
|
|
242
|
-
entry: trueEntry,
|
|
243
|
-
branchIndex: 1
|
|
244
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
245
|
-
className: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n position: relative;\n height: 2em;\n overflow: visible;\n\n > span{\n position: absolute;\n top: calc(1.5em - 1px);\n line-height: 1em;\n color: #999;\n background-color: #f0f2f5;\n padding: 1px;\n }\n "])))
|
|
246
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
247
|
-
className: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["right: 4em;"])))
|
|
248
|
-
}, i18n.t('No')), /*#__PURE__*/React.createElement("span", {
|
|
249
|
-
className: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["left: 4em;"])))
|
|
250
|
-
}, i18n.t('Yes')))));
|
|
251
|
-
},
|
|
252
|
-
components: {
|
|
253
|
-
CalculationConfig: CalculationConfig
|
|
254
|
-
}
|
|
255
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useCollectionDataSource } from '../..';
|
|
3
|
-
declare const _default: {
|
|
4
|
-
title: string;
|
|
5
|
-
type: string;
|
|
6
|
-
group: string;
|
|
7
|
-
fieldset: {
|
|
8
|
-
'config.collection': {
|
|
9
|
-
name: string;
|
|
10
|
-
type: string;
|
|
11
|
-
title: 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.values': {
|
|
21
|
-
type: string;
|
|
22
|
-
title: string;
|
|
23
|
-
name: string;
|
|
24
|
-
'x-decorator': string;
|
|
25
|
-
'x-decorator-props': {
|
|
26
|
-
labelAlign: string;
|
|
27
|
-
className: string;
|
|
28
|
-
};
|
|
29
|
-
'x-component': string;
|
|
30
|
-
description: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
view: {};
|
|
34
|
-
scope: {
|
|
35
|
-
useCollectionDataSource: typeof useCollectionDataSource;
|
|
36
|
-
};
|
|
37
|
-
components: {
|
|
38
|
-
CollectionFieldset: React.MemoExoticComponent<React.FunctionComponent<Pick<any, string | number | symbol>>>;
|
|
39
|
-
};
|
|
40
|
-
getter({ type, options, onChange }: {
|
|
41
|
-
type: any;
|
|
42
|
-
options: any;
|
|
43
|
-
onChange: any;
|
|
44
|
-
}): JSX.Element;
|
|
45
|
-
};
|
|
46
|
-
export default _default;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
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; }
|
|
2
|
-
|
|
3
|
-
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; }
|
|
4
|
-
|
|
5
|
-
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; }
|
|
6
|
-
|
|
7
|
-
import { Select } from 'antd';
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import { useTranslation } from 'react-i18next';
|
|
10
|
-
import { useCollectionDataSource, useCollectionManager, useCompile } from '../..';
|
|
11
|
-
import { BaseTypeSet, CollectionFieldset } from '../calculators';
|
|
12
|
-
import { collection, values } from '../schemas/collection';
|
|
13
|
-
import { useFlowContext } from '../WorkflowCanvas';
|
|
14
|
-
export default {
|
|
15
|
-
title: '{{t("Create record")}}',
|
|
16
|
-
type: 'create',
|
|
17
|
-
group: 'collection',
|
|
18
|
-
fieldset: {
|
|
19
|
-
'config.collection': _objectSpread(_objectSpread({}, collection), {}, {
|
|
20
|
-
name: 'config.collection'
|
|
21
|
-
}),
|
|
22
|
-
// multiple: {
|
|
23
|
-
// type: 'boolean',
|
|
24
|
-
// title: '多条数据',
|
|
25
|
-
// name: 'multiple',
|
|
26
|
-
// 'x-decorator': 'FormItem',
|
|
27
|
-
// 'x-component': 'Checkbox',
|
|
28
|
-
// 'x-component-props': {
|
|
29
|
-
// disabled: true
|
|
30
|
-
// }
|
|
31
|
-
// },
|
|
32
|
-
'config.params.values': values
|
|
33
|
-
},
|
|
34
|
-
view: {},
|
|
35
|
-
scope: {
|
|
36
|
-
useCollectionDataSource: useCollectionDataSource
|
|
37
|
-
},
|
|
38
|
-
components: {
|
|
39
|
-
CollectionFieldset: CollectionFieldset
|
|
40
|
-
},
|
|
41
|
-
getter: function getter(_ref) {
|
|
42
|
-
var _collections$find;
|
|
43
|
-
|
|
44
|
-
var type = _ref.type,
|
|
45
|
-
options = _ref.options,
|
|
46
|
-
_onChange = _ref.onChange;
|
|
47
|
-
|
|
48
|
-
var _useTranslation = useTranslation(),
|
|
49
|
-
t = _useTranslation.t;
|
|
50
|
-
|
|
51
|
-
var compile = useCompile();
|
|
52
|
-
|
|
53
|
-
var _useCollectionManager = useCollectionManager(),
|
|
54
|
-
_useCollectionManager2 = _useCollectionManager.collections,
|
|
55
|
-
collections = _useCollectionManager2 === void 0 ? [] : _useCollectionManager2;
|
|
56
|
-
|
|
57
|
-
var _useFlowContext = useFlowContext(),
|
|
58
|
-
nodes = _useFlowContext.nodes;
|
|
59
|
-
|
|
60
|
-
var _nodes$find = nodes.find(function (n) {
|
|
61
|
-
return n.id == options.nodeId;
|
|
62
|
-
}),
|
|
63
|
-
config = _nodes$find.config;
|
|
64
|
-
|
|
65
|
-
var collection = (_collections$find = collections.find(function (item) {
|
|
66
|
-
return item.name === config.collection;
|
|
67
|
-
})) !== null && _collections$find !== void 0 ? _collections$find : {
|
|
68
|
-
fields: []
|
|
69
|
-
};
|
|
70
|
-
return /*#__PURE__*/React.createElement(Select, {
|
|
71
|
-
value: options.path,
|
|
72
|
-
placeholder: t('Fields'),
|
|
73
|
-
onChange: function onChange(path) {
|
|
74
|
-
_onChange({
|
|
75
|
-
type: type,
|
|
76
|
-
options: _objectSpread(_objectSpread({}, options), {}, {
|
|
77
|
-
path: path
|
|
78
|
-
})
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
}, collection.fields.filter(function (field) {
|
|
82
|
-
return BaseTypeSet.has(field.uiSchema.type);
|
|
83
|
-
}).map(function (field) {
|
|
84
|
-
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
85
|
-
key: field.name,
|
|
86
|
-
value: field.name
|
|
87
|
-
}, compile(field.uiSchema.title));
|
|
88
|
-
}));
|
|
89
|
-
}
|
|
90
|
-
};
|
|
@@ -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,37 +0,0 @@
|
|
|
1
|
-
import Duration from "../components/Duration";
|
|
2
|
-
export default {
|
|
3
|
-
title: '{{t("Delay")}}',
|
|
4
|
-
type: 'delay',
|
|
5
|
-
group: 'control',
|
|
6
|
-
fieldset: {
|
|
7
|
-
'config.duration': {
|
|
8
|
-
type: 'number',
|
|
9
|
-
name: 'config.duration',
|
|
10
|
-
title: '{{t("Duration")}}',
|
|
11
|
-
'x-decorator': 'FormItem',
|
|
12
|
-
'x-component': 'Duration'
|
|
13
|
-
},
|
|
14
|
-
'config.endStatus': {
|
|
15
|
-
type: 'number',
|
|
16
|
-
name: 'config.endStatus',
|
|
17
|
-
title: '{{t("End Status")}}',
|
|
18
|
-
'x-decorator': 'FormItem',
|
|
19
|
-
'x-component': 'Select',
|
|
20
|
-
'x-component-props': {
|
|
21
|
-
placeholder: '{{t("Select status")}}'
|
|
22
|
-
},
|
|
23
|
-
enum: [{
|
|
24
|
-
label: '{{t("Succeed and continue")}}',
|
|
25
|
-
value: 1
|
|
26
|
-
}, {
|
|
27
|
-
label: '{{t("Fail and exit")}}',
|
|
28
|
-
value: -1
|
|
29
|
-
}]
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
view: {},
|
|
33
|
-
scope: {},
|
|
34
|
-
components: {
|
|
35
|
-
Duration: Duration
|
|
36
|
-
}
|
|
37
|
-
};
|