@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,225 +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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
-
|
|
7
|
-
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."); }
|
|
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
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
14
|
-
|
|
15
|
-
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."); }
|
|
16
|
-
|
|
17
|
-
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); }
|
|
18
|
-
|
|
19
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
20
|
-
|
|
21
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
22
|
-
|
|
23
|
-
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; }
|
|
24
|
-
|
|
25
|
-
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; }
|
|
26
|
-
|
|
27
|
-
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; }
|
|
28
|
-
|
|
29
|
-
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; }
|
|
30
|
-
|
|
31
|
-
import React, { useState } from 'react';
|
|
32
|
-
import { onFieldValueChange } from '@formily/core';
|
|
33
|
-
import { useForm, useFormEffects } from '@formily/react';
|
|
34
|
-
import { css } from '@emotion/css';
|
|
35
|
-
import { SchemaComponent } from '../../../';
|
|
36
|
-
import { collection } from '../../schemas/collection';
|
|
37
|
-
import { OnField } from './OnField';
|
|
38
|
-
import { EndsByField } from './EndsByField';
|
|
39
|
-
import { RepeatField } from './RepeatField';
|
|
40
|
-
var ModeFieldsets = {
|
|
41
|
-
0: {
|
|
42
|
-
startsOn: {
|
|
43
|
-
type: 'datetime',
|
|
44
|
-
name: 'startsOn',
|
|
45
|
-
title: '{{t("Starts on")}}',
|
|
46
|
-
'x-decorator': 'FormItem',
|
|
47
|
-
'x-component': 'DatePicker',
|
|
48
|
-
'x-component-props': {
|
|
49
|
-
showTime: true
|
|
50
|
-
},
|
|
51
|
-
required: true
|
|
52
|
-
},
|
|
53
|
-
repeat: {
|
|
54
|
-
type: 'string',
|
|
55
|
-
name: 'repeat',
|
|
56
|
-
title: '{{t("Repeat mode")}}',
|
|
57
|
-
'x-decorator': 'FormItem',
|
|
58
|
-
'x-component': 'RepeatField',
|
|
59
|
-
'x-reactions': [{
|
|
60
|
-
target: 'config.endsOn',
|
|
61
|
-
fulfill: {
|
|
62
|
-
state: {
|
|
63
|
-
visible: '{{!!$self.value}}'
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}, {
|
|
67
|
-
target: 'config.limit',
|
|
68
|
-
fulfill: {
|
|
69
|
-
state: {
|
|
70
|
-
visible: '{{!!$self.value}}'
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}]
|
|
74
|
-
},
|
|
75
|
-
endsOn: {
|
|
76
|
-
type: 'datetime',
|
|
77
|
-
name: 'endsOn',
|
|
78
|
-
title: '{{t("Ends on")}}',
|
|
79
|
-
'x-decorator': 'FormItem',
|
|
80
|
-
'x-component': 'DatePicker',
|
|
81
|
-
'x-component-props': {
|
|
82
|
-
showTime: true
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
limit: {
|
|
86
|
-
type: 'number',
|
|
87
|
-
name: 'limit',
|
|
88
|
-
title: '{{t("Repeat limit")}}',
|
|
89
|
-
'x-decorator': 'FormItem',
|
|
90
|
-
'x-component': 'InputNumber',
|
|
91
|
-
'x-component-props': {
|
|
92
|
-
placeholder: '{{t("No limit")}}',
|
|
93
|
-
min: 0
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
1: {
|
|
98
|
-
collection: _objectSpread(_objectSpread({}, collection), {}, {
|
|
99
|
-
'x-reactions': [].concat(_toConsumableArray(collection['x-reactions']), [{
|
|
100
|
-
// only full path works
|
|
101
|
-
target: 'config.startsOn',
|
|
102
|
-
fulfill: {
|
|
103
|
-
state: {
|
|
104
|
-
visible: '{{!!$self.value}}'
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}])
|
|
108
|
-
}),
|
|
109
|
-
startsOn: {
|
|
110
|
-
type: 'object',
|
|
111
|
-
title: '{{t("Starts on")}}',
|
|
112
|
-
'x-decorator': 'FormItem',
|
|
113
|
-
'x-component': 'OnField',
|
|
114
|
-
'x-reactions': [{
|
|
115
|
-
target: 'config.repeat',
|
|
116
|
-
fulfill: {
|
|
117
|
-
state: {
|
|
118
|
-
visible: '{{!!$self.value}}'
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}],
|
|
122
|
-
required: true
|
|
123
|
-
},
|
|
124
|
-
repeat: {
|
|
125
|
-
type: 'string',
|
|
126
|
-
name: 'repeat',
|
|
127
|
-
title: '{{t("Repeat mode")}}',
|
|
128
|
-
'x-decorator': 'FormItem',
|
|
129
|
-
'x-component': 'RepeatField',
|
|
130
|
-
'x-reactions': [{
|
|
131
|
-
target: 'config.endsOn',
|
|
132
|
-
fulfill: {
|
|
133
|
-
state: {
|
|
134
|
-
visible: '{{!!$self.value}}'
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}, {
|
|
138
|
-
target: 'config.limit',
|
|
139
|
-
fulfill: {
|
|
140
|
-
state: {
|
|
141
|
-
visible: '{{!!$self.value}}'
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}]
|
|
145
|
-
},
|
|
146
|
-
endsOn: {
|
|
147
|
-
type: 'object',
|
|
148
|
-
title: '{{t("Ends on")}}',
|
|
149
|
-
'x-decorator': 'FormItem',
|
|
150
|
-
'x-component': 'EndsByField'
|
|
151
|
-
},
|
|
152
|
-
limit: {
|
|
153
|
-
type: 'number',
|
|
154
|
-
name: 'limit',
|
|
155
|
-
title: '{{t("Repeat limit")}}',
|
|
156
|
-
'x-decorator': 'FormItem',
|
|
157
|
-
'x-component': 'InputNumber',
|
|
158
|
-
'x-component-props': {
|
|
159
|
-
placeholder: '{{t("No limit")}}',
|
|
160
|
-
min: 0
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
export var ScheduleConfig = function ScheduleConfig() {
|
|
166
|
-
var _useForm = useForm(),
|
|
167
|
-
_useForm$values = _useForm.values,
|
|
168
|
-
values = _useForm$values === void 0 ? {} : _useForm$values,
|
|
169
|
-
clearFormGraph = _useForm.clearFormGraph;
|
|
170
|
-
|
|
171
|
-
var _values$config = values.config,
|
|
172
|
-
config = _values$config === void 0 ? {} : _values$config;
|
|
173
|
-
|
|
174
|
-
var _useState = useState(config.mode),
|
|
175
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
176
|
-
mode = _useState2[0],
|
|
177
|
-
setMode = _useState2[1];
|
|
178
|
-
|
|
179
|
-
useFormEffects(function () {
|
|
180
|
-
onFieldValueChange('config.mode', function (field) {
|
|
181
|
-
setMode(field.value);
|
|
182
|
-
clearFormGraph('config.collection');
|
|
183
|
-
clearFormGraph('config.startsOn');
|
|
184
|
-
clearFormGraph('config.repeat');
|
|
185
|
-
clearFormGraph('config.endsOn');
|
|
186
|
-
clearFormGraph('config.limit');
|
|
187
|
-
});
|
|
188
|
-
});
|
|
189
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SchemaComponent, {
|
|
190
|
-
schema: {
|
|
191
|
-
type: 'number',
|
|
192
|
-
title: '{{t("Trigger mode")}}',
|
|
193
|
-
name: 'mode',
|
|
194
|
-
'x-decorator': 'FormItem',
|
|
195
|
-
'x-component': 'Radio.Group',
|
|
196
|
-
'x-component-props': {
|
|
197
|
-
options: [{
|
|
198
|
-
value: 0,
|
|
199
|
-
label: '{{t("Based on certain date")}}'
|
|
200
|
-
}, {
|
|
201
|
-
value: 1,
|
|
202
|
-
label: '{{t("Based on date field of collection")}}'
|
|
203
|
-
}]
|
|
204
|
-
},
|
|
205
|
-
required: true
|
|
206
|
-
}
|
|
207
|
-
}), /*#__PURE__*/React.createElement(SchemaComponent, {
|
|
208
|
-
schema: {
|
|
209
|
-
type: 'void',
|
|
210
|
-
properties: _defineProperty({}, "mode-".concat(mode), {
|
|
211
|
-
type: 'void',
|
|
212
|
-
'x-component': 'fieldset',
|
|
213
|
-
'x-component-props': {
|
|
214
|
-
className: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ant-input-number{\n width: 4em;\n }\n\n .ant-picker{\n width: auto;\n }\n "])))
|
|
215
|
-
},
|
|
216
|
-
properties: ModeFieldsets[mode]
|
|
217
|
-
})
|
|
218
|
-
},
|
|
219
|
-
components: {
|
|
220
|
-
OnField: OnField,
|
|
221
|
-
RepeatField: RepeatField,
|
|
222
|
-
EndsByField: EndsByField
|
|
223
|
-
}
|
|
224
|
-
}));
|
|
225
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { useCollectionDataSource } from '../../../';
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
type: string;
|
|
5
|
-
fieldset: {
|
|
6
|
-
config: {
|
|
7
|
-
type: string;
|
|
8
|
-
name: string;
|
|
9
|
-
'x-component': string;
|
|
10
|
-
'x-component-props': {};
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
scope: {
|
|
14
|
-
useCollectionDataSource: typeof useCollectionDataSource;
|
|
15
|
-
};
|
|
16
|
-
components: {
|
|
17
|
-
ScheduleConfig: () => JSX.Element;
|
|
18
|
-
};
|
|
19
|
-
getter({ type, options, onChange }: {
|
|
20
|
-
type: any;
|
|
21
|
-
options: any;
|
|
22
|
-
onChange: any;
|
|
23
|
-
}): JSX.Element;
|
|
24
|
-
};
|
|
25
|
-
export default _default;
|
|
@@ -1,77 +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 React from 'react';
|
|
8
|
-
import { useTranslation } from 'react-i18next';
|
|
9
|
-
import { Select } from 'antd';
|
|
10
|
-
import { useCompile, useCollectionDataSource, useCollectionManager } from '../../../';
|
|
11
|
-
import { ScheduleConfig } from './ScheduleConfig';
|
|
12
|
-
import { useFlowContext } from '../../WorkflowCanvas';
|
|
13
|
-
import { BaseTypeSet } from '../../calculators';
|
|
14
|
-
export default {
|
|
15
|
-
title: '{{t("Schedule event")}}',
|
|
16
|
-
type: 'schedule',
|
|
17
|
-
fieldset: {
|
|
18
|
-
config: {
|
|
19
|
-
type: 'object',
|
|
20
|
-
name: 'config',
|
|
21
|
-
'x-component': 'ScheduleConfig',
|
|
22
|
-
'x-component-props': {}
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
scope: {
|
|
26
|
-
useCollectionDataSource: useCollectionDataSource
|
|
27
|
-
},
|
|
28
|
-
components: {
|
|
29
|
-
ScheduleConfig: ScheduleConfig
|
|
30
|
-
},
|
|
31
|
-
getter: function getter(_ref) {
|
|
32
|
-
var _collections$find, _options$path;
|
|
33
|
-
|
|
34
|
-
var type = _ref.type,
|
|
35
|
-
options = _ref.options,
|
|
36
|
-
_onChange = _ref.onChange;
|
|
37
|
-
|
|
38
|
-
var _useTranslation = useTranslation(),
|
|
39
|
-
t = _useTranslation.t;
|
|
40
|
-
|
|
41
|
-
var compile = useCompile();
|
|
42
|
-
|
|
43
|
-
var _useCollectionManager = useCollectionManager(),
|
|
44
|
-
_useCollectionManager2 = _useCollectionManager.collections,
|
|
45
|
-
collections = _useCollectionManager2 === void 0 ? [] : _useCollectionManager2;
|
|
46
|
-
|
|
47
|
-
var _useFlowContext = useFlowContext(),
|
|
48
|
-
workflow = _useFlowContext.workflow;
|
|
49
|
-
|
|
50
|
-
var collection = (_collections$find = collections.find(function (item) {
|
|
51
|
-
return item.name === workflow.config.collection;
|
|
52
|
-
})) !== null && _collections$find !== void 0 ? _collections$find : {
|
|
53
|
-
fields: []
|
|
54
|
-
};
|
|
55
|
-
return /*#__PURE__*/React.createElement(Select, {
|
|
56
|
-
placeholder: t('Fields'),
|
|
57
|
-
value: options === null || options === void 0 ? void 0 : (_options$path = options.path) === null || _options$path === void 0 ? void 0 : _options$path.replace(/^data\./, ''),
|
|
58
|
-
onChange: function onChange(path) {
|
|
59
|
-
_onChange({
|
|
60
|
-
type: type,
|
|
61
|
-
options: _objectSpread(_objectSpread({}, options), {}, {
|
|
62
|
-
path: "data.".concat(path)
|
|
63
|
-
})
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
}, collection.fields.filter(function (field) {
|
|
67
|
-
var _field$uiSchema;
|
|
68
|
-
|
|
69
|
-
return BaseTypeSet.has(field === null || field === void 0 ? void 0 : (_field$uiSchema = field.uiSchema) === null || _field$uiSchema === void 0 ? void 0 : _field$uiSchema.type);
|
|
70
|
-
}).map(function (field) {
|
|
71
|
-
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
72
|
-
key: field.name,
|
|
73
|
-
value: field.name
|
|
74
|
-
}, compile(field.uiSchema.title));
|
|
75
|
-
}));
|
|
76
|
-
}
|
|
77
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
everyText: string;
|
|
3
|
-
emptyMonths: string;
|
|
4
|
-
emptyMonthDays: string;
|
|
5
|
-
emptyMonthDaysShort: string;
|
|
6
|
-
emptyWeekDays: string;
|
|
7
|
-
emptyWeekDaysShort: string;
|
|
8
|
-
emptyHours: string;
|
|
9
|
-
emptyMinutes: string;
|
|
10
|
-
emptyMinutesForHourPeriod: string;
|
|
11
|
-
yearOption: string;
|
|
12
|
-
monthOption: string;
|
|
13
|
-
weekOption: string;
|
|
14
|
-
dayOption: string;
|
|
15
|
-
hourOption: string;
|
|
16
|
-
minuteOption: string;
|
|
17
|
-
rebootOption: string;
|
|
18
|
-
prefixPeriod: string;
|
|
19
|
-
prefixMonths: string;
|
|
20
|
-
prefixMonthDays: string;
|
|
21
|
-
prefixWeekDays: string;
|
|
22
|
-
prefixWeekDaysForMonthAndYearPeriod: string;
|
|
23
|
-
prefixHours: string;
|
|
24
|
-
prefixMinutes: string;
|
|
25
|
-
prefixMinutesForHourPeriod: string;
|
|
26
|
-
suffixMinutesForHourPeriod: string;
|
|
27
|
-
errorInvalidCron: string;
|
|
28
|
-
clearButtonText: string;
|
|
29
|
-
weekDays: string[];
|
|
30
|
-
months: string[];
|
|
31
|
-
altWeekDays: string[];
|
|
32
|
-
altMonths: string[];
|
|
33
|
-
};
|
|
34
|
-
export default _default;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
everyText: '每',
|
|
3
|
-
emptyMonths: '每月',
|
|
4
|
-
emptyMonthDays: '每日(月)',
|
|
5
|
-
emptyMonthDaysShort: '每日',
|
|
6
|
-
emptyWeekDays: '每天(周)',
|
|
7
|
-
emptyWeekDaysShort: '每天(周)',
|
|
8
|
-
emptyHours: '每小时',
|
|
9
|
-
emptyMinutes: '每分钟',
|
|
10
|
-
emptyMinutesForHourPeriod: '每',
|
|
11
|
-
yearOption: '年',
|
|
12
|
-
monthOption: '月',
|
|
13
|
-
weekOption: '周',
|
|
14
|
-
dayOption: '天',
|
|
15
|
-
hourOption: '小时',
|
|
16
|
-
minuteOption: '分钟',
|
|
17
|
-
rebootOption: '重启',
|
|
18
|
-
prefixPeriod: '每',
|
|
19
|
-
prefixMonths: '的',
|
|
20
|
-
prefixMonthDays: '的',
|
|
21
|
-
prefixWeekDays: '的',
|
|
22
|
-
prefixWeekDaysForMonthAndYearPeriod: '并且',
|
|
23
|
-
prefixHours: '的',
|
|
24
|
-
prefixMinutes: ':',
|
|
25
|
-
prefixMinutesForHourPeriod: '的',
|
|
26
|
-
suffixMinutesForHourPeriod: '分钟',
|
|
27
|
-
errorInvalidCron: '不符合 cron 规则的表达式',
|
|
28
|
-
clearButtonText: '清空',
|
|
29
|
-
weekDays: [// Order is important, the index will be used as value
|
|
30
|
-
'周日', '周一', '周二', '周三', '周四', '周五', '周六'],
|
|
31
|
-
months: [// Order is important, the index will be used as value
|
|
32
|
-
'一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
|
|
33
|
-
altWeekDays: [// Order is important, the index will be used as value
|
|
34
|
-
'周日', '周一', '周二', '周三', '周四', '周五', '周六'],
|
|
35
|
-
altMonths: [// Order is important, the index will be used as value
|
|
36
|
-
'一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
|
|
37
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ExecutionResourceProvider = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _ = require("..");
|
|
11
|
-
|
|
12
|
-
var _excluded = ["request"];
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
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; }
|
|
17
|
-
|
|
18
|
-
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; }
|
|
19
|
-
|
|
20
|
-
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; }
|
|
21
|
-
|
|
22
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
23
|
-
|
|
24
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
25
|
-
|
|
26
|
-
var ExecutionResourceProvider = function ExecutionResourceProvider(_ref) {
|
|
27
|
-
var _request$params;
|
|
28
|
-
|
|
29
|
-
var request = _ref.request,
|
|
30
|
-
others = _objectWithoutProperties(_ref, _excluded);
|
|
31
|
-
|
|
32
|
-
var workflow = (0, _.useRecord)();
|
|
33
|
-
|
|
34
|
-
var props = _objectSpread(_objectSpread({}, others), {}, {
|
|
35
|
-
request: _objectSpread(_objectSpread({}, request), {}, {
|
|
36
|
-
params: _objectSpread(_objectSpread({}, request === null || request === void 0 ? void 0 : request.params), {}, {
|
|
37
|
-
filter: _objectSpread(_objectSpread({}, request === null || request === void 0 ? void 0 : (_request$params = request.params) === null || _request$params === void 0 ? void 0 : _request$params.filter), {}, {
|
|
38
|
-
key: workflow.key
|
|
39
|
-
})
|
|
40
|
-
})
|
|
41
|
-
}),
|
|
42
|
-
workflow: workflow
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
return /*#__PURE__*/_react.default.createElement(_.ResourceActionProvider, _objectSpread({}, props));
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
exports.ExecutionResourceProvider = ExecutionResourceProvider;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare function useFlowContext(): any;
|
|
3
|
-
export declare function WorkflowCanvas(): JSX.Element;
|
|
4
|
-
export declare function Branch({ from, entry, branchIndex, controller }: {
|
|
5
|
-
from?: any;
|
|
6
|
-
entry?: any;
|
|
7
|
-
branchIndex?: any;
|
|
8
|
-
controller?: any;
|
|
9
|
-
}): JSX.Element;
|
|
10
|
-
interface AddButtonProps {
|
|
11
|
-
upstream: any;
|
|
12
|
-
branchIndex?: number;
|
|
13
|
-
}
|
|
14
|
-
export declare function AddButton({ upstream, branchIndex }: AddButtonProps): JSX.Element;
|
|
15
|
-
export {};
|