@nocobase/plugin-workflow 0.9.0-alpha.1 → 0.9.1-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 (136) hide show
  1. package/README.md +9 -0
  2. package/README.zh-CN.md +9 -0
  3. package/lib/client/AddButton.d.ts +1 -1
  4. package/lib/client/AddButton.js +7 -2
  5. package/lib/client/Branch.d.ts +1 -1
  6. package/lib/client/ExecutionCanvas.js +5 -10
  7. package/lib/client/WorkflowCanvas.js +11 -40
  8. package/lib/client/WorkflowProvider.js +10 -1
  9. package/lib/client/components/CollectionBlockInitializer.d.ts +7 -0
  10. package/lib/client/components/CollectionBlockInitializer.js +81 -0
  11. package/lib/client/components/CollectionFieldInitializers.d.ts +2 -0
  12. package/lib/client/components/CollectionFieldInitializers.js +89 -0
  13. package/lib/client/components/CollectionFieldset.js +21 -25
  14. package/lib/client/components/FilterDynamicComponent.d.ts +6 -0
  15. package/lib/client/components/FilterDynamicComponent.js +43 -0
  16. package/lib/client/components/NullRender.d.ts +1 -0
  17. package/lib/client/components/NullRender.js +10 -0
  18. package/lib/client/components/RadioWithTooltip.d.ts +7 -0
  19. package/lib/client/components/RadioWithTooltip.js +94 -0
  20. package/lib/client/constants.d.ts +10 -8
  21. package/lib/client/constants.js +52 -14
  22. package/lib/client/index.d.ts +0 -1
  23. package/lib/client/index.js +1 -10
  24. package/lib/client/locale/en-US.d.ts +38 -13
  25. package/lib/client/locale/en-US.js +39 -14
  26. package/lib/client/locale/index.js +12 -29
  27. package/lib/client/locale/zh-CN.d.ts +47 -20
  28. package/lib/client/locale/zh-CN.js +48 -21
  29. package/lib/client/nodes/calculation.d.ts +40 -6
  30. package/lib/client/nodes/calculation.js +171 -19
  31. package/lib/client/nodes/condition.d.ts +67 -0
  32. package/lib/client/nodes/condition.js +287 -27
  33. package/lib/client/nodes/create.d.ts +8 -6
  34. package/lib/client/nodes/create.js +27 -33
  35. package/lib/client/nodes/delay.d.ts +2 -0
  36. package/lib/client/nodes/delay.js +8 -4
  37. package/lib/client/nodes/destroy.d.ts +2 -2
  38. package/lib/client/nodes/destroy.js +2 -2
  39. package/lib/client/nodes/index.d.ts +10 -2
  40. package/lib/client/nodes/index.js +73 -27
  41. package/lib/client/nodes/manual/AssigneesSelect.d.ts +6 -0
  42. package/lib/client/nodes/manual/AssigneesSelect.js +64 -0
  43. package/lib/client/nodes/manual/ModeConfig.d.ts +5 -0
  44. package/lib/client/nodes/manual/ModeConfig.js +160 -0
  45. package/lib/client/nodes/manual/SchemaConfig.d.ts +6 -0
  46. package/lib/client/nodes/manual/SchemaConfig.js +715 -0
  47. package/lib/client/nodes/manual/WorkflowTodo.d.ts +8 -0
  48. package/lib/client/nodes/manual/WorkflowTodo.js +691 -0
  49. package/lib/client/nodes/manual/WorkflowTodoBlockInitializer.d.ts +5 -0
  50. package/lib/client/nodes/manual/WorkflowTodoBlockInitializer.js +75 -0
  51. package/lib/client/nodes/manual/index.d.ts +64 -0
  52. package/lib/client/nodes/manual/index.js +146 -0
  53. package/lib/client/nodes/parallel.d.ts +11 -5
  54. package/lib/client/nodes/parallel.js +22 -34
  55. package/lib/client/nodes/query.d.ts +9 -14
  56. package/lib/client/nodes/query.js +38 -44
  57. package/lib/client/nodes/request.d.ts +75 -33
  58. package/lib/client/nodes/request.js +124 -63
  59. package/lib/client/nodes/update.d.ts +2 -2
  60. package/lib/client/nodes/update.js +2 -2
  61. package/lib/client/schemas/collection.js +1 -1
  62. package/lib/client/schemas/executions.js +1 -1
  63. package/lib/client/schemas/workflows.js +1 -1
  64. package/lib/client/style.js +0 -4
  65. package/lib/client/triggers/collection.d.ts +7 -3
  66. package/lib/client/triggers/collection.js +39 -48
  67. package/lib/client/triggers/index.d.ts +5 -2
  68. package/lib/client/triggers/index.js +34 -12
  69. package/lib/client/triggers/schedule/index.d.ts +7 -5
  70. package/lib/client/triggers/schedule/index.js +38 -79
  71. package/lib/client/utils.d.ts +1 -0
  72. package/lib/client/utils.js +38 -0
  73. package/lib/client/variable.d.ts +21 -0
  74. package/lib/client/variable.js +147 -0
  75. package/lib/server/Plugin.d.ts +3 -3
  76. package/lib/server/Plugin.js +12 -21
  77. package/lib/server/Processor.d.ts +9 -2
  78. package/lib/server/Processor.js +39 -43
  79. package/lib/server/actions/index.js +2 -4
  80. package/lib/server/actions/workflows.d.ts +1 -0
  81. package/lib/server/actions/workflows.js +80 -23
  82. package/lib/server/collections/executions.js +5 -7
  83. package/lib/server/collections/flow_nodes.js +6 -18
  84. package/lib/server/collections/jobs.js +3 -1
  85. package/lib/server/collections/workflows.js +8 -4
  86. package/lib/server/constants.d.ts +9 -3
  87. package/lib/server/constants.js +11 -5
  88. package/lib/server/functions/index.d.ts +4 -0
  89. package/lib/server/functions/index.js +38 -0
  90. package/lib/server/index.d.ts +0 -1
  91. package/lib/server/index.js +0 -14
  92. package/lib/server/instructions/calculation.d.ts +2 -7
  93. package/lib/server/instructions/calculation.js +32 -37
  94. package/lib/server/instructions/condition.d.ts +4 -4
  95. package/lib/server/instructions/condition.js +126 -54
  96. package/lib/server/instructions/index.js +1 -1
  97. package/lib/server/instructions/manual/actions.js +101 -0
  98. package/lib/server/{extensions/assignees/collections → instructions/manual/collecions}/jobs.d.ts +2 -0
  99. package/lib/server/{extensions/assignees/collections → instructions/manual/collecions}/jobs.js +2 -1
  100. package/lib/server/{extensions/assignees/collections → instructions/manual/collecions}/users_jobs.js +10 -10
  101. package/lib/server/instructions/manual/index.d.ts +25 -0
  102. package/lib/server/instructions/manual/index.js +200 -0
  103. package/lib/server/instructions/parallel.js +11 -7
  104. package/lib/server/instructions/request.d.ts +8 -4
  105. package/lib/server/instructions/request.js +60 -94
  106. package/lib/server/migrations/20230221032941-change-request-body-type.d.ts +5 -0
  107. package/lib/server/migrations/20230221032941-change-request-body-type.js +113 -0
  108. package/lib/server/migrations/20230221071831-calculation-expression.d.ts +4 -0
  109. package/lib/server/migrations/20230221071831-calculation-expression.js +143 -0
  110. package/lib/server/migrations/20230221121203-condition-calculation.d.ts +4 -0
  111. package/lib/server/migrations/20230221121203-condition-calculation.js +126 -0
  112. package/lib/server/migrations/20230221162902-jsonb-to-json.d.ts +4 -0
  113. package/lib/server/migrations/20230221162902-jsonb-to-json.js +81 -0
  114. package/lib/server/triggers/schedule.js +11 -3
  115. package/package.json +11 -10
  116. package/lib/client/calculators.d.ts +0 -89
  117. package/lib/client/calculators.js +0 -668
  118. package/lib/client/components/CollectionFieldSelect.d.ts +0 -2
  119. package/lib/client/components/CollectionFieldSelect.js +0 -106
  120. package/lib/client/components/EjsTextArea.d.ts +0 -2
  121. package/lib/client/components/EjsTextArea.js +0 -232
  122. package/lib/server/actions/jobs.d.ts +0 -2
  123. package/lib/server/actions/jobs.js +0 -39
  124. package/lib/server/calculators/index.d.ts +0 -40
  125. package/lib/server/calculators/index.js +0 -187
  126. package/lib/server/extensions/assignees/actions.js +0 -75
  127. package/lib/server/extensions/assignees/index.d.ts +0 -2
  128. package/lib/server/extensions/assignees/index.js +0 -273
  129. package/lib/server/extensions/index.d.ts +0 -3
  130. package/lib/server/extensions/index.js +0 -13
  131. package/lib/server/instructions/prompt.d.ts +0 -19
  132. package/lib/server/instructions/prompt.js +0 -131
  133. /package/lib/server/{extensions/assignees → instructions/manual}/actions.d.ts +0 -0
  134. /package/lib/server/{extensions/assignees/collections → instructions/manual/collecions}/users.d.ts +0 -0
  135. /package/lib/server/{extensions/assignees/collections → instructions/manual/collecions}/users.js +0 -0
  136. /package/lib/server/{extensions/assignees/collections → instructions/manual/collecions}/users_jobs.d.ts +0 -0
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.RadioWithTooltip = RadioWithTooltip;
7
+
8
+ function _react() {
9
+ const data = _interopRequireDefault(require("react"));
10
+
11
+ _react = function _react() {
12
+ return data;
13
+ };
14
+
15
+ return data;
16
+ }
17
+
18
+ function _antd() {
19
+ const data = require("antd");
20
+
21
+ _antd = function _antd() {
22
+ return data;
23
+ };
24
+
25
+ return data;
26
+ }
27
+
28
+ function _icons() {
29
+ const data = require("@ant-design/icons");
30
+
31
+ _icons = function _icons() {
32
+ return data;
33
+ };
34
+
35
+ return data;
36
+ }
37
+
38
+ function _css() {
39
+ const data = require("@emotion/css");
40
+
41
+ _css = function _css() {
42
+ return data;
43
+ };
44
+
45
+ return data;
46
+ }
47
+
48
+ function _client() {
49
+ const data = require("@nocobase/client");
50
+
51
+ _client = function _client() {
52
+ return data;
53
+ };
54
+
55
+ return data;
56
+ }
57
+
58
+ const _excluded = ["options"];
59
+
60
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
61
+
62
+ 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; }
63
+
64
+ 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; }
65
+
66
+ 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; }
67
+
68
+ 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; }
69
+
70
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
71
+
72
+ function RadioWithTooltip(props) {
73
+ const _props$options = props.options,
74
+ options = _props$options === void 0 ? [] : _props$options,
75
+ other = _objectWithoutProperties(props, _excluded);
76
+
77
+ const compile = (0, _client().useCompile)();
78
+ return _react().default.createElement(_antd().Radio.Group, _objectSpread({}, other), options.map(option => _react().default.createElement(_antd().Radio, {
79
+ key: option.value,
80
+ value: option.value
81
+ }, _react().default.createElement("span", {
82
+ className: (0, _css().css)`
83
+ & + .anticon {
84
+ margin-left: .25em;
85
+ }
86
+ `
87
+ }, compile(option.label)), option.tooltip && _react().default.createElement(_antd().Tooltip, {
88
+ title: compile(option.tooltip)
89
+ }, _react().default.createElement(_icons().QuestionCircleOutlined, {
90
+ style: {
91
+ color: '#666'
92
+ }
93
+ })))));
94
+ }
@@ -1,25 +1,27 @@
1
1
  export declare const EXECUTION_STATUS: {
2
2
  QUEUEING: any;
3
3
  STARTED: number;
4
- SUCCEEDED: number;
4
+ RESOLVED: number;
5
5
  FAILED: number;
6
+ ERROR: number;
7
+ ABORTED: number;
6
8
  CANCELED: number;
9
+ REJECTED: number;
7
10
  };
