@nocobase/plugin-workflow 0.9.1-alpha.1 → 0.9.1-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.
Files changed (37) hide show
  1. package/lib/client/AddButton.js +40 -29
  2. package/lib/client/WorkflowCanvas.js +1 -2
  3. package/lib/client/components/CollectionFieldset.js +4 -8
  4. package/lib/client/nodes/calculation.d.ts +2 -4
  5. package/lib/client/nodes/calculation.js +6 -12
  6. package/lib/client/nodes/condition.d.ts +4 -8
  7. package/lib/client/nodes/condition.js +9 -17
  8. package/lib/client/nodes/create.d.ts +2 -4
  9. package/lib/client/nodes/create.js +2 -10
  10. package/lib/client/nodes/delay.d.ts +2 -4
  11. package/lib/client/nodes/delay.js +2 -4
  12. package/lib/client/nodes/destroy.d.ts +2 -5
  13. package/lib/client/nodes/destroy.js +2 -3
  14. package/lib/client/nodes/index.js +172 -111
  15. package/lib/client/nodes/manual/AssigneesSelect.js +2 -1
  16. package/lib/client/nodes/manual/index.d.ts +3 -5
  17. package/lib/client/nodes/manual/index.js +4 -13
  18. package/lib/client/nodes/parallel.d.ts +1 -2
  19. package/lib/client/nodes/parallel.js +10 -5
  20. package/lib/client/nodes/query.d.ts +2 -5
  21. package/lib/client/nodes/query.js +2 -3
  22. package/lib/client/nodes/request.d.ts +7 -14
  23. package/lib/client/nodes/request.js +8 -15
  24. package/lib/client/nodes/update.d.ts +31 -27
  25. package/lib/client/nodes/update.js +12 -5
  26. package/lib/client/schemas/collection.d.ts +0 -3
  27. package/lib/client/schemas/collection.js +1 -6
  28. package/lib/client/style.js +51 -5
  29. package/lib/client/triggers/collection.d.ts +37 -12
  30. package/lib/client/triggers/collection.js +77 -46
  31. package/lib/client/triggers/index.d.ts +1 -1
  32. package/lib/client/triggers/index.js +149 -78
  33. package/lib/client/triggers/schedule/DateFieldsSelect.js +1 -3
  34. package/lib/client/triggers/schedule/ScheduleConfig.js +15 -17
  35. package/lib/client/triggers/schedule/index.d.ts +0 -1
  36. package/lib/client/triggers/schedule/index.js +1 -2
  37. package/package.json +10 -10
@@ -77,6 +77,12 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
77
77
 
78
78
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
79
79
 
80
+ 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; }
81
+
82
+ 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; }
83
+
84
+ 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; }
85
+
80
86
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
81
87
 
