@nocobase/plugin-workflow 0.9.1-alpha.1 → 0.9.2-alpha.1

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 (132) hide show
  1. package/lib/client/AddButton.js +50 -86
  2. package/lib/client/Branch.js +0 -13
  3. package/lib/client/ExecutionCanvas.js +16 -63
  4. package/lib/client/ExecutionLink.js +3 -21
  5. package/lib/client/ExecutionPage.js +1 -19
  6. package/lib/client/ExecutionResourceProvider.js +6 -23
  7. package/lib/client/FlowContext.js +0 -8
  8. package/lib/client/WorkflowCanvas.js +57 -129
  9. package/lib/client/WorkflowLink.js +3 -21
  10. package/lib/client/WorkflowPage.js +1 -19
  11. package/lib/client/WorkflowProvider.js +24 -47
  12. package/lib/client/WorkflowShortcut.js +0 -16
  13. package/lib/client/components/CollectionBlockInitializer.js +12 -22
  14. package/lib/client/components/CollectionFieldInitializers.js +5 -24
  15. package/lib/client/components/CollectionFieldset.js +33 -85
  16. package/lib/client/components/Duration.js +0 -14
  17. package/lib/client/components/DynamicExpression.d.ts +4 -0
  18. package/lib/client/components/DynamicExpression.js +102 -0
  19. package/lib/client/components/FieldsSelect.d.ts +2 -0
  20. package/lib/client/components/FieldsSelect.js +66 -0
  21. package/lib/client/components/FilterDynamicComponent.js +1 -10
  22. package/lib/client/components/NullRender.js +0 -1
  23. package/lib/client/components/OpenDrawer.js +10 -35
  24. package/lib/client/components/RadioWithTooltip.js +5 -27
  25. package/lib/client/components/renderEngineReference.d.ts +1 -0
  26. package/lib/client/components/renderEngineReference.js +55 -0
  27. package/lib/client/constants.js +0 -9
  28. package/lib/client/index.js +0 -6
  29. package/lib/client/interfaces/expression.d.ts +3 -0
  30. package/lib/client/interfaces/expression.js +37 -0
  31. package/lib/client/locale/index.js +5 -15
  32. package/lib/client/locale/pt-BR.d.ts +130 -0
  33. package/lib/client/locale/pt-BR.js +136 -0
  34. package/lib/client/locale/zh-CN.d.ts +16 -1
  35. package/lib/client/locale/zh-CN.js +17 -2
  36. package/lib/client/nodes/calculation.d.ts +56 -7
  37. package/lib/client/nodes/calculation.js +141 -74
  38. package/lib/client/nodes/condition.d.ts +5 -9
  39. package/lib/client/nodes/condition.js +30 -93
  40. package/lib/client/nodes/create.d.ts +36 -12
  41. package/lib/client/nodes/create.js +14 -28
  42. package/lib/client/nodes/delay.d.ts +3 -7
  43. package/lib/client/nodes/delay.js +5 -14
  44. package/lib/client/nodes/destroy.d.ts +3 -11
  45. package/lib/client/nodes/destroy.js +14 -12
  46. package/lib/client/nodes/index.d.ts +2 -2
  47. package/lib/client/nodes/index.js +181 -222
  48. package/lib/client/nodes/manual/AssigneesSelect.js +8 -18
  49. package/lib/client/nodes/manual/ModeConfig.js +0 -27
  50. package/lib/client/nodes/manual/SchemaConfig.js +87 -449
  51. package/lib/client/nodes/manual/WorkflowTodo.js +99 -163
  52. package/lib/client/nodes/manual/WorkflowTodoBlockInitializer.js +4 -20
  53. package/lib/client/nodes/manual/forms/customForm.d.ts +40 -0
  54. package/lib/client/nodes/manual/forms/customForm.js +411 -0
  55. package/lib/client/nodes/manual/index.d.ts +15 -6
  56. package/lib/client/nodes/manual/index.js +58 -54
  57. package/lib/client/nodes/parallel.d.ts +1 -2
  58. package/lib/client/nodes/parallel.js +16 -45
  59. package/lib/client/nodes/query.d.ts +30 -12
  60. package/lib/client/nodes/query.js +17 -25
  61. package/lib/client/nodes/request.d.ts +9 -17
  62. package/lib/client/nodes/request.js +13 -37
  63. package/lib/client/nodes/update.d.ts +27 -28
  64. package/lib/client/nodes/update.js +17 -18
  65. package/lib/client/schemas/collection.d.ts +20 -7
  66. package/lib/client/schemas/collection.js +27 -28
  67. package/lib/client/schemas/executions.js +3 -18
  68. package/lib/client/schemas/workflows.js +10 -33
  69. package/lib/client/style.js +75 -26
  70. package/lib/client/triggers/collection.d.ts +47 -18
  71. package/lib/client/triggers/collection.js +65 -123
  72. package/lib/client/triggers/index.d.ts +3 -6
  73. package/lib/client/triggers/index.js +146 -146
  74. package/lib/client/triggers/schedule/DateFieldsSelect.js +7 -32
  75. package/lib/client/triggers/schedule/EndsByField.js +1 -18
  76. package/lib/client/triggers/schedule/OnField.js +10 -38
  77. package/lib/client/triggers/schedule/RepeatField.js +4 -32
  78. package/lib/client/triggers/schedule/ScheduleConfig.js +25 -68
  79. package/lib/client/triggers/schedule/index.d.ts +21 -1
  80. package/lib/client/triggers/schedule/index.js +22 -24
  81. package/lib/client/triggers/schedule/locale/Cron.zh-CN.js +8 -4
  82. package/lib/client/utils.d.ts +1 -0
  83. package/lib/client/utils.js +31 -10
  84. package/lib/client/variable.d.ts +7 -6
  85. package/lib/client/variable.js +132 -71
  86. package/lib/index.js +0 -2
  87. package/lib/server/Plugin.d.ts +7 -7
  88. package/lib/server/Plugin.js +76 -111
  89. package/lib/server/Processor.d.ts +2 -0
  90. package/lib/server/Processor.js +62 -125
  91. package/lib/server/actions/index.js +3 -10
  92. package/lib/server/actions/nodes.js +34 -87
  93. package/lib/server/actions/workflows.js +46 -96
  94. package/lib/server/collections/executions.js +1 -1
  95. package/lib/server/collections/flow_nodes.js +7 -4
  96. package/lib/server/collections/jobs.js +1 -1
  97. package/lib/server/collections/workflows.js +3 -4
  98. package/lib/server/fields/expression-field.d.ts +8 -0
  99. package/lib/server/fields/expression-field.js +26 -0
  100. package/lib/server/fields/index.d.ts +1 -0
  101. package/lib/server/fields/index.js +12 -0
  102. package/lib/server/functions/index.js +3 -14
  103. package/lib/server/index.js +0 -6
  104. package/lib/server/instructions/calculation.js +22 -17
  105. package/lib/server/instructions/condition.js +8 -52
  106. package/lib/server/instructions/create.js +31 -15
  107. package/lib/server/instructions/delay.js +4 -32
  108. package/lib/server/instructions/destroy.js +6 -12
  109. package/lib/server/instructions/index.js +6 -23
  110. package/lib/server/instructions/manual/actions.js +22 -31
  111. package/lib/server/instructions/manual/collecions/users_jobs.js +1 -1
  112. package/lib/server/instructions/manual/index.d.ts +13 -12
  113. package/lib/server/instructions/manual/index.js +9 -47
  114. package/lib/server/instructions/parallel.js +9 -36
  115. package/lib/server/instructions/query.js +17 -15
  116. package/lib/server/instructions/request.js +7 -30
  117. package/lib/server/instructions/update.js +8 -14
  118. package/lib/server/migrations/20221129153547-calculation-variables.js +3 -27
  119. package/lib/server/migrations/20230221032941-change-request-body-type.js +3 -26
  120. package/lib/server/migrations/20230221071831-calculation-expression.js +1 -33
  121. package/lib/server/migrations/20230221121203-condition-calculation.js +5 -28
  122. package/lib/server/migrations/20230221162902-jsonb-to-json.js +3 -18
  123. package/lib/server/migrations/20230411034722-manual-multi-form.d.ts +4 -0
  124. package/lib/server/migrations/20230411034722-manual-multi-form.js +303 -0
  125. package/lib/server/models/Execution.js +0 -5
  126. package/lib/server/models/FlowNode.js +0 -5
  127. package/lib/server/models/Job.js +0 -5
  128. package/lib/server/models/Workflow.js +0 -5
  129. package/lib/server/triggers/collection.js +39 -61
  130. package/lib/server/triggers/index.js +3 -22
  131. package/lib/server/triggers/schedule.js +72 -194
  132. package/package.json +14 -11
