@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,24 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
type: string;
|
|
5
|
-
group: string;
|
|
6
|
-
fieldset: {
|
|
7
|
-
'config.mode': {
|
|
8
|
-
type: string;
|
|
9
|
-
name: string;
|
|
10
|
-
title: string;
|
|
11
|
-
'x-decorator': string;
|
|
12
|
-
'x-component': string;
|
|
13
|
-
'x-component-props': {};
|
|
14
|
-
enum: {
|
|
15
|
-
value: string;
|
|
16
|
-
label: JSX.Element;
|
|
17
|
-
}[];
|
|
18
|
-
default: string;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
view: {};
|
|
22
|
-
render(data: any): JSX.Element;
|
|
23
|
-
};
|
|
24
|
-
export default _default;
|
|
@@ -1,155 +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.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
|
-
var _css = require("@emotion/css");
|
|
13
|
-
|
|
14
|
-
var _icons = require("@ant-design/icons");
|
|
15
|
-
|
|
16
|
-
var _2 = require(".");
|
|
17
|
-
|
|
18
|
-
var _WorkflowCanvas = require("../WorkflowCanvas");
|
|
19
|
-
|
|
20
|
-
var _style = require("../style");
|
|
21
|
-
|
|
22
|
-
var _antd = require("antd");
|
|
23
|
-
|
|
24
|
-
var _i18n = require("../../i18n");
|
|
25
|
-
|
|
26
|
-
var _reactI18next = require("react-i18next");
|
|
27
|
-
|
|
28
|
-
var _templateObject, _templateObject2, _templateObject3;
|
|
29
|
-
|
|
30
|
-
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); }
|
|
31
|
-
|
|
32
|
-
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; }
|
|
33
|
-
|
|
34
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
35
|
-
|
|
36
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
37
|
-
|
|
38
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
39
|
-
|
|
40
|
-
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); }
|
|
41
|
-
|
|
42
|
-
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; }
|
|
43
|
-
|
|
44
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
45
|
-
|
|
46
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
|
-
|
|
48
|
-
// import { SchemaComponent } from "../../schema-component";
|
|
49
|
-
var _default = {
|
|
50
|
-
title: '{{t("Parallel branch")}}',
|
|
51
|
-
type: 'parallel',
|
|
52
|
-
group: 'control',
|
|
53
|
-
fieldset: {
|
|
54
|
-
'config.mode': {
|
|
55
|
-
type: 'string',
|
|
56
|
-
name: 'config.mode',
|
|
57
|
-
title: '{{t("Mode")}}',
|
|
58
|
-
'x-decorator': 'FormItem',
|
|
59
|
-
'x-component': 'Radio.Group',
|
|
60
|
-
'x-component-props': {},
|
|
61
|
-
enum: [{
|
|
62
|
-
value: 'all',
|
|
63
|
-
label: /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
64
|
-
title: _i18n.i18n.t('Continue after all branches succeeded'),
|
|
65
|
-
placement: "bottom"
|
|
66
|
-
}, _i18n.i18n.t('All succeeded'), " ", /*#__PURE__*/_react.default.createElement(_icons.QuestionCircleOutlined, {
|
|
67
|
-
style: {
|
|
68
|
-
color: '#999'
|
|
69
|
-
}
|
|
70
|
-
}))
|
|
71
|
-
}, {
|
|
72
|
-
value: 'any',
|
|
73
|
-
label: /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
74
|
-
title: _i18n.i18n.t('Continue after any branch succeeded'),
|
|
75
|
-
placement: "bottom"
|
|
76
|
-
}, _i18n.i18n.t('Any succeeded'), " ", /*#__PURE__*/_react.default.createElement(_icons.QuestionCircleOutlined, {
|
|
77
|
-
style: {
|
|
78
|
-
color: '#999'
|
|
79
|
-
}
|
|
80
|
-
}))
|
|
81
|
-
} // { value: 'race', label: '任意退出' },
|
|
82
|
-
],
|
|
83
|
-
default: 'all'
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
view: {},
|
|
87
|
-
render: function render(data) {
|
|
88
|
-
var id = data.id,
|
|
89
|
-
mode = data.config.mode;
|
|
90
|
-
|
|
91
|
-
var _useTranslation = (0, _reactI18next.useTranslation)(),
|
|
92
|
-
t = _useTranslation.t;
|
|
93
|
-
|
|
94
|
-
var _useFlowContext = (0, _WorkflowCanvas.useFlowContext)(),
|
|
95
|
-
nodes = _useFlowContext.nodes;
|
|
96
|
-
|
|
97
|
-
var branches = nodes.reduce(function (result, node) {
|
|
98
|
-
if (node.upstreamId === id && node.branchIndex != null) {
|
|
99
|
-
return result.concat(node);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
return result;
|
|
103
|
-
}, []).sort(function (a, b) {
|
|
104
|
-
return a.branchIndex - b.branchIndex;
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
var _useState = (0, _react.useState)(Math.max(2, branches.length)),
|
|
108
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
109
|
-
branchCount = _useState2[0],
|
|
110
|
-
setBranchCount = _useState2[1];
|
|
111
|
-
|
|
112
|
-
var tempBranches = Array(Math.max(0, branchCount - branches.length)).fill(null);
|
|
113
|
-
var lastBranchHead = branches[branches.length - 1];
|
|
114
|
-
return /*#__PURE__*/_react.default.createElement(_2.NodeDefaultView, {
|
|
115
|
-
data: data
|
|
116
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
117
|
-
className: (0, _css.cx)(_style.nodeSubtreeClass)
|
|
118
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
119
|
-
className: (0, _css.cx)(_style.branchBlockClass)
|
|
120
|
-
}, branches.map(function (branch) {
|
|
121
|
-
return /*#__PURE__*/_react.default.createElement(_WorkflowCanvas.Branch, {
|
|
122
|
-
key: branch.id,
|
|
123
|
-
from: data,
|
|
124
|
-
entry: branch,
|
|
125
|
-
branchIndex: branch.branchIndex
|
|
126
|
-
});
|
|
127
|
-
}), tempBranches.map(function (_, i) {
|
|
128
|
-
return /*#__PURE__*/_react.default.createElement(_WorkflowCanvas.Branch, {
|
|
129
|
-
key: "temp_".concat(branches.length + i),
|
|
130
|
-
from: data,
|
|
131
|
-
branchIndex: (lastBranchHead ? lastBranchHead.branchIndex : 0) + i + 1,
|
|
132
|
-
controller: branches.length + i > 1 ? /*#__PURE__*/_react.default.createElement("div", {
|
|
133
|
-
className: (0, _css.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding-top: 2em;\n\n > button{\n .anticon{\n transform: rotate(45deg)\n }\n }\n "])))
|
|
134
|
-
}, /*#__PURE__*/_react.default.createElement(_antd.Button, {
|
|
135
|
-
shape: "circle",
|
|
136
|
-
icon: /*#__PURE__*/_react.default.createElement(_icons.PlusOutlined, null),
|
|
137
|
-
onClick: function onClick() {
|
|
138
|
-
return setBranchCount(branchCount - 1);
|
|
139
|
-
}
|
|
140
|
-
})) : null
|
|
141
|
-
});
|
|
142
|
-
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
143
|
-
className: (0, _css.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n height: 2em;\n "])))
|
|
144
|
-
}, /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
145
|
-
title: t('Add branch')
|
|
146
|
-
}, /*#__PURE__*/_react.default.createElement(_antd.Button, {
|
|
147
|
-
icon: /*#__PURE__*/_react.default.createElement(_icons.PlusOutlined, null),
|
|
148
|
-
className: (0, _css.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n top: calc(50% - 1px);\n transform: translateX(-50%) rotate(45deg);\n\n .anticon{\n transform: rotate(-45deg);\n }\n "]))),
|
|
149
|
-
onClick: function onClick() {
|
|
150
|
-
return setBranchCount(branchCount + 1);
|
|
151
|
-
}
|
|
152
|
-
})))));
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
exports.default = _default;
|
|
@@ -1,70 +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.multiple': {
|
|
21
|
-
type: string;
|
|
22
|
-
title: string;
|
|
23
|
-
name: string;
|
|
24
|
-
'x-decorator': string;
|
|
25
|
-
'x-component': string;
|
|
26
|
-
'x-component-props': {
|
|
27
|
-
disabled: boolean;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
'config.params': {
|
|
31
|
-
type: string;
|
|
32
|
-
name: string;
|
|
33
|
-
title: string;
|
|
34
|
-
'x-decorator': string;
|
|
35
|
-
properties: {
|
|
36
|
-
filter: {
|
|
37
|
-
type: string;
|
|
38
|
-
title: string;
|
|
39
|
-
name: string;
|
|
40
|
-
'x-decorator': string;
|
|
41
|
-
'x-decorator-props': {
|
|
42
|
-
labelAlign: string;
|
|
43
|
-
className: string;
|
|
44
|
-
};
|
|
45
|
-
'x-component': string;
|
|
46
|
-
'x-component-props': {
|
|
47
|
-
useProps(): {
|
|
48
|
-
options: any[];
|
|
49
|
-
className: string;
|
|
50
|
-
};
|
|
51
|
-
dynamicComponent: string;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
view: {};
|
|
58
|
-
scope: {
|
|
59
|
-
useCollectionDataSource: typeof useCollectionDataSource;
|
|
60
|
-
};
|
|
61
|
-
components: {
|
|
62
|
-
VariableComponent: typeof VariableComponent;
|
|
63
|
-
};
|
|
64
|
-
getter({ type, options, onChange }: {
|
|
65
|
-
type: any;
|
|
66
|
-
options: any;
|
|
67
|
-
onChange: any;
|
|
68
|
-
}): JSX.Element;
|
|
69
|
-
};
|
|
70
|
-
export default _default;
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _antd = require("antd");
|
|
11
|
-
|
|
12
|
-
var _ = require("../..");
|
|
13
|
-
|
|
14
|
-
var _WorkflowCanvas = require("../WorkflowCanvas");
|
|
15
|
-
|
|
16
|
-
var _calculators = require("../calculators");
|
|
17
|
-
|
|
18
|
-
var _collection = require("../schemas/collection");
|
|
19
|
-
|
|
20
|
-
var _reactI18next = require("react-i18next");
|
|
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("Query record")}}',
|
|
32
|
-
type: 'query',
|
|
33
|
-
group: 'collection',
|
|
34
|
-
fieldset: {
|
|
35
|
-
'config.collection': _collection.collection,
|
|
36
|
-
'config.multiple': {
|
|
37
|
-
type: 'boolean',
|
|
38
|
-
title: '{{t("Multiple records")}}',
|
|
39
|
-
name: 'config.multiple',
|
|
40
|
-
'x-decorator': 'FormItem',
|
|
41
|
-
'x-component': 'Checkbox',
|
|
42
|
-
'x-component-props': {
|
|
43
|
-
disabled: true
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
'config.params': {
|
|
47
|
-
type: 'object',
|
|
48
|
-
name: 'config.params',
|
|
49
|
-
title: '',
|
|
50
|
-
'x-decorator': 'FormItem',
|
|
51
|
-
properties: {
|
|
52
|
-
filter: _collection.filter
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
view: {},
|
|
57
|
-
scope: {
|
|
58
|
-
useCollectionDataSource: _.useCollectionDataSource
|
|
59
|
-
},
|
|
60
|
-
components: {
|
|
61
|
-
VariableComponent: _calculators.VariableComponent
|
|
62
|
-
},
|
|
63
|
-
getter: function getter(_ref) {
|
|
64
|
-
var _collections$find;
|
|
65
|
-
|
|
66
|
-
var type = _ref.type,
|
|
67
|
-
options = _ref.options,
|
|
68
|
-
_onChange = _ref.onChange;
|
|
69
|
-
|
|
70
|
-
var _useTranslation = (0, _reactI18next.useTranslation)(),
|
|
71
|
-
t = _useTranslation.t;
|
|
72
|
-
|
|
73
|
-
var compile = (0, _.useCompile)();
|
|
74
|
-
|
|
75
|
-
var _useCollectionManager = (0, _.useCollectionManager)(),
|
|
76
|
-
_useCollectionManager2 = _useCollectionManager.collections,
|
|
77
|
-
collections = _useCollectionManager2 === void 0 ? [] : _useCollectionManager2;
|
|
78
|
-
|
|
79
|
-
var _useFlowContext = (0, _WorkflowCanvas.useFlowContext)(),
|
|
80
|
-
nodes = _useFlowContext.nodes;
|
|
81
|
-
|
|
82
|
-
var _nodes$find = nodes.find(function (n) {
|
|
83
|
-
return n.id == options.nodeId;
|
|
84
|
-
}),
|
|
85
|
-
config = _nodes$find.config;
|
|
86
|
-
|
|
87
|
-
var collection = (_collections$find = collections.find(function (item) {
|
|
88
|
-
return item.name === config.collection;
|
|
89
|
-
})) !== null && _collections$find !== void 0 ? _collections$find : {
|
|
90
|
-
fields: []
|
|
91
|
-
};
|
|
92
|
-
return /*#__PURE__*/_react.default.createElement(_antd.Select, {
|
|
93
|
-
value: options.path,
|
|
94
|
-
placeholder: t('Fields'),
|
|
95
|
-
onChange: function onChange(path) {
|
|
96
|
-
_onChange({
|
|
97
|
-
type: type,
|
|
98
|
-
options: _objectSpread(_objectSpread({}, options), {}, {
|
|
99
|
-
path: path
|
|
100
|
-
})
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
}, collection.fields.filter(function (field) {
|
|
104
|
-
var _field$uiSchema;
|
|
105
|
-
|
|
106
|
-
return _calculators.BaseTypeSet.has((_field$uiSchema = field.uiSchema) === null || _field$uiSchema === void 0 ? void 0 : _field$uiSchema.type);
|
|
107
|
-
}).map(function (field) {
|
|
108
|
-
return /*#__PURE__*/_react.default.createElement(_antd.Select.Option, {
|
|
109
|
-
key: field.name,
|
|
110
|
-
value: field.name
|
|
111
|
-
}, compile(field.uiSchema.title));
|
|
112
|
-
}));
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
exports.default = _default;
|
|
@@ -1,60 +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.filter': {
|
|
21
|
-
title: string;
|
|
22
|
-
type: string;
|
|
23
|
-
name: string;
|
|
24
|
-
'x-decorator': string;
|
|
25
|
-
'x-decorator-props': {
|
|
26
|
-
labelAlign: string;
|
|
27
|
-
className: string;
|
|
28
|
-
};
|
|
29
|
-
'x-component': string;
|
|
30
|
-
'x-component-props': {
|
|
31
|
-
useProps(): {
|
|
32
|
-
options: any[];
|
|
33
|
-
className: string;
|
|
34
|
-
};
|
|
35
|
-
dynamicComponent: string;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
'config.params.values': {
|
|
39
|
-
type: string;
|
|
40
|
-
title: string;
|
|
41
|
-
name: string;
|
|
42
|
-
'x-decorator': string;
|
|
43
|
-
'x-decorator-props': {
|
|
44
|
-
labelAlign: string;
|
|
45
|
-
className: string;
|
|
46
|
-
};
|
|
47
|
-
'x-component': string;
|
|
48
|
-
description: string;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
view: {};
|
|
52
|
-
scope: {
|
|
53
|
-
useCollectionDataSource: typeof useCollectionDataSource;
|
|
54
|
-
};
|
|
55
|
-
components: {
|
|
56
|
-
VariableComponent: typeof VariableComponent;
|
|
57
|
-
CollectionFieldset: import("react").MemoExoticComponent<import("react").FunctionComponent<Pick<any, string | number | symbol>>>;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
export default _default;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export declare const collection: {
|
|
2
|
-
type: string;
|
|
3
|
-
title: string;
|
|
4
|
-
name: string;
|
|
5
|
-
required: boolean;
|
|
6
|
-
'x-reactions': string[];
|
|
7
|
-
'x-decorator': string;
|
|
8
|
-
'x-component': string;
|
|
9
|
-
'x-component-props': {
|
|
10
|
-
placeholder: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export declare const values: {
|
|
14
|
-
type: string;
|
|
15
|
-
title: string;
|
|
16
|
-
name: string;
|
|
17
|
-
'x-decorator': string;
|
|
18
|
-
'x-decorator-props': {
|
|
19
|
-
labelAlign: string;
|
|
20
|
-
className: string;
|
|
21
|
-
};
|
|
22
|
-
'x-component': string;
|
|
23
|
-
description: string;
|
|
24
|
-
};
|
|
25
|
-
export declare const filter: {
|
|
26
|
-
type: string;
|
|
27
|
-
title: string;
|
|
28
|
-
name: string;
|
|
29
|
-
'x-decorator': string;
|
|
30
|
-
'x-decorator-props': {
|
|
31
|
-
labelAlign: string;
|
|
32
|
-
className: string;
|
|
33
|
-
};
|
|
34
|
-
'x-component': string;
|
|
35
|
-
'x-component-props': {
|
|
36
|
-
useProps(): {
|
|
37
|
-
options: any[];
|
|
38
|
-
className: string;
|
|
39
|
-
};
|
|
40
|
-
dynamicComponent: string;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.values = exports.filter = exports.collection = void 0;
|
|
7
|
-
|
|
8
|
-
var _css = require("@emotion/css");
|
|
9
|
-
|
|
10
|
-
var _react = require("@formily/react");
|
|
11
|
-
|
|
12
|
-
var _actionHooks = require("../../collection-manager/action-hooks");
|
|
13
|
-
|
|
14
|
-
var _templateObject, _templateObject2, _templateObject3;
|
|
15
|
-
|
|
16
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
17
|
-
|
|
18
|
-
var collection = {
|
|
19
|
-
type: 'string',
|
|
20
|
-
title: '{{t("Collection")}}',
|
|
21
|
-
name: 'config.collection',
|
|
22
|
-
required: true,
|
|
23
|
-
'x-reactions': ['{{useCollectionDataSource()}}'],
|
|
24
|
-
'x-decorator': 'FormItem',
|
|
25
|
-
'x-component': 'Select',
|
|
26
|
-
'x-component-props': {
|
|
27
|
-
placeholder: '{{t("Select collection")}}'
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
exports.collection = collection;
|
|
31
|
-
var values = {
|
|
32
|
-
type: 'object',
|
|
33
|
-
title: '{{t("Fields values")}}',
|
|
34
|
-
name: 'config.params.values',
|
|
35
|
-
'x-decorator': 'FormItem',
|
|
36
|
-
'x-decorator-props': {
|
|
37
|
-
labelAlign: 'left',
|
|
38
|
-
className: (0, _css.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex-direction: column;\n "])))
|
|
39
|
-
},
|
|
40
|
-
'x-component': 'CollectionFieldset',
|
|
41
|
-
description: '{{t("Fields that are not assigned a value will be set to the default value, and those that do not have a default value are set to null.")}}'
|
|
42
|
-
};
|
|
43
|
-
exports.values = values;
|
|
44
|
-
var filter = {
|
|
45
|
-
type: 'object',
|
|
46
|
-
title: '{{t("Filter")}}',
|
|
47
|
-
name: 'config.params.filter',
|
|
48
|
-
'x-decorator': 'FormItem',
|
|
49
|
-
'x-decorator-props': {
|
|
50
|
-
labelAlign: 'left',
|
|
51
|
-
className: (0, _css.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex-direction: column;\n "])))
|
|
52
|
-
},
|
|
53
|
-
'x-component': 'Filter',
|
|
54
|
-
'x-component-props': {
|
|
55
|
-
useProps: function useProps() {
|
|
56
|
-
var _values$config;
|
|
57
|
-
|
|
58
|
-
var _useForm = (0, _react.useForm)(),
|
|
59
|
-
values = _useForm.values;
|
|
60
|
-
|
|
61
|
-
var options = (0, _actionHooks.useCollectionFilterOptions)((_values$config = values.config) === null || _values$config === void 0 ? void 0 : _values$config.collection);
|
|
62
|
-
return {
|
|
63
|
-
options: options,
|
|
64
|
-
className: (0, _css.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n width: 100%;\n "])))
|
|
65
|
-
};
|
|
66
|
-
},
|
|
67
|
-
dynamicComponent: 'VariableComponent'
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
exports.filter = filter;
|