82
88
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
@@ -94,7 +100,7 @@ function AddButton({
94
100
 
95
101
  const _ref = (_useFlowContext = (0, _FlowContext.useFlowContext)()) !== null && _useFlowContext !== void 0 ? _useFlowContext : {},
96
102
  workflow = _ref.workflow,
97
- onNodeAdded = _ref.onNodeAdded;
103
+ refresh = _ref.refresh;
98
104
 
99
105
  if (!workflow) {
100
106
  return null;
@@ -118,10 +124,12 @@ function AddButton({
118
124
  const _keyPath = _slicedToArray(keyPath, 1),
119
125
  optionKey = _keyPath[0];
120
126
 
127
+ const instruction = _nodes.instructions.get(type);
128
+
121
129
  if (optionKey) {
122
- var _instructions$get$opt, _instructions$get, _instructions$get$opt2;
130
+ var _instruction$options$, _instruction$options;
123
131
 
124
- const _ref2 = (_instructions$get$opt = (_instructions$get = _nodes.instructions.get(type)) === null || _instructions$get === void 0 ? void 0 : (_instructions$get$opt2 = _instructions$get.options) === null || _instructions$get$opt2 === void 0 ? void 0 : _instructions$get$opt2.find(item => item.key === optionKey)) !== null && _instructions$get$opt !== void 0 ? _instructions$get$opt : {},
132
+ const _ref2 = (_instruction$options$ = (_instruction$options = instruction.options) === null || _instruction$options === void 0 ? void 0 : _instruction$options.find(item => item.key === optionKey)) !== null && _instruction$options$ !== void 0 ? _instruction$options$ : {},
125
133
  value = _ref2.value;
126
134
 
127
135
  Object.assign(config, value);
@@ -132,50 +140,53 @@ function AddButton({
132
140
  type,
133
141
  upstreamId: (_upstream$id = upstream === null || upstream === void 0 ? void 0 : upstream.id) !== null && _upstream$id !== void 0 ? _upstream$id : null,
134
142
  branchIndex,
143
+ title: compile(instruction.title),
135
144
  config
136
145
  }
137
146
  }),
138
147
  node = _yield$resource$creat.data.data;
139
148
 
140
- onNodeAdded(node);
149
+ refresh();
141
150
  });
142
151
  return _onCreate.apply(this, arguments);
143
152
  }
144
153
 
154
+ const instructionList = Array.from(_nodes.instructions.getValues());
145
155
  const groups = [{
146
- value: 'control',
147
- name: `{{t("Control", { ns: "${_locale.NAMESPACE}" })}}`
156
+ key: 'control',
157
+ label: `{{t("Control", { ns: "${_locale.NAMESPACE}" })}}`
148
158
  }, {
149
- value: 'collection',
150
- name: `{{t("Collection operations", { ns: "${_locale.NAMESPACE}" })}}`
159
+ key: 'collection',
160
+ label: `{{t("Collection operations", { ns: "${_locale.NAMESPACE}" })}}`
151
161
  }, {
152
- value: 'manual',
153
- name: `{{t("Manual", { ns: "${_locale.NAMESPACE}" })}}`
162
+ key: 'manual',
163
+ label: `{{t("Manual", { ns: "${_locale.NAMESPACE}" })}}`
154
164
  }, {
155
- value: 'extended',
156
- name: `{{t("Extended types", { ns: "${_locale.NAMESPACE}" })}}`
157
- }];
158
- const instructionList = Array.from(_nodes.instructions.getValues());
165
+ key: 'extended',
166
+ label: `{{t("Extended types", { ns: "${_locale.NAMESPACE}" })}}`
167
+ }].filter(group => instructionList.filter(item => item.group === group.key).length).map(group => {
168
+ const groupInstructions = instructionList.filter(item => item.group === group.key);
169
+ return _objectSpread(_objectSpread({}, group), {}, {
170
+ type: 'group',
171
+ children: groupInstructions.map(item => ({
172
+ key: item.type,
173
+ label: item.title,
174
+ type: item.options ? 'subMenu' : null,
175
+ children: item.options ? item.options.map(option => ({
176
+ key: option.key,
177
+ label: option.label
178
+ })) : null
179
+ }))
180
+ });
181
+ });
159
182
  return _react().default.createElement("div", {
160
183
  className: (0, _css().cx)(_style.addButtonClass)
161
184
  }, _react().default.createElement(_antd().Dropdown, {
162
185
  trigger: ['click'],
163
186
  overlay: _react().default.createElement(_antd().Menu, {
164
- onClick: ev => onCreate(ev)
165
- }, groups.map(group => {
166
- const groupInstructions = instructionList.filter(item => item.group === group.value);
167
- return groupInstructions.length ? _react().default.createElement(_antd().Menu.ItemGroup, {
168
- key: group.value,
169
- title: compile(group.name)
170
- }, groupInstructions.map(item => item.options ? _react().default.createElement(_antd().Menu.SubMenu, {
171
- key: item.type,
172
- title: compile(item.title)
173
- }, item.options.map(option => _react().default.createElement(_antd().Menu.Item, {
174
- key: option.key
175
- }, compile(option.label)))) : _react().default.createElement(_antd().Menu.Item, {
176
- key: item.type
177
- }, compile(item.title)))) : null;
178
- })),
187
+ onClick: ev => onCreate(ev),
188
+ items: compile(groups)
189
+ }),
179
190
  disabled: workflow.executed
180
191
  }, _react().default.createElement(_antd().Button, {
181
192
  shape: "circle",
@@ -281,8 +281,7 @@ function WorkflowCanvas() {
281
281
  value: {
282
282
  workflow,
283
283
  nodes,
284
- onNodeAdded: refresh,
285
- onNodeRemoved: refresh
284
+ refresh
286
285
  }
287
286
  }, _react().default.createElement("div", {
288
287
  className: "workflow-toolbar"
@@ -96,8 +96,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
96
96
  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; }
97
97
 
98
98
  function AssociationInput(props) {
99
- var _data$config;
100
-
101
99
  const _useCollectionManager = (0, _client().useCollectionManager)(),
102
100
  getCollectionFields = _useCollectionManager.getCollectionFields;
103
101
 
@@ -107,9 +105,9 @@ function AssociationInput(props) {
107
105
  const fieldName = path.segments[path.segments.length - 1];
108
106
 
109
107
  const _useForm = (0, _react2().useForm)(),
110
- data = _useForm.values;
108
+ config = _useForm.values;
111
109
 
112
- const fields = getCollectionFields(data === null || data === void 0 ? void 0 : (_data$config = data.config) === null || _data$config === void 0 ? void 0 : _data$config.collection);
110
+ const fields = getCollectionFields(config === null || config === void 0 ? void 0 : config.collection);
113
111
 
114
112
  const _fields$find = fields.find(item => item.name === fieldName),
115
113
  type = _fields$find.type;
@@ -133,8 +131,6 @@ var _default = (0, _react2().observer)(({
133
131
  disabled,
134
132
  onChange: _onChange
135
133
  }) => {
136
- var _data$config2;
137
-
138
134
  const _useTranslation = (0, _reactI18next().useTranslation)(),
139
135
  t = _useTranslation.t;
140
136
 
@@ -146,9 +142,9 @@ var _default = (0, _react2().observer)(({
146
142
  getCollectionFields = _useCollectionManager2.getCollectionFields;
147
143
 
148
144
  const _useForm2 = (0, _react2().useForm)(),
149
- data = _useForm2.values;
145
+ config = _useForm2.values;
150
146
 
151
- const collectionName = data === null || data === void 0 ? void 0 : (_data$config2 = data.config) === null || _data$config2 === void 0 ? void 0 : _data$config2.collection;
147
+ const collectionName = config === null || config === void 0 ? void 0 : config.collection;
152
148
  const fields = getCollectionFields(collectionName).filter(field => !field.hidden && (field.uiSchema ? !field.uiSchema['x-read-pretty'] : false) // TODO: should use some field option but not type to control this
153
149
  && !['formula'].includes(field.type));
154
150
  const unassignedFields = fields.filter(field => !(field.name in value));
@@ -6,10 +6,9 @@ declare const _default: {
6
6
  type: string;
7
7
  group: string;
8
8
  fieldset: {
9
- 'config.engine': {
9
+ engine: {
10
10
  type: string;
11
11
  title: string;
12
- name: string;
13
12
  'x-decorator': string;
14
13
  'x-component': string;
15
14
  'x-component-props': {
@@ -18,10 +17,9 @@ declare const _default: {
18
17
  required: boolean;
19
18
  default: string;
20
19
  };
21
- 'config.expression': {
20
+ expression: {
22
21
  type: string;
23
22
  title: string;
24
- name: string;
25
23
  'x-decorator': string;
26
24
  'x-component': string;
27
25
  'x-component-props': {
@@ -46,7 +46,7 @@ function _client() {
46
46
  }
47
47
 
48
48
  function _client2() {
49
- const data = _interopRequireWildcard(require("@nocobase/evaluators/client"));
49
+ const data = require("@nocobase/evaluators/client");
50
50
 
51
51
  _client2 = function _client2() {
52
52
  return data;
@@ -65,10 +65,6 @@ var _RadioWithTooltip = require("../components/RadioWithTooltip");
65
65
 
66
66
  const _excluded = ["node", "insert"];
67
67
 
68
- 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); }
69
-
70
- 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; }
71
-
72
68
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
73
69
 
74
70
  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; }
@@ -86,24 +82,22 @@ var _default = {
86
82
  type: 'calculation',
87
83
  group: 'control',
88
84
  fieldset: {
89
- 'config.engine': {
85
+ engine: {
90
86
  type: 'string',
91
87
  title: `{{t("Calculation engine", { ns: "${_locale.NAMESPACE}" })}}`,
92
- name: 'config.engine',
93
88
  'x-decorator': 'FormItem',
94
89
  'x-component': 'RadioWithTooltip',
95
90
  'x-component-props': {
96
- options: Array.from(_client2().default.getEntities()).reduce((result, [value, options]) => result.concat(_objectSpread({
91
+ options: Array.from(_client2().evaluators.getEntities()).reduce((result, [value, options]) => result.concat(_objectSpread({
97
92
  value
98
93
  }, options)), [])
99
94
  },
100
95
  required: true,
101
96
  default: 'math.js'
102
97
  },
103
- 'config.expression': {
98
+ expression: {
104
99
  type: 'string',
105
100
  title: `{{t("Calculation expression", { ns: "${_locale.NAMESPACE}" })}}`,
106
- name: 'config.expression',
107
101
  'x-decorator': 'FormItem',
108
102
  'x-component': 'Variable.TextArea',
109
103
  'x-component-props': {
@@ -115,7 +109,7 @@ var _default = {
115
109
  }) {
116
110
  const values = form.values;
117
111
 
118
- const _evaluators$get = _client2().default.get(values.config.engine),
112
+ const _evaluators$get = _client2().evaluators.get(values.engine),
119
113
  evaluate = _evaluators$get.evaluate;
120
114
 
121
115
  const exp = value.trim().replace(/{{([^{}]+)}}/g, '1');
@@ -129,7 +123,7 @@ var _default = {
129
123
  },
130
124
 
131
125
  'x-reactions': {
132
- dependencies: ['config.engine'],
126
+ dependencies: ['engine'],
133
127
  fulfill: {
134
128
  schema: {
135
129
  description: '{{renderReference($deps[0])}}'
@@ -22,9 +22,8 @@ declare const _default: {
22
22
  type: string;
23
23
  group: string;
24
24
  fieldset: {
25
- 'config.rejectOnFalse': {
25
+ rejectOnFalse: {
26
26
  type: string;
27
- name: string;
28
27
  title: string;
29
28
  'x-decorator': string;
30
29
  'x-component': string;
@@ -36,10 +35,9 @@ declare const _default: {
36
35
  label: string;
37
36
  }[];
38
37
  };
39
- 'config.engine': {
38
+ engine: {
40
39
  type: string;
41
40
  title: string;
42
- name: string;
43
41
  'x-decorator': string;
44
42
  'x-component': string;
45
43
  'x-component-props': {
@@ -50,9 +48,8 @@ declare const _default: {
50
48
  required: boolean;
51
49
  default: string;
52
50
  };
53
- 'config.calculation': {
51
+ calculation: {
54
52
  type: string;
55
- name: string;
56
53
  title: string;
57
54
  'x-decorator': string;
58
55
  'x-component': string;
@@ -66,10 +63,9 @@ declare const _default: {
66
63
  };
67
64
  required: boolean;
68
65
  };
69
- 'config.expression': {
66
+ expression: {
70
67
  type: string;
71
68
  title: string;
72
- name: string;
73
69
  'x-decorator': string;
74
70
  'x-component': string;
75
71
  'x-component-props': {
@@ -77,7 +77,7 @@ function _client2() {
77
77
  }
78
78
 
79
79
  function _client3() {
80
- const data = _interopRequireWildcard(require("@nocobase/evaluators/client"));
80
+ const data = require("@nocobase/evaluators/client");
81
81
 
82
82
  _client3 = function _client3() {
83
83
  return data;
@@ -100,10 +100,6 @@ var _variable = require("../variable");
100
100
 
101
101
  var _RadioWithTooltip = require("../components/RadioWithTooltip");
102
102
 
103
- 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); }
104
-
105
- 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; }
106
-
107
103
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
108
104
 
109
105
  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; }
@@ -431,9 +427,8 @@ var _default = {
431
427
  type: 'condition',
432
428
  group: 'control',
433
429
  fieldset: {
434
- 'config.rejectOnFalse': {
430
+ rejectOnFalse: {
435
431
  type: 'boolean',
436
- name: 'config.rejectOnFalse',
437
432
  title: `{{t("Mode", { ns: "${_locale.NAMESPACE}" })}}`,
438
433
  'x-decorator': 'FormItem',
439
434
  'x-component': 'Radio.Group',
@@ -448,30 +443,28 @@ var _default = {
448
443
  label: `{{t('Branch into "Yes" and "No"', { ns: "${_locale.NAMESPACE}" })}}`
449
444
  }]
450
445
  },
451
- 'config.engine': {
446
+ engine: {
452
447
  type: 'string',
453
448
  title: `{{t("Calculation engine", { ns: "${_locale.NAMESPACE}" })}}`,
454
- name: 'config.engine',
455
449
  'x-decorator': 'FormItem',
456
450
  'x-component': 'RadioWithTooltip',
457
451
  'x-component-props': {
458
452
  options: [['basic', {
459
453
  label: `{{t("Basic", { ns: "${_locale.NAMESPACE}" })}}`
460
- }], ...Array.from(_client3().default.getEntities())].reduce((result, [value, options]) => result.concat(_objectSpread({
454
+ }], ...Array.from(_client3().evaluators.getEntities())].reduce((result, [value, options]) => result.concat(_objectSpread({
461
455
  value
462
456
  }, options)), [])
463
457
  },
464
458
  required: true,
465
459
  default: 'basic'
466
460
  },
467
- 'config.calculation': {
461
+ calculation: {
468
462
  type: 'string',
469
- name: 'config.calculation',
470
463
  title: `{{t("Condition", { ns: "${_locale.NAMESPACE}" })}}`,
471
464
  'x-decorator': 'FormItem',
472
465
  'x-component': 'CalculationConfig',
473
466
  'x-reactions': {
474
- dependencies: ['config.engine'],
467
+ dependencies: ['engine'],
475
468
  fulfill: {
476
469
  state: {
477
470
  visible: '{{$deps[0] === "basic"}}'
@@ -480,10 +473,9 @@ var _default = {
480
473
  },
481
474
  required: true
482
475
  },
483
- 'config.expression': {
476
+ expression: {
484
477
  type: 'string',
485
478
  title: `{{t("Condition expression", { ns: "${_locale.NAMESPACE}" })}}`,
486
- name: 'config.expression',
487
479
  'x-decorator': 'FormItem',
488
480
  'x-component': 'Variable.TextArea',
489
481
  'x-component-props': {
@@ -495,7 +487,7 @@ var _default = {
495
487
  }) {
496
488
  const values = form.values;
497
489
 
498
- const _evaluators$get = _client3().default.get(values.config.engine),
490
+ const _evaluators$get = _client3().evaluators.get(values.engine),
499
491
  evaluate = _evaluators$get.evaluate;
500
492
 
501
493
  const exp = value.trim().replace(/{{([^{}]+)}}/g, '1');
@@ -509,7 +501,7 @@ var _default = {
509
501
  },
510
502
 
511
503
  'x-reactions': {
512
- dependencies: ['config.engine'],
504
+ dependencies: ['engine'],
513
505
  fulfill: {
514
506
  state: {
515
507
  visible: '{{$deps[0] !== "basic"}}'
@@ -5,8 +5,7 @@ declare const _default: {
5
5
  type: string;
6
6
  group: string;
7
7
  fieldset: {
8
- 'config.collection': {
9
- name: string;
8
+ collection: {
10
9
  type: string;
11
10
  title: string;
12
11
  required: boolean;
@@ -17,10 +16,9 @@ declare const _default: {
17
16
  placeholder: string;
18
17
  };
19
18
  };
20
- 'config.params.values': {
19
+ 'params.values': {
21
20
  type: string;
22
21
  title: string;
23
- name: string;
24
22
  'x-decorator': string;
25
23
  'x-decorator-props': {
26
24
  labelAlign: string;
@@ -29,20 +29,12 @@ var _variable = require("../variable");
29
29
 
30
30
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31
31
 
32
- 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; }
33
-
34
- 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; }
35
-
36
- 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; }
37
-
38
32
  var _default = {
39
33
  title: `{{t("Create record", { ns: "${_locale.NAMESPACE}" })}}`,
40
34
  type: 'create',
41
35
  group: 'collection',
42
36
  fieldset: {
43
- 'config.collection': _objectSpread(_objectSpread({}, _collection.collection), {}, {
44
- name: 'config.collection'
45
- }),
37
+ collection: _collection.collection,
46
38
  // multiple: {
47
39
  // type: 'boolean',
48
40
  // title: '多条数据',
@@ -53,7 +45,7 @@ var _default = {
53
45
  // disabled: true
54
46
  // }
55
47
  // },
56
- 'config.params.values': _collection.values
48
+ 'params.values': _collection.values
57
49
  },
58
50
  view: {},
59
51
  scope: {
@@ -4,18 +4,16 @@ declare const _default: {
4
4
  type: string;
5
5
  group: string;
6
6
  fieldset: {
7
- 'config.duration': {
7
+ duration: {
8
8
  type: string;
9
- name: string;
10
9
  title: string;
11
10
  'x-decorator': string;
12
11
  'x-component': string;
13
12
  default: number;
14
13
  required: boolean;
15
14
  };
16
- 'config.endStatus': {
15
+ endStatus: {
17
16
  type: string;
18
- name: string;
19
17
  title: string;
20
18
  'x-decorator': string;
21
19
  'x-component': string;
@@ -18,18 +18,16 @@ var _default = {
18
18
  type: 'delay',
19
19
  group: 'control',
20
20
  fieldset: {
21
- 'config.duration': {
21
+ duration: {
22
22
  type: 'number',
23
- name: 'config.duration',
24
23
  title: `{{t("Duration", { ns: "${_locale.NAMESPACE}" })}}`,
25
24
  'x-decorator': 'FormItem',
26
25
  'x-component': 'Duration',
27
26
  default: 60000,
28
27
  required: true
29
28
  },
30
- 'config.endStatus': {
29
+ endStatus: {
31
30
  type: 'number',
32
- name: 'config.endStatus',
33
31
  title: `{{t("End Status", { ns: "${_locale.NAMESPACE}" })}}`,
34
32
  'x-decorator': 'FormItem',
35
33
  'x-component': 'Select',
@@ -5,10 +5,9 @@ declare const _default: {
5
5
  type: string;
6
6
  group: string;
7
7
  fieldset: {
8
- 'config.collection': {
8
+ collection: {
9
9
  type: string;
10
10
  title: string;
11
- name: string;
12
11
  required: boolean;
13
12
  'x-reactions': string[];
14
13
  'x-decorator': string;
@@ -17,16 +16,14 @@ declare const _default: {
17
16
  placeholder: string;
18
17
  };
19
18
  };
20
- 'config.params': {
19
+ params: {
21
20
  type: string;
22
- name: string;
23
21
  title: string;
24
22
  'x-decorator': string;
25
23
  properties: {
26
24
  filter: {
27
25
  type: string;
28
26
  title: string;
29
- name: string;
30
27
  'x-decorator': string;
31
28
  'x-decorator-props': {
32
29
  labelAlign: string;
@@ -24,10 +24,9 @@ var _default = {
24
24
  type: 'destroy',
25
25
  group: 'collection',
26
26
  fieldset: {
27
- 'config.collection': _collection.collection,
28
- 'config.params': {
27
+ collection: _collection.collection,
28
+ params: {
29
29
  type: 'object',
30
- name: 'config.params',
31
30
  title: '',
32
31
  'x-decorator': 'FormItem',
33
32
  properties: {