8
- export declare const ExecutionStatusOptions: ({
11
+ export declare const ExecutionStatusOptions: {
9
12
  value: any;
10
13
  label: string;
11
14
  color: string;
12
- } | {
13
- value: number;
14
- label: string;
15
- color?: undefined;
16
- })[];
15
+ }[];
17
16
  export declare const ExecutionStatusOptionsMap: {};
18
17
  export declare const JOB_STATUS: {
19
18
  PENDING: number;
20
19
  RESOLVED: number;
21
- REJECTED: number;
20
+ FAILED: number;
21
+ ERROR: number;
22
+ ABORTED: number;
22
23
  CANCELED: number;
24
+ REJECTED: number;
23
25
  };
24
26
  export declare const JobStatusOptions: {
25
27
  value: number;
@@ -32,9 +32,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
32
32
  const EXECUTION_STATUS = {
33
33
  QUEUEING: null,
34
34
  STARTED: 0,
35
- SUCCEEDED: 1,
35
+ RESOLVED: 1,
36
36
  FAILED: -1,
37
- CANCELED: -2
37
+ ERROR: -2,
38
+ ABORTED: -3,
39
+ CANCELED: -4,
40
+ REJECTED: -5
38
41
  };
39
42
  exports.EXECUTION_STATUS = EXECUTION_STATUS;
40
43
  const ExecutionStatusOptions = [{
@@ -46,16 +49,29 @@ const ExecutionStatusOptions = [{
46
49
  label: `{{t("On going", { ns: "${_locale.NAMESPACE}" })}}`,
47
50
  color: 'gold'
48
51
  }, {
49
- value: EXECUTION_STATUS.SUCCEEDED,
50
- label: `{{t("Succeeded", { ns: "${_locale.NAMESPACE}" })}}`,
52
+ value: EXECUTION_STATUS.RESOLVED,
53
+ label: `{{t("Resolved", { ns: "${_locale.NAMESPACE}" })}}`,
51
54
  color: 'green'
52
55
  }, {
53
56
  value: EXECUTION_STATUS.FAILED,
54
57
  label: `{{t("Failed", { ns: "${_locale.NAMESPACE}" })}}`,
55
58
  color: 'red'
59
+ }, {
60
+ value: EXECUTION_STATUS.ERROR,
61
+ label: `{{t("Error", { ns: "${_locale.NAMESPACE}" })}}`,
62
+ color: 'red'
63
+ }, {
64
+ value: EXECUTION_STATUS.ABORTED,
65
+ label: `{{t("Aborted", { ns: "${_locale.NAMESPACE}" })}}`,
66
+ color: 'red'
56
67
  }, {
57
68
  value: EXECUTION_STATUS.CANCELED,
58
- label: `{{t("Canceled", { ns: "${_locale.NAMESPACE}" })}}`
69
+ label: `{{t("Canceled", { ns: "${_locale.NAMESPACE}" })}}`,
70
+ color: 'volcano'
71
+ }, {
72
+ value: EXECUTION_STATUS.REJECTED,
73
+ label: `{{t("Rejected", { ns: "${_locale.NAMESPACE}" })}}`,
74
+ color: 'volcano'
59
75
  }];
60
76
  exports.ExecutionStatusOptions = ExecutionStatusOptions;
61
77
  const ExecutionStatusOptionsMap = ExecutionStatusOptions.reduce((map, option) => Object.assign(map, {
@@ -65,30 +81,52 @@ exports.ExecutionStatusOptionsMap = ExecutionStatusOptionsMap;
65
81
  const JOB_STATUS = {
66
82
  PENDING: 0,
67
83
  RESOLVED: 1,
68
- REJECTED: -1,
69
- CANCELED: -2
84
+ FAILED: -1,
85
+ ERROR: -2,
86
+ ABORTED: -3,
87
+ CANCELED: -4,
88
+ REJECTED: -5
70
89
  };
71
90
  exports.JOB_STATUS = JOB_STATUS;
72
91
  const JobStatusOptions = [{
73
92
  value: JOB_STATUS.PENDING,
74
93
  label: `{{t("Pending", { ns: "${_locale.NAMESPACE}" })}}`,
75
- color: '#d4c306',
94
+ color: 'gold',
76
95
  icon: _react().default.createElement(_icons().ClockCircleOutlined, null)
77
96
  }, {
78
97
  value: JOB_STATUS.RESOLVED,
79
- label: `{{t("Succeeded", { ns: "${_locale.NAMESPACE}" })}}`,
80
- color: '#67c068',
98
+ label: `{{t("Resolved", { ns: "${_locale.NAMESPACE}" })}}`,
99
+ color: 'green',
81
100
  icon: _react().default.createElement(_icons().CheckOutlined, null)
82
101
  }, {
83
- value: JOB_STATUS.REJECTED,
102
+ value: JOB_STATUS.FAILED,
84
103
  label: `{{t("Failed", { ns: "${_locale.NAMESPACE}" })}}`,
85
- color: '#f40',
104
+ color: 'red',
86
105
  icon: _react().default.createElement(_icons().ExclamationOutlined, null)
106
+ }, {
107
+ value: JOB_STATUS.ERROR,
108
+ label: `{{t("Error", { ns: "${_locale.NAMESPACE}" })}}`,
109
+ color: 'red',
110
+ icon: _react().default.createElement(_icons().CloseOutlined, null)
111
+ }, {
112
+ value: JOB_STATUS.ABORTED,
113
+ label: `{{t("Aborted", { ns: "${_locale.NAMESPACE}" })}}`,
114
+ color: 'red',
115
+ icon: _react().default.createElement(_icons().MinusOutlined, {
116
+ rotate: 90
117
+ })
87
118
  }, {
88
119
  value: JOB_STATUS.CANCELED,
89
120
  label: `{{t("Canceled", { ns: "${_locale.NAMESPACE}" })}}`,
90
- color: '#f40',
91
- icon: _react().default.createElement(_icons().CloseOutlined, null)
121
+ color: 'volcano',
122
+ icon: _react().default.createElement(_icons().MinusOutlined, {
123
+ rotate: 45
124
+ })
125
+ }, {
126
+ value: JOB_STATUS.REJECTED,
127
+ label: `{{t("Rejected", { ns: "${_locale.NAMESPACE}" })}}`,
128
+ color: 'volcano',
129
+ icon: _react().default.createElement(_icons().MinusOutlined, null)
92
130
  }];
93
131
  exports.JobStatusOptions = JobStatusOptions;
94
132
  const JobStatusOptionsMap = JobStatusOptions.reduce((map, option) => Object.assign(map, {
@@ -1,5 +1,4 @@
1
1
  export { triggers } from './triggers';
2
2
  export * from './nodes';
3
- export { calculators } from './calculators';
4
3
  export * from './FlowContext';
5
4
  export { WorkflowProvider as default } from './WorkflowProvider';
@@ -4,15 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  var _exportNames = {
7
- triggers: true,
8
- calculators: true
7
+ triggers: true
9
8
  };
10
- Object.defineProperty(exports, "calculators", {
11
- enumerable: true,
12
- get: function get() {
13
- return _calculators.calculators;
14
- }
15
- });
16
9
  Object.defineProperty(exports, "default", {
17
10
  enumerable: true,
18
11
  get: function get() {
@@ -42,8 +35,6 @@ Object.keys(_nodes).forEach(function (key) {
42
35
  });
43
36
  });
44
37
 
45
- var _calculators = require("./calculators");
46
-
47
38
  var _FlowContext = require("./FlowContext");
48
39
 
49
40
  Object.keys(_FlowContext).forEach(function (key) {
@@ -1,14 +1,21 @@
1
1
  declare const _default: {
2
2
  Workflow: string;
3
3
  "Execution history": string;
4
+ Executed: string;
4
5
  "Trigger type": string;
5
6
  Status: string;
6
7
  On: string;
7
8
  Off: string;
8
9
  Version: string;
9
10
  "Copy to new version": string;
11
+ Duplicate: string;
12
+ Loading: string;
10
13
  "Load failed": string;
11
14
  Trigger: string;
15
+ "Trigger variables": string;
16
+ "Trigger data": string;
17
+ "Trigger time": string;
18
+ "Triggered at": string;
12
19
  "Collection event": string;
13
20
  "Trigger on": string;
14
21
  "After record added": string;
@@ -24,6 +31,7 @@ declare const _default: {
24
31
  "Based on date field of collection": string;
25
32
  "Starts on": string;
26
33
  "Ends on": string;
34
+ "No end": string;
27
35
  "Exactly at": string;
28
36
  "Repeat mode": string;
29
37
  "Repeat limit": string;
@@ -45,36 +53,51 @@ declare const _default: {
45
53
  "By custom date": string;
46
54
  Advanced: string;
47
55
  End: string;
48
- "Trigger variables": string;
49
56
  "Node result": string;
50
57
  Constant: string;
58
+ Null: string;
51
59
  Boolean: string;
52
60
  String: string;
61
+ Calculator: string;
53
62
  "Arithmetic calculation": string;
54
63
  "String operation": string;
64
+ "Executed at": string;
65
+ Queueing: string;
55
66
  "On going": string;
56
67
  Succeeded: string;
57
68
  Failed: string;
69
+ Pending: string;
58
70
  Canceled: string;
59
71
  "This node contains branches, deleting will also be preformed to them, are you sure?": string;
60
72
  Control: string;
61
73
  "Collection operations": string;
74
+ "Extended types": string;
62
75
  "Node type": string;
63
76
  Calculation: string;
64
77
  "Configure calculation": string;
65
78
  "Calculation result": string;
66
79
  True: string;
67
80
  False: string;
81
+ concat: string;
68
82
  Condition: string;
69
83
  Mode: string;
70
84
  "Continue when \"Yes\"": string;
71
85
  "Branch into \"Yes\" and \"No\"": string;
72
86
  Conditions: string;
73
87
  "Parallel branch": string;
88
+ "Add branch": string;
74
89
  "All succeeded": string;
75
90
  "Any succeeded": string;
91
+ "Any succeeded or failed": string;
76
92
  "Continue after all branches succeeded": string;
77
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;
78
101
  "Create record": string;
79
102
  "Update record": string;
80
103
  "Query record": string;
@@ -84,22 +107,24 @@ declare const _default: {
84
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;
85
108
  "Trigger in executed workflow cannot be modified": string;
86
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;
87
112
  'HTTP request': string;
113
+ 'HTTP method': string;
88
114
  URL: string;
89
- 'You can use the above available variables in URL.': string;
90
- 'Request headers': string;
91
- 'Name(e.g. Content-Type)': string;
92
- 'Value(e.g. Application/json)': string;
115
+ Headers: string;
93
116
  'Add request header': string;
94
- 'HTTP method': string;
95
- 'Request data': string;
117
+ Parameters: string;
118
+ 'Add parameter': string;
119
+ Body: string;
120
+ 'Use variable': string;
121
+ Format: string;
122
+ Insert: string;
123
+ 'Timeout config': string;
124
+ ms: string;
96
125
  'Input request data': string;
97
- 'You can use the above available variables in request data.': string;
98
- 'Copy success!': string;
99
- 'Copy variable output template statement': string;
100
- 'Default headers is Content-Type: application/json': string;
126
+ 'Only support standard JSON data': string;
127
+ '"Content-Type" only support "application/json", and no need to specify': string;
101
128
  'Ignore fail request and continue workflow': string;
102
- 'Syntax see': string;
103
- 'Show available variable tool': string;
104
129
  };
105
130
  export default _default;
@@ -7,14 +7,21 @@ exports.default = void 0;
7
7
  var _default = {
8
8
  "Workflow": "Workflow",
9
9
  "Execution history": "Execution history",
10
+ "Executed": "Executed",
10
11
  "Trigger type": "Trigger type",
11
12
  "Status": "Status",
12
13
  "On": "On",
13
14
  "Off": "Off",
14
15
  "Version": "Version",
15
16
  "Copy to new version": "Copy to new version",
17
+ "Duplicate": "Duplicate",
18
+ "Loading": "Loading",
16
19
  "Load failed": "Load failed",
17
20
  "Trigger": "Trigger",
21
+ "Trigger variables": "Trigger variables",
22
+ "Trigger data": "Trigger data",
23
+ "Trigger time": "Trigger time",
24
+ "Triggered at": "Triggered at",
18
25
  "Collection event": "Collection event",
19
26
  "Trigger on": "Trigger on",
20
27
  "After record added": "After record added",
@@ -30,6 +37,7 @@ var _default = {
30
37
  "Based on date field of collection": "Based on date field of collection",
31
38
  "Starts on": "Starts on",
32
39
  "Ends on": "Ends on",
40
+ "No end": "No end",
33
41
  "Exactly at": "Exactly at",
34
42
  "Repeat mode": "Repeat mode",
35
43
  "Repeat limit": "Repeat limit",
@@ -51,36 +59,51 @@ var _default = {
51
59
  "By custom date": "By custom date",
52
60
  "Advanced": "Advanced",
53
61
  "End": "End",
54
- "Trigger variables": "Trigger variables",
55
62
  "Node result": "Node result",
56
63
  "Constant": "Constant",
64
+ "Null": "Null",
57
65
  "Boolean": "Boolean",
58
66
  "String": "String",
67
+ "Calculator": "Calculator",
59
68
  "Arithmetic calculation": "Arithmetic calculation",
60
69
  "String operation": "String operation",
70
+ "Executed at": "Executed at",
71
+ "Queueing": "Queueing",
61
72
  "On going": "On going",
62
73
  "Succeeded": "Succeeded",
63
74
  "Failed": "Failed",
75
+ "Pending": "Pending",
64
76
  "Canceled": "Canceled",
65
77
  "This node contains branches, deleting will also be preformed to them, are you sure?": "This node contains branches, deleting will also be preformed to them, are you sure?",
66
78
  "Control": "Control",
67
79
  "Collection operations": "Collection operations",
80
+ "Extended types": "Extended types",
68
81
  "Node type": "Node type",
69
82
  "Calculation": "Calculation",
70
83
  "Configure calculation": "Configure calculation",
71
84
  "Calculation result": "Calculation result",
72
85
  "True": "True",
73
86
  "False": "False",
87
+ "concat": "concat",
74
88
  "Condition": "Condition",
75
89
  "Mode": "Mode",
76
90
  "Continue when \"Yes\"": "Continue when \"Yes\"",
77
91
  "Branch into \"Yes\" and \"No\"": "Branch into \"Yes\" and \"No\"",
78
92
  "Conditions": "Conditions",
79
93
  "Parallel branch": "Parallel branch",
94
+ "Add branch": "Add branch",
80
95
  "All succeeded": "All succeeded",
81
96
  "Any succeeded": "Any succeeded",
97
+ "Any succeeded or failed": "Any succeeded or failed",
82
98
  "Continue after all branches succeeded": "Continue after all branches succeeded",
83
99
  "Continue after any branch succeeded": "Continue after any branch succeeded",
100
+ "Continue after any branch succeeded, or exit after any branch failed": "Continue after any branch succeeded, or exit after any branch failed",
101
+ "Delay": "Delay",
102
+ "Duration": "Duration",
103
+ "End Status": "End Status",
104
+ "Select status": "Select status",
105
+ "Succeed and continue": "Succeed and continue",
106
+ "Fail and exit": "Fail and exit",
84
107
  "Create record": "Create record",
85
108
  "Update record": "Update record",
86
109
  "Query record": "Query record",
@@ -90,22 +113,24 @@ var _default = {
90
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.": "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.",
91
114
  "Trigger in executed workflow cannot be modified": "Trigger in executed workflow cannot be modified",
92
115
  "Node in executed workflow cannot be modified": "Node in executed workflow cannot be modified",
116
+ 'Can not delete': 'Can not delete',
117
+ 'The result of this node has been referenced by other nodes ({{nodes}}), please remove the usage before deleting.': 'The result of this node has been referenced by other nodes ({{nodes}}), please remove the usage before deleting.',
93
118
  'HTTP request': 'HTTP request',
119
+ 'HTTP method': 'HTTP method',
94
120
  'URL': 'URL',
95
- 'You can use the above available variables in URL.': 'You can use the above available variables in URL.',
96
- 'Request headers': 'Request headers',
97
- 'Name(e.g. Content-Type)': 'Name(e.g. Content-Type)',
98
- 'Value(e.g. Application/json)': 'Value(e.g. Application/json)',
121
+ 'Headers': 'Headers',
99
122
  'Add request header': 'Add request header',
100
- 'HTTP method': 'HTTP method',
101
- 'Request data': 'Request data',
123
+ 'Parameters': 'Parameters',
124
+ 'Add parameter': 'Add parameter',
125
+ 'Body': 'Body',
126
+ 'Use variable': 'Use variable',
127
+ 'Format': 'Format',
128
+ 'Insert': 'Insert',
129
+ 'Timeout config': 'Timeout config',
130
+ 'ms': 'ms',
102
131
  'Input request data': 'Input request data',
103
- 'You can use the above available variables in request data.': 'You can use the above available variables in request data.',
104
- 'Copy success!': 'Copy success!',
105
- 'Copy variable output template statement': 'Copy variable output template statement',
106
- 'Default headers is Content-Type: application/json': 'Default headers is Content-Type: application/json',
107
- 'Ignore fail request and continue workflow': 'Ignore fail request and continue workflow',
108
- 'Syntax see': 'Syntax see',
109
- 'Show available variable tool': 'Show available variable tool'
132
+ 'Only support standard JSON data': 'Only support standard JSON data',
133
+ '"Content-Type" only support "application/json", and no need to specify': '"Content-Type" only support "application/json", and no need to specify',
134
+ 'Ignore fail request and continue workflow': 'Ignore fail request and continue workflow'
110
135
  };
111
136
  exports.default = _default;
@@ -7,56 +7,39 @@ exports.NAMESPACE = void 0;
7
7
  exports.lang = lang;
8
8
  exports.useWorkflowTranslation = useWorkflowTranslation;
9
9
 
10
- function _reactI18next() {
11
- const data = require("react-i18next");
10
+ function _client() {
11
+ const data = require("@nocobase/client");
12
12
 
13
- _reactI18next = function _reactI18next() {
13
+ _client = function _client() {
14
14
  return data;
15
15
  };
16
16
 
17
17
  return data;
18
18
  }
19
19
 
20
- function _client() {
21
- const data = require("@nocobase/client");
20
+ function _reactI18next() {
21
+ const data = require("react-i18next");
22
22
 
23
- _client = function _client() {
23
+ _reactI18next = function _reactI18next() {
24
24
  return data;
25
25
  };
26
26
 
27
27
  return data;
28
28
  }
29
29
 
30
- var _zhCN = _interopRequireDefault(require("./zh-CN"));
31
-
32
- var _enUS = _interopRequireDefault(require("./en-US"));
33
-
34
- var _jaJP = _interopRequireDefault(require("./ja-JP"));
35
-
36
- var _ruRU = _interopRequireDefault(require("./ru-RU"));
37
-
38
- var _trTR = _interopRequireDefault(require("./tr-TR"));
39
-
40
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
41
-
42
30
  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; }
43
31
 
44
32
  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; }
45
33
 
46
34
  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
35
 
48
- const NAMESPACE = 'workflow';
49
- exports.NAMESPACE = NAMESPACE;
50
-
51
- _client().i18n.addResources('zh-CN', NAMESPACE, _zhCN.default);
52
-
53
- _client().i18n.addResources('en-US', NAMESPACE, _enUS.default);
36
+ const NAMESPACE = 'workflow'; // i18n.addResources('zh-CN', NAMESPACE, zhCN);
37
+ // i18n.addResources('en-US', NAMESPACE, enUS);
38
+ // i18n.addResources('ja-JP', NAMESPACE, jaJP);
39
+ // i18n.addResources('ru-RU', NAMESPACE, ruRU);
40
+ // i18n.addResources('tr-TR', NAMESPACE, trTR);
54
41
 
55
- _client().i18n.addResources('ja-JP', NAMESPACE, _jaJP.default);
56
-
57
- _client().i18n.addResources('ru-RU', NAMESPACE, _ruRU.default);
58
-
59
- _client().i18n.addResources('tr-TR', NAMESPACE, _trTR.default);
42
+ exports.NAMESPACE = NAMESPACE;
60
43
 
61
44
  function lang(key, options = {}) {
62
45
  return _client().i18n.t(key, _objectSpread(_objectSpread({}, options), {}, {