@nocobase/plugin-workflow 0.8.0-alpha.9 → 0.8.1-alpha.4

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 (95) hide show
  1. package/lib/client/AddButton.js +21 -13
  2. package/lib/client/ExecutionCanvas.js +9 -21
  3. package/lib/client/ExecutionResourceProvider.d.ts +2 -1
  4. package/lib/client/ExecutionResourceProvider.js +4 -3
  5. package/lib/client/FlowContext.js +1 -1
  6. package/lib/client/WorkflowCanvas.js +135 -36
  7. package/lib/client/WorkflowProvider.d.ts +3 -0
  8. package/lib/client/WorkflowProvider.js +71 -16
  9. package/lib/client/WorkflowShortcut.d.ts +0 -1
  10. package/lib/client/WorkflowShortcut.js +4 -47
  11. package/lib/client/calculators.d.ts +27 -37
  12. package/lib/client/calculators.js +168 -150
  13. package/lib/client/components/CollectionFieldset.js +10 -20
  14. package/lib/client/components/Duration.js +3 -14
  15. package/lib/client/components/EjsTextArea.d.ts +2 -0
  16. package/lib/client/components/EjsTextArea.js +232 -0
  17. package/lib/client/components/OpenDrawer.d.ts +6 -0
  18. package/lib/client/components/OpenDrawer.js +93 -0
  19. package/lib/client/constants.js +11 -9
  20. package/lib/client/index.d.ts +1 -0
  21. package/lib/client/index.js +14 -0
  22. package/lib/client/locale/en-US.d.ts +105 -0
  23. package/lib/client/locale/en-US.js +111 -0
  24. package/lib/client/locale/index.d.ts +3 -0
  25. package/lib/client/locale/index.js +69 -0
  26. package/lib/client/locale/ja-JP.d.ts +88 -0
  27. package/lib/client/locale/ja-JP.js +94 -0
  28. package/lib/client/locale/ru-RU.d.ts +88 -0
  29. package/lib/client/locale/ru-RU.js +94 -0
  30. package/lib/client/locale/tr-TR.d.ts +88 -0
  31. package/lib/client/locale/tr-TR.js +94 -0
  32. package/lib/client/locale/zh-CN.d.ts +130 -0
  33. package/lib/client/locale/zh-CN.js +136 -0
  34. package/lib/client/nodes/calculation.d.ts +0 -1
  35. package/lib/client/nodes/calculation.js +9 -17
  36. package/lib/client/nodes/condition.js +16 -22
  37. package/lib/client/nodes/create.d.ts +3 -1
  38. package/lib/client/nodes/create.js +11 -11
  39. package/lib/client/nodes/delay.js +8 -6
  40. package/lib/client/nodes/index.js +46 -14
  41. package/lib/client/nodes/parallel.d.ts +0 -1
  42. package/lib/client/nodes/parallel.js +11 -32
  43. package/lib/client/nodes/query.js +9 -17
  44. package/lib/client/nodes/request.d.ts +138 -0
  45. package/lib/client/nodes/request.js +167 -0
  46. package/lib/client/nodes/update.js +4 -2
  47. package/lib/client/schemas/collection.js +3 -1
  48. package/lib/client/schemas/executions.d.ts +211 -207
  49. package/lib/client/schemas/executions.js +102 -96
  50. package/lib/client/schemas/workflows.js +112 -22
  51. package/lib/client/style.js +7 -7
  52. package/lib/client/triggers/collection.d.ts +2 -1
  53. package/lib/client/triggers/collection.js +49 -34
  54. package/lib/client/triggers/index.d.ts +3 -3
  55. package/lib/client/triggers/index.js +46 -46
  56. package/lib/client/triggers/schedule/EndsByField.js +13 -39
  57. package/lib/client/triggers/schedule/OnField.js +10 -5
  58. package/lib/client/triggers/schedule/RepeatField.js +6 -14
  59. package/lib/client/triggers/schedule/ScheduleConfig.js +25 -20
  60. package/lib/client/triggers/schedule/constants.d.ts +4 -0
  61. package/lib/client/triggers/schedule/constants.js +11 -0
  62. package/lib/client/triggers/schedule/index.d.ts +2 -3
  63. package/lib/client/triggers/schedule/index.js +55 -40
  64. package/lib/server/Plugin.d.ts +15 -5
  65. package/lib/server/Plugin.js +176 -61
  66. package/lib/server/Processor.d.ts +1 -2
  67. package/lib/server/Processor.js +3 -19
  68. package/lib/server/actions/jobs.js +2 -3
  69. package/lib/server/actions/workflows.js +13 -5
  70. package/lib/server/calculators/index.d.ts +4 -2
  71. package/lib/server/calculators/index.js +6 -4
  72. package/lib/server/collections/executions.js +2 -1
  73. package/lib/server/constants.d.ts +1 -0
  74. package/lib/server/constants.js +1 -0
  75. package/lib/server/extensions/assignees/actions.js +2 -3
  76. package/lib/server/extensions/assignees/collections/users_jobs.js +9 -1
  77. package/lib/server/index.d.ts +3 -4
  78. package/lib/server/index.js +21 -44
  79. package/lib/server/instructions/condition.js +1 -1
  80. package/lib/server/instructions/create.js +3 -1
  81. package/lib/server/instructions/delay.js +2 -3
  82. package/lib/server/instructions/destroy.js +3 -1
  83. package/lib/server/instructions/index.d.ts +3 -2
  84. package/lib/server/instructions/index.js +1 -1
  85. package/lib/server/instructions/prompt.js +2 -1
  86. package/lib/server/instructions/query.js +3 -1
  87. package/lib/server/instructions/request.d.ts +14 -0
  88. package/lib/server/instructions/request.js +154 -0
  89. package/lib/server/instructions/update.d.ts +1 -1
  90. package/lib/server/instructions/update.js +3 -1
  91. package/lib/server/migrations/20221129153547-calculation-variables.d.ts +5 -0
  92. package/lib/server/migrations/20221129153547-calculation-variables.js +116 -0
  93. package/lib/server/triggers/collection.js +5 -7
  94. package/lib/server/triggers/schedule.js +17 -6
  95. package/package.json +13 -8
