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