@nocobase/client 0.7.1-alpha.6 → 0.7.2-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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,334 +0,0 @@
|
|
|
1
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
-
|
|
3
|
-
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."); }
|
|
4
|
-
|
|
5
|
-
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); }
|
|
6
|
-
|
|
7
|
-
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; }
|
|
8
|
-
|
|
9
|
-
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; }
|
|
10
|
-
|
|
11
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
-
|
|
13
|
-
import { triggers } from '../triggers';
|
|
14
|
-
import { executionSchema } from './executions';
|
|
15
|
-
var collection = {
|
|
16
|
-
name: 'workflows',
|
|
17
|
-
fields: [{
|
|
18
|
-
type: 'string',
|
|
19
|
-
name: 'title',
|
|
20
|
-
interface: 'input',
|
|
21
|
-
uiSchema: {
|
|
22
|
-
title: '{{t("Name")}}',
|
|
23
|
-
type: 'string',
|
|
24
|
-
'x-component': 'Input',
|
|
25
|
-
required: true
|
|
26
|
-
}
|
|
27
|
-
}, {
|
|
28
|
-
type: 'string',
|
|
29
|
-
name: 'type',
|
|
30
|
-
interface: 'select',
|
|
31
|
-
uiSchema: {
|
|
32
|
-
title: '{{t("Trigger type")}}',
|
|
33
|
-
type: 'string',
|
|
34
|
-
'x-component': 'Select',
|
|
35
|
-
'x-decorator': 'FormItem',
|
|
36
|
-
enum: Array.from(triggers.getEntities()).map(function (_ref) {
|
|
37
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
38
|
-
value = _ref2[0],
|
|
39
|
-
title = _ref2[1].title;
|
|
40
|
-
|
|
41
|
-
return {
|
|
42
|
-
value: value,
|
|
43
|
-
label: title
|
|
44
|
-
};
|
|
45
|
-
}),
|
|
46
|
-
required: true
|
|
47
|
-
}
|
|
48
|
-
}, {
|
|
49
|
-
type: 'string',
|
|
50
|
-
name: 'description',
|
|
51
|
-
interface: 'textarea',
|
|
52
|
-
uiSchema: {
|
|
53
|
-
title: '{{t("Description")}}',
|
|
54
|
-
type: 'string',
|
|
55
|
-
'x-component': 'Input.TextArea'
|
|
56
|
-
}
|
|
57
|
-
}, {
|
|
58
|
-
type: 'boolean',
|
|
59
|
-
name: 'enabled',
|
|
60
|
-
interface: 'radio',
|
|
61
|
-
uiSchema: {
|
|
62
|
-
title: '{{t("Status")}}',
|
|
63
|
-
type: 'string',
|
|
64
|
-
enum: [{
|
|
65
|
-
label: '{{t("On")}}',
|
|
66
|
-
value: true
|
|
67
|
-
}, {
|
|
68
|
-
label: '{{t("Off")}}',
|
|
69
|
-
value: false
|
|
70
|
-
}],
|
|
71
|
-
'x-component': 'Radio.Group',
|
|
72
|
-
'x-decorator': 'FormItem',
|
|
73
|
-
default: false
|
|
74
|
-
}
|
|
75
|
-
}]
|
|
76
|
-
};
|
|
77
|
-
export var workflowSchema = {
|
|
78
|
-
type: 'object',
|
|
79
|
-
properties: {
|
|
80
|
-
provider: {
|
|
81
|
-
type: 'void',
|
|
82
|
-
'x-decorator': 'ResourceActionProvider',
|
|
83
|
-
'x-decorator-props': {
|
|
84
|
-
collection: collection,
|
|
85
|
-
resourceName: 'workflows',
|
|
86
|
-
request: {
|
|
87
|
-
resource: 'workflows',
|
|
88
|
-
action: 'list',
|
|
89
|
-
params: {
|
|
90
|
-
pageSize: 50,
|
|
91
|
-
filter: {
|
|
92
|
-
current: true
|
|
93
|
-
},
|
|
94
|
-
sort: ['createdAt'],
|
|
95
|
-
except: ['config']
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
'x-component': 'CollectionProvider',
|
|
100
|
-
'x-component-props': {
|
|
101
|
-
collection: collection
|
|
102
|
-
},
|
|
103
|
-
properties: {
|
|
104
|
-
actions: {
|
|
105
|
-
type: 'void',
|
|
106
|
-
'x-component': 'ActionBar',
|
|
107
|
-
'x-component-props': {
|
|
108
|
-
style: {
|
|
109
|
-
marginBottom: 16
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
properties: {
|
|
113
|
-
delete: {
|
|
114
|
-
type: 'void',
|
|
115
|
-
title: '{{t("Delete")}}',
|
|
116
|
-
'x-component': 'Action',
|
|
117
|
-
'x-component-props': {
|
|
118
|
-
useAction: '{{ cm.useBulkDestroyAction }}',
|
|
119
|
-
confirm: {
|
|
120
|
-
title: "{{t('Delete record')}}",
|
|
121
|
-
content: "{{t('Are you sure you want to delete it?')}}"
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
create: {
|
|
126
|
-
type: 'void',
|
|
127
|
-
title: '{{t("Add new")}}',
|
|
128
|
-
'x-component': 'Action',
|
|
129
|
-
'x-component-props': {
|
|
130
|
-
type: 'primary'
|
|
131
|
-
},
|
|
132
|
-
properties: {
|
|
133
|
-
drawer: {
|
|
134
|
-
type: 'void',
|
|
135
|
-
'x-component': 'Action.Drawer',
|
|
136
|
-
'x-decorator': 'Form',
|
|
137
|
-
'x-decorator-props': {
|
|
138
|
-
initialValue: {
|
|
139
|
-
current: true
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
title: '{{t("Add new")}}',
|
|
143
|
-
properties: {
|
|
144
|
-
title: {
|
|
145
|
-
'x-component': 'CollectionField',
|
|
146
|
-
'x-decorator': 'FormItem'
|
|
147
|
-
},
|
|
148
|
-
type: {
|
|
149
|
-
'x-component': 'CollectionField',
|
|
150
|
-
'x-decorator': 'FormItem'
|
|
151
|
-
},
|
|
152
|
-
description: {
|
|
153
|
-
'x-component': 'CollectionField',
|
|
154
|
-
'x-decorator': 'FormItem'
|
|
155
|
-
},
|
|
156
|
-
footer: {
|
|
157
|
-
type: 'void',
|
|
158
|
-
'x-component': 'Action.Drawer.Footer',
|
|
159
|
-
properties: {
|
|
160
|
-
cancel: {
|
|
161
|
-
title: '{{ t("Cancel") }}',
|
|
162
|
-
'x-component': 'Action',
|
|
163
|
-
'x-component-props': {
|
|
164
|
-
useAction: '{{ cm.useCancelAction }}'
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
submit: {
|
|
168
|
-
title: '{{ t("Submit") }}',
|
|
169
|
-
'x-component': 'Action',
|
|
170
|
-
'x-component-props': {
|
|
171
|
-
type: 'primary',
|
|
172
|
-
useAction: '{{ cm.useCreateAction }}'
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
},
|
|
183
|
-
table: {
|
|
184
|
-
type: 'void',
|
|
185
|
-
'x-component': 'Table.Void',
|
|
186
|
-
'x-component-props': {
|
|
187
|
-
rowKey: 'id',
|
|
188
|
-
rowSelection: {
|
|
189
|
-
type: 'checkbox'
|
|
190
|
-
},
|
|
191
|
-
useDataSource: '{{ cm.useDataSourceFromRAC }}'
|
|
192
|
-
},
|
|
193
|
-
properties: {
|
|
194
|
-
title: {
|
|
195
|
-
type: 'void',
|
|
196
|
-
'x-decorator': 'Table.Column.Decorator',
|
|
197
|
-
'x-component': 'Table.Column',
|
|
198
|
-
properties: {
|
|
199
|
-
title: {
|
|
200
|
-
type: 'string',
|
|
201
|
-
'x-component': 'CollectionField',
|
|
202
|
-
'x-read-pretty': true
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
},
|
|
206
|
-
type: {
|
|
207
|
-
type: 'void',
|
|
208
|
-
'x-decorator': 'Table.Column.Decorator',
|
|
209
|
-
'x-component': 'Table.Column',
|
|
210
|
-
properties: {
|
|
211
|
-
type: {
|
|
212
|
-
type: 'string',
|
|
213
|
-
'x-component': 'CollectionField',
|
|
214
|
-
'x-read-pretty': true
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
},
|
|
218
|
-
enabled: {
|
|
219
|
-
type: 'void',
|
|
220
|
-
'x-decorator': 'Table.Column.Decorator',
|
|
221
|
-
'x-component': 'Table.Column',
|
|
222
|
-
properties: {
|
|
223
|
-
enabled: {
|
|
224
|
-
type: 'boolean',
|
|
225
|
-
'x-component': 'CollectionField',
|
|
226
|
-
'x-read-pretty': true,
|
|
227
|
-
default: false
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
},
|
|
231
|
-
actions: {
|
|
232
|
-
type: 'void',
|
|
233
|
-
title: '{{ t("Actions") }}',
|
|
234
|
-
'x-component': 'Table.Column',
|
|
235
|
-
properties: {
|
|
236
|
-
actions: {
|
|
237
|
-
type: 'void',
|
|
238
|
-
'x-component': 'Space',
|
|
239
|
-
'x-component-props': {
|
|
240
|
-
split: '|'
|
|
241
|
-
},
|
|
242
|
-
properties: {
|
|
243
|
-
config: {
|
|
244
|
-
type: 'void',
|
|
245
|
-
'x-component': 'WorkflowLink'
|
|
246
|
-
},
|
|
247
|
-
executions: {
|
|
248
|
-
type: 'void',
|
|
249
|
-
title: '{{t("Execution History")}}',
|
|
250
|
-
'x-component': 'Action.Link',
|
|
251
|
-
'x-component-props': {
|
|
252
|
-
type: 'primary'
|
|
253
|
-
},
|
|
254
|
-
properties: {
|
|
255
|
-
drawer: {
|
|
256
|
-
type: 'void',
|
|
257
|
-
title: '{{t("Execution History")}}',
|
|
258
|
-
'x-component': 'Action.Drawer',
|
|
259
|
-
properties: executionSchema
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
},
|
|
263
|
-
update: {
|
|
264
|
-
type: 'void',
|
|
265
|
-
title: '{{ t("Edit") }}',
|
|
266
|
-
'x-component': 'Action.Link',
|
|
267
|
-
'x-component-props': {
|
|
268
|
-
type: 'primary'
|
|
269
|
-
},
|
|
270
|
-
properties: {
|
|
271
|
-
modal: {
|
|
272
|
-
type: 'void',
|
|
273
|
-
'x-component': 'Action.Modal',
|
|
274
|
-
'x-decorator': 'Form',
|
|
275
|
-
'x-decorator-props': {
|
|
276
|
-
useValues: '{{ cm.useValuesFromRecord }}'
|
|
277
|
-
},
|
|
278
|
-
title: '{{ t("Edit") }}',
|
|
279
|
-
properties: {
|
|
280
|
-
title: {
|
|
281
|
-
'x-component': 'CollectionField',
|
|
282
|
-
'x-decorator': 'FormItem'
|
|
283
|
-
},
|
|
284
|
-
enabled: {
|
|
285
|
-
'x-component': 'CollectionField',
|
|
286
|
-
'x-decorator': 'FormItem'
|
|
287
|
-
},
|
|
288
|
-
footer: {
|
|
289
|
-
type: 'void',
|
|
290
|
-
'x-component': 'Action.Modal.Footer',
|
|
291
|
-
properties: {
|
|
292
|
-
cancel: {
|
|
293
|
-
title: '{{ t("Cancel") }}',
|
|
294
|
-
'x-component': 'Action',
|
|
295
|
-
'x-component-props': {
|
|
296
|
-
useAction: '{{ cm.useCancelAction }}'
|
|
297
|
-
}
|
|
298
|
-
},
|
|
299
|
-
submit: {
|
|
300
|
-
title: '{{ t("Submit") }}',
|
|
301
|
-
'x-component': 'Action',
|
|
302
|
-
'x-component-props': {
|
|
303
|
-
type: 'primary',
|
|
304
|
-
useAction: '{{ cm.useUpdateAction }}'
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
} // delete: {
|
|
313
|
-
// type: 'void',
|
|
314
|
-
// title: '{{ t("Delete") }}',
|
|
315
|
-
// 'x-component': 'Action.Link',
|
|
316
|
-
// 'x-component-props': {
|
|
317
|
-
// confirm: {
|
|
318
|
-
// title: "{{t('Delete record')}}",
|
|
319
|
-
// content: "{{t('Are you sure you want to delete it?')}}",
|
|
320
|
-
// },
|
|
321
|
-
// useAction: '{{ cm.useDestroyActionAndRefreshCM }}',
|
|
322
|
-
// },
|
|
323
|
-
// },
|
|
324
|
-
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
};
|
package/es/workflow/style.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const workflowPageClass: string;
|
|
2
|
-
export declare const workflowVersionDropdownClass: string;
|
|
3
|
-
export declare const branchBlockClass: string;
|
|
4
|
-
export declare const branchClass: string;
|
|
5
|
-
export declare const nodeBlockClass: string;
|
|
6
|
-
export declare const nodeClass: string;
|
|
7
|
-
export declare const nodeCardClass: string;
|
|
8
|
-
export declare const nodeHeaderClass: string;
|
|
9
|
-
export declare const nodeMetaClass: string;
|
|
10
|
-
export declare const nodeTitleClass: string;
|
|
11
|
-
export declare const nodeSubtreeClass: string;
|
|
12
|
-
export declare const addButtonClass: string;
|
package/es/workflow/style.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
|
|
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 { css } from '@emotion/css';
|
|
6
|
-
export var workflowPageClass = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: 100%;\n width: 100%;\n overflow: auto;\n\n .workflow-toolbar{\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0.5rem 1rem;\n background: #fff;\n\n header{\n display: flex;\n align-items: center;\n gap: .5em;\n }\n\n aside{\n display: flex;\n align-items: center;\n gap: .5em;\n }\n }\n\n .workflow-canvas{\n width: min-content;\n min-width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 2em;\n }\n"])));
|
|
7
|
-
export var workflowVersionDropdownClass = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ant-dropdown-menu-item{\n\n &.unexecuted{\n font-style: italic;\n }\n\n .ant-dropdown-menu-title-content{\n text-align: right;\n\n time{\n margin-left: 0.5rem;\n color: #999;\n font-size: 80%;\n }\n }\n }\n"])));
|
|
8
|
-
export var branchBlockClass = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n position: relative;\n\n :before{\n content: \"\";\n position: absolute;\n top: 0;\n bottom: 0;\n left: calc(50% - .5px);\n width: 1px;\n background-color: #f0f2f5;\n }\n"])));
|
|
9
|
-
export var branchClass = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n align-items: center;\n position: relative;\n padding: 0 2em;\n\n .workflow-node-list{\n flex-grow: 1;\n min-width: 20em;\n }\n\n .workflow-branch-lines{\n position: absolute;\n top: 0;\n bottom: 0;\n width: 1px;\n background-color: #ddd;\n }\n\n :before,:after{\n content: \"\";\n position: absolute;\n height: 1px;\n background-color: #ddd;\n }\n\n :before{\n top: 0;\n }\n\n :after{\n bottom: 0;\n }\n\n :not(:first-child):not(:last-child){\n :before,:after{\n left: 0;\n width: 100%;\n }\n }\n\n :last-child:not(:first-child){\n :before,:after{\n right: 50%;\n width: 50%;\n }\n }\n\n :first-child:not(:last-child){\n :before,:after{\n left: 50%;\n width: 50%;\n }\n }\n"])));
|
|
10
|
-
export var nodeBlockClass = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n flex-grow: 1;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n position: relative;\n"])));
|
|
11
|
-
export var nodeClass = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n"])));
|
|
12
|
-
export var nodeCardClass = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n width: 20em;\n background: #fff;\n padding: 1em;\n box-shadow: 0 .25em .5em rgba(0, 0, 0, .1);\n\n .workflow-node-remove-button{\n position: absolute;\n right: -.5em;\n top: -.5em;\n color: #999;\n opacity: 0;\n transition: opacity .3s ease;\n\n &[disabled]{\n display: none;\n }\n\n &:hover {\n color: red;\n }\n }\n\n &:hover{\n .workflow-node-remove-button{\n opacity: 1;\n }\n }\n"])));
|
|
13
|
-
export var nodeHeaderClass = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n position: relative;\n"])));
|
|
14
|
-
export var nodeMetaClass = css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n margin-bottom: .5em;\n"])));
|
|
15
|
-
export var nodeTitleClass = css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n font-weight: normal;\n\n .workflow-node-id{\n color: #999;\n }\n"])));
|
|
16
|
-
export var nodeSubtreeClass = css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column-reverse;\n align-items: center;\n"])));
|
|
17
|
-
export var addButtonClass = css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n flex-shrink: 0;\n padding: 2em 0;\n"])));
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useCollectionDataSource } from '../../collection-manager';
|
|
3
|
-
declare const _default: {
|
|
4
|
-
title: string;
|
|
5
|
-
type: string;
|
|
6
|
-
fieldset: {
|
|
7
|
-
'config.collection': {
|
|
8
|
-
type: string;
|
|
9
|
-
title: string;
|
|
10
|
-
name: string;
|
|
11
|
-
required: boolean;
|
|
12
|
-
'x-reactions': string[];
|
|
13
|
-
'x-decorator': string;
|
|
14
|
-
'x-component': string;
|
|
15
|
-
'x-component-props': {
|
|
16
|
-
placeholder: string;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
'config.mode': {
|
|
20
|
-
type: string;
|
|
21
|
-
title: string;
|
|
22
|
-
name: string;
|
|
23
|
-
'x-decorator': string;
|
|
24
|
-
'x-component': string;
|
|
25
|
-
'x-component-props': {
|
|
26
|
-
options: {
|
|
27
|
-
value: number;
|
|
28
|
-
label: string;
|
|
29
|
-
}[];
|
|
30
|
-
placeholder: string;
|
|
31
|
-
};
|
|
32
|
-
required: boolean;
|
|
33
|
-
};
|
|
34
|
-
'config.changed': {
|
|
35
|
-
type: string;
|
|
36
|
-
name: string;
|
|
37
|
-
title: string;
|
|
38
|
-
description: string;
|
|
39
|
-
'x-decorator': string;
|
|
40
|
-
'x-component': string;
|
|
41
|
-
'x-component-props': {
|
|
42
|
-
mode: string;
|
|
43
|
-
placeholder: string;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
'config.condition': {
|
|
47
|
-
name: string;
|
|
48
|
-
title: string;
|
|
49
|
-
type: string;
|
|
50
|
-
'x-decorator': string;
|
|
51
|
-
'x-decorator-props': {
|
|
52
|
-
labelAlign: string;
|
|
53
|
-
className: string;
|
|
54
|
-
};
|
|
55
|
-
'x-component': string;
|
|
56
|
-
'x-component-props': {
|
|
57
|
-
useProps(): {
|
|
58
|
-
options: any[];
|
|
59
|
-
className: string;
|
|
60
|
-
};
|
|
61
|
-
dynamicComponent: string;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
scope: {
|
|
66
|
-
useCollectionDataSource: typeof useCollectionDataSource;
|
|
67
|
-
};
|
|
68
|
-
components: {
|
|
69
|
-
FieldsSelect: React.MemoExoticComponent<React.FunctionComponent<unknown>>;
|
|
70
|
-
};
|
|
71
|
-
getter({ type, options, onChange }: {
|
|
72
|
-
type: any;
|
|
73
|
-
options: any;
|
|
74
|
-
onChange: any;
|
|
75
|
-
}): JSX.Element;
|
|
76
|
-
};
|
|
77
|
-
export default _default;
|
|
@@ -1,144 +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 React from 'react';
|
|
12
|
-
import { Select } from 'antd';
|
|
13
|
-
import { observer, useForm } from '@formily/react';
|
|
14
|
-
import { useCollectionDataSource, useCollectionManager } from '../../collection-manager';
|
|
15
|
-
import { useCompile } from '../../schema-component';
|
|
16
|
-
import { useFlowContext } from '../WorkflowCanvas';
|
|
17
|
-
import { BaseTypeSet } from '../calculators';
|
|
18
|
-
import { collection, filter } from '../schemas/collection';
|
|
19
|
-
import { useTranslation } from 'react-i18next';
|
|
20
|
-
import { css } from '@emotion/css';
|
|
21
|
-
var FieldsSelect = observer(function (props) {
|
|
22
|
-
var _values$config;
|
|
23
|
-
|
|
24
|
-
var compile = useCompile();
|
|
25
|
-
|
|
26
|
-
var _useCollectionManager = useCollectionManager(),
|
|
27
|
-
getCollectionFields = _useCollectionManager.getCollectionFields;
|
|
28
|
-
|
|
29
|
-
var _useForm = useForm(),
|
|
30
|
-
values = _useForm.values;
|
|
31
|
-
|
|
32
|
-
var fields = getCollectionFields(values === null || values === void 0 ? void 0 : (_values$config = values.config) === null || _values$config === void 0 ? void 0 : _values$config.collection);
|
|
33
|
-
return /*#__PURE__*/React.createElement(Select, _objectSpread(_objectSpread({}, props), {}, {
|
|
34
|
-
className: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n min-width: 6em;\n "])))
|
|
35
|
-
}), fields.filter(function (field) {
|
|
36
|
-
return !field.hidden && (field.uiSchema ? !field.uiSchema['x-read-pretty'] : true);
|
|
37
|
-
}).map(function (field) {
|
|
38
|
-
var _field$uiSchema;
|
|
39
|
-
|
|
40
|
-
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
41
|
-
key: field.name,
|
|
42
|
-
value: field.name
|
|
43
|
-
}, compile((_field$uiSchema = field.uiSchema) === null || _field$uiSchema === void 0 ? void 0 : _field$uiSchema.title));
|
|
44
|
-
}));
|
|
45
|
-
});
|
|
46
|
-
export default {
|
|
47
|
-
title: '{{t("Collection event")}}',
|
|
48
|
-
type: 'collection',
|
|
49
|
-
fieldset: {
|
|
50
|
-
'config.collection': collection,
|
|
51
|
-
'config.mode': {
|
|
52
|
-
type: 'number',
|
|
53
|
-
title: '{{t("Trigger on")}}',
|
|
54
|
-
name: 'config.mode',
|
|
55
|
-
'x-decorator': 'FormItem',
|
|
56
|
-
'x-component': 'Select',
|
|
57
|
-
'x-component-props': {
|
|
58
|
-
options: [{
|
|
59
|
-
value: 1,
|
|
60
|
-
label: '{{t("After record added")}}'
|
|
61
|
-
}, {
|
|
62
|
-
value: 2,
|
|
63
|
-
label: '{{t("After record updated")}}'
|
|
64
|
-
}, {
|
|
65
|
-
value: 3,
|
|
66
|
-
label: '{{t("After record added or updated")}}'
|
|
67
|
-
}, {
|
|
68
|
-
value: 4,
|
|
69
|
-
label: '{{t("After record deleted")}}'
|
|
70
|
-
}],
|
|
71
|
-
placeholder: '{{t("Trigger on")}}'
|
|
72
|
-
},
|
|
73
|
-
required: true
|
|
74
|
-
},
|
|
75
|
-
'config.changed': {
|
|
76
|
-
type: 'array',
|
|
77
|
-
name: 'changed',
|
|
78
|
-
title: '{{t("Changed fields")}}',
|
|
79
|
-
description: '{{t("Triggered only if one of the selected fields changes. If unselected, it means that it will be triggered when any field changes. When record is added or deleted, any field is considered to have been changed.")}}',
|
|
80
|
-
'x-decorator': 'FormItem',
|
|
81
|
-
'x-component': 'FieldsSelect',
|
|
82
|
-
'x-component-props': {
|
|
83
|
-
mode: 'multiple',
|
|
84
|
-
placeholder: '{{t("Select Field")}}'
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
'config.condition': _objectSpread(_objectSpread({}, filter), {}, {
|
|
88
|
-
name: 'config.condition',
|
|
89
|
-
title: '{{t("Only triggers when match conditions")}}'
|
|
90
|
-
})
|
|
91
|
-
},
|
|
92
|
-
scope: {
|
|
93
|
-
useCollectionDataSource: useCollectionDataSource
|
|
94
|
-
},
|
|
95
|
-
components: {
|
|
96
|
-
FieldsSelect: FieldsSelect
|
|
97
|
-
},
|
|
98
|
-
getter: function getter(_ref) {
|
|
99
|
-
var _collections$find, _options$path;
|
|
100
|
-
|
|
101
|
-
var type = _ref.type,
|
|
102
|
-
options = _ref.options,
|
|
103
|
-
_onChange = _ref.onChange;
|
|
104
|
-
|
|
105
|
-
var _useTranslation = useTranslation(),
|
|
106
|
-
t = _useTranslation.t;
|
|
107
|
-
|
|
108
|
-
var compile = useCompile();
|
|
109
|
-
|
|
110
|
-
var _useCollectionManager2 = useCollectionManager(),
|
|
111
|
-
_useCollectionManager3 = _useCollectionManager2.collections,
|
|
112
|
-
collections = _useCollectionManager3 === void 0 ? [] : _useCollectionManager3;
|
|
113
|
-
|
|
114
|
-
var _useFlowContext = useFlowContext(),
|
|
115
|
-
workflow = _useFlowContext.workflow;
|
|
116
|
-
|
|
117
|
-
var collection = (_collections$find = collections.find(function (item) {
|
|
118
|
-
return item.name === workflow.config.collection;
|
|
119
|
-
})) !== null && _collections$find !== void 0 ? _collections$find : {
|
|
120
|
-
fields: []
|
|
121
|
-
};
|
|
122
|
-
return /*#__PURE__*/React.createElement(Select, {
|
|
123
|
-
placeholder: t('Fields'),
|
|
124
|
-
value: options === null || options === void 0 ? void 0 : (_options$path = options.path) === null || _options$path === void 0 ? void 0 : _options$path.replace(/^data\./, ''),
|
|
125
|
-
onChange: function onChange(path) {
|
|
126
|
-
_onChange({
|
|
127
|
-
type: type,
|
|
128
|
-
options: _objectSpread(_objectSpread({}, options), {}, {
|
|
129
|
-
path: "data.".concat(path)
|
|
130
|
-
})
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
}, collection.fields.filter(function (field) {
|
|
134
|
-
var _field$uiSchema2;
|
|
135
|
-
|
|
136
|
-
return BaseTypeSet.has(field === null || field === void 0 ? void 0 : (_field$uiSchema2 = field.uiSchema) === null || _field$uiSchema2 === void 0 ? void 0 : _field$uiSchema2.type);
|
|
137
|
-
}).map(function (field) {
|
|
138
|
-
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
139
|
-
key: field.name,
|
|
140
|
-
value: field.name
|
|
141
|
-
}, compile(field.uiSchema.title));
|
|
142
|
-
}));
|
|
143
|
-
}
|
|
144
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ISchema } from "@formily/react";
|
|
2
|
-
import { Registry } from "@nocobase/utils/client";
|
|
3
|
-
import React from "react";
|
|
4
|
-
export interface Trigger {
|
|
5
|
-
title: string;
|
|
6
|
-
type: string;
|
|
7
|
-
options?: {
|
|
8
|
-
label: string;
|
|
9
|
-
value: any;
|
|
10
|
-
key: string;
|
|
11
|
-
}[];
|
|
12
|
-
fieldset: {
|
|
13
|
-
[key: string]: ISchema;
|
|
14
|
-
};
|
|
15
|
-
view?: ISchema;
|
|
16
|
-
scope?: {
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
};
|
|
19
|
-
components?: {
|
|
20
|
-
[key: string]: any;
|
|
21
|
-
};
|
|
22
|
-
render?(props: any): React.ReactElement;
|
|
23
|
-
getter?(node: any): React.ReactElement;
|
|
24
|
-
}
|
|
25
|
-
export declare const triggers: Registry<Trigger>;
|
|
26
|
-
export declare const TriggerConfig: () => JSX.Element;
|