@nocobase/plugin-workflow 1.7.0-beta.9 → 1.7.0

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/dist/client/3c67def1831d0b23.js +10 -0
  2. package/dist/client/WorkflowCategoryTabs.d.ts +10 -0
  3. package/dist/client/WorkflowCollectionsProvider.d.ts +10 -0
  4. package/dist/client/WorkflowTasks.d.ts +12 -3
  5. package/dist/client/a4111333ce86663c.js +10 -0
  6. package/dist/client/a54c8c009524b6da.js +10 -0
  7. package/dist/client/components/EmunerationField.d.ts +9 -0
  8. package/dist/client/f9eeb46e5c6a9ffe.js +10 -0
  9. package/dist/client/index.d.ts +1 -0
  10. package/dist/client/index.js +1 -1
  11. package/dist/client/locale/index.d.ts +2 -1
  12. package/dist/client/schemas/executions.d.ts +126 -125
  13. package/dist/client/triggers/schedule/RepeatField.d.ts +2 -1
  14. package/dist/common/collections/executions.d.ts +136 -0
  15. package/dist/common/collections/executions.js +125 -0
  16. package/dist/common/collections/flow_nodes.d.ts +65 -0
  17. package/dist/common/collections/flow_nodes.js +94 -0
  18. package/dist/common/collections/jobs.d.ts +37 -0
  19. package/dist/common/collections/jobs.js +74 -0
  20. package/dist/common/collections/userWorkflowTasks.d.ts +37 -0
  21. package/dist/common/collections/userWorkflowTasks.js +65 -0
  22. package/dist/common/collections/workflowCategories.d.ts +65 -0
  23. package/dist/common/collections/workflowCategories.js +68 -0
  24. package/dist/common/collections/workflowCategoryRelations.d.ts +21 -0
  25. package/dist/common/collections/workflowCategoryRelations.js +51 -0
  26. package/dist/common/collections/workflowStats.d.ts +37 -0
  27. package/dist/common/collections/workflowStats.js +59 -0
  28. package/dist/common/collections/workflowTasks.d.ts +10 -0
  29. package/dist/common/collections/workflowTasks.js +64 -0
  30. package/dist/common/collections/workflowVersionStats.d.ts +37 -0
  31. package/dist/common/collections/workflowVersionStats.js +59 -0
  32. package/dist/common/collections/workflows.d.ts +263 -0
  33. package/dist/common/collections/workflows.js +244 -0
  34. package/dist/common/constants.d.ts +9 -0
  35. package/dist/{server/actions/workflowTasks.js → common/constants.js} +6 -17
  36. package/dist/externalVersion.js +12 -11
  37. package/dist/locale/en-US.json +127 -15
  38. package/dist/locale/zh-CN.json +10 -1
  39. package/dist/node_modules/cron-parser/package.json +1 -1
  40. package/dist/node_modules/lru-cache/package.json +1 -1
  41. package/dist/node_modules/nodejs-snowflake/LICENSE +201 -0
  42. package/dist/node_modules/nodejs-snowflake/nodejs_snowflake.d.ts +62 -0
  43. package/dist/node_modules/nodejs-snowflake/nodejs_snowflake.js +1 -0
  44. package/dist/node_modules/nodejs-snowflake/nodejs_snowflake_bg.wasm +0 -0
  45. package/dist/node_modules/nodejs-snowflake/package.json +1 -0
  46. package/dist/server/Dispatcher.d.ts +11 -0
  47. package/dist/server/Dispatcher.js +35 -0
  48. package/dist/server/Plugin.d.ts +12 -2
  49. package/dist/server/Plugin.js +143 -105
  50. package/dist/server/Processor.d.ts +4 -11
  51. package/dist/server/Processor.js +50 -45
  52. package/dist/server/actions/index.js +2 -2
  53. package/dist/server/actions/nodes.js +7 -5
  54. package/dist/server/actions/{workflowTasks.d.ts → userWorkflowTasks.d.ts} +1 -1
  55. package/dist/server/actions/userWorkflowTasks.js +54 -0
  56. package/dist/server/actions/workflows.js +6 -3
  57. package/dist/server/collections/executions.js +12 -44
  58. package/dist/server/collections/flow_nodes.js +12 -57
  59. package/dist/server/collections/jobs.js +12 -36
  60. package/dist/server/collections/userWorkflowTasks.d.ts +11 -0
  61. package/dist/server/collections/userWorkflowTasks.js +43 -0
  62. package/dist/server/collections/workflowCategories.d.ts +11 -0
  63. package/dist/server/collections/workflowCategories.js +43 -0
  64. package/dist/server/collections/workflowCategoryRelations.d.ts +11 -0
  65. package/dist/server/collections/workflowCategoryRelations.js +43 -0
  66. package/dist/server/collections/workflowStats.d.ts +11 -0
  67. package/dist/server/collections/workflowStats.js +43 -0
  68. package/dist/server/collections/workflowTasks.d.ts +2 -1
  69. package/dist/server/collections/workflowTasks.js +12 -33
  70. package/dist/server/collections/workflowVersionStats.d.ts +11 -0
  71. package/dist/server/collections/workflowVersionStats.js +43 -0
  72. package/dist/server/collections/workflows.d.ts +2 -1
  73. package/dist/server/collections/workflows.js +12 -101
  74. package/dist/server/migrations/20250320223415-stats.d.ts +14 -0
  75. package/dist/server/migrations/20250320223415-stats.js +82 -0
  76. package/dist/server/migrations/20250409164913-remove-jobs-auto-increment.d.ts +14 -0
  77. package/dist/server/migrations/20250409164913-remove-jobs-auto-increment.js +57 -0
  78. package/dist/server/repositories/WorkflowRepository.js +3 -2
  79. package/dist/server/triggers/CollectionTrigger.js +3 -2
  80. package/dist/server/triggers/ScheduleTrigger/DateFieldScheduleTrigger.d.ts +5 -3
  81. package/dist/server/triggers/ScheduleTrigger/DateFieldScheduleTrigger.js +39 -36
  82. package/dist/server/triggers/ScheduleTrigger/StaticScheduleTrigger.d.ts +4 -2
  83. package/dist/server/triggers/ScheduleTrigger/StaticScheduleTrigger.js +26 -24
  84. package/dist/server/triggers/ScheduleTrigger/index.d.ts +2 -1
  85. package/dist/server/triggers/ScheduleTrigger/index.js +4 -8
  86. package/dist/server/triggers/index.d.ts +1 -1
  87. package/dist/server/types/Workflow.d.ts +0 -2
  88. package/dist/swagger/index.d.ts +0 -14
  89. package/dist/swagger/index.js +0 -14
  90. package/package.json +6 -4
  91. package/dist/client/739d458621edf81f.js +0 -10
  92. package/dist/client/8e96ce6ed324ce69.js +0 -10
  93. package/dist/client/c107ec5004b8644b.js +0 -10
  94. package/dist/client/c3f36ae11fcc489e.js +0 -10
  95. package/dist/client/nodes/output.d.ts +0 -31