@@ -1,7 +1,6 @@
1
1
  export declare const collection: {
2
2
  type: string;
3
3
  title: string;
4
- name: string;
5
4
  required: boolean;
6
5
  'x-reactions': string[];
7
6
  'x-decorator': string;
@@ -13,7 +12,6 @@ export declare const collection: {
13
12
  export declare const values: {
14
13
  type: string;
15
14
  title: string;
16
- name: string;
17
15
  'x-decorator': string;
18
16
  'x-decorator-props': {
19
17
  labelAlign: string;
@@ -25,12 +23,7 @@ export declare const values: {
25
23
  export declare const filter: {
26
24
  type: string;
27
25
  title: string;
28
- name: string;
29
26
  'x-decorator': string;
30
- 'x-decorator-props': {
31
- labelAlign: string;
32
- className: string;
33
- };
34
27
  'x-component': string;
35
28
  'x-component-props': {
36
29
  useProps(): {
@@ -40,3 +33,23 @@ export declare const filter: {
40
33
  dynamicComponent: string;
41
34
  };
42
35
  };
36
+ export declare const appends: {
37
+ type: string;
38
+ title: string;
39
+ description: string;
40
+ 'x-decorator': string;
41
+ 'x-component': string;
42
+ 'x-component-props': {
43
+ mode: string;
44
+ placeholder: string;
45
+ filter(field: any): boolean;
46
+ };
47
+ 'x-reactions': {
48
+ dependencies: string[];
49
+ fulfill: {
50
+ state: {
51
+ visible: string;
52
+ };
53
+ };
54
+ }[];
55
+ };
@@ -3,44 +3,32 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.values = exports.filter = exports.collection = void 0;
7
-
6
+ exports.values = exports.filter = exports.collection = exports.appends = void 0;
8
7
  function _css() {
9
8
  const data = require("@emotion/css");
10
-
11
9
  _css = function _css() {
12
10
  return data;
13
11
  };
14
-
15
12
  return data;
16
13
  }
17
-
18
14
  function _react() {
19
15
  const data = require("@formily/react");
20
-
21
16
  _react = function _react() {
22
17
  return data;
23
18
  };
24
-
25
19
  return data;
26
20
  }
27
-
28
21
  function _client() {
29
22
  const data = require("@nocobase/client");
30
-
31
23
  _client = function _client() {
32
24
  return data;
33
25
  };
34
-
35
26
  return data;
36
27
  }
37
-
38
28
  var _locale = require("../locale");
39
-
40
29
  const collection = {
41
30
  type: 'string',
42
31
  title: '{{t("Collection")}}',
43
- name: 'config.collection',
44
32
  required: true,
45
33
  'x-reactions': ['{{useCollectionDataSource()}}'],
46
34
  'x-decorator': 'FormItem',
@@ -53,7 +41,6 @@ exports.collection = collection;
53
41
  const values = {
54
42
  type: 'object',
55
43
  title: '{{t("Fields values")}}',
56
- name: 'config.params.values',
57
44
  'x-decorator': 'FormItem',
58
45
  'x-decorator-props': {
59
46
  labelAlign: 'left',
@@ -68,23 +55,13 @@ exports.values = values;
68
55
  const filter = {
69
56
  type: 'object',
70
57
  title: '{{t("Filter")}}',
71
- name: 'config.params.filter',
72
58
  'x-decorator': 'FormItem',
73
- 'x-decorator-props': {
74
- labelAlign: 'left',
75
- className: (0, _css().css)`
76
- flex-direction: column;
77
- `
78
- },
79
59
  'x-component': 'Filter',
80
60
  'x-component-props': {
81
61
  useProps() {
82
- var _values$config;
83
-
84
62
  const _useForm = (0, _react().useForm)(),
85
- values = _useForm.values;
86
-
87
- const options = (0, _client().useCollectionFilterOptions)((_values$config = values.config) === null || _values$config === void 0 ? void 0 : _values$config.collection);
63
+ values = _useForm.values;
64
+ const options = (0, _client().useCollectionFilterOptions)(values === null || values === void 0 ? void 0 : values.collection);
88
65
  return {
89
66
  options,
90
67
  className: (0, _css().css)`
@@ -93,8 +70,30 @@ const filter = {
93
70
  `
94
71
  };
95
72
  },
96
-
97
73
  dynamicComponent: 'FilterDynamicComponent'
98
74
  }
99
75
  };
100
- exports.filter = filter;
76
+ exports.filter = filter;
77
+ const appends = {
78
+ type: 'array',
79
+ title: `{{t("Preload associations", { ns: "${_locale.NAMESPACE}" })}}`,
80
+ description: `{{t("Only configured association field could be accessed in following nodes", { ns: "${_locale.NAMESPACE}" })}}`,
81
+ 'x-decorator': 'FormItem',
82
+ 'x-component': 'FieldsSelect',
83
+ 'x-component-props': {
84
+ mode: 'multiple',
85
+ placeholder: '{{t("Select Field")}}',
86
+ filter(field) {
87
+ return ['linkTo', 'belongsTo', 'hasOne', 'hasMany', 'belongsToMany'].includes(field.type);
88
+ }
89
+ },
90
+ 'x-reactions': [{
91
+ dependencies: ['collection'],
92
+ fulfill: {
93
+ state: {
94
+ visible: '{{!!$deps[0]}}'
95
+ }
96
+ }
97
+ }]
98
+ };
99
+ exports.appends = appends;
@@ -4,43 +4,30 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.executionSchema = exports.executionCollection = void 0;
7
-
8
7
  function _react() {
9
8
  const data = _interopRequireDefault(require("react"));
10
-
11
9
  _react = function _react() {
12
10
  return data;
13
11
  };
14
-
15
12
  return data;
16
13
  }
17
-
18
14
  function _reactRouterDom() {
19
15
  const data = require("react-router-dom");
20
-
21
16
  _reactRouterDom = function _reactRouterDom() {
22
17
  return data;
23
18
  };
24
-
25
19
  return data;
26
20
  }
27
-
28
21
  function _client() {
29
22
  const data = require("@nocobase/client");
30
-
31
23
  _client = function _client() {
32
24
  return data;
33
25
  };
34
-
35
26
  return data;
36
27
  }
37
-
38
28
  var _constants = require("../constants");
39
-
40
29
  var _locale = require("../locale");
41
-
42
30
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
43
-
44
31
  const executionCollection = {
45
32
  name: 'executions',
46
33
  fields: [{
@@ -62,19 +49,16 @@ const executionCollection = {
62
49
  uiSchema: {
63
50
  type: 'number',
64
51
  title: `{{t("Version", { ns: "${_locale.NAMESPACE}" })}}`,
65
-
66
52
  ['x-component']({
67
53
  value
68
54
  }) {
69
55
  const _useActionContext = (0, _client().useActionContext)(),
70
- setVisible = _useActionContext.setVisible;
71
-
56
+ setVisible = _useActionContext.setVisible;
72
57
  return _react().default.createElement(_reactRouterDom().Link, {
73
58
  to: `/admin/settings/workflow/workflows/${value}`,
74
59
  onClick: () => setVisible(false)
75
60
  }, `#${value}`);
76
61
  }
77
-
78
62
  }
79
63
  }, {
80
64
  type: 'number',
@@ -122,7 +106,8 @@ const executionSchema = {
122
106
  marginBottom: 16
123
107
  }
124
108
  },
125
- properties: {// filter: {
109
+ properties: {
110
+ // filter: {
126
111
  // type: 'object',
127
112
  // 'x-component': 'Filter',
128
113
  // }
@@ -4,47 +4,32 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.workflowSchema = void 0;
7
-
8
7
  function _antd() {
9
8
  const data = require("antd");
10
-
11
9
  _antd = function _antd() {
12
10
  return data;
13
11
  };
14
-
15
12
  return data;
16
13
  }
17
-
18
14
  function _reactI18next() {
19
15
  const data = require("react-i18next");
20
-
21
16
  _reactI18next = function _reactI18next() {
22
17
  return data;
23
18
  };
24
-
25
19
  return data;
26
20
  }
27
-
28
21
  function _client() {
29
22
  const data = require("@nocobase/client");
30
-
31
23
  _client = function _client() {
32
24
  return data;
33
25
  };
34
-
35
26
  return data;
36
27
  }
37
-
38
28
  var _locale = require("../locale");
39
-
40
29
  var _triggers = require("../triggers");
41
-
42
30
  var _executions = require("./executions");
43
-
44
31
  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); } }
45
-
46
32
  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); }); }; }
47
-
48
33
  const collection = {
49
34
  name: 'workflows',
50
35
  fields: [{
@@ -312,9 +297,9 @@ const workflowSchema = {
312
297
  type: 'primary'
313
298
  },
314
299
  properties: {
315
- modal: {
300
+ drawer: {
316
301
  type: 'void',
317
- 'x-component': 'Action.Modal',
302
+ 'x-component': 'Action.Drawer',
318
303
  'x-decorator': 'Form',
319
304
  'x-decorator-props': {
320
305
  useValues: '{{ cm.useValuesFromRecord }}'
@@ -335,7 +320,7 @@ const workflowSchema = {
335
320
  },
336
321
  footer: {
337
322
  type: 'void',
338
- 'x-component': 'Action.Modal.Footer',
323
+ 'x-component': 'Action.Drawer.Footer',
339
324
  properties: {
340
325
  cancel: {
341
326
  title: '{{ t("Cancel") }}',
@@ -365,36 +350,29 @@ const workflowSchema = {
365
350
  'x-component-props': {
366
351
  useAction() {
367
352
  const _useTranslation = (0, _reactI18next().useTranslation)(),
368
- t = _useTranslation.t;
369
-
353
+ t = _useTranslation.t;
370
354
  const _useResourceActionCon = (0, _client().useResourceActionContext)(),
371
- refresh = _useResourceActionCon.refresh;
372
-
355
+ refresh = _useResourceActionCon.refresh;
373
356
  const _useResourceContext = (0, _client().useResourceContext)(),
374
- resource = _useResourceContext.resource,
375
- targetKey = _useResourceContext.targetKey;
376
-
357
+ resource = _useResourceContext.resource,
358
+ targetKey = _useResourceContext.targetKey;
377
359
  const _useRecord = (0, _client().useRecord)(),
378
- filterByTk = _useRecord[targetKey];
379
-
360
+ filterByTk = _useRecord[targetKey];
380
361
  return {
381
362
  run() {
382
363
  return _asyncToGenerator(function* () {
383
364
  yield resource.revision({
384
365
  filterByTk
385
366
  });
386
-
387
367
  _antd().message.success(t('Operation succeeded'));
388
-
389
368
  refresh();
390
369
  })();
391
370
  }
392
-
393
371
  };
394
372
  }
395
-
396
373
  }
397
- } // delete: {
374
+ }
375
+ // delete: {
398
376
  // type: 'void',
399
377
  // title: '{{ t("Delete") }}',
400
378
  // 'x-component': 'Action.Link',
@@ -406,7 +384,6 @@ const workflowSchema = {
406
384
  // useAction: '{{ cm.useDestroyActionAndRefreshCM }}',
407
385
  // },
408
386
  // },
409
-
410
387
  }
411
388
  }
412
389
  }
@@ -4,17 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.workflowVersionDropdownClass = exports.workflowPageClass = exports.nodeTitleClass = exports.nodeSubtreeClass = exports.nodeMetaClass = exports.nodeHeaderClass = exports.nodeClass = exports.nodeCardClass = exports.nodeBlockClass = exports.branchClass = exports.branchBlockClass = exports.addButtonClass = void 0;
7
-
8
7
  function _css() {
9
8
  const data = require("@emotion/css");
10
-
11
9
  _css = function _css() {
12
10
  return data;
13
11
  };
14
-
15
12
  return data;
16
13
  }
17
-
18
14
  const workflowPageClass = (0, _css().css)`
19
15
  .workflow-toolbar{
20
16
  display: flex;
@@ -49,28 +45,19 @@ const workflowPageClass = (0, _css().css)`
49
45
  flex-direction: column;
50
46
  align-items: center;
51
47
  padding: 2em;
48
+
49
+ .end{
50
+ cursor: default;
51
+
52
+ &:hover{
53
+ box-shadow: 0 .25em .5em rgba(0, 0, 0, .1);
54
+ }
55
+ }
52
56
  }
53
57
  `;
54
58
  exports.workflowPageClass = workflowPageClass;
55
59
  const workflowVersionDropdownClass = (0, _css().css)`
56
60
  .ant-dropdown-menu-item{
57
-
58
- strong{
59
- font-weight: normal;
60
- }
61
-
62
- &.enabled{
63
- strong{
64
- font-weight: bold;
65
- }
66
- }
67
-
68
- &.unexecuted{
69
- strong{
70
- font-style: italic;
71
- }
72
- }
73
-
74
61
  .ant-dropdown-menu-title-content{
75
62
  text-align: right;
76
63
 
@@ -79,6 +66,22 @@ const workflowVersionDropdownClass = (0, _css().css)`
79
66
  color: #999;
80
67
  font-size: 80%;
81
68
  }
69
+
70
+ strong{
71
+ font-weight: normal;
72
+ }
73
+
74
+ > .enabled{
75
+ strong{
76
+ font-weight: bold;
77
+ }
78
+ }
79
+
80
+ > .unexecuted{
81
+ strong{
82
+ font-style: italic;
83
+ }
84
+ }
82
85
  }
83
86
  }
84
87
  `;
@@ -172,19 +175,27 @@ const nodeClass = (0, _css().css)`
172
175
  `;
173
176
  exports.nodeClass = nodeClass;
174
177
  const nodeCardClass = (0, _css().css)`
178
+ position: relative;
175
179
  width: 20em;
176
180
  background: #fff;
177
181
  padding: 1em;
178
182
  box-shadow: 0 .25em .5em rgba(0, 0, 0, .1);
183
+ border-radius: .5em;
184
+ cursor: pointer;
185
+ transition: box-shadow .3s ease;
186
+
187
+ &.configuring{
188
+ box-shadow: 0 .25em 1em rgba(0, 100, 200, .25);
189
+ }
179
190
 
180
191
  .workflow-node-remove-button,
181
192
  .workflow-node-job-button{
182
193
  position: absolute;
183
- right: -.5em;
184
- top: -.5em;
185
194
  }
186
195
 
187
196
  .workflow-node-remove-button{
197
+ right: .5em;
198
+ top: .5em;
188
199
  color: #999;
189
200
  opacity: 0;
190
201
  transition: opacity .3s ease;
@@ -200,8 +211,8 @@ const nodeCardClass = (0, _css().css)`
200
211
 
201
212
  .workflow-node-job-button{
202
213
  display: flex;
203
- top: 0;
204
- right: 0;
214
+ top: 1em;
215
+ right: 1em;
205
216
  width: 1.25rem;
206
217
  height: 1.25rem;
207
218
  min-width: 1.25rem;
@@ -215,7 +226,32 @@ const nodeCardClass = (0, _css().css)`
215
226
  }
216
227
  }
217
228
 
229
+ .ant-input{
230
+ font-weight: bold;
231
+
232
+ &:not(:focus){
233
+ transition: background-color .3s ease, border-color .3s ease;
234
+ border-color: #f7f7f7;
235
+ background-color: #f7f7f7;
236
+
237
+ &:not(:disabled):hover{
238
+ border-color: #eee;
239
+ background-color: #eee;
240
+ }
241
+
242
+ &:disabled:hover{
243
+ border-color: #f7f7f7;
244
+ }
245
+ }
246
+ }
247
+
248
+ .workflow-node-config-button{
249
+ padding: 0;
250
+ }
251
+
218
252
  &:hover{
253
+ box-shadow: 0 .25em .5em rgba(0, 0, 0, .25);
254
+
219
255
  .workflow-node-remove-button{
220
256
  opacity: 1;
221
257
  }
@@ -228,13 +264,20 @@ const nodeHeaderClass = (0, _css().css)`
228
264
  exports.nodeHeaderClass = nodeHeaderClass;
229
265
  const nodeMetaClass = (0, _css().css)`
230
266
  margin-bottom: .5em;
267
+
268
+ .workflow-node-id{
269
+ color: #999;
270
+
271
+ &:before{
272
+ content: "#"
273
+ }
274
+ }
231
275
  `;
232
276
  exports.nodeMetaClass = nodeMetaClass;
233
277
  const nodeTitleClass = (0, _css().css)`
234
278
  display: flex;
235
279
  align-items: center;
236
280
  font-weight: normal;
237
-
238
281
  .workflow-node-id{
239
282
  color: #999;
240
283
  }
@@ -249,5 +292,11 @@ exports.nodeSubtreeClass = nodeSubtreeClass;
249
292
  const addButtonClass = (0, _css().css)`
250
293
  flex-shrink: 0;
251
294
  padding: 2em 0;
295
+
296
+ > .ant-btn{
297
+ &:disabled{
298
+ visibility: hidden;
299
+ }
300
+ }
252
301
  `;
253
302
  exports.addButtonClass = addButtonClass;
@@ -1,22 +1,21 @@
1
- import React from 'react';
2
1
  import { SchemaInitializerItemOptions, useCollectionDataSource } from '@nocobase/client';
3
2
  import { CollectionFieldInitializers } from '../components/CollectionFieldInitializers';
4
3
  declare const _default: {
5
4
  title: string;
6
5
  type: string;
7
6
  fieldset: {
8
- 'config.collection': {
7
+ collection: {
9
8
  "x-reactions": (string | {
10
9
  target: string;
10
+ effects: string[];
11
11
  fulfill: {
12
12
  state: {
13
- visible: string;
13
+ value: any[];
14
14
  };
15
15
  };
16
16
  })[];
17
17
  type: string;
18
18
  title: string;
19
- name: string;
20
19
  required: boolean;
21
20
  'x-decorator': string;
22
21
  'x-component': string;
@@ -24,10 +23,9 @@ declare const _default: {
24
23
  placeholder: string;
25
24
  };
26
25
  };
27
- 'config.mode': {
26
+ mode: {
28
27
  type: string;
29
28
  title: string;
30
- name: string;
31
29
  'x-decorator': string;
32
30
  'x-component': string;
33
31
  'x-component-props': {
@@ -39,17 +37,16 @@ declare const _default: {
39
37
  };
40
38
  required: boolean;
41
39
  'x-reactions': {
42
- target: string;
40
+ dependencies: string[];
43
41
  fulfill: {
44
42
  state: {
45
- disabled: string;
43
+ visible: string;
46
44
  };
47
45
  };
48
46
  }[];
49
47
  };
50
- 'config.changed': {
48
+ changed: {
51
49
  type: string;
52
- name: string;
53
50
  title: string;
54
51
  description: string;
55
52
  'x-decorator': string;
@@ -57,17 +54,29 @@ declare const _default: {
57
54
  'x-component-props': {
58
55
  mode: string;
59
56
  placeholder: string;
57
+ filter(field: any): boolean;
60
58
  };
59
+ 'x-reactions': {
60
+ dependencies: string[];
61
+ fulfill: {
62
+ state: {
63
+ visible: string;
64
+ };
65
+ };
66
+ }[];
61
67
  };
62
- 'config.condition': {
63
- name: string;
68
+ condition: {
64
69
  title: string;
70
+ 'x-reactions': {
71
+ dependencies: string[];
72
+ fulfill: {
73
+ state: {
74
+ visible: string;
75
+ };
76
+ };
77
+ }[];
65
78
  type: string;
66
79
  'x-decorator': string;
67
- 'x-decorator-props': {
68
- labelAlign: string;
69
- className: string;
70
- };
71
80
  'x-component': string;
72
81
  'x-component-props': {
73
82
  useProps(): {
@@ -77,14 +86,34 @@ declare const _default: {
77
86
  dynamicComponent: string;
78
87
  };
79
88
  };
89
+ appends: {
90
+ 'x-reactions': {
91
+ dependencies: string[];
92
+ fulfill: {
93
+ state: {
94
+ visible: string;
95
+ };
96
+ };
97
+ }[];
98
+ type: string;
99
+ title: string;
100
+ description: string;
101
+ 'x-decorator': string;
102
+ 'x-component': string;
103
+ 'x-component-props': {
104
+ mode: string;
105
+ placeholder: string;
106
+ filter(field: any): boolean;
107
+ };
108
+ };
80
109
  };
81
110
  scope: {
82
111
  useCollectionDataSource: typeof useCollectionDataSource;
83
112
  };
84
113
  components: {
85
- FieldsSelect: React.MemoExoticComponent<React.FunctionComponent<unknown>>;
114
+ FieldsSelect: import("react").MemoExoticComponent<import("react").FunctionComponent<Pick<any, string | number | symbol>>>;
86
115
  };
87
- getOptions(config: any, types: any): any[];
116
+ getOptions(config: any, types: any): import("../variable").VariableOption[];
88
117
  useInitializers(config: any): SchemaInitializerItemOptions | null;
89
118
  initializers: {
90
119
  CollectionFieldInitializers: typeof CollectionFieldInitializers;