@@ -0,0 +1,130 @@
1
+ declare const _default: {
2
+ Workflow: string;
3
+ 'Execution history': string;
4
+ Executed: string;
5
+ 'Trigger type': string;
6
+ Status: string;
7
+ On: string;
8
+ Off: string;
9
+ Version: string;
10
+ 'Copy to new version': string;
11
+ Duplicate: string;
12
+ Loading: string;
13
+ 'Load failed': string;
14
+ Trigger: string;
15
+ 'Trigger variables': string;
16
+ 'Trigger data': string;
17
+ 'Trigger time': string;
18
+ 'Triggered at': string;
19
+ 'Collection event': string;
20
+ 'Trigger on': string;
21
+ 'After record added': string;
22
+ 'After record updated': string;
23
+ 'After record added or updated': string;
24
+ 'After record deleted': string;
25
+ 'Changed fields': string;
26
+ 'Triggered only if one of the selected fields changes. If unselected, it means that it will be triggered when any field changes. When record is added or deleted, any field is considered to have been changed.': string;
27
+ 'Only triggers when match conditions': string;
28
+ 'Schedule event': string;
29
+ 'Trigger mode': string;
30
+ 'Based on certain date': string;
31
+ 'Based on date field of collection': string;
32
+ 'Starts on': string;
33
+ 'Ends on': string;
34
+ 'No end': string;
35
+ 'Exactly at': string;
36
+ 'Repeat mode': string;
37
+ 'Repeat limit': string;
38
+ 'No limit': string;
39
+ Seconds: string;
40
+ Minutes: string;
41
+ Hours: string;
42
+ Days: string;
43
+ Weeks: string;
44
+ Months: string;
45
+ 'No repeat': string;
46
+ Every: string;
47
+ 'By minute': string;
48
+ 'By hour': string;
49
+ 'By day': string;
50
+ 'By week': string;
51
+ 'By month': string;
52
+ 'By field': string;
53
+ 'By custom date': string;
54
+ Advanced: string;
55
+ End: string;
56
+ 'Node result': string;
57
+ Constant: string;
58
+ Null: string;
59
+ Boolean: string;
60
+ String: string;
61
+ Calculator: string;
62
+ 'Arithmetic calculation': string;
63
+ 'String operation': string;
64
+ 'Executed at': string;
65
+ Queueing: string;
66
+ 'On going': string;
67
+ Succeeded: string;
68
+ Failed: string;
69
+ Pending: string;
70
+ Canceled: string;
71
+ 'This node contains branches, deleting will also be preformed to them, are you sure?': string;
72
+ Control: string;
73
+ 'Collection operations': string;
74
+ 'Extended types': string;
75
+ 'Node type': string;
76
+ Calculation: string;
77
+ 'Configure calculation': string;
78
+ 'Calculation result': string;
79
+ True: string;
80
+ False: string;
81
+ concat: string;
82
+ Condition: string;
83
+ Mode: string;
84
+ 'Continue when "Yes"': string;
85
+ 'Branch into "Yes" and "No"': string;
86
+ Conditions: string;
87
+ 'Parallel branch': string;
88
+ 'Add branch': string;
89
+ 'All succeeded': string;
90
+ 'Any succeeded': string;
91
+ 'Any succeeded or failed': string;
92
+ 'Continue after all branches succeeded': string;
93
+ 'Continue after any branch succeeded': string;
94
+ 'Continue after any branch succeeded, or exit after any branch failed': string;
95
+ Delay: string;
96
+ Duration: string;
97
+ 'End Status': string;
98
+ 'Select status': string;
99
+ 'Succeed and continue': string;
100
+ 'Fail and exit': string;
101
+ 'Create record': string;
102
+ 'Update record': string;
103
+ 'Query record': string;
104
+ 'Multiple records': string;
105
+ 'Please select collection first': string;
106
+ 'Only update records matching conditions': string;
107
+ 'Fields that are not assigned a value will be set to the default value, and those that do not have a default value are set to null.': string;
108
+ 'Trigger in executed workflow cannot be modified': string;
109
+ 'Node in executed workflow cannot be modified': string;
110
+ 'Can not delete': string;
111
+ 'The result of this node has been referenced by other nodes ({{nodes}}), please remove the usage before deleting.': string;
112
+ 'HTTP request': string;
113
+ URL: string;
114
+ 'You can use the above available variables in URL.': string;
115
+ 'Request headers': string;
116
+ 'Name(e.g. Content-Type)': string;
117
+ 'Value(e.g. Application/json)': string;
118
+ 'Add request header': string;
119
+ 'HTTP method': string;
120
+ 'Request data': string;
121
+ 'Input request data': string;
122
+ 'You can use the above available variables in request data.': string;
123
+ 'Copy success!': string;
124
+ 'Copy variable output template statement': string;
125
+ 'Default headers is Content-Type: application/json': string;
126
+ 'Ignore fail request and continue workflow': string;
127
+ 'Syntax see': string;
128
+ 'Show available variable tool': string;
129
+ };
130
+ export default _default;
@@ -0,0 +1,136 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _default = {
8
+ 'Workflow': '工作流',
9
+ 'Execution history': '执行历史',
10
+ 'Executed': '已执行',
11
+ 'Trigger type': '触发方式',
12
+ 'Status': '状态',
13
+ 'On': '启用',
14
+ 'Off': '停用',
15
+ 'Version': '版本',
16
+ 'Copy to new version': '复制到新版本',
17
+ 'Duplicate': '复制',
18
+ 'Loading': '加载中',
19
+ 'Load failed': '加载失败',
20
+ 'Trigger': '触发器',
21
+ 'Trigger variables': '触发器变量',
22
+ 'Trigger data': '触发数据',
23
+ 'Trigger time': '触发时间',
24
+ 'Triggered at': '触发时间',
25
+ 'Collection event': '数据表事件',
26
+ 'Trigger on': '触发时机',
27
+ 'After record added': '新增数据后',
28
+ 'After record updated': '更新数据后',
29
+ 'After record added or updated': '新增或更新数据后',
30
+ 'After record deleted': '删除数据后',
31
+ 'Changed fields': '发生变动的字段',
32
+ 'Triggered only if one of the selected fields changes. If unselected, it means that it will be triggered when any field changes. When record is added or deleted, any field is considered to have been changed.': '只有被选中的某个字段发生变动时才会触发。如果不选择,则表示任何字段变动时都会触发。新增或删除数据时,任意字段都被认为发生变动。',
33
+ 'Only triggers when match conditions': '满足以下条件才触发',
34
+ 'Schedule event': '定时任务',
35
+ 'Trigger mode': '触发模式',
36
+ 'Based on certain date': '自定义时间',
37
+ 'Based on date field of collection': '根据数据表时间字段',
38
+ 'Starts on': '开始于',
39
+ 'Ends on': '结束于',
40
+ 'No end': '不结束',
41
+ 'Exactly at': '当时',
42
+ 'Repeat mode': '重复模式',
43
+ 'Repeat limit': '重复次数',
44
+ 'No limit': '不限',
45
+ 'Seconds': '秒',
46
+ 'Minutes': '分钟',
47
+ 'Hours': '小时',
48
+ 'Days': '天',
49
+ 'Weeks': '周',
50
+ 'Months': '月',
51
+ 'No repeat': '不重复',
52
+ 'Every': '每',
53
+ 'By minute': '按分钟',
54
+ 'By hour': '按小时',
55
+ 'By day': '按天',
56
+ 'By week': '按周',
57
+ 'By month': '按月',
58
+ 'By field': '数据表字段',
59
+ 'By custom date': '自定义时间',
60
+ 'Advanced': '高级模式',
61
+ 'End': '结束',
62
+ 'Node result': '节点数据',
63
+ 'Constant': '常量',
64
+ 'Null': '空值',
65
+ 'Boolean': '逻辑值',
66
+ 'String': '字符串',
67
+ 'Calculator': '运算',
68
+ 'Arithmetic calculation': '算术运算',
69
+ 'String operation': '字符串',
70
+ 'Executed at': '执行于',
71
+ 'Queueing': '队列中',
72
+ 'On going': '进行中',
73
+ 'Succeeded': '成功',
74
+ 'Failed': '失败',
75
+ 'Pending': '等待处理',
76
+ 'Canceled': '已取消',
77
+ 'This node contains branches, deleting will also be preformed to them, are you sure?': '节点包含分支,将同时删除其所有分支下的子节点,确定继续?',
78
+ 'Control': '流程控制',
79
+ 'Collection operations': '数据表操作',
80
+ 'Extended types': '扩展类型',
81
+ 'Node type': '节点类型',
82
+ 'Calculation': '运算',
83
+ 'Configure calculation': '配置运算',
84
+ 'Calculation result': '运算结果',
85
+ 'True': '真',
86
+ 'False': '假',
87
+ 'concat': '连接',
88
+ 'Condition': '条件判断',
89
+ 'Mode': '模式',
90
+ 'Continue when "Yes"': '“是”则继续',
91
+ 'Branch into "Yes" and "No"': '“是”和“否”分别继续',
92
+ 'Conditions': '条件配置',
93
+ 'Parallel branch': '分支',
94
+ 'Add branch': '增加分支',
95
+ 'All succeeded': '全部成功',
96
+ 'Any succeeded': '任意成功',
97
+ 'Any succeeded or failed': '任意成功或失败',
98
+ 'Continue after all branches succeeded': '全部分支都成功后才能继续',
99
+ 'Continue after any branch succeeded': '任意分支成功后就继续',
100
+ 'Continue after any branch succeeded, or exit after any branch failed': '任意分支成功继续,或失败后退出',
101
+ 'Delay': '延时',
102
+ 'Duration': '时长',
103
+ 'End Status': '到时状态',
104
+ 'Select status': '选择状态',
105
+ 'Succeed and continue': '通过并继续',
106
+ 'Fail and exit': '失败并退出',
107
+ 'Create record': '新增数据',
108
+ 'Update record': '更新数据',
109
+ 'Query record': '查询数据',
110
+ 'Multiple records': '多条数据',
111
+ 'Please select collection first': '请先选择数据表',
112
+ 'Only update records matching conditions': '只更新满足条件的数据',
113
+ 'Fields that are not assigned a value will be set to the default value, and those that do not have a default value are set to null.': '未被赋值的字段将被设置为默认值,没有默认值的设置为空值。',
114
+ 'Trigger in executed workflow cannot be modified': '已经执行过工作流的触发器不能被修改',
115
+ 'Node in executed workflow cannot be modified': '已经执行过工作流中的节点不能被修改',
116
+ 'Can not delete': '无法删除',
117
+ 'The result of this node has been referenced by other nodes ({{nodes}}), please remove the usage before deleting.': '该节点的执行结果已被其他节点({{nodes}})引用,删除前请先移除引用。',
118
+ 'HTTP request': 'HTTP 请求',
119
+ 'URL': '地址',
120
+ 'You can use the above available variables in URL.': '您可以在地址中使用使用上面的可用变量。',
121
+ 'Request headers': '请求头',
122
+ 'Name(e.g. Content-Type)': '名称(例如 Content-Type)',
123
+ 'Value(e.g. Application/json)': '值(例如 Application/json)',
124
+ 'Add request header': '添加请求头',
125
+ 'HTTP method': 'HTTP 方法',
126
+ 'Request data': '请求数据',
127
+ 'Input request data': '输入请求数据',
128
+ 'You can use the above available variables in request data.': '您可以在请求数据中使用上面的可用变量。',
129
+ 'Copy success!': '拷贝成功!',
130
+ 'Copy variable output template statement': '拷贝变量输出模版语句',
131
+ 'Default headers is Content-Type: application/json': '默认请求头是 Content-Type: application/json',
132
+ 'Ignore fail request and continue workflow': '忽略失败请求并继续工作流',
133
+ 'Syntax see': '语法参考',
134
+ 'Show available variable tool': '显示可用变量工具'
135
+ };
136
+ exports.default = _default;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: {
3
2
  title: string;
4
3
  type: string;
@@ -5,16 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
- function _css() {
9
- const data = require("@emotion/css");
10
-
11
- _css = function _css() {
12
- return data;
13
- };
14
-
15
- return data;
16
- }
17
-
18
8
  function _react() {
19
9
  const data = _interopRequireDefault(require("react"));
20
10
 
@@ -25,10 +15,10 @@ function _react() {
25
15
  return data;
26
16
  }
27
17
 
28
- function _reactI18next() {
29
- const data = require("react-i18next");
18
+ function _css() {
19
+ const data = require("@emotion/css");
30
20
 
31
- _reactI18next = function _reactI18next() {
21
+ _css = function _css() {
32
22
  return data;
33
23
  };
34
24
 
@@ -37,6 +27,8 @@ function _reactI18next() {
37
27
 
38
28
  var _calculators = require("../calculators");
39
29
 
30
+ var _locale = require("../locale");
31
+
40
32
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
41
33
 
42
34
  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; }
@@ -46,13 +38,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
46
38
  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; }
47
39
 
48
40
  var _default = {
49
- title: '{{t("Calculation")}}',
41
+ title: `{{t("Calculation", { ns: "${_locale.NAMESPACE}" })}}`,
50
42
  type: 'calculation',
51
43
  group: 'control',
52
44
  fieldset: {
53
45
  'config.calculation': {
54
46
  type: 'object',
55
- title: '{{t("Configure calculation")}}',
47
+ title: `{{t("Configure calculation", { ns: "${_locale.NAMESPACE}" })}}`,
56
48
  name: 'config.calculation',
57
49
  required: true,
58
50
  'x-decorator': 'FormItem',
@@ -73,8 +65,8 @@ var _default = {
73
65
  },
74
66
 
75
67
  getter() {
76
- const _useTranslation = (0, _reactI18next().useTranslation)(),
77
- t = _useTranslation.t;
68
+ const _useWorkflowTranslati = (0, _locale.useWorkflowTranslation)(),
69
+ t = _useWorkflowTranslati.t;
78
70
 
79
71
  return _react().default.createElement("div", {
80
72
  className: (0, _css().css)`flex-shrink: 0`
@@ -55,16 +55,6 @@ function _reactI18next() {
55
55
  return data;
56
56
  }
57
57
 
58
- function _client() {
59
- const data = require("@nocobase/client");
60
-
61
- _client = function _client() {
62
- return data;
63
- };
64
-
65
- return data;
66
- }
67
-
68
58
  var _ = require(".");
69
59
 
70
60
  var _Branch = require("../Branch");
@@ -75,6 +65,8 @@ var _style = require("../style");
75
65
 
76
66
  var _calculators = require("../calculators");
77
67
 
68
+ var _locale = require("../locale");
69
+
78
70
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
79
71
 
80
72
  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; }
@@ -94,7 +86,7 @@ function CalculationItem({
94
86
 
95
87
  const calculator = value.calculator,
96
88
  _value$operands = value.operands,
97
- operands = _value$operands === void 0 ? [] : _value$operands;
89
+ operands = _value$operands === void 0 ? [null] : _value$operands;
98
90
  return _react().default.createElement("div", {
99
91
  className: (0, _css().css)`
100
92
  display: flex;
@@ -246,14 +238,14 @@ function CalculationConfig({
246
238
  }
247
239
 
248
240
  var _default = {
249
- title: '{{t("Condition")}}',
241
+ title: `{{t("Condition", { ns: "${_locale.NAMESPACE}" })}}`,
250
242
  type: 'condition',
251
243
  group: 'control',
252
244
  fieldset: {
253
245
  'config.rejectOnFalse': {
254
246
  type: 'boolean',
255
247
  name: 'config.rejectOnFalse',
256
- title: '{{t("Mode")}}',
248
+ title: `{{t("Mode", { ns: "${_locale.NAMESPACE}" })}}`,
257
249
  'x-decorator': 'FormItem',
258
250
  'x-component': 'Radio.Group',
259
251
  'x-component-props': {
@@ -261,29 +253,29 @@ var _default = {
261
253
  },
262
254
  enum: [{
263
255
  value: true,
264
- label: _client().i18n.t('Continue when "Yes"')
256
+ label: (0, _locale.lang)('Continue when "Yes"')
265
257
  }, {
266
258
  value: false,
267
- label: _client().i18n.t('Branch into "Yes" and "No"')
259
+ label: (0, _locale.lang)('Branch into "Yes" and "No"')
268
260
  }]
269
261
  },
270
262
  'config.calculation': {
271
263
  type: 'string',
272
264
  name: 'config.calculation',
273
- title: '{{t("Conditions")}}',
265
+ title: `{{t("Conditions", { ns: "${_locale.NAMESPACE}" })}}`,
274
266
  'x-decorator': 'FormItem',
275
267
  'x-component': 'CalculationConfig'
276
268
  }
277
269
  },
278
270
  view: {},
279
271
  options: [{
280
- label: _client().i18n.t('Continue when "Yes"'),
272
+ label: (0, _locale.lang)('Continue when "Yes"'),
281
273
  key: 'rejectOnFalse',
282
274
  value: {
283
275
  rejectOnFalse: true
284
276
  }
285
277
  }, {
286
- label: _client().i18n.t('Branch into "Yes" and "No"'),
278
+ label: (0, _locale.lang)('Branch into "Yes" and "No"'),
287
279
  key: 'branch',
288
280
  value: {
289
281
  rejectOnFalse: false
@@ -291,12 +283,14 @@ var _default = {
291
283
  }],
292
284
 
293
285
  render(data) {
294
- const id = data.id,
295
- rejectOnFalse = data.config.rejectOnFalse;
286
+ const _useTranslation2 = (0, _reactI18next().useTranslation)(),
287
+ t = _useTranslation2.t;
296
288
 
297
289
  const _useFlowContext = (0, _FlowContext.useFlowContext)(),
298
290
  nodes = _useFlowContext.nodes;
299
291
 
292
+ const id = data.id,
293
+ rejectOnFalse = data.config.rejectOnFalse;
300
294
  const trueEntry = nodes.find(item => item.upstreamId === id && item.branchIndex === 1);
301
295
  const falseEntry = nodes.find(item => item.upstreamId === id && item.branchIndex === 0);
302
296
  return _react().default.createElement(_.NodeDefaultView, {
@@ -336,9 +330,9 @@ var _default = {
336
330
  `
337
331
  }, _react().default.createElement("span", {
338
332
  className: (0, _css().css)`right: 4em;`
339
- }, _client().i18n.t('No')), _react().default.createElement("span", {
333
+ }, t('No')), _react().default.createElement("span", {
340
334
  className: (0, _css().css)`left: 4em;`
341
- }, _client().i18n.t('Yes')))));
335
+ }, t('Yes')))));
342
336
  },
343
337
 
344
338
  components: {
@@ -37,6 +37,8 @@ declare const _default: {
37
37
  components: {
38
38
  CollectionFieldset: React.MemoExoticComponent<React.FunctionComponent<Pick<any, string | number | symbol>>>;
39
39
  };
40
- getter(props: any): JSX.Element;
40
+ getter({ onChange }: {
41
+ onChange: any;
42
+ }): JSX.Element;
41
43
  };
42
44
  export default _default;
@@ -33,6 +33,10 @@ var _CollectionFieldSelect = _interopRequireDefault(require("../components/Colle
33
33
 
34
34
  var _CollectionFieldset = _interopRequireDefault(require("../components/CollectionFieldset"));
35
35
 
36
+ var _locale = require("../locale");
37
+
38
+ var _calculators = require("../calculators");
39
+
36
40
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
37
41
 
38
42
  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; }
@@ -42,7 +46,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
42
46
  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; }
43
47
 
44
48
  var _default = {
45
- title: '{{t("Create record")}}',
49
+ title: `{{t("Create record", { ns: "${_locale.NAMESPACE}" })}}`,
46
50
  type: 'create',
47
51
  group: 'collection',
48
52
  fieldset: {
@@ -69,10 +73,11 @@ var _default = {
69
73
  CollectionFieldset: _CollectionFieldset.default
70
74
  },
71
75
 
72
- getter(props) {
73
- const type = props.type,
74
- options = props.options,
75
- _onChange = props.onChange;
76
+ getter({
77
+ onChange: _onChange
78
+ }) {
79
+ const _useOperandContext = (0, _calculators.useOperandContext)(),
80
+ options = _useOperandContext.options;
76
81
 
77
82
  const _useFlowContext = (0, _FlowContext.useFlowContext)(),
78
83
  nodes = _useFlowContext.nodes;
@@ -85,12 +90,7 @@ var _default = {
85
90
  collection: config.collection,
86
91
  value: value,
87
92
  onChange: path => {
88
- _onChange({
89
- type,
90
- options: _objectSpread(_objectSpread({}, options), {}, {
91
- path
92
- })
93
- });
93
+ _onChange(`{{$jobsMapByNodeId.${options.nodeId}.${path}}}`);
94
94
  }
95
95
  });
96
96
  }
@@ -7,17 +7,19 @@ exports.default = void 0;
7
7
 
8
8
  var _Duration = _interopRequireDefault(require("../components/Duration"));
9
9
 
10
+ var _locale = require("../locale");
11
+
10
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
13
 
12
14
  var _default = {
13
- title: '{{t("Delay")}}',
15
+ title: `{{t("Delay", { ns: "${_locale.NAMESPACE}" })}}`,
14
16
  type: 'delay',
15
17
  group: 'control',
16
18
  fieldset: {
17
19
  'config.duration': {
18
20
  type: 'number',
19
21
  name: 'config.duration',
20
- title: '{{t("Duration")}}',
22
+ title: `{{t("Duration", { ns: "${_locale.NAMESPACE}" })}}`,
21
23
  'x-decorator': 'FormItem',
22
24
  'x-component': 'Duration',
23
25
  default: 60000
@@ -25,17 +27,17 @@ var _default = {
25
27
  'config.endStatus': {
26
28
  type: 'number',
27
29
  name: 'config.endStatus',
28
- title: '{{t("End Status")}}',
30
+ title: `{{t("End Status", { ns: "${_locale.NAMESPACE}" })}}`,
29
31
  'x-decorator': 'FormItem',
30
32
  'x-component': 'Select',
31
33
  'x-component-props': {
32
- placeholder: '{{t("Select status")}}'
34
+ placeholder: `{{t("Select status", { ns: "${_locale.NAMESPACE}" })}}`
33
35
  },
34
36
  enum: [{
35
- label: '{{t("Succeed and continue")}}',
37
+ label: `{{t("Succeed and continue", { ns: "${_locale.NAMESPACE}" })}}`,
36
38
  value: 1
37
39
  }, {
38
- label: '{{t("Fail and exit")}}',
40
+ label: `{{t("Fail and exit", { ns: "${_locale.NAMESPACE}" })}}`,
39
41
  value: -1
40
42
  }]
41
43
  }