@@ -0,0 +1,37 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: {
10
+ dumpRules: {
11
+ group: string;
12
+ };
13
+ migrationRules: string[];
14
+ name: string;
15
+ shared: boolean;
16
+ autoGenId: boolean;
17
+ fields: ({
18
+ name: string;
19
+ type: string;
20
+ primaryKey: boolean;
21
+ defaultValue?: undefined;
22
+ interface?: undefined;
23
+ uiSchema?: undefined;
24
+ } | {
25
+ type: string;
26
+ name: string;
27
+ defaultValue: number;
28
+ interface: string;
29
+ uiSchema: {
30
+ title: string;
31
+ 'x-component': string;
32
+ 'x-read-pretty': boolean;
33
+ };
34
+ primaryKey?: undefined;
35
+ })[];
36
+ };
37
+ export default _default;
@@ -0,0 +1,59 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var workflowVersionStats_exports = {};
28
+ __export(workflowVersionStats_exports, {
29
+ default: () => workflowVersionStats_default
30
+ });
31
+ module.exports = __toCommonJS(workflowVersionStats_exports);
32
+ var import_constants = require("../constants");
33
+ var workflowVersionStats_default = {
34
+ dumpRules: {
35
+ group: "log"
36
+ },
37
+ migrationRules: ["schema-only"],
38
+ name: "workflowVersionStats",
39
+ shared: true,
40
+ autoGenId: false,
41
+ fields: [
42
+ {
43
+ name: "id",
44
+ type: "bigInt",
45
+ primaryKey: true
46
+ },
47
+ {
48
+ type: "bigInt",
49
+ name: "executed",
50
+ defaultValue: 0,
51
+ interface: "number",
52
+ uiSchema: {
53
+ title: `{{t("Executed", { ns: "${import_constants.NAMESPACE}" })}}`,
54
+ "x-component": "InputNumber",
55
+ "x-read-pretty": true
56
+ }
57
+ }
58
+ ]
59
+ };
@@ -0,0 +1,263 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: {
10
+ dumpRules: string;
11
+ migrationRules: string[];
12
+ name: string;
13
+ shared: boolean;
14
+ repository: string;
15
+ fields: ({
16
+ name: string;
17
+ type: string;
18
+ interface?: undefined;
19
+ uiSchema?: undefined;
20
+ defaultValue?: undefined;
21
+ required?: undefined;
22
+ target?: undefined;
23
+ onDelete?: undefined;
24
+ foreignKey?: undefined;
25
+ sourceKey?: undefined;
26
+ constraints?: undefined;
27
+ through?: undefined;
28
+ otherKey?: undefined;
29
+ } | {
30
+ type: string;
31
+ name: string;
32
+ interface: string;
33
+ uiSchema: {
34
+ title: string;
35
+ type: string;
36
+ 'x-component': string;
37
+ required: boolean;
38
+ enum?: undefined;
39
+ default?: undefined;
40
+ 'x-component-props'?: undefined;
41
+ 'x-read-pretty'?: undefined;
42
+ };
43
+ defaultValue?: undefined;
44
+ required?: undefined;
45
+ target?: undefined;
46
+ onDelete?: undefined;
47
+ foreignKey?: undefined;
48
+ sourceKey?: undefined;
49
+ constraints?: undefined;
50
+ through?: undefined;
51
+ otherKey?: undefined;
52
+ } | {
53
+ type: string;
54
+ name: string;
55
+ defaultValue: boolean;
56
+ interface: string;
57
+ uiSchema: {
58
+ title: string;
59
+ type: string;
60
+ enum: ({
61
+ label: string;
62
+ value: boolean;
63
+ color: string;
64
+ } | {
65
+ label: string;
66
+ value: boolean;
67
+ color?: undefined;
68
+ })[];
69
+ 'x-component': string;
70
+ default: boolean;
71
+ required?: undefined;
72
+ 'x-component-props'?: undefined;
73
+ 'x-read-pretty'?: undefined;
74
+ };
75
+ required?: undefined;
76
+ target?: undefined;
77
+ onDelete?: undefined;
78
+ foreignKey?: undefined;
79
+ sourceKey?: undefined;
80
+ constraints?: undefined;
81
+ through?: undefined;
82
+ otherKey?: undefined;
83
+ } | {
84
+ type: string;
85
+ name: string;
86
+ interface: string;
87
+ uiSchema: {
88
+ title: string;
89
+ type: string;
90
+ 'x-component': string;
91
+ required?: undefined;
92
+ enum?: undefined;
93
+ default?: undefined;
94
+ 'x-component-props'?: undefined;
95
+ 'x-read-pretty'?: undefined;
96
+ };
97
+ defaultValue?: undefined;
98
+ required?: undefined;
99
+ target?: undefined;
100
+ onDelete?: undefined;
101
+ foreignKey?: undefined;
102
+ sourceKey?: undefined;
103
+ constraints?: undefined;
104
+ through?: undefined;
105
+ otherKey?: undefined;
106
+ } | {
107
+ type: string;
108
+ name: string;
109
+ required: boolean;
110
+ interface: string;
111
+ uiSchema: {
112
+ title: string;
113
+ type: string;
114
+ 'x-component': string;
115
+ enum: string;
116
+ required: boolean;
117
+ default?: undefined;
118
+ 'x-component-props'?: undefined;
119
+ 'x-read-pretty'?: undefined;
120
+ };
121
+ defaultValue?: undefined;
122
+ target?: undefined;
123
+ onDelete?: undefined;
124
+ foreignKey?: undefined;
125
+ sourceKey?: undefined;
126
+ constraints?: undefined;
127
+ through?: undefined;
128
+ otherKey?: undefined;
129
+ } | {
130
+ type: string;
131
+ name: string;
132
+ required: boolean;
133
+ defaultValue: {};
134
+ interface?: undefined;
135
+ uiSchema?: undefined;
136
+ target?: undefined;
137
+ onDelete?: undefined;
138
+ foreignKey?: undefined;
139
+ sourceKey?: undefined;
140
+ constraints?: undefined;
141
+ through?: undefined;
142
+ otherKey?: undefined;
143
+ } | {
144
+ type: string;
145
+ name: string;
146
+ target: string;
147
+ onDelete: string;
148
+ interface?: undefined;
149
+ uiSchema?: undefined;
150
+ defaultValue?: undefined;
151
+ required?: undefined;
152
+ foreignKey?: undefined;
153
+ sourceKey?: undefined;
154
+ constraints?: undefined;
155
+ through?: undefined;
156
+ otherKey?: undefined;
157
+ } | {
158
+ type: string;
159
+ name: string;
160
+ defaultValue: number;
161
+ interface?: undefined;
162
+ uiSchema?: undefined;
163
+ required?: undefined;
164
+ target?: undefined;
165
+ onDelete?: undefined;
166
+ foreignKey?: undefined;
167
+ sourceKey?: undefined;
168
+ constraints?: undefined;
169
+ through?: undefined;
170
+ otherKey?: undefined;
171
+ } | {
172
+ type: string;
173
+ name: string;
174
+ defaultValue: boolean;
175
+ interface: string;
176
+ uiSchema: {
177
+ title: string;
178
+ type: string;
179
+ 'x-component': string;
180
+ enum: {
181
+ label: string;
182
+ value: boolean;
183
+ color: string;
184
+ }[];
185
+ required: boolean;
186
+ default?: undefined;
187
+ 'x-component-props'?: undefined;
188
+ 'x-read-pretty'?: undefined;
189
+ };
190
+ required?: undefined;
191
+ target?: undefined;
192
+ onDelete?: undefined;
193
+ foreignKey?: undefined;
194
+ sourceKey?: undefined;
195
+ constraints?: undefined;
196
+ through?: undefined;
197
+ otherKey?: undefined;
198
+ } | {
199
+ type: string;
200
+ name: string;
201
+ target: string;
202
+ foreignKey: string;
203
+ sourceKey: string;
204
+ constraints: boolean;
205
+ onDelete: string;
206
+ interface?: undefined;
207
+ uiSchema?: undefined;
208
+ defaultValue?: undefined;
209
+ required?: undefined;
210
+ through?: undefined;
211
+ otherKey?: undefined;
212
+ } | {
213
+ type: string;
214
+ name: string;
215
+ defaultValue: {};
216
+ interface?: undefined;
217
+ uiSchema?: undefined;
218
+ required?: undefined;
219
+ target?: undefined;
220
+ onDelete?: undefined;
221
+ foreignKey?: undefined;
222
+ sourceKey?: undefined;
223
+ constraints?: undefined;
224
+ through?: undefined;
225
+ otherKey?: undefined;
226
+ } | {
227
+ type: string;
228
+ name: string;
229
+ target: string;
230
+ through: string;
231
+ foreignKey: string;
232
+ otherKey: string;
233
+ sourceKey: string;
234
+ constraints: boolean;
235
+ interface: string;
236
+ uiSchema: {
237
+ type: string;
238
+ title: string;
239
+ 'x-component': string;
240
+ 'x-component-props': {
241
+ multiple: boolean;
242
+ fieldNames: {
243
+ label: string;
244
+ value: string;
245
+ color: string;
246
+ };
247
+ mode: string;
248
+ };
249
+ 'x-read-pretty': boolean;
250
+ required?: undefined;
251
+ enum?: undefined;
252
+ default?: undefined;
253
+ };
254
+ defaultValue?: undefined;
255
+ required?: undefined;
256
+ onDelete?: undefined;
257
+ })[];
258
+ indexes: {
259
+ unique: boolean;
260
+ fields: string[];
261
+ }[];
262
+ };
263
+ export default _default;
@@ -0,0 +1,244 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var workflows_exports = {};
28
+ __export(workflows_exports, {
29
+ default: () => workflows_default
30
+ });
31
+ module.exports = __toCommonJS(workflows_exports);
32
+ var import_constants = require("../constants");
33
+ var workflows_default = {
34
+ dumpRules: "required",
35
+ migrationRules: ["overwrite", "schema-only"],
36
+ name: "workflows",
37
+ shared: true,
38
+ repository: "WorkflowRepository",
39
+ fields: [
40
+ {
41
+ name: "key",
42
+ type: "uid"
43
+ },
44
+ {
45
+ type: "string",
46
+ name: "title",
47
+ interface: "input",
48
+ uiSchema: {
49
+ title: '{{t("Name")}}',
50
+ type: "string",
51
+ "x-component": "Input",
52
+ required: true
53
+ }
54
+ },
55
+ {
56
+ type: "boolean",
57
+ name: "enabled",
58
+ defaultValue: false,
59
+ interface: "radioGroup",
60
+ uiSchema: {
61
+ title: `{{t("Status", { ns: "${import_constants.NAMESPACE}" })}}`,
62
+ type: "string",
63
+ enum: [
64
+ { label: `{{t("On", { ns: "${import_constants.NAMESPACE}" })}}`, value: true, color: "#52c41a" },
65
+ { label: `{{t("Off", { ns: "${import_constants.NAMESPACE}" })}}`, value: false }
66
+ ],
67
+ "x-component": "Radio.Group",
68
+ default: false
69
+ }
70
+ },
71
+ {
72
+ type: "text",
73
+ name: "description",
74
+ interface: "textarea",
75
+ uiSchema: {
76
+ title: '{{t("Description")}}',
77
+ type: "string",
78
+ "x-component": "Input.TextArea"
79
+ }
80
+ },
81
+ {
82
+ type: "string",
83
+ name: "type",
84
+ required: true,
85
+ interface: "select",
86
+ uiSchema: {
87
+ title: `{{t("Trigger type", { ns: "${import_constants.NAMESPACE}" })}}`,
88
+ type: "string",
89
+ "x-component": "Select",
90
+ enum: "{{useTriggersOptions()}}",
91
+ required: true
92
+ }
93
+ },
94
+ {
95
+ type: "string",
96
+ name: "triggerTitle"
97
+ },
98
+ {
99
+ type: "jsonb",
100
+ name: "config",
101
+ required: true,
102
+ defaultValue: {}
103
+ },
104
+ {
105
+ type: "hasMany",
106
+ name: "nodes",
107
+ target: "flow_nodes",
108
+ onDelete: "CASCADE"
109
+ },
110
+ {
111
+ type: "hasMany",
112
+ name: "executions"
113
+ },
114
+ {
115
+ type: "integer",
116
+ name: "executed",
117
+ defaultValue: 0
118
+ },
119
+ {
120
+ type: "integer",
121
+ name: "allExecuted",
122
+ defaultValue: 0
123
+ },
124
+ {
125
+ type: "boolean",
126
+ name: "current"
127
+ },
128
+ {
129
+ type: "boolean",
130
+ name: "sync",
131
+ defaultValue: false,
132
+ interface: "radioGroup",
133
+ uiSchema: {
134
+ title: `{{t("Mode", { ns: "${import_constants.NAMESPACE}" })}}`,
135
+ type: "boolean",
136
+ "x-component": "Radio.Group",
137
+ enum: [
138
+ {
139
+ label: `{{ t("Asynchronously", { ns: "${import_constants.NAMESPACE}" }) }}`,
140
+ value: false,
141
+ color: "cyan"
142
+ },
143
+ {
144
+ label: `{{ t("Synchronously", { ns: "${import_constants.NAMESPACE}" }) }}`,
145
+ value: true,
146
+ color: "orange"
147
+ }
148
+ ],
149
+ required: true
150
+ }
151
+ },
152
+ {
153
+ type: "hasMany",
154
+ name: "revisions",
155
+ target: "workflows",
156
+ foreignKey: "key",
157
+ sourceKey: "key",
158
+ // NOTE: no constraints needed here because tricky self-referencing
159
+ constraints: false,
160
+ onDelete: "NO ACTION"
161
+ },
162
+ {
163
+ type: "jsonb",
164
+ name: "options",
165
+ defaultValue: {}
166
+ },
167
+ {
168
+ type: "hasOne",
169
+ name: "stats",
170
+ target: "workflowStats",
171
+ foreignKey: "key",
172
+ sourceKey: "key",
173
+ constraints: false,
174
+ onDelete: "CASCADE"
175
+ // interface: 'oho',
176
+ // uiSchema: {
177
+ // type: 'object',
178
+ // 'x-component': 'AssociationSelect',
179
+ // 'x-component-props': {
180
+ // fieldNames: {
181
+ // label: 'executed',
182
+ // value: 'key',
183
+ // },
184
+ // },
185
+ // 'x-read-pretty': true,
186
+ // },
187
+ },
188
+ {
189
+ type: "hasOne",
190
+ name: "versionStats",
191
+ target: "workflowVersionStats",
192
+ foreignKey: "id",
193
+ sourceKey: "id",
194
+ constraints: false,
195
+ onDelete: "CASCADE"
196
+ // interface: 'oho',
197
+ // uiSchema: {
198
+ // type: 'object',
199
+ // 'x-component': 'AssociationSelect',
200
+ // 'x-component-props': {
201
+ // fieldNames: {
202
+ // label: 'executed',
203
+ // value: 'id',
204
+ // },
205
+ // },
206
+ // 'x-read-pretty': true,
207
+ // },
208
+ },
209
+ {
210
+ type: "belongsToMany",
211
+ name: "categories",
212
+ target: "workflowCategories",
213
+ through: "workflowCategoryRelations",
214
+ foreignKey: "workflowId",
215
+ otherKey: "categoryId",
216
+ sourceKey: "id",
217
+ constraints: false,
218
+ interface: "m2m",
219
+ uiSchema: {
220
+ type: "array",
221
+ title: `{{t("Category", { ns: "${import_constants.NAMESPACE}" })}}`,
222
+ "x-component": "AssociationField",
223
+ "x-component-props": {
224
+ multiple: true,
225
+ // objectValue: false,
226
+ fieldNames: {
227
+ label: "title",
228
+ value: "id",
229
+ color: "color"
230
+ },
231
+ mode: "Tag"
232
+ },
233
+ "x-read-pretty": true
234
+ }
235
+ }
236
+ ],
237
+ // NOTE: use unique index for avoiding deadlock in mysql when setCurrent
238
+ indexes: [
239
+ {
240
+ unique: true,
241
+ fields: ["key", "current"]
242
+ }
243
+ ]
244
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export declare const NAMESPACE = "workflow";
@@ -24,24 +24,13 @@ var __copyProps = (to, from, except, desc) => {
24
24
  return to;
25
25
  };
26
26
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
- var workflowTasks_exports = {};
28
- __export(workflowTasks_exports, {
29
- countMine: () => countMine
27
+ var constants_exports = {};
28
+ __export(constants_exports, {
29
+ NAMESPACE: () => NAMESPACE
30
30
  });
31
- module.exports = __toCommonJS(workflowTasks_exports);
32
- var import_sequelize = require("sequelize");
33
- var import_actions = require("@nocobase/actions");
34
- async function countMine(context, next) {
35
- const repository = import_actions.utils.getRepositoryFromParams(context);
36
- context.body = await repository.countAll({
37
- where: {
38
- userId: context.state.currentUser.id,
39
- workflowId: { [import_sequelize.Op.ne]: null }
40
- }
41
- }) || [];
42
- await next();
43
- }
31
+ module.exports = __toCommonJS(constants_exports);
32
+ const NAMESPACE = "workflow";
44
33
  // Annotate the CommonJS export names for ESM import in node:
45
34
  0 && (module.exports = {
46
- countMine
35
+ NAMESPACE
47
36
  });
@@ -11,24 +11,25 @@ module.exports = {
11
11
  "react": "18.2.0",
12
12
  "@formily/core": "2.3.0",
13
13
  "@formily/react": "2.3.0",
14
- "@nocobase/client": "1.7.0-beta.9",
15
- "@nocobase/utils": "1.7.0-beta.9",
14
+ "@nocobase/client": "1.7.0",
15
+ "@nocobase/utils": "1.7.0",
16
16
  "antd": "5.24.2",
17
17
  "@ant-design/icons": "5.6.1",
18
18
  "react-router-dom": "6.28.1",
19
19
  "react-i18next": "11.18.6",
20
20
  "lodash": "4.17.21",
21
+ "@dnd-kit/core": "6.1.0",
22
+ "@formily/shared": "2.3.2",
21
23
  "sequelize": "6.35.2",
22
- "@nocobase/database": "1.7.0-beta.9",
23
- "@nocobase/server": "1.7.0-beta.9",
24
- "@nocobase/data-source-manager": "1.7.0-beta.9",
25
- "@nocobase/logger": "1.7.0-beta.9",
26
- "@nocobase/evaluators": "1.7.0-beta.9",
24
+ "@nocobase/database": "1.7.0",
25
+ "@nocobase/server": "1.7.0",
26
+ "@nocobase/data-source-manager": "1.7.0",
27
+ "@nocobase/logger": "1.7.0",
28
+ "@nocobase/evaluators": "1.7.0",
27
29
  "@formily/antd-v5": "1.2.3",
28
30
  "@formily/reactive": "2.3.0",
29
- "@formily/shared": "2.3.2",
30
- "@nocobase/actions": "1.7.0-beta.9",
31
+ "@nocobase/actions": "1.7.0",
31
32
  "dayjs": "1.11.13",
32
- "@nocobase/plugin-workflow-test": "1.7.0-beta.9",
33
- "@nocobase/test": "1.7.0-beta.9"
33
+ "@nocobase/plugin-workflow-test": "1.7.0",
34
+ "@nocobase/test": "1.7.0"
34
35
  };